web-doc 0.6.2 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +33 -1
- package/dist/adapters/docx-images.d.ts +13 -4
- package/dist/adapters/docx-images.js +3 -0
- package/dist/adapters/docx-paragraphs.d.ts +65 -0
- package/dist/adapters/docx-paragraphs.js +165 -0
- package/dist/adapters/docx-prepass.d.ts +17 -0
- package/dist/adapters/docx-prepass.js +230 -0
- package/dist/adapters/office.d.ts +31 -5
- package/dist/adapters/office.js +60 -29
- package/dist/adapters/pdf.d.ts +9 -0
- package/dist/adapters/pdf.js +10 -0
- package/dist/assets/pdfium/pdfium.wasm +0 -0
- package/dist/contracts.d.ts +53 -2
- package/dist/edit/ai/outline.d.ts +47 -0
- package/dist/edit/ai/outline.js +338 -0
- package/dist/edit/ai/targets.d.ts +16 -0
- package/dist/edit/ai/targets.js +309 -0
- package/dist/edit/ai/tools.d.ts +28 -0
- package/dist/edit/ai/tools.js +605 -0
- package/dist/edit/ai/types.d.ts +175 -0
- package/dist/edit/ai/types.js +1 -0
- package/dist/edit/assets.d.ts +23 -0
- package/dist/edit/assets.js +75 -0
- package/dist/edit/docx/elements.d.ts +6 -0
- package/dist/edit/docx/elements.js +90 -0
- package/dist/edit/docx/engine.d.ts +57 -0
- package/dist/edit/docx/engine.js +547 -0
- package/dist/edit/docx/handlers.d.ts +3 -0
- package/dist/edit/docx/handlers.js +15 -0
- package/dist/edit/docx/ids.d.ts +45 -0
- package/dist/edit/docx/ids.js +101 -0
- package/dist/edit/docx/model.d.ts +94 -0
- package/dist/edit/docx/model.js +350 -0
- package/dist/edit/docx/operations.d.ts +47 -0
- package/dist/edit/docx/operations.js +3 -0
- package/dist/edit/docx/provider.d.ts +16 -0
- package/dist/edit/docx/provider.js +37 -0
- package/dist/edit/docx/schemas.d.ts +6 -0
- package/dist/edit/docx/schemas.js +192 -0
- package/dist/edit/docx/session.d.ts +48 -0
- package/dist/edit/docx/session.js +467 -0
- package/dist/edit/docx/structure-ops.d.ts +6 -0
- package/dist/edit/docx/structure-ops.js +529 -0
- package/dist/edit/docx/style.d.ts +45 -0
- package/dist/edit/docx/style.js +375 -0
- package/dist/edit/docx/table-ops.d.ts +4 -0
- package/dist/edit/docx/table-ops.js +241 -0
- package/dist/edit/docx/text-ops.d.ts +40 -0
- package/dist/edit/docx/text-ops.js +491 -0
- package/dist/edit/docx/text.d.ts +34 -0
- package/dist/edit/docx/text.js +284 -0
- package/dist/edit/docx/tracked.d.ts +52 -0
- package/dist/edit/docx/tracked.js +347 -0
- package/dist/edit/docx/types.d.ts +206 -0
- package/dist/edit/docx/types.js +1 -0
- package/dist/edit/docx/write.d.ts +64 -0
- package/dist/edit/docx/write.js +375 -0
- package/dist/edit/engine.d.ts +128 -0
- package/dist/edit/engine.js +1 -0
- package/dist/edit/history.d.ts +77 -0
- package/dist/edit/history.js +123 -0
- package/dist/edit/ooxml/names.d.ts +20 -0
- package/dist/edit/ooxml/names.js +61 -0
- package/dist/edit/ooxml/opc.d.ts +50 -0
- package/dist/edit/ooxml/opc.js +150 -0
- package/dist/edit/ooxml/package.d.ts +82 -0
- package/dist/edit/ooxml/package.js +233 -0
- package/dist/edit/ooxml/patch.d.ts +51 -0
- package/dist/edit/ooxml/patch.js +250 -0
- package/dist/edit/ooxml/transaction.d.ts +39 -0
- package/dist/edit/ooxml/transaction.js +316 -0
- package/dist/edit/ooxml/worker.d.ts +8 -0
- package/dist/edit/ooxml/worker.js +12 -0
- package/dist/edit/ooxml/writer.d.ts +21 -0
- package/dist/edit/ooxml/writer.js +187 -0
- package/dist/edit/ooxml/xml.d.ts +74 -0
- package/dist/edit/ooxml/xml.js +451 -0
- package/dist/edit/ooxml/zip.d.ts +54 -0
- package/dist/edit/ooxml/zip.js +280 -0
- package/dist/edit/operations.d.ts +19 -0
- package/dist/edit/operations.js +137 -0
- package/dist/edit/pdf/engine/compact.d.ts +6 -0
- package/dist/edit/pdf/engine/compact.js +442 -0
- package/dist/edit/pdf/engine/document.d.ts +95 -0
- package/dist/edit/pdf/engine/document.js +868 -0
- package/dist/edit/pdf/engine/elements.d.ts +45 -0
- package/dist/edit/pdf/engine/elements.js +313 -0
- package/dist/edit/pdf/engine/existing-text.d.ts +4 -0
- package/dist/edit/pdf/engine/existing-text.js +424 -0
- package/dist/edit/pdf/engine/fonts.d.ts +78 -0
- package/dist/edit/pdf/engine/fonts.js +466 -0
- package/dist/edit/pdf/engine/geometry.d.ts +36 -0
- package/dist/edit/pdf/engine/geometry.js +97 -0
- package/dist/edit/pdf/engine/handler.d.ts +21 -0
- package/dist/edit/pdf/engine/handler.js +108 -0
- package/dist/edit/pdf/engine/images.d.ts +33 -0
- package/dist/edit/pdf/engine/images.js +188 -0
- package/dist/edit/pdf/engine/layout.d.ts +23 -0
- package/dist/edit/pdf/engine/layout.js +177 -0
- package/dist/edit/pdf/engine/operations.d.ts +67 -0
- package/dist/edit/pdf/engine/operations.js +3 -0
- package/dist/edit/pdf/engine/pages.d.ts +6 -0
- package/dist/edit/pdf/engine/pages.js +98 -0
- package/dist/edit/pdf/engine/pdfium.d.ts +195 -0
- package/dist/edit/pdf/engine/pdfium.js +249 -0
- package/dist/edit/pdf/engine/shapes.d.ts +4 -0
- package/dist/edit/pdf/engine/shapes.js +183 -0
- package/dist/edit/pdf/engine/tables.d.ts +44 -0
- package/dist/edit/pdf/engine/tables.js +315 -0
- package/dist/edit/pdf/engine/text-box.d.ts +71 -0
- package/dist/edit/pdf/engine/text-box.js +317 -0
- package/dist/edit/pdf/engine/text-layout.d.ts +28 -0
- package/dist/edit/pdf/engine/text-layout.js +67 -0
- package/dist/edit/pdf/engine/transform.d.ts +5 -0
- package/dist/edit/pdf/engine/transform.js +137 -0
- package/dist/edit/pdf/provider.d.ts +35 -0
- package/dist/edit/pdf/provider.js +92 -0
- package/dist/edit/pdf/range-map.d.ts +16 -0
- package/dist/edit/pdf/range-map.js +107 -0
- package/dist/edit/pdf/schemas.d.ts +11 -0
- package/dist/edit/pdf/schemas.js +291 -0
- package/dist/edit/pdf/selection.d.ts +5 -0
- package/dist/edit/pdf/selection.js +152 -0
- package/dist/edit/pdf/session.d.ts +63 -0
- package/dist/edit/pdf/session.js +312 -0
- package/dist/edit/pdf/types.d.ts +336 -0
- package/dist/edit/pdf/types.js +1 -0
- package/dist/edit/pptx/elements.d.ts +74 -0
- package/dist/edit/pptx/elements.js +301 -0
- package/dist/edit/pptx/engine.d.ts +37 -0
- package/dist/edit/pptx/engine.js +466 -0
- package/dist/edit/pptx/geometry.d.ts +72 -0
- package/dist/edit/pptx/geometry.js +193 -0
- package/dist/edit/pptx/handler.d.ts +7 -0
- package/dist/edit/pptx/handler.js +99 -0
- package/dist/edit/pptx/handlers.d.ts +3 -0
- package/dist/edit/pptx/handlers.js +21 -0
- package/dist/edit/pptx/image-table-ops.d.ts +5 -0
- package/dist/edit/pptx/image-table-ops.js +233 -0
- package/dist/edit/pptx/model.d.ts +69 -0
- package/dist/edit/pptx/model.js +170 -0
- package/dist/edit/pptx/operations.d.ts +50 -0
- package/dist/edit/pptx/operations.js +11 -0
- package/dist/edit/pptx/provider.d.ts +17 -0
- package/dist/edit/pptx/provider.js +40 -0
- package/dist/edit/pptx/schemas.d.ts +6 -0
- package/dist/edit/pptx/schemas.js +220 -0
- package/dist/edit/pptx/session.d.ts +54 -0
- package/dist/edit/pptx/session.js +145 -0
- package/dist/edit/pptx/shape-ops.d.ts +10 -0
- package/dist/edit/pptx/shape-ops.js +486 -0
- package/dist/edit/pptx/slide-ops.d.ts +6 -0
- package/dist/edit/pptx/slide-ops.js +353 -0
- package/dist/edit/pptx/style.d.ts +31 -0
- package/dist/edit/pptx/style.js +181 -0
- package/dist/edit/pptx/text-ops.d.ts +13 -0
- package/dist/edit/pptx/text-ops.js +267 -0
- package/dist/edit/pptx/text-write.d.ts +67 -0
- package/dist/edit/pptx/text-write.js +293 -0
- package/dist/edit/pptx/text.d.ts +41 -0
- package/dist/edit/pptx/text.js +99 -0
- package/dist/edit/pptx/types.d.ts +232 -0
- package/dist/edit/pptx/types.js +1 -0
- package/dist/edit/schema.d.ts +11 -0
- package/dist/edit/schema.js +275 -0
- package/dist/edit/session.d.ts +77 -0
- package/dist/edit/session.js +943 -0
- package/dist/edit/sessions.d.ts +8 -0
- package/dist/edit/sessions.js +1 -0
- package/dist/edit/types.d.ts +290 -0
- package/dist/edit/types.js +1 -0
- package/dist/edit/worker-engine.d.ts +31 -0
- package/dist/edit/worker-engine.js +91 -0
- package/dist/fonts/THIRD_PARTY_NOTICES.md +3 -0
- package/dist/fonts/manifest.json +6 -1
- package/dist/fonts/noto-sans-latin-cyrillic.ttf +0 -0
- package/dist/fonts.d.ts +2 -0
- package/dist/fonts.js +4 -0
- package/dist/fuzzy-alignment.d.ts +11 -4
- package/dist/fuzzy-alignment.js +3 -9
- package/dist/headless.d.ts +5 -1
- package/dist/headless.js +8 -1
- package/dist/index.d.ts +10 -2
- package/dist/index.js +16 -2
- package/dist/limits.js +6 -0
- package/dist/ooxml-edit-worker.d.ts +1 -0
- package/dist/ooxml-edit-worker.js +8 -0
- package/dist/pdf-edit-worker.d.ts +1 -0
- package/dist/pdf-edit-worker.js +35 -0
- package/dist/spreadsheet-viewport.d.ts +5 -0
- package/dist/spreadsheet-viewport.js +11 -0
- package/dist/ui.js +7 -0
- package/dist/viewer.d.ts +6 -0
- package/dist/viewer.js +293 -19
- package/dist/viewport.d.ts +13 -0
- package/dist/viewport.js +126 -1
- package/dist/worker-protocol.d.ts +39 -2
- package/dist/workers/fuzzy-search-worker.js +1 -1
- package/dist/workers/ooxml-edit-worker.js +9212 -0
- package/dist/workers/pdf-edit-worker.js +10847 -0
- package/package.json +3 -3
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* JSON Schemas of the DOCX operations, shared by the worker (engine
|
|
3
|
+
* validation), the main thread (shape checks) and clients
|
|
4
|
+
* (`session.schemas`). Only keywords the in-repo validator implements may
|
|
5
|
+
* appear here. The exported set lists the operations that have an engine
|
|
6
|
+
* handler.
|
|
7
|
+
*/
|
|
8
|
+
const HIGHLIGHTS = [
|
|
9
|
+
"yellow",
|
|
10
|
+
"green",
|
|
11
|
+
"cyan",
|
|
12
|
+
"magenta",
|
|
13
|
+
"blue",
|
|
14
|
+
"red",
|
|
15
|
+
"darkBlue",
|
|
16
|
+
"darkCyan",
|
|
17
|
+
"darkGreen",
|
|
18
|
+
"darkMagenta",
|
|
19
|
+
"darkRed",
|
|
20
|
+
"darkYellow",
|
|
21
|
+
"darkGray",
|
|
22
|
+
"lightGray",
|
|
23
|
+
"black",
|
|
24
|
+
"white",
|
|
25
|
+
];
|
|
26
|
+
const definitions = {
|
|
27
|
+
target: { type: "string", minLength: 1, maxLength: 200 },
|
|
28
|
+
textPosition: {
|
|
29
|
+
type: "object",
|
|
30
|
+
required: ["elementId", "offset"],
|
|
31
|
+
additionalProperties: false,
|
|
32
|
+
properties: {
|
|
33
|
+
elementId: { $ref: "#/$defs/target" },
|
|
34
|
+
offset: { type: "integer", minimum: 0 },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
textRange: {
|
|
38
|
+
type: "object",
|
|
39
|
+
required: ["start", "end"],
|
|
40
|
+
additionalProperties: false,
|
|
41
|
+
properties: {
|
|
42
|
+
start: { $ref: "#/$defs/textPosition" },
|
|
43
|
+
end: { $ref: "#/$defs/textPosition" },
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
text: { type: "string", maxLength: 100_000 },
|
|
47
|
+
rgb: { type: "string", pattern: "^#[0-9A-Fa-f]{6}$" },
|
|
48
|
+
themeColor: {
|
|
49
|
+
type: "object",
|
|
50
|
+
required: ["theme"],
|
|
51
|
+
additionalProperties: false,
|
|
52
|
+
properties: {
|
|
53
|
+
theme: { type: "string", minLength: 1, maxLength: 20 },
|
|
54
|
+
mods: { type: "object" },
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
color: {
|
|
58
|
+
oneOf: [
|
|
59
|
+
{ $ref: "#/$defs/rgb" },
|
|
60
|
+
{ $ref: "#/$defs/themeColor" },
|
|
61
|
+
{ const: "auto" },
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
textStyle: {
|
|
65
|
+
type: "object",
|
|
66
|
+
additionalProperties: false,
|
|
67
|
+
properties: {
|
|
68
|
+
fontFamily: { type: "string", minLength: 1, maxLength: 100 },
|
|
69
|
+
fontSize: { type: "number", minimum: 1, maximum: 400 },
|
|
70
|
+
bold: { type: "boolean" },
|
|
71
|
+
italic: { type: "boolean" },
|
|
72
|
+
underline: { type: "boolean" },
|
|
73
|
+
color: { $ref: "#/$defs/color" },
|
|
74
|
+
highlight: { enum: [...HIGHLIGHTS, "none"] },
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
paragraphStyle: {
|
|
78
|
+
type: "object",
|
|
79
|
+
additionalProperties: false,
|
|
80
|
+
properties: {
|
|
81
|
+
align: { enum: ["left", "center", "right", "justify"] },
|
|
82
|
+
spacing: {
|
|
83
|
+
type: "object",
|
|
84
|
+
additionalProperties: false,
|
|
85
|
+
properties: {
|
|
86
|
+
before: { type: "number", minimum: 0, maximum: 1584 },
|
|
87
|
+
after: { type: "number", minimum: 0, maximum: 1584 },
|
|
88
|
+
line: { type: "number", minimum: 0.06, maximum: 132 },
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
tableRows: {
|
|
94
|
+
type: "array",
|
|
95
|
+
minItems: 1,
|
|
96
|
+
maxItems: 100,
|
|
97
|
+
items: {
|
|
98
|
+
type: "array",
|
|
99
|
+
minItems: 1,
|
|
100
|
+
maxItems: 20,
|
|
101
|
+
items: { type: "string", maxLength: 10_000 },
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
index: { type: "integer", minimum: 0, maximum: 100_000 },
|
|
105
|
+
size: {
|
|
106
|
+
type: "object",
|
|
107
|
+
required: ["width", "height"],
|
|
108
|
+
additionalProperties: false,
|
|
109
|
+
properties: {
|
|
110
|
+
width: { type: "number", exclusiveMinimum: 0, maximum: 1584 },
|
|
111
|
+
height: { type: "number", exclusiveMinimum: 0, maximum: 1584 },
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
function operation(name, properties, required) {
|
|
116
|
+
return {
|
|
117
|
+
type: "object",
|
|
118
|
+
required: ["op", ...required],
|
|
119
|
+
additionalProperties: false,
|
|
120
|
+
properties: { op: { const: name }, ...properties },
|
|
121
|
+
$defs: definitions,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/** `before` or `after`: the element the operation places next to. */
|
|
125
|
+
const placement = {
|
|
126
|
+
before: { $ref: "#/$defs/target" },
|
|
127
|
+
after: { $ref: "#/$defs/target" },
|
|
128
|
+
};
|
|
129
|
+
const all = {
|
|
130
|
+
replaceText: operation("replaceText", {
|
|
131
|
+
target: { $ref: "#/$defs/target" },
|
|
132
|
+
text: { $ref: "#/$defs/text" },
|
|
133
|
+
range: { $ref: "#/$defs/textRange" },
|
|
134
|
+
}, ["target", "text"]),
|
|
135
|
+
setTextStyle: operation("setTextStyle", {
|
|
136
|
+
target: { $ref: "#/$defs/target" },
|
|
137
|
+
range: { $ref: "#/$defs/textRange" },
|
|
138
|
+
style: { $ref: "#/$defs/textStyle" },
|
|
139
|
+
}, ["target", "style"]),
|
|
140
|
+
setParagraphStyle: operation("setParagraphStyle", {
|
|
141
|
+
target: { $ref: "#/$defs/target" },
|
|
142
|
+
style: { $ref: "#/$defs/paragraphStyle" },
|
|
143
|
+
}, ["target", "style"]),
|
|
144
|
+
insertParagraph: operation("insertParagraph", {
|
|
145
|
+
...placement,
|
|
146
|
+
text: { $ref: "#/$defs/text" },
|
|
147
|
+
style: { $ref: "#/$defs/textStyle" },
|
|
148
|
+
}, ["text"]),
|
|
149
|
+
deleteElement: operation("deleteElement", { target: { $ref: "#/$defs/target" } }, ["target"]),
|
|
150
|
+
moveElement: operation("moveElement", { target: { $ref: "#/$defs/target" }, ...placement }, ["target"]),
|
|
151
|
+
insertTable: operation("insertTable", {
|
|
152
|
+
...placement,
|
|
153
|
+
rows: { $ref: "#/$defs/tableRows" },
|
|
154
|
+
columnWidths: {
|
|
155
|
+
type: "array",
|
|
156
|
+
minItems: 1,
|
|
157
|
+
maxItems: 20,
|
|
158
|
+
items: { type: "number", exclusiveMinimum: 0 },
|
|
159
|
+
},
|
|
160
|
+
}, ["rows"]),
|
|
161
|
+
setTableCell: operation("setTableCell", {
|
|
162
|
+
target: { $ref: "#/$defs/target" },
|
|
163
|
+
row: { $ref: "#/$defs/index" },
|
|
164
|
+
column: { $ref: "#/$defs/index" },
|
|
165
|
+
text: { $ref: "#/$defs/text" },
|
|
166
|
+
}, ["target", "row", "column", "text"]),
|
|
167
|
+
insertImage: operation("insertImage", {
|
|
168
|
+
...placement,
|
|
169
|
+
data: { "x-binary": true, type: "string", contentEncoding: "base64" },
|
|
170
|
+
mimeType: { enum: ["image/png", "image/jpeg"] },
|
|
171
|
+
size: { $ref: "#/$defs/size" },
|
|
172
|
+
}, ["data", "mimeType", "size"]),
|
|
173
|
+
};
|
|
174
|
+
/** Operations with an engine handler; grows as the tasks land. */
|
|
175
|
+
export const IMPLEMENTED_OPERATIONS = [
|
|
176
|
+
"replaceText",
|
|
177
|
+
"setTextStyle",
|
|
178
|
+
"setParagraphStyle",
|
|
179
|
+
"insertParagraph",
|
|
180
|
+
"deleteElement",
|
|
181
|
+
"moveElement",
|
|
182
|
+
"insertImage",
|
|
183
|
+
"insertTable",
|
|
184
|
+
"setTableCell",
|
|
185
|
+
];
|
|
186
|
+
export const docxOperationSchemas = Object.freeze({
|
|
187
|
+
format: "docx",
|
|
188
|
+
version: 1,
|
|
189
|
+
operations: Object.freeze(Object.fromEntries(IMPLEMENTED_OPERATIONS.map((name) => [name, all[name]]))),
|
|
190
|
+
});
|
|
191
|
+
/** Every schema, implemented or not, for the conformance test. */
|
|
192
|
+
export const docxOperationSchemaDrafts = all;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { DescribeOptions, DocumentDescription, EditCheckpoint, OutlineOptions, OutlineResult, TargetCandidate, TargetQuery, ToolCall, ToolCallOptions, ToolResult, ToolSet } from "../ai/types.js";
|
|
2
|
+
import type { EditSessionAccess, EditSessionCore } from "../engine.js";
|
|
3
|
+
import type { ApplyOptions, AssetOptions, EditFindOptions, EditOperation, EditReceipt, EditState, ElementQuery, HistoryOptions, OperationSchemaSet, PagePoint, PageRect, ReadItem, ReadOptions, ReadResult, SavedDocument, TextTarget } from "../types.js";
|
|
4
|
+
import type { DocxDeleteElementOperation, DocxEditSession, DocxElement, DocxFields, DocxInsertImageOperation, DocxInsertParagraphOperation, DocxInsertTableOperation, DocxMoveElementOperation, DocxOperation, DocxReplaceTextOperation, DocxRevision, DocxSaveOptions, DocxSetParagraphStyleOperation, DocxSetTableCellOperation, DocxSetTextStyleOperation } from "./types.js";
|
|
5
|
+
/** Per paragraph id (eight hex digits), the union of its runs per page. */
|
|
6
|
+
type Placement = ReadonlyMap<string, ReadonlyMap<number, PageRect>>;
|
|
7
|
+
export declare class DocxSession implements DocxEditSession {
|
|
8
|
+
#private;
|
|
9
|
+
readonly format: "docx";
|
|
10
|
+
constructor(core: EditSessionCore, access: EditSessionAccess);
|
|
11
|
+
get sessionId(): string;
|
|
12
|
+
get state(): EditState;
|
|
13
|
+
get schemas(): OperationSchemaSet;
|
|
14
|
+
apply(operations: readonly DocxOperation[], options?: ApplyOptions): Promise<EditReceipt>;
|
|
15
|
+
applyJson(operations: readonly EditOperation[], options?: ApplyOptions): Promise<EditReceipt>;
|
|
16
|
+
undo(options?: HistoryOptions): Promise<EditReceipt>;
|
|
17
|
+
redo(options?: HistoryOptions): Promise<EditReceipt>;
|
|
18
|
+
reset(options?: HistoryOptions): Promise<EditReceipt>;
|
|
19
|
+
save(options?: DocxSaveOptions): Promise<SavedDocument>;
|
|
20
|
+
markSaved(stateToken: string): void;
|
|
21
|
+
addAsset(data: Uint8Array, options?: AssetOptions): Promise<string>;
|
|
22
|
+
getElements(query?: ElementQuery, options?: ReadOptions): Promise<ReadResult<DocxElement>>;
|
|
23
|
+
getElement(id: string, options?: ReadOptions): Promise<ReadItem<DocxElement>>;
|
|
24
|
+
elementsAt(pageIndex: number, point: PagePoint, options?: ReadOptions): Promise<ReadResult<DocxElement>>;
|
|
25
|
+
findText(query: string, options?: EditFindOptions): Promise<ReadResult<TextTarget>>;
|
|
26
|
+
getOutline(options?: OutlineOptions): Promise<OutlineResult>;
|
|
27
|
+
describe(options?: DescribeOptions): Promise<ReadItem<DocumentDescription>>;
|
|
28
|
+
resolveTargets(query: TargetQuery, options?: ReadOptions): Promise<ReadResult<TargetCandidate>>;
|
|
29
|
+
createCheckpoint(label?: string): Promise<EditCheckpoint>;
|
|
30
|
+
listCheckpoints(): readonly EditCheckpoint[];
|
|
31
|
+
restoreCheckpoint(id: string, options?: HistoryOptions): Promise<EditReceipt>;
|
|
32
|
+
dropCheckpoint(id: string): void;
|
|
33
|
+
get tools(): ToolSet;
|
|
34
|
+
callTool(call: ToolCall, options?: ToolCallOptions): Promise<ToolResult>;
|
|
35
|
+
getRevisions(elementId: string, options?: ReadOptions): Promise<ReadResult<DocxRevision>>;
|
|
36
|
+
replaceText(fields: DocxFields<DocxReplaceTextOperation>, options?: ApplyOptions): Promise<EditReceipt>;
|
|
37
|
+
setTextStyle(fields: DocxFields<DocxSetTextStyleOperation>, options?: ApplyOptions): Promise<EditReceipt>;
|
|
38
|
+
setParagraphStyle(fields: DocxFields<DocxSetParagraphStyleOperation>, options?: ApplyOptions): Promise<EditReceipt>;
|
|
39
|
+
insertParagraph(fields: DocxFields<DocxInsertParagraphOperation>, options?: ApplyOptions): Promise<EditReceipt>;
|
|
40
|
+
deleteElement(fields: DocxFields<DocxDeleteElementOperation>, options?: ApplyOptions): Promise<EditReceipt>;
|
|
41
|
+
moveElement(fields: DocxFields<DocxMoveElementOperation>, options?: ApplyOptions): Promise<EditReceipt>;
|
|
42
|
+
insertTable(fields: DocxFields<DocxInsertTableOperation>, options?: ApplyOptions): Promise<EditReceipt>;
|
|
43
|
+
setTableCell(fields: DocxFields<DocxSetTableCellOperation>, options?: ApplyOptions): Promise<EditReceipt>;
|
|
44
|
+
insertImage(fields: DocxFields<DocxInsertImageOperation>, options?: ApplyOptions): Promise<EditReceipt>;
|
|
45
|
+
}
|
|
46
|
+
/** Joins the engine's elements with the runs' placement. */
|
|
47
|
+
export declare function placeElements(elements: readonly DocxElement[], placement: Placement): DocxElement[];
|
|
48
|
+
export {};
|