@eigenpal/docx-js-editor 0.0.32 → 0.0.33
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 +10 -2
- package/dist/FindReplaceDialog-KNJETYJX.js +1 -0
- package/dist/{FindReplaceDialog-N4J5OB7O.mjs → FindReplaceDialog-YW3R4FHM.mjs} +1 -1
- package/dist/FootnotePropertiesDialog-7QX54WQT.js +1 -0
- package/dist/FootnotePropertiesDialog-LNFJXQUG.mjs +1 -0
- package/dist/HyperlinkDialog-GBAYMTUE.js +1 -0
- package/dist/{HyperlinkDialog-YQSQFHOP.mjs → HyperlinkDialog-HNYTXDCB.mjs} +1 -1
- package/dist/ImagePositionDialog-B4RLP2W5.mjs +1 -0
- package/dist/ImagePositionDialog-M65BYQQE.js +1 -0
- package/dist/ImagePropertiesDialog-JOGW3WDU.mjs +1 -0
- package/dist/ImagePropertiesDialog-O4WQSF5M.js +1 -0
- package/dist/PageSetupDialog-2GIBTKMJ.js +1 -0
- package/dist/PageSetupDialog-Q7SHEZIJ.mjs +1 -0
- package/dist/TablePropertiesDialog-LMXWX3FI.mjs +1 -0
- package/dist/TablePropertiesDialog-WOZ4ES3H.js +1 -0
- package/dist/chunk-377ZVTSE.js +2 -0
- package/dist/chunk-3OKYQQQ5.js +111 -0
- package/dist/chunk-AU5NVRHP.js +2 -0
- package/dist/chunk-DC65PJYE.js +4 -0
- package/dist/chunk-FW5LYOOZ.mjs +111 -0
- package/dist/chunk-GZOCOWWB.mjs +2 -0
- package/dist/chunk-N6RUBUT2.js +261 -0
- package/dist/chunk-QSUPYUOP.js +2 -0
- package/dist/chunk-SZHPMPSO.mjs +261 -0
- package/dist/chunk-X5A54T6S.mjs +4 -0
- package/dist/chunk-YKBSKEBS.mjs +2 -0
- package/dist/chunk-Z26WOH6R.mjs +2 -0
- package/dist/clipboard-Cu80iVDh.d.ts +1181 -0
- package/dist/clipboard-dFROLI95.d.mts +1181 -0
- package/dist/index.css +1 -1
- package/dist/index.d.mts +15 -5
- package/dist/index.d.ts +15 -5
- package/dist/index.js +9 -9
- package/dist/index.mjs +9 -9
- package/dist/{react-CAc4htNH.d.ts → react-1nBq3zH9.d.ts} +3 -1
- package/dist/{react-B2h6vE3D.d.mts → react-Dr8Nm-0u.d.mts} +3 -1
- package/dist/react.css +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +1 -1
- package/dist/react.mjs +1 -1
- package/dist/ui.d.mts +22 -20
- package/dist/ui.d.ts +22 -20
- package/dist/ui.js +1 -1
- package/dist/ui.mjs +1 -1
- package/i18n/de.json +745 -0
- package/i18n/en.json +745 -0
- package/i18n/pl.json +745 -0
- package/package.json +5 -3
- package/dist/FindReplaceDialog-AQFR4OCT.js +0 -1
- package/dist/FootnotePropertiesDialog-UFUIHLDW.mjs +0 -1
- package/dist/FootnotePropertiesDialog-YYIZU5U6.js +0 -1
- package/dist/HyperlinkDialog-HGZ2S37Z.js +0 -1
- package/dist/ImagePositionDialog-DQ4JWS4F.js +0 -1
- package/dist/ImagePositionDialog-HT6J2SHV.mjs +0 -1
- package/dist/ImagePropertiesDialog-3VK2S2AF.mjs +0 -1
- package/dist/ImagePropertiesDialog-GJMGLM6G.js +0 -1
- package/dist/PageSetupDialog-2SKHDRTF.js +0 -1
- package/dist/PageSetupDialog-SMQJXEBL.mjs +0 -1
- package/dist/TablePropertiesDialog-FI5E3RCB.mjs +0 -1
- package/dist/TablePropertiesDialog-STZOGHJB.js +0 -1
- package/dist/chunk-6AJI5NPH.mjs +0 -111
- package/dist/chunk-AZRYS2WF.mjs +0 -2
- package/dist/chunk-CTYOM6BE.js +0 -2
- package/dist/chunk-EEV6TUOX.mjs +0 -261
- package/dist/chunk-EF3LLEN7.js +0 -4
- package/dist/chunk-HWWZOJMR.mjs +0 -4
- package/dist/chunk-PJVI53AH.js +0 -2
- package/dist/chunk-UMDJQ3Q4.js +0 -111
- package/dist/chunk-WH2EK2HU.js +0 -261
- package/dist/chunk-XWBCP563.mjs +0 -2
- package/dist/clipboard-B7N7Kx2X.d.ts +0 -386
- package/dist/clipboard-BkM7Zvgs.d.mts +0 -386
|
@@ -0,0 +1,1181 @@
|
|
|
1
|
+
import React__default, { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { e as Table, a0 as TableCell, b as Run, a as Paragraph } from './agentApi-BVHzyk2l.js';
|
|
3
|
+
|
|
4
|
+
var _lang = "en";
|
|
5
|
+
var common = {
|
|
6
|
+
cancel: "Cancel",
|
|
7
|
+
insert: "Insert",
|
|
8
|
+
apply: "Apply",
|
|
9
|
+
close: "Close",
|
|
10
|
+
"delete": "Delete",
|
|
11
|
+
update: "Update",
|
|
12
|
+
save: "Save",
|
|
13
|
+
retry: "Retry",
|
|
14
|
+
send: "Send",
|
|
15
|
+
edit: "Edit",
|
|
16
|
+
comment: "Comment",
|
|
17
|
+
reply: "Reply",
|
|
18
|
+
accept: "Accept",
|
|
19
|
+
reject: "Reject",
|
|
20
|
+
dismiss: "Dismiss",
|
|
21
|
+
change: "Change",
|
|
22
|
+
px: "px",
|
|
23
|
+
closeDialog: "Close dialog"
|
|
24
|
+
};
|
|
25
|
+
var toolbar = {
|
|
26
|
+
ariaLabel: "Formatting toolbar",
|
|
27
|
+
file: "File",
|
|
28
|
+
format: "Format",
|
|
29
|
+
insert: "Insert",
|
|
30
|
+
print: "Print",
|
|
31
|
+
printShortcut: "Ctrl+P",
|
|
32
|
+
pageSetup: "Page setup",
|
|
33
|
+
leftToRight: "Left-to-right text",
|
|
34
|
+
rightToLeft: "Right-to-left text",
|
|
35
|
+
image: "Image",
|
|
36
|
+
table: "Table",
|
|
37
|
+
pageBreak: "Page break",
|
|
38
|
+
tableOfContents: "Table of contents",
|
|
39
|
+
symbol: "Symbol"
|
|
40
|
+
};
|
|
41
|
+
var formattingBar = {
|
|
42
|
+
groups: {
|
|
43
|
+
history: "History",
|
|
44
|
+
zoom: "Zoom",
|
|
45
|
+
styles: "Styles",
|
|
46
|
+
font: "Font",
|
|
47
|
+
textFormatting: "Text formatting",
|
|
48
|
+
script: "Script",
|
|
49
|
+
alignment: "Alignment",
|
|
50
|
+
listFormatting: "List formatting",
|
|
51
|
+
image: "Image",
|
|
52
|
+
table: "Table"
|
|
53
|
+
},
|
|
54
|
+
undo: "Undo",
|
|
55
|
+
undoShortcut: "Undo (Ctrl+Z)",
|
|
56
|
+
redo: "Redo",
|
|
57
|
+
redoShortcut: "Redo (Ctrl+Y)",
|
|
58
|
+
bold: "Bold",
|
|
59
|
+
boldShortcut: "Bold (Ctrl+B)",
|
|
60
|
+
italic: "Italic",
|
|
61
|
+
italicShortcut: "Italic (Ctrl+I)",
|
|
62
|
+
underline: "Underline",
|
|
63
|
+
underlineShortcut: "Underline (Ctrl+U)",
|
|
64
|
+
strikethrough: "Strikethrough",
|
|
65
|
+
fontColor: "Font Color",
|
|
66
|
+
highlightColor: "Text Highlight Color",
|
|
67
|
+
insertLink: "Insert link",
|
|
68
|
+
insertLinkShortcut: "Insert link (Ctrl+K)",
|
|
69
|
+
superscript: "Superscript",
|
|
70
|
+
superscriptShortcut: "Superscript (Ctrl+Shift+=)",
|
|
71
|
+
subscript: "Subscript",
|
|
72
|
+
subscriptShortcut: "Subscript (Ctrl+=)",
|
|
73
|
+
imageProperties: "Image properties",
|
|
74
|
+
imagePropertiesShortcut: "Image properties (alt text, border)...",
|
|
75
|
+
clearFormatting: "Clear formatting"
|
|
76
|
+
};
|
|
77
|
+
var alignment = {
|
|
78
|
+
alignLeft: "Align Left",
|
|
79
|
+
alignLeftShortcut: "Ctrl+L",
|
|
80
|
+
center: "Center",
|
|
81
|
+
centerShortcut: "Ctrl+E",
|
|
82
|
+
alignRight: "Align Right",
|
|
83
|
+
alignRightShortcut: "Ctrl+R",
|
|
84
|
+
justify: "Justify",
|
|
85
|
+
justifyShortcut: "Ctrl+J"
|
|
86
|
+
};
|
|
87
|
+
var lists = {
|
|
88
|
+
ariaLabel: "List formatting",
|
|
89
|
+
typeAriaLabel: "List type",
|
|
90
|
+
indentationAriaLabel: "List indentation",
|
|
91
|
+
bulletList: "Bullet List",
|
|
92
|
+
numberedList: "Numbered List",
|
|
93
|
+
decreaseIndent: "Decrease Indent",
|
|
94
|
+
increaseIndent: "Increase Indent"
|
|
95
|
+
};
|
|
96
|
+
var lineSpacing = {
|
|
97
|
+
single: "Single",
|
|
98
|
+
double: "Double",
|
|
99
|
+
lineSpacingTitle: "Line spacing: {label}",
|
|
100
|
+
paragraphSpacing: "Paragraph spacing"
|
|
101
|
+
};
|
|
102
|
+
var styles = {
|
|
103
|
+
selectAriaLabel: "Select paragraph style",
|
|
104
|
+
normalText: "Normal text",
|
|
105
|
+
title: "Title",
|
|
106
|
+
subtitle: "Subtitle",
|
|
107
|
+
heading1: "Heading 1",
|
|
108
|
+
heading2: "Heading 2",
|
|
109
|
+
heading3: "Heading 3"
|
|
110
|
+
};
|
|
111
|
+
var font = {
|
|
112
|
+
selectAriaLabel: "Select font family",
|
|
113
|
+
sansSerif: "Sans Serif",
|
|
114
|
+
serif: "Serif",
|
|
115
|
+
monospace: "Monospace"
|
|
116
|
+
};
|
|
117
|
+
var fontSize = {
|
|
118
|
+
decrease: "Decrease font size",
|
|
119
|
+
increase: "Increase font size",
|
|
120
|
+
label: "Font size",
|
|
121
|
+
listLabel: "Font sizes"
|
|
122
|
+
};
|
|
123
|
+
var zoom = {
|
|
124
|
+
ariaLabel: "Zoom: {label}"
|
|
125
|
+
};
|
|
126
|
+
var colorPicker = {
|
|
127
|
+
ariaLabel: "{type} color picker",
|
|
128
|
+
highlightColors: "Highlight Colors",
|
|
129
|
+
customColor: "Custom Color",
|
|
130
|
+
noColor: "No Color",
|
|
131
|
+
automatic: "Automatic",
|
|
132
|
+
themeColors: "Theme Colors",
|
|
133
|
+
standardColors: "Standard Colors",
|
|
134
|
+
colors: {
|
|
135
|
+
black: "Black",
|
|
136
|
+
darkRed: "Dark Red",
|
|
137
|
+
red: "Red",
|
|
138
|
+
orange: "Orange",
|
|
139
|
+
yellow: "Yellow",
|
|
140
|
+
darkYellow: "Dark Yellow",
|
|
141
|
+
green: "Green",
|
|
142
|
+
darkGreen: "Dark Green",
|
|
143
|
+
teal: "Teal",
|
|
144
|
+
darkTeal: "Dark Teal",
|
|
145
|
+
blue: "Blue",
|
|
146
|
+
darkBlue: "Dark Blue",
|
|
147
|
+
purple: "Purple",
|
|
148
|
+
darkPurple: "Dark Purple",
|
|
149
|
+
brown: "Brown",
|
|
150
|
+
grey50: "Grey 50%",
|
|
151
|
+
grey25: "Grey 25%",
|
|
152
|
+
grey10: "Grey 10%",
|
|
153
|
+
white: "White",
|
|
154
|
+
lightRed: "Light Red",
|
|
155
|
+
lightOrange: "Light Orange",
|
|
156
|
+
lightYellow: "Light Yellow",
|
|
157
|
+
lightGreen: "Light Green",
|
|
158
|
+
lightBlue: "Light Blue",
|
|
159
|
+
lightPurple: "Light Purple",
|
|
160
|
+
pink: "Pink",
|
|
161
|
+
rose: "Rose",
|
|
162
|
+
gold: "Gold",
|
|
163
|
+
aqua: "Aqua",
|
|
164
|
+
lavender: "Lavender",
|
|
165
|
+
silver: "Silver",
|
|
166
|
+
darkOrange: "Dark Orange",
|
|
167
|
+
darkGray: "Dark Gray",
|
|
168
|
+
gray: "Gray",
|
|
169
|
+
cyan: "Cyan",
|
|
170
|
+
magenta: "Magenta",
|
|
171
|
+
paleGreen: "Pale Green",
|
|
172
|
+
lightCyan: "Light Cyan",
|
|
173
|
+
skyBlue: "Sky Blue",
|
|
174
|
+
lightBlue2: "Light Blue 2",
|
|
175
|
+
lightMagenta: "Light Magenta",
|
|
176
|
+
brightGreen: "Bright Green",
|
|
177
|
+
violet: "Violet"
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
var dialogs = {
|
|
181
|
+
findReplace: {
|
|
182
|
+
titleFind: "Find",
|
|
183
|
+
titleFindReplace: "Find and Replace",
|
|
184
|
+
findLabel: "Find:",
|
|
185
|
+
findPlaceholder: "Enter text to find...",
|
|
186
|
+
findAriaLabel: "Find text",
|
|
187
|
+
findPrevious: "Find previous",
|
|
188
|
+
findPreviousTitle: "Find Previous (Shift+Enter)",
|
|
189
|
+
findNext: "Find next",
|
|
190
|
+
findNextTitle: "Find Next (Enter)",
|
|
191
|
+
matchCount: "{current} of {total} matches",
|
|
192
|
+
noResults: "No results found",
|
|
193
|
+
replaceLabel: "Replace:",
|
|
194
|
+
replacePlaceholder: "Enter replacement text...",
|
|
195
|
+
replaceAriaLabel: "Replace text",
|
|
196
|
+
replaceButton: "Replace",
|
|
197
|
+
replaceCurrentTitle: "Replace current match",
|
|
198
|
+
replaceAllButton: "Replace All",
|
|
199
|
+
replaceAllTitle: "Replace all matches",
|
|
200
|
+
matchCase: "Match case",
|
|
201
|
+
wholeWords: "Whole words",
|
|
202
|
+
toggleReplace: "+ Replace"
|
|
203
|
+
},
|
|
204
|
+
hyperlink: {
|
|
205
|
+
titleEdit: "Edit Hyperlink",
|
|
206
|
+
titleInsert: "Insert Hyperlink",
|
|
207
|
+
tabWebAddress: "Web Address",
|
|
208
|
+
tabBookmark: "Bookmark",
|
|
209
|
+
urlLabel: "URL",
|
|
210
|
+
urlPlaceholder: "https://example.com",
|
|
211
|
+
urlHint: "Enter a web address, email (mailto:), or phone (tel:)",
|
|
212
|
+
bookmarkLabel: "Bookmark",
|
|
213
|
+
bookmarkPlaceholder: "Select a bookmark...",
|
|
214
|
+
displayTextLabel: "Display Text",
|
|
215
|
+
displayTextPlaceholder: "Text to display (optional)",
|
|
216
|
+
displayTextHint: "Leave empty to use the selected text",
|
|
217
|
+
tooltipLabel: "Tooltip (optional)",
|
|
218
|
+
tooltipPlaceholder: "Text shown on hover",
|
|
219
|
+
removeLink: "Remove Link",
|
|
220
|
+
invalidUrl: "Please enter a valid URL",
|
|
221
|
+
urlRequired: "URL is required"
|
|
222
|
+
},
|
|
223
|
+
insertTable: {
|
|
224
|
+
title: "Insert Table",
|
|
225
|
+
hoverToSelect: "Hover to select size",
|
|
226
|
+
tableSize: "{cols} x {rows} Table",
|
|
227
|
+
orSpecifySize: "or specify size",
|
|
228
|
+
rowsLabel: "Rows:",
|
|
229
|
+
columnsLabel: "Columns:",
|
|
230
|
+
insertButton: "Insert Table",
|
|
231
|
+
sizeSelector: "Table size selector"
|
|
232
|
+
},
|
|
233
|
+
insertImage: {
|
|
234
|
+
title: "Insert Image",
|
|
235
|
+
uploadAriaLabel: "Click or drag to upload image",
|
|
236
|
+
uploadText: "Click to select or drag and drop an image",
|
|
237
|
+
uploadSubtext: "PNG, JPG, GIF up to 10MB",
|
|
238
|
+
dimensions: "Dimensions",
|
|
239
|
+
widthLabel: "Width:",
|
|
240
|
+
heightLabel: "Height:",
|
|
241
|
+
aspectRatioLocked: "Aspect ratio locked",
|
|
242
|
+
aspectRatioUnlocked: "Aspect ratio unlocked",
|
|
243
|
+
altTextLabel: "Alt Text (optional)",
|
|
244
|
+
altTextPlaceholder: "Describe the image for accessibility",
|
|
245
|
+
insertButton: "Insert Image",
|
|
246
|
+
invalidFile: "Please select a valid image file",
|
|
247
|
+
fileTooLarge: "Image file is too large (max 10MB)",
|
|
248
|
+
readFailed: "Failed to read image file",
|
|
249
|
+
loadFailed: "Failed to load image",
|
|
250
|
+
preview: "Preview"
|
|
251
|
+
},
|
|
252
|
+
insertSymbol: {
|
|
253
|
+
title: "Insert Symbol",
|
|
254
|
+
searchPlaceholder: "Search symbols (character or Unicode)...",
|
|
255
|
+
noResults: "No symbols found for \"{query}\"",
|
|
256
|
+
decimal: "Decimal: {value}",
|
|
257
|
+
categories: {
|
|
258
|
+
common: "Common",
|
|
259
|
+
arrows: "Arrows",
|
|
260
|
+
math: "Math",
|
|
261
|
+
greek: "Greek",
|
|
262
|
+
shapes: "Shapes",
|
|
263
|
+
punctuation: "Punctuation",
|
|
264
|
+
currency: "Currency",
|
|
265
|
+
music: "Music",
|
|
266
|
+
emoji: "Emoji"
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
imageProperties: {
|
|
270
|
+
title: "Image Properties",
|
|
271
|
+
altText: "Alt Text",
|
|
272
|
+
altTextPlaceholder: "Describe this image for accessibility...",
|
|
273
|
+
border: "Border",
|
|
274
|
+
width: "Width",
|
|
275
|
+
style: "Style",
|
|
276
|
+
color: "Color",
|
|
277
|
+
preview: "Preview",
|
|
278
|
+
borderStyles: {
|
|
279
|
+
solid: "Solid",
|
|
280
|
+
dashed: "Dashed",
|
|
281
|
+
dotted: "Dotted",
|
|
282
|
+
double: "Double",
|
|
283
|
+
groove: "Groove",
|
|
284
|
+
ridge: "Ridge",
|
|
285
|
+
inset: "Inset",
|
|
286
|
+
outset: "Outset"
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
imagePosition: {
|
|
290
|
+
title: "Image Position",
|
|
291
|
+
horizontal: "Horizontal",
|
|
292
|
+
vertical: "Vertical",
|
|
293
|
+
position: "Position",
|
|
294
|
+
alignment: "Alignment",
|
|
295
|
+
offset: "Offset",
|
|
296
|
+
offsetPx: "Offset (px)",
|
|
297
|
+
align: "Align",
|
|
298
|
+
relativeTo: "Relative to",
|
|
299
|
+
alignOptions: {
|
|
300
|
+
left: "Left",
|
|
301
|
+
center: "Center",
|
|
302
|
+
right: "Right",
|
|
303
|
+
top: "Top",
|
|
304
|
+
bottom: "Bottom"
|
|
305
|
+
},
|
|
306
|
+
relativeOptions: {
|
|
307
|
+
page: "Page",
|
|
308
|
+
column: "Column",
|
|
309
|
+
margin: "Margin",
|
|
310
|
+
character: "Character",
|
|
311
|
+
paragraph: "Paragraph",
|
|
312
|
+
line: "Line"
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
pageSetup: {
|
|
316
|
+
title: "Page Setup",
|
|
317
|
+
pageSize: "PAGE SIZE",
|
|
318
|
+
sizeLabel: "Size",
|
|
319
|
+
custom: "Custom",
|
|
320
|
+
orientation: "Orientation",
|
|
321
|
+
portrait: "Portrait",
|
|
322
|
+
landscape: "Landscape",
|
|
323
|
+
margins: "MARGINS",
|
|
324
|
+
top: "Top",
|
|
325
|
+
bottom: "Bottom",
|
|
326
|
+
left: "Left",
|
|
327
|
+
right: "Right",
|
|
328
|
+
pageSizes: {
|
|
329
|
+
letter: "Letter (8.5\" × 11\")",
|
|
330
|
+
a4: "A4 (8.27\" × 11.69\")",
|
|
331
|
+
legal: "Legal (8.5\" × 14\")",
|
|
332
|
+
a3: "A3 (11.69\" × 16.54\")",
|
|
333
|
+
a5: "A5 (5.83\" × 8.27\")",
|
|
334
|
+
b5: "B5 (6.93\" × 9.84\")",
|
|
335
|
+
executive: "Executive (7.25\" × 10.5\")"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
tableProperties: {
|
|
339
|
+
title: "Table Properties",
|
|
340
|
+
widthType: "Width type",
|
|
341
|
+
widthLabel: "Width",
|
|
342
|
+
alignmentLabel: "Alignment",
|
|
343
|
+
widthTypes: {
|
|
344
|
+
auto: "Auto",
|
|
345
|
+
fixed: "Fixed (twips)",
|
|
346
|
+
percentage: "Percentage"
|
|
347
|
+
},
|
|
348
|
+
units: {
|
|
349
|
+
fiftiethsPercent: "(50ths of %)",
|
|
350
|
+
twips: "tw"
|
|
351
|
+
},
|
|
352
|
+
alignOptions: {
|
|
353
|
+
left: "Left",
|
|
354
|
+
center: "Center",
|
|
355
|
+
right: "Right"
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
pasteSpecial: {
|
|
359
|
+
title: "Paste Special",
|
|
360
|
+
keepFormatting: "Keep Source Formatting",
|
|
361
|
+
keepFormattingDescription: "Paste with original formatting",
|
|
362
|
+
keepFormattingShortcut: "Ctrl+V",
|
|
363
|
+
plainText: "Paste as Plain Text",
|
|
364
|
+
plainTextDescription: "Paste without any formatting",
|
|
365
|
+
plainTextShortcut: "Ctrl+Shift+V",
|
|
366
|
+
readingClipboard: "Reading clipboard...",
|
|
367
|
+
preview: "Preview:",
|
|
368
|
+
noContent: "No content available to paste",
|
|
369
|
+
clipboardError: "Unable to read clipboard. Please use Ctrl+V to paste."
|
|
370
|
+
},
|
|
371
|
+
footnoteProperties: {
|
|
372
|
+
title: "Footnote & Endnote Properties",
|
|
373
|
+
footnotes: "Footnotes",
|
|
374
|
+
endnotes: "Endnotes",
|
|
375
|
+
position: "Position",
|
|
376
|
+
numberFormat: "Number format",
|
|
377
|
+
startAt: "Start at",
|
|
378
|
+
numbering: "Numbering",
|
|
379
|
+
footnotePositions: {
|
|
380
|
+
bottomOfPage: "Bottom of page",
|
|
381
|
+
belowText: "Below text"
|
|
382
|
+
},
|
|
383
|
+
endnotePositions: {
|
|
384
|
+
endOfDocument: "End of document",
|
|
385
|
+
endOfSection: "End of section"
|
|
386
|
+
},
|
|
387
|
+
numberingOptions: {
|
|
388
|
+
continuous: "Continuous",
|
|
389
|
+
restartSection: "Restart each section",
|
|
390
|
+
restartPage: "Restart each page"
|
|
391
|
+
},
|
|
392
|
+
formats: {
|
|
393
|
+
decimal: "1, 2, 3, ...",
|
|
394
|
+
lowerRoman: "i, ii, iii, ...",
|
|
395
|
+
upperRoman: "I, II, III, ...",
|
|
396
|
+
lowerAlpha: "a, b, c, ...",
|
|
397
|
+
upperAlpha: "A, B, C, ...",
|
|
398
|
+
symbols: "*, †, ‡, ..."
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
keyboardShortcuts: {
|
|
402
|
+
ariaLabel: "Keyboard Shortcuts",
|
|
403
|
+
searchPlaceholder: "Search shortcuts...",
|
|
404
|
+
categories: {
|
|
405
|
+
editing: "Editing",
|
|
406
|
+
formatting: "Formatting",
|
|
407
|
+
navigation: "Navigation",
|
|
408
|
+
clipboard: "Clipboard",
|
|
409
|
+
selection: "Selection",
|
|
410
|
+
view: "View",
|
|
411
|
+
file: "File",
|
|
412
|
+
other: "Other"
|
|
413
|
+
},
|
|
414
|
+
shortcuts: {
|
|
415
|
+
save: "Save",
|
|
416
|
+
saveDescription: "Save document",
|
|
417
|
+
print: "Print",
|
|
418
|
+
printDescription: "Print document",
|
|
419
|
+
undo: "Undo",
|
|
420
|
+
undoDescription: "Undo last action",
|
|
421
|
+
redo: "Redo",
|
|
422
|
+
redoDescription: "Redo last action",
|
|
423
|
+
"delete": "Delete",
|
|
424
|
+
deleteDescription: "Delete selected text",
|
|
425
|
+
find: "Find",
|
|
426
|
+
findDescription: "Find text in document",
|
|
427
|
+
findReplace: "Find & Replace",
|
|
428
|
+
findReplaceDescription: "Find and replace text",
|
|
429
|
+
cut: "Cut",
|
|
430
|
+
cutDescription: "Cut selected text",
|
|
431
|
+
copy: "Copy",
|
|
432
|
+
copyDescription: "Copy selected text",
|
|
433
|
+
paste: "Paste",
|
|
434
|
+
pasteDescription: "Paste from clipboard",
|
|
435
|
+
pastePlainText: "Paste as Plain Text",
|
|
436
|
+
pastePlainTextDescription: "Paste without formatting",
|
|
437
|
+
bold: "Bold",
|
|
438
|
+
boldDescription: "Toggle bold formatting",
|
|
439
|
+
italic: "Italic",
|
|
440
|
+
italicDescription: "Toggle italic formatting",
|
|
441
|
+
underline: "Underline",
|
|
442
|
+
underlineDescription: "Toggle underline formatting",
|
|
443
|
+
strikethrough: "Strikethrough",
|
|
444
|
+
strikethroughDescription: "Toggle strikethrough",
|
|
445
|
+
subscript: "Subscript",
|
|
446
|
+
subscriptDescription: "Toggle subscript",
|
|
447
|
+
superscript: "Superscript",
|
|
448
|
+
superscriptDescription: "Toggle superscript",
|
|
449
|
+
alignLeft: "Align Left",
|
|
450
|
+
alignLeftDescription: "Left align paragraph",
|
|
451
|
+
alignCenter: "Align Center",
|
|
452
|
+
alignCenterDescription: "Center align paragraph",
|
|
453
|
+
alignRight: "Align Right",
|
|
454
|
+
alignRightDescription: "Right align paragraph",
|
|
455
|
+
justify: "Justify",
|
|
456
|
+
justifyDescription: "Justify paragraph",
|
|
457
|
+
increaseIndent: "Increase Indent",
|
|
458
|
+
increaseIndentDescription: "Increase paragraph indent",
|
|
459
|
+
decreaseIndent: "Decrease Indent",
|
|
460
|
+
decreaseIndentDescription: "Decrease paragraph indent",
|
|
461
|
+
selectAll: "Select All",
|
|
462
|
+
selectAllDescription: "Select all content",
|
|
463
|
+
selectWord: "Select Word",
|
|
464
|
+
selectWordDescription: "Select current word",
|
|
465
|
+
selectParagraph: "Select Paragraph",
|
|
466
|
+
selectParagraphDescription: "Select current paragraph",
|
|
467
|
+
extendSelectionByWord: "Extend Selection by Word",
|
|
468
|
+
extendSelectionByWordDescription: "Extend selection to next/previous word",
|
|
469
|
+
extendSelectionToLineEdge: "Extend Selection to Line Edge",
|
|
470
|
+
extendSelectionToLineEdgeDescription: "Extend selection to line start/end",
|
|
471
|
+
moveByWord: "Move by Word",
|
|
472
|
+
moveByWordDescription: "Move cursor to next/previous word",
|
|
473
|
+
moveToLineStart: "Move to Line Start",
|
|
474
|
+
moveToLineStartDescription: "Move cursor to start of line",
|
|
475
|
+
moveToLineEnd: "Move to Line End",
|
|
476
|
+
moveToLineEndDescription: "Move cursor to end of line",
|
|
477
|
+
moveToDocumentStart: "Move to Document Start",
|
|
478
|
+
moveToDocumentStartDescription: "Move cursor to start of document",
|
|
479
|
+
moveToDocumentEnd: "Move to Document End",
|
|
480
|
+
moveToDocumentEndDescription: "Move cursor to end of document",
|
|
481
|
+
pageUp: "Page Up",
|
|
482
|
+
pageUpDescription: "Scroll up one page",
|
|
483
|
+
pageDown: "Page Down",
|
|
484
|
+
pageDownDescription: "Scroll down one page",
|
|
485
|
+
zoomIn: "Zoom In",
|
|
486
|
+
zoomInDescription: "Increase zoom level",
|
|
487
|
+
zoomOut: "Zoom Out",
|
|
488
|
+
zoomOutDescription: "Decrease zoom level",
|
|
489
|
+
resetZoom: "Reset Zoom",
|
|
490
|
+
resetZoomDescription: "Reset zoom to 100%",
|
|
491
|
+
keyboardShortcuts: "Keyboard Shortcuts",
|
|
492
|
+
keyboardShortcutsDescription: "Show this help dialog"
|
|
493
|
+
},
|
|
494
|
+
noResults: "No shortcuts found matching \"{query}\"",
|
|
495
|
+
pressEscToClose: "Press {key} to close",
|
|
496
|
+
or: "or"
|
|
497
|
+
}
|
|
498
|
+
};
|
|
499
|
+
var comments = {
|
|
500
|
+
resolved: "Resolved",
|
|
501
|
+
resolve: "Resolve",
|
|
502
|
+
reopen: "Reopen",
|
|
503
|
+
moreOptions: "More options",
|
|
504
|
+
unknown: "Unknown",
|
|
505
|
+
addComment: "Add a comment...",
|
|
506
|
+
replyPlaceholder: "Reply or add others with @",
|
|
507
|
+
replyCount: "{count, plural, one {# reply} other {# replies}}"
|
|
508
|
+
};
|
|
509
|
+
var trackedChanges = {
|
|
510
|
+
unknown: "Unknown",
|
|
511
|
+
replaced: "Replaced",
|
|
512
|
+
"with": "with",
|
|
513
|
+
added: "Added",
|
|
514
|
+
deleted: "Deleted"
|
|
515
|
+
};
|
|
516
|
+
var contextMenu = {
|
|
517
|
+
ariaLabel: "AI actions menu",
|
|
518
|
+
textMenuAriaLabel: "Text editing menu",
|
|
519
|
+
customPromptPlaceholder: "Enter custom prompt...",
|
|
520
|
+
cut: "Cut",
|
|
521
|
+
cutShortcut: "Ctrl+X",
|
|
522
|
+
copy: "Copy",
|
|
523
|
+
copyShortcut: "Ctrl+C",
|
|
524
|
+
paste: "Paste",
|
|
525
|
+
pasteShortcut: "Ctrl+V",
|
|
526
|
+
pastePlainText: "Paste as Plain Text",
|
|
527
|
+
pastePlainTextShortcut: "Ctrl+Shift+V",
|
|
528
|
+
"delete": "Delete",
|
|
529
|
+
deleteShortcut: "Del",
|
|
530
|
+
selectAll: "Select All",
|
|
531
|
+
selectAllShortcut: "Ctrl+A",
|
|
532
|
+
selected: "Selected:",
|
|
533
|
+
aiActions: {
|
|
534
|
+
askAi: "Ask AI",
|
|
535
|
+
rewrite: "Rewrite",
|
|
536
|
+
expand: "Expand",
|
|
537
|
+
summarize: "Summarize",
|
|
538
|
+
translate: "Translate",
|
|
539
|
+
explain: "Explain",
|
|
540
|
+
fixGrammar: "Fix Grammar",
|
|
541
|
+
makeFormal: "Make Formal",
|
|
542
|
+
makeCasual: "Make Casual",
|
|
543
|
+
custom: "Custom"
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
var documentOutline = {
|
|
547
|
+
ariaLabel: "Document outline",
|
|
548
|
+
closeAriaLabel: "Close outline",
|
|
549
|
+
closeTitle: "Close outline",
|
|
550
|
+
title: "Outline",
|
|
551
|
+
noHeadings: "No headings found. Add headings to your document to see them here."
|
|
552
|
+
};
|
|
553
|
+
var sidebar = {
|
|
554
|
+
ariaLabel: "Annotations sidebar"
|
|
555
|
+
};
|
|
556
|
+
var titleBar = {
|
|
557
|
+
untitled: "Untitled",
|
|
558
|
+
documentNameAriaLabel: "Document name",
|
|
559
|
+
menuBarAriaLabel: "Menu bar"
|
|
560
|
+
};
|
|
561
|
+
var errors = {
|
|
562
|
+
loadingDocument: "Loading document...",
|
|
563
|
+
noDocumentLoaded: "No document loaded",
|
|
564
|
+
failedToLoad: "Failed to Load Document",
|
|
565
|
+
unableToParse: "Unable to Parse Document",
|
|
566
|
+
somethingWentWrong: "Something went wrong",
|
|
567
|
+
errorDescription: "An error occurred while rendering this component. Please try again or contact support if the problem persists.",
|
|
568
|
+
errorLabel: "Error:",
|
|
569
|
+
componentStack: "Component Stack:",
|
|
570
|
+
tryAgain: "Try Again",
|
|
571
|
+
showDetails: "Show details",
|
|
572
|
+
hideDetails: "Hide details",
|
|
573
|
+
unsavedChanges: "You have unsaved changes. Are you sure you want to leave?"
|
|
574
|
+
};
|
|
575
|
+
var table = {
|
|
576
|
+
insertRowAbove: "Insert row above",
|
|
577
|
+
insertRowBelow: "Insert row below",
|
|
578
|
+
insertColumnLeft: "Insert column left",
|
|
579
|
+
insertColumnRight: "Insert column right",
|
|
580
|
+
deleteRow: "Delete row",
|
|
581
|
+
deleteColumn: "Delete column",
|
|
582
|
+
deleteTable: "Delete table",
|
|
583
|
+
mergeCells: "Merge cells",
|
|
584
|
+
splitCell: "Split cell",
|
|
585
|
+
editingTools: "Table editing tools",
|
|
586
|
+
label: "Table:",
|
|
587
|
+
cellFillColor: "Cell Fill Color",
|
|
588
|
+
borderColor: "Border Color",
|
|
589
|
+
borderWidth: "Border width",
|
|
590
|
+
unknownAction: "Unknown Action",
|
|
591
|
+
borders: {
|
|
592
|
+
all: "All borders",
|
|
593
|
+
outside: "Outside borders",
|
|
594
|
+
inside: "Inside borders",
|
|
595
|
+
none: "No borders",
|
|
596
|
+
remove: "Remove borders",
|
|
597
|
+
top: "Top border",
|
|
598
|
+
bottom: "Bottom border",
|
|
599
|
+
left: "Left border",
|
|
600
|
+
right: "Right border",
|
|
601
|
+
styleAriaLabel: "Border style",
|
|
602
|
+
tooltip: "Borders"
|
|
603
|
+
},
|
|
604
|
+
moreOptions: "More table options",
|
|
605
|
+
styles: {
|
|
606
|
+
title: "Table Styles",
|
|
607
|
+
label: "Styles",
|
|
608
|
+
normalTable: "Normal Table",
|
|
609
|
+
tableGrid: "Table Grid",
|
|
610
|
+
gridTableLight: "Grid Table Light",
|
|
611
|
+
plainTable1: "Plain Table 1",
|
|
612
|
+
plainTable2: "Plain Table 2",
|
|
613
|
+
plainTable3: "Plain Table 3",
|
|
614
|
+
plainTable4: "Plain Table 4",
|
|
615
|
+
gridTable1Light: "Grid Table 1 Light",
|
|
616
|
+
gridTable4Accent1: "Grid Table 4 Accent 1",
|
|
617
|
+
gridTable5Dark: "Grid Table 5 Dark",
|
|
618
|
+
listTable3Accent2: "List Table 3 Accent 2",
|
|
619
|
+
listTable4Accent3: "List Table 4 Accent 3",
|
|
620
|
+
gridTable4Accent5: "Grid Table 4 Accent 5",
|
|
621
|
+
gridTable4Accent6: "Grid Table 4 Accent 6"
|
|
622
|
+
}
|
|
623
|
+
};
|
|
624
|
+
var tableAdvanced = {
|
|
625
|
+
verticalAlignment: "Vertical alignment",
|
|
626
|
+
top: "Top",
|
|
627
|
+
middle: "Middle",
|
|
628
|
+
bottom: "Bottom",
|
|
629
|
+
cellMargins: "Cell margins",
|
|
630
|
+
textDirection: "Text direction",
|
|
631
|
+
textDirections: {
|
|
632
|
+
horizontal: "Horizontal (LR)",
|
|
633
|
+
verticalRL: "Vertical (top-bottom, RL)",
|
|
634
|
+
verticalLR: "Vertical (bottom-top, LR)"
|
|
635
|
+
},
|
|
636
|
+
toggleNoWrap: "Toggle no-wrap",
|
|
637
|
+
rowHeight: "Row height",
|
|
638
|
+
heightRules: {
|
|
639
|
+
auto: "Auto",
|
|
640
|
+
atLeast: "At least",
|
|
641
|
+
exact: "Exact"
|
|
642
|
+
},
|
|
643
|
+
rule: "Rule",
|
|
644
|
+
height: "Height",
|
|
645
|
+
toggleHeaderRow: "Toggle header row",
|
|
646
|
+
distributeColumns: "Distribute columns evenly",
|
|
647
|
+
autoFit: "Auto-fit to contents",
|
|
648
|
+
tableProperties: "Table properties...",
|
|
649
|
+
tableAlignment: "Table alignment",
|
|
650
|
+
alignTableLeft: "Align table left",
|
|
651
|
+
alignTableCenter: "Align table center",
|
|
652
|
+
alignTableRight: "Align table right",
|
|
653
|
+
tableOptionsMenu: "Table options menu",
|
|
654
|
+
tableOptions: "Table options"
|
|
655
|
+
};
|
|
656
|
+
var imageTransform = {
|
|
657
|
+
tooltip: "Transform",
|
|
658
|
+
rotateClockwise: "Rotate clockwise",
|
|
659
|
+
rotateCounterClockwise: "Rotate counter-clockwise",
|
|
660
|
+
flipHorizontal: "Flip horizontal",
|
|
661
|
+
flipVertical: "Flip vertical"
|
|
662
|
+
};
|
|
663
|
+
var imageWrap = {
|
|
664
|
+
inline: "Inline with text",
|
|
665
|
+
floatLeft: "Float left (wrap right)",
|
|
666
|
+
floatRight: "Float right (wrap left)",
|
|
667
|
+
topAndBottom: "Top and bottom",
|
|
668
|
+
behindText: "Behind text",
|
|
669
|
+
inFrontOfText: "In front of text",
|
|
670
|
+
tooltipPrefix: "Wrap: {label}"
|
|
671
|
+
};
|
|
672
|
+
var responsePreview = {
|
|
673
|
+
loading: "{action}...",
|
|
674
|
+
result: "{action} Result",
|
|
675
|
+
closeEsc: "Close (Esc)",
|
|
676
|
+
editPrompt: "Edit the result before accepting:",
|
|
677
|
+
changes: "Changes:",
|
|
678
|
+
original: "Original:",
|
|
679
|
+
"new": "New:",
|
|
680
|
+
cancelEdit: "Cancel Edit"
|
|
681
|
+
};
|
|
682
|
+
var commentMarkers = {
|
|
683
|
+
resolvedComment: "Resolved comment",
|
|
684
|
+
comment: "Comment"
|
|
685
|
+
};
|
|
686
|
+
var editor = {
|
|
687
|
+
toggleCommentsSidebar: "Toggle comments sidebar",
|
|
688
|
+
showDocumentOutline: "Show document outline",
|
|
689
|
+
editing: "Editing",
|
|
690
|
+
editingDescription: "Edit document directly",
|
|
691
|
+
suggesting: "Suggesting",
|
|
692
|
+
suggestingDescription: "Edits become suggestions",
|
|
693
|
+
viewing: "Viewing",
|
|
694
|
+
viewingDescription: "Read-only, no edits",
|
|
695
|
+
failedToParse: "Failed to parse document",
|
|
696
|
+
linkRemoved: "Link removed",
|
|
697
|
+
linkCopied: "Link copied to clipboard",
|
|
698
|
+
failedToSave: "Failed to save document"
|
|
699
|
+
};
|
|
700
|
+
var hyperlinkPopup = {
|
|
701
|
+
displayTextPlaceholder: "Display text",
|
|
702
|
+
urlPlaceholder: "https://example.com",
|
|
703
|
+
copyLink: "Copy link",
|
|
704
|
+
editLink: "Edit link",
|
|
705
|
+
removeLink: "Remove link"
|
|
706
|
+
};
|
|
707
|
+
var headerFooter = {
|
|
708
|
+
header: "Header",
|
|
709
|
+
footer: "Footer",
|
|
710
|
+
options: "Options",
|
|
711
|
+
insertPageNumber: "Insert current page number",
|
|
712
|
+
insertTotalPages: "Insert total page count",
|
|
713
|
+
remove: "Remove {label}",
|
|
714
|
+
closeEditing: "Close {label} editing"
|
|
715
|
+
};
|
|
716
|
+
var image = {
|
|
717
|
+
placeholder: "Image placeholder",
|
|
718
|
+
placeholderText: "[Image]",
|
|
719
|
+
editableAriaLabel: "Editable image"
|
|
720
|
+
};
|
|
721
|
+
var ruler = {
|
|
722
|
+
horizontal: "Horizontal ruler",
|
|
723
|
+
vertical: "Vertical ruler",
|
|
724
|
+
firstLineIndent: "First line indent",
|
|
725
|
+
leftIndent: "Left indent",
|
|
726
|
+
rightIndent: "Right indent",
|
|
727
|
+
topMargin: "Top margin",
|
|
728
|
+
bottomMargin: "Bottom margin"
|
|
729
|
+
};
|
|
730
|
+
var print = {
|
|
731
|
+
label: "Print",
|
|
732
|
+
allPages: "All ({totalPages} pages)",
|
|
733
|
+
singlePage: "Page {start}",
|
|
734
|
+
pageRange: "Pages {start}-{end}"
|
|
735
|
+
};
|
|
736
|
+
var unsaved = {
|
|
737
|
+
unsaved: "Unsaved",
|
|
738
|
+
saved: "Saved",
|
|
739
|
+
unsavedTitle: "Document has unsaved changes",
|
|
740
|
+
savedTitle: "All changes saved",
|
|
741
|
+
unsavedAriaLabel: "Unsaved changes",
|
|
742
|
+
savedAriaLabel: "All changes saved"
|
|
743
|
+
};
|
|
744
|
+
var loading = {
|
|
745
|
+
label: "Loading"
|
|
746
|
+
};
|
|
747
|
+
var en = {
|
|
748
|
+
_lang: _lang,
|
|
749
|
+
common: common,
|
|
750
|
+
toolbar: toolbar,
|
|
751
|
+
formattingBar: formattingBar,
|
|
752
|
+
alignment: alignment,
|
|
753
|
+
lists: lists,
|
|
754
|
+
lineSpacing: lineSpacing,
|
|
755
|
+
styles: styles,
|
|
756
|
+
font: font,
|
|
757
|
+
fontSize: fontSize,
|
|
758
|
+
zoom: zoom,
|
|
759
|
+
colorPicker: colorPicker,
|
|
760
|
+
dialogs: dialogs,
|
|
761
|
+
comments: comments,
|
|
762
|
+
trackedChanges: trackedChanges,
|
|
763
|
+
contextMenu: contextMenu,
|
|
764
|
+
documentOutline: documentOutline,
|
|
765
|
+
sidebar: sidebar,
|
|
766
|
+
titleBar: titleBar,
|
|
767
|
+
errors: errors,
|
|
768
|
+
table: table,
|
|
769
|
+
tableAdvanced: tableAdvanced,
|
|
770
|
+
imageTransform: imageTransform,
|
|
771
|
+
imageWrap: imageWrap,
|
|
772
|
+
responsePreview: responsePreview,
|
|
773
|
+
commentMarkers: commentMarkers,
|
|
774
|
+
editor: editor,
|
|
775
|
+
hyperlinkPopup: hyperlinkPopup,
|
|
776
|
+
headerFooter: headerFooter,
|
|
777
|
+
image: image,
|
|
778
|
+
ruler: ruler,
|
|
779
|
+
print: print,
|
|
780
|
+
unsaved: unsaved,
|
|
781
|
+
loading: loading
|
|
782
|
+
};
|
|
783
|
+
|
|
784
|
+
/** Auto-derived from en.json — never manually maintained */
|
|
785
|
+
type LocaleStrings = typeof en;
|
|
786
|
+
/** Recursively makes all properties optional */
|
|
787
|
+
type DeepPartial<T> = {
|
|
788
|
+
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K] | null;
|
|
789
|
+
};
|
|
790
|
+
type PartialLocaleStrings = DeepPartial<LocaleStrings>;
|
|
791
|
+
/** Consumer-facing type for the i18n prop. */
|
|
792
|
+
type Translations = PartialLocaleStrings;
|
|
793
|
+
/** Generates a union of all valid dot-notation paths through a nested object type */
|
|
794
|
+
type DotPath<T, Prefix extends string = ''> = {
|
|
795
|
+
[K in keyof T & string]: T[K] extends Record<string, unknown> ? DotPath<T[K], `${Prefix}${K}.`> : `${Prefix}${K}`;
|
|
796
|
+
}[keyof T & string];
|
|
797
|
+
type TranslationKey = DotPath<LocaleStrings>;
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* Print Utilities
|
|
801
|
+
*
|
|
802
|
+
* Provides print functionality with:
|
|
803
|
+
* - Print button component for toolbar
|
|
804
|
+
* - Print-specific CSS styles
|
|
805
|
+
* - Browser print dialog trigger
|
|
806
|
+
* - Page range utilities
|
|
807
|
+
*/
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* Print options
|
|
811
|
+
*/
|
|
812
|
+
interface PrintOptions {
|
|
813
|
+
/** Whether to include headers */
|
|
814
|
+
includeHeaders?: boolean;
|
|
815
|
+
/** Whether to include footers */
|
|
816
|
+
includeFooters?: boolean;
|
|
817
|
+
/** Whether to include page numbers */
|
|
818
|
+
includePageNumbers?: boolean;
|
|
819
|
+
/** Page range to print (null = all) */
|
|
820
|
+
pageRange?: {
|
|
821
|
+
start: number;
|
|
822
|
+
end: number;
|
|
823
|
+
} | null;
|
|
824
|
+
/** Scale factor for printing (1.0 = 100%) */
|
|
825
|
+
scale?: number;
|
|
826
|
+
/** Whether to show background colors */
|
|
827
|
+
printBackground?: boolean;
|
|
828
|
+
/** Margins mode */
|
|
829
|
+
margins?: 'default' | 'none' | 'minimum';
|
|
830
|
+
}
|
|
831
|
+
/**
|
|
832
|
+
* PrintButton props
|
|
833
|
+
*/
|
|
834
|
+
interface PrintButtonProps {
|
|
835
|
+
/** Callback when print is triggered */
|
|
836
|
+
onPrint: () => void;
|
|
837
|
+
/** Whether the button is disabled */
|
|
838
|
+
disabled?: boolean;
|
|
839
|
+
/** Button label */
|
|
840
|
+
label?: string;
|
|
841
|
+
/** Additional CSS class */
|
|
842
|
+
className?: string;
|
|
843
|
+
/** Additional inline styles */
|
|
844
|
+
style?: CSSProperties;
|
|
845
|
+
/** Show icon */
|
|
846
|
+
showIcon?: boolean;
|
|
847
|
+
/** Compact mode */
|
|
848
|
+
compact?: boolean;
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* PrintButton - Standalone print button for toolbar
|
|
852
|
+
*/
|
|
853
|
+
declare function PrintButton({ onPrint, disabled, label: labelProp, className, style, showIcon, compact, }: PrintButtonProps): React__default.ReactElement;
|
|
854
|
+
/**
|
|
855
|
+
* PrintStyles - Injects print-specific CSS
|
|
856
|
+
*/
|
|
857
|
+
declare function PrintStyles(): React__default.ReactElement;
|
|
858
|
+
/**
|
|
859
|
+
* Trigger browser print dialog for the current document
|
|
860
|
+
*/
|
|
861
|
+
declare function triggerPrint(): void;
|
|
862
|
+
/**
|
|
863
|
+
* Create print-optimized document view in a new window
|
|
864
|
+
*/
|
|
865
|
+
declare function openPrintWindow(title: string | undefined, content: string): Window | null;
|
|
866
|
+
/**
|
|
867
|
+
* Get default print options
|
|
868
|
+
*/
|
|
869
|
+
declare function getDefaultPrintOptions(): PrintOptions;
|
|
870
|
+
/**
|
|
871
|
+
* Create page range from string (e.g., "1-5", "3", "1,3,5")
|
|
872
|
+
*/
|
|
873
|
+
declare function parsePageRange(input: string, maxPages: number): {
|
|
874
|
+
start: number;
|
|
875
|
+
end: number;
|
|
876
|
+
} | null;
|
|
877
|
+
/**
|
|
878
|
+
* Format page range for display
|
|
879
|
+
*/
|
|
880
|
+
declare function formatPageRange(range: {
|
|
881
|
+
start: number;
|
|
882
|
+
end: number;
|
|
883
|
+
} | null, totalPages: number): string;
|
|
884
|
+
/**
|
|
885
|
+
* Check if browser supports good print functionality
|
|
886
|
+
*/
|
|
887
|
+
declare function isPrintSupported(): boolean;
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* TableToolbar Component
|
|
891
|
+
*
|
|
892
|
+
* Provides controls for editing tables:
|
|
893
|
+
* - Add row above/below
|
|
894
|
+
* - Add column left/right
|
|
895
|
+
* - Delete row/column
|
|
896
|
+
* - Merge cells
|
|
897
|
+
* - Split cell
|
|
898
|
+
*
|
|
899
|
+
* Shows when cursor is in a table.
|
|
900
|
+
*/
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* Table editing action types
|
|
904
|
+
*/
|
|
905
|
+
type TableAction = 'addRowAbove' | 'addRowBelow' | 'addColumnLeft' | 'addColumnRight' | 'deleteRow' | 'deleteColumn' | 'mergeCells' | 'splitCell' | 'deleteTable' | 'selectTable' | 'selectRow' | 'selectColumn' | 'borderAll' | 'borderOutside' | 'borderInside' | 'borderNone' | 'borderTop' | 'borderBottom' | 'borderLeft' | 'borderRight' | {
|
|
906
|
+
type: 'cellFillColor';
|
|
907
|
+
color: string | null;
|
|
908
|
+
} | {
|
|
909
|
+
type: 'borderColor';
|
|
910
|
+
color: string;
|
|
911
|
+
} | {
|
|
912
|
+
type: 'borderWidth';
|
|
913
|
+
size: number;
|
|
914
|
+
} | {
|
|
915
|
+
type: 'cellBorder';
|
|
916
|
+
side: 'top' | 'bottom' | 'left' | 'right' | 'all';
|
|
917
|
+
style: string;
|
|
918
|
+
size: number;
|
|
919
|
+
color: string;
|
|
920
|
+
} | {
|
|
921
|
+
type: 'cellVerticalAlign';
|
|
922
|
+
align: 'top' | 'center' | 'bottom';
|
|
923
|
+
} | {
|
|
924
|
+
type: 'cellMargins';
|
|
925
|
+
margins: {
|
|
926
|
+
top?: number;
|
|
927
|
+
bottom?: number;
|
|
928
|
+
left?: number;
|
|
929
|
+
right?: number;
|
|
930
|
+
};
|
|
931
|
+
} | {
|
|
932
|
+
type: 'cellTextDirection';
|
|
933
|
+
direction: string | null;
|
|
934
|
+
} | {
|
|
935
|
+
type: 'toggleNoWrap';
|
|
936
|
+
} | {
|
|
937
|
+
type: 'rowHeight';
|
|
938
|
+
height: number | null;
|
|
939
|
+
rule?: 'auto' | 'atLeast' | 'exact';
|
|
940
|
+
} | {
|
|
941
|
+
type: 'toggleHeaderRow';
|
|
942
|
+
} | {
|
|
943
|
+
type: 'distributeColumns';
|
|
944
|
+
} | {
|
|
945
|
+
type: 'autoFitContents';
|
|
946
|
+
} | {
|
|
947
|
+
type: 'tableProperties';
|
|
948
|
+
props: {
|
|
949
|
+
width?: number | null;
|
|
950
|
+
widthType?: string | null;
|
|
951
|
+
justification?: 'left' | 'center' | 'right' | null;
|
|
952
|
+
};
|
|
953
|
+
} | {
|
|
954
|
+
type: 'openTableProperties';
|
|
955
|
+
} | {
|
|
956
|
+
type: 'applyTableStyle';
|
|
957
|
+
styleId: string;
|
|
958
|
+
};
|
|
959
|
+
/**
|
|
960
|
+
* Selection within a table
|
|
961
|
+
*/
|
|
962
|
+
interface TableSelection {
|
|
963
|
+
/** Index of the table in the document */
|
|
964
|
+
tableIndex: number;
|
|
965
|
+
/** Row index (0-indexed) */
|
|
966
|
+
rowIndex: number;
|
|
967
|
+
/** Column index (0-indexed) */
|
|
968
|
+
columnIndex: number;
|
|
969
|
+
/** Selected cell range for multi-cell selection */
|
|
970
|
+
selectedCells?: {
|
|
971
|
+
startRow: number;
|
|
972
|
+
startCol: number;
|
|
973
|
+
endRow: number;
|
|
974
|
+
endCol: number;
|
|
975
|
+
};
|
|
976
|
+
}
|
|
977
|
+
/**
|
|
978
|
+
* Context for table operations
|
|
979
|
+
*/
|
|
980
|
+
interface TableContext {
|
|
981
|
+
/** The table being edited */
|
|
982
|
+
table: Table;
|
|
983
|
+
/** Current selection within the table */
|
|
984
|
+
selection: TableSelection;
|
|
985
|
+
/** Whether multiple cells are selected (for merge) */
|
|
986
|
+
hasMultiCellSelection: boolean;
|
|
987
|
+
/** Whether current cell can be split */
|
|
988
|
+
canSplitCell: boolean;
|
|
989
|
+
/** Total number of rows */
|
|
990
|
+
rowCount: number;
|
|
991
|
+
/** Total number of columns */
|
|
992
|
+
columnCount: number;
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* Props for TableToolbar component
|
|
996
|
+
*/
|
|
997
|
+
interface TableToolbarProps {
|
|
998
|
+
/** Current table context (null if cursor not in table) */
|
|
999
|
+
context: TableContext | null;
|
|
1000
|
+
/** Callback when a table action is triggered */
|
|
1001
|
+
onAction?: (action: TableAction, context: TableContext) => void;
|
|
1002
|
+
/** Whether the toolbar is disabled */
|
|
1003
|
+
disabled?: boolean;
|
|
1004
|
+
/** Additional CSS class name */
|
|
1005
|
+
className?: string;
|
|
1006
|
+
/** Additional inline styles */
|
|
1007
|
+
style?: CSSProperties;
|
|
1008
|
+
/** Show labels next to icons */
|
|
1009
|
+
showLabels?: boolean;
|
|
1010
|
+
/** Compact mode */
|
|
1011
|
+
compact?: boolean;
|
|
1012
|
+
/** Position of the toolbar */
|
|
1013
|
+
position?: 'top' | 'floating';
|
|
1014
|
+
/** Custom render for additional buttons */
|
|
1015
|
+
children?: ReactNode;
|
|
1016
|
+
}
|
|
1017
|
+
/**
|
|
1018
|
+
* TableToolbar - Shows table manipulation controls when cursor is in a table
|
|
1019
|
+
*/
|
|
1020
|
+
declare function TableToolbar({ context, onAction, disabled, className, style, showLabels, compact, position, children, }: TableToolbarProps): React__default.ReactElement | null;
|
|
1021
|
+
/**
|
|
1022
|
+
* Create a table context from a table and selection
|
|
1023
|
+
*/
|
|
1024
|
+
declare function createTableContext(table: Table, selection: TableSelection): TableContext;
|
|
1025
|
+
/**
|
|
1026
|
+
* Get column count from a table
|
|
1027
|
+
*/
|
|
1028
|
+
declare function getColumnCount(table: Table): number;
|
|
1029
|
+
/**
|
|
1030
|
+
* Get cell at specific row and column index
|
|
1031
|
+
*/
|
|
1032
|
+
declare function getCellAt(table: Table, rowIndex: number, columnIndex: number): TableCell | null;
|
|
1033
|
+
/**
|
|
1034
|
+
* Add a row to a table at the specified index
|
|
1035
|
+
*/
|
|
1036
|
+
declare function addRow(table: Table, atIndex: number, position?: 'before' | 'after'): Table;
|
|
1037
|
+
/**
|
|
1038
|
+
* Delete a row from a table
|
|
1039
|
+
*/
|
|
1040
|
+
declare function deleteRow(table: Table, rowIndex: number): Table;
|
|
1041
|
+
/**
|
|
1042
|
+
* Add a column to a table at the specified index
|
|
1043
|
+
*/
|
|
1044
|
+
declare function addColumn(table: Table, atIndex: number, position?: 'before' | 'after'): Table;
|
|
1045
|
+
/**
|
|
1046
|
+
* Delete a column from a table
|
|
1047
|
+
*/
|
|
1048
|
+
declare function deleteColumn(table: Table, columnIndex: number): Table;
|
|
1049
|
+
/**
|
|
1050
|
+
* Merge cells in a selection
|
|
1051
|
+
*/
|
|
1052
|
+
declare function mergeCells(table: Table, selection: TableSelection): Table;
|
|
1053
|
+
/**
|
|
1054
|
+
* Split a merged cell
|
|
1055
|
+
*/
|
|
1056
|
+
declare function splitCell(table: Table, rowIndex: number, columnIndex: number): Table;
|
|
1057
|
+
|
|
1058
|
+
/**
|
|
1059
|
+
* Clipboard utilities for copy/paste with formatting
|
|
1060
|
+
*
|
|
1061
|
+
* Handles:
|
|
1062
|
+
* - Copy: puts formatted HTML and plain text on clipboard
|
|
1063
|
+
* - Paste: reads HTML clipboard, converts to runs with formatting
|
|
1064
|
+
* - Handles paste from Word (cleans up Word HTML)
|
|
1065
|
+
* - Ctrl+C, Ctrl+V, Ctrl+X keyboard shortcuts
|
|
1066
|
+
*/
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
* Clipboard content format
|
|
1070
|
+
*/
|
|
1071
|
+
interface ClipboardContent {
|
|
1072
|
+
/** Plain text representation */
|
|
1073
|
+
plainText: string;
|
|
1074
|
+
/** HTML representation */
|
|
1075
|
+
html: string;
|
|
1076
|
+
/** Internal format (JSON) for preserving full formatting */
|
|
1077
|
+
internal?: string;
|
|
1078
|
+
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Parsed clipboard content
|
|
1081
|
+
*/
|
|
1082
|
+
interface ParsedClipboardContent {
|
|
1083
|
+
/** Runs parsed from clipboard */
|
|
1084
|
+
runs: Run[];
|
|
1085
|
+
/** Whether content came from Word */
|
|
1086
|
+
fromWord: boolean;
|
|
1087
|
+
/** Whether content came from our editor */
|
|
1088
|
+
fromEditor: boolean;
|
|
1089
|
+
/** Original plain text */
|
|
1090
|
+
plainText: string;
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* Options for clipboard operations
|
|
1094
|
+
*/
|
|
1095
|
+
interface ClipboardOptions {
|
|
1096
|
+
/** Whether to include formatting in copy */
|
|
1097
|
+
includeFormatting?: boolean;
|
|
1098
|
+
/** Whether to clean Word-specific formatting */
|
|
1099
|
+
cleanWordFormatting?: boolean;
|
|
1100
|
+
/** Callback for handling errors */
|
|
1101
|
+
onError?: (error: Error) => void;
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* Custom MIME type for internal clipboard format
|
|
1105
|
+
*/
|
|
1106
|
+
declare const INTERNAL_CLIPBOARD_TYPE = "application/x-docx-editor";
|
|
1107
|
+
/**
|
|
1108
|
+
* Standard clipboard MIME types
|
|
1109
|
+
*/
|
|
1110
|
+
declare const CLIPBOARD_TYPES: {
|
|
1111
|
+
readonly HTML: "text/html";
|
|
1112
|
+
readonly PLAIN: "text/plain";
|
|
1113
|
+
};
|
|
1114
|
+
/**
|
|
1115
|
+
* Copy runs to clipboard with formatting
|
|
1116
|
+
*/
|
|
1117
|
+
declare function copyRuns(runs: Run[], options?: ClipboardOptions): Promise<boolean>;
|
|
1118
|
+
/**
|
|
1119
|
+
* Copy paragraphs to clipboard with formatting
|
|
1120
|
+
*/
|
|
1121
|
+
declare function copyParagraphs(paragraphs: Paragraph[], options?: ClipboardOptions): Promise<boolean>;
|
|
1122
|
+
/**
|
|
1123
|
+
* Convert runs to clipboard content (HTML and plain text)
|
|
1124
|
+
*/
|
|
1125
|
+
declare function runsToClipboardContent(runs: Run[], includeFormatting?: boolean): ClipboardContent;
|
|
1126
|
+
/**
|
|
1127
|
+
* Convert paragraphs to clipboard content
|
|
1128
|
+
*/
|
|
1129
|
+
declare function paragraphsToClipboardContent(paragraphs: Paragraph[], includeFormatting?: boolean): ClipboardContent;
|
|
1130
|
+
/**
|
|
1131
|
+
* Write content to clipboard
|
|
1132
|
+
*/
|
|
1133
|
+
declare function writeToClipboard(content: ClipboardContent): Promise<boolean>;
|
|
1134
|
+
/**
|
|
1135
|
+
* Read content from clipboard
|
|
1136
|
+
*/
|
|
1137
|
+
declare function readFromClipboard(options?: ClipboardOptions): Promise<ParsedClipboardContent | null>;
|
|
1138
|
+
/**
|
|
1139
|
+
* Handle paste event
|
|
1140
|
+
*/
|
|
1141
|
+
declare function handlePasteEvent(event: ClipboardEvent, options?: ClipboardOptions): ParsedClipboardContent | null;
|
|
1142
|
+
/**
|
|
1143
|
+
* Parse HTML from clipboard
|
|
1144
|
+
*/
|
|
1145
|
+
declare function parseClipboardHtml(html: string, plainText: string, cleanWordFormatting?: boolean): ParsedClipboardContent;
|
|
1146
|
+
/**
|
|
1147
|
+
* Check if HTML is from Microsoft Word
|
|
1148
|
+
*/
|
|
1149
|
+
declare function isWordHtml(html: string): boolean;
|
|
1150
|
+
/**
|
|
1151
|
+
* Check if HTML is from our editor
|
|
1152
|
+
*/
|
|
1153
|
+
declare function isEditorHtml(html: string): boolean;
|
|
1154
|
+
/**
|
|
1155
|
+
* Clean Microsoft Word HTML
|
|
1156
|
+
*/
|
|
1157
|
+
declare function cleanWordHtml(html: string): string;
|
|
1158
|
+
/**
|
|
1159
|
+
* Convert HTML to runs
|
|
1160
|
+
*/
|
|
1161
|
+
declare function htmlToRuns(html: string, plainTextFallback: string): Run[];
|
|
1162
|
+
/**
|
|
1163
|
+
* Create clipboard keyboard handlers for an editor
|
|
1164
|
+
*/
|
|
1165
|
+
declare function createClipboardHandlers(options: {
|
|
1166
|
+
onCopy?: () => {
|
|
1167
|
+
runs: Run[];
|
|
1168
|
+
} | null;
|
|
1169
|
+
onCut?: () => {
|
|
1170
|
+
runs: Run[];
|
|
1171
|
+
} | null;
|
|
1172
|
+
onPaste?: (content: ParsedClipboardContent) => void;
|
|
1173
|
+
clipboardOptions?: ClipboardOptions;
|
|
1174
|
+
}): {
|
|
1175
|
+
handleCopy: (event: ClipboardEvent) => Promise<void>;
|
|
1176
|
+
handleCut: (event: ClipboardEvent) => Promise<void>;
|
|
1177
|
+
handlePaste: (event: ClipboardEvent) => void;
|
|
1178
|
+
handleKeyDown: (event: KeyboardEvent) => Promise<void>;
|
|
1179
|
+
};
|
|
1180
|
+
|
|
1181
|
+
export { handlePasteEvent as A, htmlToRuns as B, CLIPBOARD_TYPES as C, isEditorHtml as D, isPrintSupported as E, isWordHtml as F, mergeCells as G, openPrintWindow as H, INTERNAL_CLIPBOARD_TYPE as I, paragraphsToClipboardContent as J, parseClipboardHtml as K, type LocaleStrings as L, parsePageRange as M, readFromClipboard as N, runsToClipboardContent as O, type ParsedClipboardContent as P, splitCell as Q, triggerPrint as R, writeToClipboard as S, type Translations as T, type TranslationKey as a, type ClipboardContent as b, type ClipboardOptions as c, type PartialLocaleStrings as d, PrintButton as e, type PrintButtonProps as f, type PrintOptions as g, PrintStyles as h, type TableAction as i, type TableContext as j, type TableSelection as k, TableToolbar as l, type TableToolbarProps as m, addColumn as n, addRow as o, cleanWordHtml as p, copyParagraphs as q, copyRuns as r, createClipboardHandlers as s, createTableContext as t, deleteColumn as u, deleteRow as v, formatPageRange as w, getCellAt as x, getColumnCount as y, getDefaultPrintOptions as z };
|