pptx-react-viewer 4.46.0 → 4.47.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 (126) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +3 -0
  3. package/dist/{AiChatPanel-Z5VHI4WA.mjs → AiChatPanel-6S4LWXGM.mjs} +2 -2
  4. package/dist/AiChatPanel-6S4LWXGM.mjs.br +0 -0
  5. package/dist/AiChatPanel-6S4LWXGM.mjs.gz +0 -0
  6. package/dist/{AiChatPanel-TGZQBH3L.js → AiChatPanel-IEM43TTZ.js} +10 -10
  7. package/dist/AiChatPanel-IEM43TTZ.js.br +0 -0
  8. package/dist/AiChatPanel-IEM43TTZ.js.gz +0 -0
  9. package/dist/{Model3DScene-5HLXSIIK.js → Model3DScene-CCIG67DJ.js} +1 -1
  10. package/dist/Model3DScene-CCIG67DJ.js.br +0 -0
  11. package/dist/Model3DScene-CCIG67DJ.js.gz +0 -0
  12. package/dist/{Model3DScene-MSC4LEKG.mjs → Model3DScene-NUJH2UKM.mjs} +1 -1
  13. package/dist/Model3DScene-NUJH2UKM.mjs.br +0 -0
  14. package/dist/Model3DScene-NUJH2UKM.mjs.gz +0 -0
  15. package/dist/{chunk-FBN7UFW2.mjs → chunk-BVQSH5SS.mjs} +36 -43
  16. package/dist/chunk-BVQSH5SS.mjs.br +0 -0
  17. package/dist/chunk-BVQSH5SS.mjs.gz +0 -0
  18. package/dist/{chunk-UQFIRJGG.mjs → chunk-HDOR67HF.mjs} +226 -119
  19. package/dist/chunk-HDOR67HF.mjs.br +0 -0
  20. package/dist/chunk-HDOR67HF.mjs.gz +0 -0
  21. package/dist/{chunk-VJZJESNT.js → chunk-MA2BI7LX.js} +45 -61
  22. package/dist/chunk-MA2BI7LX.js.br +0 -0
  23. package/dist/chunk-MA2BI7LX.js.gz +0 -0
  24. package/dist/{chunk-AMXSOQRH.js → chunk-MRSGNERC.js} +401 -292
  25. package/dist/chunk-MRSGNERC.js.br +0 -0
  26. package/dist/chunk-MRSGNERC.js.gz +0 -0
  27. package/dist/{chunk-CLHUOZSY.mjs → chunk-OWZSRPAH.mjs} +244 -160
  28. package/dist/chunk-OWZSRPAH.mjs.br +0 -0
  29. package/dist/chunk-OWZSRPAH.mjs.gz +0 -0
  30. package/dist/{chunk-W2IMY5SY.js → chunk-PIRHQTI4.js} +0 -2
  31. package/dist/chunk-PIRHQTI4.js.br +0 -0
  32. package/dist/chunk-PIRHQTI4.js.gz +0 -0
  33. package/dist/{chunk-2J3467IB.js → chunk-SSANGQ35.js} +546 -462
  34. package/dist/chunk-SSANGQ35.js.br +0 -0
  35. package/dist/chunk-SSANGQ35.js.gz +0 -0
  36. package/dist/{chunk-Q3DHYOLK.mjs → chunk-UV2HVMKZ.mjs} +1 -2
  37. package/dist/chunk-UV2HVMKZ.mjs.br +0 -0
  38. package/dist/chunk-UV2HVMKZ.mjs.gz +0 -0
  39. package/dist/i18n.js +1 -1
  40. package/dist/i18n.js.br +2 -2
  41. package/dist/i18n.js.gz +0 -0
  42. package/dist/i18n.mjs +1 -1
  43. package/dist/i18n.mjs.br +1 -1
  44. package/dist/i18n.mjs.gz +0 -0
  45. package/dist/index.d.ts +42 -5
  46. package/dist/index.js +25 -25
  47. package/dist/index.js.br +0 -0
  48. package/dist/index.js.gz +0 -0
  49. package/dist/index.mjs +4 -4
  50. package/dist/index.mjs.br +0 -0
  51. package/dist/index.mjs.gz +0 -0
  52. package/dist/internals.d.ts +66 -7
  53. package/dist/internals.js +82 -82
  54. package/dist/internals.js.br +0 -0
  55. package/dist/internals.js.gz +0 -0
  56. package/dist/internals.mjs +3 -3
  57. package/dist/internals.mjs.br +0 -0
  58. package/dist/internals.mjs.gz +0 -0
  59. package/dist/pptx-viewer-canvas.css +2 -0
  60. package/dist/pptx-viewer-canvas.css.br +0 -0
  61. package/dist/pptx-viewer-canvas.css.gz +0 -0
  62. package/dist/pptx-viewer.css +1 -1
  63. package/dist/pptx-viewer.css.br +0 -0
  64. package/dist/pptx-viewer.css.gz +0 -0
  65. package/dist/{three.module-JPZUM7AI.mjs → three.module-EBJVANGB.mjs} +1 -1
  66. package/dist/three.module-EBJVANGB.mjs.br +0 -0
  67. package/dist/three.module-EBJVANGB.mjs.gz +0 -0
  68. package/dist/{three.module-RIUI7P3J.js → three.module-MBFHAT6M.js} +1 -1
  69. package/dist/three.module-MBFHAT6M.js.br +0 -0
  70. package/dist/three.module-MBFHAT6M.js.gz +0 -0
  71. package/dist/viewer/index.d.ts +44 -9
  72. package/dist/viewer/index.js +20 -20
  73. package/dist/viewer/index.js.br +0 -0
  74. package/dist/viewer/index.js.gz +0 -0
  75. package/dist/viewer/index.mjs +4 -4
  76. package/dist/viewer/index.mjs.br +0 -0
  77. package/dist/viewer/index.mjs.gz +0 -0
  78. package/dist/{y-webrtc-CCA4HVZZ.mjs → y-webrtc-2H7UYAQD.mjs} +1 -1
  79. package/dist/y-webrtc-2H7UYAQD.mjs.br +0 -0
  80. package/dist/y-webrtc-2H7UYAQD.mjs.gz +0 -0
  81. package/dist/{y-webrtc-MB5ZXFBA.js → y-webrtc-DVPQNFLL.js} +5 -5
  82. package/dist/y-webrtc-DVPQNFLL.js.br +0 -0
  83. package/dist/y-webrtc-DVPQNFLL.js.gz +0 -0
  84. package/dist/{y-websocket-JQQZVAMX.js → y-websocket-TN4OKPXQ.js} +1 -1
  85. package/dist/y-websocket-TN4OKPXQ.js.br +0 -0
  86. package/dist/y-websocket-TN4OKPXQ.js.gz +0 -0
  87. package/dist/{y-websocket-SCLLNICY.mjs → y-websocket-WORVRRQS.mjs} +1 -1
  88. package/dist/y-websocket-WORVRRQS.mjs.br +0 -0
  89. package/dist/y-websocket-WORVRRQS.mjs.gz +0 -0
  90. package/package.json +7 -5
  91. package/dist/AiChatPanel-TGZQBH3L.js.br +0 -0
  92. package/dist/AiChatPanel-TGZQBH3L.js.gz +0 -0
  93. package/dist/AiChatPanel-Z5VHI4WA.mjs.br +0 -0
  94. package/dist/AiChatPanel-Z5VHI4WA.mjs.gz +0 -0
  95. package/dist/Model3DScene-5HLXSIIK.js.br +0 -0
  96. package/dist/Model3DScene-5HLXSIIK.js.gz +0 -0
  97. package/dist/Model3DScene-MSC4LEKG.mjs.br +0 -0
  98. package/dist/Model3DScene-MSC4LEKG.mjs.gz +0 -0
  99. package/dist/chunk-2J3467IB.js.br +0 -0
  100. package/dist/chunk-2J3467IB.js.gz +0 -0
  101. package/dist/chunk-AMXSOQRH.js.br +0 -0
  102. package/dist/chunk-AMXSOQRH.js.gz +0 -0
  103. package/dist/chunk-CLHUOZSY.mjs.br +0 -0
  104. package/dist/chunk-CLHUOZSY.mjs.gz +0 -0
  105. package/dist/chunk-FBN7UFW2.mjs.br +0 -0
  106. package/dist/chunk-FBN7UFW2.mjs.gz +0 -0
  107. package/dist/chunk-Q3DHYOLK.mjs.br +0 -0
  108. package/dist/chunk-Q3DHYOLK.mjs.gz +0 -0
  109. package/dist/chunk-UQFIRJGG.mjs.br +0 -0
  110. package/dist/chunk-UQFIRJGG.mjs.gz +0 -0
  111. package/dist/chunk-VJZJESNT.js.br +0 -0
  112. package/dist/chunk-VJZJESNT.js.gz +0 -0
  113. package/dist/chunk-W2IMY5SY.js.br +0 -0
  114. package/dist/chunk-W2IMY5SY.js.gz +0 -0
  115. package/dist/three.module-JPZUM7AI.mjs.br +0 -0
  116. package/dist/three.module-JPZUM7AI.mjs.gz +0 -0
  117. package/dist/three.module-RIUI7P3J.js.br +0 -0
  118. package/dist/three.module-RIUI7P3J.js.gz +0 -0
  119. package/dist/y-webrtc-CCA4HVZZ.mjs.br +0 -0
  120. package/dist/y-webrtc-CCA4HVZZ.mjs.gz +0 -0
  121. package/dist/y-webrtc-MB5ZXFBA.js.br +0 -0
  122. package/dist/y-webrtc-MB5ZXFBA.js.gz +0 -0
  123. package/dist/y-websocket-JQQZVAMX.js.br +0 -0
  124. package/dist/y-websocket-JQQZVAMX.js.gz +0 -0
  125. package/dist/y-websocket-SCLLNICY.mjs.br +0 -0
  126. package/dist/y-websocket-SCLLNICY.mjs.gz +0 -0
@@ -1,8 +1,9 @@
1
- import { dist_exports, normalizeHexColor, DEFAULT_STROKE_COLOR, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getAriaRoleDescription, getAriaLabel, getAriaRole, isEditableTextElement, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageEffectsOpacity, getImageEffectsFilter, getImageRenderStyle, cn, ACTION_BUTTON_PRESETS, getImageSurfaceStyle, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, getElementLabel, DEFAULT_FILL_COLOR, buildCssGradientFromShapeStyle, getCropShapeClipPath, getElementTransform, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getImageSurfaceMaskStyle, isImageTiled, getDuotoneColors, getTextWarpStyle, getTextCompensationTransform, renderTextSegments, buildReactChartViewModel, renderChartElement, buildInkGroupStrokes, getInkReplayStyles, INK_REPLAY_KEYFRAMES, buildContentPartStrokes, getContentPartReplayStyles, MIN_ELEMENT_SIZE, buildTextBody3DSceneStyle, getImageTilingStyle, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, substituteFieldText, HYPERLINK_COLOR, cloneTemplateElementsBySlideId, cloneSlide, cloneHistorySnapshot, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, partitionTemplateElements, isTemplateElementId, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, comparePresentation, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, stopAllPersistentAudio, buildSaveSlides, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, makeCloneId, buildPdfFromTiledImageData, GRID_SIZE, copyFormatFromElement, hasCopyableFormat, rerouteConnectorsForMovedElements, applyReroutedConnectors, splitCell, mergeCells, buildNotesPdf, canvasToJpegData, applyFormatToElement, isPpactionUrl, parsePpactionUrl, isUrlSafe, computeSnapToShape, safeOpenUrl as safeOpenUrl$1 } from './chunk-FBN7UFW2.mjs';
2
- import { GlyphOutlineFontCache, createGlyphOutlineLookup, DEFAULT_VIEWER_OPTIONS, TOOLBAR_TABS, defineThreeViewElement, getSelectionControlArtworkStyle, svgLineCap, getSelectionOutlineColor, screenStrokeWidth, connectorWrapperTransform, resolveElementInteractivity, getBackgroundAnimationState, getShapeEffectLayerPlacement, buildTextStyleOverrideCss, isElementRendered, resolveElementAriaAttributes, isMediaFullscreenActive, shouldRenderHitTarget, elementHitTargetStyle, getShapeEffectAnimationLayerStyle, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, mediaTransportVisible, oleActionsVisible, getGroupChildParentFill, getResizeHandleHitAreaStyle, paintedStrokeWidth, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, paintedElementSize, MEDIA_FULLSCREEN_OVERLAY_STYLE, elementContainerHeightStyle, getAnimationOpacity, resolveElementHighlightClick, applyHighlightClickStyle, getComputedEffectStyle, getSoftEdgeSvgFilter, getEffectStyleSource, getBevelLightingSvgFilter, buildStrokeOutline, buildHollowHitOutline, buildSubpathFillOverlay, strokeOutlineViewBox, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, buildSmartArtA11y, canDrillDown, computeSmartArtElementLayout, flattenNodes, buildSummaryZoomView, getImageColorWashStyle, 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 as getAriaRoleDescription$1, getAriaLabel as getAriaLabel$1, 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, SMARTART_DEFAULT_PALETTE, resolvePalette as resolvePalette$1, computeDrawingViewBox, projectDrawingShapes, resolveRevealedDrawingShapeNodeIds, styleShadowFilter, buildChromeStyle, measureSvgViewportRect, modelDataToBlobUrl, resolveZoomNavigationTarget, getImageSvgFilters, getCachedNativeImageSize, probeNativeImageSize, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, inlineListBodyText, createInlineListSeed, readListActivationSelection, createInlineListModelObserver, attachCollaborationInlineEditor, bindInlineListParagraph, bindInlineListRun, attachInlineListController, restoreInlineListBodySelection, getInlineEditorSelectionResult, isBulletMarkerSegment, resolveChartThreeViewSpec, applyChart3DDrag, applyChart3DSelect, findChartPartTarget, withChartTitle, resolveSmartArtThreeViewSpec, isBrowserOpenableMime, formatBytes, getOleDisplayName, getOleBadgeLabel, openUrlInNewTab, hasGlyphEnvelope, buildGlyphEnvelopeBlock, getWarpPath, resolveFontItalic, resolveFontWeight, isWedgeCalloutPresetShape, getAriaRole as getAriaRole$1, isElementActionable, centeredSvgTextLines, findSmartArtNodeText, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, advanceChartMarkDrag, advanceChartValueDrag, resolveChartKind, buildChartMarkDragGeometry, beginChartMarkDrag, beginChartValueDrag, commitSmartArtNodeFill, commitSmartArtNodeText, groupIntoParagraphs as groupIntoParagraphs$1, computeInlineEditorRect, smartArtNodeAtPoint, MIN_TOUCH_TARGET_PX, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, createPresenceProjector, BROADCAST_THROTTLE_MS, sanitizeColor, 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, initialInspectorOpen, createPresentationLoadResources, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, resolveTextFillBlipUrls, seedRecentColors, resolveAuthoredCustomShowId, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, resolveInitialSlideIndex, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, updateMasterViewElement, updateElement, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canMergeShapes, canInteractWithElement, prepareHtml2CanvasClone, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, resolveImageResolutionScale, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, buildDeckSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, shouldProbeAutosaveRecovery, probeAutosaveRecovery, acceptAutosaveRecovery, acknowledgeAutosaveRecovery, discardAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, rasterResultToPngBlob, downloadBlob, elementPictureFilename, canEditElementPoints, selectTrustedEmbeddedFonts, collectReferencedFontFamilies, resolveGoogleWebfontHref, syncGoogleWebfontStylesheet, selectGoogleWebfontFamilies, fetchGoogleWebfontOutlineBytes, isFeatureEnabled, mapSlideShowStartKey, mapCustomizedEditorKey, isEditorControlTarget, isEditorTextInputTarget, parentSelection, textFontSizePtToPx, stepFontSizePt, textFontSizePxToPt, cycleSelectableElement, createCustomizationController, prepareElementForInsertion, slideSpaceElement, createViewerOptionsStore, observeYDocSlides, LOCAL_SYNC_ORIGIN, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, isKeyboardOpen, scopeLayoutOptionsToSlide, checkModifyPassword, viewerPreferencesFromViewProperties, DEFAULT_VIEWER_PREFERENCES, viewPropertiesPatchFromPreferences, resolveCollaborationConfig, openPptxFile, readBackstageRecentFile, resolveCollaborationShellEditability, resolveCollaborationShellState, deviceStrokeStageStyle, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, getSlideTransitionAnimations, getFragmentedTransitionDescriptor, SLIDE_TRANSITION_KEYFRAMES, isActionHidden, buildInlineTextCommitPatch, resolveInlineEditAutoFitHeight, resolveInlineEditNormAutofitShrink, setPendingCaretPoint, drillSelectionForDoubleClick, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, contextMenuInspectorAnchor, savedPresentationFileName, exportDeckJson, groupElements, generateElementId, ungroupElements, alignElements, distributeElements, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, planMergeShapes, applyMergeShapesPlan, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, openPendingPrintWindow, computeColorFilter, filterHiddenSlideIndices, computeSlideIndices, buildPrintDocument, finishPrintWindow, buildPrintHtmlDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, insertSlidePaste, applySlidePasteTemplates, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, needsOwnedSession, openOwnedCollaboration, resolveViewportFitOptions, editorViewportFitFor, calculateViewportFit, scheduleAutoAdvanceChain, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, resolveTransitionSoundAction, runPresentationAction, safeOpenUrl, buildRunProgramNotice, toggleStageElementMedia, resolveOleVerbTarget, downloadDataUrl, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, slideSpaceMembers, remapTextToSegments, buildInlineListStylePatch, applyActiveInlineListFormatting, applyListStyleUpdate, setPendingSelectionRestore, applyTextStyleUpdate, toggleSelectionBullets, transformInlineListCase, applyCaseTransformToSegments, transformTextCase, resolveExportCaptureDecision, recordProgressPercent, computeGridSpacingPx as computeGridSpacingPx$1, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, overlayMasterViewInlineSnapshot, overlayInlineTextSnapshot, rasterizeElement, cloneElementForPaste, applyPasteSpecialFormat, buildRasterPictureElement, cloneElementUpdates, assertElementUpdateTarget, prepareElementUpdateBatch, createWriteBackScheduler, writeBackReport, observeExternalCollaborationReadiness, resolveHistoryDepth, createBackstagePresentation, buildFieldSubstitutionContext, isEnterableGroup, memberChainAtPoint, findElementPath, drillSelectionForClick, scrollInspectorSectionIntoView, computeScrollDelta, 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, buildSmartArtPresetData, classifyMediaType, publishLiveGeometry, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, rasterizeElementTiledToCanvas, borrowExternalCollaborationAwareness, observeExternalCollaborationSession, clampGifDimensions, rasterResultToPngDataUrl, shouldConfirmExternalHyperlink, applyResize, lockResizeAspect, snapBoxToGrid, applyMotionPathPreset, bringForward, sendBackward, bringToFront, sendToBack } from 'ooxml-ui/pptx';
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, 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, computeSnapToShape, safeOpenUrl as safeOpenUrl$1, substituteFieldText, HYPERLINK_COLOR } from './chunk-BVQSH5SS.mjs';
2
+ import { defineThreeViewElement, MIN_TOUCH_TARGET_PX, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, createPresenceProjector, BROADCAST_THROTTLE_MS, sanitizeColor, 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, initialInspectorOpen, createPresentationLoadResources, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, resolveTextFillBlipUrls, seedRecentColors, resolveAuthoredCustomShowId, GlyphOutlineFontCache, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, resolveInitialSlideIndex, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, updateMasterViewElement, updateElement, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canMergeShapes, canInteractWithElement, prepareHtml2CanvasClone, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, DEFAULT_VIEWER_OPTIONS, resolveImageResolutionScale, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, buildDeckSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, shouldProbeAutosaveRecovery, probeAutosaveRecovery, acceptAutosaveRecovery, acknowledgeAutosaveRecovery, discardAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, rasterResultToPngBlob, downloadBlob, elementPictureFilename, canEditElementPoints, selectTrustedEmbeddedFonts, resolveFontWeight, resolveFontItalic, collectReferencedFontFamilies, resolveGoogleWebfontHref, syncGoogleWebfontStylesheet, selectGoogleWebfontFamilies, fetchGoogleWebfontOutlineBytes, isFeatureEnabled, mapSlideShowStartKey, mapCustomizedEditorKey, isEditorControlTarget, isEditorTextInputTarget, parentSelection, textFontSizePtToPx, stepFontSizePt, textFontSizePxToPt, cycleSelectableElement, createCustomizationController, prepareElementForInsertion, slideSpaceElement, autosaveStatusKind, createViewerOptionsStore, observeYDocSlides, LOCAL_SYNC_ORIGIN, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, isKeyboardOpen, scopeLayoutOptionsToSlide, checkModifyPassword, 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, elementIdSelector, createRotationDrag, isActionHidden, buildInlineTextCommitPatch, resolveInlineEditAutoFitHeight, resolveInlineEditNormAutofitShrink, setPendingCaretPoint, drillSelectionForDoubleClick, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, contextMenuInspectorAnchor, savedPresentationFileName, deliverSavedPresentation, exportDeckJson, groupElements, generateElementId, ungroupElements, alignElements, distributeElements, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, planMergeShapes, applyMergeShapesPlan, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, openPendingPrintWindow, computeColorFilter, filterHiddenSlideIndices, computeSlideIndices, buildPrintDocument, finishPrintWindow, buildPrintHtmlDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, insertSlidePaste, applySlidePasteTemplates, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, needsOwnedSession, openOwnedCollaboration, resolveViewportFitOptions, editorViewportFitFor, calculateViewportFit, 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, resolveExportCaptureDecision, recordProgressPercent, computeGridSpacingPx as computeGridSpacingPx$1, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, overlayMasterViewInlineSnapshot, overlayInlineTextSnapshot, rasterizeElement, cloneElementForPaste, applyPasteSpecialFormat, buildRasterPictureElement, cloneElementUpdates, assertElementUpdateTarget, prepareElementUpdateBatch, createWriteBackScheduler, writeBackReport, 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, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, buildSmartArtA11y, canDrillDown, computeSmartArtElementLayout, flattenNodes, 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, TOOLBAR_TABS, isEnterableGroup, memberChainAtPoint, findElementPath, drillSelectionForClick, scrollInspectorSectionIntoView, computeScrollDelta, 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, SMARTART_DEFAULT_PALETTE, computeDrawingViewBox, projectDrawingShapes, resolveRevealedDrawingShapeNodeIds, styleShadowFilter, buildChromeStyle, measureSvgViewportRect, modelDataToBlobUrl, resolveZoomNavigationTarget, inlineListBodyText, createInlineListSeed, readListActivationSelection, createInlineListModelObserver, attachCollaborationInlineEditor, bindInlineListParagraph, bindInlineListRun, attachInlineListController, restoreInlineListBodySelection, isBulletMarkerSegment, resolveChartThreeViewSpec, applyChart3DDrag, applyChart3DSelect, findChartPartTarget, withChartTitle, resolveSmartArtThreeViewSpec, isBrowserOpenableMime, formatBytes, getOleDisplayName, getOleBadgeLabel, hasGlyphEnvelope, buildGlyphEnvelopeBlock, getWarpPath, isWedgeCalloutPresetShape, getAriaRole as getAriaRole$1, isElementActionable, buildSmartArtPresetData, classifyMediaType, publishLiveGeometry, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, rasterizeElementTiledToCanvas, borrowExternalCollaborationAwareness, observeExternalCollaborationSession, clampGifDimensions, rasterResultToPngDataUrl, shouldConfirmExternalHyperlink, centeredSvgTextLines, findSmartArtNodeText, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, advanceChartMarkDrag, advanceChartValueDrag, resolveChartKind, buildChartMarkDragGeometry, beginChartMarkDrag, beginChartValueDrag, commitSmartArtNodeFill, commitSmartArtNodeText, groupIntoParagraphs as groupIntoParagraphs$1, createGlyphOutlineLookup, applyResize, lockResizeAspect, snapBoxToGrid, applyMotionPathPreset, computeInlineEditorRect, smartArtNodeAtPoint, 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
- import React17, { createContext, useMemo, useState, useCallback, useEffect, Suspense, useRef, useLayoutEffect, useContext, useSyncExternalStore, useImperativeHandle } from 'react';
5
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
4
+ import React17, { useRef, useState, useCallback, useEffect, useMemo, useContext, useLayoutEffect, createContext, useImperativeHandle, useSyncExternalStore, Suspense } from 'react';
5
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
+ import { PptxHandler, EncryptedFileError, hasShapeProperties, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, guidePxToEmu, hasTextProperties, isInkElement, duplicateSlide, buildThemeColorMap, reResolveSlideColors, reResolveElementColors, isImageLikeElement, SvgExporter, reResolveElementFonts, getSubstituteFontFamily, elementActionToPptxAction, setSmartArtNodeStyle, updateSmartArtNodeText } from 'ooxml-core/pptx';
6
7
  import { translationsEn } from 'ooxml-ui/pptx/i18n';
7
8
  import { useTranslation } from 'react-i18next';
8
9
  import { flushSync } from 'react-dom';
@@ -125,7 +126,7 @@ function useYjsProvider({ config: inputConfig }) {
125
126
  }
126
127
  setStatus("connecting");
127
128
  try {
128
- const [Y, { WebrtcProvider }] = await Promise.all([import('yjs'), import('./y-webrtc-CCA4HVZZ.mjs')]);
129
+ const [Y, { WebrtcProvider }] = await Promise.all([import('yjs'), import('./y-webrtc-2H7UYAQD.mjs')]);
129
130
  if (generation !== generationRef.current) {
130
131
  return;
131
132
  }
@@ -200,7 +201,7 @@ function useYjsProvider({ config: inputConfig }) {
200
201
  }
201
202
  setStatus("connecting");
202
203
  try {
203
- const [Y, { WebsocketProvider }] = await Promise.all([import('yjs'), import('./y-websocket-SCLLNICY.mjs')]);
204
+ const [Y, { WebsocketProvider }] = await Promise.all([import('yjs'), import('./y-websocket-WORVRRQS.mjs')]);
204
205
  if (generation !== generationRef.current) {
205
206
  return;
206
207
  }
@@ -596,7 +597,7 @@ function useCollaborativeState({
596
597
  ]
597
598
  );
598
599
  }
599
- var CollaborationContext = createContext(null);
600
+ var CollaborationContext = /* @__PURE__ */ createContext(null);
600
601
  function useCollaboration() {
601
602
  return useContext(CollaborationContext);
602
603
  }
@@ -1081,6 +1082,7 @@ function useViewerStore(store, selector, isEqual = Object.is) {
1081
1082
  );
1082
1083
  return useSyncExternalStore(subscribe2, getSnapshot2, getSnapshot2);
1083
1084
  }
1085
+ var useBeforePaintEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
1084
1086
  function useViewportFit(canvasSize, viewportRef, options, viewportNode) {
1085
1087
  const [editorDimensions, setEditorDimensions] = useState(null);
1086
1088
  const { maxFitScale } = resolveViewportFitOptions(options, editorViewportFitFor(Infinity));
@@ -1093,7 +1095,7 @@ function useViewportFit(canvasSize, viewportRef, options, viewportNode) {
1093
1095
  canvasHeight: canvasSize.height,
1094
1096
  maxFitScale
1095
1097
  });
1096
- useEffect(() => {
1098
+ useBeforePaintEffect(() => {
1097
1099
  if (viewportNode === null) {
1098
1100
  return;
1099
1101
  }
@@ -4532,8 +4534,8 @@ function useViewerState(input) {
4532
4534
  const crop = useCropSessionState();
4533
4535
  return { ...core, ...ui, ...crop };
4534
4536
  }
4535
- var glyphOutlineFontCache = new GlyphOutlineFontCache();
4536
- var getGlyphOutline = createGlyphOutlineLookup(glyphOutlineFontCache);
4537
+ var glyphOutlineFontCache = /* @__PURE__ */ new GlyphOutlineFontCache();
4538
+ var getGlyphOutline = /* @__PURE__ */ createGlyphOutlineLookup(glyphOutlineFontCache);
4537
4539
 
4538
4540
  // src/viewer/hooks/useLoadContent.ts
4539
4541
  function useLoadContent({
@@ -4596,7 +4598,7 @@ function useLoadContent({
4596
4598
  }
4597
4599
  let cancelled = false;
4598
4600
  const token = ++renderTokenRef.current;
4599
- const handler = new dist_exports.PptxHandler();
4601
+ const handler = new PptxHandler();
4600
4602
  const resources = createPresentationLoadResources(handler);
4601
4603
  const loadBlobUrls = resources.blobUrls;
4602
4604
  (async () => {
@@ -4750,7 +4752,7 @@ function useLoadContent({
4750
4752
  onContentApplied?.();
4751
4753
  } catch (err) {
4752
4754
  if (!cancelled && token === renderTokenRef.current) {
4753
- if (err instanceof dist_exports.EncryptedFileError) {
4755
+ if (err instanceof EncryptedFileError) {
4754
4756
  setIsEncrypted(true);
4755
4757
  } else {
4756
4758
  console.error("[pptx] Failed to load presentation content:", err);
@@ -4789,9 +4791,15 @@ function useAutosave(input) {
4789
4791
  const isDirtyRef = useRef(isDirty);
4790
4792
  const filePathRef = useRef(filePath);
4791
4793
  const serializeRef = useRef(serializeSlides);
4794
+ const storageRef = useRef(input.storage);
4795
+ storageRef.current = input.storage;
4792
4796
  const isSavingRef = useRef(false);
4793
4797
  const changeSourcesRef = useRef(getChangeSources);
4794
4798
  const lastSnapshotRef = useRef(void 0);
4799
+ const onSavedRef = useRef(input.onSaved);
4800
+ useEffect(() => {
4801
+ onSavedRef.current = input.onSaved;
4802
+ }, [input.onSaved]);
4795
4803
  useEffect(() => {
4796
4804
  isDirtyRef.current = isDirty;
4797
4805
  }, [isDirty]);
@@ -4828,9 +4836,10 @@ function useAutosave(input) {
4828
4836
  isSavingRef.current = false;
4829
4837
  return;
4830
4838
  }
4831
- await saveAutosaveSnapshot(path, data);
4839
+ await saveAutosaveSnapshot(path, data, storageRef.current);
4832
4840
  lastSnapshotRef.current = autosaveSnapshotMark(path, sources);
4833
4841
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4842
+ onSavedRef.current?.(data);
4834
4843
  } catch (err) {
4835
4844
  setAutosaveStatus({
4836
4845
  state: "error",
@@ -4875,7 +4884,7 @@ function useTextElementOperations(input) {
4875
4884
  updateSelectedElement
4876
4885
  } = input;
4877
4886
  const liveTextSegments = useCallback(() => {
4878
- if (!selectedElement || !(0, dist_exports.hasTextProperties)(selectedElement)) {
4887
+ if (!selectedElement || !hasTextProperties(selectedElement)) {
4879
4888
  return void 0;
4880
4889
  }
4881
4890
  if (selectedElement.id !== inlineEditingElementId) {
@@ -4893,7 +4902,7 @@ function useTextElementOperations(input) {
4893
4902
  }, [selectedElement, inlineEditingElementId, inlineEditingText, inlineEditingSnapshotRef]);
4894
4903
  const updateSelectedTextStyle = useCallback(
4895
4904
  (updates) => {
4896
- if (!selectedElement || !(0, dist_exports.hasTextProperties)(selectedElement)) {
4905
+ if (!selectedElement || !hasTextProperties(selectedElement)) {
4897
4906
  return;
4898
4907
  }
4899
4908
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
@@ -4971,7 +4980,7 @@ function useTextElementOperations(input) {
4971
4980
  );
4972
4981
  const toggleSelectedBullets = useCallback(
4973
4982
  (kind) => {
4974
- if (!selectedElement || !(0, dist_exports.hasTextProperties)(selectedElement)) {
4983
+ if (!selectedElement || !hasTextProperties(selectedElement)) {
4975
4984
  return;
4976
4985
  }
4977
4986
  const currentSegments = liveTextSegments();
@@ -5022,7 +5031,7 @@ function useTextElementOperations(input) {
5022
5031
  );
5023
5032
  const updateSelectedTextCase = useCallback(
5024
5033
  (mode) => {
5025
- if (!selectedElement || !(0, dist_exports.hasTextProperties)(selectedElement)) {
5034
+ if (!selectedElement || !hasTextProperties(selectedElement)) {
5026
5035
  return;
5027
5036
  }
5028
5037
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
@@ -5174,7 +5183,7 @@ function useElementOperations(input) {
5174
5183
  );
5175
5184
  const updateSelectedShapeStyle = useCallback(
5176
5185
  (updates) => {
5177
- if (!selectedElement || !(0, dist_exports.hasShapeProperties)(selectedElement)) {
5186
+ if (!selectedElement || !hasShapeProperties(selectedElement)) {
5178
5187
  return;
5179
5188
  }
5180
5189
  updateSelectedElement({
@@ -5914,7 +5923,7 @@ function useCanvasInteractions(input) {
5914
5923
  return;
5915
5924
  }
5916
5925
  const el = elementLookup.get(editId);
5917
- if (el && (0, dist_exports.hasTextProperties)(el)) {
5926
+ if (el && hasTextProperties(el)) {
5918
5927
  const reader = inlineEditingReaderRef?.current;
5919
5928
  const read = reader?.elementId === editId ? reader.read() : void 0;
5920
5929
  if (read?.kind === "unsupported") {
@@ -5961,7 +5970,7 @@ function useCanvasInteractions(input) {
5961
5970
  wasEditable.current = canEdit;
5962
5971
  }, [canEdit]);
5963
5972
  const openEquationEditorForElement = (el) => {
5964
- if (!(0, dist_exports.hasTextProperties)(el)) {
5973
+ if (!hasTextProperties(el)) {
5965
5974
  return false;
5966
5975
  }
5967
5976
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -5994,7 +6003,7 @@ function useCanvasInteractions(input) {
5994
6003
  justInteractedRef.current = false;
5995
6004
  } else {
5996
6005
  const el = elementLookup.get(elementId);
5997
- if (el && (0, dist_exports.hasTextProperties)(el) && canInteractWithElement(el, "textEdit")) {
6006
+ if (el && hasTextProperties(el) && canInteractWithElement(el, "textEdit")) {
5998
6007
  if (!openEquationEditorForElement(el)) {
5999
6008
  setPendingCaretPoint(e);
6000
6009
  setInlineEditingElementId(elementId);
@@ -6020,7 +6029,7 @@ function useCanvasInteractions(input) {
6020
6029
  if (openEquationEditorForElement(el)) {
6021
6030
  return;
6022
6031
  }
6023
- if ((0, dist_exports.hasTextProperties)(el) && canInteractWithElement(el, "textEdit")) {
6032
+ if (hasTextProperties(el) && canInteractWithElement(el, "textEdit")) {
6024
6033
  setInlineEditingElementId(elementId);
6025
6034
  setInlineEditingText(el.text ?? "");
6026
6035
  }
@@ -6535,7 +6544,7 @@ function createStructuredElementHandlers(deps) {
6535
6544
  if (!preset) {
6536
6545
  return;
6537
6546
  }
6538
- const defaultPptxAction = (0, dist_exports.elementActionToPptxAction)({
6547
+ const defaultPptxAction = elementActionToPptxAction({
6539
6548
  trigger: "click",
6540
6549
  type: preset.defaultAction
6541
6550
  });
@@ -7182,7 +7191,7 @@ function useSlideManagement(input) {
7182
7191
  if (!src) {
7183
7192
  continue;
7184
7193
  }
7185
- const clone = { ...(0, dist_exports.duplicateSlide)(src, next.length + 1), id: makeSlideId() };
7194
+ const clone = { ...duplicateSlide(src, next.length + 1), id: makeSlideId() };
7186
7195
  next.splice(i + offset + 1, 0, clone);
7187
7196
  offset++;
7188
7197
  }
@@ -7294,7 +7303,7 @@ function createTableMergeHandlers(input) {
7294
7303
  td
7295
7304
  );
7296
7305
  const updates = { tableData: newTableData };
7297
- const newRawXml = (0, dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7306
+ const newRawXml = updateMergeAttrsInRawXml(selectedElement, newTableData);
7298
7307
  if (newRawXml) {
7299
7308
  updates.rawXml = newRawXml;
7300
7309
  }
@@ -7328,7 +7337,7 @@ function createTableMergeHandlers(input) {
7328
7337
  td
7329
7338
  );
7330
7339
  const updates = { tableData: newTableData };
7331
- const newRawXml = (0, dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7340
+ const newRawXml = updateMergeAttrsInRawXml(selectedElement, newTableData);
7332
7341
  if (newRawXml) {
7333
7342
  updates.rawXml = newRawXml;
7334
7343
  }
@@ -7345,7 +7354,7 @@ function createTableMergeHandlers(input) {
7345
7354
  const td = selectedElement.tableData;
7346
7355
  const newTableData = mergeCells(ts.selectedCells, td);
7347
7356
  const updates = { tableData: newTableData };
7348
- const newRawXml = (0, dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7357
+ const newRawXml = updateMergeAttrsInRawXml(selectedElement, newTableData);
7349
7358
  if (newRawXml) {
7350
7359
  updates.rawXml = newRawXml;
7351
7360
  }
@@ -7364,7 +7373,7 @@ function createTableMergeHandlers(input) {
7364
7373
  const td = selectedElement.tableData;
7365
7374
  const newTableData = splitCell(rowIndex, columnIndex, td);
7366
7375
  const updates = { tableData: newTableData };
7367
- const newRawXml = (0, dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7376
+ const newRawXml = updateMergeAttrsInRawXml(selectedElement, newTableData);
7368
7377
  if (newRawXml) {
7369
7378
  updates.rawXml = newRawXml;
7370
7379
  }
@@ -7399,7 +7408,7 @@ function createTableStructHandlers(input) {
7399
7408
  updates.tableData = setCellText(el, rowIndex, colIndex, text).tableData;
7400
7409
  }
7401
7410
  if (el.rawXml) {
7402
- const newRawXml = (0, dist_exports.updateCellTextInRawXml)(el, rowIndex, colIndex, text);
7411
+ const newRawXml = updateCellTextInRawXml(el, rowIndex, colIndex, text);
7403
7412
  if (newRawXml) {
7404
7413
  updates.rawXml = newRawXml;
7405
7414
  }
@@ -7423,7 +7432,7 @@ function createTableStructHandlers(input) {
7423
7432
  const { rowIndex, columnIndex: colIndex } = ts;
7424
7433
  const updates = {};
7425
7434
  if (selectedElement.rawXml) {
7426
- const newRawXml = (0, dist_exports.updateCellTextStyleInRawXml)(
7435
+ const newRawXml = updateCellTextStyleInRawXml(
7427
7436
  selectedElement,
7428
7437
  rowIndex,
7429
7438
  colIndex,
@@ -7557,6 +7566,8 @@ function useExportSaveAs(input) {
7557
7566
  slides,
7558
7567
  templateElementsBySlideId,
7559
7568
  filePath,
7569
+ storage,
7570
+ onSaveError,
7560
7571
  serializeSlides,
7561
7572
  headerFooter,
7562
7573
  presentationProperties,
@@ -7572,18 +7583,25 @@ function useExportSaveAs(input) {
7572
7583
  canvasSize,
7573
7584
  slideSizeEmu
7574
7585
  } = input;
7575
- const handleSaveAsFormat = async (format) => {
7586
+ const handleSaveAsFormat = async (format, reason = "saveAs") => {
7576
7587
  const downloadName = savedPresentationFileName(filePath, format);
7577
7588
  try {
7578
7589
  const data = await serializeSlides(format);
7579
7590
  if (!data) {
7580
- return;
7591
+ return false;
7581
7592
  }
7582
- const mimeType = format === "ppt" ? "application/vnd.ms-powerpoint" : "application/vnd.openxmlformats-officedocument.presentationml.presentation";
7583
- const blob = new Blob([data], { type: mimeType });
7584
- downloadBlob(blob, downloadName);
7593
+ await deliverSavedPresentation({
7594
+ storage,
7595
+ bytes: data,
7596
+ format,
7597
+ fileName: downloadName,
7598
+ reason
7599
+ });
7600
+ return true;
7585
7601
  } catch (err) {
7586
7602
  console.error(`[PowerPointViewer] Save as .${format} failed:`, err);
7603
+ onSaveError?.(err);
7604
+ return false;
7587
7605
  }
7588
7606
  };
7589
7607
  const handleExportJson = () => {
@@ -7614,6 +7632,9 @@ function useExportSaveAs(input) {
7614
7632
  console.error("[PowerPointViewer] JSON export failed:", err);
7615
7633
  }
7616
7634
  };
7635
+ const handleSave = () => {
7636
+ void handleSaveAsFormat("pptx", "save");
7637
+ };
7617
7638
  const handleSaveAsPptx = () => {
7618
7639
  void handleSaveAsFormat("pptx");
7619
7640
  };
@@ -7629,6 +7650,7 @@ function useExportSaveAs(input) {
7629
7650
  return {
7630
7651
  handleExportJson,
7631
7652
  handleSaveAsFormat,
7653
+ handleSave,
7632
7654
  handleSaveAsPptx,
7633
7655
  handleSaveAsPpsx,
7634
7656
  handleSaveAsPptm,
@@ -7958,8 +7980,6 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
7958
7980
  new Uint8Array(buf).set(gifBytes);
7959
7981
  return new Blob([buf], { type: "image/gif" });
7960
7982
  }
7961
-
7962
- // src/viewer/utils/export-svg.ts
7963
7983
  function injectFontFaces(svg, fontFaces) {
7964
7984
  if (!fontFaces.length) {
7965
7985
  return svg;
@@ -8006,7 +8026,7 @@ function exportAllSlidesToSvg(data, options = {}) {
8006
8026
  continue;
8007
8027
  }
8008
8028
  onProgress?.(processedCount, data.slides.length);
8009
- let svg = dist_exports.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
8029
+ let svg = SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
8010
8030
  if (embedFonts && fontFaces?.length) {
8011
8031
  svg = injectFontFaces(svg, fontFaces);
8012
8032
  }
@@ -8236,6 +8256,8 @@ function useExportHandlers(input) {
8236
8256
  activeSlide,
8237
8257
  activeSlideIndex,
8238
8258
  filePath,
8259
+ storage,
8260
+ onSaveError,
8239
8261
  canvasStageRef,
8240
8262
  setActiveSlideIndex,
8241
8263
  serializeSlides,
@@ -8289,6 +8311,7 @@ function useExportHandlers(input) {
8289
8311
  const {
8290
8312
  handleExportJson,
8291
8313
  handleSaveAsFormat,
8314
+ handleSave,
8292
8315
  handleSaveAsPptx,
8293
8316
  handleSaveAsPpsx,
8294
8317
  handleSaveAsPptm,
@@ -8297,6 +8320,8 @@ function useExportHandlers(input) {
8297
8320
  slides,
8298
8321
  templateElementsBySlideId,
8299
8322
  filePath,
8323
+ storage,
8324
+ onSaveError,
8300
8325
  serializeSlides,
8301
8326
  headerFooter,
8302
8327
  presentationProperties,
@@ -8397,6 +8422,7 @@ function useExportHandlers(input) {
8397
8422
  handleExportGif,
8398
8423
  handleExportJson,
8399
8424
  handleSaveAsFormat,
8425
+ handleSave,
8400
8426
  handleSaveAsPptx,
8401
8427
  handleSaveAsPpsx,
8402
8428
  handleSaveAsPptm,
@@ -8408,8 +8434,10 @@ function useExportHandlers(input) {
8408
8434
  exportStatusMessage
8409
8435
  };
8410
8436
  }
8411
- var ViewerOptionsContext = createContext(DEFAULT_VIEWER_OPTIONS);
8412
- var ViewerOptionsStoreContext = createContext(null);
8437
+ var ViewerOptionsContext = /* @__PURE__ */ createContext(DEFAULT_VIEWER_OPTIONS);
8438
+ var ViewerOptionsStoreContext = /* @__PURE__ */ createContext(
8439
+ null
8440
+ );
8413
8441
  function useViewerOptionsContext() {
8414
8442
  return useContext(ViewerOptionsContext);
8415
8443
  }
@@ -8578,8 +8606,6 @@ function usePrintHandlers(input) {
8578
8606
  setIsPrintDialogOpen
8579
8607
  };
8580
8608
  }
8581
-
8582
- // src/viewer/hooks/theme-editor-apply.ts
8583
8609
  async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
8584
8610
  const {
8585
8611
  handlerRef,
@@ -8595,10 +8621,10 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
8595
8621
  return;
8596
8622
  }
8597
8623
  await handler.applyTheme(colorScheme, fontScheme, name);
8598
- const previousMap = theme?.colorScheme ? (0, dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8624
+ const previousMap = theme?.colorScheme ? buildThemeColorMap(theme.colorScheme) : {};
8599
8625
  bumpHistory();
8600
8626
  setSlides(
8601
- (slides) => (0, dist_exports.applyThemeToData)(
8627
+ (slides) => applyThemeToData(
8602
8628
  { slides, theme, themeColorMap: previousMap },
8603
8629
  colorScheme,
8604
8630
  fontScheme,
@@ -8609,8 +8635,8 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
8609
8635
  (prev) => Object.fromEntries(
8610
8636
  Object.entries(prev).map(([id, elements]) => [
8611
8637
  id,
8612
- (0, dist_exports.reResolveElementFonts)(
8613
- (0, dist_exports.reResolveElementColors)(elements, previousMap, colorScheme),
8638
+ reResolveElementFonts(
8639
+ reResolveElementColors(elements, previousMap, colorScheme),
8614
8640
  theme?.fontScheme,
8615
8641
  fontScheme
8616
8642
  )
@@ -8668,13 +8694,13 @@ function useThemeHandlers(input) {
8668
8694
  return;
8669
8695
  }
8670
8696
  await handler.updateThemeColorScheme(colorScheme);
8671
- const previousMap = theme?.colorScheme ? (0, dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8672
- setSlides((prev) => (0, dist_exports.reResolveSlideColors)(prev, previousMap, colorScheme));
8697
+ const previousMap = theme?.colorScheme ? buildThemeColorMap(theme.colorScheme) : {};
8698
+ setSlides((prev) => reResolveSlideColors(prev, previousMap, colorScheme));
8673
8699
  if (Object.keys(templateElementsBySlideId).length > 0) {
8674
8700
  setTemplateElementsBySlideId((prev) => {
8675
8701
  const next = {};
8676
8702
  for (const [slideId, elements] of Object.entries(prev)) {
8677
- next[slideId] = (0, dist_exports.reResolveElementColors)(elements, previousMap, colorScheme);
8703
+ next[slideId] = reResolveElementColors(elements, previousMap, colorScheme);
8678
8704
  }
8679
8705
  return next;
8680
8706
  });
@@ -8785,7 +8811,7 @@ function useThemeSwitching(input) {
8785
8811
  }
8786
8812
  try {
8787
8813
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
8788
- const newData = (0, dist_exports.applyThemeToData)(data, preset.colorScheme, preset.fontScheme, preset.name);
8814
+ const newData = applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
8789
8815
  onDataChange(newData);
8790
8816
  onThemeChanged?.(preset);
8791
8817
  } catch (error) {
@@ -8802,7 +8828,7 @@ function useThemeSwitching(input) {
8802
8828
  }
8803
8829
  try {
8804
8830
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
8805
- const newData = (0, dist_exports.applyThemeToData)(data, colorScheme, fontScheme, themeName);
8831
+ const newData = applyThemeToData(data, colorScheme, fontScheme, themeName);
8806
8832
  onDataChange(newData);
8807
8833
  } catch (error) {
8808
8834
  console.error("Failed to switch to custom theme:", error);
@@ -8814,12 +8840,12 @@ function useThemeSwitching(input) {
8814
8840
  if (!data?.theme?.colorScheme) {
8815
8841
  return void 0;
8816
8842
  }
8817
- return dist_exports.THEME_PRESETS.find(
8818
- (p) => (0, dist_exports.themeColorSchemesEqual)(data.theme?.colorScheme, p.colorScheme)
8843
+ return THEME_PRESETS.find(
8844
+ (p) => themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
8819
8845
  );
8820
8846
  }, [data?.theme?.colorScheme]);
8821
8847
  return {
8822
- presets: dist_exports.THEME_PRESETS,
8848
+ presets: THEME_PRESETS,
8823
8849
  switchToPreset,
8824
8850
  switchToCustom,
8825
8851
  currentPreset
@@ -8840,7 +8866,9 @@ function usePropertyHandlers(input) {
8840
8866
  setSlides,
8841
8867
  setIsDirty,
8842
8868
  ops,
8843
- history
8869
+ history,
8870
+ onPropertiesChange,
8871
+ onNotesUpdate
8844
8872
  } = input;
8845
8873
  const [isVersionHistoryOpen, setIsVersionHistoryOpen] = useState(false);
8846
8874
  const [isComparePanelOpen, setIsComparePanelOpen] = useState(false);
@@ -8856,6 +8884,7 @@ function usePropertyHandlers(input) {
8856
8884
  )
8857
8885
  );
8858
8886
  history.markDirty();
8887
+ onNotesUpdate?.(text);
8859
8888
  };
8860
8889
  const handleUpdateSlide = (updates) => {
8861
8890
  ops.updateSlides(
@@ -8870,6 +8899,7 @@ function usePropertyHandlers(input) {
8870
8899
  const handleUpdateCoreProperties = (updates) => {
8871
8900
  setCoreProperties((prev) => ({ ...prev, ...updates }));
8872
8901
  history.markDirty();
8902
+ onPropertiesChange?.(updates);
8873
8903
  };
8874
8904
  const handleUpdateAppProperties = (updates) => {
8875
8905
  setAppProperties((prev) => ({ ...prev, ...updates }));
@@ -8896,7 +8926,7 @@ function usePropertyHandlers(input) {
8896
8926
  }
8897
8927
  try {
8898
8928
  const ab = await file.arrayBuffer();
8899
- const h = new dist_exports.PptxHandler();
8929
+ const h = new PptxHandler();
8900
8930
  const other = await h.load(ab);
8901
8931
  if (!other) {
8902
8932
  return;
@@ -9504,7 +9534,7 @@ function overlayPendingInlineEdit(document2, elementId, text, snapshot, transfor
9504
9534
  (slide) => !elementId ? slide : {
9505
9535
  ...slide,
9506
9536
  elements: slide.elements.map(
9507
- (element) => element.id === elementId && (0, dist_exports.hasTextProperties)(element) ? {
9537
+ (element) => element.id === elementId && hasTextProperties(element) ? {
9508
9538
  ...element,
9509
9539
  text,
9510
9540
  textSegments: remapTextToSegments(
@@ -9593,7 +9623,7 @@ function useSerialize(input) {
9593
9623
  const pptxGuides = guides.map((g) => ({
9594
9624
  id: g.id,
9595
9625
  orientation: g.axis === "h" ? "horz" : "vert",
9596
- positionEmu: (0, dist_exports.guidePxToEmu)(g.position)
9626
+ positionEmu: guidePxToEmu(g.position)
9597
9627
  }));
9598
9628
  return {
9599
9629
  ...slide,
@@ -9670,6 +9700,12 @@ function useRecoveryDetection(input) {
9670
9700
  const [prompt, setPrompt] = useState(null);
9671
9701
  const [discarding, setDiscarding] = useState(false);
9672
9702
  const onRestore = input.onRestore;
9703
+ const storageRef = useRef(input.storage);
9704
+ storageRef.current = input.storage;
9705
+ const onOfferedRef = useRef(input.onOffered);
9706
+ useEffect(() => {
9707
+ onOfferedRef.current = input.onOffered;
9708
+ }, [input.onOffered]);
9673
9709
  const openVersionHistory = input.openVersionHistory;
9674
9710
  useEffect(() => {
9675
9711
  if (!shouldProbeAutosaveRecovery({
@@ -9684,12 +9720,18 @@ function useRecoveryDetection(input) {
9684
9720
  }
9685
9721
  recoveryCheckedRef.current = true;
9686
9722
  void (async () => {
9687
- const offer = await probeAutosaveRecovery(filePath, Date.now(), fileName);
9723
+ const offer = await probeAutosaveRecovery(
9724
+ filePath,
9725
+ Date.now(),
9726
+ fileName,
9727
+ storageRef.current
9728
+ );
9688
9729
  if (!offer) {
9689
9730
  return;
9690
9731
  }
9691
9732
  recordRef.current = offer.record;
9692
9733
  setPrompt(offer.prompt);
9734
+ onOfferedRef.current?.(offer.record);
9693
9735
  openVersionHistory?.();
9694
9736
  })();
9695
9737
  }, [filePath, fileName, loading, error, slideCount, autosaveAllowed, openVersionHistory]);
@@ -9719,7 +9761,7 @@ function useRecoveryDetection(input) {
9719
9761
  setDiscarding(true);
9720
9762
  void (async () => {
9721
9763
  try {
9722
- await discardAutosaveRecovery(record);
9764
+ await discardAutosaveRecovery(record, storageRef.current);
9723
9765
  recordRef.current = null;
9724
9766
  setPrompt(null);
9725
9767
  } catch {
@@ -9904,10 +9946,10 @@ function useCanvasImagePaste(input) {
9904
9946
  function formatPatchFor(element, format) {
9905
9947
  const updated = applyFormatToElement(element, format);
9906
9948
  const updates = {};
9907
- if ((0, dist_exports.hasShapeProperties)(updated)) {
9949
+ if (hasShapeProperties(updated)) {
9908
9950
  updates.shapeStyle = updated.shapeStyle;
9909
9951
  }
9910
- if ((0, dist_exports.hasTextProperties)(updated)) {
9952
+ if (hasTextProperties(updated)) {
9911
9953
  updates.textStyle = updated.textStyle;
9912
9954
  }
9913
9955
  return updates;
@@ -10367,6 +10409,8 @@ function useIOHandlers(input) {
10367
10409
  activeSlideIndex,
10368
10410
  canvasSize,
10369
10411
  filePath,
10412
+ storage,
10413
+ onSaveError,
10370
10414
  history,
10371
10415
  ops,
10372
10416
  zoom,
@@ -10375,6 +10419,8 @@ function useIOHandlers(input) {
10375
10419
  serializeForRecovery,
10376
10420
  setContent,
10377
10421
  onContentChange,
10422
+ onPropertiesChange,
10423
+ onNotesUpdate,
10378
10424
  imageExportScale,
10379
10425
  imageResolutionScale
10380
10426
  } = input;
@@ -10384,6 +10430,8 @@ function useIOHandlers(input) {
10384
10430
  activeSlide: slides[activeSlideIndex],
10385
10431
  activeSlideIndex,
10386
10432
  filePath,
10433
+ storage,
10434
+ onSaveError,
10387
10435
  canvasStageRef: zoom.canvasStageRef,
10388
10436
  setActiveSlideIndex: state.setActiveSlideIndex,
10389
10437
  serializeSlides,
@@ -10438,7 +10486,9 @@ function useIOHandlers(input) {
10438
10486
  setSlides: state.setSlides,
10439
10487
  setIsDirty: state.setIsDirty,
10440
10488
  ops,
10441
- history
10489
+ history,
10490
+ onPropertiesChange,
10491
+ onNotesUpdate
10442
10492
  });
10443
10493
  return { exportHandlers, printHandlers, themeHandlers, propertyHandlers };
10444
10494
  }
@@ -10606,6 +10656,7 @@ function useContentLifecycle(input) {
10606
10656
  filePath,
10607
10657
  autosaveEnabled = true,
10608
10658
  autosaveIntervalMs,
10659
+ storage,
10609
10660
  embedFonts = true,
10610
10661
  slides,
10611
10662
  state,
@@ -10717,6 +10768,7 @@ function useContentLifecycle(input) {
10717
10768
  const { autosaveStatus } = useAutosave({
10718
10769
  isDirty: state.isDirty,
10719
10770
  filePath,
10771
+ storage,
10720
10772
  serializeSlides: serializeForRecovery,
10721
10773
  enabled: autosaveEnabled,
10722
10774
  ...autosaveIntervalMs === void 0 ? {} : { intervalMs: autosaveIntervalMs },
@@ -10724,6 +10776,7 @@ function useContentLifecycle(input) {
10724
10776
  // so a poll that finds all of them unchanged can skip re-serializing a
10725
10777
  // deck it has already snapshotted. The two refs are read by `.current`
10726
10778
  // because an inline edit in progress lives there and nowhere else yet.
10779
+ onSaved: input.onAutosave,
10727
10780
  getChangeSources: () => [
10728
10781
  slides,
10729
10782
  state.templateElementsBySlideId,
@@ -11016,7 +11069,7 @@ function useKeyboardShortcutWiring(input) {
11016
11069
  }
11017
11070
  function stepSelectedFontSize(state, ops, direction) {
11018
11071
  const selected = state.selectedElement;
11019
- const currentPx = (selected && (0, dist_exports.hasTextProperties)(selected) ? selected.textStyle?.fontSize : void 0) ?? textFontSizePtToPx(18);
11072
+ const currentPx = (selected && hasTextProperties(selected) ? selected.textStyle?.fontSize : void 0) ?? textFontSizePtToPx(18);
11020
11073
  const nextPt = stepFontSizePt(textFontSizePxToPt(currentPx), direction);
11021
11074
  ops.updateSelectedTextStyle({ fontSize: textFontSizePtToPx(nextPt) });
11022
11075
  }
@@ -11063,6 +11116,20 @@ function useElementUpdateBatch(input) {
11063
11116
  );
11064
11117
  }, []);
11065
11118
  }
11119
+ function useReportOnChange(value, report, initial = value) {
11120
+ const last = useRef(initial);
11121
+ const callback = useRef(report);
11122
+ useEffect(() => {
11123
+ callback.current = report;
11124
+ }, [report]);
11125
+ useEffect(() => {
11126
+ if (Object.is(last.current, value)) {
11127
+ return;
11128
+ }
11129
+ last.current = value;
11130
+ callback.current?.(value);
11131
+ }, [value]);
11132
+ }
11066
11133
 
11067
11134
  // src/viewer/hooks/useViewerIntegration.ts
11068
11135
  function useViewerIntegration(input) {
@@ -11079,6 +11146,7 @@ function useViewerIntegration(input) {
11079
11146
  content,
11080
11147
  filePath,
11081
11148
  fileName,
11149
+ storage,
11082
11150
  autosaveEnabled,
11083
11151
  autosaveAllowed = true,
11084
11152
  autosaveIntervalMs,
@@ -11107,7 +11175,13 @@ function useViewerIntegration(input) {
11107
11175
  onModeChange,
11108
11176
  onZoomChange,
11109
11177
  onSelectionChange,
11110
- onSlideCountChange
11178
+ onSlideCountChange,
11179
+ onAutosave,
11180
+ onAutosaveStatus,
11181
+ onAutosaveRecovery,
11182
+ onPropertiesChange,
11183
+ onNotesUpdate,
11184
+ onPresentationChange
11111
11185
  } = input;
11112
11186
  usePointerHandlers({
11113
11187
  editorScale: zoom.editorScale,
@@ -11145,8 +11219,10 @@ function useViewerIntegration(input) {
11145
11219
  {
11146
11220
  content,
11147
11221
  filePath,
11222
+ storage,
11148
11223
  autosaveEnabled,
11149
11224
  autosaveIntervalMs,
11225
+ onAutosave,
11150
11226
  // The File > Fonts toggle, finally reaching a save call.
11151
11227
  embedFonts: dialogs.embedFontsEnabled,
11152
11228
  slides,
@@ -11171,6 +11247,8 @@ function useViewerIntegration(input) {
11171
11247
  activeSlideIndex,
11172
11248
  canvasSize,
11173
11249
  filePath,
11250
+ storage,
11251
+ onSaveError: input.onSaveError,
11174
11252
  history,
11175
11253
  ops: editorOps.ops,
11176
11254
  zoom,
@@ -11179,6 +11257,8 @@ function useViewerIntegration(input) {
11179
11257
  serializeForRecovery,
11180
11258
  setContent,
11181
11259
  onContentChange,
11260
+ onPropertiesChange,
11261
+ onNotesUpdate,
11182
11262
  imageExportScale,
11183
11263
  imageResolutionScale
11184
11264
  });
@@ -11205,6 +11285,8 @@ function useViewerIntegration(input) {
11205
11285
  error,
11206
11286
  slideCount: slides.length,
11207
11287
  autosaveAllowed,
11288
+ storage,
11289
+ onOffered: onAutosaveRecovery,
11208
11290
  onRestore: setContent
11209
11291
  });
11210
11292
  const updateElements = useElementUpdateBatch(input);
@@ -11427,6 +11509,8 @@ function useViewerIntegration(input) {
11427
11509
  onSlideCountChange(slides.length);
11428
11510
  }
11429
11511
  }, [slides.length, onSlideCountChange]);
11512
+ useReportOnChange(autosaveStatusKind(autosaveStatus), onAutosaveStatus);
11513
+ useReportOnChange(mode === "present", onPresentationChange);
11430
11514
  useKeyboardShortcutWiring({
11431
11515
  state,
11432
11516
  mode,
@@ -11520,7 +11604,9 @@ function useViewerOptions() {
11520
11604
  );
11521
11605
  return { optionsStore: store, options };
11522
11606
  }
11523
- var KNOWN_TAB_IDS = new Set(TOOLBAR_TABS.map((tab) => tab.id));
11607
+ var KNOWN_TAB_IDS = /* @__PURE__ */ new Set(
11608
+ /* @__PURE__ */ TOOLBAR_TABS.map((tab) => tab.id)
11609
+ );
11524
11610
  function computeToolbarVisibility(hiddenActions, hiddenTabIds = []) {
11525
11611
  const isHidden = (id) => isActionHidden(id, hiddenActions);
11526
11612
  const userHidden = new Set(hiddenTabIds);
@@ -12622,6 +12708,7 @@ function buildToolbarProps(input) {
12622
12708
  s.setIsDirty(true);
12623
12709
  },
12624
12710
  onOpenShareDialog,
12711
+ onSave: exportHandlers.handleSave,
12625
12712
  onSaveAsPptx: exportHandlers.handleSaveAsPptx,
12626
12713
  onSaveAsPpsx: exportHandlers.handleSaveAsPpsx,
12627
12714
  onSaveAsPptm: exportHandlers.handleSaveAsPptm,
@@ -13024,7 +13111,7 @@ function useViewerBuildingBlocksCore(input) {
13024
13111
  documentGridSpacing: state.viewProperties?.gridSpacing
13025
13112
  });
13026
13113
  const themeColorMap = useMemo(
13027
- () => state.theme?.colorScheme ? (0, dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
13114
+ () => state.theme?.colorScheme ? buildThemeColorMap(state.theme.colorScheme) : void 0,
13028
13115
  [state.theme?.colorScheme]
13029
13116
  );
13030
13117
  const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
@@ -13808,7 +13895,7 @@ function renderImg(el, style, filter, alt, opacity) {
13808
13895
  ] });
13809
13896
  }
13810
13897
  const colorWash = getImageColorWashStyle(
13811
- (0, dist_exports.isImageLikeElement)(el) ? el.imageEffects?.colorWash : void 0
13898
+ isImageLikeElement(el) ? el.imageEffects?.colorWash : void 0
13812
13899
  );
13813
13900
  const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
13814
13901
  const duotoneColors = getDuotoneColors(el);
@@ -13897,11 +13984,17 @@ function SlideBackgroundImageLayer({
13897
13984
  }
13898
13985
  );
13899
13986
  }
13900
- var ChartFormatContext = createContext(null);
13987
+
13988
+ // src/viewer/utils/display-name.ts
13989
+ function withDisplayName(component, displayName) {
13990
+ component.displayName = displayName;
13991
+ return component;
13992
+ }
13993
+ var ChartFormatContext = /* @__PURE__ */ createContext(null);
13901
13994
  function useChartFormatContext() {
13902
13995
  return useContext(ChartFormatContext);
13903
13996
  }
13904
- var ChartPartSelectionContext = createContext({
13997
+ var ChartPartSelectionContext = /* @__PURE__ */ createContext({
13905
13998
  selection: null,
13906
13999
  setSelection: () => {
13907
14000
  }
@@ -13924,7 +14017,9 @@ var DEFAULT_RENDERING_3D_FLAGS = {
13924
14017
  areaChart3D: false,
13925
14018
  pieChart3D: false
13926
14019
  };
13927
- var Rendering3DFlagsContext = createContext(DEFAULT_RENDERING_3D_FLAGS);
14020
+ var Rendering3DFlagsContext = /* @__PURE__ */ createContext(
14021
+ DEFAULT_RENDERING_3D_FLAGS
14022
+ );
13928
14023
  defineThreeViewElement();
13929
14024
  function useThreeViewEvent(ref, type, handler) {
13930
14025
  useLayoutEffect(() => {
@@ -14446,26 +14541,26 @@ var rotateSize = "var(--pptx-react-rotate-default, 20px)";
14446
14541
  var RESIZE_DEFAULT_CLASSES = "[--pptx-react-corner-default:12px] max-md:[--pptx-react-corner-default:22px] [--pptx-react-edge-length-default:20px] max-md:[--pptx-react-edge-length-default:32px] [--pptx-react-edge-thickness-default:8px] max-md:[--pptx-react-edge-thickness-default:12px]";
14447
14542
  var ROTATE_DEFAULT_CLASSES = "[--pptx-react-rotate-default:20px] max-md:[--pptx-react-rotate-default:28px]";
14448
14543
  var RESIZE_ARTWORK = {
14449
- corner: getSelectionControlArtworkStyle("corner", {
14544
+ corner: /* @__PURE__ */ getSelectionControlArtworkStyle("corner", {
14450
14545
  ...appearance,
14451
14546
  width: cornerSize,
14452
14547
  height: cornerSize,
14453
14548
  radius: "9999px"
14454
14549
  }),
14455
- horizontal: getSelectionControlArtworkStyle("horizontal-edge", {
14550
+ horizontal: /* @__PURE__ */ getSelectionControlArtworkStyle("horizontal-edge", {
14456
14551
  ...appearance,
14457
14552
  width: edgeLength,
14458
14553
  height: edgeThickness,
14459
14554
  radius: "var(--radius-sm, 0.25rem)"
14460
14555
  }),
14461
- vertical: getSelectionControlArtworkStyle("vertical-edge", {
14556
+ vertical: /* @__PURE__ */ getSelectionControlArtworkStyle("vertical-edge", {
14462
14557
  ...appearance,
14463
14558
  width: edgeThickness,
14464
14559
  height: edgeLength,
14465
14560
  radius: "var(--radius-sm, 0.25rem)"
14466
14561
  })
14467
14562
  };
14468
- var ROTATE_ARTWORK = getSelectionControlArtworkStyle("rotate", {
14563
+ var ROTATE_ARTWORK = /* @__PURE__ */ getSelectionControlArtworkStyle("rotate", {
14469
14564
  ...appearance,
14470
14565
  width: rotateSize,
14471
14566
  height: rotateSize,
@@ -14707,7 +14802,7 @@ function ResizeHandles({
14707
14802
  ))
14708
14803
  ] });
14709
14804
  }
14710
- var ConnectorElementRenderer = React17.memo(
14805
+ var ConnectorElementRendererMemo = /* @__PURE__ */ React17.memo(
14711
14806
  // oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
14712
14807
  function ConnectorElementRendererInner({
14713
14808
  el,
@@ -14724,7 +14819,7 @@ var ConnectorElementRenderer = React17.memo(
14724
14819
  animationState,
14725
14820
  textStyleOverrideCss
14726
14821
  }) {
14727
- const shapeEl = (0, dist_exports.hasShapeProperties)(el) ? el : void 0;
14822
+ const shapeEl = hasShapeProperties(el) ? el : void 0;
14728
14823
  const viewWidth = Math.max(el.width, 0);
14729
14824
  const viewHeight = Math.max(el.height, 0);
14730
14825
  const svgWidth = Math.max(el.width, 1);
@@ -14748,7 +14843,7 @@ var ConnectorElementRenderer = React17.memo(
14748
14843
  const compoundOffsets = getCompoundLineOffsets(compoundLine, strokeWidth);
14749
14844
  const compoundWidths = getCompoundLineWidths(compoundLine, strokeWidth);
14750
14845
  const strokeCap = svgLineCap(ss?.lineCap);
14751
- const textEl = (0, dist_exports.hasTextProperties)(el) ? el : void 0;
14846
+ const textEl = hasTextProperties(el) ? el : void 0;
14752
14847
  const connectorText = textEl?.text?.trim() ?? "";
14753
14848
  const connectorTextSegments = textEl?.textSegments;
14754
14849
  const connectorTextStyle = textEl?.textStyle;
@@ -14769,8 +14864,8 @@ var ConnectorElementRenderer = React17.memo(
14769
14864
  "data-pptx-element": "true",
14770
14865
  "data-element-id": el.id,
14771
14866
  role: getAriaRole(el, { actionable: false }),
14772
- "aria-label": getAriaLabel(el),
14773
- "aria-roledescription": getAriaRoleDescription(el),
14867
+ "aria-label": getAriaLabel$1(el),
14868
+ "aria-roledescription": getAriaRoleDescription$1(el),
14774
14869
  "aria-selected": isSelected ? true : void 0,
14775
14870
  className: "absolute",
14776
14871
  style: {
@@ -14951,7 +15046,10 @@ var ConnectorElementRenderer = React17.memo(
14951
15046
  );
14952
15047
  }
14953
15048
  );
14954
- ConnectorElementRenderer.displayName = "ConnectorElementRenderer";
15049
+ var ConnectorElementRenderer = /* @__PURE__ */ withDisplayName(
15050
+ ConnectorElementRendererMemo,
15051
+ "ConnectorElementRenderer"
15052
+ );
14955
15053
  function getElementInteractionProps({
14956
15054
  element,
14957
15055
  isEditableText,
@@ -15036,7 +15134,7 @@ function getContainerStyle({
15036
15134
  has3DExtrusion,
15037
15135
  templateEditing
15038
15136
  }) {
15039
- const ss = (0, dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
15137
+ const ss = hasShapeProperties(el) ? el.shapeStyle : void 0;
15040
15138
  const isPicture = el.type === "picture" || el.type === "image";
15041
15139
  const blurGrowVisible = Boolean(
15042
15140
  ss?.blurGrow && typeof ss.blurRadius === "number" && ss.blurRadius > 0
@@ -15088,14 +15186,14 @@ function getContainerStyle({
15088
15186
  };
15089
15187
  }
15090
15188
  function shapeParams(element) {
15091
- const style = (0, dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
15189
+ const style = hasShapeProperties(element) ? element.shapeStyle : void 0;
15092
15190
  const strokeWidth = paintedStrokeWidth(style);
15093
15191
  const strokeColor = normalizeHexColor(style?.strokeColor, DEFAULT_STROKE_COLOR);
15094
15192
  const fillColor = normalizeHexColor(style?.fillColor, DEFAULT_FILL_COLOR);
15095
15193
  const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
15096
15194
  return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
15097
15195
  }
15098
- var Extrusion3DOverlay = React17.memo(
15196
+ var Extrusion3DOverlayMemo = /* @__PURE__ */ React17.memo(
15099
15197
  // oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
15100
15198
  function Extrusion3DOverlayInner({ data }) {
15101
15199
  if (!data.hasExtrusion || data.panels.length === 0) {
@@ -15130,7 +15228,10 @@ var Extrusion3DOverlay = React17.memo(
15130
15228
  ] });
15131
15229
  }
15132
15230
  );
15133
- Extrusion3DOverlay.displayName = "Extrusion3DOverlay";
15231
+ var Extrusion3DOverlay = /* @__PURE__ */ withDisplayName(
15232
+ Extrusion3DOverlayMemo,
15233
+ "Extrusion3DOverlay"
15234
+ );
15134
15235
 
15135
15236
  // src/viewer/components/elements/scoped-element-handlers.ts
15136
15237
  function getScopedElementHandlers(elementId, options) {
@@ -15197,7 +15298,7 @@ function ShapeEffectOverlay({
15197
15298
  const fillOverlayStyle = overlay ? {
15198
15299
  position: "absolute",
15199
15300
  inset: 0,
15200
- ...(0, dist_exports.isImageLikeElement)(element) ? getImageSurfaceMaskStyle(element) : {},
15301
+ ...isImageLikeElement(element) ? getImageSurfaceMaskStyle(element) : {},
15201
15302
  background: overlay.color,
15202
15303
  mixBlendMode: overlay.blendMode,
15203
15304
  pointerEvents: "none"
@@ -15340,7 +15441,7 @@ function ShapeEffectOverlay({
15340
15441
  ) : null
15341
15442
  ] });
15342
15443
  }
15343
- var ElementRenderer = React17.memo(
15444
+ var ElementRenderer = /* @__PURE__ */ React17.memo(
15344
15445
  // oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
15345
15446
  function ElementRendererInner({
15346
15447
  element: el,
@@ -15405,7 +15506,7 @@ var ElementRenderer = React17.memo(
15405
15506
  const effectPlacement = getShapeEffectLayerPlacement(el);
15406
15507
  const visualAnimationState = backgroundAnimationState ?? animationState;
15407
15508
  const isTxt = isEditableTextElement(el) && allow.textEditable;
15408
- const txtSE = (0, dist_exports.hasTextProperties)(el) ? el.textStyle : void 0;
15509
+ const txtSE = hasTextProperties(el) ? el.textStyle : void 0;
15409
15510
  const textStyleOverrideCss = buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
15410
15511
  const ss = getShapeVisualStyle(
15411
15512
  el,
@@ -15429,7 +15530,7 @@ var ElementRenderer = React17.memo(
15429
15530
  );
15430
15531
  const isModel3D = el.type === "model3d";
15431
15532
  const isConn = isConnectorOrLineElement(el);
15432
- const shapeStyle3d = (0, dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
15533
+ const shapeStyle3d = hasShapeProperties(el) ? el.shapeStyle : void 0;
15433
15534
  const extrusionData = useMemo(
15434
15535
  () => build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15435
15536
  [shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
@@ -16053,7 +16154,7 @@ function renderOleBadge(oleType) {
16053
16154
  )
16054
16155
  ] });
16055
16156
  }
16056
- var InlineCollaborationContext = createContext(void 0);
16157
+ var InlineCollaborationContext = /* @__PURE__ */ createContext(void 0);
16057
16158
 
16058
16159
  // src/viewer/components/elements/useInlineListEditor.tsx
16059
16160
  function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
@@ -16252,7 +16353,7 @@ function InlineTextEditor({
16252
16353
  seedRef.current = {
16253
16354
  initialText,
16254
16355
  hasRichSegments: Boolean(
16255
- (0, dist_exports.hasTextProperties)(element) && element.textSegments && element.textSegments.length > 0
16356
+ hasTextProperties(element) && element.textSegments && element.textSegments.length > 0
16256
16357
  )
16257
16358
  };
16258
16359
  }
@@ -16330,7 +16431,7 @@ function InlineTextEditor({
16330
16431
  transformOrigin: warpStyle?.transformOrigin || "center"
16331
16432
  };
16332
16433
  const nextInlineStyleValue = (property) => {
16333
- if (!(0, dist_exports.hasTextProperties)(element)) {
16434
+ if (!hasTextProperties(element)) {
16334
16435
  return true;
16335
16436
  }
16336
16437
  const result = getInlineEditorSelectionResult(element.textSegments);
@@ -16415,10 +16516,10 @@ function InlineTextEditor({
16415
16516
  function FailedToLoad() {
16416
16517
  return null;
16417
16518
  }
16418
- var LazyModel3DScene = React17.lazy(
16519
+ var LazyModel3DScene = /* @__PURE__ */ React17.lazy(
16419
16520
  async () => {
16420
16521
  try {
16421
- return await import('./Model3DScene-MSC4LEKG.mjs');
16522
+ return await import('./Model3DScene-NUJH2UKM.mjs');
16422
16523
  } catch {
16423
16524
  return { default: FailedToLoad };
16424
16525
  }
@@ -16499,7 +16600,7 @@ function Model3DRenderer({ element, width, height, interactive }) {
16499
16600
  const [threeAvailable, setThreeAvailable] = useState(null);
16500
16601
  useEffect(() => {
16501
16602
  let cancelled = false;
16502
- import('./three.module-JPZUM7AI.mjs').then(() => {
16603
+ import('./three.module-EBJVANGB.mjs').then(() => {
16503
16604
  if (!cancelled) {
16504
16605
  setThreeAvailable(true);
16505
16606
  }
@@ -17344,7 +17445,7 @@ function SmartArtRendererImpl({
17344
17445
  if (!onUpdateElement || !shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
17345
17446
  return;
17346
17447
  }
17347
- const updated = (0, dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text);
17448
+ const updated = updateSmartArtNodeText(smartArtData, nodeId, text);
17348
17449
  const box = { width: element.width, height: element.height };
17349
17450
  const reflowed = rebuildDrawingShapesIfCleared(
17350
17451
  updated,
@@ -17360,7 +17461,7 @@ function SmartArtRendererImpl({
17360
17461
  if (!onUpdateElement) {
17361
17462
  return;
17362
17463
  }
17363
- const next = (0, dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, { fillColor: fill });
17464
+ const next = setSmartArtNodeStyle(smartArtData, nodeId, { fillColor: fill });
17364
17465
  if (next !== smartArtData) {
17365
17466
  const box = { width: element.width, height: element.height };
17366
17467
  const reflowed = rebuildDrawingShapesIfCleared(
@@ -17470,7 +17571,7 @@ function sameDiagramReveal(prev, next) {
17470
17571
  }
17471
17572
  return true;
17472
17573
  }
17473
- var SmartArtRenderer = React17.memo(SmartArtRendererImpl, arePropsEqual);
17574
+ var SmartArtRenderer = /* @__PURE__ */ React17.memo(SmartArtRendererImpl, arePropsEqual);
17474
17575
  function SmartArt3DView({
17475
17576
  element,
17476
17577
  className,
@@ -17595,7 +17696,7 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
17595
17696
  fontSize: s.fontSize ?? element.textStyle?.fontSize ?? DEFAULT_TEXT_FONT_SIZE,
17596
17697
  fontWeight: resolveFontWeight(s.fontFamily || element.textStyle?.fontFamily, s.bold),
17597
17698
  fontStyle: resolveFontItalic(s.fontFamily || element.textStyle?.fontFamily, s.italic) ? "italic" : void 0,
17598
- fontFamily: s.fontFamily || element.textStyle?.fontFamily ? (0, dist_exports.getSubstituteFontFamily)(s.fontFamily || element.textStyle?.fontFamily || "") : DEFAULT_FONT_FAMILY,
17699
+ fontFamily: s.fontFamily || element.textStyle?.fontFamily ? getSubstituteFontFamily(s.fontFamily || element.textStyle?.fontFamily || "") : DEFAULT_FONT_FAMILY,
17599
17700
  textDecoration: decos.length > 0 ? decos.join(" ") : void 0
17600
17701
  };
17601
17702
  }
@@ -17603,7 +17704,7 @@ function resolveSegmentFont(segment, element) {
17603
17704
  const s = segment.style || {};
17604
17705
  const family = s.fontFamily || element.textStyle?.fontFamily;
17605
17706
  return {
17606
- fontFamily: family ? (0, dist_exports.getSubstituteFontFamily)(family) : DEFAULT_FONT_FAMILY,
17707
+ fontFamily: family ? getSubstituteFontFamily(family) : DEFAULT_FONT_FAMILY,
17607
17708
  fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? DEFAULT_TEXT_FONT_SIZE,
17608
17709
  bold: s.bold ?? element.textStyle?.bold,
17609
17710
  italic: s.italic ?? element.textStyle?.italic
@@ -17670,7 +17771,7 @@ function WarpedText({
17670
17771
  fallbackColor,
17671
17772
  fieldContext
17672
17773
  }) {
17673
- if (!(0, dist_exports.hasTextProperties)(element)) {
17774
+ if (!hasTextProperties(element)) {
17674
17775
  return null;
17675
17776
  }
17676
17777
  const textEl = element;
@@ -17689,7 +17790,7 @@ function WarpedText({
17689
17790
  const align = textEl.textStyle?.align ?? "center";
17690
17791
  const { startOffset, textAnchor } = getAlignmentProps(align);
17691
17792
  const baseFontSize = textEl.textStyle?.fontSize ?? DEFAULT_TEXT_FONT_SIZE;
17692
- const baseFontFamily = textEl.textStyle?.fontFamily ? (0, dist_exports.getSubstituteFontFamily)(textEl.textStyle.fontFamily) : DEFAULT_FONT_FAMILY;
17793
+ const baseFontFamily = textEl.textStyle?.fontFamily ? getSubstituteFontFamily(textEl.textStyle.fontFamily) : DEFAULT_FONT_FAMILY;
17693
17794
  const baseFill = normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17694
17795
  if (hasGlyphEnvelope(preset)) {
17695
17796
  const perLine = buildGlyphEnvelopeBlock(
@@ -17789,11 +17890,15 @@ function WarpedText({
17789
17890
  }
17790
17891
  );
17791
17892
  }
17792
- var GLYPH_BY_SHAPE = Object.fromEntries(
17793
- ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17794
- );
17795
- GLYPH_BY_SHAPE["actionButtonForwardOrNext"] = GLYPH_BY_SHAPE["actionButtonForwardNext"];
17796
- GLYPH_BY_SHAPE["actionButtonBackOrPrevious"] = GLYPH_BY_SHAPE["actionButtonBackPrevious"];
17893
+ var GLYPH_BY_SHAPE = /* @__PURE__ */ buildGlyphByShape();
17894
+ function buildGlyphByShape() {
17895
+ const glyphs = Object.fromEntries(
17896
+ ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17897
+ );
17898
+ glyphs["actionButtonForwardOrNext"] = glyphs["actionButtonForwardNext"];
17899
+ glyphs["actionButtonBackOrPrevious"] = glyphs["actionButtonBackPrevious"];
17900
+ return glyphs;
17901
+ }
17797
17902
  function isActionButtonShape(shapeType) {
17798
17903
  return Boolean(shapeType && shapeType in GLYPH_BY_SHAPE);
17799
17904
  }
@@ -17860,9 +17965,9 @@ function renderTextElementBody(options) {
17860
17965
  const isLinkedTextBox$1 = isLinkedTextBox(el);
17861
17966
  const linkedSegments = getOverflowSegments(el, slideElements);
17862
17967
  const useSvgWarp = shouldUseSvgWarp(
17863
- (0, dist_exports.hasTextProperties)(el) ? el.textStyle?.textWarpPreset : void 0
17968
+ hasTextProperties(el) ? el.textStyle?.textWarpPreset : void 0
17864
17969
  );
17865
- const scene3dStyle = (0, dist_exports.hasTextProperties)(el) ? buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17970
+ const scene3dStyle = hasTextProperties(el) ? buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17866
17971
  const rotationTransform = getTextBodyRotationTransform(el);
17867
17972
  const composedTransform = [rotationTransform, getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
17868
17973
  const transformStyle = {
@@ -18329,7 +18434,7 @@ function renderBody(options) {
18329
18434
  onPlayStateChange: handleMediaPlayStateChange
18330
18435
  });
18331
18436
  }
18332
- if (doInk && (0, dist_exports.isInkElement)(el)) {
18437
+ if (doInk && isInkElement(el)) {
18333
18438
  return renderInk(el, {
18334
18439
  replay: isPresentationPassive,
18335
18440
  pressureSensitive: true
@@ -18373,7 +18478,7 @@ function defaultTextColorForFill(fillColor) {
18373
18478
  return luminance > 0.179 ? DEFAULT_TEXT_COLOR : "#ffffff";
18374
18479
  }
18375
18480
  function getStaticElementVisualState(element, parentGroupFill) {
18376
- const style = (0, dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
18481
+ const style = hasShapeProperties(element) ? element.shapeStyle : void 0;
18377
18482
  const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18378
18483
  const fill = normalizeHexColor(style?.fillColor, DEFAULT_FILL_COLOR);
18379
18484
  const strokeWidth = paintedStrokeWidth(style);
@@ -18393,8 +18498,8 @@ function getStaticElementVisualState(element, parentGroupFill) {
18393
18498
  element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : DEFAULT_TEXT_COLOR
18394
18499
  );
18395
18500
  const isImage = element.type === "picture" || element.type === "image";
18396
- const letsTextOverflow = (0, dist_exports.hasTextProperties)(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
18397
- const shapeType = (0, dist_exports.hasShapeProperties)(element) ? element.shapeType : void 0;
18501
+ const letsTextOverflow = hasTextProperties(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
18502
+ const shapeType = hasShapeProperties(element) ? element.shapeType : void 0;
18398
18503
  const isCallout = isWedgeCalloutPresetShape(shapeType) || String(shapeType ?? "").toLowerCase().includes("callout");
18399
18504
  return {
18400
18505
  hasFill,
@@ -18473,8 +18578,8 @@ function StaticElementRendererImpl({
18473
18578
  isActionable
18474
18579
  ),
18475
18580
  role: contractRole,
18476
- "aria-label": exposeElementId ? getAriaLabel$1(element) : void 0,
18477
- "aria-roledescription": exposeElementId ? getAriaRoleDescription$1(element) : void 0,
18581
+ "aria-label": exposeElementId ? getAriaLabel(element) : void 0,
18582
+ "aria-roledescription": exposeElementId ? getAriaRoleDescription(element) : void 0,
18478
18583
  tabIndex: isActionable ? 0 : void 0,
18479
18584
  title: isActionable ? action?.tooltip || action?.url || void 0 : void 0,
18480
18585
  onClick: isActionable ? (event) => {
@@ -18539,7 +18644,7 @@ function StaticElementRendererImpl({
18539
18644
  isEditing: false,
18540
18645
  editText: "",
18541
18646
  spellCheck: false,
18542
- txtSE: (0, dist_exports.hasTextProperties)(element) ? element.textStyle : void 0,
18647
+ txtSE: hasTextProperties(element) ? element.textStyle : void 0,
18543
18648
  txtS: textStyle,
18544
18649
  vecShape: renderVectorShape(
18545
18650
  element,
@@ -18581,8 +18686,10 @@ function StaticElementRendererImpl({
18581
18686
  }
18582
18687
  );
18583
18688
  }
18584
- var StaticElementRenderer = React17.memo(StaticElementRendererImpl);
18585
- StaticElementRenderer.displayName = "StaticElementRenderer";
18689
+ var StaticElementRenderer = /* @__PURE__ */ withDisplayName(
18690
+ /* @__PURE__ */ React17.memo(StaticElementRendererImpl),
18691
+ "StaticElementRenderer"
18692
+ );
18586
18693
  function SlideLayer({
18587
18694
  slide,
18588
18695
  templateElements,
@@ -19058,4 +19165,4 @@ function useResizablePanels() {
19058
19165
  };
19059
19166
  }
19060
19167
 
19061
- export { ACTION_VERB_MAP, ChartFormatContext, ChartPartSelectionProvider, CollaborationCursorOverlay, CollaborationProvider, ElementRenderer, FragmentedTransitionLayer, InlineCollaborationContext, MIN_TOUCH_TARGET, MorphTransitionOverlay, PresentationTransitionOverlay, RemoteSelectionOverlay, RemoteUserCursors, Rendering3DFlagsContext, ResizeHandles, SlideBackgroundImageLayer, SlideLayer, SmartArtRenderer, StaticElementRenderer, ViewerOptionsContext, ViewerOptionsStoreContext, computeToolbarVisibility, createReviewCommentsHost, detectTargetType, imgSrc, isAudienceTab, parseAudienceNonce, parseEmailUrl, parseSlideFromUrl, playAnimationSound, renderStrokeView, renderToCanvas, resolveSmartArtDataPalette, safePrompt, scopeLayoutOptionsToActiveSlide, useAnimationPlayback, useAnnotationHandlers, useAudienceMode, useAutosave, useBroadcastFollower, useCanvasInteractions, useChartFormatContext, useChartPartSelection, useClipboardHandlers, useCollaboration, useCollaborationDocumentSync, useCollaborativeHistory, useCollaborativeState, useComments, useCompatibilityToastsState, useContentLifecycle, useDerivedElementState, useDerivedSlideState, useDialogCustomShows, useEditorHistory, useEditorOperations, useElementManipulation, useElementOperations, useExportHandlers, useExportSaveAs, useFindReplace, useFollowMode, useFontInjection, useGroupAlignLayerHandlers, useIOHandlers, useInsertElements, useIsMobile, useKeyboardInsets, useKeyboardShortcutWiring, useKeyboardShortcuts, useLayoutSwitching, useLoadContent, useMergeShapesHandler, useModalDismissDrag, usePointerHandlers, usePresenceTracking, usePresentationAnnotations, usePresentationKeyboard, usePresentationMode, usePresentationSetup, usePresenterWindow, usePrintHandlers, usePropertyHandlers, useReadOnlyRecommendationState, useRecoveryDetection, useReducedMotion, useRehearsalTimings, useResizablePanels, useSectionOperations, useSerialize, useSheetDismissDrag, useSlideManagement, useSlideNavigation, useSwipeNavigation, useTableOperations, useThemeHandlers, useThemeSwitching, useToolbarVisibility, useTouchGestures, useViewPreferencesSync, useViewerBuildingBlocks, useViewerCoreState, useViewerDialogs, useViewerIntegration, useViewerOptions, useViewerOptionsContext, useViewerState, useViewerUIState, useVirtualizedSlides, useYjsDocumentSync, useYjsProvider, useZoomNavigation, useZoomViewport };
19168
+ export { ACTION_VERB_MAP, ChartFormatContext, ChartPartSelectionProvider, CollaborationCursorOverlay, CollaborationProvider, ElementRenderer, FragmentedTransitionLayer, InlineCollaborationContext, MIN_TOUCH_TARGET, MorphTransitionOverlay, PresentationTransitionOverlay, RemoteSelectionOverlay, RemoteUserCursors, Rendering3DFlagsContext, ResizeHandles, SlideBackgroundImageLayer, SlideLayer, SmartArtRenderer, StaticElementRenderer, ViewerOptionsContext, ViewerOptionsStoreContext, computeToolbarVisibility, createReviewCommentsHost, detectTargetType, imgSrc, isAudienceTab, parseAudienceNonce, parseEmailUrl, parseSlideFromUrl, playAnimationSound, renderStrokeView, renderToCanvas, resolveSmartArtDataPalette, safePrompt, scopeLayoutOptionsToActiveSlide, useAnimationPlayback, useAnnotationHandlers, useAudienceMode, useAutosave, useBroadcastFollower, useCanvasInteractions, useChartFormatContext, useChartPartSelection, useClipboardHandlers, useCollaboration, useCollaborationDocumentSync, useCollaborativeHistory, useCollaborativeState, useComments, useCompatibilityToastsState, useContentLifecycle, useDerivedElementState, useDerivedSlideState, useDialogCustomShows, useEditorHistory, useEditorOperations, useElementManipulation, useElementOperations, useExportHandlers, useExportSaveAs, useFindReplace, useFollowMode, useFontInjection, useGroupAlignLayerHandlers, useIOHandlers, useInsertElements, useIsMobile, useKeyboardInsets, useKeyboardShortcutWiring, useKeyboardShortcuts, useLayoutSwitching, useLoadContent, useMergeShapesHandler, useModalDismissDrag, usePointerHandlers, usePresenceTracking, usePresentationAnnotations, usePresentationKeyboard, usePresentationMode, usePresentationSetup, usePresenterWindow, usePrintHandlers, usePropertyHandlers, useReadOnlyRecommendationState, useRecoveryDetection, useReducedMotion, useRehearsalTimings, useReportOnChange, useResizablePanels, useSectionOperations, useSerialize, useSheetDismissDrag, useSlideManagement, useSlideNavigation, useSwipeNavigation, useTableOperations, useThemeHandlers, useThemeSwitching, useToolbarVisibility, useTouchGestures, useViewPreferencesSync, useViewerBuildingBlocks, useViewerCoreState, useViewerDialogs, useViewerIntegration, useViewerOptions, useViewerOptionsContext, useViewerState, useViewerUIState, useVirtualizedSlides, useYjsDocumentSync, useYjsProvider, useZoomNavigation, useZoomViewport, withDisplayName };