pptx-react-viewer 4.63.1 → 4.64.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +59 -0
- package/dist/{AiChatPanel-7DESUEAZ.js → AiChatPanel-7AFFNYEN.js} +19 -19
- package/dist/AiChatPanel-7AFFNYEN.js.br +0 -0
- package/dist/AiChatPanel-7AFFNYEN.js.gz +0 -0
- package/dist/{AiChatPanel-GQ64SIYP.mjs → AiChatPanel-7U7IJRNY.mjs} +1 -1
- package/dist/AiChatPanel-7U7IJRNY.mjs.br +0 -0
- package/dist/AiChatPanel-7U7IJRNY.mjs.gz +0 -0
- package/dist/ai.js +2 -2
- package/dist/ai.js.br +1 -2
- 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-5KFSMXI4.js → chunk-5DBKW7F3.js} +8 -3
- package/dist/chunk-5DBKW7F3.js.br +0 -0
- package/dist/{chunk-5KFSMXI4.js.gz → chunk-5DBKW7F3.js.gz} +0 -0
- package/dist/{chunk-MR3ZSEHS.mjs → chunk-5ZW3GP6C.mjs} +6 -5
- package/dist/chunk-5ZW3GP6C.mjs.br +0 -0
- package/dist/chunk-5ZW3GP6C.mjs.gz +0 -0
- package/dist/{chunk-FYQVCABH.mjs → chunk-G5JGUSBL.mjs} +253 -230
- package/dist/chunk-G5JGUSBL.mjs.br +0 -0
- package/dist/chunk-G5JGUSBL.mjs.gz +0 -0
- package/dist/{chunk-MWFBZ5SJ.js → chunk-GXL2XMST.js} +832 -651
- package/dist/chunk-GXL2XMST.js.br +0 -0
- package/dist/chunk-GXL2XMST.js.gz +0 -0
- package/dist/{chunk-H6KYXOKK.mjs → chunk-HZBEKG5R.mjs} +281 -100
- package/dist/chunk-HZBEKG5R.mjs.br +0 -0
- package/dist/chunk-HZBEKG5R.mjs.gz +0 -0
- package/dist/{chunk-F6WCYCHV.js → chunk-PNDORR6S.js} +1 -1
- package/dist/chunk-PNDORR6S.js.br +0 -0
- package/dist/chunk-PNDORR6S.js.gz +0 -0
- package/dist/{chunk-TXVGYIO6.js → chunk-VGU5S37T.js} +450 -428
- package/dist/chunk-VGU5S37T.js.br +0 -0
- package/dist/chunk-VGU5S37T.js.gz +0 -0
- package/dist/{chunk-NE5JQMED.mjs → chunk-WAIX4VJ2.mjs} +1 -1
- package/dist/chunk-WAIX4VJ2.mjs.br +0 -0
- package/dist/chunk-WAIX4VJ2.mjs.gz +0 -0
- package/dist/i18n/de.cjs +89 -43
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +89 -43
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +89 -43
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +89 -43
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +89 -43
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +89 -43
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +95 -49
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +95 -49
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/index.d.ts +10 -1
- package/dist/index.js +27 -27
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +10 -0
- package/dist/internals.js +81 -81
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +2 -2
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer-canvas.css +1 -1
- package/dist/pptx-viewer-canvas.css.br +0 -0
- package/dist/pptx-viewer-canvas.css.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.d.ts +10 -1
- package/dist/viewer/index.js +21 -21
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +3 -3
- package/dist/AiChatPanel-7DESUEAZ.js.br +0 -0
- package/dist/AiChatPanel-7DESUEAZ.js.gz +0 -0
- package/dist/AiChatPanel-GQ64SIYP.mjs.br +0 -0
- package/dist/AiChatPanel-GQ64SIYP.mjs.gz +0 -0
- package/dist/chunk-5KFSMXI4.js.br +0 -0
- package/dist/chunk-F6WCYCHV.js.br +0 -0
- package/dist/chunk-F6WCYCHV.js.gz +0 -0
- package/dist/chunk-FYQVCABH.mjs.br +0 -0
- package/dist/chunk-FYQVCABH.mjs.gz +0 -0
- package/dist/chunk-H6KYXOKK.mjs.br +0 -0
- package/dist/chunk-H6KYXOKK.mjs.gz +0 -0
- package/dist/chunk-MR3ZSEHS.mjs.br +0 -0
- package/dist/chunk-MR3ZSEHS.mjs.gz +0 -0
- package/dist/chunk-MWFBZ5SJ.js.br +0 -0
- package/dist/chunk-MWFBZ5SJ.js.gz +0 -0
- package/dist/chunk-NE5JQMED.mjs.br +0 -0
- package/dist/chunk-NE5JQMED.mjs.gz +0 -0
- package/dist/chunk-TXVGYIO6.js.br +0 -0
- package/dist/chunk-TXVGYIO6.js.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { aiAssistants, AiChatPanelLazy } from './chunk-
|
|
2
|
-
import { useCollaboration, useVirtualizedSlides, StaticElementRenderer, useModalDismissDrag, useToolbarVisibility, useViewerOptionsContext, 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,
|
|
3
|
-
import { useTranslation, DEFAULT_SECTION_GROUP_ID, cn, getShapeAdjustmentHandleDescriptors, isConnectorOrLineElement, PptxI18nContext, TOOLBAR_SECTIONS, GRID_SIZE, getElementTransformWithoutRotation, getElementTransform, MIN_ELEMENT_SIZE, UNGROUPED_SECTION_ID, ViewerLocaleControlsContext, hasCopyableFormat, ViewerI18nContext, useHostI18next,
|
|
4
|
-
import { ANIMATION_DIRECTION_LABEL_KEYS, buildQuickStylesGallery, editorThumbnailWidth, EDITOR_THUMBNAIL_WIDTH, buildSlideTemplateContent, SLIDE_TEMPLATES, homeLaunchers, attachRibbonOverflow, isPanelVisible, parentSelection, slideSpaceElement, isGroupMember, motionPathFor, setMotionPath, RULER_THICKNESS, shouldShowElementHandles, deviceStrokeStageStyle, editorThumbnailStep, resolveSlidePaneClick, SLIDE_VIRTUALIZATION_THRESHOLD, buildSectionContextMenuEntries, buildSlidePaneContextMenuEntries, slidePaneViewItems, activateModalFocus, visibleContextualTabs, resolveActiveRibbonTab, visibleRibbonAddIns, isDialogAvailable, resolveScreenTip, RIBBON_ADD_IN_TAB_ATTR, contextualTabLabelKey, RIBBON_CONTEXTUAL_TAB_ATTR, buildTabRowActionsState, isFeatureEnabled, TAB_ROW_ACTION_CLASSES, tabRowActionsAttributes, buildTitleBarState, backstageNavEntries, BACKSTAGE_NAV, listBackstageRecentFiles, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, DEFAULT_INSERT_CHART_KIND, FREEFORM_TOOL_IDS, isDrawingToolVisible, textFontSizePtToPx, withHomeGalleries, drawingHomeControls, homeGalleryControls, homeGalleryApply, shapeOutlineChange, shapeFillChange, editingHomeControls, arrangeHomeControls, arrangePainterHomeControls, arrangeAlignAction, DESIGN_RIBBON_GROUPS, FIXED_TAB_GALLERIES, DESIGN_RIBBON_COMMANDS, designCommandState, CONTEXTUAL_TAB_GROUPS, attachEditorImagePaste, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, resolveElementInteractivity, buildChartQuickActionsDescriptor, applyChartElementToggle, CHART_QUICK_ACTION_BUTTON_SIZE, applyChartStylePreset, hideChartSeries, restoreFilteredSeries, buildCropOverlay, CROP_HANDLE_ARIA_KEY, getActiveXControlOverlayView, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, canEditElementPoints, getSlideBackgroundStyle, sectionAddAfterSlideIndex, EMPTY_RESOLVED_CUSTOMIZATION, getRegionRenderer, ViewerRegionHost, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, customizeBackstageCards, backstageCardsFor, 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, resolveCollaborationConfig, resolveViewerRootOptions, buildUserFontFaceStyles, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, isEditingAllowed, resolveAutosaveActivation, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, attachViewerHyperlinks, shouldConfirmExternalHyperlink, applyAutoCorrectToEdit, resolveImageResolutionScale, 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, 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, masterViewCrudActions, 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, resolvePresentationAction, isPresentationAdvanceClick, toggleBlackboard, visibleTemplateElements, PRESENT_TOOLBAR_CLASSES, resolveEditPointsAvailability, isCurrentLayout, EXPANDED_MAX_HEIGHT, statusBarState, statusBarViewMode, 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, 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, buildPreviewElements, deriveSlideFieldContext, 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-WAIX4VJ2.mjs';
|
|
2
|
+
import { useCollaboration, useVirtualizedSlides, StaticElementRenderer, useModalDismissDrag, useToolbarVisibility, useViewerOptionsContext, InlineCollaborationContext, SlideBackgroundImageLayer, ElementRenderer, withDisplayName, ResizeHandles, imgSrc, renderStrokeView, useChartFormatContext, useController, 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, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, PresentationTransitionOverlay, downloadBlob, useChartPartSelection, resolveSmartArtDataPalette, DUOTONE_PRESETS, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES } from './chunk-G5JGUSBL.mjs';
|
|
3
|
+
import { useTranslation, DEFAULT_SECTION_GROUP_ID, cn, getShapeAdjustmentHandleDescriptors, isConnectorOrLineElement, PptxI18nContext, TOOLBAR_SECTIONS, GRID_SIZE, getElementTransformWithoutRotation, getElementTransform, MIN_ELEMENT_SIZE, UNGROUPED_SECTION_ID, ViewerLocaleControlsContext, hasCopyableFormat, ViewerI18nContext, useHostI18next, isPpactionUrl, parsePpactionUrl, SHORTCUT_REFERENCE_ITEMS, safeOpenUrl, isUrlSafe, computeHandoutLayout, getPrintableArea, generateNoteLineCount, normalizeHexColor, SLIDE_NAV_THUMBNAIL_WIDTH, SLIDE_TRANSITION_OPTIONS, getElementLabel, TABLE_STYLE_PRESETS, SHAPE_PRESETS, sanitizeGradientStops, formatCommentTimestamp, ANIMATION_PRESET_OPTIONS, clampCropValue, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, DEFAULT_FILL_COLOR, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, getPatternSvg, DEFAULT_STROKE_COLOR, openNativeEyeDropper } from './chunk-5ZW3GP6C.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, 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, resolveCollaborationConfig, resolveViewerRootOptions, buildUserFontFaceStyles, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, isEditingAllowed, resolveAutosaveActivation, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, attachViewerHyperlinks, shouldConfirmExternalHyperlink, confirmExternalHyperlinkDialog, applyAutoCorrectToEdit, resolveImageResolutionScale, 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, 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, buildPreviewElements, deriveSlideFieldContext, 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
6
|
import React108, { createContext, useContext, useRef, useMemo, 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';
|
|
@@ -1639,6 +1639,59 @@ function WebSearch({
|
|
|
1639
1639
|
useHostEvent(ref, "keydown", onKeyDown);
|
|
1640
1640
|
return /* @__PURE__ */ jsx("pptx-ui-search", { ref, value, disabled: disabled || void 0, ...rest });
|
|
1641
1641
|
}
|
|
1642
|
+
function WebOpenPlaces({
|
|
1643
|
+
providers,
|
|
1644
|
+
accept,
|
|
1645
|
+
labels,
|
|
1646
|
+
locale,
|
|
1647
|
+
selected,
|
|
1648
|
+
onPlaceChange,
|
|
1649
|
+
onOpen,
|
|
1650
|
+
children,
|
|
1651
|
+
...rest
|
|
1652
|
+
}) {
|
|
1653
|
+
const ref = useRef(null);
|
|
1654
|
+
useLayoutEffect(() => {
|
|
1655
|
+
const host = ref.current;
|
|
1656
|
+
if (host) {
|
|
1657
|
+
host.providers = providers;
|
|
1658
|
+
host.accept = accept;
|
|
1659
|
+
host.labels = labels;
|
|
1660
|
+
host.locale = locale;
|
|
1661
|
+
host.selected = selected ?? "device";
|
|
1662
|
+
}
|
|
1663
|
+
}, [providers, accept, labels, locale, selected]);
|
|
1664
|
+
useEffect(() => {
|
|
1665
|
+
const host = ref.current;
|
|
1666
|
+
if (!host) {
|
|
1667
|
+
return;
|
|
1668
|
+
}
|
|
1669
|
+
const change = (event) => onPlaceChange(event.detail.place);
|
|
1670
|
+
const open = (event) => onOpen(event.detail.file);
|
|
1671
|
+
host.addEventListener("office-open-place-change", change);
|
|
1672
|
+
host.addEventListener("office-cloud-file-open", open);
|
|
1673
|
+
return () => {
|
|
1674
|
+
host.removeEventListener("office-open-place-change", change);
|
|
1675
|
+
host.removeEventListener("office-cloud-file-open", open);
|
|
1676
|
+
};
|
|
1677
|
+
}, [onPlaceChange, onOpen]);
|
|
1678
|
+
return /* @__PURE__ */ jsx("pptx-ui-open-places", { ref, ...rest, children });
|
|
1679
|
+
}
|
|
1680
|
+
function WebConnectedServices({
|
|
1681
|
+
providers,
|
|
1682
|
+
labels,
|
|
1683
|
+
...rest
|
|
1684
|
+
}) {
|
|
1685
|
+
const ref = useRef(null);
|
|
1686
|
+
useLayoutEffect(() => {
|
|
1687
|
+
const host = ref.current;
|
|
1688
|
+
if (host) {
|
|
1689
|
+
host.providers = providers;
|
|
1690
|
+
host.labels = labels;
|
|
1691
|
+
}
|
|
1692
|
+
}, [providers, labels]);
|
|
1693
|
+
return /* @__PURE__ */ jsx("pptx-ui-connected-services", { ref, ...rest });
|
|
1694
|
+
}
|
|
1642
1695
|
function WebSelect({
|
|
1643
1696
|
value,
|
|
1644
1697
|
disabled = false,
|
|
@@ -2715,6 +2768,11 @@ function DrawSection(p) {
|
|
|
2715
2768
|
}, [p, pushColor]);
|
|
2716
2769
|
return /* @__PURE__ */ jsx("pptx-ui-ribbon-draw", { ref });
|
|
2717
2770
|
}
|
|
2771
|
+
var NONE = { providers: [], open: () => void 0, clear: () => void 0 };
|
|
2772
|
+
var ViewerCloudFilesContext = createContext(NONE);
|
|
2773
|
+
function useViewerCloudFiles() {
|
|
2774
|
+
return useContext(ViewerCloudFilesContext);
|
|
2775
|
+
}
|
|
2718
2776
|
var ViewerStorageContext = createContext(void 0);
|
|
2719
2777
|
function useViewerStorage() {
|
|
2720
2778
|
return useContext(ViewerStorageContext);
|
|
@@ -2765,6 +2823,8 @@ function AccountPage() {
|
|
|
2765
2823
|
const { t } = useTranslation();
|
|
2766
2824
|
const accountAuth = useContext(AccountAuthContext);
|
|
2767
2825
|
const storage = useViewerStorage();
|
|
2826
|
+
const cloud = useViewerCloudFiles();
|
|
2827
|
+
const connectedLabels = useMemo(() => connectedServicesLabels(t), [t]);
|
|
2768
2828
|
const [profile, setProfile] = useState(
|
|
2769
2829
|
() => readStoredViewerPrefs().profile ?? DEFAULT_VIEWER_PROFILE
|
|
2770
2830
|
);
|
|
@@ -2779,18 +2839,16 @@ function AccountPage() {
|
|
|
2779
2839
|
void getLocalStorageUsageSummary(storage).then(setUsage);
|
|
2780
2840
|
};
|
|
2781
2841
|
useEffect(refreshUsage, [storage]);
|
|
2782
|
-
const handleClear = () => {
|
|
2783
|
-
if (!
|
|
2842
|
+
const handleClear = async () => {
|
|
2843
|
+
if (!await confirmDeleteDialog(t("pptx.account.storage.clearConfirm"), { t })) {
|
|
2784
2844
|
return;
|
|
2785
2845
|
}
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
return void 0;
|
|
2791
|
-
});
|
|
2846
|
+
await clearAllLocalViewerData(storage);
|
|
2847
|
+
setCleared(true);
|
|
2848
|
+
refreshUsage();
|
|
2849
|
+
setTimeout(() => setCleared(false), 4e3);
|
|
2792
2850
|
};
|
|
2793
|
-
const version = "4.
|
|
2851
|
+
const version = "4.64.1" ;
|
|
2794
2852
|
return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
2795
2853
|
/* @__PURE__ */ jsxs("section", { className: cardClass, children: [
|
|
2796
2854
|
/* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -2854,7 +2912,7 @@ function AccountPage() {
|
|
|
2854
2912
|
"button",
|
|
2855
2913
|
{
|
|
2856
2914
|
type: "button",
|
|
2857
|
-
onClick: handleClear,
|
|
2915
|
+
onClick: () => void handleClear(),
|
|
2858
2916
|
className: "mt-4 border border-destructive/40 px-4 py-2 text-xs font-semibold text-destructive hover:bg-destructive/10",
|
|
2859
2917
|
children: t("pptx.account.storage.clear")
|
|
2860
2918
|
}
|
|
@@ -2890,7 +2948,8 @@ function AccountPage() {
|
|
|
2890
2948
|
}
|
|
2891
2949
|
)
|
|
2892
2950
|
] })
|
|
2893
|
-
] })
|
|
2951
|
+
] }),
|
|
2952
|
+
cloud.providers.length > 0 && /* @__PURE__ */ jsx("section", { className: cardClass, children: /* @__PURE__ */ jsx(WebConnectedServices, { providers: cloud.providers, labels: connectedLabels }) })
|
|
2894
2953
|
] });
|
|
2895
2954
|
}
|
|
2896
2955
|
var actionClass = "group flex min-h-28 items-start gap-4 border border-border bg-card p-5 text-left text-card-foreground transition hover:border-primary hover:shadow-md";
|
|
@@ -3046,7 +3105,7 @@ function BackstageNavIcon({ page }) {
|
|
|
3046
3105
|
return Icon ? /* @__PURE__ */ jsx(Icon, { className: "size-[17px] shrink-0", "aria-hidden": "true" }) : null;
|
|
3047
3106
|
}
|
|
3048
3107
|
function FileSection(p) {
|
|
3049
|
-
const { t } = useTranslation();
|
|
3108
|
+
const { t, locale } = useTranslation();
|
|
3050
3109
|
const [requestedPage, setRequestedPage] = useState("home");
|
|
3051
3110
|
const customization = useViewerCustomizationContext();
|
|
3052
3111
|
const nav = backstageNavEntries(BACKSTAGE_NAV, customization);
|
|
@@ -3057,6 +3116,9 @@ function FileSection(p) {
|
|
|
3057
3116
|
const { isHidden } = useToolbarVisibility(p.hiddenActions);
|
|
3058
3117
|
const exportHidden = isHidden("export");
|
|
3059
3118
|
const storage = useViewerStorage();
|
|
3119
|
+
const cloud = useViewerCloudFiles();
|
|
3120
|
+
const placeLabels = useMemo(() => openPlacesLabels(t), [t]);
|
|
3121
|
+
const [placeId, setPlaceId] = useState();
|
|
3060
3122
|
useEffect(() => {
|
|
3061
3123
|
void listBackstageRecentFiles(t, p.recentPresentationsCount, storage).then(setRecent);
|
|
3062
3124
|
}, [t, p.recentPresentationsCount, storage]);
|
|
@@ -3077,6 +3139,41 @@ function FileSection(p) {
|
|
|
3077
3139
|
const regionId = hostPage ? `backstage.host.${hostPage.id}` : `backstage.${page}`;
|
|
3078
3140
|
const builtInRegionRenderer = useRegionRenderer(regionId);
|
|
3079
3141
|
const regionRenderer = hostPage ? hostPage.render : builtInRegionRenderer;
|
|
3142
|
+
const device = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3143
|
+
/* @__PURE__ */ jsx(
|
|
3144
|
+
WebSearch,
|
|
3145
|
+
{
|
|
3146
|
+
"data-pptx-search-surface": true,
|
|
3147
|
+
"data-pptx-search-input": true,
|
|
3148
|
+
className: "mt-8 w-full max-w-[540px]",
|
|
3149
|
+
value: query,
|
|
3150
|
+
onInput: (event) => setQuery(event.currentTarget.value),
|
|
3151
|
+
placeholder: t("pptx.backstage.searchPlaceholder"),
|
|
3152
|
+
"aria-label": t("pptx.backstage.searchPlaceholder")
|
|
3153
|
+
}
|
|
3154
|
+
),
|
|
3155
|
+
page === "open" && /* @__PURE__ */ jsxs(
|
|
3156
|
+
"button",
|
|
3157
|
+
{
|
|
3158
|
+
type: "button",
|
|
3159
|
+
className: "mt-4 inline-flex items-center gap-2 bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground hover:opacity-90",
|
|
3160
|
+
onClick: () => run(p.onOpenFile),
|
|
3161
|
+
children: [
|
|
3162
|
+
/* @__PURE__ */ jsx(LuFolderOpen, {}),
|
|
3163
|
+
" ",
|
|
3164
|
+
t("pptx.backstage.browseDevice")
|
|
3165
|
+
]
|
|
3166
|
+
}
|
|
3167
|
+
),
|
|
3168
|
+
/* @__PURE__ */ jsx("h2", { className: "mt-6 text-[16px] font-semibold", children: t("pptx.backstage.recentHeading") }),
|
|
3169
|
+
/* @__PURE__ */ jsx(
|
|
3170
|
+
BackstageRecentList,
|
|
3171
|
+
{
|
|
3172
|
+
files: visibleRecent,
|
|
3173
|
+
onOpen: (key) => run(() => p.onOpenRecentFile?.(key))
|
|
3174
|
+
}
|
|
3175
|
+
)
|
|
3176
|
+
] });
|
|
3080
3177
|
return /* @__PURE__ */ jsxs(
|
|
3081
3178
|
"div",
|
|
3082
3179
|
{
|
|
@@ -3147,44 +3244,26 @@ function FileSection(p) {
|
|
|
3147
3244
|
(page === "home" || page === "new") && /* @__PURE__ */ jsx(
|
|
3148
3245
|
BackstageNewGallery,
|
|
3149
3246
|
{
|
|
3150
|
-
onCreate: (templateId) => run(() =>
|
|
3247
|
+
onCreate: (templateId) => run(() => {
|
|
3248
|
+
cloud.clear();
|
|
3249
|
+
p.onCreatePresentation(templateId);
|
|
3250
|
+
})
|
|
3151
3251
|
}
|
|
3152
3252
|
),
|
|
3153
|
-
(page === "home" || page === "open") && /* @__PURE__ */
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
"button",
|
|
3168
|
-
{
|
|
3169
|
-
type: "button",
|
|
3170
|
-
className: "mt-4 inline-flex items-center gap-2 bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground hover:opacity-90",
|
|
3171
|
-
onClick: () => run(p.onOpenFile),
|
|
3172
|
-
children: [
|
|
3173
|
-
/* @__PURE__ */ jsx(LuFolderOpen, {}),
|
|
3174
|
-
" ",
|
|
3175
|
-
t("pptx.backstage.browseDevice")
|
|
3176
|
-
]
|
|
3177
|
-
}
|
|
3178
|
-
),
|
|
3179
|
-
/* @__PURE__ */ jsx("h2", { className: "mt-6 text-[16px] font-semibold", children: t("pptx.backstage.recentHeading") }),
|
|
3180
|
-
/* @__PURE__ */ jsx(
|
|
3181
|
-
BackstageRecentList,
|
|
3182
|
-
{
|
|
3183
|
-
files: visibleRecent,
|
|
3184
|
-
onOpen: (key) => run(() => p.onOpenRecentFile?.(key))
|
|
3185
|
-
}
|
|
3186
|
-
)
|
|
3187
|
-
] }),
|
|
3253
|
+
(page === "home" || page === "open") && (page === "open" ? /* @__PURE__ */ jsx(
|
|
3254
|
+
WebOpenPlaces,
|
|
3255
|
+
{
|
|
3256
|
+
className: "block max-w-[900px]",
|
|
3257
|
+
providers: cloud.providers,
|
|
3258
|
+
accept: CLOUD_OPEN_ACCEPT,
|
|
3259
|
+
labels: placeLabels,
|
|
3260
|
+
locale,
|
|
3261
|
+
selected: placeId,
|
|
3262
|
+
onPlaceChange: setPlaceId,
|
|
3263
|
+
onOpen: (file) => run(() => cloud.open(file)),
|
|
3264
|
+
children: device
|
|
3265
|
+
}
|
|
3266
|
+
) : device),
|
|
3188
3267
|
!(page === "export" && exportHidden) && /* @__PURE__ */ jsx(BackstageCards, { page, props: p, run }),
|
|
3189
3268
|
page === "account" && /* @__PURE__ */ jsx(AccountPage, {}),
|
|
3190
3269
|
page === "options" && /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[760px] border border-border bg-card p-7 text-card-foreground", children: [
|
|
@@ -5426,6 +5505,8 @@ function ToolbarPrimaryRow(p) {
|
|
|
5426
5505
|
const showInspectorToggle = isPanelVisible(customization, "inspector");
|
|
5427
5506
|
const showShare = isDialogAvailable(customization, "share");
|
|
5428
5507
|
const showSettings = isDialogAvailable(customization, "options");
|
|
5508
|
+
const enableEditingAvailable = !canEdit && Boolean(p.isProtectedView && p.onEnableEditing);
|
|
5509
|
+
const readOnlyBadge = resolveReadOnlyBadge({ editable: canEdit, enableEditingAvailable });
|
|
5429
5510
|
const qab = "p-1 max-md:p-2 max-md:min-h-[40px] max-md:min-w-[40px] rounded-sm transition-colors hover:bg-accent/60 disabled:opacity-40 disabled:cursor-not-allowed active:scale-90 active:opacity-70";
|
|
5430
5511
|
return /* @__PURE__ */ jsxs(
|
|
5431
5512
|
"div",
|
|
@@ -5527,7 +5608,7 @@ function ToolbarPrimaryRow(p) {
|
|
|
5527
5608
|
children: /* @__PURE__ */ jsx(LuSettings, { className: ics })
|
|
5528
5609
|
}
|
|
5529
5610
|
),
|
|
5530
|
-
|
|
5611
|
+
enableEditingAvailable ? /* @__PURE__ */ jsx(
|
|
5531
5612
|
"button",
|
|
5532
5613
|
{
|
|
5533
5614
|
type: "button",
|
|
@@ -5536,7 +5617,15 @@ function ToolbarPrimaryRow(p) {
|
|
|
5536
5617
|
title: t("pptx.options.trust.protectedViewInfo"),
|
|
5537
5618
|
children: t("pptx.security.enableEditing")
|
|
5538
5619
|
}
|
|
5539
|
-
) :
|
|
5620
|
+
) : readOnlyBadge.visible && /* @__PURE__ */ jsx(
|
|
5621
|
+
"span",
|
|
5622
|
+
{
|
|
5623
|
+
...{ [READ_ONLY_BADGE_ATTR]: "" },
|
|
5624
|
+
role: readOnlyBadge.role,
|
|
5625
|
+
className: "inline-flex items-center px-2 py-0.5 rounded-sm bg-amber-600/90 text-[10px] text-amber-50",
|
|
5626
|
+
children: t(readOnlyBadge.textKey)
|
|
5627
|
+
}
|
|
5628
|
+
),
|
|
5540
5629
|
/* @__PURE__ */ jsx(OverflowMenu, { ...p })
|
|
5541
5630
|
]
|
|
5542
5631
|
}
|
|
@@ -8539,6 +8628,10 @@ function SlideCanvasContent({
|
|
|
8539
8628
|
onMoveGuide
|
|
8540
8629
|
});
|
|
8541
8630
|
const slideElements = activeSlide?.elements;
|
|
8631
|
+
const edgeBleeds = useMemo(
|
|
8632
|
+
() => resolveStageEdgeBleeds(templateElements, activeSlide, selectedElementIdSet),
|
|
8633
|
+
[templateElements, activeSlide, selectedElementIdSet]
|
|
8634
|
+
);
|
|
8542
8635
|
const enteredGroup = useMemo(() => {
|
|
8543
8636
|
if (!slideElements || !selectedElement) {
|
|
8544
8637
|
return null;
|
|
@@ -8689,6 +8782,7 @@ function SlideCanvasContent({
|
|
|
8689
8782
|
showHoverBorder: false,
|
|
8690
8783
|
templateEditing: editTemplateMode,
|
|
8691
8784
|
zIndex: index,
|
|
8785
|
+
edgeBleed: edgeBleeds.get(element.id),
|
|
8692
8786
|
imageAltText: "Template element",
|
|
8693
8787
|
showResizeHandles: shouldShowElementHandles(
|
|
8694
8788
|
isEditableCanvas,
|
|
@@ -8733,6 +8827,7 @@ function SlideCanvasContent({
|
|
|
8733
8827
|
selectionColorClass: "blue-500",
|
|
8734
8828
|
showHoverBorder: true,
|
|
8735
8829
|
zIndex: templateElements.length + index,
|
|
8830
|
+
edgeBleed: edgeBleeds.get(element.id),
|
|
8736
8831
|
imageAltText: "Slide element",
|
|
8737
8832
|
showResizeHandles: shouldShowElementHandles(
|
|
8738
8833
|
isEditableCanvas,
|
|
@@ -23173,10 +23268,11 @@ function TableStyleEditor({
|
|
|
23173
23268
|
const { entry: nextEntry } = applyTableStyleFieldEdit(entry, selectedPart, fieldEdit);
|
|
23174
23269
|
onStyleMapChange({ ...styleMap, [nextEntry.styleId]: nextEntry });
|
|
23175
23270
|
}
|
|
23176
|
-
function createFromCurrent() {
|
|
23177
|
-
const name =
|
|
23271
|
+
async function createFromCurrent() {
|
|
23272
|
+
const name = await promptNameDialog(
|
|
23178
23273
|
t("pptx.tableStyleEditor.newStyleNamePrompt"),
|
|
23179
|
-
entry ? `${entry.styleName ?? ""} Copy`.trim() : ""
|
|
23274
|
+
entry ? `${entry.styleName ?? ""} Copy`.trim() : "",
|
|
23275
|
+
{ t }
|
|
23180
23276
|
);
|
|
23181
23277
|
if (!name) {
|
|
23182
23278
|
return;
|
|
@@ -23188,8 +23284,8 @@ function TableStyleEditor({
|
|
|
23188
23284
|
setActiveStyleId(created.styleId);
|
|
23189
23285
|
onAssignStyle?.(created.styleId);
|
|
23190
23286
|
}
|
|
23191
|
-
function handleDelete() {
|
|
23192
|
-
if (!entry || !styleMap || !
|
|
23287
|
+
async function handleDelete() {
|
|
23288
|
+
if (!entry || !styleMap || !await confirmDeleteDialog(t("pptx.tableStyleEditor.deleteConfirm"), { t })) {
|
|
23193
23289
|
return;
|
|
23194
23290
|
}
|
|
23195
23291
|
const nextMap = { ...styleMap };
|
|
@@ -23217,8 +23313,26 @@ function TableStyleEditor({
|
|
|
23217
23313
|
)) }),
|
|
23218
23314
|
descriptor && /* @__PURE__ */ jsx(TableStyleEditorFields, { descriptor, canEdit, onEdit: edit }),
|
|
23219
23315
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-1.5 pt-1 border-t border-border", children: [
|
|
23220
|
-
/* @__PURE__ */ jsx(
|
|
23221
|
-
|
|
23316
|
+
/* @__PURE__ */ jsx(
|
|
23317
|
+
"button",
|
|
23318
|
+
{
|
|
23319
|
+
type: "button",
|
|
23320
|
+
className: BTN2,
|
|
23321
|
+
disabled: !canEdit,
|
|
23322
|
+
onClick: () => void createFromCurrent(),
|
|
23323
|
+
children: entry ? t("pptx.tableStyleEditor.newFromCurrent") : t("pptx.tableStyleEditor.newStyle")
|
|
23324
|
+
}
|
|
23325
|
+
),
|
|
23326
|
+
entry && /* @__PURE__ */ jsx(
|
|
23327
|
+
"button",
|
|
23328
|
+
{
|
|
23329
|
+
type: "button",
|
|
23330
|
+
className: BTN2,
|
|
23331
|
+
disabled: !canEdit,
|
|
23332
|
+
onClick: () => void handleDelete(),
|
|
23333
|
+
children: t("pptx.tableStyleEditor.deleteStyle")
|
|
23334
|
+
}
|
|
23335
|
+
)
|
|
23222
23336
|
] })
|
|
23223
23337
|
] });
|
|
23224
23338
|
}
|
|
@@ -30157,6 +30271,10 @@ function PresentationStage({
|
|
|
30157
30271
|
onStageClick
|
|
30158
30272
|
);
|
|
30159
30273
|
const [box, setBox] = useState(null);
|
|
30274
|
+
const edgeBleeds = useMemo(
|
|
30275
|
+
() => resolveStageEdgeBleeds(templateElements, activeSlide),
|
|
30276
|
+
[templateElements, activeSlide]
|
|
30277
|
+
);
|
|
30160
30278
|
useEffect(() => {
|
|
30161
30279
|
const el = containerRef.current;
|
|
30162
30280
|
if (!el) {
|
|
@@ -30254,6 +30372,7 @@ function PresentationStage({
|
|
|
30254
30372
|
selectionColorClass: "blue-400",
|
|
30255
30373
|
showHoverBorder: false,
|
|
30256
30374
|
zIndex: index,
|
|
30375
|
+
edgeBleed: edgeBleeds.get(element.id),
|
|
30257
30376
|
imageAltText: "Template element",
|
|
30258
30377
|
showResizeHandles: false,
|
|
30259
30378
|
renderInk: false,
|
|
@@ -30291,6 +30410,7 @@ function PresentationStage({
|
|
|
30291
30410
|
selectionColorClass: "blue-500",
|
|
30292
30411
|
showHoverBorder: false,
|
|
30293
30412
|
zIndex: templateElements.length + index,
|
|
30413
|
+
edgeBleed: edgeBleeds.get(element.id),
|
|
30294
30414
|
imageAltText: "Slide element",
|
|
30295
30415
|
showResizeHandles: false,
|
|
30296
30416
|
renderInk: true,
|
|
@@ -30369,6 +30489,41 @@ function PresentationContextMenu(p) {
|
|
|
30369
30489
|
}
|
|
30370
30490
|
);
|
|
30371
30491
|
}
|
|
30492
|
+
function PresentationTransitionMount({
|
|
30493
|
+
presentation,
|
|
30494
|
+
slides,
|
|
30495
|
+
templateElementsBySlideId,
|
|
30496
|
+
canvasSize,
|
|
30497
|
+
scale
|
|
30498
|
+
}) {
|
|
30499
|
+
const overlay = presentation.transitionOverlay;
|
|
30500
|
+
const outgoingSlide = overlay ? slides[overlay.outgoingSlideIndex] : void 0;
|
|
30501
|
+
if (!overlay || !outgoingSlide) {
|
|
30502
|
+
return null;
|
|
30503
|
+
}
|
|
30504
|
+
const incomingSlide = slides[overlay.incomingSlideIndex];
|
|
30505
|
+
const templates = transitionTemplateElements(
|
|
30506
|
+
outgoingSlide,
|
|
30507
|
+
incomingSlide,
|
|
30508
|
+
templateElementsBySlideId
|
|
30509
|
+
);
|
|
30510
|
+
return /* @__PURE__ */ jsx(
|
|
30511
|
+
PresentationTransitionOverlay,
|
|
30512
|
+
{
|
|
30513
|
+
outgoingSlide,
|
|
30514
|
+
templateElements: templates.outgoing,
|
|
30515
|
+
incomingTemplateElements: templates.incoming,
|
|
30516
|
+
canvasSize,
|
|
30517
|
+
transition: overlay.transition,
|
|
30518
|
+
durationMs: overlay.durationMs,
|
|
30519
|
+
scale,
|
|
30520
|
+
morphPlan: presentation.morphPlan,
|
|
30521
|
+
incomingSlide,
|
|
30522
|
+
onComplete: presentation.handleTransitionOverlayComplete
|
|
30523
|
+
},
|
|
30524
|
+
`${overlay.outgoingSlideIndex}-${overlay.incomingSlideIndex}`
|
|
30525
|
+
);
|
|
30526
|
+
}
|
|
30372
30527
|
function ViewerCanvasArea(props) {
|
|
30373
30528
|
const customization = useViewerCustomizationContext();
|
|
30374
30529
|
const {
|
|
@@ -30425,12 +30580,7 @@ function ViewerCanvasArea(props) {
|
|
|
30425
30580
|
}, [s.theme, s.tableStyleMap]);
|
|
30426
30581
|
const openExternalUrl = useCallback(
|
|
30427
30582
|
(url) => {
|
|
30428
|
-
|
|
30429
|
-
|
|
30430
|
-
${url}`)) {
|
|
30431
|
-
return;
|
|
30432
|
-
}
|
|
30433
|
-
safeOpenUrl(url);
|
|
30583
|
+
void openExternalHyperlinkConfirmed(viewerOptions, url, { t });
|
|
30434
30584
|
},
|
|
30435
30585
|
[viewerOptions, t]
|
|
30436
30586
|
);
|
|
@@ -30617,26 +30767,15 @@ ${url}`)) {
|
|
|
30617
30767
|
] })
|
|
30618
30768
|
),
|
|
30619
30769
|
children: (stageScale) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30620
|
-
|
|
30621
|
-
|
|
30770
|
+
/* @__PURE__ */ jsx(
|
|
30771
|
+
PresentationTransitionMount,
|
|
30622
30772
|
{
|
|
30623
|
-
|
|
30624
|
-
|
|
30625
|
-
|
|
30626
|
-
slides[presentation.transitionOverlay.outgoingSlideIndex],
|
|
30627
|
-
s.templateElementsBySlideId[slides[presentation.transitionOverlay.outgoingSlideIndex].id] ?? []
|
|
30628
|
-
)
|
|
30629
|
-
],
|
|
30630
|
-
incomingTemplateElements: templateElements,
|
|
30773
|
+
presentation,
|
|
30774
|
+
slides,
|
|
30775
|
+
templateElementsBySlideId: s.templateElementsBySlideId,
|
|
30631
30776
|
canvasSize,
|
|
30632
|
-
|
|
30633
|
-
|
|
30634
|
-
scale: stageScale,
|
|
30635
|
-
morphPlan: presentation.morphPlan,
|
|
30636
|
-
incomingSlide: slides[presentation.transitionOverlay.incomingSlideIndex],
|
|
30637
|
-
onComplete: presentation.handleTransitionOverlayComplete
|
|
30638
|
-
},
|
|
30639
|
-
`${presentation.transitionOverlay.outgoingSlideIndex}-${presentation.transitionOverlay.incomingSlideIndex}`
|
|
30777
|
+
scale: stageScale
|
|
30778
|
+
}
|
|
30640
30779
|
),
|
|
30641
30780
|
annotations.inkMarkupVisible && /* @__PURE__ */ jsx(
|
|
30642
30781
|
PresentationAnnotationOverlay,
|
|
@@ -33468,7 +33607,7 @@ function useMasterViewCrud(input) {
|
|
|
33468
33607
|
if (id === "renameLayout" || id === "renameMaster") {
|
|
33469
33608
|
const master = slideMasters[target.masterIndex];
|
|
33470
33609
|
const current = id === "renameLayout" ? master?.layouts?.[target.layoutIndex ?? -1]?.name ?? "" : master?.name ?? "";
|
|
33471
|
-
const next =
|
|
33610
|
+
const next = (await promptNameDialog(t("pptx.masterView.renamePrompt"), current, { t }))?.trim();
|
|
33472
33611
|
if (!next) {
|
|
33473
33612
|
return;
|
|
33474
33613
|
}
|
|
@@ -33913,6 +34052,7 @@ function useViewerLocaleControls() {
|
|
|
33913
34052
|
return useContext(ViewerLocaleControlsContext);
|
|
33914
34053
|
}
|
|
33915
34054
|
var NO_RIBBON_ADD_INS = [];
|
|
34055
|
+
var NO_FILE_PROVIDERS = [];
|
|
33916
34056
|
var PowerPointViewerComponent = /* @__PURE__ */ forwardRef(
|
|
33917
34057
|
// oxlint-disable-next-line prefer-arrow-callback -- named fn gives the forwardRef component its displayName
|
|
33918
34058
|
function PowerPointViewer(props, ref) {
|
|
@@ -33933,13 +34073,14 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
|
|
|
33933
34073
|
const {
|
|
33934
34074
|
content: incomingContent,
|
|
33935
34075
|
fonts = [],
|
|
33936
|
-
filePath,
|
|
33937
|
-
fileName,
|
|
34076
|
+
filePath: hostFilePath,
|
|
34077
|
+
fileName: hostFileName,
|
|
33938
34078
|
canEdit: canEditProp = false,
|
|
33939
34079
|
readOnly = false,
|
|
33940
34080
|
autosave: hostAutosave,
|
|
33941
34081
|
autosaveIntervalMs: hostAutosaveIntervalMs,
|
|
33942
|
-
storage,
|
|
34082
|
+
storage: hostStorage,
|
|
34083
|
+
fileProviders,
|
|
33943
34084
|
onContentChange,
|
|
33944
34085
|
onDirtyChange,
|
|
33945
34086
|
onActiveSlideChange,
|
|
@@ -33986,7 +34127,20 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
|
|
|
33986
34127
|
allowExternalContent,
|
|
33987
34128
|
limits
|
|
33988
34129
|
} = props;
|
|
33989
|
-
const
|
|
34130
|
+
const cloudDocument = useMemo(() => createCloudDocumentController(), []);
|
|
34131
|
+
const cloudFile = useController(cloudDocument).file;
|
|
34132
|
+
const {
|
|
34133
|
+
storage,
|
|
34134
|
+
fileName,
|
|
34135
|
+
filePath,
|
|
34136
|
+
// `readOnly` takes editing away from a host that also allows it.
|
|
34137
|
+
canEdit: hostCanEdit
|
|
34138
|
+
} = resolveCloudDocumentView(cloudFile, {
|
|
34139
|
+
storage: hostStorage,
|
|
34140
|
+
canEdit: canEditProp && !readOnly,
|
|
34141
|
+
fileName: hostFileName,
|
|
34142
|
+
filePath: hostFilePath
|
|
34143
|
+
});
|
|
33990
34144
|
const collaboration = resolveCollaborationConfig(collaborationInput);
|
|
33991
34145
|
const rootOptions = resolveViewerRootOptions(props);
|
|
33992
34146
|
useEffect(() => {
|
|
@@ -34035,7 +34189,8 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
|
|
|
34035
34189
|
useEffect(() => {
|
|
34036
34190
|
setContent(incomingContent);
|
|
34037
34191
|
setLoadOrigin("bootstrap");
|
|
34038
|
-
|
|
34192
|
+
cloudDocument.clear();
|
|
34193
|
+
}, [incomingContent, cloudDocument]);
|
|
34039
34194
|
const handleOpenFile = useCallback(() => {
|
|
34040
34195
|
if (hostOpenFile) {
|
|
34041
34196
|
hostOpenFile();
|
|
@@ -34044,22 +34199,40 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
|
|
|
34044
34199
|
void (async () => {
|
|
34045
34200
|
const picked = await openPptxFile();
|
|
34046
34201
|
if (picked) {
|
|
34202
|
+
cloudDocument.clear();
|
|
34047
34203
|
setLoadOrigin("user");
|
|
34048
34204
|
setContent(picked.buffer);
|
|
34049
34205
|
}
|
|
34050
34206
|
})();
|
|
34051
|
-
}, [hostOpenFile]);
|
|
34207
|
+
}, [hostOpenFile, cloudDocument]);
|
|
34208
|
+
const handleOpenCloudFile = useCallback(
|
|
34209
|
+
(file) => {
|
|
34210
|
+
setLoadOrigin("user");
|
|
34211
|
+
setContent(file.bytes);
|
|
34212
|
+
cloudDocument.open(file);
|
|
34213
|
+
},
|
|
34214
|
+
[cloudDocument]
|
|
34215
|
+
);
|
|
34216
|
+
const cloudFiles = useMemo(
|
|
34217
|
+
() => ({
|
|
34218
|
+
providers: fileProviders ?? NO_FILE_PROVIDERS,
|
|
34219
|
+
open: handleOpenCloudFile,
|
|
34220
|
+
clear: cloudDocument.clear
|
|
34221
|
+
}),
|
|
34222
|
+
[fileProviders, handleOpenCloudFile, cloudDocument]
|
|
34223
|
+
);
|
|
34052
34224
|
const handleOpenRecentFile = useCallback(
|
|
34053
34225
|
(key) => {
|
|
34054
34226
|
void (async () => {
|
|
34055
|
-
const bytes = await readBackstageRecentFile(key,
|
|
34227
|
+
const bytes = await readBackstageRecentFile(key, hostStorage);
|
|
34056
34228
|
if (bytes) {
|
|
34229
|
+
cloudDocument.clear();
|
|
34057
34230
|
setLoadOrigin("user");
|
|
34058
34231
|
setContent(bytes);
|
|
34059
34232
|
}
|
|
34060
34233
|
})();
|
|
34061
34234
|
},
|
|
34062
|
-
[
|
|
34235
|
+
[hostStorage, cloudDocument]
|
|
34063
34236
|
);
|
|
34064
34237
|
const { optionsStore, options: viewerOptions } = useViewerOptions();
|
|
34065
34238
|
const custom = useViewerCustomization(
|
|
@@ -34374,9 +34547,7 @@ var PowerPointViewerBody = /* @__PURE__ */ forwardRef(
|
|
|
34374
34547
|
}),
|
|
34375
34548
|
goToSlide: (index) => mode === "present" ? presentation.navigateToSlide(index) : setActiveSlideIndex(index),
|
|
34376
34549
|
onHyperlinkClick: props.onHyperlinkClick,
|
|
34377
|
-
confirmExternalHyperlink: (url) => !shouldConfirmExternalHyperlink(viewerOptions, url) ||
|
|
34378
|
-
|
|
34379
|
-
${url}`)
|
|
34550
|
+
confirmExternalHyperlink: (url) => !shouldConfirmExternalHyperlink(viewerOptions, url) || confirmExternalHyperlinkDialog(url, { t, host: root })
|
|
34380
34551
|
});
|
|
34381
34552
|
}, [
|
|
34382
34553
|
containerRef,
|
|
@@ -34498,6 +34669,7 @@ ${url}`)
|
|
|
34498
34669
|
handleEnterPresenterView,
|
|
34499
34670
|
handleEnterRehearsalMode,
|
|
34500
34671
|
autosaveStatus,
|
|
34672
|
+
getChangeSources,
|
|
34501
34673
|
recovery,
|
|
34502
34674
|
isEncryptedDialogOpen,
|
|
34503
34675
|
setIsEncryptedDialogOpen,
|
|
@@ -34658,6 +34830,10 @@ ${url}`)
|
|
|
34658
34830
|
showGuides: state.showGuides,
|
|
34659
34831
|
setShowGuides: state.setShowGuides
|
|
34660
34832
|
});
|
|
34833
|
+
const changeSourcesRef = useRef(getChangeSources);
|
|
34834
|
+
changeSourcesRef.current = getChangeSources;
|
|
34835
|
+
const markSavedRef = useRef(history.markSaved);
|
|
34836
|
+
markSavedRef.current = history.markSaved;
|
|
34661
34837
|
const exportHandlers = useMemo(() => {
|
|
34662
34838
|
const afterSuccessfulSave = (format) => {
|
|
34663
34839
|
playFeedbackSound(viewerOptions);
|
|
@@ -34667,9 +34843,14 @@ ${url}`)
|
|
|
34667
34843
|
}
|
|
34668
34844
|
};
|
|
34669
34845
|
const handleSaveAsFormat = async (format, reason = "saveAs") => {
|
|
34846
|
+
const revision = savedPresentationRevision(changeSourcesRef.current());
|
|
34670
34847
|
if (await rawExportHandlers.handleSaveAsFormat(format, reason) === false) {
|
|
34671
34848
|
return false;
|
|
34672
34849
|
}
|
|
34850
|
+
if (isCleanAfterSave(revision, changeSourcesRef.current())) {
|
|
34851
|
+
markSavedRef.current();
|
|
34852
|
+
setIsDirty(false);
|
|
34853
|
+
}
|
|
34673
34854
|
afterSuccessfulSave(format);
|
|
34674
34855
|
return true;
|
|
34675
34856
|
};
|
|
@@ -34681,7 +34862,7 @@ ${url}`)
|
|
|
34681
34862
|
handleSaveAsPpsx: () => void handleSaveAsFormat("ppsx"),
|
|
34682
34863
|
handleSaveAsPptm: () => void handleSaveAsFormat("pptm")
|
|
34683
34864
|
};
|
|
34684
|
-
}, [rawExportHandlers, viewerOptions, filePath, storage]);
|
|
34865
|
+
}, [rawExportHandlers, viewerOptions, filePath, storage, setIsDirty]);
|
|
34685
34866
|
setExitModeHandler(handleSetMode);
|
|
34686
34867
|
const handleTemplateElementsChanged = useCallback(
|
|
34687
34868
|
(slideId, elements) => {
|
|
@@ -35208,7 +35389,7 @@ ${url}`)
|
|
|
35208
35389
|
// Nothing previously provided it, so every one of those consumers was
|
|
35209
35390
|
// silently reading `DEFAULT_VIEWER_OPTIONS` forever, no matter what
|
|
35210
35391
|
// the user changed in the Options dialog.
|
|
35211
|
-
/* @__PURE__ */ jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsx(ViewerStorageContext.Provider, { value:
|
|
35392
|
+
/* @__PURE__ */ jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsx(ViewerStorageContext.Provider, { value: hostStorage, children: /* @__PURE__ */ jsx(ViewerCloudFilesContext.Provider, { value: cloudFiles, children: /* @__PURE__ */ jsx(ViewerRegionBaseContext.Provider, { value: regionBase, children: /* @__PURE__ */ jsx(RibbonAddInsContext.Provider, { value: ribbonAddIns ?? NO_RIBBON_ADD_INS, children: /* @__PURE__ */ jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsx(Rendering3DFlagsContext.Provider, { value: effective3D, children: /* @__PURE__ */ jsx(ViewerThemeProvider, { theme: effectiveTheme, children: /* @__PURE__ */ jsxs(
|
|
35212
35393
|
CollaborationProvider,
|
|
35213
35394
|
{
|
|
35214
35395
|
config: collaboration,
|
|
@@ -35269,7 +35450,7 @@ ${url}`)
|
|
|
35269
35450
|
/* @__PURE__ */ jsx(ShapeFormatContext.Provider, { value: shapeFormat, children: /* @__PURE__ */ jsx(RibbonGalleryCommandsContext.Provider, { value: ribbonGalleries, children: /* @__PURE__ */ jsx(ChartFormatContext.Provider, { value: chartFormat, children: viewerContent }) }) })
|
|
35270
35451
|
]
|
|
35271
35452
|
}
|
|
35272
|
-
) }) }) }) }) }) }) }) })
|
|
35453
|
+
) }) }) }) }) }) }) }) }) })
|
|
35273
35454
|
);
|
|
35274
35455
|
}
|
|
35275
35456
|
);
|