pptx-react-viewer 4.5.0 → 4.7.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 (137) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/README.md +34 -33
  3. package/dist/{AiChatPanel-P2N6X2KB.js → AiChatPanel-3YILWCBX.js} +28 -28
  4. package/dist/AiChatPanel-3YILWCBX.js.br +0 -0
  5. package/dist/AiChatPanel-3YILWCBX.js.gz +0 -0
  6. package/dist/{AiChatPanel-HXGCZPUX.mjs → AiChatPanel-X2MVL5UP.mjs} +4 -4
  7. package/dist/AiChatPanel-X2MVL5UP.mjs.br +0 -0
  8. package/dist/AiChatPanel-X2MVL5UP.mjs.gz +0 -0
  9. package/dist/{Model3DScene-PIFMH2TU.js → Model3DScene-G7P6ZAIO.js} +2 -2
  10. package/dist/Model3DScene-G7P6ZAIO.js.br +0 -0
  11. package/dist/Model3DScene-G7P6ZAIO.js.gz +0 -0
  12. package/dist/{Model3DScene-QXMMJRV3.mjs → Model3DScene-QFWI5CEE.mjs} +1 -1
  13. package/dist/Model3DScene-QFWI5CEE.mjs.br +0 -0
  14. package/dist/Model3DScene-QFWI5CEE.mjs.gz +0 -0
  15. package/dist/{chunk-T35BGKZG.js → chunk-2BM4GBFZ.js} +5 -5
  16. package/dist/chunk-2BM4GBFZ.js.br +0 -0
  17. package/dist/chunk-2BM4GBFZ.js.gz +0 -0
  18. package/dist/{chunk-ZF5S3HHW.mjs → chunk-5J6NW3YS.mjs} +55 -28
  19. package/dist/chunk-5J6NW3YS.mjs.br +0 -0
  20. package/dist/chunk-5J6NW3YS.mjs.gz +0 -0
  21. package/dist/{chunk-LYZQLV7R.js → chunk-AQIXKTAT.js} +13881 -8722
  22. package/dist/chunk-AQIXKTAT.js.br +0 -0
  23. package/dist/chunk-AQIXKTAT.js.gz +0 -0
  24. package/dist/{chunk-DX2JCSQ4.mjs → chunk-E5OIDWHO.mjs} +1 -1
  25. package/dist/chunk-E5OIDWHO.mjs.br +0 -0
  26. package/dist/chunk-E5OIDWHO.mjs.gz +0 -0
  27. package/dist/{chunk-6FVYG27J.js → chunk-FYAOOACZ.js} +241 -214
  28. package/dist/chunk-FYAOOACZ.js.br +0 -0
  29. package/dist/chunk-FYAOOACZ.js.gz +0 -0
  30. package/dist/{chunk-PRXJ3J5W.mjs → chunk-OECUSL2B.mjs} +129 -311
  31. package/dist/chunk-OECUSL2B.mjs.br +0 -0
  32. package/dist/chunk-OECUSL2B.mjs.gz +0 -0
  33. package/dist/{chunk-VZNIVS3X.mjs → chunk-QLDHUKH2.mjs} +13808 -8718
  34. package/dist/chunk-QLDHUKH2.mjs.br +0 -0
  35. package/dist/chunk-QLDHUKH2.mjs.gz +0 -0
  36. package/dist/{chunk-Y4VRYQQS.js → chunk-SR7ETIBF.js} +931 -1112
  37. package/dist/chunk-SR7ETIBF.js.br +0 -0
  38. package/dist/chunk-SR7ETIBF.js.gz +0 -0
  39. package/dist/{chunk-IDV2ITXM.mjs → chunk-UBYFLXAU.mjs} +1383 -208
  40. package/dist/chunk-UBYFLXAU.mjs.br +0 -0
  41. package/dist/chunk-UBYFLXAU.mjs.gz +0 -0
  42. package/dist/{chunk-UMQV2432.js → chunk-UIAU3NR2.js} +45 -0
  43. package/dist/chunk-UIAU3NR2.js.br +0 -0
  44. package/dist/chunk-UIAU3NR2.js.gz +0 -0
  45. package/dist/{chunk-UZFCFYK6.js → chunk-VF4RA27Q.js} +3245 -2070
  46. package/dist/chunk-VF4RA27Q.js.br +0 -0
  47. package/dist/chunk-VF4RA27Q.js.gz +0 -0
  48. package/dist/{chunk-APAVAD2A.mjs → chunk-WIEBQGQI.mjs} +45 -0
  49. package/dist/chunk-WIEBQGQI.mjs.br +0 -0
  50. package/dist/chunk-WIEBQGQI.mjs.gz +0 -0
  51. package/dist/i18n/de.cjs +71 -21
  52. package/dist/i18n/de.cjs.br +0 -0
  53. package/dist/i18n/de.cjs.gz +0 -0
  54. package/dist/i18n/de.mjs +71 -21
  55. package/dist/i18n/de.mjs.br +0 -0
  56. package/dist/i18n/de.mjs.gz +0 -0
  57. package/dist/i18n/es.cjs +71 -21
  58. package/dist/i18n/es.cjs.br +0 -0
  59. package/dist/i18n/es.cjs.gz +0 -0
  60. package/dist/i18n/es.mjs +71 -21
  61. package/dist/i18n/es.mjs.br +0 -0
  62. package/dist/i18n/es.mjs.gz +0 -0
  63. package/dist/i18n/fr.cjs +71 -21
  64. package/dist/i18n/fr.cjs.br +0 -0
  65. package/dist/i18n/fr.cjs.gz +0 -0
  66. package/dist/i18n/fr.mjs +71 -21
  67. package/dist/i18n/fr.mjs.br +0 -0
  68. package/dist/i18n/fr.mjs.gz +0 -0
  69. package/dist/i18n/zh-CN.cjs +49 -4
  70. package/dist/i18n/zh-CN.cjs.br +0 -0
  71. package/dist/i18n/zh-CN.cjs.gz +0 -0
  72. package/dist/i18n/zh-CN.mjs +49 -4
  73. package/dist/i18n/zh-CN.mjs.br +0 -0
  74. package/dist/i18n/zh-CN.mjs.gz +0 -0
  75. package/dist/i18n.js +4 -4
  76. package/dist/i18n.js.br +0 -0
  77. package/dist/i18n.js.gz +0 -0
  78. package/dist/i18n.mjs +1 -1
  79. package/dist/i18n.mjs.br +0 -0
  80. package/dist/i18n.mjs.gz +0 -0
  81. package/dist/index.d.ts +438 -13
  82. package/dist/index.js +105 -49
  83. package/dist/index.js.br +0 -0
  84. package/dist/index.js.gz +0 -0
  85. package/dist/index.mjs +6 -6
  86. package/dist/index.mjs.br +0 -0
  87. package/dist/index.mjs.gz +0 -0
  88. package/dist/internals.d.ts +501 -15
  89. package/dist/internals.js +105 -105
  90. package/dist/internals.js.br +0 -0
  91. package/dist/internals.js.gz +0 -0
  92. package/dist/internals.mjs +4 -4
  93. package/dist/internals.mjs.br +0 -0
  94. package/dist/internals.mjs.gz +0 -0
  95. package/dist/pptx-viewer.css +1 -1
  96. package/dist/pptx-viewer.css.br +0 -0
  97. package/dist/pptx-viewer.css.gz +0 -0
  98. package/dist/viewer/index.d.ts +515 -12
  99. package/dist/viewer/index.js +27 -27
  100. package/dist/viewer/index.js.br +0 -0
  101. package/dist/viewer/index.js.gz +0 -0
  102. package/dist/viewer/index.mjs +6 -6
  103. package/dist/viewer/index.mjs.br +3 -4
  104. package/dist/viewer/index.mjs.gz +0 -0
  105. package/package.json +1 -1
  106. package/dist/AiChatPanel-HXGCZPUX.mjs.br +0 -0
  107. package/dist/AiChatPanel-HXGCZPUX.mjs.gz +0 -0
  108. package/dist/AiChatPanel-P2N6X2KB.js.br +0 -0
  109. package/dist/AiChatPanel-P2N6X2KB.js.gz +0 -0
  110. package/dist/Model3DScene-PIFMH2TU.js.br +0 -0
  111. package/dist/Model3DScene-PIFMH2TU.js.gz +0 -0
  112. package/dist/Model3DScene-QXMMJRV3.mjs.br +0 -0
  113. package/dist/Model3DScene-QXMMJRV3.mjs.gz +0 -0
  114. package/dist/chunk-6FVYG27J.js.br +0 -0
  115. package/dist/chunk-6FVYG27J.js.gz +0 -0
  116. package/dist/chunk-APAVAD2A.mjs.br +0 -0
  117. package/dist/chunk-APAVAD2A.mjs.gz +0 -0
  118. package/dist/chunk-DX2JCSQ4.mjs.br +0 -0
  119. package/dist/chunk-DX2JCSQ4.mjs.gz +0 -0
  120. package/dist/chunk-IDV2ITXM.mjs.br +0 -0
  121. package/dist/chunk-IDV2ITXM.mjs.gz +0 -0
  122. package/dist/chunk-LYZQLV7R.js.br +0 -0
  123. package/dist/chunk-LYZQLV7R.js.gz +0 -0
  124. package/dist/chunk-PRXJ3J5W.mjs.br +0 -0
  125. package/dist/chunk-PRXJ3J5W.mjs.gz +0 -0
  126. package/dist/chunk-T35BGKZG.js.br +0 -0
  127. package/dist/chunk-T35BGKZG.js.gz +0 -0
  128. package/dist/chunk-UMQV2432.js.br +0 -0
  129. package/dist/chunk-UMQV2432.js.gz +0 -0
  130. package/dist/chunk-UZFCFYK6.js.br +0 -0
  131. package/dist/chunk-UZFCFYK6.js.gz +0 -0
  132. package/dist/chunk-VZNIVS3X.mjs.br +0 -0
  133. package/dist/chunk-VZNIVS3X.mjs.gz +0 -0
  134. package/dist/chunk-Y4VRYQQS.js.br +0 -0
  135. package/dist/chunk-Y4VRYQQS.js.gz +0 -0
  136. package/dist/chunk-ZF5S3HHW.mjs.br +0 -0
  137. package/dist/chunk-ZF5S3HHW.mjs.gz +0 -0
@@ -1,6 +1,6 @@
1
- import { DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, getImageSurfaceStyle, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, DEFAULT_FILL_COLOR, getCropShapeClipPath, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getImageSurfaceMaskStyle, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, MIN_ELEMENT_SIZE, buildTextBody3DSceneStyle, getImageTilingStyle, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, HYPERLINK_COLOR, cloneHistorySnapshot, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, buildPdfFromTiledImageData, GRID_SIZE, buildNotesPdf } from './chunk-ZF5S3HHW.mjs';
2
- import { GlyphOutlineFontCache, createGlyphOutlineLookup, DEFAULT_VIEWER_OPTIONS, TOOLBAR_TABS, defineThreeViewElement, getSelectionControlArtworkStyle, hasShapeProperties, normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, hasTextProperties, getSelectionOutlineColor, connectorWrapperTransform, getAriaRoleDescription, getAriaLabel, getAriaRole, resolveElementInteractivity, isEditableTextElement, buildTextStyleOverrideCss, isElementRendered, resolveElementAriaAttributes, isMediaFullscreenActive, shouldRenderHitTarget, elementHitTargetStyle, getImageEffectsOpacity, getImageEffectsFilter, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, ACTION_BUTTON_PRESETS, mediaTransportVisible, isInkElement, oleActionsVisible, getGroupChildParentFill, getElementLabel, getResizeHandleHitAreaStyle, paintedStrokeWidth, buildCssGradientFromShapeStyle, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, paintedElementSize, MEDIA_FULLSCREEN_OVERLAY_STYLE, elementContainerHeightStyle, getElementTransform, resolveElementHighlightClick, applyHighlightClickStyle, getComputedEffectStyle, getSoftEdgeSvgFilter, getEffectStyleSource, getBevelLightingSvgFilter, buildStrokeOutline, buildHollowHitOutline, buildSubpathFillOverlay, isImageLikeElement, strokeOutlineViewBox, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, buildSmartArtA11y, canDrillDown, computeSmartArtElementLayout, flattenNodes, buildSummaryZoomView, isImageTiled, getImageColorWashStyle, readEditableText, placeCaretAtEnd, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, mapInlineTextFormatKey, subscribeBarFacePicturePixelSamples, getBarFacePicturePixelSampleVersion, ensureChartInteractionStyles, applyChartPartHighlight, resolveRevealedChartData, formatAxisValue, buildInkGroupStrokes, getInkReplayStyles, INK_REPLAY_KEYFRAMES, buildContentPartStrokes, getContentPartReplayStyles, resolveOleType, getOleAriaLabel, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, getTextBodyRotationTransform, placeholderPromptDescriptor, attachRotateHandlePlacement, elementIdSelector, createRotationDrag, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_PANEL_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_HINT_CLASS, DEFAULT_PALETTE2, resolvePalette, computeDrawingViewBox, projectDrawingShapes, resolveRevealedDrawingShapeNodeIds, styleShadowFilter, buildChromeStyle, measureSvgViewportRect, modelDataToBlobUrl, resolveZoomNavigationTarget, getImageSvgFilters, getCachedNativeImageSize, probeNativeImageSize, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, inlineListBodyText, createInlineListSeed, readListActivationSelection, createInlineListModelObserver, attachCollaborationInlineEditor, bindInlineListParagraph, bindInlineListRun, attachInlineListController, restoreInlineListBodySelection, getInlineEditorSelectionResult, isBulletMarkerSegment, resolveChartThreeViewSpec, applyChart3DDrag, applyChart3DSelect, findChartPartTarget, withChartTitle, resolveSmartArtThreeViewSpec, isBrowserOpenableMime, formatBytes, getOleDisplayName, getOleBadgeLabel, openUrlInNewTab, getSubstituteFontFamily, hasGlyphEnvelope, buildGlyphEnvelopeBlock, getWarpPath, isWedgeCalloutPresetShape, isElementActionable, centeredSvgTextLines, findSmartArtNodeText, setSmartArtNodeStyle, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, updateSmartArtNodeText, advanceChartMarkDrag, advanceChartValueDrag, resolveChartKind, buildChartMarkDragGeometry, beginChartMarkDrag, beginChartValueDrag, groupIntoParagraphs, substituteFieldText, computeInlineEditorRect, MIN_TOUCH_TARGET_PX, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, createPresenceProjector, BROADCAST_THROTTLE_MS, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, createActiveAnimationGroup, cancelBuildReveal, clearPlaybackTimers, PresentationAnimationController, resolveMediaTimeNodeElementIds, resolveMediaBookmarkTimesMs, advanceMainSequence, playGroup, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, resolveForwardSlideWithZoomReturn, buildZoomTransitionOverride, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, beginZoomExcursion, createPresenterShowGuard, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, findInSlides, applyFindReplacements, visibleTemplateElements, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, createPresentationLoadResources, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, partitionTemplateElements, seedRecentColors, resolveAuthoredCustomShowId, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, EncryptedFileError, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, updateMasterViewElement, isTemplateElementId, updateElement, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canInteractWithElement, prepareExportClone, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, resolveImageResolutionScale, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, stopAllPersistentAudio, guidePxToEmu, buildSaveSlides, buildDeckSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, shouldProbeAutosaveRecovery, probeAutosaveRecovery, acceptAutosaveRecovery, acknowledgeAutosaveRecovery, discardAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, rasterResultToPngBlob, downloadBlob, elementPictureFilename, collectReferencedFontFamilies, resolveGoogleWebfontHref, syncGoogleWebfontStylesheet, selectGoogleWebfontFamilies, fetchGoogleWebfontOutlineBytes, mapSlideShowStartKey, mapEditorKey, isEditorTextInputTarget, textFontSizePtToPx, stepFontSizePt, textFontSizePxToPt, cycleSelectableElement, prepareElementForInsertion, createViewerOptionsStore, observeYDocSlides, LOCAL_SYNC_ORIGIN, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, scopeLayoutOptionsToSlide, checkModifyPassword, viewerPreferencesFromViewProperties, DEFAULT_VIEWER_PREFERENCES, viewPropertiesPatchFromPreferences, openPptxFile, readBackstageRecentFile, resolveCollaborationShellEditability, resolveCollaborationShellState, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, getSlideTransitionAnimations, getFragmentedTransitionDescriptor, SLIDE_TRANSITION_KEYFRAMES, isActionHidden, buildInlineTextCommitPatch, resolveInlineEditAutoFitHeight, resolveInlineEditNormAutofitShrink, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, contextMenuInspectorAnchor, savedPresentationFileName, exportDeckJson, groupElements, generateElementId, makeCloneId, ungroupElements, alignElements, distributeElements, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, openPendingPrintWindow, computeColorFilter, filterHiddenSlideIndices, computeSlideIndices, buildPrintDocument, finishPrintWindow, buildPrintHtmlDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, buildThemeColorMap, reResolveSlideColors, reResolveElementColors, resolveViewportFitOptions, calculateViewportFit, scheduleAutoAdvanceChain, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, resolveTransitionSoundAction, runPresentationAction, safeOpenUrl, buildRunProgramNotice, toggleStageElementMedia, resolveOleVerbTarget, downloadDataUrl, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, remapTextToSegments, buildInlineListStylePatch, applyActiveInlineListFormatting, applyListStyleUpdate, setPendingSelectionRestore, applyTextStyleUpdate, toggleSelectionBullets, transformInlineListCase, applyCaseTransformToSegments, transformTextCase, resolveExportCaptureDecision, recordProgressPercent, computeGridSpacingPx, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, overlayMasterViewInlineSnapshot, overlayInlineTextSnapshot, rasterizeElement, cloneElementForPaste, applyPasteSpecialFormat, buildRasterPictureElement, copyFormatFromElement, cloneElementUpdates, assertElementUpdateTarget, prepareElementUpdateBatch, createWriteBackScheduler, observeExternalCollaborationReadiness, resolveHistoryDepth, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, scrollInspectorSectionIntoView, computeScrollDelta, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, replyToCommentInList, removeTableElementColumn, insertTableElementColumn, removeTableElementRow, insertTableElementRow, updateCellTextStyleInRawXml, setCellText, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, stopCaptureStream, GIF_POST_CAPTURE_MAX_SIDE, encodeGif, rasterizeElementTiles, placeTileOnPage, PDF_SLIDES_PAGE_WIDTH_PT, PDF_SLIDES_PAGE_HEIGHT_PT, canvasToJpegData, applyFormatToElement, createSnapshotTextPositions, isPpactionUrl, parsePpactionUrl, resolvePresentationAction, elementActionToPptxAction, isUrlSafe, buildSmartArtPresetData, classifyMediaType, computeSnapToShape, publishLiveGeometry, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, rasterizeElementTiledToCanvas, borrowExternalCollaborationAwareness, observeExternalCollaborationSession, clampGifDimensions, rasterResultToPngDataUrl, shouldConfirmExternalHyperlink, applyResize, lockResizeAspect, snapBoxToGrid, applyMotionPathPreset, bringForward, sendBackward, bringToFront, sendToBack } from './chunk-VZNIVS3X.mjs';
3
- import { translationsEn } from './chunk-APAVAD2A.mjs';
1
+ import { DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, getImageSurfaceStyle, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, DEFAULT_FILL_COLOR, getCropShapeClipPath, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getImageSurfaceMaskStyle, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, MIN_ELEMENT_SIZE, buildTextBody3DSceneStyle, getImageTilingStyle, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, HYPERLINK_COLOR, cloneHistorySnapshot, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, buildPdfFromTiledImageData, GRID_SIZE, buildNotesPdf } from './chunk-5J6NW3YS.mjs';
2
+ import { GlyphOutlineFontCache, createGlyphOutlineLookup, DEFAULT_VIEWER_OPTIONS, TOOLBAR_TABS, defineThreeViewElement, getSelectionControlArtworkStyle, hasShapeProperties, normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, hasTextProperties, getSelectionOutlineColor, connectorWrapperTransform, getAriaRoleDescription, getAriaLabel, getAriaRole, resolveElementInteractivity, isEditableTextElement, buildTextStyleOverrideCss, isElementRendered, resolveElementAriaAttributes, isMediaFullscreenActive, shouldRenderHitTarget, elementHitTargetStyle, getImageEffectsOpacity, getImageEffectsFilter, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, ACTION_BUTTON_PRESETS, mediaTransportVisible, isInkElement, oleActionsVisible, getGroupChildParentFill, getElementLabel, getResizeHandleHitAreaStyle, paintedStrokeWidth, buildCssGradientFromShapeStyle, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, paintedElementSize, MEDIA_FULLSCREEN_OVERLAY_STYLE, elementContainerHeightStyle, getElementTransform, resolveElementHighlightClick, applyHighlightClickStyle, getComputedEffectStyle, getSoftEdgeSvgFilter, getEffectStyleSource, getBevelLightingSvgFilter, buildStrokeOutline, buildHollowHitOutline, buildSubpathFillOverlay, isImageLikeElement, strokeOutlineViewBox, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, buildSmartArtA11y, canDrillDown, computeSmartArtElementLayout, flattenNodes, buildSummaryZoomView, isImageTiled, getImageColorWashStyle, readEditableText, placeCaretAtEnd, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, mapInlineTextFormatKey, subscribeBarFacePicturePixelSamples, getBarFacePicturePixelSampleVersion, ensureChartInteractionStyles, applyChartPartHighlight, resolveRevealedChartData, formatAxisValue, buildInkGroupStrokes, getInkReplayStyles, INK_REPLAY_KEYFRAMES, buildContentPartStrokes, getContentPartReplayStyles, resolveOleType, getOleAriaLabel, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, getTextBodyRotationTransform, placeholderPromptDescriptor, attachRotateHandlePlacement, elementIdSelector, createRotationDrag, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_PANEL_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_HINT_CLASS, DEFAULT_PALETTE2, resolvePalette, computeDrawingViewBox, projectDrawingShapes, resolveRevealedDrawingShapeNodeIds, styleShadowFilter, buildChromeStyle, measureSvgViewportRect, modelDataToBlobUrl, resolveZoomNavigationTarget, getImageSvgFilters, getCachedNativeImageSize, probeNativeImageSize, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, inlineListBodyText, createInlineListSeed, readListActivationSelection, createInlineListModelObserver, attachCollaborationInlineEditor, bindInlineListParagraph, bindInlineListRun, attachInlineListController, restoreInlineListBodySelection, getInlineEditorSelectionResult, isBulletMarkerSegment, resolveChartThreeViewSpec, applyChart3DDrag, applyChart3DSelect, findChartPartTarget, withChartTitle, resolveSmartArtThreeViewSpec, isBrowserOpenableMime, formatBytes, getOleDisplayName, getOleBadgeLabel, openUrlInNewTab, getSubstituteFontFamily, hasGlyphEnvelope, buildGlyphEnvelopeBlock, getWarpPath, isWedgeCalloutPresetShape, isElementActionable, centeredSvgTextLines, findSmartArtNodeText, setSmartArtNodeStyle, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, updateSmartArtNodeText, advanceChartMarkDrag, advanceChartValueDrag, resolveChartKind, buildChartMarkDragGeometry, beginChartMarkDrag, beginChartValueDrag, groupIntoParagraphs, substituteFieldText, computeInlineEditorRect, MIN_TOUCH_TARGET_PX, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, createPresenceProjector, BROADCAST_THROTTLE_MS, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, createActiveAnimationGroup, cancelBuildReveal, clearPlaybackTimers, PresentationAnimationController, resolveMediaTimeNodeElementIds, resolveMediaBookmarkTimesMs, advanceMainSequence, playGroup, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, resolveForwardSlideWithZoomReturn, buildZoomTransitionOverride, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, beginZoomExcursion, createPresenterShowGuard, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, findInSlides, applyFindReplacements, visibleTemplateElements, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, createPresentationLoadResources, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, resolveTextFillBlipUrls, partitionTemplateElements, seedRecentColors, resolveAuthoredCustomShowId, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, EncryptedFileError, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, updateMasterViewElement, isTemplateElementId, updateElement, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canMergeShapes, canInteractWithElement, prepareExportClone, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, resolveImageResolutionScale, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, stopAllPersistentAudio, guidePxToEmu, buildSaveSlides, buildDeckSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, shouldProbeAutosaveRecovery, probeAutosaveRecovery, acceptAutosaveRecovery, acknowledgeAutosaveRecovery, discardAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, rasterResultToPngBlob, downloadBlob, elementPictureFilename, canEditElementPoints, collectReferencedFontFamilies, resolveGoogleWebfontHref, syncGoogleWebfontStylesheet, selectGoogleWebfontFamilies, fetchGoogleWebfontOutlineBytes, isFeatureEnabled, mapSlideShowStartKey, mapCustomizedEditorKey, isEditorControlTarget, isEditorTextInputTarget, textFontSizePtToPx, stepFontSizePt, textFontSizePxToPt, cycleSelectableElement, createCustomizationController, prepareElementForInsertion, createViewerOptionsStore, observeYDocSlides, LOCAL_SYNC_ORIGIN, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, scopeLayoutOptionsToSlide, checkModifyPassword, viewerPreferencesFromViewProperties, DEFAULT_VIEWER_PREFERENCES, viewPropertiesPatchFromPreferences, openPptxFile, readBackstageRecentFile, resolveCollaborationShellEditability, resolveCollaborationShellState, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, getSlideTransitionAnimations, getFragmentedTransitionDescriptor, SLIDE_TRANSITION_KEYFRAMES, isActionHidden, buildInlineTextCommitPatch, resolveInlineEditAutoFitHeight, resolveInlineEditNormAutofitShrink, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, contextMenuInspectorAnchor, savedPresentationFileName, exportDeckJson, groupElements, generateElementId, makeCloneId, ungroupElements, alignElements, distributeElements, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, planMergeShapes, applyMergeShapesPlan, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, openPendingPrintWindow, computeColorFilter, filterHiddenSlideIndices, computeSlideIndices, buildPrintDocument, finishPrintWindow, buildPrintHtmlDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, buildThemeColorMap, reResolveSlideColors, reResolveElementColors, resolveViewportFitOptions, calculateViewportFit, scheduleAutoAdvanceChain, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, resolveTransitionSoundAction, runPresentationAction, safeOpenUrl, buildRunProgramNotice, toggleStageElementMedia, resolveOleVerbTarget, downloadDataUrl, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, remapTextToSegments, buildInlineListStylePatch, applyActiveInlineListFormatting, applyListStyleUpdate, setPendingSelectionRestore, applyTextStyleUpdate, toggleSelectionBullets, transformInlineListCase, applyCaseTransformToSegments, transformTextCase, resolveExportCaptureDecision, recordProgressPercent, computeGridSpacingPx, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, overlayMasterViewInlineSnapshot, overlayInlineTextSnapshot, rasterizeElement, cloneElementForPaste, applyPasteSpecialFormat, buildRasterPictureElement, copyFormatFromElement, cloneElementUpdates, assertElementUpdateTarget, prepareElementUpdateBatch, createWriteBackScheduler, observeExternalCollaborationReadiness, resolveHistoryDepth, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, scrollInspectorSectionIntoView, computeScrollDelta, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, replyToCommentInList, removeTableElementColumn, insertTableElementColumn, removeTableElementRow, insertTableElementRow, updateCellTextStyleInRawXml, setCellText, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, stopCaptureStream, GIF_POST_CAPTURE_MAX_SIDE, encodeGif, rasterizeElementTiles, placeTileOnPage, PDF_SLIDES_PAGE_WIDTH_PT, PDF_SLIDES_PAGE_HEIGHT_PT, canvasToJpegData, applyFormatToElement, createSnapshotTextPositions, isPpactionUrl, parsePpactionUrl, resolvePresentationAction, elementActionToPptxAction, isUrlSafe, buildSmartArtPresetData, classifyMediaType, computeSnapToShape, publishLiveGeometry, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, rasterizeElementTiledToCanvas, borrowExternalCollaborationAwareness, observeExternalCollaborationSession, clampGifDimensions, rasterResultToPngDataUrl, shouldConfirmExternalHyperlink, applyResize, lockResizeAspect, snapBoxToGrid, applyMotionPathPreset, bringForward, sendBackward, bringToFront, sendToBack } from './chunk-QLDHUKH2.mjs';
3
+ import { translationsEn } from './chunk-WIEBQGQI.mjs';
4
4
  import React17, { createContext, useMemo, useState, useCallback, useEffect, Suspense, useRef, useLayoutEffect, useContext, useSyncExternalStore, useImperativeHandle } from 'react';
5
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
6
6
  import { useTranslation } from 'react-i18next';
@@ -3289,7 +3289,8 @@ function useFindReplace({
3289
3289
  onSetActiveSlideIndex,
3290
3290
  onSetSelectedElementId,
3291
3291
  onUpdateSlides,
3292
- onMarkDirty
3292
+ onMarkDirty,
3293
+ keyboard
3293
3294
  }) {
3294
3295
  const [findReplaceOpen, setFindReplaceOpen] = useState(false);
3295
3296
  const [findQuery, setFindQuery] = useState("");
@@ -3370,10 +3371,14 @@ function useFindReplace({
3370
3371
  }, [performFind]);
3371
3372
  useEffect(() => {
3372
3373
  const handler = (event) => {
3373
- const { action } = mapEditorKey(event, {
3374
- canEdit: mode === "edit",
3375
- isTextInputTarget: isEditorTextInputTarget(event.target)
3376
- });
3374
+ const { action } = mapCustomizedEditorKey(
3375
+ event,
3376
+ {
3377
+ canEdit: mode === "edit",
3378
+ isTextInputTarget: isEditorTextInputTarget(event.target)
3379
+ },
3380
+ keyboard
3381
+ );
3377
3382
  if (action !== "find" && action !== "findReplace") {
3378
3383
  return;
3379
3384
  }
@@ -3382,7 +3387,7 @@ function useFindReplace({
3382
3387
  };
3383
3388
  window.addEventListener("keydown", handler);
3384
3389
  return () => window.removeEventListener("keydown", handler);
3385
- }, [mode]);
3390
+ }, [mode, keyboard]);
3386
3391
  return {
3387
3392
  findReplaceOpen,
3388
3393
  setFindReplaceOpen,
@@ -3980,6 +3985,28 @@ function useDerivedElementState(input) {
3980
3985
  handoutMasterElements
3981
3986
  };
3982
3987
  }
3988
+ function useEditPointsState() {
3989
+ const [editPointsElementId, setEditPointsElementId] = useState(null);
3990
+ const [activeFreeformTool, setActiveFreeformTool] = useState(null);
3991
+ const enterEditPoints = useCallback((id) => {
3992
+ setEditPointsElementId(id);
3993
+ if (id) {
3994
+ setActiveFreeformTool(null);
3995
+ }
3996
+ }, []);
3997
+ const armFreeformTool = useCallback((tool) => {
3998
+ setActiveFreeformTool(tool);
3999
+ if (tool) {
4000
+ setEditPointsElementId(null);
4001
+ }
4002
+ }, []);
4003
+ return {
4004
+ editPointsElementId,
4005
+ setEditPointsElementId: enterEditPoints,
4006
+ activeFreeformTool,
4007
+ setActiveFreeformTool: armFreeformTool
4008
+ };
4009
+ }
3983
4010
  function useInlineEditingState(onTextChange) {
3984
4011
  const inlineEditingElementIdRef = useRef(null);
3985
4012
  const inlineEditingTextRef = useRef("");
@@ -4081,6 +4108,7 @@ function useViewerCoreState(_input) {
4081
4108
  [livePatcher, slidesRef]
4082
4109
  );
4083
4110
  const inlineEditing = useInlineEditingState(publishInlineText);
4111
+ const editPointsMode = useEditPointsState();
4084
4112
  const [editTemplateMode, setEditTemplateMode] = useState(false);
4085
4113
  const [newShapeType, setNewShapeType] = useState("rect");
4086
4114
  const [clipboardPayload, setClipboardPayload] = useState(null);
@@ -4136,6 +4164,7 @@ function useViewerCoreState(_input) {
4136
4164
  mediaInputRef,
4137
4165
  activeSlideIndexRef,
4138
4166
  ...inlineEditing,
4167
+ ...editPointsMode,
4139
4168
  dragStateRef,
4140
4169
  resizeStateRef,
4141
4170
  shapeAdjustmentDragStateRef,
@@ -4356,12 +4385,22 @@ function useViewerUIState() {
4356
4385
  setEyedropperActive
4357
4386
  };
4358
4387
  }
4388
+ function useCropSessionState() {
4389
+ const [cropSession, setCropSession] = useState(null);
4390
+ const cropSessionRef = useRef(null);
4391
+ const updateCropSession = useCallback((session) => {
4392
+ cropSessionRef.current = session;
4393
+ setCropSession(session);
4394
+ }, []);
4395
+ return { cropSession, cropSessionRef, setCropSession: updateCropSession };
4396
+ }
4359
4397
 
4360
4398
  // src/viewer/hooks/useViewerState.ts
4361
4399
  function useViewerState(input) {
4362
4400
  const core = useViewerCoreState();
4363
4401
  const ui = useViewerUIState();
4364
- return { ...core, ...ui };
4402
+ const crop = useCropSessionState();
4403
+ return { ...core, ...ui, ...crop };
4365
4404
  }
4366
4405
 
4367
4406
  // src/viewer/utils/glyph-outline-cache.ts
@@ -4491,6 +4530,10 @@ function useLoadContent({
4491
4530
  parsed.tableStyleMap,
4492
4531
  (path) => handler.getImageData(path)
4493
4532
  );
4533
+ nextSlides = await resolveTextFillBlipUrls(
4534
+ nextSlides,
4535
+ (path) => handler.getImageData(path)
4536
+ );
4494
4537
  if (cancelled || token !== renderTokenRef.current) {
4495
4538
  return;
4496
4539
  }
@@ -6555,283 +6598,31 @@ function useClipboardHandlers(input) {
6555
6598
  }
6556
6599
 
6557
6600
  // src/viewer/hooks/useMergeShapesHandler.ts
6558
- function isShapeLike(el) {
6559
- return el.type === "shape" || el.type === "image" || el.type === "picture";
6560
- }
6561
- function resolveShapePath(el) {
6562
- if ("pathData" in el && typeof el.pathData === "string" && el.pathData) {
6563
- return el.pathData;
6564
- }
6565
- if ("shapeType" in el && typeof el.shapeType === "string") {
6566
- const clipPath = getPresetShapeClipPath(el.shapeType);
6567
- if (clipPath) {
6568
- const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
6569
- if (svgPath) {
6570
- return svgPath;
6571
- }
6572
- }
6573
- }
6574
- return `M 0 0 L ${el.width} 0 L ${el.width} ${el.height} L 0 ${el.height} Z`;
6575
- }
6576
- function clipPathToSvgPath(clipPath, width, height) {
6577
- const match = clipPath.match(/polygon\((?<points>[^)]+)\)/iu);
6578
- if (!match?.groups) {
6579
- return null;
6580
- }
6581
- const pairs = match.groups.points.split(",").map((s) => s.trim());
6582
- const points = [];
6583
- for (const pair of pairs) {
6584
- const parts2 = pair.split(/\s+/u);
6585
- if (parts2.length < 2) {
6586
- continue;
6587
- }
6588
- const xStr = parts2[0];
6589
- const yStr = parts2[1];
6590
- let x;
6591
- let y;
6592
- if (xStr.endsWith("%")) {
6593
- x = parseFloat(xStr) / 100 * width;
6594
- } else {
6595
- x = parseFloat(xStr);
6596
- }
6597
- if (yStr.endsWith("%")) {
6598
- y = parseFloat(yStr) / 100 * height;
6599
- } else {
6600
- y = parseFloat(yStr);
6601
- }
6602
- if (!isNaN(x) && !isNaN(y)) {
6603
- points.push({ x, y });
6604
- }
6605
- }
6606
- if (points.length < 3) {
6607
- return null;
6608
- }
6609
- const parts = [`M ${points[0].x} ${points[0].y}`];
6610
- for (let i = 1; i < points.length; i++) {
6611
- parts.push(`L ${points[i].x} ${points[i].y}`);
6612
- }
6613
- parts.push("Z");
6614
- return parts.join(" ");
6615
- }
6616
- function transformPathToGlobal(pathData, el) {
6617
- const polys = svgPathToPolygons(pathData);
6618
- if (polys.length === 0) {
6619
- return pathData;
6620
- }
6621
- let pathW = el.width;
6622
- let pathH = el.height;
6623
- if ("pathWidth" in el && typeof el.pathWidth === "number") {
6624
- pathW = el.pathWidth;
6625
- }
6626
- if ("pathHeight" in el && typeof el.pathHeight === "number") {
6627
- pathH = el.pathHeight;
6628
- }
6629
- const scaleX = pathW > 0 ? el.width / pathW : 1;
6630
- const scaleY = pathH > 0 ? el.height / pathH : 1;
6631
- const transformed = polys.map(
6632
- (poly) => poly.map((pt) => ({
6633
- x: pt.x * scaleX + el.x,
6634
- y: pt.y * scaleY + el.y
6635
- }))
6636
- );
6637
- return polygonsToSvgPath(transformed);
6638
- }
6639
- function transformPathToLocal(pathData, x, y, _width, _height) {
6640
- const polys = svgPathToPolygons(pathData);
6641
- if (polys.length === 0) {
6642
- return pathData;
6643
- }
6644
- const transformed = polys.map(
6645
- (poly) => poly.map((pt) => ({
6646
- x: pt.x - x,
6647
- y: pt.y - y
6648
- }))
6649
- );
6650
- return polygonsToSvgPath(transformed);
6651
- }
6652
- function pathBounds(pathData) {
6653
- const polys = svgPathToPolygons(pathData);
6654
- let minX = Infinity;
6655
- let minY = Infinity;
6656
- let maxX = -Infinity;
6657
- let maxY = -Infinity;
6658
- for (const poly of polys) {
6659
- for (const pt of poly) {
6660
- if (pt.x < minX) {
6661
- minX = pt.x;
6662
- }
6663
- if (pt.y < minY) {
6664
- minY = pt.y;
6665
- }
6666
- if (pt.x > maxX) {
6667
- maxX = pt.x;
6668
- }
6669
- if (pt.y > maxY) {
6670
- maxY = pt.y;
6671
- }
6672
- }
6673
- }
6674
- if (!isFinite(minX)) {
6675
- return { x: 0, y: 0, width: 0, height: 0 };
6676
- }
6677
- return {
6678
- x: minX,
6679
- y: minY,
6680
- width: maxX - minX,
6681
- height: maxY - minY
6682
- };
6683
- }
6684
6601
  function useMergeShapesHandler(input) {
6685
- const {
6686
- activeSlide,
6687
- activeSlideIndex,
6688
- selectedElements,
6689
- effectiveSelectedIds,
6690
- setSelectedElementIds,
6691
- ops,
6692
- history
6693
- } = input;
6694
- const shapeLikeElements = selectedElements.filter(isShapeLike);
6695
- const canMergeShapes = shapeLikeElements.length >= 2;
6602
+ const { activeSlide, activeSlideIndex, selectedElements, ops, history } = input;
6603
+ const canMergeShapes2 = canMergeShapes(selectedElements);
6696
6604
  const handleMergeShapes = (operation) => {
6697
- if (!canMergeShapes || !activeSlide) {
6605
+ if (!activeSlide) {
6698
6606
  return;
6699
6607
  }
6700
- const targets = shapeLikeElements;
6701
- if (targets.length < 2) {
6608
+ const plan = planMergeShapes(operation, selectedElements);
6609
+ if (!plan) {
6702
6610
  return;
6703
6611
  }
6704
- const globalPaths = targets.map((el) => {
6705
- const localPath = resolveShapePath(el);
6706
- return transformPathToGlobal(localPath, el);
6707
- });
6708
- if (operation === "fragment") {
6709
- let allFragments = [];
6710
- let remaining = globalPaths[0];
6711
- for (let i = 1; i < globalPaths.length; i++) {
6712
- const frags = mergeShapes("fragment", remaining, globalPaths[i]);
6713
- if (Array.isArray(frags)) {
6714
- allFragments = frags;
6715
- }
6716
- if (i < globalPaths.length - 1 && allFragments.length > 0) {
6717
- remaining = allFragments[0];
6718
- }
6719
- }
6720
- if (allFragments.length === 0) {
6721
- return;
6722
- }
6723
- const idSet = new Set(effectiveSelectedIds);
6724
- const newElements = [];
6725
- for (const frag of allFragments) {
6726
- if (!frag) {
6727
- continue;
6728
- }
6729
- const bounds = pathBounds(frag);
6730
- if (bounds.width <= 0 || bounds.height <= 0) {
6731
- continue;
6732
- }
6733
- const localPath = transformPathToLocal(
6734
- frag,
6735
- bounds.x,
6736
- bounds.y,
6737
- bounds.width,
6738
- bounds.height
6739
- );
6740
- const newEl = {
6741
- id: generateElementId(),
6742
- type: "shape",
6743
- x: bounds.x,
6744
- y: bounds.y,
6745
- width: bounds.width,
6746
- height: bounds.height,
6747
- rotation: 0,
6748
- flipHorizontal: false,
6749
- flipVertical: false,
6750
- hidden: false,
6751
- opacity: targets[0].opacity ?? 1,
6752
- rawXml: {},
6753
- shapeStyle: {
6754
- ...targets[0].shapeStyle
6755
- },
6756
- shapeType: "custGeom",
6757
- pathData: localPath,
6758
- pathWidth: bounds.width,
6759
- pathHeight: bounds.height
6760
- };
6761
- newElements.push(newEl);
6762
- }
6763
- if (newElements.length === 0) {
6764
- return;
6765
- }
6766
- ops.updateSlides(
6767
- (prev) => prev.map(
6768
- (s, i) => i === activeSlideIndex ? {
6769
- ...s,
6770
- elements: [...s.elements.filter((el) => !idSet.has(el.id)), ...newElements]
6771
- } : s
6772
- )
6773
- );
6774
- setSelectedElementIds(newElements.map((el) => el.id));
6775
- history.markDirty();
6776
- } else {
6777
- let resultPath = globalPaths[0];
6778
- for (let i = 1; i < globalPaths.length; i++) {
6779
- const result = mergeShapes(operation, resultPath, globalPaths[i]);
6780
- if (typeof result === "string") {
6781
- resultPath = result;
6782
- }
6783
- }
6784
- if (!resultPath) {
6785
- return;
6786
- }
6787
- const bounds = pathBounds(resultPath);
6788
- if (bounds.width <= 0 || bounds.height <= 0) {
6789
- return;
6790
- }
6791
- const localPath = transformPathToLocal(
6792
- resultPath,
6793
- bounds.x,
6794
- bounds.y,
6795
- bounds.width,
6796
- bounds.height
6797
- );
6798
- const primary = targets[0];
6799
- const newEl = {
6800
- id: generateElementId(),
6801
- type: "shape",
6802
- x: bounds.x,
6803
- y: bounds.y,
6804
- width: bounds.width,
6805
- height: bounds.height,
6806
- rotation: 0,
6807
- flipHorizontal: false,
6808
- flipVertical: false,
6809
- hidden: false,
6810
- opacity: primary.opacity ?? 1,
6811
- rawXml: {},
6812
- shapeStyle: { ...primary.shapeStyle },
6813
- shapeType: "custGeom",
6814
- pathData: localPath,
6815
- pathWidth: bounds.width,
6816
- pathHeight: bounds.height
6817
- };
6818
- const idSet = new Set(effectiveSelectedIds);
6819
- ops.updateSlides(
6820
- (prev) => prev.map(
6821
- (s, i) => i === activeSlideIndex ? {
6822
- ...s,
6823
- elements: [...s.elements.filter((el) => !idSet.has(el.id)), newEl]
6824
- } : s
6825
- )
6826
- );
6827
- ops.applySelection(newEl.id);
6828
- history.markDirty();
6612
+ const onSlide = new Set(activeSlide.elements.map((el) => el.id));
6613
+ if (!plan.removedIds.every((id) => onSlide.has(id))) {
6614
+ return;
6829
6615
  }
6616
+ ops.updateSlides(
6617
+ (prev) => prev.map(
6618
+ (slide, i) => i === activeSlideIndex ? { ...slide, elements: applyMergeShapesPlan(slide.elements, plan) } : slide
6619
+ )
6620
+ );
6621
+ const createdIds = plan.created.map((el) => el.id);
6622
+ ops.applySelection(createdIds[0] ?? null, createdIds.length > 1 ? createdIds : []);
6623
+ history.markDirty();
6830
6624
  };
6831
- return {
6832
- handleMergeShapes,
6833
- canMergeShapes
6834
- };
6625
+ return { handleMergeShapes, canMergeShapes: canMergeShapes2 };
6835
6626
  }
6836
6627
 
6837
6628
  // src/viewer/hooks/useGroupAlignLayerHandlers.ts
@@ -6974,12 +6765,10 @@ function useGroupAlignLayerHandlers(input) {
6974
6765
  );
6975
6766
  history.markDirty();
6976
6767
  };
6977
- const { handleMergeShapes, canMergeShapes } = useMergeShapesHandler({
6768
+ const { handleMergeShapes, canMergeShapes: canMergeShapes2 } = useMergeShapesHandler({
6978
6769
  activeSlide,
6979
6770
  activeSlideIndex,
6980
6771
  selectedElements,
6981
- effectiveSelectedIds,
6982
- setSelectedElementIds,
6983
6772
  ops,
6984
6773
  history
6985
6774
  });
@@ -6994,7 +6783,7 @@ function useGroupAlignLayerHandlers(input) {
6994
6783
  handleMoveLayer,
6995
6784
  handleMoveLayerToEdge,
6996
6785
  handleMergeShapes,
6997
- canMergeShapes
6786
+ canMergeShapes: canMergeShapes2
6998
6787
  };
6999
6788
  }
7000
6789
 
@@ -7016,6 +6805,7 @@ function useElementManipulation(input) {
7016
6805
  setSidebarPanelMode,
7017
6806
  onOpenHyperlinkDialog,
7018
6807
  onEditText,
6808
+ onEditPoints,
7019
6809
  onSaveElementAsPicture
7020
6810
  } = input;
7021
6811
  const { handleCopy, handleCut, handlePaste, handleDuplicate, handleDelete } = useClipboardHandlers(input);
@@ -7030,7 +6820,7 @@ function useElementManipulation(input) {
7030
6820
  handleMoveLayer,
7031
6821
  handleMoveLayerToEdge,
7032
6822
  handleMergeShapes,
7033
- canMergeShapes
6823
+ canMergeShapes: canMergeShapes2
7034
6824
  } = useGroupAlignLayerHandlers(input);
7035
6825
  const handleContextMenuAction = (action) => {
7036
6826
  switch (action) {
@@ -7084,6 +6874,12 @@ function useElementManipulation(input) {
7084
6874
  onEditText?.(selectedElement.id);
7085
6875
  }
7086
6876
  break;
6877
+ case "edit-points":
6878
+ case "editPoints":
6879
+ if (selectedElement) {
6880
+ onEditPoints?.(selectedElement.id);
6881
+ }
6882
+ break;
7087
6883
  case "save-as-picture":
7088
6884
  if (selectedElement) {
7089
6885
  onSaveElementAsPicture?.(selectedElement.id);
@@ -7128,7 +6924,7 @@ function useElementManipulation(input) {
7128
6924
  handleMoveLayer,
7129
6925
  handleMoveLayerToEdge,
7130
6926
  handleMergeShapes,
7131
- canMergeShapes,
6927
+ canMergeShapes: canMergeShapes2,
7132
6928
  handleContextMenuAction
7133
6929
  };
7134
6930
  }
@@ -10124,7 +9920,8 @@ function useEditorOperations(input) {
10124
9920
  presentation,
10125
9921
  userName,
10126
9922
  handlerRef,
10127
- transformCommittedText
9923
+ transformCommittedText,
9924
+ keyboard
10128
9925
  } = input;
10129
9926
  const masterView = useMemo(
10130
9927
  () => ({
@@ -10185,7 +9982,8 @@ function useEditorOperations(input) {
10185
9982
  onSetActiveSlideIndex: state.setActiveSlideIndex,
10186
9983
  onSetSelectedElementId: state.setSelectedElementId,
10187
9984
  onUpdateSlides: ops.updateSlides,
10188
- onMarkDirty: history.markDirty
9985
+ onMarkDirty: history.markDirty,
9986
+ keyboard
10189
9987
  });
10190
9988
  const comments = useComments({
10191
9989
  slides,
@@ -10296,6 +10094,11 @@ function useEditorOperations(input) {
10296
10094
  history,
10297
10095
  onOpenHyperlinkDialog: () => dialogs.setIsHyperlinkDialogOpen(true),
10298
10096
  onEditText: handleEditTextFromContextMenu,
10097
+ onEditPoints: (elementId) => {
10098
+ if (canEditElementPoints(state.elementLookup.get(elementId))) {
10099
+ state.setEditPointsElementId(elementId);
10100
+ }
10101
+ },
10299
10102
  onSaveElementAsPicture: handleSaveElementAsPicture,
10300
10103
  onPasted: pasteSpecial.notePastedElement
10301
10104
  });
@@ -10755,7 +10558,7 @@ function useKeyboardShortcuts(input) {
10755
10558
  inputRef.current = input;
10756
10559
  const handleKeyDown = useCallback((e) => {
10757
10560
  const current = inputRef.current;
10758
- const startAction = mapSlideShowStartKey(e, { isPresenting: current.mode === "present" });
10561
+ const startAction = current.customization && !isFeatureEnabled(current.customization, "presentMode") ? null : mapSlideShowStartKey(e, { isPresenting: current.mode === "present" });
10759
10562
  if (startAction !== null) {
10760
10563
  e.preventDefault();
10761
10564
  if (startAction === "fromBeginning") {
@@ -10765,22 +10568,29 @@ function useKeyboardShortcuts(input) {
10765
10568
  }
10766
10569
  return;
10767
10570
  }
10768
- const { action, dx, dy } = mapEditorKey(e, {
10769
- canEdit: current.canEdit,
10770
- canPaste: current.canPaste,
10771
- // The Slide Master view is an editing surface, not a viewing one.
10772
- // Gating on `mode !== 'edit'` alone made `mapEditorKey` return
10773
- // NO_ACTION there, so Delete, the arrow-key nudges and the clipboard
10774
- // keys were all inert over a master shape even though the write path
10775
- // behind them routes to the owning part correctly. Svelte and
10776
- // vanilla, which render the master into their ordinary editable
10777
- // stage, never had the gap.
10778
- isPresenting: current.mode !== "edit" && current.mode !== "master",
10779
- hasSelection: current.hasSelection,
10780
- isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
10781
- isDrawing: current.activeTool !== "select",
10782
- isTextInputTarget: isEditorTextInputTarget(e.target)
10783
- });
10571
+ const { action, dx, dy } = mapCustomizedEditorKey(
10572
+ e,
10573
+ {
10574
+ canEdit: current.canEdit,
10575
+ canPaste: current.canPaste,
10576
+ // The Slide Master view is an editing surface, not a viewing one.
10577
+ // Gating on `mode !== 'edit'` alone made `mapEditorKey` return
10578
+ // NO_ACTION there, so Delete, the arrow-key nudges and the clipboard
10579
+ // keys were all inert over a master shape even though the write path
10580
+ // behind them routes to the owning part correctly. Svelte and
10581
+ // vanilla, which render the master into their ordinary editable
10582
+ // stage, never had the gap.
10583
+ isPresenting: current.mode !== "edit" && current.mode !== "master",
10584
+ hasSelection: current.hasSelection,
10585
+ isEditingText: Boolean(
10586
+ current.inlineEditingElementId || current.tableEditorState?.isEditing
10587
+ ),
10588
+ isDrawing: current.activeTool !== "select",
10589
+ isTextInputTarget: isEditorTextInputTarget(e.target),
10590
+ isControlTarget: isEditorControlTarget(e.target)
10591
+ },
10592
+ current.customization?.keyboard
10593
+ );
10784
10594
  if (action === null) {
10785
10595
  return;
10786
10596
  }
@@ -10913,9 +10723,11 @@ function useKeyboardShortcutWiring(input) {
10913
10723
  onOpenHyperlinkDialog,
10914
10724
  copyFormatFromSelection,
10915
10725
  pasteFormatToSelection,
10916
- onPasteSpecial
10726
+ onPasteSpecial,
10727
+ customization
10917
10728
  } = input;
10918
10729
  useKeyboardShortcuts({
10730
+ customization,
10919
10731
  containerRef: state.containerRef,
10920
10732
  mode,
10921
10733
  canEdit,
@@ -11196,9 +11008,12 @@ function useViewerIntegration(input) {
11196
11008
  onRestore: setContent
11197
11009
  });
11198
11010
  const updateElements = useElementUpdateBatch(input);
11011
+ const fallbackCustomizationRef = useRef(null);
11012
+ const customizationApi = input.customizationApi ?? (fallbackCustomizationRef.current ??= createCustomizationController().api);
11199
11013
  useImperativeHandle(
11200
11014
  ref,
11201
11015
  () => ({
11016
+ ...customizationApi,
11202
11017
  async getContent() {
11203
11018
  const data = await serializeSlides();
11204
11019
  if (data && onContentChange) {
@@ -11370,7 +11185,8 @@ function useViewerIntegration(input) {
11370
11185
  history,
11371
11186
  zoom,
11372
11187
  mode,
11373
- editorOps
11188
+ editorOps,
11189
+ customizationApi
11374
11190
  ]
11375
11191
  );
11376
11192
  useEffect(() => {
@@ -11421,7 +11237,8 @@ function useViewerIntegration(input) {
11421
11237
  onOpenHyperlinkDialog: () => dialogs.setIsHyperlinkDialogOpen(true),
11422
11238
  copyFormatFromSelection: editorOps.copyFormatFromSelection,
11423
11239
  pasteFormatToSelection: editorOps.pasteFormatToSelection,
11424
- onPasteSpecial: editorOps.pasteSpecial.openPasteSpecialDialog
11240
+ onPasteSpecial: editorOps.pasteSpecial.openPasteSpecialDialog,
11241
+ customization: input.customization
11425
11242
  });
11426
11243
  return {
11427
11244
  exportHandlers,
@@ -12908,14 +12725,15 @@ function useViewerBuildingBlocksCore(input) {
12908
12725
  } = state;
12909
12726
  const hasActivePointerInteraction = useCallback(
12910
12727
  () => Boolean(
12911
- state.dragStateRef.current || state.resizeStateRef.current || state.marqueeStateRef.current || state.shapeAdjustmentDragStateRef.current || state.isDrawingRef.current
12728
+ state.dragStateRef.current || state.resizeStateRef.current || state.marqueeStateRef.current || state.shapeAdjustmentDragStateRef.current || state.isDrawingRef.current || state.cropSessionRef.current
12912
12729
  ),
12913
12730
  [
12914
12731
  state.dragStateRef,
12915
12732
  state.resizeStateRef,
12916
12733
  state.marqueeStateRef,
12917
12734
  state.shapeAdjustmentDragStateRef,
12918
- state.isDrawingRef
12735
+ state.isDrawingRef,
12736
+ state.cropSessionRef
12919
12737
  ]
12920
12738
  );
12921
12739
  const zoom = useZoomViewport({
@@ -16314,7 +16132,7 @@ function FailedToLoad() {
16314
16132
  var LazyModel3DScene = React17.lazy(
16315
16133
  async () => {
16316
16134
  try {
16317
- return await import('./Model3DScene-QXMMJRV3.mjs');
16135
+ return await import('./Model3DScene-QFWI5CEE.mjs');
16318
16136
  } catch {
16319
16137
  return { default: FailedToLoad };
16320
16138
  }
@@ -18939,4 +18757,4 @@ function useResizablePanels() {
18939
18757
  };
18940
18758
  }
18941
18759
 
18942
- export { ACTION_VERB_MAP, ChartPartSelectionProvider, CollaborationCursorOverlay, CollaborationProvider, ElementRenderer, FragmentedTransitionLayer, InlineCollaborationContext, MIN_TOUCH_TARGET, MorphTransitionOverlay, PresentationTransitionOverlay, RemoteSelectionOverlay, RemoteUserCursors, Rendering3DFlagsContext, ResizeHandles, SlideBackgroundImageLayer, SlideLayer, SmartArtRenderer, StaticElementRenderer, ViewerOptionsContext, computeToolbarVisibility, detectTargetType, isAudienceTab, parseAudienceNonce, parseEmailUrl, parseSlideFromUrl, playAnimationSound, renderStrokeView, renderToCanvas, resolveSmartArtDataPalette, safePrompt, scopeLayoutOptionsToActiveSlide, useAnimationPlayback, useAnnotationHandlers, useAudienceMode, useAutosave, useBroadcastFollower, useCanvasInteractions, 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 };
18760
+ export { ACTION_VERB_MAP, ChartPartSelectionProvider, CollaborationCursorOverlay, CollaborationProvider, ElementRenderer, FragmentedTransitionLayer, InlineCollaborationContext, MIN_TOUCH_TARGET, MorphTransitionOverlay, PresentationTransitionOverlay, RemoteSelectionOverlay, RemoteUserCursors, Rendering3DFlagsContext, ResizeHandles, SlideBackgroundImageLayer, SlideLayer, SmartArtRenderer, StaticElementRenderer, ViewerOptionsContext, computeToolbarVisibility, detectTargetType, imgSrc, isAudienceTab, parseAudienceNonce, parseEmailUrl, parseSlideFromUrl, playAnimationSound, renderStrokeView, renderToCanvas, resolveSmartArtDataPalette, safePrompt, scopeLayoutOptionsToActiveSlide, useAnimationPlayback, useAnnotationHandlers, useAudienceMode, useAutosave, useBroadcastFollower, useCanvasInteractions, 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 };