docx-plus 0.1.3 → 0.1.5

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/index.cjs CHANGED
@@ -12564,11 +12564,11 @@ const createWrapPolygon$1 = (cx, cy) => new BuilderElement({
12564
12564
  attributes: {
12565
12565
  x: {
12566
12566
  key: "x",
12567
- value: cx
12567
+ value: 0
12568
12568
  },
12569
12569
  y: {
12570
12570
  key: "y",
12571
- value: 0
12571
+ value: -cy
12572
12572
  }
12573
12573
  },
12574
12574
  name: "wp:lineTo"
@@ -12581,7 +12581,7 @@ const createWrapPolygon$1 = (cx, cy) => new BuilderElement({
12581
12581
  },
12582
12582
  y: {
12583
12583
  key: "y",
12584
- value: cy
12584
+ value: -cy
12585
12585
  }
12586
12586
  },
12587
12587
  name: "wp:lineTo"
@@ -12590,11 +12590,11 @@ const createWrapPolygon$1 = (cx, cy) => new BuilderElement({
12590
12590
  attributes: {
12591
12591
  x: {
12592
12592
  key: "x",
12593
- value: 0
12593
+ value: cx
12594
12594
  },
12595
12595
  y: {
12596
12596
  key: "y",
12597
- value: cy
12597
+ value: 0
12598
12598
  }
12599
12599
  },
12600
12600
  name: "wp:lineTo"
@@ -12710,11 +12710,11 @@ const createWrapPolygon = (cx, cy) => new BuilderElement({
12710
12710
  attributes: {
12711
12711
  x: {
12712
12712
  key: "x",
12713
- value: cx
12713
+ value: 0
12714
12714
  },
12715
12715
  y: {
12716
12716
  key: "y",
12717
- value: 0
12717
+ value: -cy
12718
12718
  }
12719
12719
  },
12720
12720
  name: "wp:lineTo"
@@ -12727,7 +12727,7 @@ const createWrapPolygon = (cx, cy) => new BuilderElement({
12727
12727
  },
12728
12728
  y: {
12729
12729
  key: "y",
12730
- value: cy
12730
+ value: -cy
12731
12731
  }
12732
12732
  },
12733
12733
  name: "wp:lineTo"
@@ -12736,11 +12736,11 @@ const createWrapPolygon = (cx, cy) => new BuilderElement({
12736
12736
  attributes: {
12737
12737
  x: {
12738
12738
  key: "x",
12739
- value: 0
12739
+ value: cx
12740
12740
  },
12741
12741
  y: {
12742
12742
  key: "y",
12743
- value: cy
12743
+ value: 0
12744
12744
  }
12745
12745
  },
12746
12746
  name: "wp:lineTo"
@@ -16219,6 +16219,14 @@ var ParagraphProperties = class extends IgnoreIfEmptyXmlComponent {
16219
16219
  } },
16220
16220
  name: "w:textboxTightWrap"
16221
16221
  }));
16222
+ if (options.textDirection !== void 0) this.push(new BuilderElement({
16223
+ attributes: { val: {
16224
+ key: "w:val",
16225
+ value: options.textDirection
16226
+ } },
16227
+ name: "w:textDirection"
16228
+ }));
16229
+ if (options.suppressOverlap !== void 0) this.push(new OnOffElement("w:suppressOverlap", options.suppressOverlap));
16222
16230
  if (options.run) this.push(new ParagraphRunProperties(options.run));
16223
16231
  if (options.revision) this.push(new ParagraphPropertiesChange(options.revision));
16224
16232
  }
package/dist/index.d.cts CHANGED
@@ -2841,7 +2841,11 @@ declare const TextboxTightWrapType: {
2841
2841
  };
2842
2842
  interface LevelParagraphStylePropertiesOptions {
2843
2843
  readonly alignment?: (typeof AlignmentType)[keyof typeof AlignmentType];
2844
+ readonly bidirectional?: boolean;
2845
+ readonly pageBreakBefore?: boolean;
2846
+ readonly tabStops?: readonly TabStopDefinition[];
2844
2847
  readonly thematicBreak?: boolean;
2848
+ readonly widowControl?: boolean;
2845
2849
  readonly contextualSpacing?: boolean;
2846
2850
  readonly rightTabStop?: number;
2847
2851
  readonly leftTabStop?: number;
@@ -2849,6 +2853,22 @@ interface LevelParagraphStylePropertiesOptions {
2849
2853
  readonly spacing?: ISpacingProperties;
2850
2854
  readonly keepNext?: boolean;
2851
2855
  readonly keepLines?: boolean;
2856
+ readonly frame?: IFrameOptions;
2857
+ readonly suppressLineNumbers?: boolean;
2858
+ readonly wordWrap?: boolean;
2859
+ readonly overflowPunctuation?: boolean;
2860
+ readonly autoSpaceEastAsianText?: boolean;
2861
+ readonly suppressOverlap?: boolean;
2862
+ readonly suppressAutoHyphens?: boolean;
2863
+ readonly adjustRightInd?: boolean;
2864
+ readonly snapToGrid?: boolean;
2865
+ readonly mirrorIndents?: boolean;
2866
+ readonly kinsoku?: boolean;
2867
+ readonly topLinePunct?: boolean;
2868
+ readonly autoSpaceDE?: boolean;
2869
+ readonly textAlignment?: (typeof TextAlignmentType)[keyof typeof TextAlignmentType];
2870
+ readonly textboxTightWrap?: (typeof TextboxTightWrapType)[keyof typeof TextboxTightWrapType];
2871
+ readonly textDirection?: "lr" | "rl" | "tb" | "tbV" | "rlV" | "lrV";
2852
2872
  readonly outlineLevel?: number;
2853
2873
  }
2854
2874
  type IParagraphStylePropertiesOptions = {
@@ -2863,30 +2883,11 @@ type IParagraphStylePropertiesOptions = {
2863
2883
  } & LevelParagraphStylePropertiesOptions;
2864
2884
  type IParagraphPropertiesOptionsBase = {
2865
2885
  readonly heading?: (typeof HeadingLevel)[keyof typeof HeadingLevel];
2866
- readonly bidirectional?: boolean;
2867
- readonly pageBreakBefore?: boolean;
2868
- readonly tabStops?: readonly TabStopDefinition[];
2869
2886
  readonly style?: string;
2870
2887
  readonly bullet?: {
2871
2888
  readonly level: number;
2872
2889
  };
2873
- readonly widowControl?: boolean;
2874
- readonly frame?: IFrameOptions;
2875
- readonly suppressLineNumbers?: boolean;
2876
- readonly wordWrap?: boolean;
2877
- readonly overflowPunctuation?: boolean;
2878
- readonly scale?: number;
2879
- readonly autoSpaceEastAsianText?: boolean;
2880
2890
  readonly run?: IParagraphRunOptions;
2881
- readonly suppressAutoHyphens?: boolean;
2882
- readonly adjustRightInd?: boolean;
2883
- readonly snapToGrid?: boolean;
2884
- readonly mirrorIndents?: boolean;
2885
- readonly kinsoku?: boolean;
2886
- readonly topLinePunct?: boolean;
2887
- readonly autoSpaceDE?: boolean;
2888
- readonly textAlignment?: (typeof TextAlignmentType)[keyof typeof TextAlignmentType];
2889
- readonly textboxTightWrap?: (typeof TextboxTightWrapType)[keyof typeof TextboxTightWrapType];
2890
2891
  } & IParagraphStylePropertiesOptions;
2891
2892
  type IParagraphPropertiesChangeOptions = IChangedAttributesProperties & IParagraphPropertiesOptionsBase;
2892
2893
  type IParagraphPropertiesOptions = {
package/dist/index.d.mts CHANGED
@@ -2843,7 +2843,11 @@ declare const TextboxTightWrapType: {
2843
2843
  };
2844
2844
  interface LevelParagraphStylePropertiesOptions {
2845
2845
  readonly alignment?: (typeof AlignmentType)[keyof typeof AlignmentType];
2846
+ readonly bidirectional?: boolean;
2847
+ readonly pageBreakBefore?: boolean;
2848
+ readonly tabStops?: readonly TabStopDefinition[];
2846
2849
  readonly thematicBreak?: boolean;
2850
+ readonly widowControl?: boolean;
2847
2851
  readonly contextualSpacing?: boolean;
2848
2852
  readonly rightTabStop?: number;
2849
2853
  readonly leftTabStop?: number;
@@ -2851,6 +2855,22 @@ interface LevelParagraphStylePropertiesOptions {
2851
2855
  readonly spacing?: ISpacingProperties;
2852
2856
  readonly keepNext?: boolean;
2853
2857
  readonly keepLines?: boolean;
2858
+ readonly frame?: IFrameOptions;
2859
+ readonly suppressLineNumbers?: boolean;
2860
+ readonly wordWrap?: boolean;
2861
+ readonly overflowPunctuation?: boolean;
2862
+ readonly autoSpaceEastAsianText?: boolean;
2863
+ readonly suppressOverlap?: boolean;
2864
+ readonly suppressAutoHyphens?: boolean;
2865
+ readonly adjustRightInd?: boolean;
2866
+ readonly snapToGrid?: boolean;
2867
+ readonly mirrorIndents?: boolean;
2868
+ readonly kinsoku?: boolean;
2869
+ readonly topLinePunct?: boolean;
2870
+ readonly autoSpaceDE?: boolean;
2871
+ readonly textAlignment?: (typeof TextAlignmentType)[keyof typeof TextAlignmentType];
2872
+ readonly textboxTightWrap?: (typeof TextboxTightWrapType)[keyof typeof TextboxTightWrapType];
2873
+ readonly textDirection?: "lr" | "rl" | "tb" | "tbV" | "rlV" | "lrV";
2854
2874
  readonly outlineLevel?: number;
2855
2875
  }
2856
2876
  type IParagraphStylePropertiesOptions = {
@@ -2865,30 +2885,11 @@ type IParagraphStylePropertiesOptions = {
2865
2885
  } & LevelParagraphStylePropertiesOptions;
2866
2886
  type IParagraphPropertiesOptionsBase = {
2867
2887
  readonly heading?: (typeof HeadingLevel)[keyof typeof HeadingLevel];
2868
- readonly bidirectional?: boolean;
2869
- readonly pageBreakBefore?: boolean;
2870
- readonly tabStops?: readonly TabStopDefinition[];
2871
2888
  readonly style?: string;
2872
2889
  readonly bullet?: {
2873
2890
  readonly level: number;
2874
2891
  };
2875
- readonly widowControl?: boolean;
2876
- readonly frame?: IFrameOptions;
2877
- readonly suppressLineNumbers?: boolean;
2878
- readonly wordWrap?: boolean;
2879
- readonly overflowPunctuation?: boolean;
2880
- readonly scale?: number;
2881
- readonly autoSpaceEastAsianText?: boolean;
2882
2892
  readonly run?: IParagraphRunOptions;
2883
- readonly suppressAutoHyphens?: boolean;
2884
- readonly adjustRightInd?: boolean;
2885
- readonly snapToGrid?: boolean;
2886
- readonly mirrorIndents?: boolean;
2887
- readonly kinsoku?: boolean;
2888
- readonly topLinePunct?: boolean;
2889
- readonly autoSpaceDE?: boolean;
2890
- readonly textAlignment?: (typeof TextAlignmentType)[keyof typeof TextAlignmentType];
2891
- readonly textboxTightWrap?: (typeof TextboxTightWrapType)[keyof typeof TextboxTightWrapType];
2892
2893
  } & IParagraphStylePropertiesOptions;
2893
2894
  type IParagraphPropertiesChangeOptions = IChangedAttributesProperties & IParagraphPropertiesOptionsBase;
2894
2895
  type IParagraphPropertiesOptions = {
@@ -12561,11 +12561,11 @@ var docx = (function(exports, hash_js, nanoid_non_secure, undio, fflate) {
12561
12561
  attributes: {
12562
12562
  x: {
12563
12563
  key: "x",
12564
- value: cx
12564
+ value: 0
12565
12565
  },
12566
12566
  y: {
12567
12567
  key: "y",
12568
- value: 0
12568
+ value: -cy
12569
12569
  }
12570
12570
  },
12571
12571
  name: "wp:lineTo"
@@ -12578,7 +12578,7 @@ var docx = (function(exports, hash_js, nanoid_non_secure, undio, fflate) {
12578
12578
  },
12579
12579
  y: {
12580
12580
  key: "y",
12581
- value: cy
12581
+ value: -cy
12582
12582
  }
12583
12583
  },
12584
12584
  name: "wp:lineTo"
@@ -12587,11 +12587,11 @@ var docx = (function(exports, hash_js, nanoid_non_secure, undio, fflate) {
12587
12587
  attributes: {
12588
12588
  x: {
12589
12589
  key: "x",
12590
- value: 0
12590
+ value: cx
12591
12591
  },
12592
12592
  y: {
12593
12593
  key: "y",
12594
- value: cy
12594
+ value: 0
12595
12595
  }
12596
12596
  },
12597
12597
  name: "wp:lineTo"
@@ -12707,11 +12707,11 @@ var docx = (function(exports, hash_js, nanoid_non_secure, undio, fflate) {
12707
12707
  attributes: {
12708
12708
  x: {
12709
12709
  key: "x",
12710
- value: cx
12710
+ value: 0
12711
12711
  },
12712
12712
  y: {
12713
12713
  key: "y",
12714
- value: 0
12714
+ value: -cy
12715
12715
  }
12716
12716
  },
12717
12717
  name: "wp:lineTo"
@@ -12724,7 +12724,7 @@ var docx = (function(exports, hash_js, nanoid_non_secure, undio, fflate) {
12724
12724
  },
12725
12725
  y: {
12726
12726
  key: "y",
12727
- value: cy
12727
+ value: -cy
12728
12728
  }
12729
12729
  },
12730
12730
  name: "wp:lineTo"
@@ -12733,11 +12733,11 @@ var docx = (function(exports, hash_js, nanoid_non_secure, undio, fflate) {
12733
12733
  attributes: {
12734
12734
  x: {
12735
12735
  key: "x",
12736
- value: 0
12736
+ value: cx
12737
12737
  },
12738
12738
  y: {
12739
12739
  key: "y",
12740
- value: cy
12740
+ value: 0
12741
12741
  }
12742
12742
  },
12743
12743
  name: "wp:lineTo"
@@ -16216,6 +16216,14 @@ var docx = (function(exports, hash_js, nanoid_non_secure, undio, fflate) {
16216
16216
  } },
16217
16217
  name: "w:textboxTightWrap"
16218
16218
  }));
16219
+ if (options.textDirection !== void 0) this.push(new BuilderElement({
16220
+ attributes: { val: {
16221
+ key: "w:val",
16222
+ value: options.textDirection
16223
+ } },
16224
+ name: "w:textDirection"
16225
+ }));
16226
+ if (options.suppressOverlap !== void 0) this.push(new OnOffElement("w:suppressOverlap", options.suppressOverlap));
16219
16227
  if (options.run) this.push(new ParagraphRunProperties(options.run));
16220
16228
  if (options.revision) this.push(new ParagraphPropertiesChange(options.revision));
16221
16229
  }
package/dist/index.mjs CHANGED
@@ -12562,11 +12562,11 @@ const createWrapPolygon$1 = (cx, cy) => new BuilderElement({
12562
12562
  attributes: {
12563
12563
  x: {
12564
12564
  key: "x",
12565
- value: cx
12565
+ value: 0
12566
12566
  },
12567
12567
  y: {
12568
12568
  key: "y",
12569
- value: 0
12569
+ value: -cy
12570
12570
  }
12571
12571
  },
12572
12572
  name: "wp:lineTo"
@@ -12579,7 +12579,7 @@ const createWrapPolygon$1 = (cx, cy) => new BuilderElement({
12579
12579
  },
12580
12580
  y: {
12581
12581
  key: "y",
12582
- value: cy
12582
+ value: -cy
12583
12583
  }
12584
12584
  },
12585
12585
  name: "wp:lineTo"
@@ -12588,11 +12588,11 @@ const createWrapPolygon$1 = (cx, cy) => new BuilderElement({
12588
12588
  attributes: {
12589
12589
  x: {
12590
12590
  key: "x",
12591
- value: 0
12591
+ value: cx
12592
12592
  },
12593
12593
  y: {
12594
12594
  key: "y",
12595
- value: cy
12595
+ value: 0
12596
12596
  }
12597
12597
  },
12598
12598
  name: "wp:lineTo"
@@ -12708,11 +12708,11 @@ const createWrapPolygon = (cx, cy) => new BuilderElement({
12708
12708
  attributes: {
12709
12709
  x: {
12710
12710
  key: "x",
12711
- value: cx
12711
+ value: 0
12712
12712
  },
12713
12713
  y: {
12714
12714
  key: "y",
12715
- value: 0
12715
+ value: -cy
12716
12716
  }
12717
12717
  },
12718
12718
  name: "wp:lineTo"
@@ -12725,7 +12725,7 @@ const createWrapPolygon = (cx, cy) => new BuilderElement({
12725
12725
  },
12726
12726
  y: {
12727
12727
  key: "y",
12728
- value: cy
12728
+ value: -cy
12729
12729
  }
12730
12730
  },
12731
12731
  name: "wp:lineTo"
@@ -12734,11 +12734,11 @@ const createWrapPolygon = (cx, cy) => new BuilderElement({
12734
12734
  attributes: {
12735
12735
  x: {
12736
12736
  key: "x",
12737
- value: 0
12737
+ value: cx
12738
12738
  },
12739
12739
  y: {
12740
12740
  key: "y",
12741
- value: cy
12741
+ value: 0
12742
12742
  }
12743
12743
  },
12744
12744
  name: "wp:lineTo"
@@ -16217,6 +16217,14 @@ var ParagraphProperties = class extends IgnoreIfEmptyXmlComponent {
16217
16217
  } },
16218
16218
  name: "w:textboxTightWrap"
16219
16219
  }));
16220
+ if (options.textDirection !== void 0) this.push(new BuilderElement({
16221
+ attributes: { val: {
16222
+ key: "w:val",
16223
+ value: options.textDirection
16224
+ } },
16225
+ name: "w:textDirection"
16226
+ }));
16227
+ if (options.suppressOverlap !== void 0) this.push(new OnOffElement("w:suppressOverlap", options.suppressOverlap));
16220
16228
  if (options.run) this.push(new ParagraphRunProperties(options.run));
16221
16229
  if (options.revision) this.push(new ParagraphPropertiesChange(options.revision));
16222
16230
  }
package/dist/index.umd.js CHANGED
@@ -12569,11 +12569,11 @@
12569
12569
  attributes: {
12570
12570
  x: {
12571
12571
  key: "x",
12572
- value: cx
12572
+ value: 0
12573
12573
  },
12574
12574
  y: {
12575
12575
  key: "y",
12576
- value: 0
12576
+ value: -cy
12577
12577
  }
12578
12578
  },
12579
12579
  name: "wp:lineTo"
@@ -12586,7 +12586,7 @@
12586
12586
  },
12587
12587
  y: {
12588
12588
  key: "y",
12589
- value: cy
12589
+ value: -cy
12590
12590
  }
12591
12591
  },
12592
12592
  name: "wp:lineTo"
@@ -12595,11 +12595,11 @@
12595
12595
  attributes: {
12596
12596
  x: {
12597
12597
  key: "x",
12598
- value: 0
12598
+ value: cx
12599
12599
  },
12600
12600
  y: {
12601
12601
  key: "y",
12602
- value: cy
12602
+ value: 0
12603
12603
  }
12604
12604
  },
12605
12605
  name: "wp:lineTo"
@@ -12715,11 +12715,11 @@
12715
12715
  attributes: {
12716
12716
  x: {
12717
12717
  key: "x",
12718
- value: cx
12718
+ value: 0
12719
12719
  },
12720
12720
  y: {
12721
12721
  key: "y",
12722
- value: 0
12722
+ value: -cy
12723
12723
  }
12724
12724
  },
12725
12725
  name: "wp:lineTo"
@@ -12732,7 +12732,7 @@
12732
12732
  },
12733
12733
  y: {
12734
12734
  key: "y",
12735
- value: cy
12735
+ value: -cy
12736
12736
  }
12737
12737
  },
12738
12738
  name: "wp:lineTo"
@@ -12741,11 +12741,11 @@
12741
12741
  attributes: {
12742
12742
  x: {
12743
12743
  key: "x",
12744
- value: 0
12744
+ value: cx
12745
12745
  },
12746
12746
  y: {
12747
12747
  key: "y",
12748
- value: cy
12748
+ value: 0
12749
12749
  }
12750
12750
  },
12751
12751
  name: "wp:lineTo"
@@ -16224,6 +16224,14 @@
16224
16224
  } },
16225
16225
  name: "w:textboxTightWrap"
16226
16226
  }));
16227
+ if (options.textDirection !== void 0) this.push(new BuilderElement({
16228
+ attributes: { val: {
16229
+ key: "w:val",
16230
+ value: options.textDirection
16231
+ } },
16232
+ name: "w:textDirection"
16233
+ }));
16234
+ if (options.suppressOverlap !== void 0) this.push(new OnOffElement("w:suppressOverlap", options.suppressOverlap));
16227
16235
  if (options.run) this.push(new ParagraphRunProperties(options.run));
16228
16236
  if (options.revision) this.push(new ParagraphPropertiesChange(options.revision));
16229
16237
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docx-plus",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.",
5
5
  "keywords": [
6
6
  "clippy",