@nice2dev/ui-tools 1.0.10
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 +36 -0
- package/dist/access-control.d.ts +726 -0
- package/dist/access-control.d.ts.map +1 -0
- package/dist/accessibility-i18n.d.ts +1017 -0
- package/dist/accessibility-i18n.d.ts.map +1 -0
- package/dist/ai-assistant.d.ts +263 -0
- package/dist/ai-assistant.d.ts.map +1 -0
- package/dist/ai-playgrounds.d.ts +842 -0
- package/dist/ai-playgrounds.d.ts.map +1 -0
- package/dist/alerting-incidents.d.ts +558 -0
- package/dist/alerting-incidents.d.ts.map +1 -0
- package/dist/api-designer.d.ts +1568 -0
- package/dist/api-designer.d.ts.map +1 -0
- package/dist/api-testing.d.ts +1146 -0
- package/dist/api-testing.d.ts.map +1 -0
- package/dist/apm-profiling.d.ts +656 -0
- package/dist/apm-profiling.d.ts.map +1 -0
- package/dist/artifacts.d.ts +421 -0
- package/dist/artifacts.d.ts.map +1 -0
- package/dist/audit-compliance.d.ts +752 -0
- package/dist/audit-compliance.d.ts.map +1 -0
- package/dist/certificates.d.ts +256 -0
- package/dist/certificates.d.ts.map +1 -0
- package/dist/chart-builder.d.ts +1404 -0
- package/dist/chart-builder.d.ts.map +1 -0
- package/dist/cloud-instances.d.ts +169 -0
- package/dist/cloud-instances.d.ts.map +1 -0
- package/dist/config-management.d.ts +350 -0
- package/dist/config-management.d.ts.map +1 -0
- package/dist/containers.d.ts +256 -0
- package/dist/containers.d.ts.map +1 -0
- package/dist/dashboard-designer.d.ts +1238 -0
- package/dist/dashboard-designer.d.ts.map +1 -0
- package/dist/data-management.d.ts +496 -0
- package/dist/data-management.d.ts.map +1 -0
- package/dist/data-pipeline.d.ts +1105 -0
- package/dist/data-pipeline.d.ts.map +1 -0
- package/dist/data-warehouse.d.ts +1097 -0
- package/dist/data-warehouse.d.ts.map +1 -0
- package/dist/dataset-management.d.ts +782 -0
- package/dist/dataset-management.d.ts.map +1 -0
- package/dist/db-adapters.d.ts +704 -0
- package/dist/db-adapters.d.ts.map +1 -0
- package/dist/db-admin.d.ts +699 -0
- package/dist/db-admin.d.ts.map +1 -0
- package/dist/db-designer.d.ts +366 -0
- package/dist/db-designer.d.ts.map +1 -0
- package/dist/debugger.d.ts +356 -0
- package/dist/debugger.d.ts.map +1 -0
- package/dist/device-management.d.ts +871 -0
- package/dist/device-management.d.ts.map +1 -0
- package/dist/distributed-tracing.d.ts +427 -0
- package/dist/distributed-tracing.d.ts.map +1 -0
- package/dist/dns-management.d.ts +215 -0
- package/dist/dns-management.d.ts.map +1 -0
- package/dist/download-manager.d.ts +271 -0
- package/dist/download-manager.d.ts.map +1 -0
- package/dist/download-torrent.d.ts +1062 -0
- package/dist/download-torrent.d.ts.map +1 -0
- package/dist/edge-computing.d.ts +720 -0
- package/dist/edge-computing.d.ts.map +1 -0
- package/dist/education.d.ts +1135 -0
- package/dist/education.d.ts.map +1 -0
- package/dist/email-template.d.ts +1141 -0
- package/dist/email-template.d.ts.map +1 -0
- package/dist/erp-enterprise.d.ts +1270 -0
- package/dist/erp-enterprise.d.ts.map +1 -0
- package/dist/form-builder.d.ts +1117 -0
- package/dist/form-builder.d.ts.map +1 -0
- package/dist/game-engine-advanced.d.ts +1049 -0
- package/dist/game-engine-advanced.d.ts.map +1 -0
- package/dist/git.d.ts +415 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/hardware-integration.d.ts +966 -0
- package/dist/hardware-integration.d.ts.map +1 -0
- package/dist/iac.d.ts +318 -0
- package/dist/iac.d.ts.map +1 -0
- package/dist/icon-tools.d.ts +1023 -0
- package/dist/icon-tools.d.ts.map +1 -0
- package/dist/ide.d.ts +322 -0
- package/dist/ide.d.ts.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +176 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +1887 -0
- package/dist/index.mjs.map +1 -0
- package/dist/integration-platform.d.ts +857 -0
- package/dist/integration-platform.d.ts.map +1 -0
- package/dist/kubernetes.d.ts +278 -0
- package/dist/kubernetes.d.ts.map +1 -0
- package/dist/life-management.d.ts +1132 -0
- package/dist/life-management.d.ts.map +1 -0
- package/dist/log-management.d.ts +473 -0
- package/dist/log-management.d.ts.map +1 -0
- package/dist/mathematics.d.ts +870 -0
- package/dist/mathematics.d.ts.map +1 -0
- package/dist/message-queue.d.ts +1006 -0
- package/dist/message-queue.d.ts.map +1 -0
- package/dist/metrics-dashboard.d.ts +596 -0
- package/dist/metrics-dashboard.d.ts.map +1 -0
- package/dist/mobile-components.d.ts +766 -0
- package/dist/mobile-components.d.ts.map +1 -0
- package/dist/model-deployment.d.ts +787 -0
- package/dist/model-deployment.d.ts.map +1 -0
- package/dist/model-registry.d.ts +740 -0
- package/dist/model-registry.d.ts.map +1 -0
- package/dist/model-training.d.ts +706 -0
- package/dist/model-training.d.ts.map +1 -0
- package/dist/network-config.d.ts +334 -0
- package/dist/network-config.d.ts.map +1 -0
- package/dist/network-monitoring.d.ts +291 -0
- package/dist/network-monitoring.d.ts.map +1 -0
- package/dist/pdf-tools.d.ts +1003 -0
- package/dist/pdf-tools.d.ts.map +1 -0
- package/dist/pipelines.d.ts +250 -0
- package/dist/pipelines.d.ts.map +1 -0
- package/dist/remote-desktop.d.ts +207 -0
- package/dist/remote-desktop.d.ts.map +1 -0
- package/dist/report-designer.d.ts +1153 -0
- package/dist/report-designer.d.ts.map +1 -0
- package/dist/scada-industrial.d.ts +848 -0
- package/dist/scada-industrial.d.ts.map +1 -0
- package/dist/scientific-research.d.ts +1149 -0
- package/dist/scientific-research.d.ts.map +1 -0
- package/dist/secret-management.d.ts +617 -0
- package/dist/secret-management.d.ts.map +1 -0
- package/dist/security-scanning.d.ts +714 -0
- package/dist/security-scanning.d.ts.map +1 -0
- package/dist/self-service-analytics.d.ts +1208 -0
- package/dist/self-service-analytics.d.ts.map +1 -0
- package/dist/sensor-dashboard.d.ts +845 -0
- package/dist/sensor-dashboard.d.ts.map +1 -0
- package/dist/server-management.d.ts +331 -0
- package/dist/server-management.d.ts.map +1 -0
- package/dist/smart-home.d.ts +861 -0
- package/dist/smart-home.d.ts.map +1 -0
- package/dist/spreadsheet.d.ts +1043 -0
- package/dist/spreadsheet.d.ts.map +1 -0
- package/dist/sql-editor.d.ts +402 -0
- package/dist/sql-editor.d.ts.map +1 -0
- package/dist/terminal.d.ts +245 -0
- package/dist/terminal.d.ts.map +1 -0
- package/dist/testing-qa.d.ts +1013 -0
- package/dist/testing-qa.d.ts.map +1 -0
- package/dist/torrent-client.d.ts +298 -0
- package/dist/torrent-client.d.ts.map +1 -0
- package/dist/traceless.d.ts +759 -0
- package/dist/traceless.d.ts.map +1 -0
- package/dist/virtual-machines.d.ts +199 -0
- package/dist/virtual-machines.d.ts.map +1 -0
- package/dist/visual-scripting.d.ts +381 -0
- package/dist/visual-scripting.d.ts.map +1 -0
- package/dist/word-processor.d.ts +1124 -0
- package/dist/word-processor.d.ts.map +1 -0
- package/dist/workspace.d.ts +333 -0
- package/dist/workspace.d.ts.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,1124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file word-processor.ts
|
|
3
|
+
* @module @nice2dev/ui-tools
|
|
4
|
+
* @description PRO-14.3 — Word Processor
|
|
5
|
+
*
|
|
6
|
+
* Types for Word-like document editor: rich text, styles, tables, images,
|
|
7
|
+
* lists, headers/footers, track changes, comments, mail merge, templates.
|
|
8
|
+
*/
|
|
9
|
+
/** Document node type */
|
|
10
|
+
export type DocumentNodeType = 'document' | 'paragraph' | 'text' | 'heading' | 'table' | 'tableRow' | 'tableCell' | 'image' | 'list' | 'listItem' | 'blockquote' | 'codeBlock' | 'horizontalRule' | 'pageBreak' | 'sectionBreak' | 'columnBreak' | 'bookmark' | 'hyperlink' | 'footnote' | 'endnote' | 'comment' | 'toc' | 'field' | 'drawing' | 'shape' | 'equation' | 'embed';
|
|
11
|
+
/** Text alignment */
|
|
12
|
+
export type TextAlignment = 'left' | 'center' | 'right' | 'justify' | 'distributed';
|
|
13
|
+
/** Vertical alignment */
|
|
14
|
+
export type VerticalAlignment = 'top' | 'center' | 'bottom';
|
|
15
|
+
/** Document editor configuration */
|
|
16
|
+
export interface DocumentEditorConfig {
|
|
17
|
+
/** Initial content */
|
|
18
|
+
content?: DocumentContent;
|
|
19
|
+
/** Document template */
|
|
20
|
+
template?: DocumentTemplate;
|
|
21
|
+
/** Page setup */
|
|
22
|
+
pageSetup?: PageSetup;
|
|
23
|
+
/** Enable spell check */
|
|
24
|
+
spellCheck?: boolean;
|
|
25
|
+
/** Enable grammar check */
|
|
26
|
+
grammarCheck?: boolean;
|
|
27
|
+
/** Enable auto-correct */
|
|
28
|
+
autoCorrect?: boolean;
|
|
29
|
+
/** Enable auto-format */
|
|
30
|
+
autoFormat?: boolean;
|
|
31
|
+
/** Enable track changes */
|
|
32
|
+
trackChanges?: boolean;
|
|
33
|
+
/** Enable comments */
|
|
34
|
+
comments?: boolean;
|
|
35
|
+
/** Enable collaboration */
|
|
36
|
+
collaboration?: boolean;
|
|
37
|
+
/** Enable undo/redo */
|
|
38
|
+
undoRedo?: boolean;
|
|
39
|
+
/** Max undo steps */
|
|
40
|
+
maxUndoSteps?: number;
|
|
41
|
+
/** Read only */
|
|
42
|
+
readOnly?: boolean;
|
|
43
|
+
/** Show rulers */
|
|
44
|
+
showRulers?: boolean;
|
|
45
|
+
/** Show page breaks */
|
|
46
|
+
showPageBreaks?: boolean;
|
|
47
|
+
/** Show formatting marks */
|
|
48
|
+
showFormattingMarks?: boolean;
|
|
49
|
+
/** Show navigation pane */
|
|
50
|
+
showNavigationPane?: boolean;
|
|
51
|
+
/** View mode */
|
|
52
|
+
viewMode?: ViewMode;
|
|
53
|
+
/** Zoom level */
|
|
54
|
+
zoom?: number;
|
|
55
|
+
/** Language */
|
|
56
|
+
language?: string;
|
|
57
|
+
/** Custom styles */
|
|
58
|
+
customStyles?: DocumentStyle[];
|
|
59
|
+
/** Custom fonts */
|
|
60
|
+
customFonts?: {
|
|
61
|
+
family: string;
|
|
62
|
+
url: string;
|
|
63
|
+
}[];
|
|
64
|
+
/** Toolbar configuration */
|
|
65
|
+
toolbar?: DocumentToolbarConfig;
|
|
66
|
+
/** Mention configuration */
|
|
67
|
+
mentions?: MentionConfig;
|
|
68
|
+
}
|
|
69
|
+
/** View mode */
|
|
70
|
+
export type ViewMode = 'print' | 'web' | 'outline' | 'draft' | 'read';
|
|
71
|
+
/** Page setup */
|
|
72
|
+
export interface PageSetup {
|
|
73
|
+
size?: PageSize;
|
|
74
|
+
customSize?: {
|
|
75
|
+
width: number;
|
|
76
|
+
height: number;
|
|
77
|
+
};
|
|
78
|
+
orientation?: 'portrait' | 'landscape';
|
|
79
|
+
margins?: PageMargins;
|
|
80
|
+
gutter?: number;
|
|
81
|
+
gutterPosition?: 'left' | 'top';
|
|
82
|
+
mirrorMargins?: boolean;
|
|
83
|
+
header?: number;
|
|
84
|
+
footer?: number;
|
|
85
|
+
paperSource?: {
|
|
86
|
+
first?: string;
|
|
87
|
+
other?: string;
|
|
88
|
+
};
|
|
89
|
+
lineNumbers?: LineNumberConfig;
|
|
90
|
+
columns?: ColumnConfig;
|
|
91
|
+
verticalAlign?: VerticalAlignment;
|
|
92
|
+
}
|
|
93
|
+
/** Page size */
|
|
94
|
+
export type PageSize = 'letter' | 'legal' | 'tabloid' | 'ledger' | 'a3' | 'a4' | 'a5' | 'b4' | 'b5' | 'executive' | 'custom';
|
|
95
|
+
/** Page margins */
|
|
96
|
+
export interface PageMargins {
|
|
97
|
+
top: number;
|
|
98
|
+
right: number;
|
|
99
|
+
bottom: number;
|
|
100
|
+
left: number;
|
|
101
|
+
}
|
|
102
|
+
/** Line number configuration */
|
|
103
|
+
export interface LineNumberConfig {
|
|
104
|
+
enabled: boolean;
|
|
105
|
+
startAt?: number;
|
|
106
|
+
countBy?: number;
|
|
107
|
+
restartMode?: 'continuous' | 'page' | 'section';
|
|
108
|
+
distance?: number;
|
|
109
|
+
}
|
|
110
|
+
/** Column configuration */
|
|
111
|
+
export interface ColumnConfig {
|
|
112
|
+
count: number;
|
|
113
|
+
spacing?: number;
|
|
114
|
+
widths?: number[];
|
|
115
|
+
separatorLine?: boolean;
|
|
116
|
+
}
|
|
117
|
+
/** Mention configuration */
|
|
118
|
+
export interface MentionConfig {
|
|
119
|
+
trigger?: string;
|
|
120
|
+
users?: MentionUser[];
|
|
121
|
+
fetchUsers?: (query: string) => Promise<MentionUser[]>;
|
|
122
|
+
}
|
|
123
|
+
/** Mention user */
|
|
124
|
+
export interface MentionUser {
|
|
125
|
+
id: string;
|
|
126
|
+
name: string;
|
|
127
|
+
avatar?: string;
|
|
128
|
+
email?: string;
|
|
129
|
+
}
|
|
130
|
+
/** Document toolbar configuration */
|
|
131
|
+
export interface DocumentToolbarConfig {
|
|
132
|
+
visible?: boolean;
|
|
133
|
+
position?: 'top' | 'floating';
|
|
134
|
+
items?: DocumentToolbarItem[];
|
|
135
|
+
customItems?: DocumentCustomToolbarItem[];
|
|
136
|
+
}
|
|
137
|
+
/** Toolbar item */
|
|
138
|
+
export type DocumentToolbarItem = 'undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'pasteSpecial' | 'font' | 'fontSize' | 'fontSizeIncrease' | 'fontSizeDecrease' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'subscript' | 'superscript' | 'textColor' | 'highlight' | 'clearFormatting' | 'alignLeft' | 'alignCenter' | 'alignRight' | 'alignJustify' | 'lineSpacing' | 'bulletList' | 'numberedList' | 'decreaseIndent' | 'increaseIndent' | 'insertTable' | 'insertImage' | 'insertLink' | 'insertComment' | 'insertPageBreak' | 'insertSymbol' | 'insertEquation' | 'insertToc' | 'styles' | 'find' | 'replace' | 'spellCheck' | 'trackChanges' | 'print' | 'separator';
|
|
139
|
+
/** Custom toolbar item */
|
|
140
|
+
export interface DocumentCustomToolbarItem {
|
|
141
|
+
id: string;
|
|
142
|
+
label?: string;
|
|
143
|
+
icon?: string;
|
|
144
|
+
tooltip?: string;
|
|
145
|
+
handler: () => void;
|
|
146
|
+
disabled?: boolean;
|
|
147
|
+
position?: number;
|
|
148
|
+
}
|
|
149
|
+
/** Document content */
|
|
150
|
+
export interface DocumentContent {
|
|
151
|
+
type: 'document';
|
|
152
|
+
content: DocumentNode[];
|
|
153
|
+
properties?: DocumentProperties;
|
|
154
|
+
}
|
|
155
|
+
/** Document node */
|
|
156
|
+
export type DocumentNode = ParagraphNode | HeadingNode | TableNode | ImageNode | ListNode | BlockquoteNode | CodeBlockNode | HorizontalRuleNode | PageBreakNode | SectionBreakNode | TocNode | DrawingNode | EquationNode | EmbedNode;
|
|
157
|
+
/** Text node */
|
|
158
|
+
export interface TextNode {
|
|
159
|
+
type: 'text';
|
|
160
|
+
text: string;
|
|
161
|
+
marks?: TextMark[];
|
|
162
|
+
}
|
|
163
|
+
/** Text mark */
|
|
164
|
+
export interface TextMark {
|
|
165
|
+
type: MarkType;
|
|
166
|
+
attrs?: Record<string, unknown>;
|
|
167
|
+
}
|
|
168
|
+
/** Mark type */
|
|
169
|
+
export type MarkType = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'subscript' | 'superscript' | 'code' | 'link' | 'textStyle' | 'highlight' | 'comment' | 'footnoteRef' | 'bookmarkRef';
|
|
170
|
+
/** Paragraph node */
|
|
171
|
+
export interface ParagraphNode {
|
|
172
|
+
type: 'paragraph';
|
|
173
|
+
content?: (TextNode | InlineNode)[];
|
|
174
|
+
attrs?: ParagraphAttrs;
|
|
175
|
+
}
|
|
176
|
+
/** Paragraph attributes */
|
|
177
|
+
export interface ParagraphAttrs {
|
|
178
|
+
alignment?: TextAlignment;
|
|
179
|
+
lineSpacing?: number | LineSpacing;
|
|
180
|
+
spaceBefore?: number;
|
|
181
|
+
spaceAfter?: number;
|
|
182
|
+
firstLineIndent?: number;
|
|
183
|
+
leftIndent?: number;
|
|
184
|
+
rightIndent?: number;
|
|
185
|
+
styleId?: string;
|
|
186
|
+
keepWithNext?: boolean;
|
|
187
|
+
keepTogether?: boolean;
|
|
188
|
+
pageBreakBefore?: boolean;
|
|
189
|
+
widowOrphanControl?: boolean;
|
|
190
|
+
borderTop?: BorderDef;
|
|
191
|
+
borderBottom?: BorderDef;
|
|
192
|
+
borderLeft?: BorderDef;
|
|
193
|
+
borderRight?: BorderDef;
|
|
194
|
+
shading?: ShadingDef;
|
|
195
|
+
tabStops?: TabStop[];
|
|
196
|
+
}
|
|
197
|
+
/** Line spacing */
|
|
198
|
+
export interface LineSpacing {
|
|
199
|
+
rule: 'auto' | 'exact' | 'atLeast' | 'multiple';
|
|
200
|
+
value: number;
|
|
201
|
+
}
|
|
202
|
+
/** Border definition */
|
|
203
|
+
export interface BorderDef {
|
|
204
|
+
style: BorderStyle;
|
|
205
|
+
width: number;
|
|
206
|
+
color: string;
|
|
207
|
+
space?: number;
|
|
208
|
+
}
|
|
209
|
+
/** Border style */
|
|
210
|
+
export type BorderStyle = 'single' | 'thick' | 'double' | 'dotted' | 'dashed' | 'dashSmallGap' | 'dotDash' | 'dotDotDash' | 'triple' | 'thinThickSmallGap' | 'thickThinSmallGap' | 'thinThickThinSmallGap' | 'thinThickMediumGap' | 'thickThinMediumGap' | 'thinThickThinMediumGap' | 'thinThickLargeGap' | 'thickThinLargeGap' | 'thinThickThinLargeGap' | 'wave' | 'doubleWave' | 'dashDotStroked' | 'threeDEmboss' | 'threeDEngrave' | 'outset' | 'inset' | 'none';
|
|
211
|
+
/** Shading definition */
|
|
212
|
+
export interface ShadingDef {
|
|
213
|
+
pattern: ShadingPattern;
|
|
214
|
+
color?: string;
|
|
215
|
+
fill?: string;
|
|
216
|
+
}
|
|
217
|
+
/** Shading pattern */
|
|
218
|
+
export type ShadingPattern = 'clear' | 'solid' | 'horzStripe' | 'vertStripe' | 'diagStripe' | 'reverseDiagStripe' | 'horzCross' | 'diagCross' | 'thinHorzStripe' | 'thinVertStripe' | 'thinDiagStripe' | 'thinReverseDiagStripe' | 'thinHorzCross' | 'thinDiagCross' | 'pct5' | 'pct10' | 'pct12' | 'pct15' | 'pct20' | 'pct25' | 'pct30' | 'pct35' | 'pct37' | 'pct40' | 'pct45' | 'pct50' | 'pct55' | 'pct60' | 'pct62' | 'pct65' | 'pct70' | 'pct75' | 'pct80' | 'pct85' | 'pct87' | 'pct90' | 'pct95';
|
|
219
|
+
/** Tab stop */
|
|
220
|
+
export interface TabStop {
|
|
221
|
+
position: number;
|
|
222
|
+
alignment: 'left' | 'center' | 'right' | 'decimal' | 'bar';
|
|
223
|
+
leader?: 'none' | 'dot' | 'hyphen' | 'underscore' | 'middleDot';
|
|
224
|
+
}
|
|
225
|
+
/** Inline node */
|
|
226
|
+
export type InlineNode = TextNode | InlineImageNode | HyperlinkNode | BookmarkNode | FootnoteRefNode | EndnoteRefNode | FieldNode | SymbolNode | InlineEquationNode;
|
|
227
|
+
/** Heading node */
|
|
228
|
+
export interface HeadingNode {
|
|
229
|
+
type: 'heading';
|
|
230
|
+
level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
231
|
+
content?: (TextNode | InlineNode)[];
|
|
232
|
+
attrs?: HeadingAttrs;
|
|
233
|
+
}
|
|
234
|
+
/** Heading attributes */
|
|
235
|
+
export interface HeadingAttrs extends ParagraphAttrs {
|
|
236
|
+
outlineLevel?: number;
|
|
237
|
+
numbering?: HeadingNumbering;
|
|
238
|
+
}
|
|
239
|
+
/** Heading numbering */
|
|
240
|
+
export interface HeadingNumbering {
|
|
241
|
+
format: NumberingFormat;
|
|
242
|
+
prefix?: string;
|
|
243
|
+
suffix?: string;
|
|
244
|
+
start?: number;
|
|
245
|
+
}
|
|
246
|
+
/** Numbering format */
|
|
247
|
+
export type NumberingFormat = 'decimal' | 'lowerLetter' | 'upperLetter' | 'lowerRoman' | 'upperRoman' | 'bullet' | 'ordinal' | 'cardinalText' | 'ordinalText' | 'hex' | 'chicago' | 'decimalZero' | 'none';
|
|
248
|
+
/** Table node */
|
|
249
|
+
export interface TableNode {
|
|
250
|
+
type: 'table';
|
|
251
|
+
rows: TableRowNode[];
|
|
252
|
+
attrs?: TableAttrs;
|
|
253
|
+
}
|
|
254
|
+
/** Table attributes */
|
|
255
|
+
export interface TableAttrs {
|
|
256
|
+
width?: TableWidth;
|
|
257
|
+
alignment?: TextAlignment;
|
|
258
|
+
indent?: number;
|
|
259
|
+
borders?: TableBorders;
|
|
260
|
+
shading?: ShadingDef;
|
|
261
|
+
cellMargins?: CellMargins;
|
|
262
|
+
cellSpacing?: number;
|
|
263
|
+
layout?: 'auto' | 'fixed';
|
|
264
|
+
look?: TableLook;
|
|
265
|
+
caption?: string;
|
|
266
|
+
}
|
|
267
|
+
/** Table width */
|
|
268
|
+
export interface TableWidth {
|
|
269
|
+
type: 'auto' | 'dxa' | 'pct';
|
|
270
|
+
value: number;
|
|
271
|
+
}
|
|
272
|
+
/** Table borders */
|
|
273
|
+
export interface TableBorders {
|
|
274
|
+
top?: BorderDef;
|
|
275
|
+
bottom?: BorderDef;
|
|
276
|
+
left?: BorderDef;
|
|
277
|
+
right?: BorderDef;
|
|
278
|
+
insideH?: BorderDef;
|
|
279
|
+
insideV?: BorderDef;
|
|
280
|
+
}
|
|
281
|
+
/** Cell margins */
|
|
282
|
+
export interface CellMargins {
|
|
283
|
+
top?: number;
|
|
284
|
+
bottom?: number;
|
|
285
|
+
left?: number;
|
|
286
|
+
right?: number;
|
|
287
|
+
}
|
|
288
|
+
/** Table look */
|
|
289
|
+
export interface TableLook {
|
|
290
|
+
firstRow?: boolean;
|
|
291
|
+
lastRow?: boolean;
|
|
292
|
+
firstColumn?: boolean;
|
|
293
|
+
lastColumn?: boolean;
|
|
294
|
+
noHBand?: boolean;
|
|
295
|
+
noVBand?: boolean;
|
|
296
|
+
}
|
|
297
|
+
/** Table row node */
|
|
298
|
+
export interface TableRowNode {
|
|
299
|
+
type: 'tableRow';
|
|
300
|
+
cells: TableCellNode[];
|
|
301
|
+
attrs?: TableRowAttrs;
|
|
302
|
+
}
|
|
303
|
+
/** Table row attributes */
|
|
304
|
+
export interface TableRowAttrs {
|
|
305
|
+
height?: TableRowHeight;
|
|
306
|
+
header?: boolean;
|
|
307
|
+
cantSplit?: boolean;
|
|
308
|
+
}
|
|
309
|
+
/** Table row height */
|
|
310
|
+
export interface TableRowHeight {
|
|
311
|
+
rule: 'auto' | 'exact' | 'atLeast';
|
|
312
|
+
value: number;
|
|
313
|
+
}
|
|
314
|
+
/** Table cell node */
|
|
315
|
+
export interface TableCellNode {
|
|
316
|
+
type: 'tableCell';
|
|
317
|
+
content: (ParagraphNode | TableNode | ListNode | ImageNode)[];
|
|
318
|
+
attrs?: TableCellAttrs;
|
|
319
|
+
}
|
|
320
|
+
/** Table cell attributes */
|
|
321
|
+
export interface TableCellAttrs {
|
|
322
|
+
width?: TableWidth;
|
|
323
|
+
colspan?: number;
|
|
324
|
+
rowspan?: number;
|
|
325
|
+
verticalAlign?: VerticalAlignment;
|
|
326
|
+
textDirection?: 'lrTb' | 'tbRl' | 'btLr' | 'lrTbV' | 'tbRlV' | 'tbLrV';
|
|
327
|
+
borders?: TableBorders;
|
|
328
|
+
shading?: ShadingDef;
|
|
329
|
+
margins?: CellMargins;
|
|
330
|
+
noWrap?: boolean;
|
|
331
|
+
fitText?: boolean;
|
|
332
|
+
}
|
|
333
|
+
/** Image node */
|
|
334
|
+
export interface ImageNode {
|
|
335
|
+
type: 'image';
|
|
336
|
+
src: string;
|
|
337
|
+
attrs?: ImageAttrs;
|
|
338
|
+
}
|
|
339
|
+
/** Image attributes */
|
|
340
|
+
export interface ImageAttrs {
|
|
341
|
+
alt?: string;
|
|
342
|
+
title?: string;
|
|
343
|
+
width?: number;
|
|
344
|
+
height?: number;
|
|
345
|
+
alignment?: TextAlignment;
|
|
346
|
+
wrapping?: ImageWrapping;
|
|
347
|
+
position?: ImagePosition;
|
|
348
|
+
border?: BorderDef;
|
|
349
|
+
effects?: ImageEffects;
|
|
350
|
+
}
|
|
351
|
+
/** Image wrapping */
|
|
352
|
+
export interface ImageWrapping {
|
|
353
|
+
type: 'inline' | 'square' | 'tight' | 'through' | 'topBottom' | 'behind' | 'inFront';
|
|
354
|
+
side?: 'both' | 'left' | 'right' | 'largest';
|
|
355
|
+
distanceTop?: number;
|
|
356
|
+
distanceBottom?: number;
|
|
357
|
+
distanceLeft?: number;
|
|
358
|
+
distanceRight?: number;
|
|
359
|
+
}
|
|
360
|
+
/** Image position */
|
|
361
|
+
export interface ImagePosition {
|
|
362
|
+
horizontal?: PositionDef;
|
|
363
|
+
vertical?: PositionDef;
|
|
364
|
+
allowOverlap?: boolean;
|
|
365
|
+
locked?: boolean;
|
|
366
|
+
layoutInCell?: boolean;
|
|
367
|
+
}
|
|
368
|
+
/** Position definition */
|
|
369
|
+
export interface PositionDef {
|
|
370
|
+
relative: 'character' | 'column' | 'margin' | 'page' | 'paragraph' | 'line';
|
|
371
|
+
align?: 'left' | 'center' | 'right' | 'inside' | 'outside';
|
|
372
|
+
offset?: number;
|
|
373
|
+
}
|
|
374
|
+
/** Image effects */
|
|
375
|
+
export interface ImageEffects {
|
|
376
|
+
brightness?: number;
|
|
377
|
+
contrast?: number;
|
|
378
|
+
saturation?: number;
|
|
379
|
+
rotation?: number;
|
|
380
|
+
flipH?: boolean;
|
|
381
|
+
flipV?: boolean;
|
|
382
|
+
crop?: CropDef;
|
|
383
|
+
shadow?: ShadowDef;
|
|
384
|
+
reflection?: ReflectionDef;
|
|
385
|
+
glow?: GlowDef;
|
|
386
|
+
softEdge?: number;
|
|
387
|
+
}
|
|
388
|
+
/** Crop definition */
|
|
389
|
+
export interface CropDef {
|
|
390
|
+
top: number;
|
|
391
|
+
bottom: number;
|
|
392
|
+
left: number;
|
|
393
|
+
right: number;
|
|
394
|
+
}
|
|
395
|
+
/** Shadow definition */
|
|
396
|
+
export interface ShadowDef {
|
|
397
|
+
type: 'outer' | 'inner';
|
|
398
|
+
color: string;
|
|
399
|
+
blur: number;
|
|
400
|
+
distance: number;
|
|
401
|
+
direction: number;
|
|
402
|
+
opacity?: number;
|
|
403
|
+
}
|
|
404
|
+
/** Reflection definition */
|
|
405
|
+
export interface ReflectionDef {
|
|
406
|
+
blur: number;
|
|
407
|
+
startOpacity: number;
|
|
408
|
+
endOpacity: number;
|
|
409
|
+
startPosition: number;
|
|
410
|
+
endPosition: number;
|
|
411
|
+
distance: number;
|
|
412
|
+
direction: number;
|
|
413
|
+
}
|
|
414
|
+
/** Glow definition */
|
|
415
|
+
export interface GlowDef {
|
|
416
|
+
color: string;
|
|
417
|
+
radius: number;
|
|
418
|
+
opacity?: number;
|
|
419
|
+
}
|
|
420
|
+
/** Inline image node */
|
|
421
|
+
export interface InlineImageNode {
|
|
422
|
+
type: 'inlineImage';
|
|
423
|
+
src: string;
|
|
424
|
+
attrs?: {
|
|
425
|
+
alt?: string;
|
|
426
|
+
width?: number;
|
|
427
|
+
height?: number;
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
/** Drawing node */
|
|
431
|
+
export interface DrawingNode {
|
|
432
|
+
type: 'drawing';
|
|
433
|
+
shapes: ShapeNode[];
|
|
434
|
+
attrs?: DrawingAttrs;
|
|
435
|
+
}
|
|
436
|
+
/** Drawing attributes */
|
|
437
|
+
export interface DrawingAttrs extends ImageAttrs {
|
|
438
|
+
groupId?: string;
|
|
439
|
+
}
|
|
440
|
+
/** Shape node */
|
|
441
|
+
export interface ShapeNode {
|
|
442
|
+
type: 'shape';
|
|
443
|
+
shapeType: ShapeType;
|
|
444
|
+
position: {
|
|
445
|
+
x: number;
|
|
446
|
+
y: number;
|
|
447
|
+
};
|
|
448
|
+
size: {
|
|
449
|
+
width: number;
|
|
450
|
+
height: number;
|
|
451
|
+
};
|
|
452
|
+
attrs?: ShapeAttrs;
|
|
453
|
+
textContent?: ParagraphNode[];
|
|
454
|
+
}
|
|
455
|
+
/** Shape type */
|
|
456
|
+
export type ShapeType = 'rectangle' | 'roundedRectangle' | 'ellipse' | 'triangle' | 'rightTriangle' | 'parallelogram' | 'trapezoid' | 'diamond' | 'pentagon' | 'hexagon' | 'heptagon' | 'octagon' | 'star4' | 'star5' | 'star6' | 'star7' | 'star8' | 'star10' | 'star12' | 'star16' | 'star24' | 'star32' | 'lineArrow' | 'lineArrowDouble' | 'line' | 'curvedConnector' | 'connector' | 'callout1' | 'callout2' | 'callout3' | 'wedgeRoundRectCallout' | 'wedgeEllipseCallout' | 'cloudCallout' | 'borderCallout1' | 'borderCallout2' | 'borderCallout3' | 'cube' | 'cylinder' | 'donut' | 'can' | 'blockArc' | 'heart' | 'lightningBolt' | 'sun' | 'moon' | 'cloud' | 'brace' | 'bracket' | 'flowchartProcess' | 'flowchartDecision' | 'flowchartData' | 'flowchartTerminator' | 'flowchartDocument';
|
|
457
|
+
/** Shape attributes */
|
|
458
|
+
export interface ShapeAttrs {
|
|
459
|
+
fill?: ShapeFill;
|
|
460
|
+
stroke?: ShapeStroke;
|
|
461
|
+
rotation?: number;
|
|
462
|
+
flipH?: boolean;
|
|
463
|
+
flipV?: boolean;
|
|
464
|
+
shadow?: ShadowDef;
|
|
465
|
+
opacity?: number;
|
|
466
|
+
}
|
|
467
|
+
/** Shape fill */
|
|
468
|
+
export interface ShapeFill {
|
|
469
|
+
type: 'solid' | 'gradient' | 'pattern' | 'none';
|
|
470
|
+
color?: string;
|
|
471
|
+
gradient?: GradientFill;
|
|
472
|
+
pattern?: PatternFill;
|
|
473
|
+
}
|
|
474
|
+
/** Gradient fill */
|
|
475
|
+
export interface GradientFill {
|
|
476
|
+
type: 'linear' | 'radial';
|
|
477
|
+
angle?: number;
|
|
478
|
+
stops: {
|
|
479
|
+
position: number;
|
|
480
|
+
color: string;
|
|
481
|
+
}[];
|
|
482
|
+
}
|
|
483
|
+
/** Pattern fill */
|
|
484
|
+
export interface PatternFill {
|
|
485
|
+
pattern: string;
|
|
486
|
+
foreground: string;
|
|
487
|
+
background: string;
|
|
488
|
+
}
|
|
489
|
+
/** Shape stroke */
|
|
490
|
+
export interface ShapeStroke {
|
|
491
|
+
color: string;
|
|
492
|
+
width: number;
|
|
493
|
+
style?: 'solid' | 'dashed' | 'dotted' | 'dashDot' | 'dashDotDot';
|
|
494
|
+
dashArray?: number[];
|
|
495
|
+
cap?: 'flat' | 'round' | 'square';
|
|
496
|
+
join?: 'miter' | 'round' | 'bevel';
|
|
497
|
+
}
|
|
498
|
+
/** List node */
|
|
499
|
+
export interface ListNode {
|
|
500
|
+
type: 'list';
|
|
501
|
+
listType: 'bullet' | 'ordered';
|
|
502
|
+
items: ListItemNode[];
|
|
503
|
+
attrs?: ListAttrs;
|
|
504
|
+
}
|
|
505
|
+
/** List attributes */
|
|
506
|
+
export interface ListAttrs {
|
|
507
|
+
styleId?: string;
|
|
508
|
+
start?: number;
|
|
509
|
+
tight?: boolean;
|
|
510
|
+
}
|
|
511
|
+
/** List item node */
|
|
512
|
+
export interface ListItemNode {
|
|
513
|
+
type: 'listItem';
|
|
514
|
+
content: (ParagraphNode | ListNode)[];
|
|
515
|
+
attrs?: ListItemAttrs;
|
|
516
|
+
}
|
|
517
|
+
/** List item attributes */
|
|
518
|
+
export interface ListItemAttrs {
|
|
519
|
+
level?: number;
|
|
520
|
+
numbering?: ListNumbering;
|
|
521
|
+
}
|
|
522
|
+
/** List numbering */
|
|
523
|
+
export interface ListNumbering {
|
|
524
|
+
format: NumberingFormat;
|
|
525
|
+
text?: string;
|
|
526
|
+
font?: string;
|
|
527
|
+
color?: string;
|
|
528
|
+
size?: number;
|
|
529
|
+
}
|
|
530
|
+
/** Blockquote node */
|
|
531
|
+
export interface BlockquoteNode {
|
|
532
|
+
type: 'blockquote';
|
|
533
|
+
content: (ParagraphNode | ListNode | BlockquoteNode)[];
|
|
534
|
+
attrs?: {
|
|
535
|
+
alignment?: TextAlignment;
|
|
536
|
+
borderLeft?: BorderDef;
|
|
537
|
+
shading?: ShadingDef;
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
/** Code block node */
|
|
541
|
+
export interface CodeBlockNode {
|
|
542
|
+
type: 'codeBlock';
|
|
543
|
+
content: string;
|
|
544
|
+
attrs?: {
|
|
545
|
+
language?: string;
|
|
546
|
+
lineNumbers?: boolean;
|
|
547
|
+
theme?: string;
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
/** Horizontal rule node */
|
|
551
|
+
export interface HorizontalRuleNode {
|
|
552
|
+
type: 'horizontalRule';
|
|
553
|
+
attrs?: {
|
|
554
|
+
width?: string | number;
|
|
555
|
+
height?: number;
|
|
556
|
+
alignment?: TextAlignment;
|
|
557
|
+
color?: string;
|
|
558
|
+
style?: 'single' | 'double' | 'dotted' | 'dashed' | 'thick';
|
|
559
|
+
noShade?: boolean;
|
|
560
|
+
};
|
|
561
|
+
}
|
|
562
|
+
/** Page break node */
|
|
563
|
+
export interface PageBreakNode {
|
|
564
|
+
type: 'pageBreak';
|
|
565
|
+
}
|
|
566
|
+
/** Section break node */
|
|
567
|
+
export interface SectionBreakNode {
|
|
568
|
+
type: 'sectionBreak';
|
|
569
|
+
breakType: 'nextPage' | 'continuous' | 'evenPage' | 'oddPage';
|
|
570
|
+
attrs?: {
|
|
571
|
+
pageSetup?: PageSetup;
|
|
572
|
+
headerFooter?: SectionHeaderFooter;
|
|
573
|
+
};
|
|
574
|
+
}
|
|
575
|
+
/** Section header/footer */
|
|
576
|
+
export interface SectionHeaderFooter {
|
|
577
|
+
differentFirst?: boolean;
|
|
578
|
+
differentOddEven?: boolean;
|
|
579
|
+
header?: HeaderFooterContent;
|
|
580
|
+
headerFirst?: HeaderFooterContent;
|
|
581
|
+
headerEven?: HeaderFooterContent;
|
|
582
|
+
footer?: HeaderFooterContent;
|
|
583
|
+
footerFirst?: HeaderFooterContent;
|
|
584
|
+
footerEven?: HeaderFooterContent;
|
|
585
|
+
}
|
|
586
|
+
/** Header/footer content */
|
|
587
|
+
export interface HeaderFooterContent {
|
|
588
|
+
content: (ParagraphNode | TableNode | ImageNode)[];
|
|
589
|
+
}
|
|
590
|
+
/** TOC node */
|
|
591
|
+
export interface TocNode {
|
|
592
|
+
type: 'toc';
|
|
593
|
+
attrs?: TocAttrs;
|
|
594
|
+
}
|
|
595
|
+
/** TOC attributes */
|
|
596
|
+
export interface TocAttrs {
|
|
597
|
+
title?: string;
|
|
598
|
+
levels?: number;
|
|
599
|
+
showPageNumbers?: boolean;
|
|
600
|
+
rightAlignPageNumbers?: boolean;
|
|
601
|
+
useHyperlinks?: boolean;
|
|
602
|
+
leader?: 'none' | 'dot' | 'hyphen' | 'underscore';
|
|
603
|
+
includeHeadings?: boolean;
|
|
604
|
+
includeTocEntryStyles?: string[];
|
|
605
|
+
preserveFormatting?: boolean;
|
|
606
|
+
}
|
|
607
|
+
/** Equation node */
|
|
608
|
+
export interface EquationNode {
|
|
609
|
+
type: 'equation';
|
|
610
|
+
latex: string;
|
|
611
|
+
attrs?: {
|
|
612
|
+
displayMode?: boolean;
|
|
613
|
+
alignment?: TextAlignment;
|
|
614
|
+
};
|
|
615
|
+
}
|
|
616
|
+
/** Inline equation node */
|
|
617
|
+
export interface InlineEquationNode {
|
|
618
|
+
type: 'inlineEquation';
|
|
619
|
+
latex: string;
|
|
620
|
+
}
|
|
621
|
+
/** Embed node */
|
|
622
|
+
export interface EmbedNode {
|
|
623
|
+
type: 'embed';
|
|
624
|
+
embedType: 'video' | 'audio' | 'iframe' | 'object';
|
|
625
|
+
src: string;
|
|
626
|
+
attrs?: {
|
|
627
|
+
width?: number;
|
|
628
|
+
height?: number;
|
|
629
|
+
poster?: string;
|
|
630
|
+
autoplay?: boolean;
|
|
631
|
+
controls?: boolean;
|
|
632
|
+
loop?: boolean;
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
/** Hyperlink node */
|
|
636
|
+
export interface HyperlinkNode {
|
|
637
|
+
type: 'hyperlink';
|
|
638
|
+
href: string;
|
|
639
|
+
content: (TextNode | InlineImageNode)[];
|
|
640
|
+
attrs?: {
|
|
641
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
642
|
+
tooltip?: string;
|
|
643
|
+
bookmark?: string;
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
/** Bookmark node */
|
|
647
|
+
export interface BookmarkNode {
|
|
648
|
+
type: 'bookmark';
|
|
649
|
+
id: string;
|
|
650
|
+
name: string;
|
|
651
|
+
}
|
|
652
|
+
/** Footnote reference node */
|
|
653
|
+
export interface FootnoteRefNode {
|
|
654
|
+
type: 'footnoteRef';
|
|
655
|
+
footnoteId: string;
|
|
656
|
+
}
|
|
657
|
+
/** Endnote reference node */
|
|
658
|
+
export interface EndnoteRefNode {
|
|
659
|
+
type: 'endnoteRef';
|
|
660
|
+
endnoteId: string;
|
|
661
|
+
}
|
|
662
|
+
/** Field node */
|
|
663
|
+
export interface FieldNode {
|
|
664
|
+
type: 'field';
|
|
665
|
+
fieldType: FieldType;
|
|
666
|
+
code?: string;
|
|
667
|
+
attrs?: Record<string, unknown>;
|
|
668
|
+
}
|
|
669
|
+
/** Field type */
|
|
670
|
+
export type FieldType = 'page' | 'numPages' | 'date' | 'time' | 'author' | 'title' | 'subject' | 'fileName' | 'fileSize' | 'createDate' | 'saveDate' | 'printDate' | 'editTime' | 'revNum' | 'docProperty' | 'seq' | 'ref' | 'pageRef' | 'noteRef' | 'mergeField' | 'if' | 'formula' | 'hyperlink' | 'toc' | 'tocEntry' | 'index' | 'xe' | 'ta' | 'tc' | 'custom';
|
|
671
|
+
/** Symbol node */
|
|
672
|
+
export interface SymbolNode {
|
|
673
|
+
type: 'symbol';
|
|
674
|
+
char: string;
|
|
675
|
+
attrs?: {
|
|
676
|
+
font?: string;
|
|
677
|
+
size?: number;
|
|
678
|
+
};
|
|
679
|
+
}
|
|
680
|
+
/** Document properties */
|
|
681
|
+
export interface DocumentProperties {
|
|
682
|
+
title?: string;
|
|
683
|
+
subject?: string;
|
|
684
|
+
author?: string;
|
|
685
|
+
keywords?: string[];
|
|
686
|
+
description?: string;
|
|
687
|
+
category?: string;
|
|
688
|
+
comments?: string;
|
|
689
|
+
status?: string;
|
|
690
|
+
created?: Date;
|
|
691
|
+
modified?: Date;
|
|
692
|
+
lastModifiedBy?: string;
|
|
693
|
+
revision?: number;
|
|
694
|
+
version?: string;
|
|
695
|
+
language?: string;
|
|
696
|
+
customProperties?: Record<string, unknown>;
|
|
697
|
+
compatibility?: CompatibilitySettings;
|
|
698
|
+
protection?: DocumentProtection;
|
|
699
|
+
variables?: Record<string, string>;
|
|
700
|
+
}
|
|
701
|
+
/** Compatibility settings */
|
|
702
|
+
export interface CompatibilitySettings {
|
|
703
|
+
compatibilityMode?: 'word2007' | 'word2010' | 'word2013' | 'word2016' | 'word2019';
|
|
704
|
+
useWord2002TableStyleRules?: boolean;
|
|
705
|
+
growAutofit?: boolean;
|
|
706
|
+
useFELayout?: boolean;
|
|
707
|
+
useNormalStyleForList?: boolean;
|
|
708
|
+
doNotUseIndentAsNumberingTabStop?: boolean;
|
|
709
|
+
useAltKinsokuLineBreakRules?: boolean;
|
|
710
|
+
allowSpaceOfSameStyleInTable?: boolean;
|
|
711
|
+
}
|
|
712
|
+
/** Document protection */
|
|
713
|
+
export interface DocumentProtection {
|
|
714
|
+
type: 'none' | 'readOnly' | 'comments' | 'trackedChanges' | 'forms';
|
|
715
|
+
password?: string;
|
|
716
|
+
formatting?: boolean;
|
|
717
|
+
enforcementAlgorithm?: string;
|
|
718
|
+
}
|
|
719
|
+
/** Document style */
|
|
720
|
+
export interface DocumentStyle {
|
|
721
|
+
id: string;
|
|
722
|
+
name: string;
|
|
723
|
+
type: 'paragraph' | 'character' | 'table' | 'numbering';
|
|
724
|
+
basedOn?: string;
|
|
725
|
+
nextStyle?: string;
|
|
726
|
+
linkedStyle?: string;
|
|
727
|
+
uiPriority?: number;
|
|
728
|
+
unhideWhenUsed?: boolean;
|
|
729
|
+
semiHidden?: boolean;
|
|
730
|
+
qFormat?: boolean;
|
|
731
|
+
paragraphProperties?: ParagraphAttrs;
|
|
732
|
+
characterProperties?: CharacterProperties;
|
|
733
|
+
tableProperties?: TableStyleProperties;
|
|
734
|
+
numberingProperties?: NumberingStyleProperties;
|
|
735
|
+
}
|
|
736
|
+
/** Character properties */
|
|
737
|
+
export interface CharacterProperties {
|
|
738
|
+
fontFamily?: string;
|
|
739
|
+
fontSize?: number;
|
|
740
|
+
fontWeight?: 'normal' | 'bold';
|
|
741
|
+
fontStyle?: 'normal' | 'italic';
|
|
742
|
+
underline?: UnderlineStyle;
|
|
743
|
+
strikethrough?: boolean;
|
|
744
|
+
doubleStrikethrough?: boolean;
|
|
745
|
+
subscript?: boolean;
|
|
746
|
+
superscript?: boolean;
|
|
747
|
+
smallCaps?: boolean;
|
|
748
|
+
allCaps?: boolean;
|
|
749
|
+
hidden?: boolean;
|
|
750
|
+
color?: string;
|
|
751
|
+
highlight?: string;
|
|
752
|
+
shading?: ShadingDef;
|
|
753
|
+
border?: BorderDef;
|
|
754
|
+
spacing?: number;
|
|
755
|
+
position?: number;
|
|
756
|
+
scale?: number;
|
|
757
|
+
kerning?: number;
|
|
758
|
+
lang?: string;
|
|
759
|
+
}
|
|
760
|
+
/** Underline style */
|
|
761
|
+
export interface UnderlineStyle {
|
|
762
|
+
style: 'single' | 'double' | 'thick' | 'dotted' | 'dottedHeavy' | 'dash' | 'dashHeavy' | 'dashLong' | 'dashLongHeavy' | 'dotDash' | 'dotDashHeavy' | 'dotDotDash' | 'dotDotDashHeavy' | 'wave' | 'wavyHeavy' | 'wavyDouble' | 'words' | 'none';
|
|
763
|
+
color?: string;
|
|
764
|
+
}
|
|
765
|
+
/** Table style properties */
|
|
766
|
+
export interface TableStyleProperties {
|
|
767
|
+
tableProperties?: TableAttrs;
|
|
768
|
+
firstRow?: ConditionalTableFormatting;
|
|
769
|
+
lastRow?: ConditionalTableFormatting;
|
|
770
|
+
firstColumn?: ConditionalTableFormatting;
|
|
771
|
+
lastColumn?: ConditionalTableFormatting;
|
|
772
|
+
band1H?: ConditionalTableFormatting;
|
|
773
|
+
band2H?: ConditionalTableFormatting;
|
|
774
|
+
band1V?: ConditionalTableFormatting;
|
|
775
|
+
band2V?: ConditionalTableFormatting;
|
|
776
|
+
neCell?: ConditionalTableFormatting;
|
|
777
|
+
nwCell?: ConditionalTableFormatting;
|
|
778
|
+
seCell?: ConditionalTableFormatting;
|
|
779
|
+
swCell?: ConditionalTableFormatting;
|
|
780
|
+
}
|
|
781
|
+
/** Conditional table formatting */
|
|
782
|
+
export interface ConditionalTableFormatting {
|
|
783
|
+
paragraphProperties?: ParagraphAttrs;
|
|
784
|
+
characterProperties?: CharacterProperties;
|
|
785
|
+
cellProperties?: TableCellAttrs;
|
|
786
|
+
}
|
|
787
|
+
/** Numbering style properties */
|
|
788
|
+
export interface NumberingStyleProperties {
|
|
789
|
+
levels: NumberingLevel[];
|
|
790
|
+
}
|
|
791
|
+
/** Numbering level */
|
|
792
|
+
export interface NumberingLevel {
|
|
793
|
+
level: number;
|
|
794
|
+
format: NumberingFormat;
|
|
795
|
+
text: string;
|
|
796
|
+
alignment?: TextAlignment;
|
|
797
|
+
start?: number;
|
|
798
|
+
restart?: number;
|
|
799
|
+
suffix?: 'tab' | 'space' | 'nothing';
|
|
800
|
+
paragraphProperties?: ParagraphAttrs;
|
|
801
|
+
characterProperties?: CharacterProperties;
|
|
802
|
+
}
|
|
803
|
+
/** Document template */
|
|
804
|
+
export interface DocumentTemplate {
|
|
805
|
+
id: string;
|
|
806
|
+
name: string;
|
|
807
|
+
description?: string;
|
|
808
|
+
category?: string;
|
|
809
|
+
thumbnail?: string;
|
|
810
|
+
content: DocumentContent;
|
|
811
|
+
styles?: DocumentStyle[];
|
|
812
|
+
pageSetup?: PageSetup;
|
|
813
|
+
variables?: TemplateVariable[];
|
|
814
|
+
placeholders?: TemplatePlaceholder[];
|
|
815
|
+
}
|
|
816
|
+
/** Template variable */
|
|
817
|
+
export interface TemplateVariable {
|
|
818
|
+
name: string;
|
|
819
|
+
label?: string;
|
|
820
|
+
type: 'text' | 'number' | 'date' | 'boolean' | 'select' | 'image';
|
|
821
|
+
defaultValue?: unknown;
|
|
822
|
+
options?: {
|
|
823
|
+
value: string;
|
|
824
|
+
label: string;
|
|
825
|
+
}[];
|
|
826
|
+
required?: boolean;
|
|
827
|
+
validation?: {
|
|
828
|
+
pattern?: string;
|
|
829
|
+
min?: number;
|
|
830
|
+
max?: number;
|
|
831
|
+
minLength?: number;
|
|
832
|
+
maxLength?: number;
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
/** Template placeholder */
|
|
836
|
+
export interface TemplatePlaceholder {
|
|
837
|
+
id: string;
|
|
838
|
+
variable: string;
|
|
839
|
+
format?: string;
|
|
840
|
+
transform?: 'uppercase' | 'lowercase' | 'capitalize' | 'titlecase';
|
|
841
|
+
}
|
|
842
|
+
/** Tracked change */
|
|
843
|
+
export interface TrackedChange {
|
|
844
|
+
id: string;
|
|
845
|
+
type: TrackedChangeType;
|
|
846
|
+
author: string;
|
|
847
|
+
date: Date;
|
|
848
|
+
content?: DocumentNode | TextNode;
|
|
849
|
+
original?: DocumentNode | TextNode;
|
|
850
|
+
range?: DocumentRange;
|
|
851
|
+
accepted?: boolean;
|
|
852
|
+
rejected?: boolean;
|
|
853
|
+
}
|
|
854
|
+
/** Tracked change type */
|
|
855
|
+
export type TrackedChangeType = 'insert' | 'delete' | 'move' | 'formatChange' | 'paragraphChange' | 'tableChange' | 'cellMerge' | 'cellSplit';
|
|
856
|
+
/** Document range */
|
|
857
|
+
export interface DocumentRange {
|
|
858
|
+
start: DocumentPosition;
|
|
859
|
+
end: DocumentPosition;
|
|
860
|
+
}
|
|
861
|
+
/** Document position */
|
|
862
|
+
export interface DocumentPosition {
|
|
863
|
+
paragraph: number;
|
|
864
|
+
offset: number;
|
|
865
|
+
}
|
|
866
|
+
/** Track changes configuration */
|
|
867
|
+
export interface TrackChangesConfig {
|
|
868
|
+
enabled: boolean;
|
|
869
|
+
author?: string;
|
|
870
|
+
showInsertions?: boolean;
|
|
871
|
+
showDeletions?: boolean;
|
|
872
|
+
showFormatting?: boolean;
|
|
873
|
+
insertionColor?: string;
|
|
874
|
+
deletionColor?: string;
|
|
875
|
+
movesColor?: string;
|
|
876
|
+
formattingColor?: string;
|
|
877
|
+
showInBalloons?: boolean;
|
|
878
|
+
showInline?: boolean;
|
|
879
|
+
viewMode?: 'final' | 'original' | 'markup' | 'simple';
|
|
880
|
+
}
|
|
881
|
+
/** Document comment */
|
|
882
|
+
export interface DocumentComment {
|
|
883
|
+
id: string;
|
|
884
|
+
author: string;
|
|
885
|
+
date: Date;
|
|
886
|
+
content: string;
|
|
887
|
+
range: DocumentRange;
|
|
888
|
+
replies?: CommentReply[];
|
|
889
|
+
resolved?: boolean;
|
|
890
|
+
resolvedBy?: string;
|
|
891
|
+
resolvedDate?: Date;
|
|
892
|
+
mentions?: string[];
|
|
893
|
+
status?: 'none' | 'todo' | 'inProgress' | 'done';
|
|
894
|
+
}
|
|
895
|
+
/** Comment reply */
|
|
896
|
+
export interface CommentReply {
|
|
897
|
+
id: string;
|
|
898
|
+
author: string;
|
|
899
|
+
date: Date;
|
|
900
|
+
content: string;
|
|
901
|
+
mentions?: string[];
|
|
902
|
+
}
|
|
903
|
+
/** Footnote */
|
|
904
|
+
export interface Footnote {
|
|
905
|
+
id: string;
|
|
906
|
+
content: ParagraphNode[];
|
|
907
|
+
type?: 'normal' | 'separator' | 'continuationSeparator' | 'continuationNotice';
|
|
908
|
+
}
|
|
909
|
+
/** Endnote */
|
|
910
|
+
export interface Endnote {
|
|
911
|
+
id: string;
|
|
912
|
+
content: ParagraphNode[];
|
|
913
|
+
}
|
|
914
|
+
/** Footnote/Endnote properties */
|
|
915
|
+
export interface NoteProperties {
|
|
916
|
+
position?: 'pageBottom' | 'beneathText' | 'sectionEnd' | 'documentEnd';
|
|
917
|
+
numberingFormat?: NumberingFormat;
|
|
918
|
+
startNumber?: number;
|
|
919
|
+
restartNumbering?: 'continuous' | 'section' | 'page';
|
|
920
|
+
}
|
|
921
|
+
/** Mail merge configuration */
|
|
922
|
+
export interface MailMergeConfig {
|
|
923
|
+
type: 'letters' | 'emails' | 'envelopes' | 'labels' | 'directory';
|
|
924
|
+
dataSource: MailMergeDataSource;
|
|
925
|
+
document: DocumentContent;
|
|
926
|
+
outputFormat?: 'document' | 'print' | 'email';
|
|
927
|
+
emailSettings?: MailMergeEmailSettings;
|
|
928
|
+
}
|
|
929
|
+
/** Mail merge data source */
|
|
930
|
+
export interface MailMergeDataSource {
|
|
931
|
+
type: 'json' | 'csv' | 'excel' | 'database' | 'api';
|
|
932
|
+
data?: Record<string, unknown>[];
|
|
933
|
+
url?: string;
|
|
934
|
+
query?: string;
|
|
935
|
+
connection?: string;
|
|
936
|
+
}
|
|
937
|
+
/** Mail merge email settings */
|
|
938
|
+
export interface MailMergeEmailSettings {
|
|
939
|
+
to: string;
|
|
940
|
+
subject: string;
|
|
941
|
+
from?: string;
|
|
942
|
+
cc?: string;
|
|
943
|
+
bcc?: string;
|
|
944
|
+
attachDocument?: boolean;
|
|
945
|
+
attachmentFormat?: 'pdf' | 'docx';
|
|
946
|
+
}
|
|
947
|
+
/** Mail merge field */
|
|
948
|
+
export interface MailMergeField {
|
|
949
|
+
name: string;
|
|
950
|
+
format?: string;
|
|
951
|
+
defaultValue?: string;
|
|
952
|
+
conditional?: MailMergeConditional;
|
|
953
|
+
}
|
|
954
|
+
/** Mail merge conditional */
|
|
955
|
+
export interface MailMergeConditional {
|
|
956
|
+
field: string;
|
|
957
|
+
operator: 'equals' | 'notEquals' | 'greaterThan' | 'lessThan' | 'contains' | 'isEmpty' | 'isNotEmpty';
|
|
958
|
+
value?: string;
|
|
959
|
+
trueContent?: string;
|
|
960
|
+
falseContent?: string;
|
|
961
|
+
}
|
|
962
|
+
/** Mail merge preview */
|
|
963
|
+
export interface MailMergePreview {
|
|
964
|
+
recordIndex: number;
|
|
965
|
+
totalRecords: number;
|
|
966
|
+
content: DocumentContent;
|
|
967
|
+
data: Record<string, unknown>;
|
|
968
|
+
}
|
|
969
|
+
/** Mail merge result */
|
|
970
|
+
export interface MailMergeResult {
|
|
971
|
+
type: 'documents' | 'print' | 'email';
|
|
972
|
+
totalRecords: number;
|
|
973
|
+
successCount: number;
|
|
974
|
+
errorCount: number;
|
|
975
|
+
documents?: {
|
|
976
|
+
index: number;
|
|
977
|
+
data: ArrayBuffer;
|
|
978
|
+
filename: string;
|
|
979
|
+
}[];
|
|
980
|
+
errors?: {
|
|
981
|
+
index: number;
|
|
982
|
+
error: string;
|
|
983
|
+
}[];
|
|
984
|
+
}
|
|
985
|
+
/** Document import options */
|
|
986
|
+
export interface DocumentImportOptions {
|
|
987
|
+
format: DocumentImportFormat;
|
|
988
|
+
encoding?: string;
|
|
989
|
+
preserveStyles?: boolean;
|
|
990
|
+
preserveImages?: boolean;
|
|
991
|
+
preserveTables?: boolean;
|
|
992
|
+
preserveComments?: boolean;
|
|
993
|
+
preserveTrackChanges?: boolean;
|
|
994
|
+
}
|
|
995
|
+
/** Import format */
|
|
996
|
+
export type DocumentImportFormat = 'docx' | 'doc' | 'rtf' | 'odt' | 'html' | 'markdown' | 'txt' | 'pdf';
|
|
997
|
+
/** Document export options */
|
|
998
|
+
export interface DocumentExportOptions {
|
|
999
|
+
format: DocumentExportFormat;
|
|
1000
|
+
includeStyles?: boolean;
|
|
1001
|
+
includeImages?: boolean;
|
|
1002
|
+
includeComments?: boolean;
|
|
1003
|
+
includeTrackChanges?: boolean;
|
|
1004
|
+
trackChangesMode?: 'final' | 'original' | 'all';
|
|
1005
|
+
pdf?: PDFExportSettings;
|
|
1006
|
+
html?: HTMLExportSettings;
|
|
1007
|
+
}
|
|
1008
|
+
/** Export format */
|
|
1009
|
+
export type DocumentExportFormat = 'docx' | 'doc' | 'rtf' | 'odt' | 'pdf' | 'html' | 'markdown' | 'txt' | 'epub';
|
|
1010
|
+
/** PDF export settings */
|
|
1011
|
+
export interface PDFExportSettings {
|
|
1012
|
+
compliance?: 'pdf-a' | 'pdf-x' | 'none';
|
|
1013
|
+
embedFonts?: boolean;
|
|
1014
|
+
imageQuality?: number;
|
|
1015
|
+
bookmarks?: boolean;
|
|
1016
|
+
accessibility?: boolean;
|
|
1017
|
+
}
|
|
1018
|
+
/** HTML export settings */
|
|
1019
|
+
export interface HTMLExportSettings {
|
|
1020
|
+
inlineStyles?: boolean;
|
|
1021
|
+
inlineImages?: boolean;
|
|
1022
|
+
includeDoctype?: boolean;
|
|
1023
|
+
encoding?: string;
|
|
1024
|
+
}
|
|
1025
|
+
/** Document collaboration session */
|
|
1026
|
+
export interface DocumentCollaborationSession {
|
|
1027
|
+
id: string;
|
|
1028
|
+
documentId: string;
|
|
1029
|
+
users: DocumentCollaborationUser[];
|
|
1030
|
+
cursors: DocumentUserCursor[];
|
|
1031
|
+
selections: DocumentUserSelection[];
|
|
1032
|
+
version: number;
|
|
1033
|
+
lastModified: Date;
|
|
1034
|
+
}
|
|
1035
|
+
/** Collaboration user */
|
|
1036
|
+
export interface DocumentCollaborationUser {
|
|
1037
|
+
id: string;
|
|
1038
|
+
name: string;
|
|
1039
|
+
color: string;
|
|
1040
|
+
avatar?: string;
|
|
1041
|
+
online: boolean;
|
|
1042
|
+
lastActivity?: Date;
|
|
1043
|
+
isEditing?: boolean;
|
|
1044
|
+
}
|
|
1045
|
+
/** User cursor */
|
|
1046
|
+
export interface DocumentUserCursor {
|
|
1047
|
+
userId: string;
|
|
1048
|
+
position: DocumentPosition;
|
|
1049
|
+
timestamp: Date;
|
|
1050
|
+
}
|
|
1051
|
+
/** User selection */
|
|
1052
|
+
export interface DocumentUserSelection {
|
|
1053
|
+
userId: string;
|
|
1054
|
+
range: DocumentRange;
|
|
1055
|
+
timestamp: Date;
|
|
1056
|
+
}
|
|
1057
|
+
/** Document history entry */
|
|
1058
|
+
export interface DocumentHistoryEntry {
|
|
1059
|
+
id: string;
|
|
1060
|
+
timestamp: Date;
|
|
1061
|
+
author?: string;
|
|
1062
|
+
type: DocumentHistoryType;
|
|
1063
|
+
description?: string;
|
|
1064
|
+
changes: DocumentChange[];
|
|
1065
|
+
undo: () => void;
|
|
1066
|
+
redo: () => void;
|
|
1067
|
+
}
|
|
1068
|
+
/** History type */
|
|
1069
|
+
export type DocumentHistoryType = 'insert' | 'delete' | 'format' | 'paste' | 'replace' | 'table' | 'image' | 'style' | 'pageSetup' | 'comment' | 'composite';
|
|
1070
|
+
/** Document change */
|
|
1071
|
+
export interface DocumentChange {
|
|
1072
|
+
type: string;
|
|
1073
|
+
range?: DocumentRange;
|
|
1074
|
+
before?: unknown;
|
|
1075
|
+
after?: unknown;
|
|
1076
|
+
}
|
|
1077
|
+
/** Find options */
|
|
1078
|
+
export interface FindOptions {
|
|
1079
|
+
query: string;
|
|
1080
|
+
caseSensitive?: boolean;
|
|
1081
|
+
wholeWord?: boolean;
|
|
1082
|
+
regex?: boolean;
|
|
1083
|
+
wildcards?: boolean;
|
|
1084
|
+
matchPrefix?: boolean;
|
|
1085
|
+
matchSuffix?: boolean;
|
|
1086
|
+
sounds?: boolean;
|
|
1087
|
+
findAllWordForms?: boolean;
|
|
1088
|
+
formatting?: FindFormatting;
|
|
1089
|
+
}
|
|
1090
|
+
/** Find formatting */
|
|
1091
|
+
export interface FindFormatting {
|
|
1092
|
+
bold?: boolean;
|
|
1093
|
+
italic?: boolean;
|
|
1094
|
+
underline?: boolean;
|
|
1095
|
+
style?: string;
|
|
1096
|
+
font?: string;
|
|
1097
|
+
fontSize?: number;
|
|
1098
|
+
color?: string;
|
|
1099
|
+
highlight?: string;
|
|
1100
|
+
}
|
|
1101
|
+
/** Find result */
|
|
1102
|
+
export interface FindResult {
|
|
1103
|
+
index: number;
|
|
1104
|
+
range: DocumentRange;
|
|
1105
|
+
text: string;
|
|
1106
|
+
context?: string;
|
|
1107
|
+
}
|
|
1108
|
+
/** Replace options */
|
|
1109
|
+
export interface ReplaceOptions extends FindOptions {
|
|
1110
|
+
replacement: string;
|
|
1111
|
+
preserveCase?: boolean;
|
|
1112
|
+
useFormatting?: FindFormatting;
|
|
1113
|
+
}
|
|
1114
|
+
/** Replace result */
|
|
1115
|
+
export interface ReplaceResult {
|
|
1116
|
+
foundCount: number;
|
|
1117
|
+
replacedCount: number;
|
|
1118
|
+
results: {
|
|
1119
|
+
range: DocumentRange;
|
|
1120
|
+
originalText: string;
|
|
1121
|
+
newText: string;
|
|
1122
|
+
}[];
|
|
1123
|
+
}
|
|
1124
|
+
//# sourceMappingURL=word-processor.d.ts.map
|