pptx-react-viewer 2.4.0 → 2.5.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.
- package/CHANGELOG.md +17 -0
- package/dist/{AiChatPanel-SXYMXFYS.mjs → AiChatPanel-EMF3UYCE.mjs} +3 -3
- package/dist/AiChatPanel-EMF3UYCE.mjs.br +0 -0
- package/dist/AiChatPanel-EMF3UYCE.mjs.gz +0 -0
- package/dist/{AiChatPanel-HLLGXBZF.js → AiChatPanel-OHSLJNYG.js} +22 -22
- package/dist/AiChatPanel-OHSLJNYG.js.br +0 -0
- package/dist/AiChatPanel-OHSLJNYG.js.gz +0 -0
- package/dist/{Model3DScene-ZQBWLAMC.js → Model3DScene-ULHIJPMU.js} +2 -2
- package/dist/Model3DScene-ULHIJPMU.js.br +0 -0
- package/dist/Model3DScene-ULHIJPMU.js.gz +0 -0
- package/dist/{Model3DScene-IECT4RWT.mjs → Model3DScene-X6QJTWHV.mjs} +1 -1
- package/dist/{Model3DScene-IECT4RWT.mjs.br → Model3DScene-X6QJTWHV.mjs.br} +0 -0
- package/dist/Model3DScene-X6QJTWHV.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-4KRMRWW6.js → SurfaceChart3DScene-K7Q5NYZ4.js} +2 -2
- package/dist/SurfaceChart3DScene-K7Q5NYZ4.js.br +0 -0
- package/dist/SurfaceChart3DScene-K7Q5NYZ4.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-52C3IMPQ.mjs → SurfaceChart3DScene-PRCKQJQQ.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-52C3IMPQ.mjs.br → SurfaceChart3DScene-PRCKQJQQ.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-PRCKQJQQ.mjs.gz +0 -0
- package/dist/{chunk-XSBFV6TL.js → chunk-4MYZW7XT.js} +845 -844
- package/dist/chunk-4MYZW7XT.js.br +0 -0
- package/dist/chunk-4MYZW7XT.js.gz +0 -0
- package/dist/{chunk-VEZO33T2.js → chunk-7Q7AEPO7.js} +378 -324
- package/dist/chunk-7Q7AEPO7.js.br +0 -0
- package/dist/chunk-7Q7AEPO7.js.gz +0 -0
- package/dist/{chunk-LRIXPSVT.mjs → chunk-LIQGO45T.mjs} +72 -18
- package/dist/chunk-LIQGO45T.mjs.br +0 -0
- package/dist/chunk-LIQGO45T.mjs.gz +0 -0
- package/dist/{chunk-WK56SFN7.js → chunk-LTEDT475.js} +392 -68
- package/dist/chunk-LTEDT475.js.br +0 -0
- package/dist/chunk-LTEDT475.js.gz +0 -0
- package/dist/{chunk-5GHLRHBR.js → chunk-MJAEB43A.js} +3 -3
- package/dist/chunk-MJAEB43A.js.br +0 -0
- package/dist/chunk-MJAEB43A.js.gz +0 -0
- package/dist/{chunk-5TPQJWEO.js → chunk-NVH3RIN7.js} +271 -279
- package/dist/chunk-NVH3RIN7.js.br +0 -0
- package/dist/chunk-NVH3RIN7.js.gz +0 -0
- package/dist/{chunk-KK7FWBGO.mjs → chunk-SPSGMO5I.mjs} +9 -8
- package/dist/chunk-SPSGMO5I.mjs.br +0 -0
- package/dist/chunk-SPSGMO5I.mjs.gz +0 -0
- package/dist/{chunk-G6Q3NXRV.mjs → chunk-TGVID6BB.mjs} +40 -48
- package/dist/chunk-TGVID6BB.mjs.br +0 -0
- package/dist/chunk-TGVID6BB.mjs.gz +0 -0
- package/dist/{chunk-QBZA2GMB.mjs → chunk-VOV2N3NY.mjs} +388 -69
- package/dist/chunk-VOV2N3NY.mjs.br +0 -0
- package/dist/chunk-VOV2N3NY.mjs.gz +0 -0
- package/dist/{chunk-Q6FC2552.mjs → chunk-WJKMTDXS.mjs} +1 -1
- package/dist/chunk-WJKMTDXS.mjs.br +0 -0
- package/dist/chunk-WJKMTDXS.mjs.gz +0 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +34 -34
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +58 -1
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +78 -78
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.d.ts +33 -0
- package/dist/viewer/index.js +21 -21
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-HLLGXBZF.js.br +0 -0
- package/dist/AiChatPanel-HLLGXBZF.js.gz +0 -0
- package/dist/AiChatPanel-SXYMXFYS.mjs.br +0 -0
- package/dist/AiChatPanel-SXYMXFYS.mjs.gz +0 -0
- package/dist/Model3DScene-IECT4RWT.mjs.gz +0 -0
- package/dist/Model3DScene-ZQBWLAMC.js.br +0 -0
- package/dist/Model3DScene-ZQBWLAMC.js.gz +0 -0
- package/dist/SurfaceChart3DScene-4KRMRWW6.js.br +0 -0
- package/dist/SurfaceChart3DScene-4KRMRWW6.js.gz +0 -0
- package/dist/SurfaceChart3DScene-52C3IMPQ.mjs.gz +0 -0
- package/dist/chunk-5GHLRHBR.js.br +0 -0
- package/dist/chunk-5GHLRHBR.js.gz +0 -0
- package/dist/chunk-5TPQJWEO.js.br +0 -0
- package/dist/chunk-5TPQJWEO.js.gz +0 -0
- package/dist/chunk-G6Q3NXRV.mjs.br +0 -0
- package/dist/chunk-G6Q3NXRV.mjs.gz +0 -0
- package/dist/chunk-KK7FWBGO.mjs.br +0 -0
- package/dist/chunk-KK7FWBGO.mjs.gz +0 -0
- package/dist/chunk-LRIXPSVT.mjs.br +0 -0
- package/dist/chunk-LRIXPSVT.mjs.gz +0 -0
- package/dist/chunk-Q6FC2552.mjs.br +0 -0
- package/dist/chunk-Q6FC2552.mjs.gz +0 -0
- package/dist/chunk-QBZA2GMB.mjs.br +0 -0
- package/dist/chunk-QBZA2GMB.mjs.gz +0 -0
- package/dist/chunk-VEZO33T2.js.br +0 -0
- package/dist/chunk-VEZO33T2.js.gz +0 -0
- package/dist/chunk-WK56SFN7.js.br +0 -0
- package/dist/chunk-WK56SFN7.js.gz +0 -0
- package/dist/chunk-XSBFV6TL.js.br +0 -0
- package/dist/chunk-XSBFV6TL.js.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cloneHistorySnapshot, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, 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-
|
|
1
|
+
import { cloneHistorySnapshot, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, 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-TGVID6BB.mjs';
|
|
2
2
|
import { translationsEn } from './chunk-Z6HIZWIQ.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, PresentationAnimationController, computeEntranceAnimationDelay, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, createPresentationKeyBuffer, 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, remapTextToSegments, guidePxToEmu, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, createViewerOptionsStore, readSlidesFromYDoc, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, shouldAutoFollowBroadcaster, createTouchGestureRecognizer, isKeyboardOpen, openPptxFile, readBackstageRecentFile, isActionHidden, buildElementClipboardPayload, generatePackageReadme, groupElements, generateElementId, makeCloneId, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, derivePresenceList, mapPresentationKey, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildThemeColorMap, reResolveSlideColors, createPresentationSessionId, resolveTransitionDurationMs, isUrlSafe, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, presenterElapsed, stepPresenterZoom, resetPresenterTimer, togglePresenterTimer, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, encodeGif, groupSlidesBySection, hasCopyableFormat, createBackstagePresentation, 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 } from './chunk-
|
|
3
|
+
import { TOOLBAR_TABS, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, BROADCAST_THROTTLE_MS, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, PresentationAnimationController, computeEntranceAnimationDelay, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, 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, createViewerOptionsStore, readSlidesFromYDoc, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, shouldAutoFollowBroadcaster, createTouchGestureRecognizer, isKeyboardOpen, openPptxFile, readBackstageRecentFile, isActionHidden, buildElementClipboardPayload, generatePackageReadme, groupElements, generateElementId, makeCloneId, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, derivePresenceList, mapPresentationKey, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildThemeColorMap, reResolveSlideColors, createPresentationSessionId, resolveTransitionDurationMs, isUrlSafe, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, presenterElapsed, stepPresenterZoom, resetPresenterTimer, togglePresenterTimer, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, encodeGif, groupSlidesBySection, hasCopyableFormat, createBackstagePresentation, 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 } from './chunk-VOV2N3NY.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';
|
|
@@ -1015,6 +1015,7 @@ function useAnimationPlayback(input) {
|
|
|
1015
1015
|
const presentationTimersRef = useRef([]);
|
|
1016
1016
|
const controllerRef = useRef(null);
|
|
1017
1017
|
const buildRafRef = useRef(null);
|
|
1018
|
+
const seededCompletedRef = useRef(false);
|
|
1018
1019
|
const startBuildReveal = useCallback(
|
|
1019
1020
|
(controller, group) => {
|
|
1020
1021
|
driveBuildReveal(
|
|
@@ -1167,7 +1168,7 @@ function useAnimationPlayback(input) {
|
|
|
1167
1168
|
controller.resetHover(shapeId);
|
|
1168
1169
|
}, []);
|
|
1169
1170
|
const runPresentationEntranceAnimations = useCallback(
|
|
1170
|
-
(slideIndex) => {
|
|
1171
|
+
(slideIndex, options) => {
|
|
1171
1172
|
clearPresentationTimers();
|
|
1172
1173
|
if (!animationsEnabled) {
|
|
1173
1174
|
controllerRef.current = null;
|
|
@@ -1184,6 +1185,17 @@ function useAnimationPlayback(input) {
|
|
|
1184
1185
|
setPresentationAnimations([]);
|
|
1185
1186
|
return;
|
|
1186
1187
|
}
|
|
1188
|
+
seededCompletedRef.current = false;
|
|
1189
|
+
if (options?.completed) {
|
|
1190
|
+
const seeded = controllerRef.current;
|
|
1191
|
+
if (seeded) {
|
|
1192
|
+
seededCompletedRef.current = seeded.hasMoreSteps();
|
|
1193
|
+
seeded.completeAll();
|
|
1194
|
+
setPresentationElementStates(seeded.computeStates());
|
|
1195
|
+
}
|
|
1196
|
+
setPresentationAnimations([]);
|
|
1197
|
+
return;
|
|
1198
|
+
}
|
|
1187
1199
|
const controller = controllerRef.current;
|
|
1188
1200
|
if (controller && controller.hasMoreSteps()) {
|
|
1189
1201
|
const firstGroup = controller.peekNext();
|
|
@@ -1252,6 +1264,7 @@ function useAnimationPlayback(input) {
|
|
|
1252
1264
|
handleHoverStart,
|
|
1253
1265
|
handleHoverEnd,
|
|
1254
1266
|
runPresentationEntranceAnimations,
|
|
1267
|
+
isSeededCompleted: () => seededCompletedRef.current,
|
|
1255
1268
|
presentationTimersRef
|
|
1256
1269
|
};
|
|
1257
1270
|
}
|
|
@@ -1482,7 +1495,14 @@ function usePresenterWindow(input) {
|
|
|
1482
1495
|
};
|
|
1483
1496
|
}
|
|
1484
1497
|
function useAudienceMode(input) {
|
|
1485
|
-
const {
|
|
1498
|
+
const {
|
|
1499
|
+
mode: _mode,
|
|
1500
|
+
onSetMode,
|
|
1501
|
+
onSetActiveSlideIndex,
|
|
1502
|
+
containerRef,
|
|
1503
|
+
onSnapshot,
|
|
1504
|
+
onPresenterEnded
|
|
1505
|
+
} = input;
|
|
1486
1506
|
const initialised = useRef(false);
|
|
1487
1507
|
useEffect(() => {
|
|
1488
1508
|
if (!isAudienceTab()) {
|
|
@@ -1506,6 +1526,8 @@ function useAudienceMode(input) {
|
|
|
1506
1526
|
document.removeEventListener("keydown", requestAudienceFullscreen);
|
|
1507
1527
|
};
|
|
1508
1528
|
}, [containerRef, onSetMode]);
|
|
1529
|
+
const handlersRef = useRef({ onSetActiveSlideIndex, onSnapshot, onPresenterEnded });
|
|
1530
|
+
handlersRef.current = { onSetActiveSlideIndex, onSnapshot, onPresenterEnded };
|
|
1509
1531
|
useEffect(() => {
|
|
1510
1532
|
if (!isAudienceTab()) {
|
|
1511
1533
|
return;
|
|
@@ -1525,21 +1547,20 @@ function useAudienceMode(input) {
|
|
|
1525
1547
|
if (expectedSessionId && data.sessionId !== expectedSessionId) {
|
|
1526
1548
|
return;
|
|
1527
1549
|
}
|
|
1550
|
+
const handlers = handlersRef.current;
|
|
1528
1551
|
if (data.type === "presenter-slide-change") {
|
|
1529
|
-
onSetActiveSlideIndex(data.slideIndex);
|
|
1552
|
+
handlers.onSetActiveSlideIndex(data.slideIndex);
|
|
1530
1553
|
}
|
|
1531
1554
|
if (data.type === "presenter-state") {
|
|
1532
|
-
onSetActiveSlideIndex(data.snapshot.slideIndex);
|
|
1533
|
-
onSnapshot?.(data.snapshot);
|
|
1555
|
+
handlers.onSetActiveSlideIndex(data.snapshot.slideIndex);
|
|
1556
|
+
handlers.onSnapshot?.(data.snapshot);
|
|
1534
1557
|
}
|
|
1535
1558
|
if (data.type === "presenter-exit") {
|
|
1536
1559
|
if (expectedSessionId) {
|
|
1537
1560
|
void clearAudienceContent(expectedSessionId);
|
|
1538
1561
|
}
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
window.close();
|
|
1542
|
-
} catch {
|
|
1562
|
+
if (endAudienceDisplay(window)) {
|
|
1563
|
+
handlers.onPresenterEnded?.();
|
|
1543
1564
|
}
|
|
1544
1565
|
}
|
|
1545
1566
|
};
|
|
@@ -1556,7 +1577,7 @@ function useAudienceMode(input) {
|
|
|
1556
1577
|
} catch {
|
|
1557
1578
|
}
|
|
1558
1579
|
};
|
|
1559
|
-
}, [
|
|
1580
|
+
}, []);
|
|
1560
1581
|
}
|
|
1561
1582
|
function usePresentationKeyboard(input) {
|
|
1562
1583
|
const {
|
|
@@ -1579,7 +1600,7 @@ function usePresentationKeyboard(input) {
|
|
|
1579
1600
|
} = input;
|
|
1580
1601
|
const keyBufferRef = useRef(createPresentationKeyBuffer());
|
|
1581
1602
|
useEffect(() => {
|
|
1582
|
-
if (mode !== "present") {
|
|
1603
|
+
if (mode !== "present" || !acceptsPresentationInput()) {
|
|
1583
1604
|
keyBufferRef.current = createPresentationKeyBuffer();
|
|
1584
1605
|
return;
|
|
1585
1606
|
}
|
|
@@ -1818,14 +1839,16 @@ function executeSlideTransition(nextSlideIndex, deps) {
|
|
|
1818
1839
|
durationMs
|
|
1819
1840
|
});
|
|
1820
1841
|
const timer = window.setTimeout(() => {
|
|
1821
|
-
deps.runPresentationEntranceAnimations(nextSlideIndex
|
|
1842
|
+
deps.runPresentationEntranceAnimations(nextSlideIndex, {
|
|
1843
|
+
completed: deps.seedCompleted
|
|
1844
|
+
});
|
|
1822
1845
|
deps.scheduleAutoAdvanceForSlide?.(nextSlideIndex);
|
|
1823
1846
|
}, durationMs);
|
|
1824
1847
|
deps.presentationTimersRef.current.push(timer);
|
|
1825
1848
|
return;
|
|
1826
1849
|
}
|
|
1827
1850
|
deps.setTransitionOverlay(null);
|
|
1828
|
-
deps.runPresentationEntranceAnimations(nextSlideIndex);
|
|
1851
|
+
deps.runPresentationEntranceAnimations(nextSlideIndex, { completed: deps.seedCompleted });
|
|
1829
1852
|
deps.scheduleAutoAdvanceForSlide?.(nextSlideIndex);
|
|
1830
1853
|
}
|
|
1831
1854
|
|
|
@@ -1935,7 +1958,9 @@ function useSlideNavigation(input) {
|
|
|
1935
1958
|
presentationTimersRef,
|
|
1936
1959
|
setTransitionOverlay,
|
|
1937
1960
|
// PowerPoint plays a slide's transition only when advancing into it.
|
|
1938
|
-
playTransition: direction === 1
|
|
1961
|
+
playTransition: direction === 1,
|
|
1962
|
+
// Stepping back onto a slide shows it with its builds already played.
|
|
1963
|
+
seedCompleted: direction === -1
|
|
1939
1964
|
});
|
|
1940
1965
|
},
|
|
1941
1966
|
[
|
|
@@ -2138,6 +2163,7 @@ function usePresentationMode(input) {
|
|
|
2138
2163
|
handleHoverStart,
|
|
2139
2164
|
handleHoverEnd,
|
|
2140
2165
|
runPresentationEntranceAnimations,
|
|
2166
|
+
isSeededCompleted,
|
|
2141
2167
|
presentationTimersRef
|
|
2142
2168
|
} = useAnimationPlayback({ slides, onPlayActionSound, showWithAnimation });
|
|
2143
2169
|
const {
|
|
@@ -2160,6 +2186,11 @@ function usePresentationMode(input) {
|
|
|
2160
2186
|
setPresentationStartTime,
|
|
2161
2187
|
setPresenterMode
|
|
2162
2188
|
});
|
|
2189
|
+
useEffect(() => {
|
|
2190
|
+
if (mode !== "present") {
|
|
2191
|
+
setPresenterMode(false);
|
|
2192
|
+
}
|
|
2193
|
+
}, [mode]);
|
|
2163
2194
|
const handleAdvancePastLastSlide = useCallback(() => {
|
|
2164
2195
|
if (endWithBlackSlide) {
|
|
2165
2196
|
setEndOfShowVisible(true);
|
|
@@ -2195,6 +2226,9 @@ function usePresentationMode(input) {
|
|
|
2195
2226
|
});
|
|
2196
2227
|
const movePresentationSlide = useCallback(
|
|
2197
2228
|
(direction, trigger = "explicit") => {
|
|
2229
|
+
if (!acceptsPresentationInput()) {
|
|
2230
|
+
return;
|
|
2231
|
+
}
|
|
2198
2232
|
if (endOfShowVisible) {
|
|
2199
2233
|
setEndOfShowVisible(false);
|
|
2200
2234
|
if (direction === 1) {
|
|
@@ -2202,9 +2236,20 @@ function usePresentationMode(input) {
|
|
|
2202
2236
|
}
|
|
2203
2237
|
return;
|
|
2204
2238
|
}
|
|
2239
|
+
if (direction === -1 && isSeededCompleted()) {
|
|
2240
|
+
runPresentationEntranceAnimations(presentationSlideIndex);
|
|
2241
|
+
return;
|
|
2242
|
+
}
|
|
2205
2243
|
moveNavigationSlide(direction, trigger);
|
|
2206
2244
|
},
|
|
2207
|
-
[
|
|
2245
|
+
[
|
|
2246
|
+
endOfShowVisible,
|
|
2247
|
+
isSeededCompleted,
|
|
2248
|
+
moveNavigationSlide,
|
|
2249
|
+
onSetMode,
|
|
2250
|
+
presentationSlideIndex,
|
|
2251
|
+
runPresentationEntranceAnimations
|
|
2252
|
+
]
|
|
2208
2253
|
);
|
|
2209
2254
|
const { handleZoomClick, zoomReturnSlideIndex, returnToZoomSlide, clearZoomReturn } = useZoomNavigation({ navigateToSlide });
|
|
2210
2255
|
const openAllSlides = useCallback(() => setAllSlidesOpen(true), []);
|
|
@@ -2230,7 +2275,10 @@ function usePresentationMode(input) {
|
|
|
2230
2275
|
setPresentationSlideIndex(index);
|
|
2231
2276
|
},
|
|
2232
2277
|
containerRef,
|
|
2233
|
-
onSnapshot: presenterConsole.applyAudienceSnapshot
|
|
2278
|
+
onSnapshot: presenterConsole.applyAudienceSnapshot,
|
|
2279
|
+
// The presenter ended the session but this tab could not close itself:
|
|
2280
|
+
// show the black end-of-slide-show screen rather than the editor.
|
|
2281
|
+
onPresenterEnded: () => setEndOfShowVisible(true)
|
|
2234
2282
|
});
|
|
2235
2283
|
const enterPresentMode = useCallback(() => {
|
|
2236
2284
|
setPresenterMode(false);
|
|
@@ -8303,6 +8351,9 @@ function useAnnotationHandlers(input) {
|
|
|
8303
8351
|
}, [annotations, setMode, setSlides, history]);
|
|
8304
8352
|
const handleSetMode = useCallback(
|
|
8305
8353
|
(nextMode) => {
|
|
8354
|
+
if (mode === "present" && nextMode !== "present" && !mayLeaveSlideShow()) {
|
|
8355
|
+
return;
|
|
8356
|
+
}
|
|
8306
8357
|
if (nextMode === "present") {
|
|
8307
8358
|
presentation.enterPresentMode();
|
|
8308
8359
|
} else if (mode === "present" && annotations.hasAnyAnnotations) {
|
|
@@ -8576,6 +8627,9 @@ function usePresentationSetup(input) {
|
|
|
8576
8627
|
containerRef,
|
|
8577
8628
|
content,
|
|
8578
8629
|
onSetMode: (nextMode) => {
|
|
8630
|
+
if (mode === "present" && nextMode !== "present" && !mayLeaveSlideShow()) {
|
|
8631
|
+
return;
|
|
8632
|
+
}
|
|
8579
8633
|
if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations && promptKeepInkAnnotations) {
|
|
8580
8634
|
pendingModeRef.current = nextMode;
|
|
8581
8635
|
setShowKeepAnnotationsDialog(true);
|
|
Binary file
|
|
Binary file
|