pptx-react-viewer 1.25.2 → 1.25.4
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 +4 -0
- package/dist/{Model3DScene-VEL3LWME.mjs → Model3DScene-DZFYJPUH.mjs} +2 -2
- package/dist/Model3DScene-DZFYJPUH.mjs.br +0 -0
- package/dist/Model3DScene-DZFYJPUH.mjs.gz +0 -0
- package/dist/{Model3DScene-PPHEUVGE.js → Model3DScene-SP6WOKSX.js} +3 -3
- package/dist/{Model3DScene-PPHEUVGE.js.br → Model3DScene-SP6WOKSX.js.br} +0 -0
- package/dist/Model3DScene-SP6WOKSX.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-ZBBY6LVV.mjs → SurfaceChart3DScene-54BRNPQ5.mjs} +2 -2
- package/dist/SurfaceChart3DScene-54BRNPQ5.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-54BRNPQ5.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-TGSDRCUC.js → SurfaceChart3DScene-GISPZ4C2.js} +3 -3
- package/dist/SurfaceChart3DScene-GISPZ4C2.js.br +0 -0
- package/dist/SurfaceChart3DScene-GISPZ4C2.js.gz +0 -0
- package/dist/{chunk-VHKA4C7G.js → chunk-5VYVKFMS.js} +850 -809
- package/dist/chunk-5VYVKFMS.js.br +0 -0
- package/dist/chunk-5VYVKFMS.js.gz +0 -0
- package/dist/{chunk-ML36DOIS.js → chunk-6F4WVHS3.js} +159 -64
- package/dist/chunk-6F4WVHS3.js.br +0 -0
- package/dist/chunk-6F4WVHS3.js.gz +0 -0
- package/dist/{chunk-WAG32RWG.js → chunk-7FE27DDH.js} +472 -464
- package/dist/chunk-7FE27DDH.js.br +0 -0
- package/dist/chunk-7FE27DDH.js.gz +0 -0
- package/dist/{chunk-RPWTP6QP.js → chunk-FWF2SP6N.js} +675 -160
- package/dist/chunk-FWF2SP6N.js.br +0 -0
- package/dist/chunk-FWF2SP6N.js.gz +0 -0
- package/dist/{chunk-WTTSE7SZ.mjs → chunk-P72VQ7WE.mjs} +12 -4
- package/dist/chunk-P72VQ7WE.mjs.br +0 -0
- package/dist/chunk-P72VQ7WE.mjs.gz +0 -0
- package/dist/{chunk-XUYKQ4DI.mjs → chunk-TPG2WKHQ.mjs} +49 -8
- package/dist/chunk-TPG2WKHQ.mjs.br +0 -0
- package/dist/chunk-TPG2WKHQ.mjs.gz +0 -0
- package/dist/{chunk-Q2WHYUNV.mjs → chunk-UYNOPUSG.mjs} +675 -160
- package/dist/chunk-UYNOPUSG.mjs.br +0 -0
- package/dist/chunk-UYNOPUSG.mjs.gz +0 -0
- package/dist/{chunk-UR4R3CH4.mjs → chunk-VUC3UPLM.mjs} +126 -31
- package/dist/chunk-VUC3UPLM.mjs.br +0 -0
- package/dist/chunk-VUC3UPLM.mjs.gz +0 -0
- package/dist/{dist-JFRKRKOK.mjs → dist-QNYKM7YS.mjs} +1 -1
- package/dist/dist-QNYKM7YS.mjs.br +0 -0
- package/dist/dist-QNYKM7YS.mjs.gz +0 -0
- package/dist/{dist-NR7AZFQW.js → dist-QU6JIDAF.js} +562 -562
- package/dist/dist-QU6JIDAF.js.br +0 -0
- package/dist/dist-QU6JIDAF.js.gz +0 -0
- package/dist/hooks-unstable.d.ts +107 -1
- 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.d.ts +107 -1
- 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.d.ts +107 -1
- package/dist/viewer/index.js +20 -20
- package/dist/viewer/index.js.br +0 -0
- 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-PPHEUVGE.js.gz +0 -0
- package/dist/Model3DScene-VEL3LWME.mjs.br +0 -0
- package/dist/Model3DScene-VEL3LWME.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-TGSDRCUC.js.br +0 -0
- package/dist/SurfaceChart3DScene-TGSDRCUC.js.gz +0 -0
- package/dist/SurfaceChart3DScene-ZBBY6LVV.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-ZBBY6LVV.mjs.gz +0 -0
- package/dist/chunk-ML36DOIS.js.br +0 -0
- package/dist/chunk-ML36DOIS.js.gz +0 -0
- package/dist/chunk-Q2WHYUNV.mjs.br +0 -0
- package/dist/chunk-Q2WHYUNV.mjs.gz +0 -0
- package/dist/chunk-RPWTP6QP.js.br +0 -0
- package/dist/chunk-RPWTP6QP.js.gz +0 -0
- package/dist/chunk-UR4R3CH4.mjs.br +0 -0
- package/dist/chunk-UR4R3CH4.mjs.gz +0 -0
- package/dist/chunk-VHKA4C7G.js.br +0 -0
- package/dist/chunk-VHKA4C7G.js.gz +0 -0
- package/dist/chunk-WAG32RWG.js.br +0 -0
- package/dist/chunk-WAG32RWG.js.gz +0 -0
- package/dist/chunk-WTTSE7SZ.mjs.br +0 -0
- package/dist/chunk-WTTSE7SZ.mjs.gz +0 -0
- package/dist/chunk-XUYKQ4DI.mjs.br +0 -0
- package/dist/chunk-XUYKQ4DI.mjs.gz +0 -0
- package/dist/dist-JFRKRKOK.mjs.br +0 -0
- package/dist/dist-JFRKRKOK.mjs.gz +0 -0
- package/dist/dist-NR7AZFQW.js.br +0 -0
- package/dist/dist-NR7AZFQW.js.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkFWF2SP6N_js = require('./chunk-FWF2SP6N.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: chunkFWF2SP6N_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: chunkFWF2SP6N_js.guideEmuToPx(g.positionEmu)
|
|
320
320
|
});
|
|
321
321
|
}
|
|
322
322
|
}
|
|
@@ -329,31 +329,88 @@ 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 chunkFWF2SP6N_js.getShapeClipPath(shapeType);
|
|
333
333
|
}
|
|
334
334
|
if (adjustments && Object.keys(adjustments).length > 0) {
|
|
335
|
-
const adjusted =
|
|
335
|
+
const adjusted = chunkFWF2SP6N_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 = chunkFWF2SP6N_js.getShapeClipPathFromPreset(shapeType, width, height, adjustments);
|
|
341
341
|
if (fromPreset !== void 0) {
|
|
342
342
|
return fromPreset;
|
|
343
343
|
}
|
|
344
|
-
const cloud =
|
|
344
|
+
const cloud = chunkFWF2SP6N_js.getCloudPathForRendering(shapeType, width, height);
|
|
345
345
|
if (cloud !== void 0) {
|
|
346
346
|
return cloud;
|
|
347
347
|
}
|
|
348
|
-
return
|
|
348
|
+
return chunkFWF2SP6N_js.getShapeClipPath(shapeType);
|
|
349
|
+
}
|
|
350
|
+
function buildCustomGeometryClipPath(pathData, pathWidth, pathHeight, elemWidth, elemHeight) {
|
|
351
|
+
if (!pathData || !Number.isFinite(pathWidth) || !Number.isFinite(pathHeight) || pathWidth <= 0 || pathHeight <= 0 || !Number.isFinite(elemWidth) || !Number.isFinite(elemHeight) || elemWidth <= 0 || elemHeight <= 0) {
|
|
352
|
+
return void 0;
|
|
353
|
+
}
|
|
354
|
+
const sx = elemWidth / pathWidth;
|
|
355
|
+
const sy = elemHeight / pathHeight;
|
|
356
|
+
const round = (n) => {
|
|
357
|
+
const r = Math.round(n * 100) / 100;
|
|
358
|
+
return Object.is(r, -0) ? "0" : String(r);
|
|
359
|
+
};
|
|
360
|
+
const tokens = pathData.match(/[MLCQZAHVmlcqzahv][^MLCQZAHVmlcqzahv]*/g) ?? [];
|
|
361
|
+
const out = [];
|
|
362
|
+
for (const token of tokens) {
|
|
363
|
+
const cmd = token[0];
|
|
364
|
+
const upper = cmd.toUpperCase();
|
|
365
|
+
if (upper === "Z") {
|
|
366
|
+
out.push("Z");
|
|
367
|
+
continue;
|
|
368
|
+
}
|
|
369
|
+
const nums = (token.slice(1).match(/-?[\d.]+(?:e-?\d+)?/gi) ?? []).map(Number);
|
|
370
|
+
if (upper === "A") {
|
|
371
|
+
const parts = [];
|
|
372
|
+
for (let i = 0; i + 6 < nums.length; i += 7) {
|
|
373
|
+
parts.push(
|
|
374
|
+
round(nums[i] * sx),
|
|
375
|
+
round(nums[i + 1] * sy),
|
|
376
|
+
String(nums[i + 2]),
|
|
377
|
+
String(nums[i + 3]),
|
|
378
|
+
String(nums[i + 4]),
|
|
379
|
+
round(nums[i + 5] * sx),
|
|
380
|
+
round(nums[i + 6] * sy)
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
out.push(`A ${parts.join(" ")}`);
|
|
384
|
+
continue;
|
|
385
|
+
}
|
|
386
|
+
const scaled = nums.map((n, i) => round(n * (i % 2 === 0 ? sx : sy)));
|
|
387
|
+
out.push(`${upper} ${scaled.join(" ")}`);
|
|
388
|
+
}
|
|
389
|
+
if (out.length === 0) {
|
|
390
|
+
return void 0;
|
|
391
|
+
}
|
|
392
|
+
return `path('${out.join(" ")}')`;
|
|
349
393
|
}
|
|
350
394
|
function getResolvedShapeClipPath(element, width, height) {
|
|
395
|
+
const w = typeof width === "number" ? width : element.width;
|
|
396
|
+
const h = typeof height === "number" ? height : element.height;
|
|
397
|
+
const custom = element;
|
|
398
|
+
if (custom.pathData && custom.pathWidth && custom.pathHeight) {
|
|
399
|
+
const customClip = buildCustomGeometryClipPath(
|
|
400
|
+
custom.pathData,
|
|
401
|
+
custom.pathWidth,
|
|
402
|
+
custom.pathHeight,
|
|
403
|
+
w,
|
|
404
|
+
h
|
|
405
|
+
);
|
|
406
|
+
if (customClip) {
|
|
407
|
+
return customClip;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
351
410
|
const shapeType = element.shapeType;
|
|
352
411
|
if (!shapeType) {
|
|
353
412
|
return void 0;
|
|
354
413
|
}
|
|
355
|
-
const w = typeof width === "number" ? width : element.width;
|
|
356
|
-
const h = typeof height === "number" ? height : element.height;
|
|
357
414
|
const adjustments = element.shapeAdjustments;
|
|
358
415
|
return getResolvedShapeClipPathFor(shapeType, w, h, adjustments);
|
|
359
416
|
}
|
|
@@ -990,15 +1047,15 @@ function getSvgStrokeDasharray(dashType, strokeWidth, customDashSegments) {
|
|
|
990
1047
|
}
|
|
991
1048
|
function getElementTransform(element) {
|
|
992
1049
|
const transforms = [];
|
|
1050
|
+
if (element.rotation) {
|
|
1051
|
+
transforms.push(`rotate(${element.rotation}deg)`);
|
|
1052
|
+
}
|
|
993
1053
|
if (element.flipHorizontal) {
|
|
994
1054
|
transforms.push("scaleX(-1)");
|
|
995
1055
|
}
|
|
996
1056
|
if (element.flipVertical) {
|
|
997
1057
|
transforms.push("scaleY(-1)");
|
|
998
1058
|
}
|
|
999
|
-
if (element.rotation) {
|
|
1000
|
-
transforms.push(`rotate(${element.rotation}deg)`);
|
|
1001
|
-
}
|
|
1002
1059
|
if (element.skewX) {
|
|
1003
1060
|
transforms.push(`skewX(${element.skewX}deg)`);
|
|
1004
1061
|
}
|
|
@@ -1060,7 +1117,7 @@ var DEFAULT_SCHEME_COLOR_MAP = {
|
|
|
1060
1117
|
phclr: "#4472C4"
|
|
1061
1118
|
};
|
|
1062
1119
|
function applyDrawingColorTransforms2(baseColor, colorNode) {
|
|
1063
|
-
return
|
|
1120
|
+
return chunkFWF2SP6N_js.applyDrawingColorTransforms(baseColor, colorNode);
|
|
1064
1121
|
}
|
|
1065
1122
|
function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
1066
1123
|
if (!colorNode) {
|
|
@@ -1112,7 +1169,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
1112
1169
|
const h = hueRaw / 6e4;
|
|
1113
1170
|
const s = clampUnitInterval(satRaw / 1e5);
|
|
1114
1171
|
const l = clampUnitInterval(lumRaw / 1e5);
|
|
1115
|
-
const rgb =
|
|
1172
|
+
const rgb = chunkFWF2SP6N_js.hslToRgb(h, s, l);
|
|
1116
1173
|
const toHex = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
|
|
1117
1174
|
const base = `#${toHex(rgb.r)}${toHex(rgb.g)}${toHex(rgb.b)}`;
|
|
1118
1175
|
return applyDrawingColorTransforms2(base, hslNode);
|
|
@@ -1122,7 +1179,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
1122
1179
|
const preset = String(
|
|
1123
1180
|
colorNode["a:prstClr"]?.["@_val"] || ""
|
|
1124
1181
|
).toLowerCase();
|
|
1125
|
-
const mapped =
|
|
1182
|
+
const mapped = chunkFWF2SP6N_js.PRESET_COLOR_MAP[preset];
|
|
1126
1183
|
if (!mapped) {
|
|
1127
1184
|
return void 0;
|
|
1128
1185
|
}
|
|
@@ -1477,7 +1534,7 @@ function hexToRgbUnit2(hex) {
|
|
|
1477
1534
|
};
|
|
1478
1535
|
}
|
|
1479
1536
|
function getEffects(element) {
|
|
1480
|
-
if (!
|
|
1537
|
+
if (!chunkFWF2SP6N_js.isImageLikeElement(element)) {
|
|
1481
1538
|
return void 0;
|
|
1482
1539
|
}
|
|
1483
1540
|
return element.imageEffects;
|
|
@@ -1666,7 +1723,7 @@ function buildDuotoneFilterMarkup(color1, color2) {
|
|
|
1666
1723
|
const c2 = hexToRgbUnit2(color2);
|
|
1667
1724
|
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
1725
|
}
|
|
1669
|
-
function getDuotoneImageFilter(element, elementId =
|
|
1726
|
+
function getDuotoneImageFilter(element, elementId = chunkFWF2SP6N_js.isImageLikeElement(element) ? element.id : "") {
|
|
1670
1727
|
const effects = getEffects(element);
|
|
1671
1728
|
if (!effects?.duotone) {
|
|
1672
1729
|
return void 0;
|
|
@@ -1768,7 +1825,7 @@ function buildImageAlphaFilterMarkup(effects) {
|
|
|
1768
1825
|
}
|
|
1769
1826
|
return parts.length > 0 ? parts.join("") : void 0;
|
|
1770
1827
|
}
|
|
1771
|
-
function getImageAlphaFilter(element, elementId =
|
|
1828
|
+
function getImageAlphaFilter(element, elementId = chunkFWF2SP6N_js.isImageLikeElement(element) ? element.id : "") {
|
|
1772
1829
|
const effects = getEffects(element);
|
|
1773
1830
|
if (!effects || !hasAdvancedImageAlphaEffects(element)) {
|
|
1774
1831
|
return void 0;
|
|
@@ -1858,7 +1915,7 @@ function buildArtisticFilterMarkup(effectName, radius) {
|
|
|
1858
1915
|
return void 0;
|
|
1859
1916
|
}
|
|
1860
1917
|
}
|
|
1861
|
-
function getArtisticImageFilter(element, elementId =
|
|
1918
|
+
function getArtisticImageFilter(element, elementId = chunkFWF2SP6N_js.isImageLikeElement(element) ? element.id : "") {
|
|
1862
1919
|
const effects = getEffects(element);
|
|
1863
1920
|
if (!effects?.artisticEffect || !needsSvgArtisticFilter(effects.artisticEffect)) {
|
|
1864
1921
|
return void 0;
|
|
@@ -2817,7 +2874,7 @@ function convertChildren(node) {
|
|
|
2817
2874
|
if (key.startsWith("@_")) {
|
|
2818
2875
|
continue;
|
|
2819
2876
|
}
|
|
2820
|
-
const tag =
|
|
2877
|
+
const tag = chunkFWF2SP6N_js.stripXmlOrderSuffix(key);
|
|
2821
2878
|
if (tag === "m:oMathPara") {
|
|
2822
2879
|
continue;
|
|
2823
2880
|
}
|
|
@@ -2889,7 +2946,7 @@ function findOmathRoots(node) {
|
|
|
2889
2946
|
}
|
|
2890
2947
|
}
|
|
2891
2948
|
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(
|
|
2949
|
+
if (Object.keys(node).some((key) => contentTags.has(chunkFWF2SP6N_js.stripXmlOrderSuffix(key)))) {
|
|
2893
2950
|
return [node];
|
|
2894
2951
|
}
|
|
2895
2952
|
return [];
|
|
@@ -3099,7 +3156,7 @@ function mergeSiblings(nodes) {
|
|
|
3099
3156
|
}
|
|
3100
3157
|
const ordered = {};
|
|
3101
3158
|
for (const [position, [key, value]] of entries.entries()) {
|
|
3102
|
-
ordered[(counts.get(key) ?? 0) > 1 ?
|
|
3159
|
+
ordered[(counts.get(key) ?? 0) > 1 ? chunkFWF2SP6N_js.orderedXmlKey(key, position) : key] = value;
|
|
3103
3160
|
}
|
|
3104
3161
|
return ordered;
|
|
3105
3162
|
}
|
|
@@ -3503,7 +3560,7 @@ function ommlChildrenToLatex(node) {
|
|
|
3503
3560
|
if (key.startsWith("@_")) {
|
|
3504
3561
|
continue;
|
|
3505
3562
|
}
|
|
3506
|
-
const tag =
|
|
3563
|
+
const tag = chunkFWF2SP6N_js.stripXmlOrderSuffix(key);
|
|
3507
3564
|
const items = ensureArr(node[key]);
|
|
3508
3565
|
for (const item of items) {
|
|
3509
3566
|
const result = ommlElementToLatex(tag, item);
|
|
@@ -4112,6 +4169,16 @@ function splitSeriesByAxis(series, axes) {
|
|
|
4112
4169
|
}
|
|
4113
4170
|
return { primary, secondary };
|
|
4114
4171
|
}
|
|
4172
|
+
function findDataPoint(series, pointIndex) {
|
|
4173
|
+
return series.dataPoints?.find((p) => p.idx === pointIndex);
|
|
4174
|
+
}
|
|
4175
|
+
function resolveDataPointFill(series, pointIndex, fallbackColor) {
|
|
4176
|
+
const point = findDataPoint(series, pointIndex);
|
|
4177
|
+
return point?.spPr?.fillColor ?? series.color ?? fallbackColor;
|
|
4178
|
+
}
|
|
4179
|
+
function resolveVaryColorFill(series, pointIndex, paletteColor3) {
|
|
4180
|
+
return findDataPoint(series, pointIndex)?.spPr?.fillColor ?? paletteColor3;
|
|
4181
|
+
}
|
|
4115
4182
|
function clamp3(value, min, max) {
|
|
4116
4183
|
return Math.min(Math.max(value, min), max);
|
|
4117
4184
|
}
|
|
@@ -4511,7 +4578,7 @@ function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, se
|
|
|
4511
4578
|
y,
|
|
4512
4579
|
w: singleBarWidth,
|
|
4513
4580
|
h,
|
|
4514
|
-
fill: seriesColor2(series[si], si, palette),
|
|
4581
|
+
fill: resolveDataPointFill(series[si], sourceIndex, paletteColor2(si, palette)) ?? seriesColor2(series[si], si, palette),
|
|
4515
4582
|
rx: 1,
|
|
4516
4583
|
part: { role: "dataPoint", seriesIndex: si, pointIndex: sourceIndex }
|
|
4517
4584
|
});
|
|
@@ -4537,20 +4604,14 @@ function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, se
|
|
|
4537
4604
|
}));
|
|
4538
4605
|
const rects = computeStackedBarRects(displaySeries2, catCount, layout, primaryRange, palette);
|
|
4539
4606
|
for (const r of rects) {
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
part: r.seriesIndex !== void 0 && r.pointIndex !== void 0 ? {
|
|
4549
|
-
role: "dataPoint",
|
|
4550
|
-
seriesIndex: r.seriesIndex,
|
|
4551
|
-
pointIndex: sourceIndices2[r.pointIndex] ?? r.pointIndex
|
|
4552
|
-
} : void 0
|
|
4553
|
-
});
|
|
4607
|
+
let fill = r.fill;
|
|
4608
|
+
let part;
|
|
4609
|
+
if (r.seriesIndex !== void 0 && r.pointIndex !== void 0) {
|
|
4610
|
+
const sourcePointIndex = sourceIndices2[r.pointIndex] ?? r.pointIndex;
|
|
4611
|
+
fill = resolveDataPointFill(series[r.seriesIndex], sourcePointIndex, r.fill) ?? r.fill;
|
|
4612
|
+
part = { role: "dataPoint", seriesIndex: r.seriesIndex, pointIndex: sourcePointIndex };
|
|
4613
|
+
}
|
|
4614
|
+
primitives.push({ kind: "rect", x: r.x, y: r.y, w: r.w, h: r.h, fill, rx: 1, part });
|
|
4554
4615
|
}
|
|
4555
4616
|
if (showLabels) {
|
|
4556
4617
|
pushClusteredStackedLabels(series, sourceIndices2, catCount, layout, primaryRange, dataLabels);
|
|
@@ -4587,7 +4648,7 @@ function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, se
|
|
|
4587
4648
|
y,
|
|
4588
4649
|
w: barW,
|
|
4589
4650
|
h,
|
|
4590
|
-
fill: seriesColor2(series[si], si, palette),
|
|
4651
|
+
fill: resolveDataPointFill(series[si], sourceIndex, paletteColor2(si, palette)) ?? seriesColor2(series[si], si, palette),
|
|
4591
4652
|
part: { role: "dataPoint", seriesIndex: si, pointIndex: sourceIndex }
|
|
4592
4653
|
});
|
|
4593
4654
|
if (showLabels && Math.abs(val2) > 0) {
|
|
@@ -4669,7 +4730,7 @@ function buildLines(chartData, catCount, layout, primaryRange, secondaryRange, s
|
|
|
4669
4730
|
cx: pt.x,
|
|
4670
4731
|
cy: pt.y,
|
|
4671
4732
|
r: 2.5,
|
|
4672
|
-
fill: c,
|
|
4733
|
+
fill: resolveDataPointFill(series, sourceIndex, c) ?? c,
|
|
4673
4734
|
part: { role: "dataPoint", seriesIndex: si, pointIndex: sourceIndex }
|
|
4674
4735
|
});
|
|
4675
4736
|
});
|
|
@@ -4732,16 +4793,17 @@ function buildAreas(chartData, catCount, layout, range, sourceIndices2, xPositio
|
|
|
4732
4793
|
part: { role: "series", seriesIndex: si }
|
|
4733
4794
|
});
|
|
4734
4795
|
pts.forEach((pt, displayIndex) => {
|
|
4796
|
+
const sourceIndex = sourceIndices2[displayIndex] ?? displayIndex;
|
|
4735
4797
|
primitives.push({
|
|
4736
4798
|
kind: "circle",
|
|
4737
4799
|
cx: pt.x,
|
|
4738
4800
|
cy: pt.y,
|
|
4739
4801
|
r: 2,
|
|
4740
|
-
fill: c,
|
|
4802
|
+
fill: resolveDataPointFill(series, sourceIndex, c) ?? c,
|
|
4741
4803
|
part: {
|
|
4742
4804
|
role: "dataPoint",
|
|
4743
4805
|
seriesIndex: si,
|
|
4744
|
-
pointIndex:
|
|
4806
|
+
pointIndex: sourceIndex
|
|
4745
4807
|
}
|
|
4746
4808
|
});
|
|
4747
4809
|
});
|
|
@@ -4782,7 +4844,7 @@ function buildScatter(chartData, layout, range) {
|
|
|
4782
4844
|
cx: dot.cx,
|
|
4783
4845
|
cy: dot.cy,
|
|
4784
4846
|
r: 4,
|
|
4785
|
-
fill: c,
|
|
4847
|
+
fill: resolveDataPointFill(series, vi, c) ?? c,
|
|
4786
4848
|
opacity: 0.85,
|
|
4787
4849
|
part: { role: "dataPoint", seriesIndex: si, pointIndex: vi }
|
|
4788
4850
|
});
|
|
@@ -4829,7 +4891,7 @@ function buildBubbles(chartData, layout, range) {
|
|
|
4829
4891
|
cx: dot.cx,
|
|
4830
4892
|
cy: dot.cy,
|
|
4831
4893
|
r,
|
|
4832
|
-
fill: c,
|
|
4894
|
+
fill: resolveDataPointFill(series, vi, c) ?? c,
|
|
4833
4895
|
opacity: 0.6,
|
|
4834
4896
|
part: { role: "dataPoint", seriesIndex: si, pointIndex: vi }
|
|
4835
4897
|
});
|
|
@@ -8656,13 +8718,16 @@ function buildPieViewModel(element, chartData, categoryLabels, isDoughnut) {
|
|
|
8656
8718
|
);
|
|
8657
8719
|
const svgWidth = Math.max(size, 100);
|
|
8658
8720
|
const svgHeight = Math.max(size, 60);
|
|
8659
|
-
const
|
|
8721
|
+
const pieSeries = chartData.series[0];
|
|
8722
|
+
const values = pieSeries?.values ?? [];
|
|
8660
8723
|
const slices = computePieSlices(values, cx, cy, outerR, innerR);
|
|
8661
8724
|
const primitives = slices.map(
|
|
8662
8725
|
({ d }, i) => ({
|
|
8663
8726
|
kind: "path",
|
|
8664
8727
|
d,
|
|
8665
|
-
|
|
8728
|
+
// Pie/doughnut vary colours per slice (c:varyColors defaults on), so each
|
|
8729
|
+
// slice takes its palette colour, with a per-point c:dPt fill overriding.
|
|
8730
|
+
fill: pieSeries ? resolveVaryColorFill(pieSeries, i, paletteColor2(i, chartData.colorPalette)) : paletteColor2(i, chartData.colorPalette),
|
|
8666
8731
|
stroke: "#ffffff",
|
|
8667
8732
|
strokeWidth: 1.5,
|
|
8668
8733
|
part: { role: "dataPoint", seriesIndex: 0, pointIndex: i }
|
|
@@ -8988,6 +9053,21 @@ var PRESET_ID_TO_EFFECT = {
|
|
|
8988
9053
|
26: "pulse"
|
|
8989
9054
|
}
|
|
8990
9055
|
};
|
|
9056
|
+
var FLY_SUBTYPE_TO_EDGE = {
|
|
9057
|
+
1: "top",
|
|
9058
|
+
2: "right",
|
|
9059
|
+
4: "bottom",
|
|
9060
|
+
8: "left",
|
|
9061
|
+
// Corners -> nearest (horizontal) edge.
|
|
9062
|
+
3: "right",
|
|
9063
|
+
// top-right (1|2)
|
|
9064
|
+
6: "right",
|
|
9065
|
+
// bottom-right (4|2)
|
|
9066
|
+
9: "left",
|
|
9067
|
+
// top-left (8|1)
|
|
9068
|
+
12: "left"
|
|
9069
|
+
// bottom-left (8|4)
|
|
9070
|
+
};
|
|
8991
9071
|
var KEYFRAME_DEFINITIONS = {
|
|
8992
9072
|
// ---- Entrance effects ----
|
|
8993
9073
|
appear: `@keyframes pptx-appear {
|
|
@@ -9359,16 +9439,31 @@ function resolveEffect(anim) {
|
|
|
9359
9439
|
return void 0;
|
|
9360
9440
|
}
|
|
9361
9441
|
if (cls === "entr") {
|
|
9362
|
-
return PRESET_ID_TO_EFFECT.entr[id];
|
|
9442
|
+
return applyFlyDirection(PRESET_ID_TO_EFFECT.entr[id], anim.presetSubtype);
|
|
9363
9443
|
}
|
|
9364
9444
|
if (cls === "exit") {
|
|
9365
|
-
return PRESET_ID_TO_EFFECT.exit[id];
|
|
9445
|
+
return applyFlyDirection(PRESET_ID_TO_EFFECT.exit[id], anim.presetSubtype);
|
|
9366
9446
|
}
|
|
9367
9447
|
if (cls === "emph") {
|
|
9368
9448
|
return PRESET_ID_TO_EFFECT.emph[id];
|
|
9369
9449
|
}
|
|
9370
9450
|
return void 0;
|
|
9371
9451
|
}
|
|
9452
|
+
function applyFlyDirection(effect, subtype) {
|
|
9453
|
+
if (effect !== "flyInBottom" && effect !== "flyOutBottom") {
|
|
9454
|
+
return effect;
|
|
9455
|
+
}
|
|
9456
|
+
if (subtype === void 0) {
|
|
9457
|
+
return effect;
|
|
9458
|
+
}
|
|
9459
|
+
const edge = FLY_SUBTYPE_TO_EDGE[subtype];
|
|
9460
|
+
if (!edge) {
|
|
9461
|
+
return effect;
|
|
9462
|
+
}
|
|
9463
|
+
const prefix = effect === "flyInBottom" ? "flyIn" : "flyOut";
|
|
9464
|
+
const suffix = `${edge.charAt(0).toUpperCase()}${edge.slice(1)}`;
|
|
9465
|
+
return `${prefix}${suffix}`;
|
|
9466
|
+
}
|
|
9372
9467
|
function parseMotionPathPoints(motionPath) {
|
|
9373
9468
|
const cmds = motionPath.replace(/\s+/gu, " ").trim().split(/(?=[MLCZ])/iu).filter(Boolean);
|
|
9374
9469
|
const points = [];
|
|
@@ -12112,7 +12207,7 @@ function rotateDelta(dx, dy, rotationDeg) {
|
|
|
12112
12207
|
}
|
|
12113
12208
|
function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
|
|
12114
12209
|
const scale = zoom || 1;
|
|
12115
|
-
const minSize = opts.minSize ??
|
|
12210
|
+
const minSize = opts.minSize ?? chunkFWF2SP6N_js.MIN_ELEMENT_SIZE;
|
|
12116
12211
|
const rotation = rotationOf(box);
|
|
12117
12212
|
const local = rotateDelta(dxScreen / scale, dyScreen / scale, rotation);
|
|
12118
12213
|
const dx = local.x;
|
|
@@ -12139,7 +12234,7 @@ function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
|
|
|
12139
12234
|
}
|
|
12140
12235
|
return { x: newX, y: newY, width: newW, height: newH, rotation };
|
|
12141
12236
|
}
|
|
12142
|
-
function snapBoxToGrid(box, handle, gridSpacingPx, minSize =
|
|
12237
|
+
function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkFWF2SP6N_js.MIN_ELEMENT_SIZE) {
|
|
12143
12238
|
if (handle === null || gridSpacingPx <= 0) {
|
|
12144
12239
|
return box;
|
|
12145
12240
|
}
|
|
@@ -12169,7 +12264,7 @@ function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkRPWTP6QP_js.MI
|
|
|
12169
12264
|
}
|
|
12170
12265
|
return { x, y, width, height };
|
|
12171
12266
|
}
|
|
12172
|
-
function computeMarqueeHitIds(marquee, elements, minSize =
|
|
12267
|
+
function computeMarqueeHitIds(marquee, elements, minSize = chunkFWF2SP6N_js.MIN_ELEMENT_SIZE) {
|
|
12173
12268
|
const minX = Math.min(marquee.startX, marquee.currentX);
|
|
12174
12269
|
const minY = Math.min(marquee.startY, marquee.currentY);
|
|
12175
12270
|
const maxX = Math.max(marquee.startX, marquee.currentX);
|
|
@@ -13724,7 +13819,7 @@ var THEME_COLOR_LABELS = {
|
|
|
13724
13819
|
};
|
|
13725
13820
|
function buildThemeColorGrid(colorScheme) {
|
|
13726
13821
|
return THEME_COLOR_TINT_ROWS.map(
|
|
13727
|
-
(row) =>
|
|
13822
|
+
(row) => chunkFWF2SP6N_js.THEME_COLOR_SCHEME_KEYS.map((key) => ({
|
|
13728
13823
|
hex: row.transform(colorScheme[key]),
|
|
13729
13824
|
schemeKey: key,
|
|
13730
13825
|
rowLabel: row.label,
|
|
@@ -14200,7 +14295,7 @@ function svgLineCap(lineCap) {
|
|
|
14200
14295
|
}
|
|
14201
14296
|
function copyFormatFromElement(element) {
|
|
14202
14297
|
const result = {};
|
|
14203
|
-
if (
|
|
14298
|
+
if (chunkFWF2SP6N_js.hasShapeProperties(element) && element.shapeStyle) {
|
|
14204
14299
|
const s = element.shapeStyle;
|
|
14205
14300
|
result.shapeStyle = {
|
|
14206
14301
|
fillColor: s.fillColor,
|
|
@@ -14229,7 +14324,7 @@ function copyFormatFromElement(element) {
|
|
|
14229
14324
|
softEdgeRadius: s.softEdgeRadius
|
|
14230
14325
|
};
|
|
14231
14326
|
}
|
|
14232
|
-
if (
|
|
14327
|
+
if (chunkFWF2SP6N_js.hasTextProperties(element) && element.textStyle) {
|
|
14233
14328
|
const t = element.textStyle;
|
|
14234
14329
|
result.textStyle = {
|
|
14235
14330
|
fontFamily: t.fontFamily,
|
|
@@ -14260,7 +14355,7 @@ function definedEntries(obj) {
|
|
|
14260
14355
|
}
|
|
14261
14356
|
function applyFormatToElement(element, format) {
|
|
14262
14357
|
let updated = { ...element };
|
|
14263
|
-
if (format.shapeStyle &&
|
|
14358
|
+
if (format.shapeStyle && chunkFWF2SP6N_js.hasShapeProperties(updated)) {
|
|
14264
14359
|
updated = {
|
|
14265
14360
|
...updated,
|
|
14266
14361
|
shapeStyle: {
|
|
@@ -14269,7 +14364,7 @@ function applyFormatToElement(element, format) {
|
|
|
14269
14364
|
}
|
|
14270
14365
|
};
|
|
14271
14366
|
}
|
|
14272
|
-
if (format.textStyle &&
|
|
14367
|
+
if (format.textStyle && chunkFWF2SP6N_js.hasTextProperties(updated)) {
|
|
14273
14368
|
updated = {
|
|
14274
14369
|
...updated,
|
|
14275
14370
|
textStyle: {
|
|
@@ -14284,7 +14379,7 @@ function hasCopyableFormat(element) {
|
|
|
14284
14379
|
if (!element) {
|
|
14285
14380
|
return false;
|
|
14286
14381
|
}
|
|
14287
|
-
return
|
|
14382
|
+
return chunkFWF2SP6N_js.hasShapeProperties(element) || chunkFWF2SP6N_js.hasTextProperties(element);
|
|
14288
14383
|
}
|
|
14289
14384
|
function copySegmentMetadata(from, to) {
|
|
14290
14385
|
if (from.equationXml !== void 0) {
|
|
@@ -14421,7 +14516,7 @@ function getRoundRectRadiusPx(element) {
|
|
|
14421
14516
|
return Math.min(Math.max(element.width, 1), Math.max(element.height, 1)) * 0.5 * normalizedAdjustment;
|
|
14422
14517
|
}
|
|
14423
14518
|
function getShapeAdjustmentHandleDescriptor(element) {
|
|
14424
|
-
if (!
|
|
14519
|
+
if (!chunkFWF2SP6N_js.hasShapeProperties(element)) {
|
|
14425
14520
|
return null;
|
|
14426
14521
|
}
|
|
14427
14522
|
const normalizedShapeType = String(element.shapeType || "").toLowerCase();
|
|
@@ -15413,7 +15508,7 @@ function createSyncGate(onOpen, graceMs = INITIAL_SYNC_GRACE_MS) {
|
|
|
15413
15508
|
var POSITION_THRESHOLD = 2;
|
|
15414
15509
|
var SIZE_THRESHOLD = 2;
|
|
15415
15510
|
function getElementText(element) {
|
|
15416
|
-
if (!
|
|
15511
|
+
if (!chunkFWF2SP6N_js.hasTextProperties(element)) {
|
|
15417
15512
|
return "";
|
|
15418
15513
|
}
|
|
15419
15514
|
if (element.textSegments && element.textSegments.length > 0) {
|
|
@@ -18987,7 +19082,7 @@ function getAriaRole(element) {
|
|
|
18987
19082
|
case "model3d":
|
|
18988
19083
|
return "img";
|
|
18989
19084
|
case "shape": {
|
|
18990
|
-
if (
|
|
19085
|
+
if (chunkFWF2SP6N_js.hasTextProperties(element) && element.text) {
|
|
18991
19086
|
return "group";
|
|
18992
19087
|
}
|
|
18993
19088
|
return "img";
|
|
@@ -19000,7 +19095,7 @@ function getAriaLabel(element) {
|
|
|
19000
19095
|
if ((element.type === "image" || element.type === "picture") && "altText" in element && typeof element.altText === "string" && element.altText.trim()) {
|
|
19001
19096
|
return element.altText.trim();
|
|
19002
19097
|
}
|
|
19003
|
-
if (
|
|
19098
|
+
if (chunkFWF2SP6N_js.hasTextProperties(element) && element.text) {
|
|
19004
19099
|
const text = element.text.trim();
|
|
19005
19100
|
if (text) {
|
|
19006
19101
|
return text.length > 120 ? `${text.slice(0, 117)}...` : text;
|
|
@@ -19407,7 +19502,7 @@ var DEFAULT_CHART_POSITION = { x: 120, y: 120, width: 480, height: 320 };
|
|
|
19407
19502
|
var DEFAULT_CATEGORIES = ["Category 1", "Category 2", "Category 3"];
|
|
19408
19503
|
var DEFAULT_SERIES_VALUES = [4, 3, 5];
|
|
19409
19504
|
function createDefaultChartElement(chartType = DEFAULT_INSERT_CHART_TYPE, position) {
|
|
19410
|
-
return
|
|
19505
|
+
return chunkFWF2SP6N_js.createChartElement(
|
|
19411
19506
|
chartType,
|
|
19412
19507
|
{
|
|
19413
19508
|
categories: [...DEFAULT_CATEGORIES],
|
|
@@ -20427,7 +20522,7 @@ function computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight,
|
|
|
20427
20522
|
};
|
|
20428
20523
|
}
|
|
20429
20524
|
function collectFontsFromElement(element, fonts) {
|
|
20430
|
-
if (
|
|
20525
|
+
if (chunkFWF2SP6N_js.hasTextProperties(element)) {
|
|
20431
20526
|
if (element.textStyle?.fontFamily) {
|
|
20432
20527
|
fonts.add(element.textStyle.fontFamily);
|
|
20433
20528
|
}
|
|
Binary file
|
|
Binary file
|