pptx-react-viewer 1.25.1 → 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.
- package/CHANGELOG.md +2 -0
- package/dist/{Model3DScene-AWSM6CYB.js → Model3DScene-PPHEUVGE.js} +3 -3
- package/dist/Model3DScene-PPHEUVGE.js.br +0 -0
- package/dist/Model3DScene-PPHEUVGE.js.gz +0 -0
- package/dist/{Model3DScene-2QZ7CADN.mjs → Model3DScene-VEL3LWME.mjs} +2 -2
- package/dist/Model3DScene-VEL3LWME.mjs.br +0 -0
- package/dist/Model3DScene-VEL3LWME.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-PJ36HRGC.js → SurfaceChart3DScene-TGSDRCUC.js} +3 -3
- package/dist/SurfaceChart3DScene-TGSDRCUC.js.br +0 -0
- package/dist/SurfaceChart3DScene-TGSDRCUC.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-IW4WGZHH.mjs → SurfaceChart3DScene-ZBBY6LVV.mjs} +2 -2
- package/dist/SurfaceChart3DScene-ZBBY6LVV.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-ZBBY6LVV.mjs.gz +0 -0
- package/dist/{chunk-NIWO2WYI.js → chunk-ML36DOIS.js} +34 -34
- package/dist/chunk-ML36DOIS.js.br +0 -0
- package/dist/chunk-ML36DOIS.js.gz +0 -0
- package/dist/{chunk-M7JHZV3P.mjs → chunk-Q2WHYUNV.mjs} +86 -20
- package/dist/chunk-Q2WHYUNV.mjs.br +0 -0
- package/dist/chunk-Q2WHYUNV.mjs.gz +0 -0
- package/dist/{chunk-CYZLRYJV.js → chunk-RPWTP6QP.js} +86 -20
- package/dist/chunk-RPWTP6QP.js.br +0 -0
- package/dist/chunk-RPWTP6QP.js.gz +0 -0
- package/dist/{chunk-PMGLZ7N4.mjs → chunk-UR4R3CH4.mjs} +1 -1
- package/dist/chunk-UR4R3CH4.mjs.br +0 -0
- package/dist/chunk-UR4R3CH4.mjs.gz +0 -0
- package/dist/{chunk-ASN2DZSP.js → chunk-VHKA4C7G.js} +810 -808
- package/dist/chunk-VHKA4C7G.js.br +0 -0
- package/dist/chunk-VHKA4C7G.js.gz +0 -0
- package/dist/{chunk-NT5FIWWU.js → chunk-WAG32RWG.js} +464 -464
- package/dist/chunk-WAG32RWG.js.br +0 -0
- package/dist/chunk-WAG32RWG.js.gz +0 -0
- package/dist/{chunk-QTIJWFJX.mjs → chunk-WTTSE7SZ.mjs} +4 -4
- package/dist/chunk-WTTSE7SZ.mjs.br +0 -0
- package/dist/chunk-WTTSE7SZ.mjs.gz +0 -0
- package/dist/{chunk-RVKPHAK5.mjs → chunk-XUYKQ4DI.mjs} +8 -6
- package/dist/chunk-XUYKQ4DI.mjs.br +0 -0
- package/dist/chunk-XUYKQ4DI.mjs.gz +0 -0
- package/dist/{dist-RHAXXX2R.mjs → dist-JFRKRKOK.mjs} +1 -1
- package/dist/dist-JFRKRKOK.mjs.br +0 -0
- package/dist/dist-JFRKRKOK.mjs.gz +0 -0
- package/dist/{dist-AFRACFHO.js → dist-NR7AZFQW.js} +562 -562
- package/dist/dist-NR7AZFQW.js.br +0 -0
- package/dist/dist-NR7AZFQW.js.gz +0 -0
- package/dist/hooks-unstable.js +78 -78
- package/dist/hooks-unstable.js.br +0 -0
- package/dist/hooks-unstable.js.gz +0 -0
- package/dist/hooks-unstable.mjs +3 -3
- package/dist/hooks-unstable.mjs.br +0 -0
- package/dist/hooks-unstable.mjs.gz +0 -0
- package/dist/index.js +33 -33
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/viewer/index.js +20 -20
- package/dist/viewer/index.js.br +3 -2
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/Model3DScene-2QZ7CADN.mjs.br +0 -0
- package/dist/Model3DScene-2QZ7CADN.mjs.gz +0 -0
- package/dist/Model3DScene-AWSM6CYB.js.br +0 -0
- package/dist/Model3DScene-AWSM6CYB.js.gz +0 -0
- package/dist/SurfaceChart3DScene-IW4WGZHH.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-IW4WGZHH.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-PJ36HRGC.js.br +0 -0
- package/dist/SurfaceChart3DScene-PJ36HRGC.js.gz +0 -0
- package/dist/chunk-ASN2DZSP.js.br +0 -0
- package/dist/chunk-ASN2DZSP.js.gz +0 -0
- package/dist/chunk-CYZLRYJV.js.br +0 -0
- package/dist/chunk-CYZLRYJV.js.gz +0 -0
- package/dist/chunk-M7JHZV3P.mjs.br +0 -0
- package/dist/chunk-M7JHZV3P.mjs.gz +0 -0
- package/dist/chunk-NIWO2WYI.js.br +0 -0
- package/dist/chunk-NIWO2WYI.js.gz +0 -0
- package/dist/chunk-NT5FIWWU.js.br +0 -0
- package/dist/chunk-NT5FIWWU.js.gz +0 -0
- package/dist/chunk-PMGLZ7N4.mjs.br +0 -0
- package/dist/chunk-PMGLZ7N4.mjs.gz +0 -0
- package/dist/chunk-QTIJWFJX.mjs.br +0 -0
- package/dist/chunk-QTIJWFJX.mjs.gz +0 -0
- package/dist/chunk-RVKPHAK5.mjs.br +0 -0
- package/dist/chunk-RVKPHAK5.mjs.gz +0 -0
- package/dist/dist-AFRACFHO.js.br +0 -0
- package/dist/dist-AFRACFHO.js.gz +0 -0
- package/dist/dist-RHAXXX2R.mjs.br +0 -0
- package/dist/dist-RHAXXX2R.mjs.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.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@1.25.1) - 2026-07-18
|
|
8
|
+
|
|
7
9
|
## [1.25.0](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@1.25.0) - 2026-07-18
|
|
8
10
|
|
|
9
11
|
## [1.24.1](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-react-viewer@1.24.1) - 2026-07-18
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
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
|
|
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-
|
|
2
|
-
import './chunk-
|
|
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';
|
|
Binary file
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
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
|
|
29
|
+
void chunkML36DOIS_js.mountSurfaceChart3D(container, {
|
|
30
30
|
cols,
|
|
31
31
|
rows,
|
|
32
32
|
heightMap,
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { mountSurfaceChart3D } from './chunk-
|
|
2
|
-
import './chunk-
|
|
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';
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
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:
|
|
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:
|
|
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
|
|
332
|
+
return chunkRPWTP6QP_js.getShapeClipPath(shapeType);
|
|
333
333
|
}
|
|
334
334
|
if (adjustments && Object.keys(adjustments).length > 0) {
|
|
335
|
-
const adjusted =
|
|
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 =
|
|
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 =
|
|
344
|
+
const cloud = chunkRPWTP6QP_js.getCloudPathForRendering(shapeType, width, height);
|
|
345
345
|
if (cloud !== void 0) {
|
|
346
346
|
return cloud;
|
|
347
347
|
}
|
|
348
|
-
return
|
|
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
|
|
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 =
|
|
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 =
|
|
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 (!
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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(
|
|
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 ?
|
|
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 =
|
|
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 ??
|
|
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 =
|
|
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 = chunkCYZLRYJV_js.MI
|
|
|
12169
12169
|
}
|
|
12170
12170
|
return { x, y, width, height };
|
|
12171
12171
|
}
|
|
12172
|
-
function computeMarqueeHitIds(marquee, elements, minSize =
|
|
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) =>
|
|
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 (
|
|
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 (
|
|
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 &&
|
|
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 &&
|
|
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
|
|
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 (!
|
|
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 (!
|
|
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 (
|
|
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 (
|
|
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
|
|
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 (
|
|
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
|
-
|
|
7108
|
-
|
|
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) {
|
|
@@ -70289,6 +70327,40 @@ var PptxHandlerRuntime70 = class extends PptxHandlerRuntime69 {
|
|
|
70289
70327
|
}
|
|
70290
70328
|
return void 0;
|
|
70291
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
|
+
}
|
|
70292
70364
|
async getMasterBackgroundImage(layoutPath) {
|
|
70293
70365
|
const layoutRels = this.slideRelsMap.get(layoutPath);
|
|
70294
70366
|
if (!layoutRels) {
|
|
@@ -70299,9 +70371,8 @@ var PptxHandlerRuntime70 = class extends PptxHandlerRuntime69 {
|
|
|
70299
70371
|
const layoutDir = layoutPath.substring(0, layoutPath.lastIndexOf("/") + 1);
|
|
70300
70372
|
const masterPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${stripParentDirSegments(target)}`;
|
|
70301
70373
|
try {
|
|
70302
|
-
const
|
|
70303
|
-
if (
|
|
70304
|
-
const masterXmlObj = this.parser.parse(masterXmlStr);
|
|
70374
|
+
const masterXmlObj = await this.resolveCachedMasterXml(masterPath);
|
|
70375
|
+
if (masterXmlObj) {
|
|
70305
70376
|
const masterRelsPath = `${masterPath.replace("slideMasters/", "slideMasters/_rels/")}.rels`;
|
|
70306
70377
|
await this.loadSlideRelationships(masterPath, masterRelsPath);
|
|
70307
70378
|
return this.extractBackgroundImage(masterXmlObj, masterPath, "p:sldMaster");
|
|
@@ -70323,9 +70394,8 @@ var PptxHandlerRuntime70 = class extends PptxHandlerRuntime69 {
|
|
|
70323
70394
|
const slideDir = slidePath.substring(0, slidePath.lastIndexOf("/") + 1);
|
|
70324
70395
|
const layoutPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(slideDir, target) : `ppt/${stripParentDirSegments(target)}`;
|
|
70325
70396
|
try {
|
|
70326
|
-
const
|
|
70327
|
-
if (
|
|
70328
|
-
const layoutXmlObj = this.parser.parse(layoutXmlStr);
|
|
70397
|
+
const layoutXmlObj = await this.resolveCachedLayoutXml(layoutPath);
|
|
70398
|
+
if (layoutXmlObj) {
|
|
70329
70399
|
const layoutRelsPath = `${layoutPath.replace("slideLayouts/", "slideLayouts/_rels/")}.rels`;
|
|
70330
70400
|
await this.loadSlideRelationships(layoutPath, layoutRelsPath);
|
|
70331
70401
|
const bg = this.extractBackgroundImage(layoutXmlObj, layoutPath, "p:sldLayout");
|
|
@@ -70351,9 +70421,8 @@ var PptxHandlerRuntime70 = class extends PptxHandlerRuntime69 {
|
|
|
70351
70421
|
const slideDir = slidePath.substring(0, slidePath.lastIndexOf("/") + 1);
|
|
70352
70422
|
const layoutPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(slideDir, target) : `ppt/${stripParentDirSegments(target)}`;
|
|
70353
70423
|
try {
|
|
70354
|
-
const
|
|
70355
|
-
if (
|
|
70356
|
-
const layoutXmlObj = this.parser.parse(layoutXmlStr);
|
|
70424
|
+
const layoutXmlObj = await this.resolveCachedLayoutXml(layoutPath);
|
|
70425
|
+
if (layoutXmlObj) {
|
|
70357
70426
|
const layoutBg = this.extractBackgroundColor(layoutXmlObj, "p:sldLayout");
|
|
70358
70427
|
if (layoutBg) {
|
|
70359
70428
|
return layoutBg;
|
|
@@ -70380,9 +70449,8 @@ var PptxHandlerRuntime70 = class extends PptxHandlerRuntime69 {
|
|
|
70380
70449
|
const layoutDir = layoutPath.substring(0, layoutPath.lastIndexOf("/") + 1);
|
|
70381
70450
|
const masterPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${stripParentDirSegments(target)}`;
|
|
70382
70451
|
try {
|
|
70383
|
-
const
|
|
70384
|
-
if (
|
|
70385
|
-
const masterXmlObj = this.parser.parse(masterXmlStr);
|
|
70452
|
+
const masterXmlObj = await this.resolveCachedMasterXml(masterPath);
|
|
70453
|
+
if (masterXmlObj) {
|
|
70386
70454
|
return this.extractBackgroundColor(masterXmlObj, "p:sldMaster");
|
|
70387
70455
|
}
|
|
70388
70456
|
} catch {
|
|
@@ -70407,9 +70475,8 @@ var PptxHandlerRuntime71 = class extends PptxHandlerRuntime70 {
|
|
|
70407
70475
|
const slideDir = slidePath.substring(0, slidePath.lastIndexOf("/") + 1);
|
|
70408
70476
|
const layoutPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(slideDir, target) : `ppt/${stripParentDirSegments(target)}`;
|
|
70409
70477
|
try {
|
|
70410
|
-
const
|
|
70411
|
-
if (
|
|
70412
|
-
const layoutXmlObj = this.parser.parse(layoutXmlStr);
|
|
70478
|
+
const layoutXmlObj = await this.resolveCachedLayoutXml(layoutPath);
|
|
70479
|
+
if (layoutXmlObj) {
|
|
70413
70480
|
const layoutGrad = this.extractBackgroundGradient(layoutXmlObj, "p:sldLayout");
|
|
70414
70481
|
if (layoutGrad) {
|
|
70415
70482
|
return layoutGrad;
|
|
@@ -70436,9 +70503,8 @@ var PptxHandlerRuntime71 = class extends PptxHandlerRuntime70 {
|
|
|
70436
70503
|
const layoutDir = layoutPath.substring(0, layoutPath.lastIndexOf("/") + 1);
|
|
70437
70504
|
const masterPath = target.startsWith("/") ? target.substring(1) : target.startsWith("..") ? this.resolvePath(layoutDir, target) : `ppt/${stripParentDirSegments(target)}`;
|
|
70438
70505
|
try {
|
|
70439
|
-
const
|
|
70440
|
-
if (
|
|
70441
|
-
const masterXmlObj = this.parser.parse(masterXmlStr);
|
|
70506
|
+
const masterXmlObj = await this.resolveCachedMasterXml(masterPath);
|
|
70507
|
+
if (masterXmlObj) {
|
|
70442
70508
|
return this.extractBackgroundGradient(masterXmlObj, "p:sldMaster");
|
|
70443
70509
|
}
|
|
70444
70510
|
} catch {
|
|
Binary file
|
|
Binary file
|