pptx-react-viewer 4.52.0 → 4.53.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 +17 -0
- package/dist/{chunk-3KXEJCMG.mjs → chunk-3WAEUEID.mjs} +133 -128
- package/dist/chunk-3WAEUEID.mjs.br +0 -0
- package/dist/chunk-3WAEUEID.mjs.gz +0 -0
- package/dist/{chunk-I63IFSNX.js → chunk-7M7MQGRK.js} +1252 -1134
- package/dist/chunk-7M7MQGRK.js.br +0 -0
- package/dist/chunk-7M7MQGRK.js.gz +0 -0
- package/dist/{chunk-E6A6ZBAM.mjs → chunk-BFVUPYIH.mjs} +188 -70
- package/dist/chunk-BFVUPYIH.mjs.br +0 -0
- package/dist/chunk-BFVUPYIH.mjs.gz +0 -0
- package/dist/{chunk-6GAWXARM.js → chunk-L3I2DEBI.js} +132 -126
- package/dist/chunk-L3I2DEBI.js.br +0 -0
- package/dist/chunk-L3I2DEBI.js.gz +0 -0
- package/dist/index.d.ts +17 -1
- package/dist/index.js +23 -23
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +36 -6
- package/dist/internals.js +80 -80
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +1 -1
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.d.ts +10 -0
- package/dist/viewer/index.js +18 -18
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +2 -2
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +3 -3
- package/dist/chunk-3KXEJCMG.mjs.br +0 -0
- package/dist/chunk-3KXEJCMG.mjs.gz +0 -0
- package/dist/chunk-6GAWXARM.js.br +0 -0
- package/dist/chunk-6GAWXARM.js.gz +0 -0
- package/dist/chunk-E6A6ZBAM.mjs.br +0 -0
- package/dist/chunk-E6A6ZBAM.mjs.gz +0 -0
- package/dist/chunk-I63IFSNX.js.br +0 -0
- package/dist/chunk-I63IFSNX.js.gz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,23 @@ A release listed with no entries carried no Conventional Commit in this package'
|
|
|
7
7
|
scope: scripts/release-plan.mjs releases whenever any published file changes, not only on
|
|
8
8
|
conventional commits.
|
|
9
9
|
|
|
10
|
+
## [4.53.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-react-viewer@4.53.0) - 2026-10-25
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- **pptx:** Let hosts block external content with allowExternalContent ([#201](https://github.com/ChristopherVR/ooxml/issues/201)) ([903c8e2](https://github.com/ChristopherVR/ooxml/commit/903c8e201dbd36252a5e82a388dcb59e30f3afc4))
|
|
15
|
+
|
|
16
|
+
## [4.52.1](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-react-viewer@4.52.1) - 2026-10-25
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
- **pptx:** Preview colour drags as one undo step ([#203](https://github.com/ChristopherVR/ooxml/issues/203)) ([27cc512](https://github.com/ChristopherVR/ooxml/commit/27cc5126cee1c351069e8eb7c2dafe4a0d7806a1))
|
|
21
|
+
- **pptx:** Save hyperlinks to their current targets ([#204](https://github.com/ChristopherVR/ooxml/issues/204)) ([371fe79](https://github.com/ChristopherVR/ooxml/commit/371fe799d88e4158fb7ed895a1e32b0c9b67682e))
|
|
22
|
+
|
|
23
|
+
### Refactor
|
|
24
|
+
|
|
25
|
+
- **ui:** Run pptx find and replace on one shared session ([#202](https://github.com/ChristopherVR/ooxml/issues/202)) ([61ff51e](https://github.com/ChristopherVR/ooxml/commit/61ff51e2710edad14212132b475652b27bb05d43))
|
|
26
|
+
|
|
10
27
|
## [4.52.0](https://github.com/ChristopherVR/ooxml/releases/tag/pptx-react-viewer@4.52.0) - 2026-10-25
|
|
11
28
|
|
|
12
29
|
### Features
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cloneTemplateElementsBySlideId, cloneSlide, cloneHistorySnapshot, MIN_ELEMENT_SIZE, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, partitionTemplateElements, isTemplateElementId, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, useTranslation, comparePresentation, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, stopAllPersistentAudio, buildSaveSlides, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, getImageEffectsOpacity, getImageEffectsFilter, getImageRenderStyle, cn, isEditableTextElement, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageSurfaceStyle, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, getElementLabel, normalizeHexColor, makeCloneId, DEFAULT_TEXT_FONT_SIZE, buildPdfFromTiledImageData, GRID_SIZE, copyFormatFromElement, hasCopyableFormat, isImageTiled, getDuotoneColors, DEFAULT_STROKE_COLOR, DEFAULT_FILL_COLOR, buildCssGradientFromShapeStyle, getCropShapeClipPath, getElementTransform, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getImageSurfaceMaskStyle, getTextWarpStyle, getTextCompensationTransform, renderTextSegments, buildReactChartViewModel, renderChartElement, buildInkGroupStrokes, getInkReplayStyles, INK_REPLAY_KEYFRAMES, buildContentPartStrokes, getContentPartReplayStyles, buildTextBody3DSceneStyle, rerouteConnectorsForMovedElements, applyReroutedConnectors, updateCellTextStyleInRawXml, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, buildNotesPdf, canvasToJpegData, applyFormatToElement, isPpactionUrl, parsePpactionUrl, getImageTilingStyle, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getAriaRoleDescription as getAriaRoleDescription$1, getAriaLabel as getAriaLabel$1, getAriaRole, DEFAULT_FONT_FAMILY, ACTION_BUTTON_PRESETS, isUrlSafe, safeOpenUrl as safeOpenUrl$1, substituteFieldText, HYPERLINK_COLOR } from './chunk-ID37Y3HG.mjs';
|
|
2
|
-
import { defineThreeViewElement, MIN_TOUCH_TARGET_PX, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createCollaborationSessionController, registerCollaborationTeardown, createPresenceProjector, BROADCAST_THROTTLE_MS, sanitizeColor, createEditorHistoryController, historyTheme, crossedHistoryTheme, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, createActiveAnimationGroup, cancelBuildReveal, clearPlaybackTimers, PresentationAnimationController, resolveMediaTimeNodeElementIds, resolveMediaBookmarkTimesMs, advanceMainSequence, playGroup, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, resolveShowBackward, resolveShowForward, beginZoomExcursion, buildZoomTransitionOverride, createPresenterShowGuard, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, findInSlides, applyFindReplacements, visibleTemplateElements, createCollaborationLivePatcher, reportInlineTextDraft, initialInspectorOpen, createPresentationLoadResources, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, resolveTextFillBlipUrls, seedRecentColors, resolveAuthoredCustomShowId, GlyphOutlineFontCache, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, resolveInitialSlideIndex, resolveAutosaveIntervalMs, createAutosaveController, saveAutosaveSnapshot, updateMasterViewElement, updateElement, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canMergeShapes, canInteractWithElement, prepareHtml2CanvasClone, html2canvasCaptureScope, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, DEFAULT_VIEWER_OPTIONS, resolveImageResolutionScale, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, buildDeckSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, createAutosaveRecoveryController, discardAutosaveRecovery, probeAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, rasterResultToPngBlob, downloadBlob, elementPictureFilename, canEditElementPoints, resolveGoogleFontsCss2Base, selectTrustedEmbeddedFonts, resolveFontWeight, resolveFontItalic, collectReferencedFontFamilies, resolveGoogleWebfontHref, syncGoogleWebfontStylesheet, selectGoogleWebfontFamilies, fetchGoogleWebfontOutlineBytes, dispatchEditorKey, isFeatureEnabled, parentSelection, textFontSizePtToPx, stepFontSizePt, textFontSizePxToPt, cycleSelectableElement, createCustomizationController, prepareElementForInsertion, slideSpaceElement, autosaveStatusKind, createViewerOptionsStore, observeYDocSlides, LOCAL_SYNC_ORIGIN, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, isKeyboardOpen, scopeLayoutOptionsToSlide, INITIAL_READ_ONLY_SESSION, readOnlySessionActions, applyReadOnlySessionEvent, readOnlyBannerVisible, readOnlyLocked, viewerPreferencesFromViewProperties, DEFAULT_VIEWER_PREFERENCES, viewPropertiesPatchFromPreferences, resolveCollaborationConfig, openPptxFile, readBackstageRecentFile, resolveCollaborationShellEditability, resolveCollaborationShellState, getResizeHandleHitAreaStyle, resolveElementInteractivity, getBackgroundAnimationState, getShapeEffectLayerPlacement, buildTextStyleOverrideCss, isElementRendered, resolveElementAriaAttributes, isMediaFullscreenActive, shouldRenderHitTarget, elementHitTargetStyle, getShapeEffectAnimationLayerStyle, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, resolvePalette as resolvePalette$1, mediaTransportVisible, oleActionsVisible, getGroupChildParentFill, deviceStrokeStageStyle, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, getSlideTransitionAnimations, getFragmentedTransitionDescriptor, SLIDE_TRANSITION_KEYFRAMES, isActionHidden, buildInlineTextCommitPatch, resolveInlineEditAutoFitHeight, resolveInlineEditNormAutofitShrink, setPendingCaretPoint, resolveGroupDoubleClickTarget, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, contextMenuInspectorAnchor, savedPresentationFileName, deliverSavedPresentation, exportDeckJson, mapCustomizedEditorKey, isEditorTextInputTarget, groupElements, generateElementId, ungroupElements, alignElements, distributeElements, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, planMergeShapes, applyMergeShapesPlan, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, createBlankSlide, insertSlidePaste, applySlidePasteTemplates, makeSlideId, insertedLayoutCompletion, buildSlideTemplateSlide, templateSchemeFromTheme, queueThemeWrite, needsOwnedSession, openOwnedCollaboration, resolveViewportFitOptions, editorViewportFitFor, calculateViewportFit, observeViewportClientSize, scheduleAutoAdvanceChain, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, resolveTransitionSoundAction, runPresentationAction, safeOpenUrl, buildRunProgramNotice, toggleStageElementMedia, resolveOleVerbTarget, downloadDataUrl, openUrlInNewTab, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, slideSpaceMembers, remapTextToSegments, getInlineEditorSelectionResult, buildInlineListStylePatch, applyActiveInlineListFormatting, applyListStyleUpdate, setPendingSelectionRestore, applyTextStyleUpdate, toggleSelectionBullets, transformInlineListCase, applyCaseTransformToSegments, transformTextCase, createGestureController, resolveExportCaptureDecision, recordProgressPercent, computeGridSpacingPx as computeGridSpacingPx$1, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, overlayMasterViewInlineSnapshot, overlayInlineTextSnapshot, rasterizeElement, cloneElementForPaste, applyPasteSpecialFormat, buildRasterPictureElement, cloneElementUpdates, assertElementUpdateTarget, prepareElementUpdateBatch, createWriteBackScheduler, writeBackReport, createSyncGate, observeExternalCollaborationReadiness, resolveHistoryDepth, createBackstagePresentation, buildFieldSubstitutionContext, getImageColorWashStyle, attachRotateHandlePlacement, getSelectionControlArtworkStyle, getSelectionOutlineColor, paintedStrokeWidth, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, paintedElementSize, MEDIA_FULLSCREEN_OVERLAY_STYLE, elementContainerHeightStyle, getAnimationOpacity, resolveElementHighlightClick, applyHighlightClickStyle, getComputedEffectStyle, getSoftEdgeSvgFilter, getEffectStyleSource, getBevelLightingSvgFilter, buildStrokeOutline, buildHollowHitOutline, buildSubpathFillOverlay, strokeOutlineViewBox, buildSummaryZoomView, readEditableText, placeCaretAt, takePendingCaretPoint, getPendingSelectionRestore, restoreSegmentSelection, mapInlineTextFormatKey, mapInlineEditorChord, subscribeBarFacePicturePixelSamples, getBarFacePicturePixelSampleVersion, ensureChartInteractionStyles, applyChartPartHighlight, resolveRevealedChartData, formatAxisValue, chartFormatTargetFromEvent, resolveOleType, getOleAriaLabel, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, getTextBodyRotationTransform, placeholderPromptDescriptor, getAriaRoleDescription, getAriaLabel, elementIdSelector, TOOLBAR_TABS, resolveGroupPressTarget, scrollInspectorSectionIntoView, computeScrollDelta, buildOutlinePrintJobDocument, printJobRasterFallback, applyThemeByPath, withHistoryTheme, withHistoryMasterThemes, writeThemeParts, loadedThemeName, replyToCommentInList, removeTableElementColumn, insertTableElementColumn, removeTableElementRow, insertTableElementRow, withCellStyle, setCellText, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, stopCaptureStream, GIF_POST_CAPTURE_MAX_SIDE, encodeGif, rasterizeElementTiles, placeTileOnPage, PDF_SLIDES_PAGE_WIDTH_PT, PDF_SLIDES_PAGE_HEIGHT_PT, createSnapshotTextPositions, resolvePresentationAction, getImageSvgFilters, getCachedNativeImageSize, probeNativeImageSize, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, svgLineCap, screenStrokeWidth, connectorWrapperTransform, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_PANEL_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_HINT_CLASS, modelDataToBlobUrl, resolveZoomNavigationTarget, inlineListBodyText, createInlineListSeed, readListActivationSelection, createInlineListModelObserver, attachCollaborationInlineEditor, bindInlineListParagraph, bindInlineListRun, attachInlineListController, restoreInlineListBodySelection, isBulletMarkerSegment, resolveChartThreeViewSpec, applyChart3DDrag, applyChart3DSelect, canDrillDown, findChartPartTarget, withChartTitle, resolveSmartArtThreeViewSpec, measureSvgViewportRect, isBrowserOpenableMime, formatBytes, getOleDisplayName, getOleBadgeLabel, hasGlyphEnvelope, buildGlyphEnvelopeBlock, getWarpPath, isWedgeCalloutPresetShape, getAriaRole as getAriaRole$1, isElementActionable, buildSmartArtPresetData, classifyMediaType, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, planPrintJob, openPrintWindow, buildVectorPrintJobDocument, openPendingPrintWindow, borrowExternalCollaborationAwareness, observeExternalCollaborationSession, publishLiveGeometry, rasterizeElementTiledToCanvas, clampGifDimensions, rasterResultToPngDataUrl, shouldConfirmExternalHyperlink, advanceChartMarkDrag, advanceChartValueDrag, resolveChartKind, buildChartMarkDragGeometry, beginChartMarkDrag, beginChartValueDrag, findSmartArtNodeText, commitSmartArtNodeFill, commitSmartArtNodeText, groupIntoParagraphs as groupIntoParagraphs$1, createGlyphOutlineLookup, finishPrintWindow, buildRasterPrintJobDocument, applyMotionPathPreset, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, buildSmartArtA11y, computeSmartArtElementLayout, flattenNodes, computeInlineEditorRect, smartArtNodeAtPoint, SMARTART_DEFAULT_PALETTE, computeDrawingViewBox, projectDrawingShapes, resolveRevealedDrawingShapeNodeIds, styleShadowFilter, buildChromeStyle, centeredSvgTextLines, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, bringForward, sendBackward, bringToFront, sendToBack } from 'ooxml-ui/pptx';
|
|
2
|
+
import { defineThreeViewElement, MIN_TOUCH_TARGET_PX, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createCollaborationSessionController, registerCollaborationTeardown, createPresenceProjector, BROADCAST_THROTTLE_MS, sanitizeColor, createEditorHistoryController, historyTheme, crossedHistoryTheme, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, createActiveAnimationGroup, cancelBuildReveal, clearPlaybackTimers, PresentationAnimationController, resolveMediaTimeNodeElementIds, resolveMediaBookmarkTimesMs, advanceMainSequence, playGroup, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, resolveShowBackward, resolveShowForward, beginZoomExcursion, buildZoomTransitionOverride, createPresenterShowGuard, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, INITIAL_FIND_REPLACE_SESSION, findReplaceSessionActions, visibleTemplateElements, createCollaborationLivePatcher, reportInlineTextDraft, initialInspectorOpen, createPresentationLoadResources, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, resolveTextFillBlipUrls, seedRecentColors, resolveAuthoredCustomShowId, GlyphOutlineFontCache, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, resolveInitialSlideIndex, resolveAutosaveIntervalMs, createAutosaveController, saveAutosaveSnapshot, updateMasterViewElement, updateElement, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canMergeShapes, canInteractWithElement, prepareHtml2CanvasClone, html2canvasCaptureScope, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, DEFAULT_VIEWER_OPTIONS, resolveImageResolutionScale, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, buildDeckSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, createAutosaveRecoveryController, discardAutosaveRecovery, probeAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, rasterResultToPngBlob, downloadBlob, elementPictureFilename, canEditElementPoints, resolveGoogleFontsCss2Base, selectTrustedEmbeddedFonts, resolveFontWeight, resolveFontItalic, collectReferencedFontFamilies, resolveGoogleWebfontHref, syncGoogleWebfontStylesheet, selectGoogleWebfontFamilies, fetchGoogleWebfontOutlineBytes, dispatchEditorKey, isFeatureEnabled, parentSelection, textFontSizePtToPx, stepFontSizePt, textFontSizePxToPt, cycleSelectableElement, createCustomizationController, prepareElementForInsertion, slideSpaceElement, autosaveStatusKind, createViewerOptionsStore, observeYDocSlides, LOCAL_SYNC_ORIGIN, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, isKeyboardOpen, scopeLayoutOptionsToSlide, INITIAL_READ_ONLY_SESSION, readOnlySessionActions, applyReadOnlySessionEvent, readOnlyBannerVisible, readOnlyLocked, viewerPreferencesFromViewProperties, DEFAULT_VIEWER_PREFERENCES, viewPropertiesPatchFromPreferences, resolveCollaborationConfig, openPptxFile, readBackstageRecentFile, resolveCollaborationShellEditability, resolveCollaborationShellState, getResizeHandleHitAreaStyle, resolveElementInteractivity, getBackgroundAnimationState, getShapeEffectLayerPlacement, buildTextStyleOverrideCss, isElementRendered, resolveElementAriaAttributes, isMediaFullscreenActive, shouldRenderHitTarget, elementHitTargetStyle, getShapeEffectAnimationLayerStyle, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, resolvePalette as resolvePalette$1, mediaTransportVisible, oleActionsVisible, getGroupChildParentFill, deviceStrokeStageStyle, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, getSlideTransitionAnimations, getFragmentedTransitionDescriptor, SLIDE_TRANSITION_KEYFRAMES, isActionHidden, buildInlineTextCommitPatch, resolveInlineEditAutoFitHeight, resolveInlineEditNormAutofitShrink, setPendingCaretPoint, resolveGroupDoubleClickTarget, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, contextMenuInspectorAnchor, savedPresentationFileName, deliverSavedPresentation, exportDeckJson, mapCustomizedEditorKey, isEditorTextInputTarget, groupElements, generateElementId, ungroupElements, alignElements, distributeElements, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, planMergeShapes, applyMergeShapesPlan, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, createBlankSlide, insertSlidePaste, applySlidePasteTemplates, makeSlideId, insertedLayoutCompletion, buildSlideTemplateSlide, templateSchemeFromTheme, queueThemeWrite, needsOwnedSession, openOwnedCollaboration, resolveViewportFitOptions, editorViewportFitFor, calculateViewportFit, observeViewportClientSize, scheduleAutoAdvanceChain, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, resolveTransitionSoundAction, runPresentationAction, safeOpenUrl, buildRunProgramNotice, toggleStageElementMedia, resolveOleVerbTarget, downloadDataUrl, openUrlInNewTab, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, slideSpaceMembers, remapTextToSegments, getInlineEditorSelectionResult, buildInlineListStylePatch, applyActiveInlineListFormatting, applyListStyleUpdate, setPendingSelectionRestore, applyTextStyleUpdate, toggleSelectionBullets, transformInlineListCase, applyCaseTransformToSegments, transformTextCase, createGestureController, resolveExportCaptureDecision, recordProgressPercent, computeGridSpacingPx as computeGridSpacingPx$1, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, overlayMasterViewInlineSnapshot, overlayInlineTextSnapshot, rasterizeElement, cloneElementForPaste, applyPasteSpecialFormat, buildRasterPictureElement, cloneElementUpdates, assertElementUpdateTarget, prepareElementUpdateBatch, createWriteBackScheduler, writeBackReport, createSyncGate, observeExternalCollaborationReadiness, resolveHistoryDepth, lockExternalContentSetting, resolveAllowExternalContent, createBackstagePresentation, buildFieldSubstitutionContext, getImageColorWashStyle, attachRotateHandlePlacement, getSelectionControlArtworkStyle, getSelectionOutlineColor, paintedStrokeWidth, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, paintedElementSize, MEDIA_FULLSCREEN_OVERLAY_STYLE, elementContainerHeightStyle, getAnimationOpacity, resolveElementHighlightClick, applyHighlightClickStyle, getComputedEffectStyle, getSoftEdgeSvgFilter, getEffectStyleSource, getBevelLightingSvgFilter, buildStrokeOutline, buildHollowHitOutline, buildSubpathFillOverlay, strokeOutlineViewBox, buildSummaryZoomView, readEditableText, placeCaretAt, takePendingCaretPoint, getPendingSelectionRestore, restoreSegmentSelection, mapInlineTextFormatKey, mapInlineEditorChord, subscribeBarFacePicturePixelSamples, getBarFacePicturePixelSampleVersion, ensureChartInteractionStyles, applyChartPartHighlight, resolveRevealedChartData, formatAxisValue, chartFormatTargetFromEvent, resolveOleType, getOleAriaLabel, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, getTextBodyRotationTransform, placeholderPromptDescriptor, getAriaRoleDescription, getAriaLabel, elementIdSelector, TOOLBAR_TABS, resolveGroupPressTarget, scrollInspectorSectionIntoView, computeScrollDelta, buildOutlinePrintJobDocument, printJobRasterFallback, applyThemeByPath, withHistoryTheme, withHistoryMasterThemes, writeThemeParts, loadedThemeName, replyToCommentInList, removeTableElementColumn, insertTableElementColumn, removeTableElementRow, insertTableElementRow, withCellStyle, setCellText, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, stopCaptureStream, GIF_POST_CAPTURE_MAX_SIDE, encodeGif, rasterizeElementTiles, placeTileOnPage, PDF_SLIDES_PAGE_WIDTH_PT, PDF_SLIDES_PAGE_HEIGHT_PT, createSnapshotTextPositions, resolvePresentationAction, getImageSvgFilters, getCachedNativeImageSize, probeNativeImageSize, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, svgLineCap, screenStrokeWidth, connectorWrapperTransform, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_PANEL_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_HINT_CLASS, modelDataToBlobUrl, resolveZoomNavigationTarget, inlineListBodyText, createInlineListSeed, readListActivationSelection, createInlineListModelObserver, attachCollaborationInlineEditor, bindInlineListParagraph, bindInlineListRun, attachInlineListController, restoreInlineListBodySelection, isBulletMarkerSegment, resolveChartThreeViewSpec, applyChart3DDrag, applyChart3DSelect, canDrillDown, findChartPartTarget, withChartTitle, resolveSmartArtThreeViewSpec, measureSvgViewportRect, isBrowserOpenableMime, formatBytes, getOleDisplayName, getOleBadgeLabel, hasGlyphEnvelope, buildGlyphEnvelopeBlock, getWarpPath, isWedgeCalloutPresetShape, getAriaRole as getAriaRole$1, isElementActionable, buildSmartArtPresetData, classifyMediaType, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, planPrintJob, openPrintWindow, buildVectorPrintJobDocument, openPendingPrintWindow, borrowExternalCollaborationAwareness, observeExternalCollaborationSession, publishLiveGeometry, rasterizeElementTiledToCanvas, clampGifDimensions, rasterResultToPngDataUrl, shouldConfirmExternalHyperlink, advanceChartMarkDrag, advanceChartValueDrag, resolveChartKind, buildChartMarkDragGeometry, beginChartMarkDrag, beginChartValueDrag, findSmartArtNodeText, commitSmartArtNodeFill, commitSmartArtNodeText, groupIntoParagraphs as groupIntoParagraphs$1, createGlyphOutlineLookup, finishPrintWindow, buildRasterPrintJobDocument, applyMotionPathPreset, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, buildSmartArtA11y, computeSmartArtElementLayout, flattenNodes, computeInlineEditorRect, smartArtNodeAtPoint, SMARTART_DEFAULT_PALETTE, computeDrawingViewBox, projectDrawingShapes, resolveRevealedDrawingShapeNodeIds, styleShadowFilter, buildChromeStyle, centeredSvgTextLines, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, bringForward, sendBackward, bringToFront, sendToBack } from 'ooxml-ui/pptx';
|
|
3
3
|
export { DUOTONE_PRESETS, MOBILE_BREAKPOINT, SLIDE_TRANSITION_KEYFRAMES, TABLET_BREAKPOINT, clearAudienceContent, computeVirtualRange, downloadBlob, getSlideTransitionAnimations, loadAudienceContent, storeAudienceContent } from 'ooxml-ui/pptx';
|
|
4
4
|
import React17, { useRef, useState, useCallback, useEffect, useSyncExternalStore, useMemo, useContext, useLayoutEffect, createContext, useImperativeHandle, Suspense } from 'react';
|
|
5
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -726,7 +726,11 @@ function useEditorHistory(input) {
|
|
|
726
726
|
useEffect(() => {
|
|
727
727
|
onDirtyRef.current = onDirty;
|
|
728
728
|
}, [onDirty]);
|
|
729
|
+
const untrackedDepthRef = useRef(0);
|
|
729
730
|
const markDirty = useCallback(() => {
|
|
731
|
+
if (untrackedDepthRef.current > 0) {
|
|
732
|
+
return;
|
|
733
|
+
}
|
|
730
734
|
setEditCommitNonce((previous) => previous + 1);
|
|
731
735
|
onDirtyRef.current?.();
|
|
732
736
|
}, []);
|
|
@@ -743,6 +747,14 @@ function useEditorHistory(input) {
|
|
|
743
747
|
},
|
|
744
748
|
[]
|
|
745
749
|
);
|
|
750
|
+
const withoutUndoStep = useCallback((apply) => {
|
|
751
|
+
untrackedDepthRef.current += 1;
|
|
752
|
+
try {
|
|
753
|
+
apply();
|
|
754
|
+
} finally {
|
|
755
|
+
untrackedDepthRef.current -= 1;
|
|
756
|
+
}
|
|
757
|
+
}, []);
|
|
746
758
|
const handleUndo = useCallback(() => {
|
|
747
759
|
if (!history.getSnapshot().canUndo) {
|
|
748
760
|
return;
|
|
@@ -901,6 +913,7 @@ function useEditorHistory(input) {
|
|
|
901
913
|
resetHistory,
|
|
902
914
|
forgetHistory: history.forget,
|
|
903
915
|
markDirty,
|
|
916
|
+
withoutUndoStep,
|
|
904
917
|
buildHistorySnapshot
|
|
905
918
|
};
|
|
906
919
|
}
|
|
@@ -3199,109 +3212,62 @@ function usePresentationAnnotations(input) {
|
|
|
3199
3212
|
function useFindReplace({
|
|
3200
3213
|
slides,
|
|
3201
3214
|
mode,
|
|
3202
|
-
|
|
3203
|
-
onSetSelectedElementId,
|
|
3215
|
+
onShowMatch,
|
|
3204
3216
|
onUpdateSlides,
|
|
3205
3217
|
onMarkDirty,
|
|
3206
3218
|
keyboard
|
|
3207
3219
|
}) {
|
|
3208
3220
|
const [findReplaceOpen, setFindReplaceOpen] = useState(false);
|
|
3209
|
-
const [
|
|
3210
|
-
const
|
|
3211
|
-
|
|
3212
|
-
const
|
|
3213
|
-
const [
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
includeNotes: findIncludeNotes,
|
|
3230
|
-
includeChartTitles: findIncludeChartTitles,
|
|
3231
|
-
includeChartData: findIncludeChartData
|
|
3232
|
-
});
|
|
3233
|
-
if (!findQuery) {
|
|
3234
|
-
setFindResults([]);
|
|
3235
|
-
setFindResultIndex(-1);
|
|
3236
|
-
return;
|
|
3237
|
-
}
|
|
3238
|
-
setFindResults(results);
|
|
3239
|
-
setFindResultIndex(results.length > 0 ? 0 : -1);
|
|
3240
|
-
if (results.length > 0) {
|
|
3241
|
-
onSetActiveSlideIndex(results[0].slideIndex);
|
|
3242
|
-
onSetSelectedElementId(results[0].elementId);
|
|
3243
|
-
}
|
|
3244
|
-
}, [
|
|
3245
|
-
slides,
|
|
3246
|
-
findQuery,
|
|
3247
|
-
findMatchCase,
|
|
3248
|
-
findIncludeNotes,
|
|
3249
|
-
findIncludeChartTitles,
|
|
3250
|
-
findIncludeChartData,
|
|
3251
|
-
onSetActiveSlideIndex,
|
|
3252
|
-
onSetSelectedElementId
|
|
3253
|
-
]);
|
|
3254
|
-
const navigateFindResult = useCallback(
|
|
3255
|
-
(direction) => {
|
|
3256
|
-
if (findResults.length === 0) {
|
|
3257
|
-
return;
|
|
3258
|
-
}
|
|
3259
|
-
const nextIdx = (findResultIndex + direction + findResults.length) % findResults.length;
|
|
3260
|
-
setFindResultIndex(nextIdx);
|
|
3261
|
-
const match = findResults[nextIdx];
|
|
3262
|
-
if (match) {
|
|
3263
|
-
onSetActiveSlideIndex(match.slideIndex);
|
|
3264
|
-
onSetSelectedElementId(match.elementId);
|
|
3265
|
-
}
|
|
3266
|
-
},
|
|
3267
|
-
[findResults, findResultIndex, onSetActiveSlideIndex, onSetSelectedElementId]
|
|
3268
|
-
);
|
|
3269
|
-
const applyReplacements = useCallback(
|
|
3270
|
-
(toReplace) => {
|
|
3271
|
-
if (toReplace.length === 0) {
|
|
3272
|
-
return;
|
|
3273
|
-
}
|
|
3274
|
-
if (toReplace.some((match) => match.readOnly)) {
|
|
3275
|
-
return;
|
|
3221
|
+
const [session, setSession] = useState(INITIAL_FIND_REPLACE_SESSION);
|
|
3222
|
+
const latest = useRef({ slides, onShowMatch, onUpdateSlides, onMarkDirty });
|
|
3223
|
+
latest.current = { slides, onShowMatch, onUpdateSlides, onMarkDirty };
|
|
3224
|
+
const latestSession = useRef(session);
|
|
3225
|
+
const [actions] = useState(
|
|
3226
|
+
() => findReplaceSessionActions(
|
|
3227
|
+
{
|
|
3228
|
+
get: () => latestSession.current,
|
|
3229
|
+
set: (next) => {
|
|
3230
|
+
latestSession.current = next;
|
|
3231
|
+
setSession(next);
|
|
3232
|
+
}
|
|
3233
|
+
},
|
|
3234
|
+
{
|
|
3235
|
+
slides: () => latest.current.slides,
|
|
3236
|
+
commit: (next) => {
|
|
3237
|
+
latest.current.onUpdateSlides(() => next);
|
|
3238
|
+
latest.current.onMarkDirty();
|
|
3239
|
+
},
|
|
3240
|
+
navigate: ({ slideIndex, elementId }) => latest.current.onShowMatch(slideIndex, elementId)
|
|
3276
3241
|
}
|
|
3277
|
-
|
|
3278
|
-
(prevSlides) => applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
|
|
3279
|
-
);
|
|
3280
|
-
onMarkDirty();
|
|
3281
|
-
},
|
|
3282
|
-
[replaceQuery, onUpdateSlides, onMarkDirty]
|
|
3242
|
+
)
|
|
3283
3243
|
);
|
|
3284
|
-
const handleReplace = useCallback(() => {
|
|
3285
|
-
if (findResults.length === 0 || findResultIndex < 0) {
|
|
3286
|
-
return;
|
|
3287
|
-
}
|
|
3288
|
-
applyReplacements([findResults[findResultIndex]]);
|
|
3289
|
-
pendingRefindRef.current = true;
|
|
3290
|
-
}, [findResults, findResultIndex, applyReplacements]);
|
|
3291
|
-
const handleReplaceAll = useCallback(() => {
|
|
3292
|
-
if (findResults.length === 0) {
|
|
3293
|
-
return;
|
|
3294
|
-
}
|
|
3295
|
-
applyReplacements(findResults);
|
|
3296
|
-
pendingRefindRef.current = true;
|
|
3297
|
-
}, [findResults, applyReplacements]);
|
|
3298
3244
|
useEffect(() => {
|
|
3299
|
-
if (!
|
|
3300
|
-
|
|
3245
|
+
if (!findReplaceOpen) {
|
|
3246
|
+
actions.close();
|
|
3301
3247
|
}
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3248
|
+
}, [findReplaceOpen, actions]);
|
|
3249
|
+
useEffect(() => {
|
|
3250
|
+
actions.slidesChanged();
|
|
3251
|
+
}, [slides, actions]);
|
|
3252
|
+
const handlers = useMemo(
|
|
3253
|
+
() => ({
|
|
3254
|
+
setFindQuery: (query) => actions.search({ query }),
|
|
3255
|
+
setReplaceQuery: actions.setReplacement,
|
|
3256
|
+
setFindMatchCase: (matchCase) => actions.search({ options: { matchCase } }),
|
|
3257
|
+
setFindIncludeNotes: (includeNotes) => actions.search({ options: { includeNotes } }),
|
|
3258
|
+
setFindIncludeChartTitles: (includeChartTitles) => actions.search({ options: { includeChartTitles } }),
|
|
3259
|
+
setFindIncludeChartData: (includeChartData) => actions.search({ options: { includeChartData } }),
|
|
3260
|
+
performFind: () => actions.search(),
|
|
3261
|
+
navigateFindResult: (direction) => direction > 0 ? actions.next() : actions.previous(),
|
|
3262
|
+
handleReplace: () => {
|
|
3263
|
+
actions.replaceCurrent();
|
|
3264
|
+
},
|
|
3265
|
+
handleReplaceAll: () => {
|
|
3266
|
+
actions.replaceAll();
|
|
3267
|
+
}
|
|
3268
|
+
}),
|
|
3269
|
+
[actions]
|
|
3270
|
+
);
|
|
3305
3271
|
useEffect(() => {
|
|
3306
3272
|
const handler = (event) => {
|
|
3307
3273
|
const { action } = mapCustomizedEditorKey(
|
|
@@ -3324,24 +3290,15 @@ function useFindReplace({
|
|
|
3324
3290
|
return {
|
|
3325
3291
|
findReplaceOpen,
|
|
3326
3292
|
setFindReplaceOpen,
|
|
3327
|
-
findQuery,
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
findIncludeChartData,
|
|
3337
|
-
setFindIncludeChartTitles,
|
|
3338
|
-
setFindIncludeChartData,
|
|
3339
|
-
findResults,
|
|
3340
|
-
findResultIndex,
|
|
3341
|
-
performFind,
|
|
3342
|
-
navigateFindResult,
|
|
3343
|
-
handleReplace,
|
|
3344
|
-
handleReplaceAll
|
|
3293
|
+
findQuery: session.query,
|
|
3294
|
+
replaceQuery: session.replacement,
|
|
3295
|
+
findMatchCase: session.options.matchCase,
|
|
3296
|
+
findIncludeNotes: session.options.includeNotes,
|
|
3297
|
+
findIncludeChartTitles: session.options.includeChartTitles,
|
|
3298
|
+
findIncludeChartData: session.options.includeChartData,
|
|
3299
|
+
findResults: session.matches,
|
|
3300
|
+
findResultIndex: session.current,
|
|
3301
|
+
...handlers
|
|
3345
3302
|
};
|
|
3346
3303
|
}
|
|
3347
3304
|
function useModalDismissDrag(onClose, threshold = 120) {
|
|
@@ -4001,6 +3958,35 @@ function useInlineEditingState(onTextChange) {
|
|
|
4001
3958
|
registerInlineEditReader
|
|
4002
3959
|
};
|
|
4003
3960
|
}
|
|
3961
|
+
function useSlideChangeSelection({
|
|
3962
|
+
setActiveSlideIndex,
|
|
3963
|
+
setSelectedElementId,
|
|
3964
|
+
setSelectedElementIds
|
|
3965
|
+
}) {
|
|
3966
|
+
const slideSelectionRef = useRef(null);
|
|
3967
|
+
const showSlideSelection = useCallback(
|
|
3968
|
+
(slideIndex, elementId) => {
|
|
3969
|
+
slideSelectionRef.current = slideIndex;
|
|
3970
|
+
setActiveSlideIndex(slideIndex);
|
|
3971
|
+
setSelectedElementId(elementId);
|
|
3972
|
+
setSelectedElementIds([]);
|
|
3973
|
+
},
|
|
3974
|
+
[setActiveSlideIndex, setSelectedElementId, setSelectedElementIds]
|
|
3975
|
+
);
|
|
3976
|
+
return { slideSelectionRef, showSlideSelection };
|
|
3977
|
+
}
|
|
3978
|
+
function useClearSelectionOnSlideChange(state, activeSlideIndex) {
|
|
3979
|
+
useEffect(() => {
|
|
3980
|
+
const kept = state.slideSelectionRef.current === activeSlideIndex;
|
|
3981
|
+
state.slideSelectionRef.current = null;
|
|
3982
|
+
state.setInlineEditingElementId(null);
|
|
3983
|
+
if (kept) {
|
|
3984
|
+
return;
|
|
3985
|
+
}
|
|
3986
|
+
state.setSelectedElementId(null);
|
|
3987
|
+
state.setSelectedElementIds([]);
|
|
3988
|
+
}, [activeSlideIndex]);
|
|
3989
|
+
}
|
|
4004
3990
|
function useSlideState() {
|
|
4005
3991
|
const [renderedSlides, setRenderedSlides] = useState([]);
|
|
4006
3992
|
const slidesRef = useRef(renderedSlides);
|
|
@@ -4040,6 +4026,11 @@ function useViewerCoreState(_input) {
|
|
|
4040
4026
|
const [activeSlideIndex, setActiveSlideIndex] = useState(0);
|
|
4041
4027
|
const [selectedElementId, setSelectedElementId] = useState(null);
|
|
4042
4028
|
const [selectedElementIds, setSelectedElementIds] = useState([]);
|
|
4029
|
+
const slideChangeSelection = useSlideChangeSelection({
|
|
4030
|
+
setActiveSlideIndex,
|
|
4031
|
+
setSelectedElementId,
|
|
4032
|
+
setSelectedElementIds
|
|
4033
|
+
});
|
|
4043
4034
|
const [isDirty, setIsDirty] = useState(false);
|
|
4044
4035
|
const autosaveDraftSinkRef = useRef(null);
|
|
4045
4036
|
const publishInlineText = useCallback(
|
|
@@ -4143,6 +4134,7 @@ function useViewerCoreState(_input) {
|
|
|
4143
4134
|
setSelectedElementId,
|
|
4144
4135
|
selectedElementIds,
|
|
4145
4136
|
setSelectedElementIds,
|
|
4137
|
+
...slideChangeSelection,
|
|
4146
4138
|
isDirty,
|
|
4147
4139
|
setIsDirty,
|
|
4148
4140
|
editTemplateMode,
|
|
@@ -8486,6 +8478,7 @@ function useThemeSwitching(input) {
|
|
|
8486
8478
|
// src/viewer/hooks/usePropertyHandlers.ts
|
|
8487
8479
|
function usePropertyHandlers(input) {
|
|
8488
8480
|
const {
|
|
8481
|
+
allowExternalImages,
|
|
8489
8482
|
slides,
|
|
8490
8483
|
activeSlideIndex,
|
|
8491
8484
|
canvasSize,
|
|
@@ -8558,7 +8551,7 @@ function usePropertyHandlers(input) {
|
|
|
8558
8551
|
try {
|
|
8559
8552
|
const ab = await file.arrayBuffer();
|
|
8560
8553
|
const h = new PptxHandler();
|
|
8561
|
-
const other = await h.load(ab);
|
|
8554
|
+
const other = await h.load(ab, { allowExternalImages: allowExternalImages === true });
|
|
8562
8555
|
if (!other) {
|
|
8563
8556
|
return;
|
|
8564
8557
|
}
|
|
@@ -8574,7 +8567,7 @@ function usePropertyHandlers(input) {
|
|
|
8574
8567
|
}
|
|
8575
8568
|
};
|
|
8576
8569
|
fileInput.click();
|
|
8577
|
-
}, [slides, canvasSize.width, canvasSize.height]);
|
|
8570
|
+
}, [slides, canvasSize.width, canvasSize.height, allowExternalImages]);
|
|
8578
8571
|
const handleAcceptSlide = useCallback(
|
|
8579
8572
|
(di) => {
|
|
8580
8573
|
if (!compareResult) {
|
|
@@ -9796,8 +9789,7 @@ function useEditorOperations(input) {
|
|
|
9796
9789
|
const findReplace = useFindReplace({
|
|
9797
9790
|
slides,
|
|
9798
9791
|
mode,
|
|
9799
|
-
|
|
9800
|
-
onSetSelectedElementId: state.setSelectedElementId,
|
|
9792
|
+
onShowMatch: state.showSlideSelection,
|
|
9801
9793
|
onUpdateSlides: ops.updateSlides,
|
|
9802
9794
|
onMarkDirty: history.markDirty,
|
|
9803
9795
|
keyboard
|
|
@@ -10005,6 +9997,7 @@ function useIOHandlers(input) {
|
|
|
10005
9997
|
setContent,
|
|
10006
9998
|
onPropertiesChange,
|
|
10007
9999
|
onNotesUpdate,
|
|
10000
|
+
allowExternalImages,
|
|
10008
10001
|
imageExportScale,
|
|
10009
10002
|
imageResolutionScale
|
|
10010
10003
|
} = input;
|
|
@@ -10072,7 +10065,8 @@ function useIOHandlers(input) {
|
|
|
10072
10065
|
ops,
|
|
10073
10066
|
history,
|
|
10074
10067
|
onPropertiesChange,
|
|
10075
|
-
onNotesUpdate
|
|
10068
|
+
onNotesUpdate,
|
|
10069
|
+
allowExternalImages
|
|
10076
10070
|
});
|
|
10077
10071
|
return { exportHandlers, printHandlers, themeHandlers, propertyHandlers };
|
|
10078
10072
|
}
|
|
@@ -10780,6 +10774,7 @@ function useViewerIntegration(input) {
|
|
|
10780
10774
|
setContent,
|
|
10781
10775
|
onPropertiesChange,
|
|
10782
10776
|
onNotesUpdate,
|
|
10777
|
+
allowExternalImages,
|
|
10783
10778
|
imageExportScale,
|
|
10784
10779
|
imageResolutionScale
|
|
10785
10780
|
});
|
|
@@ -12592,7 +12587,7 @@ function useViewerBuildingBlocksCore(input) {
|
|
|
12592
12587
|
fitPadding: input.fitPadding,
|
|
12593
12588
|
maxFitScale: input.maxFitScale
|
|
12594
12589
|
});
|
|
12595
|
-
const { options: viewerOptions } = useViewerOptions();
|
|
12590
|
+
const { options: viewerOptions, optionsStore } = useViewerOptions();
|
|
12596
12591
|
const { setIsDirty } = state;
|
|
12597
12592
|
const markDocumentDirty = useCallback(() => {
|
|
12598
12593
|
setIsDirty(true);
|
|
@@ -12682,7 +12677,8 @@ function useViewerBuildingBlocksCore(input) {
|
|
|
12682
12677
|
// comment in `PowerPointViewer.tsx`.
|
|
12683
12678
|
imageExportScale: 2 * resolveImageResolutionScale(viewerOptions),
|
|
12684
12679
|
imageResolutionScale: resolveImageResolutionScale(viewerOptions),
|
|
12685
|
-
viewerOptions
|
|
12680
|
+
viewerOptions,
|
|
12681
|
+
optionsStore
|
|
12686
12682
|
};
|
|
12687
12683
|
}
|
|
12688
12684
|
function useCompatibilityToastsState() {
|
|
@@ -12813,7 +12809,18 @@ function useViewPreferencesSync(input) {
|
|
|
12813
12809
|
// src/viewer/hooks/useViewerBuildingBlocksState.ts
|
|
12814
12810
|
function useViewerBuildingBlocksState(input) {
|
|
12815
12811
|
const { core, content, canEdit, filePath, autosaveEnabled, userName, handle, setContent } = input;
|
|
12816
|
-
const { initialSlide, googleFonts } = input;
|
|
12812
|
+
const { initialSlide, googleFonts, allowExternalContent } = input;
|
|
12813
|
+
const externalContentLockedRef = useRef(false);
|
|
12814
|
+
const { optionsStore } = core;
|
|
12815
|
+
useLayoutEffect(() => {
|
|
12816
|
+
if (allowExternalContent === void 0 && !externalContentLockedRef.current) {
|
|
12817
|
+
return;
|
|
12818
|
+
}
|
|
12819
|
+
externalContentLockedRef.current = allowExternalContent !== void 0;
|
|
12820
|
+
optionsStore.setConstraints({
|
|
12821
|
+
locked: lockExternalContentSetting({}, allowExternalContent)
|
|
12822
|
+
});
|
|
12823
|
+
}, [optionsStore, allowExternalContent]);
|
|
12817
12824
|
const {
|
|
12818
12825
|
onContentChange,
|
|
12819
12826
|
onDirtyChange,
|
|
@@ -12871,11 +12878,7 @@ function useViewerBuildingBlocksState(input) {
|
|
|
12871
12878
|
});
|
|
12872
12879
|
const readOnlyRec = useReadOnlyRecommendationState(content);
|
|
12873
12880
|
const compatToastsState = useCompatibilityToastsState();
|
|
12874
|
-
|
|
12875
|
-
state.setSelectedElementId(null);
|
|
12876
|
-
state.setSelectedElementIds([]);
|
|
12877
|
-
state.setInlineEditingElementId(null);
|
|
12878
|
-
}, [activeSlideIndex]);
|
|
12881
|
+
useClearSelectionOnSlideChange(state, activeSlideIndex);
|
|
12879
12882
|
const editorOps = useEditorOperations({
|
|
12880
12883
|
state,
|
|
12881
12884
|
history,
|
|
@@ -12921,7 +12924,7 @@ function useViewerBuildingBlocksState(input) {
|
|
|
12921
12924
|
// Trust Center > "Allow external content": same gate `PowerPointViewer`
|
|
12922
12925
|
// applies, so the headless building-blocks API loads http(s) images
|
|
12923
12926
|
// under the same default-off, core-side SSRF/privacy guard.
|
|
12924
|
-
allowExternalImages:
|
|
12927
|
+
allowExternalImages: resolveAllowExternalContent(allowExternalContent, viewerOptions),
|
|
12925
12928
|
setReadOnlyRecommendation: readOnlyRec.setRecommendation,
|
|
12926
12929
|
setModifyVerifier: readOnlyRec.setModifyVerifier,
|
|
12927
12930
|
canInsertElement: !readOnlyRec.locked && !viewerOptions.trust.openInProtectedView,
|
|
@@ -12983,6 +12986,7 @@ function useViewerBuildingBlocks(input) {
|
|
|
12983
12986
|
fileName,
|
|
12984
12987
|
initialSlide,
|
|
12985
12988
|
googleFonts,
|
|
12989
|
+
allowExternalContent,
|
|
12986
12990
|
autosaveEnabled = true,
|
|
12987
12991
|
userName,
|
|
12988
12992
|
hiddenActions,
|
|
@@ -13072,6 +13076,7 @@ function useViewerBuildingBlocks(input) {
|
|
|
13072
13076
|
filePath,
|
|
13073
13077
|
initialSlide,
|
|
13074
13078
|
googleFonts,
|
|
13079
|
+
allowExternalContent,
|
|
13075
13080
|
autosaveEnabled,
|
|
13076
13081
|
userName,
|
|
13077
13082
|
handle,
|
|
@@ -18676,4 +18681,4 @@ function useResizablePanels() {
|
|
|
18676
18681
|
};
|
|
18677
18682
|
}
|
|
18678
18683
|
|
|
18679
|
-
export { ACTION_VERB_MAP, ChartFormatContext, ChartPartSelectionProvider, CollaborationCursorOverlay, CollaborationProvider, ElementRenderer, FragmentedTransitionLayer, InlineCollaborationContext, MIN_TOUCH_TARGET, MorphTransitionOverlay, PresentationTransitionOverlay, RemoteSelectionOverlay, RemoteUserCursors, Rendering3DFlagsContext, ResizeHandles, SlideBackgroundImageLayer, SlideLayer, StaticElementRenderer, ViewerOptionsContext, ViewerOptionsStoreContext, computeToolbarVisibility, createReviewCommentsHost, detectTargetType, imgSrc, isAudienceTab, parseAudienceNonce, parseEmailUrl, parseSlideFromUrl, playAnimationSound, renderStrokeView, renderToCanvas, resolveSmartArtDataPalette, safePrompt, scopeLayoutOptionsToActiveSlide, useAnimationPlayback, useAnnotationHandlers, useAudienceMode, useAutosave, useBroadcastFollower, useCanvasInteractions, useChartFormatContext, useChartPartSelection, useClipboardHandlers, useCollaboration, useCollaborationDocumentSync, useCollaborativeHistory, useCollaborativeState, useComments, useCompatibilityToastsState, useContentLifecycle, useController, useDerivedElementState, useDerivedSlideState, useDialogCustomShows, useEditorHistory, useEditorOperations, useElementManipulation, useElementOperations, useExportHandlers, useExportSaveAs, useFindReplace, useFollowMode, useFontInjection, useGroupAlignLayerHandlers, useIOHandlers, useInsertElements, useIsMobile, useKeyboardInsets, useKeyboardShortcutWiring, useKeyboardShortcuts, useLayoutSwitching, useLoadContent, useMergeShapesHandler, useModalDismissDrag, usePointerHandlers, usePresenceTracking, usePresentationAnnotations, usePresentationKeyboard, usePresentationMode, usePresentationSetup, usePresenterWindow, usePrintHandlers, usePropertyHandlers, useReadOnlyRecommendationState, useRecoveryDetection, useReducedMotion, useRehearsalTimings, useReportOnChange, useResizablePanels, useSectionOperations, useSerialize, useSheetDismissDrag, useSlideManagement, useSlideNavigation, useSwipeNavigation, useTableOperations, useThemeHandlers, useThemeSwitching, useToolbarVisibility, useTouchGestures, useViewPreferencesSync, useViewerBuildingBlocks, useViewerCoreState, useViewerDialogs, useViewerIntegration, useViewerOptions, useViewerOptionsContext, useViewerState, useViewerUIState, useVirtualizedSlides, useYjsDocumentSync, useYjsProvider, useZoomNavigation, useZoomViewport, withDisplayName };
|
|
18684
|
+
export { ACTION_VERB_MAP, ChartFormatContext, ChartPartSelectionProvider, CollaborationCursorOverlay, CollaborationProvider, ElementRenderer, FragmentedTransitionLayer, InlineCollaborationContext, MIN_TOUCH_TARGET, MorphTransitionOverlay, PresentationTransitionOverlay, RemoteSelectionOverlay, RemoteUserCursors, Rendering3DFlagsContext, ResizeHandles, SlideBackgroundImageLayer, SlideLayer, StaticElementRenderer, ViewerOptionsContext, ViewerOptionsStoreContext, computeToolbarVisibility, createReviewCommentsHost, detectTargetType, imgSrc, isAudienceTab, parseAudienceNonce, parseEmailUrl, parseSlideFromUrl, playAnimationSound, renderStrokeView, renderToCanvas, resolveSmartArtDataPalette, safePrompt, scopeLayoutOptionsToActiveSlide, useAnimationPlayback, useAnnotationHandlers, useAudienceMode, useAutosave, useBroadcastFollower, useCanvasInteractions, useChartFormatContext, useChartPartSelection, useClearSelectionOnSlideChange, useClipboardHandlers, useCollaboration, useCollaborationDocumentSync, useCollaborativeHistory, useCollaborativeState, useComments, useCompatibilityToastsState, useContentLifecycle, useController, useDerivedElementState, useDerivedSlideState, useDialogCustomShows, useEditorHistory, useEditorOperations, useElementManipulation, useElementOperations, useExportHandlers, useExportSaveAs, useFindReplace, useFollowMode, useFontInjection, useGroupAlignLayerHandlers, useIOHandlers, useInsertElements, useIsMobile, useKeyboardInsets, useKeyboardShortcutWiring, useKeyboardShortcuts, useLayoutSwitching, useLoadContent, useMergeShapesHandler, useModalDismissDrag, usePointerHandlers, usePresenceTracking, usePresentationAnnotations, usePresentationKeyboard, usePresentationMode, usePresentationSetup, usePresenterWindow, usePrintHandlers, usePropertyHandlers, useReadOnlyRecommendationState, useRecoveryDetection, useReducedMotion, useRehearsalTimings, useReportOnChange, useResizablePanels, useSectionOperations, useSerialize, useSheetDismissDrag, useSlideManagement, useSlideNavigation, useSwipeNavigation, useTableOperations, useThemeHandlers, useThemeSwitching, useToolbarVisibility, useTouchGestures, useViewPreferencesSync, useViewerBuildingBlocks, useViewerCoreState, useViewerDialogs, useViewerIntegration, useViewerOptions, useViewerOptionsContext, useViewerState, useViewerUIState, useVirtualizedSlides, useYjsDocumentSync, useYjsProvider, useZoomNavigation, useZoomViewport, withDisplayName };
|
|
Binary file
|
|
Binary file
|