pptx-react-viewer 1.25.2 → 1.25.3

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.
Files changed (89) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/{Model3DScene-PPHEUVGE.js → Model3DScene-F2GUSTZI.js} +3 -3
  3. package/dist/{Model3DScene-PPHEUVGE.js.br → Model3DScene-F2GUSTZI.js.br} +0 -0
  4. package/dist/Model3DScene-F2GUSTZI.js.gz +0 -0
  5. package/dist/{Model3DScene-VEL3LWME.mjs → Model3DScene-IQLE5JLL.mjs} +2 -2
  6. package/dist/Model3DScene-IQLE5JLL.mjs.br +0 -0
  7. package/dist/Model3DScene-IQLE5JLL.mjs.gz +0 -0
  8. package/dist/{SurfaceChart3DScene-TGSDRCUC.js → SurfaceChart3DScene-4OMD7LWR.js} +3 -3
  9. package/dist/SurfaceChart3DScene-4OMD7LWR.js.br +0 -0
  10. package/dist/SurfaceChart3DScene-4OMD7LWR.js.gz +0 -0
  11. package/dist/{SurfaceChart3DScene-ZBBY6LVV.mjs → SurfaceChart3DScene-JG26PJ7O.mjs} +2 -2
  12. package/dist/SurfaceChart3DScene-JG26PJ7O.mjs.br +0 -0
  13. package/dist/SurfaceChart3DScene-JG26PJ7O.mjs.gz +0 -0
  14. package/dist/{chunk-RPWTP6QP.js → chunk-2V6BD4JQ.js} +44 -19
  15. package/dist/chunk-2V6BD4JQ.js.br +0 -0
  16. package/dist/chunk-2V6BD4JQ.js.gz +0 -0
  17. package/dist/{chunk-VHKA4C7G.js → chunk-5G3SPYQE.js} +809 -809
  18. package/dist/chunk-5G3SPYQE.js.br +0 -0
  19. package/dist/chunk-5G3SPYQE.js.gz +0 -0
  20. package/dist/{chunk-Q2WHYUNV.mjs → chunk-DAI4KM5W.mjs} +44 -19
  21. package/dist/chunk-DAI4KM5W.mjs.br +0 -0
  22. package/dist/chunk-DAI4KM5W.mjs.gz +0 -0
  23. package/dist/{chunk-UR4R3CH4.mjs → chunk-DVM75RMN.mjs} +63 -6
  24. package/dist/chunk-DVM75RMN.mjs.br +0 -0
  25. package/dist/chunk-DVM75RMN.mjs.gz +0 -0
  26. package/dist/{chunk-XUYKQ4DI.mjs → chunk-GNXWU7UG.mjs} +7 -7
  27. package/dist/chunk-GNXWU7UG.mjs.br +0 -0
  28. package/dist/chunk-GNXWU7UG.mjs.gz +0 -0
  29. package/dist/{chunk-WTTSE7SZ.mjs → chunk-NYBERTS7.mjs} +12 -4
  30. package/dist/chunk-NYBERTS7.mjs.br +0 -0
  31. package/dist/chunk-NYBERTS7.mjs.gz +0 -0
  32. package/dist/{chunk-ML36DOIS.js → chunk-UXVFNGJH.js} +96 -39
  33. package/dist/chunk-UXVFNGJH.js.br +0 -0
  34. package/dist/chunk-UXVFNGJH.js.gz +0 -0
  35. package/dist/{chunk-WAG32RWG.js → chunk-ZUJHFLOR.js} +472 -464
  36. package/dist/chunk-ZUJHFLOR.js.br +0 -0
  37. package/dist/chunk-ZUJHFLOR.js.gz +0 -0
  38. package/dist/{dist-JFRKRKOK.mjs → dist-E3IHM3OU.mjs} +1 -1
  39. package/dist/dist-E3IHM3OU.mjs.br +0 -0
  40. package/dist/dist-E3IHM3OU.mjs.gz +0 -0
  41. package/dist/{dist-NR7AZFQW.js → dist-ZA77P2O5.js} +562 -562
  42. package/dist/dist-ZA77P2O5.js.br +0 -0
  43. package/dist/dist-ZA77P2O5.js.gz +0 -0
  44. package/dist/hooks-unstable.js +78 -78
  45. package/dist/hooks-unstable.js.br +0 -0
  46. package/dist/hooks-unstable.js.gz +0 -0
  47. package/dist/hooks-unstable.mjs +3 -3
  48. package/dist/hooks-unstable.mjs.br +0 -0
  49. package/dist/hooks-unstable.mjs.gz +0 -0
  50. package/dist/index.js +33 -33
  51. package/dist/index.js.br +0 -0
  52. package/dist/index.js.gz +0 -0
  53. package/dist/index.mjs +4 -4
  54. package/dist/index.mjs.br +0 -0
  55. package/dist/index.mjs.gz +0 -0
  56. package/dist/viewer/index.js +20 -20
  57. package/dist/viewer/index.js.br +0 -0
  58. package/dist/viewer/index.js.gz +0 -0
  59. package/dist/viewer/index.mjs +4 -4
  60. package/dist/viewer/index.mjs.br +0 -0
  61. package/dist/viewer/index.mjs.gz +0 -0
  62. package/package.json +1 -1
  63. package/dist/Model3DScene-PPHEUVGE.js.gz +0 -0
  64. package/dist/Model3DScene-VEL3LWME.mjs.br +0 -0
  65. package/dist/Model3DScene-VEL3LWME.mjs.gz +0 -0
  66. package/dist/SurfaceChart3DScene-TGSDRCUC.js.br +0 -0
  67. package/dist/SurfaceChart3DScene-TGSDRCUC.js.gz +0 -0
  68. package/dist/SurfaceChart3DScene-ZBBY6LVV.mjs.br +0 -0
  69. package/dist/SurfaceChart3DScene-ZBBY6LVV.mjs.gz +0 -0
  70. package/dist/chunk-ML36DOIS.js.br +0 -0
  71. package/dist/chunk-ML36DOIS.js.gz +0 -0
  72. package/dist/chunk-Q2WHYUNV.mjs.br +0 -0
  73. package/dist/chunk-Q2WHYUNV.mjs.gz +0 -0
  74. package/dist/chunk-RPWTP6QP.js.br +0 -0
  75. package/dist/chunk-RPWTP6QP.js.gz +0 -0
  76. package/dist/chunk-UR4R3CH4.mjs.br +0 -0
  77. package/dist/chunk-UR4R3CH4.mjs.gz +0 -0
  78. package/dist/chunk-VHKA4C7G.js.br +0 -0
  79. package/dist/chunk-VHKA4C7G.js.gz +0 -0
  80. package/dist/chunk-WAG32RWG.js.br +0 -0
  81. package/dist/chunk-WAG32RWG.js.gz +0 -0
  82. package/dist/chunk-WTTSE7SZ.mjs.br +0 -0
  83. package/dist/chunk-WTTSE7SZ.mjs.gz +0 -0
  84. package/dist/chunk-XUYKQ4DI.mjs.br +0 -0
  85. package/dist/chunk-XUYKQ4DI.mjs.gz +0 -0
  86. package/dist/dist-JFRKRKOK.mjs.br +0 -0
  87. package/dist/dist-JFRKRKOK.mjs.gz +0 -0
  88. package/dist/dist-NR7AZFQW.js.br +0 -0
  89. package/dist/dist-NR7AZFQW.js.gz +0 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,8 @@ All notable changes to this project are documented here.
4
4
  This file is generated from [Conventional Commits](https://www.conventionalcommits.org)
5
5
  by [git-cliff](https://git-cliff.org); do not edit it by hand.
6
6
 
7
+ ## [1.25.2](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@1.25.2) - 2026-07-19
8
+
7
9
  ## [1.25.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@1.25.1) - 2026-07-18
8
10
 
9
11
  ## [1.25.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@1.25.0) - 2026-07-18
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkML36DOIS_js = require('./chunk-ML36DOIS.js');
4
- require('./chunk-RPWTP6QP.js');
3
+ var chunkUXVFNGJH_js = require('./chunk-UXVFNGJH.js');
4
+ require('./chunk-2V6BD4JQ.js');
5
5
  require('./chunk-QGM4M3NI.js');
6
6
  var react = require('react');
7
7
  var jsxRuntime = require('react/jsx-runtime');
@@ -15,7 +15,7 @@ function Model3DScene({ modelUrl, interactive, width, height }) {
15
15
  return;
16
16
  }
17
17
  let disposed = false;
18
- void chunkML36DOIS_js.mountModel3D(container, modelUrl, { width, height, interactive }).then((handle) => {
18
+ void chunkUXVFNGJH_js.mountModel3D(container, modelUrl, { width, height, interactive }).then((handle) => {
19
19
  if (disposed) {
20
20
  handle.dispose();
21
21
  } else {
Binary file
@@ -1,5 +1,5 @@
1
- import { mountModel3D } from './chunk-UR4R3CH4.mjs';
2
- import './chunk-Q2WHYUNV.mjs';
1
+ import { mountModel3D } from './chunk-DVM75RMN.mjs';
2
+ import './chunk-DAI4KM5W.mjs';
3
3
  import './chunk-6DZX6EAA.mjs';
4
4
  import { useRef, useEffect } from 'react';
5
5
  import { jsx } from 'react/jsx-runtime';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkML36DOIS_js = require('./chunk-ML36DOIS.js');
4
- require('./chunk-RPWTP6QP.js');
3
+ var chunkUXVFNGJH_js = require('./chunk-UXVFNGJH.js');
4
+ require('./chunk-2V6BD4JQ.js');
5
5
  require('./chunk-QGM4M3NI.js');
6
6
  var react = require('react');
7
7
  var jsxRuntime = require('react/jsx-runtime');
@@ -26,7 +26,7 @@ function SurfaceChart3DScene({
26
26
  return;
27
27
  }
28
28
  let disposed = false;
29
- void chunkML36DOIS_js.mountSurfaceChart3D(container, {
29
+ void chunkUXVFNGJH_js.mountSurfaceChart3D(container, {
30
30
  cols,
31
31
  rows,
32
32
  heightMap,
@@ -1,5 +1,5 @@
1
- import { mountSurfaceChart3D } from './chunk-UR4R3CH4.mjs';
2
- import './chunk-Q2WHYUNV.mjs';
1
+ import { mountSurfaceChart3D } from './chunk-DVM75RMN.mjs';
2
+ import './chunk-DAI4KM5W.mjs';
3
3
  import './chunk-6DZX6EAA.mjs';
4
4
  import { useRef, useEffect } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -29531,15 +29531,15 @@ function getConnectorPathGeometry(element) {
29531
29531
  }
29532
29532
  function getElementTransform(element) {
29533
29533
  const transforms = [];
29534
+ if (element.rotation) {
29535
+ transforms.push(`rotate(${element.rotation}deg)`);
29536
+ }
29534
29537
  if (element.flipHorizontal) {
29535
29538
  transforms.push("scaleX(-1)");
29536
29539
  }
29537
29540
  if (element.flipVertical) {
29538
29541
  transforms.push("scaleY(-1)");
29539
29542
  }
29540
- if (element.rotation) {
29541
- transforms.push(`rotate(${element.rotation}deg)`);
29542
- }
29543
29543
  return transforms.length > 0 ? transforms.join(" ") : void 0;
29544
29544
  }
29545
29545
  function getTextCompensationTransform(element) {
@@ -67641,7 +67641,7 @@ var PptxHandlerRuntime59 = class extends PptxHandlerRuntime58 {
67641
67641
  pointsToPixels(points3) {
67642
67642
  return points3 * (96 / 72);
67643
67643
  }
67644
- parseParagraphSpacingPx(spacingNode) {
67644
+ parseParagraphSpacingPx(spacingNode, basisFontSizePx) {
67645
67645
  if (!spacingNode) {
67646
67646
  return void 0;
67647
67647
  }
@@ -67652,6 +67652,13 @@ var PptxHandlerRuntime59 = class extends PptxHandlerRuntime58 {
67652
67652
  if (Number.isFinite(spacingPointsRaw)) {
67653
67653
  return this.pointsToPixels(spacingPointsRaw / 100);
67654
67654
  }
67655
+ const spacingPercentRaw = Number.parseInt(
67656
+ String(spacingNode["a:spcPct"]?.["@_val"] || ""),
67657
+ 10
67658
+ );
67659
+ if (Number.isFinite(spacingPercentRaw) && typeof basisFontSizePx === "number" && basisFontSizePx > 0) {
67660
+ return spacingPercentRaw / 1e5 * basisFontSizePx;
67661
+ }
67655
67662
  return void 0;
67656
67663
  }
67657
67664
  parseLineSpacingMultiplier(lineSpacingNode) {
@@ -67729,7 +67736,7 @@ var PptxHandlerRuntime59 = class extends PptxHandlerRuntime58 {
67729
67736
  }
67730
67737
  };
67731
67738
  var PptxHandlerRuntime60 = class extends PptxHandlerRuntime59 {
67732
- resolveParagraphBulletInfo(paragraph, paragraphIndex, txBody, inheritedTxBody, isBodyPlaceholder = false, slidePath) {
67739
+ resolveParagraphBulletInfo(paragraph, paragraphIndex, txBody, inheritedTxBody, isBodyPlaceholder = false, slidePath, effectiveLevelStyles) {
67733
67740
  if (!paragraph) {
67734
67741
  return null;
67735
67742
  }
@@ -67765,11 +67772,8 @@ var PptxHandlerRuntime60 = class extends PptxHandlerRuntime59 {
67765
67772
  }
67766
67773
  }
67767
67774
  if (!resolvedBulletProps) {
67768
- if (isBodyPlaceholder) {
67769
- const presentationLevelStyle = this.presentationDefaultTextStyle?.levelStyles?.[normalizedLevel - 1] ?? this.presentationDefaultTextStyle?.levelStyles?.[-1];
67770
- return this.createBulletInfoFromLevelStyle(presentationLevelStyle, paragraphIndex);
67771
- }
67772
- return null;
67775
+ const fallbackLevelStyle = effectiveLevelStyles?.[normalizedLevel - 1] ?? effectiveLevelStyles?.[-1] ?? (isBodyPlaceholder ? this.presentationDefaultTextStyle?.levelStyles?.[normalizedLevel - 1] ?? this.presentationDefaultTextStyle?.levelStyles?.[-1] : void 0);
67776
+ return this.createBulletInfoFromLevelStyle(fallbackLevelStyle, paragraphIndex);
67773
67777
  }
67774
67778
  const buFont = resolvedBulletProps["a:buFont"];
67775
67779
  const fontFamily = buFont?.["@_typeface"] ? String(buFont["@_typeface"]) : void 0;
@@ -68255,16 +68259,21 @@ var PptxHandlerRuntime62 = class _PptxHandlerRuntime26 extends PptxHandlerRuntim
68255
68259
  textStyle.align = paraAlign;
68256
68260
  }
68257
68261
  }
68262
+ const spacingBasisPx = typeof textStyle.fontSize === "number" ? textStyle.fontSize : void 0;
68258
68263
  if (textStyle.paragraphSpacingBefore === void 0) {
68259
68264
  const spacingBefore = this.parseParagraphSpacingPx(
68260
- pPr?.["a:spcBef"]
68265
+ pPr?.["a:spcBef"],
68266
+ spacingBasisPx
68261
68267
  );
68262
68268
  if (spacingBefore !== void 0) {
68263
68269
  textStyle.paragraphSpacingBefore = spacingBefore;
68264
68270
  }
68265
68271
  }
68266
68272
  if (textStyle.paragraphSpacingAfter === void 0) {
68267
- const spacingAfter = this.parseParagraphSpacingPx(pPr?.["a:spcAft"]);
68273
+ const spacingAfter = this.parseParagraphSpacingPx(
68274
+ pPr?.["a:spcAft"],
68275
+ spacingBasisPx
68276
+ );
68268
68277
  if (spacingAfter !== void 0) {
68269
68278
  textStyle.paragraphSpacingAfter = spacingAfter;
68270
68279
  }
@@ -68436,7 +68445,8 @@ var PptxHandlerRuntime63 = class extends PptxHandlerRuntime62 {
68436
68445
  ctx.txBody,
68437
68446
  ctx.inheritedTxBody,
68438
68447
  isBodyPlaceholder,
68439
- ctx.slidePath
68448
+ ctx.slidePath,
68449
+ ctx.effectiveLevelStyles
68440
68450
  );
68441
68451
  if (paragraphBulletInfo && !paragraphBulletInfo.none) {
68442
68452
  let bulletText;
@@ -70027,6 +70037,7 @@ var PptxHandlerRuntime69 = class extends PptxHandlerRuntime68 {
70027
70037
  if (!normalized) {
70028
70038
  return void 0;
70029
70039
  }
70040
+ const canon = (key) => key.toLowerCase() === "folhlink" ? "folHlink" : key;
70030
70041
  if (normalized === "phclr") {
70031
70042
  const injected = this.themeColorMap["phclr"];
70032
70043
  if (injected) {
@@ -70036,17 +70047,18 @@ var PptxHandlerRuntime69 = class extends PptxHandlerRuntime68 {
70036
70047
  }
70037
70048
  const overrideMap = this.currentSlideClrMapOverride ?? this.currentMasterClrMap;
70038
70049
  if (overrideMap) {
70039
- const remapped = overrideMap[normalized];
70050
+ const remapped = overrideMap[canon(normalized)];
70040
70051
  if (remapped) {
70041
- return this.themeColorMap[remapped] || this.getDefaultSchemeColorMap()[remapped];
70052
+ const target = canon(remapped);
70053
+ return this.themeColorMap[target] || this.getDefaultSchemeColorMap()[target];
70042
70054
  }
70043
70055
  } else {
70044
70056
  const defaultAliasTarget = DEFAULT_CLR_MAP_ALIAS[normalized];
70045
70057
  if (defaultAliasTarget) {
70046
- return this.themeColorMap[defaultAliasTarget] || this.themeColorMap[normalized] || this.getDefaultSchemeColorMap()[normalized];
70058
+ return this.themeColorMap[defaultAliasTarget] || this.themeColorMap[canon(normalized)] || this.getDefaultSchemeColorMap()[canon(normalized)];
70047
70059
  }
70048
70060
  }
70049
- return this.themeColorMap[normalized] || this.getDefaultSchemeColorMap()[normalized];
70061
+ return this.themeColorMap[canon(normalized)] || this.getDefaultSchemeColorMap()[canon(normalized)];
70050
70062
  }
70051
70063
  normalizeStrokeDashType(value) {
70052
70064
  const normalized = String(value ?? "").trim();
@@ -70823,11 +70835,24 @@ var PptxHandlerRuntime72 = class _PptxHandlerRuntime31 extends PptxHandlerRuntim
70823
70835
  }
70824
70836
  }
70825
70837
  }
70826
- const spcBef = this.parseParagraphSpacingPx(levelProps["a:spcBef"]);
70838
+ const defRPrSzRaw = Number.parseInt(
70839
+ String(
70840
+ levelProps["a:defRPr"]?.["@_sz"] || ""
70841
+ ),
70842
+ 10
70843
+ );
70844
+ const basisFontSizePx = Number.isFinite(defRPrSzRaw) ? this.pointsToPixels(defRPrSzRaw / 100) : void 0;
70845
+ const spcBef = this.parseParagraphSpacingPx(
70846
+ levelProps["a:spcBef"],
70847
+ basisFontSizePx
70848
+ );
70827
70849
  if (spcBef !== void 0) {
70828
70850
  style.spaceBefore = spcBef;
70829
70851
  }
70830
- const spcAft = this.parseParagraphSpacingPx(levelProps["a:spcAft"]);
70852
+ const spcAft = this.parseParagraphSpacingPx(
70853
+ levelProps["a:spcAft"],
70854
+ basisFontSizePx
70855
+ );
70831
70856
  if (spcAft !== void 0) {
70832
70857
  style.spaceAfter = spcAft;
70833
70858
  }
Binary file
Binary file