pptx-react-viewer 2.11.1 → 2.12.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 +2 -0
- package/dist/{AiChatPanel-RMQIJDUJ.mjs → AiChatPanel-CS4CONUO.mjs} +4 -4
- package/dist/AiChatPanel-CS4CONUO.mjs.br +0 -0
- package/dist/AiChatPanel-CS4CONUO.mjs.gz +0 -0
- package/dist/{AiChatPanel-E6W3EACA.js → AiChatPanel-JIXSOZXN.js} +23 -23
- package/dist/AiChatPanel-JIXSOZXN.js.br +0 -0
- package/dist/AiChatPanel-JIXSOZXN.js.gz +0 -0
- package/dist/{Model3DScene-U4B4NZJT.js → Model3DScene-5KMJ4JL6.js} +2 -2
- package/dist/{Model3DScene-U4B4NZJT.js.br → Model3DScene-5KMJ4JL6.js.br} +0 -0
- package/dist/Model3DScene-5KMJ4JL6.js.gz +0 -0
- package/dist/{Model3DScene-WHSHBMR5.mjs → Model3DScene-RWFPSN6B.mjs} +1 -1
- package/dist/Model3DScene-RWFPSN6B.mjs.br +0 -0
- package/dist/Model3DScene-RWFPSN6B.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-77JP5XH5.mjs → SurfaceChart3DScene-2GZQM3LN.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-77JP5XH5.mjs.br → SurfaceChart3DScene-2GZQM3LN.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-2GZQM3LN.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-5S43UBRD.js → SurfaceChart3DScene-BIOKIETC.js} +2 -2
- package/dist/SurfaceChart3DScene-BIOKIETC.js.br +0 -0
- package/dist/SurfaceChart3DScene-BIOKIETC.js.gz +0 -0
- package/dist/{chunk-FAP6OPLL.js → chunk-2VUHJNWM.js} +243 -284
- package/dist/chunk-2VUHJNWM.js.br +0 -0
- package/dist/chunk-2VUHJNWM.js.gz +0 -0
- package/dist/{chunk-IOVOQ6ZJ.js → chunk-3GNSGGY2.js} +288 -1
- package/dist/chunk-3GNSGGY2.js.br +0 -0
- package/dist/chunk-3GNSGGY2.js.gz +0 -0
- package/dist/{chunk-NJ4PTG4F.mjs → chunk-AOED5MFM.mjs} +18 -39
- package/dist/chunk-AOED5MFM.mjs.br +0 -0
- package/dist/chunk-AOED5MFM.mjs.gz +0 -0
- package/dist/{chunk-PXYZFWDA.mjs → chunk-BJQSHVYH.mjs} +86 -61
- package/dist/chunk-BJQSHVYH.mjs.br +0 -0
- package/dist/chunk-BJQSHVYH.mjs.gz +0 -0
- package/dist/{chunk-DD54KUDG.mjs → chunk-CEUHGUZ4.mjs} +5 -46
- package/dist/chunk-CEUHGUZ4.mjs.br +0 -0
- package/dist/chunk-CEUHGUZ4.mjs.gz +0 -0
- package/dist/{chunk-RHR7GTDX.mjs → chunk-ECDKYPQ2.mjs} +288 -1
- package/dist/chunk-ECDKYPQ2.mjs.br +0 -0
- package/dist/chunk-ECDKYPQ2.mjs.gz +0 -0
- package/dist/{chunk-HF6L2CTF.mjs → chunk-EJRHYYKE.mjs} +1 -1
- package/dist/chunk-EJRHYYKE.mjs.br +0 -0
- package/dist/chunk-EJRHYYKE.mjs.gz +0 -0
- package/dist/{chunk-KDJBWJJH.js → chunk-PJUQQF3I.js} +328 -52
- package/dist/chunk-PJUQQF3I.js.br +0 -0
- package/dist/chunk-PJUQQF3I.js.gz +0 -0
- package/dist/{chunk-QT6BPOZM.js → chunk-PTGTFXPU.js} +345 -366
- package/dist/chunk-PTGTFXPU.js.br +0 -0
- package/dist/chunk-PTGTFXPU.js.gz +0 -0
- package/dist/{chunk-FV7HEYCX.mjs → chunk-QGHC65C4.mjs} +320 -53
- package/dist/chunk-QGHC65C4.mjs.br +0 -0
- package/dist/chunk-QGHC65C4.mjs.gz +0 -0
- package/dist/{chunk-IXBM3HWH.js → chunk-SP7U34QM.js} +1064 -1039
- package/dist/chunk-SP7U34QM.js.br +0 -0
- package/dist/chunk-SP7U34QM.js.gz +0 -0
- package/dist/{chunk-X3SFCKAF.js → chunk-ZIXSSQAZ.js} +3 -3
- package/dist/chunk-ZIXSSQAZ.js.br +0 -0
- package/dist/chunk-ZIXSSQAZ.js.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.js +36 -36
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.js +79 -79
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.js +22 -22
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-E6W3EACA.js.br +0 -0
- package/dist/AiChatPanel-E6W3EACA.js.gz +0 -0
- package/dist/AiChatPanel-RMQIJDUJ.mjs.br +0 -0
- package/dist/AiChatPanel-RMQIJDUJ.mjs.gz +0 -0
- package/dist/Model3DScene-U4B4NZJT.js.gz +0 -0
- package/dist/Model3DScene-WHSHBMR5.mjs.br +0 -0
- package/dist/Model3DScene-WHSHBMR5.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-5S43UBRD.js.br +0 -0
- package/dist/SurfaceChart3DScene-5S43UBRD.js.gz +0 -0
- package/dist/SurfaceChart3DScene-77JP5XH5.mjs.gz +0 -0
- package/dist/chunk-DD54KUDG.mjs.br +0 -0
- package/dist/chunk-DD54KUDG.mjs.gz +0 -0
- package/dist/chunk-FAP6OPLL.js.br +0 -0
- package/dist/chunk-FAP6OPLL.js.gz +0 -0
- package/dist/chunk-FV7HEYCX.mjs.br +0 -0
- package/dist/chunk-FV7HEYCX.mjs.gz +0 -0
- package/dist/chunk-HF6L2CTF.mjs.br +0 -0
- package/dist/chunk-HF6L2CTF.mjs.gz +0 -0
- package/dist/chunk-IOVOQ6ZJ.js.br +0 -0
- package/dist/chunk-IOVOQ6ZJ.js.gz +0 -0
- package/dist/chunk-IXBM3HWH.js.br +0 -0
- package/dist/chunk-IXBM3HWH.js.gz +0 -0
- package/dist/chunk-KDJBWJJH.js.br +0 -0
- package/dist/chunk-KDJBWJJH.js.gz +0 -0
- package/dist/chunk-NJ4PTG4F.mjs.br +0 -0
- package/dist/chunk-NJ4PTG4F.mjs.gz +0 -0
- package/dist/chunk-PXYZFWDA.mjs.br +0 -0
- package/dist/chunk-PXYZFWDA.mjs.gz +0 -0
- package/dist/chunk-QT6BPOZM.js.br +0 -0
- package/dist/chunk-QT6BPOZM.js.gz +0 -0
- package/dist/chunk-RHR7GTDX.mjs.br +0 -0
- package/dist/chunk-RHR7GTDX.mjs.gz +0 -0
- package/dist/chunk-X3SFCKAF.js.br +0 -0
- package/dist/chunk-X3SFCKAF.js.gz +0 -0
|
@@ -15931,6 +15931,15 @@ var MC_NAMESPACE_CAPABILITIES = {
|
|
|
15931
15931
|
"hiddenFill",
|
|
15932
15932
|
"hiddenLine"
|
|
15933
15933
|
]),
|
|
15934
|
+
// PowerPoint 2016+ writes the Morph transition as `<p159:morph @option>`,
|
|
15935
|
+
// either inside an `mc:Choice Requires="p159"` or in a `p:transition/p:extLst`
|
|
15936
|
+
// extension. Both forms are parsed (see `PptxSlideTransitionService`), so the
|
|
15937
|
+
// choice IS supported: without this entry every morph slide reported
|
|
15938
|
+
// `UNSUPPORTED_ALTERNATE_CONTENT_CHOICE`, which reads as "the transition was
|
|
15939
|
+
// dropped and the fallback fade was used" when in fact the morph plays.
|
|
15940
|
+
// `morph` alone is listed on purpose: any OTHER `p159:*` element still makes
|
|
15941
|
+
// the choice unsupported and falls back, which is the honest answer.
|
|
15942
|
+
p159: /* @__PURE__ */ new Set(["morph"]),
|
|
15934
15943
|
a14: /* @__PURE__ */ new Set(["m", "hiddenFill", "hiddenLine", "imgEffect", "imgLayer"]),
|
|
15935
15944
|
a16: /* @__PURE__ */ new Set(["svgBlip", "colId"]),
|
|
15936
15945
|
asvg: /* @__PURE__ */ new Set(["svgBlip"]),
|
|
@@ -93072,6 +93081,28 @@ var DIRECTIONAL_PRESETS = /* @__PURE__ */ new Set([
|
|
|
93072
93081
|
"floatIn",
|
|
93073
93082
|
"peekIn"
|
|
93074
93083
|
]);
|
|
93084
|
+
function animationPresetLabelKey(preset) {
|
|
93085
|
+
return `pptx.animation.preset.${preset}`;
|
|
93086
|
+
}
|
|
93087
|
+
function animationCatalogPresetSlug(presetId) {
|
|
93088
|
+
return presetId.split(".").map((part, index) => index === 0 ? part : part.charAt(0).toUpperCase() + part.slice(1)).join("");
|
|
93089
|
+
}
|
|
93090
|
+
function animationCatalogPresetLabelKey(presetId) {
|
|
93091
|
+
return `pptx.animation.catalogPreset.${animationCatalogPresetSlug(presetId)}`;
|
|
93092
|
+
}
|
|
93093
|
+
function isAnimationCatalogPresetId(token2) {
|
|
93094
|
+
return token2.includes(".");
|
|
93095
|
+
}
|
|
93096
|
+
function animationEffectLabelKey(anim) {
|
|
93097
|
+
const token2 = anim.entrance ?? anim.emphasis ?? anim.exit;
|
|
93098
|
+
if (!token2 || token2 === "none") {
|
|
93099
|
+
return anim.motionPath ? "pptx.animation.motionPath.label" : "pptx.animation.animation";
|
|
93100
|
+
}
|
|
93101
|
+
return isAnimationCatalogPresetId(token2) ? animationCatalogPresetLabelKey(token2) : animationPresetLabelKey(token2);
|
|
93102
|
+
}
|
|
93103
|
+
function animationEffectLabel(anim, translate) {
|
|
93104
|
+
return translate(animationEffectLabelKey(anim));
|
|
93105
|
+
}
|
|
93075
93106
|
var PRESET_ID_TO_EFFECT = {
|
|
93076
93107
|
entr: {
|
|
93077
93108
|
1: "appear",
|
|
@@ -97800,6 +97831,45 @@ function computeMarqueeHitIds(marquee, elements, minSize = MIN_ELEMENT_SIZE) {
|
|
|
97800
97831
|
function mergeAdditiveSelection(baseSelectionIds, hitIds) {
|
|
97801
97832
|
return Array.from(/* @__PURE__ */ new Set([...baseSelectionIds ?? [], ...hitIds]));
|
|
97802
97833
|
}
|
|
97834
|
+
function getImageFitStyle(el) {
|
|
97835
|
+
const uncropped = {
|
|
97836
|
+
width: "100%",
|
|
97837
|
+
height: "100%",
|
|
97838
|
+
objectFit: "cover"
|
|
97839
|
+
};
|
|
97840
|
+
if (!isImageLikeElement(el)) {
|
|
97841
|
+
return uncropped;
|
|
97842
|
+
}
|
|
97843
|
+
const cropLeft = clampCropValue(el.cropLeft);
|
|
97844
|
+
const cropTop = clampCropValue(el.cropTop);
|
|
97845
|
+
const cropRight = clampCropValue(el.cropRight);
|
|
97846
|
+
const cropBottom = clampCropValue(el.cropBottom);
|
|
97847
|
+
if (cropLeft + cropRight <= 1e-4 && cropTop + cropBottom <= 1e-4) {
|
|
97848
|
+
return uncropped;
|
|
97849
|
+
}
|
|
97850
|
+
const horizontalScale = cropLeft + cropRight >= 0.99 ? 0.99 / (cropLeft + cropRight) : 1;
|
|
97851
|
+
const verticalScale = cropTop + cropBottom >= 0.99 ? 0.99 / (cropTop + cropBottom) : 1;
|
|
97852
|
+
const left = clampCropValue(cropLeft * horizontalScale);
|
|
97853
|
+
const right = clampCropValue(cropRight * horizontalScale);
|
|
97854
|
+
const top = clampCropValue(cropTop * verticalScale);
|
|
97855
|
+
const bottom = clampCropValue(cropBottom * verticalScale);
|
|
97856
|
+
const remainingWidth = Math.max(0.01, 1 - left - right);
|
|
97857
|
+
const remainingHeight = Math.max(0.01, 1 - top - bottom);
|
|
97858
|
+
const tx = Math.round(-left / remainingWidth * 1e4) / 100;
|
|
97859
|
+
const ty = Math.round(-top / remainingHeight * 1e4) / 100;
|
|
97860
|
+
const sx = Math.round(1 / remainingWidth * 1e6) / 1e6;
|
|
97861
|
+
const sy = Math.round(1 / remainingHeight * 1e6) / 1e6;
|
|
97862
|
+
return {
|
|
97863
|
+
position: "absolute",
|
|
97864
|
+
width: "100%",
|
|
97865
|
+
height: "100%",
|
|
97866
|
+
maxWidth: "none",
|
|
97867
|
+
maxHeight: "none",
|
|
97868
|
+
objectFit: "fill",
|
|
97869
|
+
transformOrigin: "top left",
|
|
97870
|
+
transform: `translate(${tx}%, ${ty}%) scale(${sx}, ${sy})`
|
|
97871
|
+
};
|
|
97872
|
+
}
|
|
97803
97873
|
function groupElements(elements, ids, groupId) {
|
|
97804
97874
|
const idSet = new Set(ids);
|
|
97805
97875
|
const gathered = [];
|
|
@@ -107518,9 +107588,117 @@ async function openNativeEyeDropper() {
|
|
|
107518
107588
|
return null;
|
|
107519
107589
|
}
|
|
107520
107590
|
}
|
|
107591
|
+
var PEN_COLORS = [
|
|
107592
|
+
"#ff0000",
|
|
107593
|
+
"#0000ff",
|
|
107594
|
+
"#00aa00",
|
|
107595
|
+
"#ff8800",
|
|
107596
|
+
"#ffffff",
|
|
107597
|
+
"#000000",
|
|
107598
|
+
"#ff00ff",
|
|
107599
|
+
"#00cccc"
|
|
107600
|
+
];
|
|
107601
|
+
var HIGHLIGHTER_COLORS = [
|
|
107602
|
+
"#ffff00",
|
|
107603
|
+
"#00ff00",
|
|
107604
|
+
"#ff69b4",
|
|
107605
|
+
"#00bfff",
|
|
107606
|
+
"#ff8c00",
|
|
107607
|
+
"#adff2f",
|
|
107608
|
+
"#ff6347",
|
|
107609
|
+
"#87ceeb"
|
|
107610
|
+
];
|
|
107521
107611
|
function formatSlideCounter(currentSlide, totalSlides) {
|
|
107522
107612
|
return `${currentSlide + 1} / ${totalSlides}`;
|
|
107523
107613
|
}
|
|
107614
|
+
var PRESENT_TOOLBAR_CONTROLS = [
|
|
107615
|
+
{
|
|
107616
|
+
id: "previous",
|
|
107617
|
+
kind: "button",
|
|
107618
|
+
labelKey: "pptx.presenter.previousSlide",
|
|
107619
|
+
icon: "chevron-left"
|
|
107620
|
+
},
|
|
107621
|
+
{ id: "counter", kind: "counter" },
|
|
107622
|
+
{ id: "next", kind: "button", labelKey: "pptx.presenter.nextSlide", icon: "chevron-right" },
|
|
107623
|
+
{ id: "divider-navigation", kind: "divider" },
|
|
107624
|
+
{ id: "timer", kind: "timer", labelKey: "pptx.presenter.elapsed", icon: "timer" },
|
|
107625
|
+
{ id: "divider-timer", kind: "divider" },
|
|
107626
|
+
{
|
|
107627
|
+
id: "laser",
|
|
107628
|
+
kind: "toggle",
|
|
107629
|
+
labelKey: "pptx.presentation.laserPointer",
|
|
107630
|
+
icon: "mouse-pointer-2"
|
|
107631
|
+
},
|
|
107632
|
+
{ id: "pen", kind: "toggle", labelKey: "pptx.presentation.pen", icon: "pen-tool" },
|
|
107633
|
+
{
|
|
107634
|
+
id: "pen-color",
|
|
107635
|
+
kind: "caret",
|
|
107636
|
+
labelKey: "pptx.presentationToolbar.penColor",
|
|
107637
|
+
icon: "chevron-down"
|
|
107638
|
+
},
|
|
107639
|
+
{
|
|
107640
|
+
id: "highlighter",
|
|
107641
|
+
kind: "toggle",
|
|
107642
|
+
labelKey: "pptx.presentation.highlighter",
|
|
107643
|
+
icon: "highlighter"
|
|
107644
|
+
},
|
|
107645
|
+
{
|
|
107646
|
+
id: "highlighter-color",
|
|
107647
|
+
kind: "caret",
|
|
107648
|
+
labelKey: "pptx.presentationToolbar.highlighterColor",
|
|
107649
|
+
icon: "chevron-down"
|
|
107650
|
+
},
|
|
107651
|
+
{ id: "eraser", kind: "toggle", labelKey: "pptx.presentation.eraser", icon: "eraser" },
|
|
107652
|
+
{ id: "clear", kind: "button", labelKey: "pptx.presentation.clearAnnotations", icon: "trash-2" },
|
|
107653
|
+
{ id: "divider-tools", kind: "divider" },
|
|
107654
|
+
{
|
|
107655
|
+
id: "presenter-view",
|
|
107656
|
+
kind: "toggle",
|
|
107657
|
+
labelKey: "pptx.presenter.presenterView",
|
|
107658
|
+
icon: "panel-right"
|
|
107659
|
+
},
|
|
107660
|
+
{ id: "end", kind: "button", labelKey: "pptx.presenter.endPresentation", icon: "x" }
|
|
107661
|
+
];
|
|
107662
|
+
PRESENT_TOOLBAR_CONTROLS.map(
|
|
107663
|
+
(control) => control.id
|
|
107664
|
+
);
|
|
107665
|
+
PRESENT_TOOLBAR_CONTROLS.flatMap(
|
|
107666
|
+
(control) => control.labelKey === void 0 ? [] : [control.labelKey]
|
|
107667
|
+
);
|
|
107668
|
+
var PRESENT_TOOLBAR_CLASSES = {
|
|
107669
|
+
/** The floating bar itself. */
|
|
107670
|
+
container: "flex items-center gap-1 px-3 py-2 rounded-xl bg-neutral-900/90 backdrop-blur-md border border-white/15 shadow-2xl",
|
|
107671
|
+
/** The auto-hiding positioner the bar sits in. */
|
|
107672
|
+
wrapper: "absolute bottom-6 left-1/2 -translate-x-1/2 z-[80] transition-opacity duration-300",
|
|
107673
|
+
/** Navigation / action button. */
|
|
107674
|
+
button: "flex items-center justify-center w-9 h-9 rounded-md transition-colors text-white/70 hover:text-white hover:bg-white/10 disabled:text-white/20 disabled:cursor-not-allowed",
|
|
107675
|
+
/** Annotation-tool toggle, inactive. */
|
|
107676
|
+
toggle: "relative flex items-center justify-center w-9 h-9 rounded-md transition-colors text-white/70 hover:text-white hover:bg-white/10",
|
|
107677
|
+
/** Annotation-tool toggle, active. */
|
|
107678
|
+
toggleActive: "relative flex items-center justify-center w-9 h-9 rounded-md transition-colors bg-white/25 text-white",
|
|
107679
|
+
/** Colour caret beside a tool toggle. */
|
|
107680
|
+
caret: "flex items-center justify-center w-7 h-9 -ml-1 rounded-r-md transition-colors text-white/50 hover:text-white hover:bg-white/10",
|
|
107681
|
+
/** Vertical hairline between groups. */
|
|
107682
|
+
divider: "w-px h-6 bg-white/20 mx-1",
|
|
107683
|
+
/** Slide counter. */
|
|
107684
|
+
counter: "text-xs font-mono tabular-nums text-white/80 px-1.5 select-none min-w-[48px] text-center",
|
|
107685
|
+
/** Elapsed-time readout. */
|
|
107686
|
+
timer: "flex items-center gap-1.5 text-xs font-mono tabular-nums text-white/60 px-1 select-none",
|
|
107687
|
+
/**
|
|
107688
|
+
* Colour palette popover.
|
|
107689
|
+
*
|
|
107690
|
+
* `w-max` is load-bearing. An absolutely positioned grid shrink-to-fits its
|
|
107691
|
+
* positioned ancestor, which here is the 64px tool+caret pair, so without it
|
|
107692
|
+
* the four 36px swatch columns are squeezed into 50px and overlap each other
|
|
107693
|
+
* to the point that a swatch cannot be clicked. React shipped it that way,
|
|
107694
|
+
* and the ports faithfully reproduced the defect.
|
|
107695
|
+
*/
|
|
107696
|
+
palette: "absolute bottom-full left-1/2 -translate-x-1/2 mb-2 p-3 w-max bg-neutral-800 rounded-lg border border-white/20 shadow-xl grid grid-cols-4 gap-2",
|
|
107697
|
+
/** One colour swatch inside the palette. */
|
|
107698
|
+
swatch: "w-9 h-9 rounded-full border-2 transition-transform hover:scale-110",
|
|
107699
|
+
/** Underline showing a tool's current colour. */
|
|
107700
|
+
swatchBar: "absolute bottom-0.5 left-1/2 -translate-x-1/2 w-3 h-0.5 rounded-full"
|
|
107701
|
+
};
|
|
107524
107702
|
function createPresentationKeyBuffer() {
|
|
107525
107703
|
return { digits: "" };
|
|
107526
107704
|
}
|
|
@@ -109022,6 +109200,134 @@ function getAriaRoleDescription(element) {
|
|
|
109022
109200
|
return void 0;
|
|
109023
109201
|
}
|
|
109024
109202
|
}
|
|
109203
|
+
function shouldLoopContinuously(input) {
|
|
109204
|
+
return Boolean(input.loopContinuously) || input.showType === "kiosk";
|
|
109205
|
+
}
|
|
109206
|
+
function resolveAutoAdvanceDelayMs(slide, options) {
|
|
109207
|
+
if (options?.useTimings === false) {
|
|
109208
|
+
return void 0;
|
|
109209
|
+
}
|
|
109210
|
+
const advanceAfterMs = slide?.transition?.advanceAfterMs;
|
|
109211
|
+
if (typeof advanceAfterMs !== "number" || !Number.isFinite(advanceAfterMs) || advanceAfterMs < 0) {
|
|
109212
|
+
return void 0;
|
|
109213
|
+
}
|
|
109214
|
+
return advanceAfterMs;
|
|
109215
|
+
}
|
|
109216
|
+
var PRESENTATION_INERT_CLICK_SELECTOR = 'a, button, input, select, textarea, video, audio, [data-pptx-action], [role="dialog"]';
|
|
109217
|
+
function isInertMedia(node) {
|
|
109218
|
+
return (node.tagName === "VIDEO" || node.tagName === "AUDIO") && !node.controls;
|
|
109219
|
+
}
|
|
109220
|
+
function isPresentationAdvanceClick(target) {
|
|
109221
|
+
if (typeof Element === "undefined" || !(target instanceof Element)) {
|
|
109222
|
+
return false;
|
|
109223
|
+
}
|
|
109224
|
+
for (let node = target; node !== null; node = node.parentElement) {
|
|
109225
|
+
if (isInertMedia(node)) {
|
|
109226
|
+
continue;
|
|
109227
|
+
}
|
|
109228
|
+
if (node.matches(PRESENTATION_INERT_CLICK_SELECTOR)) {
|
|
109229
|
+
return false;
|
|
109230
|
+
}
|
|
109231
|
+
}
|
|
109232
|
+
return true;
|
|
109233
|
+
}
|
|
109234
|
+
function applyRehearsalTimings(slides, timings) {
|
|
109235
|
+
return slides.map((slide, index) => {
|
|
109236
|
+
const advanceAfterMs = timings[index];
|
|
109237
|
+
if (typeof advanceAfterMs !== "number") {
|
|
109238
|
+
return slide;
|
|
109239
|
+
}
|
|
109240
|
+
return {
|
|
109241
|
+
...slide,
|
|
109242
|
+
transition: {
|
|
109243
|
+
...slide.transition,
|
|
109244
|
+
type: slide.transition?.type ?? "none",
|
|
109245
|
+
advanceAfterMs
|
|
109246
|
+
}
|
|
109247
|
+
};
|
|
109248
|
+
});
|
|
109249
|
+
}
|
|
109250
|
+
function computeEntranceAnimationDelay(delayMs, animationIndex) {
|
|
109251
|
+
return Math.max(0, delayMs || 0) + animationIndex * 60;
|
|
109252
|
+
}
|
|
109253
|
+
var NO_OP_ACTION = "ppaction://noaction";
|
|
109254
|
+
function isNoOpPresentationAction(action) {
|
|
109255
|
+
if (!action) {
|
|
109256
|
+
return true;
|
|
109257
|
+
}
|
|
109258
|
+
const verb = (action.action ?? "").trim().toLowerCase();
|
|
109259
|
+
if (verb === NO_OP_ACTION) {
|
|
109260
|
+
return true;
|
|
109261
|
+
}
|
|
109262
|
+
return verb.length === 0 && typeof action.targetSlideIndex !== "number" && !(action.url ?? "").trim();
|
|
109263
|
+
}
|
|
109264
|
+
function resolvePresentationAction(action, options) {
|
|
109265
|
+
const soundPath = action?.soundPath;
|
|
109266
|
+
if (!action || isNoOpPresentationAction(action)) {
|
|
109267
|
+
return { intent: { kind: "none" }, soundPath };
|
|
109268
|
+
}
|
|
109269
|
+
const verb = (action.action ?? "").toLowerCase();
|
|
109270
|
+
if (typeof action.targetSlideIndex === "number" && Number.isFinite(action.targetSlideIndex)) {
|
|
109271
|
+
if (options.slideCount <= 0) {
|
|
109272
|
+
return { intent: { kind: "none" }, soundPath };
|
|
109273
|
+
}
|
|
109274
|
+
const slideIndex = Math.max(
|
|
109275
|
+
0,
|
|
109276
|
+
Math.min(options.slideCount - 1, Math.floor(action.targetSlideIndex))
|
|
109277
|
+
);
|
|
109278
|
+
return { intent: { kind: "goToSlide", slideIndex }, soundPath };
|
|
109279
|
+
}
|
|
109280
|
+
if (verb.includes("hlinkshowjump")) {
|
|
109281
|
+
if (verb.includes("nextslide")) {
|
|
109282
|
+
return { intent: { kind: "move", direction: 1 }, soundPath };
|
|
109283
|
+
}
|
|
109284
|
+
if (verb.includes("previousslide")) {
|
|
109285
|
+
return { intent: { kind: "move", direction: -1 }, soundPath };
|
|
109286
|
+
}
|
|
109287
|
+
if (verb.includes("firstslide")) {
|
|
109288
|
+
return { intent: { kind: "goToSlide", slideIndex: 0 }, soundPath };
|
|
109289
|
+
}
|
|
109290
|
+
if (verb.includes("lastslide")) {
|
|
109291
|
+
return {
|
|
109292
|
+
intent: options.slideCount > 0 ? { kind: "goToSlide", slideIndex: options.slideCount - 1 } : { kind: "none" },
|
|
109293
|
+
soundPath
|
|
109294
|
+
};
|
|
109295
|
+
}
|
|
109296
|
+
if (verb.includes("endshow")) {
|
|
109297
|
+
return { intent: { kind: "endShow" }, soundPath };
|
|
109298
|
+
}
|
|
109299
|
+
return { intent: { kind: "none" }, soundPath };
|
|
109300
|
+
}
|
|
109301
|
+
if (verb.includes("hlinksldjump")) {
|
|
109302
|
+
return { intent: { kind: "none" }, soundPath };
|
|
109303
|
+
}
|
|
109304
|
+
const url = (action.url ?? "").trim();
|
|
109305
|
+
if (url && isUrlSafe(url)) {
|
|
109306
|
+
return { intent: { kind: "openUrl", url }, soundPath };
|
|
109307
|
+
}
|
|
109308
|
+
return { intent: { kind: "none" }, soundPath };
|
|
109309
|
+
}
|
|
109310
|
+
function runPresentationAction(action, options, runner) {
|
|
109311
|
+
const { intent, soundPath } = resolvePresentationAction(action, options);
|
|
109312
|
+
if (soundPath && runner.playSound) {
|
|
109313
|
+
runner.playSound(soundPath);
|
|
109314
|
+
}
|
|
109315
|
+
switch (intent.kind) {
|
|
109316
|
+
case "goToSlide":
|
|
109317
|
+
runner.goToSlide(intent.slideIndex);
|
|
109318
|
+
return true;
|
|
109319
|
+
case "move":
|
|
109320
|
+
runner.move(intent.direction);
|
|
109321
|
+
return true;
|
|
109322
|
+
case "endShow":
|
|
109323
|
+
runner.endShow();
|
|
109324
|
+
return true;
|
|
109325
|
+
case "openUrl":
|
|
109326
|
+
return safeOpenUrl(intent.url);
|
|
109327
|
+
default:
|
|
109328
|
+
return false;
|
|
109329
|
+
}
|
|
109330
|
+
}
|
|
109025
109331
|
function elementHasTextHyperlink(element) {
|
|
109026
109332
|
if (!hasTextProperties(element)) {
|
|
109027
109333
|
return false;
|
|
@@ -109030,10 +109336,10 @@ function elementHasTextHyperlink(element) {
|
|
|
109030
109336
|
}
|
|
109031
109337
|
function isElementActionable(element, options = {}) {
|
|
109032
109338
|
const { hasActionHandler = true, hasHyperlinkHandler = true, hasZoomHandler = true } = options;
|
|
109033
|
-
if (element.actionClick && hasActionHandler) {
|
|
109339
|
+
if (element.actionClick && hasActionHandler && !isNoOpPresentationAction(element.actionClick)) {
|
|
109034
109340
|
return true;
|
|
109035
109341
|
}
|
|
109036
|
-
if (element.actionHover) {
|
|
109342
|
+
if (element.actionHover && !isNoOpPresentationAction(element.actionHover)) {
|
|
109037
109343
|
return true;
|
|
109038
109344
|
}
|
|
109039
109345
|
if (hasHyperlinkHandler && elementHasTextHyperlink(element)) {
|
|
@@ -111098,56 +111404,6 @@ var VIEWER_SHORTCUT_REFERENCE = [
|
|
|
111098
111404
|
{ actionKey: "pptx.shortcuts.title", shortcut: "?" }
|
|
111099
111405
|
];
|
|
111100
111406
|
var SHORTCUT_REFERENCE_ITEMS = VIEWER_SHORTCUT_REFERENCE;
|
|
111101
|
-
function shouldLoopContinuously(input) {
|
|
111102
|
-
return Boolean(input.loopContinuously) || input.showType === "kiosk";
|
|
111103
|
-
}
|
|
111104
|
-
function resolveAutoAdvanceDelayMs(slide, options) {
|
|
111105
|
-
if (options?.useTimings === false) {
|
|
111106
|
-
return void 0;
|
|
111107
|
-
}
|
|
111108
|
-
const advanceAfterMs = slide?.transition?.advanceAfterMs;
|
|
111109
|
-
if (typeof advanceAfterMs !== "number" || !Number.isFinite(advanceAfterMs) || advanceAfterMs < 0) {
|
|
111110
|
-
return void 0;
|
|
111111
|
-
}
|
|
111112
|
-
return advanceAfterMs;
|
|
111113
|
-
}
|
|
111114
|
-
var PRESENTATION_INERT_CLICK_SELECTOR = 'a, button, input, select, textarea, video, audio, [data-pptx-action], [role="dialog"]';
|
|
111115
|
-
function isInertMedia(node) {
|
|
111116
|
-
return (node.tagName === "VIDEO" || node.tagName === "AUDIO") && !node.controls;
|
|
111117
|
-
}
|
|
111118
|
-
function isPresentationAdvanceClick(target) {
|
|
111119
|
-
if (typeof Element === "undefined" || !(target instanceof Element)) {
|
|
111120
|
-
return false;
|
|
111121
|
-
}
|
|
111122
|
-
for (let node = target; node !== null; node = node.parentElement) {
|
|
111123
|
-
if (isInertMedia(node)) {
|
|
111124
|
-
continue;
|
|
111125
|
-
}
|
|
111126
|
-
if (node.matches(PRESENTATION_INERT_CLICK_SELECTOR)) {
|
|
111127
|
-
return false;
|
|
111128
|
-
}
|
|
111129
|
-
}
|
|
111130
|
-
return true;
|
|
111131
|
-
}
|
|
111132
|
-
function applyRehearsalTimings(slides, timings) {
|
|
111133
|
-
return slides.map((slide, index) => {
|
|
111134
|
-
const advanceAfterMs = timings[index];
|
|
111135
|
-
if (typeof advanceAfterMs !== "number") {
|
|
111136
|
-
return slide;
|
|
111137
|
-
}
|
|
111138
|
-
return {
|
|
111139
|
-
...slide,
|
|
111140
|
-
transition: {
|
|
111141
|
-
...slide.transition,
|
|
111142
|
-
type: slide.transition?.type ?? "none",
|
|
111143
|
-
advanceAfterMs
|
|
111144
|
-
}
|
|
111145
|
-
};
|
|
111146
|
-
});
|
|
111147
|
-
}
|
|
111148
|
-
function computeEntranceAnimationDelay(delayMs, animationIndex) {
|
|
111149
|
-
return Math.max(0, delayMs || 0) + animationIndex * 60;
|
|
111150
|
-
}
|
|
111151
111407
|
function resolveCustomShowIndexes(slides, customShow) {
|
|
111152
111408
|
const keys = customShow.slideRIds ?? customShow.slideIds;
|
|
111153
111409
|
if (!keys || keys.length === 0) {
|
|
@@ -111233,6 +111489,17 @@ function firstShowSlideIndex(showIndexes) {
|
|
|
111233
111489
|
function lastShowSlideIndex(showIndexes) {
|
|
111234
111490
|
return showIndexes.length > 0 ? showIndexes[showIndexes.length - 1] : void 0;
|
|
111235
111491
|
}
|
|
111492
|
+
var HIDDEN_SLIDE_LABEL_KEY = "pptx.slideSorter.hidden";
|
|
111493
|
+
var HIDDEN_SLIDE_SLASH_GRADIENT = "linear-gradient(to top right, transparent 47%, color-mix(in srgb, currentColor 60%, transparent) 47%, color-mix(in srgb, currentColor 60%, transparent) 53%, transparent 53%)";
|
|
111494
|
+
function hiddenSlideLabelId(surface, slideIndex) {
|
|
111495
|
+
return `pptx-hidden-slide-${surface}-${slideIndex}`;
|
|
111496
|
+
}
|
|
111497
|
+
function hiddenSlideCue(hidden, surface, slideIndex) {
|
|
111498
|
+
if (!hidden) {
|
|
111499
|
+
return { hidden: false, labelId: void 0, marker: void 0 };
|
|
111500
|
+
}
|
|
111501
|
+
return { hidden: true, labelId: hiddenSlideLabelId(surface, slideIndex), marker: "true" };
|
|
111502
|
+
}
|
|
111236
111503
|
var VIEWER_PREFS_STORAGE_KEY = "pptx-viewer-prefs";
|
|
111237
111504
|
function hasLocalStorage() {
|
|
111238
111505
|
return typeof localStorage !== "undefined";
|
|
@@ -113873,6 +114140,9 @@ exports.FILL_MODE_OPTIONS = FILL_MODE_OPTIONS;
|
|
|
113873
114140
|
exports.FILL_PATTERN_LABEL_KEYS = FILL_PATTERN_LABEL_KEYS;
|
|
113874
114141
|
exports.GRADIENT_TYPE_OPTIONS = GRADIENT_TYPE_OPTIONS;
|
|
113875
114142
|
exports.HANDOUT_OPTIONS = HANDOUT_OPTIONS;
|
|
114143
|
+
exports.HIDDEN_SLIDE_LABEL_KEY = HIDDEN_SLIDE_LABEL_KEY;
|
|
114144
|
+
exports.HIDDEN_SLIDE_SLASH_GRADIENT = HIDDEN_SLIDE_SLASH_GRADIENT;
|
|
114145
|
+
exports.HIGHLIGHTER_COLORS = HIGHLIGHTER_COLORS;
|
|
113876
114146
|
exports.INK_REPLAY_KEYFRAMES = INK_REPLAY_KEYFRAMES;
|
|
113877
114147
|
exports.INSERT_CHART_TYPES = INSERT_CHART_TYPES;
|
|
113878
114148
|
exports.LBL = LBL;
|
|
@@ -113892,10 +114162,12 @@ exports.OUTLINE_ROW_ATTR = OUTLINE_ROW_ATTR;
|
|
|
113892
114162
|
exports.OUTLINE_SLIDE_ATTR = OUTLINE_SLIDE_ATTR;
|
|
113893
114163
|
exports.OUTLINE_VIEW_ATTR = OUTLINE_VIEW_ATTR;
|
|
113894
114164
|
exports.PATTERN_OPTIONS = PATTERN_OPTIONS;
|
|
114165
|
+
exports.PEN_COLORS = PEN_COLORS;
|
|
113895
114166
|
exports.PRESENTATION_CHANNEL_NAME = PRESENTATION_CHANNEL_NAME;
|
|
113896
114167
|
exports.PRESENTATION_HASH = PRESENTATION_HASH;
|
|
113897
114168
|
exports.PRESENTATION_MESSAGE_ORIGIN = PRESENTATION_MESSAGE_ORIGIN;
|
|
113898
114169
|
exports.PRESENTATION_NONCE_KEY = PRESENTATION_NONCE_KEY;
|
|
114170
|
+
exports.PRESENT_TOOLBAR_CLASSES = PRESENT_TOOLBAR_CLASSES;
|
|
113899
114171
|
exports.PRESETS = PRESETS;
|
|
113900
114172
|
exports.PRESET_THEMES = PRESET_THEMES;
|
|
113901
114173
|
exports.PptxHandler = PptxHandler;
|
|
@@ -113951,6 +114223,7 @@ exports.addSmartArtNode = addSmartArtNode;
|
|
|
113951
114223
|
exports.addSmartArtNodeAsChild = addSmartArtNodeAsChild;
|
|
113952
114224
|
exports.addTagToCollections = addTagToCollections;
|
|
113953
114225
|
exports.alignElements = alignElements;
|
|
114226
|
+
exports.animationEffectLabel = animationEffectLabel;
|
|
113954
114227
|
exports.appendPresentationInkPoint = appendPresentationInkPoint;
|
|
113955
114228
|
exports.appendTableElementColumn = appendTableElementColumn;
|
|
113956
114229
|
exports.appendTableElementRow = appendTableElementRow;
|
|
@@ -114177,6 +114450,7 @@ exports.getGroupChildParentFill = getGroupChildParentFill;
|
|
|
114177
114450
|
exports.getImageColorWashStyle = getImageColorWashStyle;
|
|
114178
114451
|
exports.getImageEffectsFilter = getImageEffectsFilter;
|
|
114179
114452
|
exports.getImageEffectsOpacity = getImageEffectsOpacity;
|
|
114453
|
+
exports.getImageFitStyle = getImageFitStyle;
|
|
114180
114454
|
exports.getImageSvgFilters = getImageSvgFilters;
|
|
114181
114455
|
exports.getInkReplayStyles = getInkReplayStyles;
|
|
114182
114456
|
exports.getInlineEditorSelection = getInlineEditorSelection;
|
|
@@ -114217,6 +114491,7 @@ exports.hasShapeProperties = hasShapeProperties;
|
|
|
114217
114491
|
exports.hasShowSlideAfter = hasShowSlideAfter;
|
|
114218
114492
|
exports.hasTextProperties = hasTextProperties;
|
|
114219
114493
|
exports.hexToRgbChannels = hexToRgbChannels2;
|
|
114494
|
+
exports.hiddenSlideCue = hiddenSlideCue;
|
|
114220
114495
|
exports.insertTableColumn = insertTableColumn;
|
|
114221
114496
|
exports.insertTableRow = insertTableRow;
|
|
114222
114497
|
exports.isActionHidden = isActionHidden;
|
|
@@ -114365,6 +114640,7 @@ exports.restoreSegmentSelection = restoreSegmentSelection;
|
|
|
114365
114640
|
exports.revealedSmartArtNodeCount = revealedSmartArtNodeCount;
|
|
114366
114641
|
exports.rulerDragToGuidePosition = rulerDragToGuidePosition;
|
|
114367
114642
|
exports.runMediaCommand = runMediaCommand;
|
|
114643
|
+
exports.runPresentationAction = runPresentationAction;
|
|
114368
114644
|
exports.safeOpenUrl = safeOpenUrl;
|
|
114369
114645
|
exports.sanitizeColor = sanitizeColor;
|
|
114370
114646
|
exports.sanitizeDownloadFilename = sanitizeDownloadFilename;
|
|
Binary file
|
|
Binary file
|