pptxgenjs-plus 4.3.5 → 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.5 @ 2026-10-31T02:02:20.255Z */
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),
@@ -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.5"));
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.5 @ 2026-10-31T02:02:20.255Z */
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),
@@ -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.5"));
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);