pptx-react-viewer 4.46.0 → 4.47.1
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 +44 -0
- package/README.md +3 -0
- package/dist/{AiChatPanel-Z5VHI4WA.mjs → AiChatPanel-6S4LWXGM.mjs} +2 -2
- package/dist/AiChatPanel-6S4LWXGM.mjs.br +0 -0
- package/dist/AiChatPanel-6S4LWXGM.mjs.gz +0 -0
- package/dist/{AiChatPanel-TGZQBH3L.js → AiChatPanel-IEM43TTZ.js} +10 -10
- package/dist/AiChatPanel-IEM43TTZ.js.br +0 -0
- package/dist/AiChatPanel-IEM43TTZ.js.gz +0 -0
- package/dist/{Model3DScene-5HLXSIIK.js → Model3DScene-CCIG67DJ.js} +1 -1
- package/dist/Model3DScene-CCIG67DJ.js.br +0 -0
- package/dist/Model3DScene-CCIG67DJ.js.gz +0 -0
- package/dist/{Model3DScene-MSC4LEKG.mjs → Model3DScene-NUJH2UKM.mjs} +1 -1
- package/dist/Model3DScene-NUJH2UKM.mjs.br +0 -0
- package/dist/Model3DScene-NUJH2UKM.mjs.gz +0 -0
- package/dist/{chunk-CLHUOZSY.mjs → chunk-2I7ZAM4F.mjs} +244 -160
- package/dist/chunk-2I7ZAM4F.mjs.br +0 -0
- package/dist/chunk-2I7ZAM4F.mjs.gz +0 -0
- package/dist/{chunk-UQFIRJGG.mjs → chunk-BL7UYXYD.mjs} +233 -128
- package/dist/chunk-BL7UYXYD.mjs.br +0 -0
- package/dist/chunk-BL7UYXYD.mjs.gz +0 -0
- package/dist/{chunk-FBN7UFW2.mjs → chunk-BVQSH5SS.mjs} +36 -43
- package/dist/chunk-BVQSH5SS.mjs.br +0 -0
- package/dist/chunk-BVQSH5SS.mjs.gz +0 -0
- package/dist/{chunk-VJZJESNT.js → chunk-MA2BI7LX.js} +45 -61
- package/dist/chunk-MA2BI7LX.js.br +0 -0
- package/dist/chunk-MA2BI7LX.js.gz +0 -0
- package/dist/{chunk-W2IMY5SY.js → chunk-PIRHQTI4.js} +0 -2
- package/dist/chunk-PIRHQTI4.js.br +0 -0
- package/dist/chunk-PIRHQTI4.js.gz +0 -0
- package/dist/{chunk-2J3467IB.js → chunk-TANR7L7E.js} +546 -462
- package/dist/chunk-TANR7L7E.js.br +0 -0
- package/dist/chunk-TANR7L7E.js.gz +0 -0
- package/dist/{chunk-Q3DHYOLK.mjs → chunk-UV2HVMKZ.mjs} +1 -2
- package/dist/chunk-UV2HVMKZ.mjs.br +0 -0
- package/dist/chunk-UV2HVMKZ.mjs.gz +0 -0
- package/dist/{chunk-AMXSOQRH.js → chunk-VUVBSQLT.js} +408 -301
- package/dist/chunk-VUVBSQLT.js.br +0 -0
- package/dist/chunk-VUVBSQLT.js.gz +0 -0
- package/dist/i18n.js +1 -1
- package/dist/i18n.js.br +2 -2
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +1 -1
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +42 -5
- package/dist/index.js +25 -25
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +66 -7
- package/dist/internals.js +82 -82
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer-canvas.css +2 -0
- package/dist/pptx-viewer-canvas.css.br +0 -0
- package/dist/pptx-viewer-canvas.css.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/{three.module-JPZUM7AI.mjs → three.module-EBJVANGB.mjs} +1 -1
- package/dist/three.module-EBJVANGB.mjs.br +0 -0
- package/dist/three.module-EBJVANGB.mjs.gz +0 -0
- package/dist/{three.module-RIUI7P3J.js → three.module-MBFHAT6M.js} +1 -1
- package/dist/three.module-MBFHAT6M.js.br +0 -0
- package/dist/three.module-MBFHAT6M.js.gz +0 -0
- package/dist/viewer/index.d.ts +44 -9
- package/dist/viewer/index.js +20 -20
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/dist/{y-webrtc-CCA4HVZZ.mjs → y-webrtc-2H7UYAQD.mjs} +1 -1
- package/dist/y-webrtc-2H7UYAQD.mjs.br +0 -0
- package/dist/y-webrtc-2H7UYAQD.mjs.gz +0 -0
- package/dist/{y-webrtc-MB5ZXFBA.js → y-webrtc-DVPQNFLL.js} +5 -5
- package/dist/y-webrtc-DVPQNFLL.js.br +0 -0
- package/dist/y-webrtc-DVPQNFLL.js.gz +0 -0
- package/dist/{y-websocket-JQQZVAMX.js → y-websocket-TN4OKPXQ.js} +1 -1
- package/dist/y-websocket-TN4OKPXQ.js.br +0 -0
- package/dist/y-websocket-TN4OKPXQ.js.gz +0 -0
- package/dist/{y-websocket-SCLLNICY.mjs → y-websocket-WORVRRQS.mjs} +1 -1
- package/dist/y-websocket-WORVRRQS.mjs.br +0 -0
- package/dist/y-websocket-WORVRRQS.mjs.gz +0 -0
- package/package.json +7 -5
- package/dist/AiChatPanel-TGZQBH3L.js.br +0 -0
- package/dist/AiChatPanel-TGZQBH3L.js.gz +0 -0
- package/dist/AiChatPanel-Z5VHI4WA.mjs.br +0 -0
- package/dist/AiChatPanel-Z5VHI4WA.mjs.gz +0 -0
- package/dist/Model3DScene-5HLXSIIK.js.br +0 -0
- package/dist/Model3DScene-5HLXSIIK.js.gz +0 -0
- package/dist/Model3DScene-MSC4LEKG.mjs.br +0 -0
- package/dist/Model3DScene-MSC4LEKG.mjs.gz +0 -0
- package/dist/chunk-2J3467IB.js.br +0 -0
- package/dist/chunk-2J3467IB.js.gz +0 -0
- package/dist/chunk-AMXSOQRH.js.br +0 -0
- package/dist/chunk-AMXSOQRH.js.gz +0 -0
- package/dist/chunk-CLHUOZSY.mjs.br +0 -0
- package/dist/chunk-CLHUOZSY.mjs.gz +0 -0
- package/dist/chunk-FBN7UFW2.mjs.br +0 -0
- package/dist/chunk-FBN7UFW2.mjs.gz +0 -0
- package/dist/chunk-Q3DHYOLK.mjs.br +0 -0
- package/dist/chunk-Q3DHYOLK.mjs.gz +0 -0
- package/dist/chunk-UQFIRJGG.mjs.br +0 -0
- package/dist/chunk-UQFIRJGG.mjs.gz +0 -0
- package/dist/chunk-VJZJESNT.js.br +0 -0
- package/dist/chunk-VJZJESNT.js.gz +0 -0
- package/dist/chunk-W2IMY5SY.js.br +0 -0
- package/dist/chunk-W2IMY5SY.js.gz +0 -0
- package/dist/three.module-JPZUM7AI.mjs.br +0 -0
- package/dist/three.module-JPZUM7AI.mjs.gz +0 -0
- package/dist/three.module-RIUI7P3J.js.br +0 -0
- package/dist/three.module-RIUI7P3J.js.gz +0 -0
- package/dist/y-webrtc-CCA4HVZZ.mjs.br +0 -0
- package/dist/y-webrtc-CCA4HVZZ.mjs.gz +0 -0
- package/dist/y-webrtc-MB5ZXFBA.js.br +0 -0
- package/dist/y-webrtc-MB5ZXFBA.js.gz +0 -0
- package/dist/y-websocket-JQQZVAMX.js.br +0 -0
- package/dist/y-websocket-JQQZVAMX.js.gz +0 -0
- package/dist/y-websocket-SCLLNICY.mjs.br +0 -0
- package/dist/y-websocket-SCLLNICY.mjs.gz +0 -0
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { useViewerOptions, useReadOnlyRecommendationState, useCompatibilityToastsState, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useViewPreferencesSync, useLayoutSwitching, Rendering3DFlagsContext, CollaborationProvider, ChartFormatContext,
|
|
2
|
-
import {
|
|
3
|
-
import { EMPTY_RESOLVED_CUSTOMIZATION, ANIMATION_DIRECTION_LABEL_KEYS, compileEquationTemplateMathMl, resolveCollaborationConfig, resolveViewerRootOptions, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, isFeatureEnabled, isDialogAvailable, isEditingAllowed, resolveAutosaveActivation, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, attachViewerHyperlinks, shouldConfirmExternalHyperlink, applyAutoCorrect, resolveImageResolutionScale, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, createSlidePackageClipboard, isPanelVisible, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, RIBBON_SCOPE_ATTR, resolve3DRenderingFlags, resolveSlideSizeSelection, RULER_THICKNESS, RULER_FONT_SIZE, editorThumbnailHeight, buildPreviewElements, deriveSlideFieldContext, deviceStrokeStageStyle, hiddenSlideCue, EDITOR_THUMBNAIL_WIDTH, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, visibleTemplateElements, themeToCssVars, createCustomizationController, resolveEffectiveHiddenActions, listAutosaveSnapshots, resolveExpiredAutosaveSnapshots, deleteAutosaveSnapshot, createDeckStyleHost, galleryDeckView, tableLayoutCells, resetChartFormatTarget, masterViewCrudActions, applyMasterViewCrudAction, masterViewCrudFailureKey, EDITOR_CHROME_CSS, ribbonCustomizationCss, applyMotionPathPreset, resetSlideLayoutPath, DEFAULT_INSERT_CHART_KIND, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, shouldDiscardAutosaveOnSuccessfulSave, buildFieldSubstitutionContext, setMasterViewBackgroundColor, canUseClipboard, runProgramNoticeStackStyle, observeElementHeight, printPropertiesFrameSlides, printPropertiesSlidesPerPage, PASTE_SPECIAL_OPTIONS, findCanvasElementNode, isHeaderFooterDateTextVisible, isHeaderFooterHeaderTextVisible, isHeaderFooterFooterTextVisible, getDensePanelTouchTargetPx, shouldStickyActionRow, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, createCollaborationStateReporter, buildCollaborationState, writeBackReport, getSlideBackgroundStyle, pushRecentColor, mruColorsPatch, shouldClearAutosaveCacheOnClose, canCropElement, cropSessionChanged, cancelCropUpdate, startCropSession, homeLaunchers, attachRibbonOverflow, getRegionRenderer, ViewerRegionHost, editorThumbnailWidth, masterViewBackgroundColor, resolvePresentationAction, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, resolveEditPointsAvailability, isCurrentLayout, EXPANDED_MAX_HEIGHT, resolveStatusBarSave, statusBarViewMode, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, clampPercent, resolveDefaultPrintSettings, HANDOUT_OPTIONS, bindPptxOptionsDialog, optionsBlockSlot, optionsPaneSlot, DEFAULT_QUICK_ACCESS_COMMAND_IDS, AI_OPTIONS_CATEGORY, activateModalFocus, buildCollaborationShareUrl, buildActiveSessionUsers, slideClipboardLabels, sorterPasteInsertAt, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, SORTER_MAX_ZOOM, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, listenForOutlineViewDismiss, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, cropModeKeyAction, buildTitleBarState, resolveScreenTip, visibleContextualTabs, resolveActiveRibbonTab, visibleRibbonAddIns, RIBBON_ADD_IN_TAB_ATTR, contextualTabLabelKey, RIBBON_CONTEXTUAL_TAB_ATTR, buildTabRowActionsState, TAB_ROW_ACTION_CLASSES, tabRowActionsAttributes, backstageNavEntries, BACKSTAGE_NAV, listBackstageRecentFiles, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, FREEFORM_TOOL_IDS, isDrawingToolVisible, textFontSizePtToPx, withHomeGalleries, drawingHomeControls, homeGalleryControls, homeGalleryApply, shapeOutlineChange, shapeFillChange, editingHomeControls, arrangeHomeControls, arrangePainterHomeControls, arrangeAlignAction, DESIGN_RIBBON_GROUPS, FIXED_TAB_GALLERIES, DESIGN_RIBBON_COMMANDS, designCommandState, CONTEXTUAL_TAB_GROUPS, editorThumbnailStep, resolveSlidePaneClick, SLIDE_VIRTUALIZATION_THRESHOLD, buildSectionContextMenuEntries, buildSlidePaneContextMenuEntries, slidePaneViewItems, isEditPointsEnabled, findReplacementAvailability, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, buildStrokePathD, cursorForTool, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, PRESENTER_NAVIGATOR_LABEL_KEYS, getPresentationContextMenuSections, CONTEXT_MENU_PRESENTATION_LAYER, presentationViewItems, subtitleRecognitionLanguage, subtitleSettingsFromOptions, getSpeechRecognitionCtor, mergeCaptionResults, customizeContextMenuEntries, buildContextMenuEntries, contextMenuViewItems, customizeCanvasContextMenuEntries, buildCanvasContextMenuEntries, buildLayoutPreviewGeometry, scaleSlidesForSizeChange, slideSizeToCanvasPx, resolveSelectionPaneRename, themeEditorLabels, resolveNotesSegments, defaultRichEnabled, segmentsToEditorHtml, DEBOUNCE_MS, createPlainNotesSegments, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX as INDENT_PX$1, buildNotesPrintHtml, MIN_TOUCH_TARGET_PX, toggleSheet, describeElementChange, SMARTART_PREVIEW_ELEMENT_HEIGHT, SMARTART_PREVIEW_ELEMENT_WIDTH, buildSmartArtPreviewElement, sanitizeMathMl, computeAllNotesPages, getNotesPrintableArea, CUSTOM_FONT_ACCEPT, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, resolveViewerAddinRows, createSlideSorterState, sorterSelectionIndexes, selectSorterSlide, applySorterAction, sorterGridColumns, sorterMenuContext, buildSlideSorterContextMenuEntries, slideSorterContextMenuLabel, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, presenterConsoleAction, presenterConsoleViewState, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, customizeBackstageCards, backstageCardsFor, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, clipboardHomeControls, slidesHomeControls, resolveInsertSlideLayout, SLIDE_TEMPLATES, resolveDefaultFontFamily, textFontSizePxToPt, getInlineEditorSelectionResult, selectedParagraphBulletKind, elementBulletKind, selectionBulletKind, fontPickerHomeControls, fontHomeControls, nextToggleValue, RIBBON_GROUP_ATTR, paragraphHomeAlign, paragraphHomeControls, paragraphHomeAction, arrangeShapeHomeControls, strokeWidthOf, canSetStrokeWidth, canUngroupSelection, canGroupSelection, buildRibbonGallery, readRibbonTransitionDraft, SLIDE_SHOW_COMMAND_GROUPS, buildRecordRibbon, trackActiveComment, commentCounts, findCommentLocation, buildReviewRibbon, buildHelpRibbon, galleryTextLabel, pictureSizeHomeControls, chartSelectionHomeControls, dispatchChartSelectionRequest, sectionAddAfterSlideIndex, masterViewPseudoSlide, PRESENTATION_ANIM_TRIGGER_ATTRIBUTE, parentSelection, slideSpaceElement, isGroupMember, motionPathFor, setMotionPath, shouldShowElementHandles, computeAnchoredPopupPosition, applyTableStyleDelete, applyTableStyleMapChange, registerCustomFont, QUICK_ACCESS_COMMAND_CATALOG, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, buildSlideTemplateContent, getSelectionTextStyleFlags, TEXT_DECORATION_FLAGS, dispatchCropRequest, applyRibbonGalleryItem, ribbonTransitionsDraftPatch, ribbonTransitionUpdates, ribbonTransitionsSoundChange, ribbonTransitionStockSoundUrl, playSlideTransitionPreview, playAnimationRibbonPreview, SLIDE_SHOW_OPTIONS, createViewerOptionsStore, subtitleSettingsLabels, isReviewCommentCommand, runReviewCommentCommand, attachEditorImagePaste, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, resolveElementInteractivity, buildChartQuickActionsDescriptor, applyChartElementToggle, CHART_QUICK_ACTION_BUTTON_SIZE, applyChartStylePreset, hideChartSeries, restoreFilteredSeries, buildCropOverlay, CROP_HANDLE_ARIA_KEY, getActiveXControlOverlayView, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, canEditElementPoints, MERGE_SHAPES_MENU_ITEMS, hasMultipleSelectedTableCells, isElementLocked, mergeSlideTransition, slideBackgroundClearState, slideBackgroundClearPatch, effectiveDirection, TRIGGER_OPTIONS, effectiveTimingCurve, getAfterAnimationState, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, updateSubtitleSettings, buildFreeformShapeElement, buildLiveInkStrokeView, beginCropDrag, CONNECTOR_SITE_SNAP_PX, resolveConnectorEndpointUpdate, withConnectorEndpointUpdate, getShapeConnectionSites, FreeformToolSession, attachOverlayKeyboard, EditPointsSession, EDIT_POINTS_STYLE, elementLockTogglePatch, buildTableDataGrid, getDenseGridLayoutPlan, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, applyTableStylePreset, tableStyleAssignmentUpdate, evenColumnWidths, redistributeColumnWidth, evenRowHeights, inspectorNumber, patchChartData, collapseChartTitleRunsForEdit, chartGridlinesState, chartGridlinesPatch, seriesSecondaryAxisPatch, setChartCategoryLabel, setChartCellValue, addChartCategory, removeChartCategory, addChartSeries, removeChartSeries, setDataLabelsRangeCache, describeSmartArtBounds, canAddTopLevelNode, classifyExtraConnections, siblingIndex, siblingCount, canRemoveTopLevelNode, imageResetPatch, imageResetState, canInteractWithElement, buildOleObjectNamePatch, shouldShowAccessibilitySection, withFrameSlides, withSlidesPerPage, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, SLIDE_SIZE_PRESETS, TRANSITION_ORIENTATION_TYPES, clampTransitionNumber, TRANSITION_SPEED_OPTIONS, TRANSITION_MORPH_OPTIONS, flattenTagCollections, resolveTemplateBackgroundRows, commentMentionQuery, matchCommentMentionAuthors, buildAnimationTimelineRows, clearMotionPath, setTrigger, setTriggerBookmark, getEffectSoundState, setEffectSound, setEffectStockSound, setAfterAnimation, setAfterAnimationColor, directionValuesFor, buildAnimationTimelineBars, motionPathPresetIdForPath, MOTION_PATH_FAMILIES, motionPathPresetsByFamily, motionPathPresetLabelKey, motionPathFamilyLabelKey, EFFECT_SOUND_CATALOGUE, listMediaBookmarkOptions, selectedBookmarkOptionValue, hasTiltData, toElementAxes, dragCropHandle, panCropImage, clientToSlidePoint, EDIT_POINTS_TARGET_ATTR, describeTableStyleEditor, TABLE_STYLE_EDITOR_PARTS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, resolveDisplayedChartType, CHART_TYPE_OPTIONS, chartDataLabelsTogglePatch, BAR3D_SHAPE_OPTIONS, bar3DShapePatch, RADAR_STYLE_OPTIONS, radarStylePatch, SURFACE_WIREFRAME_OPTIONS, surfaceWireframePatch, isSeriesUsingSecondaryAxis, seriesColorClearState, listChartUserShapeRows, withChartUserShapeAdded, createDefaultChartUserShape, withChartUserShapeRowRemoved, withChartUserShapeRowTextUpdated, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, addSiblingAfter, removeEmptyNode, demote, promote, reorder, cropResetState, cropResetPatch, ARTISTIC_EFFECTS, mediaTrimEndSeconds, trimmedMediaDurationMs, mediaTrimEndAbsoluteMs, mediaTrimResetState, mediaTrimEndMsFromAbsoluteMs, mediaTrimResetPatch, buildOleEditDialogDescriptor, buildOleContentUpdatePatch, buildThemeColorSwatchGrid, themeColorGridView, getNonVisualDescriptionFields, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, canCommitActionType, slideSizeFromPreset, withSlideSizeOrientation, TRANSITION_DIR_ARROWS, buildDirectionGrid, updateTagInCollections, deleteTagFromCollections, addTagToCollections, commentTextSegments, COMMENT_MENTION_CLASS, COMMENT_MENTION_ATTRIBUTE, insertCommentMention, reorderAnimationTimelineRows, applyAnimationTimelineOrder, getEffectSoundAsset, animationEffectLabel, overlayPointerInput, TABLE_STYLE_BORDER_SIDES, applyTableStyleFieldEdit, withCellStyle, LBL as LBL$1, SEL as SEL$1, FILL_MODE_OPTIONS as FILL_MODE_OPTIONS$1, SECTION_HEADING, NUM as NUM$1, getChartUserShapeGroupTransform, withChartUserShapeGroupChildAdded, createDefaultChartUserShapeGroupChild, withChartUserShapeRowUpdated, getChartUserShapeRowChartBox, withChartUserShapeRowFlipUpdated, withChartUserShapeRowRotationUpdated, withChartUserShapeRowChartBoxUpdated, smartArtLayoutSwitchPatch, rebuildDrawingShapesIfCleared, mediaTrimEndMsFromSeconds, validateMediaTrimRange, quickStyleSwatchCss, shapeQuickStyleLabel, OFFICE_COLOR_SWATCHES, officeColorSwatchLabel, PATTERN_PRESET_OPTIONS as PATTERN_PRESET_OPTIONS$1, COMPOUND_LINE_OPTIONS as COMPOUND_LINE_OPTIONS$1, LINE_JOIN_OPTIONS as LINE_JOIN_OPTIONS$1, LINE_CAP_OPTIONS as LINE_CAP_OPTIONS$1, themeColorGridCommit, buildTextWarpGallery, TEXT_WARP_PRESETS, text3dPtToEmu, text3dEmuToPt, MATERIAL_PRESETS, toSlideIndex, TABLE_STYLE_BORDER_SIDE_LABEL_KEYS, TABLE_STYLE_DASH_PRESETS, GRADIENT_TYPE_OPTIONS as GRADIENT_TYPE_OPTIONS$1, PATTERN_OPTIONS, FILL_PATTERN_LABEL_KEYS, textWarpStyle, toggleText3dExtrusion, BEVEL_PRESETS, cropFit, cropFill, cropToAspectRatio } from 'ooxml-ui/pptx';
|
|
1
|
+
import { StaticElementRenderer, useModalDismissDrag, useToolbarVisibility, useViewerOptionsContext, InlineCollaborationContext, SlideBackgroundImageLayer, ElementRenderer, withDisplayName, useCollaboration, ResizeHandles, imgSrc, renderStrokeView, useViewerOptions, useReadOnlyRecommendationState, useCompatibilityToastsState, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useViewPreferencesSync, useLayoutSwitching, Rendering3DFlagsContext, CollaborationProvider, ChartFormatContext, useChartFormatContext, safePrompt, scopeLayoutOptionsToActiveSlide, createReviewCommentsHost, ChartPartSelectionProvider, useKeyboardInsets, ViewerOptionsStoreContext, ViewerOptionsContext, useReportOnChange, useCollaborationDocumentSync, useFollowMode, useBroadcastFollower, useSheetDismissDrag, playAnimationSound, useVirtualizedSlides, useSwipeNavigation, PresentationTransitionOverlay, RemoteSelectionOverlay, CollaborationCursorOverlay, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, SmartArtRenderer, downloadBlob, useChartPartSelection, DUOTONE_PRESETS, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, resolveSmartArtDataPalette } from './chunk-BL7UYXYD.mjs';
|
|
2
|
+
import { cn, getShapeAdjustmentHandleDescriptors, isConnectorOrLineElement, TOOLBAR_SECTIONS, GRID_SIZE, getElementTransformWithoutRotation, getElementTransform, MIN_ELEMENT_SIZE, hasCopyableFormat, DEFAULT_SECTION_GROUP_ID, safeOpenUrl, isPpactionUrl, parsePpactionUrl, SHORTCUT_REFERENCE_ITEMS, isUrlSafe, computeHandoutLayout, getPrintableArea, generateNoteLineCount, normalizeHexColor, UNGROUPED_SECTION_ID, SLIDE_NAV_THUMBNAIL_WIDTH, SLIDE_TRANSITION_OPTIONS, getElementLabel, TABLE_STYLE_PRESETS, SHAPE_PRESETS, sanitizeGradientStops, formatCommentTimestamp, ANIMATION_PRESET_OPTIONS, clampCropValue, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, DEFAULT_FILL_COLOR, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, SHAPE_QUICK_STYLES, getPatternSvg, DEFAULT_STROKE_COLOR, STROKE_DASH_OPTIONS, openNativeEyeDropper } from './chunk-BVQSH5SS.mjs';
|
|
3
|
+
import { ANIMATION_DIRECTION_LABEL_KEYS, buildSlideTemplateContent, SLIDE_TEMPLATES, homeLaunchers, attachRibbonOverflow, isPanelVisible, parentSelection, slideSpaceElement, isGroupMember, motionPathFor, setMotionPath, RULER_THICKNESS, shouldShowElementHandles, deviceStrokeStageStyle, activateModalFocus, visibleContextualTabs, resolveActiveRibbonTab, visibleRibbonAddIns, isDialogAvailable, resolveScreenTip, RIBBON_ADD_IN_TAB_ATTR, contextualTabLabelKey, RIBBON_CONTEXTUAL_TAB_ATTR, buildTabRowActionsState, isFeatureEnabled, TAB_ROW_ACTION_CLASSES, tabRowActionsAttributes, buildTitleBarState, backstageNavEntries, BACKSTAGE_NAV, listBackstageRecentFiles, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, DEFAULT_INSERT_CHART_KIND, FREEFORM_TOOL_IDS, isDrawingToolVisible, textFontSizePtToPx, withHomeGalleries, drawingHomeControls, homeGalleryControls, homeGalleryApply, shapeOutlineChange, shapeFillChange, editingHomeControls, arrangeHomeControls, arrangePainterHomeControls, arrangeAlignAction, DESIGN_RIBBON_GROUPS, FIXED_TAB_GALLERIES, DESIGN_RIBBON_COMMANDS, designCommandState, CONTEXTUAL_TAB_GROUPS, attachEditorImagePaste, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, resolveElementInteractivity, buildChartQuickActionsDescriptor, applyChartElementToggle, CHART_QUICK_ACTION_BUTTON_SIZE, applyChartStylePreset, hideChartSeries, restoreFilteredSeries, buildCropOverlay, CROP_HANDLE_ARIA_KEY, getActiveXControlOverlayView, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, canEditElementPoints, getSlideBackgroundStyle, resolveCollaborationConfig, resolveViewerRootOptions, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, isEditingAllowed, resolveAutosaveActivation, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, attachViewerHyperlinks, shouldConfirmExternalHyperlink, applyAutoCorrect, resolveImageResolutionScale, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, saveFailureMessage, withSaveFailureToast, createSlidePackageClipboard, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, RIBBON_SCOPE_ATTR, resolve3DRenderingFlags, resolveSlideSizeSelection, EMPTY_RESOLVED_CUSTOMIZATION, getRegionRenderer, ViewerRegionHost, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, customizeBackstageCards, backstageCardsFor, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, clipboardHomeControls, slidesHomeControls, resolveInsertSlideLayout, resolveDefaultFontFamily, textFontSizePxToPt, getInlineEditorSelectionResult, selectedParagraphBulletKind, elementBulletKind, selectionBulletKind, fontPickerHomeControls, fontHomeControls, nextToggleValue, RIBBON_GROUP_ATTR, paragraphHomeAlign, paragraphHomeControls, paragraphHomeAction, arrangeShapeHomeControls, strokeWidthOf, canSetStrokeWidth, canUngroupSelection, canGroupSelection, buildRibbonGallery, readRibbonTransitionDraft, SLIDE_SHOW_COMMAND_GROUPS, buildRecordRibbon, trackActiveComment, commentCounts, findCommentLocation, buildReviewRibbon, buildHelpRibbon, galleryTextLabel, pictureSizeHomeControls, chartSelectionHomeControls, dispatchChartSelectionRequest, buildFreeformShapeElement, buildLiveInkStrokeView, beginCropDrag, CONNECTOR_SITE_SNAP_PX, resolveConnectorEndpointUpdate, withConnectorEndpointUpdate, getShapeConnectionSites, FreeformToolSession, attachOverlayKeyboard, EditPointsSession, EDIT_POINTS_STYLE, themeToCssVars, createCustomizationController, resolveEffectiveHiddenActions, pruneExpiredAutosaveSnapshots, createDeckStyleHost, galleryDeckView, tableLayoutCells, resetChartFormatTarget, masterViewCrudActions, applyMasterViewCrudAction, masterViewCrudFailureKey, EDITOR_CHROME_CSS, ribbonCustomizationCss, applyMotionPathPreset, resetSlideLayoutPath, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, shouldDiscardAutosaveOnSuccessfulSave, deleteAutosaveSnapshot, buildFieldSubstitutionContext, setMasterViewBackgroundColor, canUseClipboard, runProgramNoticeStackStyle, observeElementHeight, printPropertiesFrameSlides, printPropertiesSlidesPerPage, PASTE_SPECIAL_OPTIONS, findCanvasElementNode, isHeaderFooterDateTextVisible, isHeaderFooterHeaderTextVisible, isHeaderFooterFooterTextVisible, getDensePanelTouchTargetPx, shouldStickyActionRow, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, MIN_TOUCH_TARGET_PX, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, getSelectionTextStyleFlags, TEXT_DECORATION_FLAGS, dispatchCropRequest, applyRibbonGalleryItem, ribbonTransitionsDraftPatch, ribbonTransitionUpdates, ribbonTransitionsSoundChange, ribbonTransitionStockSoundUrl, playSlideTransitionPreview, playAnimationRibbonPreview, SLIDE_SHOW_OPTIONS, createViewerOptionsStore, subtitleSettingsFromOptions, subtitleSettingsLabels, isReviewCommentCommand, runReviewCommentCommand, hasTiltData, RULER_FONT_SIZE, toElementAxes, dragCropHandle, panCropImage, clientToSlidePoint, EDIT_POINTS_TARGET_ATTR, pushRecentColor, mruColorsPatch, shouldClearAutosaveCacheOnClose, clearAutosaveSnapshots, canCropElement, cropSessionChanged, cancelCropUpdate, startCropSession, editorThumbnailWidth, EDITOR_THUMBNAIL_WIDTH, masterViewBackgroundColor, resolvePresentationAction, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, resolveEditPointsAvailability, isCurrentLayout, EXPANDED_MAX_HEIGHT, resolveStatusBarSave, statusBarViewMode, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, clampPercent, resolveDefaultPrintSettings, HANDOUT_OPTIONS, bindPptxOptionsDialog, optionsBlockSlot, optionsPaneSlot, DEFAULT_QUICK_ACCESS_COMMAND_IDS, AI_OPTIONS_CATEGORY, buildCollaborationShareUrl, buildActiveSessionUsers, slideClipboardLabels, sorterPasteInsertAt, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, SORTER_MAX_ZOOM, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, listenForOutlineViewDismiss, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, createCollaborationStateReporter, buildCollaborationState, writeBackReport, computeAnchoredPopupPosition, updateSubtitleSettings, overlayPointerInput, cropModeKeyAction, editorThumbnailStep, resolveSlidePaneClick, SLIDE_VIRTUALIZATION_THRESHOLD, buildSectionContextMenuEntries, buildSlidePaneContextMenuEntries, slidePaneViewItems, isEditPointsEnabled, findReplacementAvailability, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, buildStrokePathD, cursorForTool, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, PRESENTER_NAVIGATOR_LABEL_KEYS, getPresentationContextMenuSections, CONTEXT_MENU_PRESENTATION_LAYER, presentationViewItems, subtitleRecognitionLanguage, getSpeechRecognitionCtor, mergeCaptionResults, customizeContextMenuEntries, buildContextMenuEntries, contextMenuViewItems, customizeCanvasContextMenuEntries, buildCanvasContextMenuEntries, buildLayoutPreviewGeometry, scaleSlidesForSizeChange, slideSizeToCanvasPx, resolveSelectionPaneRename, themeEditorLabels, resolveNotesSegments, defaultRichEnabled, segmentsToEditorHtml, DEBOUNCE_MS, createPlainNotesSegments, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX as INDENT_PX$1, buildNotesPrintHtml, toggleSheet, describeElementChange, SMARTART_PREVIEW_ELEMENT_HEIGHT, SMARTART_PREVIEW_ELEMENT_WIDTH, buildSmartArtPreviewElement, sanitizeMathMl, compileEquationTemplateMathMl, computeAllNotesPages, getNotesPrintableArea, CUSTOM_FONT_ACCEPT, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, resolveViewerAddinRows, createSlideSorterState, sorterSelectionIndexes, selectSorterSlide, applySorterAction, sorterGridColumns, sorterMenuContext, buildSlideSorterContextMenuEntries, slideSorterContextMenuLabel, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, presenterConsoleAction, presenterConsoleViewState, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, sectionAddAfterSlideIndex, masterViewPseudoSlide, PRESENTATION_ANIM_TRIGGER_ATTRIBUTE, applyTableStyleDelete, applyTableStyleMapChange, registerCustomFont, QUICK_ACCESS_COMMAND_CATALOG, handleReadingViewKey, visibleTemplateElements, editorThumbnailHeight, buildPreviewElements, deriveSlideFieldContext, hiddenSlideCue, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, MERGE_SHAPES_MENU_ITEMS, hasMultipleSelectedTableCells, isElementLocked, mergeSlideTransition, slideBackgroundClearState, slideBackgroundClearPatch, effectiveDirection, TRIGGER_OPTIONS, effectiveTimingCurve, getAfterAnimationState, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, elementLockTogglePatch, buildTableDataGrid, getDenseGridLayoutPlan, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, applyTableStylePreset, tableStyleAssignmentUpdate, evenColumnWidths, redistributeColumnWidth, evenRowHeights, inspectorNumber, patchChartData, collapseChartTitleRunsForEdit, chartGridlinesState, chartGridlinesPatch, seriesSecondaryAxisPatch, setChartCategoryLabel, setChartCellValue, addChartCategory, removeChartCategory, addChartSeries, removeChartSeries, setDataLabelsRangeCache, describeSmartArtBounds, canAddTopLevelNode, classifyExtraConnections, siblingIndex, siblingCount, canRemoveTopLevelNode, imageResetPatch, imageResetState, canInteractWithElement, buildOleObjectNamePatch, shouldShowAccessibilitySection, withFrameSlides, withSlidesPerPage, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, SLIDE_SIZE_PRESETS, TRANSITION_ORIENTATION_TYPES, clampTransitionNumber, TRANSITION_SPEED_OPTIONS, TRANSITION_MORPH_OPTIONS, flattenTagCollections, resolveTemplateBackgroundRows, commentMentionQuery, matchCommentMentionAuthors, buildAnimationTimelineRows, clearMotionPath, setTrigger, setTriggerBookmark, getEffectSoundState, setEffectSound, setEffectStockSound, setAfterAnimation, setAfterAnimationColor, directionValuesFor, buildAnimationTimelineBars, motionPathPresetIdForPath, MOTION_PATH_FAMILIES, motionPathPresetsByFamily, motionPathPresetLabelKey, motionPathFamilyLabelKey, EFFECT_SOUND_CATALOGUE, listMediaBookmarkOptions, selectedBookmarkOptionValue, describeTableStyleEditor, TABLE_STYLE_EDITOR_PARTS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, resolveDisplayedChartType, CHART_TYPE_OPTIONS, chartDataLabelsTogglePatch, BAR3D_SHAPE_OPTIONS, bar3DShapePatch, RADAR_STYLE_OPTIONS, radarStylePatch, SURFACE_WIREFRAME_OPTIONS, surfaceWireframePatch, isSeriesUsingSecondaryAxis, seriesColorClearState, listChartUserShapeRows, withChartUserShapeAdded, createDefaultChartUserShape, withChartUserShapeRowRemoved, withChartUserShapeRowTextUpdated, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, addSiblingAfter, removeEmptyNode, demote, promote, reorder, cropResetState, cropResetPatch, ARTISTIC_EFFECTS, mediaTrimEndSeconds, trimmedMediaDurationMs, mediaTrimEndAbsoluteMs, mediaTrimResetState, mediaTrimEndMsFromAbsoluteMs, mediaTrimResetPatch, buildOleEditDialogDescriptor, buildOleContentUpdatePatch, buildThemeColorSwatchGrid, themeColorGridView, getNonVisualDescriptionFields, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, canCommitActionType, slideSizeFromPreset, withSlideSizeOrientation, TRANSITION_DIR_ARROWS, buildDirectionGrid, updateTagInCollections, deleteTagFromCollections, addTagToCollections, commentTextSegments, COMMENT_MENTION_CLASS, COMMENT_MENTION_ATTRIBUTE, insertCommentMention, reorderAnimationTimelineRows, applyAnimationTimelineOrder, getEffectSoundAsset, animationEffectLabel, TABLE_STYLE_BORDER_SIDES, applyTableStyleFieldEdit, withCellStyle, LBL as LBL$1, SEL as SEL$1, FILL_MODE_OPTIONS as FILL_MODE_OPTIONS$1, SECTION_HEADING, NUM as NUM$1, getChartUserShapeGroupTransform, withChartUserShapeGroupChildAdded, createDefaultChartUserShapeGroupChild, withChartUserShapeRowUpdated, getChartUserShapeRowChartBox, withChartUserShapeRowFlipUpdated, withChartUserShapeRowRotationUpdated, withChartUserShapeRowChartBoxUpdated, smartArtLayoutSwitchPatch, rebuildDrawingShapesIfCleared, mediaTrimEndMsFromSeconds, validateMediaTrimRange, quickStyleSwatchCss, shapeQuickStyleLabel, OFFICE_COLOR_SWATCHES, officeColorSwatchLabel, PATTERN_PRESET_OPTIONS as PATTERN_PRESET_OPTIONS$1, COMPOUND_LINE_OPTIONS as COMPOUND_LINE_OPTIONS$1, LINE_JOIN_OPTIONS as LINE_JOIN_OPTIONS$1, LINE_CAP_OPTIONS as LINE_CAP_OPTIONS$1, themeColorGridCommit, buildTextWarpGallery, TEXT_WARP_PRESETS, text3dPtToEmu, text3dEmuToPt, MATERIAL_PRESETS, toSlideIndex, TABLE_STYLE_BORDER_SIDE_LABEL_KEYS, TABLE_STYLE_DASH_PRESETS, GRADIENT_TYPE_OPTIONS as GRADIENT_TYPE_OPTIONS$1, PATTERN_OPTIONS, FILL_PATTERN_LABEL_KEYS, textWarpStyle, toggleText3dExtrusion, BEVEL_PRESETS, cropFit, cropFill, cropToAspectRatio } from 'ooxml-ui/pptx';
|
|
4
4
|
export { THEME_CATALOG, defaultCssVars, defaultRadius, defaultThemeColors, resolveThemeCatalogEntry, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius } from 'ooxml-ui/pptx';
|
|
5
|
-
import React106, { createContext,
|
|
6
|
-
import {
|
|
5
|
+
import React106, { createContext, useContext, useMemo, useState, useRef, useCallback, useEffect, useLayoutEffect, forwardRef, useSyncExternalStore, useReducer, useId, Fragment as Fragment$1, useDeferredValue, Suspense, lazy } from 'react';
|
|
6
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
|
-
import { LuArrowDown, LuArrowUp, LuArrowRight, LuArrowLeft, LuArrowDownRight, LuArrowDownLeft, LuArrowUpRight, LuArrowUpLeft,
|
|
8
|
+
import { LuArrowDown, LuArrowUp, LuArrowRight, LuArrowLeft, LuArrowDownRight, LuArrowDownLeft, LuArrowUpRight, LuArrowUpLeft, LuX, LuPanelLeft, LuPanelRight, LuSparkles, LuSettings, LuFolderOpen, LuType, LuPalette, LuFilter, LuPaintbrush, LuPlus, LuClipboardCopy, LuShapes, LuLayoutGrid, LuWand, LuPresentation, LuTextCursorInput, LuFile, LuEllipsis, LuUserRound, LuUpload, LuShare2, LuPrinter, LuDownload, LuSave, LuInfo, LuFilePlus2, LuHouse, LuCopy, LuFileJson, LuBox, LuVideo, LuFileImage, LuFileText, LuDatabase, LuPlay, LuClock3, LuShieldAlert, LuLock, LuUser, LuHardDrive, LuLogIn, LuHistory, LuCalendarDays, LuClock, LuHash, LuText, LuCast, LuChevronRight, LuChevronDown, LuMonitor, LuRadio, LuCaptions, LuCheck, LuImage, LuSearch, LuShieldCheck, LuPanelLeftClose, LuTrash2, LuEyeOff, LuEye, LuLoader, LuSignature, LuTriangleAlert, LuPenTool, LuWifi, LuWifiOff, LuUsers, LuMinus, LuChevronLeft, LuPause, LuCaseSensitive, LuChevronUp, LuReplace, LuGripVertical, LuLoaderCircle, LuGrid2X2, LuStickyNote, LuList, LuBug, LuMove, LuCopyPlus, LuClipboardPaste, LuMessageSquare, LuLayers, LuSettings2, LuLockOpen, LuPencil, LuReply, LuMoveRight, LuRotateCw, LuScissors, LuBookmark, LuPipette } from 'react-icons/lu';
|
|
9
9
|
import { createPortal } from 'react-dom';
|
|
10
|
+
import { hasTextProperties, hasShapeProperties, buildThemeColorMap, themeColorSchemesEqual, isImageLikeElement, setChartAxisLogScale, setChartAxisTitleStyle, setChartAxisGridlineStyle, setChartSeriesMarker, setChartSeriesChartType, setChartDataPointFill, setChartDataPointExplosion, setChartDataPointMarker, setChartDataPointLabel, getOleObjectTypeLabel, pptxActionToElementAction, THEME_COLOR_SCHEME_KEYS, applyThemeOverrideToSlide, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, TRANSITION_VALID_DIRECTIONS, TRANSITION_PATTERN_OPTIONS, TRANSITION_THRUBLK_TYPES, normalizeTableStyleGuid, updateMergeAttrsInRawXml, addSmartArtNodeAsChild, setSmartArtNodeStyle, removeSmartArtNode, updateSmartArtNodeText, applyOleSheetCellEdit, getOleSheetGrid, applyOleDocumentParagraphEdit, getOleDocumentParagraphs, applyOleNestedDeckElementTextEdit, getOleNestedDeckDetail, replaceOleFile, elementActionToPptxAction, createTableStyleEntry, addTableStyleToMap, deleteTableStyleFromMap, SWITCHABLE_LAYOUT_TYPES } from 'ooxml-core/pptx';
|
|
10
11
|
import { LOCALE_CATALOG } from 'ooxml-ui/pptx/i18n';
|
|
11
12
|
import { computeFocusTargets, deckDataFieldChanged, aiChangeAnimationCss, changeGhostStyle, createChatHistoryStore, collectStoredChats, exportAiChatLogs as exportAiChatLogs$1, applyElementUpdate } from 'ooxml-ui/pptx/ai';
|
|
12
13
|
|
|
13
|
-
var ViewerThemeContext = createContext(void 0);
|
|
14
|
+
var ViewerThemeContext = /* @__PURE__ */ createContext(void 0);
|
|
14
15
|
function ViewerThemeProvider({ theme, children }) {
|
|
15
16
|
return /* @__PURE__ */ jsx(ViewerThemeContext.Provider, { value: theme, children });
|
|
16
17
|
}
|
|
@@ -285,6 +286,7 @@ function SlideTemplatePreview({
|
|
|
285
286
|
"div",
|
|
286
287
|
{
|
|
287
288
|
"aria-hidden": "true",
|
|
289
|
+
"data-pptx-scope": "",
|
|
288
290
|
className: "overflow-hidden pointer-events-none rounded",
|
|
289
291
|
style: {
|
|
290
292
|
width: PREVIEW_TILE_WIDTH,
|
|
@@ -390,6 +392,7 @@ function SlideTemplateGalleryDialog({
|
|
|
390
392
|
"button",
|
|
391
393
|
{
|
|
392
394
|
type: "button",
|
|
395
|
+
"data-pptx-scope": "",
|
|
393
396
|
style: { zIndex: 1200 },
|
|
394
397
|
className: "fixed inset-0 bg-black/50",
|
|
395
398
|
onClick: onClose,
|
|
@@ -399,6 +402,7 @@ function SlideTemplateGalleryDialog({
|
|
|
399
402
|
/* @__PURE__ */ jsx(
|
|
400
403
|
"div",
|
|
401
404
|
{
|
|
405
|
+
"data-pptx-scope": "",
|
|
402
406
|
style: { zIndex: 1201 },
|
|
403
407
|
className: "fixed inset-0 flex items-center justify-center pointer-events-none",
|
|
404
408
|
children: /* @__PURE__ */ jsxs(
|
|
@@ -710,7 +714,7 @@ function DateTimeFieldDialog(p) {
|
|
|
710
714
|
}
|
|
711
715
|
);
|
|
712
716
|
}
|
|
713
|
-
var ViewerCustomizationContext = createContext(
|
|
717
|
+
var ViewerCustomizationContext = /* @__PURE__ */ createContext(
|
|
714
718
|
EMPTY_RESOLVED_CUSTOMIZATION
|
|
715
719
|
);
|
|
716
720
|
function useViewerCustomizationContext() {
|
|
@@ -1069,7 +1073,7 @@ function RibbonGroupScope({
|
|
|
1069
1073
|
}) {
|
|
1070
1074
|
return /* @__PURE__ */ jsx("div", { className: "contents", ...groupAttr(id), children });
|
|
1071
1075
|
}
|
|
1072
|
-
var ShapeFormatContext = createContext(null);
|
|
1076
|
+
var ShapeFormatContext = /* @__PURE__ */ createContext(null);
|
|
1073
1077
|
function useShapeFormatContext() {
|
|
1074
1078
|
return useContext(ShapeFormatContext);
|
|
1075
1079
|
}
|
|
@@ -1279,7 +1283,7 @@ function ArrangeSection(p) {
|
|
|
1279
1283
|
/* @__PURE__ */ jsx("span", { "data-pptx-chrome": "ribbon-group-label", children: t("pptx.arrange.groupLabel") })
|
|
1280
1284
|
] });
|
|
1281
1285
|
}
|
|
1282
|
-
var RibbonGalleryCommandsContext = createContext(null);
|
|
1286
|
+
var RibbonGalleryCommandsContext = /* @__PURE__ */ createContext(null);
|
|
1283
1287
|
function useRibbonGalleryCommands() {
|
|
1284
1288
|
return useContext(RibbonGalleryCommandsContext);
|
|
1285
1289
|
}
|
|
@@ -1542,7 +1546,7 @@ var DEFAULT_VALUE = {
|
|
|
1542
1546
|
pushColor: () => {
|
|
1543
1547
|
}
|
|
1544
1548
|
};
|
|
1545
|
-
var RecentColorsContext = createContext(DEFAULT_VALUE);
|
|
1549
|
+
var RecentColorsContext = /* @__PURE__ */ createContext(DEFAULT_VALUE);
|
|
1546
1550
|
var RecentColorsProvider = RecentColorsContext.Provider;
|
|
1547
1551
|
function useRecentColors() {
|
|
1548
1552
|
return useContext(RecentColorsContext);
|
|
@@ -1594,7 +1598,11 @@ function DrawSection(p) {
|
|
|
1594
1598
|
}, [p, pushColor]);
|
|
1595
1599
|
return /* @__PURE__ */ jsx("pptx-ui-ribbon-draw", { ref });
|
|
1596
1600
|
}
|
|
1597
|
-
var
|
|
1601
|
+
var ViewerStorageContext = createContext(void 0);
|
|
1602
|
+
function useViewerStorage() {
|
|
1603
|
+
return useContext(ViewerStorageContext);
|
|
1604
|
+
}
|
|
1605
|
+
var ViewerRegionBaseContext = /* @__PURE__ */ createContext(null);
|
|
1598
1606
|
function useRegionRenderer(id) {
|
|
1599
1607
|
const customization = useViewerCustomizationContext();
|
|
1600
1608
|
const base = useContext(ViewerRegionBaseContext);
|
|
@@ -1632,11 +1640,14 @@ function ViewerRegion(props) {
|
|
|
1632
1640
|
}
|
|
1633
1641
|
);
|
|
1634
1642
|
}
|
|
1635
|
-
var AccountAuthContext = createContext(
|
|
1643
|
+
var AccountAuthContext = /* @__PURE__ */ createContext(
|
|
1644
|
+
void 0
|
|
1645
|
+
);
|
|
1636
1646
|
var cardClass = "border border-border bg-card p-6 text-card-foreground";
|
|
1637
1647
|
function AccountPage() {
|
|
1638
1648
|
const { t } = useTranslation();
|
|
1639
1649
|
const accountAuth = useContext(AccountAuthContext);
|
|
1650
|
+
const storage = useViewerStorage();
|
|
1640
1651
|
const [profile, setProfile] = useState(
|
|
1641
1652
|
() => readStoredViewerPrefs().profile ?? DEFAULT_VIEWER_PROFILE
|
|
1642
1653
|
);
|
|
@@ -1648,21 +1659,21 @@ function AccountPage() {
|
|
|
1648
1659
|
const [usage, setUsage] = useState(null);
|
|
1649
1660
|
const [cleared, setCleared] = useState(false);
|
|
1650
1661
|
const refreshUsage = () => {
|
|
1651
|
-
void getLocalStorageUsageSummary().then(setUsage);
|
|
1662
|
+
void getLocalStorageUsageSummary(storage).then(setUsage);
|
|
1652
1663
|
};
|
|
1653
|
-
useEffect(refreshUsage, []);
|
|
1664
|
+
useEffect(refreshUsage, [storage]);
|
|
1654
1665
|
const handleClear = () => {
|
|
1655
1666
|
if (!window.confirm(t("pptx.account.storage.clearConfirm"))) {
|
|
1656
1667
|
return;
|
|
1657
1668
|
}
|
|
1658
|
-
void clearAllLocalViewerData().then(() => {
|
|
1669
|
+
void clearAllLocalViewerData(storage).then(() => {
|
|
1659
1670
|
setCleared(true);
|
|
1660
1671
|
refreshUsage();
|
|
1661
1672
|
setTimeout(() => setCleared(false), 4e3);
|
|
1662
1673
|
return void 0;
|
|
1663
1674
|
});
|
|
1664
1675
|
};
|
|
1665
|
-
const version = "4.
|
|
1676
|
+
const version = "4.47.1" ;
|
|
1666
1677
|
return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
1667
1678
|
/* @__PURE__ */ jsxs("section", { className: cardClass, children: [
|
|
1668
1679
|
/* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -1928,9 +1939,10 @@ function FileSection(p) {
|
|
|
1928
1939
|
const [recent, setRecent] = useState([]);
|
|
1929
1940
|
const { isHidden } = useToolbarVisibility(p.hiddenActions);
|
|
1930
1941
|
const exportHidden = isHidden("export");
|
|
1942
|
+
const storage = useViewerStorage();
|
|
1931
1943
|
useEffect(() => {
|
|
1932
|
-
void listBackstageRecentFiles(t, p.recentPresentationsCount).then(setRecent);
|
|
1933
|
-
}, [t, p.recentPresentationsCount]);
|
|
1944
|
+
void listBackstageRecentFiles(t, p.recentPresentationsCount, storage).then(setRecent);
|
|
1945
|
+
}, [t, p.recentPresentationsCount, storage]);
|
|
1934
1946
|
const visibleRecent = useMemo(() => {
|
|
1935
1947
|
const q = query.trim().toLowerCase();
|
|
1936
1948
|
return q ? recent.filter((file) => `${file.name} ${file.location}`.toLowerCase().includes(q)) : recent;
|
|
@@ -1974,7 +1986,7 @@ function FileSection(p) {
|
|
|
1974
1986
|
type: "button",
|
|
1975
1987
|
"data-pptx-backstage-nav-item": true,
|
|
1976
1988
|
"aria-current": page === item.id ? "page" : void 0,
|
|
1977
|
-
onClick: () => item.id === "close" ? p.onClose() : item.id === "save" ? run(p.onSaveAsPptx) : setRequestedPage(item.id),
|
|
1989
|
+
onClick: () => item.id === "close" ? p.onClose() : item.id === "save" ? run(p.onSave ?? p.onSaveAsPptx) : setRequestedPage(item.id),
|
|
1978
1990
|
className: `${BACKSTAGE_NAV_CLASSES.row} ${page === item.id ? BACKSTAGE_NAV_CLASSES.active : BACKSTAGE_NAV_CLASSES.inactive}`,
|
|
1979
1991
|
children: [
|
|
1980
1992
|
!item.host && /* @__PURE__ */ jsx(BackstageNavIcon, { page: item.id }),
|
|
@@ -2839,7 +2851,7 @@ function extractFontInfo(element, themeFonts) {
|
|
|
2839
2851
|
fontFamily: resolveDefaultFontFamily(placeholderType, themeFonts),
|
|
2840
2852
|
fontSize: "24"
|
|
2841
2853
|
};
|
|
2842
|
-
if (!element || !
|
|
2854
|
+
if (!element || !hasTextProperties(element)) {
|
|
2843
2855
|
return defaults;
|
|
2844
2856
|
}
|
|
2845
2857
|
const segStyle = element.textSegments?.[0]?.style;
|
|
@@ -2851,7 +2863,7 @@ function extractFontInfo(element, themeFonts) {
|
|
|
2851
2863
|
fontSize: fontSize !== void 0 && fontSize !== null ? String(textFontSizePxToPt(fontSize)) : defaults.fontSize
|
|
2852
2864
|
};
|
|
2853
2865
|
}
|
|
2854
|
-
var ThemeColorMapContext = createContext(void 0);
|
|
2866
|
+
var ThemeColorMapContext = /* @__PURE__ */ createContext(void 0);
|
|
2855
2867
|
var ThemeColorMapProvider = ThemeColorMapContext.Provider;
|
|
2856
2868
|
function useThemeColorMap() {
|
|
2857
2869
|
return useContext(ThemeColorMapContext);
|
|
@@ -2860,7 +2872,7 @@ function getEffectiveTextStyle(element, tableEditorState) {
|
|
|
2860
2872
|
if (!element) {
|
|
2861
2873
|
return void 0;
|
|
2862
2874
|
}
|
|
2863
|
-
if (
|
|
2875
|
+
if (hasTextProperties(element)) {
|
|
2864
2876
|
return element.textStyle;
|
|
2865
2877
|
}
|
|
2866
2878
|
if (element.type === "table" && tableEditorState && element.tableData) {
|
|
@@ -2873,7 +2885,7 @@ function isTextDecorationFlag(id) {
|
|
|
2873
2885
|
return TEXT_DECORATION_FLAGS.includes(id);
|
|
2874
2886
|
}
|
|
2875
2887
|
function textSectionFlags(element, tableEditorState, readSelection) {
|
|
2876
|
-
if (element &&
|
|
2888
|
+
if (element && hasTextProperties(element)) {
|
|
2877
2889
|
const result = readSelection ? getInlineEditorSelectionResult(element.textSegments) : null;
|
|
2878
2890
|
const current = result?.kind === "supported" && (!result.snapshot || result.snapshot.elementId === element.id) ? result : null;
|
|
2879
2891
|
return getSelectionTextStyleFlags(
|
|
@@ -2889,7 +2901,7 @@ function textSectionFlags(element, tableEditorState, readSelection) {
|
|
|
2889
2901
|
);
|
|
2890
2902
|
}
|
|
2891
2903
|
function textSectionBulletKind(element, tableEditorState) {
|
|
2892
|
-
if (element &&
|
|
2904
|
+
if (element && hasTextProperties(element)) {
|
|
2893
2905
|
const result = getInlineEditorSelectionResult(element.textSegments, { preserveCaret: true });
|
|
2894
2906
|
return result.kind === "supported" && (!result.snapshot || result.snapshot.elementId === element.id) ? selectionBulletKind(element, result.selection, result.snapshot?.textSegments) : elementBulletKind(element);
|
|
2895
2907
|
}
|
|
@@ -3126,7 +3138,7 @@ function subscribe(onChange) {
|
|
|
3126
3138
|
}
|
|
3127
3139
|
function useParagraphListKind(element) {
|
|
3128
3140
|
const read = useCallback(() => {
|
|
3129
|
-
if (!element || !
|
|
3141
|
+
if (!element || !hasTextProperties(element)) {
|
|
3130
3142
|
return "none";
|
|
3131
3143
|
}
|
|
3132
3144
|
const result = getInlineEditorSelectionResult(element.textSegments, { preserveCaret: true });
|
|
@@ -3149,7 +3161,7 @@ function TextSection(p) {
|
|
|
3149
3161
|
const hasSel = Boolean(p.selectedElement);
|
|
3150
3162
|
const canMut = hasSel && p.canEdit;
|
|
3151
3163
|
const { fontFamily, fontSize } = extractFontInfo(p.selectedElement, p.themeFonts);
|
|
3152
|
-
const isTextEl = hasSel && p.selectedElement !== null &&
|
|
3164
|
+
const isTextEl = hasSel && p.selectedElement !== null && hasTextProperties(p.selectedElement);
|
|
3153
3165
|
const isTable = hasSel && p.selectedElement?.type === "table";
|
|
3154
3166
|
const canFormat = isTextEl || isTable;
|
|
3155
3167
|
const effectiveTs = getEffectiveTextStyle(p.selectedElement, p.tableEditorState);
|
|
@@ -3159,15 +3171,15 @@ function TextSection(p) {
|
|
|
3159
3171
|
if (!p.canEdit || !canFormat || !p.selectedElement) {
|
|
3160
3172
|
return;
|
|
3161
3173
|
}
|
|
3162
|
-
if (
|
|
3174
|
+
if (hasTextProperties(p.selectedElement)) {
|
|
3163
3175
|
p.onToggleBullets(kind);
|
|
3164
3176
|
return;
|
|
3165
3177
|
}
|
|
3166
3178
|
p.onUpdateTextStyle({ listType: effectiveTs?.listType === kind ? "none" : kind });
|
|
3167
3179
|
};
|
|
3168
|
-
const currentColor = isTextEl && p.selectedElement &&
|
|
3169
|
-
const currentColorThemeRef = isTextEl && p.selectedElement &&
|
|
3170
|
-
const currentHighlight = isTextEl && p.selectedElement &&
|
|
3180
|
+
const currentColor = isTextEl && p.selectedElement && hasTextProperties(p.selectedElement) ? p.selectedElement.textSegments?.[0]?.style?.color ?? p.selectedElement.textStyle?.color ?? "#000000" : effectiveTs?.color ?? "#000000";
|
|
3181
|
+
const currentColorThemeRef = isTextEl && p.selectedElement && hasTextProperties(p.selectedElement) ? p.selectedElement.textSegments?.[0]?.style?.colorRef ?? p.selectedElement.textStyle?.colorRef : void 0;
|
|
3182
|
+
const currentHighlight = isTextEl && p.selectedElement && hasTextProperties(p.selectedElement) ? p.selectedElement.textSegments?.[0]?.style?.highlightColor ?? p.selectedElement.textStyle?.highlightColor ?? "#ffff00" : "#ffff00";
|
|
3171
3183
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3172
3184
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-0.5", ...groupAttr("home.font"), children: [
|
|
3173
3185
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", "data-pptx-chrome": "font-controls", children: [
|
|
@@ -3182,7 +3194,7 @@ function TextSection(p) {
|
|
|
3182
3194
|
customFonts: p.customFontFamilies,
|
|
3183
3195
|
onFamily: (family) => p.onUpdateTextStyle({ fontFamily: family }),
|
|
3184
3196
|
onSize: (size) => p.onUpdateTextStyle({
|
|
3185
|
-
fontSize: p.selectedElement &&
|
|
3197
|
+
fontSize: p.selectedElement && hasTextProperties(p.selectedElement) ? textFontSizePtToPx(size) : size
|
|
3186
3198
|
})
|
|
3187
3199
|
}
|
|
3188
3200
|
),
|
|
@@ -3557,6 +3569,7 @@ function MobileSectionBody({
|
|
|
3557
3569
|
onExportVideo: p.onExportVideo,
|
|
3558
3570
|
onExportGif: p.onExportGif,
|
|
3559
3571
|
onExportJson: p.onExportJson,
|
|
3572
|
+
onSave: p.onSave,
|
|
3560
3573
|
onSaveAsPptx: p.onSaveAsPptx,
|
|
3561
3574
|
onSaveAsPpsx: p.onSaveAsPpsx,
|
|
3562
3575
|
onSaveAsPptm: p.onSaveAsPptm,
|
|
@@ -3606,7 +3619,7 @@ function MobileToolbar(props) {
|
|
|
3606
3619
|
undo: onUndo,
|
|
3607
3620
|
redo: onRedo,
|
|
3608
3621
|
ai: () => props.onToggleAiPanel?.(),
|
|
3609
|
-
save: onSaveAsPptx,
|
|
3622
|
+
save: props.onSave ?? onSaveAsPptx,
|
|
3610
3623
|
present: () => onSetMode("present"),
|
|
3611
3624
|
share: () => props.onOpenShareDialog?.()
|
|
3612
3625
|
};
|
|
@@ -3708,7 +3721,7 @@ function DrawingGroup(p) {
|
|
|
3708
3721
|
const { recentColors, pushColor } = useRecentColors();
|
|
3709
3722
|
const themeColors = useThemeColorMap();
|
|
3710
3723
|
const commands = useRibbonGalleryCommands();
|
|
3711
|
-
const style = p.selectedElement &&
|
|
3724
|
+
const style = p.selectedElement && hasShapeProperties(p.selectedElement) ? p.selectedElement.shapeStyle : void 0;
|
|
3712
3725
|
const { onMoveLayer, onMoveLayerToEdge, onSetNewShapeType, onAddShape, onUpdateElementStyle } = p;
|
|
3713
3726
|
const hasSelection = Boolean(p.selectedElement);
|
|
3714
3727
|
const controls = useMemo(
|
|
@@ -3809,7 +3822,7 @@ function EditingSection(p) {
|
|
|
3809
3822
|
] });
|
|
3810
3823
|
}
|
|
3811
3824
|
var NO_ADD_INS = [];
|
|
3812
|
-
var RibbonAddInsContext = createContext(NO_ADD_INS);
|
|
3825
|
+
var RibbonAddInsContext = /* @__PURE__ */ createContext(NO_ADD_INS);
|
|
3813
3826
|
function useRibbonAddInTabs(onFallback) {
|
|
3814
3827
|
const tabs = useContext(RibbonAddInsContext);
|
|
3815
3828
|
const visible = useMemo(() => visibleRibbonAddIns(tabs), [tabs]);
|
|
@@ -4651,6 +4664,7 @@ function Toolbar(p) {
|
|
|
4651
4664
|
"div",
|
|
4652
4665
|
{
|
|
4653
4666
|
role: "toolbar",
|
|
4667
|
+
"data-pptx-scope": "",
|
|
4654
4668
|
"data-pptx-chrome": "ribbon",
|
|
4655
4669
|
"aria-label": t("pptx.toolbar.presentationToolbarAria"),
|
|
4656
4670
|
className: "relative z-20 border-b border-border bg-secondary/50 overflow-visible",
|
|
@@ -4743,6 +4757,7 @@ function Toolbar(p) {
|
|
|
4743
4757
|
onExportVideo: p.onExportVideo,
|
|
4744
4758
|
onExportGif: p.onExportGif,
|
|
4745
4759
|
onExportJson: p.onExportJson,
|
|
4760
|
+
onSave: p.onSave,
|
|
4746
4761
|
onSaveAsPptx: p.onSaveAsPptx,
|
|
4747
4762
|
onSaveAsPpsx: p.onSaveAsPpsx,
|
|
4748
4763
|
onSaveAsPptm: p.onSaveAsPptm,
|
|
@@ -6337,8 +6352,10 @@ function HorizontalRulerView({ ticks, widthPx, highlight }) {
|
|
|
6337
6352
|
}
|
|
6338
6353
|
);
|
|
6339
6354
|
}
|
|
6340
|
-
var HorizontalRuler =
|
|
6341
|
-
|
|
6355
|
+
var HorizontalRuler = /* @__PURE__ */ withDisplayName(
|
|
6356
|
+
/* @__PURE__ */ React106.memo(HorizontalRulerView),
|
|
6357
|
+
"HorizontalRuler"
|
|
6358
|
+
);
|
|
6342
6359
|
function VerticalRulerView({ ticks, heightPx, highlight }) {
|
|
6343
6360
|
return /* @__PURE__ */ jsxs(
|
|
6344
6361
|
"svg",
|
|
@@ -6409,8 +6426,10 @@ function VerticalRulerView({ ticks, heightPx, highlight }) {
|
|
|
6409
6426
|
}
|
|
6410
6427
|
);
|
|
6411
6428
|
}
|
|
6412
|
-
var VerticalRuler =
|
|
6413
|
-
|
|
6429
|
+
var VerticalRuler = /* @__PURE__ */ withDisplayName(
|
|
6430
|
+
/* @__PURE__ */ React106.memo(VerticalRulerView),
|
|
6431
|
+
"VerticalRuler"
|
|
6432
|
+
);
|
|
6414
6433
|
function Ruler({
|
|
6415
6434
|
canvasSize,
|
|
6416
6435
|
editorScale,
|
|
@@ -8291,7 +8310,10 @@ function slideThumbnailPropsEqual(prev, next) {
|
|
|
8291
8310
|
}
|
|
8292
8311
|
return true;
|
|
8293
8312
|
}
|
|
8294
|
-
var SlideThumbnail = React106.memo(
|
|
8313
|
+
var SlideThumbnail = /* @__PURE__ */ React106.memo(
|
|
8314
|
+
SlideThumbnailImpl,
|
|
8315
|
+
slideThumbnailPropsEqual
|
|
8316
|
+
);
|
|
8295
8317
|
function tableCell(props) {
|
|
8296
8318
|
const { selectedElement, tableEditorState } = props;
|
|
8297
8319
|
if (selectedElement?.type !== "table" || tableEditorState === null) {
|
|
@@ -8988,7 +9010,7 @@ function LazyThumbnailInner({
|
|
|
8988
9010
|
}
|
|
8989
9011
|
) });
|
|
8990
9012
|
}
|
|
8991
|
-
var LazyThumbnail = React106.memo(LazyThumbnailInner);
|
|
9013
|
+
var LazyThumbnail = /* @__PURE__ */ React106.memo(LazyThumbnailInner);
|
|
8992
9014
|
function declaredSectionFacts(groups, sectionId) {
|
|
8993
9015
|
const declared = groups.filter((group) => group.id !== DEFAULT_SECTION_GROUP_ID && group.id !== UNGROUPED_SECTION_ID).map((group) => group.id);
|
|
8994
9016
|
return {
|
|
@@ -9156,7 +9178,7 @@ function SlideItemInner({
|
|
|
9156
9178
|
}
|
|
9157
9179
|
);
|
|
9158
9180
|
}
|
|
9159
|
-
var SlideItem = React106.memo(SlideItemInner);
|
|
9181
|
+
var SlideItem = /* @__PURE__ */ React106.memo(SlideItemInner);
|
|
9160
9182
|
function useSlidePaneCallbacks(onMoveSlide, onRenameSection, onToggleSectionCollapse) {
|
|
9161
9183
|
const [collapsedSections, setCollapsedSections] = useState({});
|
|
9162
9184
|
const [renamingSectionId, setRenamingSectionId] = useState(null);
|
|
@@ -10569,7 +10591,7 @@ function arePropsEqual(prev, next) {
|
|
|
10569
10591
|
}
|
|
10570
10592
|
return true;
|
|
10571
10593
|
}
|
|
10572
|
-
var SlideCard = React106.memo(SlideCardImpl, arePropsEqual);
|
|
10594
|
+
var SlideCard = /* @__PURE__ */ React106.memo(SlideCardImpl, arePropsEqual);
|
|
10573
10595
|
var ICON_CLASS = "h-3.5 w-3.5 text-muted-foreground";
|
|
10574
10596
|
function SorterContextMenu({
|
|
10575
10597
|
x,
|
|
@@ -13932,7 +13954,10 @@ function scaledSlidePreviewPropsEqual(prev, next) {
|
|
|
13932
13954
|
}
|
|
13933
13955
|
return true;
|
|
13934
13956
|
}
|
|
13935
|
-
var ScaledSlidePreview = React106.memo(
|
|
13957
|
+
var ScaledSlidePreview = /* @__PURE__ */ React106.memo(
|
|
13958
|
+
ScaledSlidePreviewImpl,
|
|
13959
|
+
scaledSlidePreviewPropsEqual
|
|
13960
|
+
);
|
|
13936
13961
|
function PresenterNotesRail({
|
|
13937
13962
|
slides,
|
|
13938
13963
|
current,
|
|
@@ -14577,8 +14602,6 @@ function RehearseTimingsSummary({
|
|
|
14577
14602
|
) })
|
|
14578
14603
|
] }) });
|
|
14579
14604
|
}
|
|
14580
|
-
|
|
14581
|
-
// src/viewer/components/selection-pane-utils.ts
|
|
14582
14605
|
var TYPE_LABELS = {
|
|
14583
14606
|
text: "Text Box",
|
|
14584
14607
|
shape: "Shape",
|
|
@@ -14598,7 +14621,7 @@ function getElementDisplayName(element, index) {
|
|
|
14598
14621
|
if (element.name && element.name.trim().length > 0) {
|
|
14599
14622
|
return element.name.trim();
|
|
14600
14623
|
}
|
|
14601
|
-
if (
|
|
14624
|
+
if (hasTextProperties(element) && element.text && element.text.trim().length > 0) {
|
|
14602
14625
|
return element.text.trim().slice(0, 32);
|
|
14603
14626
|
}
|
|
14604
14627
|
const label = TYPE_LABELS[element.type] ?? "Object";
|
|
@@ -14825,13 +14848,13 @@ function SelectionPane({
|
|
|
14825
14848
|
}
|
|
14826
14849
|
var INPUT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px] max-md:min-h-[44px]!";
|
|
14827
14850
|
var SELECT_CLS = "bg-muted border border-border rounded px-2 py-1 w-full text-[11px] max-md:min-h-[44px]!";
|
|
14828
|
-
var ENTRANCE_PRESETS = ANIMATION_PRESET_OPTIONS.filter(
|
|
14851
|
+
var ENTRANCE_PRESETS = /* @__PURE__ */ ANIMATION_PRESET_OPTIONS.filter(
|
|
14829
14852
|
(o) => o.value === "fadeIn" || o.value === "flyIn" || o.value === "zoomIn"
|
|
14830
14853
|
);
|
|
14831
|
-
var EXIT_PRESETS = ANIMATION_PRESET_OPTIONS.filter(
|
|
14854
|
+
var EXIT_PRESETS = /* @__PURE__ */ ANIMATION_PRESET_OPTIONS.filter(
|
|
14832
14855
|
(o) => o.value === "fadeOut" || o.value === "flyOut" || o.value === "zoomOut"
|
|
14833
14856
|
);
|
|
14834
|
-
var EMPHASIS_PRESETS = ANIMATION_PRESET_OPTIONS.filter(
|
|
14857
|
+
var EMPHASIS_PRESETS = /* @__PURE__ */ ANIMATION_PRESET_OPTIONS.filter(
|
|
14835
14858
|
(o) => o.value === "spin" || o.value === "pulse" || o.value === "colorWave" || o.value === "bounce" || o.value === "flash" || o.value === "growShrink" || o.value === "teeter"
|
|
14836
14859
|
);
|
|
14837
14860
|
var TIMING_CURVE_OPTIONS = [
|
|
@@ -15641,7 +15664,7 @@ function useAnimationHandlers({
|
|
|
15641
15664
|
if (!el) {
|
|
15642
15665
|
return anim.elementId.slice(0, 8);
|
|
15643
15666
|
}
|
|
15644
|
-
const text =
|
|
15667
|
+
const text = hasTextProperties(el) ? el.text : void 0;
|
|
15645
15668
|
return text || getElementLabel(el);
|
|
15646
15669
|
},
|
|
15647
15670
|
[activeSlide.elements]
|
|
@@ -15652,7 +15675,7 @@ function useAnimationHandlers({
|
|
|
15652
15675
|
if (!el) {
|
|
15653
15676
|
return id.slice(0, 8);
|
|
15654
15677
|
}
|
|
15655
|
-
const text =
|
|
15678
|
+
const text = hasTextProperties(el) ? el.text : void 0;
|
|
15656
15679
|
return text || getElementLabel(el);
|
|
15657
15680
|
}).join(", "),
|
|
15658
15681
|
[activeSlide.elements]
|
|
@@ -16132,11 +16155,11 @@ function ActionSettingsPanel({
|
|
|
16132
16155
|
onUpdateElement
|
|
16133
16156
|
}) {
|
|
16134
16157
|
const { t } = useTranslation();
|
|
16135
|
-
const clickAction = selectedElement.actionClick ?
|
|
16136
|
-
const hoverAction = selectedElement.actionHover ?
|
|
16158
|
+
const clickAction = selectedElement.actionClick ? pptxActionToElementAction(selectedElement.actionClick, "click") : void 0;
|
|
16159
|
+
const hoverAction = selectedElement.actionHover ? pptxActionToElementAction(selectedElement.actionHover, "hover") : void 0;
|
|
16137
16160
|
const updateAction = (trigger, type, patch) => {
|
|
16138
16161
|
const ea = { trigger, type, ...patch };
|
|
16139
|
-
const pa =
|
|
16162
|
+
const pa = elementActionToPptxAction(ea);
|
|
16140
16163
|
if (trigger === "click") {
|
|
16141
16164
|
onUpdateElement({ actionClick: pa });
|
|
16142
16165
|
} else {
|
|
@@ -16782,7 +16805,7 @@ function ChartDataLabelOptions({
|
|
|
16782
16805
|
] })
|
|
16783
16806
|
] });
|
|
16784
16807
|
}
|
|
16785
|
-
var SYMBOL_OPTIONS = MARKER_SYMBOL_OPTIONS.filter((o) => o.value !== "");
|
|
16808
|
+
var SYMBOL_OPTIONS = /* @__PURE__ */ MARKER_SYMBOL_OPTIONS.filter((o) => o.value !== "");
|
|
16786
16809
|
function ChartDataPointMarkerOptions({
|
|
16787
16810
|
chartType,
|
|
16788
16811
|
categories,
|
|
@@ -18181,40 +18204,40 @@ function ChartDataPanel({ selectedElement, canEdit, onUpdateElement }) {
|
|
|
18181
18204
|
[chartData, selectedElement, replaceChartData]
|
|
18182
18205
|
);
|
|
18183
18206
|
const setAxisLogScale = useCallback(
|
|
18184
|
-
(axisType, opts) => applyChartOp((el) =>
|
|
18207
|
+
(axisType, opts) => applyChartOp((el) => setChartAxisLogScale(el, axisType, opts)),
|
|
18185
18208
|
[applyChartOp]
|
|
18186
18209
|
);
|
|
18187
18210
|
const setAxisTitleStyle = useCallback(
|
|
18188
|
-
(axisType, edit) => applyChartOp((el) =>
|
|
18211
|
+
(axisType, edit) => applyChartOp((el) => setChartAxisTitleStyle(el, axisType, edit)),
|
|
18189
18212
|
[applyChartOp]
|
|
18190
18213
|
);
|
|
18191
18214
|
const setGridlineStyle = useCallback(
|
|
18192
|
-
(axisType, which, edit) => applyChartOp((el) =>
|
|
18215
|
+
(axisType, which, edit) => applyChartOp((el) => setChartAxisGridlineStyle(el, axisType, which, edit)),
|
|
18193
18216
|
[applyChartOp]
|
|
18194
18217
|
);
|
|
18195
18218
|
const setSeriesMarker = useCallback(
|
|
18196
|
-
(index, marker) => applyChartOp((el) =>
|
|
18219
|
+
(index, marker) => applyChartOp((el) => setChartSeriesMarker(el, index, marker)),
|
|
18197
18220
|
[applyChartOp]
|
|
18198
18221
|
);
|
|
18199
18222
|
const setSeriesType = useCallback(
|
|
18200
|
-
(index, seriesType) => applyChartOp((el) =>
|
|
18223
|
+
(index, seriesType) => applyChartOp((el) => setChartSeriesChartType(el, index, seriesType)),
|
|
18201
18224
|
[applyChartOp]
|
|
18202
18225
|
);
|
|
18203
18226
|
const setPointFill = useCallback(
|
|
18204
|
-
(seriesIndex, pointIndex, color) => applyChartOp((el) =>
|
|
18227
|
+
(seriesIndex, pointIndex, color) => applyChartOp((el) => setChartDataPointFill(el, seriesIndex, pointIndex, color)),
|
|
18205
18228
|
[applyChartOp]
|
|
18206
18229
|
);
|
|
18207
18230
|
const setPointExplosion = useCallback(
|
|
18208
|
-
(seriesIndex, pointIndex, explosion) => applyChartOp((el) =>
|
|
18231
|
+
(seriesIndex, pointIndex, explosion) => applyChartOp((el) => setChartDataPointExplosion(el, seriesIndex, pointIndex, explosion)),
|
|
18209
18232
|
[applyChartOp]
|
|
18210
18233
|
);
|
|
18211
18234
|
const setPointMarker = useCallback(
|
|
18212
|
-
(seriesIndex, pointIndex, marker) => applyChartOp((el) =>
|
|
18235
|
+
(seriesIndex, pointIndex, marker) => applyChartOp((el) => setChartDataPointMarker(el, seriesIndex, pointIndex, marker)),
|
|
18213
18236
|
[applyChartOp]
|
|
18214
18237
|
);
|
|
18215
18238
|
const setPointLabel = useCallback(
|
|
18216
18239
|
(seriesIndex, pointIndex, text) => applyChartOp(
|
|
18217
|
-
(el) =>
|
|
18240
|
+
(el) => setChartDataPointLabel(el, seriesIndex, pointIndex, text !== null ? { text } : null)
|
|
18218
18241
|
),
|
|
18219
18242
|
[applyChartOp]
|
|
18220
18243
|
);
|
|
@@ -18482,17 +18505,17 @@ function OleEditorDialog({
|
|
|
18482
18505
|
const kind = descriptor.contentTab.kind;
|
|
18483
18506
|
const load = async () => {
|
|
18484
18507
|
if (kind === "sheet") {
|
|
18485
|
-
const value = await
|
|
18508
|
+
const value = await getOleSheetGrid(element);
|
|
18486
18509
|
if (!cancelled) {
|
|
18487
18510
|
setGrid(value);
|
|
18488
18511
|
}
|
|
18489
18512
|
} else if (kind === "document") {
|
|
18490
|
-
const value = await
|
|
18513
|
+
const value = await getOleDocumentParagraphs(element);
|
|
18491
18514
|
if (!cancelled) {
|
|
18492
18515
|
setParagraphs(value);
|
|
18493
18516
|
}
|
|
18494
18517
|
} else if (kind === "deck") {
|
|
18495
|
-
const value = await
|
|
18518
|
+
const value = await getOleNestedDeckDetail(element);
|
|
18496
18519
|
if (!cancelled) {
|
|
18497
18520
|
setDeckSlides(value);
|
|
18498
18521
|
}
|
|
@@ -18518,9 +18541,9 @@ function OleEditorDialog({
|
|
|
18518
18541
|
const handleCellEdit = useCallback(
|
|
18519
18542
|
async (row, col, value) => {
|
|
18520
18543
|
try {
|
|
18521
|
-
const updated = await
|
|
18544
|
+
const updated = await applyOleSheetCellEdit(element, { row, col, value });
|
|
18522
18545
|
commit(updated);
|
|
18523
|
-
const refreshed = await
|
|
18546
|
+
const refreshed = await getOleSheetGrid(updated);
|
|
18524
18547
|
if (mountedRef.current) {
|
|
18525
18548
|
setGrid(refreshed);
|
|
18526
18549
|
}
|
|
@@ -18535,9 +18558,9 @@ function OleEditorDialog({
|
|
|
18535
18558
|
const handleParagraphEdit = useCallback(
|
|
18536
18559
|
async (index, text) => {
|
|
18537
18560
|
try {
|
|
18538
|
-
const updated = await
|
|
18561
|
+
const updated = await applyOleDocumentParagraphEdit(element, index, text);
|
|
18539
18562
|
commit(updated);
|
|
18540
|
-
const refreshed = await
|
|
18563
|
+
const refreshed = await getOleDocumentParagraphs(updated);
|
|
18541
18564
|
if (mountedRef.current) {
|
|
18542
18565
|
setParagraphs(refreshed);
|
|
18543
18566
|
}
|
|
@@ -18552,14 +18575,14 @@ function OleEditorDialog({
|
|
|
18552
18575
|
const handleDeckElementEdit = useCallback(
|
|
18553
18576
|
async (slideIndex, deckElementId, text) => {
|
|
18554
18577
|
try {
|
|
18555
|
-
const updated = await
|
|
18578
|
+
const updated = await applyOleNestedDeckElementTextEdit(
|
|
18556
18579
|
element,
|
|
18557
18580
|
slideIndex,
|
|
18558
18581
|
deckElementId,
|
|
18559
18582
|
text
|
|
18560
18583
|
);
|
|
18561
18584
|
commit(updated);
|
|
18562
|
-
const refreshed = await
|
|
18585
|
+
const refreshed = await getOleNestedDeckDetail(updated);
|
|
18563
18586
|
if (mountedRef.current) {
|
|
18564
18587
|
setDeckSlides(refreshed);
|
|
18565
18588
|
}
|
|
@@ -18575,7 +18598,7 @@ function OleEditorDialog({
|
|
|
18575
18598
|
async (file) => {
|
|
18576
18599
|
try {
|
|
18577
18600
|
const bytes = new Uint8Array(await file.arrayBuffer());
|
|
18578
|
-
const updated = await
|
|
18601
|
+
const updated = await replaceOleFile(element, bytes, file.name);
|
|
18579
18602
|
commit(updated);
|
|
18580
18603
|
if (mountedRef.current) {
|
|
18581
18604
|
onClose();
|
|
@@ -18847,7 +18870,7 @@ function OlePropertiesPanel({
|
|
|
18847
18870
|
] }),
|
|
18848
18871
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
18849
18872
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.ole.type") }),
|
|
18850
|
-
/* @__PURE__ */ jsx("span", { className: "text-foreground truncate", children:
|
|
18873
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground truncate", children: getOleObjectTypeLabel(ole.oleObjectType) })
|
|
18851
18874
|
] }),
|
|
18852
18875
|
ole.fileName && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
18853
18876
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.ole.fileName") }),
|
|
@@ -19373,7 +19396,7 @@ function ImageCropSection({
|
|
|
19373
19396
|
onUpdateElement
|
|
19374
19397
|
}) {
|
|
19375
19398
|
const { t } = useTranslation();
|
|
19376
|
-
if (!
|
|
19399
|
+
if (!isImageLikeElement(selectedElement)) {
|
|
19377
19400
|
return null;
|
|
19378
19401
|
}
|
|
19379
19402
|
const croppable = cropResetState(selectedElement, canEdit, true).enabled;
|
|
@@ -22565,7 +22588,7 @@ function TextAdvancedSections({
|
|
|
22565
22588
|
canEdit,
|
|
22566
22589
|
onUpdateTextStyle
|
|
22567
22590
|
}) {
|
|
22568
|
-
if (!
|
|
22591
|
+
if (!hasTextProperties(selectedElement)) {
|
|
22569
22592
|
return null;
|
|
22570
22593
|
}
|
|
22571
22594
|
const ts = selectedElement.textStyle;
|
|
@@ -22594,7 +22617,7 @@ function ShapeTextPanels({
|
|
|
22594
22617
|
}) {
|
|
22595
22618
|
const { t } = useTranslation();
|
|
22596
22619
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
22597
|
-
|
|
22620
|
+
hasShapeProperties(selectedElement) && /* @__PURE__ */ jsxs("div", { className: CARD2, children: [
|
|
22598
22621
|
/* @__PURE__ */ jsx("div", { className: HEADING2, children: t("pptx.shape.type", "Shape Type") }),
|
|
22599
22622
|
/* @__PURE__ */ jsx(
|
|
22600
22623
|
WebSelect,
|
|
@@ -22609,7 +22632,7 @@ function ShapeTextPanels({
|
|
|
22609
22632
|
}
|
|
22610
22633
|
)
|
|
22611
22634
|
] }),
|
|
22612
|
-
|
|
22635
|
+
hasShapeProperties(selectedElement) && /* @__PURE__ */ jsxs("div", { className: CARD2, "data-pptx-fill-stroke": true, "data-pptx-inspector-section": "fill-stroke", children: [
|
|
22613
22636
|
/* @__PURE__ */ jsx("div", { className: HEADING2, children: t("pptx.shape.fillStroke", "Fill & Stroke") }),
|
|
22614
22637
|
/* @__PURE__ */ jsx(
|
|
22615
22638
|
FillStrokeProperties,
|
|
@@ -22627,7 +22650,7 @@ function ShapeTextPanels({
|
|
|
22627
22650
|
}
|
|
22628
22651
|
)
|
|
22629
22652
|
] }),
|
|
22630
|
-
|
|
22653
|
+
hasTextProperties(selectedElement) && /* @__PURE__ */ jsxs("div", { className: CARD2, "data-pptx-text-card": true, children: [
|
|
22631
22654
|
/* @__PURE__ */ jsx("div", { className: HEADING2, children: t("pptx.text.title", "Text") }),
|
|
22632
22655
|
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-1.5 text-[11px]", children: [
|
|
22633
22656
|
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
@@ -22902,10 +22925,12 @@ var THUMB_COMPONENTS = {
|
|
|
22902
22925
|
chevron: ChevronThumb,
|
|
22903
22926
|
bending: BendingThumb
|
|
22904
22927
|
};
|
|
22905
|
-
var LAYOUT_DESCRIPTORS =
|
|
22906
|
-
type
|
|
22907
|
-
|
|
22908
|
-
}
|
|
22928
|
+
var LAYOUT_DESCRIPTORS = /* @__PURE__ */ SWITCHABLE_LAYOUT_TYPES.map(
|
|
22929
|
+
(type) => ({
|
|
22930
|
+
type,
|
|
22931
|
+
i18nKey: `pptx.smartart.category.${type}`
|
|
22932
|
+
})
|
|
22933
|
+
);
|
|
22909
22934
|
function SmartArtLayoutSwitcher({
|
|
22910
22935
|
smartArtData,
|
|
22911
22936
|
canEdit,
|
|
@@ -23243,10 +23268,10 @@ function SmartArtPropertiesPanel({
|
|
|
23243
23268
|
applySmartArtData({ ...smartArtData, ...patch });
|
|
23244
23269
|
};
|
|
23245
23270
|
const handleUpdateNodeText = (nodeId, text) => {
|
|
23246
|
-
applySmartArtData(
|
|
23271
|
+
applySmartArtData(updateSmartArtNodeText(smartArtData, nodeId, text));
|
|
23247
23272
|
};
|
|
23248
23273
|
const handleChangeNodeStyle = (nodeId, patch) => {
|
|
23249
|
-
const next =
|
|
23274
|
+
const next = setSmartArtNodeStyle(smartArtData, nodeId, patch);
|
|
23250
23275
|
if (next !== smartArtData) {
|
|
23251
23276
|
applySmartArtData(next);
|
|
23252
23277
|
}
|
|
@@ -23255,17 +23280,17 @@ function SmartArtPropertiesPanel({
|
|
|
23255
23280
|
if (!canAddTopLevelNode(layout, topLevelCount)) {
|
|
23256
23281
|
return;
|
|
23257
23282
|
}
|
|
23258
|
-
applySmartArtData(
|
|
23283
|
+
applySmartArtData(addSmartArtNodeAsChild(smartArtData));
|
|
23259
23284
|
};
|
|
23260
23285
|
const addSubItem = (parentId) => {
|
|
23261
|
-
applySmartArtData(
|
|
23286
|
+
applySmartArtData(addSmartArtNodeAsChild(smartArtData, parentId, "Sub-item"));
|
|
23262
23287
|
};
|
|
23263
23288
|
const removeNode = (nodeId) => {
|
|
23264
23289
|
const isTopLevel = !nodes.find((n) => n.id === nodeId)?.parentId;
|
|
23265
23290
|
if (isTopLevel && !canRemoveTopLevelNode(layout, topLevelCount)) {
|
|
23266
23291
|
return;
|
|
23267
23292
|
}
|
|
23268
|
-
applySmartArtData(
|
|
23293
|
+
applySmartArtData(removeSmartArtNode(smartArtData, nodeId));
|
|
23269
23294
|
};
|
|
23270
23295
|
const moveNode = (nodeId, direction) => {
|
|
23271
23296
|
const next = reorder(smartArtData, nodeId, direction);
|
|
@@ -24240,7 +24265,7 @@ function TableStyleEditor({
|
|
|
24240
24265
|
const { t } = useTranslation();
|
|
24241
24266
|
const themeColorMap = useThemeColorMap();
|
|
24242
24267
|
const [activeStyleId, setActiveStyleId] = useState(
|
|
24243
|
-
styleId ?
|
|
24268
|
+
styleId ? normalizeTableStyleGuid(styleId) : ""
|
|
24244
24269
|
);
|
|
24245
24270
|
const [selectedPart, setSelectedPart] = useState("wholeTbl");
|
|
24246
24271
|
const entry = activeStyleId ? styleMap?.[activeStyleId] : void 0;
|
|
@@ -24261,8 +24286,8 @@ function TableStyleEditor({
|
|
|
24261
24286
|
return;
|
|
24262
24287
|
}
|
|
24263
24288
|
const nextMap = { ...styleMap ?? {} };
|
|
24264
|
-
const created =
|
|
24265
|
-
|
|
24289
|
+
const created = createTableStyleEntry(nextMap, { styleName: name, basedOn: entry });
|
|
24290
|
+
addTableStyleToMap(nextMap, created);
|
|
24266
24291
|
onStyleMapChange(nextMap);
|
|
24267
24292
|
setActiveStyleId(created.styleId);
|
|
24268
24293
|
onAssignStyle?.(created.styleId);
|
|
@@ -24272,7 +24297,7 @@ function TableStyleEditor({
|
|
|
24272
24297
|
return;
|
|
24273
24298
|
}
|
|
24274
24299
|
const nextMap = { ...styleMap };
|
|
24275
|
-
|
|
24300
|
+
deleteTableStyleFromMap(nextMap, entry.styleId);
|
|
24276
24301
|
onStyleMapChange(nextMap);
|
|
24277
24302
|
onDeleteStyle(entry.styleId);
|
|
24278
24303
|
onClose();
|
|
@@ -24326,7 +24351,7 @@ function TablePropertiesPanel({
|
|
|
24326
24351
|
const updateMergeRows = (rows) => {
|
|
24327
24352
|
const tableData = { ...td, rows };
|
|
24328
24353
|
const updates = { tableData };
|
|
24329
|
-
const rawXml =
|
|
24354
|
+
const rawXml = updateMergeAttrsInRawXml(tableElement, tableData);
|
|
24330
24355
|
if (rawXml) {
|
|
24331
24356
|
updates.rawXml = rawXml;
|
|
24332
24357
|
}
|
|
@@ -24620,7 +24645,7 @@ function ElementInspectorBody({
|
|
|
24620
24645
|
box: { width: selectedElement.width, height: selectedElement.height }
|
|
24621
24646
|
}
|
|
24622
24647
|
),
|
|
24623
|
-
|
|
24648
|
+
isImageLikeElement(selectedElement) && /* @__PURE__ */ jsx(
|
|
24624
24649
|
ImagePropertiesPanel,
|
|
24625
24650
|
{
|
|
24626
24651
|
selectedElement,
|
|
@@ -25185,7 +25210,7 @@ function InspectorCommentsSection({
|
|
|
25185
25210
|
] });
|
|
25186
25211
|
}
|
|
25187
25212
|
function elementLabel(element) {
|
|
25188
|
-
const text =
|
|
25213
|
+
const text = hasTextProperties(element) ? (element.text || "").slice(0, 24) : void 0;
|
|
25189
25214
|
return text || element.type;
|
|
25190
25215
|
}
|
|
25191
25216
|
function InspectorElementsTab({
|
|
@@ -25816,14 +25841,14 @@ function SlideThemeOverridePanel({
|
|
|
25816
25841
|
const translate = useCallback((key) => t(key), [t]);
|
|
25817
25842
|
const override = activeSlide?.clrMapOverride;
|
|
25818
25843
|
const isOverrideActive = override !== void 0;
|
|
25819
|
-
const targetSlotOptions = useMemo(() => [...
|
|
25844
|
+
const targetSlotOptions = useMemo(() => [...THEME_COLOR_SCHEME_KEYS], []);
|
|
25820
25845
|
const commitOverride = useCallback(
|
|
25821
25846
|
(nextOverride) => {
|
|
25822
25847
|
if (!activeSlide || !theme?.colorScheme) {
|
|
25823
25848
|
onUpdateSlide({ clrMapOverride: nextOverride });
|
|
25824
25849
|
return;
|
|
25825
25850
|
}
|
|
25826
|
-
const nextSlide =
|
|
25851
|
+
const nextSlide = applyThemeOverrideToSlide(activeSlide, theme.colorScheme, nextOverride);
|
|
25827
25852
|
onUpdateSlide({
|
|
25828
25853
|
clrMapOverride: nextSlide.clrMapOverride,
|
|
25829
25854
|
backgroundColor: nextSlide.backgroundColor,
|
|
@@ -25836,8 +25861,8 @@ function SlideThemeOverridePanel({
|
|
|
25836
25861
|
(enabled) => {
|
|
25837
25862
|
if (enabled) {
|
|
25838
25863
|
const defaultMap = {};
|
|
25839
|
-
for (const key of
|
|
25840
|
-
defaultMap[key] =
|
|
25864
|
+
for (const key of COLOR_MAP_ALIAS_KEYS) {
|
|
25865
|
+
defaultMap[key] = DEFAULT_COLOR_MAP[key];
|
|
25841
25866
|
}
|
|
25842
25867
|
commitOverride(defaultMap);
|
|
25843
25868
|
} else {
|
|
@@ -25850,9 +25875,9 @@ function SlideThemeOverridePanel({
|
|
|
25850
25875
|
(alias, targetSlot) => {
|
|
25851
25876
|
const current = override ?? {};
|
|
25852
25877
|
const next = { ...current, [alias]: targetSlot };
|
|
25853
|
-
for (const key of
|
|
25878
|
+
for (const key of COLOR_MAP_ALIAS_KEYS) {
|
|
25854
25879
|
if (!next[key]) {
|
|
25855
|
-
next[key] =
|
|
25880
|
+
next[key] = DEFAULT_COLOR_MAP[key];
|
|
25856
25881
|
}
|
|
25857
25882
|
}
|
|
25858
25883
|
commitOverride(next);
|
|
@@ -25884,8 +25909,8 @@ function SlideThemeOverridePanel({
|
|
|
25884
25909
|
),
|
|
25885
25910
|
t("pptx.themeOverride.enableOverride")
|
|
25886
25911
|
] }),
|
|
25887
|
-
isOverrideActive && override && /* @__PURE__ */ jsx("div", { className: "space-y-1.5", children:
|
|
25888
|
-
const currentTarget = override[alias] ??
|
|
25912
|
+
isOverrideActive && override && /* @__PURE__ */ jsx("div", { className: "space-y-1.5", children: COLOR_MAP_ALIAS_KEYS.map((alias) => {
|
|
25913
|
+
const currentTarget = override[alias] ?? DEFAULT_COLOR_MAP[alias];
|
|
25889
25914
|
const resolvedHex = resolveSlotColor(currentTarget);
|
|
25890
25915
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-[11px]", children: [
|
|
25891
25916
|
/* @__PURE__ */ jsx("span", { className: "w-24 truncate text-muted-foreground", title: ALIAS_LABELS[alias], children: ALIAS_LABELS[alias] }),
|
|
@@ -26050,13 +26075,13 @@ function SlideTransitionSection({
|
|
|
26050
26075
|
return null;
|
|
26051
26076
|
}
|
|
26052
26077
|
const transitionType = activeSlide.transition?.type ?? "none";
|
|
26053
|
-
const validDirections =
|
|
26078
|
+
const validDirections = TRANSITION_VALID_DIRECTIONS[transitionType];
|
|
26054
26079
|
const hasDirections = validDirections !== void 0 && validDirections.length > 0;
|
|
26055
26080
|
const usesOrientation = TRANSITION_ORIENTATION_TYPES.has(transitionType);
|
|
26056
26081
|
const isWheel = transitionType === "wheel";
|
|
26057
26082
|
const isMorph = transitionType === "morph";
|
|
26058
|
-
const patternOptions =
|
|
26059
|
-
const hasThruBlk =
|
|
26083
|
+
const patternOptions = TRANSITION_PATTERN_OPTIONS[transitionType];
|
|
26084
|
+
const hasThruBlk = TRANSITION_THRUBLK_TYPES.has(transitionType);
|
|
26060
26085
|
return /* @__PURE__ */ jsxs(
|
|
26061
26086
|
"div",
|
|
26062
26087
|
{
|
|
@@ -30029,7 +30054,7 @@ function ViewerToolbarSection(props) {
|
|
|
30029
30054
|
redoLabel: history.redoLabel,
|
|
30030
30055
|
onUndo: history.handleUndo,
|
|
30031
30056
|
onRedo: history.handleRedo,
|
|
30032
|
-
onSave: exportHandlers.
|
|
30057
|
+
onSave: exportHandlers.handleSave,
|
|
30033
30058
|
findReplaceOpen: findReplace.findReplaceOpen,
|
|
30034
30059
|
onToggleFindReplace: () => findReplace.setFindReplaceOpen(!findReplace.findReplaceOpen),
|
|
30035
30060
|
onCommandSearch: handleCommandSearch,
|
|
@@ -30152,6 +30177,7 @@ function ViewerToolbarSection(props) {
|
|
|
30152
30177
|
s.setIsDirty(true);
|
|
30153
30178
|
},
|
|
30154
30179
|
onOpenShareDialog,
|
|
30180
|
+
onSave: exportHandlers.handleSave,
|
|
30155
30181
|
onSaveAsPptx: exportHandlers.handleSaveAsPptx,
|
|
30156
30182
|
onSaveAsPpsx: exportHandlers.handleSaveAsPpsx,
|
|
30157
30183
|
onSaveAsPptm: exportHandlers.handleSaveAsPptm,
|
|
@@ -30287,7 +30313,7 @@ function ViewerToolbarSection(props) {
|
|
|
30287
30313
|
] });
|
|
30288
30314
|
}
|
|
30289
30315
|
var TEMPLATES = EQUATION_TEMPLATES;
|
|
30290
|
-
var TEMPLATE_MATHML = compileEquationTemplateMathMl();
|
|
30316
|
+
var TEMPLATE_MATHML = /* @__PURE__ */ compileEquationTemplateMathMl();
|
|
30291
30317
|
function MathMlPreview({ mathml }) {
|
|
30292
30318
|
const containerRef = useRef(null);
|
|
30293
30319
|
useEffect(() => {
|
|
@@ -31760,10 +31786,10 @@ function useTableStyleMapHandlers(input) {
|
|
|
31760
31786
|
};
|
|
31761
31787
|
return { handleTableStyleMapChange, handleDeleteTableStyle };
|
|
31762
31788
|
}
|
|
31763
|
-
var AiChatPanel = lazy(async () => {
|
|
31789
|
+
var AiChatPanel = /* @__PURE__ */ lazy(async () => {
|
|
31764
31790
|
const [{ useChat }, { default: Panel }] = await Promise.all([
|
|
31765
31791
|
import('@ai-sdk/react'),
|
|
31766
|
-
import('./AiChatPanel-
|
|
31792
|
+
import('./AiChatPanel-6S4LWXGM.mjs')
|
|
31767
31793
|
]);
|
|
31768
31794
|
function BoundAiChatPanel(props) {
|
|
31769
31795
|
return /* @__PURE__ */ jsx(Panel, { ...props, useChat });
|
|
@@ -32415,7 +32441,7 @@ function ViewerSidePanels(props) {
|
|
|
32415
32441
|
const customization = useViewerCustomizationContext();
|
|
32416
32442
|
const inspectorOpen = (mode === "edit" || mode === "master") && s.isInspectorPaneOpen && isPanelVisible(customization, "inspector");
|
|
32417
32443
|
const currentBuiltInTheme = BUILT_IN_THEMES.find(
|
|
32418
|
-
(candidate) =>
|
|
32444
|
+
(candidate) => themeColorSchemesEqual(s.theme?.colorScheme, candidate.colorScheme)
|
|
32419
32445
|
) ?? null;
|
|
32420
32446
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32421
32447
|
inspectorOpen && onResizeRight && /* @__PURE__ */ jsx(ResizeHandle, { direction: "horizontal", onResize: onResizeRight }),
|
|
@@ -34316,30 +34342,21 @@ function useCollaborationStateReport(collab, onChange) {
|
|
|
34316
34342
|
);
|
|
34317
34343
|
}, [reporter, status, synced, clientId, remoteUsers, config, writeBack]);
|
|
34318
34344
|
}
|
|
34319
|
-
function
|
|
34320
|
-
void (
|
|
34321
|
-
|
|
34322
|
-
const snapshots = await listAutosaveSnapshots();
|
|
34323
|
-
await Promise.all(snapshots.map((entry) => deleteAutosaveSnapshot(entry.key)));
|
|
34324
|
-
} catch {
|
|
34325
|
-
}
|
|
34326
|
-
})();
|
|
34345
|
+
function clearOptionsCache(storage) {
|
|
34346
|
+
void clearAutosaveSnapshots(storage).catch(() => {
|
|
34347
|
+
});
|
|
34327
34348
|
}
|
|
34328
|
-
function useAutosaveCacheMaintenance(viewerOptions) {
|
|
34349
|
+
function useAutosaveCacheMaintenance(viewerOptions, storage) {
|
|
34350
|
+
const storageRef = useRef(storage);
|
|
34351
|
+
storageRef.current = storage;
|
|
34329
34352
|
useEffect(() => {
|
|
34330
|
-
void (
|
|
34331
|
-
|
|
34332
|
-
const snapshots = await listAutosaveSnapshots();
|
|
34333
|
-
const expired = resolveExpiredAutosaveSnapshots(snapshots, viewerOptions);
|
|
34334
|
-
await Promise.all(expired.map((key) => deleteAutosaveSnapshot(key)));
|
|
34335
|
-
} catch {
|
|
34336
|
-
}
|
|
34337
|
-
})();
|
|
34353
|
+
void pruneExpiredAutosaveSnapshots(viewerOptions, storageRef.current).catch(() => {
|
|
34354
|
+
});
|
|
34338
34355
|
}, []);
|
|
34339
34356
|
useEffect(() => {
|
|
34340
34357
|
const clearIfRequested = () => {
|
|
34341
34358
|
if (shouldClearAutosaveCacheOnClose(viewerOptions)) {
|
|
34342
|
-
|
|
34359
|
+
clearOptionsCache(storageRef.current);
|
|
34343
34360
|
}
|
|
34344
34361
|
};
|
|
34345
34362
|
window.addEventListener("beforeunload", clearIfRequested);
|
|
@@ -34348,8 +34365,10 @@ function useAutosaveCacheMaintenance(viewerOptions) {
|
|
|
34348
34365
|
clearIfRequested();
|
|
34349
34366
|
};
|
|
34350
34367
|
}, [viewerOptions]);
|
|
34351
|
-
|
|
34368
|
+
const clearHostCache = useCallback(() => clearOptionsCache(storageRef.current), []);
|
|
34369
|
+
return storage ? clearHostCache : clearBrowserCache;
|
|
34352
34370
|
}
|
|
34371
|
+
var clearBrowserCache = () => clearOptionsCache(void 0);
|
|
34353
34372
|
function useChartFormatCommands(input) {
|
|
34354
34373
|
const { selectedElement, editable, updateElementById } = input;
|
|
34355
34374
|
const chart = selectedElement?.type === "chart" ? selectedElement : null;
|
|
@@ -34861,17 +34880,19 @@ function useViewerCustomization(customization, legacyHiddenActions, optionsStore
|
|
|
34861
34880
|
return { resolved, api: controller.api, hiddenActions };
|
|
34862
34881
|
}
|
|
34863
34882
|
var NO_RIBBON_ADD_INS = [];
|
|
34864
|
-
var
|
|
34883
|
+
var PowerPointViewerComponent = /* @__PURE__ */ forwardRef(
|
|
34865
34884
|
// oxlint-disable-next-line prefer-arrow-callback -- named fn gives the forwardRef component its displayName
|
|
34866
|
-
function
|
|
34885
|
+
function PowerPointViewer(props, ref) {
|
|
34867
34886
|
const {
|
|
34868
34887
|
content: incomingContent,
|
|
34869
34888
|
fonts = [],
|
|
34870
34889
|
filePath,
|
|
34871
34890
|
fileName,
|
|
34872
|
-
canEdit:
|
|
34891
|
+
canEdit: canEditProp = false,
|
|
34892
|
+
readOnly = false,
|
|
34873
34893
|
autosave: hostAutosave,
|
|
34874
34894
|
autosaveIntervalMs: hostAutosaveIntervalMs,
|
|
34895
|
+
storage,
|
|
34875
34896
|
onContentChange,
|
|
34876
34897
|
onDirtyChange,
|
|
34877
34898
|
onActiveSlideChange,
|
|
@@ -34895,6 +34916,15 @@ var PowerPointViewer = forwardRef(
|
|
|
34895
34916
|
onStartCollaboration,
|
|
34896
34917
|
onStopCollaboration,
|
|
34897
34918
|
onCollaborationChange,
|
|
34919
|
+
onCollaborationStatus,
|
|
34920
|
+
onAutosave,
|
|
34921
|
+
onAutosaveToggle,
|
|
34922
|
+
onAutosaveStatus,
|
|
34923
|
+
onAutosaveRecovery,
|
|
34924
|
+
onChange,
|
|
34925
|
+
onPropertiesChange,
|
|
34926
|
+
onNotesUpdate,
|
|
34927
|
+
onPresentationChange,
|
|
34898
34928
|
shareDefaults,
|
|
34899
34929
|
smartArt3D = false,
|
|
34900
34930
|
surfaceChart3D = false,
|
|
@@ -34908,6 +34938,7 @@ var PowerPointViewer = forwardRef(
|
|
|
34908
34938
|
customization,
|
|
34909
34939
|
initialSlide
|
|
34910
34940
|
} = props;
|
|
34941
|
+
const hostCanEdit = canEditProp && !readOnly;
|
|
34911
34942
|
const collaboration = resolveCollaborationConfig(collaborationInput);
|
|
34912
34943
|
const rootOptions = resolveViewerRootOptions(props);
|
|
34913
34944
|
useEffect(() => {
|
|
@@ -34997,15 +35028,18 @@ var PowerPointViewer = forwardRef(
|
|
|
34997
35028
|
}
|
|
34998
35029
|
})();
|
|
34999
35030
|
}, [hostOpenFile]);
|
|
35000
|
-
const handleOpenRecentFile = useCallback(
|
|
35001
|
-
|
|
35002
|
-
|
|
35003
|
-
|
|
35004
|
-
|
|
35005
|
-
|
|
35006
|
-
|
|
35007
|
-
|
|
35008
|
-
|
|
35031
|
+
const handleOpenRecentFile = useCallback(
|
|
35032
|
+
(key) => {
|
|
35033
|
+
void (async () => {
|
|
35034
|
+
const bytes = await readBackstageRecentFile(key, storage);
|
|
35035
|
+
if (bytes) {
|
|
35036
|
+
setLoadOrigin("user");
|
|
35037
|
+
setContent(bytes);
|
|
35038
|
+
}
|
|
35039
|
+
})();
|
|
35040
|
+
},
|
|
35041
|
+
[storage]
|
|
35042
|
+
);
|
|
35009
35043
|
const { optionsStore, options: viewerOptions } = useViewerOptions();
|
|
35010
35044
|
const custom = useViewerCustomization(customization, legacyHiddenActions, optionsStore);
|
|
35011
35045
|
const { resolved: customizationResolved, hiddenActions } = custom;
|
|
@@ -35029,6 +35063,14 @@ var PowerPointViewer = forwardRef(
|
|
|
35029
35063
|
const [isSettingsOpen, setIsSettingsOpen] = useState(false);
|
|
35030
35064
|
const [isHeaderFooterOpen, setIsHeaderFooterOpen] = useState(false);
|
|
35031
35065
|
const [autosaveEnabled, setAutosaveEnabled] = useState(true);
|
|
35066
|
+
const autosaveToggleCallback = useRef(onAutosaveToggle);
|
|
35067
|
+
useEffect(() => {
|
|
35068
|
+
autosaveToggleCallback.current = onAutosaveToggle;
|
|
35069
|
+
}, [onAutosaveToggle]);
|
|
35070
|
+
const autosaveEnabledRef = useRef(autosaveEnabled);
|
|
35071
|
+
useEffect(() => {
|
|
35072
|
+
autosaveEnabledRef.current = autosaveEnabled;
|
|
35073
|
+
}, [autosaveEnabled]);
|
|
35032
35074
|
const autosaveActivation = resolveAutosaveActivation({
|
|
35033
35075
|
hostAutosave,
|
|
35034
35076
|
userEnabled: autosaveEnabled,
|
|
@@ -35074,7 +35116,7 @@ var PowerPointViewer = forwardRef(
|
|
|
35074
35116
|
[state.recentColors, pushColor]
|
|
35075
35117
|
);
|
|
35076
35118
|
const themeColorMapValue = useMemo(
|
|
35077
|
-
() => state.theme?.colorScheme ?
|
|
35119
|
+
() => state.theme?.colorScheme ? buildThemeColorMap(state.theme.colorScheme) : void 0,
|
|
35078
35120
|
[state.theme?.colorScheme]
|
|
35079
35121
|
);
|
|
35080
35122
|
const settings = useMemo(
|
|
@@ -35100,6 +35142,9 @@ var PowerPointViewer = forwardRef(
|
|
|
35100
35142
|
switch (key) {
|
|
35101
35143
|
case "autoSave":
|
|
35102
35144
|
setAutosaveEnabled(value);
|
|
35145
|
+
if (value !== autosaveEnabledRef.current) {
|
|
35146
|
+
autosaveToggleCallback.current?.(value);
|
|
35147
|
+
}
|
|
35103
35148
|
break;
|
|
35104
35149
|
case "spellCheck":
|
|
35105
35150
|
state.setSpellCheckEnabled(value);
|
|
@@ -35160,7 +35205,7 @@ var PowerPointViewer = forwardRef(
|
|
|
35160
35205
|
optionsStore.setOptions(next);
|
|
35161
35206
|
}
|
|
35162
35207
|
}, [settings, optionsStore]);
|
|
35163
|
-
const
|
|
35208
|
+
const handleClearOptionsCache = useAutosaveCacheMaintenance(viewerOptions, storage);
|
|
35164
35209
|
const mobile = useIsMobile();
|
|
35165
35210
|
const { isMobile, isTouchDevice, isVirtualKeyboardOpen } = mobile;
|
|
35166
35211
|
const resizablePanels = useResizablePanels();
|
|
@@ -35202,8 +35247,13 @@ var PowerPointViewer = forwardRef(
|
|
|
35202
35247
|
maxFitScale: props.maxFitScale
|
|
35203
35248
|
});
|
|
35204
35249
|
const { setIsDirty } = state;
|
|
35250
|
+
const onChangeCallback = useRef(onChange);
|
|
35251
|
+
useEffect(() => {
|
|
35252
|
+
onChangeCallback.current = onChange;
|
|
35253
|
+
}, [onChange]);
|
|
35205
35254
|
const markDocumentDirty = useCallback(() => {
|
|
35206
35255
|
setIsDirty(true);
|
|
35256
|
+
onChangeCallback.current?.();
|
|
35207
35257
|
}, [setIsDirty]);
|
|
35208
35258
|
const history = useEditorHistory({
|
|
35209
35259
|
slides,
|
|
@@ -35434,6 +35484,12 @@ ${url}`)
|
|
|
35434
35484
|
content,
|
|
35435
35485
|
filePath,
|
|
35436
35486
|
fileName,
|
|
35487
|
+
storage,
|
|
35488
|
+
// A failed Save / Save As: the host's `onError`, and the save-failed notice for the user.
|
|
35489
|
+
onSaveError: (saveError) => {
|
|
35490
|
+
onError?.(saveFailureMessage(saveError));
|
|
35491
|
+
compatToastsState.setToasts(withSaveFailureToast);
|
|
35492
|
+
},
|
|
35437
35493
|
autosaveEnabled: autosaveActivation.active,
|
|
35438
35494
|
autosaveAllowed: hostAutosave !== false,
|
|
35439
35495
|
// Host prop first (an explicit policy), else File > Options > Save >
|
|
@@ -35480,6 +35536,12 @@ ${url}`)
|
|
|
35480
35536
|
onZoomChange,
|
|
35481
35537
|
onSelectionChange,
|
|
35482
35538
|
onSlideCountChange,
|
|
35539
|
+
onAutosave,
|
|
35540
|
+
onAutosaveStatus,
|
|
35541
|
+
onAutosaveRecovery,
|
|
35542
|
+
onPropertiesChange,
|
|
35543
|
+
onNotesUpdate,
|
|
35544
|
+
onPresentationChange,
|
|
35483
35545
|
customizationApi: custom.api,
|
|
35484
35546
|
customization: customizationResolved
|
|
35485
35547
|
});
|
|
@@ -35562,22 +35624,26 @@ ${url}`)
|
|
|
35562
35624
|
const afterSuccessfulSave = (format) => {
|
|
35563
35625
|
playFeedbackSound(viewerOptions);
|
|
35564
35626
|
if (format === "pptx" && filePath && shouldDiscardAutosaveOnSuccessfulSave(viewerOptions)) {
|
|
35565
|
-
void deleteAutosaveSnapshot(filePath).catch(() => {
|
|
35627
|
+
void deleteAutosaveSnapshot(filePath, storage).catch(() => {
|
|
35566
35628
|
});
|
|
35567
35629
|
}
|
|
35568
35630
|
};
|
|
35569
|
-
const handleSaveAsFormat = async (format) => {
|
|
35570
|
-
await rawExportHandlers.handleSaveAsFormat(format)
|
|
35631
|
+
const handleSaveAsFormat = async (format, reason = "saveAs") => {
|
|
35632
|
+
if (await rawExportHandlers.handleSaveAsFormat(format, reason) === false) {
|
|
35633
|
+
return false;
|
|
35634
|
+
}
|
|
35571
35635
|
afterSuccessfulSave(format);
|
|
35636
|
+
return true;
|
|
35572
35637
|
};
|
|
35573
35638
|
return {
|
|
35574
35639
|
...rawExportHandlers,
|
|
35575
35640
|
handleSaveAsFormat,
|
|
35641
|
+
handleSave: () => void handleSaveAsFormat("pptx", "save"),
|
|
35576
35642
|
handleSaveAsPptx: () => void handleSaveAsFormat("pptx"),
|
|
35577
35643
|
handleSaveAsPpsx: () => void handleSaveAsFormat("ppsx"),
|
|
35578
35644
|
handleSaveAsPptm: () => void handleSaveAsFormat("pptm")
|
|
35579
35645
|
};
|
|
35580
|
-
}, [rawExportHandlers, viewerOptions, filePath]);
|
|
35646
|
+
}, [rawExportHandlers, viewerOptions, filePath, storage]);
|
|
35581
35647
|
setExitModeHandler(handleSetMode);
|
|
35582
35648
|
const handleTemplateElementsChanged = useCallback(
|
|
35583
35649
|
(slideId, elements) => {
|
|
@@ -35653,7 +35719,12 @@ ${url}`)
|
|
|
35653
35719
|
setSections: state.setSections,
|
|
35654
35720
|
setPresentationProperties: state.setPresentationProperties,
|
|
35655
35721
|
setCustomProperties: state.setCustomProperties,
|
|
35656
|
-
setCoreProperties:
|
|
35722
|
+
setCoreProperties: (properties) => {
|
|
35723
|
+
state.setCoreProperties(properties);
|
|
35724
|
+
if (properties) {
|
|
35725
|
+
onPropertiesChange?.(properties);
|
|
35726
|
+
}
|
|
35727
|
+
},
|
|
35657
35728
|
setAppProperties: state.setAppProperties,
|
|
35658
35729
|
setViewProperties: state.setViewProperties,
|
|
35659
35730
|
setTableStyleMap: state.setTableStyleMap,
|
|
@@ -35749,7 +35820,8 @@ ${url}`)
|
|
|
35749
35820
|
autosaveToggleAvailable: autosaveActivation.toggleAvailable,
|
|
35750
35821
|
onToggleAutosave: () => {
|
|
35751
35822
|
if (autosaveActivation.toggleAvailable) {
|
|
35752
|
-
setAutosaveEnabled(
|
|
35823
|
+
setAutosaveEnabled(!autosaveEnabled);
|
|
35824
|
+
onAutosaveToggle?.(!autosaveEnabled);
|
|
35753
35825
|
}
|
|
35754
35826
|
},
|
|
35755
35827
|
hiddenActions,
|
|
@@ -35963,7 +36035,7 @@ ${url}`)
|
|
|
35963
36035
|
onRibbonTabHiddenChange: (tabId, hidden) => optionsStore.setRibbonTabHidden(tabId, hidden),
|
|
35964
36036
|
onQuickAccessCommandsChange: (commandIds) => optionsStore.setQuickAccessCommands(commandIds),
|
|
35965
36037
|
onResetOptions: (group) => optionsStore.reset(group),
|
|
35966
|
-
onClearCache:
|
|
36038
|
+
onClearCache: handleClearOptionsCache,
|
|
35967
36039
|
addinStatus,
|
|
35968
36040
|
themeKey,
|
|
35969
36041
|
availableThemes: themeCatalog,
|
|
@@ -36091,14 +36163,20 @@ ${url}`)
|
|
|
36091
36163
|
// Nothing previously provided it, so every one of those consumers was
|
|
36092
36164
|
// silently reading `DEFAULT_VIEWER_OPTIONS` forever, no matter what
|
|
36093
36165
|
// the user changed in the Options dialog.
|
|
36094
|
-
/* @__PURE__ */ jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsx(ViewerRegionBaseContext.Provider, { value: regionBase, children: /* @__PURE__ */ jsx(RibbonAddInsContext.Provider, { value: ribbonAddIns ?? NO_RIBBON_ADD_INS, children: /* @__PURE__ */ jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsx(Rendering3DFlagsContext.Provider, { value: effective3D, children: /* @__PURE__ */ jsx(ViewerThemeProvider, { theme: effectiveTheme, children: /* @__PURE__ */ jsxs(
|
|
36166
|
+
/* @__PURE__ */ jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsx(ViewerStorageContext.Provider, { value: storage, children: /* @__PURE__ */ jsx(ViewerRegionBaseContext.Provider, { value: regionBase, children: /* @__PURE__ */ jsx(RibbonAddInsContext.Provider, { value: ribbonAddIns ?? NO_RIBBON_ADD_INS, children: /* @__PURE__ */ jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsx(Rendering3DFlagsContext.Provider, { value: effective3D, children: /* @__PURE__ */ jsx(ViewerThemeProvider, { theme: effectiveTheme, children: /* @__PURE__ */ jsxs(
|
|
36095
36167
|
CollaborationProvider,
|
|
36096
36168
|
{
|
|
36097
36169
|
config: collaboration,
|
|
36098
36170
|
canvasWidth: canvasSize.width,
|
|
36099
36171
|
canvasHeight: canvasSize.height,
|
|
36100
36172
|
children: [
|
|
36101
|
-
/* @__PURE__ */ jsx(
|
|
36173
|
+
/* @__PURE__ */ jsx(
|
|
36174
|
+
CollaborationStateReporter,
|
|
36175
|
+
{
|
|
36176
|
+
onChange: onCollaborationChange,
|
|
36177
|
+
onStatus: onCollaborationStatus
|
|
36178
|
+
}
|
|
36179
|
+
),
|
|
36102
36180
|
/* @__PURE__ */ jsx(
|
|
36103
36181
|
CollaborationDocumentSync,
|
|
36104
36182
|
{
|
|
@@ -36145,11 +36223,14 @@ ${url}`)
|
|
|
36145
36223
|
/* @__PURE__ */ jsx(ShapeFormatContext.Provider, { value: shapeFormat, children: /* @__PURE__ */ jsx(RibbonGalleryCommandsContext.Provider, { value: ribbonGalleries, children: /* @__PURE__ */ jsx(ChartFormatContext.Provider, { value: chartFormat, children: viewerContent }) }) })
|
|
36146
36224
|
]
|
|
36147
36225
|
}
|
|
36148
|
-
) }) }) }) }) }) }) })
|
|
36226
|
+
) }) }) }) }) }) }) }) })
|
|
36149
36227
|
);
|
|
36150
36228
|
}
|
|
36151
36229
|
);
|
|
36152
|
-
|
|
36230
|
+
var PowerPointViewer2 = /* @__PURE__ */ withDisplayName(
|
|
36231
|
+
PowerPointViewerComponent,
|
|
36232
|
+
"PowerPointViewer"
|
|
36233
|
+
);
|
|
36153
36234
|
function CollaborationStatusStrip() {
|
|
36154
36235
|
const collab = useCollaboration();
|
|
36155
36236
|
if (!collab) {
|
|
@@ -36165,9 +36246,12 @@ function CollaborationStatusStrip() {
|
|
|
36165
36246
|
);
|
|
36166
36247
|
}
|
|
36167
36248
|
function CollaborationStateReporter({
|
|
36168
|
-
onChange
|
|
36249
|
+
onChange,
|
|
36250
|
+
onStatus
|
|
36169
36251
|
}) {
|
|
36170
|
-
|
|
36252
|
+
const collab = useCollaboration();
|
|
36253
|
+
useCollaborationStateReport(collab, onChange);
|
|
36254
|
+
useReportOnChange(collab?.status ?? "disconnected", onStatus, "disconnected");
|
|
36171
36255
|
return null;
|
|
36172
36256
|
}
|
|
36173
36257
|
function CollaborationDocumentSync({
|
|
@@ -36228,4 +36312,4 @@ function CollaborationFollowLayer({
|
|
|
36228
36312
|
) }) });
|
|
36229
36313
|
}
|
|
36230
36314
|
|
|
36231
|
-
export { CollaborationStatusIndicator, PowerPointViewer, SlideCanvas, SlideTemplateGalleryDialog, SlideTemplatePreview, Toolbar, UserAvatarBar, ViewerThemeProvider, useViewerTheme };
|
|
36315
|
+
export { CollaborationStatusIndicator, PowerPointViewer2 as PowerPointViewer, SlideCanvas, SlideTemplateGalleryDialog, SlideTemplatePreview, Toolbar, UserAvatarBar, ViewerThemeProvider, useViewerTheme };
|