@docx-editor.dev/core 2.10.0 → 2.11.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.
Files changed (136) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.d.cts +14 -5
  3. package/dist/automation.d.ts +14 -5
  4. package/dist/automation.js +1 -1
  5. package/dist/binding.cjs +1 -1
  6. package/dist/binding.d.cts +12 -11
  7. package/dist/binding.d.ts +12 -11
  8. package/dist/binding.js +1 -1
  9. package/dist/chunk-34BNQUD4.js +10 -0
  10. package/dist/chunk-5AVHO75P.cjs +19 -0
  11. package/dist/chunk-6HMSC7UV.js +2 -0
  12. package/dist/chunk-6JIJOZDW.js +1 -0
  13. package/dist/chunk-76Y3Y45J.cjs +2 -0
  14. package/dist/chunk-BP7ANXGA.js +1 -0
  15. package/dist/chunk-BTQKU64Q.cjs +1 -0
  16. package/dist/chunk-CRZR6K5Z.js +19 -0
  17. package/dist/chunk-D5EHDHYV.js +1 -0
  18. package/dist/chunk-EJATEGJZ.cjs +1 -0
  19. package/dist/{chunk-PSZH2VXP.js → chunk-GOEBQ26R.js} +1 -1
  20. package/dist/chunk-GRDFEH5Q.cjs +2 -0
  21. package/dist/chunk-GWV65NQW.cjs +10 -0
  22. package/dist/chunk-GXLZCXEH.js +2 -0
  23. package/dist/chunk-JUQOPVSK.cjs +2 -0
  24. package/dist/chunk-LAETEBHD.js +1 -0
  25. package/dist/chunk-M6Z3KFXM.cjs +5 -0
  26. package/dist/{chunk-YMYCPY5Y.cjs → chunk-OHJQ7GPZ.cjs} +1 -1
  27. package/dist/chunk-UQFOYZJO.cjs +18 -0
  28. package/dist/chunk-WPQMPHNR.cjs +1 -0
  29. package/dist/chunk-WXQ245MQ.js +18 -0
  30. package/dist/chunk-WZHIFNSU.js +5 -0
  31. package/dist/chunk-X7A5XART.js +2 -0
  32. package/dist/chunk-ZKWRCLT2.cjs +1 -0
  33. package/dist/collaboration/replication.cjs +1 -0
  34. package/dist/collaboration/replication.d.cts +216 -0
  35. package/dist/collaboration/replication.d.ts +216 -0
  36. package/dist/collaboration/replication.js +1 -0
  37. package/dist/collaboration.cjs +1 -0
  38. package/dist/collaboration.d.cts +176 -0
  39. package/dist/collaboration.d.ts +176 -0
  40. package/dist/collaboration.js +1 -0
  41. package/dist/contracts/editor.cjs +1 -1
  42. package/dist/contracts/editor.d.cts +8 -9
  43. package/dist/contracts/editor.d.ts +8 -9
  44. package/dist/contracts/editor.js +1 -1
  45. package/dist/contracts/interaction.d.cts +8 -9
  46. package/dist/contracts/interaction.d.ts +8 -9
  47. package/dist/contracts/modules.cjs +1 -1
  48. package/dist/contracts/modules.d.cts +21 -8
  49. package/dist/contracts/modules.d.ts +21 -8
  50. package/dist/contracts/modules.js +1 -1
  51. package/dist/custom-node-writes-CwkYRw3V.d.cts +310 -0
  52. package/dist/custom-node-writes-JfTn-Sy6.d.ts +310 -0
  53. package/dist/document-properties-D6Ahr8D6.d.cts +28 -0
  54. package/dist/document-properties-D6Ahr8D6.d.ts +28 -0
  55. package/dist/{editor-C0my6Uta.d.ts → editor-BogcVHXk.d.ts} +145 -49
  56. package/dist/{editor-CwzY2Hcg.d.cts → editor-C8edZgy5.d.cts} +145 -49
  57. package/dist/editor.cjs +1 -1
  58. package/dist/editor.css +1 -7299
  59. package/dist/editor.d.cts +26 -25
  60. package/dist/editor.d.ts +26 -25
  61. package/dist/editor.js +1 -1
  62. package/dist/failure-BnGjoXf0.d.cts +64 -0
  63. package/dist/failure-BnGjoXf0.d.ts +64 -0
  64. package/dist/{index-kID8Ymkp.d.ts → index-BNv-ZLQP.d.ts} +262 -81
  65. package/dist/{index-nLFwo_17.d.cts → index-Dn0lOp9Z.d.cts} +262 -81
  66. package/dist/index.cjs +1 -1
  67. package/dist/index.d.cts +19 -18
  68. package/dist/index.d.ts +19 -18
  69. package/dist/index.js +1 -1
  70. package/dist/layout.cjs +1 -1
  71. package/dist/layout.d.cts +71 -53
  72. package/dist/layout.d.ts +71 -53
  73. package/dist/layout.js +1 -1
  74. package/dist/{note-properties-jvnw_DGG.d.ts → note-properties-BmoSdyKS.d.ts} +1 -1
  75. package/dist/{note-properties-CQlxjic_.d.cts → note-properties-BvGfHk5e.d.cts} +1 -1
  76. package/dist/{omml-equation-Dd3mBep-.d.ts → omml-equation-Ciq5rgb7.d.ts} +1 -1
  77. package/dist/{omml-equation-BD-LsmWE.d.cts → omml-equation-CqQOt_dD.d.cts} +1 -1
  78. package/dist/output.cjs +1 -1
  79. package/dist/output.d.cts +6 -8
  80. package/dist/output.d.ts +6 -8
  81. package/dist/output.js +1 -1
  82. package/dist/{protocol-UuZOcOp7.d.cts → protocol-BB-WP3zk.d.cts} +2 -2
  83. package/dist/{protocol-C7ahrdUx.d.ts → protocol-Ckl7hWsv.d.ts} +2 -2
  84. package/dist/{review-items-Dw-8a6Ie.d.ts → review-items-BdeLNRi2.d.cts} +1 -2
  85. package/dist/{review-items-CwixiHNe.d.cts → review-items-CkYyXhXM.d.ts} +1 -2
  86. package/dist/{review-reads-BqkiJTeR.d.cts → review-reads-BOLSBm5w.d.cts} +2 -2
  87. package/dist/{review-reads-C0u-IKEA.d.ts → review-reads-Crf0Xn42.d.ts} +2 -2
  88. package/dist/{revision-projection-CILpvv4M.d.ts → revision-projection-Ae2CWa8E.d.ts} +1 -1
  89. package/dist/{revision-projection-Cc4wz30g.d.cts → revision-projection-C2S8PSQm.d.cts} +1 -1
  90. package/dist/{semantic-cell-selection-DT9x9WLf.d.cts → semantic-cell-selection-C0OFD4D9.d.cts} +4 -4
  91. package/dist/{semantic-cell-selection-Utrf0lz7.d.ts → semantic-cell-selection-DdmoxC-y.d.ts} +4 -4
  92. package/dist/{semantic-interaction-B6hFRQLy.d.ts → semantic-interaction-COyhZ9WH.d.ts} +1 -1
  93. package/dist/{semantic-interaction-Z0xKQcB4.d.cts → semantic-interaction-Cs2jErnt.d.cts} +1 -1
  94. package/dist/{semantic-paint-CQEOC0Od.d.cts → semantic-paint-UHaj3sBY.d.cts} +2 -2
  95. package/dist/{semantic-paint-quke354p.d.ts → semantic-paint-vA-oLSdV.d.ts} +2 -2
  96. package/dist/{semantic-records-Do3-i5oB.d.ts → semantic-records-5AOQJmLX.d.cts} +5 -4
  97. package/dist/{semantic-records-CMakzQ1X.d.cts → semantic-records-9xhwbJ23.d.ts} +5 -4
  98. package/dist/{shaped-measurer-DzRwWrL5.d.cts → shaped-measurer-NeF2mPSu.d.cts} +1 -1
  99. package/dist/{shaped-measurer-BxwTUluj.d.ts → shaped-measurer-vzsY88oK.d.ts} +1 -1
  100. package/dist/store.cjs +1 -1
  101. package/dist/store.d.cts +74 -16
  102. package/dist/store.d.ts +74 -16
  103. package/dist/store.js +1 -1
  104. package/dist/{tree-op-types-DSJYmf5b.d.cts → tree-op-types-BPyXNxyL.d.cts} +1247 -10
  105. package/dist/{tree-op-types-BuOfCrkp.d.ts → tree-op-types-DnzAOnc9.d.ts} +1247 -10
  106. package/dist/{custom-node-writes-BvpWCnW8.d.ts → tree-package-fragment-BjZ3RWAS.d.cts} +107 -322
  107. package/dist/{custom-node-writes-Db8H6Z3n.d.cts → tree-package-fragment-CDER0G3B.d.ts} +107 -322
  108. package/dist/{tree-session-contract-C1dfE9hy.d.ts → tree-session-contract-BF2FVBOM.d.cts} +16 -10
  109. package/dist/{tree-session-contract-ByWx8eew.d.cts → tree-session-contract-DhdsFT_z.d.ts} +16 -10
  110. package/dist/{tree-store-ASBtz7UB.d.ts → tree-store-CNZ3O83s.d.ts} +130 -25
  111. package/dist/{tree-store-CWOUMGN8.d.cts → tree-store-DfZi7FqY.d.cts} +130 -25
  112. package/package.json +14 -3
  113. package/dist/chunk-27APDXY2.js +0 -2
  114. package/dist/chunk-35MI6K7M.cjs +0 -10
  115. package/dist/chunk-4XL7SOWQ.cjs +0 -2
  116. package/dist/chunk-6K6QQVAZ.cjs +0 -18
  117. package/dist/chunk-7VQ7YLW3.cjs +0 -1
  118. package/dist/chunk-7ZJL5AEY.cjs +0 -1
  119. package/dist/chunk-C6LK2BYA.cjs +0 -2
  120. package/dist/chunk-GQQOL4PV.js +0 -1
  121. package/dist/chunk-HBEBUCRM.cjs +0 -5
  122. package/dist/chunk-LG5K46OM.js +0 -2
  123. package/dist/chunk-LWADHMVV.js +0 -5
  124. package/dist/chunk-N725IUO7.js +0 -18
  125. package/dist/chunk-N7DBENH4.js +0 -10
  126. package/dist/chunk-NVGFWMCO.js +0 -1
  127. package/dist/chunk-SYTWKJPJ.cjs +0 -18
  128. package/dist/chunk-YI6JXF7U.js +0 -18
  129. package/dist/hf-references-Dvk6De4Q.d.cts +0 -70
  130. package/dist/hf-references-z5Y4N1ab.d.ts +0 -70
  131. package/dist/note-nodes-BNCANoGN.d.ts +0 -108
  132. package/dist/note-nodes-DL-Au22P.d.cts +0 -108
  133. package/dist/ooxml-package-CdEy9ufK.d.cts +0 -1222
  134. package/dist/ooxml-package-CdEy9ufK.d.ts +0 -1222
  135. package/dist/tree-op-revision-attribution-CN06Xshv.d.cts +0 -24
  136. package/dist/tree-op-revision-attribution-CN06Xshv.d.ts +0 -24
@@ -1,6 +1,4 @@
1
- import { a as OoxmlNode, b as OoxmlElement, r as OoxmlDrawingNode, c as OoxmlPackage, p as OoxmlContentControlNode, q as OoxmlContentControlContentNode, s as OoxmlContentControlEndPropertiesNode, t as OoxmlContentControlPropertiesNode, O as OoxmlPart } from './ooxml-package-CdEy9ufK.js';
2
1
  import { ParagraphTabStop } from './contracts/types.js';
3
- import { a as RevisionAttributionInput, R as RevisionAddress } from './tree-op-revision-attribution-CN06Xshv.js';
4
2
 
5
3
  /**
6
4
  * The engine's trust-boundary caps: recursion depth, element counts, and the rest.
@@ -56,6 +54,1139 @@ declare const DEFAULT_IMAGE_RESOURCE_LIMITS: ImageResourceLimits;
56
54
  /** Resolve caller overrides into frozen image limits; hard ceilings cannot be raised. */
57
55
  declare function resolveImageResourceLimits(overrides?: Partial<ImageResourceLimits>): ImageResourceLimits;
58
56
 
57
+ /**
58
+ * Why a part or relationship name was refused.
59
+ *
60
+ * Path traversal is the reason this exists: a name with `..` or a leading `/` is refused rather
61
+ * than normalized, because normalizing is how a crafted package reaches outside itself.
62
+ */
63
+ type NameRejection = 'empty' | 'control-char' | 'backslash' | 'drive-or-unc' | 'encoded-separator' | 'encoded-dot' | 'bad-encoding' | 'empty-segment' | 'dot-segment' | 'unsafe-key' | 'segment-trailing-dot' | 'traversal-escape' | 'not-absolute-uri' | 'unsafe-scheme';
64
+ /** A validated OPC name, or the typed reason it was refused. */
65
+ type NameResult = {
66
+ readonly ok: true;
67
+ readonly partName: string;
68
+ } | {
69
+ readonly ok: false;
70
+ readonly reason: NameRejection;
71
+ };
72
+ /**
73
+ * Normalize a ZIP entry name or OPC part name into a canonical part name
74
+ * (`/word/document.xml`). Accepts leading-slash and no-leading-slash inputs;
75
+ * rejects traversal, dot segments, and the attack surface. Duplicate detection
76
+ * folds ASCII case (OPC part-name equivalence).
77
+ */
78
+ declare function normalizePartName(raw: string): NameResult;
79
+ /**
80
+ * ASCII-only lowercase fold. OPC part-name/extension equivalence is US-ASCII
81
+ * case-insensitive; a locale `toLowerCase()` mis-folds e.g. Turkish `I`/`İ` and
82
+ * could let two "equivalent" part names evade duplicate detection.
83
+ */
84
+ declare function asciiFold(s: string): string;
85
+ /** Case-folded key for OPC part-name equivalence / duplicate detection. */
86
+ declare function partNameKey(partName: string): string;
87
+ /**
88
+ * Detect archive entries that collide after normalization (before inflation).
89
+ * Returns the case-folded keys that more than one raw name maps to.
90
+ */
91
+ declare function detectDuplicateNames(rawNames: readonly string[]): {
92
+ readonly duplicates: readonly string[];
93
+ readonly rejected: readonly {
94
+ raw: string;
95
+ reason: NameRejection;
96
+ }[];
97
+ };
98
+ /**
99
+ * Resolve an internal relationship target against its owner part, without
100
+ * escaping the package root. `ownerPartName` is a canonical part name; the base
101
+ * is its containing folder. A leading "/" target is package-absolute. `.`/`..`
102
+ * segments resolve on a stack; popping above root is `traversal-escape`.
103
+ */
104
+ declare function resolveInternalTarget(ownerPartName: string, rawTarget: string): NameResult;
105
+ /**
106
+ * Validate an external-mode relationship target. It MUST be an absolute URI, is
107
+ * retained verbatim by the caller, and is NEVER owner-resolved or fetched here.
108
+ * Unsafe schemes (javascript/vbscript/data/file) are rejected for runtime sinks;
109
+ * the raw lexical form is still preserved separately by the authored record.
110
+ */
111
+ declare function validateExternalTarget(raw: string): NameResult;
112
+
113
+ /** One `<Default>`: a file extension mapped to a content type. */
114
+ interface DefaultRecord {
115
+ readonly extension: string;
116
+ readonly contentType: string;
117
+ readonly order: number;
118
+ }
119
+ /** One `<Override>`: a specific part name mapped to a content type. Beats any Default. */
120
+ interface OverrideRecord {
121
+ readonly partName: string;
122
+ readonly contentType: string;
123
+ readonly order: number;
124
+ }
125
+ /**
126
+ * The authored `[Content_Types].xml` records, in significant order.
127
+ *
128
+ * Retained rather than collapsed into a lookup, because the file's lexical form and ordering are
129
+ * part of what a lossless save re-emits.
130
+ */
131
+ interface ContentTypeRecords {
132
+ readonly defaults: readonly DefaultRecord[];
133
+ readonly overrides: readonly OverrideRecord[];
134
+ }
135
+ /**
136
+ * Why content-type records could not be indexed.
137
+ *
138
+ * All fail CLOSED: conflicting Defaults on one extension, duplicate normalized Override names, or
139
+ * invalid MIME syntax are refused rather than resolved by picking one.
140
+ */
141
+ type ContentTypeError = {
142
+ readonly code: 'invalid-mime';
143
+ readonly value: string;
144
+ } | {
145
+ readonly code: 'conflicting-default';
146
+ readonly extension: string;
147
+ } | {
148
+ readonly code: 'duplicate-override';
149
+ readonly partName: string;
150
+ } | {
151
+ readonly code: 'invalid-override-name';
152
+ readonly partName: string;
153
+ } | {
154
+ readonly code: 'too-many-records';
155
+ readonly limit: number;
156
+ };
157
+ /** Whether a string is syntactically a MIME type. Syntax only — no registry lookup. */
158
+ declare function isValidMime(value: string): boolean;
159
+ /** ASCII-case-insensitive extension key (leading dot removed; ASCII-only fold). */
160
+ declare function extensionKey(extension: string): string;
161
+ /** The resolved lookup: Override by case-folded part name, Default by case-insensitive extension. */
162
+ interface ContentTypeIndex {
163
+ /** ext key -> single MIME (identical duplicates collapsed). */
164
+ readonly defaults: ReadonlyMap<string, string>;
165
+ /** case-folded part name -> MIME. */
166
+ readonly overrides: ReadonlyMap<string, string>;
167
+ }
168
+ /** The built index, or the conflict that made it impossible. */
169
+ type IndexResult = {
170
+ readonly ok: true;
171
+ readonly index: ContentTypeIndex;
172
+ } | {
173
+ readonly ok: false;
174
+ readonly error: ContentTypeError;
175
+ };
176
+ /**
177
+ * Build a resolved content-type index, failing closed on conflict/duplicate/MIME
178
+ * errors. `maxRecords` bounds the combined record count (N/N+1 gate).
179
+ */
180
+ declare function buildContentTypeIndex(records: ContentTypeRecords, maxRecords?: number): IndexResult;
181
+ /**
182
+ * A part's content type, or why it has none.
183
+ *
184
+ * An orphan record never determines a part's type — a Default with no matching part is preserved
185
+ * inertly rather than applied.
186
+ */
187
+ type ResolveResult = {
188
+ readonly ok: true;
189
+ readonly contentType: string;
190
+ readonly source: 'override' | 'default';
191
+ } | {
192
+ readonly ok: false;
193
+ readonly reason: 'unknown';
194
+ };
195
+ /** Resolve a part's content type: Override wins over Default; else unknown. */
196
+ declare function resolveContentType(index: ContentTypeIndex, partName: string): ResolveResult;
197
+
198
+ /** OOXML image relationship type for embedded or linked media parts. */
199
+ declare const IMAGE_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image";
200
+ /**
201
+ * Whether a relationship points inside the package or out of it.
202
+ *
203
+ * The security-relevant distinction: an `External` target is retained VERBATIM and never
204
+ * owner-resolved or fetched, because auto-loading a file-supplied remote target is a zero-click
205
+ * external fetch.
206
+ */
207
+ type TargetMode = 'Internal' | 'External';
208
+ /**
209
+ * One authored relationship, with nothing materialized away: owner part, id, type, raw target
210
+ * lexical form, mode, and position.
211
+ */
212
+ interface RelationshipRecord {
213
+ readonly ownerPart: string;
214
+ readonly id: string;
215
+ readonly type: string;
216
+ readonly rawTarget: string;
217
+ readonly targetMode: TargetMode;
218
+ readonly order: number;
219
+ }
220
+ /** Why a relationship set is invalid. Duplicate ids within one owner fail closed. */
221
+ type RelationshipError = {
222
+ readonly code: 'duplicate-id';
223
+ readonly ownerPart: string;
224
+ readonly id: string;
225
+ };
226
+ /** The validated relationship set, or the conflict that rejected it. */
227
+ type RelationshipSetResult = {
228
+ readonly ok: true;
229
+ readonly byOwner: ReadonlyMap<string, readonly RelationshipRecord[]>;
230
+ } | {
231
+ readonly ok: false;
232
+ readonly error: RelationshipError;
233
+ };
234
+ /** Group relationships by owner in authored order; reject duplicate ids per owner. */
235
+ declare function buildRelationshipSet(records: readonly RelationshipRecord[]): RelationshipSetResult;
236
+ /**
237
+ * A relationship resolved to a part, or the reason it could not be.
238
+ *
239
+ * External targets resolve to a refusal by design: they are never followed from a file.
240
+ */
241
+ type ResolvedRelationship = {
242
+ readonly mode: 'Internal';
243
+ readonly target: NameResult;
244
+ readonly raw: string;
245
+ } | {
246
+ readonly mode: 'External';
247
+ readonly sinkSafe: NameResult;
248
+ readonly raw: string;
249
+ };
250
+ /**
251
+ * Resolve a relationship to a runtime projection while the raw target stays
252
+ * authored. Internal -> owner-relative part name; External -> sink-safe
253
+ * validation only (never owner-resolved, never fetched). `raw` is always the
254
+ * verbatim authored target.
255
+ */
256
+ declare function resolveRelationship(rec: RelationshipRecord): ResolvedRelationship;
257
+ /**
258
+ * An image relationship resolved to package bytes, or why it was refused.
259
+ *
260
+ * External-mode image rels are refused rather than fetched — the no-zero-click-external-fetch
261
+ * rule applies to images exactly as it does to links.
262
+ */
263
+ type ImageRelationshipResolution = {
264
+ readonly mode: 'internal';
265
+ readonly partName: string;
266
+ readonly raw: string;
267
+ } | {
268
+ readonly mode: 'external';
269
+ readonly sinkSafe: boolean;
270
+ readonly raw: string;
271
+ } | {
272
+ readonly mode: 'missing';
273
+ };
274
+ /**
275
+ * Resolve an image relationship id from an owner part. Internal targets resolve
276
+ * owner-relative; external targets are never fetched; a missing id is `missing`.
277
+ */
278
+ declare function resolveImageRelationship(records: readonly RelationshipRecord[] | undefined, ownerPart: string, relationshipId: string): ImageRelationshipResolution;
279
+
280
+ /**
281
+ * One parsed XML node, preserving significant order, whitespace and raw lexical values.
282
+ *
283
+ * Attribute records have a NULL prototype: attribute names come from a file and become object
284
+ * keys, so `__proto__` must be inert by construction rather than by filtering.
285
+ */
286
+ type XmlNode = {
287
+ readonly type: 'element';
288
+ readonly name: string;
289
+ readonly attributes: Readonly<Record<string, string>>;
290
+ readonly children: readonly XmlNode[];
291
+ } | {
292
+ readonly type: 'text';
293
+ readonly value: string;
294
+ };
295
+ /**
296
+ * Why XML was refused at the trust boundary.
297
+ *
298
+ * DTDs, entity declarations and external-entity references are PRE-rejected before parsing —
299
+ * blocking XXE and billion-laughs by never handing the parser the construct, rather than by
300
+ * trusting it to be configured safely.
301
+ */
302
+ type XmlRejection = 'too-large' | 'dtd-forbidden' | 'entity-forbidden' | 'too-deep' | 'too-many-elements' | 'invalid-limits' | 'parse-error';
303
+ /** A parsed document, or a typed refusal. Never throws — the input is untrusted. */
304
+ type XmlResult = {
305
+ readonly ok: true;
306
+ readonly nodes: readonly XmlNode[];
307
+ } | {
308
+ readonly ok: false;
309
+ readonly reason: XmlRejection;
310
+ };
311
+ /** Per-part caps on size, element count and depth. Clamped into the hard ceilings. */
312
+ interface XmlLimits {
313
+ readonly maxBytes: number;
314
+ readonly maxElements?: number;
315
+ }
316
+ /** Read XML into an ordered tree, refusing DTDs/entities and bounding size. */
317
+ /**
318
+ * Read XML at the trust boundary: bounded, entity-free, and fidelity-preserving.
319
+ *
320
+ * Pre-rejects DTDs and entity constructs, disables expansion and value coercion, and keeps child
321
+ * order, attributes, whitespace and raw lexical form — everything a lossless re-emit needs.
322
+ */
323
+ declare function readXml(xml: string, limits?: XmlLimits): XmlResult;
324
+ /** Find the first descendant element with the given qualified name. */
325
+ declare function findElement(nodes: readonly XmlNode[], name: string): Extract<XmlNode, {
326
+ type: 'element';
327
+ }> | undefined;
328
+ /** All direct child elements with the given name. */
329
+ declare function childElements(node: Extract<XmlNode, {
330
+ type: 'element';
331
+ }>, name: string): Extract<XmlNode, {
332
+ type: 'element';
333
+ }>[];
334
+ /** Concatenated text content of an element (all descendant text nodes). */
335
+ declare function textContent(node: Extract<XmlNode, {
336
+ type: 'element';
337
+ }>): string;
338
+
339
+ /** The WordprocessingML main namespace — the `w:` prefix in every `word/document.xml`. */
340
+ declare const WML_NAMESPACE_URI = "http://schemas.openxmlformats.org/wordprocessingml/2006/main";
341
+ /** The reserved `xml:` namespace, which carries `xml:space`. */
342
+ declare const XML_NAMESPACE_URI = "http://www.w3.org/XML/1998/namespace";
343
+ /** The reserved `xmlns:` namespace that namespace declarations themselves live in. */
344
+ declare const XMLNS_NAMESPACE_URI = "http://www.w3.org/2000/xmlns/";
345
+ /** The `w14` wordml-2010 extension namespace — `w14:paraId`/`w14:textId` live here. */
346
+ declare const W14_NAMESPACE_URI = "http://schemas.microsoft.com/office/word/2010/wordml";
347
+ declare const DRAWINGML_MAIN_NAMESPACE_URI = "http://schemas.openxmlformats.org/drawingml/2006/main";
348
+ declare const WP_NAMESPACE_URI = "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing";
349
+ declare const PIC_NAMESPACE_URI = "http://schemas.openxmlformats.org/drawingml/2006/picture";
350
+ /** The four content-position revision wrappers, which nest and carry runs. */
351
+ declare function isContentRevisionKind(kind: OoxmlNode['kind']): kind is 'revisionInsert' | 'revisionDelete' | 'revisionMoveFrom' | 'revisionMoveTo';
352
+ /** Move-range and comment-range boundary markers, which are empty and sit between runs. */
353
+ declare function isRangeMarkerKind(kind: OoxmlNode['kind']): kind is 'moveFromRangeStart' | 'moveFromRangeEnd' | 'moveToRangeStart' | 'moveToRangeEnd' | 'commentRangeStart' | 'commentRangeEnd';
354
+ /**
355
+ * OOXML on/off toggle: on only when a same-namespace child is present and its `w:val`
356
+ * (same namespace as the child) does not explicitly disable. Foreign-namespace siblings
357
+ * with the same local name cannot turn the flag on.
358
+ */
359
+ declare function readOnOffChild(parent: OoxmlNode, localName: string, namespaceUri?: string): boolean;
360
+
361
+ /**
362
+ * A node's stable identity within its part.
363
+ *
364
+ * Minted deterministically from the structural path at parse, then RETAINED through structural
365
+ * sharing — the same bytes always produce the same ids, and an edit elsewhere in the document
366
+ * does not renumber untouched nodes. Every tree op addresses nodes by these.
367
+ */
368
+ type OoxmlNodeId = string;
369
+ /**
370
+ * One `xmlns:` declaration carried on a node.
371
+ *
372
+ * Preserved rather than normalized away: a document that binds `w14` at the root and a document
373
+ * that binds it on a paragraph are different bytes, and re-emitting the wrong one is a fidelity
374
+ * loss even though the semantics match.
375
+ */
376
+ interface OoxmlNamespaceBinding {
377
+ readonly prefix: string;
378
+ readonly namespaceUri: string;
379
+ }
380
+ interface OoxmlAttributeBase {
381
+ readonly namespaceUri: string;
382
+ readonly localName: string;
383
+ readonly prefix?: string;
384
+ readonly value: string;
385
+ }
386
+ /** `xml:space`, which decides whether a run's leading and trailing whitespace survives. */
387
+ interface OoxmlXmlSpaceAttribute extends OoxmlAttributeBase {
388
+ readonly kind: 'xmlSpace';
389
+ readonly namespaceUri: typeof XML_NAMESPACE_URI;
390
+ readonly localName: 'space';
391
+ readonly prefix: 'xml';
392
+ readonly value: 'default' | 'preserve';
393
+ }
394
+ /** `w:val` — the attribute nearly every WordprocessingML property carries its value in. */
395
+ interface OoxmlWmlValAttribute extends OoxmlAttributeBase {
396
+ readonly kind: 'wmlVal';
397
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
398
+ readonly localName: 'val';
399
+ }
400
+ /**
401
+ * Any attribute outside the typed vocabulary, carried verbatim.
402
+ *
403
+ * Where losslessness actually happens: an attribute this engine has no model for is preserved
404
+ * exactly rather than dropped, so a save re-emits what the file said.
405
+ */
406
+ interface OoxmlGenericExtensionAttribute extends OoxmlAttributeBase {
407
+ readonly kind: 'genericExtension';
408
+ }
409
+ /** Any attribute on any node: the two typed ones, plus the verbatim catch-all. */
410
+ type OoxmlAttribute = OoxmlXmlSpaceAttribute | OoxmlWmlValAttribute | OoxmlGenericExtensionAttribute;
411
+ /**
412
+ * Attributes a TYPED node may carry.
413
+ *
414
+ * Excludes `w:val` on purpose: a node the engine models keeps its value in typed fields, and
415
+ * allowing a stray `w:val` alongside them would create two sources of truth for one property.
416
+ */
417
+ type OoxmlKnownNodeAttribute = OoxmlXmlSpaceAttribute | OoxmlGenericExtensionAttribute;
418
+ interface OoxmlElementBase<Children extends readonly OoxmlNode[] = readonly OoxmlNode[], Attributes extends readonly OoxmlAttribute[] = readonly OoxmlAttribute[]> {
419
+ readonly id: OoxmlNodeId;
420
+ readonly namespaceUri: string;
421
+ readonly localName: string;
422
+ /** Authored prefix retained as non-authoritative fidelity evidence. */
423
+ readonly prefix?: string;
424
+ /** Namespace declarations authored directly on this element, in source order. */
425
+ readonly namespaceBindings: readonly OoxmlNamespaceBinding[];
426
+ readonly attributes: Attributes;
427
+ readonly children: Children;
428
+ }
429
+ /** `w:document` — the root of a main document part. */
430
+ interface OoxmlDocumentNode extends OoxmlElementBase<readonly (OoxmlBodyNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
431
+ readonly kind: 'document';
432
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
433
+ readonly localName: 'document';
434
+ }
435
+ /** `w:body` — the main story's block content. */
436
+ interface OoxmlBodyNode extends OoxmlElementBase<readonly (OoxmlParagraphNode | OoxmlTableNode | OoxmlContentControlNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
437
+ readonly kind: 'body';
438
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
439
+ readonly localName: 'body';
440
+ }
441
+ interface OoxmlTableNode extends OoxmlElementBase<readonly (OoxmlTablePropertiesNode | OoxmlTableGridNode | OoxmlTableRowNode | OoxmlContentControlNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
442
+ readonly kind: 'table';
443
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
444
+ readonly localName: 'tbl';
445
+ }
446
+ interface OoxmlTableRowNode extends OoxmlElementBase<readonly (OoxmlTableCellNode | OoxmlContentControlNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
447
+ readonly kind: 'tableRow';
448
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
449
+ readonly localName: 'tr';
450
+ }
451
+ interface OoxmlTableCellNode extends OoxmlElementBase<readonly (OoxmlParagraphNode | OoxmlTableNode | OoxmlContentControlNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
452
+ readonly kind: 'tableCell';
453
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
454
+ readonly localName: 'tc';
455
+ }
456
+ /** Grid children (`w:gridCol`) stay generic: they are property leaves, not structure. */
457
+ interface OoxmlTableGridNode extends OoxmlElementBase<readonly OoxmlGenericElementNode[], readonly OoxmlKnownNodeAttribute[]> {
458
+ readonly kind: 'tableGrid';
459
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
460
+ readonly localName: 'tblGrid';
461
+ }
462
+ /** Property children stay generic, mirroring `runProperties`. */
463
+ interface OoxmlTablePropertiesNode extends OoxmlElementBase<readonly OoxmlGenericElementNode[], readonly OoxmlKnownNodeAttribute[]> {
464
+ readonly kind: 'tableProperties';
465
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
466
+ readonly localName: 'tblPr';
467
+ }
468
+ /**
469
+ * `w:p` — a paragraph, and the unit every offset in this engine is relative to.
470
+ *
471
+ * Positions are addressed as this node's id plus a UTF-16 offset, which is what makes a paragraph
472
+ * inside a table cell no different from one at the top level.
473
+ */
474
+ interface OoxmlParagraphNode extends OoxmlElementBase<readonly (OoxmlParagraphPropertiesNode | OoxmlRunNode | OoxmlHyperlinkNode | OoxmlContentControlNode | OoxmlBookmarkStartNode | OoxmlBookmarkEndNode | OoxmlRevisionContentNode | OoxmlRangeMarkerNode | OoxmlFldSimpleNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
475
+ readonly kind: 'paragraph';
476
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
477
+ readonly localName: 'p';
478
+ }
479
+ /**
480
+ * `CT_Hyperlink` (ECMA-376 §17.16.22) — a RUN CONTAINER, not a leaf.
481
+ *
482
+ * Its runs are part of the paragraph's inline sequence: they measure, paint, select and
483
+ * take offsets exactly like a run written directly under the `w:p`. Typing the element is
484
+ * what lets them in; while it was generic, its runs never reached the token stream and the
485
+ * words inside every link simply did not paint.
486
+ *
487
+ * Targets live in the ATTRIBUTES, and §17.16.22 declares exactly six. They divide into two
488
+ * groups, and the difference is load-bearing:
489
+ *
490
+ * MODELED `r:id` (a relationship, resolved against the owning part's rels), `w:anchor`
491
+ * (a bookmark name in this document) and `w:tooltip`. These are the three the
492
+ * ops read and write — `setHyperlinkTarget` sets one target attribute and
493
+ * CLEARS the other, so a link never carries both and resolves by the wrong one.
494
+ *
495
+ * PRESERVED `w:tgtFrame`, `w:docLocation` and `w:history`. Nothing in this engine
496
+ * interprets them and no op names them; they survive because attributes are
497
+ * carried verbatim, and `setHyperlinkTarget` must leave them exactly as
498
+ * authored. That is a REQUIREMENT, not an incidental property of the current
499
+ * applier: `w:docLocation` names a location inside the target document, so
500
+ * silently dropping it on a retarget would change where a link goes.
501
+ * `hyperlink-lossless-editing.test.ts` pins both against a retarget.
502
+ *
503
+ * Nothing here is a runtime URL — the sanitized projection is computed separately (see
504
+ * `hyperlinkTargetOf`), and only that reaches a DOM or navigation sink.
505
+ *
506
+ * Bookmark markers are admitted as children because Word writes them inside links; anything
507
+ * else it can carry (a drawing, a field, a nested SDT) stays `generic` at its position, so a
508
+ * link around a picture keeps both the picture and the link.
509
+ *
510
+ * A link may contain ANOTHER link: §17.16.22's content model is `EG_PContent`, which lists
511
+ * `w:hyperlink` among its own members. That is why this child union is self-referential
512
+ * rather than bottoming out at runs. Demoting the inner one to `generic` would have been the
513
+ * easier type, and it would have reintroduced exactly the bug typing this element fixed —
514
+ * a generic link's runs never reach the token stream, so the words inside it stop painting.
515
+ * Every walk that descends a link therefore recurses (`segmentsOf`, `runsUnder`,
516
+ * `runPropertyEdits`) instead of descending one level.
517
+ */
518
+ interface OoxmlHyperlinkNode extends OoxmlElementBase<readonly (OoxmlRunNode | OoxmlHyperlinkNode | OoxmlContentControlNode | OoxmlBookmarkStartNode | OoxmlBookmarkEndNode | OoxmlRevisionContentNode | OoxmlRangeMarkerNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
519
+ readonly kind: 'hyperlink';
520
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
521
+ readonly localName: 'hyperlink';
522
+ }
523
+ /**
524
+ * A content-position revision wrapper — `w:ins`, `w:del`, `w:moveFrom`, `w:moveTo`.
525
+ *
526
+ * These wrap runs, so a walk that visits only direct `run` children never reaches
527
+ * the content inside them. Typing them is what lets layout descend deliberately
528
+ * rather than treating tracked content as unknown markup.
529
+ *
530
+ * ECMA-376 §17.13.5.18/.14/.25/.29. All four extend `CT_TrackChange`: `@w:id` and
531
+ * `@w:author` are required, `@w:date` is optional and is never fabricated.
532
+ *
533
+ * The SAME element names appear in property positions — `w:pPr/w:rPr/w:ins` marks a
534
+ * paragraph mark, `w:trPr/w:del` marks a row — where they carry no content and mean
535
+ * something structurally different. Those stay generic; see `contentRevisionKind`.
536
+ */
537
+ interface OoxmlRevisionContentNode extends OoxmlElementBase<readonly (OoxmlRunNode | OoxmlRevisionContentNode | OoxmlHyperlinkNode | OoxmlRangeMarkerNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
538
+ readonly kind: 'revisionInsert' | 'revisionDelete' | 'revisionMoveFrom' | 'revisionMoveTo';
539
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
540
+ readonly localName: 'ins' | 'del' | 'moveFrom' | 'moveTo';
541
+ }
542
+ /**
543
+ * `w:bookmarkStart` — a ZERO-LENGTH point anchor (`@w:id`, `@w:name`).
544
+ *
545
+ * It takes no text offset and paints nothing; it only marks a position, which is what an
546
+ * internal hyperlink's `w:anchor` names. Split and join place it by that position, the
547
+ * behaviour `tree-op-split-anchors.test.ts` pins.
548
+ */
549
+ interface OoxmlBookmarkStartNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
550
+ readonly kind: 'bookmarkStart';
551
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
552
+ readonly localName: 'bookmarkStart';
553
+ }
554
+ /** `w:bookmarkEnd` — the closing point anchor (`@w:id`), zero-length like its start. */
555
+ interface OoxmlBookmarkEndNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
556
+ readonly kind: 'bookmarkEnd';
557
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
558
+ readonly localName: 'bookmarkEnd';
559
+ }
560
+ /**
561
+ * A range marker: the move-range and comment-range boundaries.
562
+ *
563
+ * Three of the base types in this family disagree, and the disagreement is load-bearing:
564
+ *
565
+ * - `w:moveFromRangeStart` / `w:moveToRangeStart` are `CT_MoveBookmark` (§17.13.5.22/.26):
566
+ * `@w:name`, `@w:author`, and `@w:date` are all REQUIRED.
567
+ * - `w:moveFromRangeEnd` / `w:moveToRangeEnd` / `w:commentRangeStart` / `w:commentRangeEnd`
568
+ * are `CT_MarkupRange` (§17.13.5.21): `@w:id` only, with NO author and NO date. Requiring
569
+ * provenance here refuses valid files; writing it emits invalid XML.
570
+ *
571
+ * Two different join keys ride on these: `@w:name` pairs a `moveFrom` range with its
572
+ * `moveTo` range, while `@w:id` pairs a range start with its own range end. In a real
573
+ * document the two halves of a named pair carry different ids, so neither key substitutes
574
+ * for the other.
575
+ */
576
+ interface OoxmlRangeMarkerNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
577
+ readonly kind: 'moveFromRangeStart' | 'moveFromRangeEnd' | 'moveToRangeStart' | 'moveToRangeEnd' | 'commentRangeStart' | 'commentRangeEnd';
578
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
579
+ readonly localName: 'moveFromRangeStart' | 'moveFromRangeEnd' | 'moveToRangeStart' | 'moveToRangeEnd' | 'commentRangeStart' | 'commentRangeEnd';
580
+ }
581
+ /** `w:commentReference` — the in-run mark that carries the comment's anchor point. */
582
+ interface OoxmlCommentReferenceNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
583
+ readonly kind: 'commentReference';
584
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
585
+ readonly localName: 'commentReference';
586
+ }
587
+ /** The `word/comments.xml` root (`CT_Comments`, §17.13.4.2). */
588
+ interface OoxmlCommentsNode extends OoxmlElementBase<readonly (OoxmlCommentNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
589
+ readonly kind: 'comments';
590
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
591
+ readonly localName: 'comments';
592
+ }
593
+ /**
594
+ * One comment (`CT_Comment`, §17.13.4.4) — `CT_TrackChange` plus `@w:initials`, holding
595
+ * block content. The block content is why a comment body is a story rather than a string.
596
+ */
597
+ interface OoxmlCommentNode extends OoxmlElementBase<readonly (OoxmlParagraphNode | OoxmlTableNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
598
+ readonly kind: 'comment';
599
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
600
+ readonly localName: 'comment';
601
+ }
602
+ /** `w:r` — a run: text and atoms sharing one set of character properties. */
603
+ interface OoxmlRunNode extends OoxmlElementBase<readonly (OoxmlRunPropertiesNode | OoxmlTextElementNode | OoxmlDeletedTextNode | OoxmlTabNode | OoxmlHardBreakNode | OoxmlCommentReferenceNode | OoxmlFldCharNode | OoxmlInstrTextNode | OoxmlNoteReferenceNode | OoxmlNoteRefNode | OoxmlSeparatorNode | OoxmlContinuationSeparatorNode | OoxmlDrawingNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
604
+ readonly kind: 'run';
605
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
606
+ readonly localName: 'r';
607
+ }
608
+ /** `w:drawing` — run content only; exactly one typed inline or anchored child. */
609
+ interface OoxmlDrawingNode extends OoxmlElementBase<readonly (OoxmlInlineDrawingNode | OoxmlAnchoredDrawingNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
610
+ readonly kind: 'drawing';
611
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
612
+ readonly localName: 'drawing';
613
+ }
614
+ /** `wp:inline` / `wp:anchor` shared payload children. */
615
+ type OoxmlDrawingAnchorChild = OoxmlDrawingExtentNode | OoxmlDrawingEffectExtentNode | OoxmlDrawingDocPrNode | OoxmlDrawingGraphicFramePrNode | OoxmlDrawingGraphicNode | OoxmlDrawingSimplePosNode | OoxmlDrawingPositionHNode | OoxmlDrawingPositionVNode | OoxmlDrawingWrapNoneNode | OoxmlDrawingWrapSquareNode | OoxmlDrawingWrapTightNode | OoxmlDrawingWrapThroughNode | OoxmlDrawingWrapTopBottomNode | OoxmlGenericElementNode;
616
+ /** `wp:inline` (`CT_Inline`) — typed only under `w:drawing`. */
617
+ interface OoxmlInlineDrawingNode extends OoxmlElementBase<readonly OoxmlDrawingAnchorChild[], readonly OoxmlKnownNodeAttribute[]> {
618
+ readonly kind: 'inlineDrawing';
619
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
620
+ readonly localName: 'inline';
621
+ }
622
+ /** `wp:anchor` (`CT_Anchor`) — typed only under `w:drawing`. */
623
+ interface OoxmlAnchoredDrawingNode extends OoxmlElementBase<readonly OoxmlDrawingAnchorChild[], readonly OoxmlKnownNodeAttribute[]> {
624
+ readonly kind: 'anchoredDrawing';
625
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
626
+ readonly localName: 'anchor';
627
+ }
628
+ interface OoxmlDrawingExtentNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
629
+ readonly kind: 'drawingExtent';
630
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
631
+ readonly localName: 'extent';
632
+ }
633
+ interface OoxmlDrawingEffectExtentNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
634
+ readonly kind: 'drawingEffectExtent';
635
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
636
+ readonly localName: 'effectExtent';
637
+ }
638
+ interface OoxmlDrawingDocPrNode extends OoxmlElementBase<readonly OoxmlGenericElementNode[], readonly OoxmlKnownNodeAttribute[]> {
639
+ readonly kind: 'drawingDocPr';
640
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
641
+ readonly localName: 'docPr';
642
+ }
643
+ interface OoxmlDrawingGraphicFramePrNode extends OoxmlElementBase<readonly OoxmlGenericElementNode[], readonly OoxmlKnownNodeAttribute[]> {
644
+ readonly kind: 'drawingGraphicFramePr';
645
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
646
+ readonly localName: 'cNvGraphicFramePr';
647
+ }
648
+ interface OoxmlDrawingGraphicNode extends OoxmlElementBase<readonly (OoxmlDrawingGraphicDataNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
649
+ readonly kind: 'drawingGraphic';
650
+ readonly namespaceUri: typeof DRAWINGML_MAIN_NAMESPACE_URI;
651
+ readonly localName: 'graphic';
652
+ }
653
+ interface OoxmlDrawingGraphicDataNode extends OoxmlElementBase<readonly (OoxmlPictureNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
654
+ readonly kind: 'drawingGraphicData';
655
+ readonly namespaceUri: typeof DRAWINGML_MAIN_NAMESPACE_URI;
656
+ readonly localName: 'graphicData';
657
+ }
658
+ interface OoxmlDrawingSimplePosNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
659
+ readonly kind: 'drawingSimplePos';
660
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
661
+ readonly localName: 'simplePos';
662
+ }
663
+ interface OoxmlDrawingPositionHNode extends OoxmlElementBase<readonly (OoxmlDrawingPositionAlignNode | OoxmlDrawingPositionOffsetNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
664
+ readonly kind: 'drawingPositionH';
665
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
666
+ readonly localName: 'positionH';
667
+ }
668
+ interface OoxmlDrawingPositionVNode extends OoxmlElementBase<readonly (OoxmlDrawingPositionAlignNode | OoxmlDrawingPositionOffsetNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
669
+ readonly kind: 'drawingPositionV';
670
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
671
+ readonly localName: 'positionV';
672
+ }
673
+ interface OoxmlDrawingPositionAlignNode extends OoxmlElementBase<readonly (OoxmlTextNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
674
+ readonly kind: 'drawingPositionAlign';
675
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
676
+ readonly localName: 'align';
677
+ }
678
+ interface OoxmlDrawingPositionOffsetNode extends OoxmlElementBase<readonly (OoxmlTextNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
679
+ readonly kind: 'drawingPositionOffset';
680
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
681
+ readonly localName: 'posOffset';
682
+ }
683
+ interface OoxmlDrawingWrapNoneNode extends OoxmlElementBase<readonly OoxmlGenericElementNode[], readonly OoxmlKnownNodeAttribute[]> {
684
+ readonly kind: 'drawingWrapNone';
685
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
686
+ readonly localName: 'wrapNone';
687
+ }
688
+ interface OoxmlDrawingWrapSquareNode extends OoxmlElementBase<readonly (OoxmlDrawingEffectExtentNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
689
+ readonly kind: 'drawingWrapSquare';
690
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
691
+ readonly localName: 'wrapSquare';
692
+ }
693
+ interface OoxmlDrawingWrapTightNode extends OoxmlElementBase<readonly (OoxmlDrawingWrapPolygonNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
694
+ readonly kind: 'drawingWrapTight';
695
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
696
+ readonly localName: 'wrapTight';
697
+ }
698
+ interface OoxmlDrawingWrapThroughNode extends OoxmlElementBase<readonly (OoxmlDrawingWrapPolygonNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
699
+ readonly kind: 'drawingWrapThrough';
700
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
701
+ readonly localName: 'wrapThrough';
702
+ }
703
+ interface OoxmlDrawingWrapTopBottomNode extends OoxmlElementBase<readonly (OoxmlDrawingEffectExtentNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
704
+ readonly kind: 'drawingWrapTopBottom';
705
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
706
+ readonly localName: 'wrapTopAndBottom';
707
+ }
708
+ interface OoxmlDrawingWrapPolygonNode extends OoxmlElementBase<readonly (OoxmlDrawingWrapPolygonStartNode | OoxmlDrawingWrapPolygonLineToNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
709
+ readonly kind: 'drawingWrapPolygon';
710
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
711
+ readonly localName: 'wrapPolygon';
712
+ }
713
+ interface OoxmlDrawingWrapPolygonStartNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
714
+ readonly kind: 'drawingWrapPolygonStart';
715
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
716
+ readonly localName: 'start';
717
+ }
718
+ interface OoxmlDrawingWrapPolygonLineToNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
719
+ readonly kind: 'drawingWrapPolygonLineTo';
720
+ readonly namespaceUri: typeof WP_NAMESPACE_URI;
721
+ readonly localName: 'lineTo';
722
+ }
723
+ /** `pic:pic` (`CT_Picture`) — typed only under picture `a:graphicData`. */
724
+ interface OoxmlPictureNode extends OoxmlElementBase<readonly (OoxmlPictureNvPicPrNode | OoxmlPictureBlipFillNode | OoxmlPictureShapePropertiesNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
725
+ readonly kind: 'picture';
726
+ readonly namespaceUri: typeof PIC_NAMESPACE_URI;
727
+ readonly localName: 'pic';
728
+ }
729
+ interface OoxmlPictureNvPicPrNode extends OoxmlElementBase<readonly OoxmlGenericElementNode[], readonly OoxmlKnownNodeAttribute[]> {
730
+ readonly kind: 'pictureNvPicPr';
731
+ readonly namespaceUri: typeof PIC_NAMESPACE_URI;
732
+ readonly localName: 'nvPicPr';
733
+ }
734
+ interface OoxmlPictureBlipFillNode extends OoxmlElementBase<readonly (OoxmlPictureBlipNode | OoxmlPictureSrcRectNode | OoxmlPictureStretchNode | OoxmlPictureTileNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
735
+ readonly kind: 'pictureBlipFill';
736
+ readonly namespaceUri: typeof PIC_NAMESPACE_URI;
737
+ readonly localName: 'blipFill';
738
+ }
739
+ interface OoxmlPictureBlipNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
740
+ readonly kind: 'pictureBlip';
741
+ readonly namespaceUri: typeof DRAWINGML_MAIN_NAMESPACE_URI;
742
+ readonly localName: 'blip';
743
+ }
744
+ interface OoxmlPictureSrcRectNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
745
+ readonly kind: 'pictureSrcRect';
746
+ readonly namespaceUri: typeof DRAWINGML_MAIN_NAMESPACE_URI;
747
+ readonly localName: 'srcRect';
748
+ }
749
+ interface OoxmlPictureStretchNode extends OoxmlElementBase<readonly OoxmlGenericElementNode[], readonly OoxmlKnownNodeAttribute[]> {
750
+ readonly kind: 'pictureStretch';
751
+ readonly namespaceUri: typeof DRAWINGML_MAIN_NAMESPACE_URI;
752
+ readonly localName: 'stretch';
753
+ }
754
+ interface OoxmlPictureTileNode extends OoxmlElementBase<readonly OoxmlGenericElementNode[], readonly OoxmlKnownNodeAttribute[]> {
755
+ readonly kind: 'pictureTile';
756
+ readonly namespaceUri: typeof DRAWINGML_MAIN_NAMESPACE_URI;
757
+ readonly localName: 'tile';
758
+ }
759
+ interface OoxmlPictureShapePropertiesNode extends OoxmlElementBase<readonly (OoxmlPictureTransformNode | OoxmlPicturePresetGeometryNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
760
+ readonly kind: 'pictureShapeProperties';
761
+ readonly namespaceUri: typeof PIC_NAMESPACE_URI;
762
+ readonly localName: 'spPr';
763
+ }
764
+ interface OoxmlPictureTransformNode extends OoxmlElementBase<readonly (OoxmlPictureTransformOffsetNode | OoxmlPictureTransformExtentNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
765
+ readonly kind: 'pictureTransform';
766
+ readonly namespaceUri: typeof DRAWINGML_MAIN_NAMESPACE_URI;
767
+ readonly localName: 'xfrm';
768
+ }
769
+ interface OoxmlPictureTransformOffsetNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
770
+ readonly kind: 'pictureTransformOffset';
771
+ readonly namespaceUri: typeof DRAWINGML_MAIN_NAMESPACE_URI;
772
+ readonly localName: 'off';
773
+ }
774
+ interface OoxmlPictureTransformExtentNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
775
+ readonly kind: 'pictureTransformExtent';
776
+ readonly namespaceUri: typeof DRAWINGML_MAIN_NAMESPACE_URI;
777
+ readonly localName: 'ext';
778
+ }
779
+ interface OoxmlPicturePresetGeometryNode extends OoxmlElementBase<readonly OoxmlGenericElementNode[], readonly OoxmlKnownNodeAttribute[]> {
780
+ readonly kind: 'picturePresetGeometry';
781
+ readonly namespaceUri: typeof DRAWINGML_MAIN_NAMESPACE_URI;
782
+ readonly localName: 'prstGeom';
783
+ }
784
+ /**
785
+ * `w:delText` (§17.3.3.7) — the text container a run uses once its content is deleted.
786
+ *
787
+ * Structurally identical to `w:t`, and deliberately a DIFFERENT kind: it must never flow
788
+ * as ordinary text, and rejecting the deletion that contains it turns it back into `w:t`.
789
+ */
790
+ interface OoxmlDeletedTextNode extends OoxmlElementBase<readonly OoxmlTextNode[], readonly OoxmlKnownNodeAttribute[]> {
791
+ readonly kind: 'deletedText';
792
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
793
+ readonly localName: 'delText';
794
+ }
795
+ /**
796
+ * `w:rPr` — a run's character properties, whose children stay GENERIC.
797
+ *
798
+ * Deliberately unmodelled below this point: the property vocabulary is large and mostly
799
+ * uninteresting to layout, so carrying it verbatim preserves everything without the engine having
800
+ * to know what each element means.
801
+ */
802
+ interface OoxmlRunPropertiesNode extends OoxmlElementBase<readonly OoxmlGenericElementNode[], readonly OoxmlKnownNodeAttribute[]> {
803
+ readonly kind: 'runProperties';
804
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
805
+ readonly localName: 'rPr';
806
+ }
807
+ /** `w:t` — the element holding a run's literal characters. */
808
+ interface OoxmlTextElementNode extends OoxmlElementBase<readonly OoxmlTextNode[], readonly OoxmlKnownNodeAttribute[]> {
809
+ readonly kind: 'text';
810
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
811
+ readonly localName: 't';
812
+ }
813
+ /** `w:pPr` — a paragraph's properties. Children stay generic, like `w:rPr`'s. */
814
+ interface OoxmlParagraphPropertiesNode extends OoxmlElementBase<readonly (OoxmlRunPropertiesNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
815
+ readonly kind: 'paragraphProperties';
816
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
817
+ readonly localName: 'pPr';
818
+ }
819
+ /** `w:tab` inside a run — one tab character as its own element. */
820
+ interface OoxmlTabNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
821
+ readonly kind: 'tab';
822
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
823
+ readonly localName: 'tab';
824
+ }
825
+ /** `w:br` — a line, column or page break inside a run. */
826
+ interface OoxmlHardBreakNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
827
+ readonly kind: 'hardBreak';
828
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
829
+ readonly localName: 'br';
830
+ }
831
+ /**
832
+ * Complex-field character (`w:fldChar`).
833
+ *
834
+ * Children stay generic so `w:ffData` (legacy form fields / macros) round-trips as inert
835
+ * payload and is never promoted to an executable surface. `@w:fldCharType`, `@w:dirty`,
836
+ * and `@w:fldLock` are preserved on `attributes`.
837
+ */
838
+ interface OoxmlFldCharNode extends OoxmlElementBase<readonly OoxmlGenericElementNode[], readonly OoxmlKnownNodeAttribute[]> {
839
+ readonly kind: 'fldChar';
840
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
841
+ readonly localName: 'fldChar';
842
+ }
843
+ /**
844
+ * Field instruction text (`w:instrText`), same text-carrier shape as `w:t`.
845
+ *
846
+ * Instruction strings are never executed; layout may recognize allowlisted page-number
847
+ * keywords only.
848
+ */
849
+ interface OoxmlInstrTextNode extends OoxmlElementBase<readonly OoxmlTextNode[], readonly OoxmlKnownNodeAttribute[]> {
850
+ readonly kind: 'instrText';
851
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
852
+ readonly localName: 'instrText';
853
+ }
854
+ /**
855
+ * Simple field (`w:fldSimple`) at paragraph content level.
856
+ *
857
+ * `@w:instr`, `@w:dirty`, and `@w:fldLock` round-trip on `attributes`. Cached result
858
+ * children stay structurally preserved; the field is one atomic addressable unit.
859
+ */
860
+ interface OoxmlFldSimpleNode extends OoxmlElementBase<readonly (OoxmlRunNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
861
+ readonly kind: 'fldSimple';
862
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
863
+ readonly localName: 'fldSimple';
864
+ }
865
+ /**
866
+ * Footnotes part root (`w:footnotes`). Children are typed notes or preserved generics.
867
+ * Never a story root itself — each note body is its own story for layout.
868
+ */
869
+ interface OoxmlFootnotesNode extends OoxmlElementBase<readonly (OoxmlNoteNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
870
+ readonly kind: 'footnotes';
871
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
872
+ readonly localName: 'footnotes';
873
+ }
874
+ /**
875
+ * Endnotes part root (`w:endnotes`). Same content model as {@link OoxmlFootnotesNode}.
876
+ */
877
+ interface OoxmlEndnotesNode extends OoxmlElementBase<readonly (OoxmlNoteNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
878
+ readonly kind: 'endnotes';
879
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
880
+ readonly localName: 'endnotes';
881
+ }
882
+ /**
883
+ * One footnote or endnote (`w:footnote` / `w:endnote`).
884
+ *
885
+ * Discriminated by `localName`. `@w:id` and optional `@w:type` (`ST_FtnEdn`, including
886
+ * authored `normal`) live on `attributes`. Children are ordinary block content.
887
+ */
888
+ interface OoxmlNoteNode extends OoxmlElementBase<readonly (OoxmlParagraphNode | OoxmlTableNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
889
+ readonly kind: 'note';
890
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
891
+ readonly localName: 'footnote' | 'endnote';
892
+ }
893
+ /**
894
+ * Body citation (`w:footnoteReference` / `w:endnoteReference`) as a typed run child.
895
+ * Display mark is derived — never stored as text. One UTF-16 atom in addressing.
896
+ */
897
+ interface OoxmlNoteReferenceNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
898
+ readonly kind: 'noteReference';
899
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
900
+ readonly localName: 'footnoteReference' | 'endnoteReference';
901
+ }
902
+ /**
903
+ * Auto mark inside a note body (`w:footnoteRef` / `w:endnoteRef`).
904
+ * One UTF-16 atom; display digit is derived at paint time.
905
+ */
906
+ interface OoxmlNoteRefNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
907
+ readonly kind: 'noteRef';
908
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
909
+ readonly localName: 'footnoteRef' | 'endnoteRef';
910
+ }
911
+ /** Run-inner separator rule (`w:separator`). One UTF-16 atom. */
912
+ interface OoxmlSeparatorNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
913
+ readonly kind: 'separator';
914
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
915
+ readonly localName: 'separator';
916
+ }
917
+ /** Run-inner continuation separator (`w:continuationSeparator`). One UTF-16 atom. */
918
+ interface OoxmlContinuationSeparatorNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
919
+ readonly kind: 'continuationSeparator';
920
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
921
+ readonly localName: 'continuationSeparator';
922
+ }
923
+ /**
924
+ * `w:sdt` — structured document tag (content control) at block, inline, row, or cell level.
925
+ *
926
+ * Placement is not a separate kind: the same element name appears in every `EG_*Content`
927
+ * group. Child shape is the union of those placements; parents admit the control wherever
928
+ * `generic` was previously accepted (see `isPreservedChild`). Identity is the node id —
929
+ * `w:id` inside `w:sdtPr` is optional, preserved when present, never fabricated here.
930
+ */
931
+ interface OoxmlContentControlNode extends OoxmlElementBase<readonly (OoxmlContentControlPropertiesNode | OoxmlContentControlEndPropertiesNode | OoxmlContentControlContentNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
932
+ readonly kind: 'contentControl';
933
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
934
+ readonly localName: 'sdt';
935
+ }
936
+ /**
937
+ * `w:sdtPr` (`CT_SdtPr`) — schema-ordered properties. Unmodelled children (alias/tag/id/lock
938
+ * leaves with `w:val`, `w15:*`, empty type markers) stay `generic` in position. Typed
939
+ * payloads: dropdown/combo/listItem, date (+ leaves), text, dataBinding, `w14:checkbox`.
940
+ */
941
+ interface OoxmlContentControlPropertiesNode extends OoxmlElementBase<readonly (OoxmlRunPropertiesNode | OoxmlContentControlDataBindingNode | OoxmlContentControlDropDownListNode | OoxmlContentControlComboBoxNode | OoxmlContentControlDateNode | OoxmlContentControlTextNode | OoxmlContentControlCheckboxNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
942
+ readonly kind: 'contentControlProperties';
943
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
944
+ readonly localName: 'sdtPr';
945
+ }
946
+ /** `w:sdtEndPr` — end-character properties; children are `w:rPr` or generic. */
947
+ interface OoxmlContentControlEndPropertiesNode extends OoxmlElementBase<readonly (OoxmlRunPropertiesNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
948
+ readonly kind: 'contentControlEndProperties';
949
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
950
+ readonly localName: 'sdtEndPr';
951
+ }
952
+ /**
953
+ * `w:sdtContent` — control contents for every placement. Block content is paragraphs/tables;
954
+ * inline content is runs/hyperlinks; row/cell content is rows/cells. Nested controls stay typed.
955
+ */
956
+ interface OoxmlContentControlContentNode extends OoxmlElementBase<readonly OoxmlNode[], readonly OoxmlKnownNodeAttribute[]> {
957
+ readonly kind: 'contentControlContent';
958
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
959
+ readonly localName: 'sdtContent';
960
+ }
961
+ /** `w:dropDownList` — `@w:lastValue` plus typed `w:listItem` children. */
962
+ interface OoxmlContentControlDropDownListNode extends OoxmlElementBase<readonly (OoxmlContentControlListItemNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
963
+ readonly kind: 'contentControlDropDownList';
964
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
965
+ readonly localName: 'dropDownList';
966
+ }
967
+ /** `w:comboBox` — same payload shape as dropdown; free entry is an editing concern. */
968
+ interface OoxmlContentControlComboBoxNode extends OoxmlElementBase<readonly (OoxmlContentControlListItemNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
969
+ readonly kind: 'contentControlComboBox';
970
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
971
+ readonly localName: 'comboBox';
972
+ }
973
+ /** `w:listItem` — `@w:displayText` / `@w:value` as preserved attributes (not `w:val`). */
974
+ interface OoxmlContentControlListItemNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
975
+ readonly kind: 'contentControlListItem';
976
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
977
+ readonly localName: 'listItem';
978
+ }
979
+ /**
980
+ * `w:date` — `@w:fullDate` plus typed dateFormat/lid/storeMappedDataAs/calendar leaves.
981
+ * Those leaves allow `w:val` (the only known kinds that do) so they are not demoted.
982
+ */
983
+ interface OoxmlContentControlDateNode extends OoxmlElementBase<readonly (OoxmlContentControlDateFormatNode | OoxmlContentControlLidNode | OoxmlContentControlStoreMappedDataAsNode | OoxmlContentControlCalendarNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
984
+ readonly kind: 'contentControlDate';
985
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
986
+ readonly localName: 'date';
987
+ }
988
+ /** `w:dateFormat` — the picture string a date picker formats its value with. */
989
+ interface OoxmlContentControlDateFormatNode extends OoxmlElementBase<readonly [], readonly (OoxmlKnownNodeAttribute | OoxmlWmlValAttribute)[]> {
990
+ readonly kind: 'contentControlDateFormat';
991
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
992
+ readonly localName: 'dateFormat';
993
+ }
994
+ /** `w:lid` — the language id a date picker parses and formats under. */
995
+ interface OoxmlContentControlLidNode extends OoxmlElementBase<readonly [], readonly (OoxmlKnownNodeAttribute | OoxmlWmlValAttribute)[]> {
996
+ readonly kind: 'contentControlLid';
997
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
998
+ readonly localName: 'lid';
999
+ }
1000
+ /** `w:storeMappedDataAs` — which representation a bound date is written to its XML part as. */
1001
+ interface OoxmlContentControlStoreMappedDataAsNode extends OoxmlElementBase<readonly [], readonly (OoxmlKnownNodeAttribute | OoxmlWmlValAttribute)[]> {
1002
+ readonly kind: 'contentControlStoreMappedDataAs';
1003
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
1004
+ readonly localName: 'storeMappedDataAs';
1005
+ }
1006
+ /** `w:calendar` — which calendar system a date picker uses (Gregorian, Hijri, …). */
1007
+ interface OoxmlContentControlCalendarNode extends OoxmlElementBase<readonly [], readonly (OoxmlKnownNodeAttribute | OoxmlWmlValAttribute)[]> {
1008
+ readonly kind: 'contentControlCalendar';
1009
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
1010
+ readonly localName: 'calendar';
1011
+ }
1012
+ /** `w:text` (`CT_SdtText`) — distinct from `w:t` (`kind: 'text'`). `@w:multiLine` preserved. */
1013
+ interface OoxmlContentControlTextNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
1014
+ readonly kind: 'contentControlText';
1015
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
1016
+ readonly localName: 'text';
1017
+ }
1018
+ /**
1019
+ * `w:dataBinding` — xpath / storeItemID / prefixMappings preserved as attributes.
1020
+ * This tree never resolves or fetches the binding target.
1021
+ */
1022
+ interface OoxmlContentControlDataBindingNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
1023
+ readonly kind: 'contentControlDataBinding';
1024
+ readonly namespaceUri: typeof WML_NAMESPACE_URI;
1025
+ readonly localName: 'dataBinding';
1026
+ }
1027
+ /**
1028
+ * `w14:checkbox` — Microsoft extension, not an ECMA-376 type choice. Distinguishable from
1029
+ * untyped rich-text controls that merely wrap a `w:sym`.
1030
+ */
1031
+ interface OoxmlContentControlCheckboxNode extends OoxmlElementBase<readonly (OoxmlContentControlCheckedNode | OoxmlContentControlCheckedStateNode | OoxmlContentControlUncheckedStateNode | OoxmlGenericElementNode)[], readonly OoxmlKnownNodeAttribute[]> {
1032
+ readonly kind: 'contentControlCheckbox';
1033
+ readonly namespaceUri: typeof W14_NAMESPACE_URI;
1034
+ readonly localName: 'checkbox';
1035
+ }
1036
+ /** `w14:checked` — a checkbox's recorded state, independent of the glyph drawn for it. */
1037
+ interface OoxmlContentControlCheckedNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
1038
+ readonly kind: 'contentControlChecked';
1039
+ readonly namespaceUri: typeof W14_NAMESPACE_URI;
1040
+ readonly localName: 'checked';
1041
+ }
1042
+ /** `w14:checkedState` — the font and code point drawn when a checkbox is checked. */
1043
+ interface OoxmlContentControlCheckedStateNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
1044
+ readonly kind: 'contentControlCheckedState';
1045
+ readonly namespaceUri: typeof W14_NAMESPACE_URI;
1046
+ readonly localName: 'checkedState';
1047
+ }
1048
+ /** `w14:uncheckedState` — the font and code point drawn when a checkbox is not checked. */
1049
+ interface OoxmlContentControlUncheckedStateNode extends OoxmlElementBase<readonly [], readonly OoxmlKnownNodeAttribute[]> {
1050
+ readonly kind: 'contentControlUncheckedState';
1051
+ readonly namespaceUri: typeof W14_NAMESPACE_URI;
1052
+ readonly localName: 'uncheckedState';
1053
+ }
1054
+ /**
1055
+ * Any element the typed vocabulary does not cover — the other half of the preservation model.
1056
+ *
1057
+ * Also where a KNOWN element lands when it appears somewhere invalid: an element is demoted to
1058
+ * generic rather than rejected, so malformed or unfamiliar content is carried losslessly and
1059
+ * never locks editing.
1060
+ */
1061
+ interface OoxmlGenericElementNode extends OoxmlElementBase<readonly OoxmlNode[]> {
1062
+ readonly kind: 'generic';
1063
+ }
1064
+ /** A literal text value. The only node kind with no children and no attributes. */
1065
+ interface OoxmlTextNode {
1066
+ readonly id: OoxmlNodeId;
1067
+ readonly kind: 'textValue';
1068
+ readonly value: string;
1069
+ }
1070
+ /** Every element node kind: the typed vocabulary plus the generic catch-all. */
1071
+ type OoxmlElement = OoxmlDocumentNode | OoxmlBodyNode | OoxmlParagraphNode | OoxmlRunNode | OoxmlHyperlinkNode | OoxmlBookmarkStartNode | OoxmlBookmarkEndNode | OoxmlRunPropertiesNode | OoxmlTextElementNode | OoxmlDeletedTextNode | OoxmlParagraphPropertiesNode | OoxmlTabNode | OoxmlHardBreakNode | OoxmlFldCharNode | OoxmlInstrTextNode | OoxmlFldSimpleNode | OoxmlFootnotesNode | OoxmlEndnotesNode | OoxmlNoteNode | OoxmlNoteReferenceNode | OoxmlNoteRefNode | OoxmlSeparatorNode | OoxmlContinuationSeparatorNode | OoxmlTableNode | OoxmlTableRowNode | OoxmlTableCellNode | OoxmlTableGridNode | OoxmlTablePropertiesNode | OoxmlRevisionContentNode | OoxmlRangeMarkerNode | OoxmlCommentReferenceNode | OoxmlCommentsNode | OoxmlCommentNode | OoxmlContentControlNode | OoxmlContentControlPropertiesNode | OoxmlContentControlEndPropertiesNode | OoxmlContentControlContentNode | OoxmlContentControlDropDownListNode | OoxmlContentControlComboBoxNode | OoxmlContentControlListItemNode | OoxmlContentControlDateNode | OoxmlContentControlDateFormatNode | OoxmlContentControlLidNode | OoxmlContentControlStoreMappedDataAsNode | OoxmlContentControlCalendarNode | OoxmlContentControlTextNode | OoxmlContentControlDataBindingNode | OoxmlContentControlCheckboxNode | OoxmlContentControlCheckedNode | OoxmlContentControlCheckedStateNode | OoxmlContentControlUncheckedStateNode | OoxmlDrawingNode | OoxmlInlineDrawingNode | OoxmlAnchoredDrawingNode | OoxmlDrawingExtentNode | OoxmlDrawingEffectExtentNode | OoxmlDrawingDocPrNode | OoxmlDrawingGraphicFramePrNode | OoxmlDrawingGraphicNode | OoxmlDrawingGraphicDataNode | OoxmlDrawingSimplePosNode | OoxmlDrawingPositionHNode | OoxmlDrawingPositionVNode | OoxmlDrawingPositionAlignNode | OoxmlDrawingPositionOffsetNode | OoxmlDrawingWrapNoneNode | OoxmlDrawingWrapSquareNode | OoxmlDrawingWrapTightNode | OoxmlDrawingWrapThroughNode | OoxmlDrawingWrapTopBottomNode | OoxmlDrawingWrapPolygonNode | OoxmlDrawingWrapPolygonStartNode | OoxmlDrawingWrapPolygonLineToNode | OoxmlPictureNode | OoxmlPictureNvPicPrNode | OoxmlPictureBlipFillNode | OoxmlPictureBlipNode | OoxmlPictureSrcRectNode | OoxmlPictureStretchNode | OoxmlPictureTileNode | OoxmlPictureShapePropertiesNode | OoxmlPictureTransformNode | OoxmlPictureTransformOffsetNode | OoxmlPictureTransformExtentNode | OoxmlPicturePresetGeometryNode | OoxmlGenericElementNode;
1072
+ /**
1073
+ * Any node in the canonical tree.
1074
+ *
1075
+ * Typed where layout needs structure, generic everywhere else — one tree carries a whole document
1076
+ * whether or not the engine understands every part of it.
1077
+ */
1078
+ type OoxmlNode = OoxmlElement | OoxmlTextNode;
1079
+ /** One XML part of the package, parsed into a canonical tree. */
1080
+ interface OoxmlPart {
1081
+ readonly id: string;
1082
+ /** Canonical part name, e.g. `/word/document.xml`. */
1083
+ readonly name: string;
1084
+ readonly contentType: string;
1085
+ readonly root: OoxmlElement;
1086
+ }
1087
+ /** A part's identity without its tree — enough to enumerate a package cheaply. */
1088
+ interface OoxmlPartMetadata {
1089
+ readonly name: string;
1090
+ readonly contentType: string;
1091
+ }
1092
+ /**
1093
+ * Why a part could not be read into a tree.
1094
+ *
1095
+ * Widens the XML-level rejections with the tree-level ones. All of them describe the FILE, which
1096
+ * is why reading returns a result rather than throwing.
1097
+ */
1098
+ type OoxmlReadRejection = XmlRejection | 'missing-root' | 'multiple-roots' | 'invalid-name' | 'invalid-namespace' | 'undeclared-prefix' | 'duplicate-expanded-attribute';
1099
+ /** A parsed part, or a typed refusal. Never throws — the input is untrusted by definition. */
1100
+ type OoxmlReadResult = {
1101
+ readonly ok: true;
1102
+ readonly part: OoxmlPart;
1103
+ } | {
1104
+ readonly ok: false;
1105
+ readonly reason: OoxmlReadRejection;
1106
+ };
1107
+ /**
1108
+ * The node-identity contract, written down as a type so it is checkable rather than merely
1109
+ * documented.
1110
+ *
1111
+ * Ids are deterministic from a normalized parse, retained through structural sharing, explicit on
1112
+ * replacement, and unique within a part. Everything that addresses nodes — ops, the caret, the
1113
+ * paraId bimap — depends on all four holding.
1114
+ */
1115
+ interface OoxmlNodeIdentityRules {
1116
+ readonly initial: 'deterministic-structural-path-after-normalized-parse';
1117
+ readonly unchanged: 'retain-id-through-structural-sharing';
1118
+ readonly replacement: 'explicitly-retain-or-allocate';
1119
+ readonly uniqueness: 'unique-within-part';
1120
+ }
1121
+ /**
1122
+ * Identity policy for future immutable tree edits. This defines the boundary
1123
+ * without implementing task 2.4 edit primitives.
1124
+ */
1125
+ declare const OOXML_NODE_IDENTITY_RULES: OoxmlNodeIdentityRules;
1126
+ /** What a tree invariant walk found wrong. Each names a rule the canonical tree must satisfy. */
1127
+ type OoxmlInvariantIssueCode = 'invalid-id' | 'duplicate-id' | 'invalid-name' | 'invalid-namespace' | 'invalid-qname' | 'duplicate-expanded-attribute' | 'invalid-xml-value' | 'known-node-invariant';
1128
+ /** One invariant violation, located by structural path and node id. */
1129
+ interface OoxmlInvariantIssue {
1130
+ readonly code: OoxmlInvariantIssueCode;
1131
+ readonly path: string;
1132
+ readonly nodeId?: string;
1133
+ }
1134
+ /** Whether a tree satisfies its invariants, listing every violation when it does not. */
1135
+ type OoxmlInvariantResult = {
1136
+ readonly ok: true;
1137
+ } | {
1138
+ readonly ok: false;
1139
+ readonly issues: readonly OoxmlInvariantIssue[];
1140
+ };
1141
+ /**
1142
+ * Read one XML part into the additive typed/generic foundation. Existing package
1143
+ * parsing and DocumentStore models intentionally remain unchanged until their
1144
+ * later migration tasks; this tree is not yet the repository's sole runtime authority.
1145
+ * Structural-path IDs are deterministic across normalized reopen. Preserving an
1146
+ * identity through moves and edits is deferred to PackageModel/DocumentStore integration.
1147
+ */
1148
+ declare function readOoxmlPart(xml: string, metadata: OoxmlPartMetadata, limits?: XmlLimits): OoxmlReadResult;
1149
+
1150
+ /**
1151
+ * Why a zip was refused at the trust boundary.
1152
+ *
1153
+ * `too-large` and `too-many-entries` are the zip-bomb guards; `bad-name` catches path traversal —
1154
+ * an entry with `..` or a leading `/` is rejected rather than normalized.
1155
+ */
1156
+ type ZipRejection = 'too-many-entries' | 'too-large' | 'bad-name' | 'inflate-error';
1157
+ /** Archive caps: entry count, total decompressed bytes, and the decompression ratio. */
1158
+ interface ZipLimits {
1159
+ readonly maxEntries: number;
1160
+ /** Max total UNCOMPRESSED bytes across the archive. */
1161
+ readonly maxTotalBytes: number;
1162
+ /** Max per-entry uncompressed:compressed ratio (zip-bomb guard). */
1163
+ readonly maxRatio?: number;
1164
+ }
1165
+ /** The archive caps in force when a host configures none. Conservative and finite. */
1166
+ declare const DEFAULT_ZIP_LIMITS: ZipLimits;
1167
+ /** The read entries, or the typed refusal. Never throws — the bytes are untrusted. */
1168
+ type ZipReadResult = {
1169
+ readonly ok: true;
1170
+ readonly entries: ReadonlyMap<string, Uint8Array>;
1171
+ } | {
1172
+ readonly ok: false;
1173
+ readonly reason: ZipRejection;
1174
+ readonly detail?: string;
1175
+ };
1176
+ /**
1177
+ * Inflate a ZIP archive with bounds + OPC name normalization. Entry name, count,
1178
+ * compression-ratio, and total-uncompressed-size limits are enforced BEFORE each
1179
+ * entry is decompressed (via fflate's pre-inflation filter), so a zip bomb or a
1180
+ * traversal name is rejected without ever being inflated. Keys are canonical part
1181
+ * names.
1182
+ */
1183
+ declare function readZip(bytes: Uint8Array, limits?: ZipLimits): ZipReadResult;
1184
+ /** Deflate a set of canonical-part-name -> bytes into a ZIP archive. Every part name
1185
+ * is re-validated through the OPC normalization profile before writing, so a
1186
+ * traversal/encoded/normalized-alias name from an untrusted serialized model can
1187
+ * never be smuggled into a ZIP entry (write-side path-traversal guard). */
1188
+ declare function writeZip(entries: ReadonlyMap<string, Uint8Array>): Uint8Array;
1189
+
59
1190
  /** The relationship namespace `r:id` lives in. */
60
1191
  declare const OFFICE_RELATIONSHIP_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
61
1192
  /** The `Type` a hyperlink relationship declares. */
@@ -528,6 +1659,79 @@ declare function imageResourceLookupFor(pkg: OoxmlPackage, options: CreateImageR
528
1659
  /** Build the per-document image cache. Validated bytes only; refusals are remembered too. */
529
1660
  declare function createImageResourceCache(initialPkg: OoxmlPackage, options: CreateImageResourceCacheOptions): ImageResourceLookup;
530
1661
 
1662
+ /** Caps applied while loading a package: zip, XML, part count and relationship count. */
1663
+ interface OoxmlPackageLimits {
1664
+ readonly zip?: ZipLimits;
1665
+ readonly xml?: XmlLimits;
1666
+ /** Cap on parts converted into canonical trees (N/N+1 gate, not a soft target). */
1667
+ readonly maxXmlParts?: number;
1668
+ /** Cap on relationship records across every rels part. */
1669
+ readonly maxRelationships?: number;
1670
+ }
1671
+ /** The limits in force when a host configures none. Conservative and finite. */
1672
+ declare const DEFAULT_OOXML_PACKAGE_LIMITS: Required<Pick<OoxmlPackageLimits, 'maxXmlParts' | 'maxRelationships'>>;
1673
+ /**
1674
+ * An external relationship target. Retained verbatim as authored evidence, with the
1675
+ * sink-safety verdict alongside it. Never resolved against the package, never fetched.
1676
+ */
1677
+ interface OoxmlExternalTarget {
1678
+ readonly ownerPart: string;
1679
+ readonly id: string;
1680
+ readonly type: string;
1681
+ readonly rawTarget: string;
1682
+ /** False when the target is not a safe sink (javascript:, file:, ...). Still not fetched. */
1683
+ readonly sinkSafe: boolean;
1684
+ }
1685
+ /**
1686
+ * A loaded package: every XML part as a canonical tree, plus the non-XML parts kept verbatim.
1687
+ *
1688
+ * The preservation model in one value. Modelled parts re-emit normalized; everything else is
1689
+ * byte-identical, which is why an unrecognized part never costs a document anything.
1690
+ */
1691
+ interface OoxmlPackage {
1692
+ /** Canonical trees, keyed by canonical part name. Non-XML parts are absent by design. */
1693
+ readonly parts: ReadonlyMap<string, OoxmlPart>;
1694
+ /** Raw bytes of every entry, including the non-XML parts that have no tree. */
1695
+ readonly partBytes: ReadonlyMap<string, Uint8Array>;
1696
+ /** Internal relationships by owner part, in authored order. */
1697
+ readonly relationships: ReadonlyMap<string, readonly RelationshipRecord[]>;
1698
+ readonly externalTargets: readonly OoxmlExternalTarget[];
1699
+ readonly contentTypes: ContentTypeIndex;
1700
+ /** Canonical name of the part the root `officeDocument` relationship points at. */
1701
+ readonly mainDocumentPart: string;
1702
+ }
1703
+ /** Why a package could not be loaded. Every code describes the FILE, not the caller. */
1704
+ type OoxmlPackageRejection = ZipRejection | OoxmlReadRejection | 'no-content-types' | 'bad-content-types' | 'no-main-document' | 'bad-relationship-target' | 'duplicate-relationship-id' | 'too-many-relationships' | 'too-many-xml-parts';
1705
+ /** A loaded package, or a typed refusal. Never throws. */
1706
+ type OoxmlPackageResult = {
1707
+ readonly ok: true;
1708
+ readonly package: OoxmlPackage;
1709
+ } | {
1710
+ readonly ok: false;
1711
+ readonly reason: OoxmlPackageRejection;
1712
+ readonly detail?: string;
1713
+ };
1714
+ declare function readOoxmlPackage(bytes: Uint8Array, limits?: OoxmlPackageLimits): OoxmlPackageResult;
1715
+ /**
1716
+ * Serialize a canonical package back to DOCX bytes.
1717
+ *
1718
+ * Starts from the ORIGINAL entry bytes and overwrites only the parts held as trees. A part
1719
+ * the loader did not model — media, fonts, an XML part outside the modeled set — passes
1720
+ * through untouched, so round-tripping a document cannot lose a part the engine never
1721
+ * claimed to understand.
1722
+ *
1723
+ * The modeled parts are re-emitted NORMALIZED from the tree rather than patched as text.
1724
+ * That is the whole point of the canonical tree: correctness is judged by the two D9
1725
+ * oracles (the namespace-aware fingerprint and the save/reopen semantic digest), not by
1726
+ * byte equality, so a different-but-equivalent spelling is not a defect.
1727
+ *
1728
+ * `writeZip` re-validates every part name, so a name that became unsafe between load and
1729
+ * save cannot be smuggled into the archive.
1730
+ */
1731
+ declare function writeOoxmlPackage(pkg: OoxmlPackage): Uint8Array;
1732
+ /** Replace one part's tree, returning a new package. Pure, like the tree edits themselves. */
1733
+ declare function withPart(pkg: OoxmlPackage, part: OoxmlPart): OoxmlPackage;
1734
+
531
1735
  /** How deep controls may nest before a walk stops descending. Shared by every lane. */
532
1736
  declare const MAX_CONTENT_CONTROL_NESTING = 32;
533
1737
  /** Cap on controls one walk reports, so a hostile file cannot make a read unbounded. */
@@ -737,13 +1941,20 @@ declare const CONTENT_CONTROL_PROPERTY_ORDER: readonly string[];
737
1941
  */
738
1942
  declare function orderedContentControlProperties(children: readonly OoxmlNode[]): readonly OoxmlNode[];
739
1943
  /**
740
- * The next `w:id` to write, seeded from the document's own maximum plus one.
1944
+ * The next `w:id` to write.
1945
+ *
1946
+ * Solo: one past the document's own maximum. Never a clock, a timestamp, a random source
1947
+ * or a hash: those collide with ids already in the file and produce values Word rejects.
1948
+ * Null when the document already reaches the signed 32-bit bound, so the caller refuses
1949
+ * rather than wrapping into a negative id. Hostile or out-of-range existing values are
1950
+ * ignored for seeding rather than counted past.
741
1951
  *
742
- * Never a clock, a timestamp, a random source or a hash: those collide with ids already
743
- * in the file and produce values Word rejects. Null when the document already reaches the
744
- * signed 32-bit bound, so the caller refuses rather than wrapping into a negative id.
1952
+ * When a collaboration actor is bound (explicit argument or the open store transaction),
1953
+ * the next id is the next unused value in that actor's stripe. Two peers inserting a
1954
+ * generic content control — including a custom node authored as `w:sdt` — from the same
1955
+ * snapshot then cannot share a `w:id`.
745
1956
  */
746
- declare function allocateContentControlId(root: OoxmlNode): number | null;
1957
+ declare function allocateContentControlId(root: OoxmlNode, actorId?: string): number | null;
747
1958
 
748
1959
  /** The value a control accepts, by what kind of control it is. */
749
1960
  type ContentControlValueInput = {
@@ -783,6 +1994,29 @@ declare const TABLE_BORDER_STYLES: readonly ["single", "dashed", "dotted", "doub
783
1994
  */
784
1995
  type TableBorderStyle = (typeof TABLE_BORDER_STYLES)[number];
785
1996
 
1997
+ /**
1998
+ * How a tracked change is addressed: `@w:id`, `@w:author` and `@w:date` together, within a
1999
+ * part.
2000
+ *
2001
+ * All of them, always. `@w:id` is unique only within a part, so an id alone names two
2002
+ * revisions in any package with a header or a comments part — and it is not author-scoped
2003
+ * either, so `(part, id)` would merge two authors' distinct revisions. One logical revision is
2004
+ * also deliberately many elements sharing an id, as a tracked row insertion is, which no
2005
+ * uniqueness rule could express.
2006
+ */
2007
+ interface RevisionAddress {
2008
+ readonly id: string;
2009
+ readonly author: string;
2010
+ /** Absent when the file wrote no `@w:date`; part of the identity either way. */
2011
+ readonly date?: string;
2012
+ }
2013
+ /** The author and timestamp a tracked edit is recorded under. */
2014
+ interface RevisionAttributionInput {
2015
+ readonly author: string;
2016
+ /** ISO-8601. Omitted writes no `@w:date`. */
2017
+ readonly date?: string;
2018
+ }
2019
+
786
2020
  /** JSON-safe color input carried on table cell property ops. Theme/auto require a validated literal. */
787
2021
  /**
788
2022
  * A colour as an op carries it: a literal, a theme reference, or automatic.
@@ -1772,8 +3006,11 @@ type TreeOpRejection = 'unknown-op' | 'unknown-paragraph' | 'not-a-paragraph' |
1772
3006
  | 'unknown-row'
1773
3007
  /** A table property container appears more than once on a typed node. */
1774
3008
  | 'duplicate-property-container'
1775
- /** Row insertion would split an active vertical-merge chain. */
1776
- | 'vertical-merge-crossing'
3009
+ /**
3010
+ * A row holds a `w:tc` inside a cell-level wrapper such as `w:sdt`, so the row's grid
3011
+ * mapping cannot be trusted and the inserted row would not match it.
3012
+ */
3013
+ | 'row-hides-cell'
1777
3014
  /** Column edit refused because the table carries horizontal or vertical merges. */
1778
3015
  | 'table-has-merge'
1779
3016
  /** The addressed grid column id is missing or ambiguous without `w:tblGrid`. */
@@ -1813,4 +3050,4 @@ type TreeOpResult = {
1813
3050
  readonly detail?: string;
1814
3051
  };
1815
3052
 
1816
- export { type HyperlinkTarget as $, type ContentControlDataBinding as A, type ResourceLimits as B, type ContentControlKind as C, type DrawingKind as D, type TreeOpResult as E, ACCEPTED_PARAGRAPH_PROPERTIES as F, ACCEPTED_RUN_PROPERTIES as G, CONTENT_CONTROL_ID_MAX as H, type ImpactClass as I, CONTENT_CONTROL_PROPERTY_ORDER as J, type ContentControlCheckbox as K, type ContentControlCheckboxState as L, type ContentControlDateFormat as M, type ContentControlEntry as N, type OoxmlProperty as O, type PreservedImageMime as P, type ContentControlListItem as Q, type RenderableImageMime as R, type SourceCrop as S, type TreeDocOp as T, type ContentControlProperties as U, type ValidatedImageBytesHandle as V, type CreateImageResourceCacheOptions as W, DEFAULT_LIMITS as X, HARD_CEILINGS as Y, HYPERLINK_RELATIONSHIP_TYPE as Z, type HyperlinkKind as _, type TreeOpRejection as a, IMAGE_RESOURCE_HARD_CEILINGS as a0, type ImageResourceLookup as a1, MAX_CONTENT_CONTROLS_PER_PART as a2, MAX_CONTENT_CONTROL_NESTING as a3, MAX_SVG_SNIFF_BYTES as a4, OFFICE_RELATIONSHIP_NAMESPACE_URI as a5, type RelationshipTargetResolver as a6, TABLE_BORDER_STYLES as a7, TREE_DOC_OP_KINDS as a8, type TabStopWrite as a9, lockForbidsRemoval as aA, orderedContentControlProperties as aB, parseContentControlId as aC, projectDrawing as aD, resolveContentControlLock as aE, resolveLimits as aF, validateGifHeader as aG, validateJpegHeader as aH, validatePngHeader as aI, type TreeDocOpKind as aa, type TreeOpEffect as ab, type ValidatedRasterHeader as ac, allocateContentControlId as ad, contentControlContentChildren as ae, contentControlContentNodeOf as af, contentControlEndPropertiesNodeOf as ag, contentControlLevelOf as ah, contentControlPropertiesNodeOf as ai, contentControlPropertiesOf as aj, contentControlTextOf as ak, contentControlsIn as al, createImageResourceCache as am, findContentControl as an, flattenContentControls as ao, hasBoundedSvgRoot as ap, hyperlinkAnchorOf as aq, hyperlinkRelationshipIdOf as ar, hyperlinkTargetOf as as, imageResourceLookupFor as at, isContentControlContentNode as au, isContentControlNode as av, isContentControlWrapper as aw, isHyperlinkNode as ax, liveDrawingReferenceCount as ay, lockForbidsEdit as az, type ImageWrapTarget as b, type SupportedImageMime as c, type DrawingPositionInput as d, type DrawingLocks as e, type ImageResourceState as f, type DrawingHorizontalReferenceFrame as g, type DrawingVerticalReferenceFrame as h, type VectorImageMime as i, type ImageDecodePort as j, type DrawingTreeDocOp as k, type TreeDocColorValue as l, DEFAULT_IMAGE_RESOURCE_LIMITS as m, IMAGE_WRAP_TARGETS as n, type ImageResourceLimits as o, resolveSvgIntrinsicSize as p, type DrawingAccessibility as q, resolveImageResourceLimits as r, sniffImageMime as s, type DrawingTransform as t, type VectorShapeProjection as u, validateRasterHeader as v, type DrawingProjection as w, type TableBorderStyle as x, type ContentControlLevel as y, type ContentControlLock as z };
3053
+ export { type ContentControlKind as $, type DrawingVerticalReferenceFrame as A, type VectorImageMime as B, type ImageDecodePort as C, type DrawingKind as D, type RevisionAttributionInput as E, type DrawingTreeDocOp as F, type TreeDocColorValue as G, DEFAULT_IMAGE_RESOURCE_LIMITS as H, type ImpactClass as I, IMAGE_WRAP_TARGETS as J, type ImageResourceLimits as K, resolveImageResourceLimits as L, resolveSvgIntrinsicSize as M, sniffImageMime as N, type OoxmlPart as O, type PreservedImageMime as P, validateRasterHeader as Q, type RevisionAddress as R, type SourceCrop as S, type TreeDocOp as T, type DrawingAccessibility as U, type ValidatedImageBytesHandle as V, type DrawingTransform as W, type VectorShapeProjection as X, type DrawingProjection as Y, type OoxmlDrawingNode as Z, type TableBorderStyle as _, type OoxmlNode as a, type OoxmlContentControlStoreMappedDataAsNode as a$, type ContentControlLevel as a0, type ContentControlLock as a1, type ContentControlDataBinding as a2, type ResourceLimits as a3, type OoxmlInvariantResult as a4, type RelationshipRecord as a5, type OoxmlInvariantIssue as a6, type OoxmlHardBreakNode as a7, type OoxmlFldCharNode as a8, type OoxmlFldSimpleNode as a9, IMAGE_RESOURCE_HARD_CEILINGS as aA, type ImageRelationshipResolution as aB, type ImageResourceLookup as aC, type IndexResult as aD, MAX_CONTENT_CONTROLS_PER_PART as aE, MAX_CONTENT_CONTROL_NESTING as aF, MAX_SVG_SNIFF_BYTES as aG, type NameRejection as aH, type NameResult as aI, OFFICE_RELATIONSHIP_NAMESPACE_URI as aJ, OOXML_NODE_IDENTITY_RULES as aK, type OoxmlBodyNode as aL, type OoxmlBookmarkEndNode as aM, type OoxmlBookmarkStartNode as aN, type OoxmlContentControlCalendarNode as aO, type OoxmlContentControlCheckboxNode as aP, type OoxmlContentControlCheckedNode as aQ, type OoxmlContentControlCheckedStateNode as aR, type OoxmlContentControlComboBoxNode as aS, type OoxmlContentControlDataBindingNode as aT, type OoxmlContentControlDateFormatNode as aU, type OoxmlContentControlDateNode as aV, type OoxmlContentControlDropDownListNode as aW, type OoxmlContentControlEndPropertiesNode as aX, type OoxmlContentControlLidNode as aY, type OoxmlContentControlListItemNode as aZ, type OoxmlContentControlPropertiesNode as a_, type OoxmlInstrTextNode as aa, type OoxmlAttribute as ab, type TreeOpResult as ac, ACCEPTED_PARAGRAPH_PROPERTIES as ad, ACCEPTED_RUN_PROPERTIES as ae, CONTENT_CONTROL_ID_MAX as af, CONTENT_CONTROL_PROPERTY_ORDER as ag, type ContentControlCheckbox as ah, type ContentControlCheckboxState as ai, type ContentControlDateFormat as aj, type ContentControlEntry as ak, type ContentControlListItem as al, type ContentControlProperties as am, type ContentTypeError as an, type ContentTypeIndex as ao, type ContentTypeRecords as ap, type CreateImageResourceCacheOptions as aq, DEFAULT_LIMITS as ar, DEFAULT_OOXML_PACKAGE_LIMITS as as, DEFAULT_ZIP_LIMITS as at, type DefaultRecord as au, HARD_CEILINGS as av, HYPERLINK_RELATIONSHIP_TYPE as aw, type HyperlinkKind as ax, type HyperlinkTarget as ay, IMAGE_RELATIONSHIP_TYPE as az, type OoxmlPackage as b, flattenContentControls as b$, type OoxmlContentControlTextNode as b0, type OoxmlContentControlUncheckedStateNode as b1, type OoxmlDocumentNode as b2, type OoxmlExternalTarget as b3, type OoxmlGenericExtensionAttribute as b4, type OoxmlHyperlinkNode as b5, type OoxmlInvariantIssueCode as b6, type OoxmlKnownNodeAttribute as b7, type OoxmlNamespaceBinding as b8, type OoxmlNodeIdentityRules as b9, XMLNS_NAMESPACE_URI as bA, XML_NAMESPACE_URI as bB, type XmlLimits as bC, type XmlNode as bD, type XmlRejection as bE, type XmlResult as bF, type ZipLimits as bG, type ZipReadResult as bH, type ZipRejection as bI, allocateContentControlId as bJ, asciiFold as bK, buildContentTypeIndex as bL, buildRelationshipSet as bM, childElements as bN, contentControlContentChildren as bO, contentControlContentNodeOf as bP, contentControlEndPropertiesNodeOf as bQ, contentControlLevelOf as bR, contentControlPropertiesNodeOf as bS, contentControlPropertiesOf as bT, contentControlTextOf as bU, contentControlsIn as bV, createImageResourceCache as bW, detectDuplicateNames as bX, extensionKey as bY, findContentControl as bZ, findElement as b_, type OoxmlPackageResult as ba, type OoxmlParagraphPropertiesNode as bb, type OoxmlPartMetadata as bc, type OoxmlReadRejection as bd, type OoxmlReadResult as be, type OoxmlRunNode as bf, type OoxmlRunPropertiesNode as bg, type OoxmlTabNode as bh, type OoxmlTextElementNode as bi, type OoxmlTextNode as bj, type OoxmlWmlValAttribute as bk, type OoxmlXmlSpaceAttribute as bl, type OverrideRecord as bm, type RelationshipError as bn, type RelationshipSetResult as bo, type RelationshipTargetResolver as bp, type ResolveResult as bq, type ResolvedRelationship as br, TABLE_BORDER_STYLES as bs, TREE_DOC_OP_KINDS as bt, type TabStopWrite as bu, type TargetMode as bv, type TreeDocOpKind as bw, type TreeOpEffect as bx, type ValidatedRasterHeader as by, WML_NAMESPACE_URI as bz, type OoxmlNodeId as c, hasBoundedSvgRoot as c0, hyperlinkAnchorOf as c1, hyperlinkRelationshipIdOf as c2, hyperlinkTargetOf as c3, imageResourceLookupFor as c4, isContentControlContentNode as c5, isContentControlNode as c6, isContentControlWrapper as c7, isContentRevisionKind as c8, isHyperlinkNode as c9, withPart as cA, writeOoxmlPackage as cB, writeZip as cC, isRangeMarkerKind as ca, isValidMime as cb, liveDrawingReferenceCount as cc, lockForbidsEdit as cd, lockForbidsRemoval as ce, normalizePartName as cf, orderedContentControlProperties as cg, parseContentControlId as ch, partNameKey as ci, projectDrawing as cj, readOnOffChild as ck, readOoxmlPackage as cl, readOoxmlPart as cm, readXml as cn, readZip as co, resolveContentControlLock as cp, resolveContentType as cq, resolveImageRelationship as cr, resolveInternalTarget as cs, resolveLimits as ct, resolveRelationship as cu, textContent as cv, validateExternalTarget as cw, validateGifHeader as cx, validateJpegHeader as cy, validatePngHeader as cz, type OoxmlGenericElementNode as d, type OoxmlPackageLimits as e, type OoxmlPackageRejection as f, type OoxmlElement as g, type OoxmlContentControlNode as h, type OoxmlContentControlContentNode as i, type OoxmlParagraphNode as j, type OoxmlNoteNode as k, type OoxmlContinuationSeparatorNode as l, type OoxmlEndnotesNode as m, type OoxmlFootnotesNode as n, type OoxmlNoteRefNode as o, type OoxmlNoteReferenceNode as p, type OoxmlSeparatorNode as q, type TreeOpRejection as r, type OoxmlProperty as s, type RenderableImageMime as t, type ImageWrapTarget as u, type DrawingPositionInput as v, type DrawingLocks as w, type ImageResourceState as x, type SupportedImageMime as y, type DrawingHorizontalReferenceFrame as z };