pptx-react-viewer 4.74.0 → 4.76.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/README.md +1 -1
- package/dist/{AiChatPanel-PLQ3NBTK.js → AiChatPanel-4V7QB5Z3.js} +19 -19
- package/dist/AiChatPanel-4V7QB5Z3.js.br +0 -0
- package/dist/AiChatPanel-4V7QB5Z3.js.gz +0 -0
- package/dist/{AiChatPanel-E7CJSTW7.mjs → AiChatPanel-6ML3VLIX.mjs} +1 -1
- package/dist/AiChatPanel-6ML3VLIX.mjs.br +0 -0
- package/dist/AiChatPanel-6ML3VLIX.mjs.gz +0 -0
- package/dist/ai.js +2 -2
- package/dist/ai.js.br +0 -0
- package/dist/ai.js.gz +0 -0
- package/dist/ai.mjs +1 -1
- package/dist/ai.mjs.br +0 -0
- package/dist/ai.mjs.gz +0 -0
- package/dist/{chunk-P2COO2QO.js → chunk-6GFSF2ML.js} +65 -13
- package/dist/chunk-6GFSF2ML.js.br +0 -0
- package/dist/chunk-6GFSF2ML.js.gz +0 -0
- package/dist/chunk-FFTZYNL4.mjs +2 -0
- package/dist/chunk-FFTZYNL4.mjs.br +6 -0
- package/dist/chunk-FFTZYNL4.mjs.gz +0 -0
- package/dist/chunk-LWGPHJHC.js +151 -0
- package/dist/chunk-LWGPHJHC.js.br +0 -0
- package/dist/chunk-LWGPHJHC.js.gz +0 -0
- package/dist/{chunk-LVEFHZ76.js → chunk-MU3BIZ2U.js} +1 -1
- package/dist/chunk-MU3BIZ2U.js.br +0 -0
- package/dist/chunk-MU3BIZ2U.js.gz +0 -0
- package/dist/{chunk-FBSPQYRE.mjs → chunk-N3YK2BCA.mjs} +61 -14
- package/dist/chunk-N3YK2BCA.mjs.br +0 -0
- package/dist/chunk-N3YK2BCA.mjs.gz +0 -0
- package/dist/{chunk-SQ7OASDY.mjs → chunk-OC4RP2CB.mjs} +590 -392
- package/dist/chunk-OC4RP2CB.mjs.br +0 -0
- package/dist/chunk-OC4RP2CB.mjs.gz +0 -0
- package/dist/chunk-P2IEKYVG.js +29 -0
- package/dist/chunk-P2IEKYVG.js.br +0 -0
- package/dist/chunk-P2IEKYVG.js.gz +0 -0
- package/dist/{chunk-CRC3V4UG.mjs → chunk-PPOGAZ53.mjs} +646 -263
- package/dist/chunk-PPOGAZ53.mjs.br +0 -0
- package/dist/chunk-PPOGAZ53.mjs.gz +0 -0
- package/dist/{chunk-JZE6BORE.mjs → chunk-RMEWSJZU.mjs} +1 -1
- package/dist/chunk-RMEWSJZU.mjs.br +0 -0
- package/dist/chunk-RMEWSJZU.mjs.gz +0 -0
- package/dist/{chunk-XG4WSJ4O.js → chunk-SEIVQGH5.js} +1632 -1240
- package/dist/chunk-SEIVQGH5.js.br +0 -0
- package/dist/chunk-SEIVQGH5.js.gz +0 -0
- package/dist/{chunk-D4WC35PL.js → chunk-XTYBIJ2S.js} +1136 -939
- package/dist/chunk-XTYBIJ2S.js.br +0 -0
- package/dist/chunk-XTYBIJ2S.js.gz +0 -0
- package/dist/chunk-Y53EC3JU.mjs +27 -0
- package/dist/chunk-Y53EC3JU.mjs.br +0 -0
- package/dist/chunk-Y53EC3JU.mjs.gz +0 -0
- package/dist/i18n/de.cjs +5 -0
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +5 -0
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +5 -0
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +5 -0
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +5 -0
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +5 -0
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +5 -0
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +5 -0
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/index.d.ts +76 -26
- package/dist/index.js +126 -126
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +52 -24
- package/dist/internals.js +82 -81
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -2
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/no-i18next.d.ts +1343 -0
- package/dist/no-i18next.js +251 -0
- package/dist/no-i18next.js.br +0 -0
- package/dist/no-i18next.js.gz +0 -0
- package/dist/no-i18next.mjs +6 -0
- package/dist/no-i18next.mjs.br +0 -0
- package/dist/no-i18next.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.d.ts +37 -18
- package/dist/viewer/index.js +25 -24
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +9 -4
- package/dist/AiChatPanel-E7CJSTW7.mjs.br +0 -0
- package/dist/AiChatPanel-E7CJSTW7.mjs.gz +0 -0
- package/dist/AiChatPanel-PLQ3NBTK.js.br +0 -0
- package/dist/AiChatPanel-PLQ3NBTK.js.gz +0 -0
- package/dist/chunk-CRC3V4UG.mjs.br +0 -0
- package/dist/chunk-CRC3V4UG.mjs.gz +0 -0
- package/dist/chunk-D4WC35PL.js.br +0 -0
- package/dist/chunk-D4WC35PL.js.gz +0 -0
- package/dist/chunk-FBSPQYRE.mjs.br +0 -0
- package/dist/chunk-FBSPQYRE.mjs.gz +0 -0
- package/dist/chunk-JZE6BORE.mjs.br +0 -0
- package/dist/chunk-JZE6BORE.mjs.gz +0 -0
- package/dist/chunk-LVEFHZ76.js.br +0 -0
- package/dist/chunk-LVEFHZ76.js.gz +0 -0
- package/dist/chunk-P2COO2QO.js.br +0 -0
- package/dist/chunk-P2COO2QO.js.gz +0 -0
- package/dist/chunk-SQ7OASDY.mjs.br +0 -0
- package/dist/chunk-SQ7OASDY.mjs.gz +0 -0
- package/dist/chunk-XG4WSJ4O.js.br +0 -0
- package/dist/chunk-XG4WSJ4O.js.gz +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { aiAssistants, AiChatPanelLazy } from './chunk-
|
|
2
|
-
import { useCollaboration, useVirtualizedSlides, StaticElementRenderer, useModalDismissDrag, useToolbarVisibility, useViewerOptionsContext, InlineCollaborationContext, SlideBackgroundImageLayer, ElementRenderer, withDisplayName, ResizeHandles, imgSrc, renderStrokeView, useChartFormatContext,
|
|
3
|
-
import { useTranslation, DEFAULT_SECTION_GROUP_ID, cn, getShapeAdjustmentHandleDescriptors, isConnectorOrLineElement,
|
|
4
|
-
import { ANIMATION_DIRECTION_LABEL_KEYS, buildQuickStylesGallery, editorThumbnailWidth, EDITOR_THUMBNAIL_WIDTH, buildSlideTemplateContent, SLIDE_TEMPLATES, homeLaunchers, attachRibbonOverflow, isPanelVisible, resolveStageEdgeBleeds, parentSelection, slideSpaceElement, isGroupMember, motionPathFor, setMotionPath, RULER_THICKNESS, shouldShowElementHandles, deviceStrokeStageStyle, slideThumbnailLayout, buildPreviewElements, deriveSlideFieldContext, slideThumbnailTransitionBadge, slideThumbnailTransitionBadgeStyle, editorThumbnailStep, resolveSlidePaneClick, SLIDE_VIRTUALIZATION_THRESHOLD, buildSectionContextMenuEntries, buildSlidePaneContextMenuEntries, slidePaneViewItems, activateModalFocus, visibleContextualTabs, resolveActiveRibbonTab, visibleRibbonAddIns, isDialogAvailable, resolveReadOnlyBadge, READ_ONLY_BADGE_ATTR, resolveScreenTip, RIBBON_ADD_IN_TAB_ATTR, contextualTabLabelKey, RIBBON_CONTEXTUAL_TAB_ATTR, buildTabRowActionsState, isFeatureEnabled, TAB_ROW_ACTION_CLASSES, tabRowActionsAttributes, buildTitleBarState, backstageNavEntries, BACKSTAGE_NAV, openPlacesLabels, listBackstageRecentFiles, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, CLOUD_OPEN_ACCEPT, 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, sectionAddAfterSlideIndex, EMPTY_RESOLVED_CUSTOMIZATION, getRegionRenderer, formatBackstageDate, formatBackstageSize, ViewerRegionHost, BACKSTAGE_TEMPLATES, customizeBackstageCards, backstageCardsFor, connectedServicesLabels, DEFAULT_VIEWER_PROFILE, readStoredViewerPrefs, 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, createCloudDocumentController, resolveCloudDocumentView, createSaveProgressController, resolveCollaborationConfig, resolveViewerRootOptions, installSvgIdScope, buildUserFontFaceStyles, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, isEditingAllowed, resolveAutosaveActivation, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, attachViewerHyperlinks, shouldConfirmExternalHyperlink, confirmExternalHyperlinkDialog, applyAutoCorrectToEdit, resolveImageResolutionScale, resolveEffectiveGoogleFonts, resolveAllowExternalContent, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, saveFailureMessage, withSaveFailureToast, createSlidePackageClipboard, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, RIBBON_SCOPE_ATTR, resolve3DRenderingFlags, resolveSlideSizeSelection, hiddenSlideCue, editorThumbnailHeight, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, MIN_TOUCH_TARGET_PX, getLocalStorageUsageSummary, saveViewerProfile, confirmDeleteDialog, 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, themeToCssVars, createCustomizationController, resolveEffectiveHiddenActions, pruneExpiredAutosaveSnapshots, createDeckStyleHost, galleryDeckView, tableLayoutCells, commitsThroughDeckStyle, resetChartFormatTarget, savedPresentationRevision, isCleanAfterSave, masterViewCrudActions, promptNameDialog, applyMasterViewCrudAction, masterViewCrudFailureKey, forgetStepsUsingRemovedParts, EDITOR_CHROME_CSS, ribbonCustomizationCss, applyMotionPathPreset, resetSlideLayoutPath, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, shouldDiscardAutosaveOnSuccessfulSave, deleteAutosaveSnapshot, dispatchReadOnlyBannerIntent, readOnlyBannerState, 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, updateSubtitleSettings, overlayPointerInput, pushRecentColor, mruColorsPatch, shouldClearAutosaveCacheOnClose, clearAutosaveSnapshots, canCropElement, cropSessionChanged, cancelCropUpdate, startCropSession, masterViewBackgroundColor, openExternalHyperlinkConfirmed, resolvePresentationAction, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, resolveEditPointsAvailability, isCurrentLayout, EXPANDED_MAX_HEIGHT, statusBarState, statusBarViewMode, saveProgressStatus, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, createCustomShowsController, resolveDefaultPrintSettings, HANDOUT_OPTIONS, effectiveOrientation, computeSlideCount, estimatePageCount, computeSlideIndices, 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, cropModeKeyAction, isEditPointsEnabled, findReplacementAvailability, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, transitionTemplateElements, 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, dispatchStatusBarIntent, toggleSheet, describeElementChange, 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, masterViewPseudoSlide, PRESENTATION_ANIM_TRIGGER_ATTRIBUTE, computeAnchoredPopupPosition, applyTableStyleDelete, applyTableStyleMapChange, registerCustomFont, QUICK_ACCESS_COMMAND_CATALOG, handleReadingViewKey, visibleTemplateElements, MERGE_SHAPES_MENU_ITEMS, hasMultipleSelectedTableCells, isElementLocked, ELEMENT_GEOMETRY_SECTIONS, mergeSlideTransition, slideBackgroundClearState, slideBackgroundClearPatch, effectiveDirection, TRIGGER_OPTIONS, effectiveTimingCurve, getAfterAnimationState, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, elementLockTogglePatch, resolveInspectorSections, inspectorTogglePatch, buildTableDataGrid, getDenseGridLayoutPlan, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, applyTableStylePreset, tableStyleAssignmentUpdate, evenColumnWidths, redistributeColumnWidth, evenRowHeights, inspectorNumber, patchChartData, collapseChartTitleRunsForEdit, chartGridlinesState, chartGridlinesPatch, seriesSecondaryAxisPatch, setDataLabelsRangeCache, imageResetPatch, imageResetState, canInteractWithElement, buildOleObjectNamePatch, strokeColorChange, 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, inspectorFieldPatch, 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, rebuildDrawingShapesIfCleared, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, cropResetState, cropResetPatch, ARTISTIC_EFFECTS, mediaTrimEndSeconds, trimmedMediaDurationMs, mediaTrimEndAbsoluteMs, mediaTrimResetState, mediaTrimEndMsFromAbsoluteMs, mediaTrimResetPatch, buildOleEditDialogDescriptor, buildOleContentUpdatePatch, applyTextStyleUpdate, buildThemeColorSwatchGrid, themeColorGridView, recentColorsGridView, 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, mediaTrimEndMsFromSeconds, validateMediaTrimRange, OFFICE_COLOR_SWATCHES, officeColorSwatchLabel, PATTERN_PRESET_OPTIONS as PATTERN_PRESET_OPTIONS$1, SHAPE_LINE_SECTIONS, shapeQuickStylePatch, SHAPE_EFFECT_SECTIONS, createLiveColorInput, themeColorGridCommit, TEXT_BOX_SECTIONS, 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, quickStyleShapeStyle, textWarpStyle, toggleText3dExtrusion, BEVEL_PRESETS, cropFit, cropFill, cropToAspectRatio } from 'ooxml-ui/pptx';
|
|
1
|
+
import { aiAssistants, AiChatPanelLazy } from './chunk-RMEWSJZU.mjs';
|
|
2
|
+
import { ElementRenderErrorReportingContext, useCollaboration, useVirtualizedSlides, StaticElementRenderer, useModalDismissDrag, useToolbarVisibility, useViewerOptionsContext, useController, InlineCollaborationContext, SlideBackgroundImageLayer, ElementRenderer, withDisplayName, ResizeHandles, imgSrc, renderStrokeView, useChartFormatContext, useViewerOptions, useReadOnlyRecommendationState, useCompatibilityToastsState, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useClearSelectionOnSlideChange, useEditorOperations, useViewerIntegration, useViewPreferencesSync, useLayoutSwitching, Rendering3DFlagsContext, CollaborationProvider, ChartFormatContext, useSheetDismissDrag, playAnimationSound, ViewerOptionsStoreContext, scopeLayoutOptionsToActiveSlide, createReviewCommentsHost, ChartPartSelectionProvider, useKeyboardInsets, ViewerOptionsContext, useReportOnChange, useCollaborationDocumentSync, useFollowMode, useBroadcastFollower, useSwipeNavigation, RemoteSelectionOverlay, CollaborationCursorOverlay, detectHyperlinkTargetType, parseHyperlinkEmailUrl, parseHyperlinkSlideNumber, PresentationTransitionOverlay, downloadBlob, useChartPartSelection, resolveSmartArtDataPalette, DUOTONE_PRESETS, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES } from './chunk-PPOGAZ53.mjs';
|
|
3
|
+
import { useTranslation, DEFAULT_SECTION_GROUP_ID, cn, getShapeAdjustmentHandleDescriptors, isConnectorOrLineElement, SLIDE_NAV_THUMBNAIL_WIDTH, TOOLBAR_SECTIONS, GRID_SIZE, getElementTransformWithoutRotation, getElementTransform, MIN_ELEMENT_SIZE, UNGROUPED_SECTION_ID, registeredHostI18next, PptxI18nContext, ViewerLocaleControlsContext, hasCopyableFormat, ViewerI18nContext, useRegisteredHostI18next, hostInstanceLanguage, BUILT_IN_ENGLISH, isPpactionUrl, parsePpactionUrl, SHORTCUT_REFERENCE_ITEMS, safeOpenUrl, isUrlSafe, computeHandoutLayout, getPrintableArea, generateNoteLineCount, normalizeHexColor, getElementLabel, TABLE_STYLE_PRESETS, SHAPE_PRESETS, sanitizeGradientStops, SLIDE_TRANSITION_OPTIONS, formatCommentTimestamp, ANIMATION_PRESET_OPTIONS, clampCropValue, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, DEFAULT_FILL_COLOR, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, getPatternSvg, DEFAULT_STROKE_COLOR, openNativeEyeDropper } from './chunk-N3YK2BCA.mjs';
|
|
4
|
+
import { ANIMATION_DIRECTION_LABEL_KEYS, buildQuickStylesGallery, editorThumbnailWidth, EDITOR_THUMBNAIL_WIDTH, buildSlideTemplateContent, SLIDE_TEMPLATES, homeLaunchers, attachRibbonOverflow, isPanelVisible, resolveStageEdgeBleeds, parentSelection, slideSpaceElement, isGroupMember, motionPathFor, setMotionPath, RULER_THICKNESS, shouldShowElementHandles, deviceStrokeStageStyle, slideThumbnailLayout, buildPreviewElements, deriveSlideFieldContext, slideThumbnailTransitionBadge, slideThumbnailTransitionBadgeStyle, editorThumbnailStep, resolveSlidePaneClick, SLIDE_VIRTUALIZATION_THRESHOLD, buildSectionContextMenuEntries, buildSlidePaneContextMenuEntries, slidePaneViewItems, activateModalFocus, visibleContextualTabs, resolveActiveRibbonTab, visibleRibbonAddIns, createRibbonDisplayController, RIBBON_DISPLAY_REVEAL_LABEL_KEY, isDialogAvailable, resolveReadOnlyBadge, READ_ONLY_BADGE_ATTR, resolveScreenTip, RIBBON_ADD_IN_TAB_ATTR, contextualTabLabelKey, RIBBON_CONTEXTUAL_TAB_ATTR, buildTabRowActionsState, isFeatureEnabled, TAB_ROW_ACTION_CLASSES, tabRowActionsAttributes, RIBBON_DISPLAY_OPTIONS_LABEL_KEY, buildTitleBarState, backstageNavEntries, BACKSTAGE_NAV, openPlacesLabels, listBackstageRecentFiles, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, CLOUD_OPEN_ACCEPT, 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, sectionAddAfterSlideIndex, EMPTY_RESOLVED_CUSTOMIZATION, getRegionRenderer, formatBackstageDate, formatBackstageSize, ViewerRegionHost, BACKSTAGE_TEMPLATES, customizeBackstageCards, backstageCardsFor, connectedServicesLabels, DEFAULT_VIEWER_PROFILE, readStoredViewerPrefs, 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, createCloudDocumentController, resolveCloudDocumentView, createSaveProgressController, resolveCollaborationConfig, resolveViewerRootOptions, installSvgIdScope, buildUserFontFaceStyles, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, isEditingAllowed, resolveAutosaveActivation, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, attachViewerHyperlinks, shouldConfirmExternalHyperlink, confirmExternalHyperlinkDialog, applyAutoCorrectToEdit, resolveImageResolutionScale, resolveEffectiveGoogleFonts, resolveAllowExternalContent, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, saveFailureMessage, withSaveFailureToast, shouldDiscardAutosaveOnSuccessfulSave, deleteAutosaveSnapshot, createSlidePackageClipboard, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, RIBBON_SCOPE_ATTR, resolve3DRenderingFlags, resolveSlideSizeSelection, hiddenSlideCue, editorThumbnailHeight, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, MIN_TOUCH_TARGET_PX, getLocalStorageUsageSummary, saveViewerProfile, confirmDeleteDialog, 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, themeToCssVars, createCustomizationController, resolveEffectiveHiddenActions, RIBBON_AUTO_COLLAPSE_MEDIA, pruneExpiredAutosaveSnapshots, createDeckStyleHost, galleryDeckView, tableLayoutCells, commitsThroughDeckStyle, resetChartFormatTarget, savedPresentationRevision, isCleanAfterSave, masterViewCrudActions, promptNameDialog, applyMasterViewCrudAction, masterViewCrudFailureKey, forgetStepsUsingRemovedParts, EDITOR_CHROME_CSS, ribbonCustomizationCss, applyMotionPathPreset, resetSlideLayoutPath, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, dispatchReadOnlyBannerIntent, readOnlyBannerState, 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, updateSubtitleSettings, overlayPointerInput, pushRecentColor, mruColorsPatch, shouldClearAutosaveCacheOnClose, clearAutosaveSnapshots, canCropElement, cropSessionChanged, cancelCropUpdate, startCropSession, masterViewBackgroundColor, openExternalHyperlinkConfirmed, resolvePresentationAction, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, resolveEditPointsAvailability, isCurrentLayout, EXPANDED_MAX_HEIGHT, statusBarState, statusBarViewMode, saveProgressStatus, formatVersionTimestamp, formatRelativeTime, getPasswordStrength, validatePasswordPair, documentPropertiesChanged, appPropertiesChanged, scanAvailableFontFamilies, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, HYPERLINK_ACTION_VERB_MAP, applySlideShowSettingsPatch, createCustomShowsController, resolveDefaultPrintSettings, HANDOUT_OPTIONS, effectiveOrientation, computeSlideCount, estimatePageCount, computeSlideIndices, 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, cropModeKeyAction, isEditPointsEnabled, findReplacementAvailability, transitionTemplateElements, 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, dispatchStatusBarIntent, toggleSheet, describeElementChange, 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, masterViewPseudoSlide, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, computeAnchoredPopupPosition, applyTableStyleDelete, applyTableStyleMapChange, registerCustomFont, QUICK_ACCESS_COMMAND_CATALOG, handleReadingViewKey, visibleTemplateElements, PRESENTATION_ANIM_TRIGGER_ATTRIBUTE, MERGE_SHAPES_MENU_ITEMS, hasMultipleSelectedTableCells, isElementLocked, ELEMENT_GEOMETRY_SECTIONS, mergeSlideTransition, slideBackgroundClearState, slideBackgroundClearPatch, effectiveDirection, TRIGGER_OPTIONS, effectiveTimingCurve, getAfterAnimationState, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, elementLockTogglePatch, resolveInspectorSections, inspectorTogglePatch, buildTableDataGrid, getDenseGridLayoutPlan, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, applyTableStylePreset, tableStyleAssignmentUpdate, evenColumnWidths, redistributeColumnWidth, evenRowHeights, inspectorNumber, patchChartData, collapseChartTitleRunsForEdit, chartGridlinesState, chartGridlinesPatch, seriesSecondaryAxisPatch, setDataLabelsRangeCache, imageResetPatch, imageResetState, canInteractWithElement, buildOleObjectNamePatch, strokeColorChange, 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, inspectorFieldPatch, 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, rebuildDrawingShapesIfCleared, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, cropResetState, cropResetPatch, ARTISTIC_EFFECTS, mediaTrimEndSeconds, trimmedMediaDurationMs, mediaTrimEndAbsoluteMs, mediaTrimResetState, mediaTrimEndMsFromAbsoluteMs, mediaTrimResetPatch, buildOleEditDialogDescriptor, buildOleContentUpdatePatch, applyTextStyleUpdate, buildThemeColorSwatchGrid, themeColorGridView, recentColorsGridView, 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, mediaTrimEndMsFromSeconds, validateMediaTrimRange, OFFICE_COLOR_SWATCHES, officeColorSwatchLabel, PATTERN_PRESET_OPTIONS as PATTERN_PRESET_OPTIONS$1, SHAPE_LINE_SECTIONS, shapeQuickStylePatch, SHAPE_EFFECT_SECTIONS, createLiveColorInput, themeColorGridCommit, TEXT_BOX_SECTIONS, 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, quickStyleShapeStyle, textWarpStyle, toggleText3dExtrusion, BEVEL_PRESETS, cropFit, cropFill, cropToAspectRatio } from 'ooxml-ui/pptx';
|
|
5
5
|
export { THEME_CATALOG, defaultCssVars, defaultRadius, defaultThemeColors, resolveThemeCatalogEntry, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius } from 'ooxml-ui/pptx';
|
|
6
|
-
import React108, { createContext, useContext,
|
|
6
|
+
import React108, { createContext, useContext, useMemo, useRef, useCallback, useEffect, useState, Fragment as Fragment$1, useLayoutEffect, forwardRef, useSyncExternalStore, useReducer, useId, useDeferredValue } from 'react';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { LuArrowDown, LuArrowUp, LuArrowRight, LuArrowLeft, LuArrowDownRight, LuArrowDownLeft, LuArrowUpRight, LuArrowUpLeft, LuPlus, LuX, LuPanelLeft, LuPanelRight, LuSparkles, LuSettings, LuFolderOpen, LuType, LuPalette, LuFilter, LuPaintbrush, LuChevronDown, 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, LuMessageSquare, LuEyeOff, LuChevronRight, LuMonitor, LuClock, LuRadio, LuCaptions, LuCheck, LuImage, LuSearch, LuHistory, LuCalendarDays, LuHash, LuText, LuCast, LuShieldCheck, LuPanelLeftClose, LuTrash2, LuEye, LuLoader, LuSignature, LuTriangleAlert, LuPenTool, LuWifi, LuWifiOff, LuUsers, LuMinus, LuChevronLeft, LuPause, LuCaseSensitive, LuChevronUp, LuReplace, LuGripVertical, LuGrid2X2, LuStickyNote, LuList, LuBug, LuMove, LuCopyPlus, LuClipboardPaste, LuLayers, LuSettings2, LuLockOpen, LuPencil, LuReply, LuMoveRight, LuRotateCw, LuScissors, LuBookmark, LuPipette } from 'react-icons/lu';
|
|
9
9
|
import { createPortal } from 'react-dom';
|
|
10
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, applyOleSheetCellEdit, getOleSheetGrid, applyOleDocumentParagraphEdit, getOleDocumentParagraphs, applyOleNestedDeckElementTextEdit, getOleNestedDeckDetail, replaceOleFile, elementActionToPptxAction, createTableStyleEntry, addTableStyleToMap, deleteTableStyleFromMap, SWITCHABLE_LAYOUT_TYPES } from 'ooxml-core/pptx';
|
|
11
11
|
import { createPptxAiPanelController, computeFocusTargets, createPptxAiBridge, resolveAiEffectiveTargets, aiChangeAnimationCss, changeGhostStyle, createChatHistoryStore, collectStoredChats, exportAiChatLogs as exportAiChatLogs$1 } from 'ooxml-ui/pptx/ai/host';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { normalizeLocale } from 'ooxml-core/i18n';
|
|
13
|
+
import { LOCALE_CATALOG } from 'ooxml-ui/pptx/i18n';
|
|
14
14
|
|
|
15
15
|
var ViewerThemeContext = /* @__PURE__ */ createContext(void 0);
|
|
16
16
|
function ViewerThemeProvider({ theme, children }) {
|
|
@@ -46,7 +46,8 @@ function SlideThumbnailImpl({
|
|
|
46
46
|
canvasSize,
|
|
47
47
|
previewWidth,
|
|
48
48
|
fieldContext,
|
|
49
|
-
tableStyleContext
|
|
49
|
+
tableStyleContext,
|
|
50
|
+
onElementRenderError
|
|
50
51
|
}) {
|
|
51
52
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
52
53
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
@@ -93,7 +94,8 @@ function SlideThumbnailImpl({
|
|
|
93
94
|
allSlides: [slide],
|
|
94
95
|
zIndex: index,
|
|
95
96
|
fieldContext: slideFieldContext,
|
|
96
|
-
tableStyleContext
|
|
97
|
+
tableStyleContext,
|
|
98
|
+
onElementRenderError
|
|
97
99
|
},
|
|
98
100
|
element.id
|
|
99
101
|
))
|
|
@@ -114,6 +116,9 @@ function SlideThumbnailImpl({
|
|
|
114
116
|
);
|
|
115
117
|
}
|
|
116
118
|
function slideThumbnailPropsEqual(prev, next) {
|
|
119
|
+
if (prev.onElementRenderError !== next.onElementRenderError) {
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
117
122
|
if (prev.previewWidth !== next.previewWidth) {
|
|
118
123
|
return false;
|
|
119
124
|
}
|
|
@@ -986,7 +991,14 @@ function useSlidePaneCallbacks(onMoveSlide, onRenameSection, onToggleSectionColl
|
|
|
986
991
|
}
|
|
987
992
|
var EMPTY_TEMPLATE_ELEMENTS = [];
|
|
988
993
|
var VIRTUALIZATION_THRESHOLD = SLIDE_VIRTUALIZATION_THRESHOLD;
|
|
989
|
-
function SlidesPaneSidebar({
|
|
994
|
+
function SlidesPaneSidebar(props) {
|
|
995
|
+
const errorReporting = useMemo(
|
|
996
|
+
() => ({ onElementRenderError: props.onElementRenderError }),
|
|
997
|
+
[props.onElementRenderError]
|
|
998
|
+
);
|
|
999
|
+
return /* @__PURE__ */ jsx(ElementRenderErrorReportingContext.Provider, { value: errorReporting, children: /* @__PURE__ */ jsx(SlidesPaneSidebarContent, { ...props }) });
|
|
1000
|
+
}
|
|
1001
|
+
function SlidesPaneSidebarContent({
|
|
990
1002
|
slides,
|
|
991
1003
|
templateElementsBySlideId,
|
|
992
1004
|
activeSlideIndex,
|
|
@@ -1356,7 +1368,8 @@ var PREVIEW_SCALE = PREVIEW_TILE_WIDTH / PREVIEW_CANVAS_WIDTH;
|
|
|
1356
1368
|
var PREVIEW_TILE_HEIGHT = Math.round(PREVIEW_CANVAS_HEIGHT * PREVIEW_SCALE);
|
|
1357
1369
|
function SlideTemplatePreview({
|
|
1358
1370
|
templateId,
|
|
1359
|
-
scheme
|
|
1371
|
+
scheme,
|
|
1372
|
+
onElementRenderError
|
|
1360
1373
|
}) {
|
|
1361
1374
|
const previewSlide = useMemo(() => {
|
|
1362
1375
|
const content = buildSlideTemplateContent(templateId, {
|
|
@@ -1400,7 +1413,8 @@ function SlideTemplatePreview({
|
|
|
1400
1413
|
element,
|
|
1401
1414
|
activeSlide: previewSlide,
|
|
1402
1415
|
allSlides: [previewSlide],
|
|
1403
|
-
zIndex: index
|
|
1416
|
+
zIndex: index,
|
|
1417
|
+
onElementRenderError
|
|
1404
1418
|
},
|
|
1405
1419
|
element.id
|
|
1406
1420
|
))
|
|
@@ -1584,6 +1598,60 @@ function SlideTemplateGalleryDialog({
|
|
|
1584
1598
|
)
|
|
1585
1599
|
] });
|
|
1586
1600
|
}
|
|
1601
|
+
var RIBBON_SURFACE = '[data-pptx-chrome="ribbon"], [data-pptx-chrome="ribbon-reveal"]';
|
|
1602
|
+
var RIBBON_MENU_SURFACE = '[data-pptx-chrome="ribbon-display-options"], [data-pptx-chrome="ribbon-display-menu"]';
|
|
1603
|
+
function useRibbonDisplayController(input) {
|
|
1604
|
+
const { ribbonDisplay, collapseRibbonAutomatically, rootRef } = input;
|
|
1605
|
+
const onChangeRef = useRef(input.onRibbonDisplayChange);
|
|
1606
|
+
onChangeRef.current = input.onRibbonDisplayChange;
|
|
1607
|
+
const [controller] = useState(
|
|
1608
|
+
() => createRibbonDisplayController({
|
|
1609
|
+
initial: ribbonDisplay,
|
|
1610
|
+
onChange: (mode) => onChangeRef.current?.(mode)
|
|
1611
|
+
})
|
|
1612
|
+
);
|
|
1613
|
+
useEffect(() => {
|
|
1614
|
+
controller.setMode(ribbonDisplay);
|
|
1615
|
+
}, [controller, ribbonDisplay]);
|
|
1616
|
+
useEffect(() => {
|
|
1617
|
+
controller.setAutoCollapse(collapseRibbonAutomatically);
|
|
1618
|
+
}, [controller, collapseRibbonAutomatically]);
|
|
1619
|
+
useEffect(() => {
|
|
1620
|
+
const query = globalThis.matchMedia?.(RIBBON_AUTO_COLLAPSE_MEDIA);
|
|
1621
|
+
const sync = () => controller.setShortViewport(query?.matches ?? false);
|
|
1622
|
+
sync();
|
|
1623
|
+
query?.addEventListener("change", sync);
|
|
1624
|
+
return () => query?.removeEventListener("change", sync);
|
|
1625
|
+
}, [controller]);
|
|
1626
|
+
useEffect(() => {
|
|
1627
|
+
const onPointerDown = (event) => {
|
|
1628
|
+
const target = event.target instanceof Element ? event.target : null;
|
|
1629
|
+
if (!target?.closest(RIBBON_SURFACE)) {
|
|
1630
|
+
controller.dismiss();
|
|
1631
|
+
} else if (!target.closest(RIBBON_MENU_SURFACE)) {
|
|
1632
|
+
controller.setMenuOpen(false);
|
|
1633
|
+
}
|
|
1634
|
+
};
|
|
1635
|
+
const onKeyDown = (event) => {
|
|
1636
|
+
const target = event.target;
|
|
1637
|
+
const root = rootRef.current;
|
|
1638
|
+
if (target === document.body || root && target instanceof Node && root.contains(target)) {
|
|
1639
|
+
controller.handleKeydown(event);
|
|
1640
|
+
}
|
|
1641
|
+
};
|
|
1642
|
+
document.addEventListener("pointerdown", onPointerDown);
|
|
1643
|
+
document.addEventListener("keydown", onKeyDown);
|
|
1644
|
+
return () => {
|
|
1645
|
+
document.removeEventListener("pointerdown", onPointerDown);
|
|
1646
|
+
document.removeEventListener("keydown", onKeyDown);
|
|
1647
|
+
};
|
|
1648
|
+
}, [controller, rootRef]);
|
|
1649
|
+
return controller;
|
|
1650
|
+
}
|
|
1651
|
+
function useRibbonDisplayFallback(controller) {
|
|
1652
|
+
const [own] = useState(() => createRibbonDisplayController());
|
|
1653
|
+
return controller ?? own;
|
|
1654
|
+
}
|
|
1587
1655
|
function useHostEvent(ref, type, handler) {
|
|
1588
1656
|
useEffect(() => {
|
|
1589
1657
|
const host = ref.current;
|
|
@@ -2827,7 +2895,7 @@ function AccountPage() {
|
|
|
2827
2895
|
refreshUsage();
|
|
2828
2896
|
setTimeout(() => setCleared(false), 4e3);
|
|
2829
2897
|
};
|
|
2830
|
-
const version = "4.
|
|
2898
|
+
const version = "4.76.0" ;
|
|
2831
2899
|
return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
2832
2900
|
/* @__PURE__ */ jsxs("section", { className: cardClass, children: [
|
|
2833
2901
|
/* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -4909,6 +4977,111 @@ function RibbonAddInSection({ tab }) {
|
|
|
4909
4977
|
}, [tab]);
|
|
4910
4978
|
return /* @__PURE__ */ jsx("pptx-ui-ribbon-add-in", { ref });
|
|
4911
4979
|
}
|
|
4980
|
+
var RIBBON_PEEK_ROOT_CLASS = 'absolute inset-x-0 top-0 z-[35] border-b border-border bg-background shadow-[0_8px_20px_rgb(0_0_0/0.2)] before:absolute before:inset-0 before:-z-10 before:bg-card before:content-[""]';
|
|
4981
|
+
var RIBBON_OVERLAY_CLASS = 'absolute inset-x-0 top-full z-[35] border-b border-border bg-background shadow-[0_8px_20px_rgb(0_0_0/0.2)] before:absolute before:inset-0 before:-z-10 before:bg-card before:content-[""]';
|
|
4982
|
+
function RibbonRevealStrip({
|
|
4983
|
+
ribbon
|
|
4984
|
+
}) {
|
|
4985
|
+
const { t } = useTranslation();
|
|
4986
|
+
const label = t(RIBBON_DISPLAY_REVEAL_LABEL_KEY);
|
|
4987
|
+
return /* @__PURE__ */ jsx(
|
|
4988
|
+
"button",
|
|
4989
|
+
{
|
|
4990
|
+
type: "button",
|
|
4991
|
+
"data-pptx-chrome": "ribbon-reveal",
|
|
4992
|
+
"aria-label": label,
|
|
4993
|
+
title: label,
|
|
4994
|
+
onClick: () => ribbon.reveal(),
|
|
4995
|
+
className: "flex h-[14px] w-full shrink-0 items-center justify-center border-b border-border bg-card text-[14px] leading-none tracking-[2px] text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
4996
|
+
children: "\xB7\xB7\xB7"
|
|
4997
|
+
}
|
|
4998
|
+
);
|
|
4999
|
+
}
|
|
5000
|
+
function RibbonDisplayButton({
|
|
5001
|
+
ribbon,
|
|
5002
|
+
state
|
|
5003
|
+
}) {
|
|
5004
|
+
const { t } = useTranslation();
|
|
5005
|
+
const label = t(RIBBON_DISPLAY_OPTIONS_LABEL_KEY);
|
|
5006
|
+
return /* @__PURE__ */ jsx(
|
|
5007
|
+
"button",
|
|
5008
|
+
{
|
|
5009
|
+
type: "button",
|
|
5010
|
+
"aria-haspopup": "menu",
|
|
5011
|
+
"aria-expanded": state.menuOpen,
|
|
5012
|
+
"aria-label": label,
|
|
5013
|
+
title: label,
|
|
5014
|
+
"data-pptx-chrome": "ribbon-display-options",
|
|
5015
|
+
onClick: () => ribbon.toggleMenu(),
|
|
5016
|
+
className: cn(
|
|
5017
|
+
"mx-1 inline-flex h-[22px] w-[22px] shrink-0 items-center justify-center rounded-sm text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
5018
|
+
state.menuOpen && "bg-accent text-foreground"
|
|
5019
|
+
),
|
|
5020
|
+
children: /* @__PURE__ */ jsx(
|
|
5021
|
+
"svg",
|
|
5022
|
+
{
|
|
5023
|
+
viewBox: "0 0 16 16",
|
|
5024
|
+
width: "12",
|
|
5025
|
+
height: "12",
|
|
5026
|
+
fill: "none",
|
|
5027
|
+
stroke: "currentColor",
|
|
5028
|
+
strokeWidth: 1.5,
|
|
5029
|
+
strokeLinecap: "round",
|
|
5030
|
+
strokeLinejoin: "round",
|
|
5031
|
+
"aria-hidden": "true",
|
|
5032
|
+
className: cn(state.effectiveMode === "tabs" && "rotate-180"),
|
|
5033
|
+
children: /* @__PURE__ */ jsx("path", { d: "m4 6 4 4 4-4" })
|
|
5034
|
+
}
|
|
5035
|
+
)
|
|
5036
|
+
}
|
|
5037
|
+
);
|
|
5038
|
+
}
|
|
5039
|
+
function RibbonDisplayMenu({
|
|
5040
|
+
ribbon,
|
|
5041
|
+
state
|
|
5042
|
+
}) {
|
|
5043
|
+
const { t } = useTranslation();
|
|
5044
|
+
return /* @__PURE__ */ jsx("div", { className: "relative h-0", children: /* @__PURE__ */ jsx(
|
|
5045
|
+
"div",
|
|
5046
|
+
{
|
|
5047
|
+
role: "menu",
|
|
5048
|
+
"aria-label": t(RIBBON_DISPLAY_OPTIONS_LABEL_KEY),
|
|
5049
|
+
"data-pptx-chrome": "ribbon-display-menu",
|
|
5050
|
+
className: "absolute right-1.5 top-0.5 z-50 flex min-w-[200px] flex-col gap-0.5 rounded-md border border-border bg-popover p-1 text-[12px] shadow-lg",
|
|
5051
|
+
children: state.menu.map((item) => /* @__PURE__ */ jsxs(
|
|
5052
|
+
"button",
|
|
5053
|
+
{
|
|
5054
|
+
type: "button",
|
|
5055
|
+
role: "menuitemradio",
|
|
5056
|
+
"aria-checked": item.checked,
|
|
5057
|
+
"data-ribbon-display": item.mode,
|
|
5058
|
+
onClick: () => ribbon.choose(item.mode),
|
|
5059
|
+
className: "flex w-full items-center gap-2 whitespace-nowrap rounded-sm px-2 py-1.5 text-left text-foreground hover:bg-accent/30",
|
|
5060
|
+
children: [
|
|
5061
|
+
/* @__PURE__ */ jsx(
|
|
5062
|
+
"svg",
|
|
5063
|
+
{
|
|
5064
|
+
viewBox: "0 0 16 16",
|
|
5065
|
+
width: "12",
|
|
5066
|
+
height: "12",
|
|
5067
|
+
fill: "none",
|
|
5068
|
+
stroke: "currentColor",
|
|
5069
|
+
strokeWidth: 1.5,
|
|
5070
|
+
strokeLinecap: "round",
|
|
5071
|
+
strokeLinejoin: "round",
|
|
5072
|
+
"aria-hidden": "true",
|
|
5073
|
+
className: cn("shrink-0", !item.checked && "invisible"),
|
|
5074
|
+
children: /* @__PURE__ */ jsx("path", { d: "m3 8.5 3 3 7-7" })
|
|
5075
|
+
}
|
|
5076
|
+
),
|
|
5077
|
+
t(item.labelKey)
|
|
5078
|
+
]
|
|
5079
|
+
},
|
|
5080
|
+
item.mode
|
|
5081
|
+
))
|
|
5082
|
+
}
|
|
5083
|
+
) });
|
|
5084
|
+
}
|
|
4912
5085
|
var TAB_BASE = "relative px-3.5 py-2 text-[12px] font-medium whitespace-nowrap transition-colors max-md:min-h-[36px] max-md:px-3";
|
|
4913
5086
|
var TAB_UNDERLINE = "after:absolute after:-bottom-px after:left-0 after:right-0 after:h-[2.5px] after:bg-primary";
|
|
4914
5087
|
function RibbonTabBar(p) {
|
|
@@ -4931,6 +5104,7 @@ function RibbonTabBar(p) {
|
|
|
4931
5104
|
"aria-selected": selected,
|
|
4932
5105
|
title: resolveScreenTip(viewerOptions, t(s.labelKey)),
|
|
4933
5106
|
onClick: () => p.onSelectSection(s.id),
|
|
5107
|
+
onDoubleClick: s.id === "file" ? void 0 : () => p.onToggleCollapsed?.(),
|
|
4934
5108
|
className: cn(
|
|
4935
5109
|
TAB_BASE,
|
|
4936
5110
|
selected ? s.id === "file" ? "text-white bg-primary/80 rounded-sm" : `text-foreground ${TAB_UNDERLINE}` : s.id === "file" ? "text-primary hover:bg-primary/15 rounded-sm" : "text-muted-foreground hover:text-foreground hover:bg-accent/30"
|
|
@@ -4951,6 +5125,7 @@ function RibbonTabBar(p) {
|
|
|
4951
5125
|
...{ [RIBBON_ADD_IN_TAB_ATTR]: tab.id },
|
|
4952
5126
|
title: resolveScreenTip(viewerOptions, tab.label),
|
|
4953
5127
|
onClick: () => p.onSelectAddIn?.(tab.id),
|
|
5128
|
+
onDoubleClick: () => p.onToggleCollapsed?.(),
|
|
4954
5129
|
className: cn(
|
|
4955
5130
|
TAB_BASE,
|
|
4956
5131
|
selected ? `text-foreground ${TAB_UNDERLINE}` : "text-muted-foreground hover:text-foreground hover:bg-accent/30"
|
|
@@ -4972,6 +5147,7 @@ function RibbonTabBar(p) {
|
|
|
4972
5147
|
...{ [RIBBON_CONTEXTUAL_TAB_ATTR]: id },
|
|
4973
5148
|
title: resolveScreenTip(viewerOptions, label),
|
|
4974
5149
|
onClick: () => p.onSelectContextual(id),
|
|
5150
|
+
onDoubleClick: () => p.onToggleCollapsed?.(),
|
|
4975
5151
|
className: cn(
|
|
4976
5152
|
TAB_BASE,
|
|
4977
5153
|
"text-primary",
|
|
@@ -5795,6 +5971,9 @@ function Toolbar(p) {
|
|
|
5795
5971
|
const fallBackHome = useCallback(() => onSetToolbarSection("home"), [onSetToolbarSection]);
|
|
5796
5972
|
const contextual = useContextualRibbonTab(p.selectedElement, customization, fallBackHome);
|
|
5797
5973
|
const addIns = useRibbonAddInTabs(fallBackHome);
|
|
5974
|
+
const ribbon = useRibbonDisplayFallback(p.ribbonDisplay);
|
|
5975
|
+
const ribbonState = useController(ribbon);
|
|
5976
|
+
const { layout, effectiveMode, peek } = ribbonState;
|
|
5798
5977
|
const detachOverflow = useRef(null);
|
|
5799
5978
|
const inspector = useRef({ open: p.isInspectorPaneOpen, toggle: p.onToggleInspector });
|
|
5800
5979
|
inspector.current = { open: p.isInspectorPaneOpen, toggle: p.onToggleInspector };
|
|
@@ -5829,269 +6008,294 @@ function Toolbar(p) {
|
|
|
5829
6008
|
const sDrw = section === "draw";
|
|
5830
6009
|
const sDes = section === "design";
|
|
5831
6010
|
const showRibbon = mode === "edit" || mode === "master";
|
|
5832
|
-
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
addIns.select(null);
|
|
5852
|
-
onSetToolbarSection(id);
|
|
5853
|
-
},
|
|
5854
|
-
onSelectContextual: (id) => {
|
|
5855
|
-
addIns.select(null);
|
|
5856
|
-
contextual.select(id);
|
|
5857
|
-
},
|
|
5858
|
-
addInTabs: addIns.visible,
|
|
5859
|
-
activeAddIn: addIns.active?.id ?? null,
|
|
5860
|
-
onSelectAddIn: (id) => {
|
|
5861
|
-
contextual.select(null);
|
|
5862
|
-
addIns.select(id);
|
|
5863
|
-
},
|
|
5864
|
-
children: [
|
|
5865
|
-
/* @__PURE__ */ jsx(
|
|
5866
|
-
TabRowActions,
|
|
5867
|
-
{
|
|
5868
|
-
onEnterRehearsalMode: p.canEdit ? p.onEnterRehearsalMode : void 0,
|
|
5869
|
-
onOpenShareDialog: p.onOpenShareDialog,
|
|
5870
|
-
onToggleComments: p.onToggleComments,
|
|
5871
|
-
isCommentsPanelOpen: p.isCommentsPanelOpen,
|
|
5872
|
-
slideCommentCount: p.slideCommentCount,
|
|
5873
|
-
hiddenActions: p.hiddenActions
|
|
5874
|
-
}
|
|
5875
|
-
),
|
|
5876
|
-
isNarrowViewport && /* @__PURE__ */ jsx(
|
|
5877
|
-
"button",
|
|
5878
|
-
{
|
|
5879
|
-
type: "button",
|
|
5880
|
-
onClick: p.onToggleCompactToolbar,
|
|
5881
|
-
className: cn(
|
|
5882
|
-
"px-2 py-1 rounded text-[11px] transition-colors mr-1",
|
|
5883
|
-
isCompactToolbarOpen ? "bg-primary/80 text-white" : "text-muted-foreground hover:text-foreground"
|
|
5884
|
-
),
|
|
5885
|
-
title: t(
|
|
5886
|
-
isCompactToolbarOpen ? "pptx.ribbon.collapseRibbon" : "pptx.ribbon.expandRibbon"
|
|
5887
|
-
),
|
|
5888
|
-
children: t(isCompactToolbarOpen ? "pptx.ribbon.collapseRibbon" : "pptx.ribbon.expandRibbon")
|
|
5889
|
-
}
|
|
5890
|
-
)
|
|
5891
|
-
]
|
|
5892
|
-
}
|
|
5893
|
-
),
|
|
5894
|
-
showRibbon && viewerOptions.quickAccess.position === "below" && isPanelVisible(customization, "quickAccessToolbar") && /* @__PURE__ */ jsx(
|
|
5895
|
-
TitleBarElement,
|
|
5896
|
-
{
|
|
5897
|
-
placement: "belowRibbon",
|
|
5898
|
-
input: belowInput,
|
|
5899
|
-
onQuickCommand: p.onQuickCommand
|
|
5900
|
-
}
|
|
6011
|
+
const commandsShown = sFil ? layout.tabs : layout.commands !== "hidden";
|
|
6012
|
+
const commandsOverlaid = commandsShown && layout.commands === "overlay" && !sFil;
|
|
6013
|
+
const rootShown = layout.tabs || commandsShown;
|
|
6014
|
+
const peekedFullScreen = effectiveMode === "fullScreen" && peek;
|
|
6015
|
+
const showStrip = layout.reveal || effectiveMode === "fullScreen";
|
|
6016
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
6017
|
+
showStrip && /* @__PURE__ */ jsx(RibbonRevealStrip, { ribbon }),
|
|
6018
|
+
/* @__PURE__ */ jsxs(
|
|
6019
|
+
"div",
|
|
6020
|
+
{
|
|
6021
|
+
role: "toolbar",
|
|
6022
|
+
"data-pptx-scope": "",
|
|
6023
|
+
"data-pptx-chrome": "ribbon",
|
|
6024
|
+
"data-ribbon-display": effectiveMode,
|
|
6025
|
+
"data-ribbon-peek": peek ? "" : void 0,
|
|
6026
|
+
"aria-label": t("pptx.toolbar.presentationToolbarAria"),
|
|
6027
|
+
className: cn(
|
|
6028
|
+
peekedFullScreen ? RIBBON_PEEK_ROOT_CLASS : "relative z-20 border-b border-border bg-secondary/50 overflow-visible",
|
|
6029
|
+
!rootShown && "hidden"
|
|
5901
6030
|
),
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
{
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
6031
|
+
children: [
|
|
6032
|
+
layout.tabs && /* @__PURE__ */ jsx(ToolbarPrimaryRow, { ...p }),
|
|
6033
|
+
showRibbon && layout.tabs && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6034
|
+
/* @__PURE__ */ jsxs(
|
|
6035
|
+
RibbonTabBar,
|
|
6036
|
+
{
|
|
6037
|
+
onToggleCollapsed: () => ribbon.toggleCollapsed(),
|
|
6038
|
+
isTabVisible,
|
|
6039
|
+
activeSection: extraTab ? null : section,
|
|
6040
|
+
contextualTabs: contextual.visible,
|
|
6041
|
+
activeContextual: addIns.active ? null : contextual.active,
|
|
6042
|
+
onSelectSection: (id) => {
|
|
6043
|
+
contextual.select(null);
|
|
6044
|
+
addIns.select(null);
|
|
6045
|
+
onSetToolbarSection(id);
|
|
6046
|
+
ribbon.tabChosen(id);
|
|
6047
|
+
},
|
|
6048
|
+
onSelectContextual: (id) => {
|
|
6049
|
+
addIns.select(null);
|
|
6050
|
+
contextual.select(id);
|
|
6051
|
+
ribbon.tabChosen(id);
|
|
6052
|
+
},
|
|
6053
|
+
addInTabs: addIns.visible,
|
|
6054
|
+
activeAddIn: addIns.active?.id ?? null,
|
|
6055
|
+
onSelectAddIn: (id) => {
|
|
6056
|
+
contextual.select(null);
|
|
6057
|
+
addIns.select(id);
|
|
6058
|
+
ribbon.tabChosen(id);
|
|
6059
|
+
},
|
|
6060
|
+
children: [
|
|
6061
|
+
/* @__PURE__ */ jsx(
|
|
6062
|
+
TabRowActions,
|
|
6063
|
+
{
|
|
6064
|
+
onEnterRehearsalMode: p.canEdit ? p.onEnterRehearsalMode : void 0,
|
|
6065
|
+
onOpenShareDialog: p.onOpenShareDialog,
|
|
6066
|
+
onToggleComments: p.onToggleComments,
|
|
6067
|
+
isCommentsPanelOpen: p.isCommentsPanelOpen,
|
|
6068
|
+
slideCommentCount: p.slideCommentCount,
|
|
6069
|
+
hiddenActions: p.hiddenActions
|
|
6070
|
+
}
|
|
6071
|
+
),
|
|
6072
|
+
/* @__PURE__ */ jsx(RibbonDisplayButton, { ribbon, state: ribbonState }),
|
|
6073
|
+
isNarrowViewport && /* @__PURE__ */ jsx(
|
|
6074
|
+
"button",
|
|
6075
|
+
{
|
|
6076
|
+
type: "button",
|
|
6077
|
+
onClick: p.onToggleCompactToolbar,
|
|
6078
|
+
className: cn(
|
|
6079
|
+
"px-2 py-1 rounded text-[11px] transition-colors mr-1",
|
|
6080
|
+
isCompactToolbarOpen ? "bg-primary/80 text-white" : "text-muted-foreground hover:text-foreground"
|
|
6081
|
+
),
|
|
6082
|
+
title: t(
|
|
6083
|
+
isCompactToolbarOpen ? "pptx.ribbon.collapseRibbon" : "pptx.ribbon.expandRibbon"
|
|
6084
|
+
),
|
|
6085
|
+
children: t(
|
|
6086
|
+
isCompactToolbarOpen ? "pptx.ribbon.collapseRibbon" : "pptx.ribbon.expandRibbon"
|
|
6087
|
+
)
|
|
6088
|
+
}
|
|
6089
|
+
)
|
|
6090
|
+
]
|
|
6091
|
+
}
|
|
5914
6092
|
),
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
onOpenDocumentProperties: p.onOpenDocumentProperties,
|
|
5940
|
-
onOpenPasswordProtection: p.onOpenPasswordProtection,
|
|
5941
|
-
onOpenFontEmbedding: p.onOpenFontEmbedding,
|
|
5942
|
-
onOpenDigitalSignatures: p.onOpenDigitalSignatures,
|
|
5943
|
-
onOpenVersionHistory: p.onToggleVersionHistory,
|
|
5944
|
-
hiddenActions: p.hiddenActions,
|
|
5945
|
-
recentPresentationsCount: p.recentPresentationsCount
|
|
5946
|
-
}
|
|
5947
|
-
),
|
|
5948
|
-
sHome && /* @__PURE__ */ jsx(
|
|
5949
|
-
HomeSection,
|
|
5950
|
-
{
|
|
5951
|
-
canEdit: p.canEdit,
|
|
5952
|
-
clipboardPayload: p.clipboardPayload,
|
|
5953
|
-
formatPainterActive: p.formatPainterActive,
|
|
5954
|
-
canActivateFormatPainter: p.canActivateFormatPainter,
|
|
5955
|
-
onCopy: p.onCopy,
|
|
5956
|
-
onCut: p.onCut,
|
|
5957
|
-
onPaste: p.onPaste,
|
|
5958
|
-
onToggleFormatPainter: p.onToggleFormatPainter,
|
|
5959
|
-
layoutOptions: p.layoutOptions,
|
|
5960
|
-
currentLayoutPath: p.currentLayoutPath,
|
|
5961
|
-
loadLayoutPreviews: p.loadLayoutPreviews,
|
|
5962
|
-
onInsertSlideFromLayout: p.onInsertSlideFromLayout,
|
|
5963
|
-
onApplyLayout: p.onApplyLayout,
|
|
5964
|
-
onInsertSlideFromTemplate: p.onInsertSlideFromTemplate,
|
|
5965
|
-
templateScheme: p.templateScheme,
|
|
5966
|
-
selectedElement: p.selectedElement,
|
|
5967
|
-
onResetSlide: p.onResetSlide,
|
|
5968
|
-
onAddSection: p.onAddSection
|
|
5969
|
-
}
|
|
5970
|
-
),
|
|
5971
|
-
sIns && /* @__PURE__ */ jsx(
|
|
5972
|
-
InsertSection,
|
|
5973
|
-
{
|
|
5974
|
-
canEdit: p.canEdit,
|
|
5975
|
-
onInsertSlideFromTemplate: p.onInsertSlideFromTemplate,
|
|
5976
|
-
templateScheme: p.templateScheme,
|
|
5977
|
-
newShapeType: p.newShapeType,
|
|
5978
|
-
onSetNewShapeType: p.onSetNewShapeType,
|
|
5979
|
-
activeFreeformTool: p.activeFreeformTool,
|
|
5980
|
-
onArmFreeformTool: p.onArmFreeformTool,
|
|
5981
|
-
onAddTextBox: p.onAddTextBox,
|
|
5982
|
-
onAddShape: p.onAddShape,
|
|
5983
|
-
onAddTable: p.onAddTable,
|
|
5984
|
-
onAddChart: p.onAddChart,
|
|
5985
|
-
onOpenChartDialog: p.onOpenChartDialog,
|
|
5986
|
-
onAddSmartArt: p.onAddSmartArt,
|
|
5987
|
-
onAddEquation: p.onAddEquation,
|
|
5988
|
-
onAddActionButton: p.onAddActionButton,
|
|
5989
|
-
onInsertField: p.onInsertField,
|
|
5990
|
-
onOpenHeaderFooter: p.onOpenHeaderFooter,
|
|
5991
|
-
onOpenImagePicker: p.onOpenImagePicker,
|
|
5992
|
-
onOpenMediaPicker: p.onOpenMediaPicker,
|
|
5993
|
-
hasSelection: Boolean(p.selectedElement),
|
|
5994
|
-
onOpenHyperlinkDialog: p.onOpenHyperlinkDialog,
|
|
5995
|
-
layoutOptions: p.layoutOptions,
|
|
5996
|
-
currentLayoutPath: p.currentLayoutPath,
|
|
5997
|
-
onInsertSlideFromLayout: p.onInsertSlideFromLayout,
|
|
5998
|
-
onToggleComments: p.onToggleComments,
|
|
5999
|
-
isCommentsPanelOpen: p.isCommentsPanelOpen
|
|
6000
|
-
}
|
|
6001
|
-
),
|
|
6002
|
-
sTxt && /* @__PURE__ */ jsx(
|
|
6003
|
-
TextSection,
|
|
6004
|
-
{
|
|
6005
|
-
canEdit: p.canEdit,
|
|
6006
|
-
selectedElement: p.selectedElement,
|
|
6007
|
-
tableEditorState: p.tableEditorState,
|
|
6008
|
-
onUpdateTextStyle: p.onUpdateTextStyle,
|
|
6009
|
-
onToggleBullets: p.onToggleBullets,
|
|
6010
|
-
onTransformTextCase: p.onTransformTextCase,
|
|
6011
|
-
themeFonts: p.themeFonts,
|
|
6012
|
-
embeddedFontFamilies: p.embeddedFontFamilies,
|
|
6013
|
-
customFontFamilies: p.customFontFamilies
|
|
6014
|
-
}
|
|
6015
|
-
),
|
|
6016
|
-
sHome && /* @__PURE__ */ jsx(
|
|
6017
|
-
DrawingGroup,
|
|
6018
|
-
{
|
|
6019
|
-
canEdit: p.canEdit,
|
|
6020
|
-
selectedElement: p.selectedElement,
|
|
6021
|
-
newShapeType: p.newShapeType,
|
|
6022
|
-
onSetNewShapeType: p.onSetNewShapeType,
|
|
6023
|
-
onAddShape: p.onAddShape,
|
|
6024
|
-
onMoveLayer: p.onMoveLayer,
|
|
6025
|
-
onMoveLayerToEdge: p.onMoveLayerToEdge,
|
|
6026
|
-
onUpdateElementStyle: p.onUpdateElementStyle
|
|
6027
|
-
}
|
|
6028
|
-
),
|
|
6029
|
-
sHome && /* @__PURE__ */ jsx(
|
|
6030
|
-
EditingSection,
|
|
6031
|
-
{
|
|
6032
|
-
onToggleFindReplace: p.onToggleFindReplace,
|
|
6033
|
-
onSelectAll: p.onSelectAll
|
|
6034
|
-
}
|
|
6035
|
-
),
|
|
6036
|
-
sDrw && /* @__PURE__ */ jsx(
|
|
6037
|
-
DrawSection,
|
|
6038
|
-
{
|
|
6039
|
-
canEdit: p.canEdit,
|
|
6040
|
-
activeTool: p.activeTool,
|
|
6041
|
-
drawingColor: p.drawingColor,
|
|
6042
|
-
drawingWidth: p.drawingWidth,
|
|
6043
|
-
onSetActiveTool: p.onSetActiveTool,
|
|
6044
|
-
onSetDrawingColor: p.onSetDrawingColor,
|
|
6045
|
-
onSetDrawingWidth: p.onSetDrawingWidth
|
|
6046
|
-
}
|
|
6047
|
-
),
|
|
6048
|
-
sArr && /* @__PURE__ */ jsx(
|
|
6049
|
-
ArrangeSection,
|
|
6050
|
-
{
|
|
6051
|
-
canEdit: p.canEdit,
|
|
6052
|
-
selectedElement: p.selectedElement,
|
|
6053
|
-
selectedCount: p.selectedCount,
|
|
6054
|
-
selectionGroupable: p.selectionGroupable,
|
|
6055
|
-
onAlignElements: p.onAlignElements,
|
|
6056
|
-
onDistributeElements: p.onDistributeElements,
|
|
6057
|
-
canDistribute: p.canDistribute,
|
|
6058
|
-
onFlip: p.onFlip,
|
|
6059
|
-
onMoveLayer: p.onMoveLayer,
|
|
6060
|
-
onMoveLayerToEdge: p.onMoveLayerToEdge,
|
|
6061
|
-
onGroupElements: p.onGroupElements,
|
|
6062
|
-
onUngroupElement: p.onUngroupElement,
|
|
6063
|
-
onUpdateElementStyle: p.onUpdateElementStyle,
|
|
6064
|
-
onDuplicate: p.onDuplicate,
|
|
6065
|
-
onDelete: p.onDelete,
|
|
6066
|
-
formatPainterActive: p.formatPainterActive,
|
|
6067
|
-
onToggleFormatPainter: p.onToggleFormatPainter,
|
|
6068
|
-
canActivateFormatPainter: p.canActivateFormatPainter,
|
|
6069
|
-
hiddenActions: p.hiddenActions
|
|
6070
|
-
}
|
|
6071
|
-
),
|
|
6072
|
-
sDes && /* @__PURE__ */ jsx(
|
|
6073
|
-
DesignSection,
|
|
6074
|
-
{
|
|
6075
|
-
canEdit: p.canEdit,
|
|
6076
|
-
onToggleThemeGallery: p.onToggleThemeGallery,
|
|
6077
|
-
isThemeGalleryOpen: p.isThemeGalleryOpen,
|
|
6078
|
-
onToggleThemeEditor: p.onToggleThemeEditor,
|
|
6079
|
-
isThemeEditorOpen: p.isThemeEditorOpen,
|
|
6080
|
-
onOpenDocumentProperties: p.onOpenDocumentProperties,
|
|
6081
|
-
onOpenSlideSize: p.onOpenSlideSize,
|
|
6082
|
-
onToggleInspector: p.onToggleInspector,
|
|
6083
|
-
isInspectorPaneOpen: p.isInspectorPaneOpen
|
|
6084
|
-
}
|
|
6093
|
+
ribbonState.menuOpen && /* @__PURE__ */ jsx(RibbonDisplayMenu, { ribbon, state: ribbonState })
|
|
6094
|
+
] }),
|
|
6095
|
+
showRibbon && viewerOptions.quickAccess.position === "below" && isPanelVisible(customization, "quickAccessToolbar") && /* @__PURE__ */ jsx(
|
|
6096
|
+
TitleBarElement,
|
|
6097
|
+
{
|
|
6098
|
+
placement: "belowRibbon",
|
|
6099
|
+
input: belowInput,
|
|
6100
|
+
onQuickCommand: p.onQuickCommand
|
|
6101
|
+
}
|
|
6102
|
+
),
|
|
6103
|
+
showRibbon && /* @__PURE__ */ jsxs(
|
|
6104
|
+
"div",
|
|
6105
|
+
{
|
|
6106
|
+
ref: attachOverflow,
|
|
6107
|
+
"data-pptx-chrome": "ribbon-content",
|
|
6108
|
+
className: cn(
|
|
6109
|
+
// Plain controls stay compact; labelled RibbonGroups opt into stretching.
|
|
6110
|
+
// `RibbonGroupScope` wraps controls in a `display: contents` div, so its
|
|
6111
|
+
// children are this row's flex items too and must not shrink (a shrunk
|
|
6112
|
+
// "Text Box" pill wraps its caption onto two lines).
|
|
6113
|
+
"flex min-h-[82px] items-center gap-0 overflow-x-auto px-1 py-0.5 max-md:min-h-0 max-md:px-1 max-md:py-0.5 flex-nowrap [&>*]:shrink-0 [&>.contents>*]:shrink-0",
|
|
6114
|
+
isNarrowViewport && !isCompactToolbarOpen && "hidden",
|
|
6115
|
+
!commandsShown && "hidden",
|
|
6116
|
+
commandsOverlaid && RIBBON_OVERLAY_CLASS
|
|
6085
6117
|
),
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6118
|
+
children: [
|
|
6119
|
+
sFil && /* @__PURE__ */ jsx(
|
|
6120
|
+
FileSection,
|
|
6121
|
+
{
|
|
6122
|
+
fileName: p.fileName,
|
|
6123
|
+
onClose: () => p.onSetToolbarSection("home"),
|
|
6124
|
+
onCreatePresentation: p.onCreatePresentation,
|
|
6125
|
+
onOpenFile: p.onOpenFile,
|
|
6126
|
+
onOpenRecentFile: p.onOpenRecentFile,
|
|
6127
|
+
onExportPng: p.onExportPng,
|
|
6128
|
+
onExportPdf: p.onExportPdf,
|
|
6129
|
+
onExportVideo: p.onExportVideo,
|
|
6130
|
+
onExportGif: p.onExportGif,
|
|
6131
|
+
onExportJson: p.onExportJson,
|
|
6132
|
+
onSave: p.onSave,
|
|
6133
|
+
onSaveAsPptx: p.onSaveAsPptx,
|
|
6134
|
+
onSaveAsPpsx: p.onSaveAsPpsx,
|
|
6135
|
+
onSaveAsPptm: p.onSaveAsPptm,
|
|
6136
|
+
onSaveAsPpt: p.onSaveAsPpt,
|
|
6137
|
+
hasMacros: p.hasMacros,
|
|
6138
|
+
onCopySlideAsImage: p.onCopySlideAsImage,
|
|
6139
|
+
onPrint: p.onPrint,
|
|
6140
|
+
onOpenSettings: p.onOpenSettings,
|
|
6141
|
+
onOpenShareDialog: p.onOpenShareDialog,
|
|
6142
|
+
onOpenDocumentProperties: p.onOpenDocumentProperties,
|
|
6143
|
+
onOpenPasswordProtection: p.onOpenPasswordProtection,
|
|
6144
|
+
onOpenFontEmbedding: p.onOpenFontEmbedding,
|
|
6145
|
+
onOpenDigitalSignatures: p.onOpenDigitalSignatures,
|
|
6146
|
+
onOpenVersionHistory: p.onToggleVersionHistory,
|
|
6147
|
+
hiddenActions: p.hiddenActions,
|
|
6148
|
+
recentPresentationsCount: p.recentPresentationsCount
|
|
6149
|
+
}
|
|
6150
|
+
),
|
|
6151
|
+
sHome && /* @__PURE__ */ jsx(
|
|
6152
|
+
HomeSection,
|
|
6153
|
+
{
|
|
6154
|
+
canEdit: p.canEdit,
|
|
6155
|
+
clipboardPayload: p.clipboardPayload,
|
|
6156
|
+
formatPainterActive: p.formatPainterActive,
|
|
6157
|
+
canActivateFormatPainter: p.canActivateFormatPainter,
|
|
6158
|
+
onCopy: p.onCopy,
|
|
6159
|
+
onCut: p.onCut,
|
|
6160
|
+
onPaste: p.onPaste,
|
|
6161
|
+
onToggleFormatPainter: p.onToggleFormatPainter,
|
|
6162
|
+
layoutOptions: p.layoutOptions,
|
|
6163
|
+
currentLayoutPath: p.currentLayoutPath,
|
|
6164
|
+
loadLayoutPreviews: p.loadLayoutPreviews,
|
|
6165
|
+
onInsertSlideFromLayout: p.onInsertSlideFromLayout,
|
|
6166
|
+
onApplyLayout: p.onApplyLayout,
|
|
6167
|
+
onInsertSlideFromTemplate: p.onInsertSlideFromTemplate,
|
|
6168
|
+
templateScheme: p.templateScheme,
|
|
6169
|
+
selectedElement: p.selectedElement,
|
|
6170
|
+
onResetSlide: p.onResetSlide,
|
|
6171
|
+
onAddSection: p.onAddSection
|
|
6172
|
+
}
|
|
6173
|
+
),
|
|
6174
|
+
sIns && /* @__PURE__ */ jsx(
|
|
6175
|
+
InsertSection,
|
|
6176
|
+
{
|
|
6177
|
+
canEdit: p.canEdit,
|
|
6178
|
+
onInsertSlideFromTemplate: p.onInsertSlideFromTemplate,
|
|
6179
|
+
templateScheme: p.templateScheme,
|
|
6180
|
+
newShapeType: p.newShapeType,
|
|
6181
|
+
onSetNewShapeType: p.onSetNewShapeType,
|
|
6182
|
+
activeFreeformTool: p.activeFreeformTool,
|
|
6183
|
+
onArmFreeformTool: p.onArmFreeformTool,
|
|
6184
|
+
onAddTextBox: p.onAddTextBox,
|
|
6185
|
+
onAddShape: p.onAddShape,
|
|
6186
|
+
onAddTable: p.onAddTable,
|
|
6187
|
+
onAddChart: p.onAddChart,
|
|
6188
|
+
onOpenChartDialog: p.onOpenChartDialog,
|
|
6189
|
+
onAddSmartArt: p.onAddSmartArt,
|
|
6190
|
+
onAddEquation: p.onAddEquation,
|
|
6191
|
+
onAddActionButton: p.onAddActionButton,
|
|
6192
|
+
onInsertField: p.onInsertField,
|
|
6193
|
+
onOpenHeaderFooter: p.onOpenHeaderFooter,
|
|
6194
|
+
onOpenImagePicker: p.onOpenImagePicker,
|
|
6195
|
+
onOpenMediaPicker: p.onOpenMediaPicker,
|
|
6196
|
+
hasSelection: Boolean(p.selectedElement),
|
|
6197
|
+
onOpenHyperlinkDialog: p.onOpenHyperlinkDialog,
|
|
6198
|
+
layoutOptions: p.layoutOptions,
|
|
6199
|
+
currentLayoutPath: p.currentLayoutPath,
|
|
6200
|
+
onInsertSlideFromLayout: p.onInsertSlideFromLayout,
|
|
6201
|
+
onToggleComments: p.onToggleComments,
|
|
6202
|
+
isCommentsPanelOpen: p.isCommentsPanelOpen
|
|
6203
|
+
}
|
|
6204
|
+
),
|
|
6205
|
+
sTxt && /* @__PURE__ */ jsx(
|
|
6206
|
+
TextSection,
|
|
6207
|
+
{
|
|
6208
|
+
canEdit: p.canEdit,
|
|
6209
|
+
selectedElement: p.selectedElement,
|
|
6210
|
+
tableEditorState: p.tableEditorState,
|
|
6211
|
+
onUpdateTextStyle: p.onUpdateTextStyle,
|
|
6212
|
+
onToggleBullets: p.onToggleBullets,
|
|
6213
|
+
onTransformTextCase: p.onTransformTextCase,
|
|
6214
|
+
themeFonts: p.themeFonts,
|
|
6215
|
+
embeddedFontFamilies: p.embeddedFontFamilies,
|
|
6216
|
+
customFontFamilies: p.customFontFamilies
|
|
6217
|
+
}
|
|
6218
|
+
),
|
|
6219
|
+
sHome && /* @__PURE__ */ jsx(
|
|
6220
|
+
DrawingGroup,
|
|
6221
|
+
{
|
|
6222
|
+
canEdit: p.canEdit,
|
|
6223
|
+
selectedElement: p.selectedElement,
|
|
6224
|
+
newShapeType: p.newShapeType,
|
|
6225
|
+
onSetNewShapeType: p.onSetNewShapeType,
|
|
6226
|
+
onAddShape: p.onAddShape,
|
|
6227
|
+
onMoveLayer: p.onMoveLayer,
|
|
6228
|
+
onMoveLayerToEdge: p.onMoveLayerToEdge,
|
|
6229
|
+
onUpdateElementStyle: p.onUpdateElementStyle
|
|
6230
|
+
}
|
|
6231
|
+
),
|
|
6232
|
+
sHome && /* @__PURE__ */ jsx(
|
|
6233
|
+
EditingSection,
|
|
6234
|
+
{
|
|
6235
|
+
onToggleFindReplace: p.onToggleFindReplace,
|
|
6236
|
+
onSelectAll: p.onSelectAll
|
|
6237
|
+
}
|
|
6238
|
+
),
|
|
6239
|
+
sDrw && /* @__PURE__ */ jsx(
|
|
6240
|
+
DrawSection,
|
|
6241
|
+
{
|
|
6242
|
+
canEdit: p.canEdit,
|
|
6243
|
+
activeTool: p.activeTool,
|
|
6244
|
+
drawingColor: p.drawingColor,
|
|
6245
|
+
drawingWidth: p.drawingWidth,
|
|
6246
|
+
onSetActiveTool: p.onSetActiveTool,
|
|
6247
|
+
onSetDrawingColor: p.onSetDrawingColor,
|
|
6248
|
+
onSetDrawingWidth: p.onSetDrawingWidth
|
|
6249
|
+
}
|
|
6250
|
+
),
|
|
6251
|
+
sArr && /* @__PURE__ */ jsx(
|
|
6252
|
+
ArrangeSection,
|
|
6253
|
+
{
|
|
6254
|
+
canEdit: p.canEdit,
|
|
6255
|
+
selectedElement: p.selectedElement,
|
|
6256
|
+
selectedCount: p.selectedCount,
|
|
6257
|
+
selectionGroupable: p.selectionGroupable,
|
|
6258
|
+
onAlignElements: p.onAlignElements,
|
|
6259
|
+
onDistributeElements: p.onDistributeElements,
|
|
6260
|
+
canDistribute: p.canDistribute,
|
|
6261
|
+
onFlip: p.onFlip,
|
|
6262
|
+
onMoveLayer: p.onMoveLayer,
|
|
6263
|
+
onMoveLayerToEdge: p.onMoveLayerToEdge,
|
|
6264
|
+
onGroupElements: p.onGroupElements,
|
|
6265
|
+
onUngroupElement: p.onUngroupElement,
|
|
6266
|
+
onUpdateElementStyle: p.onUpdateElementStyle,
|
|
6267
|
+
onDuplicate: p.onDuplicate,
|
|
6268
|
+
onDelete: p.onDelete,
|
|
6269
|
+
formatPainterActive: p.formatPainterActive,
|
|
6270
|
+
onToggleFormatPainter: p.onToggleFormatPainter,
|
|
6271
|
+
canActivateFormatPainter: p.canActivateFormatPainter,
|
|
6272
|
+
hiddenActions: p.hiddenActions
|
|
6273
|
+
}
|
|
6274
|
+
),
|
|
6275
|
+
sDes && /* @__PURE__ */ jsx(
|
|
6276
|
+
DesignSection,
|
|
6277
|
+
{
|
|
6278
|
+
canEdit: p.canEdit,
|
|
6279
|
+
onToggleThemeGallery: p.onToggleThemeGallery,
|
|
6280
|
+
isThemeGalleryOpen: p.isThemeGalleryOpen,
|
|
6281
|
+
onToggleThemeEditor: p.onToggleThemeEditor,
|
|
6282
|
+
isThemeEditorOpen: p.isThemeEditorOpen,
|
|
6283
|
+
onOpenDocumentProperties: p.onOpenDocumentProperties,
|
|
6284
|
+
onOpenSlideSize: p.onOpenSlideSize,
|
|
6285
|
+
onToggleInspector: p.onToggleInspector,
|
|
6286
|
+
isInspectorPaneOpen: p.isInspectorPaneOpen
|
|
6287
|
+
}
|
|
6288
|
+
),
|
|
6289
|
+
/* @__PURE__ */ jsx(ToolbarLateTabs, { p, section }),
|
|
6290
|
+
contextual.active && !addIns.active && /* @__PURE__ */ jsx(ContextualTabSection, { tab: contextual.active, hiddenActions: p.hiddenActions }),
|
|
6291
|
+
addIns.active && /* @__PURE__ */ jsx(RibbonAddInSection, { tab: addIns.active })
|
|
6292
|
+
]
|
|
6293
|
+
}
|
|
6294
|
+
)
|
|
6295
|
+
]
|
|
6296
|
+
}
|
|
6297
|
+
)
|
|
6298
|
+
] });
|
|
6095
6299
|
}
|
|
6096
6300
|
function CanvasGuides({ guides, onDeleteGuide, onStartGuideDrag }) {
|
|
6097
6301
|
const { t } = useTranslation();
|
|
@@ -8462,7 +8666,11 @@ function SlideCanvas(props) {
|
|
|
8462
8666
|
props.registerInlineEditReader
|
|
8463
8667
|
]
|
|
8464
8668
|
);
|
|
8465
|
-
|
|
8669
|
+
const errorReporting = useMemo(
|
|
8670
|
+
() => ({ onElementRenderError: props.onElementRenderError }),
|
|
8671
|
+
[props.onElementRenderError]
|
|
8672
|
+
);
|
|
8673
|
+
return /* @__PURE__ */ jsx(ElementRenderErrorReportingContext.Provider, { value: errorReporting, children: /* @__PURE__ */ jsx(InlineCollaborationContext.Provider, { value, children: /* @__PURE__ */ jsx(SlideCanvasContent, { ...props }) }) });
|
|
8466
8674
|
}
|
|
8467
8675
|
function SlideCanvasContent({
|
|
8468
8676
|
imagePaste,
|
|
@@ -11297,7 +11505,8 @@ function ReadingViewStage({
|
|
|
11297
11505
|
slide,
|
|
11298
11506
|
templateElements,
|
|
11299
11507
|
canvasSize,
|
|
11300
|
-
scale
|
|
11508
|
+
scale,
|
|
11509
|
+
onElementRenderError
|
|
11301
11510
|
}) {
|
|
11302
11511
|
if (scale <= 0) {
|
|
11303
11512
|
return null;
|
|
@@ -11341,7 +11550,8 @@ function ReadingViewStage({
|
|
|
11341
11550
|
element,
|
|
11342
11551
|
activeSlide: slide,
|
|
11343
11552
|
allSlides: [slide],
|
|
11344
|
-
zIndex: index
|
|
11553
|
+
zIndex: index,
|
|
11554
|
+
onElementRenderError
|
|
11345
11555
|
},
|
|
11346
11556
|
element.id
|
|
11347
11557
|
))
|
|
@@ -12583,28 +12793,11 @@ function ComparePanel({
|
|
|
12583
12793
|
)) })
|
|
12584
12794
|
] });
|
|
12585
12795
|
}
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
if (password.length >= 8) {
|
|
12592
|
-
score++;
|
|
12593
|
-
}
|
|
12594
|
-
if (password.length >= 12) {
|
|
12595
|
-
score++;
|
|
12596
|
-
}
|
|
12597
|
-
if (/[A-Z]/u.test(password) && /[a-z]/u.test(password)) {
|
|
12598
|
-
score++;
|
|
12599
|
-
}
|
|
12600
|
-
if (/\d/u.test(password)) {
|
|
12601
|
-
score++;
|
|
12602
|
-
}
|
|
12603
|
-
if (/[^A-Za-z0-9]/u.test(password)) {
|
|
12604
|
-
score++;
|
|
12605
|
-
}
|
|
12606
|
-
return Math.min(score, 4);
|
|
12607
|
-
}
|
|
12796
|
+
var PASSWORD_ERROR_KEYS = {
|
|
12797
|
+
required: "pptx.security.errorPasswordRequired",
|
|
12798
|
+
mismatch: "pptx.security.errorPasswordMismatch",
|
|
12799
|
+
tooShort: "pptx.security.errorPasswordTooShort"
|
|
12800
|
+
};
|
|
12608
12801
|
var STRENGTH_COLORS = [
|
|
12609
12802
|
"bg-red-500",
|
|
12610
12803
|
"bg-orange-500",
|
|
@@ -12639,16 +12832,9 @@ function PasswordProtectionDialog({
|
|
|
12639
12832
|
}, [strength, password, t]);
|
|
12640
12833
|
const handleSubmit = useCallback(() => {
|
|
12641
12834
|
setError("");
|
|
12642
|
-
|
|
12643
|
-
|
|
12644
|
-
|
|
12645
|
-
}
|
|
12646
|
-
if (password !== confirmPassword) {
|
|
12647
|
-
setError(t("pptx.security.errorPasswordMismatch"));
|
|
12648
|
-
return;
|
|
12649
|
-
}
|
|
12650
|
-
if (password.length < 4) {
|
|
12651
|
-
setError(t("pptx.security.errorPasswordTooShort"));
|
|
12835
|
+
const invalid = validatePasswordPair(password, confirmPassword);
|
|
12836
|
+
if (invalid) {
|
|
12837
|
+
setError(t(PASSWORD_ERROR_KEYS[invalid]));
|
|
12652
12838
|
return;
|
|
12653
12839
|
}
|
|
12654
12840
|
onSetPassword(password);
|
|
@@ -13098,30 +13284,18 @@ function DocumentPropertiesDialog({
|
|
|
13098
13284
|
const handleCoreFieldChange = useCallback((key, value) => {
|
|
13099
13285
|
setDraftCore((prev) => ({ ...prev, [key]: value }));
|
|
13100
13286
|
}, []);
|
|
13101
|
-
const isDirty = useMemo(
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
|
|
13107
|
-
|
|
13108
|
-
const appCompanyChanged = (draftApp.company ?? "") !== (appProperties?.company ?? "");
|
|
13109
|
-
const appManagerChanged = (draftApp.manager ?? "") !== (appProperties?.manager ?? "");
|
|
13110
|
-
if (appCompanyChanged || appManagerChanged) {
|
|
13111
|
-
return true;
|
|
13112
|
-
}
|
|
13113
|
-
if (draftCustom.length !== customProperties.length) {
|
|
13114
|
-
return true;
|
|
13115
|
-
}
|
|
13116
|
-
return draftCustom.some(
|
|
13117
|
-
(p, i) => p.name !== customProperties[i]?.name || p.value !== customProperties[i]?.value || p.type !== customProperties[i]?.type
|
|
13118
|
-
);
|
|
13119
|
-
}, [draftCore, draftCustom, draftApp, coreProperties, customProperties, appProperties]);
|
|
13287
|
+
const isDirty = useMemo(
|
|
13288
|
+
() => documentPropertiesChanged(
|
|
13289
|
+
{ core: coreProperties, custom: customProperties, app: appProperties },
|
|
13290
|
+
{ core: draftCore, custom: draftCustom, app: draftApp }
|
|
13291
|
+
),
|
|
13292
|
+
[draftCore, draftCustom, draftApp, coreProperties, customProperties, appProperties]
|
|
13293
|
+
);
|
|
13120
13294
|
const handleUpdateDraftApp = useCallback((updates) => {
|
|
13121
13295
|
setDraftApp((prev) => ({ ...prev, ...updates }));
|
|
13122
13296
|
}, []);
|
|
13123
13297
|
const handleSave = useCallback(() => {
|
|
13124
|
-
const appChanged = (
|
|
13298
|
+
const appChanged = appPropertiesChanged(appProperties, draftApp);
|
|
13125
13299
|
onSave(draftCore, draftCustom, appChanged ? draftApp : void 0);
|
|
13126
13300
|
onClose();
|
|
13127
13301
|
}, [draftCore, draftCustom, draftApp, appProperties, onSave, onClose]);
|
|
@@ -13855,7 +14029,8 @@ function ScaledSlidePreviewImpl({
|
|
|
13855
14029
|
slide,
|
|
13856
14030
|
templateElements,
|
|
13857
14031
|
canvasSize,
|
|
13858
|
-
className
|
|
14032
|
+
className,
|
|
14033
|
+
onElementRenderError
|
|
13859
14034
|
}) {
|
|
13860
14035
|
const containerRef = useRef(null);
|
|
13861
14036
|
const [containerWidth, setContainerWidth] = useState(0);
|
|
@@ -13924,7 +14099,8 @@ function ScaledSlidePreviewImpl({
|
|
|
13924
14099
|
element,
|
|
13925
14100
|
activeSlide: slide,
|
|
13926
14101
|
allSlides: [slide],
|
|
13927
|
-
zIndex: index
|
|
14102
|
+
zIndex: index,
|
|
14103
|
+
onElementRenderError
|
|
13928
14104
|
},
|
|
13929
14105
|
element.id
|
|
13930
14106
|
))
|
|
@@ -13935,6 +14111,9 @@ function ScaledSlidePreviewImpl({
|
|
|
13935
14111
|
);
|
|
13936
14112
|
}
|
|
13937
14113
|
function scaledSlidePreviewPropsEqual(prev, next) {
|
|
14114
|
+
if (prev.onElementRenderError !== next.onElementRenderError) {
|
|
14115
|
+
return false;
|
|
14116
|
+
}
|
|
13938
14117
|
if (prev.slide !== next.slide) {
|
|
13939
14118
|
return false;
|
|
13940
14119
|
}
|
|
@@ -27008,11 +27187,7 @@ function ShowSlidesFieldset({
|
|
|
27008
27187
|
name: "showSlides",
|
|
27009
27188
|
value: "range",
|
|
27010
27189
|
checked: showSlidesMode === "range",
|
|
27011
|
-
onChange: () => update({
|
|
27012
|
-
showSlidesMode: "range",
|
|
27013
|
-
showSlidesFrom: draft.showSlidesFrom ?? 1,
|
|
27014
|
-
showSlidesTo: draft.showSlidesTo ?? slideCount
|
|
27015
|
-
}),
|
|
27190
|
+
onChange: () => update({ showSlidesMode: "range" }),
|
|
27016
27191
|
className: "accent-primary"
|
|
27017
27192
|
}
|
|
27018
27193
|
),
|
|
@@ -27063,10 +27238,7 @@ function ShowSlidesFieldset({
|
|
|
27063
27238
|
name: "showSlides",
|
|
27064
27239
|
value: "customShow",
|
|
27065
27240
|
checked: showSlidesMode === "customShow",
|
|
27066
|
-
onChange: () => update({
|
|
27067
|
-
showSlidesMode: "customShow",
|
|
27068
|
-
showSlidesCustomShowId: draft.showSlidesCustomShowId ?? customShows[0]?.id
|
|
27069
|
-
}),
|
|
27241
|
+
onChange: () => update({ showSlidesMode: "customShow" }),
|
|
27070
27242
|
className: "accent-primary"
|
|
27071
27243
|
}
|
|
27072
27244
|
),
|
|
@@ -27099,9 +27271,12 @@ function SetUpSlideShowDialog({
|
|
|
27099
27271
|
const [draft, setDraft] = useState({
|
|
27100
27272
|
...properties
|
|
27101
27273
|
});
|
|
27102
|
-
const update = useCallback(
|
|
27103
|
-
|
|
27104
|
-
|
|
27274
|
+
const update = useCallback(
|
|
27275
|
+
(patch) => {
|
|
27276
|
+
setDraft((prev) => applySlideShowSettingsPatch(prev, patch, { slideCount, customShows }));
|
|
27277
|
+
},
|
|
27278
|
+
[slideCount, customShows]
|
|
27279
|
+
);
|
|
27105
27280
|
const handleSave = useCallback(() => {
|
|
27106
27281
|
onSave(draft);
|
|
27107
27282
|
onClose();
|
|
@@ -27155,10 +27330,7 @@ function SetUpSlideShowDialog({
|
|
|
27155
27330
|
name: "showType",
|
|
27156
27331
|
value,
|
|
27157
27332
|
checked: showType === value,
|
|
27158
|
-
onChange: () => update({
|
|
27159
|
-
showType: value,
|
|
27160
|
-
...value === "kiosk" ? { loopContinuously: true } : {}
|
|
27161
|
-
}),
|
|
27333
|
+
onChange: () => update({ showType: value }),
|
|
27162
27334
|
className: "accent-primary"
|
|
27163
27335
|
}
|
|
27164
27336
|
),
|
|
@@ -28103,10 +28275,10 @@ function HyperlinkEditDialog({
|
|
|
28103
28275
|
const { t } = useTranslation();
|
|
28104
28276
|
const { panelStyle, handlers: dragHandlers } = useModalDismissDrag(onCancel);
|
|
28105
28277
|
const inputRef = useRef(null);
|
|
28106
|
-
const detectedType =
|
|
28107
|
-
const emailParts =
|
|
28108
|
-
const detectedSlide =
|
|
28109
|
-
const detectedVerb = initialAction ?
|
|
28278
|
+
const detectedType = detectHyperlinkTargetType(initialUrl, initialAction);
|
|
28279
|
+
const emailParts = parseHyperlinkEmailUrl(initialUrl || "");
|
|
28280
|
+
const detectedSlide = parseHyperlinkSlideNumber(initialUrl, initialAction);
|
|
28281
|
+
const detectedVerb = initialAction ? HYPERLINK_ACTION_VERB_MAP[initialAction.toLowerCase()] || "nextSlide" : "nextSlide";
|
|
28110
28282
|
const [targetType, setTargetType] = useState(detectedType);
|
|
28111
28283
|
const [url, setUrl] = useState(
|
|
28112
28284
|
detectedType === "email" || detectedType === "slide" || detectedType === "action" ? "" : initialUrl || ""
|
|
@@ -28729,10 +28901,13 @@ function ViewerToolbarSection(props) {
|
|
|
28729
28901
|
onEnableEditing,
|
|
28730
28902
|
onSetSnapToGrid,
|
|
28731
28903
|
onSetSnapToShape,
|
|
28732
|
-
onSetShowGuides
|
|
28904
|
+
onSetShowGuides,
|
|
28905
|
+
ribbonDisplay
|
|
28733
28906
|
} = props;
|
|
28734
28907
|
const { t } = useTranslation();
|
|
28735
28908
|
const customization = useViewerCustomizationContext();
|
|
28909
|
+
const ribbon = useRibbonDisplayFallback(ribbonDisplay);
|
|
28910
|
+
const ribbonLayout = useController(ribbon).layout;
|
|
28736
28911
|
const handleAddAnimation = useCallback(
|
|
28737
28912
|
(preset, group) => {
|
|
28738
28913
|
if (!selectedElement || !activeSlide) {
|
|
@@ -28978,7 +29153,7 @@ function ViewerToolbarSection(props) {
|
|
|
28978
29153
|
[onSetMode, onPresentFromBeginning, printHandlers, exportHandlers, slideOps, s, zoom]
|
|
28979
29154
|
);
|
|
28980
29155
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28981
|
-
!dialogs.isNarrowViewport && isPanelVisible(customization, "titleBar") && /* @__PURE__ */ jsx(
|
|
29156
|
+
!dialogs.isNarrowViewport && isPanelVisible(customization, "titleBar") && ribbonLayout.titleBar && /* @__PURE__ */ jsx(
|
|
28982
29157
|
TitleBar,
|
|
28983
29158
|
{
|
|
28984
29159
|
mode,
|
|
@@ -29012,6 +29187,7 @@ function ViewerToolbarSection(props) {
|
|
|
29012
29187
|
canEdit,
|
|
29013
29188
|
isProtectedView,
|
|
29014
29189
|
onEnableEditing,
|
|
29190
|
+
ribbonDisplay: ribbon,
|
|
29015
29191
|
onQuickCommand: handleQuickAccessCommand,
|
|
29016
29192
|
hiddenActions,
|
|
29017
29193
|
recentPresentationsCount,
|
|
@@ -30202,7 +30378,13 @@ function useStageAnimationTriggers(root, slide, triggers, onStageClick) {
|
|
|
30202
30378
|
}
|
|
30203
30379
|
};
|
|
30204
30380
|
}
|
|
30205
|
-
function PresentationStage({
|
|
30381
|
+
function PresentationStage(props) {
|
|
30382
|
+
const inherited = useContext(ElementRenderErrorReportingContext);
|
|
30383
|
+
const reporter = props.onElementRenderError ?? inherited?.onElementRenderError;
|
|
30384
|
+
const errorReporting = useMemo(() => ({ onElementRenderError: reporter }), [reporter]);
|
|
30385
|
+
return /* @__PURE__ */ jsx(ElementRenderErrorReportingContext.Provider, { value: errorReporting, children: /* @__PURE__ */ jsx(PresentationStageContent, { ...props }) });
|
|
30386
|
+
}
|
|
30387
|
+
function PresentationStageContent({
|
|
30206
30388
|
activeSlide,
|
|
30207
30389
|
templateElements,
|
|
30208
30390
|
canvasSize,
|
|
@@ -33932,26 +34114,39 @@ function useViewerCustomization(customization, legacyHiddenActions, optionsStore
|
|
|
33932
34114
|
return { resolved, api: controller.api, hiddenActions };
|
|
33933
34115
|
}
|
|
33934
34116
|
var NO_LOCALES = [];
|
|
34117
|
+
var BUILT_IN_CONTROLS = {
|
|
34118
|
+
localeCode: "en",
|
|
34119
|
+
locales: NO_LOCALES,
|
|
34120
|
+
selectLocale: () => {
|
|
34121
|
+
},
|
|
34122
|
+
languageSelectable: false
|
|
34123
|
+
};
|
|
33935
34124
|
var toCatalogEntry = (code) => LOCALE_CATALOG.find((entry) => entry.code === code) ?? { code, label: code, nativeLabel: code };
|
|
33936
34125
|
function useHostLanguage({
|
|
33937
34126
|
defaultLocale,
|
|
33938
34127
|
availableLocales,
|
|
33939
34128
|
onLocaleChange
|
|
33940
34129
|
}) {
|
|
33941
|
-
const
|
|
34130
|
+
const host = useRegisteredHostI18next();
|
|
34131
|
+
const t = host?.t;
|
|
34132
|
+
const i18n = host?.i18n;
|
|
34133
|
+
const readsInstance = i18n !== void 0;
|
|
33942
34134
|
const [localeCode, setLocaleCode] = useState(
|
|
33943
34135
|
() => defaultLocale ?? readStoredViewerPrefs().localeCode ?? "en"
|
|
33944
34136
|
);
|
|
33945
34137
|
useEffect(() => {
|
|
33946
|
-
if (localeCode !== "en" && !onLocaleChange) {
|
|
33947
|
-
void i18n.changeLanguage(localeCode);
|
|
34138
|
+
if (i18n && localeCode !== "en" && !onLocaleChange) {
|
|
34139
|
+
void i18n.changeLanguage?.(localeCode);
|
|
33948
34140
|
}
|
|
33949
|
-
}, []);
|
|
34141
|
+
}, [readsInstance]);
|
|
33950
34142
|
const locales = useMemo(() => {
|
|
33951
34143
|
if (availableLocales) {
|
|
33952
34144
|
return availableLocales;
|
|
33953
34145
|
}
|
|
33954
|
-
|
|
34146
|
+
if (!i18n) {
|
|
34147
|
+
return NO_LOCALES;
|
|
34148
|
+
}
|
|
34149
|
+
const registeredCodes = i18n.options?.resources ? Object.keys(i18n.options.resources) : Array.isArray(i18n.languages) ? i18n.languages : ["en"];
|
|
33955
34150
|
return registeredCodes.map(toCatalogEntry);
|
|
33956
34151
|
}, [availableLocales, i18n]);
|
|
33957
34152
|
const selectLocale = useCallback(
|
|
@@ -33959,18 +34154,21 @@ function useHostLanguage({
|
|
|
33959
34154
|
setLocaleCode(code);
|
|
33960
34155
|
if (onLocaleChange) {
|
|
33961
34156
|
onLocaleChange(code);
|
|
33962
|
-
} else {
|
|
33963
|
-
void i18n.changeLanguage(code);
|
|
34157
|
+
} else if (i18n) {
|
|
34158
|
+
void i18n.changeLanguage?.(code);
|
|
33964
34159
|
writeStoredViewerPrefs({ localeCode: code });
|
|
33965
34160
|
}
|
|
33966
34161
|
},
|
|
33967
34162
|
[onLocaleChange, i18n]
|
|
33968
34163
|
);
|
|
33969
|
-
const language = i18n
|
|
33970
|
-
const state = useMemo(
|
|
34164
|
+
const language = i18n ? hostInstanceLanguage(i18n) ?? localeCode : "en";
|
|
34165
|
+
const state = useMemo(
|
|
34166
|
+
() => t ? { t, locale: language } : BUILT_IN_ENGLISH,
|
|
34167
|
+
[t, language]
|
|
34168
|
+
);
|
|
33971
34169
|
const controls = useMemo(
|
|
33972
|
-
() =>
|
|
33973
|
-
[localeCode, locales, selectLocale]
|
|
34170
|
+
() => readsInstance ? { localeCode, locales, selectLocale, languageSelectable: true } : BUILT_IN_CONTROLS,
|
|
34171
|
+
[readsInstance, localeCode, locales, selectLocale]
|
|
33974
34172
|
);
|
|
33975
34173
|
return { state, controls };
|
|
33976
34174
|
}
|
|
@@ -34003,11 +34201,16 @@ function provideLanguage({ state, controls }, children) {
|
|
|
34003
34201
|
function HostLanguageRoot({ children, ...props }) {
|
|
34004
34202
|
return provideLanguage(useHostLanguage(props), children);
|
|
34005
34203
|
}
|
|
34204
|
+
function BuiltInLanguageRoot({ children }) {
|
|
34205
|
+
return provideLanguage({ state: BUILT_IN_ENGLISH, controls: BUILT_IN_CONTROLS }, children);
|
|
34206
|
+
}
|
|
34006
34207
|
function ProvidedLanguageRoot({ children, ...props }) {
|
|
34007
34208
|
return provideLanguage(useProvidedLanguage(props), children);
|
|
34008
34209
|
}
|
|
34009
34210
|
function ViewerI18nRoot(props) {
|
|
34010
|
-
const
|
|
34211
|
+
const [readsHost] = useState(() => registeredHostI18next() !== null);
|
|
34212
|
+
const FromHost = readsHost ? HostLanguageRoot : BuiltInLanguageRoot;
|
|
34213
|
+
const Root = useContext(PptxI18nContext) ? ProvidedLanguageRoot : FromHost;
|
|
34011
34214
|
return /* @__PURE__ */ jsx(Root, { ...props });
|
|
34012
34215
|
}
|
|
34013
34216
|
function useViewerLocaleControls() {
|
|
@@ -34035,6 +34238,8 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
|
|
|
34035
34238
|
const {
|
|
34036
34239
|
content: incomingContent,
|
|
34037
34240
|
fonts = [],
|
|
34241
|
+
ribbonDisplay,
|
|
34242
|
+
onRibbonDisplayChange,
|
|
34038
34243
|
filePath: hostFilePath,
|
|
34039
34244
|
fileName: hostFileName,
|
|
34040
34245
|
canEdit: canEditProp = false,
|
|
@@ -34268,6 +34473,12 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
|
|
|
34268
34473
|
activeSlide,
|
|
34269
34474
|
selectedElement
|
|
34270
34475
|
} = state;
|
|
34476
|
+
const ribbonDisplayController = useRibbonDisplayController({
|
|
34477
|
+
ribbonDisplay,
|
|
34478
|
+
onRibbonDisplayChange,
|
|
34479
|
+
collapseRibbonAutomatically: viewerOptions.general.collapseRibbonAutomatically,
|
|
34480
|
+
rootRef: containerRef
|
|
34481
|
+
});
|
|
34271
34482
|
useLoadNotifications({
|
|
34272
34483
|
loading,
|
|
34273
34484
|
error,
|
|
@@ -34413,7 +34624,10 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
|
|
|
34413
34624
|
canvasSize,
|
|
34414
34625
|
selectedElements: state.selectedElements,
|
|
34415
34626
|
fitPadding: props.fitPadding,
|
|
34416
|
-
maxFitScale: props.maxFitScale
|
|
34627
|
+
maxFitScale: props.maxFitScale,
|
|
34628
|
+
// Nothing to select in a read-only view, so a plain drag pans instead.
|
|
34629
|
+
dragPans: mode === "preview",
|
|
34630
|
+
activeSlideId: activeSlide?.id
|
|
34417
34631
|
});
|
|
34418
34632
|
const { setIsDirty } = state;
|
|
34419
34633
|
const onChangeCallback = useRef(onChange);
|
|
@@ -34661,6 +34875,14 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
|
|
|
34661
34875
|
filePath,
|
|
34662
34876
|
fileName,
|
|
34663
34877
|
storage,
|
|
34878
|
+
// The host persisted the current revision: its work is in the file, so the recovery
|
|
34879
|
+
// copy goes unless Options > Save asks to keep the last AutoRecover version.
|
|
34880
|
+
discardRecoveryOnHostSave: () => {
|
|
34881
|
+
if (filePath && shouldDiscardAutosaveOnSuccessfulSave(viewerOptions)) {
|
|
34882
|
+
void deleteAutosaveSnapshot(filePath, storage).catch(() => {
|
|
34883
|
+
});
|
|
34884
|
+
}
|
|
34885
|
+
},
|
|
34664
34886
|
// A failed Save / Save As: the host's `onError`, and the save-failed notice for the user.
|
|
34665
34887
|
onSaveError: (saveError) => {
|
|
34666
34888
|
onError?.(saveFailureMessage(saveError));
|
|
@@ -35025,6 +35247,7 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
|
|
|
35025
35247
|
onToggleAiPanel: aiPanel.toggle,
|
|
35026
35248
|
isProtectedView,
|
|
35027
35249
|
onEnableEditing: hostCanEdit && isEditingAllowed(customizationResolved) ? handleEnableEditing : void 0,
|
|
35250
|
+
ribbonDisplay: ribbonDisplayController,
|
|
35028
35251
|
onSetSnapToGrid: viewPreferencesSync.handleSetSnapToGrid,
|
|
35029
35252
|
onSetSnapToShape: viewPreferencesSync.handleSetSnapToShape,
|
|
35030
35253
|
onSetShowGuides: viewPreferencesSync.handleSetShowGuides
|
|
@@ -35514,30 +35737,5 @@ function CollaborationFollowLayer({
|
|
|
35514
35737
|
}
|
|
35515
35738
|
) }) });
|
|
35516
35739
|
}
|
|
35517
|
-
var asMessageParams = (params) => params;
|
|
35518
|
-
function withEnglishFallback(translate) {
|
|
35519
|
-
return (key, defaultOrParams) => {
|
|
35520
|
-
const params = typeof defaultOrParams === "string" ? { defaultValue: defaultOrParams } : defaultOrParams;
|
|
35521
|
-
let text;
|
|
35522
|
-
try {
|
|
35523
|
-
text = params === void 0 ? translate(key) : translate(key, params);
|
|
35524
|
-
} catch {
|
|
35525
|
-
text = void 0;
|
|
35526
|
-
}
|
|
35527
|
-
const found = text && text !== key ? text : translationsEn[key] ?? params?.defaultValue;
|
|
35528
|
-
return typeof found === "string" ? interpolate(found, asMessageParams(params), "double") : keyToLabel(key);
|
|
35529
|
-
};
|
|
35530
|
-
}
|
|
35531
|
-
function PptxI18nProvider({
|
|
35532
|
-
translate,
|
|
35533
|
-
locale,
|
|
35534
|
-
children
|
|
35535
|
-
}) {
|
|
35536
|
-
const state = useMemo(
|
|
35537
|
-
() => ({ t: withEnglishFallback(translate), locale }),
|
|
35538
|
-
[translate, locale]
|
|
35539
|
-
);
|
|
35540
|
-
return /* @__PURE__ */ jsx(PptxI18nContext.Provider, { value: state, children });
|
|
35541
|
-
}
|
|
35542
35740
|
|
|
35543
|
-
export { CollaborationStatusIndicator, PowerPointViewer2 as PowerPointViewer,
|
|
35741
|
+
export { CollaborationStatusIndicator, PowerPointViewer2 as PowerPointViewer, SlideCanvas, SlideTemplateGalleryDialog, SlideTemplatePreview, SlideThumbnail, SlidesPaneSidebar, Toolbar, UserAvatarBar, ViewerThemeProvider, useViewerTheme };
|