@stll/docx-core 0.30.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/{document-DdWrTPQY.js → document-3WKQA1r3.js} +20 -1
- package/dist/{document-DrtmJ_hz.d.ts → document-w6pPLpob.d.ts} +89 -12
- package/dist/docx_kernel_bg.wasm +0 -0
- package/dist/index.d.ts +53 -2
- package/dist/index.js +551 -5
- package/dist/model/document.d.ts +2 -2
- package/dist/model/document.js +2 -2
- package/dist/ops/documentOps.d.ts +590 -24
- package/dist/ops/documentOps.js +8403 -2148
- package/dist/schema/sequenceChildren.d.ts +2 -1
- package/dist/schema/sequenceChildren.js +2 -2
- package/dist/{sequenceChildren-BIixCB49.js → sequenceChildren-B8ODeI3J.js} +99 -1
- package/package.json +2 -1
|
@@ -32,6 +32,7 @@ declare const SEQUENCE_CHILDREN: {
|
|
|
32
32
|
readonly "content-control-properties": readonly ["rPr", "alias", "tag", "id", "lock", "placeholder", "temporary", "showingPlcHdr", "dataBinding", "label", "tabIndex", "equation", "comboBox", "date", "docPartObj", "docPartList", "dropDownList", "picture", "richText", "text", "citation", "group", "bibliography"];
|
|
33
33
|
readonly "section-properties": readonly ["headerReference", "footerReference", "footnotePr", "endnotePr", "type", "pgSz", "pgMar", "paperSrc", "pgBorders", "lnNumType", "pgNumType", "cols", "formProt", "vAlign", "noEndnote", "titlePg", "textDirection", "bidi", "rtlGutter", "docGrid", "printerSettings", "sectPrChange"];
|
|
34
34
|
};
|
|
35
|
+
declare const SETTINGS_CHILDREN: readonly ["writeProtection", "view", "zoom", "removePersonalInformation", "removeDateAndTime", "doNotDisplayPageBoundaries", "displayBackgroundShape", "printPostScriptOverText", "printFractionalCharacterWidth", "printFormsData", "embedTrueTypeFonts", "embedSystemFonts", "saveSubsetFonts", "saveFormsData", "mirrorMargins", "alignBordersAndEdges", "bordersDoNotSurroundHeader", "bordersDoNotSurroundFooter", "gutterAtTop", "hideSpellingErrors", "hideGrammaticalErrors", "activeWritingStyle", "proofState", "formsDesign", "attachedTemplate", "linkStyles", "stylePaneFormatFilter", "stylePaneSortMethod", "documentType", "mailMerge", "revisionView", "trackRevisions", "doNotTrackMoves", "doNotTrackFormatting", "documentProtection", "autoFormatOverride", "styleLockTheme", "styleLockQFSet", "defaultTabStop", "autoHyphenation", "consecutiveHyphenLimit", "hyphenationZone", "doNotHyphenateCaps", "showEnvelope", "summaryLength", "clickAndTypeStyle", "defaultTableStyle", "evenAndOddHeaders", "bookFoldRevPrinting", "bookFoldPrinting", "bookFoldPrintingSheets", "drawingGridHorizontalSpacing", "drawingGridVerticalSpacing", "displayHorizontalDrawingGridEvery", "displayVerticalDrawingGridEvery", "doNotUseMarginsForDrawingGridOrigin", "drawingGridHorizontalOrigin", "drawingGridVerticalOrigin", "doNotShadeFormData", "noPunctuationKerning", "characterSpacingControl", "printTwoOnOne", "strictFirstAndLastChars", "noLineBreaksAfter", "noLineBreaksBefore", "savePreviewPicture", "doNotValidateAgainstSchema", "saveInvalidXml", "ignoreMixedContent", "alwaysShowPlaceholderText", "doNotDemarcateInvalidXml", "saveXmlDataOnly", "useXSLTWhenSaving", "saveThroughXslt", "showXMLTags", "alwaysMergeEmptyNamespace", "updateFields", "hdrShapeDefaults", "footnotePr", "endnotePr", "compat", "docVars", "rsids", "attachedSchema", "themeFontLang", "clrSchemeMapping", "doNotIncludeSubdocsInStats", "doNotAutoCompressPictures", "forceUpgrade", "captions", "readModeInkLockDown", "smartTagType", "shapeDefaults", "doNotEmbedSmartTags", "decimalSymbol", "listSeparator"];
|
|
35
36
|
/** A container whose declared children have an order. */
|
|
36
37
|
type SequenceContainer = keyof typeof SEQUENCE_CHILDREN;
|
|
37
38
|
/** Every child the schema declares for `Container`, in declaration order. */
|
|
@@ -70,4 +71,4 @@ declare const assertSafePreservedMarkup: (preserved: PreservedMarkup | undefined
|
|
|
70
71
|
*/
|
|
71
72
|
declare const serializeSequenceChildren: <Container extends SequenceContainer>({ container, modelled, preserved }: SerializeSequenceChildrenOptions<Container>) => string[];
|
|
72
73
|
//#endregion
|
|
73
|
-
export { SEQUENCE_CHILDREN, type SequenceChild, type SequenceContainer, assertSafePreservedMarkup, isSafePreservedChildXml, isWithinPreservedMarkupBudget, serializeSequenceChildren };
|
|
74
|
+
export { SEQUENCE_CHILDREN, SETTINGS_CHILDREN, type SequenceChild, type SequenceContainer, assertSafePreservedMarkup, isSafePreservedChildXml, isWithinPreservedMarkupBudget, serializeSequenceChildren };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SEQUENCE_CHILDREN, i as serializeSequenceChildren, n as isSafePreservedChildXml, r as isWithinPreservedMarkupBudget, t as assertSafePreservedMarkup } from "../sequenceChildren-
|
|
2
|
-
export { SEQUENCE_CHILDREN, assertSafePreservedMarkup, isSafePreservedChildXml, isWithinPreservedMarkupBudget, serializeSequenceChildren };
|
|
1
|
+
import { a as SEQUENCE_CHILDREN, i as serializeSequenceChildren, n as isSafePreservedChildXml, o as SETTINGS_CHILDREN, r as isWithinPreservedMarkupBudget, t as assertSafePreservedMarkup } from "../sequenceChildren-B8ODeI3J.js";
|
|
2
|
+
export { SEQUENCE_CHILDREN, SETTINGS_CHILDREN, assertSafePreservedMarkup, isSafePreservedChildXml, isWithinPreservedMarkupBudget, serializeSequenceChildren };
|
|
@@ -254,6 +254,104 @@ const SEQUENCE_CHILDREN = {
|
|
|
254
254
|
"sectPrChange"
|
|
255
255
|
]
|
|
256
256
|
};
|
|
257
|
+
const SETTINGS_CHILDREN = [
|
|
258
|
+
"writeProtection",
|
|
259
|
+
"view",
|
|
260
|
+
"zoom",
|
|
261
|
+
"removePersonalInformation",
|
|
262
|
+
"removeDateAndTime",
|
|
263
|
+
"doNotDisplayPageBoundaries",
|
|
264
|
+
"displayBackgroundShape",
|
|
265
|
+
"printPostScriptOverText",
|
|
266
|
+
"printFractionalCharacterWidth",
|
|
267
|
+
"printFormsData",
|
|
268
|
+
"embedTrueTypeFonts",
|
|
269
|
+
"embedSystemFonts",
|
|
270
|
+
"saveSubsetFonts",
|
|
271
|
+
"saveFormsData",
|
|
272
|
+
"mirrorMargins",
|
|
273
|
+
"alignBordersAndEdges",
|
|
274
|
+
"bordersDoNotSurroundHeader",
|
|
275
|
+
"bordersDoNotSurroundFooter",
|
|
276
|
+
"gutterAtTop",
|
|
277
|
+
"hideSpellingErrors",
|
|
278
|
+
"hideGrammaticalErrors",
|
|
279
|
+
"activeWritingStyle",
|
|
280
|
+
"proofState",
|
|
281
|
+
"formsDesign",
|
|
282
|
+
"attachedTemplate",
|
|
283
|
+
"linkStyles",
|
|
284
|
+
"stylePaneFormatFilter",
|
|
285
|
+
"stylePaneSortMethod",
|
|
286
|
+
"documentType",
|
|
287
|
+
"mailMerge",
|
|
288
|
+
"revisionView",
|
|
289
|
+
"trackRevisions",
|
|
290
|
+
"doNotTrackMoves",
|
|
291
|
+
"doNotTrackFormatting",
|
|
292
|
+
"documentProtection",
|
|
293
|
+
"autoFormatOverride",
|
|
294
|
+
"styleLockTheme",
|
|
295
|
+
"styleLockQFSet",
|
|
296
|
+
"defaultTabStop",
|
|
297
|
+
"autoHyphenation",
|
|
298
|
+
"consecutiveHyphenLimit",
|
|
299
|
+
"hyphenationZone",
|
|
300
|
+
"doNotHyphenateCaps",
|
|
301
|
+
"showEnvelope",
|
|
302
|
+
"summaryLength",
|
|
303
|
+
"clickAndTypeStyle",
|
|
304
|
+
"defaultTableStyle",
|
|
305
|
+
"evenAndOddHeaders",
|
|
306
|
+
"bookFoldRevPrinting",
|
|
307
|
+
"bookFoldPrinting",
|
|
308
|
+
"bookFoldPrintingSheets",
|
|
309
|
+
"drawingGridHorizontalSpacing",
|
|
310
|
+
"drawingGridVerticalSpacing",
|
|
311
|
+
"displayHorizontalDrawingGridEvery",
|
|
312
|
+
"displayVerticalDrawingGridEvery",
|
|
313
|
+
"doNotUseMarginsForDrawingGridOrigin",
|
|
314
|
+
"drawingGridHorizontalOrigin",
|
|
315
|
+
"drawingGridVerticalOrigin",
|
|
316
|
+
"doNotShadeFormData",
|
|
317
|
+
"noPunctuationKerning",
|
|
318
|
+
"characterSpacingControl",
|
|
319
|
+
"printTwoOnOne",
|
|
320
|
+
"strictFirstAndLastChars",
|
|
321
|
+
"noLineBreaksAfter",
|
|
322
|
+
"noLineBreaksBefore",
|
|
323
|
+
"savePreviewPicture",
|
|
324
|
+
"doNotValidateAgainstSchema",
|
|
325
|
+
"saveInvalidXml",
|
|
326
|
+
"ignoreMixedContent",
|
|
327
|
+
"alwaysShowPlaceholderText",
|
|
328
|
+
"doNotDemarcateInvalidXml",
|
|
329
|
+
"saveXmlDataOnly",
|
|
330
|
+
"useXSLTWhenSaving",
|
|
331
|
+
"saveThroughXslt",
|
|
332
|
+
"showXMLTags",
|
|
333
|
+
"alwaysMergeEmptyNamespace",
|
|
334
|
+
"updateFields",
|
|
335
|
+
"hdrShapeDefaults",
|
|
336
|
+
"footnotePr",
|
|
337
|
+
"endnotePr",
|
|
338
|
+
"compat",
|
|
339
|
+
"docVars",
|
|
340
|
+
"rsids",
|
|
341
|
+
"attachedSchema",
|
|
342
|
+
"themeFontLang",
|
|
343
|
+
"clrSchemeMapping",
|
|
344
|
+
"doNotIncludeSubdocsInStats",
|
|
345
|
+
"doNotAutoCompressPictures",
|
|
346
|
+
"forceUpgrade",
|
|
347
|
+
"captions",
|
|
348
|
+
"readModeInkLockDown",
|
|
349
|
+
"smartTagType",
|
|
350
|
+
"shapeDefaults",
|
|
351
|
+
"doNotEmbedSmartTags",
|
|
352
|
+
"decimalSymbol",
|
|
353
|
+
"listSeparator"
|
|
354
|
+
];
|
|
257
355
|
//#endregion
|
|
258
356
|
//#region src/schema/sequenceChildren.ts
|
|
259
357
|
const MAX_PRESERVED_CHILD_XML_CHARACTERS = 1024 * 1024;
|
|
@@ -460,4 +558,4 @@ const serializeSequenceChildren = ({ container, modelled, preserved }) => {
|
|
|
460
558
|
return placed.sort((left, right) => left.at - right.at || left.rank - right.rank).map(({ xml }) => xml);
|
|
461
559
|
};
|
|
462
560
|
//#endregion
|
|
463
|
-
export { SEQUENCE_CHILDREN as a, serializeSequenceChildren as i, isSafePreservedChildXml as n, isWithinPreservedMarkupBudget as r, assertSafePreservedMarkup as t };
|
|
561
|
+
export { SEQUENCE_CHILDREN as a, serializeSequenceChildren as i, isSafePreservedChildXml as n, SETTINGS_CHILDREN as o, isWithinPreservedMarkupBudget as r, assertSafePreservedMarkup as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stll/docx-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "Typed OOXML/DOCX model, validation, serialization, legal-source compilation, and browser-native package projection.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"document-model",
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"prepack": "bun run build"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
+
"@nodable/entities": "^3.0.0",
|
|
71
72
|
"@stll/docx-utils": "^0.1.0",
|
|
72
73
|
"better-result": "3.0.1",
|
|
73
74
|
"fast-xml-parser": "^5.10.1",
|