pptx-react-viewer 4.38.0 → 4.40.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 +55 -0
- package/dist/{AiChatPanel-5O6PHRSH.mjs → AiChatPanel-IDP326YW.mjs} +1 -1
- package/dist/AiChatPanel-IDP326YW.mjs.br +0 -0
- package/dist/AiChatPanel-IDP326YW.mjs.gz +0 -0
- package/dist/{AiChatPanel-FNHDAKPB.js → AiChatPanel-KEVVVR7C.js} +9 -9
- package/dist/AiChatPanel-KEVVVR7C.js.br +0 -0
- package/dist/AiChatPanel-KEVVVR7C.js.gz +0 -0
- package/dist/{chunk-43TOUP5U.js → chunk-3PKYNJJG.js} +8 -14
- package/dist/chunk-3PKYNJJG.js.br +0 -0
- package/dist/chunk-3PKYNJJG.js.gz +0 -0
- package/dist/{chunk-3SFBCFHJ.mjs → chunk-EQTNWM5Y.mjs} +58 -14
- package/dist/chunk-EQTNWM5Y.mjs.br +0 -0
- package/dist/chunk-EQTNWM5Y.mjs.gz +0 -0
- package/dist/{chunk-UC2VQORY.mjs → chunk-MNT2CXDI.mjs} +9 -15
- package/dist/chunk-MNT2CXDI.mjs.br +0 -0
- package/dist/chunk-MNT2CXDI.mjs.gz +0 -0
- package/dist/{chunk-LLH3I2XY.mjs → chunk-MZKSWYSM.mjs} +808 -440
- package/dist/chunk-MZKSWYSM.mjs.br +0 -0
- package/dist/chunk-MZKSWYSM.mjs.gz +0 -0
- package/dist/{chunk-TCEDOLGE.js → chunk-QJ4X7Y7S.js} +300 -254
- package/dist/chunk-QJ4X7Y7S.js.br +0 -0
- package/dist/chunk-QJ4X7Y7S.js.gz +0 -0
- package/dist/{chunk-Q5WEQ37H.js → chunk-WM7LBTSB.js} +2069 -1701
- package/dist/chunk-WM7LBTSB.js.br +0 -0
- package/dist/chunk-WM7LBTSB.js.gz +0 -0
- package/dist/i18n/de.cjs +819 -44
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +819 -44
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +819 -44
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +819 -44
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +823 -45
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +823 -45
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +829 -54
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +829 -54
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +24 -24
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +25 -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.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.js +19 -19
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +3 -3
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +3 -3
- package/dist/AiChatPanel-5O6PHRSH.mjs.br +0 -0
- package/dist/AiChatPanel-5O6PHRSH.mjs.gz +0 -0
- package/dist/AiChatPanel-FNHDAKPB.js.br +0 -0
- package/dist/AiChatPanel-FNHDAKPB.js.gz +0 -0
- package/dist/chunk-3SFBCFHJ.mjs.br +0 -0
- package/dist/chunk-3SFBCFHJ.mjs.gz +0 -0
- package/dist/chunk-43TOUP5U.js.br +0 -0
- package/dist/chunk-43TOUP5U.js.gz +0 -0
- package/dist/chunk-LLH3I2XY.mjs.br +0 -0
- package/dist/chunk-LLH3I2XY.mjs.gz +0 -0
- package/dist/chunk-Q5WEQ37H.js.br +0 -0
- package/dist/chunk-Q5WEQ37H.js.gz +0 -0
- package/dist/chunk-TCEDOLGE.js.br +0 -0
- package/dist/chunk-TCEDOLGE.js.gz +0 -0
- package/dist/chunk-UC2VQORY.mjs.br +0 -0
- package/dist/chunk-UC2VQORY.mjs.gz +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useViewerOptions, useReadOnlyRecommendationState, useCompatibilityToastsState, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useViewPreferencesSync, useLayoutSwitching, Rendering3DFlagsContext, CollaborationProvider, useCollaboration, useCollaborationDocumentSync, useFollowMode, useBroadcastFollower, SlideBackgroundImageLayer, StaticElementRenderer, safePrompt, scopeLayoutOptionsToActiveSlide, createReviewCommentsHost, ChartPartSelectionProvider, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, ViewerOptionsStoreContext, ViewerOptionsContext, useViewerOptionsContext, useVirtualizedSlides, useSwipeNavigation, PresentationTransitionOverlay, RemoteSelectionOverlay, CollaborationCursorOverlay, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, ElementRenderer, InlineCollaborationContext, SmartArtRenderer, downloadBlob, playAnimationSound, ResizeHandles, imgSrc, renderStrokeView, useChartPartSelection, DUOTONE_PRESETS, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, resolveSmartArtDataPalette } from './chunk-
|
|
2
|
-
import { ANIMATION_PRESET_OPTIONS, dist_exports, cn, SLIDE_NAV_THUMBNAIL_WIDTH, SLIDE_TRANSITION_OPTIONS, normalizeHexColor, hasCopyableFormat, DEFAULT_SECTION_GROUP_ID, safeOpenUrl, isPpactionUrl, parsePpactionUrl, SHORTCUT_REFERENCE_ITEMS, TOOLBAR_SECTIONS, isUrlSafe, computeHandoutLayout, getPrintableArea, generateNoteLineCount, UNGROUPED_SECTION_ID, getShapeAdjustmentHandleDescriptors, isConnectorOrLineElement, GRID_SIZE, getElementTransformWithoutRotation, getElementTransform, MIN_ELEMENT_SIZE, getElementLabel, TABLE_STYLE_PRESETS, SHAPE_PRESETS, sanitizeGradientStops, formatCommentTimestamp, clampCropValue, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, DEFAULT_FILL_COLOR, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, SHAPE_QUICK_STYLES, getPatternSvg, DEFAULT_STROKE_COLOR, STROKE_DASH_OPTIONS, openNativeEyeDropper } from './chunk-
|
|
3
|
-
import { EMPTY_RESOLVED_CUSTOMIZATION, ANIMATION_DIRECTION_LABEL_KEYS, compileEquationTemplateMathMl, resolveViewerRootOptions, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, isFeatureEnabled, isDialogAvailable, isEditingAllowed, resolveAutosaveActivation, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, attachViewerHyperlinks, shouldConfirmExternalHyperlink, applyAutoCorrect, resolveImageResolutionScale, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, createSlidePackageClipboard, isPanelVisible, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, RIBBON_SCOPE_ATTR, resolve3DRenderingFlags, resolveSlideSizeSelection, RULER_THICKNESS, RULER_FONT_SIZE, editorThumbnailHeight, buildPreviewElements, deriveSlideFieldContext, deviceStrokeStageStyle, hiddenSlideCue, EDITOR_THUMBNAIL_WIDTH, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, visibleTemplateElements, themeToCssVars, createCustomizationController, resolveEffectiveHiddenActions, listAutosaveSnapshots, resolveExpiredAutosaveSnapshots, deleteAutosaveSnapshot, tableLayoutCells, masterViewCrudActions, applyMasterViewCrudAction, masterViewCrudFailureKey, EDITOR_CHROME_CSS, ribbonCustomizationCss, applyMotionPathPreset, resetSlideLayoutPath, DEFAULT_INSERT_CHART_KIND, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, shouldDiscardAutosaveOnSuccessfulSave, buildFieldSubstitutionContext, setMasterViewBackgroundColor, canUseClipboard, runProgramNoticeStackStyle, observeElementHeight, printPropertiesFrameSlides, printPropertiesSlidesPerPage, PASTE_SPECIAL_OPTIONS, findCanvasElementNode, isHeaderFooterDateTextVisible, isHeaderFooterHeaderTextVisible, isHeaderFooterFooterTextVisible, getDensePanelTouchTargetPx, shouldStickyActionRow, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, getSlideBackgroundStyle, pushRecentColor, mruColorsPatch, shouldClearAutosaveCacheOnClose, canCropElement, cropSessionChanged, cancelCropUpdate, startCropSession, homeLaunchers, attachRibbonOverflow, getRegionRenderer, ViewerRegionHost, editorThumbnailWidth, masterViewBackgroundColor, resolvePresentationAction, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, resolveEditPointsAvailability, isCurrentLayout, EXPANDED_MAX_HEIGHT, resolveStatusBarSave, statusBarViewMode, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, clampPercent, resolveDefaultPrintSettings, HANDOUT_OPTIONS, bindPptxOptionsDialog, optionsBlockSlot, optionsPaneSlot, DEFAULT_QUICK_ACCESS_COMMAND_IDS, AI_OPTIONS_CATEGORY, activateModalFocus, buildCollaborationShareUrl, buildActiveSessionUsers, slideClipboardLabels, sorterPasteInsertAt, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, SORTER_MAX_ZOOM, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, listenForOutlineViewDismiss, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, cropModeKeyAction, buildTitleBarState, resolveScreenTip, visibleContextualTabs, resolveActiveRibbonTab, visibleRibbonAddIns, RIBBON_ADD_IN_TAB_ATTR, contextualTabLabelKey, RIBBON_CONTEXTUAL_TAB_ATTR, buildTabRowActionsState, TAB_ROW_ACTION_CLASSES, tabRowActionsAttributes, backstageNavEntries, BACKSTAGE_NAV, listBackstageRecentFiles, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, FREEFORM_TOOL_IDS, isDrawingToolVisible, textFontSizePtToPx, withHomeGalleries, drawingHomeControls, homeGalleryControls, homeGalleryApply, shapeOutlineChange, shapeFillChange, editingHomeControls, arrangeHomeControls, arrangePainterHomeControls, arrangeAlignAction, DESIGN_RIBBON_GROUPS, DESIGN_RIBBON_COMMANDS, designCommandState, FIXED_TAB_GALLERIES, CONTEXTUAL_TAB_GROUPS, editorThumbnailStep, resolveSlidePaneClick, SLIDE_VIRTUALIZATION_THRESHOLD, buildSectionContextMenuEntries, buildSlidePaneContextMenuEntries, slidePaneViewItems, isEditPointsEnabled, findReplacementAvailability, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, buildStrokePathD, cursorForTool, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, PRESENTER_NAVIGATOR_LABEL_KEYS, getPresentationContextMenuSections, CONTEXT_MENU_PRESENTATION_LAYER, presentationViewItems, subtitleRecognitionLanguage, subtitleSettingsFromOptions, getSpeechRecognitionCtor, mergeCaptionResults, customizeContextMenuEntries, buildContextMenuEntries, contextMenuViewItems, customizeCanvasContextMenuEntries, buildCanvasContextMenuEntries, buildLayoutPreviewGeometry, scaleSlidesForSizeChange, slideSizeToCanvasPx, resolveSelectionPaneRename, themeEditorLabels, resolveNotesSegments, defaultRichEnabled, segmentsToEditorHtml, DEBOUNCE_MS, createPlainNotesSegments, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX as INDENT_PX$1, buildNotesPrintHtml, MIN_TOUCH_TARGET_PX, toggleSheet, SMARTART_PREVIEW_ELEMENT_HEIGHT, SMARTART_PREVIEW_ELEMENT_WIDTH, buildSmartArtPreviewElement, sanitizeMathMl, computeAllNotesPages, getNotesPrintableArea, CUSTOM_FONT_ACCEPT, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, resolveViewerAddinRows, createSlideSorterState, sorterSelectionIndexes, selectSorterSlide, applySorterAction, sorterGridColumns, sorterMenuContext, buildSlideSorterContextMenuEntries, slideSorterContextMenuLabel, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, presenterConsoleAction, presenterConsoleViewState, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, customizeBackstageCards, backstageCardsFor, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, clipboardHomeControls, slidesHomeControls, resolveInsertSlideLayout, 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, RECORD_COMMAND_GROUPS, trackActiveComment, commentCounts, findCommentLocation, buildReviewRibbon, HELP_RIBBON_COMMANDS, galleryTextLabel, pictureSizeHomeControls, sectionAddAfterSlideIndex, masterViewPseudoSlide, PRESENTATION_ANIM_TRIGGER_ATTRIBUTE, parentSelection, slideSpaceElement, isGroupMember, motionPathFor, setMotionPath, shouldShowElementHandles, computeAnchoredPopupPosition, applyTableStyleDelete, applyTableStyleMapChange, registerCustomFont, QUICK_ACCESS_COMMAND_CATALOG, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, SLIDE_TEMPLATES, getSelectionTextStyleFlags, TEXT_DECORATION_FLAGS, dispatchCropRequest, applyRibbonGalleryItem, ribbonTransitionsDraftPatch, ribbonTransitionUpdates, ribbonTransitionsSoundChange, ribbonTransitionStockSoundUrl, playSlideTransitionPreview, playAnimationRibbonPreview, SLIDE_SHOW_OPTIONS, createViewerOptionsStore, subtitleSettingsLabels, isReviewCommentCommand, runReviewCommentCommand, attachEditorImagePaste, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, resolveElementInteractivity, buildChartQuickActionsDescriptor, applyChartElementToggle, CHART_QUICK_ACTION_BUTTON_SIZE, applyChartStylePreset, hideChartSeries, restoreFilteredSeries, buildCropOverlay, CROP_HANDLE_ARIA_KEY, getActiveXControlOverlayView, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, canEditElementPoints, MERGE_SHAPES_MENU_ITEMS, hasMultipleSelectedTableCells, isElementLocked, mergeSlideTransition, slideBackgroundClearState, slideBackgroundClearPatch, effectiveDirection, TRIGGER_OPTIONS, effectiveTimingCurve, getAfterAnimationState, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, buildSlideTemplateContent, updateSubtitleSettings, buildFreeformShapeElement, buildLiveInkStrokeView, beginCropDrag, CONNECTOR_SITE_SNAP_PX, resolveConnectorEndpointUpdate, withConnectorEndpointUpdate, getShapeConnectionSites, FreeformToolSession, attachOverlayKeyboard, EditPointsSession, EDIT_POINTS_STYLE, elementLockTogglePatch, buildTableDataGrid, getDenseGridLayoutPlan, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, applyTableStylePreset, tableStyleAssignmentUpdate, evenColumnWidths, redistributeColumnWidth, evenRowHeights, inspectorNumber, patchChartData, collapseChartTitleRunsForEdit, chartGridlinesState, chartGridlinesPatch, seriesSecondaryAxisPatch, setChartCategoryLabel, setChartCellValue, addChartCategory, removeChartCategory, addChartSeries, removeChartSeries, setDataLabelsRangeCache, describeSmartArtBounds, canAddTopLevelNode, classifyExtraConnections, siblingIndex, siblingCount, canRemoveTopLevelNode, imageResetPatch, imageResetState, canInteractWithElement, buildOleObjectNamePatch, shouldShowAccessibilitySection, withFrameSlides, withSlidesPerPage, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, SLIDE_SIZE_PRESETS, TRANSITION_ORIENTATION_TYPES, clampTransitionNumber, TRANSITION_SPEED_OPTIONS, TRANSITION_MORPH_OPTIONS, flattenTagCollections, resolveTemplateBackgroundRows, commentMentionQuery, matchCommentMentionAuthors, buildAnimationTimelineRows, clearMotionPath, setTrigger, setTriggerBookmark, getEffectSoundState, setEffectSound, setEffectStockSound, setAfterAnimation, setAfterAnimationColor, directionValuesFor, buildAnimationTimelineBars, motionPathPresetIdForPath, MOTION_PATH_FAMILIES, motionPathPresetsByFamily, motionPathPresetLabelKey, motionPathFamilyLabelKey, EFFECT_SOUND_CATALOGUE, listMediaBookmarkOptions, selectedBookmarkOptionValue, hasTiltData, toElementAxes, dragCropHandle, panCropImage, clientToSlidePoint, EDIT_POINTS_TARGET_ATTR, describeTableStyleEditor, TABLE_STYLE_EDITOR_PARTS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, resolveDisplayedChartType, CHART_TYPE_OPTIONS, chartDataLabelsTogglePatch, BAR3D_SHAPE_OPTIONS, bar3DShapePatch, RADAR_STYLE_OPTIONS, radarStylePatch, SURFACE_WIREFRAME_OPTIONS, surfaceWireframePatch, isSeriesUsingSecondaryAxis, seriesColorClearState, listChartUserShapeRows, withChartUserShapeAdded, createDefaultChartUserShape, withChartUserShapeRowRemoved, withChartUserShapeRowTextUpdated, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, addSiblingAfter, removeEmptyNode, demote, promote, reorder, cropResetState, cropResetPatch, ARTISTIC_EFFECTS, mediaTrimEndSeconds, trimmedMediaDurationMs, mediaTrimEndAbsoluteMs, mediaTrimResetState, mediaTrimEndMsFromAbsoluteMs, mediaTrimResetPatch, buildOleEditDialogDescriptor, buildOleContentUpdatePatch, buildThemeColorSwatchGrid, themeColorSwatchRows, findSelectedThemeSwatch, themeSwatchCommit, getNonVisualDescriptionFields, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, canCommitActionType, slideSizeFromPreset, withSlideSizeOrientation, TRANSITION_DIR_ARROWS, buildDirectionGrid, updateTagInCollections, deleteTagFromCollections, addTagToCollections, commentTextSegments, COMMENT_MENTION_CLASS, COMMENT_MENTION_ATTRIBUTE, insertCommentMention, reorderAnimationTimelineRows, applyAnimationTimelineOrder, getEffectSoundAsset, animationEffectLabel, overlayPointerInput, TABLE_STYLE_BORDER_SIDES, applyTableStyleFieldEdit, withCellStyle, LBL as LBL$1, SEL as SEL$1, FILL_MODE_OPTIONS as FILL_MODE_OPTIONS$1, SECTION_HEADING, NUM as NUM$1, getChartUserShapeGroupTransform, withChartUserShapeGroupChildAdded, createDefaultChartUserShapeGroupChild, withChartUserShapeRowUpdated, getChartUserShapeRowChartBox, withChartUserShapeRowFlipUpdated, withChartUserShapeRowRotationUpdated, withChartUserShapeRowChartBoxUpdated, smartArtLayoutSwitchPatch, rebuildDrawingShapesIfCleared, mediaTrimEndMsFromSeconds, validateMediaTrimRange, quickStyleSwatchCss, shapeQuickStyleLabel, OFFICE_COLOR_SWATCHES, officeColorSwatchLabel, PATTERN_PRESET_OPTIONS as PATTERN_PRESET_OPTIONS$1, COMPOUND_LINE_OPTIONS as COMPOUND_LINE_OPTIONS$1, LINE_JOIN_OPTIONS as LINE_JOIN_OPTIONS$1, LINE_CAP_OPTIONS as LINE_CAP_OPTIONS$1, TEXT_WARP_PRESETS, warpPreviewPath, 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, toggleText3dExtrusion, BEVEL_PRESETS, cropFit, cropFill, cropToAspectRatio } from 'ooxml-ui/pptx';
|
|
1
|
+
import { useViewerOptions, useReadOnlyRecommendationState, useCompatibilityToastsState, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useViewPreferencesSync, useLayoutSwitching, Rendering3DFlagsContext, CollaborationProvider, ChartFormatContext, useCollaboration, useCollaborationDocumentSync, useFollowMode, useBroadcastFollower, SlideBackgroundImageLayer, StaticElementRenderer, safePrompt, scopeLayoutOptionsToActiveSlide, createReviewCommentsHost, ChartPartSelectionProvider, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, ViewerOptionsStoreContext, ViewerOptionsContext, useViewerOptionsContext, useVirtualizedSlides, useSwipeNavigation, PresentationTransitionOverlay, RemoteSelectionOverlay, CollaborationCursorOverlay, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, ElementRenderer, InlineCollaborationContext, useChartFormatContext, SmartArtRenderer, downloadBlob, playAnimationSound, ResizeHandles, imgSrc, renderStrokeView, useChartPartSelection, DUOTONE_PRESETS, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, resolveSmartArtDataPalette } from './chunk-EQTNWM5Y.mjs';
|
|
2
|
+
import { ANIMATION_PRESET_OPTIONS, dist_exports, cn, SLIDE_NAV_THUMBNAIL_WIDTH, SLIDE_TRANSITION_OPTIONS, normalizeHexColor, hasCopyableFormat, DEFAULT_SECTION_GROUP_ID, safeOpenUrl, isPpactionUrl, parsePpactionUrl, SHORTCUT_REFERENCE_ITEMS, TOOLBAR_SECTIONS, isUrlSafe, computeHandoutLayout, getPrintableArea, generateNoteLineCount, UNGROUPED_SECTION_ID, getShapeAdjustmentHandleDescriptors, isConnectorOrLineElement, GRID_SIZE, getElementTransformWithoutRotation, getElementTransform, MIN_ELEMENT_SIZE, getElementLabel, TABLE_STYLE_PRESETS, SHAPE_PRESETS, sanitizeGradientStops, formatCommentTimestamp, clampCropValue, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, DEFAULT_FILL_COLOR, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, SHAPE_QUICK_STYLES, getPatternSvg, DEFAULT_STROKE_COLOR, STROKE_DASH_OPTIONS, openNativeEyeDropper } from './chunk-MNT2CXDI.mjs';
|
|
3
|
+
import { EMPTY_RESOLVED_CUSTOMIZATION, ANIMATION_DIRECTION_LABEL_KEYS, compileEquationTemplateMathMl, resolveViewerRootOptions, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, isFeatureEnabled, isDialogAvailable, isEditingAllowed, resolveAutosaveActivation, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, attachViewerHyperlinks, shouldConfirmExternalHyperlink, applyAutoCorrect, resolveImageResolutionScale, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, createSlidePackageClipboard, isPanelVisible, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, RIBBON_SCOPE_ATTR, resolve3DRenderingFlags, resolveSlideSizeSelection, RULER_THICKNESS, RULER_FONT_SIZE, editorThumbnailHeight, buildPreviewElements, deriveSlideFieldContext, deviceStrokeStageStyle, hiddenSlideCue, EDITOR_THUMBNAIL_WIDTH, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, visibleTemplateElements, themeToCssVars, createCustomizationController, resolveEffectiveHiddenActions, listAutosaveSnapshots, resolveExpiredAutosaveSnapshots, deleteAutosaveSnapshot, createDeckStyleHost, galleryDeckView, tableLayoutCells, resetChartFormatTarget, masterViewCrudActions, applyMasterViewCrudAction, masterViewCrudFailureKey, EDITOR_CHROME_CSS, ribbonCustomizationCss, applyMotionPathPreset, resetSlideLayoutPath, DEFAULT_INSERT_CHART_KIND, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, shouldDiscardAutosaveOnSuccessfulSave, buildFieldSubstitutionContext, setMasterViewBackgroundColor, canUseClipboard, runProgramNoticeStackStyle, observeElementHeight, printPropertiesFrameSlides, printPropertiesSlidesPerPage, PASTE_SPECIAL_OPTIONS, findCanvasElementNode, isHeaderFooterDateTextVisible, isHeaderFooterHeaderTextVisible, isHeaderFooterFooterTextVisible, getDensePanelTouchTargetPx, shouldStickyActionRow, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, getSlideBackgroundStyle, pushRecentColor, mruColorsPatch, shouldClearAutosaveCacheOnClose, canCropElement, cropSessionChanged, cancelCropUpdate, startCropSession, homeLaunchers, attachRibbonOverflow, getRegionRenderer, ViewerRegionHost, editorThumbnailWidth, masterViewBackgroundColor, resolvePresentationAction, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, resolveEditPointsAvailability, isCurrentLayout, EXPANDED_MAX_HEIGHT, resolveStatusBarSave, statusBarViewMode, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, clampPercent, resolveDefaultPrintSettings, HANDOUT_OPTIONS, bindPptxOptionsDialog, optionsBlockSlot, optionsPaneSlot, DEFAULT_QUICK_ACCESS_COMMAND_IDS, AI_OPTIONS_CATEGORY, activateModalFocus, buildCollaborationShareUrl, buildActiveSessionUsers, slideClipboardLabels, sorterPasteInsertAt, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, SORTER_MAX_ZOOM, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, listenForOutlineViewDismiss, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, cropModeKeyAction, buildTitleBarState, resolveScreenTip, visibleContextualTabs, resolveActiveRibbonTab, visibleRibbonAddIns, RIBBON_ADD_IN_TAB_ATTR, contextualTabLabelKey, RIBBON_CONTEXTUAL_TAB_ATTR, buildTabRowActionsState, TAB_ROW_ACTION_CLASSES, tabRowActionsAttributes, backstageNavEntries, BACKSTAGE_NAV, listBackstageRecentFiles, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, FREEFORM_TOOL_IDS, isDrawingToolVisible, textFontSizePtToPx, withHomeGalleries, drawingHomeControls, homeGalleryControls, homeGalleryApply, shapeOutlineChange, shapeFillChange, editingHomeControls, arrangeHomeControls, arrangePainterHomeControls, arrangeAlignAction, DESIGN_RIBBON_GROUPS, FIXED_TAB_GALLERIES, DESIGN_RIBBON_COMMANDS, designCommandState, CONTEXTUAL_TAB_GROUPS, editorThumbnailStep, resolveSlidePaneClick, SLIDE_VIRTUALIZATION_THRESHOLD, buildSectionContextMenuEntries, buildSlidePaneContextMenuEntries, slidePaneViewItems, isEditPointsEnabled, findReplacementAvailability, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, buildStrokePathD, cursorForTool, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, PRESENTER_NAVIGATOR_LABEL_KEYS, getPresentationContextMenuSections, CONTEXT_MENU_PRESENTATION_LAYER, presentationViewItems, subtitleRecognitionLanguage, subtitleSettingsFromOptions, getSpeechRecognitionCtor, mergeCaptionResults, customizeContextMenuEntries, buildContextMenuEntries, contextMenuViewItems, customizeCanvasContextMenuEntries, buildCanvasContextMenuEntries, buildLayoutPreviewGeometry, scaleSlidesForSizeChange, slideSizeToCanvasPx, resolveSelectionPaneRename, themeEditorLabels, resolveNotesSegments, defaultRichEnabled, segmentsToEditorHtml, DEBOUNCE_MS, createPlainNotesSegments, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX as INDENT_PX$1, buildNotesPrintHtml, MIN_TOUCH_TARGET_PX, toggleSheet, describeElementChange, SMARTART_PREVIEW_ELEMENT_HEIGHT, SMARTART_PREVIEW_ELEMENT_WIDTH, buildSmartArtPreviewElement, sanitizeMathMl, computeAllNotesPages, getNotesPrintableArea, CUSTOM_FONT_ACCEPT, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, resolveViewerAddinRows, createSlideSorterState, sorterSelectionIndexes, selectSorterSlide, applySorterAction, sorterGridColumns, sorterMenuContext, buildSlideSorterContextMenuEntries, slideSorterContextMenuLabel, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, presenterConsoleAction, presenterConsoleViewState, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, customizeBackstageCards, backstageCardsFor, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, clipboardHomeControls, slidesHomeControls, resolveInsertSlideLayout, SLIDE_TEMPLATES, resolveDefaultFontFamily, textFontSizePxToPt, getInlineEditorSelectionResult, selectedParagraphBulletKind, elementBulletKind, selectionBulletKind, fontPickerHomeControls, fontHomeControls, nextToggleValue, RIBBON_GROUP_ATTR, paragraphHomeAlign, paragraphHomeControls, paragraphHomeAction, arrangeShapeHomeControls, strokeWidthOf, canSetStrokeWidth, canUngroupSelection, canGroupSelection, buildRibbonGallery, readRibbonTransitionDraft, SLIDE_SHOW_COMMAND_GROUPS, RECORD_COMMAND_GROUPS, trackActiveComment, commentCounts, findCommentLocation, buildReviewRibbon, HELP_RIBBON_COMMANDS, galleryTextLabel, pictureSizeHomeControls, chartSelectionHomeControls, dispatchChartSelectionRequest, sectionAddAfterSlideIndex, masterViewPseudoSlide, PRESENTATION_ANIM_TRIGGER_ATTRIBUTE, parentSelection, slideSpaceElement, isGroupMember, motionPathFor, setMotionPath, shouldShowElementHandles, computeAnchoredPopupPosition, applyTableStyleDelete, applyTableStyleMapChange, registerCustomFont, QUICK_ACCESS_COMMAND_CATALOG, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, buildSlideTemplateContent, getSelectionTextStyleFlags, TEXT_DECORATION_FLAGS, dispatchCropRequest, applyRibbonGalleryItem, ribbonTransitionsDraftPatch, ribbonTransitionUpdates, ribbonTransitionsSoundChange, ribbonTransitionStockSoundUrl, playSlideTransitionPreview, playAnimationRibbonPreview, SLIDE_SHOW_OPTIONS, createViewerOptionsStore, subtitleSettingsLabels, isReviewCommentCommand, runReviewCommentCommand, attachEditorImagePaste, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, resolveElementInteractivity, buildChartQuickActionsDescriptor, applyChartElementToggle, CHART_QUICK_ACTION_BUTTON_SIZE, applyChartStylePreset, hideChartSeries, restoreFilteredSeries, buildCropOverlay, CROP_HANDLE_ARIA_KEY, getActiveXControlOverlayView, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, canEditElementPoints, MERGE_SHAPES_MENU_ITEMS, hasMultipleSelectedTableCells, isElementLocked, mergeSlideTransition, slideBackgroundClearState, slideBackgroundClearPatch, effectiveDirection, TRIGGER_OPTIONS, effectiveTimingCurve, getAfterAnimationState, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, updateSubtitleSettings, buildFreeformShapeElement, buildLiveInkStrokeView, beginCropDrag, CONNECTOR_SITE_SNAP_PX, resolveConnectorEndpointUpdate, withConnectorEndpointUpdate, getShapeConnectionSites, FreeformToolSession, attachOverlayKeyboard, EditPointsSession, EDIT_POINTS_STYLE, elementLockTogglePatch, buildTableDataGrid, getDenseGridLayoutPlan, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, applyTableStylePreset, tableStyleAssignmentUpdate, evenColumnWidths, redistributeColumnWidth, evenRowHeights, inspectorNumber, patchChartData, collapseChartTitleRunsForEdit, chartGridlinesState, chartGridlinesPatch, seriesSecondaryAxisPatch, setChartCategoryLabel, setChartCellValue, addChartCategory, removeChartCategory, addChartSeries, removeChartSeries, setDataLabelsRangeCache, describeSmartArtBounds, canAddTopLevelNode, classifyExtraConnections, siblingIndex, siblingCount, canRemoveTopLevelNode, imageResetPatch, imageResetState, canInteractWithElement, buildOleObjectNamePatch, shouldShowAccessibilitySection, withFrameSlides, withSlidesPerPage, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, SLIDE_SIZE_PRESETS, TRANSITION_ORIENTATION_TYPES, clampTransitionNumber, TRANSITION_SPEED_OPTIONS, TRANSITION_MORPH_OPTIONS, flattenTagCollections, resolveTemplateBackgroundRows, commentMentionQuery, matchCommentMentionAuthors, buildAnimationTimelineRows, clearMotionPath, setTrigger, setTriggerBookmark, getEffectSoundState, setEffectSound, setEffectStockSound, setAfterAnimation, setAfterAnimationColor, directionValuesFor, buildAnimationTimelineBars, motionPathPresetIdForPath, MOTION_PATH_FAMILIES, motionPathPresetsByFamily, motionPathPresetLabelKey, motionPathFamilyLabelKey, EFFECT_SOUND_CATALOGUE, listMediaBookmarkOptions, selectedBookmarkOptionValue, hasTiltData, toElementAxes, dragCropHandle, panCropImage, clientToSlidePoint, EDIT_POINTS_TARGET_ATTR, describeTableStyleEditor, TABLE_STYLE_EDITOR_PARTS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, resolveDisplayedChartType, CHART_TYPE_OPTIONS, chartDataLabelsTogglePatch, BAR3D_SHAPE_OPTIONS, bar3DShapePatch, RADAR_STYLE_OPTIONS, radarStylePatch, SURFACE_WIREFRAME_OPTIONS, surfaceWireframePatch, isSeriesUsingSecondaryAxis, seriesColorClearState, listChartUserShapeRows, withChartUserShapeAdded, createDefaultChartUserShape, withChartUserShapeRowRemoved, withChartUserShapeRowTextUpdated, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, addSiblingAfter, removeEmptyNode, demote, promote, reorder, cropResetState, cropResetPatch, ARTISTIC_EFFECTS, mediaTrimEndSeconds, trimmedMediaDurationMs, mediaTrimEndAbsoluteMs, mediaTrimResetState, mediaTrimEndMsFromAbsoluteMs, mediaTrimResetPatch, buildOleEditDialogDescriptor, buildOleContentUpdatePatch, buildThemeColorSwatchGrid, themeColorSwatchRows, findSelectedThemeSwatch, themeSwatchCommit, getNonVisualDescriptionFields, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, canCommitActionType, slideSizeFromPreset, withSlideSizeOrientation, TRANSITION_DIR_ARROWS, buildDirectionGrid, updateTagInCollections, deleteTagFromCollections, addTagToCollections, commentTextSegments, COMMENT_MENTION_CLASS, COMMENT_MENTION_ATTRIBUTE, insertCommentMention, reorderAnimationTimelineRows, applyAnimationTimelineOrder, getEffectSoundAsset, animationEffectLabel, overlayPointerInput, TABLE_STYLE_BORDER_SIDES, applyTableStyleFieldEdit, withCellStyle, LBL as LBL$1, SEL as SEL$1, FILL_MODE_OPTIONS as FILL_MODE_OPTIONS$1, SECTION_HEADING, NUM as NUM$1, getChartUserShapeGroupTransform, withChartUserShapeGroupChildAdded, createDefaultChartUserShapeGroupChild, withChartUserShapeRowUpdated, getChartUserShapeRowChartBox, withChartUserShapeRowFlipUpdated, withChartUserShapeRowRotationUpdated, withChartUserShapeRowChartBoxUpdated, smartArtLayoutSwitchPatch, rebuildDrawingShapesIfCleared, mediaTrimEndMsFromSeconds, validateMediaTrimRange, quickStyleSwatchCss, shapeQuickStyleLabel, OFFICE_COLOR_SWATCHES, officeColorSwatchLabel, PATTERN_PRESET_OPTIONS as PATTERN_PRESET_OPTIONS$1, COMPOUND_LINE_OPTIONS as COMPOUND_LINE_OPTIONS$1, LINE_JOIN_OPTIONS as LINE_JOIN_OPTIONS$1, LINE_CAP_OPTIONS as LINE_CAP_OPTIONS$1, TEXT_WARP_PRESETS, warpPreviewPath, 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, toggleText3dExtrusion, BEVEL_PRESETS, cropFit, cropFill, cropToAspectRatio } from 'ooxml-ui/pptx';
|
|
4
4
|
export { THEME_CATALOG, defaultCssVars, defaultRadius, defaultThemeColors, resolveThemeCatalogEntry, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius } from 'ooxml-ui/pptx';
|
|
5
|
-
import
|
|
5
|
+
import React105, { createContext, lazy, forwardRef, useEffect, useState, useCallback, useMemo, useRef, useLayoutEffect, useSyncExternalStore, useId, useContext, useDeferredValue, Suspense, useReducer, Fragment as Fragment$1 } from 'react';
|
|
6
6
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
8
8
|
import { LuArrowDown, LuArrowUp, LuArrowRight, LuArrowLeft, LuArrowDownRight, LuArrowDownLeft, LuArrowUpRight, LuArrowUpLeft, LuMessageSquare, LuEyeOff, LuHistory, LuX, LuCalendarDays, LuClock, LuHash, LuFileText, LuText, LuCast, LuShieldCheck, LuPlus, LuPanelLeftClose, LuDownload, LuTrash2, LuCheck, LuLock, LuEye, LuType, LuLoader, LuShieldAlert, LuSignature, LuInfo, LuTriangleAlert, LuPrinter, LuPenTool, LuWifi, LuWifiOff, LuUsers, LuCopy, LuMinus, LuChevronLeft, LuChevronRight, LuPlay, LuPause, LuPanelLeft, LuPanelRight, LuSparkles, LuSettings, LuFolderOpen, LuPalette, LuSearch, LuCaseSensitive, LuChevronUp, LuChevronDown, LuReplace, LuGripVertical, LuLoaderCircle, LuUpload, LuGrid2X2, LuStickyNote, LuList, LuBug, LuClipboardCopy, LuPaintbrush, LuShapes, LuLayoutGrid, LuWand, LuPresentation, LuTextCursorInput, LuFile, LuEllipsis, LuUserRound, LuShare2, LuSave, LuFilePlus2, LuHouse, LuFileJson, LuBox, LuVideo, LuFileImage, LuDatabase, LuClock3, LuUser, LuHardDrive, LuLogIn, LuMove, LuCopyPlus, LuClipboardPaste, LuMonitor, LuRadio, LuCaptions, LuImage, LuFilter, LuLayers, LuSettings2, LuLockOpen, LuPencil, LuReply, LuMoveRight, LuRotateCw, LuScissors, LuBookmark, LuPipette } from 'react-icons/lu';
|
|
@@ -489,58 +489,6 @@ function SlideTemplateGalleryDialog({
|
|
|
489
489
|
)
|
|
490
490
|
] });
|
|
491
491
|
}
|
|
492
|
-
function AnimationsSection(p) {
|
|
493
|
-
const { t } = useTranslation();
|
|
494
|
-
const ref = useRef(null);
|
|
495
|
-
const [previewActive, setPreviewActive] = useState(false);
|
|
496
|
-
const timer = useRef(void 0);
|
|
497
|
-
const disabled = !p.canEdit || p.selectedElement === null;
|
|
498
|
-
const selectedAnimation = useMemo(
|
|
499
|
-
() => p.selectedElement ? (p.activeSlide?.animations ?? []).find((a) => a.elementId === p.selectedElement?.id) : void 0,
|
|
500
|
-
[p.activeSlide?.animations, p.selectedElement]
|
|
501
|
-
);
|
|
502
|
-
useEffect(() => () => clearTimeout(timer.current), []);
|
|
503
|
-
useEffect(() => {
|
|
504
|
-
const host = ref.current;
|
|
505
|
-
if (!host) {
|
|
506
|
-
return;
|
|
507
|
-
}
|
|
508
|
-
host.state = {
|
|
509
|
-
editable: p.canEdit,
|
|
510
|
-
hasSelection: p.selectedElement !== null,
|
|
511
|
-
paneOpen: p.isInspectorPaneOpen,
|
|
512
|
-
previewActive,
|
|
513
|
-
translate: t
|
|
514
|
-
};
|
|
515
|
-
}, [p.canEdit, p.selectedElement, p.isInspectorPaneOpen, previewActive, t]);
|
|
516
|
-
useEffect(() => {
|
|
517
|
-
const host = ref.current;
|
|
518
|
-
if (!host) {
|
|
519
|
-
return;
|
|
520
|
-
}
|
|
521
|
-
const request = (event) => {
|
|
522
|
-
const intent = event.detail;
|
|
523
|
-
if (intent.kind === "add") {
|
|
524
|
-
p.onAddAnimation?.(intent.preset, intent.group);
|
|
525
|
-
} else if (intent.value === "remove") {
|
|
526
|
-
p.onRemoveAnimation?.();
|
|
527
|
-
} else if (intent.value === "preview") {
|
|
528
|
-
if (disabled) {
|
|
529
|
-
return;
|
|
530
|
-
}
|
|
531
|
-
setPreviewActive(true);
|
|
532
|
-
clearTimeout(timer.current);
|
|
533
|
-
timer.current = setTimeout(() => setPreviewActive(false), 1200);
|
|
534
|
-
playAnimationRibbonPreview(document, selectedAnimation);
|
|
535
|
-
} else {
|
|
536
|
-
(p.onOpenAnimationPanel ?? p.onToggleInspector)();
|
|
537
|
-
}
|
|
538
|
-
};
|
|
539
|
-
host.addEventListener("animations-request", request);
|
|
540
|
-
return () => host.removeEventListener("animations-request", request);
|
|
541
|
-
}, [p, disabled, selectedAnimation]);
|
|
542
|
-
return /* @__PURE__ */ jsx("pptx-ui-ribbon-animations", { ref });
|
|
543
|
-
}
|
|
544
492
|
function useHostEvent(ref, type, handler) {
|
|
545
493
|
useEffect(() => {
|
|
546
494
|
const host = ref.current;
|
|
@@ -657,6 +605,461 @@ function WebRadio({
|
|
|
657
605
|
}
|
|
658
606
|
);
|
|
659
607
|
}
|
|
608
|
+
function nowLocalInputValue() {
|
|
609
|
+
const now = /* @__PURE__ */ new Date();
|
|
610
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
611
|
+
return `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}T${pad(now.getHours())}:${pad(now.getMinutes())}`;
|
|
612
|
+
}
|
|
613
|
+
function DateTimeFieldDialog(p) {
|
|
614
|
+
const { t } = useTranslation();
|
|
615
|
+
const [datePickerValue, setDatePickerValue] = useState(nowLocalInputValue);
|
|
616
|
+
const [dateFormat, setDateFormat] = useState("locale");
|
|
617
|
+
const confirmDatePicker = useCallback(() => {
|
|
618
|
+
const d = new Date(datePickerValue);
|
|
619
|
+
if (isNaN(d.getTime())) {
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
let formatted;
|
|
623
|
+
switch (dateFormat) {
|
|
624
|
+
case "iso":
|
|
625
|
+
formatted = d.toISOString().slice(0, 10);
|
|
626
|
+
break;
|
|
627
|
+
case "long":
|
|
628
|
+
formatted = d.toLocaleDateString(void 0, {
|
|
629
|
+
weekday: "long",
|
|
630
|
+
year: "numeric",
|
|
631
|
+
month: "long",
|
|
632
|
+
day: "numeric"
|
|
633
|
+
});
|
|
634
|
+
break;
|
|
635
|
+
case "short":
|
|
636
|
+
formatted = d.toLocaleDateString(void 0, {
|
|
637
|
+
year: "numeric",
|
|
638
|
+
month: "short",
|
|
639
|
+
day: "numeric"
|
|
640
|
+
});
|
|
641
|
+
break;
|
|
642
|
+
case "time":
|
|
643
|
+
formatted = d.toLocaleString();
|
|
644
|
+
break;
|
|
645
|
+
default:
|
|
646
|
+
formatted = d.toLocaleDateString();
|
|
647
|
+
break;
|
|
648
|
+
}
|
|
649
|
+
p.onInsert(formatted);
|
|
650
|
+
}, [datePickerValue, dateFormat, p]);
|
|
651
|
+
return /* @__PURE__ */ jsx(
|
|
652
|
+
"div",
|
|
653
|
+
{
|
|
654
|
+
className: "fixed inset-0 z-[9999] flex items-center justify-center bg-black/30",
|
|
655
|
+
onMouseDown: (e) => {
|
|
656
|
+
if (e.target === e.currentTarget) {
|
|
657
|
+
p.onClose();
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
children: /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-border bg-popover shadow-2xl p-4 w-72 space-y-3", children: [
|
|
661
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-foreground", children: t("pptx.field.dateTime") }),
|
|
662
|
+
/* @__PURE__ */ jsx(
|
|
663
|
+
"input",
|
|
664
|
+
{
|
|
665
|
+
type: "datetime-local",
|
|
666
|
+
className: "w-full text-xs",
|
|
667
|
+
"aria-label": t("pptx.field.format", "Format"),
|
|
668
|
+
value: datePickerValue,
|
|
669
|
+
onChange: (e) => setDatePickerValue(e.target.value)
|
|
670
|
+
}
|
|
671
|
+
),
|
|
672
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
673
|
+
/* @__PURE__ */ jsx("label", { className: "block text-[11px] text-muted-foreground mb-1", children: t("pptx.field.format", "Format") }),
|
|
674
|
+
/* @__PURE__ */ jsxs(
|
|
675
|
+
WebSelect,
|
|
676
|
+
{
|
|
677
|
+
className: "w-full rounded border border-border bg-muted px-2.5 py-1.5 text-xs text-foreground focus:border-primary focus:ring-1 focus:ring-primary outline-none",
|
|
678
|
+
value: dateFormat,
|
|
679
|
+
onChange: (e) => setDateFormat(e.target.value),
|
|
680
|
+
children: [
|
|
681
|
+
/* @__PURE__ */ jsx("option", { value: "locale", children: new Date(datePickerValue || Date.now()).toLocaleDateString() }),
|
|
682
|
+
/* @__PURE__ */ jsx("option", { value: "long", children: new Date(datePickerValue || Date.now()).toLocaleDateString(void 0, {
|
|
683
|
+
weekday: "long",
|
|
684
|
+
year: "numeric",
|
|
685
|
+
month: "long",
|
|
686
|
+
day: "numeric"
|
|
687
|
+
}) }),
|
|
688
|
+
/* @__PURE__ */ jsx("option", { value: "short", children: new Date(datePickerValue || Date.now()).toLocaleDateString(void 0, {
|
|
689
|
+
year: "numeric",
|
|
690
|
+
month: "short",
|
|
691
|
+
day: "numeric"
|
|
692
|
+
}) }),
|
|
693
|
+
/* @__PURE__ */ jsx("option", { value: "iso", children: new Date(datePickerValue || Date.now()).toISOString().slice(0, 10) }),
|
|
694
|
+
/* @__PURE__ */ jsx("option", { value: "time", children: new Date(datePickerValue || Date.now()).toLocaleString() })
|
|
695
|
+
]
|
|
696
|
+
}
|
|
697
|
+
)
|
|
698
|
+
] }),
|
|
699
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-end gap-2 pt-1", children: /* @__PURE__ */ jsx(
|
|
700
|
+
DialogFooter,
|
|
701
|
+
{
|
|
702
|
+
actions: [
|
|
703
|
+
{ id: "cancel", label: t("pptx.common.cancel", "Cancel") },
|
|
704
|
+
{ id: "insert", label: t("pptx.common.insert", "Insert"), variant: "primary" }
|
|
705
|
+
],
|
|
706
|
+
onAction: (id) => id === "insert" ? confirmDatePicker() : p.onClose()
|
|
707
|
+
}
|
|
708
|
+
) })
|
|
709
|
+
] })
|
|
710
|
+
}
|
|
711
|
+
);
|
|
712
|
+
}
|
|
713
|
+
var ViewerCustomizationContext = createContext(
|
|
714
|
+
EMPTY_RESOLVED_CUSTOMIZATION
|
|
715
|
+
);
|
|
716
|
+
function useViewerCustomizationContext() {
|
|
717
|
+
return useContext(ViewerCustomizationContext);
|
|
718
|
+
}
|
|
719
|
+
function InsertSection(p) {
|
|
720
|
+
const { t } = useTranslation();
|
|
721
|
+
const customization = useViewerCustomizationContext();
|
|
722
|
+
const ref = useRef(null);
|
|
723
|
+
const [datePickerOpen, setDatePickerOpen] = useState(false);
|
|
724
|
+
const [templatesOpen, setTemplatesOpen] = useState(false);
|
|
725
|
+
const hosted = p.dialogHost;
|
|
726
|
+
const templatesAvailable = Boolean(p.onInsertSlideFromTemplate) && isDialogAvailable(customization, "slideTemplates");
|
|
727
|
+
const [chartKind, setChartKind] = useState(DEFAULT_INSERT_CHART_KIND);
|
|
728
|
+
useEffect(() => {
|
|
729
|
+
const host = ref.current;
|
|
730
|
+
if (!host) {
|
|
731
|
+
return;
|
|
732
|
+
}
|
|
733
|
+
host.state = {
|
|
734
|
+
editable: p.canEdit,
|
|
735
|
+
hasSelection: p.hasSelection,
|
|
736
|
+
shapeType: p.newShapeType,
|
|
737
|
+
chartKind,
|
|
738
|
+
activeFreeformTool: p.activeFreeformTool ?? null,
|
|
739
|
+
freeformTools: p.onArmFreeformTool ? FREEFORM_TOOL_IDS.filter((tool) => isDrawingToolVisible(customization, tool)) : [],
|
|
740
|
+
chartAvailable: Boolean(p.onAddChart),
|
|
741
|
+
fieldAvailable: Boolean(p.onInsertField),
|
|
742
|
+
headerFooterAvailable: Boolean(p.onOpenHeaderFooter),
|
|
743
|
+
newSlideAvailable: Boolean(p.onInsertSlideFromLayout && p.layoutOptions?.length),
|
|
744
|
+
commentAvailable: Boolean(p.onToggleComments),
|
|
745
|
+
slideTemplatesAvailable: templatesAvailable,
|
|
746
|
+
layouts: p.layoutOptions ?? [],
|
|
747
|
+
...p.currentLayoutPath ? { currentLayoutPath: p.currentLayoutPath } : {},
|
|
748
|
+
translate: t
|
|
749
|
+
};
|
|
750
|
+
}, [p, chartKind, customization, t, templatesAvailable]);
|
|
751
|
+
useEffect(() => {
|
|
752
|
+
const host = ref.current;
|
|
753
|
+
if (!host) {
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
756
|
+
const request = (event) => {
|
|
757
|
+
const intent = event.detail;
|
|
758
|
+
switch (intent.kind) {
|
|
759
|
+
case "command": {
|
|
760
|
+
const commands = {
|
|
761
|
+
textBox: p.onAddTextBox,
|
|
762
|
+
table: p.onAddTable,
|
|
763
|
+
image: p.onOpenImagePicker,
|
|
764
|
+
media: p.onOpenMediaPicker,
|
|
765
|
+
smartArt: p.onAddSmartArt,
|
|
766
|
+
equation: p.onAddEquation,
|
|
767
|
+
link: p.onOpenHyperlinkDialog,
|
|
768
|
+
headerFooter: p.onOpenHeaderFooter,
|
|
769
|
+
// Opening an already open pane would toggle it shut.
|
|
770
|
+
comment: p.isCommentsPanelOpen ? void 0 : p.onToggleComments
|
|
771
|
+
};
|
|
772
|
+
commands[intent.value]?.();
|
|
773
|
+
break;
|
|
774
|
+
}
|
|
775
|
+
case "table":
|
|
776
|
+
p.onAddTable(intent.rows, intent.columns);
|
|
777
|
+
break;
|
|
778
|
+
case "newSlide": {
|
|
779
|
+
const layout = resolveInsertSlideLayout(
|
|
780
|
+
p.layoutOptions ?? [],
|
|
781
|
+
intent.value,
|
|
782
|
+
p.currentLayoutPath
|
|
783
|
+
);
|
|
784
|
+
if (layout) {
|
|
785
|
+
p.onInsertSlideFromLayout?.(layout.path, layout.name);
|
|
786
|
+
}
|
|
787
|
+
break;
|
|
788
|
+
}
|
|
789
|
+
case "slideTemplates":
|
|
790
|
+
if (hosted) {
|
|
791
|
+
hosted.openSlideTemplates();
|
|
792
|
+
} else {
|
|
793
|
+
setTemplatesOpen(true);
|
|
794
|
+
}
|
|
795
|
+
break;
|
|
796
|
+
case "shapeType":
|
|
797
|
+
p.onSetNewShapeType(intent.value);
|
|
798
|
+
break;
|
|
799
|
+
case "shape":
|
|
800
|
+
p.onAddShape();
|
|
801
|
+
break;
|
|
802
|
+
case "chartType":
|
|
803
|
+
setChartKind(intent.value);
|
|
804
|
+
break;
|
|
805
|
+
case "chart":
|
|
806
|
+
p.onAddChart?.(intent.value);
|
|
807
|
+
break;
|
|
808
|
+
case "freeform":
|
|
809
|
+
p.onArmFreeformTool?.(intent.value);
|
|
810
|
+
break;
|
|
811
|
+
case "actionButton":
|
|
812
|
+
p.onAddActionButton(intent.value);
|
|
813
|
+
break;
|
|
814
|
+
case "field":
|
|
815
|
+
if (intent.value === "datetime") {
|
|
816
|
+
if (hosted) {
|
|
817
|
+
hosted.openDateTime();
|
|
818
|
+
} else {
|
|
819
|
+
setDatePickerOpen(true);
|
|
820
|
+
}
|
|
821
|
+
} else {
|
|
822
|
+
p.onInsertField?.(intent.value);
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
p.onRequestHandled?.();
|
|
826
|
+
};
|
|
827
|
+
host.addEventListener("insert-request", request);
|
|
828
|
+
return () => host.removeEventListener("insert-request", request);
|
|
829
|
+
}, [p, hosted]);
|
|
830
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
831
|
+
p.phone ? /* @__PURE__ */ jsx("pptx-ui-mobile-insert", { ref }) : /* @__PURE__ */ jsx("pptx-ui-ribbon-insert", { ref }),
|
|
832
|
+
templatesAvailable && !hosted && /* @__PURE__ */ jsx(
|
|
833
|
+
SlideTemplateGalleryDialog,
|
|
834
|
+
{
|
|
835
|
+
isOpen: templatesOpen,
|
|
836
|
+
onClose: () => setTemplatesOpen(false),
|
|
837
|
+
onInsert: (templateId) => p.onInsertSlideFromTemplate?.(templateId),
|
|
838
|
+
scheme: p.templateScheme
|
|
839
|
+
}
|
|
840
|
+
),
|
|
841
|
+
datePickerOpen && !hosted && p.onInsertField && /* @__PURE__ */ jsx(
|
|
842
|
+
DateTimeFieldDialog,
|
|
843
|
+
{
|
|
844
|
+
onClose: () => setDatePickerOpen(false),
|
|
845
|
+
onInsert: (formatted) => {
|
|
846
|
+
p.onInsertField?.("datetime", formatted);
|
|
847
|
+
setDatePickerOpen(false);
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
)
|
|
851
|
+
] });
|
|
852
|
+
}
|
|
853
|
+
function MobileSheet({
|
|
854
|
+
open,
|
|
855
|
+
onClose,
|
|
856
|
+
title,
|
|
857
|
+
children,
|
|
858
|
+
heightFraction = 0.6,
|
|
859
|
+
fullScreen = false,
|
|
860
|
+
autoHeight = false,
|
|
861
|
+
className,
|
|
862
|
+
headerRight
|
|
863
|
+
}) {
|
|
864
|
+
const sheetRef = useRef(null);
|
|
865
|
+
const { t } = useTranslation();
|
|
866
|
+
const { dragY, dragging, handlers } = useSheetDismissDrag(onClose);
|
|
867
|
+
useModalFocus(open, sheetRef, onClose);
|
|
868
|
+
if (!open) {
|
|
869
|
+
return null;
|
|
870
|
+
}
|
|
871
|
+
const heightStyle = autoHeight ? { maxHeight: "calc(85dvh - env(safe-area-inset-top))" } : fullScreen ? { height: "calc(100dvh - env(safe-area-inset-top))" } : { height: `${Math.round(heightFraction * 100)}dvh` };
|
|
872
|
+
return /* @__PURE__ */ jsxs("div", { className: "fixed inset-x-0 top-0 bottom-14 z-[69] flex flex-col justify-end", children: [
|
|
873
|
+
/* @__PURE__ */ jsx(
|
|
874
|
+
"button",
|
|
875
|
+
{
|
|
876
|
+
type: "button",
|
|
877
|
+
"aria-label": t("pptx.mobileSheet.close"),
|
|
878
|
+
className: "absolute inset-0 bg-black/40 backdrop-blur-[2px] animate-in fade-in duration-150",
|
|
879
|
+
onClick: onClose
|
|
880
|
+
}
|
|
881
|
+
),
|
|
882
|
+
/* @__PURE__ */ jsxs(
|
|
883
|
+
"div",
|
|
884
|
+
{
|
|
885
|
+
ref: sheetRef,
|
|
886
|
+
role: "dialog",
|
|
887
|
+
"aria-modal": "true",
|
|
888
|
+
"aria-label": typeof title === "string" ? title : t("pptx.mobileSheet.ariaLabel"),
|
|
889
|
+
tabIndex: -1,
|
|
890
|
+
className: cn(
|
|
891
|
+
"relative bg-background border-t border-border rounded-t-2xl shadow-2xl flex flex-col overflow-hidden",
|
|
892
|
+
"animate-in slide-in-from-bottom duration-200",
|
|
893
|
+
className
|
|
894
|
+
),
|
|
895
|
+
style: {
|
|
896
|
+
...heightStyle,
|
|
897
|
+
transform: dragY > 0 ? `translateY(${dragY}px)` : void 0,
|
|
898
|
+
transition: dragging ? "none" : "transform 150ms ease-out"
|
|
899
|
+
},
|
|
900
|
+
children: [
|
|
901
|
+
/* @__PURE__ */ jsxs(
|
|
902
|
+
"div",
|
|
903
|
+
{
|
|
904
|
+
className: "cursor-grab active:cursor-grabbing touch-none",
|
|
905
|
+
onPointerDown: handlers.onPointerDown,
|
|
906
|
+
onPointerMove: handlers.onPointerMove,
|
|
907
|
+
onPointerUp: handlers.onPointerUp,
|
|
908
|
+
onPointerCancel: handlers.onPointerCancel,
|
|
909
|
+
children: [
|
|
910
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center pt-2 pb-1", children: /* @__PURE__ */ jsx("div", { className: "h-1 w-10 rounded-full bg-muted-foreground/40" }) }),
|
|
911
|
+
(title || headerRight) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 px-4 pb-2 border-b border-border/60", children: [
|
|
912
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-semibold text-foreground truncate", children: title }),
|
|
913
|
+
headerRight,
|
|
914
|
+
/* @__PURE__ */ jsx(
|
|
915
|
+
"button",
|
|
916
|
+
{
|
|
917
|
+
type: "button",
|
|
918
|
+
"aria-label": t("pptx.mobileSheet.close"),
|
|
919
|
+
onPointerDown: (event) => event.stopPropagation(),
|
|
920
|
+
onClick: onClose,
|
|
921
|
+
style: { minWidth: MIN_TOUCH_TARGET_PX, minHeight: MIN_TOUCH_TARGET_PX },
|
|
922
|
+
className: "inline-flex items-center justify-center rounded text-xl text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
923
|
+
children: "\xD7"
|
|
924
|
+
}
|
|
925
|
+
)
|
|
926
|
+
] })
|
|
927
|
+
]
|
|
928
|
+
}
|
|
929
|
+
),
|
|
930
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto overscroll-contain", children })
|
|
931
|
+
]
|
|
932
|
+
}
|
|
933
|
+
)
|
|
934
|
+
] });
|
|
935
|
+
}
|
|
936
|
+
function MobileInsertSheet(p) {
|
|
937
|
+
const { t } = useTranslation();
|
|
938
|
+
const close = () => p.onCloseMobileInsert?.();
|
|
939
|
+
const customization = useViewerCustomizationContext();
|
|
940
|
+
const [dateOpen, setDateOpen] = useState(false);
|
|
941
|
+
const [templatesOpen, setTemplatesOpen] = useState(false);
|
|
942
|
+
const dialogHost = useMemo(
|
|
943
|
+
() => ({
|
|
944
|
+
openDateTime: () => setDateOpen(true),
|
|
945
|
+
openSlideTemplates: () => setTemplatesOpen(true)
|
|
946
|
+
}),
|
|
947
|
+
[]
|
|
948
|
+
);
|
|
949
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
950
|
+
/* @__PURE__ */ jsx(
|
|
951
|
+
MobileSheet,
|
|
952
|
+
{
|
|
953
|
+
open: Boolean(p.isMobileInsertOpen) && !p.isThemeEditorOpen,
|
|
954
|
+
onClose: close,
|
|
955
|
+
autoHeight: true,
|
|
956
|
+
title: t("pptx.mobileBar.insert"),
|
|
957
|
+
children: /* @__PURE__ */ jsx("div", { className: "p-3", children: /* @__PURE__ */ jsx(
|
|
958
|
+
InsertSection,
|
|
959
|
+
{
|
|
960
|
+
phone: true,
|
|
961
|
+
onRequestHandled: close,
|
|
962
|
+
canEdit: p.canEdit,
|
|
963
|
+
newShapeType: p.newShapeType,
|
|
964
|
+
onSetNewShapeType: p.onSetNewShapeType,
|
|
965
|
+
onAddTextBox: p.onAddTextBox,
|
|
966
|
+
onAddShape: p.onAddShape,
|
|
967
|
+
onAddTable: p.onAddTable,
|
|
968
|
+
onAddChart: p.onAddChart,
|
|
969
|
+
onAddSmartArt: p.onAddSmartArt,
|
|
970
|
+
onAddEquation: p.onAddEquation,
|
|
971
|
+
onAddActionButton: p.onAddActionButton,
|
|
972
|
+
onInsertField: p.onInsertField,
|
|
973
|
+
onOpenHeaderFooter: p.onOpenHeaderFooter,
|
|
974
|
+
onOpenImagePicker: p.onOpenImagePicker,
|
|
975
|
+
onOpenMediaPicker: p.onOpenMediaPicker,
|
|
976
|
+
hasSelection: Boolean(p.selectedElement),
|
|
977
|
+
onOpenHyperlinkDialog: p.onOpenHyperlinkDialog,
|
|
978
|
+
layoutOptions: p.layoutOptions,
|
|
979
|
+
currentLayoutPath: p.currentLayoutPath,
|
|
980
|
+
onInsertSlideFromLayout: p.onInsertSlideFromLayout,
|
|
981
|
+
onInsertSlideFromTemplate: p.onInsertSlideFromTemplate,
|
|
982
|
+
templateScheme: p.templateScheme,
|
|
983
|
+
onToggleComments: p.onToggleComments,
|
|
984
|
+
isCommentsPanelOpen: p.isCommentsPanelOpen,
|
|
985
|
+
dialogHost
|
|
986
|
+
}
|
|
987
|
+
) })
|
|
988
|
+
}
|
|
989
|
+
),
|
|
990
|
+
p.onInsertSlideFromTemplate && isDialogAvailable(customization, "slideTemplates") && /* @__PURE__ */ jsx(
|
|
991
|
+
SlideTemplateGalleryDialog,
|
|
992
|
+
{
|
|
993
|
+
isOpen: templatesOpen,
|
|
994
|
+
onClose: () => setTemplatesOpen(false),
|
|
995
|
+
onInsert: (templateId) => p.onInsertSlideFromTemplate?.(templateId),
|
|
996
|
+
scheme: p.templateScheme
|
|
997
|
+
}
|
|
998
|
+
),
|
|
999
|
+
dateOpen && p.onInsertField && /* @__PURE__ */ jsx(
|
|
1000
|
+
DateTimeFieldDialog,
|
|
1001
|
+
{
|
|
1002
|
+
onClose: () => setDateOpen(false),
|
|
1003
|
+
onInsert: (formatted) => {
|
|
1004
|
+
p.onInsertField?.("datetime", formatted);
|
|
1005
|
+
setDateOpen(false);
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
)
|
|
1009
|
+
] });
|
|
1010
|
+
}
|
|
1011
|
+
function AnimationsSection(p) {
|
|
1012
|
+
const { t } = useTranslation();
|
|
1013
|
+
const ref = useRef(null);
|
|
1014
|
+
const [previewActive, setPreviewActive] = useState(false);
|
|
1015
|
+
const timer = useRef(void 0);
|
|
1016
|
+
const disabled = !p.canEdit || p.selectedElement === null;
|
|
1017
|
+
const selectedAnimation = useMemo(
|
|
1018
|
+
() => p.selectedElement ? (p.activeSlide?.animations ?? []).find((a) => a.elementId === p.selectedElement?.id) : void 0,
|
|
1019
|
+
[p.activeSlide?.animations, p.selectedElement]
|
|
1020
|
+
);
|
|
1021
|
+
useEffect(() => () => clearTimeout(timer.current), []);
|
|
1022
|
+
useEffect(() => {
|
|
1023
|
+
const host = ref.current;
|
|
1024
|
+
if (!host) {
|
|
1025
|
+
return;
|
|
1026
|
+
}
|
|
1027
|
+
host.state = {
|
|
1028
|
+
editable: p.canEdit,
|
|
1029
|
+
hasSelection: p.selectedElement !== null,
|
|
1030
|
+
paneOpen: p.isInspectorPaneOpen,
|
|
1031
|
+
previewActive,
|
|
1032
|
+
translate: t
|
|
1033
|
+
};
|
|
1034
|
+
}, [p.canEdit, p.selectedElement, p.isInspectorPaneOpen, previewActive, t]);
|
|
1035
|
+
useEffect(() => {
|
|
1036
|
+
const host = ref.current;
|
|
1037
|
+
if (!host) {
|
|
1038
|
+
return;
|
|
1039
|
+
}
|
|
1040
|
+
const request = (event) => {
|
|
1041
|
+
const intent = event.detail;
|
|
1042
|
+
if (intent.kind === "add") {
|
|
1043
|
+
p.onAddAnimation?.(intent.preset, intent.group);
|
|
1044
|
+
} else if (intent.value === "remove") {
|
|
1045
|
+
p.onRemoveAnimation?.();
|
|
1046
|
+
} else if (intent.value === "preview") {
|
|
1047
|
+
if (disabled) {
|
|
1048
|
+
return;
|
|
1049
|
+
}
|
|
1050
|
+
setPreviewActive(true);
|
|
1051
|
+
clearTimeout(timer.current);
|
|
1052
|
+
timer.current = setTimeout(() => setPreviewActive(false), 1200);
|
|
1053
|
+
playAnimationRibbonPreview(document, selectedAnimation);
|
|
1054
|
+
} else {
|
|
1055
|
+
(p.onOpenAnimationPanel ?? p.onToggleInspector)();
|
|
1056
|
+
}
|
|
1057
|
+
};
|
|
1058
|
+
host.addEventListener("animations-request", request);
|
|
1059
|
+
return () => host.removeEventListener("animations-request", request);
|
|
1060
|
+
}, [p, disabled, selectedAnimation]);
|
|
1061
|
+
return /* @__PURE__ */ jsx("pptx-ui-ribbon-animations", { ref });
|
|
1062
|
+
}
|
|
660
1063
|
function groupAttr(id) {
|
|
661
1064
|
return id ? { [RIBBON_GROUP_ATTR]: id } : {};
|
|
662
1065
|
}
|
|
@@ -723,7 +1126,7 @@ function WebHomeControls({
|
|
|
723
1126
|
host.addEventListener("home-popup", listener);
|
|
724
1127
|
return () => host.removeEventListener("home-popup", listener);
|
|
725
1128
|
}, [onPopup]);
|
|
726
|
-
return
|
|
1129
|
+
return React105.createElement(`pptx-ui-ribbon-home-${family}`, { ref });
|
|
727
1130
|
}
|
|
728
1131
|
function ShapeArrangeExtras(p) {
|
|
729
1132
|
const commands = useShapeFormatContext();
|
|
@@ -883,7 +1286,8 @@ function useRibbonGalleryCommands() {
|
|
|
883
1286
|
function RibbonGallery({
|
|
884
1287
|
placement,
|
|
885
1288
|
chevronOnly = false,
|
|
886
|
-
tagControl = true
|
|
1289
|
+
tagControl = true,
|
|
1290
|
+
onCommand
|
|
887
1291
|
}) {
|
|
888
1292
|
const { t } = useTranslation();
|
|
889
1293
|
const ref = useRef(null);
|
|
@@ -903,25 +1307,36 @@ function RibbonGallery({
|
|
|
903
1307
|
}, [descriptor, t, commands?.editable]);
|
|
904
1308
|
useEffect(() => {
|
|
905
1309
|
const host = ref.current;
|
|
906
|
-
if (!host) {
|
|
1310
|
+
if (!host || !commands) {
|
|
907
1311
|
return;
|
|
908
1312
|
}
|
|
909
1313
|
const pick = (event) => {
|
|
910
|
-
if (!commands
|
|
1314
|
+
if (!commands.editable) {
|
|
911
1315
|
return;
|
|
912
1316
|
}
|
|
913
|
-
const
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
commands.
|
|
917
|
-
|
|
918
|
-
if (result) {
|
|
1317
|
+
const { itemId, action } = event.detail;
|
|
1318
|
+
const result = applyRibbonGalleryItem(placement.gallery, itemId, commands.context, action);
|
|
1319
|
+
if (result?.kind === "command") {
|
|
1320
|
+
commands.endPreview?.();
|
|
1321
|
+
onCommand?.(result.command);
|
|
1322
|
+
} else if (result) {
|
|
919
1323
|
commands.dispatch(result);
|
|
920
1324
|
}
|
|
921
1325
|
};
|
|
1326
|
+
const preview = (event) => {
|
|
1327
|
+
const { itemId } = event.detail;
|
|
1328
|
+
commands.preview?.(applyRibbonGalleryItem(placement.gallery, itemId, commands.context));
|
|
1329
|
+
};
|
|
1330
|
+
const endPreview = () => commands.endPreview?.();
|
|
922
1331
|
host.addEventListener("gallery-pick", pick);
|
|
923
|
-
|
|
924
|
-
|
|
1332
|
+
host.addEventListener("gallery-preview", preview);
|
|
1333
|
+
host.addEventListener("gallery-preview-end", endPreview);
|
|
1334
|
+
return () => {
|
|
1335
|
+
host.removeEventListener("gallery-pick", pick);
|
|
1336
|
+
host.removeEventListener("gallery-preview", preview);
|
|
1337
|
+
host.removeEventListener("gallery-preview-end", endPreview);
|
|
1338
|
+
};
|
|
1339
|
+
}, [commands, placement.gallery, onCommand]);
|
|
925
1340
|
return /* @__PURE__ */ jsx(
|
|
926
1341
|
"pptx-ui-ribbon-gallery",
|
|
927
1342
|
{
|
|
@@ -1086,6 +1501,21 @@ function DesignSection(p) {
|
|
|
1086
1501
|
hasBackground: Boolean(p.onToggleInspector)
|
|
1087
1502
|
};
|
|
1088
1503
|
return /* @__PURE__ */ jsx(Fragment, { children: DESIGN_RIBBON_GROUPS.map((group) => /* @__PURE__ */ jsxs(WebRibbonGroup, { groupId: group.id, label: t(group.labelKey), children: [
|
|
1504
|
+
FIXED_TAB_GALLERIES.filter(
|
|
1505
|
+
(placement) => placement.control.startsWith(`${group.id}.`)
|
|
1506
|
+
).map((placement) => /* @__PURE__ */ jsx(
|
|
1507
|
+
RibbonGallery,
|
|
1508
|
+
{
|
|
1509
|
+
placement,
|
|
1510
|
+
onCommand: () => {
|
|
1511
|
+
if (!p.isInspectorPaneOpen) {
|
|
1512
|
+
p.onToggleInspector?.();
|
|
1513
|
+
}
|
|
1514
|
+
},
|
|
1515
|
+
icon: placement.gallery === "themeFonts" ? /* @__PURE__ */ jsx(LuType, {}) : /* @__PURE__ */ jsx(LuPalette, {})
|
|
1516
|
+
},
|
|
1517
|
+
placement.control
|
|
1518
|
+
)),
|
|
1089
1519
|
DESIGN_RIBBON_COMMANDS.filter((command) => command.id.startsWith(`${group.id}.`)).map(
|
|
1090
1520
|
(command) => {
|
|
1091
1521
|
const view = designCommandState(command.id, state);
|
|
@@ -1104,17 +1534,7 @@ function DesignSection(p) {
|
|
|
1104
1534
|
command.id
|
|
1105
1535
|
);
|
|
1106
1536
|
}
|
|
1107
|
-
)
|
|
1108
|
-
FIXED_TAB_GALLERIES.filter(
|
|
1109
|
-
(placement) => placement.control.startsWith(`${group.id}.`)
|
|
1110
|
-
).map((placement) => /* @__PURE__ */ jsx(
|
|
1111
|
-
RibbonGallery,
|
|
1112
|
-
{
|
|
1113
|
-
placement,
|
|
1114
|
-
icon: placement.gallery === "themeFonts" ? /* @__PURE__ */ jsx(LuType, {}) : /* @__PURE__ */ jsx(LuPalette, {})
|
|
1115
|
-
},
|
|
1116
|
-
placement.control
|
|
1117
|
-
))
|
|
1537
|
+
)
|
|
1118
1538
|
] }, group.id)) });
|
|
1119
1539
|
}
|
|
1120
1540
|
var DEFAULT_VALUE = {
|
|
@@ -1174,12 +1594,6 @@ function DrawSection(p) {
|
|
|
1174
1594
|
}, [p, pushColor]);
|
|
1175
1595
|
return /* @__PURE__ */ jsx("pptx-ui-ribbon-draw", { ref });
|
|
1176
1596
|
}
|
|
1177
|
-
var ViewerCustomizationContext = createContext(
|
|
1178
|
-
EMPTY_RESOLVED_CUSTOMIZATION
|
|
1179
|
-
);
|
|
1180
|
-
function useViewerCustomizationContext() {
|
|
1181
|
-
return useContext(ViewerCustomizationContext);
|
|
1182
|
-
}
|
|
1183
1597
|
var ViewerRegionBaseContext = createContext(null);
|
|
1184
1598
|
function useRegionRenderer(id) {
|
|
1185
1599
|
const customization = useViewerCustomizationContext();
|
|
@@ -1248,7 +1662,7 @@ function AccountPage() {
|
|
|
1248
1662
|
return void 0;
|
|
1249
1663
|
});
|
|
1250
1664
|
};
|
|
1251
|
-
const version = "4.
|
|
1665
|
+
const version = "4.40.0" ;
|
|
1252
1666
|
return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
1253
1667
|
/* @__PURE__ */ jsxs("section", { className: cardClass, children: [
|
|
1254
1668
|
/* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -1983,7 +2397,7 @@ function SlidesGroup(p) {
|
|
|
1983
2397
|
editable: p.canEdit,
|
|
1984
2398
|
hasLayouts: layoutOptions.length > 0,
|
|
1985
2399
|
hasSlides: true,
|
|
1986
|
-
showTemplates: Boolean(p.onInsertSlideFromTemplate),
|
|
2400
|
+
showTemplates: Boolean(p.onInsertSlideFromTemplate) && isDialogAvailable(customization, "slideTemplates"),
|
|
1987
2401
|
newSlideNeedsLayout: true,
|
|
1988
2402
|
resetNeedsSlide: false,
|
|
1989
2403
|
layouts: {
|
|
@@ -1992,7 +2406,14 @@ function SlidesGroup(p) {
|
|
|
1992
2406
|
previews
|
|
1993
2407
|
}
|
|
1994
2408
|
}),
|
|
1995
|
-
[
|
|
2409
|
+
[
|
|
2410
|
+
p.canEdit,
|
|
2411
|
+
layoutOptions,
|
|
2412
|
+
p.onInsertSlideFromTemplate,
|
|
2413
|
+
customization,
|
|
2414
|
+
p.currentLayoutPath,
|
|
2415
|
+
previews
|
|
2416
|
+
]
|
|
1996
2417
|
);
|
|
1997
2418
|
const request = useCallback(
|
|
1998
2419
|
(id, _part, intent) => {
|
|
@@ -2106,220 +2527,6 @@ function HomeSection(p) {
|
|
|
2106
2527
|
)
|
|
2107
2528
|
] });
|
|
2108
2529
|
}
|
|
2109
|
-
function nowLocalInputValue() {
|
|
2110
|
-
const now = /* @__PURE__ */ new Date();
|
|
2111
|
-
const pad = (n) => String(n).padStart(2, "0");
|
|
2112
|
-
return `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}T${pad(now.getHours())}:${pad(now.getMinutes())}`;
|
|
2113
|
-
}
|
|
2114
|
-
function DateTimeFieldDialog(p) {
|
|
2115
|
-
const { t } = useTranslation();
|
|
2116
|
-
const [datePickerValue, setDatePickerValue] = useState(nowLocalInputValue);
|
|
2117
|
-
const [dateFormat, setDateFormat] = useState("locale");
|
|
2118
|
-
const confirmDatePicker = useCallback(() => {
|
|
2119
|
-
const d = new Date(datePickerValue);
|
|
2120
|
-
if (isNaN(d.getTime())) {
|
|
2121
|
-
return;
|
|
2122
|
-
}
|
|
2123
|
-
let formatted;
|
|
2124
|
-
switch (dateFormat) {
|
|
2125
|
-
case "iso":
|
|
2126
|
-
formatted = d.toISOString().slice(0, 10);
|
|
2127
|
-
break;
|
|
2128
|
-
case "long":
|
|
2129
|
-
formatted = d.toLocaleDateString(void 0, {
|
|
2130
|
-
weekday: "long",
|
|
2131
|
-
year: "numeric",
|
|
2132
|
-
month: "long",
|
|
2133
|
-
day: "numeric"
|
|
2134
|
-
});
|
|
2135
|
-
break;
|
|
2136
|
-
case "short":
|
|
2137
|
-
formatted = d.toLocaleDateString(void 0, {
|
|
2138
|
-
year: "numeric",
|
|
2139
|
-
month: "short",
|
|
2140
|
-
day: "numeric"
|
|
2141
|
-
});
|
|
2142
|
-
break;
|
|
2143
|
-
case "time":
|
|
2144
|
-
formatted = d.toLocaleString();
|
|
2145
|
-
break;
|
|
2146
|
-
default:
|
|
2147
|
-
formatted = d.toLocaleDateString();
|
|
2148
|
-
break;
|
|
2149
|
-
}
|
|
2150
|
-
p.onInsert(formatted);
|
|
2151
|
-
}, [datePickerValue, dateFormat, p]);
|
|
2152
|
-
return /* @__PURE__ */ jsx(
|
|
2153
|
-
"div",
|
|
2154
|
-
{
|
|
2155
|
-
className: "fixed inset-0 z-[9999] flex items-center justify-center bg-black/30",
|
|
2156
|
-
onMouseDown: (e) => {
|
|
2157
|
-
if (e.target === e.currentTarget) {
|
|
2158
|
-
p.onClose();
|
|
2159
|
-
}
|
|
2160
|
-
},
|
|
2161
|
-
children: /* @__PURE__ */ jsxs("div", { className: "rounded-lg border border-border bg-popover shadow-2xl p-4 w-72 space-y-3", children: [
|
|
2162
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium text-foreground", children: t("pptx.field.dateTime") }),
|
|
2163
|
-
/* @__PURE__ */ jsx(
|
|
2164
|
-
"input",
|
|
2165
|
-
{
|
|
2166
|
-
type: "datetime-local",
|
|
2167
|
-
className: "w-full text-xs",
|
|
2168
|
-
"aria-label": t("pptx.field.format", "Format"),
|
|
2169
|
-
value: datePickerValue,
|
|
2170
|
-
onChange: (e) => setDatePickerValue(e.target.value)
|
|
2171
|
-
}
|
|
2172
|
-
),
|
|
2173
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
2174
|
-
/* @__PURE__ */ jsx("label", { className: "block text-[11px] text-muted-foreground mb-1", children: t("pptx.field.format", "Format") }),
|
|
2175
|
-
/* @__PURE__ */ jsxs(
|
|
2176
|
-
WebSelect,
|
|
2177
|
-
{
|
|
2178
|
-
className: "w-full rounded border border-border bg-muted px-2.5 py-1.5 text-xs text-foreground focus:border-primary focus:ring-1 focus:ring-primary outline-none",
|
|
2179
|
-
value: dateFormat,
|
|
2180
|
-
onChange: (e) => setDateFormat(e.target.value),
|
|
2181
|
-
children: [
|
|
2182
|
-
/* @__PURE__ */ jsx("option", { value: "locale", children: new Date(datePickerValue || Date.now()).toLocaleDateString() }),
|
|
2183
|
-
/* @__PURE__ */ jsx("option", { value: "long", children: new Date(datePickerValue || Date.now()).toLocaleDateString(void 0, {
|
|
2184
|
-
weekday: "long",
|
|
2185
|
-
year: "numeric",
|
|
2186
|
-
month: "long",
|
|
2187
|
-
day: "numeric"
|
|
2188
|
-
}) }),
|
|
2189
|
-
/* @__PURE__ */ jsx("option", { value: "short", children: new Date(datePickerValue || Date.now()).toLocaleDateString(void 0, {
|
|
2190
|
-
year: "numeric",
|
|
2191
|
-
month: "short",
|
|
2192
|
-
day: "numeric"
|
|
2193
|
-
}) }),
|
|
2194
|
-
/* @__PURE__ */ jsx("option", { value: "iso", children: new Date(datePickerValue || Date.now()).toISOString().slice(0, 10) }),
|
|
2195
|
-
/* @__PURE__ */ jsx("option", { value: "time", children: new Date(datePickerValue || Date.now()).toLocaleString() })
|
|
2196
|
-
]
|
|
2197
|
-
}
|
|
2198
|
-
)
|
|
2199
|
-
] }),
|
|
2200
|
-
/* @__PURE__ */ jsx("div", { className: "flex justify-end gap-2 pt-1", children: /* @__PURE__ */ jsx(
|
|
2201
|
-
DialogFooter,
|
|
2202
|
-
{
|
|
2203
|
-
actions: [
|
|
2204
|
-
{ id: "cancel", label: t("pptx.common.cancel", "Cancel") },
|
|
2205
|
-
{ id: "insert", label: t("pptx.common.insert", "Insert"), variant: "primary" }
|
|
2206
|
-
],
|
|
2207
|
-
onAction: (id) => id === "insert" ? confirmDatePicker() : p.onClose()
|
|
2208
|
-
}
|
|
2209
|
-
) })
|
|
2210
|
-
] })
|
|
2211
|
-
}
|
|
2212
|
-
);
|
|
2213
|
-
}
|
|
2214
|
-
function InsertSection(p) {
|
|
2215
|
-
const { t } = useTranslation();
|
|
2216
|
-
const customization = useViewerCustomizationContext();
|
|
2217
|
-
const ref = useRef(null);
|
|
2218
|
-
const [datePickerOpen, setDatePickerOpen] = useState(false);
|
|
2219
|
-
const [chartKind, setChartKind] = useState(DEFAULT_INSERT_CHART_KIND);
|
|
2220
|
-
useEffect(() => {
|
|
2221
|
-
const host = ref.current;
|
|
2222
|
-
if (!host) {
|
|
2223
|
-
return;
|
|
2224
|
-
}
|
|
2225
|
-
host.state = {
|
|
2226
|
-
editable: p.canEdit,
|
|
2227
|
-
hasSelection: p.hasSelection,
|
|
2228
|
-
shapeType: p.newShapeType,
|
|
2229
|
-
chartKind,
|
|
2230
|
-
activeFreeformTool: p.activeFreeformTool ?? null,
|
|
2231
|
-
freeformTools: p.onArmFreeformTool ? FREEFORM_TOOL_IDS.filter((tool) => isDrawingToolVisible(customization, tool)) : [],
|
|
2232
|
-
chartAvailable: Boolean(p.onAddChart),
|
|
2233
|
-
fieldAvailable: Boolean(p.onInsertField),
|
|
2234
|
-
headerFooterAvailable: Boolean(p.onOpenHeaderFooter),
|
|
2235
|
-
newSlideAvailable: Boolean(p.onInsertSlideFromLayout && p.layoutOptions?.length),
|
|
2236
|
-
commentAvailable: Boolean(p.onToggleComments),
|
|
2237
|
-
layouts: p.layoutOptions ?? [],
|
|
2238
|
-
...p.currentLayoutPath ? { currentLayoutPath: p.currentLayoutPath } : {},
|
|
2239
|
-
translate: t
|
|
2240
|
-
};
|
|
2241
|
-
}, [p, chartKind, customization, t]);
|
|
2242
|
-
useEffect(() => {
|
|
2243
|
-
const host = ref.current;
|
|
2244
|
-
if (!host) {
|
|
2245
|
-
return;
|
|
2246
|
-
}
|
|
2247
|
-
const request = (event) => {
|
|
2248
|
-
const intent = event.detail;
|
|
2249
|
-
switch (intent.kind) {
|
|
2250
|
-
case "command": {
|
|
2251
|
-
const commands = {
|
|
2252
|
-
textBox: p.onAddTextBox,
|
|
2253
|
-
table: p.onAddTable,
|
|
2254
|
-
image: p.onOpenImagePicker,
|
|
2255
|
-
media: p.onOpenMediaPicker,
|
|
2256
|
-
smartArt: p.onAddSmartArt,
|
|
2257
|
-
equation: p.onAddEquation,
|
|
2258
|
-
link: p.onOpenHyperlinkDialog,
|
|
2259
|
-
headerFooter: p.onOpenHeaderFooter,
|
|
2260
|
-
// Opening an already open pane would toggle it shut.
|
|
2261
|
-
comment: p.isCommentsPanelOpen ? void 0 : p.onToggleComments
|
|
2262
|
-
};
|
|
2263
|
-
commands[intent.value]?.();
|
|
2264
|
-
break;
|
|
2265
|
-
}
|
|
2266
|
-
case "table":
|
|
2267
|
-
p.onAddTable(intent.rows, intent.columns);
|
|
2268
|
-
break;
|
|
2269
|
-
case "newSlide": {
|
|
2270
|
-
const layout = resolveInsertSlideLayout(
|
|
2271
|
-
p.layoutOptions ?? [],
|
|
2272
|
-
intent.value,
|
|
2273
|
-
p.currentLayoutPath
|
|
2274
|
-
);
|
|
2275
|
-
if (layout) {
|
|
2276
|
-
p.onInsertSlideFromLayout?.(layout.path, layout.name);
|
|
2277
|
-
}
|
|
2278
|
-
break;
|
|
2279
|
-
}
|
|
2280
|
-
case "shapeType":
|
|
2281
|
-
p.onSetNewShapeType(intent.value);
|
|
2282
|
-
break;
|
|
2283
|
-
case "shape":
|
|
2284
|
-
p.onAddShape();
|
|
2285
|
-
break;
|
|
2286
|
-
case "chartType":
|
|
2287
|
-
setChartKind(intent.value);
|
|
2288
|
-
break;
|
|
2289
|
-
case "chart":
|
|
2290
|
-
p.onAddChart?.(intent.value);
|
|
2291
|
-
break;
|
|
2292
|
-
case "freeform":
|
|
2293
|
-
p.onArmFreeformTool?.(intent.value);
|
|
2294
|
-
break;
|
|
2295
|
-
case "actionButton":
|
|
2296
|
-
p.onAddActionButton(intent.value);
|
|
2297
|
-
break;
|
|
2298
|
-
case "field":
|
|
2299
|
-
if (intent.value === "datetime") {
|
|
2300
|
-
setDatePickerOpen(true);
|
|
2301
|
-
} else {
|
|
2302
|
-
p.onInsertField?.(intent.value);
|
|
2303
|
-
}
|
|
2304
|
-
}
|
|
2305
|
-
};
|
|
2306
|
-
host.addEventListener("insert-request", request);
|
|
2307
|
-
return () => host.removeEventListener("insert-request", request);
|
|
2308
|
-
}, [p]);
|
|
2309
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2310
|
-
/* @__PURE__ */ jsx("pptx-ui-ribbon-insert", { ref }),
|
|
2311
|
-
datePickerOpen && p.onInsertField && /* @__PURE__ */ jsx(
|
|
2312
|
-
DateTimeFieldDialog,
|
|
2313
|
-
{
|
|
2314
|
-
onClose: () => setDatePickerOpen(false),
|
|
2315
|
-
onInsert: (formatted) => {
|
|
2316
|
-
p.onInsertField?.("datetime", formatted);
|
|
2317
|
-
setDatePickerOpen(false);
|
|
2318
|
-
}
|
|
2319
|
-
}
|
|
2320
|
-
)
|
|
2321
|
-
] });
|
|
2322
|
-
}
|
|
2323
2530
|
function WebRibbonSection({
|
|
2324
2531
|
groups,
|
|
2325
2532
|
onCommand
|
|
@@ -3072,89 +3279,6 @@ function ViewSection(p) {
|
|
|
3072
3279
|
}, [p]);
|
|
3073
3280
|
return /* @__PURE__ */ jsx("pptx-ui-ribbon-view", { ref });
|
|
3074
3281
|
}
|
|
3075
|
-
function MobileSheet({
|
|
3076
|
-
open,
|
|
3077
|
-
onClose,
|
|
3078
|
-
title,
|
|
3079
|
-
children,
|
|
3080
|
-
heightFraction = 0.6,
|
|
3081
|
-
fullScreen = false,
|
|
3082
|
-
autoHeight = false,
|
|
3083
|
-
className,
|
|
3084
|
-
headerRight
|
|
3085
|
-
}) {
|
|
3086
|
-
const sheetRef = useRef(null);
|
|
3087
|
-
const { t } = useTranslation();
|
|
3088
|
-
const { dragY, dragging, handlers } = useSheetDismissDrag(onClose);
|
|
3089
|
-
useModalFocus(open, sheetRef, onClose);
|
|
3090
|
-
if (!open) {
|
|
3091
|
-
return null;
|
|
3092
|
-
}
|
|
3093
|
-
const heightStyle = autoHeight ? { maxHeight: "calc(85dvh - env(safe-area-inset-top))" } : fullScreen ? { height: "calc(100dvh - env(safe-area-inset-top))" } : { height: `${Math.round(heightFraction * 100)}dvh` };
|
|
3094
|
-
return /* @__PURE__ */ jsxs("div", { className: "fixed inset-0 z-50 flex flex-col justify-end", children: [
|
|
3095
|
-
/* @__PURE__ */ jsx(
|
|
3096
|
-
"button",
|
|
3097
|
-
{
|
|
3098
|
-
type: "button",
|
|
3099
|
-
"aria-label": t("pptx.mobileSheet.close"),
|
|
3100
|
-
className: "absolute inset-0 bg-black/40 backdrop-blur-[2px] animate-in fade-in duration-150",
|
|
3101
|
-
onClick: onClose
|
|
3102
|
-
}
|
|
3103
|
-
),
|
|
3104
|
-
/* @__PURE__ */ jsxs(
|
|
3105
|
-
"div",
|
|
3106
|
-
{
|
|
3107
|
-
ref: sheetRef,
|
|
3108
|
-
role: "dialog",
|
|
3109
|
-
"aria-modal": "true",
|
|
3110
|
-
"aria-label": typeof title === "string" ? title : t("pptx.mobileSheet.ariaLabel"),
|
|
3111
|
-
tabIndex: -1,
|
|
3112
|
-
className: cn(
|
|
3113
|
-
"relative bg-background border-t border-border rounded-t-2xl shadow-2xl flex flex-col overflow-hidden",
|
|
3114
|
-
"animate-in slide-in-from-bottom duration-200",
|
|
3115
|
-
className
|
|
3116
|
-
),
|
|
3117
|
-
style: {
|
|
3118
|
-
...heightStyle,
|
|
3119
|
-
transform: dragY > 0 ? `translateY(${dragY}px)` : void 0,
|
|
3120
|
-
transition: dragging ? "none" : "transform 150ms ease-out"
|
|
3121
|
-
},
|
|
3122
|
-
children: [
|
|
3123
|
-
/* @__PURE__ */ jsxs(
|
|
3124
|
-
"div",
|
|
3125
|
-
{
|
|
3126
|
-
className: "cursor-grab active:cursor-grabbing touch-none",
|
|
3127
|
-
onPointerDown: handlers.onPointerDown,
|
|
3128
|
-
onPointerMove: handlers.onPointerMove,
|
|
3129
|
-
onPointerUp: handlers.onPointerUp,
|
|
3130
|
-
onPointerCancel: handlers.onPointerCancel,
|
|
3131
|
-
children: [
|
|
3132
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center pt-2 pb-1", children: /* @__PURE__ */ jsx("div", { className: "h-1 w-10 rounded-full bg-muted-foreground/40" }) }),
|
|
3133
|
-
(title || headerRight) && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2 px-4 pb-2 border-b border-border/60", children: [
|
|
3134
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm font-semibold text-foreground truncate", children: title }),
|
|
3135
|
-
headerRight,
|
|
3136
|
-
/* @__PURE__ */ jsx(
|
|
3137
|
-
"button",
|
|
3138
|
-
{
|
|
3139
|
-
type: "button",
|
|
3140
|
-
"aria-label": t("pptx.mobileSheet.close"),
|
|
3141
|
-
onPointerDown: (event) => event.stopPropagation(),
|
|
3142
|
-
onClick: onClose,
|
|
3143
|
-
style: { minWidth: MIN_TOUCH_TARGET_PX, minHeight: MIN_TOUCH_TARGET_PX },
|
|
3144
|
-
className: "inline-flex items-center justify-center rounded text-xl text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
3145
|
-
children: "\xD7"
|
|
3146
|
-
}
|
|
3147
|
-
)
|
|
3148
|
-
] })
|
|
3149
|
-
]
|
|
3150
|
-
}
|
|
3151
|
-
),
|
|
3152
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto overscroll-contain", children })
|
|
3153
|
-
]
|
|
3154
|
-
}
|
|
3155
|
-
)
|
|
3156
|
-
] });
|
|
3157
|
-
}
|
|
3158
3282
|
var MENU_ITEMS = [
|
|
3159
3283
|
{ key: "home", label: "pptx.ribbon.tab.home", icon: LuClipboardCopy },
|
|
3160
3284
|
{ key: "insert", label: "pptx.ribbon.tab.insert", icon: LuPlus },
|
|
@@ -3233,6 +3357,8 @@ function MobileSectionBody({
|
|
|
3233
3357
|
InsertSection,
|
|
3234
3358
|
{
|
|
3235
3359
|
canEdit: p.canEdit,
|
|
3360
|
+
onInsertSlideFromTemplate: p.onInsertSlideFromTemplate,
|
|
3361
|
+
templateScheme: p.templateScheme,
|
|
3236
3362
|
newShapeType: p.newShapeType,
|
|
3237
3363
|
onSetNewShapeType: p.onSetNewShapeType,
|
|
3238
3364
|
onAddTextBox: p.onAddTextBox,
|
|
@@ -3501,9 +3627,39 @@ function MobileToolbar(props) {
|
|
|
3501
3627
|
);
|
|
3502
3628
|
return /* @__PURE__ */ jsxs("div", { className: "relative z-20", children: [
|
|
3503
3629
|
/* @__PURE__ */ jsx("pptx-ui-mobile-toolbar", { ref }),
|
|
3504
|
-
/* @__PURE__ */ jsx(MobileMenuSheet, { open: menuOpen, onClose: () => setMenuOpen(false), ...props })
|
|
3630
|
+
/* @__PURE__ */ jsx(MobileMenuSheet, { open: menuOpen, onClose: () => setMenuOpen(false), ...props }),
|
|
3631
|
+
/* @__PURE__ */ jsx(MobileInsertSheet, { ...props })
|
|
3505
3632
|
] });
|
|
3506
3633
|
}
|
|
3634
|
+
function ChartSelectionStrip() {
|
|
3635
|
+
const { t } = useTranslation();
|
|
3636
|
+
const commands = useChartFormatContext();
|
|
3637
|
+
const chart = commands?.chart;
|
|
3638
|
+
const chartData = chart?.type === "chart" ? chart.chartData : void 0;
|
|
3639
|
+
const controls = useMemo(
|
|
3640
|
+
() => chartSelectionHomeControls({
|
|
3641
|
+
chartData,
|
|
3642
|
+
targetKey: commands?.target,
|
|
3643
|
+
editable: Boolean(commands?.editable),
|
|
3644
|
+
translate: t
|
|
3645
|
+
}),
|
|
3646
|
+
[chartData, commands?.target, commands?.editable, t]
|
|
3647
|
+
);
|
|
3648
|
+
const request = useCallback(
|
|
3649
|
+
(_id, _part, intent) => {
|
|
3650
|
+
if (!commands || !intent) {
|
|
3651
|
+
return;
|
|
3652
|
+
}
|
|
3653
|
+
dispatchChartSelectionRequest(intent, {
|
|
3654
|
+
select: commands.setTarget,
|
|
3655
|
+
formatSelection: () => commands.openPane(),
|
|
3656
|
+
reset: commands.reset
|
|
3657
|
+
});
|
|
3658
|
+
},
|
|
3659
|
+
[commands]
|
|
3660
|
+
);
|
|
3661
|
+
return /* @__PURE__ */ jsx(WebHomeControls, { family: "chart-selection", controls, onRequest: request });
|
|
3662
|
+
}
|
|
3507
3663
|
function PictureSizeStrip({
|
|
3508
3664
|
hiddenActions
|
|
3509
3665
|
}) {
|
|
@@ -3540,7 +3696,8 @@ function ContextualTabSection({
|
|
|
3540
3696
|
label: translateOr(group.labelKey, group.label),
|
|
3541
3697
|
children: [
|
|
3542
3698
|
group.galleries.map((placement) => /* @__PURE__ */ jsx(RibbonGallery, { placement }, placement.control)),
|
|
3543
|
-
group.strip === "picture-size" && /* @__PURE__ */ jsx(PictureSizeStrip, { hiddenActions })
|
|
3699
|
+
group.strip === "picture-size" && /* @__PURE__ */ jsx(PictureSizeStrip, { hiddenActions }),
|
|
3700
|
+
group.strip === "chart-selection" && /* @__PURE__ */ jsx(ChartSelectionStrip, {})
|
|
3544
3701
|
]
|
|
3545
3702
|
},
|
|
3546
3703
|
group.group
|
|
@@ -4640,6 +4797,8 @@ function Toolbar(p) {
|
|
|
4640
4797
|
InsertSection,
|
|
4641
4798
|
{
|
|
4642
4799
|
canEdit: p.canEdit,
|
|
4800
|
+
onInsertSlideFromTemplate: p.onInsertSlideFromTemplate,
|
|
4801
|
+
templateScheme: p.templateScheme,
|
|
4643
4802
|
newShapeType: p.newShapeType,
|
|
4644
4803
|
onSetNewShapeType: p.onSetNewShapeType,
|
|
4645
4804
|
activeFreeformTool: p.activeFreeformTool,
|
|
@@ -5021,7 +5180,7 @@ function ChartQuickActionsOverlay({
|
|
|
5021
5180
|
"data-export-ignore": "true",
|
|
5022
5181
|
style: { position: "absolute", left: 0, top: 0, zIndex: 59 },
|
|
5023
5182
|
onMouseDown: (e) => e.stopPropagation(),
|
|
5024
|
-
children: descriptor.buttons.map((button) => /* @__PURE__ */ jsxs(
|
|
5183
|
+
children: descriptor.buttons.map((button) => /* @__PURE__ */ jsxs(React105.Fragment, { children: [
|
|
5025
5184
|
/* @__PURE__ */ jsx(
|
|
5026
5185
|
"button",
|
|
5027
5186
|
{
|
|
@@ -5041,7 +5200,7 @@ function ChartQuickActionsOverlay({
|
|
|
5041
5200
|
transformOrigin: "top left"
|
|
5042
5201
|
},
|
|
5043
5202
|
className: "flex items-center justify-center rounded bg-white border border-gray-300 shadow-sm hover:bg-gray-100 text-gray-700",
|
|
5044
|
-
children:
|
|
5203
|
+
children: React105.createElement(ICONS3[button.id], { className: "size-3.5" })
|
|
5045
5204
|
}
|
|
5046
5205
|
),
|
|
5047
5206
|
open === button.id && button.id === "elements" && /* @__PURE__ */ jsxs(
|
|
@@ -6187,7 +6346,7 @@ function HorizontalRulerView({ ticks, widthPx, highlight }) {
|
|
|
6187
6346
|
}
|
|
6188
6347
|
);
|
|
6189
6348
|
}
|
|
6190
|
-
var HorizontalRuler =
|
|
6349
|
+
var HorizontalRuler = React105.memo(HorizontalRulerView);
|
|
6191
6350
|
HorizontalRuler.displayName = "HorizontalRuler";
|
|
6192
6351
|
function VerticalRulerView({ ticks, heightPx, highlight }) {
|
|
6193
6352
|
return /* @__PURE__ */ jsxs(
|
|
@@ -6259,7 +6418,7 @@ function VerticalRulerView({ ticks, heightPx, highlight }) {
|
|
|
6259
6418
|
}
|
|
6260
6419
|
);
|
|
6261
6420
|
}
|
|
6262
|
-
var VerticalRuler =
|
|
6421
|
+
var VerticalRuler = React105.memo(VerticalRulerView);
|
|
6263
6422
|
VerticalRuler.displayName = "VerticalRuler";
|
|
6264
6423
|
function Ruler({
|
|
6265
6424
|
canvasSize,
|
|
@@ -8141,7 +8300,7 @@ function slideThumbnailPropsEqual(prev, next) {
|
|
|
8141
8300
|
}
|
|
8142
8301
|
return true;
|
|
8143
8302
|
}
|
|
8144
|
-
var SlideThumbnail =
|
|
8303
|
+
var SlideThumbnail = React105.memo(SlideThumbnailImpl, slideThumbnailPropsEqual);
|
|
8145
8304
|
function tableCell(props) {
|
|
8146
8305
|
const { selectedElement, tableEditorState } = props;
|
|
8147
8306
|
if (selectedElement?.type !== "table" || tableEditorState === null) {
|
|
@@ -8254,10 +8413,21 @@ function ContextMenu(props) {
|
|
|
8254
8413
|
const { t } = useTranslation();
|
|
8255
8414
|
const customization = useViewerCustomizationContext();
|
|
8256
8415
|
const shapeFormat = useShapeFormatContext();
|
|
8416
|
+
const chartFormat = useChartFormatContext();
|
|
8257
8417
|
const open = Boolean(contextMenuState) && mode === "edit";
|
|
8258
|
-
const handlers =
|
|
8418
|
+
const handlers = {
|
|
8419
|
+
...contextMenuHandlers(props, shapeFormat),
|
|
8420
|
+
// "Format Chart Area..." and its siblings open the chart Format pane.
|
|
8421
|
+
"format-chart-element": chartFormat ? () => {
|
|
8422
|
+
chartFormat.openPane();
|
|
8423
|
+
onClose();
|
|
8424
|
+
} : void 0
|
|
8425
|
+
};
|
|
8259
8426
|
const entries = customizeContextMenuEntries(
|
|
8260
|
-
buildContextMenuEntries(
|
|
8427
|
+
buildContextMenuEntries({
|
|
8428
|
+
...contextMenuContext(props, shapeFormat),
|
|
8429
|
+
chartFormatTarget: chartFormat?.target ?? null
|
|
8430
|
+
}),
|
|
8261
8431
|
customization,
|
|
8262
8432
|
{
|
|
8263
8433
|
slideIndex: props.slideIndex ?? 0,
|
|
@@ -8827,7 +8997,7 @@ function LazyThumbnailInner({
|
|
|
8827
8997
|
}
|
|
8828
8998
|
) });
|
|
8829
8999
|
}
|
|
8830
|
-
var LazyThumbnail =
|
|
9000
|
+
var LazyThumbnail = React105.memo(LazyThumbnailInner);
|
|
8831
9001
|
function declaredSectionFacts(groups, sectionId) {
|
|
8832
9002
|
const declared = groups.filter((group) => group.id !== DEFAULT_SECTION_GROUP_ID && group.id !== UNGROUPED_SECTION_ID).map((group) => group.id);
|
|
8833
9003
|
return {
|
|
@@ -8995,7 +9165,7 @@ function SlideItemInner({
|
|
|
8995
9165
|
}
|
|
8996
9166
|
);
|
|
8997
9167
|
}
|
|
8998
|
-
var SlideItem =
|
|
9168
|
+
var SlideItem = React105.memo(SlideItemInner);
|
|
8999
9169
|
function useSlidePaneCallbacks(onMoveSlide, onRenameSection, onToggleSectionCollapse) {
|
|
9000
9170
|
const [collapsedSections, setCollapsedSections] = useState({});
|
|
9001
9171
|
const [renamingSectionId, setRenamingSectionId] = useState(null);
|
|
@@ -10408,7 +10578,7 @@ function arePropsEqual(prev, next) {
|
|
|
10408
10578
|
}
|
|
10409
10579
|
return true;
|
|
10410
10580
|
}
|
|
10411
|
-
var SlideCard =
|
|
10581
|
+
var SlideCard = React105.memo(SlideCardImpl, arePropsEqual);
|
|
10412
10582
|
var ICON_CLASS = "h-3.5 w-3.5 text-muted-foreground";
|
|
10413
10583
|
function SorterContextMenu({
|
|
10414
10584
|
x,
|
|
@@ -10833,7 +11003,7 @@ function SlideSorterOverlay({
|
|
|
10833
11003
|
count: state.selectedSlideIds.length
|
|
10834
11004
|
}) })
|
|
10835
11005
|
] }),
|
|
10836
|
-
|
|
11006
|
+
React105.createElement("pptx-ui-slide-clipboard", {
|
|
10837
11007
|
ref: (node) => {
|
|
10838
11008
|
if (!node) {
|
|
10839
11009
|
return;
|
|
@@ -11749,8 +11919,8 @@ function SlideNotesPanel({
|
|
|
11749
11919
|
onHeightChange
|
|
11750
11920
|
}) {
|
|
11751
11921
|
const { t } = useTranslation();
|
|
11752
|
-
const rootRef =
|
|
11753
|
-
|
|
11922
|
+
const rootRef = React105.useRef(null);
|
|
11923
|
+
React105.useEffect(() => {
|
|
11754
11924
|
const el = rootRef.current;
|
|
11755
11925
|
if (!el || !onHeightChange) {
|
|
11756
11926
|
return void 0;
|
|
@@ -12246,7 +12416,7 @@ function SlideDiffRow({
|
|
|
12246
12416
|
className: "flex items-start gap-2 rounded bg-muted/60 px-2 py-1.5 text-[11px]",
|
|
12247
12417
|
children: [
|
|
12248
12418
|
/* @__PURE__ */ jsx(ChangeKindIcon, { kind: change.kind }),
|
|
12249
|
-
/* @__PURE__ */ jsx("span", { className: "text-foreground", children: change
|
|
12419
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground", children: describeElementChange(change, t) })
|
|
12250
12420
|
]
|
|
12251
12421
|
},
|
|
12252
12422
|
`${change.elementId}-${change.kind}-${ci}`
|
|
@@ -13593,9 +13763,9 @@ function PresentationSubtitleBar({
|
|
|
13593
13763
|
function renderNotesSegments(segments) {
|
|
13594
13764
|
return notesSegmentsToSpans(segments).map((span) => {
|
|
13595
13765
|
if (span.kind === "break") {
|
|
13596
|
-
return
|
|
13766
|
+
return React105.createElement("br", { key: span.key });
|
|
13597
13767
|
}
|
|
13598
|
-
return
|
|
13768
|
+
return React105.createElement(
|
|
13599
13769
|
"span",
|
|
13600
13770
|
{ key: span.key, style: span.style },
|
|
13601
13771
|
span.text
|
|
@@ -13771,7 +13941,7 @@ function scaledSlidePreviewPropsEqual(prev, next) {
|
|
|
13771
13941
|
}
|
|
13772
13942
|
return true;
|
|
13773
13943
|
}
|
|
13774
|
-
var ScaledSlidePreview =
|
|
13944
|
+
var ScaledSlidePreview = React105.memo(ScaledSlidePreviewImpl, scaledSlidePreviewPropsEqual);
|
|
13775
13945
|
function PresenterNotesRail({
|
|
13776
13946
|
slides,
|
|
13777
13947
|
current,
|
|
@@ -15000,7 +15170,7 @@ function EffectSoundRow({
|
|
|
15000
15170
|
onPickStock
|
|
15001
15171
|
}) {
|
|
15002
15172
|
const { t } = useTranslation();
|
|
15003
|
-
const fileInputRef =
|
|
15173
|
+
const fileInputRef = React105.useRef(null);
|
|
15004
15174
|
const selectedValue = soundState.catalogueId ?? (soundState.hasSound ? CURRENT_VALUE : NONE_VALUE);
|
|
15005
15175
|
const handleSelectChange = (event) => {
|
|
15006
15176
|
const value = event.target.value;
|
|
@@ -18571,7 +18741,7 @@ function ConnectorArrowsSection({
|
|
|
18571
18741
|
["Start", "End"].map((end) => {
|
|
18572
18742
|
const widthKey = end === "Start" ? "connectorStartArrowWidth" : "connectorEndArrowWidth";
|
|
18573
18743
|
const lengthKey = end === "Start" ? "connectorStartArrowLength" : "connectorEndArrowLength";
|
|
18574
|
-
return /* @__PURE__ */ jsxs(
|
|
18744
|
+
return /* @__PURE__ */ jsxs(React105.Fragment, { children: [
|
|
18575
18745
|
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
18576
18746
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t(END_LABEL_KEYS[end].width) }),
|
|
18577
18747
|
/* @__PURE__ */ jsx(
|
|
@@ -21499,7 +21669,7 @@ function StrokeEffectsSection({
|
|
|
21499
21669
|
] }),
|
|
21500
21670
|
EFFECT_CONFIGS.map((cfg) => {
|
|
21501
21671
|
const on = cfg.isOn(style);
|
|
21502
|
-
return /* @__PURE__ */ jsxs(
|
|
21672
|
+
return /* @__PURE__ */ jsxs(React105.Fragment, { children: [
|
|
21503
21673
|
/* @__PURE__ */ jsxs("label", { className: `inline-flex items-center gap-2 text-foreground ${COL2}`, children: [
|
|
21504
21674
|
/* @__PURE__ */ jsx(
|
|
21505
21675
|
WebCheckbox,
|
|
@@ -21754,7 +21924,7 @@ function Text3DProperties({
|
|
|
21754
21924
|
});
|
|
21755
21925
|
},
|
|
21756
21926
|
className: INPUT_CLS2,
|
|
21757
|
-
children: MATERIAL_PRESETS.map(({ value,
|
|
21927
|
+
children: MATERIAL_PRESETS.map(({ value, labelKey }) => /* @__PURE__ */ jsx("option", { value, children: t(labelKey) }, value))
|
|
21758
21928
|
}
|
|
21759
21929
|
)
|
|
21760
21930
|
] })
|
|
@@ -21782,7 +21952,7 @@ function BevelSection({
|
|
|
21782
21952
|
value: bevelType ?? "none",
|
|
21783
21953
|
onChange: (e) => onTypeChange(e.target.value),
|
|
21784
21954
|
className: INPUT_CLS2,
|
|
21785
|
-
children: BEVEL_PRESETS.map(({ value,
|
|
21955
|
+
children: BEVEL_PRESETS.map(({ value, labelKey }) => /* @__PURE__ */ jsx("option", { value, children: t(labelKey) }, value))
|
|
21786
21956
|
}
|
|
21787
21957
|
)
|
|
21788
21958
|
] }),
|
|
@@ -22354,7 +22524,7 @@ function TextWarpGallery({
|
|
|
22354
22524
|
onUpdateTextStyle
|
|
22355
22525
|
}) {
|
|
22356
22526
|
const { t } = useTranslation();
|
|
22357
|
-
const [expanded, setExpanded] =
|
|
22527
|
+
const [expanded, setExpanded] = React105.useState(false);
|
|
22358
22528
|
const currentPreset = ts?.textWarpPreset || "textNoShape";
|
|
22359
22529
|
return /* @__PURE__ */ jsxs("div", { className: "mt-2 rounded border border-border bg-card p-2 space-y-2", children: [
|
|
22360
22530
|
/* @__PURE__ */ jsxs(
|
|
@@ -22369,13 +22539,16 @@ function TextWarpGallery({
|
|
|
22369
22539
|
]
|
|
22370
22540
|
}
|
|
22371
22541
|
),
|
|
22372
|
-
!expanded && /* @__PURE__ */ jsx("div", { className: "text-[11px] text-muted-foreground", children:
|
|
22373
|
-
|
|
22542
|
+
!expanded && /* @__PURE__ */ jsx("div", { className: "text-[11px] text-muted-foreground", children: (() => {
|
|
22543
|
+
const current = TEXT_WARP_PRESETS.find((p) => p.value === currentPreset);
|
|
22544
|
+
return current ? t(current.labelKey) : currentPreset;
|
|
22545
|
+
})() }),
|
|
22546
|
+
expanded && /* @__PURE__ */ jsx("div", { className: "grid grid-cols-5 gap-1", children: TEXT_WARP_PRESETS.map(({ value, labelKey }) => /* @__PURE__ */ jsx(
|
|
22374
22547
|
"button",
|
|
22375
22548
|
{
|
|
22376
22549
|
type: "button",
|
|
22377
|
-
title:
|
|
22378
|
-
"aria-label":
|
|
22550
|
+
title: t(labelKey),
|
|
22551
|
+
"aria-label": t(labelKey),
|
|
22379
22552
|
className: `flex items-center justify-center rounded p-1 ${currentPreset === value ? "bg-primary ring-1 ring-primary" : "bg-muted hover:bg-accent"}`,
|
|
22380
22553
|
onClick: () => onUpdateTextStyle({
|
|
22381
22554
|
textWarpPreset: value === "textNoShape" ? void 0 : value
|
|
@@ -22997,7 +23170,7 @@ function SmartArtStyleControls({
|
|
|
22997
23170
|
onChangeStyle
|
|
22998
23171
|
}) {
|
|
22999
23172
|
const { t } = useTranslation();
|
|
23000
|
-
const translate =
|
|
23173
|
+
const translate = React105.useCallback((key) => t(key), [t]);
|
|
23001
23174
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23002
23175
|
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1 text-[11px]", children: [
|
|
23003
23176
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.smartart.colorScheme") }),
|
|
@@ -23052,9 +23225,9 @@ function SmartArtPropertiesPanel({
|
|
|
23052
23225
|
const nodes = smartArtData.nodes ?? [];
|
|
23053
23226
|
const layout = smartArtData.resolvedLayoutType;
|
|
23054
23227
|
const topLevelCount = nodes.filter((n) => !n.parentId).length;
|
|
23055
|
-
const inputRefs =
|
|
23056
|
-
const pendingFocusId =
|
|
23057
|
-
|
|
23228
|
+
const inputRefs = React105.useRef(/* @__PURE__ */ new Map());
|
|
23229
|
+
const pendingFocusId = React105.useRef(null);
|
|
23230
|
+
React105.useEffect(() => {
|
|
23058
23231
|
const id = pendingFocusId.current;
|
|
23059
23232
|
if (id) {
|
|
23060
23233
|
inputRefs.current.get(id)?.focus();
|
|
@@ -24239,8 +24412,8 @@ function TablePropertiesPanel({
|
|
|
24239
24412
|
{
|
|
24240
24413
|
type: "button",
|
|
24241
24414
|
disabled: !canEdit,
|
|
24242
|
-
title: preset.
|
|
24243
|
-
"aria-label": preset.
|
|
24415
|
+
title: t(preset.labelKey),
|
|
24416
|
+
"aria-label": t(preset.labelKey),
|
|
24244
24417
|
className: "rounded border border-border hover:border-primary overflow-hidden h-10 max-md:h-11 transition-colors",
|
|
24245
24418
|
onClick: () => {
|
|
24246
24419
|
updateTableData({ rows: applyTableStylePreset(td, preset) });
|
|
@@ -24660,7 +24833,7 @@ function CommentBody({ text, mentions, className }) {
|
|
|
24660
24833
|
index
|
|
24661
24834
|
) : (
|
|
24662
24835
|
// eslint-disable-next-line react/no-array-index-key -- segments are positional
|
|
24663
|
-
/* @__PURE__ */ jsx(
|
|
24836
|
+
/* @__PURE__ */ jsx(React105.Fragment, { children: segment.text }, index)
|
|
24664
24837
|
)
|
|
24665
24838
|
) });
|
|
24666
24839
|
}
|
|
@@ -26177,7 +26350,7 @@ function PresentationPropertiesPanel({
|
|
|
26177
26350
|
onUpdateTagCollections
|
|
26178
26351
|
}) {
|
|
26179
26352
|
const { t } = useTranslation();
|
|
26180
|
-
const handleTransitionChange =
|
|
26353
|
+
const handleTransitionChange = React105.useCallback(
|
|
26181
26354
|
(updates) => {
|
|
26182
26355
|
onUpdateSlide({
|
|
26183
26356
|
transition: mergeSlideTransition(activeSlide?.transition, updates)
|
|
@@ -29658,7 +29831,7 @@ function ViewerToolbarSection(props) {
|
|
|
29658
29831
|
},
|
|
29659
29832
|
[activeSlide, propertyHandlers]
|
|
29660
29833
|
);
|
|
29661
|
-
const scopedLayoutOptions =
|
|
29834
|
+
const scopedLayoutOptions = React105.useMemo(
|
|
29662
29835
|
() => scopeLayoutOptionsToActiveSlide(s.layoutOptions, activeSlide),
|
|
29663
29836
|
[s.layoutOptions, activeSlide]
|
|
29664
29837
|
);
|
|
@@ -30061,6 +30234,8 @@ function ViewerToolbarSection(props) {
|
|
|
30061
30234
|
}
|
|
30062
30235
|
},
|
|
30063
30236
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
30237
|
+
isMobileInsertOpen: s.isMobileInsertOpen,
|
|
30238
|
+
onCloseMobileInsert: () => s.setIsMobileInsertOpen(false),
|
|
30064
30239
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
30065
30240
|
reviewComments: createReviewCommentsHost({
|
|
30066
30241
|
state: s,
|
|
@@ -31603,7 +31778,7 @@ function useTableStyleMapHandlers(input) {
|
|
|
31603
31778
|
var AiChatPanel = lazy(async () => {
|
|
31604
31779
|
const [{ useChat }, { default: Panel }] = await Promise.all([
|
|
31605
31780
|
import('@ai-sdk/react'),
|
|
31606
|
-
import('./AiChatPanel-
|
|
31781
|
+
import('./AiChatPanel-IDP326YW.mjs')
|
|
31607
31782
|
]);
|
|
31608
31783
|
function BoundAiChatPanel(props) {
|
|
31609
31784
|
return /* @__PURE__ */ jsx(Panel, { ...props, useChat });
|
|
@@ -31725,6 +31900,42 @@ function AiChangeOverlay({ batch, activeSlideIndex }) {
|
|
|
31725
31900
|
))
|
|
31726
31901
|
] });
|
|
31727
31902
|
}
|
|
31903
|
+
function ChartFormatPanel() {
|
|
31904
|
+
const { t } = useTranslation();
|
|
31905
|
+
const commands = useChartFormatContext();
|
|
31906
|
+
const ref = useRef(null);
|
|
31907
|
+
const chart = commands?.chart;
|
|
31908
|
+
const chartData = chart?.type === "chart" ? chart.chartData : void 0;
|
|
31909
|
+
useEffect(() => {
|
|
31910
|
+
const node = ref.current;
|
|
31911
|
+
if (node && commands) {
|
|
31912
|
+
node.translateLabel = t;
|
|
31913
|
+
node.chartData = chartData;
|
|
31914
|
+
node.target = commands.target;
|
|
31915
|
+
node.disabled = !commands.editable;
|
|
31916
|
+
}
|
|
31917
|
+
}, [chartData, commands, t]);
|
|
31918
|
+
useEffect(() => {
|
|
31919
|
+
const node = ref.current;
|
|
31920
|
+
if (!node || !commands) {
|
|
31921
|
+
return;
|
|
31922
|
+
}
|
|
31923
|
+
const change = (event) => commands.applyChartData(event.detail.chartData);
|
|
31924
|
+
const retarget = (event) => commands.setTarget(event.detail.target);
|
|
31925
|
+
node.addEventListener("chart-format-change", change);
|
|
31926
|
+
node.addEventListener("chart-format-target", retarget);
|
|
31927
|
+
node.addEventListener("chart-format-close", commands.closePane);
|
|
31928
|
+
return () => {
|
|
31929
|
+
node.removeEventListener("chart-format-change", change);
|
|
31930
|
+
node.removeEventListener("chart-format-target", retarget);
|
|
31931
|
+
node.removeEventListener("chart-format-close", commands.closePane);
|
|
31932
|
+
};
|
|
31933
|
+
}, [commands]);
|
|
31934
|
+
if (!commands?.paneOpen || !chartData) {
|
|
31935
|
+
return null;
|
|
31936
|
+
}
|
|
31937
|
+
return /* @__PURE__ */ jsx("pptx-ui-chart-format-pane", { ref, "data-testid": "chart-format-pane" });
|
|
31938
|
+
}
|
|
31728
31939
|
function ThemeEditorPanel({ theme, canEdit, onApply, onClose }) {
|
|
31729
31940
|
const { t } = useTranslation();
|
|
31730
31941
|
const ref = useRef(null);
|
|
@@ -32314,6 +32525,7 @@ function ViewerSidePanels(props) {
|
|
|
32314
32525
|
onClose: () => s.setIsThemeEditorOpen(false)
|
|
32315
32526
|
}
|
|
32316
32527
|
),
|
|
32528
|
+
(mode === "edit" || mode === "master") && /* @__PURE__ */ jsx(ChartFormatPanel, {}),
|
|
32317
32529
|
aiPanel?.isOpen && aiConfig && aiBridge && (mode === "edit" || mode === "master") && /* @__PURE__ */ jsx(
|
|
32318
32530
|
AiChatPanelLazy,
|
|
32319
32531
|
{
|
|
@@ -33008,8 +33220,9 @@ function MobileChromeOverlay(props) {
|
|
|
33008
33220
|
slideSectionGroups,
|
|
33009
33221
|
canEdit,
|
|
33010
33222
|
commentCount
|
|
33011
|
-
} = props, { keyboardInset, isKeyboardOpen } = useKeyboardInsets(), activeSheet = s.isSlidesPaneOpen ? "slides" : s.isInspectorPaneOpen ? s.sidebarPanelMode === "comments" ? "comments" : "inspector" : !s.isSlideNotesCollapsed ? "notes" : null, closeAllSheets = () => {
|
|
33223
|
+
} = props, { keyboardInset, isKeyboardOpen } = useKeyboardInsets(), activeSheet = s.isMobileInsertOpen ? "insert" : s.isSlidesPaneOpen ? "slides" : s.isInspectorPaneOpen ? s.sidebarPanelMode === "comments" ? "comments" : "inspector" : !s.isSlideNotesCollapsed ? "notes" : null, closeAllSheets = () => {
|
|
33012
33224
|
s.setIsSlidesPaneOpen(false);
|
|
33225
|
+
s.setIsMobileInsertOpen(false);
|
|
33013
33226
|
s.setIsInspectorPaneOpen(false);
|
|
33014
33227
|
s.setIsSlideNotesCollapsed(true);
|
|
33015
33228
|
}, openSheet = (which) => {
|
|
@@ -33018,6 +33231,9 @@ function MobileChromeOverlay(props) {
|
|
|
33018
33231
|
case "slides":
|
|
33019
33232
|
s.setIsSlidesPaneOpen(true);
|
|
33020
33233
|
break;
|
|
33234
|
+
case "insert":
|
|
33235
|
+
s.setIsMobileInsertOpen(true);
|
|
33236
|
+
break;
|
|
33021
33237
|
case "inspector":
|
|
33022
33238
|
s.setSidebarPanelMode("properties");
|
|
33023
33239
|
s.setIsInspectorPaneOpen(true);
|
|
@@ -33093,9 +33309,7 @@ function MobileChromeOverlay(props) {
|
|
|
33093
33309
|
activeSheet,
|
|
33094
33310
|
commentCount,
|
|
33095
33311
|
onOpenSlides: () => applySheetTap("slides"),
|
|
33096
|
-
onOpenInsert: () =>
|
|
33097
|
-
editorOps.insertHandlers.handleAddTextBox();
|
|
33098
|
-
},
|
|
33312
|
+
onOpenInsert: () => applySheetTap("insert"),
|
|
33099
33313
|
onOpenInspector: () => applySheetTap("inspector"),
|
|
33100
33314
|
onOpenComments: () => applySheetTap("comments"),
|
|
33101
33315
|
onToggleNotes: () => applySheetTap("notes")
|
|
@@ -34122,6 +34336,104 @@ function useAutosaveCacheMaintenance(viewerOptions) {
|
|
|
34122
34336
|
}, [viewerOptions]);
|
|
34123
34337
|
return handleClearOptionsCache;
|
|
34124
34338
|
}
|
|
34339
|
+
function useChartFormatCommands(input) {
|
|
34340
|
+
const { selectedElement, editable, updateElementById } = input;
|
|
34341
|
+
const chart = selectedElement?.type === "chart" ? selectedElement : null;
|
|
34342
|
+
const chartId = chart?.id ?? null;
|
|
34343
|
+
const [picked, setPicked] = useState({
|
|
34344
|
+
chartId: null,
|
|
34345
|
+
target: "chartArea"
|
|
34346
|
+
});
|
|
34347
|
+
const [paneOpen, setPaneOpen] = useState(false);
|
|
34348
|
+
const target = picked.chartId === chartId ? picked.target : "chartArea";
|
|
34349
|
+
useEffect(() => {
|
|
34350
|
+
if (!chartId) {
|
|
34351
|
+
setPaneOpen(false);
|
|
34352
|
+
}
|
|
34353
|
+
}, [chartId]);
|
|
34354
|
+
const setTarget = useCallback(
|
|
34355
|
+
(next, forChartId) => setPicked({ chartId: forChartId ?? chartId, target: next }),
|
|
34356
|
+
[chartId]
|
|
34357
|
+
);
|
|
34358
|
+
const openPane = useCallback(
|
|
34359
|
+
(next) => {
|
|
34360
|
+
if (next) {
|
|
34361
|
+
setTarget(next);
|
|
34362
|
+
}
|
|
34363
|
+
setPaneOpen(true);
|
|
34364
|
+
},
|
|
34365
|
+
[setTarget]
|
|
34366
|
+
);
|
|
34367
|
+
const closePane = useCallback(() => setPaneOpen(false), []);
|
|
34368
|
+
const applyChartData = useCallback(
|
|
34369
|
+
(chartData2) => {
|
|
34370
|
+
if (editable && chartId) {
|
|
34371
|
+
updateElementById(chartId, { chartData: chartData2 });
|
|
34372
|
+
}
|
|
34373
|
+
},
|
|
34374
|
+
[editable, chartId, updateElementById]
|
|
34375
|
+
);
|
|
34376
|
+
const chartData = chart?.type === "chart" ? chart.chartData : void 0;
|
|
34377
|
+
const reset = useCallback(() => {
|
|
34378
|
+
if (chartData) {
|
|
34379
|
+
applyChartData(resetChartFormatTarget(chartData, target));
|
|
34380
|
+
}
|
|
34381
|
+
}, [chartData, target, applyChartData]);
|
|
34382
|
+
return useMemo(
|
|
34383
|
+
() => ({
|
|
34384
|
+
chart,
|
|
34385
|
+
editable,
|
|
34386
|
+
target,
|
|
34387
|
+
paneOpen: paneOpen && Boolean(chart),
|
|
34388
|
+
setTarget,
|
|
34389
|
+
openPane,
|
|
34390
|
+
closePane,
|
|
34391
|
+
applyChartData,
|
|
34392
|
+
reset
|
|
34393
|
+
}),
|
|
34394
|
+
[chart, editable, target, paneOpen, setTarget, openPane, closePane, applyChartData, reset]
|
|
34395
|
+
);
|
|
34396
|
+
}
|
|
34397
|
+
function useDeckStyleHost(input) {
|
|
34398
|
+
const latest = useRef(input);
|
|
34399
|
+
latest.current = input;
|
|
34400
|
+
return useMemo(
|
|
34401
|
+
() => createDeckStyleHost(() => {
|
|
34402
|
+
const current = latest.current;
|
|
34403
|
+
const write = (state) => {
|
|
34404
|
+
current.setSlides(state.slides);
|
|
34405
|
+
current.setTemplateElementsBySlideId(state.templateElementsBySlideId);
|
|
34406
|
+
current.setTheme(state.theme);
|
|
34407
|
+
};
|
|
34408
|
+
return {
|
|
34409
|
+
read: () => ({
|
|
34410
|
+
slides: current.slides,
|
|
34411
|
+
templateElementsBySlideId: current.templateElementsBySlideId,
|
|
34412
|
+
theme: current.theme,
|
|
34413
|
+
themeColorMap: current.themeColorMap
|
|
34414
|
+
}),
|
|
34415
|
+
show: write,
|
|
34416
|
+
hold: (on) => {
|
|
34417
|
+
if (current.heldDeckRef) {
|
|
34418
|
+
current.heldDeckRef.current = on ? {
|
|
34419
|
+
slides: current.slides,
|
|
34420
|
+
templateElementsBySlideId: current.templateElementsBySlideId
|
|
34421
|
+
} : void 0;
|
|
34422
|
+
}
|
|
34423
|
+
current.holdTracking(on);
|
|
34424
|
+
},
|
|
34425
|
+
handler: () => current.handlerRef.current,
|
|
34426
|
+
selectedSlideIds: () => current.selectedSlideIds,
|
|
34427
|
+
apply: (state) => {
|
|
34428
|
+
current.bumpHistory();
|
|
34429
|
+
write(state);
|
|
34430
|
+
current.markDirty();
|
|
34431
|
+
}
|
|
34432
|
+
};
|
|
34433
|
+
}),
|
|
34434
|
+
[]
|
|
34435
|
+
);
|
|
34436
|
+
}
|
|
34125
34437
|
function useLoadNotifications(input) {
|
|
34126
34438
|
const { loading, error } = input;
|
|
34127
34439
|
const latest = useRef(input);
|
|
@@ -34260,28 +34572,42 @@ function useRibbonGalleryCommands2(input) {
|
|
|
34260
34572
|
tableEditorState,
|
|
34261
34573
|
updateElementById,
|
|
34262
34574
|
updateThemeColorScheme,
|
|
34263
|
-
updateThemeFontScheme
|
|
34575
|
+
updateThemeFontScheme,
|
|
34576
|
+
applyThemeData,
|
|
34577
|
+
activeSlide,
|
|
34578
|
+
deckStyle
|
|
34264
34579
|
} = input;
|
|
34265
34580
|
const handler = handlerRef.current;
|
|
34581
|
+
const deck = galleryDeckView(deckStyle?.held(), { theme, themeColorMap, activeSlide });
|
|
34266
34582
|
const context = useMemo(
|
|
34267
34583
|
() => ({
|
|
34268
34584
|
element: selectedElement ?? null,
|
|
34269
|
-
themeColorMap,
|
|
34270
|
-
theme,
|
|
34271
|
-
resolveStyleMatrix: handler ? (styleXml) => handler.resolveStyleMatrixReferences(styleXml) : void 0,
|
|
34272
|
-
selectedTableCells: tableLayoutCells(tableEditorState)
|
|
34585
|
+
themeColorMap: deck.themeColorMap,
|
|
34586
|
+
theme: deck.theme,
|
|
34587
|
+
resolveStyleMatrix: handler ? (styleXml, effectSchemeId) => handler.resolveStyleMatrixReferences(styleXml, effectSchemeId) : void 0,
|
|
34588
|
+
selectedTableCells: tableLayoutCells(tableEditorState),
|
|
34589
|
+
activeSlide: deck.activeSlide ?? null,
|
|
34590
|
+
...handler?.getThemeVariants().length ? { themeVariants: handler.getThemeVariants() } : {}
|
|
34273
34591
|
}),
|
|
34274
|
-
[selectedElement, themeColorMap, theme, handler, tableEditorState]
|
|
34592
|
+
[selectedElement, deck.themeColorMap, deck.theme, handler, tableEditorState, deck.activeSlide]
|
|
34275
34593
|
);
|
|
34276
34594
|
const dispatch = useCallback(
|
|
34277
34595
|
(result) => {
|
|
34278
34596
|
if (!editable) {
|
|
34279
34597
|
return;
|
|
34280
34598
|
}
|
|
34599
|
+
if (result.kind === "themeEffects" || result.kind === "backgroundStyle" || result.kind === "sequence") {
|
|
34600
|
+
void deckStyle?.commit(result);
|
|
34601
|
+
return;
|
|
34602
|
+
}
|
|
34603
|
+
deckStyle?.endPreview();
|
|
34281
34604
|
switch (result.kind) {
|
|
34282
34605
|
case "element":
|
|
34283
34606
|
updateElementById(result.elementId, result.patch);
|
|
34284
34607
|
return;
|
|
34608
|
+
case "theme":
|
|
34609
|
+
void applyThemeData?.(result.colorScheme, result.fontScheme, result.name);
|
|
34610
|
+
return;
|
|
34285
34611
|
case "themeColorScheme":
|
|
34286
34612
|
void updateThemeColorScheme(result.colorScheme);
|
|
34287
34613
|
return;
|
|
@@ -34289,9 +34615,28 @@ function useRibbonGalleryCommands2(input) {
|
|
|
34289
34615
|
void updateThemeFontScheme(result.fontScheme);
|
|
34290
34616
|
}
|
|
34291
34617
|
},
|
|
34292
|
-
[
|
|
34618
|
+
[
|
|
34619
|
+
editable,
|
|
34620
|
+
updateElementById,
|
|
34621
|
+
updateThemeColorScheme,
|
|
34622
|
+
updateThemeFontScheme,
|
|
34623
|
+
applyThemeData,
|
|
34624
|
+
deckStyle
|
|
34625
|
+
]
|
|
34626
|
+
);
|
|
34627
|
+
const preview = useCallback(
|
|
34628
|
+
(result) => {
|
|
34629
|
+
if (editable) {
|
|
34630
|
+
deckStyle?.preview(result);
|
|
34631
|
+
}
|
|
34632
|
+
},
|
|
34633
|
+
[editable, deckStyle]
|
|
34634
|
+
);
|
|
34635
|
+
const endPreview = useCallback(() => deckStyle?.endPreview(), [deckStyle]);
|
|
34636
|
+
return useMemo(
|
|
34637
|
+
() => ({ context, editable, dispatch, preview, endPreview }),
|
|
34638
|
+
[context, editable, dispatch, preview, endPreview]
|
|
34293
34639
|
);
|
|
34294
|
-
return useMemo(() => ({ context, editable, dispatch }), [context, editable, dispatch]);
|
|
34295
34640
|
}
|
|
34296
34641
|
function useRunProgramNoticesState() {
|
|
34297
34642
|
const [notices, setNotices] = useState([]);
|
|
@@ -35151,7 +35496,24 @@ ${url}`)
|
|
|
35151
35496
|
}
|
|
35152
35497
|
slidePackageClipboardRef.current.updateHost(slidePackageHost);
|
|
35153
35498
|
useEffect(() => () => slidePackageClipboardRef.current?.dispose(), []);
|
|
35499
|
+
const galleryDeckStyle = useDeckStyleHost({
|
|
35500
|
+
slides,
|
|
35501
|
+
templateElementsBySlideId,
|
|
35502
|
+
theme: state.theme,
|
|
35503
|
+
themeColorMap: themeColorMapValue,
|
|
35504
|
+
handlerRef,
|
|
35505
|
+
selectedSlideIds: slides[activeSlideIndex] ? [slides[activeSlideIndex].id] : [],
|
|
35506
|
+
setSlides: state.setSlides,
|
|
35507
|
+
setTemplateElementsBySlideId: state.setTemplateElementsBySlideId,
|
|
35508
|
+
setTheme: state.setTheme,
|
|
35509
|
+
heldDeckRef: state.deckStyleHeldRef,
|
|
35510
|
+
holdTracking: history.holdTracking,
|
|
35511
|
+
bumpHistory: () => state.setPointerCommitNonce((n) => n + 1),
|
|
35512
|
+
markDirty: history.markDirty
|
|
35513
|
+
});
|
|
35154
35514
|
const ribbonGalleries = useRibbonGalleryCommands2({
|
|
35515
|
+
deckStyle: galleryDeckStyle,
|
|
35516
|
+
activeSlide: slides[activeSlideIndex] ?? null,
|
|
35155
35517
|
selectedElement,
|
|
35156
35518
|
theme: state.theme,
|
|
35157
35519
|
themeColorMap: themeColorMapValue,
|
|
@@ -35160,7 +35522,13 @@ ${url}`)
|
|
|
35160
35522
|
tableEditorState: state.tableEditorState,
|
|
35161
35523
|
updateElementById: editorOps.ops.updateElementById,
|
|
35162
35524
|
updateThemeColorScheme: themeHandlers.handleUpdateThemeColorScheme,
|
|
35163
|
-
updateThemeFontScheme: themeHandlers.handleUpdateThemeFontScheme
|
|
35525
|
+
updateThemeFontScheme: themeHandlers.handleUpdateThemeFontScheme,
|
|
35526
|
+
applyThemeData: themeHandlers.handleApplyThemeData
|
|
35527
|
+
});
|
|
35528
|
+
const chartFormat = useChartFormatCommands({
|
|
35529
|
+
selectedElement,
|
|
35530
|
+
editable: canEdit && (mode === "edit" || mode === "master"),
|
|
35531
|
+
updateElementById: editorOps.ops.updateElementById
|
|
35164
35532
|
});
|
|
35165
35533
|
const ribbonScope = useRibbonScopeToken();
|
|
35166
35534
|
const viewPreferencesSync = useViewPreferencesSync({
|
|
@@ -35716,8 +36084,8 @@ ${url}`)
|
|
|
35716
36084
|
/* @__PURE__ */ jsx(
|
|
35717
36085
|
CollaborationDocumentSync,
|
|
35718
36086
|
{
|
|
35719
|
-
slides,
|
|
35720
|
-
templateElementsBySlideId,
|
|
36087
|
+
slides: galleryDeckStyle.held()?.slides ?? slides,
|
|
36088
|
+
templateElementsBySlideId: galleryDeckStyle.held()?.templateElementsBySlideId ?? templateElementsBySlideId,
|
|
35721
36089
|
setSlides: state.setSlides,
|
|
35722
36090
|
content,
|
|
35723
36091
|
loadVersion,
|
|
@@ -35756,7 +36124,7 @@ ${url}`)
|
|
|
35756
36124
|
slideCount: slides.length
|
|
35757
36125
|
}
|
|
35758
36126
|
),
|
|
35759
|
-
/* @__PURE__ */ jsx(ShapeFormatContext.Provider, { value: shapeFormat, children: /* @__PURE__ */ jsx(RibbonGalleryCommandsContext.Provider, { value: ribbonGalleries, children: viewerContent }) })
|
|
36127
|
+
/* @__PURE__ */ jsx(ShapeFormatContext.Provider, { value: shapeFormat, children: /* @__PURE__ */ jsx(RibbonGalleryCommandsContext.Provider, { value: ribbonGalleries, children: /* @__PURE__ */ jsx(ChartFormatContext.Provider, { value: chartFormat, children: viewerContent }) }) })
|
|
35760
36128
|
]
|
|
35761
36129
|
}
|
|
35762
36130
|
) }) }) }) }) }) }) })
|