pptx-react-viewer 4.3.0 → 4.4.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.
Files changed (135) hide show
  1. package/CHANGELOG.md +106 -0
  2. package/dist/{AiChatPanel-UCEK3ZTD.mjs → AiChatPanel-QJHUDIWT.mjs} +4 -4
  3. package/dist/AiChatPanel-QJHUDIWT.mjs.br +0 -0
  4. package/dist/AiChatPanel-QJHUDIWT.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-7UQA25FA.js → AiChatPanel-UFMSTNCB.js} +28 -28
  6. package/dist/AiChatPanel-UFMSTNCB.js.br +0 -0
  7. package/dist/AiChatPanel-UFMSTNCB.js.gz +0 -0
  8. package/dist/{Model3DScene-AI2JTBQM.mjs → Model3DScene-3GOC5HUS.mjs} +1 -1
  9. package/dist/Model3DScene-3GOC5HUS.mjs.br +0 -0
  10. package/dist/Model3DScene-3GOC5HUS.mjs.gz +0 -0
  11. package/dist/{Model3DScene-X3DS3ELB.js → Model3DScene-KXNJBAQD.js} +2 -2
  12. package/dist/{Model3DScene-X3DS3ELB.js.br → Model3DScene-KXNJBAQD.js.br} +0 -0
  13. package/dist/Model3DScene-KXNJBAQD.js.gz +0 -0
  14. package/dist/{chunk-UTI4CLYJ.js → chunk-7WWINBGF.js} +1133 -418
  15. package/dist/chunk-7WWINBGF.js.br +0 -0
  16. package/dist/chunk-7WWINBGF.js.gz +0 -0
  17. package/dist/{chunk-42XEZVUQ.js → chunk-AI6K5EAE.js} +1261 -1077
  18. package/dist/chunk-AI6K5EAE.js.br +0 -0
  19. package/dist/chunk-AI6K5EAE.js.gz +0 -0
  20. package/dist/{chunk-KAO5USPE.js → chunk-CSY422LU.js} +5 -5
  21. package/dist/chunk-CSY422LU.js.br +0 -0
  22. package/dist/chunk-CSY422LU.js.gz +0 -0
  23. package/dist/{chunk-3UWJWJCR.mjs → chunk-D3TZOCQP.mjs} +1118 -419
  24. package/dist/chunk-D3TZOCQP.mjs.br +0 -0
  25. package/dist/chunk-D3TZOCQP.mjs.gz +0 -0
  26. package/dist/{chunk-W5KLLGVH.js → chunk-I4D6JQOI.js} +25 -0
  27. package/dist/chunk-I4D6JQOI.js.br +0 -0
  28. package/dist/chunk-I4D6JQOI.js.gz +0 -0
  29. package/dist/{chunk-OBQ453H6.mjs → chunk-JQXN6PO7.mjs} +25 -0
  30. package/dist/chunk-JQXN6PO7.mjs.br +0 -0
  31. package/dist/chunk-JQXN6PO7.mjs.gz +0 -0
  32. package/dist/{chunk-RXYLPESV.mjs → chunk-LUHUYBGW.mjs} +201 -17
  33. package/dist/chunk-LUHUYBGW.mjs.br +0 -0
  34. package/dist/chunk-LUHUYBGW.mjs.gz +0 -0
  35. package/dist/{chunk-E7O4HTS5.js → chunk-OWTHF5N4.js} +197 -183
  36. package/dist/chunk-OWTHF5N4.js.br +0 -0
  37. package/dist/chunk-OWTHF5N4.js.gz +0 -0
  38. package/dist/{chunk-SKTZSG7Q.mjs → chunk-WCHKDZP6.mjs} +305 -47
  39. package/dist/chunk-WCHKDZP6.mjs.br +0 -0
  40. package/dist/chunk-WCHKDZP6.mjs.gz +0 -0
  41. package/dist/{chunk-PLDG3CXW.mjs → chunk-WNFHFFYE.mjs} +16 -2
  42. package/dist/chunk-WNFHFFYE.mjs.br +0 -0
  43. package/dist/chunk-WNFHFFYE.mjs.gz +0 -0
  44. package/dist/{chunk-YQJOCGOK.mjs → chunk-XMKLY2SE.mjs} +1 -1
  45. package/dist/chunk-XMKLY2SE.mjs.br +0 -0
  46. package/dist/chunk-XMKLY2SE.mjs.gz +0 -0
  47. package/dist/{chunk-Y7LI2JIR.js → chunk-YJKR7Z3X.js} +1103 -845
  48. package/dist/chunk-YJKR7Z3X.js.br +0 -0
  49. package/dist/chunk-YJKR7Z3X.js.gz +0 -0
  50. package/dist/i18n/de.cjs +23 -0
  51. package/dist/i18n/de.cjs.br +0 -0
  52. package/dist/i18n/de.cjs.gz +0 -0
  53. package/dist/i18n/de.mjs +23 -0
  54. package/dist/i18n/de.mjs.br +0 -0
  55. package/dist/i18n/de.mjs.gz +0 -0
  56. package/dist/i18n/es.cjs +23 -0
  57. package/dist/i18n/es.cjs.br +0 -0
  58. package/dist/i18n/es.cjs.gz +0 -0
  59. package/dist/i18n/es.mjs +23 -0
  60. package/dist/i18n/es.mjs.br +0 -0
  61. package/dist/i18n/es.mjs.gz +0 -0
  62. package/dist/i18n/fr.cjs +23 -0
  63. package/dist/i18n/fr.cjs.br +0 -0
  64. package/dist/i18n/fr.cjs.gz +0 -0
  65. package/dist/i18n/fr.mjs +23 -0
  66. package/dist/i18n/fr.mjs.br +0 -0
  67. package/dist/i18n/fr.mjs.gz +0 -0
  68. package/dist/i18n/zh-CN.cjs +23 -0
  69. package/dist/i18n/zh-CN.cjs.br +0 -0
  70. package/dist/i18n/zh-CN.cjs.gz +0 -0
  71. package/dist/i18n/zh-CN.mjs +23 -0
  72. package/dist/i18n/zh-CN.mjs.br +0 -0
  73. package/dist/i18n/zh-CN.mjs.gz +0 -0
  74. package/dist/i18n.js +4 -4
  75. package/dist/i18n.js.br +0 -0
  76. package/dist/i18n.js.gz +0 -0
  77. package/dist/i18n.mjs +1 -1
  78. package/dist/i18n.mjs.br +0 -0
  79. package/dist/i18n.mjs.gz +0 -0
  80. package/dist/index.d.ts +71 -7
  81. package/dist/index.js +49 -49
  82. package/dist/index.js.br +0 -0
  83. package/dist/index.js.gz +0 -0
  84. package/dist/index.mjs +6 -6
  85. package/dist/index.mjs.br +0 -0
  86. package/dist/index.mjs.gz +0 -0
  87. package/dist/internals.d.ts +173 -43
  88. package/dist/internals.js +105 -105
  89. package/dist/internals.js.br +0 -0
  90. package/dist/internals.js.gz +0 -0
  91. package/dist/internals.mjs +4 -4
  92. package/dist/internals.mjs.br +0 -0
  93. package/dist/internals.mjs.gz +0 -0
  94. package/dist/pptx-viewer.css +1 -1
  95. package/dist/pptx-viewer.css.br +0 -0
  96. package/dist/pptx-viewer.css.gz +0 -0
  97. package/dist/viewer/index.d.ts +49 -7
  98. package/dist/viewer/index.js +27 -27
  99. package/dist/viewer/index.js.br +0 -0
  100. package/dist/viewer/index.js.gz +0 -0
  101. package/dist/viewer/index.mjs +6 -6
  102. package/dist/viewer/index.mjs.br +0 -0
  103. package/dist/viewer/index.mjs.gz +0 -0
  104. package/package.json +1 -1
  105. package/dist/AiChatPanel-7UQA25FA.js.br +0 -0
  106. package/dist/AiChatPanel-7UQA25FA.js.gz +0 -0
  107. package/dist/AiChatPanel-UCEK3ZTD.mjs.br +0 -0
  108. package/dist/AiChatPanel-UCEK3ZTD.mjs.gz +0 -0
  109. package/dist/Model3DScene-AI2JTBQM.mjs.br +0 -0
  110. package/dist/Model3DScene-AI2JTBQM.mjs.gz +0 -0
  111. package/dist/Model3DScene-X3DS3ELB.js.gz +0 -0
  112. package/dist/chunk-3UWJWJCR.mjs.br +0 -0
  113. package/dist/chunk-3UWJWJCR.mjs.gz +0 -0
  114. package/dist/chunk-42XEZVUQ.js.br +0 -0
  115. package/dist/chunk-42XEZVUQ.js.gz +0 -0
  116. package/dist/chunk-E7O4HTS5.js.br +0 -0
  117. package/dist/chunk-E7O4HTS5.js.gz +0 -0
  118. package/dist/chunk-KAO5USPE.js.br +0 -0
  119. package/dist/chunk-KAO5USPE.js.gz +0 -0
  120. package/dist/chunk-OBQ453H6.mjs.br +0 -0
  121. package/dist/chunk-OBQ453H6.mjs.gz +0 -0
  122. package/dist/chunk-PLDG3CXW.mjs.br +0 -0
  123. package/dist/chunk-PLDG3CXW.mjs.gz +0 -0
  124. package/dist/chunk-RXYLPESV.mjs.br +0 -0
  125. package/dist/chunk-RXYLPESV.mjs.gz +0 -0
  126. package/dist/chunk-SKTZSG7Q.mjs.br +0 -0
  127. package/dist/chunk-SKTZSG7Q.mjs.gz +0 -0
  128. package/dist/chunk-UTI4CLYJ.js.br +0 -0
  129. package/dist/chunk-UTI4CLYJ.js.gz +0 -0
  130. package/dist/chunk-W5KLLGVH.js.br +0 -0
  131. package/dist/chunk-W5KLLGVH.js.gz +0 -0
  132. package/dist/chunk-Y7LI2JIR.js.br +0 -0
  133. package/dist/chunk-Y7LI2JIR.js.gz +0 -0
  134. package/dist/chunk-YQJOCGOK.mjs.br +0 -0
  135. package/dist/chunk-YQJOCGOK.mjs.gz +0 -0
Binary file
Binary file
@@ -1,6 +1,6 @@
1
- import { DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, getImageSurfaceStyle, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, DEFAULT_FILL_COLOR, getCropShapeClipPath, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getImageSurfaceMaskStyle, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, MIN_ELEMENT_SIZE, buildTextBody3DSceneStyle, getImageTilingStyle, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, HYPERLINK_COLOR, cloneHistorySnapshot, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, buildPdfFromTiledImageData, GRID_SIZE, buildNotesPdf } from './chunk-PLDG3CXW.mjs';
2
- import { GlyphOutlineFontCache, createGlyphOutlineLookup, DEFAULT_VIEWER_OPTIONS, TOOLBAR_TABS, defineThreeViewElement, getSelectionControlArtworkStyle, hasShapeProperties, normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, hasTextProperties, getSelectionOutlineColor, connectorWrapperTransform, getAriaRoleDescription, getAriaLabel, getAriaRole, resolveElementInteractivity, isEditableTextElement, buildTextStyleOverrideCss, isElementRendered, resolveElementAriaAttributes, isMediaFullscreenActive, shouldRenderHitTarget, elementHitTargetStyle, getImageEffectsOpacity, getImageEffectsFilter, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, ACTION_BUTTON_PRESETS, mediaTransportVisible, isInkElement, getGroupChildParentFill, getElementLabel, getResizeHandleHitAreaStyle, paintedStrokeWidth, buildCssGradientFromShapeStyle, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, paintedElementSize, MEDIA_FULLSCREEN_OVERLAY_STYLE, elementContainerHeightStyle, getElementTransform, resolveElementHighlightClick, applyHighlightClickStyle, getComputedEffectStyle, getSoftEdgeSvgFilter, getEffectStyleSource, getBevelLightingSvgFilter, buildStrokeOutline, buildHollowHitOutline, buildSubpathFillOverlay, isImageLikeElement, strokeOutlineViewBox, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, buildSmartArtA11y, canDrillDown, computeSmartArtElementLayout, flattenNodes, buildSummaryZoomView, isImageTiled, getImageColorWashStyle, readEditableText, placeCaretAtEnd, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, mapInlineTextFormatKey, subscribeBarFacePicturePixelSamples, getBarFacePicturePixelSampleVersion, ensureChartInteractionStyles, applyChartPartHighlight, resolveRevealedChartData, formatAxisValue, buildInkGroupStrokes, getInkReplayStyles, INK_REPLAY_KEYFRAMES, buildContentPartStrokes, getContentPartReplayStyles, resolveOleType, getOleAriaLabel, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, getTextBodyRotationTransform, placeholderPromptDescriptor, attachRotateHandlePlacement, elementIdSelector, createRotationDrag, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_PANEL_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_HINT_CLASS, DEFAULT_PALETTE2, resolvePalette, computeDrawingViewBox, projectDrawingShapes, resolveRevealedDrawingShapeNodeIds, styleShadowFilter, buildChromeStyle, measureSvgViewportRect, modelDataToBlobUrl, getImageSvgFilters, getCachedNativeImageSize, probeNativeImageSize, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, inlineListBodyText, createInlineListSeed, readListActivationSelection, createInlineListModelObserver, attachCollaborationInlineEditor, bindInlineListParagraph, bindInlineListRun, attachInlineListController, restoreInlineListBodySelection, getInlineEditorSelectionResult, isBulletMarkerSegment, resolveChartThreeViewSpec, applyChart3DDrag, applyChart3DSelect, findChartPartTarget, withChartTitle, resolveSmartArtThreeViewSpec, isBrowserOpenableMime, formatBytes, getOleDisplayName, getOleBadgeLabel, openUrlInNewTab, getSubstituteFontFamily, hasGlyphEnvelope, buildGlyphEnvelopeBlock, getWarpPath, isWedgeCalloutPresetShape, isElementActionable, centeredSvgTextLines, findSmartArtNodeText, setSmartArtNodeStyle, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, updateSmartArtNodeText, advanceChartMarkDrag, advanceChartValueDrag, resolveChartKind, buildChartMarkDragGeometry, beginChartMarkDrag, beginChartValueDrag, groupIntoParagraphs, substituteFieldText, computeInlineEditorRect, MIN_TOUCH_TARGET_PX, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, createPresenceProjector, BROADCAST_THROTTLE_MS, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, 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, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, createPresenterShowGuard, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, findInSlides, applyFindReplacements, visibleTemplateElements, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, createPresentationLoadResources, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, partitionTemplateElements, seedRecentColors, resolveAuthoredCustomShowId, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, EncryptedFileError, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, updateMasterViewElement, isTemplateElementId, updateElement, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canInteractWithElement, prepareExportClone, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, resolveImageResolutionScale, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, stopAllPersistentAudio, guidePxToEmu, buildSaveSlides, buildDeckSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, shouldProbeAutosaveRecovery, probeAutosaveRecovery, acceptAutosaveRecovery, acknowledgeAutosaveRecovery, discardAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, collectReferencedFontFamilies, resolveGoogleWebfontHref, syncGoogleWebfontStylesheet, selectGoogleWebfontFamilies, fetchGoogleWebfontOutlineBytes, mapSlideShowStartKey, mapEditorKey, isEditorTextInputTarget, textFontSizePtToPx, stepFontSizePt, textFontSizePxToPt, cycleSelectableElement, prepareElementForInsertion, createViewerOptionsStore, observeYDocSlides, LOCAL_SYNC_ORIGIN, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, scopeLayoutOptionsToSlide, checkModifyPassword, viewerPreferencesFromViewProperties, DEFAULT_VIEWER_PREFERENCES, viewPropertiesPatchFromPreferences, openPptxFile, readBackstageRecentFile, resolveCollaborationShellEditability, resolveCollaborationShellState, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, getSlideTransitionAnimations, getFragmentedTransitionDescriptor, SLIDE_TRANSITION_KEYFRAMES, isActionHidden, buildInlineTextCommitPatch, resolveInlineEditAutoFitHeight, resolveInlineEditNormAutofitShrink, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, savedPresentationFileName, downloadBlob, exportDeckJson, groupElements, generateElementId, makeCloneId, ungroupElements, alignElements, distributeElements, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, openPendingPrintWindow, computeColorFilter, filterHiddenSlideIndices, computeSlideIndices, buildPrintDocument, finishPrintWindow, buildPrintHtmlDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, buildThemeColorMap, reResolveSlideColors, reResolveElementColors, resolveViewportFitOptions, calculateViewportFit, scheduleAutoAdvanceChain, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, resolveTransitionSoundAction, runPresentationAction, safeOpenUrl, buildRunProgramNotice, toggleStageElementMedia, resolveOleVerbTarget, downloadDataUrl, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, remapTextToSegments, buildInlineListStylePatch, applyActiveInlineListFormatting, applyListStyleUpdate, setPendingSelectionRestore, applyTextStyleUpdate, toggleSelectionBullets, transformInlineListCase, applyCaseTransformToSegments, transformTextCase, resolveExportCaptureDecision, recordProgressPercent, computeGridSpacingPx, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, overlayMasterViewInlineSnapshot, overlayInlineTextSnapshot, copyFormatFromElement, cloneElementUpdates, assertElementUpdateTarget, prepareElementUpdateBatch, createWriteBackScheduler, observeExternalCollaborationReadiness, resolveHistoryDepth, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, cloneElementForPaste, computeScrollDelta, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, replyToCommentInList, removeTableElementColumn, insertTableElementColumn, removeTableElementRow, insertTableElementRow, updateCellTextStyleInRawXml, setCellText, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, stopCaptureStream, GIF_POST_CAPTURE_MAX_SIDE, encodeGif, rasterResultToPngBlob, rasterizeElementTiles, placeTileOnPage, PDF_SLIDES_PAGE_WIDTH_PT, PDF_SLIDES_PAGE_HEIGHT_PT, canvasToJpegData, applyFormatToElement, createSnapshotTextPositions, isPpactionUrl, parsePpactionUrl, resolvePresentationAction, elementActionToPptxAction, isUrlSafe, buildSmartArtPresetData, classifyMediaType, computeSnapToShape, publishLiveGeometry, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, rasterizeElementTiledToCanvas, borrowExternalCollaborationAwareness, observeExternalCollaborationSession, clampGifDimensions, rasterizeElement, shouldConfirmExternalHyperlink, applyResize, lockResizeAspect, snapBoxToGrid, applyMotionPathPreset, bringForward, sendBackward, bringToFront, sendToBack } from './chunk-3UWJWJCR.mjs';
3
- import { translationsEn } from './chunk-OBQ453H6.mjs';
1
+ import { DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, getImageSurfaceStyle, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, DEFAULT_FILL_COLOR, getCropShapeClipPath, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getImageSurfaceMaskStyle, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, MIN_ELEMENT_SIZE, buildTextBody3DSceneStyle, getImageTilingStyle, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, HYPERLINK_COLOR, cloneHistorySnapshot, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, buildPdfFromTiledImageData, GRID_SIZE, buildNotesPdf } from './chunk-WNFHFFYE.mjs';
2
+ import { GlyphOutlineFontCache, createGlyphOutlineLookup, DEFAULT_VIEWER_OPTIONS, TOOLBAR_TABS, defineThreeViewElement, getSelectionControlArtworkStyle, hasShapeProperties, normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, hasTextProperties, getSelectionOutlineColor, connectorWrapperTransform, getAriaRoleDescription, getAriaLabel, getAriaRole, resolveElementInteractivity, isEditableTextElement, buildTextStyleOverrideCss, isElementRendered, resolveElementAriaAttributes, isMediaFullscreenActive, shouldRenderHitTarget, elementHitTargetStyle, getImageEffectsOpacity, getImageEffectsFilter, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, ACTION_BUTTON_PRESETS, mediaTransportVisible, isInkElement, oleActionsVisible, getGroupChildParentFill, getElementLabel, getResizeHandleHitAreaStyle, paintedStrokeWidth, buildCssGradientFromShapeStyle, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, paintedElementSize, MEDIA_FULLSCREEN_OVERLAY_STYLE, elementContainerHeightStyle, getElementTransform, resolveElementHighlightClick, applyHighlightClickStyle, getComputedEffectStyle, getSoftEdgeSvgFilter, getEffectStyleSource, getBevelLightingSvgFilter, buildStrokeOutline, buildHollowHitOutline, buildSubpathFillOverlay, isImageLikeElement, strokeOutlineViewBox, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, buildSmartArtA11y, canDrillDown, computeSmartArtElementLayout, flattenNodes, buildSummaryZoomView, isImageTiled, getImageColorWashStyle, readEditableText, placeCaretAtEnd, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, mapInlineTextFormatKey, subscribeBarFacePicturePixelSamples, getBarFacePicturePixelSampleVersion, ensureChartInteractionStyles, applyChartPartHighlight, resolveRevealedChartData, formatAxisValue, buildInkGroupStrokes, getInkReplayStyles, INK_REPLAY_KEYFRAMES, buildContentPartStrokes, getContentPartReplayStyles, resolveOleType, getOleAriaLabel, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, getTextBodyRotationTransform, placeholderPromptDescriptor, attachRotateHandlePlacement, elementIdSelector, createRotationDrag, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_PANEL_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_HINT_CLASS, DEFAULT_PALETTE2, resolvePalette, computeDrawingViewBox, projectDrawingShapes, resolveRevealedDrawingShapeNodeIds, styleShadowFilter, buildChromeStyle, measureSvgViewportRect, modelDataToBlobUrl, resolveZoomNavigationTarget, getImageSvgFilters, getCachedNativeImageSize, probeNativeImageSize, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, inlineListBodyText, createInlineListSeed, readListActivationSelection, createInlineListModelObserver, attachCollaborationInlineEditor, bindInlineListParagraph, bindInlineListRun, attachInlineListController, restoreInlineListBodySelection, getInlineEditorSelectionResult, isBulletMarkerSegment, resolveChartThreeViewSpec, applyChart3DDrag, applyChart3DSelect, findChartPartTarget, withChartTitle, resolveSmartArtThreeViewSpec, isBrowserOpenableMime, formatBytes, getOleDisplayName, getOleBadgeLabel, openUrlInNewTab, getSubstituteFontFamily, hasGlyphEnvelope, buildGlyphEnvelopeBlock, getWarpPath, isWedgeCalloutPresetShape, isElementActionable, centeredSvgTextLines, findSmartArtNodeText, setSmartArtNodeStyle, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, updateSmartArtNodeText, advanceChartMarkDrag, advanceChartValueDrag, resolveChartKind, buildChartMarkDragGeometry, beginChartMarkDrag, beginChartValueDrag, groupIntoParagraphs, substituteFieldText, computeInlineEditorRect, MIN_TOUCH_TARGET_PX, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, createPresenceProjector, BROADCAST_THROTTLE_MS, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, 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, resolveForwardSlideWithZoomReturn, buildZoomTransitionOverride, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, beginZoomExcursion, createPresenterShowGuard, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, findInSlides, applyFindReplacements, visibleTemplateElements, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, createPresentationLoadResources, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, partitionTemplateElements, seedRecentColors, resolveAuthoredCustomShowId, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, EncryptedFileError, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, updateMasterViewElement, isTemplateElementId, updateElement, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canInteractWithElement, prepareExportClone, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, resolveImageResolutionScale, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, stopAllPersistentAudio, guidePxToEmu, buildSaveSlides, buildDeckSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, shouldProbeAutosaveRecovery, probeAutosaveRecovery, acceptAutosaveRecovery, acknowledgeAutosaveRecovery, discardAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, rasterResultToPngBlob, downloadBlob, elementPictureFilename, collectReferencedFontFamilies, resolveGoogleWebfontHref, syncGoogleWebfontStylesheet, selectGoogleWebfontFamilies, fetchGoogleWebfontOutlineBytes, mapSlideShowStartKey, mapEditorKey, isEditorTextInputTarget, textFontSizePtToPx, stepFontSizePt, textFontSizePxToPt, cycleSelectableElement, prepareElementForInsertion, createViewerOptionsStore, observeYDocSlides, LOCAL_SYNC_ORIGIN, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, scopeLayoutOptionsToSlide, checkModifyPassword, viewerPreferencesFromViewProperties, DEFAULT_VIEWER_PREFERENCES, viewPropertiesPatchFromPreferences, openPptxFile, readBackstageRecentFile, resolveCollaborationShellEditability, resolveCollaborationShellState, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, getSlideTransitionAnimations, getFragmentedTransitionDescriptor, SLIDE_TRANSITION_KEYFRAMES, isActionHidden, buildInlineTextCommitPatch, resolveInlineEditAutoFitHeight, resolveInlineEditNormAutofitShrink, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, contextMenuInspectorAnchor, savedPresentationFileName, exportDeckJson, groupElements, generateElementId, makeCloneId, ungroupElements, alignElements, distributeElements, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, openPendingPrintWindow, computeColorFilter, filterHiddenSlideIndices, computeSlideIndices, buildPrintDocument, finishPrintWindow, buildPrintHtmlDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, buildThemeColorMap, reResolveSlideColors, reResolveElementColors, resolveViewportFitOptions, calculateViewportFit, scheduleAutoAdvanceChain, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, resolveTransitionSoundAction, runPresentationAction, safeOpenUrl, buildRunProgramNotice, toggleStageElementMedia, resolveOleVerbTarget, downloadDataUrl, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, remapTextToSegments, buildInlineListStylePatch, applyActiveInlineListFormatting, applyListStyleUpdate, setPendingSelectionRestore, applyTextStyleUpdate, toggleSelectionBullets, transformInlineListCase, applyCaseTransformToSegments, transformTextCase, resolveExportCaptureDecision, recordProgressPercent, computeGridSpacingPx, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, overlayMasterViewInlineSnapshot, overlayInlineTextSnapshot, rasterizeElement, cloneElementForPaste, applyPasteSpecialFormat, buildRasterPictureElement, copyFormatFromElement, cloneElementUpdates, assertElementUpdateTarget, prepareElementUpdateBatch, createWriteBackScheduler, observeExternalCollaborationReadiness, resolveHistoryDepth, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, scrollInspectorSectionIntoView, computeScrollDelta, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, replyToCommentInList, removeTableElementColumn, insertTableElementColumn, removeTableElementRow, insertTableElementRow, updateCellTextStyleInRawXml, setCellText, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, 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, canvasToJpegData, applyFormatToElement, createSnapshotTextPositions, isPpactionUrl, parsePpactionUrl, resolvePresentationAction, elementActionToPptxAction, isUrlSafe, buildSmartArtPresetData, classifyMediaType, computeSnapToShape, publishLiveGeometry, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, rasterizeElementTiledToCanvas, borrowExternalCollaborationAwareness, observeExternalCollaborationSession, clampGifDimensions, rasterResultToPngDataUrl, shouldConfirmExternalHyperlink, applyResize, lockResizeAspect, snapBoxToGrid, applyMotionPathPreset, bringForward, sendBackward, bringToFront, sendToBack } from './chunk-D3TZOCQP.mjs';
3
+ import { translationsEn } from './chunk-JQXN6PO7.mjs';
4
4
  import React17, { createContext, useMemo, useState, useCallback, useEffect, Suspense, useRef, useLayoutEffect, useContext, useSyncExternalStore, useImperativeHandle } from 'react';
5
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
6
6
  import { useTranslation } from 'react-i18next';
@@ -2077,7 +2077,7 @@ function handlePresentationActionImpl(action, deps) {
2077
2077
  // src/viewer/hooks/presentation-mode/slide-transition.ts
2078
2078
  function executeSlideTransition(nextSlideIndex, deps) {
2079
2079
  const incomingSlide = deps.slides[nextSlideIndex];
2080
- const transition = deps.reverse ? deps.slides[deps.currentSlideIndex]?.transition : incomingSlide?.transition;
2080
+ const transition = deps.transitionOverride ?? (deps.reverse ? deps.slides[deps.currentSlideIndex]?.transition : incomingSlide?.transition);
2081
2081
  const durationMs = deps.playTransition ? resolveTransitionDurationMs(transition) : 0;
2082
2082
  deps.clearPresentationTimers();
2083
2083
  deps.setPresentationSlideIndex(nextSlideIndex);
@@ -2142,7 +2142,8 @@ function useSlideNavigation(input) {
2142
2142
  onOpenPresentation,
2143
2143
  onPlayMedia,
2144
2144
  onOleVerb,
2145
- onRunProgram
2145
+ onRunProgram,
2146
+ zoomExcursionRef
2146
2147
  } = input;
2147
2148
  const movePresentationSlideRef = useRef(() => {
2148
2149
  });
@@ -2167,6 +2168,37 @@ function useSlideNavigation(input) {
2167
2168
  if (isClickAdvanceBlocked(slides[presentationSlideIndex], direction, trigger)) {
2168
2169
  return;
2169
2170
  }
2171
+ if (direction === 1) {
2172
+ const consumedExcursion = zoomExcursionRef.current;
2173
+ const step = resolveForwardSlideWithZoomReturn(
2174
+ presentationSlideIndex,
2175
+ void 0,
2176
+ consumedExcursion
2177
+ );
2178
+ if (step.returnedToZoom && step.nextSlideIndex !== void 0) {
2179
+ zoomExcursionRef.current = step.excursion;
2180
+ executeSlideTransition(step.nextSlideIndex, {
2181
+ slides,
2182
+ currentSlideIndex: presentationSlideIndex,
2183
+ onPlayActionSound,
2184
+ onStopActionSound,
2185
+ setPresentationSlideVisible,
2186
+ clearPresentationTimers,
2187
+ setPresentationSlideIndex,
2188
+ onSetActiveSlideIndex,
2189
+ seedSlideAnimations,
2190
+ startSlideAnimations,
2191
+ scheduleAutoAdvanceForSlide,
2192
+ presentationTimersRef,
2193
+ setTransitionOverlay,
2194
+ playTransition: true,
2195
+ transitionOverride: buildZoomTransitionOverride(
2196
+ consumedExcursion?.transitionDurationMs
2197
+ )
2198
+ });
2199
+ return;
2200
+ }
2201
+ }
2170
2202
  const availableSlideIndexes = visibleSlideIndexes.length > 0 ? visibleSlideIndexes : slides.map((_slide, slideIndex) => slideIndex);
2171
2203
  if (availableSlideIndexes.length === 0) {
2172
2204
  return;
@@ -2242,12 +2274,13 @@ function useSlideNavigation(input) {
2242
2274
  visibleSlideIndexes,
2243
2275
  setPresentationSlideVisible,
2244
2276
  setPresentationSlideIndex,
2245
- setTransitionOverlay
2277
+ setTransitionOverlay,
2278
+ zoomExcursionRef
2246
2279
  ]
2247
2280
  );
2248
2281
  movePresentationSlideRef.current = movePresentationSlide;
2249
2282
  const navigateToSlide = useCallback(
2250
- (targetIndex) => {
2283
+ (targetIndex, transitionOverride) => {
2251
2284
  if (targetIndex < 0 || targetIndex >= slides.length) {
2252
2285
  return;
2253
2286
  }
@@ -2275,7 +2308,11 @@ function useSlideNavigation(input) {
2275
2308
  // on-slide links (this is how the issue #131 reporter drives their
2276
2309
  // wheel menu) appeared to have no morph at all, while the same
2277
2310
  // transition played fine on PageDown.
2278
- playTransition: true
2311
+ playTransition: true,
2312
+ // A Slide Zoom / Section Zoom / Summary Zoom click carries its own
2313
+ // `zmPr/@transitionDur`, independent of the destination's own
2314
+ // authored transition (see `useZoomNavigation`).
2315
+ transitionOverride
2279
2316
  });
2280
2317
  },
2281
2318
  [
@@ -2335,31 +2372,22 @@ function useSlideNavigation(input) {
2335
2372
  };
2336
2373
  }
2337
2374
  function useZoomNavigation(input) {
2338
- const { navigateToSlide } = input;
2339
- const zoomReturnSlideIndex = useRef(null);
2375
+ const { slides, navigateToSlide, zoomExcursionRef } = input;
2340
2376
  const handleZoomClick = useCallback(
2341
- (targetSlideIndex, returnSlideIndex) => {
2342
- zoomReturnSlideIndex.current = returnSlideIndex;
2343
- navigateToSlide(targetSlideIndex);
2377
+ (target, returnSlideIndex) => {
2378
+ zoomExcursionRef.current = beginZoomExcursion(target, returnSlideIndex, slides);
2379
+ navigateToSlide(
2380
+ target.targetSlideIndex,
2381
+ buildZoomTransitionOverride(target.transitionDurationMs)
2382
+ );
2344
2383
  },
2345
- [navigateToSlide]
2384
+ [navigateToSlide, slides, zoomExcursionRef]
2346
2385
  );
2347
- const returnToZoomSlide = useCallback(() => {
2348
- const returnIndex = zoomReturnSlideIndex.current;
2349
- if (returnIndex === null) {
2350
- return false;
2351
- }
2352
- zoomReturnSlideIndex.current = null;
2353
- navigateToSlide(returnIndex);
2354
- return true;
2355
- }, [navigateToSlide]);
2356
2386
  const clearZoomReturn = useCallback(() => {
2357
- zoomReturnSlideIndex.current = null;
2358
- }, []);
2387
+ zoomExcursionRef.current = void 0;
2388
+ }, [zoomExcursionRef]);
2359
2389
  return {
2360
2390
  handleZoomClick,
2361
- zoomReturnSlideIndex,
2362
- returnToZoomSlide,
2363
2391
  clearZoomReturn
2364
2392
  };
2365
2393
  }
@@ -2661,6 +2689,7 @@ function usePresentationMode(input) {
2661
2689
  setEndOfShowVisible,
2662
2690
  onAddRunProgramNotice
2663
2691
  });
2692
+ const zoomExcursionRef = useRef(void 0);
2664
2693
  const {
2665
2694
  movePresentationSlide: moveNavigationSlide,
2666
2695
  navigateToSlide,
@@ -2668,6 +2697,7 @@ function usePresentationMode(input) {
2668
2697
  scheduleAutoAdvanceForSlide
2669
2698
  } = useSlideNavigation({
2670
2699
  slides,
2700
+ zoomExcursionRef,
2671
2701
  visibleSlideIndexes,
2672
2702
  presentationSlideIndex,
2673
2703
  setPresentationSlideIndex,
@@ -2724,7 +2754,16 @@ function usePresentationMode(input) {
2724
2754
  runPresentationEntranceAnimations
2725
2755
  ]
2726
2756
  );
2727
- const { handleZoomClick, zoomReturnSlideIndex, returnToZoomSlide, clearZoomReturn } = useZoomNavigation({ navigateToSlide });
2757
+ const { handleZoomClick, clearZoomReturn } = useZoomNavigation({
2758
+ slides,
2759
+ navigateToSlide,
2760
+ zoomExcursionRef
2761
+ });
2762
+ useEffect(() => {
2763
+ if (mode !== "present") {
2764
+ clearZoomReturn();
2765
+ }
2766
+ }, [mode, clearZoomReturn]);
2728
2767
  const openAllSlides = useCallback(() => setAllSlidesOpen(true), []);
2729
2768
  const closeAllSlides = useCallback(() => setAllSlidesOpen(false), []);
2730
2769
  const presenterConsole = usePresenterConsole(presentationSlideIndex, mode === "present");
@@ -3009,8 +3048,6 @@ ${imageRules}`;
3009
3048
  rehearsalPaused,
3010
3049
  toggleRehearsalPause,
3011
3050
  handleZoomClick,
3012
- zoomReturnSlideIndex,
3013
- returnToZoomSlide,
3014
3051
  clearZoomReturn,
3015
3052
  openAudienceWindow,
3016
3053
  closeAudienceWindow,
@@ -6477,12 +6514,13 @@ function useClipboardHandlers(input) {
6477
6514
  ops.updateActiveElements((els) => [...els, clone]);
6478
6515
  ops.applySelection(clone.id);
6479
6516
  history.markDirty();
6517
+ return clone;
6480
6518
  };
6481
6519
  const handlePaste = () => {
6482
6520
  if (!clipboardPayload || !activeSlide) {
6483
6521
  return;
6484
6522
  }
6485
- insertClone(clipboardPayload.element);
6523
+ input.onPasted?.(insertClone(clipboardPayload.element));
6486
6524
  };
6487
6525
  const handleDuplicate = () => {
6488
6526
  if (!selectedElement || !activeSlide) {
@@ -6944,8 +6982,25 @@ function useGroupAlignLayerHandlers(input) {
6944
6982
  }
6945
6983
 
6946
6984
  // src/viewer/hooks/useElementManipulation.ts
6985
+ function focusInspectorSection(setIsInspectorPaneOpen, setSidebarPanelMode, anchor) {
6986
+ setIsInspectorPaneOpen(true);
6987
+ setSidebarPanelMode("properties");
6988
+ if (!anchor) {
6989
+ return;
6990
+ }
6991
+ requestAnimationFrame(() => {
6992
+ requestAnimationFrame(() => scrollInspectorSectionIntoView(document, anchor));
6993
+ });
6994
+ }
6947
6995
  function useElementManipulation(input) {
6948
- const { setIsInspectorPaneOpen, setSidebarPanelMode, onOpenHyperlinkDialog } = input;
6996
+ const {
6997
+ selectedElement,
6998
+ setIsInspectorPaneOpen,
6999
+ setSidebarPanelMode,
7000
+ onOpenHyperlinkDialog,
7001
+ onEditText,
7002
+ onSaveElementAsPicture
7003
+ } = input;
6949
7004
  const { handleCopy, handleCut, handlePaste, handleDuplicate, handleDelete } = useClipboardHandlers(input);
6950
7005
  const {
6951
7006
  handleGroupElements,
@@ -7007,6 +7062,37 @@ function useElementManipulation(input) {
7007
7062
  case "editHyperlink":
7008
7063
  onOpenHyperlinkDialog();
7009
7064
  break;
7065
+ case "edit-text":
7066
+ if (selectedElement) {
7067
+ onEditText?.(selectedElement.id);
7068
+ }
7069
+ break;
7070
+ case "save-as-picture":
7071
+ if (selectedElement) {
7072
+ onSaveElementAsPicture?.(selectedElement.id);
7073
+ }
7074
+ break;
7075
+ case "edit-alt-text":
7076
+ focusInspectorSection(
7077
+ setIsInspectorPaneOpen,
7078
+ setSidebarPanelMode,
7079
+ contextMenuInspectorAnchor("edit-alt-text")
7080
+ );
7081
+ break;
7082
+ case "size-and-position":
7083
+ focusInspectorSection(
7084
+ setIsInspectorPaneOpen,
7085
+ setSidebarPanelMode,
7086
+ contextMenuInspectorAnchor("size-and-position")
7087
+ );
7088
+ break;
7089
+ case "format-shape":
7090
+ focusInspectorSection(
7091
+ setIsInspectorPaneOpen,
7092
+ setSidebarPanelMode,
7093
+ contextMenuInspectorAnchor("format-shape")
7094
+ );
7095
+ break;
7010
7096
  }
7011
7097
  };
7012
7098
  return {
@@ -7633,6 +7719,9 @@ async function renderElementToRaster(element, scale = 2, backgroundColor, mode =
7633
7719
  buildRasterOptions(element, scale, backgroundColor, mode)
7634
7720
  );
7635
7721
  }
7722
+ async function renderElementToRasterDataUrl(element, scale = 2) {
7723
+ return rasterResultToPngDataUrl(await renderElementToRaster(element, scale));
7724
+ }
7636
7725
  async function renderElementToTiles(element, scale = 2, backgroundColor, mode = "auto") {
7637
7726
  const { width, height } = measureNaturalSize(element);
7638
7727
  return rasterizeElementTiles(
@@ -9906,6 +9995,98 @@ function useFormatPainterEditing(input) {
9906
9995
  pasteFormatToSelection
9907
9996
  };
9908
9997
  }
9998
+ function findMountedElementNode(elementId) {
9999
+ return document.querySelector(
10000
+ `[data-element-id="${elementId}"][data-pptx-element="true"]`
10001
+ );
10002
+ }
10003
+ async function rasterizePastedNode(elementId) {
10004
+ const node = findMountedElementNode(elementId);
10005
+ if (!node) {
10006
+ return null;
10007
+ }
10008
+ return renderElementToRasterDataUrl(node, 2);
10009
+ }
10010
+ function usePasteSpecial(input) {
10011
+ const { clipboardPayload, editTemplateMode, ops, markDirty } = input;
10012
+ const [isPasteSpecialDialogOpen, setIsPasteSpecialDialogOpen] = useState(false);
10013
+ const [pasteOptionsToolbar, setPasteOptionsToolbar] = useState(
10014
+ null
10015
+ );
10016
+ const openPasteSpecialDialog = useCallback(() => {
10017
+ if (clipboardPayload) {
10018
+ setIsPasteSpecialDialogOpen(true);
10019
+ }
10020
+ }, [clipboardPayload]);
10021
+ const closePasteSpecialDialog = useCallback(() => setIsPasteSpecialDialogOpen(false), []);
10022
+ const dismissPasteOptionsToolbar = useCallback(() => setPasteOptionsToolbar(null), []);
10023
+ const notePastedElement = useCallback((element) => {
10024
+ setPasteOptionsToolbar({ elementId: element.id, sourceClone: element });
10025
+ }, []);
10026
+ const replacePastedElement = useCallback(
10027
+ (elementId, next) => {
10028
+ ops.updateActiveElements((els) => els.map((el) => el.id === elementId ? next : el));
10029
+ markDirty();
10030
+ },
10031
+ [ops, markDirty]
10032
+ );
10033
+ const pasteWithFormat = useCallback(
10034
+ async (format) => {
10035
+ if (!clipboardPayload) {
10036
+ return;
10037
+ }
10038
+ setIsPasteSpecialDialogOpen(false);
10039
+ const sourceClone = cloneElementForPaste(clipboardPayload.element, {
10040
+ intoTemplate: editTemplateMode
10041
+ });
10042
+ const initial = format === "picture" ? sourceClone : applyPasteSpecialFormat(sourceClone, format);
10043
+ ops.updateActiveElements((els) => [...els, initial]);
10044
+ ops.applySelection(initial.id);
10045
+ markDirty();
10046
+ setPasteOptionsToolbar({ elementId: initial.id, sourceClone });
10047
+ if (format === "picture") {
10048
+ await new Promise((resolve) => {
10049
+ requestAnimationFrame(() => resolve());
10050
+ });
10051
+ const dataUrl = await rasterizePastedNode(initial.id);
10052
+ if (dataUrl) {
10053
+ replacePastedElement(initial.id, buildRasterPictureElement(sourceClone, dataUrl));
10054
+ }
10055
+ }
10056
+ },
10057
+ [clipboardPayload, editTemplateMode, ops, markDirty, replacePastedElement]
10058
+ );
10059
+ const reformatPastedElement = useCallback(
10060
+ async (format) => {
10061
+ const toolbar = pasteOptionsToolbar;
10062
+ if (!toolbar) {
10063
+ return;
10064
+ }
10065
+ if (format === "picture") {
10066
+ const dataUrl = await rasterizePastedNode(toolbar.elementId);
10067
+ if (dataUrl) {
10068
+ replacePastedElement(
10069
+ toolbar.elementId,
10070
+ buildRasterPictureElement(toolbar.sourceClone, dataUrl)
10071
+ );
10072
+ }
10073
+ return;
10074
+ }
10075
+ replacePastedElement(toolbar.elementId, applyPasteSpecialFormat(toolbar.sourceClone, format));
10076
+ },
10077
+ [pasteOptionsToolbar, replacePastedElement]
10078
+ );
10079
+ return {
10080
+ isPasteSpecialDialogOpen,
10081
+ openPasteSpecialDialog,
10082
+ closePasteSpecialDialog,
10083
+ pasteWithFormat,
10084
+ pasteOptionsToolbar,
10085
+ notePastedElement,
10086
+ reformatPastedElement,
10087
+ dismissPasteOptionsToolbar
10088
+ };
10089
+ }
9909
10090
 
9910
10091
  // src/viewer/hooks/useEditorOperations.ts
9911
10092
  function useEditorOperations(input) {
@@ -10049,6 +10230,35 @@ function useEditorOperations(input) {
10049
10230
  handlerRef,
10050
10231
  insertElement: insertHandlers.addElement
10051
10232
  });
10233
+ const handleEditTextFromContextMenu = useCallback(
10234
+ (elementId) => {
10235
+ canvasHandlers.handleElementDoubleClick(elementId, {});
10236
+ },
10237
+ [canvasHandlers]
10238
+ );
10239
+ const handleSaveElementAsPicture = useCallback(
10240
+ (elementId) => {
10241
+ const node = document.querySelector(
10242
+ `[data-element-id="${elementId}"][data-pptx-element="true"]`
10243
+ );
10244
+ if (!node) {
10245
+ return;
10246
+ }
10247
+ void (async () => {
10248
+ const result = await renderElementToRaster(node, 2);
10249
+ const blob = await rasterResultToPngBlob(result);
10250
+ const el = state.elementLookup.get(elementId);
10251
+ downloadBlob(blob, elementPictureFilename(el?.name, "Picture"));
10252
+ })();
10253
+ },
10254
+ [state.elementLookup]
10255
+ );
10256
+ const pasteSpecial = usePasteSpecial({
10257
+ clipboardPayload: state.clipboardPayload,
10258
+ editTemplateMode: state.editTemplateMode,
10259
+ ops,
10260
+ markDirty: history.markDirty
10261
+ });
10052
10262
  const manipulation = useElementManipulation({
10053
10263
  activeSlide,
10054
10264
  activeSlideIndex,
@@ -10066,7 +10276,10 @@ function useEditorOperations(input) {
10066
10276
  setSidebarPanelMode: state.setSidebarPanelMode,
10067
10277
  ops,
10068
10278
  history,
10069
- onOpenHyperlinkDialog: () => dialogs.setIsHyperlinkDialogOpen(true)
10279
+ onOpenHyperlinkDialog: () => dialogs.setIsHyperlinkDialogOpen(true),
10280
+ onEditText: handleEditTextFromContextMenu,
10281
+ onSaveElementAsPicture: handleSaveElementAsPicture,
10282
+ onPasted: pasteSpecial.notePastedElement
10070
10283
  });
10071
10284
  const slideOps = useSlideManagement({
10072
10285
  slides,
@@ -10126,6 +10339,7 @@ function useEditorOperations(input) {
10126
10339
  canvasHandlers: formatPainterCanvasHandlers,
10127
10340
  insertHandlers: { ...insertHandlers, imagePaste },
10128
10341
  manipulation,
10342
+ pasteSpecial,
10129
10343
  slideOps,
10130
10344
  tableOps,
10131
10345
  copyFormatFromSelection,
@@ -10644,6 +10858,9 @@ function useKeyboardShortcuts(input) {
10644
10858
  case "cycleSelectionPrev":
10645
10859
  current.onCycleSelectionPrev?.();
10646
10860
  break;
10861
+ case "pasteSpecial":
10862
+ current.onPasteSpecial?.();
10863
+ break;
10647
10864
  }
10648
10865
  }, []);
10649
10866
  useEffect(() => {
@@ -10677,7 +10894,8 @@ function useKeyboardShortcutWiring(input) {
10677
10894
  handleAddSlide,
10678
10895
  onOpenHyperlinkDialog,
10679
10896
  copyFormatFromSelection,
10680
- pasteFormatToSelection
10897
+ pasteFormatToSelection,
10898
+ onPasteSpecial
10681
10899
  } = input;
10682
10900
  useKeyboardShortcuts({
10683
10901
  containerRef: state.containerRef,
@@ -10764,7 +10982,8 @@ function useKeyboardShortcutWiring(input) {
10764
10982
  onHyperlink: onOpenHyperlinkDialog,
10765
10983
  onClearFormatting: () => ops.updateSelectedTextStyle({ ...CLEAR_FORMATTING_PATCH }),
10766
10984
  onCycleSelectionNext: () => cycleSelection(state, activeSlide, ops, "next"),
10767
- onCycleSelectionPrev: () => cycleSelection(state, activeSlide, ops, "prev")
10985
+ onCycleSelectionPrev: () => cycleSelection(state, activeSlide, ops, "prev"),
10986
+ onPasteSpecial
10768
10987
  });
10769
10988
  }
10770
10989
  function stepSelectedFontSize(state, ops, direction) {
@@ -11183,7 +11402,8 @@ function useViewerIntegration(input) {
11183
11402
  handleAddSlide: editorOps.slideOps.handleAddSlide,
11184
11403
  onOpenHyperlinkDialog: () => dialogs.setIsHyperlinkDialogOpen(true),
11185
11404
  copyFormatFromSelection: editorOps.copyFormatFromSelection,
11186
- pasteFormatToSelection: editorOps.pasteFormatToSelection
11405
+ pasteFormatToSelection: editorOps.pasteFormatToSelection,
11406
+ onPasteSpecial: editorOps.pasteSpecial.openPasteSpecialDialog
11187
11407
  });
11188
11408
  return {
11189
11409
  exportHandlers,
@@ -16075,7 +16295,7 @@ function FailedToLoad() {
16075
16295
  var LazyModel3DScene = React17.lazy(
16076
16296
  async () => {
16077
16297
  try {
16078
- return await import('./Model3DScene-AI2JTBQM.mjs');
16298
+ return await import('./Model3DScene-3GOC5HUS.mjs');
16079
16299
  } catch {
16080
16300
  return { default: FailedToLoad };
16081
16301
  }
@@ -16223,9 +16443,13 @@ function buildTooltip(info) {
16223
16443
  function stopPointer(e) {
16224
16444
  e.stopPropagation();
16225
16445
  }
16226
- function OleActionFooter({ el, info }) {
16446
+ function OleActionFooter({
16447
+ el,
16448
+ info,
16449
+ showActions
16450
+ }) {
16227
16451
  const { t } = useTranslation();
16228
- if (!info.canDownload || !el.oleEmbeddedData) {
16452
+ if (!showActions || !info.canDownload || !el.oleEmbeddedData) {
16229
16453
  return null;
16230
16454
  }
16231
16455
  const downloadName = info.fileName ?? "embedded-object";
@@ -16268,7 +16492,10 @@ function OleActionFooter({ el, info }) {
16268
16492
  }
16269
16493
  );
16270
16494
  }
16271
- function OleRenderer({ element: el }) {
16495
+ function OleRenderer({
16496
+ element: el,
16497
+ showActions = true
16498
+ }) {
16272
16499
  const oleType = resolveOleType(el);
16273
16500
  const ariaLabel = getOleAriaLabel(el);
16274
16501
  const info = buildEmbedInfo(el);
@@ -16292,7 +16519,7 @@ function OleRenderer({ element: el }) {
16292
16519
  }
16293
16520
  ),
16294
16521
  renderOleBadge(oleType),
16295
- /* @__PURE__ */ jsx(OleActionFooter, { el, info })
16522
+ /* @__PURE__ */ jsx(OleActionFooter, { el, info, showActions })
16296
16523
  ]
16297
16524
  }
16298
16525
  );
@@ -16316,7 +16543,7 @@ function OleRenderer({ element: el }) {
16316
16543
  getOleIcon(oleType, color, 36),
16317
16544
  /* @__PURE__ */ jsx("span", { className: "mt-2 text-[12px] font-medium max-w-[90%] truncate", style: { color }, children: displayName }),
16318
16545
  /* @__PURE__ */ jsx("span", { className: "mt-0.5 text-[10px] text-white/50 max-w-[90%] truncate", children: info.readableSize ? `${label} \xB7 ${info.readableSize}` : label }),
16319
- /* @__PURE__ */ jsx(OleActionFooter, { el, info })
16546
+ /* @__PURE__ */ jsx(OleActionFooter, { el, info, showActions })
16320
16547
  ]
16321
16548
  }
16322
16549
  );
@@ -17631,14 +17858,30 @@ function ZoomElementRenderer({
17631
17858
  onClick: (event) => {
17632
17859
  if (isPresentationMode && onZoomClick) {
17633
17860
  event.stopPropagation();
17634
- onZoomClick(tile.targetSlideIndex, sourceSlideIndex ?? 0);
17861
+ onZoomClick(
17862
+ {
17863
+ targetSlideIndex: tile.targetSlideIndex,
17864
+ targetSectionId: tile.sectionId,
17865
+ returnToParent: tile.returnToParent,
17866
+ transitionDurationMs: tile.transitionDurationMs
17867
+ },
17868
+ sourceSlideIndex ?? 0
17869
+ );
17635
17870
  }
17636
17871
  },
17637
17872
  onKeyDown: (event) => {
17638
17873
  if (isPresentationMode && onZoomClick && (event.key === "Enter" || event.key === " ")) {
17639
17874
  event.preventDefault();
17640
17875
  event.stopPropagation();
17641
- onZoomClick(tile.targetSlideIndex, sourceSlideIndex ?? 0);
17876
+ onZoomClick(
17877
+ {
17878
+ targetSlideIndex: tile.targetSlideIndex,
17879
+ targetSectionId: tile.sectionId,
17880
+ returnToParent: tile.returnToParent,
17881
+ transitionDurationMs: tile.transitionDurationMs
17882
+ },
17883
+ sourceSlideIndex ?? 0
17884
+ );
17642
17885
  }
17643
17886
  },
17644
17887
  children: tile.imageSrc ? /* @__PURE__ */ jsx(
@@ -17666,7 +17909,10 @@ function ZoomElementRenderer({
17666
17909
  return;
17667
17910
  }
17668
17911
  e.stopPropagation();
17669
- onZoomClick(element.targetSlideIndex, sourceSlideIndex ?? 0);
17912
+ const target = resolveZoomNavigationTarget(element);
17913
+ if (target) {
17914
+ onZoomClick(target, sourceSlideIndex ?? 0);
17915
+ }
17670
17916
  };
17671
17917
  const handleKeyDown = (e) => {
17672
17918
  if (!isPresentationMode || !onZoomClick) {
@@ -17675,7 +17921,10 @@ function ZoomElementRenderer({
17675
17921
  if (e.key === "Enter" || e.key === " ") {
17676
17922
  e.preventDefault();
17677
17923
  e.stopPropagation();
17678
- onZoomClick(element.targetSlideIndex, sourceSlideIndex ?? 0);
17924
+ const target = resolveZoomNavigationTarget(element);
17925
+ if (target) {
17926
+ onZoomClick(target, sourceSlideIndex ?? 0);
17927
+ }
17679
17928
  }
17680
17929
  };
17681
17930
  const hasPreviewImage = Boolean(element.imageData);
@@ -17957,7 +18206,16 @@ function renderBody(options) {
17957
18206
  });
17958
18207
  }
17959
18208
  if (el.type === "ole") {
17960
- return /* @__PURE__ */ jsx(OleRenderer, { element: el });
18209
+ return /* @__PURE__ */ jsx(
18210
+ OleRenderer,
18211
+ {
18212
+ element: el,
18213
+ showActions: oleActionsVisible({
18214
+ presenting: isPresentationPassive === true,
18215
+ preview: isStaticSurface === true
18216
+ })
18217
+ }
18218
+ );
17961
18219
  }
17962
18220
  if (doGrp && el.type === "group" && el.children) {
17963
18221
  if (renderGroupChild) {
Binary file
Binary file