@docx-editor.dev/core 2.14.1 → 2.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -0
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +6 -5
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +16 -10
- package/dist/binding.js +1 -1
- package/dist/chunk-24APKZAN.cjs +11 -0
- package/dist/chunk-2YH4MSHX.cjs +2 -0
- package/dist/chunk-5Y7AADI6.js +1 -0
- package/dist/chunk-AREFLNUP.js +11 -0
- package/dist/chunk-AS7YZNQE.cjs +2 -0
- package/dist/chunk-AVGCKH6A.cjs +20 -0
- package/dist/chunk-CDYVDQRI.cjs +5 -0
- package/dist/chunk-FGBADUSK.cjs +1 -0
- package/dist/chunk-HOEWFH5U.cjs +1 -0
- package/dist/chunk-KFELX7CN.js +2 -0
- package/dist/{chunk-OKEDGR65.js → chunk-KXPVOPR5.js} +1 -1
- package/dist/chunk-LGFKIF4M.cjs +1 -0
- package/dist/chunk-M52QXFKI.js +1 -0
- package/dist/chunk-MNUKSXRO.js +1 -0
- package/dist/chunk-PBOIGBDO.js +2 -0
- package/dist/chunk-PMHGONET.cjs +1 -0
- package/dist/chunk-PXKZUTHX.cjs +2 -0
- package/dist/chunk-Q4AB7E4O.cjs +1 -0
- package/dist/chunk-QJYH6AYD.js +1 -0
- package/dist/chunk-QRC37MWG.cjs +20 -0
- package/dist/chunk-RJSB6RJ7.js +20 -0
- package/dist/chunk-SB54HLFJ.js +20 -0
- package/dist/chunk-VP7SDFCM.js +1 -0
- package/dist/chunk-XCESLTJL.js +2 -0
- package/dist/{chunk-KIAP7PFQ.cjs → chunk-YL4Q5LZP.cjs} +1 -1
- package/dist/chunk-Z4527AXR.js +5 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +4 -3
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +4 -3
- package/dist/contracts/editor.d.ts +7 -7
- package/dist/contracts/interaction.d.ts +7 -7
- package/dist/contracts/modules.d.ts +8 -7
- package/dist/{custom-node-writes-DntmaAVW.d.ts → custom-node-writes-C9ArIlJh.d.ts} +2 -2
- package/dist/{editor-a6VvsfYU.d.ts → editor-sRxrFJd8.d.ts} +29 -21
- package/dist/editor.cjs +1 -1
- package/dist/editor.d.ts +27 -58
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -0
- package/dist/export.d.ts +337 -0
- package/dist/export.js +2 -0
- package/dist/font-resolver-BYEHQGTw.d.ts +251 -0
- package/dist/headless-document-view-DELC4E5v.d.ts +134 -0
- package/dist/hf-references-DTrHkktY.d.ts +70 -0
- package/dist/{index-C5ZnSRkF.d.ts → index-C3Gvq4jN.d.ts} +55 -246
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +18 -16
- package/dist/index.js +1 -1
- package/dist/{shaped-measurer-CFPnXFs9.d.cts → layout-shaping-DoGR5cf8.d.ts} +86 -12
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +1106 -729
- package/dist/layout.js +1 -1
- package/dist/{note-properties-CDFiNXcD.d.ts → note-properties-DSe8igrz.d.ts} +2 -2
- package/dist/{omml-equation-BY49UOIF.d.ts → omml-equation-BpRmfDAf.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +6 -6
- package/dist/output.js +1 -1
- package/dist/{protocol-gOY5GA8K.d.cts → protocol-DZzKxH5r.d.ts} +18 -12
- package/dist/{review-items-CCS1h93f.d.ts → review-items-DYRx187i.d.ts} +2 -2
- package/dist/{review-reads-BjZYeMd4.d.ts → review-reads-LbGUdNzn.d.ts} +22 -25
- package/dist/{revision-projection-BeXVrSSV.d.ts → revision-projection-DHRJH48u.d.ts} +1 -1
- package/dist/{semantic-cell-selection-BK91NCCG.d.ts → semantic-cell-selection-BXVWCBYm.d.ts} +4 -4
- package/dist/{semantic-interaction-BmQ7h2cq.d.ts → semantic-interaction-DZsDmPg5.d.ts} +1 -1
- package/dist/{semantic-paint-WJD2KeG1.d.ts → semantic-paint-f7SqN4oW.d.ts} +2 -2
- package/dist/{semantic-records-BpozY7-j.d.cts → semantic-records-EIdwId-a.d.ts} +301 -205
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +15 -65
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-D6HzlPR4.d.ts → tree-op-types-egdarvH_.d.ts} +7 -3
- package/dist/{tree-package-fragment-CWFjgH6a.d.ts → tree-package-fragment-DjkH4ESI.d.ts} +4 -70
- package/dist/{tree-session-contract-B2HfGt79.d.ts → tree-session-contract-CGOOgPjW.d.ts} +29 -23
- package/dist/{tree-store-APgWx6qn.d.ts → tree-store-DKJB0IcA.d.ts} +2 -2
- package/package.json +7 -2
- package/dist/automation.d.cts +0 -82
- package/dist/binding.d.cts +0 -153
- package/dist/chunk-2PIHW2QM.cjs +0 -1
- package/dist/chunk-2QTY5S6T.js +0 -1
- package/dist/chunk-4Z5MODAE.cjs +0 -2
- package/dist/chunk-5TKAPFZT.cjs +0 -2
- package/dist/chunk-DRQHIQ4R.cjs +0 -1
- package/dist/chunk-F2K6SDHA.cjs +0 -20
- package/dist/chunk-FBA57EUJ.js +0 -2
- package/dist/chunk-KTAQ7BRQ.js +0 -20
- package/dist/chunk-LBAHXZCU.cjs +0 -5
- package/dist/chunk-MCDUQYWP.js +0 -5
- package/dist/chunk-MQP26KCF.js +0 -1
- package/dist/chunk-NDJGSR6M.cjs +0 -19
- package/dist/chunk-NJNFJPGB.cjs +0 -11
- package/dist/chunk-O5M4CR4P.cjs +0 -2
- package/dist/chunk-UKUOZXUD.js +0 -19
- package/dist/chunk-VQ4R5LTU.js +0 -2
- package/dist/chunk-ZBEJHJN2.js +0 -11
- package/dist/chunk-ZVTW7RGD.js +0 -2
- package/dist/collaboration/replication.d.cts +0 -216
- package/dist/collaboration.d.cts +0 -176
- package/dist/contracts/document.d.cts +0 -273
- package/dist/contracts/editor.d.cts +0 -10
- package/dist/contracts/interaction.d.cts +0 -10
- package/dist/contracts/modules.d.cts +0 -130
- package/dist/contracts/types.d.cts +0 -562
- package/dist/custom-node-writes-C46r3_5O.d.cts +0 -310
- package/dist/document-properties-D6Ahr8D6.d.cts +0 -28
- package/dist/document-properties-D6Ahr8D6.d.ts +0 -28
- package/dist/editor-AJ06hyyg.d.cts +0 -1994
- package/dist/editor.d.cts +0 -393
- package/dist/failure-BnGjoXf0.d.cts +0 -64
- package/dist/index-Cbw4lkOt.d.cts +0 -3391
- package/dist/index.d.cts +0 -23
- package/dist/layout.d.cts +0 -2486
- package/dist/note-properties-Y6qYh2Hv.d.cts +0 -67
- package/dist/omml-equation-DB8d-jCq.d.cts +0 -84
- package/dist/output.d.cts +0 -74
- package/dist/protocol-BsmQgblT.d.ts +0 -1358
- package/dist/review-items-CaAkgi5s.d.cts +0 -360
- package/dist/review-reads-DEsV0OOW.d.cts +0 -163
- package/dist/revision-projection-DXbrfNGD.d.cts +0 -156
- package/dist/semantic-cell-selection-BMhku3B1.d.cts +0 -451
- package/dist/semantic-interaction-DUAnxbgf.d.cts +0 -160
- package/dist/semantic-paint-DufNL1Zr.d.cts +0 -247
- package/dist/semantic-records-92UnKeU_.d.ts +0 -2821
- package/dist/shaped-measurer-BWbindlI.d.ts +0 -168
- package/dist/store.d.cts +0 -2500
- package/dist/tree-op-types-BUulYD5y.d.cts +0 -3099
- package/dist/tree-package-fragment-Dhyw7oPm.d.cts +0 -732
- package/dist/tree-session-contract-BY9xd7s_.d.cts +0 -613
- package/dist/tree-store-DEEQ9wz_.d.cts +0 -416
|
@@ -1,273 +0,0 @@
|
|
|
1
|
-
import { DocxDocument, ExecResult, ContentControlType, DocTarget, RunFormatting, Extent, InsertableContentControlType, ContainerRef, ContentControlFilter, DocRange, Revision, DocComment, StyleDefinitions } from './types.cjs';
|
|
2
|
-
export { Block, ColorValue, ContentControl, DocAnchor, DocAnchorRange, DocLocation, DocumentBody, ExecErrorCode, HeaderFooterSet, IndentFormatting, Paragraph, ParagraphFlags, ParagraphTabStop, RevisionType, Section, SectionProperties, StyleDefinition, Table, Theme, ThemeColorScheme } from './types.cjs';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* `@docx-editor.dev/core/contracts/document` — the document-level edit and query vocabulary.
|
|
6
|
-
*
|
|
7
|
-
* The subset that means something without a live editor: what an automation host or an LLM tool
|
|
8
|
-
* can ask for and change.
|
|
9
|
-
*
|
|
10
|
-
* A CONTRACT module, not a barrel. `contracts/editor` builds the `Editor` command and query
|
|
11
|
-
* surfaces on top of these, so they cannot live in the package root: the root re-exports
|
|
12
|
-
* runtime from `../editor`, and a contract importing the root would invert the dependency —
|
|
13
|
-
* safe today only because that import is type-only, and one accidental value import away from
|
|
14
|
-
* pulling the painted engine into a server bundle.
|
|
15
|
-
*
|
|
16
|
-
* @packageDocumentation
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* The document-executable edit vocabulary.
|
|
22
|
-
*
|
|
23
|
-
* An interface rather than a closed union so extensions can widen it by
|
|
24
|
-
* declaration merging. A sealed union cannot be extended by a plugin, and the
|
|
25
|
-
* runtime dispatch is already registry-backed.
|
|
26
|
-
*/
|
|
27
|
-
interface DocEdits {
|
|
28
|
-
insertText: {
|
|
29
|
-
target: DocTarget;
|
|
30
|
-
text: string;
|
|
31
|
-
};
|
|
32
|
-
replaceText: {
|
|
33
|
-
target: DocTarget;
|
|
34
|
-
text: string;
|
|
35
|
-
};
|
|
36
|
-
deleteText: {
|
|
37
|
-
target: DocTarget;
|
|
38
|
-
};
|
|
39
|
-
applyFormatting: {
|
|
40
|
-
target: DocTarget;
|
|
41
|
-
marks: RunFormatting;
|
|
42
|
-
};
|
|
43
|
-
setParagraphStyle: {
|
|
44
|
-
target: DocTarget;
|
|
45
|
-
styleId: string;
|
|
46
|
-
};
|
|
47
|
-
insertTable: {
|
|
48
|
-
target: DocTarget;
|
|
49
|
-
rows: number;
|
|
50
|
-
cols: number;
|
|
51
|
-
};
|
|
52
|
-
insertImage: {
|
|
53
|
-
target: DocTarget;
|
|
54
|
-
data: Uint8Array;
|
|
55
|
-
extent?: Extent;
|
|
56
|
-
};
|
|
57
|
-
insertHyperlink: {
|
|
58
|
-
target: DocTarget;
|
|
59
|
-
href: string;
|
|
60
|
-
text?: string;
|
|
61
|
-
};
|
|
62
|
-
removeHyperlink: {
|
|
63
|
-
target: DocTarget;
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* `'section'` is Word's Next Page break; `'sectionContinuous'` keeps the new section on
|
|
67
|
-
* the sheet the previous one ended, which is how a mid-page column or margin change is
|
|
68
|
-
* authored. `'column'` belongs to the multi-column lane and is refused for now.
|
|
69
|
-
*/
|
|
70
|
-
insertBreak: {
|
|
71
|
-
target: DocTarget;
|
|
72
|
-
kind: 'page' | 'column' | 'line' | 'section' | 'sectionContinuous';
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* Word's Increase/Decrease Indent.
|
|
76
|
-
*
|
|
77
|
-
* A numbered or bulleted paragraph changes LEVEL, so its marker re-resolves from the
|
|
78
|
-
* numbering definition — a bullet becomes a hollow circle, a `1.` becomes an `a.`.
|
|
79
|
-
* Every other paragraph moves its left indent by one default tab stop.
|
|
80
|
-
*/
|
|
81
|
-
adjustIndent: {
|
|
82
|
-
target: DocTarget;
|
|
83
|
-
direction: 'increase' | 'decrease';
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Word's Bullets and Numbering.
|
|
87
|
-
*
|
|
88
|
-
* Turns the selection into a list, or takes it out of one when it already is. The
|
|
89
|
-
* definition is created on first use, `numbering.xml` included.
|
|
90
|
-
*/
|
|
91
|
-
toggleList: {
|
|
92
|
-
target: DocTarget;
|
|
93
|
-
kind: 'bullet' | 'ordered';
|
|
94
|
-
};
|
|
95
|
-
splitParagraph: {
|
|
96
|
-
target: DocTarget;
|
|
97
|
-
};
|
|
98
|
-
mergeParagraphs: {
|
|
99
|
-
target: DocTarget;
|
|
100
|
-
};
|
|
101
|
-
setVariable: {
|
|
102
|
-
name: string;
|
|
103
|
-
value: string;
|
|
104
|
-
};
|
|
105
|
-
applyVariables: {
|
|
106
|
-
values: Record<string, string>;
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* Authored family. `author` is required: tracked-ness is verb identity, not a
|
|
110
|
-
* boolean flag, so there is no global trackChanges toggle to forget.
|
|
111
|
-
*/
|
|
112
|
-
proposeReplacement: {
|
|
113
|
-
target: DocTarget;
|
|
114
|
-
replaceWith: string;
|
|
115
|
-
author: string;
|
|
116
|
-
};
|
|
117
|
-
proposeInsertion: {
|
|
118
|
-
target: DocTarget;
|
|
119
|
-
text: string;
|
|
120
|
-
author: string;
|
|
121
|
-
};
|
|
122
|
-
proposeDeletion: {
|
|
123
|
-
target: DocTarget;
|
|
124
|
-
author: string;
|
|
125
|
-
};
|
|
126
|
-
addComment: {
|
|
127
|
-
target: DocTarget;
|
|
128
|
-
text: string;
|
|
129
|
-
author: string;
|
|
130
|
-
};
|
|
131
|
-
replyComment: {
|
|
132
|
-
commentId: string;
|
|
133
|
-
text: string;
|
|
134
|
-
author: string;
|
|
135
|
-
};
|
|
136
|
-
resolveComment: {
|
|
137
|
-
commentId: string;
|
|
138
|
-
};
|
|
139
|
-
acceptRevision: {
|
|
140
|
-
id: number;
|
|
141
|
-
part?: 'body' | 'footnote' | 'endnote';
|
|
142
|
-
noteId?: number;
|
|
143
|
-
};
|
|
144
|
-
rejectRevision: {
|
|
145
|
-
id: number;
|
|
146
|
-
part?: 'body' | 'footnote' | 'endnote';
|
|
147
|
-
noteId?: number;
|
|
148
|
-
};
|
|
149
|
-
acceptAllRevisions: Record<never, never>;
|
|
150
|
-
rejectAllRevisions: Record<never, never>;
|
|
151
|
-
/**
|
|
152
|
-
* Author a NEW control over the addressed span.
|
|
153
|
-
*
|
|
154
|
-
* A RANGE becomes a wrapper around the characters that are already there. A COLLAPSED
|
|
155
|
-
* position inserts an empty control showing its type's prompt, which is Word's own gesture
|
|
156
|
-
* and the one a template host reaches for: the first character typed replaces the prompt
|
|
157
|
-
* whole, so nothing has to detect and undo text the caller never asked for.
|
|
158
|
-
*
|
|
159
|
-
* `title` is Word's `w:alias` — the label a user sees — and `tag` is `w:tag`, the
|
|
160
|
-
* machine-readable identity a host looks the control back up by. Named as the automation
|
|
161
|
-
* protocol names them, so a caller who reaches for both surfaces writes one vocabulary.
|
|
162
|
-
*
|
|
163
|
-
* One paragraph only. A control that starts in one paragraph and ends in another is a BLOCK
|
|
164
|
-
* wrapper over both, a different element than the inline one this authors — refused rather
|
|
165
|
-
* than guessed, so a caller learns which they asked for.
|
|
166
|
-
*/
|
|
167
|
-
insertContentControl: {
|
|
168
|
-
target: DocTarget;
|
|
169
|
-
subtype: InsertableContentControlType;
|
|
170
|
-
tag?: string;
|
|
171
|
-
title?: string;
|
|
172
|
-
};
|
|
173
|
-
setContentControlValue: {
|
|
174
|
-
target: DocTarget;
|
|
175
|
-
value: string;
|
|
176
|
-
};
|
|
177
|
-
removeContentControl: {
|
|
178
|
-
target: DocTarget;
|
|
179
|
-
};
|
|
180
|
-
addRepeatingSectionItem: {
|
|
181
|
-
target: DocTarget;
|
|
182
|
-
index?: number;
|
|
183
|
-
};
|
|
184
|
-
removeRepeatingSectionItem: {
|
|
185
|
-
target: DocTarget;
|
|
186
|
-
index: number;
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* One edit, as a discriminated union derived from {@link DocEdits}.
|
|
191
|
-
*
|
|
192
|
-
* Adding a key to `DocEdits` — including by declaration merging from a plugin — widens this
|
|
193
|
-
* automatically, so the union never drifts from the vocabulary it is built out of.
|
|
194
|
-
*/
|
|
195
|
-
type DocEdit = {
|
|
196
|
-
[K in keyof DocEdits]: {
|
|
197
|
-
type: K;
|
|
198
|
-
} & DocEdits[K];
|
|
199
|
-
}[keyof DocEdits];
|
|
200
|
-
/**
|
|
201
|
-
* What applying a batch of edits produced: the new document, and a per-edit verdict.
|
|
202
|
-
*
|
|
203
|
-
* `results` is positionally aligned with the input, so an edit that failed is identified by its
|
|
204
|
-
* index rather than by anything the caller has to correlate.
|
|
205
|
-
*/
|
|
206
|
-
interface ApplyResult {
|
|
207
|
-
doc: DocxDocument;
|
|
208
|
-
/** One per edit, positionally aligned with the input. */
|
|
209
|
-
results: ExecResult[];
|
|
210
|
-
}
|
|
211
|
-
/**
|
|
212
|
-
* The document-readable query vocabulary, keyed identically to {@link DocQueryResults}.
|
|
213
|
-
*
|
|
214
|
-
* An interface rather than a closed union for the same reason {@link DocEdits} is: an extension
|
|
215
|
-
* widens it by declaration merging, and the runtime dispatch is registry-backed.
|
|
216
|
-
*/
|
|
217
|
-
interface DocQueries {
|
|
218
|
-
paragraphs: {
|
|
219
|
-
container?: ContainerRef;
|
|
220
|
-
};
|
|
221
|
-
findText: {
|
|
222
|
-
text: string;
|
|
223
|
-
container?: ContainerRef;
|
|
224
|
-
};
|
|
225
|
-
contentControls: {
|
|
226
|
-
filter?: ContentControlFilter;
|
|
227
|
-
};
|
|
228
|
-
revisions: {
|
|
229
|
-
part?: 'body' | 'footnote' | 'endnote';
|
|
230
|
-
};
|
|
231
|
-
comments: {
|
|
232
|
-
resolved?: boolean;
|
|
233
|
-
};
|
|
234
|
-
styles: Record<never, never>;
|
|
235
|
-
variables: Record<never, never>;
|
|
236
|
-
}
|
|
237
|
-
/** One query, as a discriminated union derived from {@link DocQueries}. */
|
|
238
|
-
type DocQuery = {
|
|
239
|
-
[K in keyof DocQueries]: {
|
|
240
|
-
type: K;
|
|
241
|
-
} & DocQueries[K];
|
|
242
|
-
}[keyof DocQueries];
|
|
243
|
-
/** What each query returns. Keyed identically to `DocQueries`. */
|
|
244
|
-
interface DocQueryResults {
|
|
245
|
-
paragraphs: readonly ParagraphSummary[];
|
|
246
|
-
findText: readonly DocRange[];
|
|
247
|
-
contentControls: readonly ContentControlSummary[];
|
|
248
|
-
revisions: readonly Revision[];
|
|
249
|
-
comments: readonly DocComment[];
|
|
250
|
-
styles: StyleDefinitions;
|
|
251
|
-
variables: Readonly<Record<string, string>>;
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* A paragraph reduced to what a listing needs: its stable handle, its text, and its style.
|
|
255
|
-
*
|
|
256
|
-
* `paraId` is what a follow-up edit addresses, so a summary without one names a paragraph the
|
|
257
|
-
* file gave no `w14:paraId` and that a `DocAnchor` cannot reach.
|
|
258
|
-
*/
|
|
259
|
-
interface ParagraphSummary {
|
|
260
|
-
readonly paraId?: string;
|
|
261
|
-
readonly text: string;
|
|
262
|
-
readonly styleId?: string;
|
|
263
|
-
}
|
|
264
|
-
/** A content control reduced to what a listing needs: its identity, kind, and lock state. */
|
|
265
|
-
interface ContentControlSummary {
|
|
266
|
-
readonly id: string;
|
|
267
|
-
readonly tag?: string;
|
|
268
|
-
readonly alias?: string;
|
|
269
|
-
readonly controlType: ContentControlType;
|
|
270
|
-
readonly locked?: boolean;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export { type ApplyResult, ContainerRef, ContentControlFilter, type ContentControlSummary, ContentControlType, DocComment, type DocEdit, type DocEdits, type DocQueries, type DocQuery, type DocQueryResults, DocRange, DocTarget, DocxDocument, ExecResult, Extent, InsertableContentControlType, type ParagraphSummary, Revision, RunFormatting, StyleDefinitions };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { ContentControlSummary, DocEdits, DocQueries, DocQueryResults, ParagraphSummary } from './document.cjs';
|
|
2
|
-
export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from '../review-items-CaAkgi5s.cjs';
|
|
3
|
-
export { A as AuthoredNoteNumbering, C as CanResult, u as DocumentChange, w as DocumentEditingMode, x as DocumentHandle, D as DocumentSource, n as Editor, b as EditorCommand, y as EditorCommandShape, z as EditorCommands, B as EditorError, G as EditorEvents, E as EditorFontError, H as EditorFontErrorCode, J as EditorFormatPainterCommands, K as EditorHeaderFooterCommands, L as EditorNoteCommands, M as EditorPosition, N as EditorQueries, O as EditorQuery, P as EditorQueryResults, Q as EditorScope, R as EditorSelection, a as EditorSnapshot, F as FontConfiguration, m as FontFaceRequest, k as FontSource, l as FontSourceSubstitution, U as FormatPainterLevel, W as FormatPainterMode, o as FormatPainterSurfaceState, X as FurnitureVariant, Y as HeaderFooterSlotArgs, _ as HeaderFooterState, $ as HyperlinkInfo, I as ImageContext, c as ImageCropPercent, a0 as InteractionAffinity, a1 as InteractionOutcome, a2 as InteractionOutcomeCode, a3 as NoteKind, a4 as NotePropertiesSide, a5 as NotePropertiesState, a6 as PageSetup, a7 as ResolvedNoteNumbering, a8 as ReviewActivationOptions, a9 as ReviewCommentPlacement, aa as ReviewCustomPlacement, ab as ReviewItemPlacement, ac as ReviewItemPlacementBase, ad as ReviewItemQuery, ae as ReviewRevisionPlacement, S as SelectedImageState, af as SemanticIdentity, ag as SemanticTarget, p as TableBorderEdgeTarget, q as TableBorderSpec, r as TableBorderStyle, ah as TableBorderTarget, ai as TableCellVerticalAlignment, aj as TableColumnDividerResizeTarget, ak as TableColumnOccurrenceTarget, t as TableContext, al as TableRightEdgeResizeTarget, am as TableRowOccurrenceTarget, an as TextMatch, T as TrackedChangeFilterMode, e as TrackedChangePredicate, V as ViewScope, ao as ZoomFitTarget, Z as ZoomMode } from '../editor-AJ06hyyg.cjs';
|
|
4
|
-
export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-DUAnxbgf.cjs';
|
|
5
|
-
export { z as DrawingHorizontalReferenceFrame, D as DrawingKind, w as DrawingLocks, v as DrawingPositionInput, A as DrawingVerticalReferenceFrame, x as ImageResourceState, u as ImageWrapTarget, P as PreservedImageMime, t as RenderableImageMime, R as RevisionAddress, y as SupportedImageMime, V as ValidatedImageBytesHandle, B as VectorImageMime } from '../tree-op-types-BUulYD5y.cjs';
|
|
6
|
-
export { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, InsertableContentControlType, NumberingRef, PageMargins, Paragraph, ParagraphDisagreements, ParagraphFlags, ParagraphFormatCommand, ParagraphTabStop, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, SelectionPin, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark } from './types.cjs';
|
|
7
|
-
import '../failure-BnGjoXf0.cjs';
|
|
8
|
-
import '../semantic-records-BpozY7-j.cjs';
|
|
9
|
-
import '../revision-projection-DXbrfNGD.cjs';
|
|
10
|
-
import '../omml-equation-DB8d-jCq.cjs';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export { Q as EditorScope, a0 as InteractionAffinity, a1 as InteractionOutcome, a2 as InteractionOutcomeCode, af as SemanticIdentity, ag as SemanticTarget, V as ViewScope } from '../editor-AJ06hyyg.cjs';
|
|
2
|
-
import './document.cjs';
|
|
3
|
-
import './types.cjs';
|
|
4
|
-
import '../review-items-CaAkgi5s.cjs';
|
|
5
|
-
import '../tree-op-types-BUulYD5y.cjs';
|
|
6
|
-
import '../semantic-interaction-DUAnxbgf.cjs';
|
|
7
|
-
import '../semantic-records-BpozY7-j.cjs';
|
|
8
|
-
import '../revision-projection-DXbrfNGD.cjs';
|
|
9
|
-
import '../omml-equation-DB8d-jCq.cjs';
|
|
10
|
-
import '../failure-BnGjoXf0.cjs';
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { O as OoxmlPart } from '../tree-op-types-BUulYD5y.cjs';
|
|
2
|
-
export { R as RevisionAddress } from '../tree-op-types-BUulYD5y.cjs';
|
|
3
|
-
import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-items-CaAkgi5s.cjs';
|
|
4
|
-
export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-items-CaAkgi5s.cjs';
|
|
5
|
-
import { CollaborationModuleContribution } from '../collaboration.cjs';
|
|
6
|
-
import { R as RevisionDisplayMode } from '../revision-projection-DXbrfNGD.cjs';
|
|
7
|
-
import './types.cjs';
|
|
8
|
-
import '../tree-package-fragment-Dhyw7oPm.cjs';
|
|
9
|
-
import '../tree-store-DEEQ9wz_.cjs';
|
|
10
|
-
import '../collaboration/replication.cjs';
|
|
11
|
-
import '../failure-BnGjoXf0.cjs';
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* `@docx-editor.dev/core/contracts/modules` — the `EditorModule` seam.
|
|
15
|
-
*
|
|
16
|
-
* How a paid or optional capability contributes to the engine without the free tier importing
|
|
17
|
-
* it: the review module and custom nodes both arrive through here, and their absence leaves the
|
|
18
|
-
* corresponding chrome disabled with the engine's own reason.
|
|
19
|
-
*
|
|
20
|
-
* NOT a plugin system. The shape is closed: every contribution point is named
|
|
21
|
-
* here, core iterates registered modules at its existing dispatch points, and
|
|
22
|
-
* core never imports a capability package. A capability absent from this file
|
|
23
|
-
* is not extendable from outside — deliberately, so the one-pipeline principle
|
|
24
|
-
* survives the packaging boundary.
|
|
25
|
-
* The free engine behaves identically with an empty registry: documents
|
|
26
|
-
* round-trip losslessly, revisions render in their final-state projection, and
|
|
27
|
-
* the review chrome slots stay disabled with the engine's own reason.
|
|
28
|
-
*
|
|
29
|
-
* @packageDocumentation
|
|
30
|
-
* @public
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Derives the review queue — every pending revision decision and comment
|
|
35
|
-
* thread — from one story part plus its comment parts. Implemented by the pro
|
|
36
|
-
* review module; the free engine has no implementation and reports an empty
|
|
37
|
-
* queue.
|
|
38
|
-
*
|
|
39
|
-
* @public
|
|
40
|
-
*/
|
|
41
|
-
type CollectReviewItems = (input: ReviewModelInput) => readonly ReviewItem[];
|
|
42
|
-
/**
|
|
43
|
-
* What a review module contributes: the queue derivation, and the revision
|
|
44
|
-
* display modes the editor may enter beyond the free tier's final-state
|
|
45
|
-
* projection.
|
|
46
|
-
*
|
|
47
|
-
* @public
|
|
48
|
-
*/
|
|
49
|
-
interface ReviewModuleContribution {
|
|
50
|
-
/**
|
|
51
|
-
* Display modes this module unlocks (the free engine renders `proposed` only).
|
|
52
|
-
*
|
|
53
|
-
* Currently DECLARATIVE: any registered review module restores the layout
|
|
54
|
-
* default (`all-markup`), and no runtime mode switch exists yet. The list is
|
|
55
|
-
* carried so the future `setRevisionDisplayMode` command can validate against
|
|
56
|
-
* it without a breaking module-shape change.
|
|
57
|
-
*/
|
|
58
|
-
readonly displayModes: readonly RevisionDisplayMode[];
|
|
59
|
-
/** The review queue derivation. */
|
|
60
|
-
readonly collectReviewItems: CollectReviewItems;
|
|
61
|
-
/**
|
|
62
|
-
* Revisions wholly inside one paragraph — for the conservative local review
|
|
63
|
-
* patch after a text-local body edit.
|
|
64
|
-
*/
|
|
65
|
-
readonly revisionItemsOfParagraph: (part: OoxmlPart, paragraphId: string) => readonly ReviewRevisionItem[];
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* One registered capability module. Registration is construction-time
|
|
70
|
-
* (`createDocxEditor({ modules })`) and immutable for the instance's lifetime.
|
|
71
|
-
*
|
|
72
|
-
* @public
|
|
73
|
-
*/
|
|
74
|
-
interface EditorModule {
|
|
75
|
-
/** Diagnostic identity (`'review'`, `'custom-nodes'`); not a dispatch key. */
|
|
76
|
-
readonly id: string;
|
|
77
|
-
/** Review capability: queue derivation, commands gate, display modes. */
|
|
78
|
-
readonly review?: ReviewModuleContribution;
|
|
79
|
-
/**
|
|
80
|
-
* Collaboration replica. Absent, the editor stays single-user: local undo
|
|
81
|
-
* stays the authority, and `snapshot().collaborationStatus` is `'inactive'`.
|
|
82
|
-
*/
|
|
83
|
-
readonly collaboration?: CollaborationModuleContribution;
|
|
84
|
-
/**
|
|
85
|
-
* Custom inline node definitions. Reserved: the definition shape lands with
|
|
86
|
-
* the custom-nodes lane; the registry carries them opaquely until then.
|
|
87
|
-
*/
|
|
88
|
-
readonly customNodes?: readonly unknown[];
|
|
89
|
-
/**
|
|
90
|
-
* customXml payload namespaces this module OWNS, swept for orphans when a document opens.
|
|
91
|
-
*
|
|
92
|
-
* A payload lives in a customXml data part, and Word will not delete one when a user deletes
|
|
93
|
-
* the control bound to it — nothing in OOXML asks it to. So a document can arrive holding
|
|
94
|
-
* payloads for chips that no longer exist, and reconciling against what the story actually
|
|
95
|
-
* binds is the only thing that collects them.
|
|
96
|
-
*
|
|
97
|
-
* The claim is what keeps the sweep off other people's stores: Word's own Cover Page
|
|
98
|
-
* Properties store rides in most templates, and a sweep that walked every customXml part
|
|
99
|
-
* would be deleting from it on the strength of a name collision. A namespace no module names
|
|
100
|
-
* is never touched.
|
|
101
|
-
*/
|
|
102
|
-
readonly customNodePayloadNamespaces?: readonly string[];
|
|
103
|
-
/**
|
|
104
|
-
* Told when the recognition pass finds something wrong with a node in THIS editor's document.
|
|
105
|
-
*
|
|
106
|
-
* Carried per module rather than kept by the capability package, so two editors on one page
|
|
107
|
-
* hear only their own documents and a detached editor's listener goes with it. The shape is
|
|
108
|
-
* opaque here for the same reason `customNodes` is: what a diagnostic means belongs to the
|
|
109
|
-
* package that raised it.
|
|
110
|
-
*/
|
|
111
|
-
readonly onCustomNodeDiagnostic?: (diagnostic: unknown) => void;
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* The resolved registry the editor instance holds: at most one review
|
|
115
|
-
* contribution and at most one collaboration contribution (first registration
|
|
116
|
-
* wins for each), all custom node definitions in registration order.
|
|
117
|
-
*/
|
|
118
|
-
interface EditorModuleRegistry {
|
|
119
|
-
readonly review: ReviewModuleContribution | null;
|
|
120
|
-
readonly collaboration: CollaborationModuleContribution | null;
|
|
121
|
-
readonly customNodes: readonly unknown[];
|
|
122
|
-
/** Every claimed payload namespace, deduplicated, in registration order. */
|
|
123
|
-
readonly customNodePayloadNamespaces: readonly string[];
|
|
124
|
-
/** Every registered diagnostic listener, in registration order. */
|
|
125
|
-
readonly customNodeDiagnostics: readonly ((diagnostic: unknown) => void)[];
|
|
126
|
-
}
|
|
127
|
-
/** Resolve construction-time modules into the registry the instance dispatches over. */
|
|
128
|
-
declare function resolveEditorModules(modules: readonly EditorModule[] | undefined): EditorModuleRegistry;
|
|
129
|
-
|
|
130
|
-
export { CollaborationModuleContribution, type CollectReviewItems, type EditorModule, type EditorModuleRegistry, OoxmlPart, ReviewItem, ReviewModelInput, type ReviewModuleContribution, ReviewRevisionItem, RevisionDisplayMode, resolveEditorModules };
|