@docx-editor.dev/core 2.4.1 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.cts +6 -6
- package/dist/automation.d.ts +6 -6
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.cts +12 -12
- package/dist/binding.d.ts +12 -12
- package/dist/binding.js +1 -1
- package/dist/chunk-2GSRLGUI.cjs +10 -0
- package/dist/chunk-2QIA75K3.js +2 -0
- package/dist/chunk-32NXPFYL.js +5 -0
- package/dist/chunk-3C533HSQ.cjs +18 -0
- package/dist/{chunk-YMIMLEX4.cjs → chunk-3FRSOOND.cjs} +1 -1
- package/dist/chunk-45FL7KH4.js +1 -0
- package/dist/chunk-7GYF33B5.cjs +2 -0
- package/dist/chunk-H3DZP4LE.cjs +5 -0
- package/dist/chunk-IJ4V3LGV.cjs +2 -0
- package/dist/chunk-JDHTCMFA.cjs +2 -0
- package/dist/chunk-L2GMLEHX.cjs +14 -0
- package/dist/chunk-LJIX4ZDF.js +10 -0
- package/dist/chunk-QUZM6LWQ.js +14 -0
- package/dist/chunk-T252F4US.js +18 -0
- package/dist/chunk-UVIUNAQ6.js +2 -0
- package/dist/chunk-YTZIGUXT.js +2 -0
- package/dist/{content-control-walk-CbTqHq6O.d.cts → content-control-walk-BeAFh6Xi.d.cts} +1 -1
- package/dist/{content-control-walk-D06GijR0.d.ts → content-control-walk-CQp8l6eS.d.ts} +1 -1
- package/dist/contracts/editor.d.cts +9 -9
- package/dist/contracts/editor.d.ts +9 -9
- package/dist/contracts/interaction.d.cts +9 -9
- package/dist/contracts/interaction.d.ts +9 -9
- package/dist/contracts/modules.d.cts +5 -5
- package/dist/contracts/modules.d.ts +5 -5
- package/dist/{custom-node-writes-BkMgMXxs.d.ts → custom-node-writes-2clI36T9.d.ts} +22 -7
- package/dist/{custom-node-writes-C5YRoPcc.d.cts → custom-node-writes-CIC_-wad.d.cts} +22 -7
- package/dist/{editor-DYvC9CZs.d.cts → editor-CUul9IuY.d.cts} +22 -5
- package/dist/{editor-D1qHfzOt.d.ts → editor-DIwctMcU.d.ts} +22 -5
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +32 -0
- package/dist/editor.d.cts +24 -24
- package/dist/editor.d.ts +24 -24
- package/dist/editor.js +1 -1
- package/dist/{hf-references-CgEOSw3i.d.cts → hf-references-BPET4tlK.d.cts} +2 -2
- package/dist/{hf-references-BdjsQNE_.d.ts → hf-references-CAp1xTv6.d.ts} +2 -2
- package/dist/{image-resources-DXvPZvXD.d.cts → image-resources-CSlQmPIm.d.cts} +10 -10
- package/dist/{image-resources-BG9DLyW7.d.ts → image-resources-e13t-pgy.d.ts} +10 -10
- package/dist/{index-Bb-QAg_f.d.cts → index-8t44iXTY.d.cts} +79 -14
- package/dist/{index-DpY3WZuP.d.ts → index-BUsYjxF5.d.ts} +79 -14
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +18 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +114 -50
- package/dist/layout.d.ts +114 -50
- package/dist/layout.js +1 -1
- package/dist/{note-nodes-C6DLxlvj.d.cts → note-nodes-B2wWES2L.d.cts} +1 -1
- package/dist/{note-nodes-BPSTVDMr.d.ts → note-nodes-CZQXU6Fg.d.ts} +1 -1
- package/dist/{review-reads-CQmU9Lcl.d.ts → note-properties-BS66XmcC.d.ts} +91 -67
- package/dist/{review-reads-CxgN62yp.d.cts → note-properties-Dhqkro--.d.cts} +91 -67
- package/dist/{ooxml-package-D_CtywTW.d.ts → ooxml-package-BrxTmTsZ.d.ts} +115 -115
- package/dist/{ooxml-package-CR5us6ad.d.cts → ooxml-package-Cmbe_M04.d.cts} +115 -115
- package/dist/{ooxml-tree-BU0e3DVi.d.cts → ooxml-tree-CG0odFyi.d.cts} +1 -1
- package/dist/{ooxml-tree-BU0e3DVi.d.ts → ooxml-tree-CG0odFyi.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +7 -7
- package/dist/output.d.ts +7 -7
- package/dist/output.js +1 -1
- package/dist/{protocol-CD7slqvl.d.cts → protocol-B5oSt08P.d.cts} +2 -2
- package/dist/{protocol-DsbfgBwA.d.ts → protocol-ooK7PAXz.d.ts} +2 -2
- package/dist/{review-support-DgXTIYBW.d.ts → review-support-Bl9sN8cv.d.ts} +47 -3
- package/dist/{review-support-BJ-YjGmD.d.cts → review-support-CHuJxHmz.d.cts} +47 -3
- package/dist/{revision-projection-DHAkcD_L.d.ts → revision-projection-DRZMzoLD.d.cts} +54 -3
- package/dist/{revision-projection-72ZApe-g.d.cts → revision-projection-u4nT52xT.d.ts} +54 -3
- package/dist/{semantic-cell-selection-DZtyMXkH.d.ts → semantic-cell-selection-CdNQ-a9-.d.cts} +8 -5
- package/dist/{semantic-cell-selection--ezfezTe.d.cts → semantic-cell-selection-Dc-_enhm.d.ts} +8 -5
- package/dist/{semantic-interaction-DrgbgKg6.d.ts → semantic-interaction-CCVwyw2A.d.ts} +2 -30
- package/dist/{semantic-interaction-2yxdv7q0.d.cts → semantic-interaction-DgaWs-5w.d.cts} +2 -30
- package/dist/{semantic-paint-BYjE0Xbl.d.cts → semantic-paint-6iIB4fhx.d.cts} +2 -2
- package/dist/{semantic-paint-BedBxkyY.d.ts → semantic-paint-CKIbFkQ7.d.ts} +2 -2
- package/dist/{semantic-records-CR5hTqMK.d.ts → semantic-records-B-qbrnp2.d.ts} +107 -9
- package/dist/{semantic-records-DSD8WENa.d.cts → semantic-records-Dq8SlCY8.d.cts} +107 -9
- package/dist/{shaped-measurer-BL8g4AcW.d.ts → shaped-measurer-BT4FqYe9.d.ts} +1 -1
- package/dist/{shaped-measurer-CBOTJTV_.d.cts → shaped-measurer-Dx4llNhK.d.cts} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +254 -231
- package/dist/store.d.ts +254 -231
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-8a6xyRCN.d.ts → tree-op-types-CZw9QhWX.d.ts} +219 -219
- package/dist/{tree-op-types-EZXbR8bW.d.cts → tree-op-types-DOYNkKqD.d.cts} +219 -219
- package/dist/{tree-session-SucW0znF.d.ts → tree-session-CF_EOhTW.d.ts} +14 -8
- package/dist/{tree-session-DrMm8Cj2.d.cts → tree-session-CtK3KgFU.d.cts} +14 -8
- package/dist/{tree-store-BoM6eXaL.d.ts → tree-store-9TaX-L0V.d.ts} +31 -4
- package/dist/{tree-store-UYrGKF_Q.d.cts → tree-store-Jg-q7fyf.d.cts} +31 -4
- package/package.json +3 -3
- package/dist/chunk-33F6TRXO.js +0 -2
- package/dist/chunk-4WWEDTTE.js +0 -2
- package/dist/chunk-BS554B6D.cjs +0 -2
- package/dist/chunk-DQ5HGUWG.cjs +0 -12
- package/dist/chunk-EQO762XH.cjs +0 -10
- package/dist/chunk-F6WNPYOM.js +0 -2
- package/dist/chunk-FL4GWK76.js +0 -12
- package/dist/chunk-GWG5IVVX.cjs +0 -5
- package/dist/chunk-IZIL6BAW.cjs +0 -12
- package/dist/chunk-LIJPSHRA.js +0 -5
- package/dist/chunk-MHDO6HLI.cjs +0 -2
- package/dist/chunk-SG7OH2EK.js +0 -12
- package/dist/chunk-TCX3PVWR.js +0 -10
- package/dist/chunk-YTYKNA6X.cjs +0 -2
- package/dist/chunk-ZACHY6OS.js +0 -1
|
@@ -1,4 +1,44 @@
|
|
|
1
|
-
import { e as OoxmlPart, X as XmlLimits, n as OoxmlReadRejection } from './ooxml-tree-
|
|
1
|
+
import { e as OoxmlPart, X as XmlLimits, n as OoxmlReadRejection } from './ooxml-tree-CG0odFyi.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Why a zip was refused at the trust boundary.
|
|
5
|
+
*
|
|
6
|
+
* `too-large` and `too-many-entries` are the zip-bomb guards; `bad-name` catches path traversal —
|
|
7
|
+
* an entry with `..` or a leading `/` is rejected rather than normalized.
|
|
8
|
+
*/
|
|
9
|
+
type ZipRejection = 'too-many-entries' | 'too-large' | 'bad-name' | 'inflate-error';
|
|
10
|
+
/** Archive caps: entry count, total decompressed bytes, and the decompression ratio. */
|
|
11
|
+
interface ZipLimits {
|
|
12
|
+
readonly maxEntries: number;
|
|
13
|
+
/** Max total UNCOMPRESSED bytes across the archive. */
|
|
14
|
+
readonly maxTotalBytes: number;
|
|
15
|
+
/** Max per-entry uncompressed:compressed ratio (zip-bomb guard). */
|
|
16
|
+
readonly maxRatio?: number;
|
|
17
|
+
}
|
|
18
|
+
/** The archive caps in force when a host configures none. Conservative and finite. */
|
|
19
|
+
declare const DEFAULT_ZIP_LIMITS: ZipLimits;
|
|
20
|
+
/** The read entries, or the typed refusal. Never throws — the bytes are untrusted. */
|
|
21
|
+
type ZipReadResult = {
|
|
22
|
+
readonly ok: true;
|
|
23
|
+
readonly entries: ReadonlyMap<string, Uint8Array>;
|
|
24
|
+
} | {
|
|
25
|
+
readonly ok: false;
|
|
26
|
+
readonly reason: ZipRejection;
|
|
27
|
+
readonly detail?: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Inflate a ZIP archive with bounds + OPC name normalization. Entry name, count,
|
|
31
|
+
* compression-ratio, and total-uncompressed-size limits are enforced BEFORE each
|
|
32
|
+
* entry is decompressed (via fflate's pre-inflation filter), so a zip bomb or a
|
|
33
|
+
* traversal name is rejected without ever being inflated. Keys are canonical part
|
|
34
|
+
* names.
|
|
35
|
+
*/
|
|
36
|
+
declare function readZip(bytes: Uint8Array, limits?: ZipLimits): ZipReadResult;
|
|
37
|
+
/** Deflate a set of canonical-part-name -> bytes into a ZIP archive. Every part name
|
|
38
|
+
* is re-validated through the OPC normalization profile before writing, so a
|
|
39
|
+
* traversal/encoded/normalized-alias name from an untrusted serialized model can
|
|
40
|
+
* never be smuggled into a ZIP entry (write-side path-traversal guard). */
|
|
41
|
+
declare function writeZip(entries: ReadonlyMap<string, Uint8Array>): Uint8Array;
|
|
2
42
|
|
|
3
43
|
/**
|
|
4
44
|
* Why a part or relationship name was refused.
|
|
@@ -56,91 +96,6 @@ declare function resolveInternalTarget(ownerPartName: string, rawTarget: string)
|
|
|
56
96
|
*/
|
|
57
97
|
declare function validateExternalTarget(raw: string): NameResult;
|
|
58
98
|
|
|
59
|
-
/** One `<Default>`: a file extension mapped to a content type. */
|
|
60
|
-
interface DefaultRecord {
|
|
61
|
-
readonly extension: string;
|
|
62
|
-
readonly contentType: string;
|
|
63
|
-
readonly order: number;
|
|
64
|
-
}
|
|
65
|
-
/** One `<Override>`: a specific part name mapped to a content type. Beats any Default. */
|
|
66
|
-
interface OverrideRecord {
|
|
67
|
-
readonly partName: string;
|
|
68
|
-
readonly contentType: string;
|
|
69
|
-
readonly order: number;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* The authored `[Content_Types].xml` records, in significant order.
|
|
73
|
-
*
|
|
74
|
-
* Retained rather than collapsed into a lookup, because the file's lexical form and ordering are
|
|
75
|
-
* part of what a lossless save re-emits.
|
|
76
|
-
*/
|
|
77
|
-
interface ContentTypeRecords {
|
|
78
|
-
readonly defaults: readonly DefaultRecord[];
|
|
79
|
-
readonly overrides: readonly OverrideRecord[];
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Why content-type records could not be indexed.
|
|
83
|
-
*
|
|
84
|
-
* All fail CLOSED: conflicting Defaults on one extension, duplicate normalized Override names, or
|
|
85
|
-
* invalid MIME syntax are refused rather than resolved by picking one.
|
|
86
|
-
*/
|
|
87
|
-
type ContentTypeError = {
|
|
88
|
-
readonly code: 'invalid-mime';
|
|
89
|
-
readonly value: string;
|
|
90
|
-
} | {
|
|
91
|
-
readonly code: 'conflicting-default';
|
|
92
|
-
readonly extension: string;
|
|
93
|
-
} | {
|
|
94
|
-
readonly code: 'duplicate-override';
|
|
95
|
-
readonly partName: string;
|
|
96
|
-
} | {
|
|
97
|
-
readonly code: 'invalid-override-name';
|
|
98
|
-
readonly partName: string;
|
|
99
|
-
} | {
|
|
100
|
-
readonly code: 'too-many-records';
|
|
101
|
-
readonly limit: number;
|
|
102
|
-
};
|
|
103
|
-
/** Whether a string is syntactically a MIME type. Syntax only — no registry lookup. */
|
|
104
|
-
declare function isValidMime(value: string): boolean;
|
|
105
|
-
/** ASCII-case-insensitive extension key (leading dot removed; ASCII-only fold). */
|
|
106
|
-
declare function extensionKey(extension: string): string;
|
|
107
|
-
/** The resolved lookup: Override by case-folded part name, Default by case-insensitive extension. */
|
|
108
|
-
interface ContentTypeIndex {
|
|
109
|
-
/** ext key -> single MIME (identical duplicates collapsed). */
|
|
110
|
-
readonly defaults: ReadonlyMap<string, string>;
|
|
111
|
-
/** case-folded part name -> MIME. */
|
|
112
|
-
readonly overrides: ReadonlyMap<string, string>;
|
|
113
|
-
}
|
|
114
|
-
/** The built index, or the conflict that made it impossible. */
|
|
115
|
-
type IndexResult = {
|
|
116
|
-
readonly ok: true;
|
|
117
|
-
readonly index: ContentTypeIndex;
|
|
118
|
-
} | {
|
|
119
|
-
readonly ok: false;
|
|
120
|
-
readonly error: ContentTypeError;
|
|
121
|
-
};
|
|
122
|
-
/**
|
|
123
|
-
* Build a resolved content-type index, failing closed on conflict/duplicate/MIME
|
|
124
|
-
* errors. `maxRecords` bounds the combined record count (N/N+1 gate).
|
|
125
|
-
*/
|
|
126
|
-
declare function buildContentTypeIndex(records: ContentTypeRecords, maxRecords?: number): IndexResult;
|
|
127
|
-
/**
|
|
128
|
-
* A part's content type, or why it has none.
|
|
129
|
-
*
|
|
130
|
-
* An orphan record never determines a part's type — a Default with no matching part is preserved
|
|
131
|
-
* inertly rather than applied.
|
|
132
|
-
*/
|
|
133
|
-
type ResolveResult = {
|
|
134
|
-
readonly ok: true;
|
|
135
|
-
readonly contentType: string;
|
|
136
|
-
readonly source: 'override' | 'default';
|
|
137
|
-
} | {
|
|
138
|
-
readonly ok: false;
|
|
139
|
-
readonly reason: 'unknown';
|
|
140
|
-
};
|
|
141
|
-
/** Resolve a part's content type: Override wins over Default; else unknown. */
|
|
142
|
-
declare function resolveContentType(index: ContentTypeIndex, partName: string): ResolveResult;
|
|
143
|
-
|
|
144
99
|
/** OOXML image relationship type for embedded or linked media parts. */
|
|
145
100
|
declare const IMAGE_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image";
|
|
146
101
|
/**
|
|
@@ -223,45 +178,90 @@ type ImageRelationshipResolution = {
|
|
|
223
178
|
*/
|
|
224
179
|
declare function resolveImageRelationship(records: readonly RelationshipRecord[] | undefined, ownerPart: string, relationshipId: string): ImageRelationshipResolution;
|
|
225
180
|
|
|
181
|
+
/** One `<Default>`: a file extension mapped to a content type. */
|
|
182
|
+
interface DefaultRecord {
|
|
183
|
+
readonly extension: string;
|
|
184
|
+
readonly contentType: string;
|
|
185
|
+
readonly order: number;
|
|
186
|
+
}
|
|
187
|
+
/** One `<Override>`: a specific part name mapped to a content type. Beats any Default. */
|
|
188
|
+
interface OverrideRecord {
|
|
189
|
+
readonly partName: string;
|
|
190
|
+
readonly contentType: string;
|
|
191
|
+
readonly order: number;
|
|
192
|
+
}
|
|
226
193
|
/**
|
|
227
|
-
*
|
|
194
|
+
* The authored `[Content_Types].xml` records, in significant order.
|
|
228
195
|
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
196
|
+
* Retained rather than collapsed into a lookup, because the file's lexical form and ordering are
|
|
197
|
+
* part of what a lossless save re-emits.
|
|
231
198
|
*/
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
readonly maxEntries: number;
|
|
236
|
-
/** Max total UNCOMPRESSED bytes across the archive. */
|
|
237
|
-
readonly maxTotalBytes: number;
|
|
238
|
-
/** Max per-entry uncompressed:compressed ratio (zip-bomb guard). */
|
|
239
|
-
readonly maxRatio?: number;
|
|
199
|
+
interface ContentTypeRecords {
|
|
200
|
+
readonly defaults: readonly DefaultRecord[];
|
|
201
|
+
readonly overrides: readonly OverrideRecord[];
|
|
240
202
|
}
|
|
241
|
-
/**
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
203
|
+
/**
|
|
204
|
+
* Why content-type records could not be indexed.
|
|
205
|
+
*
|
|
206
|
+
* All fail CLOSED: conflicting Defaults on one extension, duplicate normalized Override names, or
|
|
207
|
+
* invalid MIME syntax are refused rather than resolved by picking one.
|
|
208
|
+
*/
|
|
209
|
+
type ContentTypeError = {
|
|
210
|
+
readonly code: 'invalid-mime';
|
|
211
|
+
readonly value: string;
|
|
212
|
+
} | {
|
|
213
|
+
readonly code: 'conflicting-default';
|
|
214
|
+
readonly extension: string;
|
|
215
|
+
} | {
|
|
216
|
+
readonly code: 'duplicate-override';
|
|
217
|
+
readonly partName: string;
|
|
218
|
+
} | {
|
|
219
|
+
readonly code: 'invalid-override-name';
|
|
220
|
+
readonly partName: string;
|
|
221
|
+
} | {
|
|
222
|
+
readonly code: 'too-many-records';
|
|
223
|
+
readonly limit: number;
|
|
224
|
+
};
|
|
225
|
+
/** Whether a string is syntactically a MIME type. Syntax only — no registry lookup. */
|
|
226
|
+
declare function isValidMime(value: string): boolean;
|
|
227
|
+
/** ASCII-case-insensitive extension key (leading dot removed; ASCII-only fold). */
|
|
228
|
+
declare function extensionKey(extension: string): string;
|
|
229
|
+
/** The resolved lookup: Override by case-folded part name, Default by case-insensitive extension. */
|
|
230
|
+
interface ContentTypeIndex {
|
|
231
|
+
/** ext key -> single MIME (identical duplicates collapsed). */
|
|
232
|
+
readonly defaults: ReadonlyMap<string, string>;
|
|
233
|
+
/** case-folded part name -> MIME. */
|
|
234
|
+
readonly overrides: ReadonlyMap<string, string>;
|
|
235
|
+
}
|
|
236
|
+
/** The built index, or the conflict that made it impossible. */
|
|
237
|
+
type IndexResult = {
|
|
245
238
|
readonly ok: true;
|
|
246
|
-
readonly
|
|
239
|
+
readonly index: ContentTypeIndex;
|
|
247
240
|
} | {
|
|
248
241
|
readonly ok: false;
|
|
249
|
-
readonly
|
|
250
|
-
readonly detail?: string;
|
|
242
|
+
readonly error: ContentTypeError;
|
|
251
243
|
};
|
|
252
244
|
/**
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
* entry is decompressed (via fflate's pre-inflation filter), so a zip bomb or a
|
|
256
|
-
* traversal name is rejected without ever being inflated. Keys are canonical part
|
|
257
|
-
* names.
|
|
245
|
+
* Build a resolved content-type index, failing closed on conflict/duplicate/MIME
|
|
246
|
+
* errors. `maxRecords` bounds the combined record count (N/N+1 gate).
|
|
258
247
|
*/
|
|
259
|
-
declare function
|
|
260
|
-
/**
|
|
261
|
-
*
|
|
262
|
-
*
|
|
263
|
-
*
|
|
264
|
-
|
|
248
|
+
declare function buildContentTypeIndex(records: ContentTypeRecords, maxRecords?: number): IndexResult;
|
|
249
|
+
/**
|
|
250
|
+
* A part's content type, or why it has none.
|
|
251
|
+
*
|
|
252
|
+
* An orphan record never determines a part's type — a Default with no matching part is preserved
|
|
253
|
+
* inertly rather than applied.
|
|
254
|
+
*/
|
|
255
|
+
type ResolveResult = {
|
|
256
|
+
readonly ok: true;
|
|
257
|
+
readonly contentType: string;
|
|
258
|
+
readonly source: 'override' | 'default';
|
|
259
|
+
} | {
|
|
260
|
+
readonly ok: false;
|
|
261
|
+
readonly reason: 'unknown';
|
|
262
|
+
};
|
|
263
|
+
/** Resolve a part's content type: Override wins over Default; else unknown. */
|
|
264
|
+
declare function resolveContentType(index: ContentTypeIndex, partName: string): ResolveResult;
|
|
265
265
|
|
|
266
266
|
/** Caps applied while loading a package: zip, XML, part count and relationship count. */
|
|
267
267
|
interface OoxmlPackageLimits {
|
|
@@ -868,4 +868,4 @@ type OoxmlInvariantResult = {
|
|
|
868
868
|
*/
|
|
869
869
|
declare function readOoxmlPart(xml: string, metadata: OoxmlPartMetadata, limits?: XmlLimits): OoxmlReadResult;
|
|
870
870
|
|
|
871
|
-
export { type OoxmlPartMetadata as $, type OoxmlBookmarkEndNode as A, type OoxmlBookmarkStartNode as B, type OoxmlContentControlCalendarNode as C, type OoxmlContentControlCheckboxNode as D, type OoxmlContentControlCheckedNode as E, type OoxmlContentControlCheckedStateNode as F, type OoxmlContentControlComboBoxNode as G, type OoxmlContentControlDataBindingNode as H, type OoxmlContentControlDateFormatNode as I, type OoxmlContentControlDateNode as J, type OoxmlContentControlDropDownListNode as K, type OoxmlContentControlLidNode as L, type OoxmlContentControlListItemNode as M, type OoxmlContentControlStoreMappedDataAsNode as N, type OoxmlNode as O, type OoxmlContentControlTextNode as P, type OoxmlContentControlUncheckedStateNode as Q, type OoxmlDocumentNode as R, type OoxmlGenericExtensionAttribute as S, type OoxmlHyperlinkNode as T, type OoxmlInvariantIssueCode as U, type OoxmlKnownNodeAttribute as V, type OoxmlNamespaceBinding as W, type XmlLimits as X, type OoxmlNodeId as Y, type OoxmlNodeIdentityRules as Z, type OoxmlParagraphPropertiesNode as _, type OoxmlElement as a, type OoxmlReadResult as a0, type OoxmlRunNode as a1, type OoxmlRunPropertiesNode as a2, type OoxmlTabNode as a3, type OoxmlTextElementNode as a4, type OoxmlTextNode as a5, type OoxmlWmlValAttribute as a6, type OoxmlXmlSpaceAttribute as a7, WML_NAMESPACE_URI as a8, XMLNS_NAMESPACE_URI as a9, XML_NAMESPACE_URI as aa, type XmlNode as ab, type XmlRejection as ac, type XmlResult as ad, childElements as ae, findElement as af, isContentRevisionKind as ag, isRangeMarkerKind as ah, readOnOffChild as ai, readOoxmlPart as aj, readXml as ak, textContent as al, type OoxmlContentControlNode as b, type OoxmlGenericElementNode as c, type OoxmlContentControlContentNode as d, type OoxmlPart as e, type OoxmlParagraphNode as f, type OoxmlNoteNode as g, type OoxmlContinuationSeparatorNode as h, type OoxmlEndnotesNode as i, type OoxmlFootnotesNode as j, type OoxmlNoteRefNode as k, type OoxmlNoteReferenceNode as l, type OoxmlSeparatorNode as m, type OoxmlReadRejection as n, type
|
|
871
|
+
export { type OoxmlPartMetadata as $, type OoxmlBookmarkEndNode as A, type OoxmlBookmarkStartNode as B, type OoxmlContentControlCalendarNode as C, type OoxmlContentControlCheckboxNode as D, type OoxmlContentControlCheckedNode as E, type OoxmlContentControlCheckedStateNode as F, type OoxmlContentControlComboBoxNode as G, type OoxmlContentControlDataBindingNode as H, type OoxmlContentControlDateFormatNode as I, type OoxmlContentControlDateNode as J, type OoxmlContentControlDropDownListNode as K, type OoxmlContentControlLidNode as L, type OoxmlContentControlListItemNode as M, type OoxmlContentControlStoreMappedDataAsNode as N, type OoxmlNode as O, type OoxmlContentControlTextNode as P, type OoxmlContentControlUncheckedStateNode as Q, type OoxmlDocumentNode as R, type OoxmlGenericExtensionAttribute as S, type OoxmlHyperlinkNode as T, type OoxmlInvariantIssueCode as U, type OoxmlKnownNodeAttribute as V, type OoxmlNamespaceBinding as W, type XmlLimits as X, type OoxmlNodeId as Y, type OoxmlNodeIdentityRules as Z, type OoxmlParagraphPropertiesNode as _, type OoxmlElement as a, type OoxmlReadResult as a0, type OoxmlRunNode as a1, type OoxmlRunPropertiesNode as a2, type OoxmlTabNode as a3, type OoxmlTextElementNode as a4, type OoxmlTextNode as a5, type OoxmlWmlValAttribute as a6, type OoxmlXmlSpaceAttribute as a7, WML_NAMESPACE_URI as a8, XMLNS_NAMESPACE_URI as a9, XML_NAMESPACE_URI as aa, type XmlNode as ab, type XmlRejection as ac, type XmlResult as ad, childElements as ae, findElement as af, isContentRevisionKind as ag, isRangeMarkerKind as ah, readOnOffChild as ai, readOoxmlPart as aj, readXml as ak, textContent as al, type OoxmlContentControlNode as b, type OoxmlGenericElementNode as c, type OoxmlContentControlContentNode as d, type OoxmlPart as e, type OoxmlParagraphNode as f, type OoxmlNoteNode as g, type OoxmlContinuationSeparatorNode as h, type OoxmlEndnotesNode as i, type OoxmlFootnotesNode as j, type OoxmlNoteRefNode as k, type OoxmlNoteReferenceNode as l, type OoxmlSeparatorNode as m, type OoxmlReadRejection as n, type OoxmlContentControlEndPropertiesNode as o, type OoxmlContentControlPropertiesNode as p, type OoxmlDrawingNode as q, type OoxmlInvariantResult as r, type OoxmlInvariantIssue as s, type OoxmlHardBreakNode as t, type OoxmlFldCharNode as u, type OoxmlFldSimpleNode as v, type OoxmlInstrTextNode as w, type OoxmlAttribute as x, OOXML_NODE_IDENTITY_RULES as y, type OoxmlBodyNode as z };
|
|
@@ -868,4 +868,4 @@ type OoxmlInvariantResult = {
|
|
|
868
868
|
*/
|
|
869
869
|
declare function readOoxmlPart(xml: string, metadata: OoxmlPartMetadata, limits?: XmlLimits): OoxmlReadResult;
|
|
870
870
|
|
|
871
|
-
export { type OoxmlPartMetadata as $, type OoxmlBookmarkEndNode as A, type OoxmlBookmarkStartNode as B, type OoxmlContentControlCalendarNode as C, type OoxmlContentControlCheckboxNode as D, type OoxmlContentControlCheckedNode as E, type OoxmlContentControlCheckedStateNode as F, type OoxmlContentControlComboBoxNode as G, type OoxmlContentControlDataBindingNode as H, type OoxmlContentControlDateFormatNode as I, type OoxmlContentControlDateNode as J, type OoxmlContentControlDropDownListNode as K, type OoxmlContentControlLidNode as L, type OoxmlContentControlListItemNode as M, type OoxmlContentControlStoreMappedDataAsNode as N, type OoxmlNode as O, type OoxmlContentControlTextNode as P, type OoxmlContentControlUncheckedStateNode as Q, type OoxmlDocumentNode as R, type OoxmlGenericExtensionAttribute as S, type OoxmlHyperlinkNode as T, type OoxmlInvariantIssueCode as U, type OoxmlKnownNodeAttribute as V, type OoxmlNamespaceBinding as W, type XmlLimits as X, type OoxmlNodeId as Y, type OoxmlNodeIdentityRules as Z, type OoxmlParagraphPropertiesNode as _, type OoxmlElement as a, type OoxmlReadResult as a0, type OoxmlRunNode as a1, type OoxmlRunPropertiesNode as a2, type OoxmlTabNode as a3, type OoxmlTextElementNode as a4, type OoxmlTextNode as a5, type OoxmlWmlValAttribute as a6, type OoxmlXmlSpaceAttribute as a7, WML_NAMESPACE_URI as a8, XMLNS_NAMESPACE_URI as a9, XML_NAMESPACE_URI as aa, type XmlNode as ab, type XmlRejection as ac, type XmlResult as ad, childElements as ae, findElement as af, isContentRevisionKind as ag, isRangeMarkerKind as ah, readOnOffChild as ai, readOoxmlPart as aj, readXml as ak, textContent as al, type OoxmlContentControlNode as b, type OoxmlGenericElementNode as c, type OoxmlContentControlContentNode as d, type OoxmlPart as e, type OoxmlParagraphNode as f, type OoxmlNoteNode as g, type OoxmlContinuationSeparatorNode as h, type OoxmlEndnotesNode as i, type OoxmlFootnotesNode as j, type OoxmlNoteRefNode as k, type OoxmlNoteReferenceNode as l, type OoxmlSeparatorNode as m, type OoxmlReadRejection as n, type
|
|
871
|
+
export { type OoxmlPartMetadata as $, type OoxmlBookmarkEndNode as A, type OoxmlBookmarkStartNode as B, type OoxmlContentControlCalendarNode as C, type OoxmlContentControlCheckboxNode as D, type OoxmlContentControlCheckedNode as E, type OoxmlContentControlCheckedStateNode as F, type OoxmlContentControlComboBoxNode as G, type OoxmlContentControlDataBindingNode as H, type OoxmlContentControlDateFormatNode as I, type OoxmlContentControlDateNode as J, type OoxmlContentControlDropDownListNode as K, type OoxmlContentControlLidNode as L, type OoxmlContentControlListItemNode as M, type OoxmlContentControlStoreMappedDataAsNode as N, type OoxmlNode as O, type OoxmlContentControlTextNode as P, type OoxmlContentControlUncheckedStateNode as Q, type OoxmlDocumentNode as R, type OoxmlGenericExtensionAttribute as S, type OoxmlHyperlinkNode as T, type OoxmlInvariantIssueCode as U, type OoxmlKnownNodeAttribute as V, type OoxmlNamespaceBinding as W, type XmlLimits as X, type OoxmlNodeId as Y, type OoxmlNodeIdentityRules as Z, type OoxmlParagraphPropertiesNode as _, type OoxmlElement as a, type OoxmlReadResult as a0, type OoxmlRunNode as a1, type OoxmlRunPropertiesNode as a2, type OoxmlTabNode as a3, type OoxmlTextElementNode as a4, type OoxmlTextNode as a5, type OoxmlWmlValAttribute as a6, type OoxmlXmlSpaceAttribute as a7, WML_NAMESPACE_URI as a8, XMLNS_NAMESPACE_URI as a9, XML_NAMESPACE_URI as aa, type XmlNode as ab, type XmlRejection as ac, type XmlResult as ad, childElements as ae, findElement as af, isContentRevisionKind as ag, isRangeMarkerKind as ah, readOnOffChild as ai, readOoxmlPart as aj, readXml as ak, textContent as al, type OoxmlContentControlNode as b, type OoxmlGenericElementNode as c, type OoxmlContentControlContentNode as d, type OoxmlPart as e, type OoxmlParagraphNode as f, type OoxmlNoteNode as g, type OoxmlContinuationSeparatorNode as h, type OoxmlEndnotesNode as i, type OoxmlFootnotesNode as j, type OoxmlNoteRefNode as k, type OoxmlNoteReferenceNode as l, type OoxmlSeparatorNode as m, type OoxmlReadRejection as n, type OoxmlContentControlEndPropertiesNode as o, type OoxmlContentControlPropertiesNode as p, type OoxmlDrawingNode as q, type OoxmlInvariantResult as r, type OoxmlInvariantIssue as s, type OoxmlHardBreakNode as t, type OoxmlFldCharNode as u, type OoxmlFldSimpleNode as v, type OoxmlInstrTextNode as w, type OoxmlAttribute as x, OOXML_NODE_IDENTITY_RULES as y, type OoxmlBodyNode as z };
|
package/dist/output.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk7GYF33B5_cjs=require('./chunk-7GYF33B5.cjs');require('./chunk-3C533HSQ.cjs'),require('./chunk-IJ4V3LGV.cjs'),require('./chunk-JDHTCMFA.cjs'),require('./chunk-2GSRLGUI.cjs');Object.defineProperty(exports,"DEFAULT_FIELD_SHADING",{enumerable:true,get:function(){return chunk7GYF33B5_cjs.d}});Object.defineProperty(exports,"paintSelectionOverlay",{enumerable:true,get:function(){return chunk7GYF33B5_cjs.f}});Object.defineProperty(exports,"paintSemanticLayout",{enumerable:true,get:function(){return chunk7GYF33B5_cjs.e}});
|
package/dist/output.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { D as DEFAULT_FIELD_SHADING, F as FieldShadingMode, P as PaintOptions, p as paintSemanticLayout } from './semantic-paint-
|
|
2
|
-
import { S as SemanticLayout } from './semantic-records-
|
|
3
|
-
import './image-resources-
|
|
4
|
-
import './tree-op-types-
|
|
5
|
-
import './ooxml-tree-
|
|
6
|
-
import './ooxml-package-
|
|
7
|
-
import './revision-projection-
|
|
1
|
+
export { D as DEFAULT_FIELD_SHADING, F as FieldShadingMode, P as PaintOptions, p as paintSemanticLayout } from './semantic-paint-6iIB4fhx.cjs';
|
|
2
|
+
import { S as SemanticLayout } from './semantic-records-Dq8SlCY8.cjs';
|
|
3
|
+
import './image-resources-CSlQmPIm.cjs';
|
|
4
|
+
import './tree-op-types-DOYNkKqD.cjs';
|
|
5
|
+
import './ooxml-tree-CG0odFyi.cjs';
|
|
6
|
+
import './ooxml-package-Cmbe_M04.cjs';
|
|
7
|
+
import './revision-projection-DRZMzoLD.cjs';
|
|
8
8
|
|
|
9
9
|
/** A rectangle in page-content coordinates, on a named page. */
|
|
10
10
|
interface OverlayRect {
|
package/dist/output.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { D as DEFAULT_FIELD_SHADING, F as FieldShadingMode, P as PaintOptions, p as paintSemanticLayout } from './semantic-paint-
|
|
2
|
-
import { S as SemanticLayout } from './semantic-records-
|
|
3
|
-
import './image-resources-
|
|
4
|
-
import './tree-op-types-
|
|
5
|
-
import './ooxml-tree-
|
|
6
|
-
import './ooxml-package-
|
|
7
|
-
import './revision-projection-
|
|
1
|
+
export { D as DEFAULT_FIELD_SHADING, F as FieldShadingMode, P as PaintOptions, p as paintSemanticLayout } from './semantic-paint-CKIbFkQ7.js';
|
|
2
|
+
import { S as SemanticLayout } from './semantic-records-B-qbrnp2.js';
|
|
3
|
+
import './image-resources-e13t-pgy.js';
|
|
4
|
+
import './tree-op-types-CZw9QhWX.js';
|
|
5
|
+
import './ooxml-tree-CG0odFyi.js';
|
|
6
|
+
import './ooxml-package-BrxTmTsZ.js';
|
|
7
|
+
import './revision-projection-u4nT52xT.js';
|
|
8
8
|
|
|
9
9
|
/** A rectangle in page-content coordinates, on a named page. */
|
|
10
10
|
interface OverlayRect {
|
package/dist/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{d as DEFAULT_FIELD_SHADING,f as paintSelectionOverlay,e as paintSemanticLayout}from'./chunk-
|
|
1
|
+
export{d as DEFAULT_FIELD_SHADING,f as paintSelectionOverlay,e as paintSemanticLayout}from'./chunk-2QIA75K3.js';import'./chunk-T252F4US.js';import'./chunk-UVIUNAQ6.js';import'./chunk-YTZIGUXT.js';import'./chunk-LJIX4ZDF.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HeaderFooterVariant } from './hf-references-
|
|
2
|
-
import { N as NoteKind } from './note-nodes-
|
|
1
|
+
import { H as HeaderFooterVariant } from './hf-references-BPET4tlK.cjs';
|
|
2
|
+
import { N as NoteKind } from './note-nodes-B2wWES2L.cjs';
|
|
3
3
|
|
|
4
4
|
/** Alignment as this protocol publishes it. `Mixed`/`Unknown` are read-only answers. */
|
|
5
5
|
type AutomationAlignment = 'Mixed' | 'Unknown' | 'Left' | 'Centered' | 'Right' | 'Justified';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { H as HeaderFooterVariant } from './hf-references-
|
|
2
|
-
import { N as NoteKind } from './note-nodes-
|
|
1
|
+
import { H as HeaderFooterVariant } from './hf-references-CAp1xTv6.js';
|
|
2
|
+
import { N as NoteKind } from './note-nodes-CZQXU6Fg.js';
|
|
3
3
|
|
|
4
4
|
/** Alignment as this protocol publishes it. `Mixed`/`Unknown` are read-only answers. */
|
|
5
5
|
type AutomationAlignment = 'Mixed' | 'Unknown' | 'Left' | 'Centered' | 'Right' | 'Justified';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as OoxmlPart, a as OoxmlElement } from './ooxml-tree-
|
|
2
|
-
import { R as RevisionAddress } from './tree-op-types-
|
|
1
|
+
import { e as OoxmlPart, a as OoxmlElement } from './ooxml-tree-CG0odFyi.js';
|
|
2
|
+
import { R as RevisionAddress } from './tree-op-types-CZw9QhWX.js';
|
|
3
3
|
|
|
4
4
|
/** The `w15` namespace: `commentsExtended.xml` — thread parent and resolved state. */
|
|
5
5
|
declare const W15_NAMESPACE_URI = "http://schemas.microsoft.com/office/word/2012/wordml";
|
|
@@ -101,12 +101,29 @@ interface ReviewRevisionItem {
|
|
|
101
101
|
/** The words a replacement removes. Empty for every other kind. */
|
|
102
102
|
readonly replacedText: string;
|
|
103
103
|
readonly revisionKind: ReviewRevisionKind;
|
|
104
|
+
/**
|
|
105
|
+
* WHICH decision a `paragraphMark` records, absent for every other kind.
|
|
106
|
+
*
|
|
107
|
+
* `EG_ParaRPrTrackChanges` is `ins? del? moveFrom? moveTo?`, and the four say opposite
|
|
108
|
+
* things about one break. Without this a card called a deleted break an inserted one, which
|
|
109
|
+
* is the reverse of what Accept on that card does.
|
|
110
|
+
*/
|
|
111
|
+
readonly markDirection?: 'insert' | 'delete' | 'moveFrom' | 'moveTo';
|
|
104
112
|
readonly author: string;
|
|
105
113
|
readonly date?: string;
|
|
106
114
|
/** Text the revision covers, for the card summary. Empty for changes with no characters. */
|
|
107
115
|
readonly text: string;
|
|
108
116
|
/** Every site this decision touches, in document order. */
|
|
109
117
|
readonly ranges: readonly ReviewRange[];
|
|
118
|
+
/**
|
|
119
|
+
* How deeply this change is NESTED inside other changes, 0 for an unenclosed one.
|
|
120
|
+
*
|
|
121
|
+
* `w:ins` wrapping `w:del` is content one reviewer added and another struck. Both stay
|
|
122
|
+
* pending, so both are cards, over one identical range — and a range then cannot say which
|
|
123
|
+
* change a caret is in. Word treats the innermost as the operative one, so it wins the caret
|
|
124
|
+
* and the change enclosing it stays listed and reachable.
|
|
125
|
+
*/
|
|
126
|
+
readonly nesting: number;
|
|
110
127
|
/**
|
|
111
128
|
* How many leading `ranges` are the STRUCK half of a replacement.
|
|
112
129
|
*
|
|
@@ -321,8 +338,28 @@ interface ReviewParagraphAnchor {
|
|
|
321
338
|
readonly box: {
|
|
322
339
|
readonly y: number;
|
|
323
340
|
};
|
|
341
|
+
/**
|
|
342
|
+
* Present on a real line. A merged fragment's join line carries spans from two
|
|
343
|
+
* paragraphs, and its `range` can only name one of them, so the OTHER paragraph's extent
|
|
344
|
+
* on that line is readable here and nowhere else.
|
|
345
|
+
*/
|
|
346
|
+
readonly spans?: readonly {
|
|
347
|
+
readonly range: {
|
|
348
|
+
readonly paragraphId: string;
|
|
349
|
+
readonly end: number;
|
|
350
|
+
};
|
|
351
|
+
}[];
|
|
324
352
|
}[];
|
|
325
353
|
}
|
|
354
|
+
/**
|
|
355
|
+
* The y of the line a position sits on, measured from the anchor's own origin.
|
|
356
|
+
*
|
|
357
|
+
* An ordinary line answers from its own range, exactly as it always did. On a merged
|
|
358
|
+
* fragment's join line the range names one of the two paragraphs, so an offset compared
|
|
359
|
+
* against it either overshot — putting a card in the absorbed half beside the wrong line —
|
|
360
|
+
* or matched the first line every time.
|
|
361
|
+
*/
|
|
362
|
+
declare function anchorLineY(anchor: ReviewParagraphAnchor, paragraphId: string, offset: number): number;
|
|
326
363
|
/**
|
|
327
364
|
* Paragraph id to its place on the page, in ONE pass over the layout.
|
|
328
365
|
*
|
|
@@ -350,6 +387,13 @@ declare function reviewAnchorIndex<TPage extends {
|
|
|
350
387
|
readonly box: {
|
|
351
388
|
readonly y: number;
|
|
352
389
|
};
|
|
390
|
+
/** Present on a real line; a merged one carries spans from more than one paragraph. */
|
|
391
|
+
readonly spans?: readonly {
|
|
392
|
+
readonly range: {
|
|
393
|
+
readonly paragraphId: string;
|
|
394
|
+
readonly end: number;
|
|
395
|
+
};
|
|
396
|
+
}[];
|
|
353
397
|
}[];
|
|
354
398
|
}[]): Map<string, ReviewParagraphAnchor>;
|
|
355
399
|
/**
|
|
@@ -367,4 +411,4 @@ declare function reviewItemGeometry(item: ReviewItem, index: ReadonlyMap<string,
|
|
|
367
411
|
readonly y: number;
|
|
368
412
|
} | null;
|
|
369
413
|
|
|
370
|
-
export { type CommentRecord as C, type ReviewModelInput as R, W15_NAMESPACE_URI as W, type ReviewItem as a, type ReviewRevisionItem as b, type ReviewCommentItem as c, type ReviewCustomItem as d, type ReviewPosition as e, type ReviewRange as f, type ReviewRevisionKind as g, type CommentAnchor as h, type CommentPosition as i, type CommentThreadState as j, type ReviewParagraphAnchor as k, activeReviewItem as l,
|
|
414
|
+
export { type CommentRecord as C, type ReviewModelInput as R, W15_NAMESPACE_URI as W, type ReviewItem as a, type ReviewRevisionItem as b, type ReviewCommentItem as c, type ReviewCustomItem as d, type ReviewPosition as e, type ReviewRange as f, type ReviewRevisionKind as g, type CommentAnchor as h, type CommentPosition as i, type CommentThreadState as j, type ReviewParagraphAnchor as k, activeReviewItem as l, anchorLineY as m, commentBodyText as n, commentInitials as o, firstReviewRange as p, reviewItemGeometry as q, reviewAnchorIndex as r, reviewItemKey as s, reviewItemPositionRank as t, reviewItemRanges as u, reviewItemsAt as v, reviewThreadRootOf as w };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as OoxmlPart, a as OoxmlElement } from './ooxml-tree-
|
|
2
|
-
import { R as RevisionAddress } from './tree-op-types-
|
|
1
|
+
import { e as OoxmlPart, a as OoxmlElement } from './ooxml-tree-CG0odFyi.cjs';
|
|
2
|
+
import { R as RevisionAddress } from './tree-op-types-DOYNkKqD.cjs';
|
|
3
3
|
|
|
4
4
|
/** The `w15` namespace: `commentsExtended.xml` — thread parent and resolved state. */
|
|
5
5
|
declare const W15_NAMESPACE_URI = "http://schemas.microsoft.com/office/word/2012/wordml";
|
|
@@ -101,12 +101,29 @@ interface ReviewRevisionItem {
|
|
|
101
101
|
/** The words a replacement removes. Empty for every other kind. */
|
|
102
102
|
readonly replacedText: string;
|
|
103
103
|
readonly revisionKind: ReviewRevisionKind;
|
|
104
|
+
/**
|
|
105
|
+
* WHICH decision a `paragraphMark` records, absent for every other kind.
|
|
106
|
+
*
|
|
107
|
+
* `EG_ParaRPrTrackChanges` is `ins? del? moveFrom? moveTo?`, and the four say opposite
|
|
108
|
+
* things about one break. Without this a card called a deleted break an inserted one, which
|
|
109
|
+
* is the reverse of what Accept on that card does.
|
|
110
|
+
*/
|
|
111
|
+
readonly markDirection?: 'insert' | 'delete' | 'moveFrom' | 'moveTo';
|
|
104
112
|
readonly author: string;
|
|
105
113
|
readonly date?: string;
|
|
106
114
|
/** Text the revision covers, for the card summary. Empty for changes with no characters. */
|
|
107
115
|
readonly text: string;
|
|
108
116
|
/** Every site this decision touches, in document order. */
|
|
109
117
|
readonly ranges: readonly ReviewRange[];
|
|
118
|
+
/**
|
|
119
|
+
* How deeply this change is NESTED inside other changes, 0 for an unenclosed one.
|
|
120
|
+
*
|
|
121
|
+
* `w:ins` wrapping `w:del` is content one reviewer added and another struck. Both stay
|
|
122
|
+
* pending, so both are cards, over one identical range — and a range then cannot say which
|
|
123
|
+
* change a caret is in. Word treats the innermost as the operative one, so it wins the caret
|
|
124
|
+
* and the change enclosing it stays listed and reachable.
|
|
125
|
+
*/
|
|
126
|
+
readonly nesting: number;
|
|
110
127
|
/**
|
|
111
128
|
* How many leading `ranges` are the STRUCK half of a replacement.
|
|
112
129
|
*
|
|
@@ -321,8 +338,28 @@ interface ReviewParagraphAnchor {
|
|
|
321
338
|
readonly box: {
|
|
322
339
|
readonly y: number;
|
|
323
340
|
};
|
|
341
|
+
/**
|
|
342
|
+
* Present on a real line. A merged fragment's join line carries spans from two
|
|
343
|
+
* paragraphs, and its `range` can only name one of them, so the OTHER paragraph's extent
|
|
344
|
+
* on that line is readable here and nowhere else.
|
|
345
|
+
*/
|
|
346
|
+
readonly spans?: readonly {
|
|
347
|
+
readonly range: {
|
|
348
|
+
readonly paragraphId: string;
|
|
349
|
+
readonly end: number;
|
|
350
|
+
};
|
|
351
|
+
}[];
|
|
324
352
|
}[];
|
|
325
353
|
}
|
|
354
|
+
/**
|
|
355
|
+
* The y of the line a position sits on, measured from the anchor's own origin.
|
|
356
|
+
*
|
|
357
|
+
* An ordinary line answers from its own range, exactly as it always did. On a merged
|
|
358
|
+
* fragment's join line the range names one of the two paragraphs, so an offset compared
|
|
359
|
+
* against it either overshot — putting a card in the absorbed half beside the wrong line —
|
|
360
|
+
* or matched the first line every time.
|
|
361
|
+
*/
|
|
362
|
+
declare function anchorLineY(anchor: ReviewParagraphAnchor, paragraphId: string, offset: number): number;
|
|
326
363
|
/**
|
|
327
364
|
* Paragraph id to its place on the page, in ONE pass over the layout.
|
|
328
365
|
*
|
|
@@ -350,6 +387,13 @@ declare function reviewAnchorIndex<TPage extends {
|
|
|
350
387
|
readonly box: {
|
|
351
388
|
readonly y: number;
|
|
352
389
|
};
|
|
390
|
+
/** Present on a real line; a merged one carries spans from more than one paragraph. */
|
|
391
|
+
readonly spans?: readonly {
|
|
392
|
+
readonly range: {
|
|
393
|
+
readonly paragraphId: string;
|
|
394
|
+
readonly end: number;
|
|
395
|
+
};
|
|
396
|
+
}[];
|
|
353
397
|
}[];
|
|
354
398
|
}[]): Map<string, ReviewParagraphAnchor>;
|
|
355
399
|
/**
|
|
@@ -367,4 +411,4 @@ declare function reviewItemGeometry(item: ReviewItem, index: ReadonlyMap<string,
|
|
|
367
411
|
readonly y: number;
|
|
368
412
|
} | null;
|
|
369
413
|
|
|
370
|
-
export { type CommentRecord as C, type ReviewModelInput as R, W15_NAMESPACE_URI as W, type ReviewItem as a, type ReviewRevisionItem as b, type ReviewCommentItem as c, type ReviewCustomItem as d, type ReviewPosition as e, type ReviewRange as f, type ReviewRevisionKind as g, type CommentAnchor as h, type CommentPosition as i, type CommentThreadState as j, type ReviewParagraphAnchor as k, activeReviewItem as l,
|
|
414
|
+
export { type CommentRecord as C, type ReviewModelInput as R, W15_NAMESPACE_URI as W, type ReviewItem as a, type ReviewRevisionItem as b, type ReviewCommentItem as c, type ReviewCustomItem as d, type ReviewPosition as e, type ReviewRange as f, type ReviewRevisionKind as g, type CommentAnchor as h, type CommentPosition as i, type CommentThreadState as j, type ReviewParagraphAnchor as k, activeReviewItem as l, anchorLineY as m, commentBodyText as n, commentInitials as o, firstReviewRange as p, reviewItemGeometry as q, reviewAnchorIndex as r, reviewItemKey as s, reviewItemPositionRank as t, reviewItemRanges as u, reviewItemsAt as v, reviewThreadRootOf as w };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as OoxmlNode } from './ooxml-tree-
|
|
1
|
+
import { O as OoxmlNode } from './ooxml-tree-CG0odFyi.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* What a revision wrapper asserts about the content inside it.
|
|
@@ -53,16 +53,67 @@ declare const DEFAULT_REVISION_DISPLAY_MODE: RevisionDisplayMode;
|
|
|
53
53
|
*/
|
|
54
54
|
declare function revisionsVisible(revisions: readonly RevisionAttribution[], mode: RevisionDisplayMode): boolean;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Every revision on a paragraph's own MARK, from `w:pPr/w:rPr/w:ins|w:del|w:moveFrom|w:moveTo`.
|
|
57
|
+
*
|
|
58
|
+
* All four members of `EG_ParaRPrTrackChanges`. A moved paragraph carries `w:moveFrom` on the
|
|
59
|
+
* mark of the copy it left and `w:moveTo` on the mark of the copy it arrived at, so a move
|
|
60
|
+
* that spans whole paragraphs is recorded here and nowhere else.
|
|
57
61
|
*
|
|
58
62
|
* `EG_ParaRPrTrackChanges` records that the pilcrow itself was inserted or deleted, which is how
|
|
59
63
|
* Word writes a paragraph split or merge. It is not content — there is no text to decorate — so
|
|
60
64
|
* a surface shows it as a mark of its own beside the paragraph, the way Word draws a struck-
|
|
61
65
|
* through ¶.
|
|
62
66
|
*
|
|
67
|
+
* A LIST, because the group is `ins? del? moveFrom? moveTo?` and the first two can both be
|
|
68
|
+
* there: that pair is what Word writes when a second author proposes removing a mark the first
|
|
69
|
+
* proposed adding, and it is what this engine's own writer emits (`tree-op-tracked.ts`).
|
|
70
|
+
* Answering with the first one hid the second author's decision from the PAGE. The review pane
|
|
71
|
+
* walks the tree itself and always listed both, which is the worse shape of the two: a card
|
|
72
|
+
* offering a decision the reader could see no sign of.
|
|
73
|
+
*
|
|
74
|
+
* Ordered as the file orders them, which is the order the group declares.
|
|
75
|
+
*
|
|
63
76
|
* Property-position `w:ins`/`w:del` stay `generic` in the tree deliberately, so this reads them
|
|
64
77
|
* by name rather than by kind.
|
|
65
78
|
*/
|
|
79
|
+
declare function paragraphMarkRevisionsOf(paragraph: OoxmlNode): readonly RevisionAttribution[];
|
|
80
|
+
/**
|
|
81
|
+
* The tracked FORMAT change on a paragraph's own mark, from `w:pPr/w:rPr/w:rPrChange`.
|
|
82
|
+
*
|
|
83
|
+
* `CT_ParaRPr` ends with it (§17.13.5.32), and Word writes it when a user changes the mark's
|
|
84
|
+
* own run properties with tracking on. It reaches the fragment rather than a span because it
|
|
85
|
+
* decorates no characters, and it is not in `props`: a fragment's `props` carry the mark's
|
|
86
|
+
* `w:rPr` by NAME only, with none of its children.
|
|
87
|
+
*
|
|
88
|
+
* Note that `w:rPrChange/w:rPr` is `CT_ParaRPrOriginal`, which may carry its own revision
|
|
89
|
+
* marks. Those describe the mark as it WAS and must not be read as live ones, which is why
|
|
90
|
+
* this reads the change element's own attributes and never descends into it.
|
|
91
|
+
*/
|
|
92
|
+
declare function paragraphMarkFormatRevisionOf(paragraph: OoxmlNode): RevisionAttribution | null;
|
|
93
|
+
/**
|
|
94
|
+
* The single decision a one-field reader sees.
|
|
95
|
+
*
|
|
96
|
+
* A DELETION wins when a mark carries both, for the reason paint draws it that way: a break
|
|
97
|
+
* proposed and then unproposed ends up removed, so that is the decision a reader who can only
|
|
98
|
+
* see one must see. One function decides it, so the deprecated field, the deprecated function
|
|
99
|
+
* and the painted glyph cannot answer differently.
|
|
100
|
+
*/
|
|
101
|
+
declare function shownMarkRevision(revisions: readonly RevisionAttribution[]): RevisionAttribution | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* Does this decision, taken, remove the paragraph mark?
|
|
104
|
+
*
|
|
105
|
+
* A deletion does, and so does a `moveFrom`: the copy the paragraph moved OUT of goes away
|
|
106
|
+
* when the move is accepted. `insert` and `moveTo` are the other half of each pair, and they
|
|
107
|
+
* keep the break. Paint, the change bar and the resolved views all ask this one question, so
|
|
108
|
+
* a `moveFrom` cannot end up struck through in the margin and blue on the glyph.
|
|
109
|
+
*/
|
|
110
|
+
declare function markRevisionRemovesMark(revision: RevisionAttribution): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* The one decision on a paragraph's mark that a single-field reader sees.
|
|
113
|
+
*
|
|
114
|
+
* @deprecated Reads one of the revisions a mark can carry. Use {@link paragraphMarkRevisionsOf},
|
|
115
|
+
* which answers with all of them.
|
|
116
|
+
*/
|
|
66
117
|
declare function paragraphMarkRevisionOf(paragraph: OoxmlNode): RevisionAttribution | null;
|
|
67
118
|
/**
|
|
68
119
|
* The tracked FORMAT change on a property list, from `w:rPrChange` or `w:pPrChange`.
|
|
@@ -81,4 +132,4 @@ declare function formatRevisionOf(properties: readonly {
|
|
|
81
132
|
/** True when this stack of revisions marks its content as deleted from the live document. */
|
|
82
133
|
declare function revisionsAreDeletion(revisions: readonly RevisionAttribution[]): boolean;
|
|
83
134
|
|
|
84
|
-
export { DEFAULT_REVISION_DISPLAY_MODE as D, type RevisionDisplayMode as R, type RevisionAttribution as a, type RevisionKind as b,
|
|
135
|
+
export { DEFAULT_REVISION_DISPLAY_MODE as D, type RevisionDisplayMode as R, type RevisionAttribution as a, type RevisionKind as b, paragraphMarkRevisionOf as c, paragraphMarkRevisionsOf as d, revisionsVisible as e, formatRevisionOf as f, markRevisionRemovesMark as m, paragraphMarkFormatRevisionOf as p, revisionsAreDeletion as r, shownMarkRevision as s };
|