pptx-react-viewer 4.37.0 → 4.39.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.
- package/CHANGELOG.md +74 -0
- package/dist/{chunk-L4E5A5DE.js → chunk-2LNWGZPT.js} +2157 -2013
- package/dist/chunk-2LNWGZPT.js.br +0 -0
- package/dist/chunk-2LNWGZPT.js.gz +0 -0
- package/dist/{chunk-RZIXD6X7.mjs → chunk-5XBS7MCX.mjs} +53 -13
- package/dist/chunk-5XBS7MCX.mjs.br +0 -0
- package/dist/chunk-5XBS7MCX.mjs.gz +0 -0
- package/dist/{chunk-YAODOVJY.js → chunk-HOKZJLT5.js} +52 -10
- package/dist/chunk-HOKZJLT5.js.br +0 -0
- package/dist/chunk-HOKZJLT5.js.gz +0 -0
- package/dist/{chunk-RXN5Q6CJ.mjs → chunk-TYULCCA6.mjs} +1183 -1039
- package/dist/chunk-TYULCCA6.mjs.br +0 -0
- package/dist/chunk-TYULCCA6.mjs.gz +0 -0
- package/dist/i18n/de.cjs +629 -42
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +629 -42
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +629 -42
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +629 -42
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +632 -42
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +632 -42
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +640 -53
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +640 -53
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/index.d.ts +22 -5
- package/dist/index.js +22 -22
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +37 -29
- package/dist/internals.js +80 -80
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +1 -1
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.d.ts +17 -3
- package/dist/viewer/index.js +17 -17
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +2 -2
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +3 -3
- package/dist/chunk-L4E5A5DE.js.br +0 -0
- package/dist/chunk-L4E5A5DE.js.gz +0 -0
- package/dist/chunk-RXN5Q6CJ.mjs.br +0 -0
- package/dist/chunk-RXN5Q6CJ.mjs.gz +0 -0
- package/dist/chunk-RZIXD6X7.mjs.br +0 -0
- package/dist/chunk-RZIXD6X7.mjs.gz +0 -0
- package/dist/chunk-YAODOVJY.js.br +0 -0
- package/dist/chunk-YAODOVJY.js.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
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, comparePresentation, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, stopAllPersistentAudio, buildSaveSlides, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, makeCloneId,
|
|
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, 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, 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, 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, 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, resolveViewportFitOptions, EDITOR_VIEWPORT_FIT, 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 { 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-UC2VQORY.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, 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, 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, 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, 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';
|
|
3
3
|
export { DUOTONE_PRESETS, MOBILE_BREAKPOINT, SLIDE_TRANSITION_KEYFRAMES, TABLET_BREAKPOINT, clearAudienceContent, computeVirtualRange, downloadBlob, getSlideTransitionAnimations, loadAudienceContent, storeAudienceContent } from 'ooxml-ui/pptx';
|
|
4
4
|
import React17, { createContext, useMemo, useState, useCallback, useEffect, Suspense, useRef, useLayoutEffect, useContext, useSyncExternalStore, useImperativeHandle } from 'react';
|
|
5
5
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -997,11 +997,10 @@ function useViewerStore(store, selector, isEqual = Object.is) {
|
|
|
997
997
|
);
|
|
998
998
|
return useSyncExternalStore(subscribe2, getSnapshot2, getSnapshot2);
|
|
999
999
|
}
|
|
1000
|
-
var DEFAULT_FIT = EDITOR_VIEWPORT_FIT;
|
|
1001
1000
|
function useViewportFit(canvasSize, viewportRef, options, viewportNode) {
|
|
1002
1001
|
const [editorDimensions, setEditorDimensions] = useState(null);
|
|
1003
|
-
const {
|
|
1004
|
-
const
|
|
1002
|
+
const { maxFitScale } = resolveViewportFitOptions(options, editorViewportFitFor(Infinity));
|
|
1003
|
+
const hostPadding = options.fitPadding;
|
|
1005
1004
|
const effectiveEditorDimensions = editorDimensions ?? canvasSize;
|
|
1006
1005
|
const { scale: fitScale } = calculateViewportFit({
|
|
1007
1006
|
viewportWidth: effectiveEditorDimensions.width,
|
|
@@ -1022,7 +1021,11 @@ function useViewportFit(canvasSize, viewportRef, options, viewportNode) {
|
|
|
1022
1021
|
viewportHeight: element.clientHeight,
|
|
1023
1022
|
canvasWidth: canvasSize.width,
|
|
1024
1023
|
canvasHeight: canvasSize.height,
|
|
1025
|
-
|
|
1024
|
+
// The host's padding when it gave one, else the width-aware editor default.
|
|
1025
|
+
...resolveViewportFitOptions(
|
|
1026
|
+
{ fitPadding: hostPadding },
|
|
1027
|
+
editorViewportFitFor(element.clientWidth)
|
|
1028
|
+
)
|
|
1026
1029
|
});
|
|
1027
1030
|
if (width > 0 && height > 0) {
|
|
1028
1031
|
setEditorDimensions({ width, height });
|
|
@@ -1043,7 +1046,7 @@ function useViewportFit(canvasSize, viewportRef, options, viewportNode) {
|
|
|
1043
1046
|
cancelAnimationFrame(raf);
|
|
1044
1047
|
observer?.disconnect();
|
|
1045
1048
|
};
|
|
1046
|
-
}, [viewportRef, viewportNode, canvasSize.width, canvasSize.height,
|
|
1049
|
+
}, [viewportRef, viewportNode, canvasSize.width, canvasSize.height, hostPadding]);
|
|
1047
1050
|
return { editorDimensions, setEditorDimensions, effectiveEditorDimensions, fitScale };
|
|
1048
1051
|
}
|
|
1049
1052
|
function useViewportNode() {
|
|
@@ -4315,6 +4318,7 @@ function useViewerUIState(inspectorInitiallyOpen) {
|
|
|
4315
4318
|
typeof window === "undefined" || window.innerWidth >= 768
|
|
4316
4319
|
)
|
|
4317
4320
|
);
|
|
4321
|
+
const [isMobileInsertOpen, setIsMobileInsertOpen] = useState(false);
|
|
4318
4322
|
const [isSlideNotesCollapsed, setIsSlideNotesCollapsed] = useState(true);
|
|
4319
4323
|
const [isOverflowMenuOpen, setIsOverflowMenuOpen] = useState(false);
|
|
4320
4324
|
const [isSidebarCollapsed, setIsSidebarCollapsed] = useState(false);
|
|
@@ -4357,6 +4361,8 @@ function useViewerUIState(inspectorInitiallyOpen) {
|
|
|
4357
4361
|
setToolbarSection,
|
|
4358
4362
|
isSlidesPaneOpen,
|
|
4359
4363
|
setIsSlidesPaneOpen,
|
|
4364
|
+
isMobileInsertOpen,
|
|
4365
|
+
setIsMobileInsertOpen,
|
|
4360
4366
|
isInspectorPaneOpen,
|
|
4361
4367
|
setIsInspectorPaneOpen,
|
|
4362
4368
|
isSlideNotesCollapsed,
|
|
@@ -6548,12 +6554,12 @@ function useInsertElements(input) {
|
|
|
6548
6554
|
}
|
|
6549
6555
|
});
|
|
6550
6556
|
};
|
|
6551
|
-
const handleAddTable = () => {
|
|
6557
|
+
const handleAddTable = (rows = DEFAULT_TABLE_ROWS, columns = DEFAULT_TABLE_COLUMNS) => {
|
|
6552
6558
|
if (!activeSlide) {
|
|
6553
6559
|
return;
|
|
6554
6560
|
}
|
|
6555
6561
|
addElement({
|
|
6556
|
-
...newTableElement(
|
|
6562
|
+
...newTableElement(rows, columns, 100, 200),
|
|
6557
6563
|
id: generateElementId()
|
|
6558
6564
|
});
|
|
6559
6565
|
};
|
|
@@ -11116,9 +11122,14 @@ function useViewerIntegration(input) {
|
|
|
11116
11122
|
const updateElements = useElementUpdateBatch(input);
|
|
11117
11123
|
const fallbackCustomizationRef = useRef(null);
|
|
11118
11124
|
const customizationApi = input.customizationApi ?? (fallbackCustomizationRef.current ??= createCustomizationController().api);
|
|
11125
|
+
const latestHandleRef = useRef(null);
|
|
11126
|
+
const viewerApiRef = useRef(null);
|
|
11127
|
+
viewerApiRef.current ??= new Proxy({}, {
|
|
11128
|
+
get: (_target, key) => latestHandleRef.current?.[key]
|
|
11129
|
+
});
|
|
11119
11130
|
useImperativeHandle(
|
|
11120
11131
|
ref,
|
|
11121
|
-
() =>
|
|
11132
|
+
() => latestHandleRef.current = {
|
|
11122
11133
|
...customizationApi,
|
|
11123
11134
|
async getContent() {
|
|
11124
11135
|
const data = await serializeSlides();
|
|
@@ -11275,7 +11286,7 @@ function useViewerIntegration(input) {
|
|
|
11275
11286
|
editorOps.manipulation.handleDuplicate();
|
|
11276
11287
|
return state.selectedElementIds[0];
|
|
11277
11288
|
}
|
|
11278
|
-
}
|
|
11289
|
+
},
|
|
11279
11290
|
[
|
|
11280
11291
|
updateElements,
|
|
11281
11292
|
serializeSlides,
|
|
@@ -11362,6 +11373,7 @@ function useViewerIntegration(input) {
|
|
|
11362
11373
|
isEncryptedDialogOpen,
|
|
11363
11374
|
setIsEncryptedDialogOpen,
|
|
11364
11375
|
handlerRef,
|
|
11376
|
+
viewerApi: viewerApiRef.current,
|
|
11365
11377
|
loadVersion
|
|
11366
11378
|
};
|
|
11367
11379
|
}
|
|
@@ -12584,6 +12596,8 @@ function buildToolbarProps(input) {
|
|
|
12584
12596
|
}
|
|
12585
12597
|
},
|
|
12586
12598
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
12599
|
+
isMobileInsertOpen: s.isMobileInsertOpen,
|
|
12600
|
+
onCloseMobileInsert: () => s.setIsMobileInsertOpen(false),
|
|
12587
12601
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
12588
12602
|
reviewComments: createReviewCommentsHost({
|
|
12589
12603
|
state: s,
|
|
@@ -13783,6 +13797,10 @@ function SlideBackgroundImageLayer({
|
|
|
13783
13797
|
}
|
|
13784
13798
|
);
|
|
13785
13799
|
}
|
|
13800
|
+
var ChartFormatContext = createContext(null);
|
|
13801
|
+
function useChartFormatContext() {
|
|
13802
|
+
return useContext(ChartFormatContext);
|
|
13803
|
+
}
|
|
13786
13804
|
var ChartPartSelectionContext = createContext({
|
|
13787
13805
|
selection: null,
|
|
13788
13806
|
setSelection: () => {
|
|
@@ -14042,6 +14060,8 @@ function ChartElementView({
|
|
|
14042
14060
|
const [titleDraft, setTitleDraft] = useState(null);
|
|
14043
14061
|
const selectedPart = selection?.elementId === element.id ? selection.part : null;
|
|
14044
14062
|
const canEdit = editable && Boolean(onUpdateElement);
|
|
14063
|
+
const chartFormat = useChartFormatContext();
|
|
14064
|
+
const formatsThisChart = canEdit && chartFormat?.chart?.id === element.id;
|
|
14045
14065
|
const rendering3DFlags = useContext(Rendering3DFlagsContext);
|
|
14046
14066
|
const barFacePictureSampleVersion = useSyncExternalStore(
|
|
14047
14067
|
subscribeBarFacePicturePixelSamples,
|
|
@@ -14091,6 +14111,11 @@ function ChartElementView({
|
|
|
14091
14111
|
setTitleDraft(element.chartData?.title ?? "");
|
|
14092
14112
|
return;
|
|
14093
14113
|
}
|
|
14114
|
+
if (formatsThisChart) {
|
|
14115
|
+
e.stopPropagation();
|
|
14116
|
+
chartFormat?.openPane(chartFormatTargetFromEvent(e.nativeEvent, wrapperRef.current, element));
|
|
14117
|
+
return;
|
|
14118
|
+
}
|
|
14094
14119
|
if (findChartPartTarget(e.target)) {
|
|
14095
14120
|
e.stopPropagation();
|
|
14096
14121
|
}
|
|
@@ -14120,10 +14145,25 @@ function ChartElementView({
|
|
|
14120
14145
|
{
|
|
14121
14146
|
ref: wrapperRef,
|
|
14122
14147
|
className: `relative w-full h-full ${canEdit ? "pptx-chart-interactive" : ""}`,
|
|
14123
|
-
onPointerDown:
|
|
14148
|
+
onPointerDown: (e) => {
|
|
14149
|
+
if (formatsThisChart) {
|
|
14150
|
+
chartFormat?.setTarget(
|
|
14151
|
+
chartFormatTargetFromEvent(e.nativeEvent, wrapperRef.current, element)
|
|
14152
|
+
);
|
|
14153
|
+
}
|
|
14154
|
+
handlePointerDown(e);
|
|
14155
|
+
},
|
|
14124
14156
|
onPointerMove: handlePointerMove,
|
|
14125
14157
|
onPointerUp: handlePointerUp,
|
|
14126
14158
|
onDoubleClick: handleDoubleClick,
|
|
14159
|
+
onContextMenu: (e) => {
|
|
14160
|
+
if (onUpdateElement && chartFormat) {
|
|
14161
|
+
chartFormat.setTarget(
|
|
14162
|
+
chartFormatTargetFromEvent(e.nativeEvent, wrapperRef.current, element),
|
|
14163
|
+
element.id
|
|
14164
|
+
);
|
|
14165
|
+
}
|
|
14166
|
+
},
|
|
14127
14167
|
children: [
|
|
14128
14168
|
chart3D.spec ? /* @__PURE__ */ jsx(
|
|
14129
14169
|
ThreeView,
|
|
@@ -18914,4 +18954,4 @@ function useResizablePanels() {
|
|
|
18914
18954
|
};
|
|
18915
18955
|
}
|
|
18916
18956
|
|
|
18917
|
-
export { ACTION_VERB_MAP, 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, 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 };
|
|
18957
|
+
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 };
|
|
Binary file
|
|
Binary file
|
|
@@ -1002,11 +1002,10 @@ function useViewerStore(store, selector, isEqual = Object.is) {
|
|
|
1002
1002
|
);
|
|
1003
1003
|
return React17.useSyncExternalStore(subscribe2, getSnapshot2, getSnapshot2);
|
|
1004
1004
|
}
|
|
1005
|
-
var DEFAULT_FIT = pptx.EDITOR_VIEWPORT_FIT;
|
|
1006
1005
|
function useViewportFit(canvasSize, viewportRef, options, viewportNode) {
|
|
1007
1006
|
const [editorDimensions, setEditorDimensions] = React17.useState(null);
|
|
1008
|
-
const {
|
|
1009
|
-
const
|
|
1007
|
+
const { maxFitScale } = pptx.resolveViewportFitOptions(options, pptx.editorViewportFitFor(Infinity));
|
|
1008
|
+
const hostPadding = options.fitPadding;
|
|
1010
1009
|
const effectiveEditorDimensions = editorDimensions ?? canvasSize;
|
|
1011
1010
|
const { scale: fitScale } = pptx.calculateViewportFit({
|
|
1012
1011
|
viewportWidth: effectiveEditorDimensions.width,
|
|
@@ -1027,7 +1026,11 @@ function useViewportFit(canvasSize, viewportRef, options, viewportNode) {
|
|
|
1027
1026
|
viewportHeight: element.clientHeight,
|
|
1028
1027
|
canvasWidth: canvasSize.width,
|
|
1029
1028
|
canvasHeight: canvasSize.height,
|
|
1030
|
-
|
|
1029
|
+
// The host's padding when it gave one, else the width-aware editor default.
|
|
1030
|
+
...pptx.resolveViewportFitOptions(
|
|
1031
|
+
{ fitPadding: hostPadding },
|
|
1032
|
+
pptx.editorViewportFitFor(element.clientWidth)
|
|
1033
|
+
)
|
|
1031
1034
|
});
|
|
1032
1035
|
if (width > 0 && height > 0) {
|
|
1033
1036
|
setEditorDimensions({ width, height });
|
|
@@ -1048,7 +1051,7 @@ function useViewportFit(canvasSize, viewportRef, options, viewportNode) {
|
|
|
1048
1051
|
cancelAnimationFrame(raf);
|
|
1049
1052
|
observer?.disconnect();
|
|
1050
1053
|
};
|
|
1051
|
-
}, [viewportRef, viewportNode, canvasSize.width, canvasSize.height,
|
|
1054
|
+
}, [viewportRef, viewportNode, canvasSize.width, canvasSize.height, hostPadding]);
|
|
1052
1055
|
return { editorDimensions, setEditorDimensions, effectiveEditorDimensions, fitScale };
|
|
1053
1056
|
}
|
|
1054
1057
|
function useViewportNode() {
|
|
@@ -4320,6 +4323,7 @@ function useViewerUIState(inspectorInitiallyOpen) {
|
|
|
4320
4323
|
typeof window === "undefined" || window.innerWidth >= 768
|
|
4321
4324
|
)
|
|
4322
4325
|
);
|
|
4326
|
+
const [isMobileInsertOpen, setIsMobileInsertOpen] = React17.useState(false);
|
|
4323
4327
|
const [isSlideNotesCollapsed, setIsSlideNotesCollapsed] = React17.useState(true);
|
|
4324
4328
|
const [isOverflowMenuOpen, setIsOverflowMenuOpen] = React17.useState(false);
|
|
4325
4329
|
const [isSidebarCollapsed, setIsSidebarCollapsed] = React17.useState(false);
|
|
@@ -4362,6 +4366,8 @@ function useViewerUIState(inspectorInitiallyOpen) {
|
|
|
4362
4366
|
setToolbarSection,
|
|
4363
4367
|
isSlidesPaneOpen,
|
|
4364
4368
|
setIsSlidesPaneOpen,
|
|
4369
|
+
isMobileInsertOpen,
|
|
4370
|
+
setIsMobileInsertOpen,
|
|
4365
4371
|
isInspectorPaneOpen,
|
|
4366
4372
|
setIsInspectorPaneOpen,
|
|
4367
4373
|
isSlideNotesCollapsed,
|
|
@@ -6553,12 +6559,12 @@ function useInsertElements(input) {
|
|
|
6553
6559
|
}
|
|
6554
6560
|
});
|
|
6555
6561
|
};
|
|
6556
|
-
const handleAddTable = () => {
|
|
6562
|
+
const handleAddTable = (rows = chunk43TOUP5U_js.DEFAULT_TABLE_ROWS, columns = chunk43TOUP5U_js.DEFAULT_TABLE_COLUMNS) => {
|
|
6557
6563
|
if (!activeSlide) {
|
|
6558
6564
|
return;
|
|
6559
6565
|
}
|
|
6560
6566
|
addElement({
|
|
6561
|
-
...pptx.newTableElement(
|
|
6567
|
+
...pptx.newTableElement(rows, columns, 100, 200),
|
|
6562
6568
|
id: pptx.generateElementId()
|
|
6563
6569
|
});
|
|
6564
6570
|
};
|
|
@@ -11121,9 +11127,14 @@ function useViewerIntegration(input) {
|
|
|
11121
11127
|
const updateElements = useElementUpdateBatch(input);
|
|
11122
11128
|
const fallbackCustomizationRef = React17.useRef(null);
|
|
11123
11129
|
const customizationApi = input.customizationApi ?? (fallbackCustomizationRef.current ??= pptx.createCustomizationController().api);
|
|
11130
|
+
const latestHandleRef = React17.useRef(null);
|
|
11131
|
+
const viewerApiRef = React17.useRef(null);
|
|
11132
|
+
viewerApiRef.current ??= new Proxy({}, {
|
|
11133
|
+
get: (_target, key) => latestHandleRef.current?.[key]
|
|
11134
|
+
});
|
|
11124
11135
|
React17.useImperativeHandle(
|
|
11125
11136
|
ref,
|
|
11126
|
-
() =>
|
|
11137
|
+
() => latestHandleRef.current = {
|
|
11127
11138
|
...customizationApi,
|
|
11128
11139
|
async getContent() {
|
|
11129
11140
|
const data = await serializeSlides();
|
|
@@ -11280,7 +11291,7 @@ function useViewerIntegration(input) {
|
|
|
11280
11291
|
editorOps.manipulation.handleDuplicate();
|
|
11281
11292
|
return state.selectedElementIds[0];
|
|
11282
11293
|
}
|
|
11283
|
-
}
|
|
11294
|
+
},
|
|
11284
11295
|
[
|
|
11285
11296
|
updateElements,
|
|
11286
11297
|
serializeSlides,
|
|
@@ -11367,6 +11378,7 @@ function useViewerIntegration(input) {
|
|
|
11367
11378
|
isEncryptedDialogOpen,
|
|
11368
11379
|
setIsEncryptedDialogOpen,
|
|
11369
11380
|
handlerRef,
|
|
11381
|
+
viewerApi: viewerApiRef.current,
|
|
11370
11382
|
loadVersion
|
|
11371
11383
|
};
|
|
11372
11384
|
}
|
|
@@ -12589,6 +12601,8 @@ function buildToolbarProps(input) {
|
|
|
12589
12601
|
}
|
|
12590
12602
|
},
|
|
12591
12603
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
12604
|
+
isMobileInsertOpen: s.isMobileInsertOpen,
|
|
12605
|
+
onCloseMobileInsert: () => s.setIsMobileInsertOpen(false),
|
|
12592
12606
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
12593
12607
|
reviewComments: createReviewCommentsHost({
|
|
12594
12608
|
state: s,
|
|
@@ -13788,6 +13802,10 @@ function SlideBackgroundImageLayer({
|
|
|
13788
13802
|
}
|
|
13789
13803
|
);
|
|
13790
13804
|
}
|
|
13805
|
+
var ChartFormatContext = React17.createContext(null);
|
|
13806
|
+
function useChartFormatContext() {
|
|
13807
|
+
return React17.useContext(ChartFormatContext);
|
|
13808
|
+
}
|
|
13791
13809
|
var ChartPartSelectionContext = React17.createContext({
|
|
13792
13810
|
selection: null,
|
|
13793
13811
|
setSelection: () => {
|
|
@@ -14047,6 +14065,8 @@ function ChartElementView({
|
|
|
14047
14065
|
const [titleDraft, setTitleDraft] = React17.useState(null);
|
|
14048
14066
|
const selectedPart = selection?.elementId === element.id ? selection.part : null;
|
|
14049
14067
|
const canEdit = editable && Boolean(onUpdateElement);
|
|
14068
|
+
const chartFormat = useChartFormatContext();
|
|
14069
|
+
const formatsThisChart = canEdit && chartFormat?.chart?.id === element.id;
|
|
14050
14070
|
const rendering3DFlags = React17.useContext(Rendering3DFlagsContext);
|
|
14051
14071
|
const barFacePictureSampleVersion = React17.useSyncExternalStore(
|
|
14052
14072
|
pptx.subscribeBarFacePicturePixelSamples,
|
|
@@ -14096,6 +14116,11 @@ function ChartElementView({
|
|
|
14096
14116
|
setTitleDraft(element.chartData?.title ?? "");
|
|
14097
14117
|
return;
|
|
14098
14118
|
}
|
|
14119
|
+
if (formatsThisChart) {
|
|
14120
|
+
e.stopPropagation();
|
|
14121
|
+
chartFormat?.openPane(pptx.chartFormatTargetFromEvent(e.nativeEvent, wrapperRef.current, element));
|
|
14122
|
+
return;
|
|
14123
|
+
}
|
|
14099
14124
|
if (pptx.findChartPartTarget(e.target)) {
|
|
14100
14125
|
e.stopPropagation();
|
|
14101
14126
|
}
|
|
@@ -14125,10 +14150,25 @@ function ChartElementView({
|
|
|
14125
14150
|
{
|
|
14126
14151
|
ref: wrapperRef,
|
|
14127
14152
|
className: `relative w-full h-full ${canEdit ? "pptx-chart-interactive" : ""}`,
|
|
14128
|
-
onPointerDown:
|
|
14153
|
+
onPointerDown: (e) => {
|
|
14154
|
+
if (formatsThisChart) {
|
|
14155
|
+
chartFormat?.setTarget(
|
|
14156
|
+
pptx.chartFormatTargetFromEvent(e.nativeEvent, wrapperRef.current, element)
|
|
14157
|
+
);
|
|
14158
|
+
}
|
|
14159
|
+
handlePointerDown(e);
|
|
14160
|
+
},
|
|
14129
14161
|
onPointerMove: handlePointerMove,
|
|
14130
14162
|
onPointerUp: handlePointerUp,
|
|
14131
14163
|
onDoubleClick: handleDoubleClick,
|
|
14164
|
+
onContextMenu: (e) => {
|
|
14165
|
+
if (onUpdateElement && chartFormat) {
|
|
14166
|
+
chartFormat.setTarget(
|
|
14167
|
+
pptx.chartFormatTargetFromEvent(e.nativeEvent, wrapperRef.current, element),
|
|
14168
|
+
element.id
|
|
14169
|
+
);
|
|
14170
|
+
}
|
|
14171
|
+
},
|
|
14132
14172
|
children: [
|
|
14133
14173
|
chart3D.spec ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
14134
14174
|
ThreeView,
|
|
@@ -18960,6 +19000,7 @@ Object.defineProperty(exports, "storeAudienceContent", {
|
|
|
18960
19000
|
get: function () { return pptx.storeAudienceContent; }
|
|
18961
19001
|
});
|
|
18962
19002
|
exports.ACTION_VERB_MAP = ACTION_VERB_MAP;
|
|
19003
|
+
exports.ChartFormatContext = ChartFormatContext;
|
|
18963
19004
|
exports.ChartPartSelectionProvider = ChartPartSelectionProvider;
|
|
18964
19005
|
exports.CollaborationCursorOverlay = CollaborationCursorOverlay;
|
|
18965
19006
|
exports.CollaborationProvider = CollaborationProvider;
|
|
@@ -18999,6 +19040,7 @@ exports.useAudienceMode = useAudienceMode;
|
|
|
18999
19040
|
exports.useAutosave = useAutosave;
|
|
19000
19041
|
exports.useBroadcastFollower = useBroadcastFollower;
|
|
19001
19042
|
exports.useCanvasInteractions = useCanvasInteractions;
|
|
19043
|
+
exports.useChartFormatContext = useChartFormatContext;
|
|
19002
19044
|
exports.useChartPartSelection = useChartPartSelection;
|
|
19003
19045
|
exports.useClipboardHandlers = useClipboardHandlers;
|
|
19004
19046
|
exports.useCollaboration = useCollaboration;
|
|
Binary file
|
|
Binary file
|