@stll/docx-core 0.38.0 → 0.39.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/{document-wNmygRXS.d.ts → document-BkGU2ctn.d.ts} +158 -68
- package/dist/{document-C02Ulybe.js → document-oU-dz9zs.js} +141 -1
- package/dist/docx_kernel_bg.wasm +0 -0
- package/dist/index.d.ts +28 -28
- package/dist/index.js +74 -31
- package/dist/model/document.d.ts +2 -2
- package/dist/model/document.js +1 -2
- package/dist/ops/documentOps.d.ts +351 -78
- package/dist/ops/documentOps.js +5929 -3883
- package/dist/projection.d.ts +12 -12
- package/dist/projection.js +4 -2
- package/dist/schema/sequenceChildren.d.ts +7 -7
- package/dist/schema/sequenceChildren.js +1 -2
- package/dist/{sequenceChildren-B8ODeI3J.js → sequenceChildren-ByDxvF4j.js} +21 -3
- package/dist/zip/writeZipPart.d.ts +2 -2
- package/package.json +7 -8
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as finalizeParagraphFormatting, Dn as Run, E as Style, H as setDocumentBodyComments, K as BlockContent, On as RunContent, Pn as SectionProperties, Q as BreakContent, V as isCanonicallyEmptyParagraphFormatting, Vr as NumberingDefinitions, Xn as TableCell, Yn as Table, _n as PositionalTab, cr as TextContent, ct as DocumentBackground, dn as Paragraph, fn as ParagraphContent, i as Document, ir as TableRow, lt as DocumentBackgroundDrawing, o as DocxConformanceClass, r as DOCX_CONFORMANCE_CLASSES, s as DocxPackage, ut as DocumentBody } from "./document-BkGU2ctn.js";
|
|
2
2
|
import JSZip from "jszip";
|
|
3
3
|
import { Buffer } from "node:buffer";
|
|
4
4
|
//#region src/legal-source/types.d.ts
|
|
@@ -108,18 +108,18 @@ type LegalSourceDocxCompileResult = ({
|
|
|
108
108
|
}>;
|
|
109
109
|
//#endregion
|
|
110
110
|
//#region src/legal-source/compile.d.ts
|
|
111
|
-
declare const compileLegalSourceToDocument: (source: string, options?: LegalSourceCompileOptions) => LegalSourceCompileResult;
|
|
111
|
+
export declare const compileLegalSourceToDocument: (source: string, options?: LegalSourceCompileOptions) => LegalSourceCompileResult;
|
|
112
112
|
//#endregion
|
|
113
113
|
//#region src/legal-source/parser.d.ts
|
|
114
|
-
declare const parseLegalSource: (source: string, options?: {
|
|
114
|
+
export declare const parseLegalSource: (source: string, options?: {
|
|
115
115
|
titleFallback?: string;
|
|
116
116
|
}) => LegalSourceParseResult;
|
|
117
117
|
//#endregion
|
|
118
118
|
//#region src/legal-source/validate.d.ts
|
|
119
|
-
declare const validateLegalDraft: (draft: LegalDraft) => LegalDraftDiagnostic[];
|
|
119
|
+
export declare const validateLegalDraft: (draft: LegalDraft) => LegalDraftDiagnostic[];
|
|
120
120
|
//#endregion
|
|
121
121
|
//#region src/legal-source/index.d.ts
|
|
122
|
-
declare const compileLegalSourceToDocx: (source: string, options?: LegalSourceCompileOptions) => Promise<LegalSourceDocxCompileResult>;
|
|
122
|
+
export declare const compileLegalSourceToDocx: (source: string, options?: LegalSourceCompileOptions) => Promise<LegalSourceDocxCompileResult>;
|
|
123
123
|
//#endregion
|
|
124
124
|
//#region src/markdown/content.d.ts
|
|
125
125
|
/** Block content and the numbering definitions its list paragraphs reference. */
|
|
@@ -139,7 +139,7 @@ type MarkdownContent = {
|
|
|
139
139
|
* Synchronous. The caller places the blocks into a `Document` of its own
|
|
140
140
|
* (page geometry, styles, and presets are the host's decision).
|
|
141
141
|
*/
|
|
142
|
-
declare const compileMarkdownToContent: (markdown: string) => MarkdownContent;
|
|
142
|
+
export declare const compileMarkdownToContent: (markdown: string) => MarkdownContent;
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region src/markdown/href.d.ts
|
|
145
145
|
/**
|
|
@@ -148,7 +148,7 @@ declare const compileMarkdownToContent: (markdown: string) => MarkdownContent;
|
|
|
148
148
|
* `undefined` so a markdown link degrades to its text instead of carrying an
|
|
149
149
|
* executable target into the document.
|
|
150
150
|
*/
|
|
151
|
-
declare const sanitizeExternalUrl: (rawUrl: string | undefined) => string | undefined;
|
|
151
|
+
export declare const sanitizeExternalUrl: (rawUrl: string | undefined) => string | undefined;
|
|
152
152
|
//#endregion
|
|
153
153
|
//#region src/serialize/docx.d.ts
|
|
154
154
|
type SerializeDocumentOptions = {
|
|
@@ -175,12 +175,12 @@ type SerializeDocumentOptions = {
|
|
|
175
175
|
* from-scratch document builder those suites can call; the brand follows it,
|
|
176
176
|
* not the other way round.
|
|
177
177
|
*/
|
|
178
|
-
declare const serializeDocumentToDocx: (document: Document, options?: SerializeDocumentOptions) => Promise<ArrayBuffer>;
|
|
178
|
+
export declare const serializeDocumentToDocx: (document: Document, options?: SerializeDocumentOptions) => Promise<ArrayBuffer>;
|
|
179
179
|
//#endregion
|
|
180
180
|
//#region src/serialize/numericIds.d.ts
|
|
181
181
|
declare const InvalidOoxmlNumericIdError_base: import("better-result").TaggedErrorClass<"InvalidOoxmlNumericIdError">;
|
|
182
182
|
/** A writer would emit an identifier outside its OOXML schema's numeric domain. */
|
|
183
|
-
declare class InvalidOoxmlNumericIdError extends InvalidOoxmlNumericIdError_base<{
|
|
183
|
+
export declare class InvalidOoxmlNumericIdError extends InvalidOoxmlNumericIdError_base<{
|
|
184
184
|
message: string;
|
|
185
185
|
partPath: string;
|
|
186
186
|
elementName: string;
|
|
@@ -194,8 +194,8 @@ type NumericIdOptions = {
|
|
|
194
194
|
attributeName: string;
|
|
195
195
|
domain?: "signed32" | "unsigned32";
|
|
196
196
|
};
|
|
197
|
-
declare const isValidOoxmlNumericId: (value: string | number, domain?: "signed32" | "unsigned32") => boolean;
|
|
198
|
-
declare const assertValidOoxmlNumericId: ({ value, partPath, elementName, attributeName, domain }: NumericIdOptions) => void;
|
|
197
|
+
export declare const isValidOoxmlNumericId: (value: string | number, domain?: "signed32" | "unsigned32") => boolean;
|
|
198
|
+
export declare const assertValidOoxmlNumericId: ({ value, partPath, elementName, attributeName, domain }: NumericIdOptions) => void;
|
|
199
199
|
type NumericIdAttributeOptions = {
|
|
200
200
|
elementName: string;
|
|
201
201
|
elementNamespace: string | undefined;
|
|
@@ -203,28 +203,28 @@ type NumericIdAttributeOptions = {
|
|
|
203
203
|
attributeNamespace: string | undefined;
|
|
204
204
|
};
|
|
205
205
|
/** Shared schema classification for import normalization and writer validation. */
|
|
206
|
-
declare const ooxmlNumericIdDomain: ({ elementName, elementNamespace, attributeName, attributeNamespace }: NumericIdAttributeOptions) => "signed32" | "unsigned32" | undefined;
|
|
206
|
+
export declare const ooxmlNumericIdDomain: ({ elementName, elementNamespace, attributeName, attributeNamespace }: NumericIdAttributeOptions) => "signed32" | "unsigned32" | undefined;
|
|
207
207
|
type OoxmlNumericIdAttributeOptions = {
|
|
208
208
|
elementName: string;
|
|
209
209
|
attributeName: string;
|
|
210
210
|
};
|
|
211
211
|
/** Attributes an identity scan must retain, derived from the domain classifier. */
|
|
212
|
-
declare const isOoxmlNumericIdAttributeName: ({ elementName, attributeName }: OoxmlNumericIdAttributeOptions) => boolean;
|
|
212
|
+
export declare const isOoxmlNumericIdAttributeName: ({ elementName, attributeName }: OoxmlNumericIdAttributeOptions) => boolean;
|
|
213
213
|
/** Conservative presence check; safe IDs must still be reserved during import repair. */
|
|
214
|
-
declare const mayContainOoxmlNumericIds: (xml: string) => boolean;
|
|
214
|
+
export declare const mayContainOoxmlNumericIds: (xml: string) => boolean;
|
|
215
215
|
/**
|
|
216
216
|
* Conservative lexical preflight; namespace classification remains authoritative.
|
|
217
217
|
* A prefix is considered numeric if any scope binds it to WordprocessingML. This can send
|
|
218
218
|
* a shadowed foreign attribute to the full parser, but cannot hide a numeric one.
|
|
219
219
|
* Suspicious values with entity-encoded bindings or values require the authoritative scan.
|
|
220
220
|
*/
|
|
221
|
-
declare const mayContainInvalidOoxmlNumericIds: (xml: string, mode?: "schema" | "range") => boolean;
|
|
221
|
+
export declare const mayContainInvalidOoxmlNumericIds: (xml: string, mode?: "schema" | "range") => boolean;
|
|
222
222
|
/**
|
|
223
223
|
* Validate both authored and opaque replayed identifiers by namespace URI.
|
|
224
224
|
* This runs at ZIP exits too, so unchanged parts cannot bypass the writer guard.
|
|
225
225
|
* Permission-range ids are strings in OOXML and intentionally remain unrestricted.
|
|
226
226
|
*/
|
|
227
|
-
declare const assertValidOoxmlNumericIds: (xml: string, partPath: string) => void;
|
|
227
|
+
export declare const assertValidOoxmlNumericIds: (xml: string, partPath: string) => void;
|
|
228
228
|
//#endregion
|
|
229
229
|
//#region src/serialize/xml.d.ts
|
|
230
230
|
/**
|
|
@@ -249,7 +249,7 @@ declare const assertValidOoxmlNumericIds: (xml: string, partPath: string) => voi
|
|
|
249
249
|
* *writes* is one spelling per polarity, because a package that writes three
|
|
250
250
|
* makes every byte-level comparison argue about which one it is looking at.
|
|
251
251
|
*/
|
|
252
|
-
declare const serializeOnOffElement: (value: boolean | undefined, name: string) => string;
|
|
252
|
+
export declare const serializeOnOffElement: (value: boolean | undefined, name: string) => string;
|
|
253
253
|
/**
|
|
254
254
|
* Append a `CT_OnOff` element to a property list, and nothing when it is absent.
|
|
255
255
|
*
|
|
@@ -257,7 +257,7 @@ declare const serializeOnOffElement: (value: boolean | undefined, name: string)
|
|
|
257
257
|
* `parts.length`, so an absent toggle must not leave an empty string behind:
|
|
258
258
|
* that would turn an unformatted run into a `<w:rPr></w:rPr>`.
|
|
259
259
|
*/
|
|
260
|
-
declare const pushOnOffElement: (parts: string[], value: boolean | undefined, name: string) => void;
|
|
260
|
+
export declare const pushOnOffElement: (parts: string[], value: boolean | undefined, name: string) => void;
|
|
261
261
|
//#endregion
|
|
262
262
|
//#region src/serialize/xmlEscape.d.ts
|
|
263
263
|
/**
|
|
@@ -300,15 +300,15 @@ declare const pushOnOffElement: (parts: string[], value: boolean | undefined, na
|
|
|
300
300
|
* value whichever context it lands in.
|
|
301
301
|
*/
|
|
302
302
|
/** Escape a value for XML element content. Tab and LF survive as themselves. */
|
|
303
|
-
declare const escapeXmlText: (value: string) => string;
|
|
303
|
+
export declare const escapeXmlText: (value: string) => string;
|
|
304
304
|
/**
|
|
305
305
|
* Escape a value for an XML attribute value, of either quoting. Tab, LF and CR
|
|
306
306
|
* become character references so attribute-value normalisation cannot flatten
|
|
307
307
|
* them to spaces.
|
|
308
308
|
*/
|
|
309
|
-
declare const escapeXmlAttribute: (value: string) => string;
|
|
309
|
+
export declare const escapeXmlAttribute: (value: string) => string;
|
|
310
310
|
/** Whether `value` holds a character XML 1.0 cannot represent at all. */
|
|
311
|
-
declare const hasIllegalXmlCharacters: (value: string) => boolean;
|
|
311
|
+
export declare const hasIllegalXmlCharacters: (value: string) => boolean;
|
|
312
312
|
/**
|
|
313
313
|
* Make a value from outside folio representable in XML: an unpaired surrogate
|
|
314
314
|
* becomes U+FFFD, every other character XML cannot hold is dropped.
|
|
@@ -319,7 +319,7 @@ declare const hasIllegalXmlCharacters: (value: string) => boolean;
|
|
|
319
319
|
* go. `escapeXmlText` and `escapeXmlAttribute` apply the same rule again
|
|
320
320
|
* further down, but by then nobody can say which input lost a character.
|
|
321
321
|
*/
|
|
322
|
-
declare const sanitizeXmlCharacters: (value: string) => string;
|
|
322
|
+
export declare const sanitizeXmlCharacters: (value: string) => string;
|
|
323
323
|
//#endregion
|
|
324
324
|
//#region src/serialize/textWhitespace.d.ts
|
|
325
325
|
/**
|
|
@@ -332,7 +332,7 @@ declare const sanitizeXmlCharacters: (value: string) => string;
|
|
|
332
332
|
* fact only drifts, and it did: the editor round trip dropped it whenever two
|
|
333
333
|
* runs merged, because ProseMirror has nowhere to carry it.
|
|
334
334
|
*/
|
|
335
|
-
declare const requiresXmlSpacePreserve: (text: string) => boolean;
|
|
335
|
+
export declare const requiresXmlSpacePreserve: (text: string) => boolean;
|
|
336
336
|
//#endregion
|
|
337
337
|
//#region src/validate/docx.d.ts
|
|
338
338
|
declare module "jszip" {
|
|
@@ -341,7 +341,7 @@ declare module "jszip" {
|
|
|
341
341
|
internalStream(type: "uint8array"): JSZip.JSZipStreamHelper<Uint8Array>;
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
declare const DOCX_PACKAGE_ISSUE_CODES: {
|
|
344
|
+
export declare const DOCX_PACKAGE_ISSUE_CODES: {
|
|
345
345
|
readonly ArchiveBoundsExceeded: "archive_bounds_exceeded";
|
|
346
346
|
readonly InvalidArchive: "invalid_archive";
|
|
347
347
|
readonly InvalidPackageGraph: "invalid_package_graph";
|
|
@@ -367,8 +367,8 @@ type ValidateDocumentModelResult = {
|
|
|
367
367
|
valid: boolean;
|
|
368
368
|
issues: ValidateDocumentModelIssue[];
|
|
369
369
|
};
|
|
370
|
-
declare const validateDocxPackage: (buffer: ArrayBuffer | Uint8Array) => Promise<ValidateDocxPackageResult>;
|
|
371
|
-
declare const validateDocumentModel: (document: Document) => ValidateDocumentModelResult;
|
|
372
|
-
declare const assertValidDocumentModel: (document: Document) => void;
|
|
370
|
+
export declare const validateDocxPackage: (buffer: ArrayBuffer | Uint8Array) => Promise<ValidateDocxPackageResult>;
|
|
371
|
+
export declare const validateDocumentModel: (document: Document) => ValidateDocumentModelResult;
|
|
372
|
+
export declare const assertValidDocumentModel: (document: Document) => void;
|
|
373
373
|
//#endregion
|
|
374
|
-
export { type Autofix, type BlockContent, type BreakContent, type CompiledLegalDocument, DOCX_CONFORMANCE_CLASSES,
|
|
374
|
+
export { type Autofix, type BlockContent, type BreakContent, type CompiledLegalDocument, DOCX_CONFORMANCE_CLASSES, type Document, type DocumentBackground, type DocumentBackgroundDrawing, type DocumentBody, type DocxConformanceClass, type DocxPackage, type DocxPackageIssueCode, type LegalDraft, type LegalDraftBlock, type LegalDraftDiagnostic, type LegalSourceCompileOptions, type LegalSourceCompileResult, type LegalSourceDocxCompileResult, type LegalSourceParseResult, type MarkdownContent, type Paragraph, type ParagraphContent, type PositionalTab, type Run, type RunContent, type SectionProperties, type Style, type Table, type TableCell, type TableRow, type TextContent, type ValidateDocumentModelIssue, type ValidateDocumentModelResult, type ValidateDocxPackageResult, finalizeParagraphFormatting, isCanonicallyEmptyParagraphFormatting, setDocumentBodyComments };
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as borderStyleToken, Z as headingOutlineLevel, _t as isCanonicallyEmptyParagraphFormatting, ct as paragraphNumberingReferenceId, d as isNoteReferenceId, f as isOoxmlSymbolCharacter, gt as finalizeParagraphFormatting, k as statesNoBorder, lt as paragraphNumberingSlots, ot as paragraphNumberingLevel, r as DOCX_CONFORMANCE_CLASSES, s as MAX_REVISION_ID, st as paragraphNumberingReference, vt as setDocumentBodyComments } from "./document-oU-dz9zs.js";
|
|
2
|
+
import { i as serializeSequenceChildren } from "./sequenceChildren-ByDxvF4j.js";
|
|
2
3
|
import { writeZipPart } from "./zip/writeZipPart.js";
|
|
3
|
-
import { i as serializeSequenceChildren } from "./sequenceChildren-B8ODeI3J.js";
|
|
4
4
|
import { a as hasIllegalXmlCharacters, i as escapeXmlText, n as sanitizeMarkdownHref, o as sanitizeXmlCharacters, r as escapeXmlAttribute, t as sanitizeExternalUrl } from "./href-2XSCK-T8.js";
|
|
5
5
|
import { Result, TaggedError, panic } from "better-result";
|
|
6
|
-
import { decodeText, encodeUtf8 } from "@stll/utf8-boundaries";
|
|
7
6
|
import JSZip from "jszip";
|
|
7
|
+
import { decodeText, encodeUtf8 } from "@stll/utf8-boundaries";
|
|
8
8
|
import { XMLParser, XMLValidator } from "fast-xml-parser";
|
|
9
9
|
import { ENTITY_ACTION, EntityDecoder } from "@nodable/entities";
|
|
10
10
|
import { Marked } from "marked";
|
|
11
|
-
//#region src/serialize/textWhitespace.ts
|
|
12
|
-
/**
|
|
13
|
-
* Whether `<w:t>` needs `xml:space="preserve"` to render the text as written.
|
|
14
|
-
*
|
|
15
|
-
* Without the attribute an XML reader trims leading and trailing spaces and
|
|
16
|
-
* collapses runs of them, so the attribute is a pure function of the text: it
|
|
17
|
-
* is needed exactly when that normalisation would change what the reader sees.
|
|
18
|
-
* The model therefore keeps no flag of its own — a stored copy of a derived
|
|
19
|
-
* fact only drifts, and it did: the editor round trip dropped it whenever two
|
|
20
|
-
* runs merged, because ProseMirror has nowhere to carry it.
|
|
21
|
-
*/
|
|
22
|
-
const requiresXmlSpacePreserve = (text) => text.startsWith(" ") || text.endsWith(" ") || text.includes(" ");
|
|
23
|
-
//#endregion
|
|
24
11
|
//#region src/serialize/numericIds.ts
|
|
25
12
|
const WORD_NAMESPACES = /* @__PURE__ */ new Set(["http://schemas.openxmlformats.org/wordprocessingml/2006/main", "http://purl.oclc.org/ooxml/wordprocessingml/main"]);
|
|
26
13
|
const DRAWING_NAMESPACES = /* @__PURE__ */ new Set([
|
|
@@ -219,6 +206,19 @@ const assertValidOoxmlNumericIds = (xml, partPath) => {
|
|
|
219
206
|
visit(parser.parse(xml), /* @__PURE__ */ new Map());
|
|
220
207
|
};
|
|
221
208
|
//#endregion
|
|
209
|
+
//#region src/serialize/textWhitespace.ts
|
|
210
|
+
/**
|
|
211
|
+
* Whether `<w:t>` needs `xml:space="preserve"` to render the text as written.
|
|
212
|
+
*
|
|
213
|
+
* Without the attribute an XML reader trims leading and trailing spaces and
|
|
214
|
+
* collapses runs of them, so the attribute is a pure function of the text: it
|
|
215
|
+
* is needed exactly when that normalisation would change what the reader sees.
|
|
216
|
+
* The model therefore keeps no flag of its own — a stored copy of a derived
|
|
217
|
+
* fact only drifts, and it did: the editor round trip dropped it whenever two
|
|
218
|
+
* runs merged, because ProseMirror has nowhere to carry it.
|
|
219
|
+
*/
|
|
220
|
+
const requiresXmlSpacePreserve = (text) => text.startsWith(" ") || text.endsWith(" ") || text.includes(" ");
|
|
221
|
+
//#endregion
|
|
222
222
|
//#region src/serialize/xml.ts
|
|
223
223
|
const attr = (name, value) => value === void 0 ? "" : ` ${name}="${escapeXmlAttribute(String(value))}"`;
|
|
224
224
|
/**
|
|
@@ -432,7 +432,11 @@ const serializeBlock = (block) => {
|
|
|
432
432
|
case "blockCustomXml": return `${block.openingXml}${block.content.map(serializeBlock).join("")}${block.closingXml}`;
|
|
433
433
|
case "preservedBlock": return block.xml;
|
|
434
434
|
case "bookmarkStart":
|
|
435
|
-
case "bookmarkEnd":
|
|
435
|
+
case "bookmarkEnd":
|
|
436
|
+
case "moveFromRangeStart":
|
|
437
|
+
case "moveFromRangeEnd":
|
|
438
|
+
case "moveToRangeStart":
|
|
439
|
+
case "moveToRangeEnd": return "";
|
|
436
440
|
default: return "";
|
|
437
441
|
}
|
|
438
442
|
};
|
|
@@ -451,6 +455,8 @@ const serializeParagraphProperties = (paragraph) => {
|
|
|
451
455
|
const { numId, ilvl } = paragraphNumberingSlots(formatting.numPr);
|
|
452
456
|
parts.push("<w:numPr>" + (ilvl === void 0 ? "" : `<w:ilvl w:val="${ilvl}"/>`) + (numId === void 0 ? "" : `<w:numId w:val="${numId}"/>`) + "</w:numPr>");
|
|
453
457
|
}
|
|
458
|
+
pushOnOffElement(parts, formatting?.autoSpaceDE, "autoSpaceDE");
|
|
459
|
+
pushOnOffElement(parts, formatting?.autoSpaceDN, "autoSpaceDN");
|
|
454
460
|
if (formatting?.spaceBefore !== void 0 || formatting?.spaceAfter !== void 0 || formatting?.lineSpacing !== void 0) parts.push(`<w:spacing${attr("w:before", formatting.spaceBefore)}${attr("w:after", formatting.spaceAfter)}${attr("w:line", formatting.lineSpacing)}${attr("w:lineRule", formatting.lineSpacingRule)}/>`);
|
|
455
461
|
if (formatting?.indentLeft !== void 0 || formatting?.indentRight !== void 0 || formatting?.indentFirstLine !== void 0) parts.push(`<w:ind${attr("w:left", formatting.indentLeft)}${attr("w:right", formatting.indentRight)}${attr(formatting.hangingIndent ? "w:hanging" : "w:firstLine", formatting.indentFirstLine)}/>`);
|
|
456
462
|
if (formatting?.alignment) parts.push(`<w:jc w:val="${formatting.alignment}"/>`);
|
|
@@ -1015,9 +1021,9 @@ const DOCX_PACKAGE_ISSUE_CODES = {
|
|
|
1015
1021
|
* archive with an excessive part count can't force an unbounded allocation.
|
|
1016
1022
|
*/
|
|
1017
1023
|
const VALIDATE_DOCX_MAX_ENTRIES = 4096;
|
|
1018
|
-
const VALIDATE_DOCX_MAX_ENTRY_BYTES =
|
|
1019
|
-
const VALIDATE_DOCX_MAX_TOTAL_BYTES =
|
|
1020
|
-
const VALIDATE_DOCX_MAX_DOCUMENT_XML_BYTES =
|
|
1024
|
+
const VALIDATE_DOCX_MAX_ENTRY_BYTES = 134217728;
|
|
1025
|
+
const VALIDATE_DOCX_MAX_TOTAL_BYTES = 268435456;
|
|
1026
|
+
const VALIDATE_DOCX_MAX_DOCUMENT_XML_BYTES = 33554432;
|
|
1021
1027
|
/**
|
|
1022
1028
|
* Inflated bytes allowed per compressed byte, for a markup or text entry and
|
|
1023
1029
|
* for the whole archive, once either passes the grace size. Real document
|
|
@@ -1027,7 +1033,7 @@ const VALIDATE_DOCX_MAX_DOCUMENT_XML_BYTES = 32 * 1024 * 1024;
|
|
|
1027
1033
|
* the byte limits bound them.
|
|
1028
1034
|
*/
|
|
1029
1035
|
const VALIDATE_DOCX_MAX_COMPRESSION_RATIO = 200;
|
|
1030
|
-
const VALIDATE_DOCX_COMPRESSION_RATIO_GRACE_BYTES =
|
|
1036
|
+
const VALIDATE_DOCX_COMPRESSION_RATIO_GRACE_BYTES = 4194304;
|
|
1031
1037
|
const WORDPROCESSINGML_NAMESPACES = /* @__PURE__ */ new Set(["http://schemas.openxmlformats.org/wordprocessingml/2006/main", "http://purl.oclc.org/ooxml/wordprocessingml/main"]);
|
|
1032
1038
|
const packageXmlParser = new XMLParser({
|
|
1033
1039
|
preserveOrder: true,
|
|
@@ -1329,7 +1335,8 @@ const validateDocumentModel = (document) => {
|
|
|
1329
1335
|
const assertValidDocumentModel = (document) => {
|
|
1330
1336
|
const result = validateDocumentModel(document);
|
|
1331
1337
|
if (result.valid) return;
|
|
1332
|
-
|
|
1338
|
+
const details = result.issues.flatMap((issue) => issue.severity === "error" ? [`${issue.path}: ${issue.message}`] : []).join("\n");
|
|
1339
|
+
panic(`Invalid DOCX document model:\n${details}`);
|
|
1333
1340
|
};
|
|
1334
1341
|
const createValidationContext = (document) => ({
|
|
1335
1342
|
issues: [],
|
|
@@ -1383,6 +1390,15 @@ const recordPath = (map, id, path) => {
|
|
|
1383
1390
|
const validateBlocks = (blocks, path, ctx) => {
|
|
1384
1391
|
for (const [index, block] of blocks.entries()) validateBlock(block, `${path}[${index}]`, ctx);
|
|
1385
1392
|
};
|
|
1393
|
+
/** The pair counter each range marker between blocks counts toward. */
|
|
1394
|
+
const blockRangeMarkerCounters = (ctx) => ({
|
|
1395
|
+
bookmarkStart: ctx.bookmarkStarts,
|
|
1396
|
+
bookmarkEnd: ctx.bookmarkEnds,
|
|
1397
|
+
moveFromRangeStart: ctx.moveFromStarts,
|
|
1398
|
+
moveFromRangeEnd: ctx.moveFromEnds,
|
|
1399
|
+
moveToRangeStart: ctx.moveToStarts,
|
|
1400
|
+
moveToRangeEnd: ctx.moveToEnds
|
|
1401
|
+
});
|
|
1386
1402
|
const validateBlock = (block, path, ctx) => {
|
|
1387
1403
|
if (block.type === "paragraph") {
|
|
1388
1404
|
validateParagraph(block, path, ctx);
|
|
@@ -1393,7 +1409,10 @@ const validateBlock = (block, path, ctx) => {
|
|
|
1393
1409
|
return;
|
|
1394
1410
|
}
|
|
1395
1411
|
if (block.type === "preservedBlock") return;
|
|
1396
|
-
if (block.type === "bookmarkStart" || block.type === "bookmarkEnd")
|
|
1412
|
+
if (block.type === "bookmarkStart" || block.type === "bookmarkEnd" || block.type === "moveFromRangeStart" || block.type === "moveFromRangeEnd" || block.type === "moveToRangeStart" || block.type === "moveToRangeEnd") {
|
|
1413
|
+
increment(blockRangeMarkerCounters(ctx)[block.type], block.id);
|
|
1414
|
+
return;
|
|
1415
|
+
}
|
|
1397
1416
|
if (block.content.length === 0) {
|
|
1398
1417
|
addWarning(ctx, `${path}.content`, "Block content control is empty.");
|
|
1399
1418
|
return;
|
|
@@ -1537,12 +1556,34 @@ const validateHyperlinkChild = (child, path, ctx) => {
|
|
|
1537
1556
|
increment(ctx.bookmarkStarts, child.id);
|
|
1538
1557
|
return;
|
|
1539
1558
|
}
|
|
1559
|
+
if (child.type === "commentRangeStart") {
|
|
1560
|
+
increment(ctx.commentRangeStarts, child.id);
|
|
1561
|
+
recordPath(ctx.referencedCommentIds, child.id, path);
|
|
1562
|
+
return;
|
|
1563
|
+
}
|
|
1564
|
+
if (child.type === "commentRangeEnd") {
|
|
1565
|
+
increment(ctx.commentRangeEnds, child.id);
|
|
1566
|
+
recordPath(ctx.referencedCommentIds, child.id, path);
|
|
1567
|
+
return;
|
|
1568
|
+
}
|
|
1569
|
+
if (child.type === "commentReference") {
|
|
1570
|
+
recordPath(ctx.referencedCommentIds, child.id, path);
|
|
1571
|
+
return;
|
|
1572
|
+
}
|
|
1540
1573
|
if (child.type === "preservedInline") return;
|
|
1541
1574
|
if (child.type === "inlineWrapper") {
|
|
1542
1575
|
validateParagraphContent(child, path, ctx);
|
|
1543
1576
|
return;
|
|
1544
1577
|
}
|
|
1545
|
-
|
|
1578
|
+
if (child.type === "bookmarkEnd") {
|
|
1579
|
+
increment(ctx.bookmarkEnds, child.id);
|
|
1580
|
+
return;
|
|
1581
|
+
}
|
|
1582
|
+
if (child.type === "moveFromRangeStart" || child.type === "moveFromRangeEnd" || child.type === "moveToRangeStart" || child.type === "moveToRangeEnd") {
|
|
1583
|
+
validateParagraphContent(child, path, ctx);
|
|
1584
|
+
return;
|
|
1585
|
+
}
|
|
1586
|
+
panic(`Unsupported hyperlink child: ${JSON.stringify(child)}`);
|
|
1546
1587
|
};
|
|
1547
1588
|
const validateTrackedRunChange = (change, path, ctx) => {
|
|
1548
1589
|
if (change.info.author.trim() === "") addError(ctx, `${path}.info.author`, "Tracked change author is empty.");
|
|
@@ -2712,7 +2753,6 @@ const appendBlock = (content, block, options) => {
|
|
|
2712
2753
|
}]
|
|
2713
2754
|
});
|
|
2714
2755
|
return;
|
|
2715
|
-
default:
|
|
2716
2756
|
}
|
|
2717
2757
|
};
|
|
2718
2758
|
const clauseNumbering = (block, profile) => {
|
|
@@ -3179,11 +3219,14 @@ const compileLegalSourceToDocx = async (source, options = {}) => {
|
|
|
3179
3219
|
};
|
|
3180
3220
|
//#endregion
|
|
3181
3221
|
//#region src/markdown/content.ts
|
|
3182
|
-
const para = (runs, styleId) =>
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
}
|
|
3222
|
+
const para = (runs, styleId) => {
|
|
3223
|
+
const formatting = finalizeParagraphFormatting(styleId ? { styleId } : {});
|
|
3224
|
+
return {
|
|
3225
|
+
type: "paragraph",
|
|
3226
|
+
...formatting === void 0 ? {} : { formatting },
|
|
3227
|
+
content: runs.length > 0 ? runs : [textRun("")]
|
|
3228
|
+
};
|
|
3229
|
+
};
|
|
3187
3230
|
const listPara = (runs, rendering) => ({
|
|
3188
3231
|
type: "paragraph",
|
|
3189
3232
|
formatting: { numPr: paragraphNumberingReference({
|
|
@@ -3382,4 +3425,4 @@ const compileMarkdownToContent = (markdown) => {
|
|
|
3382
3425
|
};
|
|
3383
3426
|
};
|
|
3384
3427
|
//#endregion
|
|
3385
|
-
export { DOCX_CONFORMANCE_CLASSES, DOCX_PACKAGE_ISSUE_CODES, InvalidOoxmlNumericIdError, assertValidDocumentModel, assertValidOoxmlNumericId, assertValidOoxmlNumericIds, compileLegalSourceToDocument, compileLegalSourceToDocx, compileMarkdownToContent, escapeXmlAttribute, escapeXmlText, hasIllegalXmlCharacters, isOoxmlNumericIdAttributeName, isValidOoxmlNumericId, mayContainInvalidOoxmlNumericIds, mayContainOoxmlNumericIds, ooxmlNumericIdDomain, parseLegalSource, pushOnOffElement, requiresXmlSpacePreserve, sanitizeExternalUrl, sanitizeXmlCharacters, serializeDocumentToDocx, serializeOnOffElement, validateDocumentModel, validateDocxPackage, validateLegalDraft };
|
|
3428
|
+
export { DOCX_CONFORMANCE_CLASSES, DOCX_PACKAGE_ISSUE_CODES, InvalidOoxmlNumericIdError, assertValidDocumentModel, assertValidOoxmlNumericId, assertValidOoxmlNumericIds, compileLegalSourceToDocument, compileLegalSourceToDocx, compileMarkdownToContent, escapeXmlAttribute, escapeXmlText, finalizeParagraphFormatting, hasIllegalXmlCharacters, isCanonicallyEmptyParagraphFormatting, isOoxmlNumericIdAttributeName, isValidOoxmlNumericId, mayContainInvalidOoxmlNumericIds, mayContainOoxmlNumericIds, ooxmlNumericIdDomain, parseLegalSource, pushOnOffElement, requiresXmlSpacePreserve, sanitizeExternalUrl, sanitizeXmlCharacters, serializeDocumentToDocx, serializeOnOffElement, setDocumentBodyComments, validateDocumentModel, validateDocxPackage, validateLegalDraft };
|
package/dist/model/document.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as Column, $i as UnrecognisedThemeColor, $n as TableContentCarrier, $r as TableCellBorders, $t as MoveFromRangeStart, A as ThemeColorScheme, Ai as headingLevelOf, An as SdtEndProperties, Ar as PRESET_LINE_DASH_VALS, At as Hyperlink, B as finalizeParagraphFormatting, Bi as TEXT_DIRECTIONS, Bn as ShapeFill, Br as ListRendering, Bt as ImageWrap, C as Relationship, Ci as paragraphNumberingSlots, Cn as PropertyChangeInfo, Cr as PreviewDescriptor, Ct as FooterReference, D as StyleDefinitions, Di as BODY_TEXT_OUTLINE_LEVEL, Dn as Run, Dr as isPresetLineDashVal, Dt as HeaderFooter, E as Style, Ei as sameStatedParagraphNumbering, En as ReviewCarrier, Er as UnrecognisedPresetLineDash, Et as FootnoteProperties, F as MAX_RETAINED_PARSE_WARNINGS_PER_CODE, Fi as NumberFormat, Fn as SectionPropertyChange, Fr as LevelLegacy, Ft as ImageFrameLocks, G as BidiControl, Gi as TextDirection, Gn as SimpleField, Gr as EmphasisMark, Gt as InstrTextContent, H as setDocumentBodyComments, Hi as TEXT_DIRECTION_FLOW_BY_TOKEN, Hn as ShapeOutline, Hr as NumberingInstance, Ht as InlineSdt, I as PARSE_WARNING_CODES, Ii as PARAGRAPH_ALIGNMENTS, In as SectionStart, Ir as LevelOverride, It as ImagePadding, J as BlockSdt, Ji as ColorValue, Jn as TabContent, Jr as ParagraphFormatting, Jt as MarkupRangeMarker, K as BlockContent, Ki as TextDirectionFlow, Kn as SoftHyphenContent, Kr as FloatingTableProperties, Kt as LineNumberRestart, L as ParseWarning, Li as ParagraphAlignment, Ln as Shape, Lr as LevelSuffix, Lt as ImagePosition, M as ThemeFontScheme, Mi as outlineLevelFromStatedValue, Mn as SdtType, Mr as AbstractNumbering, Mt as Image, N as IMPORTED_ID_COLLISION_KINDS, Ni as outlineLevelStatedValue, Nn as Section, Nr as COUNTER_FORMATS, Nt as ImageCrop, O as StyleType, Oi as HeadingOutlineLevel, On as RunContent, Or as presetLineDashFrom, Ot as HeaderFooterType, P as ImportedIdCollisionKind, Pi as NUMBER_FORMATS, Pn as SectionProperties, Pr as CounterFormat, Pt as ImageDocPrLink, Q as BreakContent, Qi as ThemeColorValue, Qn as TableCellPropertyChange, Qr as TableBorders, Qt as MoveFromRangeEnd, R as ParseWarningCode, Ri as TABLE_ALIGNMENTS, Rn as ShapeAlternateContent, Rr as ListLevel, Rt as ImageSize, S as MediaFile, Si as paragraphNumberingReferenceId, Sn as PropertyChange, Sr as relationshipIdOf, St as FoldedListNumber, T as RelationshipType, Ti as sameEffectiveParagraphNumbering, Tn as REVIEW_CARRIERS, Tr as PresetLineDashValue, Tt as FootnotePosition, U as getSingularRunPropertyChange, Ui as TabStopAlignment, Un as ShapeTextBody, Ur as CellMargins, Ut as InlineWrapper, V as isCanonicallyEmptyParagraphFormatting, Vi as TEXT_DIRECTION_FLOWS, Vn as ShapeGeometryAdjustment, Vr as NumberingDefinitions, Vt as ImageWrapPolygon, W as BIDI_CONTROLS, Wi as TableAlignment, Wn as ShapeType, Wr as ConditionalFormatStyle, Wt as Insertion, X as BookmarkRangeMarker, Xi as SCHEME_COLOR_VALUE_BY_THEME_COLOR, Xn as TableCell, Xr as TabLeader, Xt as MoveBookmarkMarker, Y as BookmarkEnd, Yi as ShadingProperties, Yn as Table, Yr as SpacingExplicit, Yt as MathEquation, Z as BookmarkStart, Zi as THEME_COLOR_BY_SCHEME_COLOR_VALUE, Zn as TableCellBlock, Zr as TabStop, Zt as MoveFrom, _ as DocDefaults, _a as statesNoBorder, _i as isNumberingReference, _n as PositionalTab, _r as WrapPolygonPoint, _t as EndnotePosition, a as DocumentSettings, aa as themeColorToken, ai as TablePropertyExceptionFormatting, an as NoteMarkerContent, ar as TableRowPropertyChange, at as DRAWING_RAW_XML_MODES, b as FontInfo, bi as paragraphNumberingLevel, bn as PreservedInline, br as RelationshipId, bt as FieldCharContent, c as NumberingLevelEntry, ca as THEME_COLORS, ci as TextEffect, cn as PARAGRAPH_MARK_CHANGE_KINDS, cr as TextContent, ct as DocumentBackground, d as numberingInstanceResolves, da as UnrecognisedBorderStyle, di as NO_NUMBERING_NUM_ID, dn as Paragraph, dr as TrackedRunChange, dt as DrawingAnchor, ea as isSchemeColorValue, ei as TableCellFormatting, en as MoveTo, er as TableCustomXmlWrapper, et as Comment, f as numberingLevelEntries, fa as borderStyleFrom, fi as NO_PARAGRAPH_NUMBERING, fn as ParagraphContent, fr as TrackedRunContent, ft as DrawingContent, g as ExhaustiveFields, ga as isBorderStyle, gi as ResolvedParagraphNumbering, gn as PictureWatermark, gr as WrapDistances, gt as Endnote, h as isNumberingLevel, ha as isBorderNone, hi as ParagraphNumberingSlots, hn as ParagraphPropertyChange, hr as WrapDistanceSlots, ht as EffectExtentSlots, i as Document, ia as themeColorSlot, ii as TableMeasurement, in as NonVisualDrawingNames, ir as TableRow, it as ComplexField, j as ThemeFont, ji as headingOutlineLevel, jn as SdtProperties, jr as PresetLineDashVal, k as Theme, ki as OutlineLevel, kn as RunPropertyChange, kr as presetLineDashToken, kt as HeaderReference, l as NumberingLevelResolution, la as ThemeColor, li as TextFormatting, ln as PROPERTY_REVISION_KINDS, lr as TextWatermark, lt as DocumentBackgroundDrawing, m as resolveNumberingLevel, ma as isBorderNil, mi as ParagraphNumberingReference, mn as ParagraphMarkChangeKind, mr as Watermark, mt as DrawingRawXmlMode, n as DEFAULT_TAB_STOP_TWIPS, na as knownThemeColor, ni as TableGridChange, nn as MoveToRangeStart, nr as TablePropertyChange, nt as CommentRangeStart, o as DocxConformanceClass, oa as SchemeColorSlot, oi as TableRowFormatting, on as NoteNumberRestart, or as TableStructuralChangeInfo, ot as Deletion, p as numberingLevelHasMarkerSlot, pa as borderStyleToken, pi as ParagraphNumberingOverride, pn as ParagraphMarkChange, pr as VerticalAlign, pt as DrawingGroupChild, q as BlockCustomXml, qi as BorderSpec, qn as SymbolContent, qr as LineSpacingRule, qt as MAX_REVISION_ID, r as DOCX_CONFORMANCE_CLASSES, ra as readThemeColor, ri as TableLook, rn as NoBreakHyphenContent, rr as TablePropertyExceptionChange, rt as CommentReference, s as DocxPackage, sa as SchemeColorValue, si as TableWidthType, sn as NoteReferenceContent, sr as TextBox, st as DisplacedByCustomXml, t as COMMENT_PART_RELATIONSHIPS, ta as isThemeColor, ti as TableFormatting, tn as MoveToRangeEnd, tr as TablePreservedMarkup, tt as CommentRangeEnd, u as levelShowsMarker, ua as BorderStyleValue, ui as UnderlineStyle, un as PageOrientation, ur as TrackedChangeInfo, ut as DocumentBody, v as EmbeddedFontRef, va as BORDER_STYLES, vi as mergeParagraphNumbering, vn as PositionedBookmarkMarker, vr as isOoxmlSymbolCharacter, vt as EndnoteProperties, w as RelationshipMap, wi as resolveParagraphNumbering, wn as PropertyRevisionKind, wr as PreviewShape, wt as Footnote, x as FontTable, xi as paragraphNumberingReference, xn as PreservedXmlContent, xr as mintRelationshipId, xt as FieldType, y as FontCharset, ya as BorderStyle, yi as paragraphNumberingFromSlots, yn as PreservedBlock, yr as normalizeRevisionId, yt as Field, z as ParseWarningLocation, zi as TAB_STOP_ALIGNMENTS, zn as ShapeContent, zr as ListMarkerFormatting, zt as ImageTransform } from "../document-BkGU2ctn.js";
|
|
2
2
|
import { n as PreservedChild, r as PreservedMarkup, t as PreservedAttribute } from "../preservedMarkup-G8XjWhs2.js";
|
|
3
|
-
export { type AbstractNumbering, BIDI_CONTROLS, BODY_TEXT_OUTLINE_LEVEL, BORDER_STYLES, type BidiControl, type BlockContent, type BlockCustomXml, type BlockSdt, type BookmarkEnd, type BookmarkRangeMarker, type BookmarkStart, type BorderSpec, type BorderStyle, type BorderStyleValue, type BreakContent, COMMENT_PART_RELATIONSHIPS, COUNTER_FORMATS, type CellMargins, type ColorValue, type Column, type Comment, type CommentRangeEnd, type CommentRangeStart, type CommentReference, type ComplexField, type ConditionalFormatStyle, type CounterFormat, DEFAULT_TAB_STOP_TWIPS, DOCX_CONFORMANCE_CLASSES, DRAWING_RAW_XML_MODES, type Deletion, type DisplacedByCustomXml, type DocDefaults, Document, type DocumentBackground, type DocumentBackgroundDrawing, type DocumentBody, DocumentSettings, DocxConformanceClass, DocxPackage, type DrawingAnchor, type DrawingContent, type DrawingGroupChild, type DrawingRawXmlMode, type EffectExtentSlots, type EmbeddedFontRef, type EmphasisMark, type Endnote, type EndnotePosition, type EndnoteProperties, type ExhaustiveFields, type Field, type FieldCharContent, type FieldType, type FloatingTableProperties, type FoldedListNumber, type FontCharset, type FontInfo, type FontTable, type FooterReference, type Footnote, type FootnotePosition, type FootnoteProperties, type HeaderFooter, type HeaderFooterType, type HeaderReference, type HeadingOutlineLevel, type Hyperlink, IMPORTED_ID_COLLISION_KINDS, type Image, type ImageCrop, type ImageDocPrLink, type ImageFrameLocks, type ImagePadding, type ImagePosition, type ImageSize, type ImageTransform, type ImageWrap, type ImageWrapPolygon, type ImportedIdCollisionKind, type InlineSdt, type InlineWrapper, type Insertion, type InstrTextContent, type LevelLegacy, type LevelOverride, type LevelSuffix, type LineNumberRestart, type LineSpacingRule, type ListLevel, type ListMarkerFormatting, type ListRendering, MAX_RETAINED_PARSE_WARNINGS_PER_CODE, MAX_REVISION_ID, type MarkupRangeMarker, type MathEquation, type MediaFile, type MoveBookmarkMarker, type MoveFrom, type MoveFromRangeEnd, type MoveFromRangeStart, type MoveTo, type MoveToRangeEnd, type MoveToRangeStart, NO_NUMBERING_NUM_ID, NO_PARAGRAPH_NUMBERING, NUMBER_FORMATS, type NoBreakHyphenContent, type NonVisualDrawingNames, type NoteMarkerContent, type NoteNumberRestart, type NoteReferenceContent, type NumberFormat, type NumberingDefinitions, type NumberingInstance, type OutlineLevel, PARAGRAPH_ALIGNMENTS, PARAGRAPH_MARK_CHANGE_KINDS, PARSE_WARNING_CODES, PRESET_LINE_DASH_VALS, PROPERTY_REVISION_KINDS, type PageOrientation, type Paragraph, type ParagraphAlignment, type ParagraphContent, type ParagraphFormatting, type ParagraphMarkChange, type ParagraphMarkChangeKind, type ParagraphNumberingOverride, type ParagraphNumberingReference, type ParagraphNumberingSlots, type ParagraphPropertyChange, type ParseWarning, type ParseWarningCode, type ParseWarningLocation, type PictureWatermark, type PositionalTab, type PositionedBookmarkMarker, type PreservedAttribute, type PreservedBlock, type PreservedChild, type PreservedInline, type PreservedMarkup, type PreservedXmlContent, type PresetLineDashVal, type PresetLineDashValue, type PreviewDescriptor, type PreviewShape, type PropertyChange, type PropertyChangeInfo, type PropertyRevisionKind, REVIEW_CARRIERS, type Relationship, type RelationshipId, type RelationshipMap, type RelationshipType, type ResolvedParagraphNumbering, type ReviewCarrier, type Run, type RunContent, type RunPropertyChange, SCHEME_COLOR_VALUE_BY_THEME_COLOR, type SchemeColorSlot, type SchemeColorValue, type SdtEndProperties, type SdtProperties, type SdtType, type Section, type SectionProperties, type SectionPropertyChange, type SectionStart, type ShadingProperties, type Shape, type ShapeAlternateContent, type ShapeContent, type ShapeFill, type ShapeGeometryAdjustment, type ShapeOutline, type ShapeTextBody, type ShapeType, type SimpleField, type SoftHyphenContent, type SpacingExplicit, type Style, type StyleDefinitions, type StyleType, type SymbolContent, TABLE_ALIGNMENTS, TAB_STOP_ALIGNMENTS, TEXT_DIRECTIONS, TEXT_DIRECTION_FLOWS, TEXT_DIRECTION_FLOW_BY_TOKEN, THEME_COLORS, THEME_COLOR_BY_SCHEME_COLOR_VALUE, type TabContent, type TabLeader, type TabStop, type TabStopAlignment, type Table, type TableAlignment, type TableBorders, type TableCell, type TableCellBlock, type TableCellBorders, type TableCellFormatting, type TableCellPropertyChange, type TableContentCarrier, type TableCustomXmlWrapper, type TableFormatting, type TableGridChange, type TableLook, type TableMeasurement, type TablePreservedMarkup, type TablePropertyChange, type TablePropertyExceptionChange, type TablePropertyExceptionFormatting, type TableRow, type TableRowFormatting, type TableRowPropertyChange, type TableStructuralChangeInfo, type TableWidthType, type TextBox, type TextContent, type TextDirection, type TextDirectionFlow, type TextEffect, type TextFormatting, type TextWatermark, type Theme, type ThemeColor, type ThemeColorScheme, type ThemeColorValue, type ThemeFont, type ThemeFontScheme, type TrackedChangeInfo, type TrackedRunChange, type TrackedRunContent, type UnderlineStyle, type UnrecognisedBorderStyle, type UnrecognisedPresetLineDash, type UnrecognisedThemeColor, type VerticalAlign, type Watermark, type WrapDistanceSlots, type WrapDistances, type WrapPolygonPoint, borderStyleFrom, borderStyleToken, getSingularRunPropertyChange, headingLevelOf, headingOutlineLevel, isBorderNil, isBorderNone, isBorderStyle, isNumberingLevel, isNumberingReference, isOoxmlSymbolCharacter, isPresetLineDashVal, isSchemeColorValue, isThemeColor, knownThemeColor, mergeParagraphNumbering, mintRelationshipId, normalizeRevisionId, outlineLevelFromStatedValue, outlineLevelStatedValue, paragraphNumberingFromSlots, paragraphNumberingLevel, paragraphNumberingReference, paragraphNumberingReferenceId, paragraphNumberingSlots, presetLineDashFrom, presetLineDashToken, readThemeColor, relationshipIdOf, resolveParagraphNumbering, sameEffectiveParagraphNumbering, sameStatedParagraphNumbering, statesNoBorder, themeColorSlot, themeColorToken };
|
|
3
|
+
export { type AbstractNumbering, BIDI_CONTROLS, BODY_TEXT_OUTLINE_LEVEL, BORDER_STYLES, type BidiControl, type BlockContent, type BlockCustomXml, type BlockSdt, type BookmarkEnd, type BookmarkRangeMarker, type BookmarkStart, type BorderSpec, type BorderStyle, type BorderStyleValue, type BreakContent, COMMENT_PART_RELATIONSHIPS, COUNTER_FORMATS, type CellMargins, type ColorValue, type Column, type Comment, type CommentRangeEnd, type CommentRangeStart, type CommentReference, type ComplexField, type ConditionalFormatStyle, type CounterFormat, DEFAULT_TAB_STOP_TWIPS, DOCX_CONFORMANCE_CLASSES, DRAWING_RAW_XML_MODES, type Deletion, type DisplacedByCustomXml, type DocDefaults, Document, type DocumentBackground, type DocumentBackgroundDrawing, type DocumentBody, DocumentSettings, DocxConformanceClass, DocxPackage, type DrawingAnchor, type DrawingContent, type DrawingGroupChild, type DrawingRawXmlMode, type EffectExtentSlots, type EmbeddedFontRef, type EmphasisMark, type Endnote, type EndnotePosition, type EndnoteProperties, type ExhaustiveFields, type Field, type FieldCharContent, type FieldType, type FloatingTableProperties, type FoldedListNumber, type FontCharset, type FontInfo, type FontTable, type FooterReference, type Footnote, type FootnotePosition, type FootnoteProperties, type HeaderFooter, type HeaderFooterType, type HeaderReference, type HeadingOutlineLevel, type Hyperlink, IMPORTED_ID_COLLISION_KINDS, type Image, type ImageCrop, type ImageDocPrLink, type ImageFrameLocks, type ImagePadding, type ImagePosition, type ImageSize, type ImageTransform, type ImageWrap, type ImageWrapPolygon, type ImportedIdCollisionKind, type InlineSdt, type InlineWrapper, type Insertion, type InstrTextContent, type LevelLegacy, type LevelOverride, type LevelSuffix, type LineNumberRestart, type LineSpacingRule, type ListLevel, type ListMarkerFormatting, type ListRendering, MAX_RETAINED_PARSE_WARNINGS_PER_CODE, MAX_REVISION_ID, type MarkupRangeMarker, type MathEquation, type MediaFile, type MoveBookmarkMarker, type MoveFrom, type MoveFromRangeEnd, type MoveFromRangeStart, type MoveTo, type MoveToRangeEnd, type MoveToRangeStart, NO_NUMBERING_NUM_ID, NO_PARAGRAPH_NUMBERING, NUMBER_FORMATS, type NoBreakHyphenContent, type NonVisualDrawingNames, type NoteMarkerContent, type NoteNumberRestart, type NoteReferenceContent, type NumberFormat, type NumberingDefinitions, type NumberingInstance, type NumberingLevelEntry, type NumberingLevelResolution, type OutlineLevel, PARAGRAPH_ALIGNMENTS, PARAGRAPH_MARK_CHANGE_KINDS, PARSE_WARNING_CODES, PRESET_LINE_DASH_VALS, PROPERTY_REVISION_KINDS, type PageOrientation, type Paragraph, type ParagraphAlignment, type ParagraphContent, type ParagraphFormatting, type ParagraphMarkChange, type ParagraphMarkChangeKind, type ParagraphNumberingOverride, type ParagraphNumberingReference, type ParagraphNumberingSlots, type ParagraphPropertyChange, type ParseWarning, type ParseWarningCode, type ParseWarningLocation, type PictureWatermark, type PositionalTab, type PositionedBookmarkMarker, type PreservedAttribute, type PreservedBlock, type PreservedChild, type PreservedInline, type PreservedMarkup, type PreservedXmlContent, type PresetLineDashVal, type PresetLineDashValue, type PreviewDescriptor, type PreviewShape, type PropertyChange, type PropertyChangeInfo, type PropertyRevisionKind, REVIEW_CARRIERS, type Relationship, type RelationshipId, type RelationshipMap, type RelationshipType, type ResolvedParagraphNumbering, type ReviewCarrier, type Run, type RunContent, type RunPropertyChange, SCHEME_COLOR_VALUE_BY_THEME_COLOR, type SchemeColorSlot, type SchemeColorValue, type SdtEndProperties, type SdtProperties, type SdtType, type Section, type SectionProperties, type SectionPropertyChange, type SectionStart, type ShadingProperties, type Shape, type ShapeAlternateContent, type ShapeContent, type ShapeFill, type ShapeGeometryAdjustment, type ShapeOutline, type ShapeTextBody, type ShapeType, type SimpleField, type SoftHyphenContent, type SpacingExplicit, type Style, type StyleDefinitions, type StyleType, type SymbolContent, TABLE_ALIGNMENTS, TAB_STOP_ALIGNMENTS, TEXT_DIRECTIONS, TEXT_DIRECTION_FLOWS, TEXT_DIRECTION_FLOW_BY_TOKEN, THEME_COLORS, THEME_COLOR_BY_SCHEME_COLOR_VALUE, type TabContent, type TabLeader, type TabStop, type TabStopAlignment, type Table, type TableAlignment, type TableBorders, type TableCell, type TableCellBlock, type TableCellBorders, type TableCellFormatting, type TableCellPropertyChange, type TableContentCarrier, type TableCustomXmlWrapper, type TableFormatting, type TableGridChange, type TableLook, type TableMeasurement, type TablePreservedMarkup, type TablePropertyChange, type TablePropertyExceptionChange, type TablePropertyExceptionFormatting, type TableRow, type TableRowFormatting, type TableRowPropertyChange, type TableStructuralChangeInfo, type TableWidthType, type TextBox, type TextContent, type TextDirection, type TextDirectionFlow, type TextEffect, type TextFormatting, type TextWatermark, type Theme, type ThemeColor, type ThemeColorScheme, type ThemeColorValue, type ThemeFont, type ThemeFontScheme, type TrackedChangeInfo, type TrackedRunChange, type TrackedRunContent, type UnderlineStyle, type UnrecognisedBorderStyle, type UnrecognisedPresetLineDash, type UnrecognisedThemeColor, type VerticalAlign, type Watermark, type WrapDistanceSlots, type WrapDistances, type WrapPolygonPoint, borderStyleFrom, borderStyleToken, finalizeParagraphFormatting, getSingularRunPropertyChange, headingLevelOf, headingOutlineLevel, isBorderNil, isBorderNone, isBorderStyle, isCanonicallyEmptyParagraphFormatting, isNumberingLevel, isNumberingReference, isOoxmlSymbolCharacter, isPresetLineDashVal, isSchemeColorValue, isThemeColor, knownThemeColor, levelShowsMarker, mergeParagraphNumbering, mintRelationshipId, normalizeRevisionId, numberingInstanceResolves, numberingLevelEntries, numberingLevelHasMarkerSlot, outlineLevelFromStatedValue, outlineLevelStatedValue, paragraphNumberingFromSlots, paragraphNumberingLevel, paragraphNumberingReference, paragraphNumberingReferenceId, paragraphNumberingSlots, presetLineDashFrom, presetLineDashToken, readThemeColor, relationshipIdOf, resolveNumberingLevel, resolveParagraphNumbering, sameEffectiveParagraphNumbering, sameStatedParagraphNumbering, setDocumentBodyComments, statesNoBorder, themeColorSlot, themeColorToken };
|
package/dist/model/document.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { BIDI_CONTROLS, BODY_TEXT_OUTLINE_LEVEL, BORDER_STYLES, COMMENT_PART_RELATIONSHIPS, COUNTER_FORMATS, DEFAULT_TAB_STOP_TWIPS, DOCX_CONFORMANCE_CLASSES, DRAWING_RAW_XML_MODES, IMPORTED_ID_COLLISION_KINDS, MAX_RETAINED_PARSE_WARNINGS_PER_CODE, MAX_REVISION_ID, NO_NUMBERING_NUM_ID, NO_PARAGRAPH_NUMBERING, NUMBER_FORMATS, PARAGRAPH_ALIGNMENTS, PARAGRAPH_MARK_CHANGE_KINDS, PARSE_WARNING_CODES, PRESET_LINE_DASH_VALS, PROPERTY_REVISION_KINDS, REVIEW_CARRIERS, SCHEME_COLOR_VALUE_BY_THEME_COLOR, TABLE_ALIGNMENTS, TAB_STOP_ALIGNMENTS, TEXT_DIRECTIONS, TEXT_DIRECTION_FLOWS, TEXT_DIRECTION_FLOW_BY_TOKEN, THEME_COLORS, THEME_COLOR_BY_SCHEME_COLOR_VALUE, borderStyleFrom, borderStyleToken, getSingularRunPropertyChange, headingLevelOf, headingOutlineLevel, isBorderNil, isBorderNone, isBorderStyle, isNumberingLevel, isNumberingReference, isOoxmlSymbolCharacter, isPresetLineDashVal, isSchemeColorValue, isThemeColor, knownThemeColor, mergeParagraphNumbering, mintRelationshipId, normalizeRevisionId, outlineLevelFromStatedValue, outlineLevelStatedValue, paragraphNumberingFromSlots, paragraphNumberingLevel, paragraphNumberingReference, paragraphNumberingReferenceId, paragraphNumberingSlots, presetLineDashFrom, presetLineDashToken, readThemeColor, relationshipIdOf, resolveParagraphNumbering, sameEffectiveParagraphNumbering, sameStatedParagraphNumbering, statesNoBorder, themeColorSlot, themeColorToken };
|
|
1
|
+
export { i as BIDI_CONTROLS, Y as BODY_TEXT_OUTLINE_LEVEL, A as BORDER_STYLES, t as COMMENT_PART_RELATIONSHIPS, y as COUNTER_FORMATS, n as DEFAULT_TAB_STOP_TWIPS, r as DOCX_CONFORMANCE_CLASSES, a as DRAWING_RAW_XML_MODES, pt as IMPORTED_ID_COLLISION_KINDS, mt as MAX_RETAINED_PARSE_WARNINGS_PER_CODE, s as MAX_REVISION_ID, tt as NO_NUMBERING_NUM_ID, nt as NO_PARAGRAPH_NUMBERING, j as NUMBER_FORMATS, M as PARAGRAPH_ALIGNMENTS, c as PARAGRAPH_MARK_CHANGE_KINDS, ht as PARSE_WARNING_CODES, C as PRESET_LINE_DASH_VALS, l as PROPERTY_REVISION_KINDS, u as REVIEW_CARRIERS, R as SCHEME_COLOR_VALUE_BY_THEME_COLOR, N as TABLE_ALIGNMENTS, P as TAB_STOP_ALIGNMENTS, F as TEXT_DIRECTIONS, I as TEXT_DIRECTION_FLOWS, L as TEXT_DIRECTION_FLOW_BY_TOKEN, K as THEME_COLORS, z as THEME_COLOR_BY_SCHEME_COLOR_VALUE, w as borderStyleFrom, T as borderStyleToken, gt as finalizeParagraphFormatting, yt as getSingularRunPropertyChange, X as headingLevelOf, Z as headingOutlineLevel, E as isBorderNil, D as isBorderNone, O as isBorderStyle, _t as isCanonicallyEmptyParagraphFormatting, et as isNumberingLevel, rt as isNumberingReference, f as isOoxmlSymbolCharacter, b as isPresetLineDashVal, B as isSchemeColorValue, V as isThemeColor, H as knownThemeColor, m as levelShowsMarker, it as mergeParagraphNumbering, q as mintRelationshipId, p as normalizeRevisionId, h as numberingInstanceResolves, g as numberingLevelEntries, _ as numberingLevelHasMarkerSlot, Q as outlineLevelFromStatedValue, $ as outlineLevelStatedValue, at as paragraphNumberingFromSlots, ot as paragraphNumberingLevel, st as paragraphNumberingReference, ct as paragraphNumberingReferenceId, lt as paragraphNumberingSlots, x as presetLineDashFrom, S as presetLineDashToken, U as readThemeColor, J as relationshipIdOf, v as resolveNumberingLevel, ut as resolveParagraphNumbering, dt as sameEffectiveParagraphNumbering, ft as sameStatedParagraphNumbering, vt as setDocumentBodyComments, k as statesNoBorder, W as themeColorSlot, G as themeColorToken } from "../document-oU-dz9zs.js";
|