docx-plus 0.0.5 → 0.0.6

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.
@@ -2279,6 +2279,57 @@ var docx = (function(exports, xml_js, hash_js, nanoid_non_secure, undio, fflate,
2279
2279
  }
2280
2280
  };
2281
2281
  //#endregion
2282
+ //#region src/file/paragraph/run/east-asian-layout.ts
2283
+ /**
2284
+ * East Asian layout module for WordprocessingML run properties.
2285
+ *
2286
+ * Specifies East Asian typography settings for a run, including
2287
+ * character combination, vertical text, and compression.
2288
+ *
2289
+ * Reference: ISO/IEC 29500-4, CT_EastAsianLayout
2290
+ *
2291
+ * @module
2292
+ */
2293
+ /**
2294
+ * Creates an East Asian layout element (w:eastAsianLayout) for a run.
2295
+ *
2296
+ * ## XSD Schema
2297
+ * ```xml
2298
+ * <xsd:complexType name="CT_EastAsianLayout">
2299
+ * <xsd:attribute name="id" type="ST_DecimalNumber" use="optional"/>
2300
+ * <xsd:attribute name="combine" type="s:ST_OnOff" use="optional"/>
2301
+ * <xsd:attribute name="combineBrackets" type="ST_CombineBrackets" use="optional"/>
2302
+ * <xsd:attribute name="vert" type="s:ST_OnOff" use="optional"/>
2303
+ * <xsd:attribute name="vertCompress" type="s:ST_OnOff" use="optional"/>
2304
+ * </xsd:complexType>
2305
+ * ```
2306
+ */
2307
+ const createEastAsianLayout = ({ id, combine, combineBrackets, vert, vertCompress }) => new BuilderElement({
2308
+ attributes: {
2309
+ combine: {
2310
+ key: "w:combine",
2311
+ value: combine
2312
+ },
2313
+ combineBrackets: {
2314
+ key: "w:combineBrackets",
2315
+ value: combineBrackets
2316
+ },
2317
+ id: {
2318
+ key: "w:id",
2319
+ value: id === void 0 ? void 0 : decimalNumber(id)
2320
+ },
2321
+ vert: {
2322
+ key: "w:vert",
2323
+ value: vert
2324
+ },
2325
+ vertCompress: {
2326
+ key: "w:vertCompress",
2327
+ value: vertCompress
2328
+ }
2329
+ },
2330
+ name: "w:eastAsianLayout"
2331
+ });
2332
+ //#endregion
2282
2333
  //#region src/file/paragraph/run/emphasis-mark.ts
2283
2334
  /**
2284
2335
  * Emphasis mark module for WordprocessingML run properties.
@@ -3010,6 +3061,7 @@ var docx = (function(exports, xml_js, hash_js, nanoid_non_secure, undio, fflate,
3010
3061
  if (options.math) this.push(new OnOffElement("w:oMath", options.math));
3011
3062
  if (options.fitText !== void 0) this.push(new NumberValueElement("w:fitText", options.fitText));
3012
3063
  if (options.complexScript !== void 0) this.push(new OnOffElement("w:cs", options.complexScript));
3064
+ if (options.eastAsianLayout) this.push(createEastAsianLayout(options.eastAsianLayout));
3013
3065
  if (options.revision) this.push(new RunPropertiesChange(options.revision));
3014
3066
  }
3015
3067
  push(item) {
@@ -8516,6 +8568,34 @@ var docx = (function(exports, xml_js, hash_js, nanoid_non_secure, undio, fflate,
8516
8568
  * @module
8517
8569
  */
8518
8570
  /**
8571
+ * Vertical text alignment types for paragraphs.
8572
+ *
8573
+ * Specifies the vertical alignment of text within the paragraph.
8574
+ *
8575
+ * @publicApi
8576
+ */
8577
+ const TextAlignmentType = {
8578
+ TOP: "top",
8579
+ CENTER: "center",
8580
+ BASELINE: "baseline",
8581
+ BOTTOM: "bottom",
8582
+ AUTO: "auto"
8583
+ };
8584
+ /**
8585
+ * Textbox tight wrap types for paragraphs.
8586
+ *
8587
+ * Specifies how tightly text wraps around a textbox.
8588
+ *
8589
+ * @publicApi
8590
+ */
8591
+ const TextboxTightWrapType = {
8592
+ NONE: "none",
8593
+ ALL_LINES: "allLines",
8594
+ FIRST_AND_LAST_LINE: "firstAndLastLine",
8595
+ FIRST_LINE_ONLY: "firstLineOnly",
8596
+ LAST_LINE_ONLY: "lastLineOnly"
8597
+ };
8598
+ /**
8519
8599
  * Represents paragraph properties (pPr) in a WordprocessingML document.
8520
8600
  *
8521
8601
  * The paragraph properties element specifies all formatting applied to a paragraph,
@@ -8678,6 +8758,27 @@ var docx = (function(exports, xml_js, hash_js, nanoid_non_secure, undio, fflate,
8678
8758
  if (options.outlineLevel !== void 0) this.push(createOutlineLevel(options.outlineLevel));
8679
8759
  if (options.suppressLineNumbers !== void 0) this.push(new OnOffElement("w:suppressLineNumbers", options.suppressLineNumbers));
8680
8760
  if (options.autoSpaceEastAsianText !== void 0) this.push(new OnOffElement("w:autoSpaceDN", options.autoSpaceEastAsianText));
8761
+ if (options.suppressAutoHyphens !== void 0) this.push(new OnOffElement("w:suppressAutoHyphens", options.suppressAutoHyphens));
8762
+ if (options.adjustRightInd !== void 0) this.push(new OnOffElement("w:adjustRightInd", options.adjustRightInd));
8763
+ if (options.snapToGrid !== void 0) this.push(new OnOffElement("w:snapToGrid", options.snapToGrid));
8764
+ if (options.mirrorIndents !== void 0) this.push(new OnOffElement("w:mirrorIndents", options.mirrorIndents));
8765
+ if (options.kinsoku !== void 0) this.push(new OnOffElement("w:kinsoku", options.kinsoku));
8766
+ if (options.topLinePunct !== void 0) this.push(new OnOffElement("w:topLinePunct", options.topLinePunct));
8767
+ if (options.autoSpaceDE !== void 0) this.push(new OnOffElement("w:autoSpaceDE", options.autoSpaceDE));
8768
+ if (options.textAlignment !== void 0) this.push(new BuilderElement({
8769
+ attributes: { val: {
8770
+ key: "w:val",
8771
+ value: options.textAlignment
8772
+ } },
8773
+ name: "w:textAlignment"
8774
+ }));
8775
+ if (options.textboxTightWrap !== void 0) this.push(new BuilderElement({
8776
+ attributes: { val: {
8777
+ key: "w:val",
8778
+ value: options.textboxTightWrap
8779
+ } },
8780
+ name: "w:textboxTightWrap"
8781
+ }));
8681
8782
  if (options.run) this.push(new ParagraphRunProperties(options.run));
8682
8783
  if (options.revision) this.push(new ParagraphPropertiesChange(options.revision));
8683
8784
  }
@@ -13047,6 +13148,137 @@ var docx = (function(exports, xml_js, hash_js, nanoid_non_secure, undio, fflate,
13047
13148
  name: "w:docGrid"
13048
13149
  });
13049
13150
  //#endregion
13151
+ //#region src/file/document/body/section-properties/properties/footnote-endnote-properties.ts
13152
+ /**
13153
+ * Footnote and endnote properties module for WordprocessingML section properties.
13154
+ *
13155
+ * Specifies footnote/endnote placement and numbering format within a section.
13156
+ *
13157
+ * Reference: ISO/IEC 29500-4, CT_FtnProps / CT_EdnProps
13158
+ *
13159
+ * @module
13160
+ */
13161
+ /**
13162
+ * Creates footnote properties element (w:footnotePr) for a section.
13163
+ *
13164
+ * ## XSD Schema
13165
+ * ```xml
13166
+ * <xsd:complexType name="CT_FtnProps">
13167
+ * <xsd:sequence>
13168
+ * <xsd:element name="pos" type="CT_FtnPos" minOccurs="0"/>
13169
+ * <xsd:element name="numFmt" type="CT_NumFmt" minOccurs="0"/>
13170
+ * <xsd:group ref="EG_FtnEdnNumProps" minOccurs="0"/>
13171
+ * </xsd:sequence>
13172
+ * </xsd:complexType>
13173
+ * ```
13174
+ */
13175
+ const createFootnoteProperties = ({ pos, formatType, format, numStart, numRestart }) => {
13176
+ const container = new FootnoteProperties();
13177
+ if (pos !== void 0) container.addChildElement(new BuilderElement({
13178
+ attributes: { val: {
13179
+ key: "w:val",
13180
+ value: pos
13181
+ } },
13182
+ name: "w:pos"
13183
+ }));
13184
+ if (formatType !== void 0 || format !== void 0) container.addChildElement(new BuilderElement({
13185
+ attributes: {
13186
+ format: {
13187
+ key: "w:format",
13188
+ value: format
13189
+ },
13190
+ val: {
13191
+ key: "w:fmt",
13192
+ value: formatType
13193
+ }
13194
+ },
13195
+ name: "w:numFmt"
13196
+ }));
13197
+ if (numStart !== void 0) container.addChildElement(new BuilderElement({
13198
+ attributes: { val: {
13199
+ key: "w:val",
13200
+ value: decimalNumber(numStart)
13201
+ } },
13202
+ name: "w:numStart"
13203
+ }));
13204
+ if (numRestart !== void 0) container.addChildElement(new BuilderElement({
13205
+ attributes: { val: {
13206
+ key: "w:val",
13207
+ value: numRestart
13208
+ } },
13209
+ name: "w:numRestart"
13210
+ }));
13211
+ return container;
13212
+ };
13213
+ /**
13214
+ * Footnote properties container element.
13215
+ */
13216
+ var FootnoteProperties = class extends IgnoreIfEmptyXmlComponent {
13217
+ constructor() {
13218
+ super("w:footnotePr", true);
13219
+ }
13220
+ };
13221
+ /**
13222
+ * Creates endnote properties element (w:endnotePr) for a section.
13223
+ *
13224
+ * ## XSD Schema
13225
+ * ```xml
13226
+ * <xsd:complexType name="CT_EdnProps">
13227
+ * <xsd:sequence>
13228
+ * <xsd:element name="pos" type="CT_EdnPos" minOccurs="0"/>
13229
+ * <xsd:element name="numFmt" type="CT_NumFmt" minOccurs="0"/>
13230
+ * <xsd:group ref="EG_FtnEdnNumProps" minOccurs="0"/>
13231
+ * </xsd:sequence>
13232
+ * </xsd:complexType>
13233
+ * ```
13234
+ */
13235
+ const createEndnoteProperties = ({ pos, formatType, format, numStart, numRestart }) => {
13236
+ const container = new EndnoteProperties();
13237
+ if (pos !== void 0) container.addChildElement(new BuilderElement({
13238
+ attributes: { val: {
13239
+ key: "w:val",
13240
+ value: pos
13241
+ } },
13242
+ name: "w:pos"
13243
+ }));
13244
+ if (formatType !== void 0 || format !== void 0) container.addChildElement(new BuilderElement({
13245
+ attributes: {
13246
+ format: {
13247
+ key: "w:format",
13248
+ value: format
13249
+ },
13250
+ val: {
13251
+ key: "w:fmt",
13252
+ value: formatType
13253
+ }
13254
+ },
13255
+ name: "w:numFmt"
13256
+ }));
13257
+ if (numStart !== void 0) container.addChildElement(new BuilderElement({
13258
+ attributes: { val: {
13259
+ key: "w:val",
13260
+ value: decimalNumber(numStart)
13261
+ } },
13262
+ name: "w:numStart"
13263
+ }));
13264
+ if (numRestart !== void 0) container.addChildElement(new BuilderElement({
13265
+ attributes: { val: {
13266
+ key: "w:val",
13267
+ value: numRestart
13268
+ } },
13269
+ name: "w:numRestart"
13270
+ }));
13271
+ return container;
13272
+ };
13273
+ /**
13274
+ * Endnote properties container element.
13275
+ */
13276
+ var EndnoteProperties = class extends IgnoreIfEmptyXmlComponent {
13277
+ constructor() {
13278
+ super("w:endnotePr", true);
13279
+ }
13280
+ };
13281
+ //#endregion
13050
13282
  //#region src/file/document/body/section-properties/properties/header-footer-reference.ts
13051
13283
  /**
13052
13284
  * This simple type specifies the possible types of headers and footers which may be specified for a given header or footer reference in a document. This value determines the page(s) on which the current header or footer shall be displayed.
@@ -13409,8 +13641,12 @@ var docx = (function(exports, xml_js, hash_js, nanoid_non_secure, undio, fflate,
13409
13641
  * });
13410
13642
  * ```
13411
13643
  */
13412
- const createPageNumberType = ({ start, formatType, separator }) => new BuilderElement({
13644
+ const createPageNumberType = ({ start, formatType, separator, chapStyle }) => new BuilderElement({
13413
13645
  attributes: {
13646
+ chapStyle: {
13647
+ key: "w:chapStyle",
13648
+ value: chapStyle === void 0 ? void 0 : decimalNumber(chapStyle)
13649
+ },
13414
13650
  formatType: {
13415
13651
  key: "w:fmt",
13416
13652
  value: formatType
@@ -13699,7 +13935,7 @@ var docx = (function(exports, xml_js, hash_js, nanoid_non_secure, undio, fflate,
13699
13935
  * ```
13700
13936
  */
13701
13937
  var SectionProperties = class extends XmlComponent {
13702
- constructor({ page: { size: { width = sectionPageSizeDefaults.WIDTH, height = sectionPageSizeDefaults.HEIGHT, orientation = sectionPageSizeDefaults.ORIENTATION } = {}, margin: { top = sectionMarginDefaults.TOP, right = sectionMarginDefaults.RIGHT, bottom = sectionMarginDefaults.BOTTOM, left = sectionMarginDefaults.LEFT, header = sectionMarginDefaults.HEADER, footer = sectionMarginDefaults.FOOTER, gutter = sectionMarginDefaults.GUTTER } = {}, pageNumbers = {}, borders, textDirection } = {}, grid: { linePitch = 360, charSpace, type: gridType } = {}, headerWrapperGroup = {}, footerWrapperGroup = {}, lineNumbers, titlePage, verticalAlign, column, type, revision } = {}) {
13938
+ constructor({ page: { size: { width = sectionPageSizeDefaults.WIDTH, height = sectionPageSizeDefaults.HEIGHT, orientation = sectionPageSizeDefaults.ORIENTATION } = {}, margin: { top = sectionMarginDefaults.TOP, right = sectionMarginDefaults.RIGHT, bottom = sectionMarginDefaults.BOTTOM, left = sectionMarginDefaults.LEFT, header = sectionMarginDefaults.HEADER, footer = sectionMarginDefaults.FOOTER, gutter = sectionMarginDefaults.GUTTER } = {}, pageNumbers = {}, borders, textDirection } = {}, grid: { linePitch = 360, charSpace, type: gridType } = {}, headerWrapperGroup = {}, footerWrapperGroup = {}, lineNumbers, titlePage, verticalAlign, column, type, revision, noEndnote, bidi, rtlGutter, paperSrc, footnotePr, endnotePr } = {}) {
13703
13939
  super("w:sectPr");
13704
13940
  this.addHeaderFooterGroup(HeaderFooterType.HEADER, headerWrapperGroup);
13705
13941
  this.addHeaderFooterGroup(HeaderFooterType.FOOTER, footerWrapperGroup);
@@ -13718,6 +13954,24 @@ var docx = (function(exports, xml_js, hash_js, nanoid_non_secure, undio, fflate,
13718
13954
  if (titlePage !== void 0) this.root.push(new OnOffElement("w:titlePg", titlePage));
13719
13955
  if (textDirection) this.root.push(new PageTextDirection(textDirection));
13720
13956
  if (revision) this.root.push(new SectionPropertiesChange(revision));
13957
+ if (noEndnote !== void 0) this.root.push(new OnOffElement("w:noEndnote", noEndnote));
13958
+ if (bidi !== void 0) this.root.push(new OnOffElement("w:bidi", bidi));
13959
+ if (rtlGutter !== void 0) this.root.push(new OnOffElement("w:rtlGutter", rtlGutter));
13960
+ if (paperSrc) this.root.push(new BuilderElement({
13961
+ attributes: {
13962
+ first: {
13963
+ key: "w:first",
13964
+ value: paperSrc.first === void 0 ? void 0 : decimalNumber(paperSrc.first)
13965
+ },
13966
+ other: {
13967
+ key: "w:other",
13968
+ value: paperSrc.other === void 0 ? void 0 : decimalNumber(paperSrc.other)
13969
+ }
13970
+ },
13971
+ name: "w:paperSrc"
13972
+ }));
13973
+ if (footnotePr) this.root.push(createFootnoteProperties(footnotePr));
13974
+ if (endnotePr) this.root.push(createEndnoteProperties(endnotePr));
13721
13975
  this.root.push(createDocumentGrid({
13722
13976
  charSpace,
13723
13977
  linePitch,
@@ -23395,12 +23649,14 @@ var docx = (function(exports, xml_js, hash_js, nanoid_non_secure, undio, fflate,
23395
23649
  exports.TableRow = TableRow;
23396
23650
  exports.TableRowProperties = TableRowProperties;
23397
23651
  exports.TableRowPropertiesChange = TableRowPropertiesChange;
23652
+ exports.TextAlignmentType = TextAlignmentType;
23398
23653
  exports.TextDirection = TextDirection;
23399
23654
  exports.TextEffect = TextEffect;
23400
23655
  exports.TextRun = TextRun;
23401
23656
  exports.TextWrappingSide = TextWrappingSide;
23402
23657
  exports.TextWrappingType = TextWrappingType;
23403
23658
  exports.Textbox = Textbox;
23659
+ exports.TextboxTightWrapType = TextboxTightWrapType;
23404
23660
  exports.ThematicBreak = ThematicBreak;
23405
23661
  exports.ThemeColor = ThemeColor;
23406
23662
  exports.ThemeFont = ThemeFont;
package/dist/index.mjs CHANGED
@@ -2259,6 +2259,57 @@ var InsertionTrackChange = class extends XmlComponent {
2259
2259
  }
2260
2260
  };
2261
2261
  //#endregion
2262
+ //#region src/file/paragraph/run/east-asian-layout.ts
2263
+ /**
2264
+ * East Asian layout module for WordprocessingML run properties.
2265
+ *
2266
+ * Specifies East Asian typography settings for a run, including
2267
+ * character combination, vertical text, and compression.
2268
+ *
2269
+ * Reference: ISO/IEC 29500-4, CT_EastAsianLayout
2270
+ *
2271
+ * @module
2272
+ */
2273
+ /**
2274
+ * Creates an East Asian layout element (w:eastAsianLayout) for a run.
2275
+ *
2276
+ * ## XSD Schema
2277
+ * ```xml
2278
+ * <xsd:complexType name="CT_EastAsianLayout">
2279
+ * <xsd:attribute name="id" type="ST_DecimalNumber" use="optional"/>
2280
+ * <xsd:attribute name="combine" type="s:ST_OnOff" use="optional"/>
2281
+ * <xsd:attribute name="combineBrackets" type="ST_CombineBrackets" use="optional"/>
2282
+ * <xsd:attribute name="vert" type="s:ST_OnOff" use="optional"/>
2283
+ * <xsd:attribute name="vertCompress" type="s:ST_OnOff" use="optional"/>
2284
+ * </xsd:complexType>
2285
+ * ```
2286
+ */
2287
+ const createEastAsianLayout = ({ id, combine, combineBrackets, vert, vertCompress }) => new BuilderElement({
2288
+ attributes: {
2289
+ combine: {
2290
+ key: "w:combine",
2291
+ value: combine
2292
+ },
2293
+ combineBrackets: {
2294
+ key: "w:combineBrackets",
2295
+ value: combineBrackets
2296
+ },
2297
+ id: {
2298
+ key: "w:id",
2299
+ value: id === void 0 ? void 0 : decimalNumber(id)
2300
+ },
2301
+ vert: {
2302
+ key: "w:vert",
2303
+ value: vert
2304
+ },
2305
+ vertCompress: {
2306
+ key: "w:vertCompress",
2307
+ value: vertCompress
2308
+ }
2309
+ },
2310
+ name: "w:eastAsianLayout"
2311
+ });
2312
+ //#endregion
2262
2313
  //#region src/file/paragraph/run/emphasis-mark.ts
2263
2314
  /**
2264
2315
  * Emphasis mark module for WordprocessingML run properties.
@@ -2990,6 +3041,7 @@ var RunProperties = class extends IgnoreIfEmptyXmlComponent {
2990
3041
  if (options.math) this.push(new OnOffElement("w:oMath", options.math));
2991
3042
  if (options.fitText !== void 0) this.push(new NumberValueElement("w:fitText", options.fitText));
2992
3043
  if (options.complexScript !== void 0) this.push(new OnOffElement("w:cs", options.complexScript));
3044
+ if (options.eastAsianLayout) this.push(createEastAsianLayout(options.eastAsianLayout));
2993
3045
  if (options.revision) this.push(new RunPropertiesChange(options.revision));
2994
3046
  }
2995
3047
  push(item) {
@@ -8496,6 +8548,34 @@ const createFrameProperties = (options) => {
8496
8548
  * @module
8497
8549
  */
8498
8550
  /**
8551
+ * Vertical text alignment types for paragraphs.
8552
+ *
8553
+ * Specifies the vertical alignment of text within the paragraph.
8554
+ *
8555
+ * @publicApi
8556
+ */
8557
+ const TextAlignmentType = {
8558
+ TOP: "top",
8559
+ CENTER: "center",
8560
+ BASELINE: "baseline",
8561
+ BOTTOM: "bottom",
8562
+ AUTO: "auto"
8563
+ };
8564
+ /**
8565
+ * Textbox tight wrap types for paragraphs.
8566
+ *
8567
+ * Specifies how tightly text wraps around a textbox.
8568
+ *
8569
+ * @publicApi
8570
+ */
8571
+ const TextboxTightWrapType = {
8572
+ NONE: "none",
8573
+ ALL_LINES: "allLines",
8574
+ FIRST_AND_LAST_LINE: "firstAndLastLine",
8575
+ FIRST_LINE_ONLY: "firstLineOnly",
8576
+ LAST_LINE_ONLY: "lastLineOnly"
8577
+ };
8578
+ /**
8499
8579
  * Represents paragraph properties (pPr) in a WordprocessingML document.
8500
8580
  *
8501
8581
  * The paragraph properties element specifies all formatting applied to a paragraph,
@@ -8658,6 +8738,27 @@ var ParagraphProperties = class extends IgnoreIfEmptyXmlComponent {
8658
8738
  if (options.outlineLevel !== void 0) this.push(createOutlineLevel(options.outlineLevel));
8659
8739
  if (options.suppressLineNumbers !== void 0) this.push(new OnOffElement("w:suppressLineNumbers", options.suppressLineNumbers));
8660
8740
  if (options.autoSpaceEastAsianText !== void 0) this.push(new OnOffElement("w:autoSpaceDN", options.autoSpaceEastAsianText));
8741
+ if (options.suppressAutoHyphens !== void 0) this.push(new OnOffElement("w:suppressAutoHyphens", options.suppressAutoHyphens));
8742
+ if (options.adjustRightInd !== void 0) this.push(new OnOffElement("w:adjustRightInd", options.adjustRightInd));
8743
+ if (options.snapToGrid !== void 0) this.push(new OnOffElement("w:snapToGrid", options.snapToGrid));
8744
+ if (options.mirrorIndents !== void 0) this.push(new OnOffElement("w:mirrorIndents", options.mirrorIndents));
8745
+ if (options.kinsoku !== void 0) this.push(new OnOffElement("w:kinsoku", options.kinsoku));
8746
+ if (options.topLinePunct !== void 0) this.push(new OnOffElement("w:topLinePunct", options.topLinePunct));
8747
+ if (options.autoSpaceDE !== void 0) this.push(new OnOffElement("w:autoSpaceDE", options.autoSpaceDE));
8748
+ if (options.textAlignment !== void 0) this.push(new BuilderElement({
8749
+ attributes: { val: {
8750
+ key: "w:val",
8751
+ value: options.textAlignment
8752
+ } },
8753
+ name: "w:textAlignment"
8754
+ }));
8755
+ if (options.textboxTightWrap !== void 0) this.push(new BuilderElement({
8756
+ attributes: { val: {
8757
+ key: "w:val",
8758
+ value: options.textboxTightWrap
8759
+ } },
8760
+ name: "w:textboxTightWrap"
8761
+ }));
8661
8762
  if (options.run) this.push(new ParagraphRunProperties(options.run));
8662
8763
  if (options.revision) this.push(new ParagraphPropertiesChange(options.revision));
8663
8764
  }
@@ -13027,6 +13128,137 @@ const createDocumentGrid = ({ type, linePitch, charSpace }) => new BuilderElemen
13027
13128
  name: "w:docGrid"
13028
13129
  });
13029
13130
  //#endregion
13131
+ //#region src/file/document/body/section-properties/properties/footnote-endnote-properties.ts
13132
+ /**
13133
+ * Footnote and endnote properties module for WordprocessingML section properties.
13134
+ *
13135
+ * Specifies footnote/endnote placement and numbering format within a section.
13136
+ *
13137
+ * Reference: ISO/IEC 29500-4, CT_FtnProps / CT_EdnProps
13138
+ *
13139
+ * @module
13140
+ */
13141
+ /**
13142
+ * Creates footnote properties element (w:footnotePr) for a section.
13143
+ *
13144
+ * ## XSD Schema
13145
+ * ```xml
13146
+ * <xsd:complexType name="CT_FtnProps">
13147
+ * <xsd:sequence>
13148
+ * <xsd:element name="pos" type="CT_FtnPos" minOccurs="0"/>
13149
+ * <xsd:element name="numFmt" type="CT_NumFmt" minOccurs="0"/>
13150
+ * <xsd:group ref="EG_FtnEdnNumProps" minOccurs="0"/>
13151
+ * </xsd:sequence>
13152
+ * </xsd:complexType>
13153
+ * ```
13154
+ */
13155
+ const createFootnoteProperties = ({ pos, formatType, format, numStart, numRestart }) => {
13156
+ const container = new FootnoteProperties();
13157
+ if (pos !== void 0) container.addChildElement(new BuilderElement({
13158
+ attributes: { val: {
13159
+ key: "w:val",
13160
+ value: pos
13161
+ } },
13162
+ name: "w:pos"
13163
+ }));
13164
+ if (formatType !== void 0 || format !== void 0) container.addChildElement(new BuilderElement({
13165
+ attributes: {
13166
+ format: {
13167
+ key: "w:format",
13168
+ value: format
13169
+ },
13170
+ val: {
13171
+ key: "w:fmt",
13172
+ value: formatType
13173
+ }
13174
+ },
13175
+ name: "w:numFmt"
13176
+ }));
13177
+ if (numStart !== void 0) container.addChildElement(new BuilderElement({
13178
+ attributes: { val: {
13179
+ key: "w:val",
13180
+ value: decimalNumber(numStart)
13181
+ } },
13182
+ name: "w:numStart"
13183
+ }));
13184
+ if (numRestart !== void 0) container.addChildElement(new BuilderElement({
13185
+ attributes: { val: {
13186
+ key: "w:val",
13187
+ value: numRestart
13188
+ } },
13189
+ name: "w:numRestart"
13190
+ }));
13191
+ return container;
13192
+ };
13193
+ /**
13194
+ * Footnote properties container element.
13195
+ */
13196
+ var FootnoteProperties = class extends IgnoreIfEmptyXmlComponent {
13197
+ constructor() {
13198
+ super("w:footnotePr", true);
13199
+ }
13200
+ };
13201
+ /**
13202
+ * Creates endnote properties element (w:endnotePr) for a section.
13203
+ *
13204
+ * ## XSD Schema
13205
+ * ```xml
13206
+ * <xsd:complexType name="CT_EdnProps">
13207
+ * <xsd:sequence>
13208
+ * <xsd:element name="pos" type="CT_EdnPos" minOccurs="0"/>
13209
+ * <xsd:element name="numFmt" type="CT_NumFmt" minOccurs="0"/>
13210
+ * <xsd:group ref="EG_FtnEdnNumProps" minOccurs="0"/>
13211
+ * </xsd:sequence>
13212
+ * </xsd:complexType>
13213
+ * ```
13214
+ */
13215
+ const createEndnoteProperties = ({ pos, formatType, format, numStart, numRestart }) => {
13216
+ const container = new EndnoteProperties();
13217
+ if (pos !== void 0) container.addChildElement(new BuilderElement({
13218
+ attributes: { val: {
13219
+ key: "w:val",
13220
+ value: pos
13221
+ } },
13222
+ name: "w:pos"
13223
+ }));
13224
+ if (formatType !== void 0 || format !== void 0) container.addChildElement(new BuilderElement({
13225
+ attributes: {
13226
+ format: {
13227
+ key: "w:format",
13228
+ value: format
13229
+ },
13230
+ val: {
13231
+ key: "w:fmt",
13232
+ value: formatType
13233
+ }
13234
+ },
13235
+ name: "w:numFmt"
13236
+ }));
13237
+ if (numStart !== void 0) container.addChildElement(new BuilderElement({
13238
+ attributes: { val: {
13239
+ key: "w:val",
13240
+ value: decimalNumber(numStart)
13241
+ } },
13242
+ name: "w:numStart"
13243
+ }));
13244
+ if (numRestart !== void 0) container.addChildElement(new BuilderElement({
13245
+ attributes: { val: {
13246
+ key: "w:val",
13247
+ value: numRestart
13248
+ } },
13249
+ name: "w:numRestart"
13250
+ }));
13251
+ return container;
13252
+ };
13253
+ /**
13254
+ * Endnote properties container element.
13255
+ */
13256
+ var EndnoteProperties = class extends IgnoreIfEmptyXmlComponent {
13257
+ constructor() {
13258
+ super("w:endnotePr", true);
13259
+ }
13260
+ };
13261
+ //#endregion
13030
13262
  //#region src/file/document/body/section-properties/properties/header-footer-reference.ts
13031
13263
  /**
13032
13264
  * This simple type specifies the possible types of headers and footers which may be specified for a given header or footer reference in a document. This value determines the page(s) on which the current header or footer shall be displayed.
@@ -13389,8 +13621,12 @@ const PageNumberSeparator = {
13389
13621
  * });
13390
13622
  * ```
13391
13623
  */
13392
- const createPageNumberType = ({ start, formatType, separator }) => new BuilderElement({
13624
+ const createPageNumberType = ({ start, formatType, separator, chapStyle }) => new BuilderElement({
13393
13625
  attributes: {
13626
+ chapStyle: {
13627
+ key: "w:chapStyle",
13628
+ value: chapStyle === void 0 ? void 0 : decimalNumber(chapStyle)
13629
+ },
13394
13630
  formatType: {
13395
13631
  key: "w:fmt",
13396
13632
  value: formatType
@@ -13679,7 +13915,7 @@ const sectionPageSizeDefaults = {
13679
13915
  * ```
13680
13916
  */
13681
13917
  var SectionProperties = class extends XmlComponent {
13682
- constructor({ page: { size: { width = sectionPageSizeDefaults.WIDTH, height = sectionPageSizeDefaults.HEIGHT, orientation = sectionPageSizeDefaults.ORIENTATION } = {}, margin: { top = sectionMarginDefaults.TOP, right = sectionMarginDefaults.RIGHT, bottom = sectionMarginDefaults.BOTTOM, left = sectionMarginDefaults.LEFT, header = sectionMarginDefaults.HEADER, footer = sectionMarginDefaults.FOOTER, gutter = sectionMarginDefaults.GUTTER } = {}, pageNumbers = {}, borders, textDirection } = {}, grid: { linePitch = 360, charSpace, type: gridType } = {}, headerWrapperGroup = {}, footerWrapperGroup = {}, lineNumbers, titlePage, verticalAlign, column, type, revision } = {}) {
13918
+ constructor({ page: { size: { width = sectionPageSizeDefaults.WIDTH, height = sectionPageSizeDefaults.HEIGHT, orientation = sectionPageSizeDefaults.ORIENTATION } = {}, margin: { top = sectionMarginDefaults.TOP, right = sectionMarginDefaults.RIGHT, bottom = sectionMarginDefaults.BOTTOM, left = sectionMarginDefaults.LEFT, header = sectionMarginDefaults.HEADER, footer = sectionMarginDefaults.FOOTER, gutter = sectionMarginDefaults.GUTTER } = {}, pageNumbers = {}, borders, textDirection } = {}, grid: { linePitch = 360, charSpace, type: gridType } = {}, headerWrapperGroup = {}, footerWrapperGroup = {}, lineNumbers, titlePage, verticalAlign, column, type, revision, noEndnote, bidi, rtlGutter, paperSrc, footnotePr, endnotePr } = {}) {
13683
13919
  super("w:sectPr");
13684
13920
  this.addHeaderFooterGroup(HeaderFooterType.HEADER, headerWrapperGroup);
13685
13921
  this.addHeaderFooterGroup(HeaderFooterType.FOOTER, footerWrapperGroup);
@@ -13698,6 +13934,24 @@ var SectionProperties = class extends XmlComponent {
13698
13934
  if (titlePage !== void 0) this.root.push(new OnOffElement("w:titlePg", titlePage));
13699
13935
  if (textDirection) this.root.push(new PageTextDirection(textDirection));
13700
13936
  if (revision) this.root.push(new SectionPropertiesChange(revision));
13937
+ if (noEndnote !== void 0) this.root.push(new OnOffElement("w:noEndnote", noEndnote));
13938
+ if (bidi !== void 0) this.root.push(new OnOffElement("w:bidi", bidi));
13939
+ if (rtlGutter !== void 0) this.root.push(new OnOffElement("w:rtlGutter", rtlGutter));
13940
+ if (paperSrc) this.root.push(new BuilderElement({
13941
+ attributes: {
13942
+ first: {
13943
+ key: "w:first",
13944
+ value: paperSrc.first === void 0 ? void 0 : decimalNumber(paperSrc.first)
13945
+ },
13946
+ other: {
13947
+ key: "w:other",
13948
+ value: paperSrc.other === void 0 ? void 0 : decimalNumber(paperSrc.other)
13949
+ }
13950
+ },
13951
+ name: "w:paperSrc"
13952
+ }));
13953
+ if (footnotePr) this.root.push(createFootnoteProperties(footnotePr));
13954
+ if (endnotePr) this.root.push(createEndnoteProperties(endnotePr));
13701
13955
  this.root.push(createDocumentGrid({
13702
13956
  charSpace,
13703
13957
  linePitch,
@@ -23180,4 +23434,4 @@ const findPatchKeys = (text) => {
23180
23434
  return (_text$match = text.match(/(?<=\{\{).+?(?=\}\})/gs)) !== null && _text$match !== void 0 ? _text$match : [];
23181
23435
  };
23182
23436
  //#endregion
23183
- export { AbstractNumbering, AlignmentType, AnnotationReference, Attributes, BaseXmlComponent, Body, Bookmark, BookmarkEnd, BookmarkStart, Border, BorderStyle, BuilderElement, CarriageReturn, CellMerge, CellMergeAttributes, CharacterSet, CheckBox, CheckBoxSymbolElement, CheckBoxUtil, Column, ColumnBreak, Comment, CommentRangeEnd, CommentRangeStart, CommentReference, Comments, ConcreteHyperlink, ConcreteNumbering, ContinuationSeparator, DayLong, DayShort, DeletedTableCell, DeletedTableRow, DeletedTextRun, File as Document, File, DocumentAttributeNamespaces, DocumentAttributes, DocumentBackground, DocumentBackgroundAttributes, DocumentDefaults, DocumentGridType, Drawing, DropCapType, EMPTY_OBJECT, EmphasisMarkType, EmptyElement, EndnoteIdReference, EndnoteReference, EndnoteReferenceRun, EndnoteReferenceRunAttributes, Endnotes, ExternalHyperlink, FileChild, FootNoteReferenceRunAttributes, FootNotes, Footer, FooterWrapper, FootnoteReference, FootnoteReferenceElement, FootnoteReferenceRun, FrameAnchorType, FrameWrap, GridSpan, Header, HeaderFooterReferenceType, HeaderFooterType, HeaderWrapper, HeadingLevel, HeightRule, HighlightColor, HorizontalPositionAlign, HorizontalPositionRelativeFrom, HpsMeasureElement, HyperlinkType, IgnoreIfEmptyXmlComponent, ImageRun, ImportedRootElementAttributes, ImportedXmlComponent, InitializableXmlComponent, InsertedTableCell, InsertedTableRow, InsertedTextRun, InternalHyperlink, LastRenderedPageBreak, LeaderType, Level, LevelBase, LevelForOverride, LevelFormat, LevelOverride, LevelSuffix, LineNumberRestartFormat, LineRuleType, Math$1 as Math, MathAngledBrackets, MathCurlyBrackets, MathDegree, MathDenominator, MathFraction, MathFunction, MathFunctionName, MathFunctionProperties, MathIntegral, MathLimit, MathLimitLower, MathLimitUpper, MathNumerator, MathPreSubSuperScript, MathRadical, MathRadicalProperties, MathRoundBrackets, MathRun, MathSquareBrackets, MathSubScript, MathSubSuperScript, MathSum, MathSuperScript, Media, MonthLong, MonthShort, NextAttributeComponent, NoBreakHyphen, NumberFormat, NumberProperties, NumberValueElement, NumberedItemReference, NumberedItemReferenceFormat, Numbering, OnOffElement, OverlapType, Packer, PageBorderDisplay, PageBorderOffsetFrom, PageBorderZOrder, PageBorders, PageBreak, PageBreakBefore, PageNumber, PageNumberElement, PageNumberSeparator, PageOrientation, PageReference, PageTextDirection, PageTextDirectionType, Paragraph, ParagraphProperties, ParagraphPropertiesChange, ParagraphPropertiesDefaults, ParagraphRunProperties, PatchType, PositionalTab, PositionalTabAlignment, PositionalTabLeader, PositionalTabRelativeTo, PrettifyType, RelativeHorizontalPosition, RelativeVerticalPosition, Run, RunProperties, RunPropertiesChange, RunPropertiesDefaults, SectionProperties, SectionPropertiesChange, SectionType, Separator, SequentialIdentifier, ShadingType, SimpleField, SimpleMailMergeField, SoftHyphen, SpaceType, StringContainer, StringEnumValueElement, StringValueElement, StyleForCharacter, StyleForParagraph, StyleLevel, Styles, SymbolRun, TDirection, Tab, TabStopPosition, TabStopType, Table, TableAnchorType, TableBorders, TableCell, TableCellBorders, TableLayoutType, TableOfContents, TableProperties, TableRow, TableRowProperties, TableRowPropertiesChange, TextDirection, TextEffect, TextRun, TextWrappingSide, TextWrappingType, Textbox, ThematicBreak, ThemeColor, ThemeFont, UnderlineType, VerticalAlign, VerticalAlignSection, VerticalAlignTable, VerticalAnchor, VerticalMerge, VerticalMergeRevisionType, VerticalMergeType, VerticalPositionAlign, VerticalPositionRelativeFrom, WORKAROUND2, WORKAROUND3, WORKAROUND4, WidthType, WpgGroupRun, WpsShapeRun, XmlAttributeComponent, XmlComponent, YearLong, YearShort, abstractNumUniqueNumericIdGen, bookmarkUniqueNumericIdGen, concreteNumUniqueNumericIdGen, convertInchesToTwip, convertMillimetersToTwip, convertToXmlComponent, createAlignment, createBodyProperties, createBorderElement, createColumns, createDocumentGrid, createDotEmphasisMark, createEmphasisMark, createFrameProperties, createHeaderFooterReference, createHorizontalPosition, createIndent, createLineNumberType, createMathAccentCharacter, createMathBase, createMathLimitLocation, createMathNAryProperties, createMathPreSubSuperScriptProperties, createMathSubScriptElement, createMathSubScriptProperties, createMathSubSuperScriptProperties, createMathSuperScriptElement, createMathSuperScriptProperties, createOutlineLevel, createPageMargin, createPageNumberType, createPageSize, createParagraphStyle, createRunFonts, createSectionType, createShading, createSimplePos, createSpacing, createStringElement, createTabStop, createTabStopItem, createTableFloatProperties, createTableLayout, createTableLook, createTableRowHeight, createTableWidthElement, createTransformation, createUnderline, createVerticalAlign, createVerticalPosition, createWrapNone, createWrapSquare, createWrapTight, createWrapTopAndBottom, dateTimeValue, decimalNumber, docPropertiesUniqueNumericIdGen, eighthPointMeasureValue, hashedId, hexColorValue, hpsMeasureValue, longHexNumber, measurementOrPercentValue, patchDetector, patchDocument, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, sectionMarginDefaults, sectionPageSizeDefaults, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber };
23437
+ export { AbstractNumbering, AlignmentType, AnnotationReference, Attributes, BaseXmlComponent, Body, Bookmark, BookmarkEnd, BookmarkStart, Border, BorderStyle, BuilderElement, CarriageReturn, CellMerge, CellMergeAttributes, CharacterSet, CheckBox, CheckBoxSymbolElement, CheckBoxUtil, Column, ColumnBreak, Comment, CommentRangeEnd, CommentRangeStart, CommentReference, Comments, ConcreteHyperlink, ConcreteNumbering, ContinuationSeparator, DayLong, DayShort, DeletedTableCell, DeletedTableRow, DeletedTextRun, File as Document, File, DocumentAttributeNamespaces, DocumentAttributes, DocumentBackground, DocumentBackgroundAttributes, DocumentDefaults, DocumentGridType, Drawing, DropCapType, EMPTY_OBJECT, EmphasisMarkType, EmptyElement, EndnoteIdReference, EndnoteReference, EndnoteReferenceRun, EndnoteReferenceRunAttributes, Endnotes, ExternalHyperlink, FileChild, FootNoteReferenceRunAttributes, FootNotes, Footer, FooterWrapper, FootnoteReference, FootnoteReferenceElement, FootnoteReferenceRun, FrameAnchorType, FrameWrap, GridSpan, Header, HeaderFooterReferenceType, HeaderFooterType, HeaderWrapper, HeadingLevel, HeightRule, HighlightColor, HorizontalPositionAlign, HorizontalPositionRelativeFrom, HpsMeasureElement, HyperlinkType, IgnoreIfEmptyXmlComponent, ImageRun, ImportedRootElementAttributes, ImportedXmlComponent, InitializableXmlComponent, InsertedTableCell, InsertedTableRow, InsertedTextRun, InternalHyperlink, LastRenderedPageBreak, LeaderType, Level, LevelBase, LevelForOverride, LevelFormat, LevelOverride, LevelSuffix, LineNumberRestartFormat, LineRuleType, Math$1 as Math, MathAngledBrackets, MathCurlyBrackets, MathDegree, MathDenominator, MathFraction, MathFunction, MathFunctionName, MathFunctionProperties, MathIntegral, MathLimit, MathLimitLower, MathLimitUpper, MathNumerator, MathPreSubSuperScript, MathRadical, MathRadicalProperties, MathRoundBrackets, MathRun, MathSquareBrackets, MathSubScript, MathSubSuperScript, MathSum, MathSuperScript, Media, MonthLong, MonthShort, NextAttributeComponent, NoBreakHyphen, NumberFormat, NumberProperties, NumberValueElement, NumberedItemReference, NumberedItemReferenceFormat, Numbering, OnOffElement, OverlapType, Packer, PageBorderDisplay, PageBorderOffsetFrom, PageBorderZOrder, PageBorders, PageBreak, PageBreakBefore, PageNumber, PageNumberElement, PageNumberSeparator, PageOrientation, PageReference, PageTextDirection, PageTextDirectionType, Paragraph, ParagraphProperties, ParagraphPropertiesChange, ParagraphPropertiesDefaults, ParagraphRunProperties, PatchType, PositionalTab, PositionalTabAlignment, PositionalTabLeader, PositionalTabRelativeTo, PrettifyType, RelativeHorizontalPosition, RelativeVerticalPosition, Run, RunProperties, RunPropertiesChange, RunPropertiesDefaults, SectionProperties, SectionPropertiesChange, SectionType, Separator, SequentialIdentifier, ShadingType, SimpleField, SimpleMailMergeField, SoftHyphen, SpaceType, StringContainer, StringEnumValueElement, StringValueElement, StyleForCharacter, StyleForParagraph, StyleLevel, Styles, SymbolRun, TDirection, Tab, TabStopPosition, TabStopType, Table, TableAnchorType, TableBorders, TableCell, TableCellBorders, TableLayoutType, TableOfContents, TableProperties, TableRow, TableRowProperties, TableRowPropertiesChange, TextAlignmentType, TextDirection, TextEffect, TextRun, TextWrappingSide, TextWrappingType, Textbox, TextboxTightWrapType, ThematicBreak, ThemeColor, ThemeFont, UnderlineType, VerticalAlign, VerticalAlignSection, VerticalAlignTable, VerticalAnchor, VerticalMerge, VerticalMergeRevisionType, VerticalMergeType, VerticalPositionAlign, VerticalPositionRelativeFrom, WORKAROUND2, WORKAROUND3, WORKAROUND4, WidthType, WpgGroupRun, WpsShapeRun, XmlAttributeComponent, XmlComponent, YearLong, YearShort, abstractNumUniqueNumericIdGen, bookmarkUniqueNumericIdGen, concreteNumUniqueNumericIdGen, convertInchesToTwip, convertMillimetersToTwip, convertToXmlComponent, createAlignment, createBodyProperties, createBorderElement, createColumns, createDocumentGrid, createDotEmphasisMark, createEmphasisMark, createFrameProperties, createHeaderFooterReference, createHorizontalPosition, createIndent, createLineNumberType, createMathAccentCharacter, createMathBase, createMathLimitLocation, createMathNAryProperties, createMathPreSubSuperScriptProperties, createMathSubScriptElement, createMathSubScriptProperties, createMathSubSuperScriptProperties, createMathSuperScriptElement, createMathSuperScriptProperties, createOutlineLevel, createPageMargin, createPageNumberType, createPageSize, createParagraphStyle, createRunFonts, createSectionType, createShading, createSimplePos, createSpacing, createStringElement, createTabStop, createTabStopItem, createTableFloatProperties, createTableLayout, createTableLook, createTableRowHeight, createTableWidthElement, createTransformation, createUnderline, createVerticalAlign, createVerticalPosition, createWrapNone, createWrapSquare, createWrapTight, createWrapTopAndBottom, dateTimeValue, decimalNumber, docPropertiesUniqueNumericIdGen, eighthPointMeasureValue, hashedId, hexColorValue, hpsMeasureValue, longHexNumber, measurementOrPercentValue, patchDetector, patchDocument, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, sectionMarginDefaults, sectionPageSizeDefaults, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber };