pptx-react-viewer 1.25.3 → 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 +2 -0
- package/dist/{Model3DScene-IQLE5JLL.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-F2GUSTZI.js → Model3DScene-SP6WOKSX.js} +3 -3
- package/dist/{Model3DScene-F2GUSTZI.js.br → Model3DScene-SP6WOKSX.js.br} +0 -0
- package/dist/Model3DScene-SP6WOKSX.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-JG26PJ7O.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-4OMD7LWR.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-5G3SPYQE.js → chunk-5VYVKFMS.js} +848 -807
- package/dist/chunk-5VYVKFMS.js.br +0 -0
- package/dist/chunk-5VYVKFMS.js.gz +0 -0
- package/dist/{chunk-UXVFNGJH.js → chunk-6F4WVHS3.js} +97 -59
- package/dist/chunk-6F4WVHS3.js.br +0 -0
- package/dist/chunk-6F4WVHS3.js.gz +0 -0
- package/dist/{chunk-ZUJHFLOR.js → chunk-7FE27DDH.js} +464 -464
- package/dist/chunk-7FE27DDH.js.br +0 -0
- package/dist/chunk-7FE27DDH.js.gz +0 -0
- package/dist/{chunk-2V6BD4JQ.js → chunk-FWF2SP6N.js} +631 -141
- package/dist/chunk-FWF2SP6N.js.br +0 -0
- package/dist/chunk-FWF2SP6N.js.gz +0 -0
- package/dist/{chunk-NYBERTS7.mjs → chunk-P72VQ7WE.mjs} +4 -4
- package/dist/chunk-P72VQ7WE.mjs.br +0 -0
- package/dist/chunk-P72VQ7WE.mjs.gz +0 -0
- package/dist/{chunk-GNXWU7UG.mjs → chunk-TPG2WKHQ.mjs} +47 -6
- package/dist/chunk-TPG2WKHQ.mjs.br +0 -0
- package/dist/chunk-TPG2WKHQ.mjs.gz +0 -0
- package/dist/{chunk-DAI4KM5W.mjs → chunk-UYNOPUSG.mjs} +631 -141
- package/dist/chunk-UYNOPUSG.mjs.br +0 -0
- package/dist/chunk-UYNOPUSG.mjs.gz +0 -0
- package/dist/{chunk-DVM75RMN.mjs → chunk-VUC3UPLM.mjs} +64 -26
- package/dist/chunk-VUC3UPLM.mjs.br +0 -0
- package/dist/chunk-VUC3UPLM.mjs.gz +0 -0
- package/dist/{dist-E3IHM3OU.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-ZA77P2O5.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-F2GUSTZI.js.gz +0 -0
- package/dist/Model3DScene-IQLE5JLL.mjs.br +0 -0
- package/dist/Model3DScene-IQLE5JLL.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-4OMD7LWR.js.br +0 -0
- package/dist/SurfaceChart3DScene-4OMD7LWR.js.gz +0 -0
- package/dist/SurfaceChart3DScene-JG26PJ7O.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-JG26PJ7O.mjs.gz +0 -0
- package/dist/chunk-2V6BD4JQ.js.br +0 -0
- package/dist/chunk-2V6BD4JQ.js.gz +0 -0
- package/dist/chunk-5G3SPYQE.js.br +0 -0
- package/dist/chunk-5G3SPYQE.js.gz +0 -0
- package/dist/chunk-DAI4KM5W.mjs.br +0 -0
- package/dist/chunk-DAI4KM5W.mjs.gz +0 -0
- package/dist/chunk-DVM75RMN.mjs.br +0 -0
- package/dist/chunk-DVM75RMN.mjs.gz +0 -0
- package/dist/chunk-GNXWU7UG.mjs.br +0 -0
- package/dist/chunk-GNXWU7UG.mjs.gz +0 -0
- package/dist/chunk-NYBERTS7.mjs.br +0 -0
- package/dist/chunk-NYBERTS7.mjs.gz +0 -0
- package/dist/chunk-UXVFNGJH.js.br +0 -0
- package/dist/chunk-UXVFNGJH.js.gz +0 -0
- package/dist/chunk-ZUJHFLOR.js.br +0 -0
- package/dist/chunk-ZUJHFLOR.js.gz +0 -0
- package/dist/dist-E3IHM3OU.mjs.br +0 -0
- package/dist/dist-E3IHM3OU.mjs.gz +0 -0
- package/dist/dist-ZA77P2O5.js.br +0 -0
- package/dist/dist-ZA77P2O5.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,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 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
349
|
}
|
|
350
350
|
function buildCustomGeometryClipPath(pathData, pathWidth, pathHeight, elemWidth, elemHeight) {
|
|
351
351
|
if (!pathData || !Number.isFinite(pathWidth) || !Number.isFinite(pathHeight) || pathWidth <= 0 || pathHeight <= 0 || !Number.isFinite(elemWidth) || !Number.isFinite(elemHeight) || elemWidth <= 0 || elemHeight <= 0) {
|
|
@@ -1117,7 +1117,7 @@ var DEFAULT_SCHEME_COLOR_MAP = {
|
|
|
1117
1117
|
phclr: "#4472C4"
|
|
1118
1118
|
};
|
|
1119
1119
|
function applyDrawingColorTransforms2(baseColor, colorNode) {
|
|
1120
|
-
return
|
|
1120
|
+
return chunkFWF2SP6N_js.applyDrawingColorTransforms(baseColor, colorNode);
|
|
1121
1121
|
}
|
|
1122
1122
|
function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
1123
1123
|
if (!colorNode) {
|
|
@@ -1169,7 +1169,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
1169
1169
|
const h = hueRaw / 6e4;
|
|
1170
1170
|
const s = clampUnitInterval(satRaw / 1e5);
|
|
1171
1171
|
const l = clampUnitInterval(lumRaw / 1e5);
|
|
1172
|
-
const rgb =
|
|
1172
|
+
const rgb = chunkFWF2SP6N_js.hslToRgb(h, s, l);
|
|
1173
1173
|
const toHex = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
|
|
1174
1174
|
const base = `#${toHex(rgb.r)}${toHex(rgb.g)}${toHex(rgb.b)}`;
|
|
1175
1175
|
return applyDrawingColorTransforms2(base, hslNode);
|
|
@@ -1179,7 +1179,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
1179
1179
|
const preset = String(
|
|
1180
1180
|
colorNode["a:prstClr"]?.["@_val"] || ""
|
|
1181
1181
|
).toLowerCase();
|
|
1182
|
-
const mapped =
|
|
1182
|
+
const mapped = chunkFWF2SP6N_js.PRESET_COLOR_MAP[preset];
|
|
1183
1183
|
if (!mapped) {
|
|
1184
1184
|
return void 0;
|
|
1185
1185
|
}
|
|
@@ -1534,7 +1534,7 @@ function hexToRgbUnit2(hex) {
|
|
|
1534
1534
|
};
|
|
1535
1535
|
}
|
|
1536
1536
|
function getEffects(element) {
|
|
1537
|
-
if (!
|
|
1537
|
+
if (!chunkFWF2SP6N_js.isImageLikeElement(element)) {
|
|
1538
1538
|
return void 0;
|
|
1539
1539
|
}
|
|
1540
1540
|
return element.imageEffects;
|
|
@@ -1723,7 +1723,7 @@ function buildDuotoneFilterMarkup(color1, color2) {
|
|
|
1723
1723
|
const c2 = hexToRgbUnit2(color2);
|
|
1724
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>`;
|
|
1725
1725
|
}
|
|
1726
|
-
function getDuotoneImageFilter(element, elementId =
|
|
1726
|
+
function getDuotoneImageFilter(element, elementId = chunkFWF2SP6N_js.isImageLikeElement(element) ? element.id : "") {
|
|
1727
1727
|
const effects = getEffects(element);
|
|
1728
1728
|
if (!effects?.duotone) {
|
|
1729
1729
|
return void 0;
|
|
@@ -1825,7 +1825,7 @@ function buildImageAlphaFilterMarkup(effects) {
|
|
|
1825
1825
|
}
|
|
1826
1826
|
return parts.length > 0 ? parts.join("") : void 0;
|
|
1827
1827
|
}
|
|
1828
|
-
function getImageAlphaFilter(element, elementId =
|
|
1828
|
+
function getImageAlphaFilter(element, elementId = chunkFWF2SP6N_js.isImageLikeElement(element) ? element.id : "") {
|
|
1829
1829
|
const effects = getEffects(element);
|
|
1830
1830
|
if (!effects || !hasAdvancedImageAlphaEffects(element)) {
|
|
1831
1831
|
return void 0;
|
|
@@ -1915,7 +1915,7 @@ function buildArtisticFilterMarkup(effectName, radius) {
|
|
|
1915
1915
|
return void 0;
|
|
1916
1916
|
}
|
|
1917
1917
|
}
|
|
1918
|
-
function getArtisticImageFilter(element, elementId =
|
|
1918
|
+
function getArtisticImageFilter(element, elementId = chunkFWF2SP6N_js.isImageLikeElement(element) ? element.id : "") {
|
|
1919
1919
|
const effects = getEffects(element);
|
|
1920
1920
|
if (!effects?.artisticEffect || !needsSvgArtisticFilter(effects.artisticEffect)) {
|
|
1921
1921
|
return void 0;
|
|
@@ -2874,7 +2874,7 @@ function convertChildren(node) {
|
|
|
2874
2874
|
if (key.startsWith("@_")) {
|
|
2875
2875
|
continue;
|
|
2876
2876
|
}
|
|
2877
|
-
const tag =
|
|
2877
|
+
const tag = chunkFWF2SP6N_js.stripXmlOrderSuffix(key);
|
|
2878
2878
|
if (tag === "m:oMathPara") {
|
|
2879
2879
|
continue;
|
|
2880
2880
|
}
|
|
@@ -2946,7 +2946,7 @@ function findOmathRoots(node) {
|
|
|
2946
2946
|
}
|
|
2947
2947
|
}
|
|
2948
2948
|
const contentTags = /* @__PURE__ */ new Set(["m:r", "m:f", "m:rad", "m:sSup", "m:sSub", "m:box"]);
|
|
2949
|
-
if (Object.keys(node).some((key) => contentTags.has(
|
|
2949
|
+
if (Object.keys(node).some((key) => contentTags.has(chunkFWF2SP6N_js.stripXmlOrderSuffix(key)))) {
|
|
2950
2950
|
return [node];
|
|
2951
2951
|
}
|
|
2952
2952
|
return [];
|
|
@@ -3156,7 +3156,7 @@ function mergeSiblings(nodes) {
|
|
|
3156
3156
|
}
|
|
3157
3157
|
const ordered = {};
|
|
3158
3158
|
for (const [position, [key, value]] of entries.entries()) {
|
|
3159
|
-
ordered[(counts.get(key) ?? 0) > 1 ?
|
|
3159
|
+
ordered[(counts.get(key) ?? 0) > 1 ? chunkFWF2SP6N_js.orderedXmlKey(key, position) : key] = value;
|
|
3160
3160
|
}
|
|
3161
3161
|
return ordered;
|
|
3162
3162
|
}
|
|
@@ -3560,7 +3560,7 @@ function ommlChildrenToLatex(node) {
|
|
|
3560
3560
|
if (key.startsWith("@_")) {
|
|
3561
3561
|
continue;
|
|
3562
3562
|
}
|
|
3563
|
-
const tag =
|
|
3563
|
+
const tag = chunkFWF2SP6N_js.stripXmlOrderSuffix(key);
|
|
3564
3564
|
const items = ensureArr(node[key]);
|
|
3565
3565
|
for (const item of items) {
|
|
3566
3566
|
const result = ommlElementToLatex(tag, item);
|
|
@@ -4169,6 +4169,16 @@ function splitSeriesByAxis(series, axes) {
|
|
|
4169
4169
|
}
|
|
4170
4170
|
return { primary, secondary };
|
|
4171
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
|
+
}
|
|
4172
4182
|
function clamp3(value, min, max) {
|
|
4173
4183
|
return Math.min(Math.max(value, min), max);
|
|
4174
4184
|
}
|
|
@@ -4568,7 +4578,7 @@ function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, se
|
|
|
4568
4578
|
y,
|
|
4569
4579
|
w: singleBarWidth,
|
|
4570
4580
|
h,
|
|
4571
|
-
fill: seriesColor2(series[si], si, palette),
|
|
4581
|
+
fill: resolveDataPointFill(series[si], sourceIndex, paletteColor2(si, palette)) ?? seriesColor2(series[si], si, palette),
|
|
4572
4582
|
rx: 1,
|
|
4573
4583
|
part: { role: "dataPoint", seriesIndex: si, pointIndex: sourceIndex }
|
|
4574
4584
|
});
|
|
@@ -4594,20 +4604,14 @@ function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, se
|
|
|
4594
4604
|
}));
|
|
4595
4605
|
const rects = computeStackedBarRects(displaySeries2, catCount, layout, primaryRange, palette);
|
|
4596
4606
|
for (const r of rects) {
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
part: r.seriesIndex !== void 0 && r.pointIndex !== void 0 ? {
|
|
4606
|
-
role: "dataPoint",
|
|
4607
|
-
seriesIndex: r.seriesIndex,
|
|
4608
|
-
pointIndex: sourceIndices2[r.pointIndex] ?? r.pointIndex
|
|
4609
|
-
} : void 0
|
|
4610
|
-
});
|
|
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 });
|
|
4611
4615
|
}
|
|
4612
4616
|
if (showLabels) {
|
|
4613
4617
|
pushClusteredStackedLabels(series, sourceIndices2, catCount, layout, primaryRange, dataLabels);
|
|
@@ -4644,7 +4648,7 @@ function buildBars(chartData, catCount, layout, primaryRange, secondaryRange, se
|
|
|
4644
4648
|
y,
|
|
4645
4649
|
w: barW,
|
|
4646
4650
|
h,
|
|
4647
|
-
fill: seriesColor2(series[si], si, palette),
|
|
4651
|
+
fill: resolveDataPointFill(series[si], sourceIndex, paletteColor2(si, palette)) ?? seriesColor2(series[si], si, palette),
|
|
4648
4652
|
part: { role: "dataPoint", seriesIndex: si, pointIndex: sourceIndex }
|
|
4649
4653
|
});
|
|
4650
4654
|
if (showLabels && Math.abs(val2) > 0) {
|
|
@@ -4726,7 +4730,7 @@ function buildLines(chartData, catCount, layout, primaryRange, secondaryRange, s
|
|
|
4726
4730
|
cx: pt.x,
|
|
4727
4731
|
cy: pt.y,
|
|
4728
4732
|
r: 2.5,
|
|
4729
|
-
fill: c,
|
|
4733
|
+
fill: resolveDataPointFill(series, sourceIndex, c) ?? c,
|
|
4730
4734
|
part: { role: "dataPoint", seriesIndex: si, pointIndex: sourceIndex }
|
|
4731
4735
|
});
|
|
4732
4736
|
});
|
|
@@ -4789,16 +4793,17 @@ function buildAreas(chartData, catCount, layout, range, sourceIndices2, xPositio
|
|
|
4789
4793
|
part: { role: "series", seriesIndex: si }
|
|
4790
4794
|
});
|
|
4791
4795
|
pts.forEach((pt, displayIndex) => {
|
|
4796
|
+
const sourceIndex = sourceIndices2[displayIndex] ?? displayIndex;
|
|
4792
4797
|
primitives.push({
|
|
4793
4798
|
kind: "circle",
|
|
4794
4799
|
cx: pt.x,
|
|
4795
4800
|
cy: pt.y,
|
|
4796
4801
|
r: 2,
|
|
4797
|
-
fill: c,
|
|
4802
|
+
fill: resolveDataPointFill(series, sourceIndex, c) ?? c,
|
|
4798
4803
|
part: {
|
|
4799
4804
|
role: "dataPoint",
|
|
4800
4805
|
seriesIndex: si,
|
|
4801
|
-
pointIndex:
|
|
4806
|
+
pointIndex: sourceIndex
|
|
4802
4807
|
}
|
|
4803
4808
|
});
|
|
4804
4809
|
});
|
|
@@ -4839,7 +4844,7 @@ function buildScatter(chartData, layout, range) {
|
|
|
4839
4844
|
cx: dot.cx,
|
|
4840
4845
|
cy: dot.cy,
|
|
4841
4846
|
r: 4,
|
|
4842
|
-
fill: c,
|
|
4847
|
+
fill: resolveDataPointFill(series, vi, c) ?? c,
|
|
4843
4848
|
opacity: 0.85,
|
|
4844
4849
|
part: { role: "dataPoint", seriesIndex: si, pointIndex: vi }
|
|
4845
4850
|
});
|
|
@@ -4886,7 +4891,7 @@ function buildBubbles(chartData, layout, range) {
|
|
|
4886
4891
|
cx: dot.cx,
|
|
4887
4892
|
cy: dot.cy,
|
|
4888
4893
|
r,
|
|
4889
|
-
fill: c,
|
|
4894
|
+
fill: resolveDataPointFill(series, vi, c) ?? c,
|
|
4890
4895
|
opacity: 0.6,
|
|
4891
4896
|
part: { role: "dataPoint", seriesIndex: si, pointIndex: vi }
|
|
4892
4897
|
});
|
|
@@ -8713,13 +8718,16 @@ function buildPieViewModel(element, chartData, categoryLabels, isDoughnut) {
|
|
|
8713
8718
|
);
|
|
8714
8719
|
const svgWidth = Math.max(size, 100);
|
|
8715
8720
|
const svgHeight = Math.max(size, 60);
|
|
8716
|
-
const
|
|
8721
|
+
const pieSeries = chartData.series[0];
|
|
8722
|
+
const values = pieSeries?.values ?? [];
|
|
8717
8723
|
const slices = computePieSlices(values, cx, cy, outerR, innerR);
|
|
8718
8724
|
const primitives = slices.map(
|
|
8719
8725
|
({ d }, i) => ({
|
|
8720
8726
|
kind: "path",
|
|
8721
8727
|
d,
|
|
8722
|
-
|
|
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),
|
|
8723
8731
|
stroke: "#ffffff",
|
|
8724
8732
|
strokeWidth: 1.5,
|
|
8725
8733
|
part: { role: "dataPoint", seriesIndex: 0, pointIndex: i }
|
|
@@ -9045,6 +9053,21 @@ var PRESET_ID_TO_EFFECT = {
|
|
|
9045
9053
|
26: "pulse"
|
|
9046
9054
|
}
|
|
9047
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
|
+
};
|
|
9048
9071
|
var KEYFRAME_DEFINITIONS = {
|
|
9049
9072
|
// ---- Entrance effects ----
|
|
9050
9073
|
appear: `@keyframes pptx-appear {
|
|
@@ -9416,16 +9439,31 @@ function resolveEffect(anim) {
|
|
|
9416
9439
|
return void 0;
|
|
9417
9440
|
}
|
|
9418
9441
|
if (cls === "entr") {
|
|
9419
|
-
return PRESET_ID_TO_EFFECT.entr[id];
|
|
9442
|
+
return applyFlyDirection(PRESET_ID_TO_EFFECT.entr[id], anim.presetSubtype);
|
|
9420
9443
|
}
|
|
9421
9444
|
if (cls === "exit") {
|
|
9422
|
-
return PRESET_ID_TO_EFFECT.exit[id];
|
|
9445
|
+
return applyFlyDirection(PRESET_ID_TO_EFFECT.exit[id], anim.presetSubtype);
|
|
9423
9446
|
}
|
|
9424
9447
|
if (cls === "emph") {
|
|
9425
9448
|
return PRESET_ID_TO_EFFECT.emph[id];
|
|
9426
9449
|
}
|
|
9427
9450
|
return void 0;
|
|
9428
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
|
+
}
|
|
9429
9467
|
function parseMotionPathPoints(motionPath) {
|
|
9430
9468
|
const cmds = motionPath.replace(/\s+/gu, " ").trim().split(/(?=[MLCZ])/iu).filter(Boolean);
|
|
9431
9469
|
const points = [];
|
|
@@ -12169,7 +12207,7 @@ function rotateDelta(dx, dy, rotationDeg) {
|
|
|
12169
12207
|
}
|
|
12170
12208
|
function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
|
|
12171
12209
|
const scale = zoom || 1;
|
|
12172
|
-
const minSize = opts.minSize ??
|
|
12210
|
+
const minSize = opts.minSize ?? chunkFWF2SP6N_js.MIN_ELEMENT_SIZE;
|
|
12173
12211
|
const rotation = rotationOf(box);
|
|
12174
12212
|
const local = rotateDelta(dxScreen / scale, dyScreen / scale, rotation);
|
|
12175
12213
|
const dx = local.x;
|
|
@@ -12196,7 +12234,7 @@ function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
|
|
|
12196
12234
|
}
|
|
12197
12235
|
return { x: newX, y: newY, width: newW, height: newH, rotation };
|
|
12198
12236
|
}
|
|
12199
|
-
function snapBoxToGrid(box, handle, gridSpacingPx, minSize =
|
|
12237
|
+
function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkFWF2SP6N_js.MIN_ELEMENT_SIZE) {
|
|
12200
12238
|
if (handle === null || gridSpacingPx <= 0) {
|
|
12201
12239
|
return box;
|
|
12202
12240
|
}
|
|
@@ -12226,7 +12264,7 @@ function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunk2V6BD4JQ_js.MI
|
|
|
12226
12264
|
}
|
|
12227
12265
|
return { x, y, width, height };
|
|
12228
12266
|
}
|
|
12229
|
-
function computeMarqueeHitIds(marquee, elements, minSize =
|
|
12267
|
+
function computeMarqueeHitIds(marquee, elements, minSize = chunkFWF2SP6N_js.MIN_ELEMENT_SIZE) {
|
|
12230
12268
|
const minX = Math.min(marquee.startX, marquee.currentX);
|
|
12231
12269
|
const minY = Math.min(marquee.startY, marquee.currentY);
|
|
12232
12270
|
const maxX = Math.max(marquee.startX, marquee.currentX);
|
|
@@ -13781,7 +13819,7 @@ var THEME_COLOR_LABELS = {
|
|
|
13781
13819
|
};
|
|
13782
13820
|
function buildThemeColorGrid(colorScheme) {
|
|
13783
13821
|
return THEME_COLOR_TINT_ROWS.map(
|
|
13784
|
-
(row) =>
|
|
13822
|
+
(row) => chunkFWF2SP6N_js.THEME_COLOR_SCHEME_KEYS.map((key) => ({
|
|
13785
13823
|
hex: row.transform(colorScheme[key]),
|
|
13786
13824
|
schemeKey: key,
|
|
13787
13825
|
rowLabel: row.label,
|
|
@@ -14257,7 +14295,7 @@ function svgLineCap(lineCap) {
|
|
|
14257
14295
|
}
|
|
14258
14296
|
function copyFormatFromElement(element) {
|
|
14259
14297
|
const result = {};
|
|
14260
|
-
if (
|
|
14298
|
+
if (chunkFWF2SP6N_js.hasShapeProperties(element) && element.shapeStyle) {
|
|
14261
14299
|
const s = element.shapeStyle;
|
|
14262
14300
|
result.shapeStyle = {
|
|
14263
14301
|
fillColor: s.fillColor,
|
|
@@ -14286,7 +14324,7 @@ function copyFormatFromElement(element) {
|
|
|
14286
14324
|
softEdgeRadius: s.softEdgeRadius
|
|
14287
14325
|
};
|
|
14288
14326
|
}
|
|
14289
|
-
if (
|
|
14327
|
+
if (chunkFWF2SP6N_js.hasTextProperties(element) && element.textStyle) {
|
|
14290
14328
|
const t = element.textStyle;
|
|
14291
14329
|
result.textStyle = {
|
|
14292
14330
|
fontFamily: t.fontFamily,
|
|
@@ -14317,7 +14355,7 @@ function definedEntries(obj) {
|
|
|
14317
14355
|
}
|
|
14318
14356
|
function applyFormatToElement(element, format) {
|
|
14319
14357
|
let updated = { ...element };
|
|
14320
|
-
if (format.shapeStyle &&
|
|
14358
|
+
if (format.shapeStyle && chunkFWF2SP6N_js.hasShapeProperties(updated)) {
|
|
14321
14359
|
updated = {
|
|
14322
14360
|
...updated,
|
|
14323
14361
|
shapeStyle: {
|
|
@@ -14326,7 +14364,7 @@ function applyFormatToElement(element, format) {
|
|
|
14326
14364
|
}
|
|
14327
14365
|
};
|
|
14328
14366
|
}
|
|
14329
|
-
if (format.textStyle &&
|
|
14367
|
+
if (format.textStyle && chunkFWF2SP6N_js.hasTextProperties(updated)) {
|
|
14330
14368
|
updated = {
|
|
14331
14369
|
...updated,
|
|
14332
14370
|
textStyle: {
|
|
@@ -14341,7 +14379,7 @@ function hasCopyableFormat(element) {
|
|
|
14341
14379
|
if (!element) {
|
|
14342
14380
|
return false;
|
|
14343
14381
|
}
|
|
14344
|
-
return
|
|
14382
|
+
return chunkFWF2SP6N_js.hasShapeProperties(element) || chunkFWF2SP6N_js.hasTextProperties(element);
|
|
14345
14383
|
}
|
|
14346
14384
|
function copySegmentMetadata(from, to) {
|
|
14347
14385
|
if (from.equationXml !== void 0) {
|
|
@@ -14478,7 +14516,7 @@ function getRoundRectRadiusPx(element) {
|
|
|
14478
14516
|
return Math.min(Math.max(element.width, 1), Math.max(element.height, 1)) * 0.5 * normalizedAdjustment;
|
|
14479
14517
|
}
|
|
14480
14518
|
function getShapeAdjustmentHandleDescriptor(element) {
|
|
14481
|
-
if (!
|
|
14519
|
+
if (!chunkFWF2SP6N_js.hasShapeProperties(element)) {
|
|
14482
14520
|
return null;
|
|
14483
14521
|
}
|
|
14484
14522
|
const normalizedShapeType = String(element.shapeType || "").toLowerCase();
|
|
@@ -15470,7 +15508,7 @@ function createSyncGate(onOpen, graceMs = INITIAL_SYNC_GRACE_MS) {
|
|
|
15470
15508
|
var POSITION_THRESHOLD = 2;
|
|
15471
15509
|
var SIZE_THRESHOLD = 2;
|
|
15472
15510
|
function getElementText(element) {
|
|
15473
|
-
if (!
|
|
15511
|
+
if (!chunkFWF2SP6N_js.hasTextProperties(element)) {
|
|
15474
15512
|
return "";
|
|
15475
15513
|
}
|
|
15476
15514
|
if (element.textSegments && element.textSegments.length > 0) {
|
|
@@ -19044,7 +19082,7 @@ function getAriaRole(element) {
|
|
|
19044
19082
|
case "model3d":
|
|
19045
19083
|
return "img";
|
|
19046
19084
|
case "shape": {
|
|
19047
|
-
if (
|
|
19085
|
+
if (chunkFWF2SP6N_js.hasTextProperties(element) && element.text) {
|
|
19048
19086
|
return "group";
|
|
19049
19087
|
}
|
|
19050
19088
|
return "img";
|
|
@@ -19057,7 +19095,7 @@ function getAriaLabel(element) {
|
|
|
19057
19095
|
if ((element.type === "image" || element.type === "picture") && "altText" in element && typeof element.altText === "string" && element.altText.trim()) {
|
|
19058
19096
|
return element.altText.trim();
|
|
19059
19097
|
}
|
|
19060
|
-
if (
|
|
19098
|
+
if (chunkFWF2SP6N_js.hasTextProperties(element) && element.text) {
|
|
19061
19099
|
const text = element.text.trim();
|
|
19062
19100
|
if (text) {
|
|
19063
19101
|
return text.length > 120 ? `${text.slice(0, 117)}...` : text;
|
|
@@ -19464,7 +19502,7 @@ var DEFAULT_CHART_POSITION = { x: 120, y: 120, width: 480, height: 320 };
|
|
|
19464
19502
|
var DEFAULT_CATEGORIES = ["Category 1", "Category 2", "Category 3"];
|
|
19465
19503
|
var DEFAULT_SERIES_VALUES = [4, 3, 5];
|
|
19466
19504
|
function createDefaultChartElement(chartType = DEFAULT_INSERT_CHART_TYPE, position) {
|
|
19467
|
-
return
|
|
19505
|
+
return chunkFWF2SP6N_js.createChartElement(
|
|
19468
19506
|
chartType,
|
|
19469
19507
|
{
|
|
19470
19508
|
categories: [...DEFAULT_CATEGORIES],
|
|
@@ -20484,7 +20522,7 @@ function computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight,
|
|
|
20484
20522
|
};
|
|
20485
20523
|
}
|
|
20486
20524
|
function collectFontsFromElement(element, fonts) {
|
|
20487
|
-
if (
|
|
20525
|
+
if (chunkFWF2SP6N_js.hasTextProperties(element)) {
|
|
20488
20526
|
if (element.textStyle?.fontFamily) {
|
|
20489
20527
|
fonts.add(element.textStyle.fontFamily);
|
|
20490
20528
|
}
|
|
Binary file
|
|
Binary file
|