@docx-editor.dev/core 2.5.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.md +39 -1
- 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-4GQXAXTZ.js +5 -0
- package/dist/chunk-DGUHCJPF.cjs +18 -0
- package/dist/{chunk-2GSRLGUI.cjs → chunk-DY3QVCWC.cjs} +6 -6
- package/dist/{chunk-45FL7KH4.js → chunk-E7BXJ4BF.js} +1 -1
- package/dist/chunk-F7Z6PWAZ.cjs +2 -0
- package/dist/chunk-JEMP5YI5.cjs +15 -0
- package/dist/{chunk-3FRSOOND.cjs → chunk-JZXK4DKV.cjs} +1 -1
- package/dist/chunk-NIGGABAA.js +15 -0
- package/dist/chunk-OPKOTVQQ.js +18 -0
- package/dist/{chunk-GOEBQ26R.js → chunk-PSZH2VXP.js} +1 -1
- package/dist/{chunk-LJIX4ZDF.js → chunk-R75OLPL6.js} +6 -6
- package/dist/{chunk-JDHTCMFA.cjs → chunk-SFMAIFEN.cjs} +1 -1
- package/dist/chunk-SKWYEZCO.cjs +5 -0
- package/dist/{chunk-YTZIGUXT.js → chunk-SMRD66T5.js} +1 -1
- package/dist/chunk-WAVN7MAT.js +2 -0
- package/dist/chunk-WU7PUTVA.js +2 -0
- package/dist/{chunk-OHJQ7GPZ.cjs → chunk-YMYCPY5Y.cjs} +1 -1
- package/dist/{content-control-walk-BeAFh6Xi.d.cts → content-control-walk-CbTqHq6O.d.cts} +1 -1
- package/dist/{content-control-walk-CQp8l6eS.d.ts → content-control-walk-D06GijR0.d.ts} +1 -1
- package/dist/contracts/editor.cjs +1 -1
- package/dist/contracts/editor.d.cts +10 -10
- package/dist/contracts/editor.d.ts +10 -10
- package/dist/contracts/editor.js +1 -1
- 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/contracts/types.d.cts +3 -1
- package/dist/contracts/types.d.ts +3 -1
- package/dist/{custom-node-writes-CIC_-wad.d.cts → custom-node-writes-D9G3GKQ7.d.cts} +7 -7
- package/dist/{custom-node-writes-2clI36T9.d.ts → custom-node-writes-tJw8U9MO.d.ts} +7 -7
- package/dist/dist-YFULGVS3.js +2 -0
- package/dist/{editor-CUul9IuY.d.cts → editor-BZEJL3vv.d.cts} +33 -19
- package/dist/{editor-DIwctMcU.d.ts → editor-D2zOJztO.d.ts} +33 -19
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +375 -38
- package/dist/editor.d.cts +42 -26
- package/dist/editor.d.ts +42 -26
- package/dist/editor.js +1 -1
- package/dist/harfbuzz.wasm +0 -0
- package/dist/{hf-references-CAp1xTv6.d.ts → hf-references-BdjsQNE_.d.ts} +2 -2
- package/dist/{hf-references-BPET4tlK.d.cts → hf-references-CgEOSw3i.d.cts} +2 -2
- package/dist/{image-resources-CSlQmPIm.d.cts → image-resources-BaHz4QAd.d.cts} +10 -10
- package/dist/{image-resources-e13t-pgy.d.ts → image-resources-Cl5_cNi9.d.ts} +10 -10
- package/dist/{index-BUsYjxF5.d.ts → index-D8L8WrNF.d.ts} +111 -21
- package/dist/{index-8t44iXTY.d.cts → index-_xF7n_z0.d.cts} +111 -21
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +20 -20
- package/dist/index.d.ts +20 -20
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +71 -23
- package/dist/layout.d.ts +71 -23
- package/dist/layout.js +1 -1
- package/dist/node-module-shim-TTKTT66I.js +1 -0
- package/dist/{note-nodes-CZQXU6Fg.d.ts → note-nodes-BPSTVDMr.d.ts} +1 -1
- package/dist/{note-nodes-B2wWES2L.d.cts → note-nodes-C6DLxlvj.d.cts} +1 -1
- package/dist/{ooxml-package-Cmbe_M04.d.cts → ooxml-package-CR5us6ad.d.cts} +115 -115
- package/dist/{ooxml-package-BrxTmTsZ.d.ts → ooxml-package-D_CtywTW.d.ts} +115 -115
- package/dist/{ooxml-tree-CG0odFyi.d.cts → ooxml-tree-BU0e3DVi.d.cts} +1 -1
- package/dist/{ooxml-tree-CG0odFyi.d.ts → ooxml-tree-BU0e3DVi.d.ts} +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +22 -8
- package/dist/output.d.ts +22 -8
- package/dist/output.js +1 -1
- package/dist/{protocol-B5oSt08P.d.cts → protocol-CD7slqvl.d.cts} +2 -2
- package/dist/{protocol-ooK7PAXz.d.ts → protocol-DsbfgBwA.d.ts} +2 -2
- package/dist/{note-properties-Dhqkro--.d.cts → review-reads-Dr0CpW6u.d.cts} +67 -67
- package/dist/{note-properties-BS66XmcC.d.ts → review-reads-HDvoQXK2.d.ts} +67 -67
- package/dist/{review-support-Bl9sN8cv.d.ts → review-support-D4ZBdUXa.d.ts} +2 -2
- package/dist/{review-support-CHuJxHmz.d.cts → review-support-T-riLz4Y.d.cts} +2 -2
- package/dist/{revision-projection-u4nT52xT.d.ts → revision-projection-UKqvPa4-.d.ts} +1 -1
- package/dist/{revision-projection-DRZMzoLD.d.cts → revision-projection-WzlQGBJx.d.cts} +1 -1
- package/dist/{semantic-cell-selection-Dc-_enhm.d.ts → semantic-cell-selection-B5vfPz4Q.d.ts} +4 -4
- package/dist/{semantic-cell-selection-CdNQ-a9-.d.cts → semantic-cell-selection-BTQFpN0S.d.cts} +4 -4
- package/dist/{semantic-interaction-DgaWs-5w.d.cts → semantic-interaction-CDNEU_Tx.d.cts} +1 -1
- package/dist/{semantic-interaction-CCVwyw2A.d.ts → semantic-interaction-lvpzZRpA.d.ts} +1 -1
- package/dist/{semantic-paint-6iIB4fhx.d.cts → semantic-paint-BBPL3u5w.d.ts} +111 -3
- package/dist/{semantic-paint-CKIbFkQ7.d.ts → semantic-paint-IjbL-4CT.d.cts} +111 -3
- package/dist/{semantic-records-B-qbrnp2.d.ts → semantic-records-CdQvpUj1.d.ts} +4 -4
- package/dist/{semantic-records-Dq8SlCY8.d.cts → semantic-records-DEOs3_tE.d.cts} +4 -4
- package/dist/{shaped-measurer-Dx4llNhK.d.cts → shaped-measurer-C2SJAjV0.d.cts} +1 -1
- package/dist/{shaped-measurer-BT4FqYe9.d.ts → shaped-measurer-l4o5ITJ0.d.ts} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +238 -238
- package/dist/store.d.ts +238 -238
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-DOYNkKqD.d.cts → tree-op-types-CUCwPWjT.d.cts} +219 -219
- package/dist/{tree-op-types-CZw9QhWX.d.ts → tree-op-types-D0fTNBVW.d.ts} +219 -219
- package/dist/{tree-session-CF_EOhTW.d.ts → tree-session-CH1oA75f.d.ts} +61 -45
- package/dist/{tree-session-CtK3KgFU.d.cts → tree-session-b7bggR-S.d.cts} +61 -45
- package/dist/{tree-store-Jg-q7fyf.d.cts → tree-store-BqgeCa1Q.d.cts} +3 -3
- package/dist/{tree-store-9TaX-L0V.d.ts → tree-store-CIKASRHk.d.ts} +3 -3
- package/licenses/HarfBuzz-COPYING.txt +42 -0
- package/package.json +5 -3
- package/dist/chunk-2QIA75K3.js +0 -2
- package/dist/chunk-32NXPFYL.js +0 -5
- package/dist/chunk-3C533HSQ.cjs +0 -18
- package/dist/chunk-7GYF33B5.cjs +0 -2
- package/dist/chunk-H3DZP4LE.cjs +0 -5
- package/dist/chunk-L2GMLEHX.cjs +0 -14
- package/dist/chunk-QUZM6LWQ.js +0 -14
- package/dist/chunk-T252F4US.js +0 -18
|
@@ -1,44 +1,4 @@
|
|
|
1
|
-
import { e as OoxmlPart, X as XmlLimits, n as OoxmlReadRejection } from './ooxml-tree-
|
|
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;
|
|
1
|
+
import { e as OoxmlPart, X as XmlLimits, n as OoxmlReadRejection } from './ooxml-tree-BU0e3DVi.cjs';
|
|
42
2
|
|
|
43
3
|
/**
|
|
44
4
|
* Why a part or relationship name was refused.
|
|
@@ -96,6 +56,91 @@ declare function resolveInternalTarget(ownerPartName: string, rawTarget: string)
|
|
|
96
56
|
*/
|
|
97
57
|
declare function validateExternalTarget(raw: string): NameResult;
|
|
98
58
|
|
|
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
|
+
|
|
99
144
|
/** OOXML image relationship type for embedded or linked media parts. */
|
|
100
145
|
declare const IMAGE_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image";
|
|
101
146
|
/**
|
|
@@ -178,90 +223,45 @@ type ImageRelationshipResolution = {
|
|
|
178
223
|
*/
|
|
179
224
|
declare function resolveImageRelationship(records: readonly RelationshipRecord[] | undefined, ownerPart: string, relationshipId: string): ImageRelationshipResolution;
|
|
180
225
|
|
|
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
|
-
}
|
|
193
226
|
/**
|
|
194
|
-
*
|
|
195
|
-
*
|
|
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.
|
|
198
|
-
*/
|
|
199
|
-
interface ContentTypeRecords {
|
|
200
|
-
readonly defaults: readonly DefaultRecord[];
|
|
201
|
-
readonly overrides: readonly OverrideRecord[];
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Why content-type records could not be indexed.
|
|
227
|
+
* Why a zip was refused at the trust boundary.
|
|
205
228
|
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
229
|
+
* `too-large` and `too-many-entries` are the zip-bomb guards; `bad-name` catches path traversal —
|
|
230
|
+
* an entry with `..` or a leading `/` is rejected rather than normalized.
|
|
208
231
|
*/
|
|
209
|
-
type
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
readonly
|
|
215
|
-
|
|
216
|
-
readonly
|
|
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>;
|
|
232
|
+
type ZipRejection = 'too-many-entries' | 'too-large' | 'bad-name' | 'inflate-error';
|
|
233
|
+
/** Archive caps: entry count, total decompressed bytes, and the decompression ratio. */
|
|
234
|
+
interface ZipLimits {
|
|
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;
|
|
235
240
|
}
|
|
236
|
-
/** The
|
|
237
|
-
|
|
241
|
+
/** The archive caps in force when a host configures none. Conservative and finite. */
|
|
242
|
+
declare const DEFAULT_ZIP_LIMITS: ZipLimits;
|
|
243
|
+
/** The read entries, or the typed refusal. Never throws — the bytes are untrusted. */
|
|
244
|
+
type ZipReadResult = {
|
|
238
245
|
readonly ok: true;
|
|
239
|
-
readonly
|
|
246
|
+
readonly entries: ReadonlyMap<string, Uint8Array>;
|
|
240
247
|
} | {
|
|
241
248
|
readonly ok: false;
|
|
242
|
-
readonly
|
|
249
|
+
readonly reason: ZipRejection;
|
|
250
|
+
readonly detail?: string;
|
|
243
251
|
};
|
|
244
252
|
/**
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
|
|
248
|
-
|
|
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.
|
|
253
|
+
* Inflate a ZIP archive with bounds + OPC name normalization. Entry name, count,
|
|
254
|
+
* compression-ratio, and total-uncompressed-size limits are enforced BEFORE each
|
|
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.
|
|
254
258
|
*/
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
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;
|
|
259
|
+
declare function readZip(bytes: Uint8Array, limits?: ZipLimits): ZipReadResult;
|
|
260
|
+
/** Deflate a set of canonical-part-name -> bytes into a ZIP archive. Every part name
|
|
261
|
+
* is re-validated through the OPC normalization profile before writing, so a
|
|
262
|
+
* traversal/encoded/normalized-alias name from an untrusted serialized model can
|
|
263
|
+
* never be smuggled into a ZIP entry (write-side path-traversal guard). */
|
|
264
|
+
declare function writeZip(entries: ReadonlyMap<string, Uint8Array>): Uint8Array;
|
|
265
265
|
|
|
266
266
|
/** Caps applied while loading a package: zip, XML, part count and relationship count. */
|
|
267
267
|
interface OoxmlPackageLimits {
|
|
@@ -1,44 +1,4 @@
|
|
|
1
|
-
import { e as OoxmlPart, X as XmlLimits, n as OoxmlReadRejection } from './ooxml-tree-
|
|
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;
|
|
1
|
+
import { e as OoxmlPart, X as XmlLimits, n as OoxmlReadRejection } from './ooxml-tree-BU0e3DVi.js';
|
|
42
2
|
|
|
43
3
|
/**
|
|
44
4
|
* Why a part or relationship name was refused.
|
|
@@ -96,6 +56,91 @@ declare function resolveInternalTarget(ownerPartName: string, rawTarget: string)
|
|
|
96
56
|
*/
|
|
97
57
|
declare function validateExternalTarget(raw: string): NameResult;
|
|
98
58
|
|
|
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
|
+
|
|
99
144
|
/** OOXML image relationship type for embedded or linked media parts. */
|
|
100
145
|
declare const IMAGE_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image";
|
|
101
146
|
/**
|
|
@@ -178,90 +223,45 @@ type ImageRelationshipResolution = {
|
|
|
178
223
|
*/
|
|
179
224
|
declare function resolveImageRelationship(records: readonly RelationshipRecord[] | undefined, ownerPart: string, relationshipId: string): ImageRelationshipResolution;
|
|
180
225
|
|
|
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
|
-
}
|
|
193
226
|
/**
|
|
194
|
-
*
|
|
195
|
-
*
|
|
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.
|
|
198
|
-
*/
|
|
199
|
-
interface ContentTypeRecords {
|
|
200
|
-
readonly defaults: readonly DefaultRecord[];
|
|
201
|
-
readonly overrides: readonly OverrideRecord[];
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* Why content-type records could not be indexed.
|
|
227
|
+
* Why a zip was refused at the trust boundary.
|
|
205
228
|
*
|
|
206
|
-
*
|
|
207
|
-
*
|
|
229
|
+
* `too-large` and `too-many-entries` are the zip-bomb guards; `bad-name` catches path traversal —
|
|
230
|
+
* an entry with `..` or a leading `/` is rejected rather than normalized.
|
|
208
231
|
*/
|
|
209
|
-
type
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
readonly
|
|
215
|
-
|
|
216
|
-
readonly
|
|
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>;
|
|
232
|
+
type ZipRejection = 'too-many-entries' | 'too-large' | 'bad-name' | 'inflate-error';
|
|
233
|
+
/** Archive caps: entry count, total decompressed bytes, and the decompression ratio. */
|
|
234
|
+
interface ZipLimits {
|
|
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;
|
|
235
240
|
}
|
|
236
|
-
/** The
|
|
237
|
-
|
|
241
|
+
/** The archive caps in force when a host configures none. Conservative and finite. */
|
|
242
|
+
declare const DEFAULT_ZIP_LIMITS: ZipLimits;
|
|
243
|
+
/** The read entries, or the typed refusal. Never throws — the bytes are untrusted. */
|
|
244
|
+
type ZipReadResult = {
|
|
238
245
|
readonly ok: true;
|
|
239
|
-
readonly
|
|
246
|
+
readonly entries: ReadonlyMap<string, Uint8Array>;
|
|
240
247
|
} | {
|
|
241
248
|
readonly ok: false;
|
|
242
|
-
readonly
|
|
249
|
+
readonly reason: ZipRejection;
|
|
250
|
+
readonly detail?: string;
|
|
243
251
|
};
|
|
244
252
|
/**
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
|
|
248
|
-
|
|
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.
|
|
253
|
+
* Inflate a ZIP archive with bounds + OPC name normalization. Entry name, count,
|
|
254
|
+
* compression-ratio, and total-uncompressed-size limits are enforced BEFORE each
|
|
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.
|
|
254
258
|
*/
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
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;
|
|
259
|
+
declare function readZip(bytes: Uint8Array, limits?: ZipLimits): ZipReadResult;
|
|
260
|
+
/** Deflate a set of canonical-part-name -> bytes into a ZIP archive. Every part name
|
|
261
|
+
* is re-validated through the OPC normalization profile before writing, so a
|
|
262
|
+
* traversal/encoded/normalized-alias name from an untrusted serialized model can
|
|
263
|
+
* never be smuggled into a ZIP entry (write-side path-traversal guard). */
|
|
264
|
+
declare function writeZip(entries: ReadonlyMap<string, Uint8Array>): Uint8Array;
|
|
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 OoxmlDrawingNode as o, type OoxmlContentControlEndPropertiesNode as p, type OoxmlContentControlPropertiesNode 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 OoxmlDrawingNode as o, type OoxmlContentControlEndPropertiesNode as p, type OoxmlContentControlPropertiesNode 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 chunkF7Z6PWAZ_cjs=require('./chunk-F7Z6PWAZ.cjs');require('./chunk-DGUHCJPF.cjs'),require('./chunk-IJ4V3LGV.cjs'),require('./chunk-SFMAIFEN.cjs'),require('./chunk-DY3QVCWC.cjs');Object.defineProperty(exports,"DEFAULT_FIELD_SHADING",{enumerable:true,get:function(){return chunkF7Z6PWAZ_cjs.h}});Object.defineProperty(exports,"paintSelectionOverlay",{enumerable:true,get:function(){return chunkF7Z6PWAZ_cjs.j}});Object.defineProperty(exports,"paintSemanticLayout",{enumerable:true,get:function(){return chunkF7Z6PWAZ_cjs.i}});
|
package/dist/output.d.cts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import './
|
|
4
|
-
import './
|
|
5
|
-
import './
|
|
6
|
-
import './ooxml-
|
|
7
|
-
import './
|
|
1
|
+
import { R as ReviewAuthorInfo } from './semantic-paint-IjbL-4CT.cjs';
|
|
2
|
+
export { D as DEFAULT_FIELD_SHADING, F as FieldShadingMode, P as PaintOptions, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles, p as paintSemanticLayout } from './semantic-paint-IjbL-4CT.cjs';
|
|
3
|
+
import { S as SemanticLayout } from './semantic-records-DEOs3_tE.cjs';
|
|
4
|
+
import './image-resources-BaHz4QAd.cjs';
|
|
5
|
+
import './tree-op-types-CUCwPWjT.cjs';
|
|
6
|
+
import './ooxml-tree-BU0e3DVi.cjs';
|
|
7
|
+
import './ooxml-package-CR5us6ad.cjs';
|
|
8
|
+
import './revision-projection-WzlQGBJx.cjs';
|
|
8
9
|
|
|
9
10
|
/** A rectangle in page-content coordinates, on a named page. */
|
|
10
11
|
interface OverlayRect {
|
|
@@ -21,6 +22,19 @@ interface OverlayRect {
|
|
|
21
22
|
* sheets over the pages just to vary a colour.
|
|
22
23
|
*/
|
|
23
24
|
readonly className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* WHOSE band this is, as CSS hooks on the rectangle: `data-review-author`, `data-review-author-slot`, and
|
|
27
|
+
* `--doc-review-author-current` set to the colour that author resolves to.
|
|
28
|
+
*
|
|
29
|
+
* The same three the review card carries, and deliberately so — a host restyling one
|
|
30
|
+
* reviewer writes one selector that reaches both the card and the text it annotates. The
|
|
31
|
+
* band's DEFAULT colour does not change with the author (Word keeps every comment yellow);
|
|
32
|
+
* this only makes the author reachable from CSS.
|
|
33
|
+
*
|
|
34
|
+
* The SAME resolved author `getReviewAuthors` hands back, rather than a shape of this
|
|
35
|
+
* layer's own: one person is one object everywhere the review surface describes them.
|
|
36
|
+
*/
|
|
37
|
+
readonly reviewAuthor?: ReviewAuthorInfo;
|
|
24
38
|
}
|
|
25
39
|
/**
|
|
26
40
|
* How the selection overlay draws its rectangles over the painted pages.
|
|
@@ -58,4 +72,4 @@ interface SelectionOverlayOptions {
|
|
|
58
72
|
*/
|
|
59
73
|
declare function paintSelectionOverlay(layer: HTMLElement, layout: SemanticLayout, rects: readonly OverlayRect[], options: SelectionOverlayOptions): void;
|
|
60
74
|
|
|
61
|
-
export { type OverlayRect, type SelectionOverlayOptions, paintSelectionOverlay };
|
|
75
|
+
export { type OverlayRect, ReviewAuthorInfo, type SelectionOverlayOptions, paintSelectionOverlay };
|
package/dist/output.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import './
|
|
4
|
-
import './
|
|
5
|
-
import './
|
|
6
|
-
import './ooxml-
|
|
7
|
-
import './
|
|
1
|
+
import { R as ReviewAuthorInfo } from './semantic-paint-BBPL3u5w.js';
|
|
2
|
+
export { D as DEFAULT_FIELD_SHADING, F as FieldShadingMode, P as PaintOptions, a as RevisionAuthorAssignments, b as RevisionAuthorStyle, c as RevisionStyles, p as paintSemanticLayout } from './semantic-paint-BBPL3u5w.js';
|
|
3
|
+
import { S as SemanticLayout } from './semantic-records-CdQvpUj1.js';
|
|
4
|
+
import './image-resources-Cl5_cNi9.js';
|
|
5
|
+
import './tree-op-types-D0fTNBVW.js';
|
|
6
|
+
import './ooxml-tree-BU0e3DVi.js';
|
|
7
|
+
import './ooxml-package-D_CtywTW.js';
|
|
8
|
+
import './revision-projection-UKqvPa4-.js';
|
|
8
9
|
|
|
9
10
|
/** A rectangle in page-content coordinates, on a named page. */
|
|
10
11
|
interface OverlayRect {
|
|
@@ -21,6 +22,19 @@ interface OverlayRect {
|
|
|
21
22
|
* sheets over the pages just to vary a colour.
|
|
22
23
|
*/
|
|
23
24
|
readonly className?: string;
|
|
25
|
+
/**
|
|
26
|
+
* WHOSE band this is, as CSS hooks on the rectangle: `data-review-author`, `data-review-author-slot`, and
|
|
27
|
+
* `--doc-review-author-current` set to the colour that author resolves to.
|
|
28
|
+
*
|
|
29
|
+
* The same three the review card carries, and deliberately so — a host restyling one
|
|
30
|
+
* reviewer writes one selector that reaches both the card and the text it annotates. The
|
|
31
|
+
* band's DEFAULT colour does not change with the author (Word keeps every comment yellow);
|
|
32
|
+
* this only makes the author reachable from CSS.
|
|
33
|
+
*
|
|
34
|
+
* The SAME resolved author `getReviewAuthors` hands back, rather than a shape of this
|
|
35
|
+
* layer's own: one person is one object everywhere the review surface describes them.
|
|
36
|
+
*/
|
|
37
|
+
readonly reviewAuthor?: ReviewAuthorInfo;
|
|
24
38
|
}
|
|
25
39
|
/**
|
|
26
40
|
* How the selection overlay draws its rectangles over the painted pages.
|
|
@@ -58,4 +72,4 @@ interface SelectionOverlayOptions {
|
|
|
58
72
|
*/
|
|
59
73
|
declare function paintSelectionOverlay(layer: HTMLElement, layout: SemanticLayout, rects: readonly OverlayRect[], options: SelectionOverlayOptions): void;
|
|
60
74
|
|
|
61
|
-
export { type OverlayRect, type SelectionOverlayOptions, paintSelectionOverlay };
|
|
75
|
+
export { type OverlayRect, ReviewAuthorInfo, type SelectionOverlayOptions, paintSelectionOverlay };
|
package/dist/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{h as DEFAULT_FIELD_SHADING,j as paintSelectionOverlay,i as paintSemanticLayout}from'./chunk-WAVN7MAT.js';import'./chunk-OPKOTVQQ.js';import'./chunk-WU7PUTVA.js';import'./chunk-UVIUNAQ6.js';import'./chunk-SMRD66T5.js';import'./chunk-R75OLPL6.js';
|