pptx-react-viewer 2.21.1 → 3.0.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 +25 -0
- package/dist/{AiChatPanel-E4NQEMEI.mjs → AiChatPanel-DMBQPAGB.mjs} +3 -3
- package/dist/AiChatPanel-DMBQPAGB.mjs.br +0 -0
- package/dist/AiChatPanel-DMBQPAGB.mjs.gz +0 -0
- package/dist/{AiChatPanel-VKR2IFFC.js → AiChatPanel-NLIUZ5RI.js} +23 -23
- package/dist/AiChatPanel-NLIUZ5RI.js.br +0 -0
- package/dist/AiChatPanel-NLIUZ5RI.js.gz +0 -0
- package/dist/{Model3DScene-JZKLB5YT.js → Model3DScene-JNZN42TU.js} +2 -2
- package/dist/Model3DScene-JNZN42TU.js.br +0 -0
- package/dist/Model3DScene-JNZN42TU.js.gz +0 -0
- package/dist/{Model3DScene-65J6IE5Q.mjs → Model3DScene-ZO6U7YVU.mjs} +1 -1
- package/dist/Model3DScene-ZO6U7YVU.mjs.br +0 -0
- package/dist/Model3DScene-ZO6U7YVU.mjs.gz +0 -0
- package/dist/{PowerPointViewer-DVFkeluD.d.ts → PowerPointViewer-SkkxAGKa.d.ts} +2 -2
- package/dist/PowerPointViewer-SkkxAGKa.d.ts.map +1 -0
- package/dist/SurfaceChart3DScene-P6CVRWDQ.mjs +47 -0
- package/dist/SurfaceChart3DScene-P6CVRWDQ.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-P6CVRWDQ.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-PGD4ZCLI.js +49 -0
- package/dist/SurfaceChart3DScene-PGD4ZCLI.js.br +0 -0
- package/dist/SurfaceChart3DScene-PGD4ZCLI.js.gz +0 -0
- package/dist/{audience-content-store-C4BFFhV5.d.ts → audience-content-store-Bx4Yj2pN.d.ts} +2 -2
- package/dist/{audience-content-store-C4BFFhV5.d.ts.map → audience-content-store-Bx4Yj2pN.d.ts.map} +1 -1
- package/dist/{chunk-GJHO6HPF.js → chunk-3MW6F3K7.js} +451 -399
- package/dist/chunk-3MW6F3K7.js.br +0 -0
- package/dist/chunk-3MW6F3K7.js.gz +0 -0
- package/dist/{chunk-2SNHVHHB.mjs → chunk-BGAJLL4N.mjs} +70 -18
- package/dist/chunk-BGAJLL4N.mjs.br +0 -0
- package/dist/chunk-BGAJLL4N.mjs.gz +0 -0
- package/dist/{chunk-CBGTLSY7.mjs → chunk-H2ONCGFZ.mjs} +218 -156
- package/dist/chunk-H2ONCGFZ.mjs.br +0 -0
- package/dist/chunk-H2ONCGFZ.mjs.gz +0 -0
- package/dist/{chunk-WRJ76D5S.mjs → chunk-OB4PKKIN.mjs} +1 -1
- package/dist/chunk-OB4PKKIN.mjs.br +0 -0
- package/dist/chunk-OB4PKKIN.mjs.gz +0 -0
- package/dist/{chunk-VWCUKKR3.mjs → chunk-OXPD2UYI.mjs} +14031 -7120
- package/dist/chunk-OXPD2UYI.mjs.br +0 -0
- package/dist/chunk-OXPD2UYI.mjs.gz +0 -0
- package/dist/{chunk-OSPNGQF3.js → chunk-RSEZYBKT.js} +2005 -1943
- package/dist/chunk-RSEZYBKT.js.br +0 -0
- package/dist/chunk-RSEZYBKT.js.gz +0 -0
- package/dist/{chunk-WX3HQHR5.mjs → chunk-S6PFSR7I.mjs} +108 -255
- package/dist/chunk-S6PFSR7I.mjs.br +0 -0
- package/dist/chunk-S6PFSR7I.mjs.gz +0 -0
- package/dist/{chunk-HYUJVSQJ.js → chunk-SDOQKSKI.js} +14051 -7126
- package/dist/chunk-SDOQKSKI.js.br +0 -0
- package/dist/chunk-SDOQKSKI.js.gz +0 -0
- package/dist/{chunk-C3JR7RMW.js → chunk-WFMSDYVQ.js} +3 -3
- package/dist/chunk-WFMSDYVQ.js.br +0 -0
- package/dist/chunk-WFMSDYVQ.js.gz +0 -0
- package/dist/{chunk-DA6DF3EU.js → chunk-XMLPTDPM.js} +248 -396
- package/dist/chunk-XMLPTDPM.js.br +0 -0
- package/dist/chunk-XMLPTDPM.js.gz +0 -0
- package/dist/index.d.ts +491 -20
- package/dist/index.js +45 -45
- 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 +498 -22
- 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/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/{types-TCH6icpi.d.ts → types-kLpvSPxq.d.ts} +11 -1
- package/dist/{types-TCH6icpi.d.ts.map → types-kLpvSPxq.d.ts.map} +1 -1
- package/dist/{useViewerBuildingBlocks-BKb0qs1j.d.ts → useViewerBuildingBlocks-fh7rq4jc.d.ts} +2 -2
- package/dist/{useViewerBuildingBlocks-BKb0qs1j.d.ts.map → useViewerBuildingBlocks-fh7rq4jc.d.ts.map} +1 -1
- package/dist/viewer/index.d.ts +488 -18
- package/dist/viewer/index.js +26 -26
- 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 +2 -2
- package/dist/AiChatPanel-E4NQEMEI.mjs.br +0 -0
- package/dist/AiChatPanel-E4NQEMEI.mjs.gz +0 -0
- package/dist/AiChatPanel-VKR2IFFC.js.br +0 -0
- package/dist/AiChatPanel-VKR2IFFC.js.gz +0 -0
- package/dist/Model3DScene-65J6IE5Q.mjs.br +0 -0
- package/dist/Model3DScene-65J6IE5Q.mjs.gz +0 -0
- package/dist/Model3DScene-JZKLB5YT.js.br +0 -0
- package/dist/Model3DScene-JZKLB5YT.js.gz +0 -0
- package/dist/PowerPointViewer-DVFkeluD.d.ts.map +0 -1
- package/dist/chunk-2SNHVHHB.mjs.br +0 -0
- package/dist/chunk-2SNHVHHB.mjs.gz +0 -0
- package/dist/chunk-C3JR7RMW.js.br +0 -0
- package/dist/chunk-C3JR7RMW.js.gz +0 -0
- package/dist/chunk-CBGTLSY7.mjs.br +0 -0
- package/dist/chunk-CBGTLSY7.mjs.gz +0 -0
- package/dist/chunk-DA6DF3EU.js.br +0 -0
- package/dist/chunk-DA6DF3EU.js.gz +0 -0
- package/dist/chunk-GJHO6HPF.js.br +0 -0
- package/dist/chunk-GJHO6HPF.js.gz +0 -0
- package/dist/chunk-HYUJVSQJ.js.br +0 -0
- package/dist/chunk-HYUJVSQJ.js.gz +0 -0
- package/dist/chunk-OSPNGQF3.js.br +0 -0
- package/dist/chunk-OSPNGQF3.js.gz +0 -0
- package/dist/chunk-VWCUKKR3.mjs.br +0 -0
- package/dist/chunk-VWCUKKR3.mjs.gz +0 -0
- package/dist/chunk-WRJ76D5S.mjs.br +0 -0
- package/dist/chunk-WRJ76D5S.mjs.gz +0 -0
- package/dist/chunk-WX3HQHR5.mjs.br +0 -0
- package/dist/chunk-WX3HQHR5.mjs.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -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, executeMediaCommand, buildPdfFromImageData, buildNotesPdf,
|
|
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, executeMediaCommand, buildPdfFromImageData, buildNotesPdf, GRID_SIZE, DEFAULT_TEXT_FONT_SIZE } from './chunk-S6PFSR7I.mjs';
|
|
2
2
|
import { translationsEn } from './chunk-L5MNLIQF.mjs';
|
|
3
|
-
import { 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, PresentationAnimationController, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, createPresenterShowGuard, attachPresentationVisibilityPause, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, findInSlides, applyFindReplacements, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, collectMediaElements, collectImagePaths, partitionTemplateElements, resolveAuthoredCustomShowId, buildInitialGuides, EncryptedFileError, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, updateMasterViewElement, isTemplateElementId, hasShapeProperties, hasTextProperties, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, downloadBlob, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, detectTouchDevice, detectOrientation, isMobileViewport, MOBILE_BREAKPOINT, TABLET_BREAKPOINT, describeFontEmbedding, mayLeaveSlideShow, stopAllPersistentAudio, remapTextToSegments, guidePxToEmu, buildSaveSlides, embeddedFontSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, shouldProbeAutosaveRecovery, probeAutosaveRecovery, acceptAutosaveRecovery, discardAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, mapEditorKey, isEditorTextInputTarget, createViewerOptionsStore, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, shouldAutoFollowBroadcaster, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, scopeLayoutOptionsToSlide, openPptxFile, readBackstageRecentFile, isActionHidden, canInteractWithElement, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, savedPresentationFileName, generatePackageReadme, presentationBaseName, exportDeckJson, groupElements, generateElementId, makeCloneId, ungroupElements, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, mapPresentationKey, lastShowSlideIndex, firstShowSlideIndex, mapPresentationWheel, computeColorFilter, computeSlideIndices, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, buildThemeColorMap, reResolveSlideColors, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, runPresentationAction, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, replyToCommentInList, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, encodeGif, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, cloneElementForPaste, computeScrollDelta, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, buildPrintHtmlDocument, deleteTableColumn, rebuildTableStructureInRawXml, insertTableColumn, deleteTableRow, insertTableRow, updateCellTextStyleInRawXml, setCellText, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, isPpactionUrl, parsePpactionUrl, safeOpenUrl, ACTION_BUTTON_PRESETS, elementActionToPptxAction, isUrlSafe, buildSmartArtPresetData, classifyMediaType, computeSnapToShape, publishLiveGeometry, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, applyResize, snapBoxToGrid, applyMotionPathPreset } from './chunk-
|
|
3
|
+
import { 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, PresentationAnimationController, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, createPresenterShowGuard, attachPresentationVisibilityPause, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, findInSlides, applyFindReplacements, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, collectMediaElements, collectImagePaths, collectTableCellImagePaths, applyTableCellImagePatches, collectTableStyleImagePaths, applyTableStyleImagePatches, partitionTemplateElements, resolveAuthoredCustomShowId, buildInitialGuides, EncryptedFileError, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, updateMasterViewElement, isTemplateElementId, hasShapeProperties, hasTextProperties, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, downloadBlob, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, detectTouchDevice, detectOrientation, isMobileViewport, MOBILE_BREAKPOINT, TABLET_BREAKPOINT, describeFontEmbedding, mayLeaveSlideShow, stopAllPersistentAudio, remapTextToSegments, guidePxToEmu, buildSaveSlides, embeddedFontSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, shouldProbeAutosaveRecovery, probeAutosaveRecovery, acceptAutosaveRecovery, discardAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, mapEditorKey, isEditorTextInputTarget, createViewerOptionsStore, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, shouldAutoFollowBroadcaster, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, scopeLayoutOptionsToSlide, openPptxFile, readBackstageRecentFile, isActionHidden, resolveInlineEditAutoFitHeight, canInteractWithElement, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, savedPresentationFileName, generatePackageReadme, presentationBaseName, exportDeckJson, groupElements, generateElementId, makeCloneId, ungroupElements, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, mapPresentationKey, lastShowSlideIndex, firstShowSlideIndex, mapPresentationWheel, computeColorFilter, computeSlideIndices, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, buildThemeColorMap, reResolveSlideColors, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, runPresentationAction, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, replyToCommentInList, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, encodeGif, computeGridSpacingPx, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, cloneElementForPaste, computeScrollDelta, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, buildPrintHtmlDocument, deleteTableColumn, rebuildTableStructureInRawXml, insertTableColumn, deleteTableRow, insertTableRow, updateCellTextStyleInRawXml, setCellText, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, isPpactionUrl, parsePpactionUrl, safeOpenUrl, ACTION_BUTTON_PRESETS, elementActionToPptxAction, isUrlSafe, buildSmartArtPresetData, classifyMediaType, computeSnapToShape, publishLiveGeometry, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, applyResize, snapBoxToGrid, applyMotionPathPreset } from './chunk-OXPD2UYI.mjs';
|
|
4
4
|
import { useRef, useState, useEffect, useCallback, useMemo, useLayoutEffect, useSyncExternalStore, useImperativeHandle } from 'react';
|
|
5
5
|
import JSZip from 'jszip';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
@@ -1018,10 +1018,10 @@ function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationEleme
|
|
|
1018
1018
|
const nextStates = new Map(previousStates);
|
|
1019
1019
|
const currentState = nextStates.get(step.elementId) ?? {
|
|
1020
1020
|
visible: true};
|
|
1021
|
-
const visibleAfterStep = step.presetClass === "exit" ? false : currentState.visible;
|
|
1021
|
+
const visibleAfterStep = step.presetClass === "exit" || step.hideAfterEffect ? false : currentState.visible;
|
|
1022
1022
|
nextStates.set(step.elementId, {
|
|
1023
1023
|
visible: visibleAfterStep,
|
|
1024
|
-
cssAnimation: void 0
|
|
1024
|
+
cssAnimation: step.holdEndState ? step.cssAnimation : void 0
|
|
1025
1025
|
});
|
|
1026
1026
|
return nextStates;
|
|
1027
1027
|
});
|
|
@@ -3499,6 +3499,7 @@ function useViewerCoreState(_input) {
|
|
|
3499
3499
|
const [presentationProperties, setPresentationProperties] = useState(
|
|
3500
3500
|
{}
|
|
3501
3501
|
);
|
|
3502
|
+
const [viewProperties, setViewProperties] = useState(void 0);
|
|
3502
3503
|
const [notesMaster, setNotesMaster] = useState();
|
|
3503
3504
|
const [handoutMaster, setHandoutMaster] = useState();
|
|
3504
3505
|
const [notesCanvasSize, setNotesCanvasSize] = useState();
|
|
@@ -3596,6 +3597,8 @@ function useViewerCoreState(_input) {
|
|
|
3596
3597
|
setSections,
|
|
3597
3598
|
presentationProperties,
|
|
3598
3599
|
setPresentationProperties,
|
|
3600
|
+
viewProperties,
|
|
3601
|
+
setViewProperties,
|
|
3599
3602
|
notesMaster,
|
|
3600
3603
|
setNotesMaster,
|
|
3601
3604
|
handoutMaster,
|
|
@@ -3771,6 +3774,7 @@ function useLoadContent({
|
|
|
3771
3774
|
setActiveCustomShowId,
|
|
3772
3775
|
setSections,
|
|
3773
3776
|
setPresentationProperties,
|
|
3777
|
+
setViewProperties,
|
|
3774
3778
|
setNotesMaster,
|
|
3775
3779
|
setHandoutMaster,
|
|
3776
3780
|
setNotesCanvasSize,
|
|
@@ -3920,6 +3924,54 @@ function useLoadContent({
|
|
|
3920
3924
|
});
|
|
3921
3925
|
}
|
|
3922
3926
|
}
|
|
3927
|
+
const { paths: tableImagePaths, refs: tableImageRefs } = collectTableCellImagePaths(nextSlides);
|
|
3928
|
+
if (tableImagePaths.size > 0) {
|
|
3929
|
+
const resolvedTableMap = /* @__PURE__ */ new Map();
|
|
3930
|
+
await Promise.all(
|
|
3931
|
+
Array.from(tableImagePaths).map(async (path) => {
|
|
3932
|
+
try {
|
|
3933
|
+
const url = await handler.getImageData(path);
|
|
3934
|
+
if (url) {
|
|
3935
|
+
resolvedTableMap.set(path, url);
|
|
3936
|
+
}
|
|
3937
|
+
} catch {
|
|
3938
|
+
}
|
|
3939
|
+
})
|
|
3940
|
+
);
|
|
3941
|
+
if (resolvedTableMap.size > 0) {
|
|
3942
|
+
nextSlides = nextSlides.map((s) => {
|
|
3943
|
+
const newElements = applyTableCellImagePatches(
|
|
3944
|
+
s.elements,
|
|
3945
|
+
resolvedTableMap,
|
|
3946
|
+
tableImageRefs
|
|
3947
|
+
);
|
|
3948
|
+
return newElements === s.elements ? s : { ...s, elements: newElements };
|
|
3949
|
+
});
|
|
3950
|
+
}
|
|
3951
|
+
}
|
|
3952
|
+
let nextTableStyleMap = parsed.tableStyleMap;
|
|
3953
|
+
const { paths: tableStyleImagePaths, refs: tableStyleImageRefs } = collectTableStyleImagePaths(nextTableStyleMap);
|
|
3954
|
+
if (tableStyleImagePaths.size > 0) {
|
|
3955
|
+
const resolvedStyleMap = /* @__PURE__ */ new Map();
|
|
3956
|
+
await Promise.all(
|
|
3957
|
+
Array.from(tableStyleImagePaths).map(async (path) => {
|
|
3958
|
+
try {
|
|
3959
|
+
const url = await handler.getImageData(path);
|
|
3960
|
+
if (url) {
|
|
3961
|
+
resolvedStyleMap.set(path, url);
|
|
3962
|
+
}
|
|
3963
|
+
} catch {
|
|
3964
|
+
}
|
|
3965
|
+
})
|
|
3966
|
+
);
|
|
3967
|
+
if (resolvedStyleMap.size > 0 && nextTableStyleMap) {
|
|
3968
|
+
nextTableStyleMap = applyTableStyleImagePatches(
|
|
3969
|
+
nextTableStyleMap,
|
|
3970
|
+
resolvedStyleMap,
|
|
3971
|
+
tableStyleImageRefs
|
|
3972
|
+
);
|
|
3973
|
+
}
|
|
3974
|
+
}
|
|
3923
3975
|
handlerRef.current = handler;
|
|
3924
3976
|
const partition = partitionTemplateElements(nextSlides);
|
|
3925
3977
|
setSlides(partition.slides);
|
|
@@ -3939,7 +3991,7 @@ function useLoadContent({
|
|
|
3939
3991
|
setLayoutOptions(parsed.layoutOptions ?? []);
|
|
3940
3992
|
setSlideMasters(parsed.slideMasters ?? []);
|
|
3941
3993
|
setTheme(parsed.theme);
|
|
3942
|
-
setTableStyleMap(
|
|
3994
|
+
setTableStyleMap(nextTableStyleMap);
|
|
3943
3995
|
setThemeOptions(parsed.themeOptions ?? []);
|
|
3944
3996
|
setCustomShows(parsed.customShows ?? []);
|
|
3945
3997
|
setActiveCustomShowId(
|
|
@@ -3947,6 +3999,7 @@ function useLoadContent({
|
|
|
3947
3999
|
);
|
|
3948
4000
|
setSections(parsed.sections ?? []);
|
|
3949
4001
|
setPresentationProperties(parsed.presentationProperties ?? {});
|
|
4002
|
+
setViewProperties(parsed.viewProperties);
|
|
3950
4003
|
setNotesMaster(parsed.notesMaster);
|
|
3951
4004
|
setHandoutMaster(parsed.handoutMaster);
|
|
3952
4005
|
if (typeof parsed.notesWidthEmu === "number" && typeof parsed.notesHeightEmu === "number" && parsed.notesWidthEmu > 0 && parsed.notesHeightEmu > 0) {
|
|
@@ -3976,6 +4029,7 @@ function useLoadContent({
|
|
|
3976
4029
|
if (err instanceof EncryptedFileError) {
|
|
3977
4030
|
setIsEncrypted(true);
|
|
3978
4031
|
} else {
|
|
4032
|
+
console.error("[pptx] Failed to load presentation content:", err);
|
|
3979
4033
|
setError(err instanceof Error ? err.message : String(err));
|
|
3980
4034
|
}
|
|
3981
4035
|
}
|
|
@@ -4900,9 +4954,12 @@ function useCanvasInteractions(input) {
|
|
|
4900
4954
|
if (el && hasTextProperties(el)) {
|
|
4901
4955
|
const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
|
|
4902
4956
|
const newSegments = remapTextToSegments(committedText, el.textSegments, el.textStyle);
|
|
4957
|
+
const editorEl = document.querySelector("[data-inline-editor]");
|
|
4958
|
+
const newHeight = resolveInlineEditAutoFitHeight(el.textStyle, el.height, editorEl);
|
|
4903
4959
|
ops.updateElementById(editId, {
|
|
4904
4960
|
text: committedText,
|
|
4905
|
-
textSegments: newSegments
|
|
4961
|
+
textSegments: newSegments,
|
|
4962
|
+
...newHeight !== void 0 ? { height: newHeight } : {}
|
|
4906
4963
|
});
|
|
4907
4964
|
history.markDirty();
|
|
4908
4965
|
}
|
|
@@ -8384,14 +8441,8 @@ function useViewerDialogs(input) {
|
|
|
8384
8441
|
handleRunAccessibilityCheck
|
|
8385
8442
|
};
|
|
8386
8443
|
}
|
|
8387
|
-
function
|
|
8388
|
-
|
|
8389
|
-
const px = Math.round(presentationGridSpacing.cx / EMU_PER_PX);
|
|
8390
|
-
if (px > 0) {
|
|
8391
|
-
return px;
|
|
8392
|
-
}
|
|
8393
|
-
}
|
|
8394
|
-
return GRID_SIZE;
|
|
8444
|
+
function computeGridSpacingPx2(documentGridSpacing) {
|
|
8445
|
+
return computeGridSpacingPx(documentGridSpacing, GRID_SIZE);
|
|
8395
8446
|
}
|
|
8396
8447
|
function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
|
|
8397
8448
|
const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
|
|
@@ -8427,11 +8478,11 @@ function useDerivedSlideState(input) {
|
|
|
8427
8478
|
mode,
|
|
8428
8479
|
activeLayout,
|
|
8429
8480
|
activeMaster,
|
|
8430
|
-
|
|
8481
|
+
documentGridSpacing
|
|
8431
8482
|
} = input;
|
|
8432
8483
|
const gridSpacingPx = useMemo(
|
|
8433
|
-
() =>
|
|
8434
|
-
[
|
|
8484
|
+
() => computeGridSpacingPx2(documentGridSpacing),
|
|
8485
|
+
[documentGridSpacing]
|
|
8435
8486
|
);
|
|
8436
8487
|
const visibleSlideIndexes = useMemo(
|
|
8437
8488
|
() => computeVisibleSlideIndexes(slides, activeCustomShowId, customShows),
|
|
@@ -9386,6 +9437,7 @@ function useContentLifecycle(input) {
|
|
|
9386
9437
|
setActiveCustomShowId: state.setActiveCustomShowId,
|
|
9387
9438
|
setSections: state.setSections,
|
|
9388
9439
|
setPresentationProperties: state.setPresentationProperties,
|
|
9440
|
+
setViewProperties: state.setViewProperties,
|
|
9389
9441
|
setNotesMaster: state.setNotesMaster,
|
|
9390
9442
|
setHandoutMaster: state.setHandoutMaster,
|
|
9391
9443
|
setNotesCanvasSize: state.setNotesCanvasSize,
|
|
@@ -11005,7 +11057,7 @@ function useViewerBuildingBlocksCore(input) {
|
|
|
11005
11057
|
mode,
|
|
11006
11058
|
activeLayout: state.activeLayout,
|
|
11007
11059
|
activeMaster: state.activeMaster,
|
|
11008
|
-
|
|
11060
|
+
documentGridSpacing: state.viewProperties?.gridSpacing
|
|
11009
11061
|
});
|
|
11010
11062
|
const { options: viewerOptions } = useViewerOptions();
|
|
11011
11063
|
const { presentation, annotations, actionSoundHandlerRef } = usePresentationSetup({
|
|
Binary file
|
|
Binary file
|