pptx-react-viewer 3.7.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/{AiChatPanel-M3AHKYPS.js → AiChatPanel-3A42W7RW.js} +25 -25
- package/dist/AiChatPanel-3A42W7RW.js.br +0 -0
- package/dist/AiChatPanel-3A42W7RW.js.gz +0 -0
- package/dist/{AiChatPanel-L5QGWVZK.mjs → AiChatPanel-II6VOOAL.mjs} +4 -4
- package/dist/AiChatPanel-II6VOOAL.mjs.br +0 -0
- package/dist/AiChatPanel-II6VOOAL.mjs.gz +0 -0
- package/dist/{Area3DChartScene-AE2XYKDW.mjs → Area3DChartScene-JM3CQ3WQ.mjs} +21 -4
- package/dist/Area3DChartScene-JM3CQ3WQ.mjs.br +0 -0
- package/dist/Area3DChartScene-JM3CQ3WQ.mjs.gz +0 -0
- package/dist/{Area3DChartScene-ZQLQK6L4.js → Area3DChartScene-XJK4ZA4R.js} +21 -4
- package/dist/Area3DChartScene-XJK4ZA4R.js.br +0 -0
- package/dist/Area3DChartScene-XJK4ZA4R.js.gz +0 -0
- package/dist/{Bar3DChartScene-TZ6ADFBS.js → Bar3DChartScene-RGRZY5P6.js} +21 -4
- package/dist/Bar3DChartScene-RGRZY5P6.js.br +0 -0
- package/dist/Bar3DChartScene-RGRZY5P6.js.gz +0 -0
- package/dist/{Bar3DChartScene-FQV62XOI.mjs → Bar3DChartScene-VNFWI2QG.mjs} +21 -4
- package/dist/Bar3DChartScene-VNFWI2QG.mjs.br +0 -0
- package/dist/Bar3DChartScene-VNFWI2QG.mjs.gz +0 -0
- package/dist/{Line3DChartScene-FEUY3PCE.mjs → Line3DChartScene-GXOWGIFJ.mjs} +21 -4
- package/dist/Line3DChartScene-GXOWGIFJ.mjs.br +0 -0
- package/dist/Line3DChartScene-GXOWGIFJ.mjs.gz +0 -0
- package/dist/{Line3DChartScene-5CKPAX63.js → Line3DChartScene-MEY42DBF.js} +21 -4
- package/dist/Line3DChartScene-MEY42DBF.js.br +0 -0
- package/dist/Line3DChartScene-MEY42DBF.js.gz +0 -0
- package/dist/{Model3DScene-BLXEALM6.js → Model3DScene-MWXTGHDM.js} +2 -2
- package/dist/Model3DScene-MWXTGHDM.js.br +0 -0
- package/dist/Model3DScene-MWXTGHDM.js.gz +0 -0
- package/dist/{Model3DScene-V3DHIISV.mjs → Model3DScene-WJ3MMIZH.mjs} +1 -1
- package/dist/Model3DScene-WJ3MMIZH.mjs.br +0 -0
- package/dist/Model3DScene-WJ3MMIZH.mjs.gz +0 -0
- package/dist/{PieChart3DScene-GHHT3PDV.js → PieChart3DScene-FJJGOQIS.js} +15 -4
- package/dist/PieChart3DScene-FJJGOQIS.js.br +0 -0
- package/dist/PieChart3DScene-FJJGOQIS.js.gz +0 -0
- package/dist/{PieChart3DScene-VZI2VARG.mjs → PieChart3DScene-WXJEDYMK.mjs} +15 -4
- package/dist/PieChart3DScene-WXJEDYMK.mjs.br +0 -0
- package/dist/PieChart3DScene-WXJEDYMK.mjs.gz +0 -0
- package/dist/PowerPointViewer-Cl6jBPNw.d.ts.map +1 -1
- package/dist/{SmartArt3DScene-ZO3KFDI2.js → SmartArt3DScene-BK7QN3WT.js} +85 -23
- package/dist/SmartArt3DScene-BK7QN3WT.js.br +0 -0
- package/dist/SmartArt3DScene-BK7QN3WT.js.gz +0 -0
- package/dist/{SmartArt3DScene-XCFVGCXE.mjs → SmartArt3DScene-ODKCGJBO.mjs} +85 -23
- package/dist/SmartArt3DScene-ODKCGJBO.mjs.br +0 -0
- package/dist/SmartArt3DScene-ODKCGJBO.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-T36E2HBA.mjs → SurfaceChart3DScene-IKPE2SVE.mjs} +19 -4
- package/dist/SurfaceChart3DScene-IKPE2SVE.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-IKPE2SVE.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-WWIMQ65D.js → SurfaceChart3DScene-VDK3F224.js} +19 -4
- package/dist/SurfaceChart3DScene-VDK3F224.js.br +0 -0
- package/dist/SurfaceChart3DScene-VDK3F224.js.gz +0 -0
- package/dist/{audience-content-store-bR7Gs_1S.d.ts → audience-content-store-CB2WVM1K.d.ts} +12 -3
- package/dist/{audience-content-store-bR7Gs_1S.d.ts.map → audience-content-store-CB2WVM1K.d.ts.map} +1 -1
- package/dist/{chunk-TUSALM3A.js → chunk-3NIJ5HIZ.js} +3650 -2503
- package/dist/chunk-3NIJ5HIZ.js.br +0 -0
- package/dist/chunk-3NIJ5HIZ.js.gz +0 -0
- package/dist/{chunk-WKODF5ZU.mjs → chunk-3Y63XPIN.mjs} +5 -2
- package/dist/chunk-3Y63XPIN.mjs.br +0 -0
- package/dist/chunk-3Y63XPIN.mjs.gz +0 -0
- package/dist/{chunk-OBE4TB76.js → chunk-5CPGDXD6.js} +632 -579
- package/dist/chunk-5CPGDXD6.js.br +0 -0
- package/dist/chunk-5CPGDXD6.js.gz +0 -0
- package/dist/{chunk-TXY2E7VQ.mjs → chunk-76Z3X6JX.mjs} +1684 -537
- package/dist/chunk-76Z3X6JX.mjs.br +0 -0
- package/dist/chunk-76Z3X6JX.mjs.gz +0 -0
- package/dist/chunk-DNR6CH6I.js +30 -0
- package/dist/chunk-DNR6CH6I.js.br +0 -0
- package/dist/chunk-DNR6CH6I.js.gz +0 -0
- package/dist/{chunk-DCNHUEWQ.js → chunk-G3JPCRKN.js} +18490 -10327
- package/dist/chunk-G3JPCRKN.js.br +0 -0
- package/dist/chunk-G3JPCRKN.js.gz +0 -0
- package/dist/{chunk-FGTMS7LR.mjs → chunk-JBSAKP4Z.mjs} +70 -4
- package/dist/chunk-JBSAKP4Z.mjs.br +0 -0
- package/dist/chunk-JBSAKP4Z.mjs.gz +0 -0
- package/dist/{chunk-3EJFZ7TE.js → chunk-K6Q6KLA6.js} +9 -5
- package/dist/chunk-K6Q6KLA6.js.br +0 -0
- package/dist/chunk-K6Q6KLA6.js.gz +0 -0
- package/dist/{chunk-VIFDZIVX.js → chunk-LBJAVP3H.js} +206 -179
- package/dist/chunk-LBJAVP3H.js.br +0 -0
- package/dist/chunk-LBJAVP3H.js.gz +0 -0
- package/dist/{chunk-JANUSAEK.mjs → chunk-NTWFXLZX.mjs} +35 -8
- package/dist/chunk-NTWFXLZX.mjs.br +0 -0
- package/dist/chunk-NTWFXLZX.mjs.gz +0 -0
- package/dist/{chunk-PC62KGU3.mjs → chunk-PCCM7NVY.mjs} +206 -153
- package/dist/chunk-PCCM7NVY.mjs.br +0 -0
- package/dist/chunk-PCCM7NVY.mjs.gz +0 -0
- package/dist/chunk-T6GFCLSM.mjs +27 -0
- package/dist/chunk-T6GFCLSM.mjs.br +4 -0
- package/dist/chunk-T6GFCLSM.mjs.gz +0 -0
- package/dist/{chunk-W24OJ7H5.js → chunk-TEVGDXVW.js} +70 -4
- package/dist/chunk-TEVGDXVW.js.br +0 -0
- package/dist/chunk-TEVGDXVW.js.gz +0 -0
- package/dist/{chunk-NV55GU5V.mjs → chunk-VQX7G75Z.mjs} +18447 -10316
- package/dist/chunk-VQX7G75Z.mjs.br +0 -0
- package/dist/chunk-VQX7G75Z.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +545 -81
- package/dist/index.js +47 -47
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +774 -229
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +79 -79
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/types-Bzdkiakq.d.ts.map +1 -1
- package/dist/viewer/index.d.ts +488 -66
- package/dist/viewer/index.js +27 -27
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +2 -2
- package/dist/AiChatPanel-L5QGWVZK.mjs.br +0 -0
- package/dist/AiChatPanel-L5QGWVZK.mjs.gz +0 -0
- package/dist/AiChatPanel-M3AHKYPS.js.br +0 -0
- package/dist/AiChatPanel-M3AHKYPS.js.gz +0 -0
- package/dist/Area3DChartScene-AE2XYKDW.mjs.br +0 -1
- package/dist/Area3DChartScene-AE2XYKDW.mjs.gz +0 -0
- package/dist/Area3DChartScene-ZQLQK6L4.js.br +0 -0
- package/dist/Area3DChartScene-ZQLQK6L4.js.gz +0 -0
- package/dist/Bar3DChartScene-FQV62XOI.mjs.br +0 -2
- package/dist/Bar3DChartScene-FQV62XOI.mjs.gz +0 -0
- package/dist/Bar3DChartScene-TZ6ADFBS.js.br +0 -0
- package/dist/Bar3DChartScene-TZ6ADFBS.js.gz +0 -0
- package/dist/Line3DChartScene-5CKPAX63.js.br +0 -0
- package/dist/Line3DChartScene-5CKPAX63.js.gz +0 -0
- package/dist/Line3DChartScene-FEUY3PCE.mjs.br +0 -1
- package/dist/Line3DChartScene-FEUY3PCE.mjs.gz +0 -0
- package/dist/Model3DScene-BLXEALM6.js.br +0 -0
- package/dist/Model3DScene-BLXEALM6.js.gz +0 -0
- package/dist/Model3DScene-V3DHIISV.mjs.br +0 -0
- package/dist/Model3DScene-V3DHIISV.mjs.gz +0 -0
- package/dist/PieChart3DScene-GHHT3PDV.js.br +0 -0
- package/dist/PieChart3DScene-GHHT3PDV.js.gz +0 -0
- package/dist/PieChart3DScene-VZI2VARG.mjs.br +0 -0
- package/dist/PieChart3DScene-VZI2VARG.mjs.gz +0 -0
- package/dist/SmartArt3DScene-XCFVGCXE.mjs.br +0 -0
- package/dist/SmartArt3DScene-XCFVGCXE.mjs.gz +0 -0
- package/dist/SmartArt3DScene-ZO3KFDI2.js.br +0 -0
- package/dist/SmartArt3DScene-ZO3KFDI2.js.gz +0 -0
- package/dist/SurfaceChart3DScene-T36E2HBA.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-T36E2HBA.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-WWIMQ65D.js.br +0 -0
- package/dist/SurfaceChart3DScene-WWIMQ65D.js.gz +0 -0
- package/dist/chunk-3EJFZ7TE.js.br +0 -0
- package/dist/chunk-3EJFZ7TE.js.gz +0 -0
- package/dist/chunk-DCNHUEWQ.js.br +0 -0
- package/dist/chunk-DCNHUEWQ.js.gz +0 -0
- package/dist/chunk-FGTMS7LR.mjs.br +0 -0
- package/dist/chunk-FGTMS7LR.mjs.gz +0 -0
- package/dist/chunk-JANUSAEK.mjs.br +0 -0
- package/dist/chunk-JANUSAEK.mjs.gz +0 -0
- package/dist/chunk-NV55GU5V.mjs.br +0 -0
- package/dist/chunk-NV55GU5V.mjs.gz +0 -0
- package/dist/chunk-OBE4TB76.js.br +0 -0
- package/dist/chunk-OBE4TB76.js.gz +0 -0
- package/dist/chunk-PC62KGU3.mjs.br +0 -0
- package/dist/chunk-PC62KGU3.mjs.gz +0 -0
- package/dist/chunk-TUSALM3A.js.br +0 -0
- package/dist/chunk-TUSALM3A.js.gz +0 -0
- package/dist/chunk-TXY2E7VQ.mjs.br +0 -0
- package/dist/chunk-TXY2E7VQ.mjs.gz +0 -0
- package/dist/chunk-VIFDZIVX.js.br +0 -0
- package/dist/chunk-VIFDZIVX.js.gz +0 -0
- package/dist/chunk-W24OJ7H5.js.br +0 -0
- package/dist/chunk-W24OJ7H5.js.gz +0 -0
- package/dist/chunk-WKODF5ZU.mjs.br +0 -0
- package/dist/chunk-WKODF5ZU.mjs.gz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cloneHistorySnapshot, MIN_ELEMENT_SIZE, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, buildPdfFromImageData, buildNotesPdf, GRID_SIZE, DEFAULT_TEXT_FONT_SIZE } from './chunk-
|
|
2
|
-
import { DEFAULT_VIEWER_OPTIONS, TOOLBAR_TABS, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createPresenceProjector, BROADCAST_THROTTLE_MS, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, createActiveAnimationGroup, cancelBuildReveal, clearPlaybackTimers, PresentationAnimationController, resolveMediaTimeNodeElementIds, advanceMainSequence, playGroup, 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, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, findInSlides, applyFindReplacements, visibleTemplateElements, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, partitionTemplateElements, seedRecentColors, resolveAuthoredCustomShowId, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, EncryptedFileError, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, hasTextProperties, remapTextToSegments, updateMasterViewElement, isTemplateElementId, updateElement, hasShapeProperties, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canInteractWithElement, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, downloadBlob, resolveImageResolutionScale, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, stopAllPersistentAudio, guidePxToEmu, buildSaveSlides,
|
|
3
|
-
import { translationsEn } from './chunk-
|
|
1
|
+
import { cloneHistorySnapshot, MIN_ELEMENT_SIZE, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, buildPdfFromImageData, buildNotesPdf, GRID_SIZE, DEFAULT_TEXT_FONT_SIZE } from './chunk-NTWFXLZX.mjs';
|
|
2
|
+
import { DEFAULT_VIEWER_OPTIONS, TOOLBAR_TABS, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createPresenceProjector, BROADCAST_THROTTLE_MS, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, createActiveAnimationGroup, cancelBuildReveal, clearPlaybackTimers, PresentationAnimationController, resolveMediaTimeNodeElementIds, advanceMainSequence, playGroup, 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, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, findInSlides, applyFindReplacements, visibleTemplateElements, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, partitionTemplateElements, seedRecentColors, resolveAuthoredCustomShowId, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, EncryptedFileError, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, hasTextProperties, remapTextToSegments, updateMasterViewElement, isTemplateElementId, updateElement, hasShapeProperties, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canInteractWithElement, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, downloadBlob, resolveImageResolutionScale, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, stopAllPersistentAudio, guidePxToEmu, buildSaveSlides, buildDeckSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, shouldProbeAutosaveRecovery, probeAutosaveRecovery, acceptAutosaveRecovery, discardAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, collectReferencedFontFamilies, resolveGoogleWebfontHref, mapSlideShowStartKey, mapEditorKey, isEditorTextInputTarget, createViewerOptionsStore, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, scopeLayoutOptionsToSlide, checkModifyPassword, viewerPreferencesFromViewProperties, DEFAULT_VIEWER_PREFERENCES, viewPropertiesPatchFromPreferences, openPptxFile, readBackstageRecentFile, isActionHidden, resolveInlineEditAutoFitHeight, resolveInlineEditNormAutofitShrink, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, savedPresentationFileName, exportDeckJson, groupElements, generateElementId, makeCloneId, ungroupElements, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, openPendingPrintWindow, computeColorFilter, filterHiddenSlideIndices, computeSlideIndices, buildPrintDocument, finishPrintWindow, buildPrintHtmlDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, buildThemeColorMap, reResolveSlideColors, reResolveElementColors, scheduleAutoAdvanceChain, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, resolveTransitionSoundAction, runPresentationAction, safeOpenUrl, toggleStageElementMedia, resolveOleVerbTarget, openUrlInNewTab, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, encodeGif, computeGridSpacingPx, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, resolveHistoryDepth, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, cloneElementForPaste, computeScrollDelta, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, replyToCommentInList, deleteTableColumn, rebuildTableStructureInRawXml, insertTableColumn, deleteTableRow, insertTableRow, updateCellTextStyleInRawXml, setCellText, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, isPpactionUrl, parsePpactionUrl, resolvePresentationAction, ACTION_BUTTON_PRESETS, elementActionToPptxAction, isUrlSafe, buildSmartArtPresetData, classifyMediaType, computeSnapToShape, publishLiveGeometry, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, shouldConfirmExternalHyperlink, applyResize, lockResizeAspect, snapBoxToGrid, applyMotionPathPreset } from './chunk-VQX7G75Z.mjs';
|
|
3
|
+
import { translationsEn } from './chunk-JBSAKP4Z.mjs';
|
|
4
4
|
import { createContext, useRef, useState, useEffect, useCallback, useMemo, useLayoutEffect, useContext, useImperativeHandle, useSyncExternalStore } from 'react';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
|
|
@@ -1016,7 +1016,7 @@ function scheduleEntranceAnimationTimers(slide, setPresentationAnimations, prese
|
|
|
1016
1016
|
|
|
1017
1017
|
// src/viewer/hooks/presentation-mode/useAnimationPlayback.ts
|
|
1018
1018
|
function useAnimationPlayback(input) {
|
|
1019
|
-
const { slides, onPlayActionSound, showWithAnimation } = input;
|
|
1019
|
+
const { slides, onPlayActionSound, showWithAnimation, canvasSize, themeColorMap } = input;
|
|
1020
1020
|
const animationsEnabled = showWithAnimation !== false;
|
|
1021
1021
|
const [presentationAnimations, setPresentationAnimations] = useState([]);
|
|
1022
1022
|
const [presentationElementStates, setPresentationElementStates] = useState(/* @__PURE__ */ new Map());
|
|
@@ -1064,7 +1064,11 @@ function useAnimationPlayback(input) {
|
|
|
1064
1064
|
setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
|
|
1065
1065
|
return;
|
|
1066
1066
|
}
|
|
1067
|
-
const controller = PresentationAnimationController.fromSlide(slide
|
|
1067
|
+
const controller = PresentationAnimationController.fromSlide(slide, {
|
|
1068
|
+
slideHeightPx: canvasSize?.height,
|
|
1069
|
+
slideWidthPx: canvasSize?.width,
|
|
1070
|
+
themeColorMap
|
|
1071
|
+
});
|
|
1068
1072
|
controllerRef.current = controller;
|
|
1069
1073
|
mediaTimeNodeElementIdsRef.current = resolveMediaTimeNodeElementIds(
|
|
1070
1074
|
slide.nativeAnimations ?? []
|
|
@@ -1074,7 +1078,7 @@ function useAnimationPlayback(input) {
|
|
|
1074
1078
|
setHoverTriggerShapeIds(controller.hoverTriggerShapeIds);
|
|
1075
1079
|
setPresentationElementStates(controller.computeStates());
|
|
1076
1080
|
},
|
|
1077
|
-
[slides]
|
|
1081
|
+
[slides, canvasSize, themeColorMap]
|
|
1078
1082
|
);
|
|
1079
1083
|
const playNextAnimationGroup = useCallback(() => {
|
|
1080
1084
|
if (!animationsEnabled) {
|
|
@@ -2233,6 +2237,8 @@ function usePresentationMode(input) {
|
|
|
2233
2237
|
slides,
|
|
2234
2238
|
templateElementsBySlideId,
|
|
2235
2239
|
visibleSlideIndexes,
|
|
2240
|
+
canvasSize,
|
|
2241
|
+
themeColorMap,
|
|
2236
2242
|
activeSlideIndex,
|
|
2237
2243
|
containerRef,
|
|
2238
2244
|
content,
|
|
@@ -2281,7 +2287,13 @@ function usePresentationMode(input) {
|
|
|
2281
2287
|
startSlideAnimations,
|
|
2282
2288
|
isSeededCompleted,
|
|
2283
2289
|
presentationTimersRef
|
|
2284
|
-
} = useAnimationPlayback({
|
|
2290
|
+
} = useAnimationPlayback({
|
|
2291
|
+
slides,
|
|
2292
|
+
onPlayActionSound,
|
|
2293
|
+
showWithAnimation,
|
|
2294
|
+
canvasSize,
|
|
2295
|
+
themeColorMap
|
|
2296
|
+
});
|
|
2285
2297
|
const {
|
|
2286
2298
|
rehearsing,
|
|
2287
2299
|
setRehearsing,
|
|
@@ -3645,6 +3657,8 @@ function useViewerCoreState(_input) {
|
|
|
3645
3657
|
const [recentColors, setRecentColors] = useState([]);
|
|
3646
3658
|
const [theme, setTheme] = useState();
|
|
3647
3659
|
const [tableStyleMap, setTableStyleMap] = useState();
|
|
3660
|
+
const [tableStylesDefaultId, setTableStylesDefaultId] = useState();
|
|
3661
|
+
const [tableStylesToDelete, setTableStylesToDelete] = useState([]);
|
|
3648
3662
|
const [themeOptions, setThemeOptions] = useState([]);
|
|
3649
3663
|
const [customShows, setCustomShows] = useState([]);
|
|
3650
3664
|
const [activeCustomShowId, setActiveCustomShowId] = useState(null);
|
|
@@ -3744,6 +3758,10 @@ function useViewerCoreState(_input) {
|
|
|
3744
3758
|
setTheme,
|
|
3745
3759
|
tableStyleMap,
|
|
3746
3760
|
setTableStyleMap,
|
|
3761
|
+
tableStylesDefaultId,
|
|
3762
|
+
setTableStylesDefaultId,
|
|
3763
|
+
tableStylesToDelete,
|
|
3764
|
+
setTableStylesToDelete,
|
|
3747
3765
|
themeOptions,
|
|
3748
3766
|
setThemeOptions,
|
|
3749
3767
|
customShows,
|
|
@@ -3928,6 +3946,8 @@ function useLoadContent({
|
|
|
3928
3946
|
setRecentColors,
|
|
3929
3947
|
setTheme,
|
|
3930
3948
|
setTableStyleMap,
|
|
3949
|
+
setTableStylesDefaultId,
|
|
3950
|
+
setTableStylesToDelete,
|
|
3931
3951
|
setThemeOptions,
|
|
3932
3952
|
setCustomShows,
|
|
3933
3953
|
setActiveCustomShowId,
|
|
@@ -3948,6 +3968,7 @@ function useLoadContent({
|
|
|
3948
3968
|
setDigitalSignatureCount,
|
|
3949
3969
|
setGuides,
|
|
3950
3970
|
setReadOnlyRecommendation,
|
|
3971
|
+
setModifyVerifier,
|
|
3951
3972
|
setCompatToasts,
|
|
3952
3973
|
setLoading,
|
|
3953
3974
|
setError,
|
|
@@ -4062,6 +4083,8 @@ function useLoadContent({
|
|
|
4062
4083
|
setRecentColors(seedRecentColors({ mruColors: parsed.mruColors }));
|
|
4063
4084
|
setTheme(parsed.theme);
|
|
4064
4085
|
setTableStyleMap(nextTableStyleMap);
|
|
4086
|
+
setTableStylesDefaultId(parsed.tableStylesDefaultId);
|
|
4087
|
+
setTableStylesToDelete([]);
|
|
4065
4088
|
setThemeOptions(parsed.themeOptions ?? []);
|
|
4066
4089
|
setCustomShows(parsed.customShows ?? []);
|
|
4067
4090
|
setActiveCustomShowId(
|
|
@@ -4090,6 +4113,7 @@ function useLoadContent({
|
|
|
4090
4113
|
setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
|
|
4091
4114
|
setGuides(buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
|
|
4092
4115
|
setReadOnlyRecommendation(readOnlyRecommendation(parsed));
|
|
4116
|
+
setModifyVerifier(parsed.modifyVerifier ?? void 0);
|
|
4093
4117
|
setCompatToasts(
|
|
4094
4118
|
compatibilityWarningToasts([
|
|
4095
4119
|
...parsed.warnings ?? [],
|
|
@@ -6906,7 +6930,7 @@ function useExportSaveAs(input) {
|
|
|
6906
6930
|
slides,
|
|
6907
6931
|
templateElementsBySlideId,
|
|
6908
6932
|
filePath,
|
|
6909
|
-
|
|
6933
|
+
serializeSlides,
|
|
6910
6934
|
headerFooter,
|
|
6911
6935
|
presentationProperties,
|
|
6912
6936
|
customShows,
|
|
@@ -6915,24 +6939,19 @@ function useExportSaveAs(input) {
|
|
|
6915
6939
|
appProperties,
|
|
6916
6940
|
customProperties,
|
|
6917
6941
|
tagCollections,
|
|
6918
|
-
slideMasters,
|
|
6919
6942
|
notesMaster,
|
|
6920
6943
|
handoutMaster,
|
|
6921
|
-
guides,
|
|
6922
|
-
activeSlideIndexForGuides,
|
|
6923
6944
|
theme,
|
|
6924
6945
|
canvasSize,
|
|
6925
|
-
slideSizeEmu
|
|
6926
|
-
password
|
|
6946
|
+
slideSizeEmu
|
|
6927
6947
|
} = input;
|
|
6928
6948
|
const handleSaveAsFormat = async (format) => {
|
|
6929
|
-
const handler = handlerRef.current;
|
|
6930
|
-
if (!handler) {
|
|
6931
|
-
return;
|
|
6932
|
-
}
|
|
6933
6949
|
const downloadName = savedPresentationFileName(filePath, format);
|
|
6934
6950
|
try {
|
|
6935
|
-
const data = await
|
|
6951
|
+
const data = await serializeSlides(format);
|
|
6952
|
+
if (!data) {
|
|
6953
|
+
return;
|
|
6954
|
+
}
|
|
6936
6955
|
const blob = new Blob([data], {
|
|
6937
6956
|
type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
|
|
6938
6957
|
});
|
|
@@ -6941,41 +6960,6 @@ function useExportSaveAs(input) {
|
|
|
6941
6960
|
console.error(`[PowerPointViewer] Save as .${format} failed:`, err);
|
|
6942
6961
|
}
|
|
6943
6962
|
};
|
|
6944
|
-
const buildSaveAsData = async (handler, format) => {
|
|
6945
|
-
const slidesWithGuides = slides.map((slide, idx) => {
|
|
6946
|
-
if (idx !== activeSlideIndexForGuides) {
|
|
6947
|
-
return slide;
|
|
6948
|
-
}
|
|
6949
|
-
const pptxGuides = guides.map((g) => ({
|
|
6950
|
-
id: g.id,
|
|
6951
|
-
orientation: g.axis === "h" ? "horz" : "vert",
|
|
6952
|
-
positionEmu: guidePxToEmu(g.position)
|
|
6953
|
-
}));
|
|
6954
|
-
return {
|
|
6955
|
-
...slide,
|
|
6956
|
-
guides: pptxGuides.length > 0 ? pptxGuides : void 0
|
|
6957
|
-
};
|
|
6958
|
-
});
|
|
6959
|
-
const slidesToSave = buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
|
|
6960
|
-
const saveOptions = {
|
|
6961
|
-
// Save As shares Save's slide-size decision; leaving it out here is how
|
|
6962
|
-
// a preset picked in the inspector reached one save path and not the other.
|
|
6963
|
-
slideSize: resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
|
|
6964
|
-
headerFooter,
|
|
6965
|
-
presentationProperties,
|
|
6966
|
-
customShows: customShows.length > 0 ? customShows : void 0,
|
|
6967
|
-
sections: sections.length > 0 ? sections : void 0,
|
|
6968
|
-
coreProperties: coreProperties ?? void 0,
|
|
6969
|
-
appProperties: appProperties ?? void 0,
|
|
6970
|
-
customProperties: customProperties.length > 0 ? customProperties : void 0,
|
|
6971
|
-
tags: tagCollections.length > 0 ? tagCollections : void 0,
|
|
6972
|
-
slideMasters,
|
|
6973
|
-
notesMaster,
|
|
6974
|
-
handoutMaster,
|
|
6975
|
-
outputFormat: format
|
|
6976
|
-
};
|
|
6977
|
-
return saveDeckWithPassword(handler, slidesToSave, saveOptions, password);
|
|
6978
|
-
};
|
|
6979
6963
|
const handleExportJson = () => {
|
|
6980
6964
|
const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
|
|
6981
6965
|
const slideSize = resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
|
|
@@ -6991,8 +6975,8 @@ function useExportSaveAs(input) {
|
|
|
6991
6975
|
presentationProperties,
|
|
6992
6976
|
customShows: customShows.length > 0 ? customShows : void 0,
|
|
6993
6977
|
sections: sections.length > 0 ? sections : void 0,
|
|
6994
|
-
coreProperties
|
|
6995
|
-
appProperties
|
|
6978
|
+
coreProperties,
|
|
6979
|
+
appProperties,
|
|
6996
6980
|
customProperties: customProperties.length > 0 ? customProperties : void 0,
|
|
6997
6981
|
tags: tagCollections.length > 0 ? tagCollections : void 0,
|
|
6998
6982
|
notesMaster,
|
|
@@ -7357,7 +7341,7 @@ function useExportHandlers(input) {
|
|
|
7357
7341
|
filePath,
|
|
7358
7342
|
canvasStageRef,
|
|
7359
7343
|
setActiveSlideIndex,
|
|
7360
|
-
|
|
7344
|
+
serializeSlides,
|
|
7361
7345
|
headerFooter,
|
|
7362
7346
|
presentationProperties,
|
|
7363
7347
|
customShows,
|
|
@@ -7366,15 +7350,11 @@ function useExportHandlers(input) {
|
|
|
7366
7350
|
appProperties,
|
|
7367
7351
|
customProperties,
|
|
7368
7352
|
tagCollections,
|
|
7369
|
-
slideMasters,
|
|
7370
7353
|
notesMaster,
|
|
7371
7354
|
handoutMaster,
|
|
7372
|
-
guides,
|
|
7373
|
-
activeSlideIndexForGuides,
|
|
7374
7355
|
theme,
|
|
7375
7356
|
canvasSize,
|
|
7376
7357
|
slideSizeEmu,
|
|
7377
|
-
password,
|
|
7378
7358
|
imageExportScale
|
|
7379
7359
|
} = input;
|
|
7380
7360
|
const [exportModalOpen, setExportModalOpen] = useState(false);
|
|
@@ -7392,7 +7372,7 @@ function useExportHandlers(input) {
|
|
|
7392
7372
|
slides,
|
|
7393
7373
|
templateElementsBySlideId,
|
|
7394
7374
|
filePath,
|
|
7395
|
-
|
|
7375
|
+
serializeSlides,
|
|
7396
7376
|
headerFooter,
|
|
7397
7377
|
presentationProperties,
|
|
7398
7378
|
customShows,
|
|
@@ -7401,15 +7381,11 @@ function useExportHandlers(input) {
|
|
|
7401
7381
|
appProperties,
|
|
7402
7382
|
customProperties,
|
|
7403
7383
|
tagCollections,
|
|
7404
|
-
slideMasters,
|
|
7405
7384
|
notesMaster,
|
|
7406
7385
|
handoutMaster,
|
|
7407
|
-
guides,
|
|
7408
|
-
activeSlideIndexForGuides,
|
|
7409
7386
|
theme,
|
|
7410
7387
|
canvasSize,
|
|
7411
|
-
slideSizeEmu
|
|
7412
|
-
password
|
|
7388
|
+
slideSizeEmu
|
|
7413
7389
|
});
|
|
7414
7390
|
const handleExportPng = useCallback(async () => {
|
|
7415
7391
|
const stageEl = canvasStageRef.current;
|
|
@@ -8648,6 +8624,9 @@ function useSerialize(input) {
|
|
|
8648
8624
|
headerFooter,
|
|
8649
8625
|
presentationProperties,
|
|
8650
8626
|
viewProperties,
|
|
8627
|
+
tableStyleMap,
|
|
8628
|
+
tableStylesDefaultId,
|
|
8629
|
+
tableStylesToDelete = [],
|
|
8651
8630
|
customShows,
|
|
8652
8631
|
sections,
|
|
8653
8632
|
coreProperties,
|
|
@@ -8664,90 +8643,100 @@ function useSerialize(input) {
|
|
|
8664
8643
|
embedFonts = true,
|
|
8665
8644
|
purpose
|
|
8666
8645
|
} = input;
|
|
8667
|
-
return useCallback(
|
|
8668
|
-
|
|
8669
|
-
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8676
|
-
|
|
8677
|
-
|
|
8678
|
-
|
|
8679
|
-
|
|
8646
|
+
return useCallback(
|
|
8647
|
+
async (format) => {
|
|
8648
|
+
const handler = handlerRef.current;
|
|
8649
|
+
if (!handler) {
|
|
8650
|
+
return null;
|
|
8651
|
+
}
|
|
8652
|
+
const pendingEditId = inlineEditingElementIdRef.current;
|
|
8653
|
+
const pendingEditText = inlineEditingTextRef.current;
|
|
8654
|
+
const slidesWithGuides = slides.map((slide, idx) => {
|
|
8655
|
+
let processedSlide = slide;
|
|
8656
|
+
if (pendingEditId) {
|
|
8657
|
+
const updatedElements = slide.elements.map((el) => {
|
|
8658
|
+
if (el.id !== pendingEditId || !hasTextProperties(el)) {
|
|
8659
|
+
return el;
|
|
8660
|
+
}
|
|
8661
|
+
return {
|
|
8662
|
+
...el,
|
|
8663
|
+
text: pendingEditText,
|
|
8664
|
+
textSegments: remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
|
|
8665
|
+
};
|
|
8666
|
+
});
|
|
8667
|
+
if (updatedElements.some((el, i) => el !== slide.elements[i])) {
|
|
8668
|
+
processedSlide = { ...slide, elements: updatedElements };
|
|
8680
8669
|
}
|
|
8681
|
-
return {
|
|
8682
|
-
...el,
|
|
8683
|
-
text: pendingEditText,
|
|
8684
|
-
textSegments: remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
|
|
8685
|
-
};
|
|
8686
|
-
});
|
|
8687
|
-
if (updatedElements.some((el, i) => el !== slide.elements[i])) {
|
|
8688
|
-
processedSlide = { ...slide, elements: updatedElements };
|
|
8689
8670
|
}
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
|
|
8694
|
-
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
};
|
|
8703
|
-
|
|
8704
|
-
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
|
|
8671
|
+
if (idx !== activeSlideIndex) {
|
|
8672
|
+
return processedSlide;
|
|
8673
|
+
}
|
|
8674
|
+
const pptxGuides = guides.map((g) => ({
|
|
8675
|
+
id: g.id,
|
|
8676
|
+
orientation: g.axis === "h" ? "horz" : "vert",
|
|
8677
|
+
positionEmu: guidePxToEmu(g.position)
|
|
8678
|
+
}));
|
|
8679
|
+
return {
|
|
8680
|
+
...processedSlide,
|
|
8681
|
+
guides: pptxGuides.length > 0 ? pptxGuides : void 0
|
|
8682
|
+
};
|
|
8683
|
+
});
|
|
8684
|
+
const slidesToSave = buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
|
|
8685
|
+
const saveOptions = buildDeckSaveOptions({
|
|
8686
|
+
// Without this the Slide Size card edited a viewer-only pixel value and
|
|
8687
|
+
// the saved `p:sldSz` never moved: passing `slideSize` is the only way a
|
|
8688
|
+
// slide-size edit reaches the file.
|
|
8689
|
+
slideSize: resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size,
|
|
8690
|
+
headerFooter,
|
|
8691
|
+
presentationProperties,
|
|
8692
|
+
viewProperties,
|
|
8693
|
+
customShows,
|
|
8694
|
+
sections,
|
|
8695
|
+
coreProperties,
|
|
8696
|
+
appProperties,
|
|
8697
|
+
customProperties,
|
|
8698
|
+
tagCollections,
|
|
8699
|
+
slideMasters,
|
|
8700
|
+
notesMaster,
|
|
8701
|
+
handoutMaster,
|
|
8702
|
+
tableStyleMap,
|
|
8703
|
+
tableStylesDefaultId,
|
|
8704
|
+
tableStylesToDelete,
|
|
8705
|
+
embedFonts,
|
|
8706
|
+
outputFormat: format
|
|
8707
|
+
});
|
|
8708
|
+
return saveDeckWithPassword(handler, slidesToSave, saveOptions, { password, purpose });
|
|
8709
|
+
},
|
|
8710
|
+
[
|
|
8711
|
+
slides,
|
|
8712
|
+
templateElementsBySlideId,
|
|
8713
|
+
canvasSize,
|
|
8714
|
+
slideSizeEmu,
|
|
8710
8715
|
headerFooter,
|
|
8711
8716
|
presentationProperties,
|
|
8712
8717
|
viewProperties,
|
|
8713
|
-
|
|
8714
|
-
|
|
8718
|
+
tableStyleMap,
|
|
8719
|
+
tableStylesDefaultId,
|
|
8720
|
+
tableStylesToDelete,
|
|
8721
|
+
customShows,
|
|
8722
|
+
sections,
|
|
8715
8723
|
coreProperties,
|
|
8716
8724
|
appProperties,
|
|
8717
|
-
customProperties
|
|
8718
|
-
|
|
8725
|
+
customProperties,
|
|
8726
|
+
tagCollections,
|
|
8719
8727
|
slideMasters,
|
|
8720
8728
|
notesMaster,
|
|
8721
8729
|
handoutMaster,
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
8726
|
-
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
viewProperties,
|
|
8733
|
-
customShows,
|
|
8734
|
-
sections,
|
|
8735
|
-
coreProperties,
|
|
8736
|
-
appProperties,
|
|
8737
|
-
customProperties,
|
|
8738
|
-
tagCollections,
|
|
8739
|
-
slideMasters,
|
|
8740
|
-
notesMaster,
|
|
8741
|
-
handoutMaster,
|
|
8742
|
-
guides,
|
|
8743
|
-
activeSlideIndex,
|
|
8744
|
-
handlerRef,
|
|
8745
|
-
inlineEditingElementIdRef,
|
|
8746
|
-
inlineEditingTextRef,
|
|
8747
|
-
password,
|
|
8748
|
-
embedFonts,
|
|
8749
|
-
purpose
|
|
8750
|
-
]);
|
|
8730
|
+
guides,
|
|
8731
|
+
activeSlideIndex,
|
|
8732
|
+
handlerRef,
|
|
8733
|
+
inlineEditingElementIdRef,
|
|
8734
|
+
inlineEditingTextRef,
|
|
8735
|
+
password,
|
|
8736
|
+
embedFonts,
|
|
8737
|
+
purpose
|
|
8738
|
+
]
|
|
8739
|
+
);
|
|
8751
8740
|
}
|
|
8752
8741
|
function useRecoveryDetection(input) {
|
|
8753
8742
|
const { filePath, loading, error, slideCount, autosaveAllowed = true } = input;
|
|
@@ -8802,6 +8791,8 @@ function usePresentationSetup(input) {
|
|
|
8802
8791
|
slides,
|
|
8803
8792
|
templateElementsBySlideId,
|
|
8804
8793
|
visibleSlideIndexes,
|
|
8794
|
+
canvasSize,
|
|
8795
|
+
themeColorMap,
|
|
8805
8796
|
activeSlideIndex,
|
|
8806
8797
|
containerRef,
|
|
8807
8798
|
content,
|
|
@@ -8831,6 +8822,8 @@ function usePresentationSetup(input) {
|
|
|
8831
8822
|
slides,
|
|
8832
8823
|
templateElementsBySlideId,
|
|
8833
8824
|
visibleSlideIndexes,
|
|
8825
|
+
canvasSize,
|
|
8826
|
+
themeColorMap,
|
|
8834
8827
|
activeSlideIndex,
|
|
8835
8828
|
containerRef,
|
|
8836
8829
|
content,
|
|
@@ -9194,10 +9187,10 @@ function useIOHandlers(input) {
|
|
|
9194
9187
|
ops,
|
|
9195
9188
|
zoom,
|
|
9196
9189
|
handlerRef,
|
|
9190
|
+
serializeSlides,
|
|
9197
9191
|
serializeForRecovery,
|
|
9198
9192
|
setContent,
|
|
9199
9193
|
onContentChange,
|
|
9200
|
-
password,
|
|
9201
9194
|
imageExportScale
|
|
9202
9195
|
} = input;
|
|
9203
9196
|
const exportHandlers = useExportHandlers({
|
|
@@ -9208,24 +9201,20 @@ function useIOHandlers(input) {
|
|
|
9208
9201
|
filePath,
|
|
9209
9202
|
canvasStageRef: zoom.canvasStageRef,
|
|
9210
9203
|
setActiveSlideIndex: state.setActiveSlideIndex,
|
|
9211
|
-
|
|
9204
|
+
serializeSlides,
|
|
9212
9205
|
headerFooter: state.headerFooter,
|
|
9213
9206
|
presentationProperties: state.presentationProperties,
|
|
9214
9207
|
customShows: state.customShows,
|
|
9215
9208
|
sections: state.sections,
|
|
9216
|
-
coreProperties: state.coreProperties
|
|
9217
|
-
appProperties: state.appProperties
|
|
9209
|
+
coreProperties: state.coreProperties,
|
|
9210
|
+
appProperties: state.appProperties,
|
|
9218
9211
|
customProperties: state.customProperties,
|
|
9219
9212
|
tagCollections: state.tagCollections,
|
|
9220
|
-
slideMasters: state.slideMasters,
|
|
9221
9213
|
notesMaster: state.notesMaster,
|
|
9222
9214
|
handoutMaster: state.handoutMaster,
|
|
9223
|
-
guides: state.guides,
|
|
9224
|
-
activeSlideIndexForGuides: state.activeSlideIndex,
|
|
9225
9215
|
theme: state.theme,
|
|
9226
9216
|
canvasSize,
|
|
9227
9217
|
slideSizeEmu: state.slideSizeEmu,
|
|
9228
|
-
password,
|
|
9229
9218
|
imageExportScale
|
|
9230
9219
|
});
|
|
9231
9220
|
const printHandlers = usePrintHandlers({
|
|
@@ -9406,6 +9395,7 @@ function useContentLifecycle(input) {
|
|
|
9406
9395
|
onContentApplied,
|
|
9407
9396
|
allowExternalImages,
|
|
9408
9397
|
setReadOnlyRecommendation,
|
|
9398
|
+
setModifyVerifier,
|
|
9409
9399
|
setCompatToasts
|
|
9410
9400
|
} = input;
|
|
9411
9401
|
const { handlerRef } = useLoadContent({
|
|
@@ -9424,6 +9414,8 @@ function useContentLifecycle(input) {
|
|
|
9424
9414
|
setRecentColors: state.setRecentColors,
|
|
9425
9415
|
setTheme: state.setTheme,
|
|
9426
9416
|
setTableStyleMap: state.setTableStyleMap,
|
|
9417
|
+
setTableStylesDefaultId: state.setTableStylesDefaultId,
|
|
9418
|
+
setTableStylesToDelete: state.setTableStylesToDelete,
|
|
9427
9419
|
setThemeOptions: state.setThemeOptions,
|
|
9428
9420
|
setCustomShows: state.setCustomShows,
|
|
9429
9421
|
setActiveCustomShowId: state.setActiveCustomShowId,
|
|
@@ -9444,6 +9436,7 @@ function useContentLifecycle(input) {
|
|
|
9444
9436
|
setDigitalSignatureCount: state.setDigitalSignatureCount,
|
|
9445
9437
|
setGuides: state.setGuides,
|
|
9446
9438
|
setReadOnlyRecommendation,
|
|
9439
|
+
setModifyVerifier,
|
|
9447
9440
|
setCompatToasts,
|
|
9448
9441
|
setLoading: state.setLoading,
|
|
9449
9442
|
setError: state.setError,
|
|
@@ -9466,6 +9459,9 @@ function useContentLifecycle(input) {
|
|
|
9466
9459
|
headerFooter: state.headerFooter,
|
|
9467
9460
|
presentationProperties: state.presentationProperties,
|
|
9468
9461
|
viewProperties: state.viewProperties,
|
|
9462
|
+
tableStyleMap: state.tableStyleMap,
|
|
9463
|
+
tableStylesDefaultId: state.tableStylesDefaultId,
|
|
9464
|
+
tableStylesToDelete: state.tableStylesToDelete,
|
|
9469
9465
|
customShows: state.customShows,
|
|
9470
9466
|
sections: state.sections,
|
|
9471
9467
|
coreProperties: state.coreProperties,
|
|
@@ -9715,6 +9711,7 @@ function useViewerIntegration(input) {
|
|
|
9715
9711
|
autosaveIntervalMs,
|
|
9716
9712
|
allowExternalImages,
|
|
9717
9713
|
setReadOnlyRecommendation,
|
|
9714
|
+
setModifyVerifier,
|
|
9718
9715
|
setCompatToasts,
|
|
9719
9716
|
canEdit,
|
|
9720
9717
|
promptKeepInkAnnotations,
|
|
@@ -9786,6 +9783,7 @@ function useViewerIntegration(input) {
|
|
|
9786
9783
|
onContentApplied: () => setLoadVersion((v) => v + 1),
|
|
9787
9784
|
allowExternalImages,
|
|
9788
9785
|
setReadOnlyRecommendation,
|
|
9786
|
+
setModifyVerifier,
|
|
9789
9787
|
setCompatToasts
|
|
9790
9788
|
}
|
|
9791
9789
|
);
|
|
@@ -9799,10 +9797,10 @@ function useViewerIntegration(input) {
|
|
|
9799
9797
|
ops: editorOps.ops,
|
|
9800
9798
|
zoom,
|
|
9801
9799
|
handlerRef,
|
|
9800
|
+
serializeSlides,
|
|
9802
9801
|
serializeForRecovery,
|
|
9803
9802
|
setContent,
|
|
9804
9803
|
onContentChange,
|
|
9805
|
-
password: dialogs.presentationPassword ?? void 0,
|
|
9806
9804
|
imageExportScale
|
|
9807
9805
|
});
|
|
9808
9806
|
const {
|
|
@@ -10153,6 +10151,7 @@ function useYjsDocumentSync({
|
|
|
10153
10151
|
isSynced = true,
|
|
10154
10152
|
config,
|
|
10155
10153
|
getSourceBytes,
|
|
10154
|
+
getSaveOptions,
|
|
10156
10155
|
loadVersion = 0,
|
|
10157
10156
|
loadOrigin = "user"
|
|
10158
10157
|
}) {
|
|
@@ -10199,12 +10198,12 @@ function useYjsDocumentSync({
|
|
|
10199
10198
|
doc
|
|
10200
10199
|
);
|
|
10201
10200
|
const slidesToSave = buildSaveSlides(currentSlides, templateElementsBySlideId);
|
|
10202
|
-
const bytes = await handler.save(slidesToSave);
|
|
10201
|
+
const bytes = await handler.save(slidesToSave, getSaveOptions?.());
|
|
10203
10202
|
config.onWriteBack(bytes);
|
|
10204
10203
|
} catch {
|
|
10205
10204
|
}
|
|
10206
10205
|
}, debounceMs);
|
|
10207
|
-
}, [doc, config, getSourceBytes, templateElementsBySlideId]);
|
|
10206
|
+
}, [doc, config, getSourceBytes, getSaveOptions, templateElementsBySlideId]);
|
|
10208
10207
|
useEffect(() => {
|
|
10209
10208
|
if (loadVersion === lastLoadVersionRef.current) {
|
|
10210
10209
|
return;
|
|
@@ -11205,11 +11204,17 @@ function useViewerBuildingBlocksCore(input) {
|
|
|
11205
11204
|
activeMaster: state.activeMaster,
|
|
11206
11205
|
documentGridSpacing: state.viewProperties?.gridSpacing
|
|
11207
11206
|
});
|
|
11207
|
+
const themeColorMap = useMemo(
|
|
11208
|
+
() => state.theme?.colorScheme ? buildThemeColorMap(state.theme.colorScheme) : void 0,
|
|
11209
|
+
[state.theme?.colorScheme]
|
|
11210
|
+
);
|
|
11208
11211
|
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
|
|
11209
11212
|
mode,
|
|
11210
11213
|
slides,
|
|
11211
11214
|
templateElementsBySlideId,
|
|
11212
11215
|
visibleSlideIndexes,
|
|
11216
|
+
canvasSize,
|
|
11217
|
+
themeColorMap,
|
|
11213
11218
|
endWithBlackSlide: viewerOptions.advanced.slideShowEndWithBlackSlide,
|
|
11214
11219
|
// File > Options > Advanced > "Prompt to keep ink annotations when
|
|
11215
11220
|
// exiting" / "Show popup toolbar" while presenting.
|
|
@@ -11267,27 +11272,74 @@ function useReadOnlyRecommendationState(content) {
|
|
|
11267
11272
|
const [recommendation, setRecommendation] = useState(
|
|
11268
11273
|
() => readOnlyRecommendation(void 0)
|
|
11269
11274
|
);
|
|
11275
|
+
const [modifyVerifier, setModifyVerifier] = useState(void 0);
|
|
11270
11276
|
const [bannerHidden, setBannerHidden] = useState(false);
|
|
11271
11277
|
const [editAnywayActive, setEditAnywayActive] = useState(false);
|
|
11278
|
+
const [passwordPromptOpen, setPasswordPromptOpen] = useState(false);
|
|
11279
|
+
const [passwordError, setPasswordError] = useState(null);
|
|
11280
|
+
const [checkingPassword, setCheckingPassword] = useState(false);
|
|
11272
11281
|
useEffect(() => {
|
|
11273
11282
|
setBannerHidden(false);
|
|
11274
11283
|
setEditAnywayActive(false);
|
|
11284
|
+
setPasswordPromptOpen(false);
|
|
11285
|
+
setPasswordError(null);
|
|
11286
|
+
setCheckingPassword(false);
|
|
11275
11287
|
}, [content]);
|
|
11276
|
-
const
|
|
11288
|
+
const unlock = useCallback(() => {
|
|
11277
11289
|
setEditAnywayActive(true);
|
|
11278
11290
|
setBannerHidden(true);
|
|
11291
|
+
setPasswordPromptOpen(false);
|
|
11292
|
+
setPasswordError(null);
|
|
11279
11293
|
}, []);
|
|
11294
|
+
const editAnyway = useCallback(() => {
|
|
11295
|
+
if (recommendation.requiresPassword) {
|
|
11296
|
+
setPasswordPromptOpen(true);
|
|
11297
|
+
setPasswordError(null);
|
|
11298
|
+
return;
|
|
11299
|
+
}
|
|
11300
|
+
unlock();
|
|
11301
|
+
}, [recommendation.requiresPassword, unlock]);
|
|
11280
11302
|
const dismiss = useCallback(() => {
|
|
11281
11303
|
setBannerHidden(true);
|
|
11282
11304
|
}, []);
|
|
11305
|
+
const cancelPasswordPrompt = useCallback(() => {
|
|
11306
|
+
setPasswordPromptOpen(false);
|
|
11307
|
+
setPasswordError(null);
|
|
11308
|
+
}, []);
|
|
11309
|
+
const submitPassword = useCallback(
|
|
11310
|
+
async (password) => {
|
|
11311
|
+
setCheckingPassword(true);
|
|
11312
|
+
try {
|
|
11313
|
+
const result = await checkModifyPassword(modifyVerifier, password);
|
|
11314
|
+
if (result.ok) {
|
|
11315
|
+
unlock();
|
|
11316
|
+
} else {
|
|
11317
|
+
setPasswordError(result.reason);
|
|
11318
|
+
}
|
|
11319
|
+
} finally {
|
|
11320
|
+
setCheckingPassword(false);
|
|
11321
|
+
}
|
|
11322
|
+
},
|
|
11323
|
+
// oxlint-disable-next-line react/memo-dependencies -- see comment above
|
|
11324
|
+
[modifyVerifier, unlock]
|
|
11325
|
+
);
|
|
11283
11326
|
return {
|
|
11284
11327
|
recommendation,
|
|
11285
11328
|
setRecommendation,
|
|
11329
|
+
setModifyVerifier,
|
|
11286
11330
|
/** Whether the viewer's `canEdit` should be forced off. */
|
|
11287
11331
|
locked: recommendation.defaultReadOnly && !editAnywayActive,
|
|
11288
11332
|
bannerVisible: recommendation.kind !== null && !bannerHidden,
|
|
11289
11333
|
editAnyway,
|
|
11290
|
-
dismiss
|
|
11334
|
+
dismiss,
|
|
11335
|
+
/** Whether the inline password prompt should render in place of the banner's buttons. */
|
|
11336
|
+
passwordPromptOpen,
|
|
11337
|
+
/** Reason the last password attempt failed, or null before any attempt / after success. */
|
|
11338
|
+
passwordError,
|
|
11339
|
+
/** True while `submitPassword`'s check is in flight (disables the form). */
|
|
11340
|
+
checkingPassword,
|
|
11341
|
+
submitPassword,
|
|
11342
|
+
cancelPasswordPrompt
|
|
11291
11343
|
};
|
|
11292
11344
|
}
|
|
11293
11345
|
function useViewPreferencesSync(input) {
|
|
@@ -11465,6 +11517,7 @@ function useViewerBuildingBlocksState(input) {
|
|
|
11465
11517
|
// under the same default-off, core-side SSRF/privacy guard.
|
|
11466
11518
|
allowExternalImages: viewerOptions.trust.allowExternalContent,
|
|
11467
11519
|
setReadOnlyRecommendation: readOnlyRec.setRecommendation,
|
|
11520
|
+
setModifyVerifier: readOnlyRec.setModifyVerifier,
|
|
11468
11521
|
setCompatToasts: compatToastsState.setToasts,
|
|
11469
11522
|
canEdit,
|
|
11470
11523
|
promptKeepInkAnnotations: viewerOptions.advanced.slideShowPromptKeepInkAnnotations,
|