pptx-react-viewer 4.3.0 → 4.5.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 +143 -0
- package/dist/{AiChatPanel-UCEK3ZTD.mjs → AiChatPanel-HXGCZPUX.mjs} +4 -4
- package/dist/AiChatPanel-HXGCZPUX.mjs.br +0 -0
- package/dist/AiChatPanel-HXGCZPUX.mjs.gz +0 -0
- package/dist/{AiChatPanel-7UQA25FA.js → AiChatPanel-P2N6X2KB.js} +28 -28
- package/dist/AiChatPanel-P2N6X2KB.js.br +0 -0
- package/dist/AiChatPanel-P2N6X2KB.js.gz +0 -0
- package/dist/{Model3DScene-X3DS3ELB.js → Model3DScene-PIFMH2TU.js} +2 -2
- package/dist/Model3DScene-PIFMH2TU.js.br +0 -0
- package/dist/Model3DScene-PIFMH2TU.js.gz +0 -0
- package/dist/{Model3DScene-AI2JTBQM.mjs → Model3DScene-QXMMJRV3.mjs} +1 -1
- package/dist/Model3DScene-QXMMJRV3.mjs.br +0 -0
- package/dist/Model3DScene-QXMMJRV3.mjs.gz +0 -0
- package/dist/{chunk-E7O4HTS5.js → chunk-6FVYG27J.js} +211 -187
- package/dist/chunk-6FVYG27J.js.br +0 -0
- package/dist/chunk-6FVYG27J.js.gz +0 -0
- package/dist/{chunk-OBQ453H6.mjs → chunk-APAVAD2A.mjs} +37 -0
- package/dist/chunk-APAVAD2A.mjs.br +0 -0
- package/dist/chunk-APAVAD2A.mjs.gz +0 -0
- package/dist/{chunk-YQJOCGOK.mjs → chunk-DX2JCSQ4.mjs} +1 -1
- package/dist/chunk-DX2JCSQ4.mjs.br +0 -0
- package/dist/chunk-DX2JCSQ4.mjs.gz +0 -0
- package/dist/{chunk-RXYLPESV.mjs → chunk-IDV2ITXM.mjs} +607 -102
- package/dist/chunk-IDV2ITXM.mjs.br +0 -0
- package/dist/chunk-IDV2ITXM.mjs.gz +0 -0
- package/dist/{chunk-UTI4CLYJ.js → chunk-LYZQLV7R.js} +3417 -1722
- package/dist/chunk-LYZQLV7R.js.br +0 -0
- package/dist/chunk-LYZQLV7R.js.gz +0 -0
- package/dist/{chunk-SKTZSG7Q.mjs → chunk-PRXJ3J5W.mjs} +325 -48
- package/dist/chunk-PRXJ3J5W.mjs.br +0 -0
- package/dist/chunk-PRXJ3J5W.mjs.gz +0 -0
- package/dist/{chunk-KAO5USPE.js → chunk-T35BGKZG.js} +5 -5
- package/dist/chunk-T35BGKZG.js.br +0 -0
- package/dist/chunk-T35BGKZG.js.gz +0 -0
- package/dist/{chunk-W5KLLGVH.js → chunk-UMQV2432.js} +37 -0
- package/dist/chunk-UMQV2432.js.br +0 -0
- package/dist/chunk-UMQV2432.js.gz +0 -0
- package/dist/{chunk-42XEZVUQ.js → chunk-UZFCFYK6.js} +1667 -1162
- package/dist/chunk-UZFCFYK6.js.br +0 -0
- package/dist/chunk-UZFCFYK6.js.gz +0 -0
- package/dist/{chunk-3UWJWJCR.mjs → chunk-VZNIVS3X.mjs} +3397 -1723
- package/dist/chunk-VZNIVS3X.mjs.br +0 -0
- package/dist/chunk-VZNIVS3X.mjs.gz +0 -0
- package/dist/{chunk-Y7LI2JIR.js → chunk-Y4VRYQQS.js} +1123 -846
- package/dist/chunk-Y4VRYQQS.js.br +0 -0
- package/dist/chunk-Y4VRYQQS.js.gz +0 -0
- package/dist/{chunk-PLDG3CXW.mjs → chunk-ZF5S3HHW.mjs} +31 -7
- package/dist/chunk-ZF5S3HHW.mjs.br +0 -0
- package/dist/chunk-ZF5S3HHW.mjs.gz +0 -0
- package/dist/i18n/de.cjs +33 -0
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +33 -0
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +33 -0
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +33 -0
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +33 -0
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +33 -0
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +33 -0
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +33 -0
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +116 -8
- package/dist/index.js +49 -49
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +228 -44
- package/dist/internals.js +105 -105
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.d.ts +97 -8
- package/dist/viewer/index.js +27 -27
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-7UQA25FA.js.br +0 -0
- package/dist/AiChatPanel-7UQA25FA.js.gz +0 -0
- package/dist/AiChatPanel-UCEK3ZTD.mjs.br +0 -0
- package/dist/AiChatPanel-UCEK3ZTD.mjs.gz +0 -0
- package/dist/Model3DScene-AI2JTBQM.mjs.br +0 -0
- package/dist/Model3DScene-AI2JTBQM.mjs.gz +0 -0
- package/dist/Model3DScene-X3DS3ELB.js.br +0 -0
- package/dist/Model3DScene-X3DS3ELB.js.gz +0 -0
- package/dist/chunk-3UWJWJCR.mjs.br +0 -0
- package/dist/chunk-3UWJWJCR.mjs.gz +0 -0
- package/dist/chunk-42XEZVUQ.js.br +0 -0
- package/dist/chunk-42XEZVUQ.js.gz +0 -0
- package/dist/chunk-E7O4HTS5.js.br +0 -0
- package/dist/chunk-E7O4HTS5.js.gz +0 -0
- package/dist/chunk-KAO5USPE.js.br +0 -0
- package/dist/chunk-KAO5USPE.js.gz +0 -0
- package/dist/chunk-OBQ453H6.mjs.br +0 -0
- package/dist/chunk-OBQ453H6.mjs.gz +0 -0
- package/dist/chunk-PLDG3CXW.mjs.br +0 -0
- package/dist/chunk-PLDG3CXW.mjs.gz +0 -0
- package/dist/chunk-RXYLPESV.mjs.br +0 -0
- package/dist/chunk-RXYLPESV.mjs.gz +0 -0
- package/dist/chunk-SKTZSG7Q.mjs.br +0 -0
- package/dist/chunk-SKTZSG7Q.mjs.gz +0 -0
- package/dist/chunk-UTI4CLYJ.js.br +0 -0
- package/dist/chunk-UTI4CLYJ.js.gz +0 -0
- package/dist/chunk-W5KLLGVH.js.br +0 -0
- package/dist/chunk-W5KLLGVH.js.gz +0 -0
- package/dist/chunk-Y7LI2JIR.js.br +0 -0
- package/dist/chunk-Y7LI2JIR.js.gz +0 -0
- package/dist/chunk-YQJOCGOK.mjs.br +0 -0
- package/dist/chunk-YQJOCGOK.mjs.gz +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { computeFocusTargets, deckDataFieldChanged, aiChangeAnimationCss, changeGhostStyle, createChatHistoryStore, collectStoredChats, exportAiChatLogs, applyElementUpdate } from './chunk-
|
|
2
|
-
import { useViewerOptions, useReadOnlyRecommendationState, useCompatibilityToastsState, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useViewPreferencesSync, useLayoutSwitching, ViewerOptionsContext, Rendering3DFlagsContext, CollaborationProvider, useCollaboration, useCollaborationDocumentSync, useFollowMode, useBroadcastFollower, SlideBackgroundImageLayer, StaticElementRenderer, safePrompt, scopeLayoutOptionsToActiveSlide, ChartPartSelectionProvider, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, useViewerOptionsContext, useVirtualizedSlides, useSwipeNavigation, PresentationTransitionOverlay, RemoteSelectionOverlay, CollaborationCursorOverlay, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, ElementRenderer, InlineCollaborationContext, SmartArtRenderer, playAnimationSound, ResizeHandles, renderStrokeView, useChartPartSelection, resolveSmartArtDataPalette } from './chunk-
|
|
3
|
-
import { SHAPE_PRESETS, ANIMATION_PRESET_OPTIONS, cn, SLIDE_NAV_THUMBNAIL_WIDTH, TOOLBAR_SECTIONS, DEFAULT_SECTION_GROUP_ID, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, isConnectorOrLineElement, GRID_SIZE, MIN_ELEMENT_SIZE, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, DEFAULT_FILL_COLOR, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, DEFAULT_STROKE_COLOR, STROKE_DASH_OPTIONS } from './chunk-
|
|
4
|
-
import { SWITCHABLE_LAYOUT_TYPES, compileEquationTemplateMathMl, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, resolveAutosaveActivation, buildThemeColorMap, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, applyAutoCorrect, resolveImageResolutionScale, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, resolve3DRenderingFlags, resolveSlideSizeSelection, RULER_THICKNESS, RULER_FONT_SIZE, buildPreviewElements, deriveSlideFieldContext, SLIDE_TRANSITION_OPTIONS, hiddenSlideCue, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, visibleTemplateElements, normalizeHexColor, themeToCssVars, listAutosaveSnapshots, resolveExpiredAutosaveSnapshots, deleteAutosaveSnapshot, masterViewCrudActions, applyMasterViewCrudAction, masterViewCrudFailureKey, applyMotionPathPreset, resetSlideLayoutPath, DEFAULT_INSERT_CHART_KIND, hasCopyableFormat, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, shouldDiscardAutosaveOnSuccessfulSave, setMasterViewBackgroundColor, canUseClipboard, runProgramNoticeStackStyle, compatToastStackStyle, printPropertiesFrameSlides, printPropertiesSlidesPerPage, getDensePanelTouchTargetPx, shouldStickyActionRow, VIEWER_OPTIONS_TABS, DEFAULT_QUICK_ACCESS_COMMAND_IDS, isHeaderFooterDateTextVisible, isHeaderFooterHeaderTextVisible, isHeaderFooterFooterTextVisible, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, getSlideBackgroundStyle, pushRecentColor, mruColorsPatch, shouldClearAutosaveCacheOnClose, filterCommands, resolveTitleBarStatusKey, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, resolveScreenTip, masterViewBackgroundColor, buildFieldSubstitutionContext, shouldConfirmExternalHyperlink, safeOpenUrl, resolvePresentationAction, isPpactionUrl, parsePpactionUrl, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, buildContextMenuEntries, themeColorSchemesEqual, observeElementHeight, EXPANDED_MAX_HEIGHT, STATUS_BAR_CLASSES, buildBarActions, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, clampPercent2, resolveDefaultPrintSettings, HANDOUT_OPTIONS, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS, resolveViewerAddinRows, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, CUSTOM_FONT_ACCEPT, activateModalFocus, buildCollaborationShareUrl, buildActiveSessionUsers, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, SORTER_MAX_ZOOM, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, extraQuickAccessCommands, TAB_ROW_ACTION_CLASSES, listBackstageRecentFiles, BACKSTAGE_NAV, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, hasTextProperties, COMMON_FONT_SIZES, textFontSizePtToPx, INSERT_CHART_TYPES, ACTION_BUTTON_PRESETS, CHARACTER_SPACING_OPTIONS, OFFICE_COLOR_SWATCHES, hasShapeProperties, shapeFillChange, shapeOutlineChange, readRibbonTransitionDraft, ribbonTransitionUpdates, playSlideTransitionPreview, RIBBON_TRANSITION_PRESETS, transitionSoundOptions, transitionSoundSelectedValue, DEFAULT_MOTION_PATH_PRESET_ID, SLIDE_SHOW_OPTIONS, slideShowOptionChange, readSlideShowOption, SLIDE_VIRTUALIZATION_THRESHOLD, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, buildStrokePathD, cursorForTool, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, PRESENTER_NAVIGATOR_LABEL_KEYS, PEN_COLORS, HIGHLIGHTER_COLORS, isBlackboardActive, scaleSlidesForSizeChange, slideSizeToCanvasPx, resolveSelectionPaneRename, PRESET_THEMES, resolveNotesSegments, segmentsToEditorHtml, DEBOUNCE_MS, createPlainNotesSegments, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX, isUrlSafe, buildNotesPrintHtml, MIN_TOUCH_TARGET_PX, toggleSheet, SMARTART_PREVIEW_ELEMENT_HEIGHT, SMARTART_PREVIEW_ELEMENT_WIDTH, buildSmartArtPreviewElement, sanitizeMathMl, computeHandoutLayout, getPrintableArea, generateNoteLineCount, computeAllNotesPages, getNotesPrintableArea, downloadBlob, clampOptionNumber, QUICK_ACCESS_COMMAND_CATALOG, registerCustomFont, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, PRESENTER_CONSOLE_CONTROLS, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, backstageCardsFor, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, resolveDefaultFontFamily, textFontSizePxToPt, buildFontCatalog, getSelectionTextStyleFlags, getInlineEditorSelectionResult, selectedParagraphBulletKind, elementBulletKind, selectionBulletKind, TEXT_DECORATION_FLAGS, nextToggleValue, buildThemeColorSwatchGrid, themeColorSwatchRows, findSelectedThemeSwatch, themeSwatchCommit, RIBBON_SHAPE_SWATCHES, canGroupSelection, canUngroupSelection, canSetStrokeWidth, strokeWidthOf, readSoundFileAsDataUrl, applyTransitionSoundFile, TRANSITION_SOUND_OTHER_VALUE, TRANSITION_SOUND_NONE_VALUE, clearTransitionSound, applyTransitionStockSound, transitionStockSoundId, getEffectSoundAsset, ENTRANCE_PRESET_VALUES, EMPHASIS_PRESET_VALUES, EXIT_PRESET_VALUES, MOTION_PATH_FAMILIES, motionPathFamilyLabelKey, motionPathPresetsByFamily, motionPathPresetLabelKey, masterViewPseudoSlide, motionPathFor, setMotionPath, getShapeAdjustmentHandleDescriptors, shouldShowElementHandles, hasMultipleSelectedTableCells, applyTableStyleDelete, applyTableStyleMapChange, themeColorLabel, buildThemeColorGrid, THEME_COLOR_SCHEME_KEYS, COMMON_FONTS, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, isCurrentLayout, SLIDE_TEMPLATES, computeAnchoredPopupPosition, attachEditorImagePaste, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, resolveElementInteractivity, getElementTransformWithoutRotation, getElementTransform, buildChartQuickActionsDescriptor, applyChartElementToggle, CHART_QUICK_ACTION_BUTTON_SIZE, applyChartStylePreset, hideChartSeries, restoreFilteredSeries, getActiveXControlOverlayView, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, isElementLocked, isImageLikeElement, mergeSlideTransition, getElementLabel, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, buildLayoutPreviewGeometry, buildSlideTemplateContent, buildFreeformShapeElement, buildLiveInkStrokeView, CONNECTOR_SITE_SNAP_PX, resolveConnectorEndpointUpdate, withConnectorEndpointUpdate, getShapeConnectionSites, elementLockTogglePatch, buildTableDataGrid, getDenseGridLayoutPlan, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, TABLE_STYLE_PRESETS, applyTableStylePreset, tableStyleAssignmentUpdate, evenColumnWidths, redistributeColumnWidth, evenRowHeights, patchChartData, collapseChartTitleRunsForEdit, chartGridlinesState, chartGridlinesPatch, seriesSecondaryAxisPatch, setChartCategoryLabel, setChartCellValue, addChartCategory, removeChartCategory, addChartSeries, removeChartSeries, setDataLabelsRangeCache, setChartAxisLogScale, setChartAxisTitleStyle, setChartAxisGridlineStyle, setChartSeriesMarker, setChartSeriesChartType, setChartDataPointFill, setChartDataPointExplosion, setChartDataPointMarker, setChartDataPointLabel, describeSmartArtBounds, canAddTopLevelNode, classifyExtraConnections, siblingIndex, siblingCount, canRemoveTopLevelNode, canInteractWithElement, buildOleObjectNamePatch, getOleObjectTypeLabel, sanitizeGradientStops, shouldShowAccessibilitySection, pptxActionToElementAction, withFrameSlides, withSlidesPerPage, applyThemeOverrideToSlide, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, SLIDE_SIZE_PRESETS, TRANSITION_VALID_DIRECTIONS, TRANSITION_ORIENTATION_TYPES, clampTransitionNumber, TRANSITION_SPEED_OPTIONS, TRANSITION_MORPH_OPTIONS, flattenTagCollections, resolveTemplateBackgroundRows, formatCommentTimestamp, commentMentionQuery, matchCommentMentionAuthors, buildAnimationTimelineRows, clearMotionPath, getEffectSoundState, setEffectSound, setEffectStockSound, setAfterAnimation, setAfterAnimationColor, DIRECTIONAL_PRESETS, buildAnimationTimelineBars, motionPathPresetIdForPath, EFFECT_SOUND_CATALOGUE, hasTiltData, normalizeTableStyleGuid, describeTableStyleEditor, TABLE_STYLE_EDITOR_PARTS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, updateMergeAttrsInRawXml, resolveDisplayedChartType, CHART_TYPE_OPTIONS, chartDataLabelsTogglePatch, BAR3D_SHAPE_OPTIONS, bar3DShapePatch, RADAR_STYLE_OPTIONS, radarStylePatch, SURFACE_WIREFRAME_OPTIONS, surfaceWireframePatch, isSeriesUsingSecondaryAxis, listChartUserShapeRows, withChartUserShapeAdded, createDefaultChartUserShape, withChartUserShapeRowRemoved, withChartUserShapeRowTextUpdated, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, addSmartArtNodeAsChild, setSmartArtNodeStyle, removeSmartArtNode, addSiblingAfter, removeEmptyNode, demote, promote, updateSmartArtNodeText, reorder, clampCropValue, DUOTONE_PRESETS, ARTISTIC_EFFECTS, mediaTrimEndSeconds, trimmedMediaDurationMs, mediaTrimEndAbsoluteMs, mediaTrimEndMsFromAbsoluteMs, buildOleEditDialogDescriptor, buildOleContentUpdatePatch, applyOleSheetCellEdit, getOleSheetGrid, applyOleDocumentParagraphEdit, getOleDocumentParagraphs, applyOleNestedDeckElementTextEdit, getOleNestedDeckDetail, replaceOleFile, getNonVisualDescriptionFields, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, elementActionToPptxAction, canCommitActionType, slideSizeFromPreset, withSlideSizeOrientation, TRANSITION_DIR_ARROWS, buildDirectionGrid, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, updateTagInCollections, deleteTagFromCollections, addTagToCollections, commentTextSegments, COMMENT_MENTION_CLASS, COMMENT_MENTION_ATTRIBUTE, insertCommentMention, reorderAnimationTimelineRows, applyAnimationTimelineOrder, animationEffectLabel, TABLE_STYLE_BORDER_SIDES, applyTableStyleFieldEdit, createTableStyleEntry, addTableStyleToMap, deleteTableStyleFromMap, LBL, SEL, FILL_MODE_OPTIONS, SECTION_HEADING, NUM, getChartUserShapeGroupTransform, withChartUserShapeGroupChildAdded, createDefaultChartUserShapeGroupChild, withChartUserShapeRowUpdated, getChartUserShapeRowChartBox, withChartUserShapeRowFlipUpdated, withChartUserShapeRowRotationUpdated, withChartUserShapeRowChartBoxUpdated, switchSmartArtLayout, rebuildDrawingShapesIfCleared, mediaTrimEndMsFromSeconds, validateMediaTrimRange, SHAPE_QUICK_STYLES, quickStyleSwatchCss, PATTERN_PRESET_OPTIONS, getPatternSvg, COMPOUND_LINE_OPTIONS, LINE_JOIN_OPTIONS, LINE_CAP_OPTIONS, TEXT_WARP_PRESETS, warpPreviewPath, text3dPtToEmu, text3dEmuToPt, MATERIAL_PRESETS, toSlideIndex, TABLE_STYLE_BORDER_SIDE_LABEL_KEYS, TABLE_STYLE_DASH_PRESETS, GRADIENT_TYPE_OPTIONS, PATTERN_OPTIONS, FILL_PATTERN_LABEL_KEYS, openNativeEyeDropper, toggleText3dExtrusion, BEVEL_PRESETS } from './chunk-3UWJWJCR.mjs';
|
|
5
|
-
import { LOCALE_CATALOG, ALIGNMENT_LABEL_KEYS } from './chunk-
|
|
1
|
+
import { computeFocusTargets, deckDataFieldChanged, aiChangeAnimationCss, changeGhostStyle, createChatHistoryStore, collectStoredChats, exportAiChatLogs, applyElementUpdate } from './chunk-DX2JCSQ4.mjs';
|
|
2
|
+
import { useViewerOptions, useReadOnlyRecommendationState, useCompatibilityToastsState, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useViewPreferencesSync, useLayoutSwitching, ViewerOptionsContext, Rendering3DFlagsContext, CollaborationProvider, useCollaboration, useCollaborationDocumentSync, useFollowMode, useBroadcastFollower, SlideBackgroundImageLayer, StaticElementRenderer, safePrompt, scopeLayoutOptionsToActiveSlide, ChartPartSelectionProvider, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, useViewerOptionsContext, useVirtualizedSlides, useSwipeNavigation, PresentationTransitionOverlay, RemoteSelectionOverlay, CollaborationCursorOverlay, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, ElementRenderer, InlineCollaborationContext, SmartArtRenderer, playAnimationSound, ResizeHandles, renderStrokeView, useChartPartSelection, resolveSmartArtDataPalette } from './chunk-PRXJ3J5W.mjs';
|
|
3
|
+
import { SHAPE_PRESETS, ANIMATION_PRESET_OPTIONS, cn, SLIDE_NAV_THUMBNAIL_WIDTH, TOOLBAR_SECTIONS, DEFAULT_SECTION_GROUP_ID, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, isConnectorOrLineElement, GRID_SIZE, MIN_ELEMENT_SIZE, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, DEFAULT_FILL_COLOR, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, DEFAULT_STROKE_COLOR, STROKE_DASH_OPTIONS } from './chunk-ZF5S3HHW.mjs';
|
|
4
|
+
import { SWITCHABLE_LAYOUT_TYPES, compileEquationTemplateMathMl, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, resolveAutosaveActivation, buildThemeColorMap, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, applyAutoCorrect, resolveImageResolutionScale, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, resolve3DRenderingFlags, resolveSlideSizeSelection, RULER_THICKNESS, RULER_FONT_SIZE, buildPreviewElements, deriveSlideFieldContext, SLIDE_TRANSITION_OPTIONS, hiddenSlideCue, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, visibleTemplateElements, normalizeHexColor, themeToCssVars, listAutosaveSnapshots, resolveExpiredAutosaveSnapshots, deleteAutosaveSnapshot, masterViewCrudActions, applyMasterViewCrudAction, masterViewCrudFailureKey, applyMotionPathPreset, resetSlideLayoutPath, DEFAULT_INSERT_CHART_KIND, hasCopyableFormat, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, shouldDiscardAutosaveOnSuccessfulSave, setMasterViewBackgroundColor, canUseClipboard, runProgramNoticeStackStyle, compatToastStackStyle, printPropertiesFrameSlides, printPropertiesSlidesPerPage, PASTE_SPECIAL_OPTIONS, getDensePanelTouchTargetPx, shouldStickyActionRow, VIEWER_OPTIONS_TABS, DEFAULT_QUICK_ACCESS_COMMAND_IDS, isHeaderFooterDateTextVisible, isHeaderFooterHeaderTextVisible, isHeaderFooterFooterTextVisible, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, getSlideBackgroundStyle, pushRecentColor, mruColorsPatch, shouldClearAutosaveCacheOnClose, filterCommands, resolveTitleBarStatusKey, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, resolveScreenTip, masterViewBackgroundColor, buildFieldSubstitutionContext, shouldConfirmExternalHyperlink, safeOpenUrl, resolvePresentationAction, isPpactionUrl, parsePpactionUrl, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, buildContextMenuEntries, buildCanvasContextMenuEntries, isCurrentLayout, themeColorSchemesEqual, observeElementHeight, EXPANDED_MAX_HEIGHT, STATUS_BAR_CLASSES, buildBarActions, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, clampPercent2, resolveDefaultPrintSettings, HANDOUT_OPTIONS, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS, resolveViewerAddinRows, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, CUSTOM_FONT_ACCEPT, activateModalFocus, buildCollaborationShareUrl, buildActiveSessionUsers, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, SORTER_MAX_ZOOM, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, extraQuickAccessCommands, TAB_ROW_ACTION_CLASSES, listBackstageRecentFiles, BACKSTAGE_NAV, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, hasTextProperties, COMMON_FONT_SIZES, textFontSizePtToPx, INSERT_CHART_TYPES, ACTION_BUTTON_PRESETS, CHARACTER_SPACING_OPTIONS, OFFICE_COLOR_SWATCHES, hasShapeProperties, shapeFillChange, shapeOutlineChange, readRibbonTransitionDraft, ribbonTransitionUpdates, playSlideTransitionPreview, RIBBON_TRANSITION_PRESETS, transitionSoundOptions, transitionSoundSelectedValue, DEFAULT_MOTION_PATH_PRESET_ID, SLIDE_SHOW_OPTIONS, slideShowOptionChange, readSlideShowOption, resolveSlidePaneClick, SLIDE_VIRTUALIZATION_THRESHOLD, buildSlidePaneContextMenuEntries, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, buildStrokePathD, cursorForTool, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, PRESENTER_NAVIGATOR_LABEL_KEYS, PEN_COLORS, HIGHLIGHTER_COLORS, isBlackboardActive, buildLayoutPreviewGeometry, scaleSlidesForSizeChange, slideSizeToCanvasPx, resolveSelectionPaneRename, PRESET_THEMES, resolveNotesSegments, segmentsToEditorHtml, DEBOUNCE_MS, createPlainNotesSegments, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX, isUrlSafe, buildNotesPrintHtml, MIN_TOUCH_TARGET_PX, toggleSheet, SMARTART_PREVIEW_ELEMENT_HEIGHT, SMARTART_PREVIEW_ELEMENT_WIDTH, buildSmartArtPreviewElement, sanitizeMathMl, computeHandoutLayout, getPrintableArea, generateNoteLineCount, computeAllNotesPages, getNotesPrintableArea, downloadBlob, clampOptionNumber, QUICK_ACCESS_COMMAND_CATALOG, registerCustomFont, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, PRESENTER_CONSOLE_CONTROLS, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, backstageCardsFor, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, resolveDefaultFontFamily, textFontSizePxToPt, buildFontCatalog, getSelectionTextStyleFlags, getInlineEditorSelectionResult, selectedParagraphBulletKind, elementBulletKind, selectionBulletKind, TEXT_DECORATION_FLAGS, nextToggleValue, buildThemeColorSwatchGrid, themeColorSwatchRows, findSelectedThemeSwatch, themeSwatchCommit, RIBBON_SHAPE_SWATCHES, canGroupSelection, canUngroupSelection, canSetStrokeWidth, strokeWidthOf, readSoundFileAsDataUrl, applyTransitionSoundFile, TRANSITION_SOUND_OTHER_VALUE, TRANSITION_SOUND_NONE_VALUE, clearTransitionSound, applyTransitionStockSound, transitionStockSoundId, getEffectSoundAsset, playAnimationRibbonPreview, ENTRANCE_PRESET_VALUES, EMPHASIS_PRESET_VALUES, EXIT_PRESET_VALUES, MOTION_PATH_FAMILIES, motionPathFamilyLabelKey, motionPathPresetsByFamily, motionPathPresetLabelKey, masterViewPseudoSlide, motionPathFor, setMotionPath, getShapeAdjustmentHandleDescriptors, shouldShowElementHandles, hasMultipleSelectedTableCells, computeAnchoredPopupPosition, applyTableStyleDelete, applyTableStyleMapChange, themeColorLabel, buildThemeColorGrid, THEME_COLOR_SCHEME_KEYS, COMMON_FONTS, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, SLIDE_TEMPLATES, attachEditorImagePaste, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, resolveElementInteractivity, getElementTransformWithoutRotation, getElementTransform, buildChartQuickActionsDescriptor, applyChartElementToggle, CHART_QUICK_ACTION_BUTTON_SIZE, applyChartStylePreset, hideChartSeries, restoreFilteredSeries, getActiveXControlOverlayView, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, isElementLocked, isImageLikeElement, mergeSlideTransition, getElementLabel, TRIGGER_OPTIONS, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, buildSlideTemplateContent, buildFreeformShapeElement, buildLiveInkStrokeView, CONNECTOR_SITE_SNAP_PX, resolveConnectorEndpointUpdate, withConnectorEndpointUpdate, getShapeConnectionSites, elementLockTogglePatch, buildTableDataGrid, getDenseGridLayoutPlan, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, TABLE_STYLE_PRESETS, applyTableStylePreset, tableStyleAssignmentUpdate, evenColumnWidths, redistributeColumnWidth, evenRowHeights, patchChartData, collapseChartTitleRunsForEdit, chartGridlinesState, chartGridlinesPatch, seriesSecondaryAxisPatch, setChartCategoryLabel, setChartCellValue, addChartCategory, removeChartCategory, addChartSeries, removeChartSeries, setDataLabelsRangeCache, setChartAxisLogScale, setChartAxisTitleStyle, setChartAxisGridlineStyle, setChartSeriesMarker, setChartSeriesChartType, setChartDataPointFill, setChartDataPointExplosion, setChartDataPointMarker, setChartDataPointLabel, describeSmartArtBounds, canAddTopLevelNode, classifyExtraConnections, siblingIndex, siblingCount, canRemoveTopLevelNode, canInteractWithElement, buildOleObjectNamePatch, getOleObjectTypeLabel, sanitizeGradientStops, shouldShowAccessibilitySection, pptxActionToElementAction, withFrameSlides, withSlidesPerPage, applyThemeOverrideToSlide, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, SLIDE_SIZE_PRESETS, TRANSITION_VALID_DIRECTIONS, TRANSITION_ORIENTATION_TYPES, TRANSITION_PATTERN_OPTIONS, TRANSITION_THRUBLK_TYPES, clampTransitionNumber, TRANSITION_SPEED_OPTIONS, TRANSITION_MORPH_OPTIONS, flattenTagCollections, resolveTemplateBackgroundRows, formatCommentTimestamp, commentMentionQuery, matchCommentMentionAuthors, buildAnimationTimelineRows, clearMotionPath, getEffectSoundState, setEffectSound, setEffectStockSound, setAfterAnimation, setAfterAnimationColor, DIRECTIONAL_PRESETS, buildAnimationTimelineBars, motionPathPresetIdForPath, EFFECT_SOUND_CATALOGUE, hasTiltData, normalizeTableStyleGuid, describeTableStyleEditor, TABLE_STYLE_EDITOR_PARTS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, updateMergeAttrsInRawXml, resolveDisplayedChartType, CHART_TYPE_OPTIONS, chartDataLabelsTogglePatch, BAR3D_SHAPE_OPTIONS, bar3DShapePatch, RADAR_STYLE_OPTIONS, radarStylePatch, SURFACE_WIREFRAME_OPTIONS, surfaceWireframePatch, isSeriesUsingSecondaryAxis, listChartUserShapeRows, withChartUserShapeAdded, createDefaultChartUserShape, withChartUserShapeRowRemoved, withChartUserShapeRowTextUpdated, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, addSmartArtNodeAsChild, setSmartArtNodeStyle, removeSmartArtNode, addSiblingAfter, removeEmptyNode, demote, promote, updateSmartArtNodeText, reorder, clampCropValue, DUOTONE_PRESETS, ARTISTIC_EFFECTS, mediaTrimEndSeconds, trimmedMediaDurationMs, mediaTrimEndAbsoluteMs, mediaTrimEndMsFromAbsoluteMs, buildOleEditDialogDescriptor, buildOleContentUpdatePatch, applyOleSheetCellEdit, getOleSheetGrid, applyOleDocumentParagraphEdit, getOleDocumentParagraphs, applyOleNestedDeckElementTextEdit, getOleNestedDeckDetail, replaceOleFile, getNonVisualDescriptionFields, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, elementActionToPptxAction, canCommitActionType, slideSizeFromPreset, withSlideSizeOrientation, TRANSITION_DIR_ARROWS, buildDirectionGrid, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, updateTagInCollections, deleteTagFromCollections, addTagToCollections, commentTextSegments, COMMENT_MENTION_CLASS, COMMENT_MENTION_ATTRIBUTE, insertCommentMention, reorderAnimationTimelineRows, applyAnimationTimelineOrder, animationEffectLabel, TABLE_STYLE_BORDER_SIDES, applyTableStyleFieldEdit, createTableStyleEntry, addTableStyleToMap, deleteTableStyleFromMap, LBL, SEL, FILL_MODE_OPTIONS, SECTION_HEADING, NUM, getChartUserShapeGroupTransform, withChartUserShapeGroupChildAdded, createDefaultChartUserShapeGroupChild, withChartUserShapeRowUpdated, getChartUserShapeRowChartBox, withChartUserShapeRowFlipUpdated, withChartUserShapeRowRotationUpdated, withChartUserShapeRowChartBoxUpdated, switchSmartArtLayout, rebuildDrawingShapesIfCleared, mediaTrimEndMsFromSeconds, validateMediaTrimRange, SHAPE_QUICK_STYLES, quickStyleSwatchCss, PATTERN_PRESET_OPTIONS, getPatternSvg, COMPOUND_LINE_OPTIONS, LINE_JOIN_OPTIONS, LINE_CAP_OPTIONS, TEXT_WARP_PRESETS, warpPreviewPath, text3dPtToEmu, text3dEmuToPt, MATERIAL_PRESETS, toSlideIndex, TABLE_STYLE_BORDER_SIDE_LABEL_KEYS, TABLE_STYLE_DASH_PRESETS, GRADIENT_TYPE_OPTIONS, PATTERN_OPTIONS, FILL_PATTERN_LABEL_KEYS, openNativeEyeDropper, toggleText3dExtrusion, BEVEL_PRESETS } from './chunk-VZNIVS3X.mjs';
|
|
5
|
+
import { LOCALE_CATALOG, ALIGNMENT_LABEL_KEYS } from './chunk-APAVAD2A.mjs';
|
|
6
6
|
import React4, { createContext, lazy, forwardRef, useEffect, useState, useCallback, useMemo, useRef, useId, Fragment as Fragment$1, useDeferredValue, useLayoutEffect, Suspense, useContext, useSyncExternalStore } from 'react';
|
|
7
7
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
@@ -658,12 +658,17 @@ function AnimationsSection(p) {
|
|
|
658
658
|
const { t } = useTranslation();
|
|
659
659
|
const [previewActive, setPreviewActive] = useState(false);
|
|
660
660
|
const disabled = !p.canEdit || p.selectedElement === null;
|
|
661
|
+
const selectedAnimation = useMemo(
|
|
662
|
+
() => p.selectedElement ? (p.activeSlide?.animations ?? []).find((a) => a.elementId === p.selectedElement?.id) : void 0,
|
|
663
|
+
[p.activeSlide?.animations, p.selectedElement]
|
|
664
|
+
);
|
|
661
665
|
const preview = () => {
|
|
662
666
|
if (disabled) {
|
|
663
667
|
return;
|
|
664
668
|
}
|
|
665
669
|
setPreviewActive(true);
|
|
666
670
|
setTimeout(() => setPreviewActive(false), 1200);
|
|
671
|
+
playAnimationRibbonPreview(document, selectedAnimation);
|
|
667
672
|
};
|
|
668
673
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
669
674
|
/* @__PURE__ */ jsx(RibbonGroup, { label: t("pptx.animations.preview"), children: /* @__PURE__ */ jsx(
|
|
@@ -1683,7 +1688,7 @@ function AccountPage() {
|
|
|
1683
1688
|
return void 0;
|
|
1684
1689
|
});
|
|
1685
1690
|
};
|
|
1686
|
-
const version = "4.
|
|
1691
|
+
const version = "4.4.0" ;
|
|
1687
1692
|
return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
1688
1693
|
/* @__PURE__ */ jsxs("section", { className: cardClass, children: [
|
|
1689
1694
|
/* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -4911,6 +4916,7 @@ function MobileSectionBody({
|
|
|
4911
4916
|
{
|
|
4912
4917
|
canEdit: p.canEdit,
|
|
4913
4918
|
selectedElement: p.selectedElement,
|
|
4919
|
+
activeSlide: p.activeSlide,
|
|
4914
4920
|
isInspectorPaneOpen: p.isInspectorPaneOpen,
|
|
4915
4921
|
onToggleInspector: p.onToggleInspector,
|
|
4916
4922
|
onOpenAnimationPanel: p.onOpenAnimationPanel,
|
|
@@ -6293,6 +6299,7 @@ function Toolbar(p) {
|
|
|
6293
6299
|
{
|
|
6294
6300
|
canEdit: p.canEdit,
|
|
6295
6301
|
selectedElement: p.selectedElement,
|
|
6302
|
+
activeSlide: p.activeSlide,
|
|
6296
6303
|
isInspectorPaneOpen: p.isInspectorPaneOpen,
|
|
6297
6304
|
onToggleInspector: p.onToggleInspector,
|
|
6298
6305
|
onOpenAnimationPanel: p.onOpenAnimationPanel,
|
|
@@ -7588,6 +7595,7 @@ function isViewportBackgroundMouseDownTarget(target, currentTarget) {
|
|
|
7588
7595
|
function useCanvasEventHandlers({
|
|
7589
7596
|
cbRef,
|
|
7590
7597
|
onCanvasMouseDown,
|
|
7598
|
+
onCanvasContextMenu,
|
|
7591
7599
|
findResults,
|
|
7592
7600
|
findResultIndex,
|
|
7593
7601
|
activeSlideIndex,
|
|
@@ -7705,9 +7713,11 @@ function useCanvasEventHandlers({
|
|
|
7705
7713
|
const id = getElementIdFromEvent(e);
|
|
7706
7714
|
if (id) {
|
|
7707
7715
|
cbRef.current.onContextMenu(id, e);
|
|
7716
|
+
return;
|
|
7708
7717
|
}
|
|
7718
|
+
onCanvasContextMenu?.(e);
|
|
7709
7719
|
},
|
|
7710
|
-
[cbRef]
|
|
7720
|
+
[cbRef, onCanvasContextMenu]
|
|
7711
7721
|
);
|
|
7712
7722
|
const [draggingGuide, setDraggingGuide] = useState(null);
|
|
7713
7723
|
const handleStagePointerMove = useCallback(
|
|
@@ -8288,6 +8298,7 @@ function SlideCanvasContent({
|
|
|
8288
8298
|
onMouseDown,
|
|
8289
8299
|
onContextMenu,
|
|
8290
8300
|
onCanvasMouseDown,
|
|
8301
|
+
onCanvasContextMenu,
|
|
8291
8302
|
onResizePointerDown,
|
|
8292
8303
|
onAdjustmentPointerDown,
|
|
8293
8304
|
onRotate,
|
|
@@ -8388,6 +8399,7 @@ function SlideCanvasContent({
|
|
|
8388
8399
|
} = useCanvasEventHandlers({
|
|
8389
8400
|
cbRef,
|
|
8390
8401
|
onCanvasMouseDown,
|
|
8402
|
+
onCanvasContextMenu,
|
|
8391
8403
|
findResults,
|
|
8392
8404
|
findResultIndex,
|
|
8393
8405
|
activeSlideIndex,
|
|
@@ -9312,6 +9324,11 @@ function contextMenuHandlers(props) {
|
|
|
9312
9324
|
"table-split": andClose(props.onSplitCell),
|
|
9313
9325
|
group: andClose(() => onAction("group")),
|
|
9314
9326
|
ungroup: andClose(() => onAction("ungroup")),
|
|
9327
|
+
"edit-text": andClose(() => onAction("edit-text")),
|
|
9328
|
+
"save-as-picture": andClose(() => onAction("save-as-picture")),
|
|
9329
|
+
"edit-alt-text": andClose(() => onAction("edit-alt-text")),
|
|
9330
|
+
"size-and-position": andClose(() => onAction("size-and-position")),
|
|
9331
|
+
"format-shape": andClose(() => onAction("format-shape")),
|
|
9315
9332
|
delete: andClose(() => onAction("delete"))
|
|
9316
9333
|
};
|
|
9317
9334
|
}
|
|
@@ -9322,17 +9339,22 @@ function ContextMenuItem({
|
|
|
9322
9339
|
onSelect,
|
|
9323
9340
|
danger,
|
|
9324
9341
|
disabled,
|
|
9342
|
+
checked,
|
|
9325
9343
|
children
|
|
9326
9344
|
}) {
|
|
9327
|
-
return /* @__PURE__ */
|
|
9345
|
+
return /* @__PURE__ */ jsxs(
|
|
9328
9346
|
"button",
|
|
9329
9347
|
{
|
|
9330
9348
|
type: "button",
|
|
9331
|
-
role: "menuitem",
|
|
9349
|
+
role: checked === void 0 ? "menuitem" : "menuitemcheckbox",
|
|
9350
|
+
"aria-checked": checked === void 0 ? void 0 : checked,
|
|
9332
9351
|
disabled,
|
|
9333
9352
|
className: `${danger ? DANGER_ITEM_CLASS : ITEM_CLASS}${disabled ? DISABLED_CLASS : ""}`,
|
|
9334
9353
|
onClick: onSelect,
|
|
9335
|
-
children
|
|
9354
|
+
children: [
|
|
9355
|
+
checked !== void 0 && /* @__PURE__ */ jsx("span", { className: "mr-1.5 inline-block w-3", "aria-hidden": "true", children: checked ? "\u2713" : "" }),
|
|
9356
|
+
children
|
|
9357
|
+
]
|
|
9336
9358
|
}
|
|
9337
9359
|
);
|
|
9338
9360
|
}
|
|
@@ -9403,6 +9425,94 @@ function ContextMenu(props) {
|
|
|
9403
9425
|
)
|
|
9404
9426
|
] });
|
|
9405
9427
|
}
|
|
9428
|
+
|
|
9429
|
+
// src/viewer/components/canvas-context-menu-dispatch.ts
|
|
9430
|
+
function canvasContextMenuContext(props) {
|
|
9431
|
+
return {
|
|
9432
|
+
hasClipboard: props.hasClipboard,
|
|
9433
|
+
showGrid: props.showGrid,
|
|
9434
|
+
showRulers: props.showRulers
|
|
9435
|
+
};
|
|
9436
|
+
}
|
|
9437
|
+
function canvasContextMenuHandlers(props) {
|
|
9438
|
+
const { onClose } = props;
|
|
9439
|
+
const andClose = (run) => () => {
|
|
9440
|
+
run();
|
|
9441
|
+
onClose();
|
|
9442
|
+
};
|
|
9443
|
+
return {
|
|
9444
|
+
paste: andClose(props.onPaste),
|
|
9445
|
+
layout: andClose(props.onOpenLayoutGallery),
|
|
9446
|
+
"reset-slide": andClose(props.onResetSlide),
|
|
9447
|
+
"format-background": andClose(props.onOpenFormatBackground),
|
|
9448
|
+
"grid-and-guides": andClose(props.onToggleGrid),
|
|
9449
|
+
ruler: andClose(props.onToggleRulers)
|
|
9450
|
+
};
|
|
9451
|
+
}
|
|
9452
|
+
function CanvasContextMenu(props) {
|
|
9453
|
+
const { canvasContextMenuState, mode, onClose } = props;
|
|
9454
|
+
const { t } = useTranslation();
|
|
9455
|
+
const open = Boolean(canvasContextMenuState) && mode === "edit";
|
|
9456
|
+
useEffect(() => {
|
|
9457
|
+
if (!open) {
|
|
9458
|
+
return;
|
|
9459
|
+
}
|
|
9460
|
+
const onKeyDown = (event) => {
|
|
9461
|
+
if (event.key === "Escape") {
|
|
9462
|
+
event.preventDefault();
|
|
9463
|
+
onClose();
|
|
9464
|
+
}
|
|
9465
|
+
};
|
|
9466
|
+
document.addEventListener("keydown", onKeyDown);
|
|
9467
|
+
return () => document.removeEventListener("keydown", onKeyDown);
|
|
9468
|
+
}, [open, onClose]);
|
|
9469
|
+
if (!open) {
|
|
9470
|
+
return null;
|
|
9471
|
+
}
|
|
9472
|
+
const handlers = canvasContextMenuHandlers(props);
|
|
9473
|
+
const entries = buildCanvasContextMenuEntries(canvasContextMenuContext(props));
|
|
9474
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9475
|
+
/* @__PURE__ */ jsx(
|
|
9476
|
+
"div",
|
|
9477
|
+
{
|
|
9478
|
+
className: "fixed inset-0 z-[119]",
|
|
9479
|
+
onClick: onClose,
|
|
9480
|
+
onContextMenu: (e) => {
|
|
9481
|
+
e.preventDefault();
|
|
9482
|
+
onClose();
|
|
9483
|
+
}
|
|
9484
|
+
}
|
|
9485
|
+
),
|
|
9486
|
+
/* @__PURE__ */ jsx(
|
|
9487
|
+
"div",
|
|
9488
|
+
{
|
|
9489
|
+
"data-pptx-canvas-context-menu": "true",
|
|
9490
|
+
role: "menu",
|
|
9491
|
+
"aria-label": t("pptx.canvasContextMenu.ariaLabel"),
|
|
9492
|
+
className: "fixed z-[120] min-w-[180px] rounded border border-border bg-popover shadow-2xl py-1.5 text-xs text-foreground",
|
|
9493
|
+
style: {
|
|
9494
|
+
left: Math.max(canvasContextMenuState.x, 8),
|
|
9495
|
+
top: Math.max(canvasContextMenuState.y, 8)
|
|
9496
|
+
},
|
|
9497
|
+
children: entries.map((entry) => {
|
|
9498
|
+
const run = handlers[entry.id];
|
|
9499
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
9500
|
+
entry.separatorBefore && /* @__PURE__ */ jsx(ContextMenuSeparator, {}),
|
|
9501
|
+
/* @__PURE__ */ jsx(
|
|
9502
|
+
ContextMenuItem,
|
|
9503
|
+
{
|
|
9504
|
+
disabled: entry.disabled || !run,
|
|
9505
|
+
checked: entry.checked,
|
|
9506
|
+
onSelect: () => run?.(),
|
|
9507
|
+
children: t(entry.labelKey)
|
|
9508
|
+
}
|
|
9509
|
+
)
|
|
9510
|
+
] }, entry.id);
|
|
9511
|
+
})
|
|
9512
|
+
}
|
|
9513
|
+
)
|
|
9514
|
+
] });
|
|
9515
|
+
}
|
|
9406
9516
|
var ic2 = "w-3.5 h-3.5";
|
|
9407
9517
|
var btnBase = "inline-flex items-center justify-center rounded p-1 transition-colors disabled:opacity-40 disabled:cursor-not-allowed";
|
|
9408
9518
|
var btnGhost = `${btnBase} hover:bg-accent text-muted-foreground hover:text-foreground`;
|
|
@@ -9738,30 +9848,83 @@ function SectionHeader({
|
|
|
9738
9848
|
}
|
|
9739
9849
|
function SlideContextMenu({
|
|
9740
9850
|
state,
|
|
9851
|
+
slides,
|
|
9852
|
+
onAddSlideAfter,
|
|
9853
|
+
onDuplicateSlides,
|
|
9854
|
+
onDeleteSlides,
|
|
9855
|
+
onHideSlides,
|
|
9856
|
+
onOpenLayoutForSlide,
|
|
9741
9857
|
onAddSection,
|
|
9742
9858
|
onClose
|
|
9743
9859
|
}) {
|
|
9744
9860
|
const { t } = useTranslation();
|
|
9745
|
-
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
|
|
9749
|
-
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9861
|
+
useEffect(() => {
|
|
9862
|
+
const onKeyDown = (event) => {
|
|
9863
|
+
if (event.key === "Escape") {
|
|
9864
|
+
event.preventDefault();
|
|
9865
|
+
onClose();
|
|
9866
|
+
}
|
|
9867
|
+
};
|
|
9868
|
+
document.addEventListener("keydown", onKeyDown);
|
|
9869
|
+
return () => document.removeEventListener("keydown", onKeyDown);
|
|
9870
|
+
}, [onClose]);
|
|
9871
|
+
const selected = state.selectedIndexes;
|
|
9872
|
+
const selectedSlides = selected.map((i) => slides[i]).filter((s) => Boolean(s));
|
|
9873
|
+
const entries = buildSlidePaneContextMenuEntries({
|
|
9874
|
+
selectedCount: selected.length,
|
|
9875
|
+
hasHiddenInSelection: selectedSlides.some((s) => s.hidden),
|
|
9876
|
+
hasVisibleInSelection: selectedSlides.some((s) => !s.hidden),
|
|
9877
|
+
wouldDeleteAllSlides: selected.length >= slides.length
|
|
9878
|
+
});
|
|
9879
|
+
const run = (id) => {
|
|
9880
|
+
switch (id) {
|
|
9881
|
+
case "new-slide":
|
|
9882
|
+
onAddSlideAfter(state.slideIndex);
|
|
9883
|
+
break;
|
|
9884
|
+
case "duplicate":
|
|
9885
|
+
onDuplicateSlides(selected);
|
|
9886
|
+
break;
|
|
9887
|
+
case "delete":
|
|
9888
|
+
onDeleteSlides(selected);
|
|
9889
|
+
break;
|
|
9890
|
+
case "layout":
|
|
9891
|
+
onOpenLayoutForSlide(state.slideIndex, state.x, state.y);
|
|
9892
|
+
break;
|
|
9893
|
+
case "hide":
|
|
9894
|
+
onHideSlides(selected);
|
|
9895
|
+
break;
|
|
9896
|
+
case "add-section":
|
|
9897
|
+
onAddSection?.(t("pptx.sections.defaultName"), state.slideIndex);
|
|
9898
|
+
break;
|
|
9763
9899
|
}
|
|
9764
|
-
|
|
9900
|
+
onClose();
|
|
9901
|
+
};
|
|
9902
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9903
|
+
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 z-[119]", onClick: onClose }),
|
|
9904
|
+
/* @__PURE__ */ jsx(
|
|
9905
|
+
"div",
|
|
9906
|
+
{
|
|
9907
|
+
"data-pptx-context-menu": "true",
|
|
9908
|
+
"data-pptx-slide-pane-context-menu": "true",
|
|
9909
|
+
role: "menu",
|
|
9910
|
+
"aria-label": t("pptx.slidesPane.contextMenu.newSlide"),
|
|
9911
|
+
className: "fixed z-[120] min-w-[190px] rounded border border-border bg-popover shadow-2xl py-1.5 text-xs text-foreground",
|
|
9912
|
+
style: { left: state.x, top: state.y },
|
|
9913
|
+
children: entries.map((entry) => /* @__PURE__ */ jsxs("span", { children: [
|
|
9914
|
+
entry.separatorBefore && /* @__PURE__ */ jsx(ContextMenuSeparator, {}),
|
|
9915
|
+
/* @__PURE__ */ jsx(
|
|
9916
|
+
ContextMenuItem,
|
|
9917
|
+
{
|
|
9918
|
+
danger: entry.id === "delete",
|
|
9919
|
+
disabled: entry.disabled,
|
|
9920
|
+
onSelect: () => run(entry.id),
|
|
9921
|
+
children: entry.countLabelKey ? t(entry.labelKey, { count: selected.length }) : t(entry.labelKey)
|
|
9922
|
+
}
|
|
9923
|
+
)
|
|
9924
|
+
] }, entry.id))
|
|
9925
|
+
}
|
|
9926
|
+
)
|
|
9927
|
+
] });
|
|
9765
9928
|
}
|
|
9766
9929
|
function LazyThumbnailInner({
|
|
9767
9930
|
slide,
|
|
@@ -9860,6 +10023,7 @@ function SlideItemInner({
|
|
|
9860
10023
|
templateElements,
|
|
9861
10024
|
slideIndex,
|
|
9862
10025
|
isActive,
|
|
10026
|
+
isSelected = false,
|
|
9863
10027
|
canvasSize,
|
|
9864
10028
|
canEdit,
|
|
9865
10029
|
rehearsalTimings,
|
|
@@ -9868,7 +10032,6 @@ function SlideItemInner({
|
|
|
9868
10032
|
tableStyleContext,
|
|
9869
10033
|
onSelectSlide,
|
|
9870
10034
|
onSlideContextMenu,
|
|
9871
|
-
onAddSection,
|
|
9872
10035
|
onOpenSlideCtxMenu,
|
|
9873
10036
|
onDragStart,
|
|
9874
10037
|
onDragOver,
|
|
@@ -9880,7 +10043,7 @@ function SlideItemInner({
|
|
|
9880
10043
|
const cue = hiddenSlideCue(slide.hidden, "rail", slideIndex);
|
|
9881
10044
|
const handleContextMenu = useCallback(
|
|
9882
10045
|
(e) => {
|
|
9883
|
-
if (canEdit
|
|
10046
|
+
if (canEdit) {
|
|
9884
10047
|
e.preventDefault();
|
|
9885
10048
|
e.stopPropagation();
|
|
9886
10049
|
onOpenSlideCtxMenu(e.clientX, e.clientY, slideIndex);
|
|
@@ -9888,7 +10051,7 @@ function SlideItemInner({
|
|
|
9888
10051
|
onSlideContextMenu(e, slideIndex);
|
|
9889
10052
|
}
|
|
9890
10053
|
},
|
|
9891
|
-
[canEdit,
|
|
10054
|
+
[canEdit, onOpenSlideCtxMenu, onSlideContextMenu, slideIndex]
|
|
9892
10055
|
);
|
|
9893
10056
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
9894
10057
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
@@ -9906,10 +10069,11 @@ function SlideItemInner({
|
|
|
9906
10069
|
className: cn(
|
|
9907
10070
|
"group relative flex w-full items-center gap-1 cursor-pointer border-0 bg-transparent py-0.5 px-1 text-left transition-all",
|
|
9908
10071
|
isActive && "bg-accent/40 before:absolute before:left-0 before:top-1 before:bottom-1 before:w-[3px] before:bg-primary before:rounded-r",
|
|
10072
|
+
isSelected && !isActive && "bg-accent/20 ring-1 ring-inset ring-primary/50",
|
|
9909
10073
|
isHidden && "opacity-50"
|
|
9910
10074
|
),
|
|
9911
10075
|
draggable: canEdit,
|
|
9912
|
-
onClick: () => onSelectSlide(slideIndex),
|
|
10076
|
+
onClick: (e) => onSelectSlide(slideIndex, e),
|
|
9913
10077
|
onContextMenu: handleContextMenu,
|
|
9914
10078
|
onDragStart: (e) => onDragStart(e, slideIndex),
|
|
9915
10079
|
onDragOver,
|
|
@@ -9983,6 +10147,24 @@ function useSlidePaneCallbacks(onMoveSlide, onRenameSection, onToggleSectionColl
|
|
|
9983
10147
|
null
|
|
9984
10148
|
);
|
|
9985
10149
|
const [slideCtxMenu, setSlideCtxMenu] = useState(null);
|
|
10150
|
+
const [selectedSlideIds, setSelectedSlideIds] = useState([]);
|
|
10151
|
+
const [selectionAnchorId, setSelectionAnchorId] = useState(null);
|
|
10152
|
+
const handleSlideClick = useCallback(
|
|
10153
|
+
(event, slideId, orderedIds) => {
|
|
10154
|
+
const result = resolveSlidePaneClick({
|
|
10155
|
+
clickedId: slideId,
|
|
10156
|
+
orderedIds,
|
|
10157
|
+
selectedIds: selectedSlideIds,
|
|
10158
|
+
anchorId: selectionAnchorId,
|
|
10159
|
+
ctrlKey: event.ctrlKey,
|
|
10160
|
+
metaKey: event.metaKey,
|
|
10161
|
+
shiftKey: event.shiftKey
|
|
10162
|
+
});
|
|
10163
|
+
setSelectedSlideIds(result.selectedIds);
|
|
10164
|
+
setSelectionAnchorId(result.anchorId);
|
|
10165
|
+
},
|
|
10166
|
+
[selectedSlideIds, selectionAnchorId]
|
|
10167
|
+
);
|
|
9986
10168
|
useEffect(() => {
|
|
9987
10169
|
if (!sectionContextMenu && !slideCtxMenu) {
|
|
9988
10170
|
return;
|
|
@@ -10053,9 +10235,12 @@ function useSlidePaneCallbacks(onMoveSlide, onRenameSection, onToggleSectionColl
|
|
|
10053
10235
|
},
|
|
10054
10236
|
[]
|
|
10055
10237
|
);
|
|
10056
|
-
const handleOpenSlideCtxMenu = useCallback(
|
|
10057
|
-
|
|
10058
|
-
|
|
10238
|
+
const handleOpenSlideCtxMenu = useCallback(
|
|
10239
|
+
(x, y, slideIndex, selectedIndexes) => {
|
|
10240
|
+
setSlideCtxMenu({ x, y, slideIndex, selectedIndexes });
|
|
10241
|
+
},
|
|
10242
|
+
[]
|
|
10243
|
+
);
|
|
10059
10244
|
const closeSectionContextMenu = useCallback(() => {
|
|
10060
10245
|
setSectionContextMenu(null);
|
|
10061
10246
|
}, []);
|
|
@@ -10079,7 +10264,9 @@ function useSlidePaneCallbacks(onMoveSlide, onRenameSection, onToggleSectionColl
|
|
|
10079
10264
|
handleSectionContextMenu,
|
|
10080
10265
|
handleOpenSlideCtxMenu,
|
|
10081
10266
|
closeSectionContextMenu,
|
|
10082
|
-
closeSlideCtxMenu
|
|
10267
|
+
closeSlideCtxMenu,
|
|
10268
|
+
selectedSlideIds,
|
|
10269
|
+
handleSlideClick
|
|
10083
10270
|
};
|
|
10084
10271
|
}
|
|
10085
10272
|
var EMPTY_TEMPLATE_ELEMENTS = [];
|
|
@@ -10096,6 +10283,11 @@ function SlidesPaneSidebar({
|
|
|
10096
10283
|
onSlideContextMenu,
|
|
10097
10284
|
onMoveSlide,
|
|
10098
10285
|
onAddSlide,
|
|
10286
|
+
onAddSlideAfter,
|
|
10287
|
+
onDuplicateSlides,
|
|
10288
|
+
onDeleteSlides,
|
|
10289
|
+
onHideSlides,
|
|
10290
|
+
onOpenLayoutForSlide,
|
|
10099
10291
|
onCollapse: _onCollapse,
|
|
10100
10292
|
onAddSection,
|
|
10101
10293
|
onRenameSection,
|
|
@@ -10151,8 +10343,46 @@ function SlidesPaneSidebar({
|
|
|
10151
10343
|
handleSectionContextMenu,
|
|
10152
10344
|
handleOpenSlideCtxMenu,
|
|
10153
10345
|
closeSectionContextMenu,
|
|
10154
|
-
closeSlideCtxMenu
|
|
10346
|
+
closeSlideCtxMenu,
|
|
10347
|
+
selectedSlideIds,
|
|
10348
|
+
handleSlideClick
|
|
10155
10349
|
} = useSlidePaneCallbacks(onMoveSlide, onRenameSection, onToggleSectionCollapse);
|
|
10350
|
+
const orderedIds = useMemo(() => slides.map((s) => s.id), [slides]);
|
|
10351
|
+
const selectSlide = useCallback(
|
|
10352
|
+
(index, e) => {
|
|
10353
|
+
const slide = slides[index];
|
|
10354
|
+
if (slide) {
|
|
10355
|
+
handleSlideClick(
|
|
10356
|
+
{ ctrlKey: e.ctrlKey, metaKey: e.metaKey, shiftKey: e.shiftKey },
|
|
10357
|
+
slide.id,
|
|
10358
|
+
orderedIds
|
|
10359
|
+
);
|
|
10360
|
+
}
|
|
10361
|
+
onSelectSlide(index);
|
|
10362
|
+
},
|
|
10363
|
+
[slides, orderedIds, handleSlideClick, onSelectSlide]
|
|
10364
|
+
);
|
|
10365
|
+
const openSlideCtxMenu = useCallback(
|
|
10366
|
+
(x, y, slideIndex) => {
|
|
10367
|
+
const slide = slides[slideIndex];
|
|
10368
|
+
if (!slide) {
|
|
10369
|
+
return;
|
|
10370
|
+
}
|
|
10371
|
+
const idsForMenu = selectedSlideIds.length > 0 && selectedSlideIds.includes(slide.id) ? selectedSlideIds : [slide.id];
|
|
10372
|
+
const selectedIndexes = idsForMenu.map((id) => slides.findIndex((s) => s.id === id)).filter((i) => i !== -1);
|
|
10373
|
+
handleOpenSlideCtxMenu(x, y, slideIndex, selectedIndexes);
|
|
10374
|
+
},
|
|
10375
|
+
[slides, selectedSlideIds, handleOpenSlideCtxMenu]
|
|
10376
|
+
);
|
|
10377
|
+
const onPaneKeyDown = useCallback(
|
|
10378
|
+
(e) => {
|
|
10379
|
+
if (e.key === "Enter" && canEdit) {
|
|
10380
|
+
e.preventDefault();
|
|
10381
|
+
onAddSlideAfter(activeSlideIndex);
|
|
10382
|
+
}
|
|
10383
|
+
},
|
|
10384
|
+
[canEdit, onAddSlideAfter, activeSlideIndex]
|
|
10385
|
+
);
|
|
10156
10386
|
const effectiveCollapsed = useMemo(() => {
|
|
10157
10387
|
const map = {};
|
|
10158
10388
|
for (const group of sectionGroups) {
|
|
@@ -10255,16 +10485,16 @@ function SlidesPaneSidebar({
|
|
|
10255
10485
|
templateElements: templateElementsBySlideId[slide.id] ?? EMPTY_TEMPLATE_ELEMENTS,
|
|
10256
10486
|
slideIndex: item.slideIndex,
|
|
10257
10487
|
isActive: item.slideIndex === activeSlideIndex,
|
|
10488
|
+
isSelected: selectedSlideIds.includes(slide.id),
|
|
10258
10489
|
canvasSize,
|
|
10259
10490
|
canEdit,
|
|
10260
10491
|
rehearsalTimings,
|
|
10261
10492
|
presenceUsers: slidePresenceMap?.get(item.slideIndex),
|
|
10262
10493
|
fieldContext,
|
|
10263
10494
|
tableStyleContext,
|
|
10264
|
-
onSelectSlide,
|
|
10495
|
+
onSelectSlide: selectSlide,
|
|
10265
10496
|
onSlideContextMenu,
|
|
10266
|
-
|
|
10267
|
-
onOpenSlideCtxMenu: handleOpenSlideCtxMenu,
|
|
10497
|
+
onOpenSlideCtxMenu: openSlideCtxMenu,
|
|
10268
10498
|
onDragStart: handleDragStart,
|
|
10269
10499
|
onDragOver: handleDragOver,
|
|
10270
10500
|
onDrop: handleDrop,
|
|
@@ -10312,16 +10542,16 @@ function SlidesPaneSidebar({
|
|
|
10312
10542
|
templateElements: templateElementsBySlideId[slide.id] ?? EMPTY_TEMPLATE_ELEMENTS,
|
|
10313
10543
|
slideIndex: idx,
|
|
10314
10544
|
isActive: idx === activeSlideIndex,
|
|
10545
|
+
isSelected: selectedSlideIds.includes(slide.id),
|
|
10315
10546
|
canvasSize,
|
|
10316
10547
|
canEdit,
|
|
10317
10548
|
rehearsalTimings,
|
|
10318
10549
|
presenceUsers: slidePresenceMap?.get(idx),
|
|
10319
10550
|
fieldContext,
|
|
10320
10551
|
tableStyleContext,
|
|
10321
|
-
onSelectSlide,
|
|
10552
|
+
onSelectSlide: selectSlide,
|
|
10322
10553
|
onSlideContextMenu,
|
|
10323
|
-
|
|
10324
|
-
onOpenSlideCtxMenu: handleOpenSlideCtxMenu,
|
|
10554
|
+
onOpenSlideCtxMenu: openSlideCtxMenu,
|
|
10325
10555
|
onDragStart: handleDragStart,
|
|
10326
10556
|
onDragOver: handleDragOver,
|
|
10327
10557
|
onDrop: handleDrop,
|
|
@@ -10332,52 +10562,62 @@ function SlidesPaneSidebar({
|
|
|
10332
10562
|
})
|
|
10333
10563
|
] }, section.id);
|
|
10334
10564
|
}) });
|
|
10335
|
-
return
|
|
10336
|
-
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
|
|
10347
|
-
|
|
10348
|
-
|
|
10349
|
-
|
|
10350
|
-
|
|
10351
|
-
|
|
10352
|
-
|
|
10353
|
-
|
|
10354
|
-
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10372
|
-
|
|
10373
|
-
|
|
10374
|
-
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
|
|
10565
|
+
return (
|
|
10566
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- Enter here only catches the keydown bubbled up from a focused (interactive) thumbnail button; the aside itself has no interactive semantics of its own
|
|
10567
|
+
/* @__PURE__ */ jsxs(
|
|
10568
|
+
"aside",
|
|
10569
|
+
{
|
|
10570
|
+
role: "navigation",
|
|
10571
|
+
"aria-label": t("pptx.sections.slides"),
|
|
10572
|
+
className: "flex h-full flex-col border-r border-border bg-secondary/30",
|
|
10573
|
+
style: panelWidth ? { width: panelWidth, flexShrink: 0 } : void 0,
|
|
10574
|
+
onKeyDown: onPaneKeyDown,
|
|
10575
|
+
children: [
|
|
10576
|
+
shouldVirtualize ? renderVirtualized() : renderNonVirtualized(),
|
|
10577
|
+
canEdit && /* @__PURE__ */ jsx("div", { className: "border-t border-border/60 px-2 py-1.5", children: /* @__PURE__ */ jsxs(
|
|
10578
|
+
"button",
|
|
10579
|
+
{
|
|
10580
|
+
type: "button",
|
|
10581
|
+
className: "flex w-full items-center justify-center gap-1 rounded-sm px-2 py-1 text-[11px] text-muted-foreground hover:bg-accent hover:text-foreground transition-colors disabled:cursor-not-allowed disabled:opacity-40",
|
|
10582
|
+
disabled: !canEdit,
|
|
10583
|
+
onClick: onAddSlide,
|
|
10584
|
+
children: [
|
|
10585
|
+
/* @__PURE__ */ jsx(LuPlus, { className: "h-3 w-3" }),
|
|
10586
|
+
t("pptx.sections.addSlide")
|
|
10587
|
+
]
|
|
10588
|
+
}
|
|
10589
|
+
) }),
|
|
10590
|
+
sectionContextMenu && /* @__PURE__ */ jsx(
|
|
10591
|
+
SectionContextMenu,
|
|
10592
|
+
{
|
|
10593
|
+
state: sectionContextMenu,
|
|
10594
|
+
sectionGroups,
|
|
10595
|
+
totalSlides: slides.length,
|
|
10596
|
+
onStartRename: startRename,
|
|
10597
|
+
onDeleteSection,
|
|
10598
|
+
onMoveSectionUp,
|
|
10599
|
+
onMoveSectionDown,
|
|
10600
|
+
onAddSection,
|
|
10601
|
+
onClose: closeSectionContextMenu
|
|
10602
|
+
}
|
|
10603
|
+
),
|
|
10604
|
+
slideCtxMenu && /* @__PURE__ */ jsx(
|
|
10605
|
+
SlideContextMenu,
|
|
10606
|
+
{
|
|
10607
|
+
state: slideCtxMenu,
|
|
10608
|
+
slides,
|
|
10609
|
+
onAddSlideAfter,
|
|
10610
|
+
onDuplicateSlides,
|
|
10611
|
+
onDeleteSlides,
|
|
10612
|
+
onHideSlides,
|
|
10613
|
+
onOpenLayoutForSlide,
|
|
10614
|
+
onAddSection,
|
|
10615
|
+
onClose: closeSlideCtxMenu
|
|
10616
|
+
}
|
|
10617
|
+
)
|
|
10618
|
+
]
|
|
10619
|
+
}
|
|
10620
|
+
)
|
|
10381
10621
|
);
|
|
10382
10622
|
}
|
|
10383
10623
|
var HANDOUT_SLIDES_PER_PAGE_OPTIONS = [1, 2, 3, 4, 6, 9];
|
|
@@ -15899,13 +16139,6 @@ var EXIT_PRESETS = ANIMATION_PRESET_OPTIONS.filter(
|
|
|
15899
16139
|
var EMPHASIS_PRESETS = ANIMATION_PRESET_OPTIONS.filter(
|
|
15900
16140
|
(o) => o.value === "spin" || o.value === "pulse" || o.value === "colorWave" || o.value === "bounce" || o.value === "flash" || o.value === "growShrink" || o.value === "teeter"
|
|
15901
16141
|
);
|
|
15902
|
-
var TRIGGER_OPTIONS = [
|
|
15903
|
-
{ value: "onClick", labelKey: "pptx.animation.trigger.onClick" },
|
|
15904
|
-
{ value: "onShapeClick", labelKey: "pptx.animation.trigger.onShapeClick" },
|
|
15905
|
-
{ value: "onHover", labelKey: "pptx.animation.trigger.onHover" },
|
|
15906
|
-
{ value: "afterPrevious", labelKey: "pptx.animation.trigger.afterPrevious" },
|
|
15907
|
-
{ value: "withPrevious", labelKey: "pptx.animation.trigger.withPrevious" }
|
|
15908
|
-
];
|
|
15909
16142
|
var TIMING_CURVE_OPTIONS = [
|
|
15910
16143
|
{ value: "ease", labelKey: "pptx.animation.timingCurve.ease" },
|
|
15911
16144
|
{ value: "ease-in", labelKey: "pptx.animation.timingCurve.easeIn" },
|
|
@@ -21429,7 +21662,7 @@ function AccessibilityTextSection({
|
|
|
21429
21662
|
if (!fields.showAltText && !fields.showTitle) {
|
|
21430
21663
|
return null;
|
|
21431
21664
|
}
|
|
21432
|
-
return /* @__PURE__ */ jsxs("div", { className: CARD2, "data-pptx-accessibility-text": true, children: [
|
|
21665
|
+
return /* @__PURE__ */ jsxs("div", { className: CARD2, "data-pptx-accessibility-text": true, "data-pptx-inspector-section": "alt-text", children: [
|
|
21433
21666
|
/* @__PURE__ */ jsx("div", { className: HEADING2, children: t("pptx.accessibility.heading", "Accessibility") }),
|
|
21434
21667
|
fields.showAltText && /* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1 text-[11px]", children: [
|
|
21435
21668
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.elementAccessibility.altText") }),
|
|
@@ -23583,7 +23816,7 @@ function ShapeTextPanels({
|
|
|
23583
23816
|
}
|
|
23584
23817
|
)
|
|
23585
23818
|
] }),
|
|
23586
|
-
hasShapeProperties(selectedElement) && /* @__PURE__ */ jsxs("div", { className: CARD2, "data-pptx-fill-stroke": true, children: [
|
|
23819
|
+
hasShapeProperties(selectedElement) && /* @__PURE__ */ jsxs("div", { className: CARD2, "data-pptx-fill-stroke": true, "data-pptx-inspector-section": "fill-stroke", children: [
|
|
23587
23820
|
/* @__PURE__ */ jsx("div", { className: HEADING2, children: t("pptx.shape.fillStroke", "Fill & Stroke") }),
|
|
23588
23821
|
/* @__PURE__ */ jsx(
|
|
23589
23822
|
FillStrokeProperties,
|
|
@@ -25546,7 +25779,7 @@ function ElementInspectorBody({
|
|
|
25546
25779
|
onUpdateElement({ locks: elementLockTogglePatch(!isLocked) });
|
|
25547
25780
|
};
|
|
25548
25781
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
25549
|
-
/* @__PURE__ */ jsxs("div", { className: CARD2, children: [
|
|
25782
|
+
/* @__PURE__ */ jsxs("div", { className: CARD2, "data-pptx-inspector-section": "transform", children: [
|
|
25550
25783
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
25551
25784
|
/* @__PURE__ */ jsx("div", { className: HEADING2, children: t("pptx.inspector.element") }),
|
|
25552
25785
|
/* @__PURE__ */ jsx(
|
|
@@ -27035,6 +27268,8 @@ function SlideTransitionSection({
|
|
|
27035
27268
|
const usesOrientation = TRANSITION_ORIENTATION_TYPES.has(transitionType);
|
|
27036
27269
|
const isWheel = transitionType === "wheel";
|
|
27037
27270
|
const isMorph = transitionType === "morph";
|
|
27271
|
+
const patternOptions = TRANSITION_PATTERN_OPTIONS[transitionType];
|
|
27272
|
+
const hasThruBlk = TRANSITION_THRUBLK_TYPES.has(transitionType);
|
|
27038
27273
|
return /* @__PURE__ */ jsxs(
|
|
27039
27274
|
"div",
|
|
27040
27275
|
{
|
|
@@ -27086,6 +27321,32 @@ function SlideTransitionSection({
|
|
|
27086
27321
|
o
|
|
27087
27322
|
)) })
|
|
27088
27323
|
] }),
|
|
27324
|
+
patternOptions && /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
27325
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs", children: t("pptx.transition.pattern") }),
|
|
27326
|
+
/* @__PURE__ */ jsx("div", { className: "flex gap-1", children: patternOptions.map((pattern) => /* @__PURE__ */ jsx(
|
|
27327
|
+
"button",
|
|
27328
|
+
{
|
|
27329
|
+
type: "button",
|
|
27330
|
+
disabled: !canEdit,
|
|
27331
|
+
onClick: () => onTransitionChange({ pattern }),
|
|
27332
|
+
className: `px-2 py-1 rounded text-xs border ${(activeSlide.transition?.pattern ?? patternOptions[0]) === pattern ? "bg-primary text-white border-primary" : "bg-muted border-border hover:bg-accent"}`,
|
|
27333
|
+
children: t(`pptx.transition.pattern.${pattern}`)
|
|
27334
|
+
},
|
|
27335
|
+
pattern
|
|
27336
|
+
)) })
|
|
27337
|
+
] }),
|
|
27338
|
+
hasThruBlk && /* @__PURE__ */ jsxs("label", { className: "inline-flex items-center gap-2 text-foreground text-xs", children: [
|
|
27339
|
+
/* @__PURE__ */ jsx(
|
|
27340
|
+
WebCheckbox,
|
|
27341
|
+
{
|
|
27342
|
+
type: "checkbox",
|
|
27343
|
+
disabled: !canEdit,
|
|
27344
|
+
checked: activeSlide.transition?.thruBlk === true,
|
|
27345
|
+
onChange: (e) => onTransitionChange({ thruBlk: e.target.checked })
|
|
27346
|
+
}
|
|
27347
|
+
),
|
|
27348
|
+
t("pptx.transition.thruBlk")
|
|
27349
|
+
] }),
|
|
27089
27350
|
isWheel && /* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
27090
27351
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs", children: t("pptx.transition.spokes") }),
|
|
27091
27352
|
/* @__PURE__ */ jsx(
|
|
@@ -28457,6 +28718,143 @@ function KeepAnnotationsDialog({
|
|
|
28457
28718
|
}
|
|
28458
28719
|
);
|
|
28459
28720
|
}
|
|
28721
|
+
function PasteSpecialDialog({
|
|
28722
|
+
isOpen,
|
|
28723
|
+
onCancel,
|
|
28724
|
+
onConfirm
|
|
28725
|
+
}) {
|
|
28726
|
+
const { t } = useTranslation();
|
|
28727
|
+
const [selected, setSelected] = useState("keep-source-formatting");
|
|
28728
|
+
if (!isOpen) {
|
|
28729
|
+
return null;
|
|
28730
|
+
}
|
|
28731
|
+
return /* @__PURE__ */ jsx(
|
|
28732
|
+
"div",
|
|
28733
|
+
{
|
|
28734
|
+
style: { zIndex: 1200 },
|
|
28735
|
+
className: "fixed inset-0 flex items-center justify-center bg-black/50",
|
|
28736
|
+
role: "presentation",
|
|
28737
|
+
onMouseDown: (e) => {
|
|
28738
|
+
if (e.target === e.currentTarget) {
|
|
28739
|
+
onCancel();
|
|
28740
|
+
}
|
|
28741
|
+
},
|
|
28742
|
+
children: /* @__PURE__ */ jsxs(
|
|
28743
|
+
"div",
|
|
28744
|
+
{
|
|
28745
|
+
role: "dialog",
|
|
28746
|
+
"aria-modal": "true",
|
|
28747
|
+
"aria-label": t("pptx.pasteSpecial.dialogTitle"),
|
|
28748
|
+
className: "bg-background border border-border rounded-lg shadow-xl w-[360px] max-w-[90vw] p-5",
|
|
28749
|
+
children: [
|
|
28750
|
+
/* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-foreground mb-3", children: t("pptx.pasteSpecial.dialogTitle") }),
|
|
28751
|
+
/* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-1 mb-5", children: PASTE_SPECIAL_OPTIONS.map((option) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 px-2 py-1.5 rounded cursor-pointer hover:bg-accent text-sm text-foreground", children: [
|
|
28752
|
+
/* @__PURE__ */ jsx(
|
|
28753
|
+
"input",
|
|
28754
|
+
{
|
|
28755
|
+
type: "radio",
|
|
28756
|
+
name: "paste-special-format",
|
|
28757
|
+
value: option.id,
|
|
28758
|
+
checked: selected === option.id,
|
|
28759
|
+
onChange: () => setSelected(option.id)
|
|
28760
|
+
}
|
|
28761
|
+
),
|
|
28762
|
+
t(option.labelKey)
|
|
28763
|
+
] }) }, option.id)) }),
|
|
28764
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
28765
|
+
/* @__PURE__ */ jsx(
|
|
28766
|
+
"button",
|
|
28767
|
+
{
|
|
28768
|
+
type: "button",
|
|
28769
|
+
className: "px-4 py-2 text-sm font-medium rounded-md border border-border bg-background text-foreground hover:bg-accent transition-colors",
|
|
28770
|
+
onClick: onCancel,
|
|
28771
|
+
children: t("pptx.common.cancel")
|
|
28772
|
+
}
|
|
28773
|
+
),
|
|
28774
|
+
/* @__PURE__ */ jsx(
|
|
28775
|
+
"button",
|
|
28776
|
+
{
|
|
28777
|
+
type: "button",
|
|
28778
|
+
className: "px-4 py-2 text-sm font-medium rounded-md bg-primary text-white hover:bg-primary/90 transition-colors",
|
|
28779
|
+
onClick: () => onConfirm(selected),
|
|
28780
|
+
children: t("pptx.common.ok")
|
|
28781
|
+
}
|
|
28782
|
+
)
|
|
28783
|
+
] })
|
|
28784
|
+
]
|
|
28785
|
+
}
|
|
28786
|
+
)
|
|
28787
|
+
}
|
|
28788
|
+
);
|
|
28789
|
+
}
|
|
28790
|
+
function findElementNode(elementId) {
|
|
28791
|
+
return document.querySelector(
|
|
28792
|
+
`[data-element-id="${elementId}"][data-pptx-element="true"]`
|
|
28793
|
+
);
|
|
28794
|
+
}
|
|
28795
|
+
function PasteOptionsToolbar({
|
|
28796
|
+
elementId,
|
|
28797
|
+
onChoose,
|
|
28798
|
+
onDismiss
|
|
28799
|
+
}) {
|
|
28800
|
+
const { t } = useTranslation();
|
|
28801
|
+
const [rect, setRect] = useState(null);
|
|
28802
|
+
useEffect(() => {
|
|
28803
|
+
if (!elementId) {
|
|
28804
|
+
setRect(null);
|
|
28805
|
+
return;
|
|
28806
|
+
}
|
|
28807
|
+
const node = findElementNode(elementId);
|
|
28808
|
+
if (!node) {
|
|
28809
|
+
setRect(null);
|
|
28810
|
+
return;
|
|
28811
|
+
}
|
|
28812
|
+
const box = node.getBoundingClientRect();
|
|
28813
|
+
setRect({ left: box.right, top: box.bottom });
|
|
28814
|
+
}, [elementId]);
|
|
28815
|
+
useEffect(() => {
|
|
28816
|
+
if (!elementId) {
|
|
28817
|
+
return;
|
|
28818
|
+
}
|
|
28819
|
+
const dismiss = () => onDismiss();
|
|
28820
|
+
const timer = window.setTimeout(() => {
|
|
28821
|
+
window.addEventListener("pointerdown", dismiss, true);
|
|
28822
|
+
window.addEventListener("keydown", dismiss, true);
|
|
28823
|
+
}, 0);
|
|
28824
|
+
return () => {
|
|
28825
|
+
window.clearTimeout(timer);
|
|
28826
|
+
window.removeEventListener("pointerdown", dismiss, true);
|
|
28827
|
+
window.removeEventListener("keydown", dismiss, true);
|
|
28828
|
+
};
|
|
28829
|
+
}, [elementId, onDismiss]);
|
|
28830
|
+
if (!elementId || !rect) {
|
|
28831
|
+
return null;
|
|
28832
|
+
}
|
|
28833
|
+
return /* @__PURE__ */ jsx(
|
|
28834
|
+
"div",
|
|
28835
|
+
{
|
|
28836
|
+
role: "toolbar",
|
|
28837
|
+
tabIndex: -1,
|
|
28838
|
+
"aria-label": t("pptx.pasteSpecial.optionsLabel"),
|
|
28839
|
+
"data-pptx-paste-options": true,
|
|
28840
|
+
style: { position: "fixed", left: rect.left + 4, top: rect.top + 4, zIndex: 1100 },
|
|
28841
|
+
className: "flex items-center gap-0.5 rounded border border-border bg-popover p-1 shadow-lg",
|
|
28842
|
+
onMouseDown: (e) => e.stopPropagation(),
|
|
28843
|
+
children: PASTE_SPECIAL_OPTIONS.map((option) => /* @__PURE__ */ jsx(
|
|
28844
|
+
"button",
|
|
28845
|
+
{
|
|
28846
|
+
type: "button",
|
|
28847
|
+
title: t(option.labelKey),
|
|
28848
|
+
"aria-label": t(option.labelKey),
|
|
28849
|
+
className: "px-2 py-1 text-[11px] rounded hover:bg-accent text-foreground whitespace-nowrap",
|
|
28850
|
+
onClick: () => onChoose(option.id),
|
|
28851
|
+
children: t(option.labelKey)
|
|
28852
|
+
},
|
|
28853
|
+
option.id
|
|
28854
|
+
))
|
|
28855
|
+
}
|
|
28856
|
+
);
|
|
28857
|
+
}
|
|
28460
28858
|
var PREVIEW_SCALE2 = 0.9;
|
|
28461
28859
|
var NOTE_LINE_COUNT = 5;
|
|
28462
28860
|
function NotesPagePreview({
|
|
@@ -32937,7 +33335,7 @@ function useTableStyleMapHandlers(input) {
|
|
|
32937
33335
|
var AiChatPanel = lazy(async () => {
|
|
32938
33336
|
const [{ useChat }, { default: Panel }] = await Promise.all([
|
|
32939
33337
|
import('@ai-sdk/react'),
|
|
32940
|
-
import('./AiChatPanel-
|
|
33338
|
+
import('./AiChatPanel-HXGCZPUX.mjs')
|
|
32941
33339
|
]);
|
|
32942
33340
|
function BoundAiChatPanel(props) {
|
|
32943
33341
|
return /* @__PURE__ */ jsx(Panel, { ...props, useChat });
|
|
@@ -34038,7 +34436,9 @@ function ViewerMainContent(props) {
|
|
|
34038
34436
|
hiddenActions,
|
|
34039
34437
|
aiConfig,
|
|
34040
34438
|
aiBridge,
|
|
34041
|
-
aiPanel
|
|
34439
|
+
aiPanel,
|
|
34440
|
+
onApplyLayout,
|
|
34441
|
+
loadLayoutPreviews
|
|
34042
34442
|
} = props;
|
|
34043
34443
|
const {
|
|
34044
34444
|
ops,
|
|
@@ -34065,6 +34465,11 @@ function ViewerMainContent(props) {
|
|
|
34065
34465
|
() => state.theme || state.tableStyleMap ? { theme: state.theme, tableStyleMap: state.tableStyleMap } : void 0,
|
|
34066
34466
|
[state.theme, state.tableStyleMap]
|
|
34067
34467
|
);
|
|
34468
|
+
const [layoutGalleryAnchor, setLayoutGalleryAnchor] = useState(
|
|
34469
|
+
null
|
|
34470
|
+
);
|
|
34471
|
+
const layoutGalleryAnchorRef = useRef(null);
|
|
34472
|
+
const layoutGalleryPreviews = useLayoutPreviews(loadLayoutPreviews, layoutGalleryAnchor !== null);
|
|
34068
34473
|
return /* @__PURE__ */ jsx(ChartPartSelectionProvider, { children: /* @__PURE__ */ jsxs("div", { className: "relative z-10 flex flex-1 min-h-0", children: [
|
|
34069
34474
|
showSlidesPane && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
34070
34475
|
/* @__PURE__ */ jsx(
|
|
@@ -34081,6 +34486,14 @@ function ViewerMainContent(props) {
|
|
|
34081
34486
|
onSlideContextMenu: slideOps.handleSlideContextMenu,
|
|
34082
34487
|
onMoveSlide: slideOps.handleMoveSlide,
|
|
34083
34488
|
onAddSlide: slideOps.handleAddSlide,
|
|
34489
|
+
onAddSlideAfter: slideOps.handleAddSlideAfter,
|
|
34490
|
+
onDuplicateSlides: slideOps.handleDuplicateSlides,
|
|
34491
|
+
onDeleteSlides: slideOps.handleDeleteSlides,
|
|
34492
|
+
onHideSlides: slideOps.handleToggleHideSlides,
|
|
34493
|
+
onOpenLayoutForSlide: (index, x, y) => {
|
|
34494
|
+
state.setActiveSlideIndex(index);
|
|
34495
|
+
setLayoutGalleryAnchor({ x, y });
|
|
34496
|
+
},
|
|
34084
34497
|
onCollapse: () => state.setIsSlidesPaneOpen(false),
|
|
34085
34498
|
onAddSection: sectionOps.addSection,
|
|
34086
34499
|
onRenameSection: sectionOps.renameSection,
|
|
@@ -34218,6 +34631,67 @@ function ViewerMainContent(props) {
|
|
|
34218
34631
|
onClose: () => state.setContextMenuState(null)
|
|
34219
34632
|
}
|
|
34220
34633
|
),
|
|
34634
|
+
state.canvasContextMenuState && /* @__PURE__ */ jsx(
|
|
34635
|
+
CanvasContextMenu,
|
|
34636
|
+
{
|
|
34637
|
+
canvasContextMenuState: state.canvasContextMenuState,
|
|
34638
|
+
mode,
|
|
34639
|
+
hasClipboard: Boolean(state.clipboardPayload),
|
|
34640
|
+
showGrid: state.showGrid,
|
|
34641
|
+
showRulers: state.showRulers,
|
|
34642
|
+
onPaste: () => manipulation.handlePaste(),
|
|
34643
|
+
onOpenLayoutGallery: () => {
|
|
34644
|
+
const pos = state.canvasContextMenuState;
|
|
34645
|
+
if (pos) {
|
|
34646
|
+
setLayoutGalleryAnchor(pos);
|
|
34647
|
+
}
|
|
34648
|
+
},
|
|
34649
|
+
onResetSlide: () => {
|
|
34650
|
+
const path = resetSlideLayoutPath(activeSlide);
|
|
34651
|
+
if (path) {
|
|
34652
|
+
onApplyLayout?.(path);
|
|
34653
|
+
}
|
|
34654
|
+
},
|
|
34655
|
+
onOpenFormatBackground: () => {
|
|
34656
|
+
state.setSelectedElementId(null);
|
|
34657
|
+
state.setSelectedElementIds([]);
|
|
34658
|
+
state.setSidebarPanelMode("properties");
|
|
34659
|
+
state.setIsInspectorPaneOpen(true);
|
|
34660
|
+
},
|
|
34661
|
+
onToggleGrid: () => state.setShowGrid((v) => !v),
|
|
34662
|
+
onToggleRulers: () => state.setShowRulers((v) => !v),
|
|
34663
|
+
onClose: () => state.setCanvasContextMenuState(null)
|
|
34664
|
+
}
|
|
34665
|
+
),
|
|
34666
|
+
layoutGalleryAnchor && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
34667
|
+
/* @__PURE__ */ jsx(
|
|
34668
|
+
"div",
|
|
34669
|
+
{
|
|
34670
|
+
ref: layoutGalleryAnchorRef,
|
|
34671
|
+
style: {
|
|
34672
|
+
position: "fixed",
|
|
34673
|
+
left: layoutGalleryAnchor.x,
|
|
34674
|
+
top: layoutGalleryAnchor.y,
|
|
34675
|
+
width: 0,
|
|
34676
|
+
height: 0
|
|
34677
|
+
}
|
|
34678
|
+
}
|
|
34679
|
+
),
|
|
34680
|
+
/* @__PURE__ */ jsx("div", { className: "fixed inset-0 z-[119]", onClick: () => setLayoutGalleryAnchor(null) }),
|
|
34681
|
+
/* @__PURE__ */ jsx(
|
|
34682
|
+
LayoutGalleryMenu,
|
|
34683
|
+
{
|
|
34684
|
+
anchorRef: layoutGalleryAnchorRef,
|
|
34685
|
+
layoutOptions: state.layoutOptions,
|
|
34686
|
+
previews: layoutGalleryPreviews,
|
|
34687
|
+
currentLayoutPath: activeSlide?.layoutPath,
|
|
34688
|
+
onSelect: (layout) => {
|
|
34689
|
+
onApplyLayout?.(layout.path);
|
|
34690
|
+
setLayoutGalleryAnchor(null);
|
|
34691
|
+
}
|
|
34692
|
+
}
|
|
34693
|
+
)
|
|
34694
|
+
] }),
|
|
34221
34695
|
/* @__PURE__ */ jsx(
|
|
34222
34696
|
ViewerSidePanels,
|
|
34223
34697
|
{
|
|
@@ -34705,6 +35179,14 @@ function MobileChromeOverlay(props) {
|
|
|
34705
35179
|
onSlideContextMenu: editorOps.slideOps.handleSlideContextMenu,
|
|
34706
35180
|
onMoveSlide: editorOps.slideOps.handleMoveSlide,
|
|
34707
35181
|
onAddSlide: editorOps.slideOps.handleAddSlide,
|
|
35182
|
+
onAddSlideAfter: editorOps.slideOps.handleAddSlideAfter,
|
|
35183
|
+
onDuplicateSlides: editorOps.slideOps.handleDuplicateSlides,
|
|
35184
|
+
onDeleteSlides: editorOps.slideOps.handleDeleteSlides,
|
|
35185
|
+
onHideSlides: editorOps.slideOps.handleToggleHideSlides,
|
|
35186
|
+
onOpenLayoutForSlide: (index) => {
|
|
35187
|
+
s.setActiveSlideIndex(index);
|
|
35188
|
+
s.setIsSlidesPaneOpen(false);
|
|
35189
|
+
},
|
|
34708
35190
|
onCollapse: () => s.setIsSlidesPaneOpen(false),
|
|
34709
35191
|
onAddSection: editorOps.sectionOps.addSection,
|
|
34710
35192
|
onRenameSection: editorOps.sectionOps.renameSection,
|
|
@@ -37018,6 +37500,8 @@ var PowerPointViewer = forwardRef(
|
|
|
37018
37500
|
canEdit,
|
|
37019
37501
|
slides,
|
|
37020
37502
|
activeSlide,
|
|
37503
|
+
onApplyLayout: (path) => void layoutSwitching.applyLayout(path),
|
|
37504
|
+
loadLayoutPreviews: layoutSwitching.loadLayoutPreviews,
|
|
37021
37505
|
presentationOverlay: (
|
|
37022
37506
|
// `ppaction://program` ("Run program") notices. Rendered INSIDE
|
|
37023
37507
|
// the show stage, not beside the viewer: the fullscreen element
|
|
@@ -37151,6 +37635,27 @@ var PowerPointViewer = forwardRef(
|
|
|
37151
37635
|
onDiscardAnnotations: handleDiscardAnnotations
|
|
37152
37636
|
}
|
|
37153
37637
|
),
|
|
37638
|
+
/* @__PURE__ */ jsx(
|
|
37639
|
+
PasteSpecialDialog,
|
|
37640
|
+
{
|
|
37641
|
+
isOpen: editorOps.pasteSpecial.isPasteSpecialDialogOpen,
|
|
37642
|
+
onCancel: editorOps.pasteSpecial.closePasteSpecialDialog,
|
|
37643
|
+
onConfirm: (format) => {
|
|
37644
|
+
void editorOps.pasteSpecial.pasteWithFormat(format);
|
|
37645
|
+
}
|
|
37646
|
+
}
|
|
37647
|
+
),
|
|
37648
|
+
/* @__PURE__ */ jsx(
|
|
37649
|
+
PasteOptionsToolbar,
|
|
37650
|
+
{
|
|
37651
|
+
elementId: editorOps.pasteSpecial.pasteOptionsToolbar?.elementId ?? null,
|
|
37652
|
+
onChoose: (format) => {
|
|
37653
|
+
void editorOps.pasteSpecial.reformatPastedElement(format);
|
|
37654
|
+
editorOps.pasteSpecial.dismissPasteOptionsToolbar();
|
|
37655
|
+
},
|
|
37656
|
+
onDismiss: editorOps.pasteSpecial.dismissPasteOptionsToolbar
|
|
37657
|
+
}
|
|
37658
|
+
),
|
|
37154
37659
|
/* @__PURE__ */ jsx(
|
|
37155
37660
|
AutosaveRecoveryDialog,
|
|
37156
37661
|
{
|