pptxgenjs-plus 4.3.4 → 4.3.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.
@@ -1,4 +1,4 @@
1
- /* PptxGenJS 4.3.4 @ 2026-09-24T17:18:00.535Z */
1
+ /* PptxGenJS 4.3.6 @ 2026-11-02T20:11:52.070Z */
2
2
 
3
3
  "use strict";
4
4
  const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
@@ -4886,6 +4886,9 @@ function addImageDefinition(target, opt) {
4886
4886
  // STEP 4: Add this image to this Slide Rels (rId/rels count spans all slides! Count all images to get next rId)
4887
4887
  if (strImgExtn === 'svg') {
4888
4888
  var _opt_fill, _newObject_options, _newObject_options1;
4889
+ if (opt.svgPngData !== undefined && !/^data:image\/png;base64,[A-Za-z0-9+/]+={0,2}$/i.test(opt.svgPngData)) {
4890
+ throw new Error('svgPngData must be a base64 PNG data URI');
4891
+ }
4889
4892
  // SVG files consume *TWO* rId's: (a png version and the svg image)
4890
4893
  // <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="../media/image1.png"/>
4891
4894
  // <Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="../media/image2.svg"/>
@@ -4898,10 +4901,10 @@ function addImageDefinition(target, opt) {
4898
4901
  path: strImagePath || strImageData + 'png',
4899
4902
  type: 'image/png',
4900
4903
  extn: 'png',
4901
- data: strImageData || '',
4904
+ data: opt.svgPngData || strImageData || '',
4902
4905
  rId: imageRelId,
4903
4906
  Target: `../media/${imageTargetStem(target)}.png`,
4904
- isSvgPng: true,
4907
+ isSvgPng: !opt.svgPngData,
4905
4908
  fill: opt.fill,
4906
4909
  svgSize: {
4907
4910
  w: getSmartParseNumber((_newObject_options = newObject.options) === null || _newObject_options === void 0 ? void 0 : _newObject_options.w, 'X', target._presLayout),
@@ -8500,7 +8503,7 @@ function makeChartType(chartType, data, opts, valAxisId, catAxisId, _isMultiType
8500
8503
  strXml += ' <a:p>';
8501
8504
  strXml += ' <a:pPr>';
8502
8505
  strXml += ` <a:defRPr sz="${Math.round((opts.dataLabelFontSize || (/* inlined export .DEF_FONT_SIZE */12)) * 100)}" b="${opts.dataLabelFontBold ? '1' : '0'}" i="${opts.dataLabelFontItalic ? '1' : '0'}" u="none" strike="noStrike">`;
8503
- strXml += ` <a:solidFill><a:srgbClr val="000000"/></a:solidFill><a:latin typeface="${encodeXmlEntities(opts.dataLabelFontFace) || 'Arial'}"/>`;
8506
+ strXml += ` <a:solidFill>${createColorElement(opts.dataLabelColor || (/* inlined export .DEF_FONT_COLOR */"000000"))}</a:solidFill><a:latin typeface="${encodeXmlEntities(opts.dataLabelFontFace) || 'Arial'}"/>`;
8504
8507
  strXml += ' </a:defRPr>';
8505
8508
  strXml += ' </a:pPr>';
8506
8509
  strXml += ' </a:p>';
@@ -8715,7 +8718,7 @@ function makeNumberStyles(formats) {
8715
8718
  {
8716
8719
  let strTableXml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
8717
8720
  if (chartObject.opts._type === core_enums_CHART_TYPE.BUBBLE || chartObject.opts._type === core_enums_CHART_TYPE.BUBBLE3D) {
8718
- strTableXml += `<table xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" id="1" name="Table1" displayName="Table1" ref="A1:${getExcelColName(intBubbleCols)}${intBubbleCols}" totalsRowShown="0">`;
8721
+ strTableXml += `<table xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" id="1" name="Table1" displayName="Table1" ref="A1:${getExcelColName(intBubbleCols)}${firstDataValues.length + 1}" totalsRowShown="0">`;
8719
8722
  strTableXml += `<tableColumns count="${intBubbleCols}">`;
8720
8723
  let idxColLtr = 1;
8721
8724
  data.forEach((obj, idx)=>{
@@ -23920,7 +23923,7 @@ class PptxGenJS {
23920
23923
  */ pptxgen_define_property(this, "_layout", void 0);
23921
23924
  /**
23922
23925
  * PptxGenJS Library Version
23923
- */ pptxgen_define_property(this, "_version", (/* inlined export .VERSION */"4.3.4"));
23926
+ */ pptxgen_define_property(this, "_version", (/* inlined export .VERSION */"4.3.6"));
23924
23927
  /**
23925
23928
  * @type {string}
23926
23929
  */ pptxgen_define_property(this, "_author", void 0);
@@ -1,4 +1,4 @@
1
- /* PptxGenJS 4.3.4 @ 2026-09-24T17:18:00.535Z */
1
+ /* PptxGenJS 4.3.6 @ 2026-11-02T20:11:52.070Z */
2
2
 
3
3
  import { JSZip } from "@node-projects/jszip";
4
4
  import { parseXml } from "@rgrove/parse-xml";
@@ -4842,6 +4842,9 @@ function addImageDefinition(target, opt) {
4842
4842
  // STEP 4: Add this image to this Slide Rels (rId/rels count spans all slides! Count all images to get next rId)
4843
4843
  if (strImgExtn === 'svg') {
4844
4844
  var _opt_fill, _newObject_options, _newObject_options1;
4845
+ if (opt.svgPngData !== undefined && !/^data:image\/png;base64,[A-Za-z0-9+/]+={0,2}$/i.test(opt.svgPngData)) {
4846
+ throw new Error('svgPngData must be a base64 PNG data URI');
4847
+ }
4845
4848
  // SVG files consume *TWO* rId's: (a png version and the svg image)
4846
4849
  // <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="../media/image1.png"/>
4847
4850
  // <Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Target="../media/image2.svg"/>
@@ -4854,10 +4857,10 @@ function addImageDefinition(target, opt) {
4854
4857
  path: strImagePath || strImageData + 'png',
4855
4858
  type: 'image/png',
4856
4859
  extn: 'png',
4857
- data: strImageData || '',
4860
+ data: opt.svgPngData || strImageData || '',
4858
4861
  rId: imageRelId,
4859
4862
  Target: `../media/${imageTargetStem(target)}.png`,
4860
- isSvgPng: true,
4863
+ isSvgPng: !opt.svgPngData,
4861
4864
  fill: opt.fill,
4862
4865
  svgSize: {
4863
4866
  w: getSmartParseNumber((_newObject_options = newObject.options) === null || _newObject_options === void 0 ? void 0 : _newObject_options.w, 'X', target._presLayout),
@@ -8450,7 +8453,7 @@ function makeChartType(chartType, data, opts, valAxisId, catAxisId, _isMultiType
8450
8453
  strXml += ' <a:p>';
8451
8454
  strXml += ' <a:pPr>';
8452
8455
  strXml += ` <a:defRPr sz="${Math.round((opts.dataLabelFontSize || (/* inlined export .DEF_FONT_SIZE */12)) * 100)}" b="${opts.dataLabelFontBold ? '1' : '0'}" i="${opts.dataLabelFontItalic ? '1' : '0'}" u="none" strike="noStrike">`;
8453
- strXml += ` <a:solidFill><a:srgbClr val="000000"/></a:solidFill><a:latin typeface="${encodeXmlEntities(opts.dataLabelFontFace) || 'Arial'}"/>`;
8456
+ strXml += ` <a:solidFill>${createColorElement(opts.dataLabelColor || (/* inlined export .DEF_FONT_COLOR */"000000"))}</a:solidFill><a:latin typeface="${encodeXmlEntities(opts.dataLabelFontFace) || 'Arial'}"/>`;
8454
8457
  strXml += ' </a:defRPr>';
8455
8458
  strXml += ' </a:pPr>';
8456
8459
  strXml += ' </a:p>';
@@ -8664,7 +8667,7 @@ function makeNumberStyles(formats) {
8664
8667
  {
8665
8668
  let strTableXml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
8666
8669
  if (chartObject.opts._type === core_enums_CHART_TYPE.BUBBLE || chartObject.opts._type === core_enums_CHART_TYPE.BUBBLE3D) {
8667
- strTableXml += `<table xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" id="1" name="Table1" displayName="Table1" ref="A1:${getExcelColName(intBubbleCols)}${intBubbleCols}" totalsRowShown="0">`;
8670
+ strTableXml += `<table xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" id="1" name="Table1" displayName="Table1" ref="A1:${getExcelColName(intBubbleCols)}${firstDataValues.length + 1}" totalsRowShown="0">`;
8668
8671
  strTableXml += `<tableColumns count="${intBubbleCols}">`;
8669
8672
  let idxColLtr = 1;
8670
8673
  data.forEach((obj, idx)=>{
@@ -23788,7 +23791,7 @@ class PptxGenJS {
23788
23791
  */ pptxgen_define_property(this, "_layout", void 0);
23789
23792
  /**
23790
23793
  * PptxGenJS Library Version
23791
- */ pptxgen_define_property(this, "_version", (/* inlined export .VERSION */"4.3.4"));
23794
+ */ pptxgen_define_property(this, "_version", (/* inlined export .VERSION */"4.3.6"));
23792
23795
  /**
23793
23796
  * @type {string}
23794
23797
  */ pptxgen_define_property(this, "_author", void 0);