pptx-react-viewer 2.12.0 → 2.12.1

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.
Files changed (116) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/{AiChatPanel-CS4CONUO.mjs → AiChatPanel-CGGUPVQX.mjs} +4 -4
  3. package/dist/AiChatPanel-CGGUPVQX.mjs.br +0 -0
  4. package/dist/AiChatPanel-CGGUPVQX.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-JIXSOZXN.js → AiChatPanel-UEFYTUJN.js} +23 -23
  6. package/dist/AiChatPanel-UEFYTUJN.js.br +0 -0
  7. package/dist/AiChatPanel-UEFYTUJN.js.gz +0 -0
  8. package/dist/{Model3DScene-5KMJ4JL6.js → Model3DScene-QYXJNALP.js} +2 -2
  9. package/dist/{Model3DScene-5KMJ4JL6.js.br → Model3DScene-QYXJNALP.js.br} +0 -0
  10. package/dist/Model3DScene-QYXJNALP.js.gz +0 -0
  11. package/dist/{Model3DScene-RWFPSN6B.mjs → Model3DScene-TU4NTHRM.mjs} +1 -1
  12. package/dist/Model3DScene-TU4NTHRM.mjs.br +0 -0
  13. package/dist/Model3DScene-TU4NTHRM.mjs.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-BIOKIETC.js → SurfaceChart3DScene-4VCO3DRP.js} +2 -2
  15. package/dist/SurfaceChart3DScene-4VCO3DRP.js.br +0 -0
  16. package/dist/SurfaceChart3DScene-4VCO3DRP.js.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-2GZQM3LN.mjs → SurfaceChart3DScene-VTJBKUQY.mjs} +1 -1
  18. package/dist/{SurfaceChart3DScene-2GZQM3LN.mjs.br → SurfaceChart3DScene-VTJBKUQY.mjs.br} +0 -0
  19. package/dist/SurfaceChart3DScene-VTJBKUQY.mjs.gz +0 -0
  20. package/dist/{chunk-AOED5MFM.mjs → chunk-4GYNTY2G.mjs} +13 -12
  21. package/dist/chunk-4GYNTY2G.mjs.br +0 -0
  22. package/dist/chunk-4GYNTY2G.mjs.gz +0 -0
  23. package/dist/{chunk-BJQSHVYH.mjs → chunk-4SGXEGVL.mjs} +261 -203
  24. package/dist/chunk-4SGXEGVL.mjs.br +0 -0
  25. package/dist/chunk-4SGXEGVL.mjs.gz +0 -0
  26. package/dist/{chunk-3GNSGGY2.js → chunk-BXAK3JFM.js} +13 -0
  27. package/dist/chunk-BXAK3JFM.js.br +0 -0
  28. package/dist/chunk-BXAK3JFM.js.gz +0 -0
  29. package/dist/{chunk-QGHC65C4.mjs → chunk-CABQXGPI.mjs} +302 -18
  30. package/dist/chunk-CABQXGPI.mjs.br +0 -0
  31. package/dist/{chunk-QGHC65C4.mjs.gz → chunk-CABQXGPI.mjs.gz} +0 -0
  32. package/dist/{chunk-SP7U34QM.js → chunk-GBKIWNW6.js} +1996 -1938
  33. package/dist/chunk-GBKIWNW6.js.br +0 -0
  34. package/dist/chunk-GBKIWNW6.js.gz +0 -0
  35. package/dist/{chunk-2VUHJNWM.js → chunk-LE6YA5WB.js} +261 -254
  36. package/dist/chunk-LE6YA5WB.js.br +0 -0
  37. package/dist/chunk-LE6YA5WB.js.gz +0 -0
  38. package/dist/{chunk-EJRHYYKE.mjs → chunk-N3NKU7SC.mjs} +1 -1
  39. package/dist/chunk-N3NKU7SC.mjs.br +0 -0
  40. package/dist/chunk-N3NKU7SC.mjs.gz +0 -0
  41. package/dist/{chunk-PTGTFXPU.js → chunk-NUDH7TI2.js} +341 -340
  42. package/dist/chunk-NUDH7TI2.js.br +0 -0
  43. package/dist/chunk-NUDH7TI2.js.gz +0 -0
  44. package/dist/{chunk-PJUQQF3I.js → chunk-TDUDH7S4.js} +320 -19
  45. package/dist/chunk-TDUDH7S4.js.br +0 -0
  46. package/dist/{chunk-PJUQQF3I.js.gz → chunk-TDUDH7S4.js.gz} +0 -0
  47. package/dist/{chunk-ECDKYPQ2.mjs → chunk-TEXIGSA6.mjs} +13 -0
  48. package/dist/chunk-TEXIGSA6.mjs.br +0 -0
  49. package/dist/chunk-TEXIGSA6.mjs.gz +0 -0
  50. package/dist/{chunk-ZIXSSQAZ.js → chunk-UIWY4XJT.js} +3 -3
  51. package/dist/chunk-UIWY4XJT.js.br +0 -0
  52. package/dist/chunk-UIWY4XJT.js.gz +0 -0
  53. package/dist/{chunk-CEUHGUZ4.mjs → chunk-YIPR3GKG.mjs} +22 -15
  54. package/dist/chunk-YIPR3GKG.mjs.br +0 -0
  55. package/dist/chunk-YIPR3GKG.mjs.gz +0 -0
  56. package/dist/i18n.js +4 -4
  57. package/dist/i18n.js.br +0 -0
  58. package/dist/i18n.js.gz +0 -0
  59. package/dist/i18n.mjs +1 -1
  60. package/dist/i18n.mjs.br +0 -0
  61. package/dist/i18n.mjs.gz +0 -0
  62. package/dist/index.js +36 -36
  63. package/dist/index.js.br +0 -0
  64. package/dist/index.js.gz +0 -0
  65. package/dist/index.mjs +6 -6
  66. package/dist/index.mjs.br +0 -0
  67. package/dist/index.mjs.gz +0 -0
  68. package/dist/internals.d.ts.map +1 -1
  69. package/dist/internals.js +79 -79
  70. package/dist/internals.js.br +0 -0
  71. package/dist/internals.js.gz +0 -0
  72. package/dist/internals.mjs +4 -4
  73. package/dist/internals.mjs.br +0 -0
  74. package/dist/internals.mjs.gz +0 -0
  75. package/dist/pptx-viewer.css +1 -1
  76. package/dist/pptx-viewer.css.br +0 -0
  77. package/dist/pptx-viewer.css.gz +0 -0
  78. package/dist/viewer/index.js +22 -22
  79. package/dist/viewer/index.js.br +0 -0
  80. package/dist/viewer/index.js.gz +0 -0
  81. package/dist/viewer/index.mjs +6 -6
  82. package/dist/viewer/index.mjs.br +0 -0
  83. package/dist/viewer/index.mjs.gz +0 -0
  84. package/package.json +1 -1
  85. package/dist/AiChatPanel-CS4CONUO.mjs.br +0 -0
  86. package/dist/AiChatPanel-CS4CONUO.mjs.gz +0 -0
  87. package/dist/AiChatPanel-JIXSOZXN.js.br +0 -0
  88. package/dist/AiChatPanel-JIXSOZXN.js.gz +0 -0
  89. package/dist/Model3DScene-5KMJ4JL6.js.gz +0 -0
  90. package/dist/Model3DScene-RWFPSN6B.mjs.br +0 -0
  91. package/dist/Model3DScene-RWFPSN6B.mjs.gz +0 -0
  92. package/dist/SurfaceChart3DScene-2GZQM3LN.mjs.gz +0 -0
  93. package/dist/SurfaceChart3DScene-BIOKIETC.js.br +0 -0
  94. package/dist/SurfaceChart3DScene-BIOKIETC.js.gz +0 -0
  95. package/dist/chunk-2VUHJNWM.js.br +0 -0
  96. package/dist/chunk-2VUHJNWM.js.gz +0 -0
  97. package/dist/chunk-3GNSGGY2.js.br +0 -0
  98. package/dist/chunk-3GNSGGY2.js.gz +0 -0
  99. package/dist/chunk-AOED5MFM.mjs.br +0 -0
  100. package/dist/chunk-AOED5MFM.mjs.gz +0 -0
  101. package/dist/chunk-BJQSHVYH.mjs.br +0 -0
  102. package/dist/chunk-BJQSHVYH.mjs.gz +0 -0
  103. package/dist/chunk-CEUHGUZ4.mjs.br +0 -0
  104. package/dist/chunk-CEUHGUZ4.mjs.gz +0 -0
  105. package/dist/chunk-ECDKYPQ2.mjs.br +0 -0
  106. package/dist/chunk-ECDKYPQ2.mjs.gz +0 -0
  107. package/dist/chunk-EJRHYYKE.mjs.br +0 -0
  108. package/dist/chunk-EJRHYYKE.mjs.gz +0 -0
  109. package/dist/chunk-PJUQQF3I.js.br +0 -0
  110. package/dist/chunk-PTGTFXPU.js.br +0 -0
  111. package/dist/chunk-PTGTFXPU.js.gz +0 -0
  112. package/dist/chunk-QGHC65C4.mjs.br +0 -0
  113. package/dist/chunk-SP7U34QM.js.br +0 -0
  114. package/dist/chunk-SP7U34QM.js.gz +0 -0
  115. package/dist/chunk-ZIXSSQAZ.js.br +0 -0
  116. package/dist/chunk-ZIXSSQAZ.js.gz +0 -0
Binary file
Binary file
@@ -93976,6 +93976,9 @@ function normalizeDelay(delay) {
93976
93976
  }
93977
93977
  return { ms: delay, indefinite: false };
93978
93978
  }
93979
+ function isInteractiveTrigger(trigger) {
93980
+ return trigger === "onClick" || trigger === "onShapeClick" || trigger === "onHover";
93981
+ }
93979
93982
  function classifyCondition(cond) {
93980
93983
  const evt = cond.event;
93981
93984
  if (evt && CLICK_EVENTS.has(evt)) {
@@ -93995,7 +93998,8 @@ function resolveEffectiveStartCondition(conditions, fallbackTrigger) {
93995
93998
  delayMs: 0,
93996
93999
  hasClickAlternative: false,
93997
94000
  hasHoverAlternative: false,
93998
- indefinite: false
94001
+ indefinite: false,
94002
+ requiresInteraction: isInteractiveTrigger(fallbackTrigger)
93999
94003
  };
94000
94004
  if (!conditions || conditions.length === 0) {
94001
94005
  return base;
@@ -94040,6 +94044,7 @@ function resolveEffectiveStartCondition(conditions, fallbackTrigger) {
94040
94044
  base.indefinite = indefinite;
94041
94045
  base.dependsOnTimeNodeId = timenode.targetTimeNodeId;
94042
94046
  base.dependsOnEvent = timenode.event;
94047
+ base.requiresInteraction = false;
94043
94048
  return base;
94044
94049
  }
94045
94050
  if (delayCond && (delayCond.delay ?? 0) !== 0) {
@@ -94047,19 +94052,23 @@ function resolveEffectiveStartCondition(conditions, fallbackTrigger) {
94047
94052
  base.trigger = clickCond ? "onClick" : "afterDelay";
94048
94053
  base.delayMs = ms;
94049
94054
  base.indefinite = indefinite;
94055
+ base.requiresInteraction = indefinite;
94050
94056
  return base;
94051
94057
  }
94052
94058
  if (clickCond) {
94053
94059
  base.trigger = clickCond.targetShapeId ? "onShapeClick" : "onClick";
94060
+ base.requiresInteraction = true;
94054
94061
  return base;
94055
94062
  }
94056
94063
  if (hoverCond) {
94057
94064
  base.trigger = "onHover";
94065
+ base.requiresInteraction = true;
94058
94066
  return base;
94059
94067
  }
94060
94068
  if (delayCond) {
94061
94069
  base.trigger = fallbackTrigger;
94062
94070
  base.delayMs = 0;
94071
+ base.requiresInteraction = false;
94063
94072
  }
94064
94073
  return base;
94065
94074
  }
@@ -94398,7 +94407,7 @@ function parseMediaCommand(commandString) {
94398
94407
  if (lower === "stop" || lower === "stopmedia") {
94399
94408
  return { verb: "stop" };
94400
94409
  }
94401
- if (lower === "toggleplay") {
94410
+ if (lower === "toggleplay" || lower === "togglepause") {
94402
94411
  return { verb: "togglePlay" };
94403
94412
  }
94404
94413
  return void 0;
@@ -94530,7 +94539,7 @@ function buildTimeline(nativeAnimations) {
94530
94539
  }
94531
94540
  currentGroup = [];
94532
94541
  currentGroupIsClick = isOnClick || isFirstAnimation;
94533
- currentGroupAutoStart = !isOnClick && singleAnim.groupAutoStart === true;
94542
+ currentGroupAutoStart = singleAnim.groupAutoStart === true && !effective.requiresInteraction;
94534
94543
  subGroupIndex = singleAnim.parGroupIndex;
94535
94544
  subGroupStartMs = 0;
94536
94545
  }
@@ -94635,25 +94644,26 @@ function buildSequenceGroups(animsByKey, entranceIds, neededKeyframes, dynamicBl
94635
94644
  for (const anim of anims) {
94636
94645
  let effect = resolveEffect(anim);
94637
94646
  const dynamic = effect ? void 0 : buildDynamicKeyframe(anim, dynamicUid++);
94638
- if (!effect && !dynamic) {
94647
+ const isCommand = !effect && !dynamic && isMediaCommandAnimation(anim);
94648
+ if (!effect && !dynamic && !isCommand) {
94639
94649
  effect = fallbackEffectForClass(anim.presetClass);
94640
94650
  if (!effect) {
94641
94651
  continue;
94642
94652
  }
94643
94653
  }
94644
- const keyframe = effect ? cssKeyframeName(effect) : dynamic.keyframeName;
94654
+ const keyframe = isCommand ? "" : effect ? cssKeyframeName(effect) : dynamic.keyframeName;
94645
94655
  if (effect) {
94646
94656
  neededKeyframes.add(effect);
94647
94657
  }
94648
94658
  if (dynamic) {
94649
94659
  dynamicBlocks.push(dynamic.css);
94650
94660
  }
94651
- const elementId = anim.targetId ?? "";
94661
+ const elementId = isCommand ? "" : anim.targetId ?? "";
94652
94662
  const seqTrigger = anim.trigger ?? "onShapeClick";
94653
- const duration = anim.durationMs ?? defaultDuration(anim.presetClass);
94663
+ const duration = isCommand ? 0 : anim.durationMs ?? defaultDuration(anim.presetClass);
94654
94664
  const animDelay = Math.max(anim.delayMs ?? 0, anim.triggerDelayMs ?? 0);
94655
94665
  const triggerDelay = 0;
94656
- const presetClass = anim.presetClass ?? "entr";
94666
+ const presetClass = isCommand ? "emph" : anim.presetClass ?? "entr";
94657
94667
  const fill = fillModeForClass(anim.presetClass);
94658
94668
  const iterCount = anim.repeatCount ?? 1;
94659
94669
  const direction = anim.autoReverse ? "alternate" : "normal";
@@ -94677,7 +94687,7 @@ function buildSequenceGroups(animsByKey, entranceIds, neededKeyframes, dynamicBl
94677
94687
  }
94678
94688
  const iterStr = iterCount === Infinity ? "infinite" : String(iterCount);
94679
94689
  const easing = cssEasingForAnimation(anim);
94680
- const cssAnimation = `${keyframe} ${duration}ms ${easing} ${delayMs}ms ${iterStr} ${direction} ${fill}`;
94690
+ const cssAnimation = isCommand ? "" : `${keyframe} ${duration}ms ${easing} ${delayMs}ms ${iterStr} ${direction} ${fill}`;
94681
94691
  seqGroup.push({
94682
94692
  elementId,
94683
94693
  cssAnimation,
@@ -94689,8 +94699,9 @@ function buildSequenceGroups(animsByKey, entranceIds, neededKeyframes, dynamicBl
94689
94699
  presetClass,
94690
94700
  soundPath: anim.soundPath,
94691
94701
  stopSound: anim.stopSound,
94692
- build: resolveStepBuildDescriptor(anim),
94693
- colorTargets: stepColorTargets(anim)
94702
+ command: isCommand ? buildStepCommand(anim) : void 0,
94703
+ build: isCommand ? void 0 : resolveStepBuildDescriptor(anim),
94704
+ colorTargets: isCommand ? void 0 : stepColorTargets(anim)
94694
94705
  });
94695
94706
  }
94696
94707
  if (seqGroup.length > 0) {
@@ -106823,12 +106834,6 @@ function mobileSlideCounter(currentIndex, total) {
106823
106834
  }
106824
106835
  return `${currentIndex + 1} / ${total}`;
106825
106836
  }
106826
- function isFirstSlide(currentIndex) {
106827
- return currentIndex <= 0;
106828
- }
106829
- function isLastSlide(currentIndex, total) {
106830
- return currentIndex >= total - 1;
106831
- }
106832
106837
  function pad2(value) {
106833
106838
  return String(value).padStart(2, "0");
106834
106839
  }
@@ -107699,6 +107704,149 @@ var PRESENT_TOOLBAR_CLASSES = {
107699
107704
  /** Underline showing a tool's current colour. */
107700
107705
  swatchBar: "absolute bottom-0.5 left-1/2 -translate-x-1/2 w-3 h-0.5 rounded-full"
107701
107706
  };
107707
+ var PRESENTER_CONSOLE_CONTROLS = [
107708
+ {
107709
+ id: "timer-toggle",
107710
+ kind: "button",
107711
+ labelKey: "pptx.presenter.toggleTimer",
107712
+ icon: "circle-pause",
107713
+ activeIcon: "circle-play"
107714
+ },
107715
+ { id: "timer-reset", kind: "button", labelKey: "pptx.presenter.resetTimer", icon: "rotate-ccw" },
107716
+ { id: "divider-timer", kind: "divider" },
107717
+ {
107718
+ id: "all-slides",
107719
+ kind: "button",
107720
+ labelKey: "pptx.presenter.seeAllSlides",
107721
+ icon: "grid-2x2"
107722
+ },
107723
+ { id: "zoom-in", kind: "button", labelKey: "pptx.presenter.zoomIn", icon: "zoom-in" },
107724
+ { id: "zoom-out", kind: "button", labelKey: "pptx.presenter.zoomOut", icon: "zoom-out" },
107725
+ { id: "zoom-reset", kind: "button", labelKey: "pptx.presenter.resetZoom", icon: "scan" },
107726
+ { id: "divider-zoom", kind: "divider" },
107727
+ {
107728
+ id: "laser",
107729
+ kind: "toggle",
107730
+ labelKey: "pptx.presentation.laserPointer",
107731
+ icon: "mouse-pointer-2"
107732
+ },
107733
+ { id: "pen", kind: "toggle", labelKey: "pptx.presentation.pen", icon: "pen-tool" },
107734
+ {
107735
+ id: "highlighter",
107736
+ kind: "toggle",
107737
+ labelKey: "pptx.presentation.highlighter",
107738
+ icon: "highlighter"
107739
+ },
107740
+ { id: "eraser", kind: "toggle", labelKey: "pptx.presentation.eraser", icon: "eraser" },
107741
+ { id: "divider-tools", kind: "divider" },
107742
+ { id: "blackout-black", kind: "toggle", labelKey: "pptx.presenter.blackScreen", glyph: "B" },
107743
+ { id: "blackout-white", kind: "toggle", labelKey: "pptx.presenter.whiteScreen", glyph: "W" },
107744
+ {
107745
+ id: "captions",
107746
+ kind: "toggle",
107747
+ labelKey: "pptx.slideShow.subtitlesTooltip",
107748
+ icon: "captions"
107749
+ },
107750
+ { id: "spacer", kind: "spacer" },
107751
+ {
107752
+ id: "audience",
107753
+ kind: "toggle",
107754
+ labelKey: "pptx.presenter.openAudienceWindow",
107755
+ activeLabelKey: "pptx.presenter.closeAudienceWindow",
107756
+ icon: "monitor",
107757
+ activeIcon: "monitor-off"
107758
+ },
107759
+ {
107760
+ id: "swap-displays",
107761
+ kind: "button",
107762
+ labelKey: "pptx.presenter.swapDisplays",
107763
+ icon: "arrow-left-right"
107764
+ },
107765
+ { id: "end", kind: "button", labelKey: "pptx.presenter.endPresentation", icon: "x" }
107766
+ ];
107767
+ PRESENTER_CONSOLE_CONTROLS.map(
107768
+ (control) => control.id
107769
+ );
107770
+ PRESENTER_CONSOLE_CONTROLS.flatMap(
107771
+ (control) => control.labelKey === void 0 ? [] : [control.labelKey]
107772
+ );
107773
+ var PRESENTER_NAVIGATOR_LABEL_KEYS = {
107774
+ title: "pptx.presenter.slideNavigator",
107775
+ subtitle: "pptx.presenter.seeAllSlides",
107776
+ close: "pptx.presenter.closeNavigator"
107777
+ };
107778
+ function presenterNextDisabled() {
107779
+ return false;
107780
+ }
107781
+ function presenterPrevDisabled(currentIndex) {
107782
+ return currentIndex <= 0;
107783
+ }
107784
+ var PRESENTER_TIMER_SEGMENT_MS = 5 * 60 * 1e3;
107785
+ function presenterTimerProgress(elapsedMs) {
107786
+ const elapsed = Math.max(0, elapsedMs);
107787
+ return {
107788
+ percent: Math.min(
107789
+ 100,
107790
+ elapsed % PRESENTER_TIMER_SEGMENT_MS / PRESENTER_TIMER_SEGMENT_MS * 100
107791
+ ),
107792
+ segment: Math.floor(elapsed / PRESENTER_TIMER_SEGMENT_MS)
107793
+ };
107794
+ }
107795
+ var PRESENTER_CONSOLE_CLASSES = {
107796
+ /** The console root, laid over the show stage. */
107797
+ root: "absolute inset-0 z-50 flex flex-col bg-card text-foreground",
107798
+ /** The control strip across the top. */
107799
+ strip: "flex flex-wrap items-center gap-1 border-b border-border bg-card px-3 py-2",
107800
+ /** A strip control, inactive. */
107801
+ control: "inline-flex h-9 min-w-9 items-center justify-center gap-2 rounded-md px-2 text-xs transition-colors bg-muted text-foreground hover:bg-accent",
107802
+ /** A strip control, active. */
107803
+ controlActive: "inline-flex h-9 min-w-9 items-center justify-center gap-2 rounded-md px-2 text-xs transition-colors bg-primary text-primary-foreground",
107804
+ /** Vertical hairline between strip groups. */
107805
+ divider: "mx-1 h-6 w-px bg-border",
107806
+ /** Flexible gap pushing the trailing group right. */
107807
+ spacer: "flex-1",
107808
+ /** The body row: current-slide pane plus rail. */
107809
+ body: "flex flex-1 min-h-0",
107810
+ /** The current-slide pane. */
107811
+ main: "relative flex-[7] flex flex-col items-center justify-center bg-black p-6 min-w-0 overflow-hidden",
107812
+ /** The right-hand rail. */
107813
+ rail: "flex flex-[3] min-w-[260px] max-w-[440px] flex-col border-l border-border bg-background",
107814
+ /** Rail section heading (Current Time / Next Slide / Speaker Notes). */
107815
+ railHeading: "text-[10px] uppercase tracking-wider text-muted-foreground",
107816
+ /** Timer progress bar track. */
107817
+ progressTrack: "h-1.5 w-full bg-muted/60 flex-shrink-0",
107818
+ /** Timer progress bar fill. */
107819
+ progressFill: "h-full bg-primary transition-[width] duration-1000 ease-linear",
107820
+ /** The "all slides" navigator overlay. */
107821
+ navigator: "absolute inset-0 z-[120] overflow-auto bg-card p-6",
107822
+ /** The navigator's tile grid. */
107823
+ navigatorGrid: "grid gap-5 [grid-template-columns:repeat(auto-fill,minmax(220px,1fr))]"
107824
+ };
107825
+ var AUDIENCE_FULLSCREEN_BOUNCE_MS = 1e3;
107826
+ function createPresenterShowGuard(options) {
107827
+ const graceMs = options?.graceMs ?? AUDIENCE_FULLSCREEN_BOUNCE_MS;
107828
+ let armedAt;
107829
+ const stillArmed = (now) => armedAt !== void 0 && now - armedAt >= 0 && now - armedAt <= graceMs;
107830
+ return {
107831
+ expectAudienceBounce(now = Date.now()) {
107832
+ armedAt = now;
107833
+ },
107834
+ classifyFullscreenExit(now = Date.now()) {
107835
+ if (!stillArmed(now)) {
107836
+ armedAt = void 0;
107837
+ return "end-show";
107838
+ }
107839
+ armedAt = void 0;
107840
+ return "restore-show";
107841
+ },
107842
+ isExpectingBounce(now = Date.now()) {
107843
+ return stillArmed(now);
107844
+ },
107845
+ disarm() {
107846
+ armedAt = void 0;
107847
+ }
107848
+ };
107849
+ }
107702
107850
  function createPresentationKeyBuffer() {
107703
107851
  return { digits: "" };
107704
107852
  }
@@ -109347,6 +109495,129 @@ function isElementActionable(element, options = {}) {
109347
109495
  }
109348
109496
  return element.type === "zoom" && hasZoomHandler;
109349
109497
  }
109498
+ var LINK_TOOLTIP_HOST_CLASS = "pptx-link-host";
109499
+ var LINK_TOOLTIP_CLASS = "pptx-link-tooltip";
109500
+ var LINK_TOOLTIP_PANEL_CLASS = "pptx-link-tooltip-panel";
109501
+ var LINK_TOOLTIP_LABEL_CLASS = "pptx-link-tooltip-label";
109502
+ var LINK_TOOLTIP_HINT_CLASS = "pptx-link-tooltip-hint";
109503
+ var ACTION_INDICATOR_CLASS = "pptx-action-indicator";
109504
+ var ACTION_INDICATOR_ICON_PATH = "M13 2L3 14h9l-1 8 10-12h-9l1-8z";
109505
+ var ACTION_AFFORDANCE_CSS = `
109506
+ .${ACTION_INDICATOR_CLASS} {
109507
+ position: absolute;
109508
+ top: -4px;
109509
+ right: -4px;
109510
+ z-index: 20;
109511
+ display: flex;
109512
+ width: 16px;
109513
+ height: 16px;
109514
+ align-items: center;
109515
+ justify-content: center;
109516
+ border-radius: 9999px;
109517
+ background: #f59e0b;
109518
+ /* Left pointer-interactive on purpose: the badge's native title attribute is
109519
+ the only place the deck's screen tip is readable, and a title on a
109520
+ pointer-transparent node never fires. Clicks still reach the element
109521
+ underneath by bubbling, so nothing is swallowed. */
109522
+ box-shadow: 0 1px 3px 0 rgb(0 0 0 / 10%), 0 1px 2px -1px rgb(0 0 0 / 10%);
109523
+ }
109524
+ .${ACTION_INDICATOR_CLASS} svg {
109525
+ width: 10px;
109526
+ height: 10px;
109527
+ color: #fff;
109528
+ }
109529
+ .${LINK_TOOLTIP_CLASS} {
109530
+ position: absolute;
109531
+ top: 100%;
109532
+ left: 4px;
109533
+ z-index: 9999;
109534
+ max-width: 16rem;
109535
+ margin-top: 4px;
109536
+ opacity: 0;
109537
+ transition: opacity 150ms;
109538
+ pointer-events: none;
109539
+ font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
109540
+ text-align: left;
109541
+ }
109542
+ .${LINK_TOOLTIP_HOST_CLASS}:hover > .${LINK_TOOLTIP_CLASS} {
109543
+ opacity: 1;
109544
+ }
109545
+ .${LINK_TOOLTIP_PANEL_CLASS} {
109546
+ border: 1px solid var(--pptx-border, #374151);
109547
+ border-radius: 0.25rem;
109548
+ background: var(--pptx-popover, #111827);
109549
+ padding: 6px 10px;
109550
+ box-shadow: 0 10px 15px -3px rgb(0 0 0 / 10%), 0 4px 6px -4px rgb(0 0 0 / 10%);
109551
+ }
109552
+ .${LINK_TOOLTIP_LABEL_CLASS} {
109553
+ overflow: hidden;
109554
+ color: var(--pptx-foreground, #f3f4f6);
109555
+ font-size: 12px;
109556
+ font-weight: 400;
109557
+ font-style: normal;
109558
+ line-height: 16px;
109559
+ letter-spacing: normal;
109560
+ text-decoration: none;
109561
+ text-overflow: ellipsis;
109562
+ text-transform: none;
109563
+ white-space: nowrap;
109564
+ }
109565
+ .${LINK_TOOLTIP_HINT_CLASS} {
109566
+ margin-top: 2px;
109567
+ color: var(--pptx-muted-foreground, #9ca3af);
109568
+ font-size: 10px;
109569
+ font-weight: 400;
109570
+ font-style: normal;
109571
+ line-height: 12px;
109572
+ letter-spacing: normal;
109573
+ text-decoration: none;
109574
+ text-transform: none;
109575
+ }
109576
+ `;
109577
+ var AFFORDANCE_STYLE_ELEMENT_ID = "pptx-action-affordance-styles";
109578
+ function ensureActionAffordanceStyles(doc) {
109579
+ const target = doc ?? (typeof document === "undefined" ? void 0 : document);
109580
+ if (!target || target.getElementById(AFFORDANCE_STYLE_ELEMENT_ID)) {
109581
+ return;
109582
+ }
109583
+ const style = target.createElement("style");
109584
+ style.id = AFFORDANCE_STYLE_ELEMENT_ID;
109585
+ style.textContent = ACTION_AFFORDANCE_CSS;
109586
+ (target.head ?? target.documentElement).appendChild(style);
109587
+ }
109588
+ function actionAffordanceLabels(translate) {
109589
+ return {
109590
+ hasAction: translate("pptx.element.hasAction"),
109591
+ link: translate("pptx.element.linkFallback"),
109592
+ followLink: translate("pptx.linkTooltip.followLink"),
109593
+ presentationMode: translate("pptx.linkTooltip.presentationMode")
109594
+ };
109595
+ }
109596
+ var NO_AFFORDANCE = Object.freeze({
109597
+ showIndicator: false,
109598
+ indicatorTitle: "",
109599
+ showLinkTooltip: false,
109600
+ linkTooltipLabel: "",
109601
+ linkTooltipHint: ""
109602
+ });
109603
+ function resolveElementActionAffordance(element, context) {
109604
+ const { canInteract, presenting = false, labels } = context;
109605
+ const click = element.actionClick;
109606
+ const hover = element.actionHover;
109607
+ if (!canInteract || presenting || !click && !hover) {
109608
+ return NO_AFFORDANCE;
109609
+ }
109610
+ const hasUrl = Boolean(click?.url);
109611
+ return {
109612
+ showIndicator: true,
109613
+ indicatorTitle: click?.tooltip || hover?.tooltip || labels.hasAction,
109614
+ // The tooltip names a CLICK destination, so a hover-only action gets the
109615
+ // badge but no popover: there is nothing to follow and no key to press.
109616
+ showLinkTooltip: Boolean(click),
109617
+ linkTooltipLabel: click?.tooltip || click?.url || click?.action || labels.link,
109618
+ linkTooltipHint: hasUrl ? labels.followLink : labels.presentationMode
109619
+ };
109620
+ }
109350
109621
  var ELEMENT_ACTION_TYPE_OPTIONS = [
109351
109622
  { value: "none", labelKey: "pptx.hyperlink.actionNone" },
109352
109623
  { value: "url", labelKey: "pptx.action.gotoUrl" },
@@ -109835,6 +110106,19 @@ function rebuildDrawingShapesIfCleared(smartArtData, layout, palette, style, ele
109835
110106
  drawingShapes: reflowToDrawingShapes(layoutResult, smartArtData.nodes)
109836
110107
  };
109837
110108
  }
110109
+ function mediaPlaybackAttributes(source) {
110110
+ return {
110111
+ loop: source.loop === true,
110112
+ volume: Math.max(0, Math.min(1, source.volume ?? 1)),
110113
+ playbackRate: Math.max(0.25, Math.min(4, source.playbackSpeed ?? 1))
110114
+ };
110115
+ }
110116
+ function mediaTransportVisible(surface) {
110117
+ if (surface.presenting || surface.preview) {
110118
+ return false;
110119
+ }
110120
+ return surface.canvasTransport;
110121
+ }
109838
110122
  function buildSummaryZoomView(element, lookup) {
109839
110123
  if (element.zoomType !== "summary" || !element.summaryTargets?.length) {
109840
110124
  return void 0;
@@ -114106,6 +114390,8 @@ function segmentFrameCount(durationMs, fps) {
114106
114390
  */
114107
114391
 
114108
114392
  exports.ACTION_BUTTON_PRESETS = ACTION_BUTTON_PRESETS;
114393
+ exports.ACTION_INDICATOR_CLASS = ACTION_INDICATOR_CLASS;
114394
+ exports.ACTION_INDICATOR_ICON_PATH = ACTION_INDICATOR_ICON_PATH;
114109
114395
  exports.ARTISTIC_EFFECTS = ARTISTIC_EFFECTS;
114110
114396
  exports.AVATAR_COLOR_SWATCHES = AVATAR_COLOR_SWATCHES;
114111
114397
  exports.BACKSTAGE_NAV = BACKSTAGE_NAV;
@@ -114146,6 +114432,11 @@ exports.HIGHLIGHTER_COLORS = HIGHLIGHTER_COLORS;
114146
114432
  exports.INK_REPLAY_KEYFRAMES = INK_REPLAY_KEYFRAMES;
114147
114433
  exports.INSERT_CHART_TYPES = INSERT_CHART_TYPES;
114148
114434
  exports.LBL = LBL;
114435
+ exports.LINK_TOOLTIP_CLASS = LINK_TOOLTIP_CLASS;
114436
+ exports.LINK_TOOLTIP_HINT_CLASS = LINK_TOOLTIP_HINT_CLASS;
114437
+ exports.LINK_TOOLTIP_HOST_CLASS = LINK_TOOLTIP_HOST_CLASS;
114438
+ exports.LINK_TOOLTIP_LABEL_CLASS = LINK_TOOLTIP_LABEL_CLASS;
114439
+ exports.LINK_TOOLTIP_PANEL_CLASS = LINK_TOOLTIP_PANEL_CLASS;
114149
114440
  exports.LOCAL_SYNC_ORIGIN = LOCAL_SYNC_ORIGIN;
114150
114441
  exports.MATERIAL_PRESETS = MATERIAL_PRESETS;
114151
114442
  exports.MAX_ZOOM_SCALE = MAX_ZOOM_SCALE;
@@ -114167,6 +114458,9 @@ exports.PRESENTATION_CHANNEL_NAME = PRESENTATION_CHANNEL_NAME;
114167
114458
  exports.PRESENTATION_HASH = PRESENTATION_HASH;
114168
114459
  exports.PRESENTATION_MESSAGE_ORIGIN = PRESENTATION_MESSAGE_ORIGIN;
114169
114460
  exports.PRESENTATION_NONCE_KEY = PRESENTATION_NONCE_KEY;
114461
+ exports.PRESENTER_CONSOLE_CLASSES = PRESENTER_CONSOLE_CLASSES;
114462
+ exports.PRESENTER_CONSOLE_CONTROLS = PRESENTER_CONSOLE_CONTROLS;
114463
+ exports.PRESENTER_NAVIGATOR_LABEL_KEYS = PRESENTER_NAVIGATOR_LABEL_KEYS;
114170
114464
  exports.PRESENT_TOOLBAR_CLASSES = PRESENT_TOOLBAR_CLASSES;
114171
114465
  exports.PRESETS = PRESETS;
114172
114466
  exports.PRESET_THEMES = PRESET_THEMES;
@@ -114214,6 +114508,7 @@ exports.VIEWER_PREFS_STORAGE_KEY = VIEWER_PREFS_STORAGE_KEY;
114214
114508
  exports.VIEWER_SHORTCUT_REFERENCE = VIEWER_SHORTCUT_REFERENCE;
114215
114509
  exports.WEBM_MIME_CANDIDATES = WEBM_MIME_CANDIDATES;
114216
114510
  exports.acceptsPresentationInput = acceptsPresentationInput;
114511
+ exports.actionAffordanceLabels = actionAffordanceLabels;
114217
114512
  exports.activateModalFocus = activateModalFocus;
114218
114513
  exports.addChartCategory = addChartCategory;
114219
114514
  exports.addChartSeries = addChartSeries;
@@ -114363,6 +114658,7 @@ exports.createDepartureChannel = createDepartureChannel;
114363
114658
  exports.createInitialPresentationSnapshot = createInitialPresentationSnapshot;
114364
114659
  exports.createPresentationKeyBuffer = createPresentationKeyBuffer;
114365
114660
  exports.createPresentationSessionId = createPresentationSessionId;
114661
+ exports.createPresenterShowGuard = createPresenterShowGuard;
114366
114662
  exports.createPresenterTimer = createPresenterTimer;
114367
114663
  exports.createSyncGate = createSyncGate;
114368
114664
  exports.createTouchGestureRecognizer = createTouchGestureRecognizer;
@@ -114389,6 +114685,7 @@ exports.dragValueForPart = dragValueForPart;
114389
114685
  exports.elementActionToPptxAction = elementActionToPptxAction;
114390
114686
  exports.encodeGif = encodeGif;
114391
114687
  exports.endAudienceDisplay = endAudienceDisplay;
114688
+ exports.ensureActionAffordanceStyles = ensureActionAffordanceStyles;
114392
114689
  exports.erasePresentationInkAt = erasePresentationInkAt;
114393
114690
  exports.evaluatePresetShape = evaluatePresetShape;
114394
114691
  exports.extraQuickAccessCommands = extraQuickAccessCommands;
@@ -114504,11 +114801,9 @@ exports.isEditorTextInputTarget = isEditorTextInputTarget;
114504
114801
  exports.isElementActionable = isElementActionable;
114505
114802
  exports.isElementRendered = isElementRendered;
114506
114803
  exports.isExportAbortError = isExportAbortError;
114507
- exports.isFirstSlide = isFirstSlide;
114508
114804
  exports.isImageLikeElement = isImageLikeElement;
114509
114805
  exports.isInkElement = isInkElement;
114510
114806
  exports.isKeyboardOpen = isKeyboardOpen;
114511
- exports.isLastSlide = isLastSlide;
114512
114807
  exports.isLinkedTextBox = isLinkedTextBox;
114513
114808
  exports.isMixedContentBlocked = isMixedContentBlocked;
114514
114809
  exports.isMobileViewport = isMobileViewport;
@@ -114528,6 +114823,8 @@ exports.mapEditorKey = mapEditorKey;
114528
114823
  exports.mapOutlineKey = mapOutlineKey;
114529
114824
  exports.mapPresentationKey = mapPresentationKey;
114530
114825
  exports.mayLeaveSlideShow = mayLeaveSlideShow;
114826
+ exports.mediaPlaybackAttributes = mediaPlaybackAttributes;
114827
+ exports.mediaTransportVisible = mediaTransportVisible;
114531
114828
  exports.mergeAdditiveSelection = mergeAdditiveSelection;
114532
114829
  exports.mergeCells = mergeCells;
114533
114830
  exports.mergePresentationSnapshot = mergePresentationSnapshot;
@@ -114576,7 +114873,10 @@ exports.pptxActionToElementAction = pptxActionToElementAction;
114576
114873
  exports.preprocessCssForCapture = preprocessCssForCapture;
114577
114874
  exports.presentationInkPath = presentationInkPath;
114578
114875
  exports.presenterElapsed = presenterElapsed;
114876
+ exports.presenterNextDisabled = presenterNextDisabled;
114579
114877
  exports.presenterPaneAdvancesOnClick = presenterPaneAdvancesOnClick;
114878
+ exports.presenterPrevDisabled = presenterPrevDisabled;
114879
+ exports.presenterTimerProgress = presenterTimerProgress;
114580
114880
  exports.pressuresToWidths = pressuresToWidths;
114581
114881
  exports.previousShowSlideIndex = previousShowSlideIndex;
114582
114882
  exports.printPropertiesFrameSlides = printPropertiesFrameSlides;
@@ -114616,6 +114916,7 @@ exports.resolveAutoAdvanceDelayMs = resolveAutoAdvanceDelayMs;
114616
114916
  exports.resolveAutoFitFontScale = resolveAutoFitFontScale;
114617
114917
  exports.resolveCssTextAlign = resolveCssTextAlign;
114618
114918
  exports.resolveDrawingShapeNodeId = resolveDrawingShapeNodeId;
114919
+ exports.resolveElementActionAffordance = resolveElementActionAffordance;
114619
114920
  exports.resolveFontForScript = resolveFontForScript;
114620
114921
  exports.resolveFontRefIdx = resolveFontRefIdx;
114621
114922
  exports.resolveGroupChildFill = resolveGroupChildFill;
Binary file
@@ -1404,6 +1404,18 @@ var translationsEn = {
1404
1404
  "pptx.presenter.eraseAllInk": "Erase All Ink on Slide",
1405
1405
  "pptx.presenter.slideLabel": "Slide {{current}} of {{total}}",
1406
1406
  "pptx.presenter.timerProgress": "Timer Progress",
1407
+ // Presenter console strip (see render/presenter-chrome.ts). React shipped
1408
+ // these as hard-coded English `title` attributes, which is why they arrive
1409
+ // as new keys rather than reused ones.
1410
+ "pptx.presenter.toggleTimer": "Pause or Resume Timer",
1411
+ "pptx.presenter.resetTimer": "Reset Timer",
1412
+ "pptx.presenter.zoomIn": "Zoom In",
1413
+ "pptx.presenter.zoomOut": "Zoom Out",
1414
+ "pptx.presenter.resetZoom": "Reset Zoom",
1415
+ "pptx.presenter.swapDisplays": "Swap Displays",
1416
+ "pptx.presenter.slideNavigator": "Slide Navigator",
1417
+ "pptx.presenter.closeNavigator": "Close",
1418
+ "pptx.presenter.timerTitle": "{{elapsed}} (segment {{segment}})",
1407
1419
  // Print dialog
1408
1420
  "pptx.print.allSlides": "All Slides",
1409
1421
  "pptx.print.blackAndWhite": "Black and White",
@@ -2317,6 +2329,7 @@ var translationsEn = {
2317
2329
  "pptx.editorToolbar.resetZoom": "Reset zoom",
2318
2330
  "pptx.editorToolbar.resetZoomTo100": "Reset zoom to 100%",
2319
2331
  "pptx.effects.innerShadow": "Inner Shadow",
2332
+ "pptx.element.hasAction": "Has action",
2320
2333
  "pptx.element.linkFallback": "Link",
2321
2334
  "pptx.export.export": "Export",
2322
2335
  "pptx.export.gifAnimated": "Animated GIF",
Binary file
Binary file
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkPJUQQF3I_js = require('./chunk-PJUQQF3I.js');
3
+ var chunkTDUDH7S4_js = require('./chunk-TDUDH7S4.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 chunkPJUQQF3I_js.PptxMarkdownConverter(
14882
+ const converter = new chunkTDUDH7S4_js.PptxMarkdownConverter(
14883
14883
  "",
14884
14884
  {
14885
14885
  sourceName: meta3.title ?? "deck.pptx",
@@ -15470,7 +15470,7 @@ var getTheme = (ctx) => {
15470
15470
  name: theme?.name,
15471
15471
  colorScheme: theme?.colorScheme,
15472
15472
  fontScheme: theme?.fontScheme,
15473
- availablePresets: Object.keys(chunkPJUQQF3I_js.ThemePresets)
15473
+ availablePresets: Object.keys(chunkTDUDH7S4_js.ThemePresets)
15474
15474
  };
15475
15475
  };
15476
15476
  var readExecutors = {
Binary file
Binary file