pptx-react-viewer 4.45.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 +50 -0
  2. package/README.md +5 -2
  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-66APV3YZ.mjs → chunk-HDOR67HF.mjs} +258 -130
  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-2YCROYR6.js → chunk-MRSGNERC.js} +432 -302
  25. package/dist/chunk-MRSGNERC.js.br +0 -0
  26. package/dist/chunk-MRSGNERC.js.gz +0 -0
  27. package/dist/{chunk-VUE3EPTJ.mjs → chunk-OWZSRPAH.mjs} +248 -162
  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-KUQRWMIK.js → chunk-SSANGQ35.js} +550 -464
  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 +47 -6
  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 +74 -8
  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 +49 -10
  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-2YCROYR6.js.br +0 -0
  100. package/dist/chunk-2YCROYR6.js.gz +0 -0
  101. package/dist/chunk-66APV3YZ.mjs.br +0 -0
  102. package/dist/chunk-66APV3YZ.mjs.gz +0 -0
  103. package/dist/chunk-FBN7UFW2.mjs.br +0 -0
  104. package/dist/chunk-FBN7UFW2.mjs.gz +0 -0
  105. package/dist/chunk-KUQRWMIK.js.br +0 -0
  106. package/dist/chunk-KUQRWMIK.js.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-VJZJESNT.js.br +0 -0
  110. package/dist/chunk-VJZJESNT.js.gz +0 -0
  111. package/dist/chunk-VUE3EPTJ.mjs.br +0 -0
  112. package/dist/chunk-VUE3EPTJ.mjs.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, 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
  }
@@ -566,6 +567,7 @@ function useCollaborativeState({
566
567
  canvasWidth,
567
568
  canvasHeight
568
569
  });
570
+ const [writeBack, reportWriteBack] = useState();
569
571
  const connectedCount = status === "connected" ? remoteUsers.length + 1 : remoteUsers.length;
570
572
  return useMemo(
571
573
  () => config ? {
@@ -577,12 +579,25 @@ function useCollaborativeState({
577
579
  doc,
578
580
  synced,
579
581
  retry,
580
- clientId
582
+ clientId,
583
+ writeBack,
584
+ reportWriteBack
581
585
  } : null,
582
- [status, remoteUsers, broadcastPresence, connectedCount, config, doc, synced, retry, clientId]
586
+ [
587
+ status,
588
+ remoteUsers,
589
+ broadcastPresence,
590
+ connectedCount,
591
+ config,
592
+ doc,
593
+ synced,
594
+ retry,
595
+ clientId,
596
+ writeBack
597
+ ]
583
598
  );
584
599
  }
585
- var CollaborationContext = createContext(null);
600
+ var CollaborationContext = /* @__PURE__ */ createContext(null);
586
601
  function useCollaboration() {
587
602
  return useContext(CollaborationContext);
588
603
  }
@@ -1067,6 +1082,7 @@ function useViewerStore(store, selector, isEqual = Object.is) {
1067
1082
  );
1068
1083
  return useSyncExternalStore(subscribe2, getSnapshot2, getSnapshot2);
1069
1084
  }
1085
+ var useBeforePaintEffect = typeof window === "undefined" ? useEffect : useLayoutEffect;
1070
1086
  function useViewportFit(canvasSize, viewportRef, options, viewportNode) {
1071
1087
  const [editorDimensions, setEditorDimensions] = useState(null);
1072
1088
  const { maxFitScale } = resolveViewportFitOptions(options, editorViewportFitFor(Infinity));
@@ -1079,7 +1095,7 @@ function useViewportFit(canvasSize, viewportRef, options, viewportNode) {
1079
1095
  canvasHeight: canvasSize.height,
1080
1096
  maxFitScale
1081
1097
  });
1082
- useEffect(() => {
1098
+ useBeforePaintEffect(() => {
1083
1099
  if (viewportNode === null) {
1084
1100
  return;
1085
1101
  }
@@ -4518,8 +4534,8 @@ function useViewerState(input) {
4518
4534
  const crop = useCropSessionState();
4519
4535
  return { ...core, ...ui, ...crop };
4520
4536
  }
4521
- var glyphOutlineFontCache = new GlyphOutlineFontCache();
4522
- var getGlyphOutline = createGlyphOutlineLookup(glyphOutlineFontCache);
4537
+ var glyphOutlineFontCache = /* @__PURE__ */ new GlyphOutlineFontCache();
4538
+ var getGlyphOutline = /* @__PURE__ */ createGlyphOutlineLookup(glyphOutlineFontCache);
4523
4539
 
4524
4540
  // src/viewer/hooks/useLoadContent.ts
4525
4541
  function useLoadContent({
@@ -4582,7 +4598,7 @@ function useLoadContent({
4582
4598
  }
4583
4599
  let cancelled = false;
4584
4600
  const token = ++renderTokenRef.current;
4585
- const handler = new dist_exports.PptxHandler();
4601
+ const handler = new PptxHandler();
4586
4602
  const resources = createPresentationLoadResources(handler);
4587
4603
  const loadBlobUrls = resources.blobUrls;
4588
4604
  (async () => {
@@ -4736,7 +4752,7 @@ function useLoadContent({
4736
4752
  onContentApplied?.();
4737
4753
  } catch (err) {
4738
4754
  if (!cancelled && token === renderTokenRef.current) {
4739
- if (err instanceof dist_exports.EncryptedFileError) {
4755
+ if (err instanceof EncryptedFileError) {
4740
4756
  setIsEncrypted(true);
4741
4757
  } else {
4742
4758
  console.error("[pptx] Failed to load presentation content:", err);
@@ -4775,9 +4791,15 @@ function useAutosave(input) {
4775
4791
  const isDirtyRef = useRef(isDirty);
4776
4792
  const filePathRef = useRef(filePath);
4777
4793
  const serializeRef = useRef(serializeSlides);
4794
+ const storageRef = useRef(input.storage);
4795
+ storageRef.current = input.storage;
4778
4796
  const isSavingRef = useRef(false);
4779
4797
  const changeSourcesRef = useRef(getChangeSources);
4780
4798
  const lastSnapshotRef = useRef(void 0);
4799
+ const onSavedRef = useRef(input.onSaved);
4800
+ useEffect(() => {
4801
+ onSavedRef.current = input.onSaved;
4802
+ }, [input.onSaved]);
4781
4803
  useEffect(() => {
4782
4804
  isDirtyRef.current = isDirty;
4783
4805
  }, [isDirty]);
@@ -4814,9 +4836,10 @@ function useAutosave(input) {
4814
4836
  isSavingRef.current = false;
4815
4837
  return;
4816
4838
  }
4817
- await saveAutosaveSnapshot(path, data);
4839
+ await saveAutosaveSnapshot(path, data, storageRef.current);
4818
4840
  lastSnapshotRef.current = autosaveSnapshotMark(path, sources);
4819
4841
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
4842
+ onSavedRef.current?.(data);
4820
4843
  } catch (err) {
4821
4844
  setAutosaveStatus({
4822
4845
  state: "error",
@@ -4861,7 +4884,7 @@ function useTextElementOperations(input) {
4861
4884
  updateSelectedElement
4862
4885
  } = input;
4863
4886
  const liveTextSegments = useCallback(() => {
4864
- if (!selectedElement || !(0, dist_exports.hasTextProperties)(selectedElement)) {
4887
+ if (!selectedElement || !hasTextProperties(selectedElement)) {
4865
4888
  return void 0;
4866
4889
  }
4867
4890
  if (selectedElement.id !== inlineEditingElementId) {
@@ -4879,7 +4902,7 @@ function useTextElementOperations(input) {
4879
4902
  }, [selectedElement, inlineEditingElementId, inlineEditingText, inlineEditingSnapshotRef]);
4880
4903
  const updateSelectedTextStyle = useCallback(
4881
4904
  (updates) => {
4882
- if (!selectedElement || !(0, dist_exports.hasTextProperties)(selectedElement)) {
4905
+ if (!selectedElement || !hasTextProperties(selectedElement)) {
4883
4906
  return;
4884
4907
  }
4885
4908
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
@@ -4957,7 +4980,7 @@ function useTextElementOperations(input) {
4957
4980
  );
4958
4981
  const toggleSelectedBullets = useCallback(
4959
4982
  (kind) => {
4960
- if (!selectedElement || !(0, dist_exports.hasTextProperties)(selectedElement)) {
4983
+ if (!selectedElement || !hasTextProperties(selectedElement)) {
4961
4984
  return;
4962
4985
  }
4963
4986
  const currentSegments = liveTextSegments();
@@ -5008,7 +5031,7 @@ function useTextElementOperations(input) {
5008
5031
  );
5009
5032
  const updateSelectedTextCase = useCallback(
5010
5033
  (mode) => {
5011
- if (!selectedElement || !(0, dist_exports.hasTextProperties)(selectedElement)) {
5034
+ if (!selectedElement || !hasTextProperties(selectedElement)) {
5012
5035
  return;
5013
5036
  }
5014
5037
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
@@ -5160,7 +5183,7 @@ function useElementOperations(input) {
5160
5183
  );
5161
5184
  const updateSelectedShapeStyle = useCallback(
5162
5185
  (updates) => {
5163
- if (!selectedElement || !(0, dist_exports.hasShapeProperties)(selectedElement)) {
5186
+ if (!selectedElement || !hasShapeProperties(selectedElement)) {
5164
5187
  return;
5165
5188
  }
5166
5189
  updateSelectedElement({
@@ -5900,7 +5923,7 @@ function useCanvasInteractions(input) {
5900
5923
  return;
5901
5924
  }
5902
5925
  const el = elementLookup.get(editId);
5903
- if (el && (0, dist_exports.hasTextProperties)(el)) {
5926
+ if (el && hasTextProperties(el)) {
5904
5927
  const reader = inlineEditingReaderRef?.current;
5905
5928
  const read = reader?.elementId === editId ? reader.read() : void 0;
5906
5929
  if (read?.kind === "unsupported") {
@@ -5947,7 +5970,7 @@ function useCanvasInteractions(input) {
5947
5970
  wasEditable.current = canEdit;
5948
5971
  }, [canEdit]);
5949
5972
  const openEquationEditorForElement = (el) => {
5950
- if (!(0, dist_exports.hasTextProperties)(el)) {
5973
+ if (!hasTextProperties(el)) {
5951
5974
  return false;
5952
5975
  }
5953
5976
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -5980,7 +6003,7 @@ function useCanvasInteractions(input) {
5980
6003
  justInteractedRef.current = false;
5981
6004
  } else {
5982
6005
  const el = elementLookup.get(elementId);
5983
- if (el && (0, dist_exports.hasTextProperties)(el) && canInteractWithElement(el, "textEdit")) {
6006
+ if (el && hasTextProperties(el) && canInteractWithElement(el, "textEdit")) {
5984
6007
  if (!openEquationEditorForElement(el)) {
5985
6008
  setPendingCaretPoint(e);
5986
6009
  setInlineEditingElementId(elementId);
@@ -6006,7 +6029,7 @@ function useCanvasInteractions(input) {
6006
6029
  if (openEquationEditorForElement(el)) {
6007
6030
  return;
6008
6031
  }
6009
- if ((0, dist_exports.hasTextProperties)(el) && canInteractWithElement(el, "textEdit")) {
6032
+ if (hasTextProperties(el) && canInteractWithElement(el, "textEdit")) {
6010
6033
  setInlineEditingElementId(elementId);
6011
6034
  setInlineEditingText(el.text ?? "");
6012
6035
  }
@@ -6521,7 +6544,7 @@ function createStructuredElementHandlers(deps) {
6521
6544
  if (!preset) {
6522
6545
  return;
6523
6546
  }
6524
- const defaultPptxAction = (0, dist_exports.elementActionToPptxAction)({
6547
+ const defaultPptxAction = elementActionToPptxAction({
6525
6548
  trigger: "click",
6526
6549
  type: preset.defaultAction
6527
6550
  });
@@ -7168,7 +7191,7 @@ function useSlideManagement(input) {
7168
7191
  if (!src) {
7169
7192
  continue;
7170
7193
  }
7171
- const clone = { ...(0, dist_exports.duplicateSlide)(src, next.length + 1), id: makeSlideId() };
7194
+ const clone = { ...duplicateSlide(src, next.length + 1), id: makeSlideId() };
7172
7195
  next.splice(i + offset + 1, 0, clone);
7173
7196
  offset++;
7174
7197
  }
@@ -7280,7 +7303,7 @@ function createTableMergeHandlers(input) {
7280
7303
  td
7281
7304
  );
7282
7305
  const updates = { tableData: newTableData };
7283
- const newRawXml = (0, dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7306
+ const newRawXml = updateMergeAttrsInRawXml(selectedElement, newTableData);
7284
7307
  if (newRawXml) {
7285
7308
  updates.rawXml = newRawXml;
7286
7309
  }
@@ -7314,7 +7337,7 @@ function createTableMergeHandlers(input) {
7314
7337
  td
7315
7338
  );
7316
7339
  const updates = { tableData: newTableData };
7317
- const newRawXml = (0, dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7340
+ const newRawXml = updateMergeAttrsInRawXml(selectedElement, newTableData);
7318
7341
  if (newRawXml) {
7319
7342
  updates.rawXml = newRawXml;
7320
7343
  }
@@ -7331,7 +7354,7 @@ function createTableMergeHandlers(input) {
7331
7354
  const td = selectedElement.tableData;
7332
7355
  const newTableData = mergeCells(ts.selectedCells, td);
7333
7356
  const updates = { tableData: newTableData };
7334
- const newRawXml = (0, dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7357
+ const newRawXml = updateMergeAttrsInRawXml(selectedElement, newTableData);
7335
7358
  if (newRawXml) {
7336
7359
  updates.rawXml = newRawXml;
7337
7360
  }
@@ -7350,7 +7373,7 @@ function createTableMergeHandlers(input) {
7350
7373
  const td = selectedElement.tableData;
7351
7374
  const newTableData = splitCell(rowIndex, columnIndex, td);
7352
7375
  const updates = { tableData: newTableData };
7353
- const newRawXml = (0, dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7376
+ const newRawXml = updateMergeAttrsInRawXml(selectedElement, newTableData);
7354
7377
  if (newRawXml) {
7355
7378
  updates.rawXml = newRawXml;
7356
7379
  }
@@ -7385,7 +7408,7 @@ function createTableStructHandlers(input) {
7385
7408
  updates.tableData = setCellText(el, rowIndex, colIndex, text).tableData;
7386
7409
  }
7387
7410
  if (el.rawXml) {
7388
- const newRawXml = (0, dist_exports.updateCellTextInRawXml)(el, rowIndex, colIndex, text);
7411
+ const newRawXml = updateCellTextInRawXml(el, rowIndex, colIndex, text);
7389
7412
  if (newRawXml) {
7390
7413
  updates.rawXml = newRawXml;
7391
7414
  }
@@ -7409,7 +7432,7 @@ function createTableStructHandlers(input) {
7409
7432
  const { rowIndex, columnIndex: colIndex } = ts;
7410
7433
  const updates = {};
7411
7434
  if (selectedElement.rawXml) {
7412
- const newRawXml = (0, dist_exports.updateCellTextStyleInRawXml)(
7435
+ const newRawXml = updateCellTextStyleInRawXml(
7413
7436
  selectedElement,
7414
7437
  rowIndex,
7415
7438
  colIndex,
@@ -7543,6 +7566,8 @@ function useExportSaveAs(input) {
7543
7566
  slides,
7544
7567
  templateElementsBySlideId,
7545
7568
  filePath,
7569
+ storage,
7570
+ onSaveError,
7546
7571
  serializeSlides,
7547
7572
  headerFooter,
7548
7573
  presentationProperties,
@@ -7558,18 +7583,25 @@ function useExportSaveAs(input) {
7558
7583
  canvasSize,
7559
7584
  slideSizeEmu
7560
7585
  } = input;
7561
- const handleSaveAsFormat = async (format) => {
7586
+ const handleSaveAsFormat = async (format, reason = "saveAs") => {
7562
7587
  const downloadName = savedPresentationFileName(filePath, format);
7563
7588
  try {
7564
7589
  const data = await serializeSlides(format);
7565
7590
  if (!data) {
7566
- return;
7591
+ return false;
7567
7592
  }
7568
- const mimeType = format === "ppt" ? "application/vnd.ms-powerpoint" : "application/vnd.openxmlformats-officedocument.presentationml.presentation";
7569
- const blob = new Blob([data], { type: mimeType });
7570
- downloadBlob(blob, downloadName);
7593
+ await deliverSavedPresentation({
7594
+ storage,
7595
+ bytes: data,
7596
+ format,
7597
+ fileName: downloadName,
7598
+ reason
7599
+ });
7600
+ return true;
7571
7601
  } catch (err) {
7572
7602
  console.error(`[PowerPointViewer] Save as .${format} failed:`, err);
7603
+ onSaveError?.(err);
7604
+ return false;
7573
7605
  }
7574
7606
  };
7575
7607
  const handleExportJson = () => {
@@ -7600,6 +7632,9 @@ function useExportSaveAs(input) {
7600
7632
  console.error("[PowerPointViewer] JSON export failed:", err);
7601
7633
  }
7602
7634
  };
7635
+ const handleSave = () => {
7636
+ void handleSaveAsFormat("pptx", "save");
7637
+ };
7603
7638
  const handleSaveAsPptx = () => {
7604
7639
  void handleSaveAsFormat("pptx");
7605
7640
  };
@@ -7615,6 +7650,7 @@ function useExportSaveAs(input) {
7615
7650
  return {
7616
7651
  handleExportJson,
7617
7652
  handleSaveAsFormat,
7653
+ handleSave,
7618
7654
  handleSaveAsPptx,
7619
7655
  handleSaveAsPpsx,
7620
7656
  handleSaveAsPptm,
@@ -7944,8 +7980,6 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
7944
7980
  new Uint8Array(buf).set(gifBytes);
7945
7981
  return new Blob([buf], { type: "image/gif" });
7946
7982
  }
7947
-
7948
- // src/viewer/utils/export-svg.ts
7949
7983
  function injectFontFaces(svg, fontFaces) {
7950
7984
  if (!fontFaces.length) {
7951
7985
  return svg;
@@ -7992,7 +8026,7 @@ function exportAllSlidesToSvg(data, options = {}) {
7992
8026
  continue;
7993
8027
  }
7994
8028
  onProgress?.(processedCount, data.slides.length);
7995
- let svg = dist_exports.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
8029
+ let svg = SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7996
8030
  if (embedFonts && fontFaces?.length) {
7997
8031
  svg = injectFontFaces(svg, fontFaces);
7998
8032
  }
@@ -8222,6 +8256,8 @@ function useExportHandlers(input) {
8222
8256
  activeSlide,
8223
8257
  activeSlideIndex,
8224
8258
  filePath,
8259
+ storage,
8260
+ onSaveError,
8225
8261
  canvasStageRef,
8226
8262
  setActiveSlideIndex,
8227
8263
  serializeSlides,
@@ -8275,6 +8311,7 @@ function useExportHandlers(input) {
8275
8311
  const {
8276
8312
  handleExportJson,
8277
8313
  handleSaveAsFormat,
8314
+ handleSave,
8278
8315
  handleSaveAsPptx,
8279
8316
  handleSaveAsPpsx,
8280
8317
  handleSaveAsPptm,
@@ -8283,6 +8320,8 @@ function useExportHandlers(input) {
8283
8320
  slides,
8284
8321
  templateElementsBySlideId,
8285
8322
  filePath,
8323
+ storage,
8324
+ onSaveError,
8286
8325
  serializeSlides,
8287
8326
  headerFooter,
8288
8327
  presentationProperties,
@@ -8383,6 +8422,7 @@ function useExportHandlers(input) {
8383
8422
  handleExportGif,
8384
8423
  handleExportJson,
8385
8424
  handleSaveAsFormat,
8425
+ handleSave,
8386
8426
  handleSaveAsPptx,
8387
8427
  handleSaveAsPpsx,
8388
8428
  handleSaveAsPptm,
@@ -8394,8 +8434,10 @@ function useExportHandlers(input) {
8394
8434
  exportStatusMessage
8395
8435
  };
8396
8436
  }
8397
- var ViewerOptionsContext = createContext(DEFAULT_VIEWER_OPTIONS);
8398
- var ViewerOptionsStoreContext = createContext(null);
8437
+ var ViewerOptionsContext = /* @__PURE__ */ createContext(DEFAULT_VIEWER_OPTIONS);
8438
+ var ViewerOptionsStoreContext = /* @__PURE__ */ createContext(
8439
+ null
8440
+ );
8399
8441
  function useViewerOptionsContext() {
8400
8442
  return useContext(ViewerOptionsContext);
8401
8443
  }
@@ -8564,8 +8606,6 @@ function usePrintHandlers(input) {
8564
8606
  setIsPrintDialogOpen
8565
8607
  };
8566
8608
  }
8567
-
8568
- // src/viewer/hooks/theme-editor-apply.ts
8569
8609
  async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
8570
8610
  const {
8571
8611
  handlerRef,
@@ -8581,10 +8621,10 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
8581
8621
  return;
8582
8622
  }
8583
8623
  await handler.applyTheme(colorScheme, fontScheme, name);
8584
- const previousMap = theme?.colorScheme ? (0, dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8624
+ const previousMap = theme?.colorScheme ? buildThemeColorMap(theme.colorScheme) : {};
8585
8625
  bumpHistory();
8586
8626
  setSlides(
8587
- (slides) => (0, dist_exports.applyThemeToData)(
8627
+ (slides) => applyThemeToData(
8588
8628
  { slides, theme, themeColorMap: previousMap },
8589
8629
  colorScheme,
8590
8630
  fontScheme,
@@ -8595,8 +8635,8 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
8595
8635
  (prev) => Object.fromEntries(
8596
8636
  Object.entries(prev).map(([id, elements]) => [
8597
8637
  id,
8598
- (0, dist_exports.reResolveElementFonts)(
8599
- (0, dist_exports.reResolveElementColors)(elements, previousMap, colorScheme),
8638
+ reResolveElementFonts(
8639
+ reResolveElementColors(elements, previousMap, colorScheme),
8600
8640
  theme?.fontScheme,
8601
8641
  fontScheme
8602
8642
  )
@@ -8654,13 +8694,13 @@ function useThemeHandlers(input) {
8654
8694
  return;
8655
8695
  }
8656
8696
  await handler.updateThemeColorScheme(colorScheme);
8657
- const previousMap = theme?.colorScheme ? (0, dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8658
- setSlides((prev) => (0, dist_exports.reResolveSlideColors)(prev, previousMap, colorScheme));
8697
+ const previousMap = theme?.colorScheme ? buildThemeColorMap(theme.colorScheme) : {};
8698
+ setSlides((prev) => reResolveSlideColors(prev, previousMap, colorScheme));
8659
8699
  if (Object.keys(templateElementsBySlideId).length > 0) {
8660
8700
  setTemplateElementsBySlideId((prev) => {
8661
8701
  const next = {};
8662
8702
  for (const [slideId, elements] of Object.entries(prev)) {
8663
- next[slideId] = (0, dist_exports.reResolveElementColors)(elements, previousMap, colorScheme);
8703
+ next[slideId] = reResolveElementColors(elements, previousMap, colorScheme);
8664
8704
  }
8665
8705
  return next;
8666
8706
  });
@@ -8771,7 +8811,7 @@ function useThemeSwitching(input) {
8771
8811
  }
8772
8812
  try {
8773
8813
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
8774
- const newData = (0, dist_exports.applyThemeToData)(data, preset.colorScheme, preset.fontScheme, preset.name);
8814
+ const newData = applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
8775
8815
  onDataChange(newData);
8776
8816
  onThemeChanged?.(preset);
8777
8817
  } catch (error) {
@@ -8788,7 +8828,7 @@ function useThemeSwitching(input) {
8788
8828
  }
8789
8829
  try {
8790
8830
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
8791
- const newData = (0, dist_exports.applyThemeToData)(data, colorScheme, fontScheme, themeName);
8831
+ const newData = applyThemeToData(data, colorScheme, fontScheme, themeName);
8792
8832
  onDataChange(newData);
8793
8833
  } catch (error) {
8794
8834
  console.error("Failed to switch to custom theme:", error);
@@ -8800,12 +8840,12 @@ function useThemeSwitching(input) {
8800
8840
  if (!data?.theme?.colorScheme) {
8801
8841
  return void 0;
8802
8842
  }
8803
- return dist_exports.THEME_PRESETS.find(
8804
- (p) => (0, dist_exports.themeColorSchemesEqual)(data.theme?.colorScheme, p.colorScheme)
8843
+ return THEME_PRESETS.find(
8844
+ (p) => themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
8805
8845
  );
8806
8846
  }, [data?.theme?.colorScheme]);
8807
8847
  return {
8808
- presets: dist_exports.THEME_PRESETS,
8848
+ presets: THEME_PRESETS,
8809
8849
  switchToPreset,
8810
8850
  switchToCustom,
8811
8851
  currentPreset
@@ -8826,7 +8866,9 @@ function usePropertyHandlers(input) {
8826
8866
  setSlides,
8827
8867
  setIsDirty,
8828
8868
  ops,
8829
- history
8869
+ history,
8870
+ onPropertiesChange,
8871
+ onNotesUpdate
8830
8872
  } = input;
8831
8873
  const [isVersionHistoryOpen, setIsVersionHistoryOpen] = useState(false);
8832
8874
  const [isComparePanelOpen, setIsComparePanelOpen] = useState(false);
@@ -8842,6 +8884,7 @@ function usePropertyHandlers(input) {
8842
8884
  )
8843
8885
  );
8844
8886
  history.markDirty();
8887
+ onNotesUpdate?.(text);
8845
8888
  };
8846
8889
  const handleUpdateSlide = (updates) => {
8847
8890
  ops.updateSlides(
@@ -8856,6 +8899,7 @@ function usePropertyHandlers(input) {
8856
8899
  const handleUpdateCoreProperties = (updates) => {
8857
8900
  setCoreProperties((prev) => ({ ...prev, ...updates }));
8858
8901
  history.markDirty();
8902
+ onPropertiesChange?.(updates);
8859
8903
  };
8860
8904
  const handleUpdateAppProperties = (updates) => {
8861
8905
  setAppProperties((prev) => ({ ...prev, ...updates }));
@@ -8882,7 +8926,7 @@ function usePropertyHandlers(input) {
8882
8926
  }
8883
8927
  try {
8884
8928
  const ab = await file.arrayBuffer();
8885
- const h = new dist_exports.PptxHandler();
8929
+ const h = new PptxHandler();
8886
8930
  const other = await h.load(ab);
8887
8931
  if (!other) {
8888
8932
  return;
@@ -9490,7 +9534,7 @@ function overlayPendingInlineEdit(document2, elementId, text, snapshot, transfor
9490
9534
  (slide) => !elementId ? slide : {
9491
9535
  ...slide,
9492
9536
  elements: slide.elements.map(
9493
- (element) => element.id === elementId && (0, dist_exports.hasTextProperties)(element) ? {
9537
+ (element) => element.id === elementId && hasTextProperties(element) ? {
9494
9538
  ...element,
9495
9539
  text,
9496
9540
  textSegments: remapTextToSegments(
@@ -9579,7 +9623,7 @@ function useSerialize(input) {
9579
9623
  const pptxGuides = guides.map((g) => ({
9580
9624
  id: g.id,
9581
9625
  orientation: g.axis === "h" ? "horz" : "vert",
9582
- positionEmu: (0, dist_exports.guidePxToEmu)(g.position)
9626
+ positionEmu: guidePxToEmu(g.position)
9583
9627
  }));
9584
9628
  return {
9585
9629
  ...slide,
@@ -9656,6 +9700,12 @@ function useRecoveryDetection(input) {
9656
9700
  const [prompt, setPrompt] = useState(null);
9657
9701
  const [discarding, setDiscarding] = useState(false);
9658
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]);
9659
9709
  const openVersionHistory = input.openVersionHistory;
9660
9710
  useEffect(() => {
9661
9711
  if (!shouldProbeAutosaveRecovery({
@@ -9670,12 +9720,18 @@ function useRecoveryDetection(input) {
9670
9720
  }
9671
9721
  recoveryCheckedRef.current = true;
9672
9722
  void (async () => {
9673
- const offer = await probeAutosaveRecovery(filePath, Date.now(), fileName);
9723
+ const offer = await probeAutosaveRecovery(
9724
+ filePath,
9725
+ Date.now(),
9726
+ fileName,
9727
+ storageRef.current
9728
+ );
9674
9729
  if (!offer) {
9675
9730
  return;
9676
9731
  }
9677
9732
  recordRef.current = offer.record;
9678
9733
  setPrompt(offer.prompt);
9734
+ onOfferedRef.current?.(offer.record);
9679
9735
  openVersionHistory?.();
9680
9736
  })();
9681
9737
  }, [filePath, fileName, loading, error, slideCount, autosaveAllowed, openVersionHistory]);
@@ -9705,7 +9761,7 @@ function useRecoveryDetection(input) {
9705
9761
  setDiscarding(true);
9706
9762
  void (async () => {
9707
9763
  try {
9708
- await discardAutosaveRecovery(record);
9764
+ await discardAutosaveRecovery(record, storageRef.current);
9709
9765
  recordRef.current = null;
9710
9766
  setPrompt(null);
9711
9767
  } catch {
@@ -9890,10 +9946,10 @@ function useCanvasImagePaste(input) {
9890
9946
  function formatPatchFor(element, format) {
9891
9947
  const updated = applyFormatToElement(element, format);
9892
9948
  const updates = {};
9893
- if ((0, dist_exports.hasShapeProperties)(updated)) {
9949
+ if (hasShapeProperties(updated)) {
9894
9950
  updates.shapeStyle = updated.shapeStyle;
9895
9951
  }
9896
- if ((0, dist_exports.hasTextProperties)(updated)) {
9952
+ if (hasTextProperties(updated)) {
9897
9953
  updates.textStyle = updated.textStyle;
9898
9954
  }
9899
9955
  return updates;
@@ -10353,6 +10409,8 @@ function useIOHandlers(input) {
10353
10409
  activeSlideIndex,
10354
10410
  canvasSize,
10355
10411
  filePath,
10412
+ storage,
10413
+ onSaveError,
10356
10414
  history,
10357
10415
  ops,
10358
10416
  zoom,
@@ -10361,6 +10419,8 @@ function useIOHandlers(input) {
10361
10419
  serializeForRecovery,
10362
10420
  setContent,
10363
10421
  onContentChange,
10422
+ onPropertiesChange,
10423
+ onNotesUpdate,
10364
10424
  imageExportScale,
10365
10425
  imageResolutionScale
10366
10426
  } = input;
@@ -10370,6 +10430,8 @@ function useIOHandlers(input) {
10370
10430
  activeSlide: slides[activeSlideIndex],
10371
10431
  activeSlideIndex,
10372
10432
  filePath,
10433
+ storage,
10434
+ onSaveError,
10373
10435
  canvasStageRef: zoom.canvasStageRef,
10374
10436
  setActiveSlideIndex: state.setActiveSlideIndex,
10375
10437
  serializeSlides,
@@ -10424,7 +10486,9 @@ function useIOHandlers(input) {
10424
10486
  setSlides: state.setSlides,
10425
10487
  setIsDirty: state.setIsDirty,
10426
10488
  ops,
10427
- history
10489
+ history,
10490
+ onPropertiesChange,
10491
+ onNotesUpdate
10428
10492
  });
10429
10493
  return { exportHandlers, printHandlers, themeHandlers, propertyHandlers };
10430
10494
  }
@@ -10592,6 +10656,7 @@ function useContentLifecycle(input) {
10592
10656
  filePath,
10593
10657
  autosaveEnabled = true,
10594
10658
  autosaveIntervalMs,
10659
+ storage,
10595
10660
  embedFonts = true,
10596
10661
  slides,
10597
10662
  state,
@@ -10703,6 +10768,7 @@ function useContentLifecycle(input) {
10703
10768
  const { autosaveStatus } = useAutosave({
10704
10769
  isDirty: state.isDirty,
10705
10770
  filePath,
10771
+ storage,
10706
10772
  serializeSlides: serializeForRecovery,
10707
10773
  enabled: autosaveEnabled,
10708
10774
  ...autosaveIntervalMs === void 0 ? {} : { intervalMs: autosaveIntervalMs },
@@ -10710,6 +10776,7 @@ function useContentLifecycle(input) {
10710
10776
  // so a poll that finds all of them unchanged can skip re-serializing a
10711
10777
  // deck it has already snapshotted. The two refs are read by `.current`
10712
10778
  // because an inline edit in progress lives there and nowhere else yet.
10779
+ onSaved: input.onAutosave,
10713
10780
  getChangeSources: () => [
10714
10781
  slides,
10715
10782
  state.templateElementsBySlideId,
@@ -11002,7 +11069,7 @@ function useKeyboardShortcutWiring(input) {
11002
11069
  }
11003
11070
  function stepSelectedFontSize(state, ops, direction) {
11004
11071
  const selected = state.selectedElement;
11005
- 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);
11006
11073
  const nextPt = stepFontSizePt(textFontSizePxToPt(currentPx), direction);
11007
11074
  ops.updateSelectedTextStyle({ fontSize: textFontSizePtToPx(nextPt) });
11008
11075
  }
@@ -11049,6 +11116,20 @@ function useElementUpdateBatch(input) {
11049
11116
  );
11050
11117
  }, []);
11051
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
+ }
11052
11133
 
11053
11134
  // src/viewer/hooks/useViewerIntegration.ts
11054
11135
  function useViewerIntegration(input) {
@@ -11065,6 +11146,7 @@ function useViewerIntegration(input) {
11065
11146
  content,
11066
11147
  filePath,
11067
11148
  fileName,
11149
+ storage,
11068
11150
  autosaveEnabled,
11069
11151
  autosaveAllowed = true,
11070
11152
  autosaveIntervalMs,
@@ -11093,7 +11175,13 @@ function useViewerIntegration(input) {
11093
11175
  onModeChange,
11094
11176
  onZoomChange,
11095
11177
  onSelectionChange,
11096
- onSlideCountChange
11178
+ onSlideCountChange,
11179
+ onAutosave,
11180
+ onAutosaveStatus,
11181
+ onAutosaveRecovery,
11182
+ onPropertiesChange,
11183
+ onNotesUpdate,
11184
+ onPresentationChange
11097
11185
  } = input;
11098
11186
  usePointerHandlers({
11099
11187
  editorScale: zoom.editorScale,
@@ -11131,8 +11219,10 @@ function useViewerIntegration(input) {
11131
11219
  {
11132
11220
  content,
11133
11221
  filePath,
11222
+ storage,
11134
11223
  autosaveEnabled,
11135
11224
  autosaveIntervalMs,
11225
+ onAutosave,
11136
11226
  // The File > Fonts toggle, finally reaching a save call.
11137
11227
  embedFonts: dialogs.embedFontsEnabled,
11138
11228
  slides,
@@ -11157,6 +11247,8 @@ function useViewerIntegration(input) {
11157
11247
  activeSlideIndex,
11158
11248
  canvasSize,
11159
11249
  filePath,
11250
+ storage,
11251
+ onSaveError: input.onSaveError,
11160
11252
  history,
11161
11253
  ops: editorOps.ops,
11162
11254
  zoom,
@@ -11165,6 +11257,8 @@ function useViewerIntegration(input) {
11165
11257
  serializeForRecovery,
11166
11258
  setContent,
11167
11259
  onContentChange,
11260
+ onPropertiesChange,
11261
+ onNotesUpdate,
11168
11262
  imageExportScale,
11169
11263
  imageResolutionScale
11170
11264
  });
@@ -11191,6 +11285,8 @@ function useViewerIntegration(input) {
11191
11285
  error,
11192
11286
  slideCount: slides.length,
11193
11287
  autosaveAllowed,
11288
+ storage,
11289
+ onOffered: onAutosaveRecovery,
11194
11290
  onRestore: setContent
11195
11291
  });
11196
11292
  const updateElements = useElementUpdateBatch(input);
@@ -11413,6 +11509,8 @@ function useViewerIntegration(input) {
11413
11509
  onSlideCountChange(slides.length);
11414
11510
  }
11415
11511
  }, [slides.length, onSlideCountChange]);
11512
+ useReportOnChange(autosaveStatusKind(autosaveStatus), onAutosaveStatus);
11513
+ useReportOnChange(mode === "present", onPresentationChange);
11416
11514
  useKeyboardShortcutWiring({
11417
11515
  state,
11418
11516
  mode,
@@ -11506,7 +11604,9 @@ function useViewerOptions() {
11506
11604
  );
11507
11605
  return { optionsStore: store, options };
11508
11606
  }
11509
- 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
+ );
11510
11610
  function computeToolbarVisibility(hiddenActions, hiddenTabIds = []) {
11511
11611
  const isHidden = (id) => isActionHidden(id, hiddenActions);
11512
11612
  const userHidden = new Set(hiddenTabIds);
@@ -11553,19 +11653,25 @@ function useCollaborativeHistory({
11553
11653
  function useCollaborationWriteBack(input) {
11554
11654
  const latest = useRef(input);
11555
11655
  latest.current = input;
11556
- const scheduler = useMemo(
11557
- () => createWriteBackScheduler({
11656
+ const scheduler = useMemo(() => {
11657
+ const created = createWriteBackScheduler({
11558
11658
  getYDoc: () => latest.current.doc,
11559
11659
  getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
11560
11660
  getSaveOptions: () => latest.current.getSaveOptions?.(),
11561
11661
  getTemplateElements: () => latest.current.templateElementsBySlideId,
11562
- mergeTemplateElements: buildSaveSlides
11563
- }),
11564
- [latest]
11565
- );
11662
+ mergeTemplateElements: buildSaveSlides,
11663
+ onWriteBackStatus: () => latest.current.onWriteBackStatus?.(
11664
+ writeBackReport(latest.current.config, created.getState())
11665
+ )
11666
+ });
11667
+ return created;
11668
+ }, [latest]);
11566
11669
  const hasWriteBack = Boolean(input.config?.onWriteBack);
11567
11670
  useEffect(
11568
- () => () => scheduler.cancel(),
11671
+ () => () => {
11672
+ scheduler.cancel();
11673
+ latest.current.onWriteBackStatus?.(void 0);
11674
+ },
11569
11675
  [scheduler, input.doc, input.config?.role, hasWriteBack, input.config?.externalSession]
11570
11676
  );
11571
11677
  return useCallback(() => {
@@ -11579,7 +11685,7 @@ function useCollaborationWriteBack(input) {
11579
11685
  onWriteBack: config.onWriteBack ? (bytes) => {
11580
11686
  const current = latest.current;
11581
11687
  if (current.doc === doc && current.config?.role === "owner" && current.config.externalSession === session) {
11582
- current.config.onWriteBack?.(bytes);
11688
+ return current.config.onWriteBack?.(bytes);
11583
11689
  }
11584
11690
  } : void 0
11585
11691
  });
@@ -12602,6 +12708,7 @@ function buildToolbarProps(input) {
12602
12708
  s.setIsDirty(true);
12603
12709
  },
12604
12710
  onOpenShareDialog,
12711
+ onSave: exportHandlers.handleSave,
12605
12712
  onSaveAsPptx: exportHandlers.handleSaveAsPptx,
12606
12713
  onSaveAsPpsx: exportHandlers.handleSaveAsPpsx,
12607
12714
  onSaveAsPptm: exportHandlers.handleSaveAsPptm,
@@ -12860,7 +12967,8 @@ function useCollaborationDocumentSync(input) {
12860
12967
  config,
12861
12968
  livePatcher: state.livePatcher,
12862
12969
  getSourceBytes,
12863
- getSaveOptions
12970
+ getSaveOptions,
12971
+ ...collaboration?.reportWriteBack ? { onWriteBackStatus: collaboration.reportWriteBack } : {}
12864
12972
  });
12865
12973
  const initialized = useCollaborationLivePatch({
12866
12974
  patcher: state.livePatcher,
@@ -13003,7 +13111,7 @@ function useViewerBuildingBlocksCore(input) {
13003
13111
  documentGridSpacing: state.viewProperties?.gridSpacing
13004
13112
  });
13005
13113
  const themeColorMap = useMemo(
13006
- () => state.theme?.colorScheme ? (0, dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
13114
+ () => state.theme?.colorScheme ? buildThemeColorMap(state.theme.colorScheme) : void 0,
13007
13115
  [state.theme?.colorScheme]
13008
13116
  );
13009
13117
  const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
@@ -13787,7 +13895,7 @@ function renderImg(el, style, filter, alt, opacity) {
13787
13895
  ] });
13788
13896
  }
13789
13897
  const colorWash = getImageColorWashStyle(
13790
- (0, dist_exports.isImageLikeElement)(el) ? el.imageEffects?.colorWash : void 0
13898
+ isImageLikeElement(el) ? el.imageEffects?.colorWash : void 0
13791
13899
  );
13792
13900
  const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
13793
13901
  const duotoneColors = getDuotoneColors(el);
@@ -13876,11 +13984,17 @@ function SlideBackgroundImageLayer({
13876
13984
  }
13877
13985
  );
13878
13986
  }
13879
- 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);
13880
13994
  function useChartFormatContext() {
13881
13995
  return useContext(ChartFormatContext);
13882
13996
  }
13883
- var ChartPartSelectionContext = createContext({
13997
+ var ChartPartSelectionContext = /* @__PURE__ */ createContext({
13884
13998
  selection: null,
13885
13999
  setSelection: () => {
13886
14000
  }
@@ -13903,7 +14017,9 @@ var DEFAULT_RENDERING_3D_FLAGS = {
13903
14017
  areaChart3D: false,
13904
14018
  pieChart3D: false
13905
14019
  };
13906
- var Rendering3DFlagsContext = createContext(DEFAULT_RENDERING_3D_FLAGS);
14020
+ var Rendering3DFlagsContext = /* @__PURE__ */ createContext(
14021
+ DEFAULT_RENDERING_3D_FLAGS
14022
+ );
13907
14023
  defineThreeViewElement();
13908
14024
  function useThreeViewEvent(ref, type, handler) {
13909
14025
  useLayoutEffect(() => {
@@ -14425,26 +14541,26 @@ var rotateSize = "var(--pptx-react-rotate-default, 20px)";
14425
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]";
14426
14542
  var ROTATE_DEFAULT_CLASSES = "[--pptx-react-rotate-default:20px] max-md:[--pptx-react-rotate-default:28px]";
14427
14543
  var RESIZE_ARTWORK = {
14428
- corner: getSelectionControlArtworkStyle("corner", {
14544
+ corner: /* @__PURE__ */ getSelectionControlArtworkStyle("corner", {
14429
14545
  ...appearance,
14430
14546
  width: cornerSize,
14431
14547
  height: cornerSize,
14432
14548
  radius: "9999px"
14433
14549
  }),
14434
- horizontal: getSelectionControlArtworkStyle("horizontal-edge", {
14550
+ horizontal: /* @__PURE__ */ getSelectionControlArtworkStyle("horizontal-edge", {
14435
14551
  ...appearance,
14436
14552
  width: edgeLength,
14437
14553
  height: edgeThickness,
14438
14554
  radius: "var(--radius-sm, 0.25rem)"
14439
14555
  }),
14440
- vertical: getSelectionControlArtworkStyle("vertical-edge", {
14556
+ vertical: /* @__PURE__ */ getSelectionControlArtworkStyle("vertical-edge", {
14441
14557
  ...appearance,
14442
14558
  width: edgeThickness,
14443
14559
  height: edgeLength,
14444
14560
  radius: "var(--radius-sm, 0.25rem)"
14445
14561
  })
14446
14562
  };
14447
- var ROTATE_ARTWORK = getSelectionControlArtworkStyle("rotate", {
14563
+ var ROTATE_ARTWORK = /* @__PURE__ */ getSelectionControlArtworkStyle("rotate", {
14448
14564
  ...appearance,
14449
14565
  width: rotateSize,
14450
14566
  height: rotateSize,
@@ -14686,7 +14802,7 @@ function ResizeHandles({
14686
14802
  ))
14687
14803
  ] });
14688
14804
  }
14689
- var ConnectorElementRenderer = React17.memo(
14805
+ var ConnectorElementRendererMemo = /* @__PURE__ */ React17.memo(
14690
14806
  // oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
14691
14807
  function ConnectorElementRendererInner({
14692
14808
  el,
@@ -14703,7 +14819,7 @@ var ConnectorElementRenderer = React17.memo(
14703
14819
  animationState,
14704
14820
  textStyleOverrideCss
14705
14821
  }) {
14706
- const shapeEl = (0, dist_exports.hasShapeProperties)(el) ? el : void 0;
14822
+ const shapeEl = hasShapeProperties(el) ? el : void 0;
14707
14823
  const viewWidth = Math.max(el.width, 0);
14708
14824
  const viewHeight = Math.max(el.height, 0);
14709
14825
  const svgWidth = Math.max(el.width, 1);
@@ -14727,7 +14843,7 @@ var ConnectorElementRenderer = React17.memo(
14727
14843
  const compoundOffsets = getCompoundLineOffsets(compoundLine, strokeWidth);
14728
14844
  const compoundWidths = getCompoundLineWidths(compoundLine, strokeWidth);
14729
14845
  const strokeCap = svgLineCap(ss?.lineCap);
14730
- const textEl = (0, dist_exports.hasTextProperties)(el) ? el : void 0;
14846
+ const textEl = hasTextProperties(el) ? el : void 0;
14731
14847
  const connectorText = textEl?.text?.trim() ?? "";
14732
14848
  const connectorTextSegments = textEl?.textSegments;
14733
14849
  const connectorTextStyle = textEl?.textStyle;
@@ -14748,8 +14864,8 @@ var ConnectorElementRenderer = React17.memo(
14748
14864
  "data-pptx-element": "true",
14749
14865
  "data-element-id": el.id,
14750
14866
  role: getAriaRole(el, { actionable: false }),
14751
- "aria-label": getAriaLabel(el),
14752
- "aria-roledescription": getAriaRoleDescription(el),
14867
+ "aria-label": getAriaLabel$1(el),
14868
+ "aria-roledescription": getAriaRoleDescription$1(el),
14753
14869
  "aria-selected": isSelected ? true : void 0,
14754
14870
  className: "absolute",
14755
14871
  style: {
@@ -14930,7 +15046,10 @@ var ConnectorElementRenderer = React17.memo(
14930
15046
  );
14931
15047
  }
14932
15048
  );
14933
- ConnectorElementRenderer.displayName = "ConnectorElementRenderer";
15049
+ var ConnectorElementRenderer = /* @__PURE__ */ withDisplayName(
15050
+ ConnectorElementRendererMemo,
15051
+ "ConnectorElementRenderer"
15052
+ );
14934
15053
  function getElementInteractionProps({
14935
15054
  element,
14936
15055
  isEditableText,
@@ -15015,7 +15134,7 @@ function getContainerStyle({
15015
15134
  has3DExtrusion,
15016
15135
  templateEditing
15017
15136
  }) {
15018
- const ss = (0, dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
15137
+ const ss = hasShapeProperties(el) ? el.shapeStyle : void 0;
15019
15138
  const isPicture = el.type === "picture" || el.type === "image";
15020
15139
  const blurGrowVisible = Boolean(
15021
15140
  ss?.blurGrow && typeof ss.blurRadius === "number" && ss.blurRadius > 0
@@ -15067,14 +15186,14 @@ function getContainerStyle({
15067
15186
  };
15068
15187
  }
15069
15188
  function shapeParams(element) {
15070
- const style = (0, dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
15189
+ const style = hasShapeProperties(element) ? element.shapeStyle : void 0;
15071
15190
  const strokeWidth = paintedStrokeWidth(style);
15072
15191
  const strokeColor = normalizeHexColor(style?.strokeColor, DEFAULT_STROKE_COLOR);
15073
15192
  const fillColor = normalizeHexColor(style?.fillColor, DEFAULT_FILL_COLOR);
15074
15193
  const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
15075
15194
  return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
15076
15195
  }
15077
- var Extrusion3DOverlay = React17.memo(
15196
+ var Extrusion3DOverlayMemo = /* @__PURE__ */ React17.memo(
15078
15197
  // oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
15079
15198
  function Extrusion3DOverlayInner({ data }) {
15080
15199
  if (!data.hasExtrusion || data.panels.length === 0) {
@@ -15109,7 +15228,10 @@ var Extrusion3DOverlay = React17.memo(
15109
15228
  ] });
15110
15229
  }
15111
15230
  );
15112
- Extrusion3DOverlay.displayName = "Extrusion3DOverlay";
15231
+ var Extrusion3DOverlay = /* @__PURE__ */ withDisplayName(
15232
+ Extrusion3DOverlayMemo,
15233
+ "Extrusion3DOverlay"
15234
+ );
15113
15235
 
15114
15236
  // src/viewer/components/elements/scoped-element-handlers.ts
15115
15237
  function getScopedElementHandlers(elementId, options) {
@@ -15176,7 +15298,7 @@ function ShapeEffectOverlay({
15176
15298
  const fillOverlayStyle = overlay ? {
15177
15299
  position: "absolute",
15178
15300
  inset: 0,
15179
- ...(0, dist_exports.isImageLikeElement)(element) ? getImageSurfaceMaskStyle(element) : {},
15301
+ ...isImageLikeElement(element) ? getImageSurfaceMaskStyle(element) : {},
15180
15302
  background: overlay.color,
15181
15303
  mixBlendMode: overlay.blendMode,
15182
15304
  pointerEvents: "none"
@@ -15319,7 +15441,7 @@ function ShapeEffectOverlay({
15319
15441
  ) : null
15320
15442
  ] });
15321
15443
  }
15322
- var ElementRenderer = React17.memo(
15444
+ var ElementRenderer = /* @__PURE__ */ React17.memo(
15323
15445
  // oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
15324
15446
  function ElementRendererInner({
15325
15447
  element: el,
@@ -15384,7 +15506,7 @@ var ElementRenderer = React17.memo(
15384
15506
  const effectPlacement = getShapeEffectLayerPlacement(el);
15385
15507
  const visualAnimationState = backgroundAnimationState ?? animationState;
15386
15508
  const isTxt = isEditableTextElement(el) && allow.textEditable;
15387
- const txtSE = (0, dist_exports.hasTextProperties)(el) ? el.textStyle : void 0;
15509
+ const txtSE = hasTextProperties(el) ? el.textStyle : void 0;
15388
15510
  const textStyleOverrideCss = buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
15389
15511
  const ss = getShapeVisualStyle(
15390
15512
  el,
@@ -15408,7 +15530,7 @@ var ElementRenderer = React17.memo(
15408
15530
  );
15409
15531
  const isModel3D = el.type === "model3d";
15410
15532
  const isConn = isConnectorOrLineElement(el);
15411
- const shapeStyle3d = (0, dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
15533
+ const shapeStyle3d = hasShapeProperties(el) ? el.shapeStyle : void 0;
15412
15534
  const extrusionData = useMemo(
15413
15535
  () => build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15414
15536
  [shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
@@ -16032,7 +16154,7 @@ function renderOleBadge(oleType) {
16032
16154
  )
16033
16155
  ] });
16034
16156
  }
16035
- var InlineCollaborationContext = createContext(void 0);
16157
+ var InlineCollaborationContext = /* @__PURE__ */ createContext(void 0);
16036
16158
 
16037
16159
  // src/viewer/components/elements/useInlineListEditor.tsx
16038
16160
  function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
@@ -16231,7 +16353,7 @@ function InlineTextEditor({
16231
16353
  seedRef.current = {
16232
16354
  initialText,
16233
16355
  hasRichSegments: Boolean(
16234
- (0, dist_exports.hasTextProperties)(element) && element.textSegments && element.textSegments.length > 0
16356
+ hasTextProperties(element) && element.textSegments && element.textSegments.length > 0
16235
16357
  )
16236
16358
  };
16237
16359
  }
@@ -16309,7 +16431,7 @@ function InlineTextEditor({
16309
16431
  transformOrigin: warpStyle?.transformOrigin || "center"
16310
16432
  };
16311
16433
  const nextInlineStyleValue = (property) => {
16312
- if (!(0, dist_exports.hasTextProperties)(element)) {
16434
+ if (!hasTextProperties(element)) {
16313
16435
  return true;
16314
16436
  }
16315
16437
  const result = getInlineEditorSelectionResult(element.textSegments);
@@ -16394,10 +16516,10 @@ function InlineTextEditor({
16394
16516
  function FailedToLoad() {
16395
16517
  return null;
16396
16518
  }
16397
- var LazyModel3DScene = React17.lazy(
16519
+ var LazyModel3DScene = /* @__PURE__ */ React17.lazy(
16398
16520
  async () => {
16399
16521
  try {
16400
- return await import('./Model3DScene-MSC4LEKG.mjs');
16522
+ return await import('./Model3DScene-NUJH2UKM.mjs');
16401
16523
  } catch {
16402
16524
  return { default: FailedToLoad };
16403
16525
  }
@@ -16478,7 +16600,7 @@ function Model3DRenderer({ element, width, height, interactive }) {
16478
16600
  const [threeAvailable, setThreeAvailable] = useState(null);
16479
16601
  useEffect(() => {
16480
16602
  let cancelled = false;
16481
- import('./three.module-JPZUM7AI.mjs').then(() => {
16603
+ import('./three.module-EBJVANGB.mjs').then(() => {
16482
16604
  if (!cancelled) {
16483
16605
  setThreeAvailable(true);
16484
16606
  }
@@ -17323,7 +17445,7 @@ function SmartArtRendererImpl({
17323
17445
  if (!onUpdateElement || !shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
17324
17446
  return;
17325
17447
  }
17326
- const updated = (0, dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text);
17448
+ const updated = updateSmartArtNodeText(smartArtData, nodeId, text);
17327
17449
  const box = { width: element.width, height: element.height };
17328
17450
  const reflowed = rebuildDrawingShapesIfCleared(
17329
17451
  updated,
@@ -17339,7 +17461,7 @@ function SmartArtRendererImpl({
17339
17461
  if (!onUpdateElement) {
17340
17462
  return;
17341
17463
  }
17342
- const next = (0, dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, { fillColor: fill });
17464
+ const next = setSmartArtNodeStyle(smartArtData, nodeId, { fillColor: fill });
17343
17465
  if (next !== smartArtData) {
17344
17466
  const box = { width: element.width, height: element.height };
17345
17467
  const reflowed = rebuildDrawingShapesIfCleared(
@@ -17449,7 +17571,7 @@ function sameDiagramReveal(prev, next) {
17449
17571
  }
17450
17572
  return true;
17451
17573
  }
17452
- var SmartArtRenderer = React17.memo(SmartArtRendererImpl, arePropsEqual);
17574
+ var SmartArtRenderer = /* @__PURE__ */ React17.memo(SmartArtRendererImpl, arePropsEqual);
17453
17575
  function SmartArt3DView({
17454
17576
  element,
17455
17577
  className,
@@ -17574,7 +17696,7 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
17574
17696
  fontSize: s.fontSize ?? element.textStyle?.fontSize ?? DEFAULT_TEXT_FONT_SIZE,
17575
17697
  fontWeight: resolveFontWeight(s.fontFamily || element.textStyle?.fontFamily, s.bold),
17576
17698
  fontStyle: resolveFontItalic(s.fontFamily || element.textStyle?.fontFamily, s.italic) ? "italic" : void 0,
17577
- 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,
17578
17700
  textDecoration: decos.length > 0 ? decos.join(" ") : void 0
17579
17701
  };
17580
17702
  }
@@ -17582,7 +17704,7 @@ function resolveSegmentFont(segment, element) {
17582
17704
  const s = segment.style || {};
17583
17705
  const family = s.fontFamily || element.textStyle?.fontFamily;
17584
17706
  return {
17585
- fontFamily: family ? (0, dist_exports.getSubstituteFontFamily)(family) : DEFAULT_FONT_FAMILY,
17707
+ fontFamily: family ? getSubstituteFontFamily(family) : DEFAULT_FONT_FAMILY,
17586
17708
  fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? DEFAULT_TEXT_FONT_SIZE,
17587
17709
  bold: s.bold ?? element.textStyle?.bold,
17588
17710
  italic: s.italic ?? element.textStyle?.italic
@@ -17649,7 +17771,7 @@ function WarpedText({
17649
17771
  fallbackColor,
17650
17772
  fieldContext
17651
17773
  }) {
17652
- if (!(0, dist_exports.hasTextProperties)(element)) {
17774
+ if (!hasTextProperties(element)) {
17653
17775
  return null;
17654
17776
  }
17655
17777
  const textEl = element;
@@ -17668,7 +17790,7 @@ function WarpedText({
17668
17790
  const align = textEl.textStyle?.align ?? "center";
17669
17791
  const { startOffset, textAnchor } = getAlignmentProps(align);
17670
17792
  const baseFontSize = textEl.textStyle?.fontSize ?? DEFAULT_TEXT_FONT_SIZE;
17671
- 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;
17672
17794
  const baseFill = normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17673
17795
  if (hasGlyphEnvelope(preset)) {
17674
17796
  const perLine = buildGlyphEnvelopeBlock(
@@ -17768,11 +17890,15 @@ function WarpedText({
17768
17890
  }
17769
17891
  );
17770
17892
  }
17771
- var GLYPH_BY_SHAPE = Object.fromEntries(
17772
- ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17773
- );
17774
- GLYPH_BY_SHAPE["actionButtonForwardOrNext"] = GLYPH_BY_SHAPE["actionButtonForwardNext"];
17775
- 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
+ }
17776
17902
  function isActionButtonShape(shapeType) {
17777
17903
  return Boolean(shapeType && shapeType in GLYPH_BY_SHAPE);
17778
17904
  }
@@ -17839,9 +17965,9 @@ function renderTextElementBody(options) {
17839
17965
  const isLinkedTextBox$1 = isLinkedTextBox(el);
17840
17966
  const linkedSegments = getOverflowSegments(el, slideElements);
17841
17967
  const useSvgWarp = shouldUseSvgWarp(
17842
- (0, dist_exports.hasTextProperties)(el) ? el.textStyle?.textWarpPreset : void 0
17968
+ hasTextProperties(el) ? el.textStyle?.textWarpPreset : void 0
17843
17969
  );
17844
- 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;
17845
17971
  const rotationTransform = getTextBodyRotationTransform(el);
17846
17972
  const composedTransform = [rotationTransform, getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
17847
17973
  const transformStyle = {
@@ -18308,7 +18434,7 @@ function renderBody(options) {
18308
18434
  onPlayStateChange: handleMediaPlayStateChange
18309
18435
  });
18310
18436
  }
18311
- if (doInk && (0, dist_exports.isInkElement)(el)) {
18437
+ if (doInk && isInkElement(el)) {
18312
18438
  return renderInk(el, {
18313
18439
  replay: isPresentationPassive,
18314
18440
  pressureSensitive: true
@@ -18352,7 +18478,7 @@ function defaultTextColorForFill(fillColor) {
18352
18478
  return luminance > 0.179 ? DEFAULT_TEXT_COLOR : "#ffffff";
18353
18479
  }
18354
18480
  function getStaticElementVisualState(element, parentGroupFill) {
18355
- const style = (0, dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
18481
+ const style = hasShapeProperties(element) ? element.shapeStyle : void 0;
18356
18482
  const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18357
18483
  const fill = normalizeHexColor(style?.fillColor, DEFAULT_FILL_COLOR);
18358
18484
  const strokeWidth = paintedStrokeWidth(style);
@@ -18372,8 +18498,8 @@ function getStaticElementVisualState(element, parentGroupFill) {
18372
18498
  element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : DEFAULT_TEXT_COLOR
18373
18499
  );
18374
18500
  const isImage = element.type === "picture" || element.type === "image";
18375
- const letsTextOverflow = (0, dist_exports.hasTextProperties)(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
18376
- 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;
18377
18503
  const isCallout = isWedgeCalloutPresetShape(shapeType) || String(shapeType ?? "").toLowerCase().includes("callout");
18378
18504
  return {
18379
18505
  hasFill,
@@ -18452,8 +18578,8 @@ function StaticElementRendererImpl({
18452
18578
  isActionable
18453
18579
  ),
18454
18580
  role: contractRole,
18455
- "aria-label": exposeElementId ? getAriaLabel$1(element) : void 0,
18456
- "aria-roledescription": exposeElementId ? getAriaRoleDescription$1(element) : void 0,
18581
+ "aria-label": exposeElementId ? getAriaLabel(element) : void 0,
18582
+ "aria-roledescription": exposeElementId ? getAriaRoleDescription(element) : void 0,
18457
18583
  tabIndex: isActionable ? 0 : void 0,
18458
18584
  title: isActionable ? action?.tooltip || action?.url || void 0 : void 0,
18459
18585
  onClick: isActionable ? (event) => {
@@ -18518,7 +18644,7 @@ function StaticElementRendererImpl({
18518
18644
  isEditing: false,
18519
18645
  editText: "",
18520
18646
  spellCheck: false,
18521
- txtSE: (0, dist_exports.hasTextProperties)(element) ? element.textStyle : void 0,
18647
+ txtSE: hasTextProperties(element) ? element.textStyle : void 0,
18522
18648
  txtS: textStyle,
18523
18649
  vecShape: renderVectorShape(
18524
18650
  element,
@@ -18560,8 +18686,10 @@ function StaticElementRendererImpl({
18560
18686
  }
18561
18687
  );
18562
18688
  }
18563
- var StaticElementRenderer = React17.memo(StaticElementRendererImpl);
18564
- StaticElementRenderer.displayName = "StaticElementRenderer";
18689
+ var StaticElementRenderer = /* @__PURE__ */ withDisplayName(
18690
+ /* @__PURE__ */ React17.memo(StaticElementRendererImpl),
18691
+ "StaticElementRenderer"
18692
+ );
18565
18693
  function SlideLayer({
18566
18694
  slide,
18567
18695
  templateElements,
@@ -19037,4 +19165,4 @@ function useResizablePanels() {
19037
19165
  };
19038
19166
  }
19039
19167
 
19040
- 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 };