pptxgenjs-plus 4.3.9 → 4.3.10

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.
@@ -1,4 +1,4 @@
1
- /* PptxGenJS 4.3.9 @ 2026-12-01T20:34:30.120Z */
1
+ /* PptxGenJS 4.3.10 @ 2026-12-04T13:41:11.342Z */
2
2
 
3
3
  "use strict";
4
4
  const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
@@ -3759,18 +3759,20 @@ function genXmlTextRun(textObj) {
3759
3759
  const arrLines = [];
3760
3760
  let arrTexts = [];
3761
3761
  arrTextObjects.forEach((textObj, idx)=>{
3762
- var _textObj_options, _textObj_options1, _textObj_options2, _textObj_options3;
3762
+ var _textObj_options, _textObj_options1, _arrTexts__options, _textObj_options2, _textObj_options3;
3763
3763
  // OMML-only runs use empty `text` but must still emit content
3764
3764
  if (!textObj.text && ((_textObj_options = textObj.options) === null || _textObj_options === void 0 ? void 0 : _textObj_options.omml)) textObj.text = '';
3765
3765
  // A: Align or Bullet trigger new line
3766
- if (arrTexts.length > 0 && (((_textObj_options1 = textObj.options) === null || _textObj_options1 === void 0 ? void 0 : _textObj_options1.align) || opts.align)) {
3767
- var _textObj_options4, _arrTextObjects__options;
3768
- // Only start a new paragraph when align *changes*
3769
- if (((_textObj_options4 = textObj.options) === null || _textObj_options4 === void 0 ? void 0 : _textObj_options4.align) !== ((_arrTextObjects__options = arrTextObjects[idx - 1].options) === null || _arrTextObjects__options === void 0 ? void 0 : _arrTextObjects__options.align)) {
3770
- arrLines.push(arrTexts);
3771
- arrTexts = [];
3772
- }
3773
- } else if (arrTexts.length > 0 && ((_textObj_options2 = textObj.options) === null || _textObj_options2 === void 0 ? void 0 : _textObj_options2.bullet) && arrTexts.length > 0) {
3766
+ // Compare explicit run align against the current paragraph's effective align so inline runs
3767
+ // that omit `options.align` (e.g. inline OMML, bold runs, or `softBreakBefore` runs) stay
3768
+ // inside the same `<a:p>` instead of splitting into spurious hard paragraphs.
3769
+ const currAlign = (_textObj_options1 = textObj.options) === null || _textObj_options1 === void 0 ? void 0 : _textObj_options1.align;
3770
+ const paraAlign = arrTexts.length > 0 ? ((_arrTexts__options = arrTexts[0].options) === null || _arrTexts__options === void 0 ? void 0 : _arrTexts__options.align) || opts.align : undefined;
3771
+ if (arrTexts.length > 0 && currAlign && currAlign !== paraAlign) {
3772
+ // Only start a new paragraph when effective align *changes*
3773
+ arrLines.push(arrTexts);
3774
+ arrTexts = [];
3775
+ } else if (arrTexts.length > 0 && ((_textObj_options2 = textObj.options) === null || _textObj_options2 === void 0 ? void 0 : _textObj_options2.bullet)) {
3774
3776
  arrLines.push(arrTexts);
3775
3777
  arrTexts = [];
3776
3778
  if (textObj.options) textObj.options.breakLine = false; // For cases with both `bullet` and `brekaLine` - prevent double lineBreak
@@ -23929,7 +23931,7 @@ class PptxGenJS {
23929
23931
  */ pptxgen_define_property(this, "_layout", void 0);
23930
23932
  /**
23931
23933
  * PptxGenJS Library Version
23932
- */ pptxgen_define_property(this, "_version", (/* inlined export .VERSION */"4.3.9"));
23934
+ */ pptxgen_define_property(this, "_version", (/* inlined export .VERSION */"4.3.10"));
23933
23935
  /**
23934
23936
  * @type {string}
23935
23937
  */ pptxgen_define_property(this, "_author", void 0);
@@ -1,4 +1,4 @@
1
- /* PptxGenJS 4.3.9 @ 2026-12-01T20:34:30.120Z */
1
+ /* PptxGenJS 4.3.10 @ 2026-12-04T13:41:11.342Z */
2
2
 
3
3
  import { JSZip } from "@node-projects/jszip";
4
4
  import { parseXml } from "@rgrove/parse-xml";
@@ -3717,18 +3717,20 @@ function genXmlTextRun(textObj) {
3717
3717
  const arrLines = [];
3718
3718
  let arrTexts = [];
3719
3719
  arrTextObjects.forEach((textObj, idx)=>{
3720
- var _textObj_options, _textObj_options1, _textObj_options2, _textObj_options3;
3720
+ var _textObj_options, _textObj_options1, _arrTexts__options, _textObj_options2, _textObj_options3;
3721
3721
  // OMML-only runs use empty `text` but must still emit content
3722
3722
  if (!textObj.text && ((_textObj_options = textObj.options) === null || _textObj_options === void 0 ? void 0 : _textObj_options.omml)) textObj.text = '';
3723
3723
  // A: Align or Bullet trigger new line
3724
- if (arrTexts.length > 0 && (((_textObj_options1 = textObj.options) === null || _textObj_options1 === void 0 ? void 0 : _textObj_options1.align) || opts.align)) {
3725
- var _textObj_options4, _arrTextObjects__options;
3726
- // Only start a new paragraph when align *changes*
3727
- if (((_textObj_options4 = textObj.options) === null || _textObj_options4 === void 0 ? void 0 : _textObj_options4.align) !== ((_arrTextObjects__options = arrTextObjects[idx - 1].options) === null || _arrTextObjects__options === void 0 ? void 0 : _arrTextObjects__options.align)) {
3728
- arrLines.push(arrTexts);
3729
- arrTexts = [];
3730
- }
3731
- } else if (arrTexts.length > 0 && ((_textObj_options2 = textObj.options) === null || _textObj_options2 === void 0 ? void 0 : _textObj_options2.bullet) && arrTexts.length > 0) {
3724
+ // Compare explicit run align against the current paragraph's effective align so inline runs
3725
+ // that omit `options.align` (e.g. inline OMML, bold runs, or `softBreakBefore` runs) stay
3726
+ // inside the same `<a:p>` instead of splitting into spurious hard paragraphs.
3727
+ const currAlign = (_textObj_options1 = textObj.options) === null || _textObj_options1 === void 0 ? void 0 : _textObj_options1.align;
3728
+ const paraAlign = arrTexts.length > 0 ? ((_arrTexts__options = arrTexts[0].options) === null || _arrTexts__options === void 0 ? void 0 : _arrTexts__options.align) || opts.align : undefined;
3729
+ if (arrTexts.length > 0 && currAlign && currAlign !== paraAlign) {
3730
+ // Only start a new paragraph when effective align *changes*
3731
+ arrLines.push(arrTexts);
3732
+ arrTexts = [];
3733
+ } else if (arrTexts.length > 0 && ((_textObj_options2 = textObj.options) === null || _textObj_options2 === void 0 ? void 0 : _textObj_options2.bullet)) {
3732
3734
  arrLines.push(arrTexts);
3733
3735
  arrTexts = [];
3734
3736
  if (textObj.options) textObj.options.breakLine = false; // For cases with both `bullet` and `brekaLine` - prevent double lineBreak
@@ -23797,7 +23799,7 @@ class PptxGenJS {
23797
23799
  */ pptxgen_define_property(this, "_layout", void 0);
23798
23800
  /**
23799
23801
  * PptxGenJS Library Version
23800
- */ pptxgen_define_property(this, "_version", (/* inlined export .VERSION */"4.3.9"));
23802
+ */ pptxgen_define_property(this, "_version", (/* inlined export .VERSION */"4.3.10"));
23801
23803
  /**
23802
23804
  * @type {string}
23803
23805
  */ pptxgen_define_property(this, "_author", void 0);