pptx-react-viewer 2.12.1 → 2.13.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 (103) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AiChatPanel-UEFYTUJN.js → AiChatPanel-FXPGFU6H.js} +35 -27
  3. package/dist/AiChatPanel-FXPGFU6H.js.br +0 -0
  4. package/dist/AiChatPanel-FXPGFU6H.js.gz +0 -0
  5. package/dist/{AiChatPanel-CGGUPVQX.mjs → AiChatPanel-WMGS5TNX.mjs} +15 -7
  6. package/dist/AiChatPanel-WMGS5TNX.mjs.br +0 -0
  7. package/dist/AiChatPanel-WMGS5TNX.mjs.gz +0 -0
  8. package/dist/{Model3DScene-TU4NTHRM.mjs → Model3DScene-E2XRQAMR.mjs} +1 -1
  9. package/dist/Model3DScene-E2XRQAMR.mjs.br +0 -0
  10. package/dist/Model3DScene-E2XRQAMR.mjs.gz +0 -0
  11. package/dist/{Model3DScene-QYXJNALP.js → Model3DScene-K5FPZTRG.js} +2 -2
  12. package/dist/Model3DScene-K5FPZTRG.js.br +0 -0
  13. package/dist/Model3DScene-K5FPZTRG.js.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-VTJBKUQY.mjs → SurfaceChart3DScene-2W2IFPLE.mjs} +1 -1
  15. package/dist/{SurfaceChart3DScene-VTJBKUQY.mjs.br → SurfaceChart3DScene-2W2IFPLE.mjs.br} +0 -0
  16. package/dist/SurfaceChart3DScene-2W2IFPLE.mjs.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-4VCO3DRP.js → SurfaceChart3DScene-JDCFTXYT.js} +2 -2
  18. package/dist/SurfaceChart3DScene-JDCFTXYT.js.br +0 -0
  19. package/dist/SurfaceChart3DScene-JDCFTXYT.js.gz +0 -0
  20. package/dist/{chunk-4SGXEGVL.mjs → chunk-3OV4FR6S.mjs} +26 -14
  21. package/dist/chunk-3OV4FR6S.mjs.br +0 -0
  22. package/dist/chunk-3OV4FR6S.mjs.gz +0 -0
  23. package/dist/{chunk-LE6YA5WB.js → chunk-66ZHD7Y4.js} +282 -299
  24. package/dist/chunk-66ZHD7Y4.js.br +0 -0
  25. package/dist/chunk-66ZHD7Y4.js.gz +0 -0
  26. package/dist/{chunk-N3NKU7SC.mjs → chunk-CQ2CKMG4.mjs} +1 -1
  27. package/dist/chunk-CQ2CKMG4.mjs.br +0 -0
  28. package/dist/chunk-CQ2CKMG4.mjs.gz +0 -0
  29. package/dist/{chunk-TDUDH7S4.js → chunk-DD2YRS6Z.js} +1328 -660
  30. package/dist/chunk-DD2YRS6Z.js.br +0 -0
  31. package/dist/chunk-DD2YRS6Z.js.gz +0 -0
  32. package/dist/{chunk-YIPR3GKG.mjs → chunk-GJEH27GD.mjs} +53 -69
  33. package/dist/chunk-GJEH27GD.mjs.br +0 -0
  34. package/dist/chunk-GJEH27GD.mjs.gz +0 -0
  35. package/dist/{chunk-4GYNTY2G.mjs → chunk-H5H57XMH.mjs} +16 -2
  36. package/dist/chunk-H5H57XMH.mjs.br +0 -0
  37. package/dist/chunk-H5H57XMH.mjs.gz +0 -0
  38. package/dist/{chunk-CABQXGPI.mjs → chunk-OWGPRVRK.mjs} +1322 -661
  39. package/dist/chunk-OWGPRVRK.mjs.br +0 -0
  40. package/dist/chunk-OWGPRVRK.mjs.gz +0 -0
  41. package/dist/{chunk-UIWY4XJT.js → chunk-PTFCMG3A.js} +3 -3
  42. package/dist/chunk-PTFCMG3A.js.br +0 -0
  43. package/dist/chunk-PTFCMG3A.js.gz +0 -0
  44. package/dist/{chunk-NUDH7TI2.js → chunk-QFNJCEMS.js} +340 -326
  45. package/dist/chunk-QFNJCEMS.js.br +0 -0
  46. package/dist/chunk-QFNJCEMS.js.gz +0 -0
  47. package/dist/{chunk-GBKIWNW6.js → chunk-ZMIFFURL.js} +1054 -1042
  48. package/dist/chunk-ZMIFFURL.js.br +0 -0
  49. package/dist/chunk-ZMIFFURL.js.gz +0 -0
  50. package/dist/index.d.ts +32 -0
  51. package/dist/index.js +34 -34
  52. package/dist/index.js.br +0 -0
  53. package/dist/index.js.gz +0 -0
  54. package/dist/index.mjs +5 -5
  55. package/dist/index.mjs.br +0 -0
  56. package/dist/index.mjs.gz +0 -0
  57. package/dist/internals.d.ts +32 -0
  58. package/dist/internals.d.ts.map +1 -1
  59. package/dist/internals.js +78 -78
  60. package/dist/internals.js.br +0 -0
  61. package/dist/internals.js.gz +0 -0
  62. package/dist/internals.mjs +3 -3
  63. package/dist/internals.mjs.br +0 -0
  64. package/dist/internals.mjs.gz +0 -0
  65. package/dist/viewer/index.d.ts +32 -0
  66. package/dist/viewer/index.js +21 -21
  67. package/dist/viewer/index.js.br +0 -0
  68. package/dist/viewer/index.js.gz +0 -0
  69. package/dist/viewer/index.mjs +5 -5
  70. package/dist/viewer/index.mjs.br +0 -0
  71. package/dist/viewer/index.mjs.gz +0 -0
  72. package/package.json +1 -1
  73. package/dist/AiChatPanel-CGGUPVQX.mjs.br +0 -0
  74. package/dist/AiChatPanel-CGGUPVQX.mjs.gz +0 -0
  75. package/dist/AiChatPanel-UEFYTUJN.js.br +0 -0
  76. package/dist/AiChatPanel-UEFYTUJN.js.gz +0 -0
  77. package/dist/Model3DScene-QYXJNALP.js.br +0 -0
  78. package/dist/Model3DScene-QYXJNALP.js.gz +0 -0
  79. package/dist/Model3DScene-TU4NTHRM.mjs.br +0 -0
  80. package/dist/Model3DScene-TU4NTHRM.mjs.gz +0 -0
  81. package/dist/SurfaceChart3DScene-4VCO3DRP.js.br +0 -0
  82. package/dist/SurfaceChart3DScene-4VCO3DRP.js.gz +0 -0
  83. package/dist/SurfaceChart3DScene-VTJBKUQY.mjs.gz +0 -0
  84. package/dist/chunk-4GYNTY2G.mjs.br +0 -0
  85. package/dist/chunk-4GYNTY2G.mjs.gz +0 -0
  86. package/dist/chunk-4SGXEGVL.mjs.br +0 -0
  87. package/dist/chunk-4SGXEGVL.mjs.gz +0 -0
  88. package/dist/chunk-CABQXGPI.mjs.br +0 -0
  89. package/dist/chunk-CABQXGPI.mjs.gz +0 -0
  90. package/dist/chunk-GBKIWNW6.js.br +0 -0
  91. package/dist/chunk-GBKIWNW6.js.gz +0 -0
  92. package/dist/chunk-LE6YA5WB.js.br +0 -0
  93. package/dist/chunk-LE6YA5WB.js.gz +0 -0
  94. package/dist/chunk-N3NKU7SC.mjs.br +0 -0
  95. package/dist/chunk-N3NKU7SC.mjs.gz +0 -0
  96. package/dist/chunk-NUDH7TI2.js.br +0 -0
  97. package/dist/chunk-NUDH7TI2.js.gz +0 -0
  98. package/dist/chunk-TDUDH7S4.js.br +0 -0
  99. package/dist/chunk-TDUDH7S4.js.gz +0 -0
  100. package/dist/chunk-UIWY4XJT.js.br +0 -0
  101. package/dist/chunk-UIWY4XJT.js.gz +0 -0
  102. package/dist/chunk-YIPR3GKG.mjs.br +0 -0
  103. package/dist/chunk-YIPR3GKG.mjs.gz +0 -0
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  import { translationsEn } from './chunk-TEXIGSA6.mjs';
2
- import { SHAPE_PRESET_DEFS, computeValueRangeForChart, VIEWER_SHORTCUT_REFERENCE, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, isTemplateElement, getImageFitStyle, isImageLikeElement, runMediaCommand, findMediaElementByElementId, mediaPlaybackAttributes, buildTextBlockStyle, hasTextProperties, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, getKinsokuLineBreakStyles, buildTextBody3DSceneStyle, resolveParagraphRtl, resolveParagraphAlign, resolveCssTextAlign, resolveParagraphStrutFontSize, colorWithOpacity, normalizeHexColor, build3DExtrusionData, getResolvedShapeClipPath, normalizeStrokeDashType, buildCssGradientFromShapeStyle, buildShadowCssFromShapeStyle, buildInnerShadowCssFromShapeStyle, suppressesCssBorder, buildMultiLayerShadowCss, buildGlowBoxShadow, getCompoundLineBoxShadow, getSoftEdgeFilterId, getEffectDagFilter, buildPatternFillCss, buildReflectionCss, getCssBorderDashStyle, getCompoundLineBorderWidth, getSvgStrokeDasharray, buildSvgGradientDef, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, computeSelectionRect, rectToCells, isCellInRect, buildChartViewModel, buildNotesPdfBytes, buildSlidesPdfBytes, buildPreviewAnimation, buildMotionPathPreview, getRoundRectRadiusPx, substituteFieldText, resolveUnderlineDecorationStyle, resolveAutoFitFontScale, getSubstituteFontFamily, hasDistinctScriptFonts, buildTextReflectionCss, getTextAlphaOpacity, buildTextRunFilterChain, buildTextShadowCss, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, evaluatePresetShape, sanitizeGradientStops, getGradientTileFlipCss, getGradientTileRectCss, apply3dEffects, clampUnitInterval, customGeometryPathsToSvgSubpaths, svgGradientFillRef, computeColumnBoundaries, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, getPatternSvg, ooxmlDashToCssBorderStyle, cell3DBevelCss, getChartStylePalette, computeLayout, valueToY, formatAxisValue, computeLayoutOptions, splitSeriesByAxis, computeValueRange, getSecondaryValueAxis, seriesColor, paletteColor, resolveRegionCode, normalizeValue, sequentialColorScale, convertOmmlToMathMl, sanitizeMathMl, buildTextFillCss, resolvePictureBullet, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, resolveFontRefIdx, tintColor2, shadeColor2, ooxmlGradientAngleToCssDegrees, segmentByScript, resolveFontForScript, generateLogTicks, formatAxisValueWithUnits, getDisplayUnitLabel, hexToRgbChannels, chartPartToAttrs } from './chunk-CABQXGPI.mjs';
2
+ import { SHAPE_PRESET_DEFS, computeValueRangeForChart, VIEWER_SHORTCUT_REFERENCE, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, isTemplateElement, getImageFitStyle, isImageLikeElement, runMediaCommand, findMediaElementByElementId, mediaPlaybackAttributes, buildTextBlockStyle, hasTextProperties, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, getKinsokuLineBreakStyles, buildTextBody3DSceneStyle, resolveParagraphRtl, resolveParagraphAlign, resolveCssTextAlign, resolveParagraphStrutFontSize, colorWithOpacity, normalizeHexColor, build3DExtrusionData, getResolvedShapeClipPath, normalizeStrokeDashType, buildCssGradientFromShapeStyle, buildShadowCssFromShapeStyle, buildInnerShadowCssFromShapeStyle, suppressesCssBorder, buildMultiLayerShadowCss, buildGlowBoxShadow, getCompoundLineBoxShadow, getSoftEdgeFilterId, getEffectDagFilter, buildPatternFillCss, buildReflectionCss, getCssBorderDashStyle, getCompoundLineBorderWidth, getSvgStrokeDasharray, buildSvgGradientDef, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, computeSelectionRect, rectToCells, isCellInRect, buildChartViewModel, buildNotesPdfBytes, buildSlidesPdfBytes, buildPreviewAnimation, buildMotionPathPreview, getRoundRectRadiusPx, registerPersistentAudio, proportionalLineHeight, substituteFieldText, resolveUnderlineDecorationStyle, POWERPOINT_METRIC_TRACKING, resolveAutoFitFontScale, getSubstituteFontFamily, parsePanoseString, hasDistinctScriptFonts, buildTextReflectionCss, getTextAlphaOpacity, buildTextRunFilterChain, buildTextShadowCss, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, evaluatePresetShape, sanitizeGradientStops, getGradientTileFlipCss, getGradientTileRectCss, apply3dEffects, clampUnitInterval, customGeometryPathsToSvgSubpaths, svgGradientFillRef, computeColumnBoundaries, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, getPatternSvg, ooxmlDashToCssBorderStyle, cell3DBevelCss, getChartStylePalette, chartAreaFill, computeLayout, valueToY, formatAxisValue, computeLayoutOptions, splitSeriesByAxis, computeValueRange, getSecondaryValueAxis, seriesColor, paletteColor, resolveRegionCode, normalizeValue, sequentialColorScale, convertOmmlToMathMl, sanitizeMathMl, buildTextFillCss, resolvePictureBullet, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, resolveFontRefIdx, tintColor2, shadeColor2, ooxmlGradientAngleToCssDegrees, segmentByScript, resolveFontForScript, generateLogTicks, formatAxisValueWithUnits, getDisplayUnitLabel, hexToRgbChannels, chartPartToAttrs } from './chunk-OWGPRVRK.mjs';
3
3
  import { clsx } from 'clsx';
4
4
  import { twMerge } from 'tailwind-merge';
5
5
  import React6, { useState, useEffect, useMemo, Suspense, useRef, useCallback, useLayoutEffect } from 'react';
@@ -463,37 +463,6 @@ function ensureArrayValue(value) {
463
463
  }
464
464
 
465
465
  // src/viewer/utils/media-persistent-audio.tsx
466
- var persistentAudioMap = /* @__PURE__ */ new Map();
467
- function registerPersistentAudio(elementId, dataUrl, mimetype, loop, volume, trimStartSec) {
468
- if (persistentAudioMap.has(elementId)) {
469
- return;
470
- }
471
- const audio = document.createElement("audio");
472
- audio.src = dataUrl;
473
- if (mimetype) {
474
- const source = document.createElement("source");
475
- source.src = dataUrl;
476
- source.type = mimetype;
477
- audio.appendChild(source);
478
- }
479
- audio.loop = loop;
480
- audio.volume = Math.max(0, Math.min(1, volume));
481
- if (trimStartSec > 0) {
482
- audio.currentTime = trimStartSec;
483
- }
484
- audio.style.display = "none";
485
- document.body.appendChild(audio);
486
- persistentAudioMap.set(elementId, { elementId, audio, loop });
487
- void audio.play().catch(() => {
488
- });
489
- }
490
- function stopAllPersistentAudio() {
491
- for (const entry of persistentAudioMap.values()) {
492
- entry.audio.pause();
493
- entry.audio.remove();
494
- }
495
- persistentAudioMap.clear();
496
- }
497
466
  function buildTrimFragment(element) {
498
467
  const start = element.trimStartMs;
499
468
  const end = element.trimEndMs;
@@ -693,6 +662,7 @@ function PresentationMediaController({
693
662
  element,
694
663
  isPresentationMode,
695
664
  shouldAutoPlay,
665
+ resolvedDataUrl,
696
666
  isFullScreen,
697
667
  onPlayStateChange,
698
668
  children
@@ -725,7 +695,11 @@ function PresentationMediaController({
725
695
  }
726
696
  return registerMediaElement(element.id, el);
727
697
  }, [element.id]);
728
- const { volume: playbackVolume, playbackRate } = mediaPlaybackAttributes({
698
+ const {
699
+ loop: shouldLoop,
700
+ volume: playbackVolume,
701
+ playbackRate
702
+ } = mediaPlaybackAttributes({
729
703
  loop: element.loop,
730
704
  volume: element.volume,
731
705
  playbackSpeed: element.playbackSpeed
@@ -859,18 +833,18 @@ function PresentationMediaController({
859
833
  return;
860
834
  }
861
835
  if (element.playAcrossSlides && element.mediaType === "audio") {
862
- const dataUrl = element.mediaData ?? (element.mediaPath ? void 0 : void 0);
836
+ const dataUrl = element.mediaData ?? resolvedDataUrl;
863
837
  if (dataUrl) {
864
838
  registerPersistentAudio(
865
839
  element.id,
866
840
  dataUrl,
867
841
  element.mediaMimeType,
868
- element.loop === true,
869
- volume,
842
+ shouldLoop,
843
+ playbackVolume,
870
844
  trimStartSec
871
845
  );
846
+ return;
872
847
  }
873
- return;
874
848
  }
875
849
  const el = mediaRef.current;
876
850
  if (!el) {
@@ -890,12 +864,12 @@ function PresentationMediaController({
890
864
  element.playAcrossSlides,
891
865
  element.mediaType,
892
866
  element.mediaData,
893
- element.mediaPath,
894
867
  element.mediaMimeType,
895
- element.loop,
896
868
  element.id,
897
- trimStartSec,
898
- volume
869
+ resolvedDataUrl,
870
+ shouldLoop,
871
+ playbackVolume,
872
+ trimStartSec
899
873
  ]);
900
874
  const wrapperStyle = hideWhenNotPlaying ? {
901
875
  opacity: isMediaPlaying ? 1 : 0,
@@ -937,17 +911,6 @@ function renderMediaElement(element, mediaDataUrls, options) {
937
911
  const isFullScreen = options?.fullScreen === true;
938
912
  const isPresentationMode = options?.isPresentationMode === true;
939
913
  const showTransport = options?.showTransport ?? !isPresentationMode;
940
- if (isPresentationMode && shouldAutoPlay && element.playAcrossSlides && element.mediaType === "audio" && dataUrl && !element.mediaData) {
941
- const trimStartSec = element.trimStartMs !== void 0 ? element.trimStartMs / 1e3 : 0;
942
- registerPersistentAudio(
943
- element.id,
944
- dataUrl,
945
- mediaMimeType,
946
- shouldLoop,
947
- element.volume ?? 1,
948
- trimStartSec
949
- );
950
- }
951
914
  if (element.mediaMissing) {
952
915
  if (posterUrl) {
953
916
  return /* @__PURE__ */ jsxs("div", { className: "w-full h-full relative pointer-events-none", children: [
@@ -990,6 +953,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
990
953
  element,
991
954
  isPresentationMode,
992
955
  shouldAutoPlay,
956
+ resolvedDataUrl: dataUrl,
993
957
  isFullScreen,
994
958
  onPlayStateChange: options?.onPlayStateChange,
995
959
  children: ({ mediaRef, onPlay }) => /* @__PURE__ */ jsx(
@@ -1062,6 +1026,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
1062
1026
  element,
1063
1027
  isPresentationMode,
1064
1028
  shouldAutoPlay,
1029
+ resolvedDataUrl: dataUrl,
1065
1030
  isFullScreen: false,
1066
1031
  onPlayStateChange: options?.onPlayStateChange,
1067
1032
  children: ({ mediaRef, onPlay }) => /* @__PURE__ */ jsx(
@@ -1761,7 +1726,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
1761
1726
  const rawBaseline = typeof segmentStyle.baseline === "number" ? segmentStyle.baseline : 0;
1762
1727
  const baselineFraction = rawBaseline === 0 ? 0 : Math.abs(rawBaseline) >= 1e3 ? rawBaseline / 1e5 : rawBaseline / 100;
1763
1728
  const baselineFontScale = baselineFraction !== 0 ? 0.65 : 1;
1764
- const letterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? `${segmentStyle.characterSpacing / 100 * (96 / 72)}px` : void 0;
1729
+ const letterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? `calc(${segmentStyle.characterSpacing / 100 * (96 / 72)}px + ${POWERPOINT_METRIC_TRACKING})` : POWERPOINT_METRIC_TRACKING;
1765
1730
  const textFillStyles = buildTextFillCss2(segmentStyle);
1766
1731
  const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
1767
1732
  const autoFitScale = resolveAutoFitFontScale(element.textStyle);
@@ -1770,12 +1735,25 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
1770
1735
  const baseFontSizePt = baseFontSize * (72 / 96);
1771
1736
  const fontKerning = typeof segmentStyle.kerning === "number" ? segmentStyle.kerning === 0 ? "none" : baseFontSizePt >= segmentStyle.kerning / 100 ? "normal" : "none" : void 0;
1772
1737
  const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
1773
- const baseFontFamily = rawFontFamily ? getSubstituteFontFamily(rawFontFamily) : DEFAULT_FONT_FAMILY;
1738
+ const baseFontFamily = rawFontFamily ? getSubstituteFontFamily(
1739
+ rawFontFamily,
1740
+ parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
1741
+ ) : DEFAULT_FONT_FAMILY;
1742
+ const scriptFont = (name, panose) => name ? getSubstituteFontFamily(name, parsePanoseString(panose)) : baseFontFamily;
1774
1743
  const scriptFonts = {
1775
1744
  latin: baseFontFamily,
1776
- eastAsia: segmentStyle.eastAsiaFont || element.textStyle?.eastAsiaFont || baseFontFamily,
1777
- complexScript: segmentStyle.complexScriptFont || element.textStyle?.complexScriptFont || baseFontFamily,
1778
- symbol: segmentStyle.symbolFont || element.textStyle?.symbolFont || baseFontFamily
1745
+ eastAsia: scriptFont(
1746
+ segmentStyle.eastAsiaFont || element.textStyle?.eastAsiaFont,
1747
+ segmentStyle.eastAsiaFontPanose ?? element.textStyle?.eastAsiaFontPanose
1748
+ ),
1749
+ complexScript: scriptFont(
1750
+ segmentStyle.complexScriptFont || element.textStyle?.complexScriptFont,
1751
+ segmentStyle.complexScriptFontPanose ?? element.textStyle?.complexScriptFontPanose
1752
+ ),
1753
+ symbol: scriptFont(
1754
+ segmentStyle.symbolFont || element.textStyle?.symbolFont,
1755
+ segmentStyle.symbolFontPanose ?? element.textStyle?.symbolFontPanose
1756
+ )
1779
1757
  };
1780
1758
  const needsScriptFonts = hasDistinctScriptFonts(scriptFonts);
1781
1759
  const spanStyle = {
@@ -1941,7 +1919,7 @@ function resolveParagraphSpacing(input) {
1941
1919
  if (typeof exactPt === "number" && exactPt > 0) {
1942
1920
  result.lineHeight = `${exactPt * PT_TO_PX}px`;
1943
1921
  } else if (typeof multiplier === "number" && multiplier > 0) {
1944
- result.lineHeight = multiplier;
1922
+ result.lineHeight = proportionalLineHeight(multiplier);
1945
1923
  }
1946
1924
  return result;
1947
1925
  }
@@ -2544,8 +2522,8 @@ function getConnectorAdjustment(element, key, fallback) {
2544
2522
  return clampUnitInterval(fallback);
2545
2523
  }
2546
2524
  function getConnectorPathGeometry(element) {
2547
- const width = Math.max(element.width, 1);
2548
- const height = Math.max(element.height, 1);
2525
+ const width = Math.max(element.width, 0);
2526
+ const height = Math.max(element.height, 0);
2549
2527
  const normalizedType = (element.shapeType || "").toLowerCase();
2550
2528
  const mapX = (value) => value;
2551
2529
  const mapY = (value) => value;
@@ -4557,7 +4535,7 @@ function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
4557
4535
  viewBox: `0 0 ${vm.svgWidth} ${vm.svgHeight}`,
4558
4536
  preserveAspectRatio,
4559
4537
  children: [
4560
- /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: vm.svgWidth, height: vm.svgHeight, fill: "#0f172a11" }),
4538
+ vm.areaFill && /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: vm.svgWidth, height: vm.svgHeight, fill: vm.areaFill }),
4561
4539
  vm.title && /* @__PURE__ */ jsx(
4562
4540
  "text",
4563
4541
  {
@@ -6108,6 +6086,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
6108
6086
  }
6109
6087
  function renderStockChart(element, chartData, categoryLabels) {
6110
6088
  const style = chartData.style;
6089
+ const areaFill = chartAreaFill(chartData);
6111
6090
  const legendPos = style?.legendPosition || "b";
6112
6091
  const range = computeValueRangeForChart(chartData.series, chartData.axes);
6113
6092
  const layout = computeLayout(element.width, element.height, style, true, legendPos);
@@ -6192,7 +6171,7 @@ function renderStockChart(element, chartData, categoryLabels) {
6192
6171
  viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
6193
6172
  preserveAspectRatio: "none",
6194
6173
  children: [
6195
- /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: "#0f172a11" }),
6174
+ areaFill && /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
6196
6175
  renderChrome(element.id, chartData, layout, range, categoryLabels, {
6197
6176
  categoryAxisStyle: "bar"
6198
6177
  }),
@@ -6219,7 +6198,7 @@ function FailedToLoad() {
6219
6198
  var LazySurfaceChart3DScene = React6.lazy(
6220
6199
  async () => {
6221
6200
  try {
6222
- return await import('./SurfaceChart3DScene-VTJBKUQY.mjs');
6201
+ return await import('./SurfaceChart3DScene-2W2IFPLE.mjs');
6223
6202
  } catch {
6224
6203
  return { default: FailedToLoad };
6225
6204
  }
@@ -6362,6 +6341,7 @@ function darkenRgb(r, g, b, factor) {
6362
6341
  }
6363
6342
  function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
6364
6343
  const style = chartData.style;
6344
+ const areaFill = chartAreaFill(chartData);
6365
6345
  const legendPos = style?.legendPosition || "b";
6366
6346
  const layout = computeLayout(element.width, element.height, style, false, legendPos);
6367
6347
  const range = computeValueRangeForChart(chartData.series, chartData.axes);
@@ -6443,7 +6423,7 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
6443
6423
  viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
6444
6424
  preserveAspectRatio: "xMidYMid meet",
6445
6425
  children: [
6446
- /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: "#0f172a11" }),
6426
+ areaFill && /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
6447
6427
  renderTitle(element.id, style, chartData.title, layout.svgWidth),
6448
6428
  renderLegend(element.id, style, chartData.series, layout),
6449
6429
  polygons
@@ -6453,6 +6433,7 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
6453
6433
  }
6454
6434
  function renderFlatSurfaceChart(element, chartData, categoryLabels) {
6455
6435
  const style = chartData.style;
6436
+ const areaFill = chartAreaFill(chartData);
6456
6437
  const legendPos = style?.legendPosition || "b";
6457
6438
  const layout = computeLayout(element.width, element.height, style, true, legendPos);
6458
6439
  const range = computeValueRangeForChart(chartData.series, chartData.axes);
@@ -6489,7 +6470,7 @@ function renderFlatSurfaceChart(element, chartData, categoryLabels) {
6489
6470
  viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
6490
6471
  preserveAspectRatio: "none",
6491
6472
  children: [
6492
- /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: "#0f172a11" }),
6473
+ areaFill && /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
6493
6474
  renderChrome(element.id, chartData, layout, range, categoryLabels, {
6494
6475
  categoryAxisStyle: "bar"
6495
6476
  }),
@@ -6517,6 +6498,7 @@ function renderSurfaceChart(element, chartData, categoryLabels) {
6517
6498
  }
6518
6499
  function renderTreemapChart(element, chartData, categoryLabels) {
6519
6500
  const style = chartData.style;
6501
+ const areaFill = chartAreaFill(chartData);
6520
6502
  const legendPos = style?.legendPosition || "b";
6521
6503
  const layout = computeLayout(element.width, element.height, style, false, legendPos);
6522
6504
  const allValues = chartData.series.flatMap((s) => s.values);
@@ -6582,7 +6564,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
6582
6564
  viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
6583
6565
  preserveAspectRatio: "none",
6584
6566
  children: [
6585
- /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: "#0f172a11" }),
6567
+ areaFill && /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
6586
6568
  renderTitle(element.id, style, chartData.title, layout.svgWidth),
6587
6569
  renderLegend(element.id, style, chartData.series, layout),
6588
6570
  rects
@@ -6592,6 +6574,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
6592
6574
  }
6593
6575
  function renderWaterfallChart(element, chartData, categoryLabels) {
6594
6576
  const style = chartData.style;
6577
+ const areaFill = chartAreaFill(chartData);
6595
6578
  const legendPos = style?.legendPosition || "b";
6596
6579
  const values = chartData.series[0]?.values ?? [];
6597
6580
  const range = computeValueRangeForChart(chartData.series, chartData.axes);
@@ -6671,7 +6654,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
6671
6654
  viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
6672
6655
  preserveAspectRatio: "none",
6673
6656
  children: [
6674
- /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: "#0f172a11" }),
6657
+ areaFill && /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
6675
6658
  renderChrome(element.id, chartData, layout, range, categoryLabels, {
6676
6659
  categoryAxisStyle: "bar"
6677
6660
  }),
@@ -6683,6 +6666,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
6683
6666
  }
6684
6667
  function renderComboChart(element, chartData, categoryLabels) {
6685
6668
  const style = chartData.style;
6669
+ const areaFill = chartAreaFill(chartData);
6686
6670
  const legendPos = style?.legendPosition || "b";
6687
6671
  const layoutOpts = computeLayoutOptions(
6688
6672
  chartData.axes,
@@ -6802,7 +6786,7 @@ function renderComboChart(element, chartData, categoryLabels) {
6802
6786
  viewBox: `0 0 ${layout.svgWidth} ${layout.svgHeight}`,
6803
6787
  preserveAspectRatio: "none",
6804
6788
  children: [
6805
- /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: "#0f172a11" }),
6789
+ areaFill && /* @__PURE__ */ jsx("rect", { x: 0, y: 0, width: layout.svgWidth, height: layout.svgHeight, fill: areaFill }),
6806
6790
  renderChrome(
6807
6791
  element.id,
6808
6792
  chartData,
@@ -8020,4 +8004,4 @@ function stopPreviewAnimation() {
8020
8004
  activePreview = null;
8021
8005
  }
8022
8006
 
8023
- export { ANIMATION_PRESET_OPTIONS, ARROW_SIZE_OPTIONS, CONNECTOR_ARROW_OPTIONS, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_STROKE_COLOR, DEFAULT_TABLE_COLUMNS, DEFAULT_TABLE_ROWS, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, EMU_PER_PX, GRID_SIZE, HYPERLINK_COLOR, MIN_ELEMENT_SIZE, SHAPE_PRESETS, SHORTCUT_REFERENCE_ITEMS, SLIDE_NAV_THUMBNAIL_WIDTH, STROKE_DASH_OPTIONS, SmartArtNodeText, THEME_COLOR_SWATCHES, TOOLBAR_SECTIONS, UNGROUPED_SECTION_ID, ZOOM_TO_SELECTION_PADDING, build3DExtrusionData2 as build3DExtrusionData, buildLineGlowFilter, buildLineShadowCss, buildNotesPdf, buildPdfFromImageData, buildReactChartViewModel, buildSaveSlides, buildTextBody3DSceneStyle2 as buildTextBody3DSceneStyle, buildTree, chevronPoints, cloneHistorySnapshot2 as cloneHistorySnapshot, cn, colour, executeMediaCommand, fitFontSize, gearPath, getAnimationInitialStyle2 as getAnimationInitialStyle, getConnectorPathGeometry, getCropShapeClipPath, getDuotoneColors, getImageRenderStyle, getImageTilingStyle, getShapeVisualStyle, getTextLayoutStyle, getTextStyleForElement, getTextWarpStyle, hasDagDuotoneEffect, isConnectorOrLineElement, isImageTiled, layoutToCategory, nodeOpacity, partitionTemplateElements, renderAccentProcess, renderAlternatingFlow, renderChartElement, renderConnectorMarker, renderDagDuotoneSvgFilter, renderDescendingProcess, renderGroupedList, renderHorizontalPictureList, renderMediaElement, renderPictureAccentList, renderPyramidList, renderStepDownProcess, renderTableElement, renderTextSegments, renderVectorShape, renderVerticalBlockList, renderVerticalChevronList, resolvePalette, resolveSmartArtDataPalette, resolveStyle, shouldRenderFallbackLabel, smartArtNodeGroupProps, startMotionPathPreview, startPreviewAnimation, stopAllPersistentAudio, stopPreviewAnimation, styleShadow, styleStroke, treeDepth, treeWidth, truncate, wrapChrome };
8007
+ export { ANIMATION_PRESET_OPTIONS, ARROW_SIZE_OPTIONS, CONNECTOR_ARROW_OPTIONS, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_STROKE_COLOR, DEFAULT_TABLE_COLUMNS, DEFAULT_TABLE_ROWS, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, EMU_PER_PX, GRID_SIZE, HYPERLINK_COLOR, MIN_ELEMENT_SIZE, SHAPE_PRESETS, SHORTCUT_REFERENCE_ITEMS, SLIDE_NAV_THUMBNAIL_WIDTH, STROKE_DASH_OPTIONS, SmartArtNodeText, THEME_COLOR_SWATCHES, TOOLBAR_SECTIONS, UNGROUPED_SECTION_ID, ZOOM_TO_SELECTION_PADDING, build3DExtrusionData2 as build3DExtrusionData, buildLineGlowFilter, buildLineShadowCss, buildNotesPdf, buildPdfFromImageData, buildReactChartViewModel, buildSaveSlides, buildTextBody3DSceneStyle2 as buildTextBody3DSceneStyle, buildTree, chevronPoints, cloneHistorySnapshot2 as cloneHistorySnapshot, cn, colour, executeMediaCommand, fitFontSize, gearPath, getAnimationInitialStyle2 as getAnimationInitialStyle, getConnectorPathGeometry, getCropShapeClipPath, getDuotoneColors, getImageRenderStyle, getImageTilingStyle, getShapeVisualStyle, getTextLayoutStyle, getTextStyleForElement, getTextWarpStyle, hasDagDuotoneEffect, isConnectorOrLineElement, isImageTiled, layoutToCategory, nodeOpacity, partitionTemplateElements, renderAccentProcess, renderAlternatingFlow, renderChartElement, renderConnectorMarker, renderDagDuotoneSvgFilter, renderDescendingProcess, renderGroupedList, renderHorizontalPictureList, renderMediaElement, renderPictureAccentList, renderPyramidList, renderStepDownProcess, renderTableElement, renderTextSegments, renderVectorShape, renderVerticalBlockList, renderVerticalChevronList, resolvePalette, resolveSmartArtDataPalette, resolveStyle, shouldRenderFallbackLabel, smartArtNodeGroupProps, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, styleShadow, styleStroke, treeDepth, treeWidth, truncate, wrapChrome };
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, stopAllPersistentAudio, buildSaveSlides, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, executeMediaCommand, buildPdfFromImageData, buildNotesPdf, EMU_PER_PX, GRID_SIZE, DEFAULT_TEXT_FONT_SIZE } from './chunk-YIPR3GKG.mjs';
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-GJEH27GD.mjs';
2
2
  import { translationsEn } from './chunk-TEXIGSA6.mjs';
3
- import { TOOLBAR_TABS, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, BROADCAST_THROTTLE_MS, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, clampZoomScale, zoomInScale, zoomOutScale, PresentationAnimationController, computeEntranceAnimationDelay, 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, 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, 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, groupElements, generateElementId, makeCloneId, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, derivePresenceList, mapPresentationKey, lastShowSlideIndex, firstShowSlideIndex, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildThemeColorMap, reResolveSlideColors, createPresentationSessionId, resolveTransitionDurationMs, runPresentationAction, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, presenterElapsed, stepPresenterZoom, resetPresenterTimer, 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-CABQXGPI.mjs';
3
+ import { TOOLBAR_TABS, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, BROADCAST_THROTTLE_MS, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, clampZoomScale, zoomInScale, zoomOutScale, PresentationAnimationController, computeEntranceAnimationDelay, 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, groupElements, generateElementId, makeCloneId, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, derivePresenceList, mapPresentationKey, lastShowSlideIndex, firstShowSlideIndex, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildThemeColorMap, reResolveSlideColors, createPresentationSessionId, resolveTransitionDurationMs, runPresentationAction, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, presenterElapsed, stepPresenterZoom, resetPresenterTimer, 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-OWGPRVRK.mjs';
4
4
  import { useRef, useState, useEffect, useCallback, useMemo, useSyncExternalStore, useImperativeHandle } from 'react';
5
5
  import JSZip from 'jszip';
6
6
  import { useTranslation } from 'react-i18next';
@@ -2329,6 +2329,20 @@ function usePresentationMode(input) {
2329
2329
  scheduleAutoAdvanceRef.current = scheduleAutoAdvanceForSlide;
2330
2330
  const activeSlideIndexRef = useRef(activeSlideIndex);
2331
2331
  activeSlideIndexRef.current = activeSlideIndex;
2332
+ const presentationSlideIndexRef = useRef(presentationSlideIndex);
2333
+ presentationSlideIndexRef.current = presentationSlideIndex;
2334
+ const clearPresentationTimersRef = useRef(clearPresentationTimers);
2335
+ clearPresentationTimersRef.current = clearPresentationTimers;
2336
+ useEffect(() => {
2337
+ if (mode !== "present") {
2338
+ return;
2339
+ }
2340
+ return attachPresentationVisibilityPause({
2341
+ root: containerRef.current ?? void 0,
2342
+ onHidden: () => clearPresentationTimersRef.current(),
2343
+ onVisible: () => scheduleAutoAdvanceRef.current(presentationSlideIndexRef.current)
2344
+ });
2345
+ }, [mode, containerRef]);
2332
2346
  useEffect(() => {
2333
2347
  if (mode === "present") {
2334
2348
  const idx = activeSlideIndexRef.current;
Binary file
Binary file