pptx-react-viewer 1.25.0 → 1.25.2

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 (90) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{Model3DScene-G434BPF4.js → Model3DScene-PPHEUVGE.js} +3 -3
  3. package/dist/Model3DScene-PPHEUVGE.js.br +0 -0
  4. package/dist/Model3DScene-PPHEUVGE.js.gz +0 -0
  5. package/dist/{Model3DScene-GGNUAOGD.mjs → Model3DScene-VEL3LWME.mjs} +2 -2
  6. package/dist/Model3DScene-VEL3LWME.mjs.br +0 -0
  7. package/dist/Model3DScene-VEL3LWME.mjs.gz +0 -0
  8. package/dist/{SurfaceChart3DScene-UFFJ3P6T.js → SurfaceChart3DScene-TGSDRCUC.js} +3 -3
  9. package/dist/SurfaceChart3DScene-TGSDRCUC.js.br +0 -0
  10. package/dist/SurfaceChart3DScene-TGSDRCUC.js.gz +0 -0
  11. package/dist/{SurfaceChart3DScene-JU737NN5.mjs → SurfaceChart3DScene-ZBBY6LVV.mjs} +2 -2
  12. package/dist/SurfaceChart3DScene-ZBBY6LVV.mjs.br +0 -0
  13. package/dist/SurfaceChart3DScene-ZBBY6LVV.mjs.gz +0 -0
  14. package/dist/{chunk-VKOVFVDJ.js → chunk-ML36DOIS.js} +34 -34
  15. package/dist/chunk-ML36DOIS.js.br +0 -0
  16. package/dist/chunk-ML36DOIS.js.gz +0 -0
  17. package/dist/{chunk-LDZQNYWL.mjs → chunk-Q2WHYUNV.mjs} +152 -28
  18. package/dist/chunk-Q2WHYUNV.mjs.br +0 -0
  19. package/dist/chunk-Q2WHYUNV.mjs.gz +0 -0
  20. package/dist/{chunk-KV3EOLP3.js → chunk-RPWTP6QP.js} +152 -28
  21. package/dist/chunk-RPWTP6QP.js.br +0 -0
  22. package/dist/chunk-RPWTP6QP.js.gz +0 -0
  23. package/dist/{chunk-QOBKJKLT.mjs → chunk-UR4R3CH4.mjs} +1 -1
  24. package/dist/chunk-UR4R3CH4.mjs.br +0 -0
  25. package/dist/chunk-UR4R3CH4.mjs.gz +0 -0
  26. package/dist/{chunk-EM77GISR.js → chunk-VHKA4C7G.js} +811 -809
  27. package/dist/chunk-VHKA4C7G.js.br +0 -0
  28. package/dist/chunk-VHKA4C7G.js.gz +0 -0
  29. package/dist/{chunk-IHHK6WEQ.js → chunk-WAG32RWG.js} +464 -464
  30. package/dist/chunk-WAG32RWG.js.br +0 -0
  31. package/dist/chunk-WAG32RWG.js.gz +0 -0
  32. package/dist/{chunk-VDALVGDT.mjs → chunk-WTTSE7SZ.mjs} +4 -4
  33. package/dist/chunk-WTTSE7SZ.mjs.br +0 -0
  34. package/dist/chunk-WTTSE7SZ.mjs.gz +0 -0
  35. package/dist/{chunk-NKSIDFYP.mjs → chunk-XUYKQ4DI.mjs} +9 -7
  36. package/dist/chunk-XUYKQ4DI.mjs.br +0 -0
  37. package/dist/chunk-XUYKQ4DI.mjs.gz +0 -0
  38. package/dist/{dist-A3OATMOE.mjs → dist-JFRKRKOK.mjs} +1 -1
  39. package/dist/dist-JFRKRKOK.mjs.br +0 -0
  40. package/dist/dist-JFRKRKOK.mjs.gz +0 -0
  41. package/dist/{dist-XF3QJAEF.js → dist-NR7AZFQW.js} +562 -562
  42. package/dist/dist-NR7AZFQW.js.br +0 -0
  43. package/dist/dist-NR7AZFQW.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-G434BPF4.js.br +0 -0
  64. package/dist/Model3DScene-G434BPF4.js.gz +0 -0
  65. package/dist/Model3DScene-GGNUAOGD.mjs.br +0 -0
  66. package/dist/Model3DScene-GGNUAOGD.mjs.gz +0 -0
  67. package/dist/SurfaceChart3DScene-JU737NN5.mjs.br +0 -0
  68. package/dist/SurfaceChart3DScene-JU737NN5.mjs.gz +0 -0
  69. package/dist/SurfaceChart3DScene-UFFJ3P6T.js.br +0 -0
  70. package/dist/SurfaceChart3DScene-UFFJ3P6T.js.gz +0 -0
  71. package/dist/chunk-EM77GISR.js.br +0 -0
  72. package/dist/chunk-EM77GISR.js.gz +0 -0
  73. package/dist/chunk-IHHK6WEQ.js.br +0 -0
  74. package/dist/chunk-IHHK6WEQ.js.gz +0 -0
  75. package/dist/chunk-KV3EOLP3.js.br +0 -0
  76. package/dist/chunk-KV3EOLP3.js.gz +0 -0
  77. package/dist/chunk-LDZQNYWL.mjs.br +0 -0
  78. package/dist/chunk-LDZQNYWL.mjs.gz +0 -0
  79. package/dist/chunk-NKSIDFYP.mjs.br +0 -0
  80. package/dist/chunk-NKSIDFYP.mjs.gz +0 -0
  81. package/dist/chunk-QOBKJKLT.mjs.br +0 -0
  82. package/dist/chunk-QOBKJKLT.mjs.gz +0 -0
  83. package/dist/chunk-VDALVGDT.mjs.br +0 -0
  84. package/dist/chunk-VDALVGDT.mjs.gz +0 -0
  85. package/dist/chunk-VKOVFVDJ.js.br +0 -0
  86. package/dist/chunk-VKOVFVDJ.js.gz +0 -0
  87. package/dist/dist-A3OATMOE.mjs.br +0 -0
  88. package/dist/dist-A3OATMOE.mjs.gz +0 -0
  89. package/dist/dist-XF3QJAEF.js.br +0 -0
  90. package/dist/dist-XF3QJAEF.js.gz +0 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ 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.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@1.25.1) - 2026-07-18
8
+
9
+ ## [1.25.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@1.25.0) - 2026-07-18
10
+
7
11
  ## [1.24.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@1.24.1) - 2026-07-18
8
12
 
9
13
  ### Documentation
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkVKOVFVDJ_js = require('./chunk-VKOVFVDJ.js');
4
- require('./chunk-KV3EOLP3.js');
3
+ var chunkML36DOIS_js = require('./chunk-ML36DOIS.js');
4
+ require('./chunk-RPWTP6QP.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 chunkVKOVFVDJ_js.mountModel3D(container, modelUrl, { width, height, interactive }).then((handle) => {
18
+ void chunkML36DOIS_js.mountModel3D(container, modelUrl, { width, height, interactive }).then((handle) => {
19
19
  if (disposed) {
20
20
  handle.dispose();
21
21
  } else {
Binary file
Binary file
@@ -1,5 +1,5 @@
1
- import { mountModel3D } from './chunk-QOBKJKLT.mjs';
2
- import './chunk-LDZQNYWL.mjs';
1
+ import { mountModel3D } from './chunk-UR4R3CH4.mjs';
2
+ import './chunk-Q2WHYUNV.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 chunkVKOVFVDJ_js = require('./chunk-VKOVFVDJ.js');
4
- require('./chunk-KV3EOLP3.js');
3
+ var chunkML36DOIS_js = require('./chunk-ML36DOIS.js');
4
+ require('./chunk-RPWTP6QP.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 chunkVKOVFVDJ_js.mountSurfaceChart3D(container, {
29
+ void chunkML36DOIS_js.mountSurfaceChart3D(container, {
30
30
  cols,
31
31
  rows,
32
32
  heightMap,
@@ -1,5 +1,5 @@
1
- import { mountSurfaceChart3D } from './chunk-QOBKJKLT.mjs';
2
- import './chunk-LDZQNYWL.mjs';
1
+ import { mountSurfaceChart3D } from './chunk-UR4R3CH4.mjs';
2
+ import './chunk-Q2WHYUNV.mjs';
3
3
  import './chunk-6DZX6EAA.mjs';
4
4
  import { useRef, useEffect } from 'react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkKV3EOLP3_js = require('./chunk-KV3EOLP3.js');
3
+ var chunkRPWTP6QP_js = require('./chunk-RPWTP6QP.js');
4
4
  var DOMPurify = require('dompurify');
5
5
 
6
6
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -307,7 +307,7 @@ function buildInitialGuides(presentationGuides, firstSlideGuides) {
307
307
  guides.push({
308
308
  id: g.id,
309
309
  axis: g.orientation === "horz" ? "h" : "v",
310
- position: chunkKV3EOLP3_js.guideEmuToPx(g.positionEmu)
310
+ position: chunkRPWTP6QP_js.guideEmuToPx(g.positionEmu)
311
311
  });
312
312
  }
313
313
  }
@@ -316,7 +316,7 @@ function buildInitialGuides(presentationGuides, firstSlideGuides) {
316
316
  guides.push({
317
317
  id: g.id,
318
318
  axis: g.orientation === "horz" ? "h" : "v",
319
- position: chunkKV3EOLP3_js.guideEmuToPx(g.positionEmu)
319
+ position: chunkRPWTP6QP_js.guideEmuToPx(g.positionEmu)
320
320
  });
321
321
  }
322
322
  }
@@ -329,23 +329,23 @@ function getResolvedShapeClipPathFor(shapeType, width, height, adjustments) {
329
329
  return void 0;
330
330
  }
331
331
  if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0) {
332
- return chunkKV3EOLP3_js.getShapeClipPath(shapeType);
332
+ return chunkRPWTP6QP_js.getShapeClipPath(shapeType);
333
333
  }
334
334
  if (adjustments && Object.keys(adjustments).length > 0) {
335
- const adjusted = chunkKV3EOLP3_js.getAdjustmentAwareShapeClipPath(shapeType, width, height, adjustments);
335
+ const adjusted = chunkRPWTP6QP_js.getAdjustmentAwareShapeClipPath(shapeType, width, height, adjustments);
336
336
  if (adjusted !== void 0) {
337
337
  return adjusted;
338
338
  }
339
339
  }
340
- const fromPreset = chunkKV3EOLP3_js.getShapeClipPathFromPreset(shapeType, width, height, adjustments);
340
+ const fromPreset = chunkRPWTP6QP_js.getShapeClipPathFromPreset(shapeType, width, height, adjustments);
341
341
  if (fromPreset !== void 0) {
342
342
  return fromPreset;
343
343
  }
344
- const cloud = chunkKV3EOLP3_js.getCloudPathForRendering(shapeType, width, height);
344
+ const cloud = chunkRPWTP6QP_js.getCloudPathForRendering(shapeType, width, height);
345
345
  if (cloud !== void 0) {
346
346
  return cloud;
347
347
  }
348
- return chunkKV3EOLP3_js.getShapeClipPath(shapeType);
348
+ return chunkRPWTP6QP_js.getShapeClipPath(shapeType);
349
349
  }
350
350
  function getResolvedShapeClipPath(element, width, height) {
351
351
  const shapeType = element.shapeType;
@@ -1060,7 +1060,7 @@ var DEFAULT_SCHEME_COLOR_MAP = {
1060
1060
  phclr: "#4472C4"
1061
1061
  };
1062
1062
  function applyDrawingColorTransforms2(baseColor, colorNode) {
1063
- return chunkKV3EOLP3_js.applyDrawingColorTransforms(baseColor, colorNode);
1063
+ return chunkRPWTP6QP_js.applyDrawingColorTransforms(baseColor, colorNode);
1064
1064
  }
1065
1065
  function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
1066
1066
  if (!colorNode) {
@@ -1112,7 +1112,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
1112
1112
  const h = hueRaw / 6e4;
1113
1113
  const s = clampUnitInterval(satRaw / 1e5);
1114
1114
  const l = clampUnitInterval(lumRaw / 1e5);
1115
- const rgb = chunkKV3EOLP3_js.hslToRgb(h, s, l);
1115
+ const rgb = chunkRPWTP6QP_js.hslToRgb(h, s, l);
1116
1116
  const toHex = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
1117
1117
  const base = `#${toHex(rgb.r)}${toHex(rgb.g)}${toHex(rgb.b)}`;
1118
1118
  return applyDrawingColorTransforms2(base, hslNode);
@@ -1122,7 +1122,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
1122
1122
  const preset = String(
1123
1123
  colorNode["a:prstClr"]?.["@_val"] || ""
1124
1124
  ).toLowerCase();
1125
- const mapped = chunkKV3EOLP3_js.PRESET_COLOR_MAP[preset];
1125
+ const mapped = chunkRPWTP6QP_js.PRESET_COLOR_MAP[preset];
1126
1126
  if (!mapped) {
1127
1127
  return void 0;
1128
1128
  }
@@ -1477,7 +1477,7 @@ function hexToRgbUnit2(hex) {
1477
1477
  };
1478
1478
  }
1479
1479
  function getEffects(element) {
1480
- if (!chunkKV3EOLP3_js.isImageLikeElement(element)) {
1480
+ if (!chunkRPWTP6QP_js.isImageLikeElement(element)) {
1481
1481
  return void 0;
1482
1482
  }
1483
1483
  return element.imageEffects;
@@ -1666,7 +1666,7 @@ function buildDuotoneFilterMarkup(color1, color2) {
1666
1666
  const c2 = hexToRgbUnit2(color2);
1667
1667
  return `<feColorMatrix type="matrix" values="${GRAYSCALE_LUMINANCE_MATRIX}"/><feComponentTransfer><feFuncR type="linear" slope="${c2.r - c1.r}" intercept="${c1.r}"/><feFuncG type="linear" slope="${c2.g - c1.g}" intercept="${c1.g}"/><feFuncB type="linear" slope="${c2.b - c1.b}" intercept="${c1.b}"/></feComponentTransfer>`;
1668
1668
  }
1669
- function getDuotoneImageFilter(element, elementId = chunkKV3EOLP3_js.isImageLikeElement(element) ? element.id : "") {
1669
+ function getDuotoneImageFilter(element, elementId = chunkRPWTP6QP_js.isImageLikeElement(element) ? element.id : "") {
1670
1670
  const effects = getEffects(element);
1671
1671
  if (!effects?.duotone) {
1672
1672
  return void 0;
@@ -1768,7 +1768,7 @@ function buildImageAlphaFilterMarkup(effects) {
1768
1768
  }
1769
1769
  return parts.length > 0 ? parts.join("") : void 0;
1770
1770
  }
1771
- function getImageAlphaFilter(element, elementId = chunkKV3EOLP3_js.isImageLikeElement(element) ? element.id : "") {
1771
+ function getImageAlphaFilter(element, elementId = chunkRPWTP6QP_js.isImageLikeElement(element) ? element.id : "") {
1772
1772
  const effects = getEffects(element);
1773
1773
  if (!effects || !hasAdvancedImageAlphaEffects(element)) {
1774
1774
  return void 0;
@@ -1858,7 +1858,7 @@ function buildArtisticFilterMarkup(effectName, radius) {
1858
1858
  return void 0;
1859
1859
  }
1860
1860
  }
1861
- function getArtisticImageFilter(element, elementId = chunkKV3EOLP3_js.isImageLikeElement(element) ? element.id : "") {
1861
+ function getArtisticImageFilter(element, elementId = chunkRPWTP6QP_js.isImageLikeElement(element) ? element.id : "") {
1862
1862
  const effects = getEffects(element);
1863
1863
  if (!effects?.artisticEffect || !needsSvgArtisticFilter(effects.artisticEffect)) {
1864
1864
  return void 0;
@@ -2817,7 +2817,7 @@ function convertChildren(node) {
2817
2817
  if (key.startsWith("@_")) {
2818
2818
  continue;
2819
2819
  }
2820
- const tag = chunkKV3EOLP3_js.stripXmlOrderSuffix(key);
2820
+ const tag = chunkRPWTP6QP_js.stripXmlOrderSuffix(key);
2821
2821
  if (tag === "m:oMathPara") {
2822
2822
  continue;
2823
2823
  }
@@ -2889,7 +2889,7 @@ function findOmathRoots(node) {
2889
2889
  }
2890
2890
  }
2891
2891
  const contentTags = /* @__PURE__ */ new Set(["m:r", "m:f", "m:rad", "m:sSup", "m:sSub", "m:box"]);
2892
- if (Object.keys(node).some((key) => contentTags.has(chunkKV3EOLP3_js.stripXmlOrderSuffix(key)))) {
2892
+ if (Object.keys(node).some((key) => contentTags.has(chunkRPWTP6QP_js.stripXmlOrderSuffix(key)))) {
2893
2893
  return [node];
2894
2894
  }
2895
2895
  return [];
@@ -3099,7 +3099,7 @@ function mergeSiblings(nodes) {
3099
3099
  }
3100
3100
  const ordered = {};
3101
3101
  for (const [position, [key, value]] of entries.entries()) {
3102
- ordered[(counts.get(key) ?? 0) > 1 ? chunkKV3EOLP3_js.orderedXmlKey(key, position) : key] = value;
3102
+ ordered[(counts.get(key) ?? 0) > 1 ? chunkRPWTP6QP_js.orderedXmlKey(key, position) : key] = value;
3103
3103
  }
3104
3104
  return ordered;
3105
3105
  }
@@ -3503,7 +3503,7 @@ function ommlChildrenToLatex(node) {
3503
3503
  if (key.startsWith("@_")) {
3504
3504
  continue;
3505
3505
  }
3506
- const tag = chunkKV3EOLP3_js.stripXmlOrderSuffix(key);
3506
+ const tag = chunkRPWTP6QP_js.stripXmlOrderSuffix(key);
3507
3507
  const items = ensureArr(node[key]);
3508
3508
  for (const item of items) {
3509
3509
  const result = ommlElementToLatex(tag, item);
@@ -12112,7 +12112,7 @@ function rotateDelta(dx, dy, rotationDeg) {
12112
12112
  }
12113
12113
  function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
12114
12114
  const scale = zoom || 1;
12115
- const minSize = opts.minSize ?? chunkKV3EOLP3_js.MIN_ELEMENT_SIZE;
12115
+ const minSize = opts.minSize ?? chunkRPWTP6QP_js.MIN_ELEMENT_SIZE;
12116
12116
  const rotation = rotationOf(box);
12117
12117
  const local = rotateDelta(dxScreen / scale, dyScreen / scale, rotation);
12118
12118
  const dx = local.x;
@@ -12139,7 +12139,7 @@ function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
12139
12139
  }
12140
12140
  return { x: newX, y: newY, width: newW, height: newH, rotation };
12141
12141
  }
12142
- function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkKV3EOLP3_js.MIN_ELEMENT_SIZE) {
12142
+ function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkRPWTP6QP_js.MIN_ELEMENT_SIZE) {
12143
12143
  if (handle === null || gridSpacingPx <= 0) {
12144
12144
  return box;
12145
12145
  }
@@ -12169,7 +12169,7 @@ function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkKV3EOLP3_js.MI
12169
12169
  }
12170
12170
  return { x, y, width, height };
12171
12171
  }
12172
- function computeMarqueeHitIds(marquee, elements, minSize = chunkKV3EOLP3_js.MIN_ELEMENT_SIZE) {
12172
+ function computeMarqueeHitIds(marquee, elements, minSize = chunkRPWTP6QP_js.MIN_ELEMENT_SIZE) {
12173
12173
  const minX = Math.min(marquee.startX, marquee.currentX);
12174
12174
  const minY = Math.min(marquee.startY, marquee.currentY);
12175
12175
  const maxX = Math.max(marquee.startX, marquee.currentX);
@@ -13724,7 +13724,7 @@ var THEME_COLOR_LABELS = {
13724
13724
  };
13725
13725
  function buildThemeColorGrid(colorScheme) {
13726
13726
  return THEME_COLOR_TINT_ROWS.map(
13727
- (row) => chunkKV3EOLP3_js.THEME_COLOR_SCHEME_KEYS.map((key) => ({
13727
+ (row) => chunkRPWTP6QP_js.THEME_COLOR_SCHEME_KEYS.map((key) => ({
13728
13728
  hex: row.transform(colorScheme[key]),
13729
13729
  schemeKey: key,
13730
13730
  rowLabel: row.label,
@@ -14200,7 +14200,7 @@ function svgLineCap(lineCap) {
14200
14200
  }
14201
14201
  function copyFormatFromElement(element) {
14202
14202
  const result = {};
14203
- if (chunkKV3EOLP3_js.hasShapeProperties(element) && element.shapeStyle) {
14203
+ if (chunkRPWTP6QP_js.hasShapeProperties(element) && element.shapeStyle) {
14204
14204
  const s = element.shapeStyle;
14205
14205
  result.shapeStyle = {
14206
14206
  fillColor: s.fillColor,
@@ -14229,7 +14229,7 @@ function copyFormatFromElement(element) {
14229
14229
  softEdgeRadius: s.softEdgeRadius
14230
14230
  };
14231
14231
  }
14232
- if (chunkKV3EOLP3_js.hasTextProperties(element) && element.textStyle) {
14232
+ if (chunkRPWTP6QP_js.hasTextProperties(element) && element.textStyle) {
14233
14233
  const t = element.textStyle;
14234
14234
  result.textStyle = {
14235
14235
  fontFamily: t.fontFamily,
@@ -14260,7 +14260,7 @@ function definedEntries(obj) {
14260
14260
  }
14261
14261
  function applyFormatToElement(element, format) {
14262
14262
  let updated = { ...element };
14263
- if (format.shapeStyle && chunkKV3EOLP3_js.hasShapeProperties(updated)) {
14263
+ if (format.shapeStyle && chunkRPWTP6QP_js.hasShapeProperties(updated)) {
14264
14264
  updated = {
14265
14265
  ...updated,
14266
14266
  shapeStyle: {
@@ -14269,7 +14269,7 @@ function applyFormatToElement(element, format) {
14269
14269
  }
14270
14270
  };
14271
14271
  }
14272
- if (format.textStyle && chunkKV3EOLP3_js.hasTextProperties(updated)) {
14272
+ if (format.textStyle && chunkRPWTP6QP_js.hasTextProperties(updated)) {
14273
14273
  updated = {
14274
14274
  ...updated,
14275
14275
  textStyle: {
@@ -14284,7 +14284,7 @@ function hasCopyableFormat(element) {
14284
14284
  if (!element) {
14285
14285
  return false;
14286
14286
  }
14287
- return chunkKV3EOLP3_js.hasShapeProperties(element) || chunkKV3EOLP3_js.hasTextProperties(element);
14287
+ return chunkRPWTP6QP_js.hasShapeProperties(element) || chunkRPWTP6QP_js.hasTextProperties(element);
14288
14288
  }
14289
14289
  function copySegmentMetadata(from, to) {
14290
14290
  if (from.equationXml !== void 0) {
@@ -14421,7 +14421,7 @@ function getRoundRectRadiusPx(element) {
14421
14421
  return Math.min(Math.max(element.width, 1), Math.max(element.height, 1)) * 0.5 * normalizedAdjustment;
14422
14422
  }
14423
14423
  function getShapeAdjustmentHandleDescriptor(element) {
14424
- if (!chunkKV3EOLP3_js.hasShapeProperties(element)) {
14424
+ if (!chunkRPWTP6QP_js.hasShapeProperties(element)) {
14425
14425
  return null;
14426
14426
  }
14427
14427
  const normalizedShapeType = String(element.shapeType || "").toLowerCase();
@@ -15413,7 +15413,7 @@ function createSyncGate(onOpen, graceMs = INITIAL_SYNC_GRACE_MS) {
15413
15413
  var POSITION_THRESHOLD = 2;
15414
15414
  var SIZE_THRESHOLD = 2;
15415
15415
  function getElementText(element) {
15416
- if (!chunkKV3EOLP3_js.hasTextProperties(element)) {
15416
+ if (!chunkRPWTP6QP_js.hasTextProperties(element)) {
15417
15417
  return "";
15418
15418
  }
15419
15419
  if (element.textSegments && element.textSegments.length > 0) {
@@ -18987,7 +18987,7 @@ function getAriaRole(element) {
18987
18987
  case "model3d":
18988
18988
  return "img";
18989
18989
  case "shape": {
18990
- if (chunkKV3EOLP3_js.hasTextProperties(element) && element.text) {
18990
+ if (chunkRPWTP6QP_js.hasTextProperties(element) && element.text) {
18991
18991
  return "group";
18992
18992
  }
18993
18993
  return "img";
@@ -19000,7 +19000,7 @@ function getAriaLabel(element) {
19000
19000
  if ((element.type === "image" || element.type === "picture") && "altText" in element && typeof element.altText === "string" && element.altText.trim()) {
19001
19001
  return element.altText.trim();
19002
19002
  }
19003
- if (chunkKV3EOLP3_js.hasTextProperties(element) && element.text) {
19003
+ if (chunkRPWTP6QP_js.hasTextProperties(element) && element.text) {
19004
19004
  const text = element.text.trim();
19005
19005
  if (text) {
19006
19006
  return text.length > 120 ? `${text.slice(0, 117)}...` : text;
@@ -19407,7 +19407,7 @@ var DEFAULT_CHART_POSITION = { x: 120, y: 120, width: 480, height: 320 };
19407
19407
  var DEFAULT_CATEGORIES = ["Category 1", "Category 2", "Category 3"];
19408
19408
  var DEFAULT_SERIES_VALUES = [4, 3, 5];
19409
19409
  function createDefaultChartElement(chartType = DEFAULT_INSERT_CHART_TYPE, position) {
19410
- return chunkKV3EOLP3_js.createChartElement(
19410
+ return chunkRPWTP6QP_js.createChartElement(
19411
19411
  chartType,
19412
19412
  {
19413
19413
  categories: [...DEFAULT_CATEGORIES],
@@ -20427,7 +20427,7 @@ function computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight,
20427
20427
  };
20428
20428
  }
20429
20429
  function collectFontsFromElement(element, fonts) {
20430
- if (chunkKV3EOLP3_js.hasTextProperties(element)) {
20430
+ if (chunkRPWTP6QP_js.hasTextProperties(element)) {
20431
20431
  if (element.textStyle?.fontFamily) {
20432
20432
  fonts.add(element.textStyle.fontFamily);
20433
20433
  }
Binary file
Binary file
@@ -7098,14 +7098,52 @@ function extractSourceOrders(xml) {
7098
7098
  }
7099
7099
  return orders;
7100
7100
  }
7101
+ function ensureArrayLocal(value) {
7102
+ return Array.isArray(value) ? value : value === void 0 ? [] : [value];
7103
+ }
7104
+ function countsSignature(counts) {
7105
+ return [...counts.entries()].sort((a, b) => a[0] < b[0] ? -1 : 1).map(([name, count]) => `${name}:${count}`).join(",");
7106
+ }
7107
+ function pathSignature(path) {
7108
+ const counts = /* @__PURE__ */ new Map();
7109
+ for (const key of Object.keys(path)) {
7110
+ const name = localName(key);
7111
+ if (!PATH_COMMANDS.has(name)) {
7112
+ continue;
7113
+ }
7114
+ counts.set(name, (counts.get(name) ?? 0) + ensureArrayLocal(path[key]).length);
7115
+ }
7116
+ return countsSignature(counts);
7117
+ }
7118
+ function orderSignature(order) {
7119
+ const counts = /* @__PURE__ */ new Map();
7120
+ for (const name of order) {
7121
+ counts.set(name, (counts.get(name) ?? 0) + 1);
7122
+ }
7123
+ return countsSignature(counts);
7124
+ }
7101
7125
  function annotateCustomGeometryCommandOrder(xml, parsed) {
7102
7126
  const orders = extractSourceOrders(xml);
7103
7127
  if (orders.length === 0) {
7104
7128
  return;
7105
7129
  }
7106
7130
  const paths = collectParsedPaths(parsed);
7107
- for (let index = 0; index < Math.min(paths.length, orders.length); index++) {
7108
- commandOrder.set(paths[index], orders[index]);
7131
+ const ordersBySignature = /* @__PURE__ */ new Map();
7132
+ for (const order of orders) {
7133
+ const signature = orderSignature(order);
7134
+ const bucket = ordersBySignature.get(signature);
7135
+ if (bucket) {
7136
+ bucket.push(order);
7137
+ } else {
7138
+ ordersBySignature.set(signature, [order]);
7139
+ }
7140
+ }
7141
+ for (const path of paths) {
7142
+ const bucket = ordersBySignature.get(pathSignature(path));
7143
+ const order = bucket?.shift();
7144
+ if (order) {
7145
+ commandOrder.set(path, order);
7146
+ }
7109
7147
  }
7110
7148
  }
7111
7149
  function orderedPathCommandEntries(path, ensureArray16) {
@@ -66875,6 +66913,8 @@ var PptxHandlerRuntime56 = class extends PptxHandlerRuntime55 {
66875
66913
  const existing = merged[key];
66876
66914
  if (value && typeof value === "object" && !Array.isArray(value) && existing && typeof existing === "object" && !Array.isArray(existing)) {
66877
66915
  merged[key] = this.mergeXmlObjects(existing, value, depth + 1);
66916
+ } else if (value === "" && existing !== void 0 && existing !== "" && typeof existing === "object") {
66917
+ merged[key] = existing;
66878
66918
  } else {
66879
66919
  merged[key] = value;
66880
66920
  }
@@ -69635,32 +69675,56 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
69635
69675
  }
69636
69676
  const grpSpPr = group["p:grpSpPr"];
69637
69677
  const xfrm = grpSpPr?.["a:xfrm"];
69678
+ const EMU_PX = _PptxHandlerRuntime30.EMU_PER_PX;
69638
69679
  let parentX = 0, parentY = 0, parentW = 0, parentH = 0;
69639
69680
  let chX = 0, chY = 0, chW = 0, chH = 0;
69640
69681
  if (xfrm) {
69641
69682
  const off = xfrm["a:off"];
69642
69683
  if (off) {
69643
- parentX = Math.round(parseEmuInt2(off["@_x"]) / _PptxHandlerRuntime30.EMU_PER_PX);
69644
- parentY = Math.round(parseEmuInt2(off["@_y"]) / _PptxHandlerRuntime30.EMU_PER_PX);
69684
+ parentX = parseEmuInt2(off["@_x"]) / EMU_PX;
69685
+ parentY = parseEmuInt2(off["@_y"]) / EMU_PX;
69645
69686
  }
69646
69687
  const ext = xfrm["a:ext"];
69647
69688
  if (ext) {
69648
- parentW = Math.round(parseEmuInt2(ext["@_cx"]) / _PptxHandlerRuntime30.EMU_PER_PX);
69649
- parentH = Math.round(parseEmuInt2(ext["@_cy"]) / _PptxHandlerRuntime30.EMU_PER_PX);
69689
+ parentW = parseEmuInt2(ext["@_cx"]) / EMU_PX;
69690
+ parentH = parseEmuInt2(ext["@_cy"]) / EMU_PX;
69650
69691
  }
69651
69692
  const chOff = xfrm["a:chOff"];
69652
69693
  if (chOff) {
69653
- chX = Math.round(parseEmuInt2(chOff["@_x"]) / _PptxHandlerRuntime30.EMU_PER_PX);
69654
- chY = Math.round(parseEmuInt2(chOff["@_y"]) / _PptxHandlerRuntime30.EMU_PER_PX);
69694
+ chX = parseEmuInt2(chOff["@_x"]) / EMU_PX;
69695
+ chY = parseEmuInt2(chOff["@_y"]) / EMU_PX;
69655
69696
  }
69656
69697
  const chExt = xfrm["a:chExt"];
69657
69698
  if (chExt) {
69658
- chW = Math.round(parseEmuInt2(chExt["@_cx"]) / _PptxHandlerRuntime30.EMU_PER_PX);
69659
- chH = Math.round(parseEmuInt2(chExt["@_cy"]) / _PptxHandlerRuntime30.EMU_PER_PX);
69699
+ chW = parseEmuInt2(chExt["@_cx"]) / EMU_PX;
69700
+ chH = parseEmuInt2(chExt["@_cy"]) / EMU_PX;
69660
69701
  }
69661
69702
  }
69662
69703
  const scaleX = chW > 0 ? parentW / chW : 1;
69663
69704
  const scaleY = chH > 0 ? parentH / chH : 1;
69705
+ const rawChildXfrm = (childNode) => {
69706
+ if (!childNode) {
69707
+ return void 0;
69708
+ }
69709
+ const childXfrm = childNode["p:spPr"]?.["a:xfrm"] ?? childNode["p:xfrm"];
69710
+ return childXfrm;
69711
+ };
69712
+ const applyRawChildGeometry = (el, childNode) => {
69713
+ const childXfrm = rawChildXfrm(childNode);
69714
+ if (!childXfrm) {
69715
+ return;
69716
+ }
69717
+ const off = childXfrm["a:off"];
69718
+ const ext = childXfrm["a:ext"];
69719
+ if (off) {
69720
+ el.x = parseEmuInt2(off["@_x"]) / EMU_PX;
69721
+ el.y = parseEmuInt2(off["@_y"]) / EMU_PX;
69722
+ }
69723
+ if (ext) {
69724
+ el.width = parseEmuInt2(ext["@_cx"]) / EMU_PX;
69725
+ el.height = parseEmuInt2(ext["@_cy"]) / EMU_PX;
69726
+ }
69727
+ };
69664
69728
  const transformElement = (el) => {
69665
69729
  const relativeX = el.x - chX;
69666
69730
  const relativeY = el.y - chY;
@@ -69718,6 +69782,8 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
69718
69782
  `${baseId}-`
69719
69783
  );
69720
69784
  if (element) {
69785
+ const childNode = this.ensureArray(group[entry.tag])[entry.indexInType];
69786
+ applyRawChildGeometry(element, childNode);
69721
69787
  transformElement(element);
69722
69788
  elements2.push(element);
69723
69789
  }
@@ -70261,6 +70327,40 @@ var PptxHandlerRuntime70 = class extends PptxHandlerRuntime69 {
70261
70327
  }
70262
70328
  return void 0;
70263
70329
  }
70330
+ /**
70331
+ * Reuse the cached parse of a layout XML part, parsing (and caching) on a
70332
+ * miss. Background resolution runs per slide but the layout/master parts are
70333
+ * large (a themed master can be ~200 KB); re-parsing them for every slide
70334
+ * dominated load time, so share the same parsed object `getLayoutElements`
70335
+ * already populated.
70336
+ */
70337
+ async resolveCachedLayoutXml(layoutPath) {
70338
+ const cached = this.layoutXmlMap.get(layoutPath);
70339
+ if (cached) {
70340
+ return cached;
70341
+ }
70342
+ const xml = await this.zip.file(layoutPath)?.async("string");
70343
+ if (!xml) {
70344
+ return void 0;
70345
+ }
70346
+ const parsed = this.parser.parse(xml);
70347
+ this.layoutXmlMap.set(layoutPath, parsed);
70348
+ return parsed;
70349
+ }
70350
+ /** Reuse the cached parse of a master XML part, parsing (and caching) on a miss. */
70351
+ async resolveCachedMasterXml(masterPath) {
70352
+ const cached = this.masterXmlMap.get(masterPath);
70353
+ if (cached) {
70354
+ return cached;
70355
+ }
70356
+ const xml = await this.zip.file(masterPath)?.async("string");
70357
+ if (!xml) {
70358
+ return void 0;
70359
+ }
70360
+ const parsed = this.parser.parse(xml);
70361
+ this.masterXmlMap.set(masterPath, parsed);
70362
+ return parsed;
70363
+ }
70264
70364
  async getMasterBackgroundImage(layoutPath) {
70265
70365
  const layoutRels = this.slideRelsMap.get(layoutPath);
70266
70366
  if (!layoutRels) {
@@ -70271,9 +70371,8 @@ var PptxHandlerRuntime70 = class extends PptxHandlerRuntime69 {
70271
70371
  const layoutDir = layoutPath.substring(0, layoutPath.lastIndexOf("/") + 1);
70272
70372
  const masterPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${stripParentDirSegments(target)}`;
70273
70373
  try {
70274
- const masterXmlStr = await this.zip.file(masterPath)?.async("string");
70275
- if (masterXmlStr) {
70276
- const masterXmlObj = this.parser.parse(masterXmlStr);
70374
+ const masterXmlObj = await this.resolveCachedMasterXml(masterPath);
70375
+ if (masterXmlObj) {
70277
70376
  const masterRelsPath = `${masterPath.replace("slideMasters/", "slideMasters/_rels/")}.rels`;
70278
70377
  await this.loadSlideRelationships(masterPath, masterRelsPath);
70279
70378
  return this.extractBackgroundImage(masterXmlObj, masterPath, "p:sldMaster");
@@ -70295,9 +70394,8 @@ var PptxHandlerRuntime70 = class extends PptxHandlerRuntime69 {
70295
70394
  const slideDir = slidePath.substring(0, slidePath.lastIndexOf("/") + 1);
70296
70395
  const layoutPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(slideDir, target) : `ppt/${stripParentDirSegments(target)}`;
70297
70396
  try {
70298
- const layoutXmlStr = await this.zip.file(layoutPath)?.async("string");
70299
- if (layoutXmlStr) {
70300
- const layoutXmlObj = this.parser.parse(layoutXmlStr);
70397
+ const layoutXmlObj = await this.resolveCachedLayoutXml(layoutPath);
70398
+ if (layoutXmlObj) {
70301
70399
  const layoutRelsPath = `${layoutPath.replace("slideLayouts/", "slideLayouts/_rels/")}.rels`;
70302
70400
  await this.loadSlideRelationships(layoutPath, layoutRelsPath);
70303
70401
  const bg = this.extractBackgroundImage(layoutXmlObj, layoutPath, "p:sldLayout");
@@ -70323,9 +70421,8 @@ var PptxHandlerRuntime70 = class extends PptxHandlerRuntime69 {
70323
70421
  const slideDir = slidePath.substring(0, slidePath.lastIndexOf("/") + 1);
70324
70422
  const layoutPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(slideDir, target) : `ppt/${stripParentDirSegments(target)}`;
70325
70423
  try {
70326
- const layoutXmlStr = await this.zip.file(layoutPath)?.async("string");
70327
- if (layoutXmlStr) {
70328
- const layoutXmlObj = this.parser.parse(layoutXmlStr);
70424
+ const layoutXmlObj = await this.resolveCachedLayoutXml(layoutPath);
70425
+ if (layoutXmlObj) {
70329
70426
  const layoutBg = this.extractBackgroundColor(layoutXmlObj, "p:sldLayout");
70330
70427
  if (layoutBg) {
70331
70428
  return layoutBg;
@@ -70352,9 +70449,8 @@ var PptxHandlerRuntime70 = class extends PptxHandlerRuntime69 {
70352
70449
  const layoutDir = layoutPath.substring(0, layoutPath.lastIndexOf("/") + 1);
70353
70450
  const masterPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${stripParentDirSegments(target)}`;
70354
70451
  try {
70355
- const masterXmlStr = await this.zip.file(masterPath)?.async("string");
70356
- if (masterXmlStr) {
70357
- const masterXmlObj = this.parser.parse(masterXmlStr);
70452
+ const masterXmlObj = await this.resolveCachedMasterXml(masterPath);
70453
+ if (masterXmlObj) {
70358
70454
  return this.extractBackgroundColor(masterXmlObj, "p:sldMaster");
70359
70455
  }
70360
70456
  } catch {
@@ -70379,9 +70475,8 @@ var PptxHandlerRuntime71 = class extends PptxHandlerRuntime70 {
70379
70475
  const slideDir = slidePath.substring(0, slidePath.lastIndexOf("/") + 1);
70380
70476
  const layoutPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(slideDir, target) : `ppt/${stripParentDirSegments(target)}`;
70381
70477
  try {
70382
- const layoutXmlStr = await this.zip.file(layoutPath)?.async("string");
70383
- if (layoutXmlStr) {
70384
- const layoutXmlObj = this.parser.parse(layoutXmlStr);
70478
+ const layoutXmlObj = await this.resolveCachedLayoutXml(layoutPath);
70479
+ if (layoutXmlObj) {
70385
70480
  const layoutGrad = this.extractBackgroundGradient(layoutXmlObj, "p:sldLayout");
70386
70481
  if (layoutGrad) {
70387
70482
  return layoutGrad;
@@ -70408,9 +70503,8 @@ var PptxHandlerRuntime71 = class extends PptxHandlerRuntime70 {
70408
70503
  const layoutDir = layoutPath.substring(0, layoutPath.lastIndexOf("/") + 1);
70409
70504
  const masterPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${stripParentDirSegments(target)}`;
70410
70505
  try {
70411
- const masterXmlStr = await this.zip.file(masterPath)?.async("string");
70412
- if (masterXmlStr) {
70413
- const masterXmlObj = this.parser.parse(masterXmlStr);
70506
+ const masterXmlObj = await this.resolveCachedMasterXml(masterPath);
70507
+ if (masterXmlObj) {
70414
70508
  return this.extractBackgroundGradient(masterXmlObj, "p:sldMaster");
70415
70509
  }
70416
70510
  } catch {
@@ -71212,6 +71306,21 @@ var PptxHandlerRuntime74 = class extends PptxHandlerRuntime73 {
71212
71306
  element.id = `master-${element.id}`;
71213
71307
  elements2.push(element);
71214
71308
  }
71309
+ } else if (entry.tag === "p:grpSp") {
71310
+ const groups = this.ensureArray(spTree["p:grpSp"]);
71311
+ const group = groups[entry.indexInType];
71312
+ if (!group) {
71313
+ continue;
71314
+ }
71315
+ const element = await this.parseGroupShapeAsGroup(
71316
+ group,
71317
+ `master-group-${masterToken}-${entry.indexInType}`,
71318
+ masterPath
71319
+ );
71320
+ if (element) {
71321
+ element.id = `master-${element.id}`;
71322
+ elements2.push(element);
71323
+ }
71215
71324
  }
71216
71325
  }
71217
71326
  this.masterCache.set(masterPath, elements2);
@@ -71419,6 +71528,21 @@ var PptxHandlerRuntime76 = class extends PptxHandlerRuntime75 {
71419
71528
  element.id = `layout-${element.id}`;
71420
71529
  elements2.push(element);
71421
71530
  }
71531
+ } else if (entry.tag === "p:grpSp") {
71532
+ const groups = this.ensureArray(spTree["p:grpSp"]);
71533
+ const group = groups[entry.indexInType];
71534
+ if (!group) {
71535
+ continue;
71536
+ }
71537
+ const element = await this.parseGroupShapeAsGroup(
71538
+ group,
71539
+ `layout-group-${layoutToken}-${entry.indexInType}`,
71540
+ layoutPath
71541
+ );
71542
+ if (element) {
71543
+ element.id = `layout-${element.id}`;
71544
+ elements2.push(element);
71545
+ }
71422
71546
  }
71423
71547
  }
71424
71548
  const layoutShowMasterSp = xmlAttr(