pptx-react-viewer 1.24.1 → 1.25.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.
Files changed (92) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/{Model3DScene-RYR4SSOM.js → Model3DScene-G434BPF4.js} +2 -2
  3. package/dist/Model3DScene-G434BPF4.js.br +0 -0
  4. package/dist/Model3DScene-G434BPF4.js.gz +0 -0
  5. package/dist/{Model3DScene-E7YIHJ2R.mjs → Model3DScene-GGNUAOGD.mjs} +1 -1
  6. package/dist/Model3DScene-GGNUAOGD.mjs.br +0 -0
  7. package/dist/Model3DScene-GGNUAOGD.mjs.gz +0 -0
  8. package/dist/PowerPointViewer-CnADroqZ.d.ts.map +1 -1
  9. package/dist/{SurfaceChart3DScene-ZM3J67VQ.mjs → SurfaceChart3DScene-JU737NN5.mjs} +1 -1
  10. package/dist/SurfaceChart3DScene-JU737NN5.mjs.br +0 -0
  11. package/dist/SurfaceChart3DScene-JU737NN5.mjs.gz +0 -0
  12. package/dist/{SurfaceChart3DScene-PBSZVNAM.js → SurfaceChart3DScene-UFFJ3P6T.js} +2 -2
  13. package/dist/SurfaceChart3DScene-UFFJ3P6T.js.br +0 -0
  14. package/dist/SurfaceChart3DScene-UFFJ3P6T.js.gz +0 -0
  15. package/dist/{chunk-ZISXRMDJ.js → chunk-2EFVXYNA.js} +187 -1
  16. package/dist/chunk-2EFVXYNA.js.br +0 -0
  17. package/dist/{chunk-ZISXRMDJ.js.gz → chunk-2EFVXYNA.js.gz} +0 -0
  18. package/dist/{chunk-KVTSERRP.js → chunk-EM77GISR.js} +1667 -1029
  19. package/dist/chunk-EM77GISR.js.br +0 -0
  20. package/dist/chunk-EM77GISR.js.gz +0 -0
  21. package/dist/{chunk-DPTDFK2L.js → chunk-IHHK6WEQ.js} +520 -441
  22. package/dist/chunk-IHHK6WEQ.js.br +0 -0
  23. package/dist/chunk-IHHK6WEQ.js.gz +0 -0
  24. package/dist/{chunk-E3KJKCSV.mjs → chunk-M3SIFXWD.mjs} +187 -1
  25. package/dist/chunk-M3SIFXWD.mjs.br +0 -0
  26. package/dist/{chunk-E3KJKCSV.mjs.gz → chunk-M3SIFXWD.mjs.gz} +0 -0
  27. package/dist/{chunk-UDM2SYE3.mjs → chunk-NKSIDFYP.mjs} +964 -326
  28. package/dist/chunk-NKSIDFYP.mjs.br +0 -0
  29. package/dist/chunk-NKSIDFYP.mjs.gz +0 -0
  30. package/dist/{chunk-MEVZNYJK.mjs → chunk-QOBKJKLT.mjs} +859 -9
  31. package/dist/chunk-QOBKJKLT.mjs.br +0 -0
  32. package/dist/{chunk-MEVZNYJK.mjs.gz → chunk-QOBKJKLT.mjs.gz} +0 -0
  33. package/dist/{chunk-UCFXE6YS.mjs → chunk-VDALVGDT.mjs} +115 -37
  34. package/dist/chunk-VDALVGDT.mjs.br +0 -0
  35. package/dist/chunk-VDALVGDT.mjs.gz +0 -0
  36. package/dist/{chunk-275WERXZ.js → chunk-VKOVFVDJ.js} +874 -9
  37. package/dist/chunk-VKOVFVDJ.js.br +0 -0
  38. package/dist/{chunk-275WERXZ.js.gz → chunk-VKOVFVDJ.js.gz} +0 -0
  39. package/dist/hooks-unstable.d.ts +207 -2
  40. package/dist/hooks-unstable.d.ts.map +1 -1
  41. package/dist/hooks-unstable.js +81 -77
  42. package/dist/hooks-unstable.js.br +0 -0
  43. package/dist/hooks-unstable.js.gz +0 -0
  44. package/dist/hooks-unstable.mjs +3 -3
  45. package/dist/hooks-unstable.mjs.br +0 -0
  46. package/dist/hooks-unstable.mjs.gz +0 -0
  47. package/dist/i18n.js +4 -4
  48. package/dist/i18n.js.br +0 -0
  49. package/dist/i18n.js.gz +0 -0
  50. package/dist/i18n.mjs +1 -1
  51. package/dist/i18n.mjs.br +0 -0
  52. package/dist/i18n.mjs.gz +0 -0
  53. package/dist/{index-waNAYwmr.d.ts → index-DWvM1PBB.d.ts} +16 -1
  54. package/dist/index-DWvM1PBB.d.ts.map +1 -0
  55. package/dist/index.d.ts +146 -26
  56. package/dist/index.js +34 -34
  57. package/dist/index.js.br +0 -0
  58. package/dist/index.js.gz +0 -0
  59. package/dist/index.mjs +4 -4
  60. package/dist/index.mjs.br +0 -0
  61. package/dist/index.mjs.gz +0 -0
  62. package/dist/pptx-viewer.css +1 -1
  63. package/dist/pptx-viewer.css.br +0 -0
  64. package/dist/pptx-viewer.css.gz +0 -0
  65. package/dist/viewer/index.js +20 -20
  66. package/dist/viewer/index.js.br +0 -0
  67. package/dist/viewer/index.js.gz +0 -0
  68. package/dist/viewer/index.mjs +4 -4
  69. package/dist/viewer/index.mjs.br +0 -0
  70. package/dist/viewer/index.mjs.gz +0 -0
  71. package/package.json +1 -1
  72. package/dist/Model3DScene-E7YIHJ2R.mjs.br +0 -0
  73. package/dist/Model3DScene-E7YIHJ2R.mjs.gz +0 -0
  74. package/dist/Model3DScene-RYR4SSOM.js.br +0 -0
  75. package/dist/Model3DScene-RYR4SSOM.js.gz +0 -0
  76. package/dist/SurfaceChart3DScene-PBSZVNAM.js.br +0 -0
  77. package/dist/SurfaceChart3DScene-PBSZVNAM.js.gz +0 -0
  78. package/dist/SurfaceChart3DScene-ZM3J67VQ.mjs.br +0 -0
  79. package/dist/SurfaceChart3DScene-ZM3J67VQ.mjs.gz +0 -0
  80. package/dist/chunk-275WERXZ.js.br +0 -0
  81. package/dist/chunk-DPTDFK2L.js.br +0 -0
  82. package/dist/chunk-DPTDFK2L.js.gz +0 -0
  83. package/dist/chunk-E3KJKCSV.mjs.br +0 -0
  84. package/dist/chunk-KVTSERRP.js.br +0 -0
  85. package/dist/chunk-KVTSERRP.js.gz +0 -0
  86. package/dist/chunk-MEVZNYJK.mjs.br +0 -0
  87. package/dist/chunk-UCFXE6YS.mjs.br +0 -0
  88. package/dist/chunk-UCFXE6YS.mjs.gz +0 -0
  89. package/dist/chunk-UDM2SYE3.mjs.br +0 -0
  90. package/dist/chunk-UDM2SYE3.mjs.gz +0 -0
  91. package/dist/chunk-ZISXRMDJ.js.br +0 -0
  92. package/dist/index-waNAYwmr.d.ts.map +0 -1
Binary file
@@ -1,5 +1,5 @@
1
- import { SHAPE_PRESET_DEFS, TOOLBAR_TABS, computeValueRangeForChart, cloneTemplateElementsBySlideId, cloneSlide, countTextSegments, expandTextBuildAnimations, TimelineEngine, TEXT_BUILD_ID_SEP, computeEntranceAnimationDelay, storePresentationDeck, loadPresentationDeck, clearPresentationDeck, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, isPresentationSessionMessage, collectMediaElements, collectImagePaths, buildInitialGuides, saveAutosaveSnapshot, getAnimationInitialStyle, normalizeHexColor, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, computeAutoFitTextStyle, resolveLineHeight, getKinsokuLineBreakStyles, buildTextBody3DSceneStyle, resolveParagraphRtl, resolveParagraphAlign, resolveCssTextAlign, colorWithOpacity, build3DExtrusionData, getResolvedShapeClipPath, normalizeStrokeDashType, buildCssGradientFromShapeStyle, buildShadowCssFromShapeStyle, buildInnerShadowCssFromShapeStyle, buildMultiLayerShadowCss, buildGlowBoxShadow, getCompoundLineBoxShadow, getEffectDagFilter, buildPatternFillCss, buildReflectionCss, getCssBorderDashStyle, getCompoundLineBorderWidth, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, clampCropValue, computeSelectionRect, rectToCells, isCellInRect, buildChartViewModel, buildPreviewAnimation, isTemplateElementId, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, detectTouchDevice, detectOrientation, isMobileViewport, MOBILE_BREAKPOINT, TABLET_BREAKPOINT, remapTextToSegments, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, createSyncGate, validateRoomId, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, BROADCAST_THROTTLE_MS, sanitizeColor, readSlidesFromYDoc, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createTouchGestureRecognizer, isKeyboardOpen, openPptxFile, readBackstageRecentFile, isActionHidden, buildElementClipboardPayload, generatePackageReadme, downloadBlob, groupElements, generateElementId, makeCloneId, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, derivePresenceList, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, cloneHistorySnapshot, createPresentationSessionId, resolveTransitionDurationMs, isUrlSafe, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, presenterElapsed, stepPresenterZoom, resetPresenterTimer, togglePresenterTimer, isTemplateElement, substituteFieldText, resolveUnderlineDecorationStyle, hasDistinctScriptFonts, buildTextReflectionCss, getTextAlphaOpacity, buildTextRunFilterChain, buildTextShadowCss, apply3dEffects, clampUnitInterval, getRoundRectRadiusPx, computeColumnBoundaries, parseDrawingColor, parseDrawingColorOpacity, getPatternSvg, ooxmlDashToCssBorderStyle, getChartStylePalette, computeLayout, valueToY, formatAxisValue, computeLayoutOptions, splitSeriesByAxis, computeValueRange, getSecondaryValueAxis, seriesColor, paletteColor, resolveRegionCode, normalizeValue, sequentialColorScale, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, sanitizeDownloadFilename, encodeGif, groupSlidesBySection, hasCopyableFormat, createBackstagePresentation, cloneElementForPaste, computeScrollDelta, rerouteConnectorsForMovedElements, applyReroutedConnectors, buildPrintHtmlDocument, convertOmmlToMathMl, sanitizeMathMl, buildTextFillCss, resolvePictureBullet, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, tintColor2, shadeColor2, deleteTableColumn, insertTableColumn, deleteTableRow, insertTableRow, splitCell, mergeCells, buildSlidesPdfBytes, buildNotesPdfBytes, isPpactionUrl, parsePpactionUrl, safeOpenUrl, ACTION_BUTTON_PRESETS, buildSmartArtPresetData, computeSnapToShape, computeMarqueeHitIds, mergeAdditiveSelection, segmentByScript, resolveFontForScript, generateLogTicks, formatAxisValueWithUnits, getDisplayUnitLabel, applyResize, snapBoxToGrid, chartPartToAttrs } from './chunk-MEVZNYJK.mjs';
2
- import { translationsEn } from './chunk-E3KJKCSV.mjs';
1
+ import { SHAPE_PRESET_DEFS, TOOLBAR_TABS, computeValueRangeForChart, cloneTemplateElementsBySlideId, cloneSlide, countTextSegments, expandTextBuildAnimations, TimelineEngine, TEXT_BUILD_ID_SEP, computeEntranceAnimationDelay, storePresentationDeck, loadPresentationDeck, clearPresentationDeck, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, isPresentationSessionMessage, collectMediaElements, collectImagePaths, buildInitialGuides, saveAutosaveSnapshot, getAnimationInitialStyle, normalizeHexColor, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, computeAutoFitTextStyle, resolveLineHeight, getKinsokuLineBreakStyles, buildTextBody3DSceneStyle, resolveParagraphRtl, resolveParagraphAlign, resolveCssTextAlign, colorWithOpacity, build3DExtrusionData, getResolvedShapeClipPath, normalizeStrokeDashType, buildCssGradientFromShapeStyle, buildShadowCssFromShapeStyle, buildInnerShadowCssFromShapeStyle, buildMultiLayerShadowCss, buildGlowBoxShadow, getCompoundLineBoxShadow, getEffectDagFilter, buildPatternFillCss, buildReflectionCss, getCssBorderDashStyle, getCompoundLineBorderWidth, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, clampCropValue, computeSelectionRect, rectToCells, isCellInRect, buildChartViewModel, buildPreviewAnimation, isTemplateElementId, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, detectTouchDevice, detectOrientation, isMobileViewport, MOBILE_BREAKPOINT, TABLET_BREAKPOINT, remapTextToSegments, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, createViewerOptionsStore, createSyncGate, validateRoomId, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, BROADCAST_THROTTLE_MS, sanitizeColor, readSlidesFromYDoc, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createTouchGestureRecognizer, isKeyboardOpen, openPptxFile, readBackstageRecentFile, isActionHidden, buildElementClipboardPayload, generatePackageReadme, downloadBlob, groupElements, generateElementId, makeCloneId, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, derivePresenceList, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, cloneHistorySnapshot, createPresentationSessionId, resolveTransitionDurationMs, isUrlSafe, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, presenterElapsed, stepPresenterZoom, resetPresenterTimer, togglePresenterTimer, isTemplateElement, substituteFieldText, resolveUnderlineDecorationStyle, hasDistinctScriptFonts, buildTextReflectionCss, getTextAlphaOpacity, buildTextRunFilterChain, buildTextShadowCss, apply3dEffects, clampUnitInterval, getRoundRectRadiusPx, computeColumnBoundaries, parseDrawingColor, parseDrawingColorOpacity, getPatternSvg, ooxmlDashToCssBorderStyle, getChartStylePalette, computeLayout, valueToY, formatAxisValue, computeLayoutOptions, splitSeriesByAxis, computeValueRange, getSecondaryValueAxis, seriesColor, paletteColor, resolveRegionCode, normalizeValue, sequentialColorScale, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, sanitizeDownloadFilename, encodeGif, groupSlidesBySection, hasCopyableFormat, createBackstagePresentation, cloneElementForPaste, computeScrollDelta, rerouteConnectorsForMovedElements, applyReroutedConnectors, buildPrintHtmlDocument, convertOmmlToMathMl, sanitizeMathMl, buildTextFillCss, resolvePictureBullet, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, tintColor2, shadeColor2, deleteTableColumn, insertTableColumn, deleteTableRow, insertTableRow, splitCell, mergeCells, buildSlidesPdfBytes, buildNotesPdfBytes, isPpactionUrl, parsePpactionUrl, safeOpenUrl, ACTION_BUTTON_PRESETS, buildSmartArtPresetData, computeSnapToShape, computeMarqueeHitIds, mergeAdditiveSelection, segmentByScript, resolveFontForScript, generateLogTicks, formatAxisValueWithUnits, getDisplayUnitLabel, applyResize, snapBoxToGrid, chartPartToAttrs } from './chunk-QOBKJKLT.mjs';
2
+ import { translationsEn } from './chunk-M3SIFXWD.mjs';
3
3
  import { hasTextProperties, PptxHandler, EncryptedFileError, hasShapeProperties, isImageLikeElement, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, guidePxToEmu, mergeShapes, getSubstituteFontFamily, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, SvgExporter, rebuildTableStructureInRawXml, updateCellTextStyleInRawXml, updateCellTextInRawXml, updateMergeAttrsInRawXml, elementActionToPptxAction } from './chunk-LDZQNYWL.mjs';
4
4
  import React3, { useState, useEffect, useMemo, Suspense, useRef, useCallback, useSyncExternalStore, useImperativeHandle, useLayoutEffect } from 'react';
5
5
  import { LuTriangle, LuPlus, LuMoveRight, LuMinus, LuDiamond, LuDatabase, LuCircle, LuSquare } from 'react-icons/lu';
@@ -15,7 +15,7 @@ function cloneHistorySnapshot2(snapshot) {
15
15
  }
16
16
 
17
17
  // src/viewer/hooks/useEditorHistory.ts
18
- var MAX_HISTORY_ENTRIES = 120;
18
+ var DEFAULT_MAX_HISTORY_ENTRIES = 120;
19
19
  function useEditorHistory(input) {
20
20
  const {
21
21
  slides,
@@ -24,6 +24,7 @@ function useEditorHistory(input) {
24
24
  templateElementsBySlideId,
25
25
  loading,
26
26
  error,
27
+ maxHistoryEntries = DEFAULT_MAX_HISTORY_ENTRIES,
27
28
  hasActivePointerInteraction,
28
29
  pointerCommitNonce,
29
30
  setSlides,
@@ -198,7 +199,7 @@ function useEditorHistory(input) {
198
199
  return;
199
200
  }
200
201
  historyPastRef.current.push(cloneHistorySnapshot2(previousSnapshot));
201
- if (historyPastRef.current.length > MAX_HISTORY_ENTRIES) {
202
+ while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
202
203
  historyPastRef.current.shift();
203
204
  }
204
205
  historyFutureRef.current = [];
@@ -214,6 +215,7 @@ function useEditorHistory(input) {
214
215
  error,
215
216
  hasActivePointerInteraction,
216
217
  loading,
218
+ maxHistoryEntries,
217
219
  pointerCommitNonce,
218
220
  slides,
219
221
  updateHistoryAvailability
@@ -1544,6 +1546,7 @@ function useSlideNavigation(input) {
1544
1546
  onPlayActionSound,
1545
1547
  loopContinuously,
1546
1548
  useTimings,
1549
+ onAdvancePastLastSlide,
1547
1550
  playNextAnimationGroup,
1548
1551
  clearPresentationTimers,
1549
1552
  runPresentationEntranceAnimations,
@@ -1599,6 +1602,10 @@ function useSlideNavigation(input) {
1599
1602
  setShowRehearsalSummary(true);
1600
1603
  return;
1601
1604
  }
1605
+ if (!loopContinuously && !rehearsing && direction === 1 && nextPosition >= availableSlideIndexes.length && onAdvancePastLastSlide) {
1606
+ onAdvancePastLastSlide();
1607
+ return;
1608
+ }
1602
1609
  let resolvedPosition;
1603
1610
  if (loopContinuously && !rehearsing && direction === 1 && nextPosition >= availableSlideIndexes.length) {
1604
1611
  resolvedPosition = 0;
@@ -1631,6 +1638,7 @@ function useSlideNavigation(input) {
1631
1638
  [
1632
1639
  clearPresentationTimers,
1633
1640
  loopContinuously,
1641
+ onAdvancePastLastSlide,
1634
1642
  onPlayActionSound,
1635
1643
  onSetActiveSlideIndex,
1636
1644
  onSetMode,
@@ -1801,7 +1809,8 @@ function usePresentationMode(input) {
1801
1809
  onSaveRehearsalTimings,
1802
1810
  loopContinuously,
1803
1811
  showWithAnimation,
1804
- useTimings
1812
+ useTimings,
1813
+ endWithBlackSlide = true
1805
1814
  } = input;
1806
1815
  const [presentationSlideIndex, setPresentationSlideIndex] = useState(0);
1807
1816
  const [presentationSlideVisible, setPresentationSlideVisible] = useState(true);
@@ -1810,6 +1819,7 @@ function usePresentationMode(input) {
1810
1819
  setTransitionOverlay(null);
1811
1820
  }, []);
1812
1821
  const [presenterMode, setPresenterMode] = useState(false);
1822
+ const [endOfShowVisible, setEndOfShowVisible] = useState(false);
1813
1823
  const [presentationStartTime, setPresentationStartTime] = useState(null);
1814
1824
  const switchingToPresenterRef = useRef(false);
1815
1825
  const {
@@ -1846,8 +1856,15 @@ function usePresentationMode(input) {
1846
1856
  setPresentationStartTime,
1847
1857
  setPresenterMode
1848
1858
  });
1859
+ const handleAdvancePastLastSlide = useCallback(() => {
1860
+ if (endWithBlackSlide) {
1861
+ setEndOfShowVisible(true);
1862
+ } else {
1863
+ onSetMode("edit");
1864
+ }
1865
+ }, [endWithBlackSlide, onSetMode]);
1849
1866
  const {
1850
- movePresentationSlide,
1867
+ movePresentationSlide: moveNavigationSlide,
1851
1868
  navigateToSlide,
1852
1869
  handlePresentationAction,
1853
1870
  scheduleAutoAdvanceForSlide
@@ -1863,6 +1880,7 @@ function usePresentationMode(input) {
1863
1880
  onPlayActionSound,
1864
1881
  loopContinuously,
1865
1882
  useTimings,
1883
+ onAdvancePastLastSlide: handleAdvancePastLastSlide,
1866
1884
  playNextAnimationGroup,
1867
1885
  clearPresentationTimers,
1868
1886
  runPresentationEntranceAnimations,
@@ -1871,6 +1889,19 @@ function usePresentationMode(input) {
1871
1889
  recordCurrentSlideTime,
1872
1890
  setShowRehearsalSummary
1873
1891
  });
1892
+ const movePresentationSlide = useCallback(
1893
+ (direction) => {
1894
+ if (endOfShowVisible) {
1895
+ setEndOfShowVisible(false);
1896
+ if (direction === 1) {
1897
+ onSetMode("edit");
1898
+ }
1899
+ return;
1900
+ }
1901
+ moveNavigationSlide(direction);
1902
+ },
1903
+ [endOfShowVisible, moveNavigationSlide, onSetMode]
1904
+ );
1874
1905
  const { handleZoomClick, zoomReturnSlideIndex, returnToZoomSlide, clearZoomReturn } = useZoomNavigation({ navigateToSlide });
1875
1906
  const presenterConsole = usePresenterConsole(presentationSlideIndex);
1876
1907
  const {
@@ -1976,6 +2007,7 @@ function usePresentationMode(input) {
1976
2007
  } else {
1977
2008
  setTransitionOverlay(null);
1978
2009
  }
2010
+ setEndOfShowVisible(false);
1979
2011
  }, [mode]);
1980
2012
  useEffect(() => {
1981
2013
  if (mode !== "present") {
@@ -2047,6 +2079,7 @@ function usePresentationMode(input) {
2047
2079
  presentationKeyframesCss,
2048
2080
  clearPresentationTimers,
2049
2081
  runPresentationEntranceAnimations,
2082
+ endOfShowVisible,
2050
2083
  movePresentationSlide,
2051
2084
  navigateToSlide,
2052
2085
  handlePresentationAction,
@@ -2100,7 +2133,7 @@ function nextStrokeId() {
2100
2133
  return `stroke-${strokeIdCounter}`;
2101
2134
  }
2102
2135
  function usePresentationAnnotations(input) {
2103
- const { isActive, activeSlideIndex } = input;
2136
+ const { isActive, activeSlideIndex, popupToolbarEnabled = true } = input;
2104
2137
  const [presentationTool, setPresentationToolState] = useState("none");
2105
2138
  const [penColor, setPenColor] = useState("#ff0000");
2106
2139
  const [highlighterColor, setHighlighterColor] = useState("#ffff00");
@@ -2253,6 +2286,9 @@ function usePresentationAnnotations(input) {
2253
2286
  setLaserPosition(null);
2254
2287
  return;
2255
2288
  }
2289
+ if (!popupToolbarEnabled) {
2290
+ return;
2291
+ }
2256
2292
  const handleMouseMove = () => {
2257
2293
  setToolbarVisible(true);
2258
2294
  window.clearTimeout(toolbarTimerRef.current);
@@ -2265,7 +2301,7 @@ function usePresentationAnnotations(input) {
2265
2301
  window.removeEventListener("mousemove", handleMouseMove);
2266
2302
  window.clearTimeout(toolbarTimerRef.current);
2267
2303
  };
2268
- }, [isActive]);
2304
+ }, [isActive, popupToolbarEnabled]);
2269
2305
  const getAllSlideAnnotations = useCallback(() => {
2270
2306
  const map = new Map(slideAnnotationsRef.current);
2271
2307
  if (annotationStrokes.length > 0) {
@@ -8466,7 +8502,7 @@ function FailedToLoad() {
8466
8502
  var LazySurfaceChart3DScene = React3.lazy(
8467
8503
  async () => {
8468
8504
  try {
8469
- return await import('./SurfaceChart3DScene-ZM3J67VQ.mjs');
8505
+ return await import('./SurfaceChart3DScene-JU737NN5.mjs');
8470
8506
  } catch {
8471
8507
  return { default: FailedToLoad };
8472
8508
  }
@@ -11556,7 +11592,8 @@ function useCanvasInteractions(input) {
11556
11592
  presentationHandleAction,
11557
11593
  setEditingEquationOmml,
11558
11594
  setIsEquationDialogOpen,
11559
- setPointerCommitNonce
11595
+ setPointerCommitNonce,
11596
+ transformCommittedText
11560
11597
  } = input;
11561
11598
  const justSelectedRef = useRef(false);
11562
11599
  const handleInlineEditCommit = () => {
@@ -11566,9 +11603,10 @@ function useCanvasInteractions(input) {
11566
11603
  }
11567
11604
  const el = elementLookup.get(editId);
11568
11605
  if (el && hasTextProperties(el)) {
11569
- const newSegments = remapTextToSegments(inlineEditingText, el.textSegments, el.textStyle);
11606
+ const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
11607
+ const newSegments = remapTextToSegments(committedText, el.textSegments, el.textStyle);
11570
11608
  ops.updateElementById(editId, {
11571
- text: inlineEditingText,
11609
+ text: committedText,
11572
11610
  textSegments: newSegments
11573
11611
  });
11574
11612
  history.markDirty();
@@ -11670,6 +11708,9 @@ function useCanvasInteractions(input) {
11670
11708
  setSnapLines([]);
11671
11709
  };
11672
11710
  const handleElementContextMenu = (elementId, e) => {
11711
+ if (mode === "present") {
11712
+ return;
11713
+ }
11673
11714
  e.preventDefault();
11674
11715
  e.stopPropagation();
11675
11716
  if (!selectedElementIdSet.has(elementId)) {
@@ -15106,26 +15147,17 @@ function useDerivedSlideState(input) {
15106
15147
  };
15107
15148
  }
15108
15149
  function useAnnotationHandlers(input) {
15109
- const { mode, presentation, annotations, history, setMode, setSlides } = input;
15150
+ const {
15151
+ mode,
15152
+ presentation,
15153
+ annotations,
15154
+ history,
15155
+ setMode,
15156
+ setSlides,
15157
+ promptKeepInkAnnotations = true
15158
+ } = input;
15110
15159
  const [showKeepAnnotationsDialog, setShowKeepAnnotationsDialog] = useState(false);
15111
15160
  const pendingModeAfterAnnotationsRef = useRef("edit");
15112
- const handleSetMode = useCallback(
15113
- (nextMode) => {
15114
- if (nextMode === "present") {
15115
- presentation.enterPresentMode();
15116
- } else if (mode === "present" && annotations.hasAnyAnnotations) {
15117
- stopAllPersistentAudio();
15118
- pendingModeAfterAnnotationsRef.current = nextMode;
15119
- setShowKeepAnnotationsDialog(true);
15120
- } else {
15121
- if (mode === "present") {
15122
- stopAllPersistentAudio();
15123
- }
15124
- setMode(nextMode);
15125
- }
15126
- },
15127
- [presentation, mode, annotations.hasAnyAnnotations, setMode]
15128
- );
15129
15161
  const handleKeepAnnotations = useCallback(() => {
15130
15162
  const annotationMap = annotations.allSlideAnnotations;
15131
15163
  if (annotationMap.size === 0) {
@@ -15194,6 +15226,34 @@ function useAnnotationHandlers(input) {
15194
15226
  setShowKeepAnnotationsDialog(false);
15195
15227
  setMode(pendingModeAfterAnnotationsRef.current);
15196
15228
  }, [annotations, setMode, setSlides, history]);
15229
+ const handleSetMode = useCallback(
15230
+ (nextMode) => {
15231
+ if (nextMode === "present") {
15232
+ presentation.enterPresentMode();
15233
+ } else if (mode === "present" && annotations.hasAnyAnnotations) {
15234
+ stopAllPersistentAudio();
15235
+ pendingModeAfterAnnotationsRef.current = nextMode;
15236
+ if (promptKeepInkAnnotations) {
15237
+ setShowKeepAnnotationsDialog(true);
15238
+ } else {
15239
+ handleKeepAnnotations();
15240
+ }
15241
+ } else {
15242
+ if (mode === "present") {
15243
+ stopAllPersistentAudio();
15244
+ }
15245
+ setMode(nextMode);
15246
+ }
15247
+ },
15248
+ [
15249
+ presentation,
15250
+ mode,
15251
+ annotations.hasAnyAnnotations,
15252
+ promptKeepInkAnnotations,
15253
+ handleKeepAnnotations,
15254
+ setMode
15255
+ ]
15256
+ );
15197
15257
  const handleDiscardAnnotations = useCallback(() => {
15198
15258
  annotations.clearAllAnnotations();
15199
15259
  setShowKeepAnnotationsDialog(false);
@@ -15420,14 +15480,18 @@ function usePresentationSetup(input) {
15420
15480
  setMode,
15421
15481
  setActiveSlideIndex,
15422
15482
  setSlides,
15423
- history
15483
+ history,
15484
+ endWithBlackSlide = true,
15485
+ promptKeepInkAnnotations = true,
15486
+ popupToolbarEnabled = true
15424
15487
  } = input;
15425
15488
  const actionSoundHandlerRef = useRef(null);
15426
15489
  const [, setShowKeepAnnotationsDialog] = useState(false);
15427
15490
  const pendingModeRef = useRef("edit");
15428
15491
  const annotations = usePresentationAnnotations({
15429
15492
  isActive: mode === "present",
15430
- activeSlideIndex
15493
+ activeSlideIndex,
15494
+ popupToolbarEnabled
15431
15495
  });
15432
15496
  const presentation = usePresentationMode({
15433
15497
  mode,
@@ -15437,7 +15501,7 @@ function usePresentationSetup(input) {
15437
15501
  containerRef,
15438
15502
  content,
15439
15503
  onSetMode: (nextMode) => {
15440
- if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations) {
15504
+ if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations && promptKeepInkAnnotations) {
15441
15505
  pendingModeRef.current = nextMode;
15442
15506
  setShowKeepAnnotationsDialog(true);
15443
15507
  } else {
@@ -15490,7 +15554,8 @@ function usePresentationSetup(input) {
15490
15554
  },
15491
15555
  loopContinuously: shouldLoopContinuously(presentationProperties),
15492
15556
  showWithAnimation: presentationProperties.showWithAnimation,
15493
- useTimings: presentationProperties.advanceMode !== "manual"
15557
+ useTimings: presentationProperties.advanceMode !== "manual",
15558
+ endWithBlackSlide
15494
15559
  });
15495
15560
  return { presentation, annotations, actionSoundHandlerRef };
15496
15561
  }
@@ -15511,7 +15576,8 @@ function useEditorOperations(input) {
15511
15576
  dialogs,
15512
15577
  presentation,
15513
15578
  userName,
15514
- handlerRef
15579
+ handlerRef,
15580
+ transformCommittedText
15515
15581
  } = input;
15516
15582
  const ops = useElementOperations({
15517
15583
  activeSlide,
@@ -15580,7 +15646,8 @@ function useEditorOperations(input) {
15580
15646
  presentationHandleAction: presentation.handlePresentationAction,
15581
15647
  setEditingEquationOmml: dialogs.setEditingEquationOmml,
15582
15648
  setIsEquationDialogOpen: dialogs.setIsEquationDialogOpen,
15583
- setPointerCommitNonce: state.setPointerCommitNonce
15649
+ setPointerCommitNonce: state.setPointerCommitNonce,
15650
+ transformCommittedText
15584
15651
  });
15585
15652
  const insertHandlers = useInsertElements({
15586
15653
  activeSlide,
@@ -16602,6 +16669,17 @@ function useReducedMotion() {
16602
16669
  setManualReducedMotion
16603
16670
  };
16604
16671
  }
16672
+ function useViewerOptions() {
16673
+ const storeRef = useRef(null);
16674
+ storeRef.current ??= createViewerOptionsStore();
16675
+ const store = storeRef.current;
16676
+ const options = useSyncExternalStore(
16677
+ (onStoreChange) => store.subscribe(onStoreChange),
16678
+ () => store.getOptions(),
16679
+ () => store.getOptions()
16680
+ );
16681
+ return { optionsStore: store, options };
16682
+ }
16605
16683
  var KNOWN_TAB_IDS = new Set(TOOLBAR_TABS.map((tab) => tab.id));
16606
16684
  function computeToolbarVisibility(hiddenActions) {
16607
16685
  const isHidden = (id) => isActionHidden(id, hiddenActions);
@@ -18310,4 +18388,4 @@ function useSwipeNavigation(input) {
18310
18388
  return { onTouchStart, onTouchEnd };
18311
18389
  }
18312
18390
 
18313
- export { ACTION_VERB_MAP, ANIMATION_PRESET_OPTIONS, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, GRID_SIZE, HYPERLINK_COLOR, MIN_ELEMENT_SIZE, MIN_TOUCH_TARGET, SHAPE_PRESETS, SHORTCUT_REFERENCE_ITEMS, SLIDE_NAV_THUMBNAIL_WIDTH, SLIDE_TRANSITION_OPTIONS, SmartArtNodeText, TOOLBAR_SECTIONS, build3DExtrusionData2 as build3DExtrusionData, buildLineGlowFilter, buildLineShadowCss, buildReactChartViewModel, buildTextBody3DSceneStyle2 as buildTextBody3DSceneStyle, buildTree, chevronPoints, clearAudienceContent, cn, colour, computeToolbarVisibility, detectTargetType, fitFontSize, gearPath, getAnimationInitialStyle2 as getAnimationInitialStyle, getConnectorPathGeometry, getCropShapeClipPath, getDuotoneColors, getImageRenderStyle, getImageTilingStyle, getShapeVisualStyle, getTextLayoutStyle, getTextStyleForElement, getTextWarpStyle, hasDagDuotoneEffect, isAudienceTab, isConnectorOrLineElement, isImageTiled, layoutToCategory, loadAudienceContent, nodeOpacity, parseAudienceNonce, parseEmailUrl, parseSlideFromUrl, renderAccentProcess, renderAlternatingFlow, renderChartElement, renderConnectorMarker, renderDagDuotoneSvgFilter, renderDescendingProcess, renderGroupedList, renderHorizontalPictureList, renderMediaElement, renderPictureAccentList, renderPyramidList, renderStepDownProcess, renderTableElement, renderTextSegments, renderToCanvas, renderVectorShape, renderVerticalBlockList, renderVerticalChevronList, resolvePalette, resolveSmartArtDataPalette, resolveStyle, scopeLayoutOptionsToActiveSlide, shouldRenderFallbackLabel, smartArtNodeGroupProps, startPreviewAnimation, stopPreviewAnimation, storeAudienceContent, styleShadow, styleStroke, treeDepth, treeWidth, truncate, useAnimationPlayback, useAnnotationHandlers, useAudienceMode, useAutosave, useBroadcastFollower, useCanvasInteractions, useClipboardHandlers, useCollaborativeHistory, useCollaborativeState, useComments, useContentLifecycle, useDerivedElementState, useDerivedSlideState, useDialogCustomShows, useEditorHistory, useEditorOperations, useElementManipulation, useElementOperations, useExportHandlers, useExportSaveAs, useFindReplace, useFollowMode, useFontInjection, useGroupAlignLayerHandlers, useIOHandlers, useInsertElements, useIsMobile, useKeyboardInsets, useKeyboardShortcutWiring, useKeyboardShortcuts, useLayoutSwitching, useLoadContent, useMergeShapesHandler, useModalDismissDrag, usePointerHandlers, usePresenceTracking, usePresentationAnnotations, usePresentationKeyboard, usePresentationMode, usePresentationSetup, usePresenterWindow, usePrintHandlers, usePropertyHandlers, useRecoveryDetection, useReducedMotion, useRehearsalTimings, useResizablePanels, useSectionOperations, useSerialize, useSheetDismissDrag, useSlideManagement, useSlideNavigation, useSwipeNavigation, useTableOperations, useThemeHandlers, useThemeSwitching, useToolbarVisibility, useTouchGestures, useViewerBuildingBlocks, useViewerCoreState, useViewerDialogs, useViewerIntegration, useViewerState, useViewerUIState, useVirtualizedSlides, useYjsDocumentSync, useYjsProvider, useZoomNavigation, useZoomViewport, wrapChrome };
18391
+ export { ACTION_VERB_MAP, ANIMATION_PRESET_OPTIONS, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, GRID_SIZE, HYPERLINK_COLOR, MIN_ELEMENT_SIZE, MIN_TOUCH_TARGET, SHAPE_PRESETS, SHORTCUT_REFERENCE_ITEMS, SLIDE_NAV_THUMBNAIL_WIDTH, SLIDE_TRANSITION_OPTIONS, SmartArtNodeText, TOOLBAR_SECTIONS, build3DExtrusionData2 as build3DExtrusionData, buildLineGlowFilter, buildLineShadowCss, buildReactChartViewModel, buildTextBody3DSceneStyle2 as buildTextBody3DSceneStyle, buildTree, chevronPoints, clearAudienceContent, cn, colour, computeToolbarVisibility, detectTargetType, fitFontSize, gearPath, getAnimationInitialStyle2 as getAnimationInitialStyle, getConnectorPathGeometry, getCropShapeClipPath, getDuotoneColors, getImageRenderStyle, getImageTilingStyle, getShapeVisualStyle, getTextLayoutStyle, getTextStyleForElement, getTextWarpStyle, hasDagDuotoneEffect, isAudienceTab, isConnectorOrLineElement, isImageTiled, layoutToCategory, loadAudienceContent, nodeOpacity, parseAudienceNonce, parseEmailUrl, parseSlideFromUrl, renderAccentProcess, renderAlternatingFlow, renderChartElement, renderConnectorMarker, renderDagDuotoneSvgFilter, renderDescendingProcess, renderGroupedList, renderHorizontalPictureList, renderMediaElement, renderPictureAccentList, renderPyramidList, renderStepDownProcess, renderTableElement, renderTextSegments, renderToCanvas, renderVectorShape, renderVerticalBlockList, renderVerticalChevronList, resolvePalette, resolveSmartArtDataPalette, resolveStyle, scopeLayoutOptionsToActiveSlide, shouldRenderFallbackLabel, smartArtNodeGroupProps, startPreviewAnimation, stopPreviewAnimation, storeAudienceContent, styleShadow, styleStroke, treeDepth, treeWidth, truncate, useAnimationPlayback, useAnnotationHandlers, useAudienceMode, useAutosave, useBroadcastFollower, useCanvasInteractions, useClipboardHandlers, useCollaborativeHistory, useCollaborativeState, useComments, useContentLifecycle, useDerivedElementState, useDerivedSlideState, useDialogCustomShows, useEditorHistory, useEditorOperations, useElementManipulation, useElementOperations, useExportHandlers, useExportSaveAs, useFindReplace, useFollowMode, useFontInjection, useGroupAlignLayerHandlers, useIOHandlers, useInsertElements, useIsMobile, useKeyboardInsets, useKeyboardShortcutWiring, useKeyboardShortcuts, useLayoutSwitching, useLoadContent, useMergeShapesHandler, useModalDismissDrag, usePointerHandlers, usePresenceTracking, usePresentationAnnotations, usePresentationKeyboard, usePresentationMode, usePresentationSetup, usePresenterWindow, usePrintHandlers, usePropertyHandlers, useRecoveryDetection, useReducedMotion, useRehearsalTimings, useResizablePanels, useSectionOperations, useSerialize, useSheetDismissDrag, useSlideManagement, useSlideNavigation, useSwipeNavigation, useTableOperations, useThemeHandlers, useThemeSwitching, useToolbarVisibility, useTouchGestures, useViewerBuildingBlocks, useViewerCoreState, useViewerDialogs, useViewerIntegration, useViewerOptions, useViewerState, useViewerUIState, useVirtualizedSlides, useYjsDocumentSync, useYjsProvider, useZoomNavigation, useZoomViewport, wrapChrome };
Binary file
Binary file