pptx-react-viewer 2.15.2 → 2.16.0
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/{AiChatPanel-HSQLY6O7.mjs → AiChatPanel-TYU52HDW.mjs} +3 -3
- package/dist/AiChatPanel-TYU52HDW.mjs.br +0 -0
- package/dist/AiChatPanel-TYU52HDW.mjs.gz +0 -0
- package/dist/{AiChatPanel-WGX7DUQE.js → AiChatPanel-VKGWK23E.js} +22 -22
- package/dist/AiChatPanel-VKGWK23E.js.br +0 -0
- package/dist/AiChatPanel-VKGWK23E.js.gz +0 -0
- package/dist/{Model3DScene-3DOCQYAE.mjs → Model3DScene-267BHD5T.mjs} +1 -1
- package/dist/Model3DScene-267BHD5T.mjs.br +0 -0
- package/dist/Model3DScene-267BHD5T.mjs.gz +0 -0
- package/dist/{Model3DScene-DYWYNVLU.js → Model3DScene-TG7OSR6V.js} +2 -2
- package/dist/Model3DScene-TG7OSR6V.js.br +0 -0
- package/dist/Model3DScene-TG7OSR6V.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-7UB5JE2W.js → SurfaceChart3DScene-GK4JHZAC.js} +2 -2
- package/dist/SurfaceChart3DScene-GK4JHZAC.js.br +0 -0
- package/dist/SurfaceChart3DScene-GK4JHZAC.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-GIKV3DXC.mjs → SurfaceChart3DScene-RPRVXRQZ.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-GIKV3DXC.mjs.br → SurfaceChart3DScene-RPRVXRQZ.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-RPRVXRQZ.mjs.gz +0 -0
- package/dist/{chunk-RSNAGJTQ.js → chunk-7W5MCYBN.js} +1084 -1052
- package/dist/chunk-7W5MCYBN.js.br +0 -0
- package/dist/chunk-7W5MCYBN.js.gz +0 -0
- package/dist/{chunk-MQXKBH43.js → chunk-AX75ONFY.js} +247 -247
- package/dist/chunk-AX75ONFY.js.br +0 -0
- package/dist/chunk-AX75ONFY.js.gz +0 -0
- package/dist/{chunk-ZAO36XAK.mjs → chunk-FFBY2TKD.mjs} +5 -5
- package/dist/chunk-FFBY2TKD.mjs.br +0 -0
- package/dist/chunk-FFBY2TKD.mjs.gz +0 -0
- package/dist/{chunk-U47SG5XL.js → chunk-GOPIG4VW.js} +353 -336
- package/dist/chunk-GOPIG4VW.js.br +0 -0
- package/dist/chunk-GOPIG4VW.js.gz +0 -0
- package/dist/{chunk-LVGFV42Z.mjs → chunk-OIITLGKQ.mjs} +234 -144
- package/dist/chunk-OIITLGKQ.mjs.br +0 -0
- package/dist/chunk-OIITLGKQ.mjs.gz +0 -0
- package/dist/{chunk-SBRSPTSA.js → chunk-P3Y3OMAD.js} +239 -144
- package/dist/chunk-P3Y3OMAD.js.br +0 -0
- package/dist/chunk-P3Y3OMAD.js.gz +0 -0
- package/dist/{chunk-DC4GIE7E.js → chunk-PILJZ5OE.js} +3 -3
- package/dist/chunk-PILJZ5OE.js.br +0 -0
- package/dist/chunk-PILJZ5OE.js.gz +0 -0
- package/dist/{chunk-GLC2RPKN.mjs → chunk-TWPZJXLC.mjs} +22 -5
- package/dist/chunk-TWPZJXLC.mjs.br +0 -0
- package/dist/chunk-TWPZJXLC.mjs.gz +0 -0
- package/dist/{chunk-IXCNYPFK.mjs → chunk-ULB35HMJ.mjs} +1 -1
- package/dist/chunk-ULB35HMJ.mjs.br +0 -0
- package/dist/chunk-ULB35HMJ.mjs.gz +0 -0
- package/dist/{chunk-IXEHYABF.mjs → chunk-VNVURLZM.mjs} +40 -8
- package/dist/chunk-VNVURLZM.mjs.br +0 -0
- package/dist/chunk-VNVURLZM.mjs.gz +0 -0
- package/dist/index.js +39 -39
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +78 -78
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.js +26 -26
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-HSQLY6O7.mjs.br +0 -0
- package/dist/AiChatPanel-HSQLY6O7.mjs.gz +0 -0
- package/dist/AiChatPanel-WGX7DUQE.js.br +0 -0
- package/dist/AiChatPanel-WGX7DUQE.js.gz +0 -0
- package/dist/Model3DScene-3DOCQYAE.mjs.br +0 -0
- package/dist/Model3DScene-3DOCQYAE.mjs.gz +0 -0
- package/dist/Model3DScene-DYWYNVLU.js.br +0 -0
- package/dist/Model3DScene-DYWYNVLU.js.gz +0 -0
- package/dist/SurfaceChart3DScene-7UB5JE2W.js.br +0 -0
- package/dist/SurfaceChart3DScene-7UB5JE2W.js.gz +0 -0
- package/dist/SurfaceChart3DScene-GIKV3DXC.mjs.gz +0 -0
- package/dist/chunk-DC4GIE7E.js.br +0 -0
- package/dist/chunk-DC4GIE7E.js.gz +0 -0
- package/dist/chunk-GLC2RPKN.mjs.br +0 -0
- package/dist/chunk-GLC2RPKN.mjs.gz +0 -0
- package/dist/chunk-IXCNYPFK.mjs.br +0 -0
- package/dist/chunk-IXCNYPFK.mjs.gz +0 -0
- package/dist/chunk-IXEHYABF.mjs.br +0 -0
- package/dist/chunk-IXEHYABF.mjs.gz +0 -0
- package/dist/chunk-LVGFV42Z.mjs.br +0 -0
- package/dist/chunk-LVGFV42Z.mjs.gz +0 -0
- package/dist/chunk-MQXKBH43.js.br +0 -0
- package/dist/chunk-MQXKBH43.js.gz +0 -0
- package/dist/chunk-RSNAGJTQ.js.br +0 -0
- package/dist/chunk-RSNAGJTQ.js.gz +0 -0
- package/dist/chunk-SBRSPTSA.js.br +0 -0
- package/dist/chunk-SBRSPTSA.js.gz +0 -0
- package/dist/chunk-U47SG5XL.js.br +0 -0
- package/dist/chunk-U47SG5XL.js.gz +0 -0
- package/dist/chunk-ZAO36XAK.mjs.br +0 -0
- package/dist/chunk-ZAO36XAK.mjs.gz +0 -0
|
@@ -36250,6 +36250,18 @@ function applyChartPivotSource(chartSpace, value, localName22) {
|
|
|
36250
36250
|
chartSpace[`${prefix}:pivotSource`] = node;
|
|
36251
36251
|
}
|
|
36252
36252
|
}
|
|
36253
|
+
function getElementTextContent(element) {
|
|
36254
|
+
if (!hasTextProperties(element)) {
|
|
36255
|
+
return "";
|
|
36256
|
+
}
|
|
36257
|
+
if (typeof element.text === "string") {
|
|
36258
|
+
return element.text;
|
|
36259
|
+
}
|
|
36260
|
+
if (!element.textSegments || element.textSegments.length === 0) {
|
|
36261
|
+
return "";
|
|
36262
|
+
}
|
|
36263
|
+
return element.textSegments.map((segment) => String(segment.text || "")).join("");
|
|
36264
|
+
}
|
|
36253
36265
|
var JUMP_VERB_MAP = {
|
|
36254
36266
|
nextslide: "nextSlide",
|
|
36255
36267
|
previousslide: "prevSlide",
|
|
@@ -85926,6 +85938,54 @@ function isIdentityRectClip(element) {
|
|
|
85926
85938
|
const shapeType = element.shapeType;
|
|
85927
85939
|
return shapeType !== void 0 && IDENTITY_RECT_PRESETS.has(shapeType.toLowerCase());
|
|
85928
85940
|
}
|
|
85941
|
+
function getCompoundLineOffsets(compoundLine, strokeWidth) {
|
|
85942
|
+
if (!compoundLine || compoundLine === "sng") {
|
|
85943
|
+
return [0];
|
|
85944
|
+
}
|
|
85945
|
+
const gap = Math.max(strokeWidth * 0.6, 1.5);
|
|
85946
|
+
if (compoundLine === "dbl") {
|
|
85947
|
+
return [-gap, gap];
|
|
85948
|
+
}
|
|
85949
|
+
if (compoundLine === "thickThin") {
|
|
85950
|
+
return [-gap * 0.6, gap];
|
|
85951
|
+
}
|
|
85952
|
+
if (compoundLine === "thinThick") {
|
|
85953
|
+
return [-gap, gap * 0.6];
|
|
85954
|
+
}
|
|
85955
|
+
if (compoundLine === "tri") {
|
|
85956
|
+
return [-gap, 0, gap];
|
|
85957
|
+
}
|
|
85958
|
+
return [0];
|
|
85959
|
+
}
|
|
85960
|
+
function getCompoundLineWidths(compoundLine, strokeWidth) {
|
|
85961
|
+
const base = Math.max(strokeWidth, 1);
|
|
85962
|
+
if (!compoundLine || compoundLine === "sng") {
|
|
85963
|
+
return [base];
|
|
85964
|
+
}
|
|
85965
|
+
if (compoundLine === "dbl") {
|
|
85966
|
+
return [base * 0.5, base * 0.5];
|
|
85967
|
+
}
|
|
85968
|
+
if (compoundLine === "thickThin") {
|
|
85969
|
+
return [base * 0.7, base * 0.3];
|
|
85970
|
+
}
|
|
85971
|
+
if (compoundLine === "thinThick") {
|
|
85972
|
+
return [base * 0.3, base * 0.7];
|
|
85973
|
+
}
|
|
85974
|
+
if (compoundLine === "tri") {
|
|
85975
|
+
return [base * 0.3, base * 0.4, base * 0.3];
|
|
85976
|
+
}
|
|
85977
|
+
return [base];
|
|
85978
|
+
}
|
|
85979
|
+
function svgLineCap(lineCap) {
|
|
85980
|
+
switch (lineCap) {
|
|
85981
|
+
case "flat":
|
|
85982
|
+
return "butt";
|
|
85983
|
+
case "sq":
|
|
85984
|
+
return "square";
|
|
85985
|
+
default:
|
|
85986
|
+
return "round";
|
|
85987
|
+
}
|
|
85988
|
+
}
|
|
85929
85989
|
function normalizeHexColor(value, fallback = DEFAULT_TEXT_COLOR) {
|
|
85930
85990
|
if (!value || value === "transparent") {
|
|
85931
85991
|
return fallback;
|
|
@@ -86583,145 +86643,6 @@ function resolveComputedFill(ss, element) {
|
|
|
86583
86643
|
}
|
|
86584
86644
|
return {};
|
|
86585
86645
|
}
|
|
86586
|
-
function round4(value) {
|
|
86587
|
-
return Math.round(value * 1e4) / 1e4;
|
|
86588
|
-
}
|
|
86589
|
-
function svgGradientId(elementId, suffix = "grad") {
|
|
86590
|
-
const seed = String(elementId).replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
86591
|
-
return `pptx-${suffix}-${seed}`;
|
|
86592
|
-
}
|
|
86593
|
-
function toSvgStops(stops) {
|
|
86594
|
-
return sanitizeGradientStops(stops).map((stop) => ({
|
|
86595
|
-
offset: round4(stop.position / 100),
|
|
86596
|
-
color: stop.color,
|
|
86597
|
-
...typeof stop.opacity === "number" ? { opacity: round4(stop.opacity) } : {}
|
|
86598
|
-
}));
|
|
86599
|
-
}
|
|
86600
|
-
function linearEndpoints(angleDegrees) {
|
|
86601
|
-
const radians = angleDegrees * Math.PI / 180;
|
|
86602
|
-
const dx = Math.cos(radians);
|
|
86603
|
-
const dy = Math.sin(radians);
|
|
86604
|
-
const span = (Math.abs(dx) + Math.abs(dy)) / 2;
|
|
86605
|
-
return {
|
|
86606
|
-
x1: round4(0.5 - dx * span),
|
|
86607
|
-
y1: round4(0.5 - dy * span),
|
|
86608
|
-
x2: round4(0.5 + dx * span),
|
|
86609
|
-
y2: round4(0.5 + dy * span)
|
|
86610
|
-
};
|
|
86611
|
-
}
|
|
86612
|
-
function buildFromSource(source, id) {
|
|
86613
|
-
const { stops } = source;
|
|
86614
|
-
if (stops.length === 0) {
|
|
86615
|
-
return void 0;
|
|
86616
|
-
}
|
|
86617
|
-
if ((source.type || "linear") === "radial") {
|
|
86618
|
-
const { cx, cy } = computeGradientCenter(source.fillToRect, source.focalPoint);
|
|
86619
|
-
const fx = cx / 100;
|
|
86620
|
-
const fy = cy / 100;
|
|
86621
|
-
const r = Math.hypot(Math.max(fx, 1 - fx), Math.max(fy, 1 - fy));
|
|
86622
|
-
return { kind: "radial", id, cx: round4(fx), cy: round4(fy), r: round4(r), stops };
|
|
86623
|
-
}
|
|
86624
|
-
const angle = typeof source.angle === "number" && Number.isFinite(source.angle) ? source.angle : 90;
|
|
86625
|
-
return { kind: "linear", id, ...linearEndpoints(angle), stops };
|
|
86626
|
-
}
|
|
86627
|
-
function buildSvgGradientDef(style, elementId) {
|
|
86628
|
-
if (!style || style.fillMode !== "gradient") {
|
|
86629
|
-
return void 0;
|
|
86630
|
-
}
|
|
86631
|
-
return buildFromSource(
|
|
86632
|
-
{
|
|
86633
|
-
stops: toSvgStops(style.fillGradientStops),
|
|
86634
|
-
type: style.fillGradientType,
|
|
86635
|
-
angle: style.fillGradientAngle,
|
|
86636
|
-
fillToRect: style.fillGradientFillToRect,
|
|
86637
|
-
focalPoint: style.fillGradientFocalPoint
|
|
86638
|
-
},
|
|
86639
|
-
svgGradientId(elementId)
|
|
86640
|
-
);
|
|
86641
|
-
}
|
|
86642
|
-
function buildSvgStrokeGradientDef(style, elementId) {
|
|
86643
|
-
if (!style || style.strokeFillMode !== "gradient") {
|
|
86644
|
-
return void 0;
|
|
86645
|
-
}
|
|
86646
|
-
return buildFromSource(
|
|
86647
|
-
{
|
|
86648
|
-
stops: toSvgStops(style.strokeGradientStops),
|
|
86649
|
-
type: style.strokeGradientType,
|
|
86650
|
-
angle: style.strokeGradientAngle
|
|
86651
|
-
},
|
|
86652
|
-
svgGradientId(elementId, "stroke")
|
|
86653
|
-
);
|
|
86654
|
-
}
|
|
86655
|
-
function buildSvgStrokePatternDef(style, elementId) {
|
|
86656
|
-
if (!style || style.strokeFillMode !== "pattern" || !style.strokePatternPreset) {
|
|
86657
|
-
return void 0;
|
|
86658
|
-
}
|
|
86659
|
-
const fg = normalizeHexColor(style.strokeColor, "#000000");
|
|
86660
|
-
const bg = normalizeHexColor(style.strokePatternBackgroundColor, "#ffffff");
|
|
86661
|
-
const tile = getPatternTile(style.strokePatternPreset, fg, bg);
|
|
86662
|
-
if (!tile) {
|
|
86663
|
-
return void 0;
|
|
86664
|
-
}
|
|
86665
|
-
const markup = `<svg xmlns="http://www.w3.org/2000/svg" width="${tile.w}" height="${tile.h}">${tile.inner}</svg>`;
|
|
86666
|
-
return {
|
|
86667
|
-
kind: "pattern",
|
|
86668
|
-
id: svgGradientId(elementId, "strokepat"),
|
|
86669
|
-
width: tile.w,
|
|
86670
|
-
height: tile.h,
|
|
86671
|
-
href: `data:image/svg+xml,${encodeURIComponent(markup)}`
|
|
86672
|
-
};
|
|
86673
|
-
}
|
|
86674
|
-
function svgGradientFillRef(def) {
|
|
86675
|
-
return `url(#${def.id})`;
|
|
86676
|
-
}
|
|
86677
|
-
function getCompoundLineOffsets(compoundLine, strokeWidth) {
|
|
86678
|
-
if (!compoundLine || compoundLine === "sng") {
|
|
86679
|
-
return [0];
|
|
86680
|
-
}
|
|
86681
|
-
const gap = Math.max(strokeWidth * 0.6, 1.5);
|
|
86682
|
-
if (compoundLine === "dbl") {
|
|
86683
|
-
return [-gap, gap];
|
|
86684
|
-
}
|
|
86685
|
-
if (compoundLine === "thickThin") {
|
|
86686
|
-
return [-gap * 0.6, gap];
|
|
86687
|
-
}
|
|
86688
|
-
if (compoundLine === "thinThick") {
|
|
86689
|
-
return [-gap, gap * 0.6];
|
|
86690
|
-
}
|
|
86691
|
-
if (compoundLine === "tri") {
|
|
86692
|
-
return [-gap, 0, gap];
|
|
86693
|
-
}
|
|
86694
|
-
return [0];
|
|
86695
|
-
}
|
|
86696
|
-
function getCompoundLineWidths(compoundLine, strokeWidth) {
|
|
86697
|
-
const base = Math.max(strokeWidth, 1);
|
|
86698
|
-
if (!compoundLine || compoundLine === "sng") {
|
|
86699
|
-
return [base];
|
|
86700
|
-
}
|
|
86701
|
-
if (compoundLine === "dbl") {
|
|
86702
|
-
return [base * 0.5, base * 0.5];
|
|
86703
|
-
}
|
|
86704
|
-
if (compoundLine === "thickThin") {
|
|
86705
|
-
return [base * 0.7, base * 0.3];
|
|
86706
|
-
}
|
|
86707
|
-
if (compoundLine === "thinThick") {
|
|
86708
|
-
return [base * 0.3, base * 0.7];
|
|
86709
|
-
}
|
|
86710
|
-
if (compoundLine === "tri") {
|
|
86711
|
-
return [base * 0.3, base * 0.4, base * 0.3];
|
|
86712
|
-
}
|
|
86713
|
-
return [base];
|
|
86714
|
-
}
|
|
86715
|
-
function svgLineCap(lineCap) {
|
|
86716
|
-
switch (lineCap) {
|
|
86717
|
-
case "flat":
|
|
86718
|
-
return "butt";
|
|
86719
|
-
case "sq":
|
|
86720
|
-
return "square";
|
|
86721
|
-
default:
|
|
86722
|
-
return "round";
|
|
86723
|
-
}
|
|
86724
|
-
}
|
|
86725
86646
|
function normalizeStrokeDashType(value) {
|
|
86726
86647
|
const normalized = String(value || "").trim().toLowerCase();
|
|
86727
86648
|
if (!normalized) {
|
|
@@ -86934,6 +86855,97 @@ function strokeOnlyPresetPathData(element) {
|
|
|
86934
86855
|
const stroked = paths.filter((path) => path.stroke !== false).map((path) => path.d);
|
|
86935
86856
|
return stroked.length > 0 ? stroked.join(" ") : void 0;
|
|
86936
86857
|
}
|
|
86858
|
+
function round4(value) {
|
|
86859
|
+
return Math.round(value * 1e4) / 1e4;
|
|
86860
|
+
}
|
|
86861
|
+
function svgGradientId(elementId, suffix = "grad") {
|
|
86862
|
+
const seed = String(elementId).replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
86863
|
+
return `pptx-${suffix}-${seed}`;
|
|
86864
|
+
}
|
|
86865
|
+
function toSvgStops(stops) {
|
|
86866
|
+
return sanitizeGradientStops(stops).map((stop) => ({
|
|
86867
|
+
offset: round4(stop.position / 100),
|
|
86868
|
+
color: stop.color,
|
|
86869
|
+
...typeof stop.opacity === "number" ? { opacity: round4(stop.opacity) } : {}
|
|
86870
|
+
}));
|
|
86871
|
+
}
|
|
86872
|
+
function linearEndpoints(angleDegrees) {
|
|
86873
|
+
const radians = angleDegrees * Math.PI / 180;
|
|
86874
|
+
const dx = Math.cos(radians);
|
|
86875
|
+
const dy = Math.sin(radians);
|
|
86876
|
+
const span = (Math.abs(dx) + Math.abs(dy)) / 2;
|
|
86877
|
+
return {
|
|
86878
|
+
x1: round4(0.5 - dx * span),
|
|
86879
|
+
y1: round4(0.5 - dy * span),
|
|
86880
|
+
x2: round4(0.5 + dx * span),
|
|
86881
|
+
y2: round4(0.5 + dy * span)
|
|
86882
|
+
};
|
|
86883
|
+
}
|
|
86884
|
+
function buildFromSource(source, id) {
|
|
86885
|
+
const { stops } = source;
|
|
86886
|
+
if (stops.length === 0) {
|
|
86887
|
+
return void 0;
|
|
86888
|
+
}
|
|
86889
|
+
if ((source.type || "linear") === "radial") {
|
|
86890
|
+
const { cx, cy } = computeGradientCenter(source.fillToRect, source.focalPoint);
|
|
86891
|
+
const fx = cx / 100;
|
|
86892
|
+
const fy = cy / 100;
|
|
86893
|
+
const r = Math.hypot(Math.max(fx, 1 - fx), Math.max(fy, 1 - fy));
|
|
86894
|
+
return { kind: "radial", id, cx: round4(fx), cy: round4(fy), r: round4(r), stops };
|
|
86895
|
+
}
|
|
86896
|
+
const angle = typeof source.angle === "number" && Number.isFinite(source.angle) ? source.angle : 90;
|
|
86897
|
+
return { kind: "linear", id, ...linearEndpoints(angle), stops };
|
|
86898
|
+
}
|
|
86899
|
+
function buildSvgGradientDef(style, elementId) {
|
|
86900
|
+
if (!style || style.fillMode !== "gradient") {
|
|
86901
|
+
return void 0;
|
|
86902
|
+
}
|
|
86903
|
+
return buildFromSource(
|
|
86904
|
+
{
|
|
86905
|
+
stops: toSvgStops(style.fillGradientStops),
|
|
86906
|
+
type: style.fillGradientType,
|
|
86907
|
+
angle: style.fillGradientAngle,
|
|
86908
|
+
fillToRect: style.fillGradientFillToRect,
|
|
86909
|
+
focalPoint: style.fillGradientFocalPoint
|
|
86910
|
+
},
|
|
86911
|
+
svgGradientId(elementId)
|
|
86912
|
+
);
|
|
86913
|
+
}
|
|
86914
|
+
function buildSvgStrokeGradientDef(style, elementId) {
|
|
86915
|
+
if (!style || style.strokeFillMode !== "gradient") {
|
|
86916
|
+
return void 0;
|
|
86917
|
+
}
|
|
86918
|
+
return buildFromSource(
|
|
86919
|
+
{
|
|
86920
|
+
stops: toSvgStops(style.strokeGradientStops),
|
|
86921
|
+
type: style.strokeGradientType,
|
|
86922
|
+
angle: style.strokeGradientAngle
|
|
86923
|
+
},
|
|
86924
|
+
svgGradientId(elementId, "stroke")
|
|
86925
|
+
);
|
|
86926
|
+
}
|
|
86927
|
+
function buildSvgStrokePatternDef(style, elementId) {
|
|
86928
|
+
if (!style || style.strokeFillMode !== "pattern" || !style.strokePatternPreset) {
|
|
86929
|
+
return void 0;
|
|
86930
|
+
}
|
|
86931
|
+
const fg = normalizeHexColor(style.strokeColor, "#000000");
|
|
86932
|
+
const bg = normalizeHexColor(style.strokePatternBackgroundColor, "#ffffff");
|
|
86933
|
+
const tile = getPatternTile(style.strokePatternPreset, fg, bg);
|
|
86934
|
+
if (!tile) {
|
|
86935
|
+
return void 0;
|
|
86936
|
+
}
|
|
86937
|
+
const markup = `<svg xmlns="http://www.w3.org/2000/svg" width="${tile.w}" height="${tile.h}">${tile.inner}</svg>`;
|
|
86938
|
+
return {
|
|
86939
|
+
kind: "pattern",
|
|
86940
|
+
id: svgGradientId(elementId, "strokepat"),
|
|
86941
|
+
width: tile.w,
|
|
86942
|
+
height: tile.h,
|
|
86943
|
+
href: `data:image/svg+xml,${encodeURIComponent(markup)}`
|
|
86944
|
+
};
|
|
86945
|
+
}
|
|
86946
|
+
function svgGradientFillRef(def) {
|
|
86947
|
+
return `url(#${def.id})`;
|
|
86948
|
+
}
|
|
86937
86949
|
var DEFAULT_OPEN_PRESET_STROKE_WIDTH = 2;
|
|
86938
86950
|
function outlinePathData(clipPath, width, height) {
|
|
86939
86951
|
if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0) {
|
|
@@ -87011,6 +87023,75 @@ function strokeOutlineViewBox(element) {
|
|
|
87011
87023
|
function suppressesCssBorder(element) {
|
|
87012
87024
|
return buildStrokeOutline(element) !== void 0;
|
|
87013
87025
|
}
|
|
87026
|
+
var HOLLOW_HIT_MIN_WIDTH = 10;
|
|
87027
|
+
function isHollowShapeElement(element) {
|
|
87028
|
+
if (element.type !== "shape" || !hasShapeProperties(element)) {
|
|
87029
|
+
return false;
|
|
87030
|
+
}
|
|
87031
|
+
const style = element.shapeStyle;
|
|
87032
|
+
const filled = style?.fillColor !== void 0 && style.fillColor !== "transparent" || style?.fillMode === "gradient" || style?.fillMode === "pattern" || style?.fillMode === "image" || style?.fillMode === "group" || Boolean(style?.fillGradient);
|
|
87033
|
+
if (filled) {
|
|
87034
|
+
return false;
|
|
87035
|
+
}
|
|
87036
|
+
return getElementTextContent(element).trim() === "";
|
|
87037
|
+
}
|
|
87038
|
+
function buildHollowHitOutline(element) {
|
|
87039
|
+
if (!isHollowShapeElement(element)) {
|
|
87040
|
+
return void 0;
|
|
87041
|
+
}
|
|
87042
|
+
const d = outlinePathData(getResolvedShapeClipPath(element), element.width, element.height);
|
|
87043
|
+
if (!d) {
|
|
87044
|
+
return void 0;
|
|
87045
|
+
}
|
|
87046
|
+
const strokeWidth = hasShapeProperties(element) ? element.shapeStyle?.strokeWidth ?? 0 : 0;
|
|
87047
|
+
return { d, strokeWidth: Math.max(strokeWidth * 3, HOLLOW_HIT_MIN_WIDTH) };
|
|
87048
|
+
}
|
|
87049
|
+
function createWheelStepBuffer() {
|
|
87050
|
+
return { accumulated: 0 };
|
|
87051
|
+
}
|
|
87052
|
+
var LINE_PX = 16;
|
|
87053
|
+
var PAGE_PX = 400;
|
|
87054
|
+
var STEP_THRESHOLD_PX = 120;
|
|
87055
|
+
var ZOOM_PER_PX = 15e-4;
|
|
87056
|
+
function normalizeWheelDelta({ deltaY, deltaMode = 0 }) {
|
|
87057
|
+
if (deltaMode === 1) {
|
|
87058
|
+
return deltaY * LINE_PX;
|
|
87059
|
+
}
|
|
87060
|
+
if (deltaMode === 2) {
|
|
87061
|
+
return deltaY * PAGE_PX;
|
|
87062
|
+
}
|
|
87063
|
+
return deltaY;
|
|
87064
|
+
}
|
|
87065
|
+
function accumulate(buffer, px3) {
|
|
87066
|
+
if (px3 !== 0 && Math.sign(px3) !== Math.sign(buffer.accumulated)) {
|
|
87067
|
+
buffer.accumulated = 0;
|
|
87068
|
+
}
|
|
87069
|
+
buffer.accumulated += px3;
|
|
87070
|
+
if (buffer.accumulated >= STEP_THRESHOLD_PX) {
|
|
87071
|
+
buffer.accumulated = 0;
|
|
87072
|
+
return { intent: "next-slide" };
|
|
87073
|
+
}
|
|
87074
|
+
if (buffer.accumulated <= -STEP_THRESHOLD_PX) {
|
|
87075
|
+
buffer.accumulated = 0;
|
|
87076
|
+
return { intent: "previous-slide" };
|
|
87077
|
+
}
|
|
87078
|
+
return { intent: "none" };
|
|
87079
|
+
}
|
|
87080
|
+
function mapEditingWheel(input, buffer, canScrollFurther) {
|
|
87081
|
+
const px3 = normalizeWheelDelta(input);
|
|
87082
|
+
if (input.ctrlKey === true || input.metaKey === true) {
|
|
87083
|
+
buffer.accumulated = 0;
|
|
87084
|
+
return { intent: "zoom", deltaScale: -px3 * ZOOM_PER_PX };
|
|
87085
|
+
}
|
|
87086
|
+
if (canScrollFurther) {
|
|
87087
|
+
buffer.accumulated = 0;
|
|
87088
|
+
return { intent: "scroll" };
|
|
87089
|
+
}
|
|
87090
|
+
return accumulate(buffer, px3);
|
|
87091
|
+
}
|
|
87092
|
+
function mapPresentationWheel(input, buffer) {
|
|
87093
|
+
return accumulate(buffer, normalizeWheelDelta(input));
|
|
87094
|
+
}
|
|
87014
87095
|
function hasStrokePaint(style) {
|
|
87015
87096
|
if (!style || Math.max(0, style.strokeWidth ?? 0) <= 0) {
|
|
87016
87097
|
return false;
|
|
@@ -92070,6 +92151,7 @@ function buildMultiLevelCategoryLabels(categoryLabels, categoryLevels, sourceInd
|
|
|
92070
92151
|
const direction = labelsAbove ? -1 : 1;
|
|
92071
92152
|
const fontPx = axis?.fontSize !== void 0 ? chartFontPx(axis.fontSize) : DEFAULT_CHART_TEXT_PX;
|
|
92072
92153
|
const bandHeight = Math.max(fontPx, 8) + 4;
|
|
92154
|
+
const baselineShift = labelsAbove ? -0.2 * fontPx : 0.8 * fontPx;
|
|
92073
92155
|
return levels.flatMap((level, levelIndex) => {
|
|
92074
92156
|
const values = sourceIndices2.map((sourceIndex) => level[sourceIndex] ?? "");
|
|
92075
92157
|
return groupedLabels(values).flatMap((group2) => {
|
|
@@ -92082,7 +92164,7 @@ function buildMultiLevelCategoryLabels(categoryLabels, categoryLevels, sourceInd
|
|
|
92082
92164
|
{
|
|
92083
92165
|
kind: "text",
|
|
92084
92166
|
x: (startX + endX) / 2,
|
|
92085
|
-
y: labelY + direction * (offset + levelIndex * bandHeight),
|
|
92167
|
+
y: labelY + direction * (offset + levelIndex * bandHeight) + baselineShift,
|
|
92086
92168
|
text: group2.text,
|
|
92087
92169
|
textAnchor,
|
|
92088
92170
|
...chartAxisTextStyle(axis)
|
|
@@ -95986,13 +96068,21 @@ function formatAxisValue2(val2, formatCode) {
|
|
|
95986
96068
|
}
|
|
95987
96069
|
return val2.toFixed(1);
|
|
95988
96070
|
}
|
|
96071
|
+
function categoryAxisBand(chartData) {
|
|
96072
|
+
const axis = chartData.axes?.find(
|
|
96073
|
+
(candidate) => candidate.axisType === "catAx" || candidate.axisType === "dateAx"
|
|
96074
|
+
);
|
|
96075
|
+
const fontPx = axis?.fontSize !== void 0 ? chartFontPx(axis.fontSize) : DEFAULT_CHART_TEXT_PX;
|
|
96076
|
+
const offset = 4 + 8 * ((axis?.labelOffset ?? 100) / 100);
|
|
96077
|
+
return Math.max(24, offset + fontPx * 1.2);
|
|
96078
|
+
}
|
|
95989
96079
|
function computePlotLayout(elementWidth, elementHeight, chartData, hasAxes, options) {
|
|
95990
96080
|
const svgWidth = Math.max(1, elementWidth);
|
|
95991
96081
|
const svgHeight = Math.max(1, elementHeight);
|
|
95992
96082
|
let plotLeft = hasAxes ? 48 : 8;
|
|
95993
96083
|
let plotTop = 8;
|
|
95994
96084
|
let plotRight = svgWidth - 8;
|
|
95995
|
-
let plotBottom = svgHeight - (hasAxes ?
|
|
96085
|
+
let plotBottom = svgHeight - (hasAxes ? categoryAxisBand(chartData) : 8);
|
|
95996
96086
|
const style = chartData.style;
|
|
95997
96087
|
const legendPos = style?.legendPosition ?? "b";
|
|
95998
96088
|
if (style?.hasTitle) {
|
|
@@ -109578,7 +109668,7 @@ function getRoundRectAdjustmentValue(element) {
|
|
|
109578
109668
|
}
|
|
109579
109669
|
return DEFAULT_ROUND_RECT_ADJUSTMENT;
|
|
109580
109670
|
}
|
|
109581
|
-
function
|
|
109671
|
+
function getRoundRectRadiusPx2(element) {
|
|
109582
109672
|
const normalizedAdjustment = getRoundRectAdjustmentValue(element) / SHAPE_ADJUSTMENT_MAX;
|
|
109583
109673
|
return Math.min(Math.max(element.width, 1), Math.max(element.height, 1)) * 0.5 * normalizedAdjustment;
|
|
109584
109674
|
}
|
|
@@ -109591,7 +109681,7 @@ function getShapeAdjustmentHandleDescriptor(element) {
|
|
|
109591
109681
|
return null;
|
|
109592
109682
|
}
|
|
109593
109683
|
const adjustmentValue = getRoundRectAdjustmentValue(element);
|
|
109594
|
-
const radiusPx =
|
|
109684
|
+
const radiusPx = getRoundRectRadiusPx2(element);
|
|
109595
109685
|
const maxWidth = Math.max(element.width, MIN_ELEMENT_SIZE5);
|
|
109596
109686
|
const handleInset = 5;
|
|
109597
109687
|
const left = Math.max(handleInset, Math.min(maxWidth - handleInset, Math.round(radiusPx)));
|
|
@@ -123386,6 +123476,7 @@ exports.buildElementClipboardPayload = buildElementClipboardPayload;
|
|
|
123386
123476
|
exports.buildFieldSubstitutionContext = buildFieldSubstitutionContext;
|
|
123387
123477
|
exports.buildGlowBoxShadow = buildGlowBoxShadow;
|
|
123388
123478
|
exports.buildHandoutsHtml = buildHandoutsHtml;
|
|
123479
|
+
exports.buildHollowHitOutline = buildHollowHitOutline;
|
|
123389
123480
|
exports.buildInitialGuides = buildInitialGuides;
|
|
123390
123481
|
exports.buildInnerShadowCssFromShapeStyle = buildInnerShadowCssFromShapeStyle;
|
|
123391
123482
|
exports.buildJoinCollaborationConfig = buildJoinCollaborationConfig;
|
|
@@ -123495,6 +123586,7 @@ exports.createSyncGate = createSyncGate;
|
|
|
123495
123586
|
exports.createTouchGestureRecognizer = createTouchGestureRecognizer;
|
|
123496
123587
|
exports.createViewerOptionsStore = createViewerOptionsStore;
|
|
123497
123588
|
exports.createViewerZoomStore = createViewerZoomStore;
|
|
123589
|
+
exports.createWheelStepBuffer = createWheelStepBuffer;
|
|
123498
123590
|
exports.customGeometryPathsToSvgSubpaths = customGeometryPathsToSvgSubpaths;
|
|
123499
123591
|
exports.defaultCssVars = defaultCssVars;
|
|
123500
123592
|
exports.defaultRadius = defaultRadius;
|
|
@@ -123596,7 +123688,7 @@ exports.getPendingSelectionRestore = getPendingSelectionRestore;
|
|
|
123596
123688
|
exports.getPresetShapeClipPath = getPresetShapeClipPath;
|
|
123597
123689
|
exports.getPrintableArea = getPrintableArea;
|
|
123598
123690
|
exports.getResolvedShapeClipPath = getResolvedShapeClipPath;
|
|
123599
|
-
exports.
|
|
123691
|
+
exports.getRoundRectRadiusPx2 = getRoundRectRadiusPx2;
|
|
123600
123692
|
exports.getSecondaryValueAxis = getSecondaryValueAxis;
|
|
123601
123693
|
exports.getSessionTabId = getSessionTabId;
|
|
123602
123694
|
exports.getShapeAdjustmentHandleDescriptor = getShapeAdjustmentHandleDescriptor;
|
|
@@ -123635,6 +123727,7 @@ exports.isEditorTextInputTarget = isEditorTextInputTarget;
|
|
|
123635
123727
|
exports.isElementActionable = isElementActionable;
|
|
123636
123728
|
exports.isElementRendered = isElementRendered;
|
|
123637
123729
|
exports.isExportAbortError = isExportAbortError;
|
|
123730
|
+
exports.isHollowShapeElement = isHollowShapeElement;
|
|
123638
123731
|
exports.isIdentityRectClip = isIdentityRectClip;
|
|
123639
123732
|
exports.isImageLikeElement = isImageLikeElement;
|
|
123640
123733
|
exports.isInkElement = isInkElement;
|
|
@@ -123656,9 +123749,11 @@ exports.loadAudienceContent = loadAudienceContent;
|
|
|
123656
123749
|
exports.loadSessionDeck = loadSessionDeck;
|
|
123657
123750
|
exports.makeCloneId = makeCloneId;
|
|
123658
123751
|
exports.makeSlideId = makeSlideId;
|
|
123752
|
+
exports.mapEditingWheel = mapEditingWheel;
|
|
123659
123753
|
exports.mapEditorKey = mapEditorKey;
|
|
123660
123754
|
exports.mapOutlineKey = mapOutlineKey;
|
|
123661
123755
|
exports.mapPresentationKey = mapPresentationKey;
|
|
123756
|
+
exports.mapPresentationWheel = mapPresentationWheel;
|
|
123662
123757
|
exports.mayLeaveSlideShow = mayLeaveSlideShow;
|
|
123663
123758
|
exports.mediaPlaybackAttributes = mediaPlaybackAttributes;
|
|
123664
123759
|
exports.mediaTransportVisible = mediaTransportVisible;
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkP3Y3OMAD_js = require('./chunk-P3Y3OMAD.js');
|
|
4
4
|
var chunk4VNS5WPM_js = require('./chunk-4VNS5WPM.js');
|
|
5
5
|
var mcp = require('pptx-viewer-mcp');
|
|
6
6
|
var mcpSchemas = require('pptx-viewer-mcp/schemas');
|
|
@@ -14879,7 +14879,7 @@ async function buildSlideMarkdown(slides, slideIndex2, meta3, options = {}) {
|
|
|
14879
14879
|
};
|
|
14880
14880
|
let markdown;
|
|
14881
14881
|
try {
|
|
14882
|
-
const converter = new
|
|
14882
|
+
const converter = new chunkP3Y3OMAD_js.PptxMarkdownConverter(
|
|
14883
14883
|
"",
|
|
14884
14884
|
{
|
|
14885
14885
|
sourceName: meta3.title ?? "deck.pptx",
|
|
@@ -15471,7 +15471,7 @@ var getTheme = (ctx) => {
|
|
|
15471
15471
|
name: theme?.name,
|
|
15472
15472
|
colorScheme: theme?.colorScheme,
|
|
15473
15473
|
fontScheme: theme?.fontScheme,
|
|
15474
|
-
availablePresets: Object.keys(
|
|
15474
|
+
availablePresets: Object.keys(chunkP3Y3OMAD_js.ThemePresets)
|
|
15475
15475
|
};
|
|
15476
15476
|
};
|
|
15477
15477
|
var readExecutors = {
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cloneHistorySnapshot, MIN_ELEMENT_SIZE, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, partitionTemplateElements, UNGROUPED_SECTION_ID, buildSaveSlides, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, executeMediaCommand, buildPdfFromImageData, buildNotesPdf, EMU_PER_PX, GRID_SIZE, DEFAULT_TEXT_FONT_SIZE } from './chunk-
|
|
1
|
+
import { cloneHistorySnapshot, MIN_ELEMENT_SIZE, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, partitionTemplateElements, UNGROUPED_SECTION_ID, buildSaveSlides, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, executeMediaCommand, buildPdfFromImageData, buildNotesPdf, EMU_PER_PX, GRID_SIZE, DEFAULT_TEXT_FONT_SIZE } from './chunk-FFBY2TKD.mjs';
|
|
2
2
|
import { translationsEn } from './chunk-5YV26HMJ.mjs';
|
|
3
|
-
import { TOOLBAR_TABS, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createPresenceProjector, BROADCAST_THROTTLE_MS, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, createViewerZoomStore, clampZoomScale, PresentationAnimationController, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, createPresenterShowGuard, attachPresentationVisibilityPause, buildMorphTransitionPlan, morphOptionToMode, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, collectMediaElements, collectImagePaths, buildInitialGuides, EncryptedFileError, saveAutosaveSnapshot, isTemplateElementId, hasShapeProperties, hasTextProperties, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, normalizeColorsForCapture, preprocessCssForCapture, downloadBlob, sanitizeDownloadFilename, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, detectTouchDevice, detectOrientation, isMobileViewport, MOBILE_BREAKPOINT, TABLET_BREAKPOINT, mayLeaveSlideShow, stopAllPersistentAudio, remapTextToSegments, guidePxToEmu, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, mapEditorKey, isEditorTextInputTarget, createViewerOptionsStore, readSlidesFromYDoc, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, shouldAutoFollowBroadcaster, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, openPptxFile, readBackstageRecentFile, isActionHidden, buildElementClipboardPayload, generatePackageReadme, exportDeckJson, groupElements, generateElementId, makeCloneId, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, mapPresentationKey, lastShowSlideIndex, firstShowSlideIndex, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, buildThemeColorMap, reResolveSlideColors, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, runPresentationAction, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, encodeGif, resolveShowSlideIndexes, groupSlidesBySection, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, cloneElementForPaste, computeScrollDelta, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, buildPrintHtmlDocument, deleteTableColumn, rebuildTableStructureInRawXml, insertTableColumn, deleteTableRow, insertTableRow, updateCellTextStyleInRawXml, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, isPpactionUrl, parsePpactionUrl, safeOpenUrl, ACTION_BUTTON_PRESETS, elementActionToPptxAction, buildSmartArtPresetData, computeSnapToShape, publishLiveGeometry, computeMarqueeHitIds, mergeAdditiveSelection, applyResize, snapBoxToGrid, applyMotionPathPreset } from './chunk-
|
|
3
|
+
import { TOOLBAR_TABS, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createPresenceProjector, BROADCAST_THROTTLE_MS, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, PresentationAnimationController, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, createPresenterShowGuard, attachPresentationVisibilityPause, buildMorphTransitionPlan, morphOptionToMode, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, collectMediaElements, collectImagePaths, buildInitialGuides, EncryptedFileError, saveAutosaveSnapshot, isTemplateElementId, hasShapeProperties, hasTextProperties, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, normalizeColorsForCapture, preprocessCssForCapture, downloadBlob, sanitizeDownloadFilename, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, detectTouchDevice, detectOrientation, isMobileViewport, MOBILE_BREAKPOINT, TABLET_BREAKPOINT, mayLeaveSlideShow, stopAllPersistentAudio, remapTextToSegments, guidePxToEmu, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, mapEditorKey, isEditorTextInputTarget, createViewerOptionsStore, readSlidesFromYDoc, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, shouldAutoFollowBroadcaster, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, openPptxFile, readBackstageRecentFile, isActionHidden, buildElementClipboardPayload, generatePackageReadme, exportDeckJson, groupElements, generateElementId, makeCloneId, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, mapPresentationKey, lastShowSlideIndex, firstShowSlideIndex, mapPresentationWheel, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, buildThemeColorMap, reResolveSlideColors, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, runPresentationAction, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, encodeGif, resolveShowSlideIndexes, groupSlidesBySection, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, cloneElementForPaste, computeScrollDelta, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, buildPrintHtmlDocument, deleteTableColumn, rebuildTableStructureInRawXml, insertTableColumn, deleteTableRow, insertTableRow, updateCellTextStyleInRawXml, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, isPpactionUrl, parsePpactionUrl, safeOpenUrl, ACTION_BUTTON_PRESETS, elementActionToPptxAction, buildSmartArtPresetData, computeSnapToShape, publishLiveGeometry, computeMarqueeHitIds, mergeAdditiveSelection, applyResize, snapBoxToGrid, applyMotionPathPreset } from './chunk-OIITLGKQ.mjs';
|
|
4
4
|
import { useRef, useState, useEffect, useCallback, useMemo, useLayoutEffect, useSyncExternalStore, useImperativeHandle } from 'react';
|
|
5
5
|
import JSZip from 'jszip';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
@@ -720,6 +720,7 @@ function useZoomViewport({
|
|
|
720
720
|
const canvasStageRef = useRef(null);
|
|
721
721
|
const canvasViewportRef = useRef(null);
|
|
722
722
|
const renderScaleRef = useRef(1);
|
|
723
|
+
const wheelBufferRef = useRef(createWheelStepBuffer());
|
|
723
724
|
const storeRef = useRef(null);
|
|
724
725
|
storeRef.current ??= createViewerZoomStore();
|
|
725
726
|
const store = storeRef.current;
|
|
@@ -858,14 +859,14 @@ function useZoomViewport({
|
|
|
858
859
|
]);
|
|
859
860
|
const handleWheel = useCallback(
|
|
860
861
|
(event) => {
|
|
861
|
-
|
|
862
|
+
const mapped = mapEditingWheel(event, wheelBufferRef.current, true);
|
|
863
|
+
if (mapped.intent !== "zoom") {
|
|
862
864
|
return;
|
|
863
865
|
}
|
|
864
866
|
event.preventDefault();
|
|
865
|
-
const delta = event.deltaY * -1e-3;
|
|
866
867
|
store.dispatch({
|
|
867
868
|
type: "set-zoom",
|
|
868
|
-
zoom: clampZoomScale(store.getState().zoom +
|
|
869
|
+
zoom: clampZoomScale(store.getState().zoom + mapped.deltaScale)
|
|
869
870
|
});
|
|
870
871
|
},
|
|
871
872
|
[store]
|
|
@@ -1655,6 +1656,7 @@ function useAudienceMode(input) {
|
|
|
1655
1656
|
}, []);
|
|
1656
1657
|
}
|
|
1657
1658
|
function usePresentationKeyboard(input) {
|
|
1659
|
+
const wheelBufferRef = useRef(createWheelStepBuffer());
|
|
1658
1660
|
const {
|
|
1659
1661
|
mode,
|
|
1660
1662
|
movePresentationSlide,
|
|
@@ -1740,9 +1742,24 @@ function usePresentationKeyboard(input) {
|
|
|
1740
1742
|
break;
|
|
1741
1743
|
}
|
|
1742
1744
|
};
|
|
1745
|
+
const handleWheel = (event) => {
|
|
1746
|
+
if (mode !== "present" || !acceptsPresentationInput()) {
|
|
1747
|
+
return;
|
|
1748
|
+
}
|
|
1749
|
+
const mapped = mapPresentationWheel(event, wheelBufferRef.current);
|
|
1750
|
+
if (mapped.intent === "next-slide") {
|
|
1751
|
+
event.preventDefault();
|
|
1752
|
+
movePresentationSlide(1);
|
|
1753
|
+
} else if (mapped.intent === "previous-slide") {
|
|
1754
|
+
event.preventDefault();
|
|
1755
|
+
movePresentationSlide(-1);
|
|
1756
|
+
}
|
|
1757
|
+
};
|
|
1743
1758
|
window.addEventListener("keydown", handleKeyDown);
|
|
1759
|
+
window.addEventListener("wheel", handleWheel, { passive: false });
|
|
1744
1760
|
return () => {
|
|
1745
1761
|
window.removeEventListener("keydown", handleKeyDown);
|
|
1762
|
+
window.removeEventListener("wheel", handleWheel);
|
|
1746
1763
|
};
|
|
1747
1764
|
}, [
|
|
1748
1765
|
mode,
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ThemePresets, PptxMarkdownConverter } from './chunk-
|
|
1
|
+
import { ThemePresets, PptxMarkdownConverter } from './chunk-OIITLGKQ.mjs';
|
|
2
2
|
import { __export } from './chunk-XGB3TDIC.mjs';
|
|
3
3
|
import * as mcp from 'pptx-viewer-mcp';
|
|
4
4
|
import * as mcpSchemas from 'pptx-viewer-mcp/schemas';
|
|
Binary file
|
|
Binary file
|