pptx-react-viewer 4.52.1 → 4.53.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/{chunk-JUH4YPMU.js → chunk-2ZS3FP62.js} +138 -126
  3. package/dist/chunk-2ZS3FP62.js.br +0 -0
  4. package/dist/chunk-2ZS3FP62.js.gz +0 -0
  5. package/dist/{chunk-2AM5YYWI.js → chunk-433LAU63.js} +34 -26
  6. package/dist/chunk-433LAU63.js.br +0 -0
  7. package/dist/chunk-433LAU63.js.gz +0 -0
  8. package/dist/{chunk-6436YER5.mjs → chunk-QCNVTNVV.mjs} +35 -27
  9. package/dist/chunk-QCNVTNVV.mjs.br +0 -0
  10. package/dist/chunk-QCNVTNVV.mjs.gz +0 -0
  11. package/dist/{chunk-L77POU5D.mjs → chunk-SN4XVKRH.mjs} +21 -9
  12. package/dist/chunk-SN4XVKRH.mjs.br +0 -0
  13. package/dist/chunk-SN4XVKRH.mjs.gz +0 -0
  14. package/dist/index.d.ts +16 -0
  15. package/dist/index.js +23 -23
  16. package/dist/index.js.br +0 -0
  17. package/dist/index.js.gz +0 -0
  18. package/dist/index.mjs +2 -2
  19. package/dist/index.mjs.br +0 -0
  20. package/dist/index.mjs.gz +0 -0
  21. package/dist/internals.d.ts +10 -0
  22. package/dist/internals.js +80 -80
  23. package/dist/internals.js.br +0 -0
  24. package/dist/internals.js.gz +0 -0
  25. package/dist/internals.mjs +1 -1
  26. package/dist/internals.mjs.br +0 -0
  27. package/dist/internals.mjs.gz +0 -0
  28. package/dist/viewer/index.d.ts +10 -0
  29. package/dist/viewer/index.js +18 -18
  30. package/dist/viewer/index.js.br +0 -0
  31. package/dist/viewer/index.js.gz +0 -0
  32. package/dist/viewer/index.mjs +2 -2
  33. package/dist/viewer/index.mjs.br +0 -0
  34. package/dist/viewer/index.mjs.gz +0 -0
  35. package/package.json +3 -3
  36. package/dist/chunk-2AM5YYWI.js.br +0 -0
  37. package/dist/chunk-2AM5YYWI.js.gz +0 -0
  38. package/dist/chunk-6436YER5.mjs.br +0 -0
  39. package/dist/chunk-6436YER5.mjs.gz +0 -0
  40. package/dist/chunk-JUH4YPMU.js.br +0 -0
  41. package/dist/chunk-JUH4YPMU.js.gz +0 -0
  42. package/dist/chunk-L77POU5D.mjs.br +0 -0
  43. package/dist/chunk-L77POU5D.mjs.gz +0 -0
Binary file
Binary file
@@ -3393,15 +3393,13 @@ function addCommentToSlide(slides, slideIndex, text, authorName, elementId, ment
3393
3393
  authorName,
3394
3394
  void 0,
3395
3395
  void 0,
3396
- elementId
3396
+ elementId,
3397
+ mentions
3397
3398
  );
3398
3399
  if (!next) {
3399
3400
  return { slides, didAdd: false };
3400
3401
  }
3401
- const withMentions = mentions && mentions.length > 0 ? next.map(
3402
- (comment, index) => index === next.length - 1 ? { ...comment, mentions } : comment
3403
- ) : next;
3404
- return { slides: replaceCommentsOnSlide(slides, slideIndex, withMentions), didAdd: true };
3402
+ return { slides: replaceCommentsOnSlide(slides, slideIndex, next), didAdd: true };
3405
3403
  }
3406
3404
  function removeCommentFromSlide(slides, slideIndex, commentId) {
3407
3405
  const slide = slides[slideIndex];
@@ -3441,19 +3439,11 @@ function addReplyToSlide(slides, slideIndex, parentId, text, authorName, mention
3441
3439
  if (!slide) {
3442
3440
  return { slides, didAdd: false };
3443
3441
  }
3444
- const next = pptx.replyToCommentInList(slide.comments || [], parentId, text, authorName);
3442
+ const next = pptx.replyToCommentInList(slide.comments || [], parentId, text, authorName, mentions);
3445
3443
  if (!next) {
3446
3444
  return { slides, didAdd: false };
3447
3445
  }
3448
- const withMentions = mentions && mentions.length > 0 ? next.map(
3449
- (comment) => comment.id === parentId && comment.replies && comment.replies.length > 0 ? {
3450
- ...comment,
3451
- replies: comment.replies.map(
3452
- (reply, index) => index === comment.replies.length - 1 ? { ...reply, mentions } : reply
3453
- )
3454
- } : comment
3455
- ) : next;
3456
- return { slides: replaceCommentsOnSlide(slides, slideIndex, withMentions), didAdd: true };
3446
+ return { slides: replaceCommentsOnSlide(slides, slideIndex, next), didAdd: true };
3457
3447
  }
3458
3448
  function pruneSlideDrafts(drafts, slideIds) {
3459
3449
  const next = {};
@@ -3507,8 +3497,8 @@ function useCommentReplyHandlers(input) {
3507
3497
  if (!slide) {
3508
3498
  return;
3509
3499
  }
3510
- const replyText = String(replyDraftByCommentId[commentId] || "").trim();
3511
- if (replyText.length === 0) {
3500
+ const replyText = String(replyDraftByCommentId[commentId] || "");
3501
+ if (replyText.trim().length === 0) {
3512
3502
  return;
3513
3503
  }
3514
3504
  let didAdd = false;
@@ -3611,8 +3601,8 @@ function useComments({
3611
3601
  if (!slide) {
3612
3602
  return;
3613
3603
  }
3614
- const draft = String(commentDraftBySlideId[slide.id] || "").trim();
3615
- if (draft.length === 0) {
3604
+ const draft = String(commentDraftBySlideId[slide.id] || "");
3605
+ if (draft.trim().length === 0) {
3616
3606
  return;
3617
3607
  }
3618
3608
  let didAdd = false;
@@ -8483,6 +8473,7 @@ function useThemeSwitching(input) {
8483
8473
  // src/viewer/hooks/usePropertyHandlers.ts
8484
8474
  function usePropertyHandlers(input) {
8485
8475
  const {
8476
+ allowExternalImages,
8486
8477
  slides,
8487
8478
  activeSlideIndex,
8488
8479
  canvasSize,
@@ -8555,7 +8546,7 @@ function usePropertyHandlers(input) {
8555
8546
  try {
8556
8547
  const ab = await file.arrayBuffer();
8557
8548
  const h = new pptx$1.PptxHandler();
8558
- const other = await h.load(ab);
8549
+ const other = await h.load(ab, { allowExternalImages: allowExternalImages === true });
8559
8550
  if (!other) {
8560
8551
  return;
8561
8552
  }
@@ -8571,7 +8562,7 @@ function usePropertyHandlers(input) {
8571
8562
  }
8572
8563
  };
8573
8564
  fileInput.click();
8574
- }, [slides, canvasSize.width, canvasSize.height]);
8565
+ }, [slides, canvasSize.width, canvasSize.height, allowExternalImages]);
8575
8566
  const handleAcceptSlide = React17.useCallback(
8576
8567
  (di) => {
8577
8568
  if (!compareResult) {
@@ -10001,6 +9992,7 @@ function useIOHandlers(input) {
10001
9992
  setContent,
10002
9993
  onPropertiesChange,
10003
9994
  onNotesUpdate,
9995
+ allowExternalImages,
10004
9996
  imageExportScale,
10005
9997
  imageResolutionScale
10006
9998
  } = input;
@@ -10068,7 +10060,8 @@ function useIOHandlers(input) {
10068
10060
  ops,
10069
10061
  history,
10070
10062
  onPropertiesChange,
10071
- onNotesUpdate
10063
+ onNotesUpdate,
10064
+ allowExternalImages
10072
10065
  });
10073
10066
  return { exportHandlers, printHandlers, themeHandlers, propertyHandlers };
10074
10067
  }
@@ -10776,6 +10769,7 @@ function useViewerIntegration(input) {
10776
10769
  setContent,
10777
10770
  onPropertiesChange,
10778
10771
  onNotesUpdate,
10772
+ allowExternalImages,
10779
10773
  imageExportScale,
10780
10774
  imageResolutionScale
10781
10775
  });
@@ -12588,7 +12582,7 @@ function useViewerBuildingBlocksCore(input) {
12588
12582
  fitPadding: input.fitPadding,
12589
12583
  maxFitScale: input.maxFitScale
12590
12584
  });
12591
- const { options: viewerOptions } = useViewerOptions();
12585
+ const { options: viewerOptions, optionsStore } = useViewerOptions();
12592
12586
  const { setIsDirty } = state;
12593
12587
  const markDocumentDirty = React17.useCallback(() => {
12594
12588
  setIsDirty(true);
@@ -12678,7 +12672,8 @@ function useViewerBuildingBlocksCore(input) {
12678
12672
  // comment in `PowerPointViewer.tsx`.
12679
12673
  imageExportScale: 2 * pptx.resolveImageResolutionScale(viewerOptions),
12680
12674
  imageResolutionScale: pptx.resolveImageResolutionScale(viewerOptions),
12681
- viewerOptions
12675
+ viewerOptions,
12676
+ optionsStore
12682
12677
  };
12683
12678
  }
12684
12679
  function useCompatibilityToastsState() {
@@ -12809,7 +12804,18 @@ function useViewPreferencesSync(input) {
12809
12804
  // src/viewer/hooks/useViewerBuildingBlocksState.ts
12810
12805
  function useViewerBuildingBlocksState(input) {
12811
12806
  const { core, content, canEdit, filePath, autosaveEnabled, userName, handle, setContent } = input;
12812
- const { initialSlide, googleFonts } = input;
12807
+ const { initialSlide, googleFonts, allowExternalContent } = input;
12808
+ const externalContentLockedRef = React17.useRef(false);
12809
+ const { optionsStore } = core;
12810
+ React17.useLayoutEffect(() => {
12811
+ if (allowExternalContent === void 0 && !externalContentLockedRef.current) {
12812
+ return;
12813
+ }
12814
+ externalContentLockedRef.current = allowExternalContent !== void 0;
12815
+ optionsStore.setConstraints({
12816
+ locked: pptx.lockExternalContentSetting({}, allowExternalContent)
12817
+ });
12818
+ }, [optionsStore, allowExternalContent]);
12813
12819
  const {
12814
12820
  onContentChange,
12815
12821
  onDirtyChange,
@@ -12913,7 +12919,7 @@ function useViewerBuildingBlocksState(input) {
12913
12919
  // Trust Center > "Allow external content": same gate `PowerPointViewer`
12914
12920
  // applies, so the headless building-blocks API loads http(s) images
12915
12921
  // under the same default-off, core-side SSRF/privacy guard.
12916
- allowExternalImages: viewerOptions.trust.allowExternalContent,
12922
+ allowExternalImages: pptx.resolveAllowExternalContent(allowExternalContent, viewerOptions),
12917
12923
  setReadOnlyRecommendation: readOnlyRec.setRecommendation,
12918
12924
  setModifyVerifier: readOnlyRec.setModifyVerifier,
12919
12925
  canInsertElement: !readOnlyRec.locked && !viewerOptions.trust.openInProtectedView,
@@ -12975,6 +12981,7 @@ function useViewerBuildingBlocks(input) {
12975
12981
  fileName,
12976
12982
  initialSlide,
12977
12983
  googleFonts,
12984
+ allowExternalContent,
12978
12985
  autosaveEnabled = true,
12979
12986
  userName,
12980
12987
  hiddenActions,
@@ -13064,6 +13071,7 @@ function useViewerBuildingBlocks(input) {
13064
13071
  filePath,
13065
13072
  initialSlide,
13066
13073
  googleFonts,
13074
+ allowExternalContent,
13067
13075
  autosaveEnabled,
13068
13076
  userName,
13069
13077
  handle,
Binary file
Binary file
@@ -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, 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, 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';
@@ -3388,15 +3388,13 @@ function addCommentToSlide(slides, slideIndex, text, authorName, elementId, ment
3388
3388
  authorName,
3389
3389
  void 0,
3390
3390
  void 0,
3391
- elementId
3391
+ elementId,
3392
+ mentions
3392
3393
  );
3393
3394
  if (!next) {
3394
3395
  return { slides, didAdd: false };
3395
3396
  }
3396
- const withMentions = mentions && mentions.length > 0 ? next.map(
3397
- (comment, index) => index === next.length - 1 ? { ...comment, mentions } : comment
3398
- ) : next;
3399
- return { slides: replaceCommentsOnSlide(slides, slideIndex, withMentions), didAdd: true };
3397
+ return { slides: replaceCommentsOnSlide(slides, slideIndex, next), didAdd: true };
3400
3398
  }
3401
3399
  function removeCommentFromSlide(slides, slideIndex, commentId) {
3402
3400
  const slide = slides[slideIndex];
@@ -3436,19 +3434,11 @@ function addReplyToSlide(slides, slideIndex, parentId, text, authorName, mention
3436
3434
  if (!slide) {
3437
3435
  return { slides, didAdd: false };
3438
3436
  }
3439
- const next = replyToCommentInList(slide.comments || [], parentId, text, authorName);
3437
+ const next = replyToCommentInList(slide.comments || [], parentId, text, authorName, mentions);
3440
3438
  if (!next) {
3441
3439
  return { slides, didAdd: false };
3442
3440
  }
3443
- const withMentions = mentions && mentions.length > 0 ? next.map(
3444
- (comment) => comment.id === parentId && comment.replies && comment.replies.length > 0 ? {
3445
- ...comment,
3446
- replies: comment.replies.map(
3447
- (reply, index) => index === comment.replies.length - 1 ? { ...reply, mentions } : reply
3448
- )
3449
- } : comment
3450
- ) : next;
3451
- return { slides: replaceCommentsOnSlide(slides, slideIndex, withMentions), didAdd: true };
3441
+ return { slides: replaceCommentsOnSlide(slides, slideIndex, next), didAdd: true };
3452
3442
  }
3453
3443
  function pruneSlideDrafts(drafts, slideIds) {
3454
3444
  const next = {};
@@ -3502,8 +3492,8 @@ function useCommentReplyHandlers(input) {
3502
3492
  if (!slide) {
3503
3493
  return;
3504
3494
  }
3505
- const replyText = String(replyDraftByCommentId[commentId] || "").trim();
3506
- if (replyText.length === 0) {
3495
+ const replyText = String(replyDraftByCommentId[commentId] || "");
3496
+ if (replyText.trim().length === 0) {
3507
3497
  return;
3508
3498
  }
3509
3499
  let didAdd = false;
@@ -3606,8 +3596,8 @@ function useComments({
3606
3596
  if (!slide) {
3607
3597
  return;
3608
3598
  }
3609
- const draft = String(commentDraftBySlideId[slide.id] || "").trim();
3610
- if (draft.length === 0) {
3599
+ const draft = String(commentDraftBySlideId[slide.id] || "");
3600
+ if (draft.trim().length === 0) {
3611
3601
  return;
3612
3602
  }
3613
3603
  let didAdd = false;
@@ -8478,6 +8468,7 @@ function useThemeSwitching(input) {
8478
8468
  // src/viewer/hooks/usePropertyHandlers.ts
8479
8469
  function usePropertyHandlers(input) {
8480
8470
  const {
8471
+ allowExternalImages,
8481
8472
  slides,
8482
8473
  activeSlideIndex,
8483
8474
  canvasSize,
@@ -8550,7 +8541,7 @@ function usePropertyHandlers(input) {
8550
8541
  try {
8551
8542
  const ab = await file.arrayBuffer();
8552
8543
  const h = new PptxHandler();
8553
- const other = await h.load(ab);
8544
+ const other = await h.load(ab, { allowExternalImages: allowExternalImages === true });
8554
8545
  if (!other) {
8555
8546
  return;
8556
8547
  }
@@ -8566,7 +8557,7 @@ function usePropertyHandlers(input) {
8566
8557
  }
8567
8558
  };
8568
8559
  fileInput.click();
8569
- }, [slides, canvasSize.width, canvasSize.height]);
8560
+ }, [slides, canvasSize.width, canvasSize.height, allowExternalImages]);
8570
8561
  const handleAcceptSlide = useCallback(
8571
8562
  (di) => {
8572
8563
  if (!compareResult) {
@@ -9996,6 +9987,7 @@ function useIOHandlers(input) {
9996
9987
  setContent,
9997
9988
  onPropertiesChange,
9998
9989
  onNotesUpdate,
9990
+ allowExternalImages,
9999
9991
  imageExportScale,
10000
9992
  imageResolutionScale
10001
9993
  } = input;
@@ -10063,7 +10055,8 @@ function useIOHandlers(input) {
10063
10055
  ops,
10064
10056
  history,
10065
10057
  onPropertiesChange,
10066
- onNotesUpdate
10058
+ onNotesUpdate,
10059
+ allowExternalImages
10067
10060
  });
10068
10061
  return { exportHandlers, printHandlers, themeHandlers, propertyHandlers };
10069
10062
  }
@@ -10771,6 +10764,7 @@ function useViewerIntegration(input) {
10771
10764
  setContent,
10772
10765
  onPropertiesChange,
10773
10766
  onNotesUpdate,
10767
+ allowExternalImages,
10774
10768
  imageExportScale,
10775
10769
  imageResolutionScale
10776
10770
  });
@@ -12583,7 +12577,7 @@ function useViewerBuildingBlocksCore(input) {
12583
12577
  fitPadding: input.fitPadding,
12584
12578
  maxFitScale: input.maxFitScale
12585
12579
  });
12586
- const { options: viewerOptions } = useViewerOptions();
12580
+ const { options: viewerOptions, optionsStore } = useViewerOptions();
12587
12581
  const { setIsDirty } = state;
12588
12582
  const markDocumentDirty = useCallback(() => {
12589
12583
  setIsDirty(true);
@@ -12673,7 +12667,8 @@ function useViewerBuildingBlocksCore(input) {
12673
12667
  // comment in `PowerPointViewer.tsx`.
12674
12668
  imageExportScale: 2 * resolveImageResolutionScale(viewerOptions),
12675
12669
  imageResolutionScale: resolveImageResolutionScale(viewerOptions),
12676
- viewerOptions
12670
+ viewerOptions,
12671
+ optionsStore
12677
12672
  };
12678
12673
  }
12679
12674
  function useCompatibilityToastsState() {
@@ -12804,7 +12799,18 @@ function useViewPreferencesSync(input) {
12804
12799
  // src/viewer/hooks/useViewerBuildingBlocksState.ts
12805
12800
  function useViewerBuildingBlocksState(input) {
12806
12801
  const { core, content, canEdit, filePath, autosaveEnabled, userName, handle, setContent } = input;
12807
- const { initialSlide, googleFonts } = input;
12802
+ const { initialSlide, googleFonts, allowExternalContent } = input;
12803
+ const externalContentLockedRef = useRef(false);
12804
+ const { optionsStore } = core;
12805
+ useLayoutEffect(() => {
12806
+ if (allowExternalContent === void 0 && !externalContentLockedRef.current) {
12807
+ return;
12808
+ }
12809
+ externalContentLockedRef.current = allowExternalContent !== void 0;
12810
+ optionsStore.setConstraints({
12811
+ locked: lockExternalContentSetting({}, allowExternalContent)
12812
+ });
12813
+ }, [optionsStore, allowExternalContent]);
12808
12814
  const {
12809
12815
  onContentChange,
12810
12816
  onDirtyChange,
@@ -12908,7 +12914,7 @@ function useViewerBuildingBlocksState(input) {
12908
12914
  // Trust Center > "Allow external content": same gate `PowerPointViewer`
12909
12915
  // applies, so the headless building-blocks API loads http(s) images
12910
12916
  // under the same default-off, core-side SSRF/privacy guard.
12911
- allowExternalImages: viewerOptions.trust.allowExternalContent,
12917
+ allowExternalImages: resolveAllowExternalContent(allowExternalContent, viewerOptions),
12912
12918
  setReadOnlyRecommendation: readOnlyRec.setRecommendation,
12913
12919
  setModifyVerifier: readOnlyRec.setModifyVerifier,
12914
12920
  canInsertElement: !readOnlyRec.locked && !viewerOptions.trust.openInProtectedView,
@@ -12970,6 +12976,7 @@ function useViewerBuildingBlocks(input) {
12970
12976
  fileName,
12971
12977
  initialSlide,
12972
12978
  googleFonts,
12979
+ allowExternalContent,
12973
12980
  autosaveEnabled = true,
12974
12981
  userName,
12975
12982
  hiddenActions,
@@ -13059,6 +13066,7 @@ function useViewerBuildingBlocks(input) {
13059
13066
  filePath,
13060
13067
  initialSlide,
13061
13068
  googleFonts,
13069
+ allowExternalContent,
13062
13070
  autosaveEnabled,
13063
13071
  userName,
13064
13072
  handle,
Binary file
Binary file
@@ -1,6 +1,6 @@
1
- import { StaticElementRenderer, useModalDismissDrag, useToolbarVisibility, useViewerOptionsContext, InlineCollaborationContext, SlideBackgroundImageLayer, ElementRenderer, withDisplayName, useCollaboration, ResizeHandles, imgSrc, renderStrokeView, useChartFormatContext, useViewerOptions, useReadOnlyRecommendationState, useCompatibilityToastsState, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useClearSelectionOnSlideChange, useEditorOperations, useViewerIntegration, useViewPreferencesSync, useLayoutSwitching, Rendering3DFlagsContext, CollaborationProvider, ChartFormatContext, useSheetDismissDrag, playAnimationSound, ViewerOptionsStoreContext, safePrompt, useController, scopeLayoutOptionsToActiveSlide, createReviewCommentsHost, ChartPartSelectionProvider, useKeyboardInsets, ViewerOptionsContext, useReportOnChange, useCollaborationDocumentSync, useFollowMode, useBroadcastFollower, useVirtualizedSlides, useSwipeNavigation, PresentationTransitionOverlay, RemoteSelectionOverlay, CollaborationCursorOverlay, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, downloadBlob, useChartPartSelection, resolveSmartArtDataPalette, DUOTONE_PRESETS, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES } from './chunk-6436YER5.mjs';
1
+ import { StaticElementRenderer, useModalDismissDrag, useToolbarVisibility, useViewerOptionsContext, InlineCollaborationContext, SlideBackgroundImageLayer, ElementRenderer, withDisplayName, useCollaboration, ResizeHandles, imgSrc, renderStrokeView, useChartFormatContext, useViewerOptions, useReadOnlyRecommendationState, useCompatibilityToastsState, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useClearSelectionOnSlideChange, useEditorOperations, useViewerIntegration, useViewPreferencesSync, useLayoutSwitching, Rendering3DFlagsContext, CollaborationProvider, ChartFormatContext, useSheetDismissDrag, playAnimationSound, ViewerOptionsStoreContext, safePrompt, useController, scopeLayoutOptionsToActiveSlide, createReviewCommentsHost, ChartPartSelectionProvider, useKeyboardInsets, ViewerOptionsContext, useReportOnChange, useCollaborationDocumentSync, useFollowMode, useBroadcastFollower, useVirtualizedSlides, useSwipeNavigation, PresentationTransitionOverlay, RemoteSelectionOverlay, CollaborationCursorOverlay, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, downloadBlob, useChartPartSelection, resolveSmartArtDataPalette, DUOTONE_PRESETS, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES } from './chunk-QCNVTNVV.mjs';
2
2
  import { useTranslation, cn, getShapeAdjustmentHandleDescriptors, isConnectorOrLineElement, PptxI18nContext, TOOLBAR_SECTIONS, GRID_SIZE, getElementTransformWithoutRotation, getElementTransform, MIN_ELEMENT_SIZE, ViewerLocaleControlsContext, hasCopyableFormat, ViewerI18nContext, useHostI18next, DEFAULT_SECTION_GROUP_ID, safeOpenUrl, isPpactionUrl, parsePpactionUrl, SHORTCUT_REFERENCE_ITEMS, isUrlSafe, computeHandoutLayout, getPrintableArea, generateNoteLineCount, normalizeHexColor, UNGROUPED_SECTION_ID, SLIDE_NAV_THUMBNAIL_WIDTH, SLIDE_TRANSITION_OPTIONS, getElementLabel, TABLE_STYLE_PRESETS, SHAPE_PRESETS, sanitizeGradientStops, formatCommentTimestamp, ANIMATION_PRESET_OPTIONS, clampCropValue, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, DEFAULT_FILL_COLOR, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, getPatternSvg, DEFAULT_STROKE_COLOR, openNativeEyeDropper } from './chunk-ID37Y3HG.mjs';
3
- import { ANIMATION_DIRECTION_LABEL_KEYS, buildQuickStylesGallery, buildSlideTemplateContent, SLIDE_TEMPLATES, homeLaunchers, attachRibbonOverflow, isPanelVisible, parentSelection, slideSpaceElement, isGroupMember, motionPathFor, setMotionPath, RULER_THICKNESS, shouldShowElementHandles, deviceStrokeStageStyle, activateModalFocus, visibleContextualTabs, resolveActiveRibbonTab, visibleRibbonAddIns, isDialogAvailable, resolveScreenTip, RIBBON_ADD_IN_TAB_ATTR, contextualTabLabelKey, RIBBON_CONTEXTUAL_TAB_ATTR, buildTabRowActionsState, isFeatureEnabled, TAB_ROW_ACTION_CLASSES, tabRowActionsAttributes, buildTitleBarState, backstageNavEntries, BACKSTAGE_NAV, listBackstageRecentFiles, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, DEFAULT_INSERT_CHART_KIND, FREEFORM_TOOL_IDS, isDrawingToolVisible, textFontSizePtToPx, withHomeGalleries, drawingHomeControls, homeGalleryControls, homeGalleryApply, shapeOutlineChange, shapeFillChange, editingHomeControls, arrangeHomeControls, arrangePainterHomeControls, arrangeAlignAction, DESIGN_RIBBON_GROUPS, FIXED_TAB_GALLERIES, DESIGN_RIBBON_COMMANDS, designCommandState, CONTEXTUAL_TAB_GROUPS, attachEditorImagePaste, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, resolveElementInteractivity, buildChartQuickActionsDescriptor, applyChartElementToggle, CHART_QUICK_ACTION_BUTTON_SIZE, applyChartStylePreset, hideChartSeries, restoreFilteredSeries, buildCropOverlay, CROP_HANDLE_ARIA_KEY, getActiveXControlOverlayView, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, canEditElementPoints, getSlideBackgroundStyle, EMPTY_RESOLVED_CUSTOMIZATION, getRegionRenderer, ViewerRegionHost, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, customizeBackstageCards, backstageCardsFor, DEFAULT_VIEWER_PROFILE, readStoredViewerPrefs, resolveProfileInitial, AVATAR_COLOR_SWATCHES, clipboardHomeControls, slidesHomeControls, resolveInsertSlideLayout, resolveDefaultFontFamily, textFontSizePxToPt, getInlineEditorSelectionResult, selectedParagraphBulletKind, elementBulletKind, selectionBulletKind, fontPickerHomeControls, fontHomeControls, nextToggleValue, RIBBON_GROUP_ATTR, paragraphHomeAlign, paragraphHomeControls, paragraphHomeAction, arrangeShapeHomeControls, strokeWidthOf, canSetStrokeWidth, canUngroupSelection, canGroupSelection, buildRibbonGallery, readRibbonTransitionDraft, SLIDE_SHOW_COMMAND_GROUPS, buildRecordRibbon, trackActiveComment, commentCounts, findCommentLocation, buildReviewRibbon, buildHelpRibbon, galleryTextLabel, pictureSizeHomeControls, chartSelectionHomeControls, dispatchChartSelectionRequest, buildFreeformShapeElement, buildLiveInkStrokeView, beginCropDrag, CONNECTOR_SITE_SNAP_PX, resolveConnectorEndpointUpdate, withConnectorEndpointUpdate, getShapeConnectionSites, FreeformToolSession, attachOverlayKeyboard, EditPointsSession, EDIT_POINTS_STYLE, resolveCollaborationConfig, resolveViewerRootOptions, buildUserFontFaceStyles, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, isEditingAllowed, resolveAutosaveActivation, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, attachViewerHyperlinks, shouldConfirmExternalHyperlink, applyAutoCorrect, resolveImageResolutionScale, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, saveFailureMessage, withSaveFailureToast, createSlidePackageClipboard, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, RIBBON_SCOPE_ATTR, resolve3DRenderingFlags, resolveSlideSizeSelection, MIN_TOUCH_TARGET_PX, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, getSelectionTextStyleFlags, TEXT_DECORATION_FLAGS, dispatchCropRequest, applyRibbonGalleryItem, ribbonTransitionsDraftPatch, ribbonTransitionUpdates, ribbonTransitionsSoundChange, ribbonTransitionStockSoundUrl, playSlideTransitionPreview, playAnimationRibbonPreview, SLIDE_SHOW_OPTIONS, createViewerOptionsStore, subtitleSettingsFromOptions, subtitleSettingsLabels, isReviewCommentCommand, runReviewCommentCommand, hasTiltData, RULER_FONT_SIZE, toElementAxes, dragCropHandle, panCropImage, clientToSlidePoint, EDIT_POINTS_TARGET_ATTR, themeToCssVars, createCustomizationController, resolveEffectiveHiddenActions, pruneExpiredAutosaveSnapshots, createDeckStyleHost, galleryDeckView, tableLayoutCells, commitsThroughDeckStyle, resetChartFormatTarget, masterViewCrudActions, applyMasterViewCrudAction, masterViewCrudFailureKey, forgetStepsUsingRemovedParts, EDITOR_CHROME_CSS, ribbonCustomizationCss, applyMotionPathPreset, resetSlideLayoutPath, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, shouldDiscardAutosaveOnSuccessfulSave, deleteAutosaveSnapshot, dispatchReadOnlyBannerIntent, readOnlyBannerState, buildFieldSubstitutionContext, setMasterViewBackgroundColor, canUseClipboard, runProgramNoticeStackStyle, observeElementHeight, printPropertiesFrameSlides, printPropertiesSlidesPerPage, PASTE_SPECIAL_OPTIONS, findCanvasElementNode, isHeaderFooterDateTextVisible, isHeaderFooterHeaderTextVisible, isHeaderFooterFooterTextVisible, getDensePanelTouchTargetPx, shouldStickyActionRow, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, computeAnchoredPopupPosition, updateSubtitleSettings, overlayPointerInput, pushRecentColor, mruColorsPatch, shouldClearAutosaveCacheOnClose, clearAutosaveSnapshots, canCropElement, cropSessionChanged, cancelCropUpdate, startCropSession, editorThumbnailWidth, EDITOR_THUMBNAIL_WIDTH, masterViewBackgroundColor, resolvePresentationAction, isPresentationAdvanceClick, toggleBlackboard, visibleTemplateElements, PRESENT_TOOLBAR_CLASSES, resolveEditPointsAvailability, isCurrentLayout, EXPANDED_MAX_HEIGHT, statusBarState, statusBarViewMode, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, resolveDefaultPrintSettings, HANDOUT_OPTIONS, effectiveOrientation, computeSlideCount, estimatePageCount, computeSlideIndices, bindPptxOptionsDialog, optionsBlockSlot, optionsPaneSlot, DEFAULT_QUICK_ACCESS_COMMAND_IDS, AI_OPTIONS_CATEGORY, buildCollaborationShareUrl, buildActiveSessionUsers, slideClipboardLabels, sorterPasteInsertAt, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, SORTER_MAX_ZOOM, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, listenForOutlineViewDismiss, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, createCollaborationStateReporter, buildCollaborationState, writeBackReport, cropModeKeyAction, editorThumbnailStep, resolveSlidePaneClick, SLIDE_VIRTUALIZATION_THRESHOLD, buildSectionContextMenuEntries, buildSlidePaneContextMenuEntries, slidePaneViewItems, isEditPointsEnabled, findReplacementAvailability, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, buildStrokePathD, cursorForTool, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, PRESENTER_NAVIGATOR_LABEL_KEYS, getPresentationContextMenuSections, CONTEXT_MENU_PRESENTATION_LAYER, presentationViewItems, subtitleRecognitionLanguage, getSpeechRecognitionCtor, mergeCaptionResults, customizeContextMenuEntries, buildContextMenuEntries, contextMenuViewItems, customizeCanvasContextMenuEntries, buildCanvasContextMenuEntries, buildLayoutPreviewGeometry, scaleSlidesForSizeChange, slideSizeToCanvasPx, resolveSelectionPaneRename, themeEditorLabels, resolveNotesSegments, defaultRichEnabled, segmentsToEditorHtml, DEBOUNCE_MS, createPlainNotesSegments, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX as INDENT_PX$1, buildNotesPrintHtml, dispatchStatusBarIntent, toggleSheet, describeElementChange, sanitizeMathMl, compileEquationTemplateMathMl, computeAllNotesPages, getNotesPrintableArea, CUSTOM_FONT_ACCEPT, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, resolveViewerAddinRows, createSlideSorterState, sorterSelectionIndexes, selectSorterSlide, applySorterAction, sorterGridColumns, sorterMenuContext, buildSlideSorterContextMenuEntries, slideSorterContextMenuLabel, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, presenterConsoleAction, presenterConsoleViewState, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, sectionAddAfterSlideIndex, masterViewPseudoSlide, PRESENTATION_ANIM_TRIGGER_ATTRIBUTE, applyTableStyleDelete, applyTableStyleMapChange, registerCustomFont, QUICK_ACCESS_COMMAND_CATALOG, handleReadingViewKey, editorThumbnailHeight, buildPreviewElements, deriveSlideFieldContext, hiddenSlideCue, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, MERGE_SHAPES_MENU_ITEMS, hasMultipleSelectedTableCells, isElementLocked, ELEMENT_GEOMETRY_SECTIONS, mergeSlideTransition, slideBackgroundClearState, slideBackgroundClearPatch, effectiveDirection, TRIGGER_OPTIONS, effectiveTimingCurve, getAfterAnimationState, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, elementLockTogglePatch, resolveInspectorSections, inspectorTogglePatch, buildTableDataGrid, getDenseGridLayoutPlan, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, applyTableStylePreset, tableStyleAssignmentUpdate, evenColumnWidths, redistributeColumnWidth, evenRowHeights, inspectorNumber, patchChartData, collapseChartTitleRunsForEdit, chartGridlinesState, chartGridlinesPatch, seriesSecondaryAxisPatch, setDataLabelsRangeCache, imageResetPatch, imageResetState, canInteractWithElement, buildOleObjectNamePatch, strokeColorChange, shouldShowAccessibilitySection, withFrameSlides, withSlidesPerPage, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, SLIDE_SIZE_PRESETS, TRANSITION_ORIENTATION_TYPES, clampTransitionNumber, TRANSITION_SPEED_OPTIONS, TRANSITION_MORPH_OPTIONS, flattenTagCollections, resolveTemplateBackgroundRows, commentMentionQuery, matchCommentMentionAuthors, buildAnimationTimelineRows, clearMotionPath, setTrigger, setTriggerBookmark, getEffectSoundState, setEffectSound, setEffectStockSound, setAfterAnimation, setAfterAnimationColor, directionValuesFor, buildAnimationTimelineBars, motionPathPresetIdForPath, MOTION_PATH_FAMILIES, motionPathPresetsByFamily, motionPathPresetLabelKey, motionPathFamilyLabelKey, EFFECT_SOUND_CATALOGUE, listMediaBookmarkOptions, selectedBookmarkOptionValue, inspectorFieldPatch, describeTableStyleEditor, TABLE_STYLE_EDITOR_PARTS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, resolveDisplayedChartType, CHART_TYPE_OPTIONS, chartDataLabelsTogglePatch, BAR3D_SHAPE_OPTIONS, bar3DShapePatch, RADAR_STYLE_OPTIONS, radarStylePatch, SURFACE_WIREFRAME_OPTIONS, surfaceWireframePatch, isSeriesUsingSecondaryAxis, seriesColorClearState, listChartUserShapeRows, withChartUserShapeAdded, createDefaultChartUserShape, withChartUserShapeRowRemoved, withChartUserShapeRowTextUpdated, rebuildDrawingShapesIfCleared, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, cropResetState, cropResetPatch, ARTISTIC_EFFECTS, mediaTrimEndSeconds, trimmedMediaDurationMs, mediaTrimEndAbsoluteMs, mediaTrimResetState, mediaTrimEndMsFromAbsoluteMs, mediaTrimResetPatch, buildOleEditDialogDescriptor, buildOleContentUpdatePatch, applyTextStyleUpdate, buildThemeColorSwatchGrid, themeColorGridView, recentColorsGridView, getNonVisualDescriptionFields, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, canCommitActionType, slideSizeFromPreset, withSlideSizeOrientation, TRANSITION_DIR_ARROWS, buildDirectionGrid, updateTagInCollections, deleteTagFromCollections, addTagToCollections, commentTextSegments, COMMENT_MENTION_CLASS, COMMENT_MENTION_ATTRIBUTE, insertCommentMention, reorderAnimationTimelineRows, applyAnimationTimelineOrder, getEffectSoundAsset, animationEffectLabel, TABLE_STYLE_BORDER_SIDES, applyTableStyleFieldEdit, withCellStyle, LBL as LBL$1, SEL as SEL$1, FILL_MODE_OPTIONS as FILL_MODE_OPTIONS$1, SECTION_HEADING, NUM as NUM$1, getChartUserShapeGroupTransform, withChartUserShapeGroupChildAdded, createDefaultChartUserShapeGroupChild, withChartUserShapeRowUpdated, getChartUserShapeRowChartBox, withChartUserShapeRowFlipUpdated, withChartUserShapeRowRotationUpdated, withChartUserShapeRowChartBoxUpdated, smartArtLayoutSwitchPatch, mediaTrimEndMsFromSeconds, validateMediaTrimRange, OFFICE_COLOR_SWATCHES, officeColorSwatchLabel, PATTERN_PRESET_OPTIONS as PATTERN_PRESET_OPTIONS$1, SHAPE_LINE_SECTIONS, shapeQuickStylePatch, SHAPE_EFFECT_SECTIONS, createLiveColorInput, themeColorGridCommit, TEXT_BOX_SECTIONS, buildTextWarpGallery, TEXT_WARP_PRESETS, text3dPtToEmu, text3dEmuToPt, MATERIAL_PRESETS, toSlideIndex, TABLE_STYLE_BORDER_SIDE_LABEL_KEYS, TABLE_STYLE_DASH_PRESETS, GRADIENT_TYPE_OPTIONS as GRADIENT_TYPE_OPTIONS$1, PATTERN_OPTIONS, FILL_PATTERN_LABEL_KEYS, quickStyleShapeStyle, textWarpStyle, toggleText3dExtrusion, BEVEL_PRESETS, cropFit, cropFill, cropToAspectRatio } from 'ooxml-ui/pptx';
3
+ import { ANIMATION_DIRECTION_LABEL_KEYS, buildQuickStylesGallery, buildSlideTemplateContent, SLIDE_TEMPLATES, homeLaunchers, attachRibbonOverflow, isPanelVisible, parentSelection, slideSpaceElement, isGroupMember, motionPathFor, setMotionPath, RULER_THICKNESS, shouldShowElementHandles, deviceStrokeStageStyle, activateModalFocus, visibleContextualTabs, resolveActiveRibbonTab, visibleRibbonAddIns, isDialogAvailable, resolveScreenTip, RIBBON_ADD_IN_TAB_ATTR, contextualTabLabelKey, RIBBON_CONTEXTUAL_TAB_ATTR, buildTabRowActionsState, isFeatureEnabled, TAB_ROW_ACTION_CLASSES, tabRowActionsAttributes, buildTitleBarState, backstageNavEntries, BACKSTAGE_NAV, listBackstageRecentFiles, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, DEFAULT_INSERT_CHART_KIND, FREEFORM_TOOL_IDS, isDrawingToolVisible, textFontSizePtToPx, withHomeGalleries, drawingHomeControls, homeGalleryControls, homeGalleryApply, shapeOutlineChange, shapeFillChange, editingHomeControls, arrangeHomeControls, arrangePainterHomeControls, arrangeAlignAction, DESIGN_RIBBON_GROUPS, FIXED_TAB_GALLERIES, DESIGN_RIBBON_COMMANDS, designCommandState, CONTEXTUAL_TAB_GROUPS, attachEditorImagePaste, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, resolveElementInteractivity, buildChartQuickActionsDescriptor, applyChartElementToggle, CHART_QUICK_ACTION_BUTTON_SIZE, applyChartStylePreset, hideChartSeries, restoreFilteredSeries, buildCropOverlay, CROP_HANDLE_ARIA_KEY, getActiveXControlOverlayView, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, canEditElementPoints, getSlideBackgroundStyle, EMPTY_RESOLVED_CUSTOMIZATION, getRegionRenderer, ViewerRegionHost, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, customizeBackstageCards, backstageCardsFor, DEFAULT_VIEWER_PROFILE, readStoredViewerPrefs, resolveProfileInitial, AVATAR_COLOR_SWATCHES, clipboardHomeControls, slidesHomeControls, resolveInsertSlideLayout, resolveDefaultFontFamily, textFontSizePxToPt, getInlineEditorSelectionResult, selectedParagraphBulletKind, elementBulletKind, selectionBulletKind, fontPickerHomeControls, fontHomeControls, nextToggleValue, RIBBON_GROUP_ATTR, paragraphHomeAlign, paragraphHomeControls, paragraphHomeAction, arrangeShapeHomeControls, strokeWidthOf, canSetStrokeWidth, canUngroupSelection, canGroupSelection, buildRibbonGallery, readRibbonTransitionDraft, SLIDE_SHOW_COMMAND_GROUPS, buildRecordRibbon, trackActiveComment, commentCounts, findCommentLocation, buildReviewRibbon, buildHelpRibbon, galleryTextLabel, pictureSizeHomeControls, chartSelectionHomeControls, dispatchChartSelectionRequest, buildFreeformShapeElement, buildLiveInkStrokeView, beginCropDrag, CONNECTOR_SITE_SNAP_PX, resolveConnectorEndpointUpdate, withConnectorEndpointUpdate, getShapeConnectionSites, FreeformToolSession, attachOverlayKeyboard, EditPointsSession, EDIT_POINTS_STYLE, resolveCollaborationConfig, resolveViewerRootOptions, buildUserFontFaceStyles, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, isEditingAllowed, resolveAutosaveActivation, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, attachViewerHyperlinks, shouldConfirmExternalHyperlink, applyAutoCorrect, resolveImageResolutionScale, resolveAllowExternalContent, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, saveFailureMessage, withSaveFailureToast, createSlidePackageClipboard, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, RIBBON_SCOPE_ATTR, resolve3DRenderingFlags, resolveSlideSizeSelection, MIN_TOUCH_TARGET_PX, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, getSelectionTextStyleFlags, TEXT_DECORATION_FLAGS, dispatchCropRequest, applyRibbonGalleryItem, ribbonTransitionsDraftPatch, ribbonTransitionUpdates, ribbonTransitionsSoundChange, ribbonTransitionStockSoundUrl, playSlideTransitionPreview, playAnimationRibbonPreview, SLIDE_SHOW_OPTIONS, createViewerOptionsStore, subtitleSettingsFromOptions, subtitleSettingsLabels, isReviewCommentCommand, runReviewCommentCommand, hasTiltData, RULER_FONT_SIZE, toElementAxes, dragCropHandle, panCropImage, clientToSlidePoint, EDIT_POINTS_TARGET_ATTR, themeToCssVars, createCustomizationController, resolveEffectiveHiddenActions, pruneExpiredAutosaveSnapshots, createDeckStyleHost, galleryDeckView, tableLayoutCells, commitsThroughDeckStyle, resetChartFormatTarget, masterViewCrudActions, applyMasterViewCrudAction, masterViewCrudFailureKey, forgetStepsUsingRemovedParts, EDITOR_CHROME_CSS, ribbonCustomizationCss, applyMotionPathPreset, resetSlideLayoutPath, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, shouldDiscardAutosaveOnSuccessfulSave, deleteAutosaveSnapshot, dispatchReadOnlyBannerIntent, readOnlyBannerState, buildFieldSubstitutionContext, setMasterViewBackgroundColor, canUseClipboard, runProgramNoticeStackStyle, observeElementHeight, printPropertiesFrameSlides, printPropertiesSlidesPerPage, PASTE_SPECIAL_OPTIONS, findCanvasElementNode, isHeaderFooterDateTextVisible, isHeaderFooterHeaderTextVisible, isHeaderFooterFooterTextVisible, getDensePanelTouchTargetPx, shouldStickyActionRow, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, computeAnchoredPopupPosition, updateSubtitleSettings, overlayPointerInput, pushRecentColor, mruColorsPatch, shouldClearAutosaveCacheOnClose, clearAutosaveSnapshots, canCropElement, cropSessionChanged, cancelCropUpdate, startCropSession, editorThumbnailWidth, EDITOR_THUMBNAIL_WIDTH, masterViewBackgroundColor, resolvePresentationAction, isPresentationAdvanceClick, toggleBlackboard, visibleTemplateElements, PRESENT_TOOLBAR_CLASSES, resolveEditPointsAvailability, isCurrentLayout, EXPANDED_MAX_HEIGHT, statusBarState, statusBarViewMode, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, resolveDefaultPrintSettings, HANDOUT_OPTIONS, effectiveOrientation, computeSlideCount, estimatePageCount, computeSlideIndices, bindPptxOptionsDialog, optionsBlockSlot, optionsPaneSlot, DEFAULT_QUICK_ACCESS_COMMAND_IDS, AI_OPTIONS_CATEGORY, buildCollaborationShareUrl, buildActiveSessionUsers, slideClipboardLabels, sorterPasteInsertAt, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, SORTER_MAX_ZOOM, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, listenForOutlineViewDismiss, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, createCollaborationStateReporter, buildCollaborationState, writeBackReport, cropModeKeyAction, editorThumbnailStep, resolveSlidePaneClick, SLIDE_VIRTUALIZATION_THRESHOLD, buildSectionContextMenuEntries, buildSlidePaneContextMenuEntries, slidePaneViewItems, isEditPointsEnabled, findReplacementAvailability, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, buildStrokePathD, cursorForTool, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, PRESENTER_NAVIGATOR_LABEL_KEYS, getPresentationContextMenuSections, CONTEXT_MENU_PRESENTATION_LAYER, presentationViewItems, subtitleRecognitionLanguage, getSpeechRecognitionCtor, mergeCaptionResults, customizeContextMenuEntries, buildContextMenuEntries, contextMenuViewItems, customizeCanvasContextMenuEntries, buildCanvasContextMenuEntries, buildLayoutPreviewGeometry, scaleSlidesForSizeChange, slideSizeToCanvasPx, resolveSelectionPaneRename, themeEditorLabels, resolveNotesSegments, defaultRichEnabled, segmentsToEditorHtml, DEBOUNCE_MS, createPlainNotesSegments, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX as INDENT_PX$1, buildNotesPrintHtml, dispatchStatusBarIntent, toggleSheet, describeElementChange, sanitizeMathMl, compileEquationTemplateMathMl, computeAllNotesPages, getNotesPrintableArea, CUSTOM_FONT_ACCEPT, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, resolveViewerAddinRows, createSlideSorterState, sorterSelectionIndexes, selectSorterSlide, applySorterAction, sorterGridColumns, sorterMenuContext, buildSlideSorterContextMenuEntries, slideSorterContextMenuLabel, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, presenterConsoleAction, presenterConsoleViewState, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, sectionAddAfterSlideIndex, masterViewPseudoSlide, PRESENTATION_ANIM_TRIGGER_ATTRIBUTE, applyTableStyleDelete, applyTableStyleMapChange, registerCustomFont, QUICK_ACCESS_COMMAND_CATALOG, handleReadingViewKey, editorThumbnailHeight, buildPreviewElements, deriveSlideFieldContext, hiddenSlideCue, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, MERGE_SHAPES_MENU_ITEMS, hasMultipleSelectedTableCells, isElementLocked, ELEMENT_GEOMETRY_SECTIONS, mergeSlideTransition, slideBackgroundClearState, slideBackgroundClearPatch, effectiveDirection, TRIGGER_OPTIONS, effectiveTimingCurve, getAfterAnimationState, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, elementLockTogglePatch, resolveInspectorSections, inspectorTogglePatch, buildTableDataGrid, getDenseGridLayoutPlan, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, applyTableStylePreset, tableStyleAssignmentUpdate, evenColumnWidths, redistributeColumnWidth, evenRowHeights, inspectorNumber, patchChartData, collapseChartTitleRunsForEdit, chartGridlinesState, chartGridlinesPatch, seriesSecondaryAxisPatch, setDataLabelsRangeCache, imageResetPatch, imageResetState, canInteractWithElement, buildOleObjectNamePatch, strokeColorChange, shouldShowAccessibilitySection, withFrameSlides, withSlidesPerPage, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, SLIDE_SIZE_PRESETS, TRANSITION_ORIENTATION_TYPES, clampTransitionNumber, TRANSITION_SPEED_OPTIONS, TRANSITION_MORPH_OPTIONS, flattenTagCollections, resolveTemplateBackgroundRows, commentMentionQuery, matchCommentMentionAuthors, buildAnimationTimelineRows, clearMotionPath, setTrigger, setTriggerBookmark, getEffectSoundState, setEffectSound, setEffectStockSound, setAfterAnimation, setAfterAnimationColor, directionValuesFor, buildAnimationTimelineBars, motionPathPresetIdForPath, MOTION_PATH_FAMILIES, motionPathPresetsByFamily, motionPathPresetLabelKey, motionPathFamilyLabelKey, EFFECT_SOUND_CATALOGUE, listMediaBookmarkOptions, selectedBookmarkOptionValue, inspectorFieldPatch, describeTableStyleEditor, TABLE_STYLE_EDITOR_PARTS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, resolveDisplayedChartType, CHART_TYPE_OPTIONS, chartDataLabelsTogglePatch, BAR3D_SHAPE_OPTIONS, bar3DShapePatch, RADAR_STYLE_OPTIONS, radarStylePatch, SURFACE_WIREFRAME_OPTIONS, surfaceWireframePatch, isSeriesUsingSecondaryAxis, seriesColorClearState, listChartUserShapeRows, withChartUserShapeAdded, createDefaultChartUserShape, withChartUserShapeRowRemoved, withChartUserShapeRowTextUpdated, rebuildDrawingShapesIfCleared, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, cropResetState, cropResetPatch, ARTISTIC_EFFECTS, mediaTrimEndSeconds, trimmedMediaDurationMs, mediaTrimEndAbsoluteMs, mediaTrimResetState, mediaTrimEndMsFromAbsoluteMs, mediaTrimResetPatch, buildOleEditDialogDescriptor, buildOleContentUpdatePatch, applyTextStyleUpdate, buildThemeColorSwatchGrid, themeColorGridView, recentColorsGridView, getNonVisualDescriptionFields, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, canCommitActionType, slideSizeFromPreset, withSlideSizeOrientation, TRANSITION_DIR_ARROWS, buildDirectionGrid, updateTagInCollections, deleteTagFromCollections, addTagToCollections, commentTextSegments, COMMENT_MENTION_CLASS, COMMENT_MENTION_ATTRIBUTE, insertCommentMention, reorderAnimationTimelineRows, applyAnimationTimelineOrder, getEffectSoundAsset, animationEffectLabel, TABLE_STYLE_BORDER_SIDES, applyTableStyleFieldEdit, withCellStyle, LBL as LBL$1, SEL as SEL$1, FILL_MODE_OPTIONS as FILL_MODE_OPTIONS$1, SECTION_HEADING, NUM as NUM$1, getChartUserShapeGroupTransform, withChartUserShapeGroupChildAdded, createDefaultChartUserShapeGroupChild, withChartUserShapeRowUpdated, getChartUserShapeRowChartBox, withChartUserShapeRowFlipUpdated, withChartUserShapeRowRotationUpdated, withChartUserShapeRowChartBoxUpdated, smartArtLayoutSwitchPatch, mediaTrimEndMsFromSeconds, validateMediaTrimRange, OFFICE_COLOR_SWATCHES, officeColorSwatchLabel, PATTERN_PRESET_OPTIONS as PATTERN_PRESET_OPTIONS$1, SHAPE_LINE_SECTIONS, shapeQuickStylePatch, SHAPE_EFFECT_SECTIONS, createLiveColorInput, themeColorGridCommit, TEXT_BOX_SECTIONS, buildTextWarpGallery, TEXT_WARP_PRESETS, text3dPtToEmu, text3dEmuToPt, MATERIAL_PRESETS, toSlideIndex, TABLE_STYLE_BORDER_SIDE_LABEL_KEYS, TABLE_STYLE_DASH_PRESETS, GRADIENT_TYPE_OPTIONS as GRADIENT_TYPE_OPTIONS$1, PATTERN_OPTIONS, FILL_PATTERN_LABEL_KEYS, quickStyleShapeStyle, textWarpStyle, toggleText3dExtrusion, BEVEL_PRESETS, cropFit, cropFill, cropToAspectRatio } from 'ooxml-ui/pptx';
4
4
  export { THEME_CATALOG, defaultCssVars, defaultRadius, defaultThemeColors, resolveThemeCatalogEntry, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius } from 'ooxml-ui/pptx';
5
5
  import React109, { createContext, useContext, useMemo, useState, useRef, useCallback, useEffect, useLayoutEffect, forwardRef, useSyncExternalStore, useReducer, Fragment as Fragment$1, useId, useDeferredValue, Suspense, lazy } from 'react';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -1678,7 +1678,7 @@ function AccountPage() {
1678
1678
  return void 0;
1679
1679
  });
1680
1680
  };
1681
- const version = "4.52.1" ;
1681
+ const version = "4.53.1" ;
1682
1682
  return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
1683
1683
  /* @__PURE__ */ jsxs("section", { className: cardClass, children: [
1684
1684
  /* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
@@ -33503,10 +33503,16 @@ function useShapeFormatCommands(input) {
33503
33503
  crop
33504
33504
  };
33505
33505
  }
33506
- function useViewerCustomization(customization, legacyHiddenActions, optionsStore) {
33506
+ function useViewerCustomization(customization, legacyHiddenActions, optionsStore, allowExternalContent) {
33507
33507
  const controllerRef = useRef(null);
33508
- controllerRef.current ??= createCustomizationController(customization);
33508
+ if (!controllerRef.current) {
33509
+ controllerRef.current = createCustomizationController(customization);
33510
+ controllerRef.current.setAllowExternalContent(allowExternalContent);
33511
+ }
33509
33512
  const controller = controllerRef.current;
33513
+ useLayoutEffect(() => {
33514
+ controller.setAllowExternalContent(allowExternalContent);
33515
+ }, [controller, allowExternalContent]);
33510
33516
  const appliedRef = useRef(customization);
33511
33517
  useLayoutEffect(() => {
33512
33518
  if (appliedRef.current === customization) {
@@ -33689,7 +33695,8 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
33689
33695
  ai,
33690
33696
  customization,
33691
33697
  initialSlide,
33692
- googleFonts
33698
+ googleFonts,
33699
+ allowExternalContent
33693
33700
  } = props;
33694
33701
  const hostCanEdit = canEditProp && !readOnly;
33695
33702
  const collaboration = resolveCollaborationConfig(collaborationInput);
@@ -33767,7 +33774,12 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
33767
33774
  [storage]
33768
33775
  );
33769
33776
  const { optionsStore, options: viewerOptions } = useViewerOptions();
33770
- const custom = useViewerCustomization(customization, legacyHiddenActions, optionsStore);
33777
+ const custom = useViewerCustomization(
33778
+ customization,
33779
+ legacyHiddenActions,
33780
+ optionsStore,
33781
+ allowExternalContent
33782
+ );
33771
33783
  const { resolved: customizationResolved, hiddenActions } = custom;
33772
33784
  const aiEnabled = Boolean(ai) && isFeatureEnabled(customizationResolved, "ai");
33773
33785
  const optionsAvailable = isDialogAvailable(customizationResolved, "options");
@@ -34227,7 +34239,7 @@ ${url}`)
34227
34239
  // Trust Center > "Allow external content": core defaults this to false
34228
34240
  // (SSRF/privacy-safe), so only an explicit `true` here lets remote
34229
34241
  // http(s) image sources actually load.
34230
- allowExternalImages: viewerOptions.trust.allowExternalContent,
34242
+ allowExternalImages: resolveAllowExternalContent(allowExternalContent, viewerOptions),
34231
34243
  initialSlide,
34232
34244
  googleFonts,
34233
34245
  setReadOnlyRecommendation: readOnlyRec.setRecommendation,
@@ -34279,7 +34291,7 @@ ${url}`)
34279
34291
  handler: handlerRef.current,
34280
34292
  slides: state.slides,
34281
34293
  templateElementsBySlideId: state.templateElementsBySlideId,
34282
- allowExternalImages: viewerOptions.trust.allowExternalContent,
34294
+ allowExternalImages: resolveAllowExternalContent(allowExternalContent, viewerOptions),
34283
34295
  editable: canEdit
34284
34296
  } : null,
34285
34297
  commit: (result) => {
Binary file
Binary file
package/dist/index.d.ts CHANGED
@@ -537,6 +537,16 @@ interface PowerPointViewerProps extends ViewportFitOptions {
537
537
  /** Initial inspector visibility; omitted preserves the desktop/mobile default. */
538
538
  inspectorInitiallyOpen?: boolean;
539
539
  customization?: ViewerCustomization;
540
+ /**
541
+ * Host switch for content a deck links from another server (http(s)
542
+ * relationship targets): pictures, picture fills and bullets, video, audio
543
+ * and poster frames. `false`: none of it is fetched. `true`: it is allowed.
544
+ * Either value locks File > Options > Trust Center > "Allow external
545
+ * content" to match; unset keeps the user's choice there. Google Fonts
546
+ * requests are separate (see `googleFonts`).
547
+ * A change applies from the next load.
548
+ */
549
+ allowExternalContent?: boolean;
540
550
  }
541
551
  interface PowerPointViewerHandle extends FileViewerHandle, PowerPointViewerAPI, ViewerCustomizationApi {
542
552
  getContent: () => Promise<Uint8Array>;
@@ -1076,6 +1086,12 @@ interface UseViewerBuildingBlocksInput extends ViewportFitOptions {
1076
1086
  initialSlide?: number;
1077
1087
  /** As `PowerPointViewer`'s `googleFonts`: the Google Fonts fallback policy (off, or a self-hosted mirror). */
1078
1088
  googleFonts?: GoogleFontsOption;
1089
+ /**
1090
+ * As `PowerPointViewer`'s `allowExternalContent`: `false` fetches no linked
1091
+ * http(s) content, `true` allows it, either value locks the Trust Center
1092
+ * setting; unset keeps the user's choice. A change applies from the next load.
1093
+ */
1094
+ allowExternalContent?: boolean;
1079
1095
  /** Whether the built-in autosave-to-localStorage recovery timer is active. Defaults to true. */
1080
1096
  autosaveEnabled?: boolean;
1081
1097
  /** Display name used as the author for comments. */