pptx-react-viewer 4.15.0 → 4.16.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 +17 -0
- package/dist/{AiChatPanel-7OVUGUKW.mjs → AiChatPanel-5Z4BYP7S.mjs} +3 -3
- package/dist/AiChatPanel-5Z4BYP7S.mjs.br +0 -0
- package/dist/AiChatPanel-5Z4BYP7S.mjs.gz +0 -0
- package/dist/{AiChatPanel-CDQWJTWL.js → AiChatPanel-DHLJ6LKF.js} +27 -27
- package/dist/AiChatPanel-DHLJ6LKF.js.br +0 -0
- package/dist/AiChatPanel-DHLJ6LKF.js.gz +0 -0
- package/dist/{Model3DScene-OLGB7Z7Q.js → Model3DScene-AXT5KCUX.js} +2 -2
- package/dist/{Model3DScene-OLGB7Z7Q.js.br → Model3DScene-AXT5KCUX.js.br} +0 -0
- package/dist/Model3DScene-AXT5KCUX.js.gz +0 -0
- package/dist/{Model3DScene-A3CPMFAO.mjs → Model3DScene-N36X5Z2Z.mjs} +1 -1
- package/dist/{Model3DScene-A3CPMFAO.mjs.br → Model3DScene-N36X5Z2Z.mjs.br} +0 -0
- package/dist/Model3DScene-N36X5Z2Z.mjs.gz +0 -0
- package/dist/{chunk-RQCAXUVQ.mjs → chunk-BTTAYCGK.mjs} +568 -856
- package/dist/chunk-BTTAYCGK.mjs.br +0 -0
- package/dist/chunk-BTTAYCGK.mjs.gz +0 -0
- package/dist/{chunk-HGO243GV.js → chunk-BZNYI5U6.js} +854 -810
- package/dist/chunk-BZNYI5U6.js.br +0 -0
- package/dist/chunk-BZNYI5U6.js.gz +0 -0
- package/dist/{chunk-UP6PJEHM.js → chunk-FVLBN45Z.js} +5 -5
- package/dist/chunk-FVLBN45Z.js.br +0 -0
- package/dist/chunk-FVLBN45Z.js.gz +0 -0
- package/dist/{chunk-Q5VQ53R3.mjs → chunk-MFGRRONU.mjs} +1 -1
- package/dist/chunk-MFGRRONU.mjs.br +0 -0
- package/dist/chunk-MFGRRONU.mjs.gz +0 -0
- package/dist/{chunk-AIWEM7VE.mjs → chunk-MJ6LTUJ3.mjs} +1127 -29
- package/dist/chunk-MJ6LTUJ3.mjs.br +0 -0
- package/dist/{chunk-AIWEM7VE.mjs.gz → chunk-MJ6LTUJ3.mjs.gz} +0 -0
- package/dist/{chunk-CNXVOFUW.js → chunk-QAVJDYB2.js} +187 -187
- package/dist/chunk-QAVJDYB2.js.br +0 -0
- package/dist/chunk-QAVJDYB2.js.gz +0 -0
- package/dist/{chunk-DNWIW75I.mjs → chunk-QLUA63T3.mjs} +51 -7
- package/dist/chunk-QLUA63T3.mjs.br +0 -0
- package/dist/chunk-QLUA63T3.mjs.gz +0 -0
- package/dist/{chunk-6ZPXMS64.js → chunk-UVK2WBCU.js} +1726 -2014
- package/dist/chunk-UVK2WBCU.js.br +0 -0
- package/dist/chunk-UVK2WBCU.js.gz +0 -0
- package/dist/{chunk-AHJ4ND7Q.mjs → chunk-WRQ7K3DG.mjs} +1 -1
- package/dist/chunk-WRQ7K3DG.mjs.br +0 -0
- package/dist/chunk-WRQ7K3DG.mjs.gz +0 -0
- package/dist/{chunk-2CSRCH4H.js → chunk-XZUIS3VB.js} +1134 -32
- package/dist/chunk-XZUIS3VB.js.br +0 -0
- package/dist/{chunk-2CSRCH4H.js.gz → chunk-XZUIS3VB.js.gz} +0 -0
- package/dist/i18n/de.cjs +3 -0
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +3 -0
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +3 -0
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +3 -0
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +3 -0
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +3 -0
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +3 -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 +3 -0
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/index.d.ts +38 -1
- package/dist/index.js +61 -61
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +45 -0
- package/dist/internals.js +104 -104
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.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 +35 -0
- package/dist/viewer/index.js +26 -26
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +2 -2
- package/dist/AiChatPanel-7OVUGUKW.mjs.br +0 -0
- package/dist/AiChatPanel-7OVUGUKW.mjs.gz +0 -0
- package/dist/AiChatPanel-CDQWJTWL.js.br +0 -0
- package/dist/AiChatPanel-CDQWJTWL.js.gz +0 -0
- package/dist/Model3DScene-A3CPMFAO.mjs.gz +0 -0
- package/dist/Model3DScene-OLGB7Z7Q.js.gz +0 -0
- package/dist/chunk-2CSRCH4H.js.br +0 -0
- package/dist/chunk-6ZPXMS64.js.br +0 -0
- package/dist/chunk-6ZPXMS64.js.gz +0 -0
- package/dist/chunk-AHJ4ND7Q.mjs.br +0 -0
- package/dist/chunk-AHJ4ND7Q.mjs.gz +0 -0
- package/dist/chunk-AIWEM7VE.mjs.br +0 -0
- package/dist/chunk-CNXVOFUW.js.br +0 -0
- package/dist/chunk-CNXVOFUW.js.gz +0 -0
- package/dist/chunk-DNWIW75I.mjs.br +0 -0
- package/dist/chunk-DNWIW75I.mjs.gz +0 -0
- package/dist/chunk-HGO243GV.js.br +0 -0
- package/dist/chunk-HGO243GV.js.gz +0 -0
- package/dist/chunk-Q5VQ53R3.mjs.br +0 -0
- package/dist/chunk-Q5VQ53R3.mjs.gz +0 -0
- package/dist/chunk-RQCAXUVQ.mjs.br +0 -0
- package/dist/chunk-RQCAXUVQ.mjs.gz +0 -0
- package/dist/chunk-UP6PJEHM.js.br +0 -0
- package/dist/chunk-UP6PJEHM.js.gz +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
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, Rendering3DFlagsContext, CollaborationProvider, useCollaboration, useCollaborationDocumentSync, useFollowMode, useBroadcastFollower, SlideBackgroundImageLayer, StaticElementRenderer, safePrompt, scopeLayoutOptionsToActiveSlide, ChartPartSelectionProvider, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, ViewerOptionsStoreContext, ViewerOptionsContext, useViewerOptionsContext, useVirtualizedSlides, useSwipeNavigation, PresentationTransitionOverlay, RemoteSelectionOverlay, CollaborationCursorOverlay, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, ElementRenderer, InlineCollaborationContext, SmartArtRenderer, playAnimationSound, ResizeHandles, imgSrc, renderStrokeView, useChartPartSelection, resolveSmartArtDataPalette } from './chunk-
|
|
3
|
-
import { SHAPE_PRESETS, ANIMATION_PRESET_OPTIONS, cn, SLIDE_NAV_THUMBNAIL_WIDTH, DEFAULT_SECTION_GROUP_ID, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, TOOLBAR_SECTIONS, 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 { FIXED_TAB_GALLERIES, EMPTY_RESOLVED_CUSTOMIZATION, ANIMATION_DIRECTION_LABEL_KEYS, SWITCHABLE_LAYOUT_TYPES, compileEquationTemplateMathMl, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, isFeatureEnabled, isDialogAvailable, resolveAutosaveActivation, buildThemeColorMap, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, applyAutoCorrect, resolveImageResolutionScale, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, isPanelVisible, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, RIBBON_SCOPE_ATTR, resolve3DRenderingFlags, resolveSlideSizeSelection, RULER_THICKNESS, RULER_FONT_SIZE, buildPreviewElements, deriveSlideFieldContext, SLIDE_TRANSITION_OPTIONS, hiddenSlideCue, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, visibleTemplateElements, normalizeHexColor, themeToCssVars, createCustomizationController, resolveEffectiveHiddenActions, listAutosaveSnapshots, resolveExpiredAutosaveSnapshots, deleteAutosaveSnapshot, masterViewCrudActions, applyMasterViewCrudAction, masterViewCrudFailureKey, ribbonCustomizationCss, applyMotionPathPreset, resetSlideLayoutPath, DEFAULT_INSERT_CHART_KIND, hasCopyableFormat, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, shouldDiscardAutosaveOnSuccessfulSave, setMasterViewBackgroundColor, resolveEditPointsAvailability, canUseClipboard, runProgramNoticeStackStyle, compatToastStackStyle, printPropertiesFrameSlides, printPropertiesSlidesPerPage, PASTE_SPECIAL_OPTIONS, getDensePanelTouchTargetPx, shouldStickyActionRow, customizeOptionsTabs, VIEWER_OPTIONS_TABS, isOptionsPageVisible, DEFAULT_QUICK_ACCESS_COMMAND_IDS, isHeaderFooterDateTextVisible, isHeaderFooterHeaderTextVisible, isHeaderFooterFooterTextVisible, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, getSlideBackgroundStyle, pushRecentColor, mruColorsPatch, shouldClearAutosaveCacheOnClose, canCropElement, cropSessionChanged, cancelCropUpdate, startCropSession, filterCommands, resolveTitleBarStatusKey, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, masterViewBackgroundColor, buildFieldSubstitutionContext, shouldConfirmExternalHyperlink, safeOpenUrl, resolvePresentationAction, isPpactionUrl, parsePpactionUrl, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, customizeContextMenuEntries, buildContextMenuEntries, customizeCanvasContextMenuEntries, 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, cropModeKeyAction, extraQuickAccessCommands, visibleContextualTabs, resolveActiveRibbonTab, resolveScreenTip, contextualTabLabelKey, RIBBON_CONTEXTUAL_TAB_ATTR, TAB_ROW_ACTION_CLASSES, customizeBackstageNav, BACKSTAGE_NAV, listBackstageRecentFiles, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, hasTextProperties, COMMON_FONT_SIZES, textFontSizePtToPx, INSERT_CHART_TYPES, ACTION_BUTTON_PRESETS, hasShapeProperties, shapeFillChange, shapeOutlineChange, CONTEXTUAL_TAB_GROUPS, resolveSlidePaneClick, SLIDE_VIRTUALIZATION_THRESHOLD, buildSlidePaneContextMenuEntries, isEditPointsEnabled, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, buildStrokePathD, cursorForTool, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, PRESENTER_NAVIGATOR_LABEL_KEYS, subtitleRecognitionLanguage, subtitleSettingsFromOptions, getSpeechRecognitionCtor, mergeCaptionResults, PEN_COLORS, HIGHLIGHTER_COLORS, isBlackboardActive, clampFlyoutPosition, 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, customizeBackstageCards, backstageCardsFor, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, resolveDefaultFontFamily, textFontSizePxToPt, buildFontCatalog, RIBBON_CONTROL_ATTR, RIBBON_GROUP_ATTR, FREEFORM_TOOL_IDS, isDrawingToolVisible, FREEFORM_TOOL_LABEL_KEYS, getSelectionTextStyleFlags, getInlineEditorSelectionResult, selectedParagraphBulletKind, elementBulletKind, selectionBulletKind, TEXT_DECORATION_FLAGS, nextToggleValue, CHARACTER_SPACING_OPTIONS, OFFICE_COLOR_SWATCHES, RIBBON_SHAPE_SWATCHES, buildRibbonGallery, galleryHasItems, inlineGalleryItems, canGroupSelection, canUngroupSelection, canSetStrokeWidth, strokeWidthOf, readRibbonTransitionDraft, ribbonTransitionUpdates, playSlideTransitionPreview, RIBBON_TRANSITION_PRESETS, transitionSoundOptions, transitionSoundSelectedValue, DEFAULT_MOTION_PATH_PRESET_ID, SLIDE_SHOW_COMMAND_GROUPS, RECORD_COMMAND_GROUPS, HELP_RIBBON_COMMANDS, masterViewPseudoSlide, PRESENTATION_ANIM_TRIGGER_ATTRIBUTE, motionPathFor, setMotionPath, getShapeAdjustmentHandleDescriptors, shouldShowElementHandles, MERGE_SHAPES_MENU_ITEMS, hasMultipleSelectedTableCells, computeAnchoredPopupPosition, applyTableStyleDelete, applyTableStyleMapChange, themeColorLabel, buildThemeColorGrid, THEME_COLOR_SCHEME_KEYS, COMMON_FONTS, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, SLIDE_TEMPLATES, buildThemeColorSwatchGrid, themeColorSwatchRows, findSelectedThemeSwatch, themeSwatchCommit, RIBBON_GALLERY_POPUP_ATTR, applyRibbonGalleryItem, galleryItemLabel, RIBBON_GALLERY_ITEM_ATTR, RIBBON_GALLERY_ATTR, MERGE_SHAPES_LABEL_KEY, MERGE_SHAPES_HINT_KEY, CROP_LABEL_KEY, CROP_ASPECT_LABEL_KEY, CROP_ASPECT_GROUP_LABEL_KEYS, CROP_ASPECT_PRESETS, CROP_FILL_LABEL_KEY, CROP_FIT_LABEL_KEY, 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, SLIDE_SHOW_OPTIONS, createViewerOptionsStore, subtitleSettingsLabels, attachEditorImagePaste, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, resolveElementInteractivity, getElementTransformWithoutRotation, getElementTransform, 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, isElementLocked, isImageLikeElement, mergeSlideTransition, getElementLabel, effectiveDirection, TRIGGER_OPTIONS, effectiveTimingCurve, 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, 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, setTrigger, setTriggerBookmark, getEffectSoundState, setEffectSound, setEffectStockSound, setAfterAnimation, setAfterAnimationColor, directionValuesFor, buildAnimationTimelineBars, motionPathPresetIdForPath, EFFECT_SOUND_CATALOGUE, listMediaBookmarkOptions, selectedBookmarkOptionValue, hasTiltData, toElementAxes, dragCropHandle, panCropImage, clientToSlidePoint, EDIT_POINTS_TARGET_ATTR, 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, overlayPointerInput, 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, cropFit, cropFill, cropToAspectRatio } from './chunk-AIWEM7VE.mjs';
|
|
1
|
+
import { computeFocusTargets, deckDataFieldChanged, aiChangeAnimationCss, changeGhostStyle, createChatHistoryStore, collectStoredChats, exportAiChatLogs, applyElementUpdate } from './chunk-WRQ7K3DG.mjs';
|
|
2
|
+
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, ChartPartSelectionProvider, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, ViewerOptionsStoreContext, ViewerOptionsContext, useViewerOptionsContext, useVirtualizedSlides, useSwipeNavigation, PresentationTransitionOverlay, RemoteSelectionOverlay, CollaborationCursorOverlay, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, ElementRenderer, InlineCollaborationContext, SmartArtRenderer, playAnimationSound, ResizeHandles, imgSrc, renderStrokeView, useChartPartSelection, resolveSmartArtDataPalette } from './chunk-QLUA63T3.mjs';
|
|
3
|
+
import { SHAPE_PRESETS, ANIMATION_PRESET_OPTIONS, cn, SLIDE_NAV_THUMBNAIL_WIDTH, DEFAULT_SECTION_GROUP_ID, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, TOOLBAR_SECTIONS, 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-MFGRRONU.mjs';
|
|
4
|
+
import { FIXED_TAB_GALLERIES, EMPTY_RESOLVED_CUSTOMIZATION, ANIMATION_DIRECTION_LABEL_KEYS, SWITCHABLE_LAYOUT_TYPES, compileEquationTemplateMathMl, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, isFeatureEnabled, isDialogAvailable, resolveAutosaveActivation, buildThemeColorMap, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, applyAutoCorrect, resolveImageResolutionScale, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, isPanelVisible, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, RIBBON_SCOPE_ATTR, resolve3DRenderingFlags, resolveSlideSizeSelection, RULER_THICKNESS, RULER_FONT_SIZE, editorThumbnailHeight, buildPreviewElements, deriveSlideFieldContext, SLIDE_TRANSITION_OPTIONS, hiddenSlideCue, EDITOR_THUMBNAIL_WIDTH, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, visibleTemplateElements, normalizeHexColor, themeToCssVars, createCustomizationController, resolveEffectiveHiddenActions, listAutosaveSnapshots, resolveExpiredAutosaveSnapshots, deleteAutosaveSnapshot, masterViewCrudActions, applyMasterViewCrudAction, masterViewCrudFailureKey, EDITOR_CHROME_CSS, ribbonCustomizationCss, applyMotionPathPreset, resetSlideLayoutPath, DEFAULT_INSERT_CHART_KIND, hasCopyableFormat, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, shouldDiscardAutosaveOnSuccessfulSave, setMasterViewBackgroundColor, canUseClipboard, runProgramNoticeStackStyle, compatToastStackStyle, printPropertiesFrameSlides, printPropertiesSlidesPerPage, PASTE_SPECIAL_OPTIONS, getDensePanelTouchTargetPx, shouldStickyActionRow, customizeOptionsTabs, VIEWER_OPTIONS_TABS, isOptionsPageVisible, DEFAULT_QUICK_ACCESS_COMMAND_IDS, isHeaderFooterDateTextVisible, isHeaderFooterHeaderTextVisible, isHeaderFooterFooterTextVisible, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, getSlideBackgroundStyle, pushRecentColor, mruColorsPatch, shouldClearAutosaveCacheOnClose, canCropElement, cropSessionChanged, cancelCropUpdate, startCropSession, filterCommands, resolveTitleBarStatusKey, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, editorThumbnailWidth, masterViewBackgroundColor, buildFieldSubstitutionContext, shouldConfirmExternalHyperlink, safeOpenUrl, resolvePresentationAction, isPpactionUrl, parsePpactionUrl, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, resolveEditPointsAvailability, 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, cropModeKeyAction, extraQuickAccessCommands, visibleContextualTabs, resolveActiveRibbonTab, resolveScreenTip, contextualTabLabelKey, RIBBON_CONTEXTUAL_TAB_ATTR, TAB_ROW_ACTION_CLASSES, customizeBackstageNav, BACKSTAGE_NAV, listBackstageRecentFiles, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, hasTextProperties, textFontSizePtToPx, INSERT_CHART_TYPES, ACTION_BUTTON_PRESETS, hasShapeProperties, shapeFillChange, shapeOutlineChange, CONTEXTUAL_TAB_GROUPS, editorThumbnailStep, resolveSlidePaneClick, SLIDE_VIRTUALIZATION_THRESHOLD, buildSlidePaneContextMenuEntries, isEditPointsEnabled, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, buildStrokePathD, cursorForTool, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, PRESENTER_NAVIGATOR_LABEL_KEYS, subtitleRecognitionLanguage, subtitleSettingsFromOptions, getSpeechRecognitionCtor, mergeCaptionResults, PEN_COLORS, HIGHLIGHTER_COLORS, isBlackboardActive, customizeContextMenuEntries, buildContextMenuEntries, customizeCanvasContextMenuEntries, buildCanvasContextMenuEntries, buildLayoutPreviewGeometry, scaleSlidesForSizeChange, slideSizeToCanvasPx, resolveSelectionPaneRename, themeEditorLabels, 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, customizeBackstageCards, backstageCardsFor, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, resolveDefaultFontFamily, textFontSizePxToPt, buildFontCatalog, COMMON_FONT_SIZES, RIBBON_CONTROL_ATTR, FREEFORM_TOOL_IDS, isDrawingToolVisible, FREEFORM_TOOL_LABEL_KEYS, getSelectionTextStyleFlags, getInlineEditorSelectionResult, selectedParagraphBulletKind, elementBulletKind, selectionBulletKind, TEXT_DECORATION_FLAGS, nextToggleValue, CHARACTER_SPACING_OPTIONS, OFFICE_COLOR_SWATCHES, RIBBON_GROUP_ATTR, RIBBON_SHAPE_SWATCHES, buildRibbonGallery, galleryHasItems, inlineGalleryItems, canGroupSelection, canUngroupSelection, canSetStrokeWidth, strokeWidthOf, readRibbonTransitionDraft, ribbonTransitionUpdates, playSlideTransitionPreview, RIBBON_TRANSITION_PRESETS, transitionSoundOptions, transitionSoundSelectedValue, DEFAULT_MOTION_PATH_PRESET_ID, SLIDE_SHOW_COMMAND_GROUPS, RECORD_COMMAND_GROUPS, HELP_RIBBON_COMMANDS, masterViewPseudoSlide, PRESENTATION_ANIM_TRIGGER_ATTRIBUTE, motionPathFor, setMotionPath, getShapeAdjustmentHandleDescriptors, shouldShowElementHandles, clampFlyoutPosition, computeAnchoredPopupPosition, applyTableStyleDelete, applyTableStyleMapChange, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, SLIDE_TEMPLATES, buildThemeColorSwatchGrid, themeColorSwatchRows, findSelectedThemeSwatch, themeSwatchCommit, RIBBON_GALLERY_POPUP_ATTR, applyRibbonGalleryItem, galleryItemLabel, RIBBON_GALLERY_ITEM_ATTR, RIBBON_GALLERY_ATTR, MERGE_SHAPES_LABEL_KEY, MERGE_SHAPES_HINT_KEY, MERGE_SHAPES_MENU_ITEMS, CROP_LABEL_KEY, CROP_ASPECT_LABEL_KEY, CROP_ASPECT_GROUP_LABEL_KEYS, CROP_ASPECT_PRESETS, CROP_FILL_LABEL_KEY, CROP_FIT_LABEL_KEY, 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, SLIDE_SHOW_OPTIONS, createViewerOptionsStore, subtitleSettingsLabels, attachEditorImagePaste, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, resolveElementInteractivity, getElementTransformWithoutRotation, getElementTransform, 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, hasMultipleSelectedTableCells, isElementLocked, isImageLikeElement, mergeSlideTransition, getElementLabel, effectiveDirection, TRIGGER_OPTIONS, effectiveTimingCurve, 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, 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, THEME_COLOR_SCHEME_KEYS, 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, setTrigger, setTriggerBookmark, getEffectSoundState, setEffectSound, setEffectStockSound, setAfterAnimation, setAfterAnimationColor, directionValuesFor, buildAnimationTimelineBars, motionPathPresetIdForPath, EFFECT_SOUND_CATALOGUE, listMediaBookmarkOptions, selectedBookmarkOptionValue, hasTiltData, toElementAxes, dragCropHandle, panCropImage, clientToSlidePoint, EDIT_POINTS_TARGET_ATTR, 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, overlayPointerInput, 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, cropFit, cropFill, cropToAspectRatio } from './chunk-MJ6LTUJ3.mjs';
|
|
5
5
|
import { LOCALE_CATALOG, ALIGNMENT_LABEL_KEYS } from './chunk-CJSIEITL.mjs';
|
|
6
|
-
import React6, { createContext, lazy, forwardRef, useEffect, useState, useCallback, useMemo, useRef, useLayoutEffect, useSyncExternalStore, useId, useContext, Fragment as Fragment$1,
|
|
6
|
+
import React6, { createContext, lazy, forwardRef, useEffect, useState, useCallback, useMemo, useRef, useLayoutEffect, useSyncExternalStore, useId, useContext, useDeferredValue, Fragment as Fragment$1, Suspense, useReducer } from 'react';
|
|
7
7
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
import { LuArrowDown, LuArrowUp, LuArrowRight, LuArrowLeft, LuArrowDownRight, LuArrowDownLeft, LuArrowUpRight, LuArrowUpLeft, LuMessageSquare, LuEyeOff, LuHistory, LuTrash2, LuSettings, LuX, LuCalendarDays, LuClock, LuHash, LuFileText, LuText, LuCast, LuSave, LuUndo, LuRedo, LuSearch, LuShieldCheck, LuPlus, LuPanelLeftClose, LuStickyNote, LuMonitor, LuColumns2, LuPresentation, LuMinus, LuSettings2, LuLayers, LuDownload, LuCheck, LuLock, LuEye, LuType, LuLoader, LuShieldAlert, LuSignature, LuInfo, LuTriangleAlert, LuPrinter, LuPenTool, LuBug, LuChevronUp, LuChevronDown, LuUpload, LuWifi, LuWifiOff, LuUsers, LuCopy, LuChevronLeft, LuChevronRight, LuPlay, LuPause, LuZoomOut, LuZoomIn, LuSpellCheck, LuFileDown, LuMenu, LuSparkles, LuShare2, LuPanelLeft, LuPanelRight, LuFolderOpen, LuSquare, LuImage, LuVideo, LuDatabase, LuAArrowUp, LuAArrowDown, LuRemoveFormatting, LuReplace, LuMousePointer2, LuShapes, LuPaintBucket, LuPenLine, LuPalette, LuPaintbrush, LuPencil, LuCaseSensitive, LuTimer, LuHighlighter, LuEraser, LuGripVertical, LuLoaderCircle, LuBold, LuItalic, LuUnderline, LuStrikethrough, LuList, LuListOrdered, LuIndentIncrease, LuIndentDecrease, LuLink, LuGrid2X2, LuClipboardPaste, LuCopyPlus, LuScan, LuRotateCcw, LuMonitorOff, LuCirclePlay, LuCirclePause, LuCaptions, LuArrowLeftRight, LuClipboardCopy, LuLayoutGrid, LuWand, LuTextCursorInput, LuFile, LuEllipsis, LuUserRound, LuFilePlus2, LuHouse, LuFileJson, LuBox, LuFileImage, LuClock3, LuUser, LuHardDrive, LuLogIn, LuScissors, LuLayoutTemplate, LuFolderPlus, LuSpline, LuMoveRight, LuAlignLeft, LuAlignCenter, LuAlignRight, LuAlignHorizontalSpaceAround, LuAlignVerticalSpaceAround, LuGroup, LuUngroup, LuStar, LuMousePointerClick, LuBookOpen, LuLanguages, LuGlobe, LuGitCompare, LuMessageSquarePlus, LuLockKeyhole, LuPanelTop, LuGrid3X3, LuPipette, LuRuler, LuMaximize2, LuCode, LuMove, LuRadio, LuAlignJustify, LuColumns3, LuCombine, LuCrop, LuFilter, LuLockOpen, LuReply, LuRotateCw, LuBookmark } from 'react-icons/lu';
|
|
@@ -1101,6 +1101,7 @@ function CropRibbonControls({ canEdit }) {
|
|
|
1101
1101
|
"button",
|
|
1102
1102
|
{
|
|
1103
1103
|
type: "button",
|
|
1104
|
+
"data-pptx-chrome": "crop-main",
|
|
1104
1105
|
"data-pptx-ribbon-control": "crop",
|
|
1105
1106
|
"aria-label": label,
|
|
1106
1107
|
"aria-pressed": active,
|
|
@@ -1116,6 +1117,7 @@ function CropRibbonControls({ canEdit }) {
|
|
|
1116
1117
|
"button",
|
|
1117
1118
|
{
|
|
1118
1119
|
type: "button",
|
|
1120
|
+
"data-pptx-chrome": "crop-caret",
|
|
1119
1121
|
"data-pptx-ribbon-control": "crop-menu",
|
|
1120
1122
|
"aria-label": t(CROP_ASPECT_LABEL_KEY),
|
|
1121
1123
|
"aria-haspopup": "menu",
|
|
@@ -1291,7 +1293,7 @@ function ArrangeSection(p) {
|
|
|
1291
1293
|
const hasSel = Boolean(p.selectedElement);
|
|
1292
1294
|
const canMut = hasSel && p.canEdit;
|
|
1293
1295
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-0.5", ...groupAttr("home.arrange"), children: [
|
|
1294
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
1296
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", "data-pptx-chrome": "arrange-controls", children: [
|
|
1295
1297
|
/* @__PURE__ */ jsx("div", { className: grp, ...controlAttr("home.arrange.align"), children: ALIGN_BTNS.map((a, i, arr) => /* @__PURE__ */ jsx(
|
|
1296
1298
|
"button",
|
|
1297
1299
|
{
|
|
@@ -1375,7 +1377,7 @@ function ArrangeSection(p) {
|
|
|
1375
1377
|
hiddenActions: p.hiddenActions
|
|
1376
1378
|
}
|
|
1377
1379
|
),
|
|
1378
|
-
/* @__PURE__ */ jsxs("div", { className: grp, children: [
|
|
1380
|
+
/* @__PURE__ */ jsxs("div", { className: grp, "data-pptx-chrome": "order-controls", children: [
|
|
1379
1381
|
/* @__PURE__ */ jsx(
|
|
1380
1382
|
"button",
|
|
1381
1383
|
{
|
|
@@ -1612,6 +1614,7 @@ function RibbonGallery({
|
|
|
1612
1614
|
"button",
|
|
1613
1615
|
{
|
|
1614
1616
|
type: "button",
|
|
1617
|
+
"data-pptx-chrome": chevronOnly ? "gallery-caret" : void 0,
|
|
1615
1618
|
...galleryAttrs,
|
|
1616
1619
|
"aria-haspopup": "true",
|
|
1617
1620
|
"aria-expanded": open,
|
|
@@ -2222,7 +2225,7 @@ function AccountPage() {
|
|
|
2222
2225
|
return void 0;
|
|
2223
2226
|
});
|
|
2224
2227
|
};
|
|
2225
|
-
const version = "4.
|
|
2228
|
+
const version = "4.15.0" ;
|
|
2226
2229
|
return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
2227
2230
|
/* @__PURE__ */ jsxs("section", { className: cardClass, children: [
|
|
2228
2231
|
/* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -2695,42 +2698,50 @@ function ClipboardGroup(p) {
|
|
|
2695
2698
|
/* @__PURE__ */ jsx("span", { className: "text-[9px] text-muted-foreground leading-none", children: t("pptx.ribbon.clipboard") })
|
|
2696
2699
|
] });
|
|
2697
2700
|
}
|
|
2698
|
-
function
|
|
2701
|
+
function FontPickers(p) {
|
|
2699
2702
|
const { t } = useTranslation();
|
|
2700
|
-
const groups = buildFontCatalog(
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
})
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2703
|
+
const groups = buildFontCatalog(p);
|
|
2704
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-0.5", "data-ribbon-group": "home.font", children: [
|
|
2705
|
+
/* @__PURE__ */ jsxs("div", { "data-pptx-chrome": "font-picker-controls", children: [
|
|
2706
|
+
/* @__PURE__ */ jsx(
|
|
2707
|
+
WebSelect,
|
|
2708
|
+
{
|
|
2709
|
+
variant: "ribbon-font",
|
|
2710
|
+
"data-font-picker": "family",
|
|
2711
|
+
"data-ribbon-control": "home.font.fontFamily",
|
|
2712
|
+
"aria-label": t("pptx.ribbon.fontFamily"),
|
|
2713
|
+
value: p.fontFamily,
|
|
2714
|
+
disabled: !p.enabled,
|
|
2715
|
+
onChange: (e) => p.onFamily(e.target.value),
|
|
2716
|
+
children: groups.map((group) => /* @__PURE__ */ jsx("optgroup", { label: t(group.labelKey), children: group.entries.map((entry) => /* @__PURE__ */ jsx(
|
|
2717
|
+
"option",
|
|
2718
|
+
{
|
|
2719
|
+
value: entry.family,
|
|
2720
|
+
style: { fontFamily: entry.family },
|
|
2721
|
+
"data-display-label": entry.family,
|
|
2722
|
+
"data-description": entry.themeRole ? t(`pptx.font.role.${entry.themeRole}`) : void 0,
|
|
2723
|
+
children: entry.family
|
|
2724
|
+
},
|
|
2725
|
+
entry.family
|
|
2726
|
+
)) }, group.id))
|
|
2727
|
+
}
|
|
2728
|
+
),
|
|
2729
|
+
/* @__PURE__ */ jsx(
|
|
2730
|
+
WebSelect,
|
|
2731
|
+
{
|
|
2732
|
+
variant: "ribbon-font",
|
|
2733
|
+
"data-font-picker": "size",
|
|
2734
|
+
"data-ribbon-control": "home.font.fontSize",
|
|
2735
|
+
"aria-label": t("pptx.ribbon.fontSize"),
|
|
2736
|
+
value: p.fontSize,
|
|
2737
|
+
disabled: !p.enabled,
|
|
2738
|
+
onChange: (e) => p.onSize(Number(e.target.value)),
|
|
2739
|
+
children: COMMON_FONT_SIZES.map((size) => /* @__PURE__ */ jsx("option", { value: size, children: size }, size))
|
|
2740
|
+
}
|
|
2741
|
+
)
|
|
2742
|
+
] }),
|
|
2743
|
+
/* @__PURE__ */ jsx("span", { "data-pptx-chrome": "ribbon-group-label", children: t("pptx.ribbon.font") })
|
|
2744
|
+
] });
|
|
2734
2745
|
}
|
|
2735
2746
|
function useLayoutPreviews(loadPreviews, enabled) {
|
|
2736
2747
|
const [previews, setPreviews] = useState(/* @__PURE__ */ new Map());
|
|
@@ -2889,17 +2900,19 @@ function SlidesGroup(p) {
|
|
|
2889
2900
|
}, [layoutMenuOpen]);
|
|
2890
2901
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2891
2902
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-0.5", ...groupAttr("home.slides"), children: [
|
|
2892
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
2903
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", "data-pptx-chrome": "slides-controls", children: [
|
|
2893
2904
|
/* @__PURE__ */ jsxs(
|
|
2894
2905
|
"div",
|
|
2895
2906
|
{
|
|
2896
2907
|
className: "relative inline-flex items-center",
|
|
2897
2908
|
ref: newSlideMenuRef,
|
|
2898
2909
|
...controlAttr("home.slides.newSlide"),
|
|
2910
|
+
"data-pptx-chrome": "split-button",
|
|
2899
2911
|
children: [
|
|
2900
2912
|
/* @__PURE__ */ jsxs(
|
|
2901
2913
|
"button",
|
|
2902
2914
|
{
|
|
2915
|
+
"data-pptx-chrome": "split-main",
|
|
2903
2916
|
type: "button",
|
|
2904
2917
|
onClick: handleNewSlide,
|
|
2905
2918
|
disabled: !p.canEdit || p.layoutOptions.length === 0,
|
|
@@ -2918,6 +2931,7 @@ function SlidesGroup(p) {
|
|
|
2918
2931
|
p.layoutOptions.length > 0 && /* @__PURE__ */ jsx(
|
|
2919
2932
|
"button",
|
|
2920
2933
|
{
|
|
2934
|
+
"data-pptx-chrome": "split-caret",
|
|
2921
2935
|
type: "button",
|
|
2922
2936
|
disabled: !p.canEdit,
|
|
2923
2937
|
className: "inline-flex items-center justify-center self-stretch px-1 rounded-r bg-muted hover:bg-accent text-xs transition-colors border-l border-border/40 active:scale-95 active:opacity-80",
|
|
@@ -3057,46 +3071,11 @@ function extractFontInfo(element, themeFonts) {
|
|
|
3057
3071
|
};
|
|
3058
3072
|
}
|
|
3059
3073
|
function HomeSection(p) {
|
|
3060
|
-
const { t } = useTranslation();
|
|
3061
|
-
const [fontMenuOpen, setFontMenuOpen] = useState(false);
|
|
3062
|
-
const [sizeMenuOpen, setSizeMenuOpen] = useState(false);
|
|
3063
|
-
const fontMenuRef = useRef(null);
|
|
3064
|
-
const sizeMenuRef = useRef(null);
|
|
3065
3074
|
const { fontFamily, fontSize } = extractFontInfo(p.selectedElement, p.themeFonts);
|
|
3066
3075
|
const hasSelection = Boolean(p.selectedElement);
|
|
3067
3076
|
const canFormat = p.canEdit && Boolean(p.onUpdateTextStyle) && Boolean(
|
|
3068
3077
|
p.selectedElement && (hasTextProperties(p.selectedElement) || p.selectedElement.type === "table" && p.tableEditorState)
|
|
3069
3078
|
);
|
|
3070
|
-
useEffect(() => {
|
|
3071
|
-
if (!canFormat) {
|
|
3072
|
-
setFontMenuOpen(false);
|
|
3073
|
-
setSizeMenuOpen(false);
|
|
3074
|
-
}
|
|
3075
|
-
}, [canFormat]);
|
|
3076
|
-
useEffect(() => {
|
|
3077
|
-
if (!fontMenuOpen) {
|
|
3078
|
-
return;
|
|
3079
|
-
}
|
|
3080
|
-
const handler = (e) => {
|
|
3081
|
-
if (fontMenuRef.current && !fontMenuRef.current.contains(e.target)) {
|
|
3082
|
-
setFontMenuOpen(false);
|
|
3083
|
-
}
|
|
3084
|
-
};
|
|
3085
|
-
document.addEventListener("mousedown", handler);
|
|
3086
|
-
return () => document.removeEventListener("mousedown", handler);
|
|
3087
|
-
}, [fontMenuOpen]);
|
|
3088
|
-
useEffect(() => {
|
|
3089
|
-
if (!sizeMenuOpen) {
|
|
3090
|
-
return;
|
|
3091
|
-
}
|
|
3092
|
-
const handler = (e) => {
|
|
3093
|
-
if (sizeMenuRef.current && !sizeMenuRef.current.contains(e.target)) {
|
|
3094
|
-
setSizeMenuOpen(false);
|
|
3095
|
-
}
|
|
3096
|
-
};
|
|
3097
|
-
document.addEventListener("mousedown", handler);
|
|
3098
|
-
return () => document.removeEventListener("mousedown", handler);
|
|
3099
|
-
}, [sizeMenuOpen]);
|
|
3100
3079
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3101
3080
|
/* @__PURE__ */ jsx(
|
|
3102
3081
|
ClipboardGroup,
|
|
@@ -3128,71 +3107,21 @@ function HomeSection(p) {
|
|
|
3128
3107
|
onAddSection: p.onAddSection
|
|
3129
3108
|
}
|
|
3130
3109
|
),
|
|
3131
|
-
/* @__PURE__ */
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
}
|
|
3147
|
-
),
|
|
3148
|
-
fontMenuOpen && canFormat && /* @__PURE__ */ jsx(
|
|
3149
|
-
FontFamilyMenu,
|
|
3150
|
-
{
|
|
3151
|
-
anchorRef: fontMenuRef,
|
|
3152
|
-
themeFonts: p.themeFonts,
|
|
3153
|
-
embeddedFonts: p.embeddedFontFamilies,
|
|
3154
|
-
customFonts: p.customFontFamilies,
|
|
3155
|
-
onSelect: (family) => {
|
|
3156
|
-
p.onUpdateTextStyle?.({ fontFamily: family });
|
|
3157
|
-
setFontMenuOpen(false);
|
|
3158
|
-
}
|
|
3159
|
-
}
|
|
3160
|
-
)
|
|
3161
|
-
] }),
|
|
3162
|
-
/* @__PURE__ */ jsxs("div", { className: "relative", ref: sizeMenuRef, ...controlAttr("home.font.fontSize"), children: [
|
|
3163
|
-
/* @__PURE__ */ jsxs(
|
|
3164
|
-
"button",
|
|
3165
|
-
{
|
|
3166
|
-
type: "button",
|
|
3167
|
-
onClick: () => setSizeMenuOpen((v) => !v),
|
|
3168
|
-
disabled: !canFormat,
|
|
3169
|
-
"aria-label": t("pptx.ribbon.fontSize"),
|
|
3170
|
-
className: "inline-flex items-center justify-between px-2 py-1 rounded-sm border border-border/60 bg-background/60 text-[11px] text-foreground min-w-[50px] text-center enabled:hover:bg-accent/40 transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed",
|
|
3171
|
-
children: [
|
|
3172
|
-
/* @__PURE__ */ jsx("span", { className: "truncate", children: fontSize }),
|
|
3173
|
-
/* @__PURE__ */ jsx(LuChevronDown, { className: "w-3 h-3 ml-1 shrink-0 text-muted-foreground" })
|
|
3174
|
-
]
|
|
3175
|
-
}
|
|
3176
|
-
),
|
|
3177
|
-
sizeMenuOpen && canFormat && /* @__PURE__ */ jsx(RibbonMenu, { anchorRef: sizeMenuRef, className: "flex flex-col w-48 pt-1", children: /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-border bg-popover backdrop-blur-lg shadow-2xl py-1 max-h-60 overflow-y-auto", children: COMMON_FONT_SIZES.map((s) => /* @__PURE__ */ jsx(
|
|
3178
|
-
"button",
|
|
3179
|
-
{
|
|
3180
|
-
type: "button",
|
|
3181
|
-
className: "flex items-center gap-2 w-full px-3 py-1.5 text-xs text-foreground hover:bg-muted transition-colors",
|
|
3182
|
-
onClick: () => {
|
|
3183
|
-
p.onUpdateTextStyle?.({
|
|
3184
|
-
fontSize: p.selectedElement && hasTextProperties(p.selectedElement) ? textFontSizePtToPx(s) : s
|
|
3185
|
-
});
|
|
3186
|
-
setSizeMenuOpen(false);
|
|
3187
|
-
},
|
|
3188
|
-
children: s
|
|
3189
|
-
},
|
|
3190
|
-
s
|
|
3191
|
-
)) }) })
|
|
3192
|
-
] })
|
|
3193
|
-
] }),
|
|
3194
|
-
/* @__PURE__ */ jsx("span", { className: "text-[9px] text-muted-foreground leading-none", children: t("pptx.ribbon.font") })
|
|
3195
|
-
] }),
|
|
3110
|
+
/* @__PURE__ */ jsx(
|
|
3111
|
+
FontPickers,
|
|
3112
|
+
{
|
|
3113
|
+
enabled: canFormat,
|
|
3114
|
+
fontFamily,
|
|
3115
|
+
fontSize,
|
|
3116
|
+
themeFonts: p.themeFonts,
|
|
3117
|
+
embeddedFonts: p.embeddedFontFamilies,
|
|
3118
|
+
customFonts: p.customFontFamilies,
|
|
3119
|
+
onFamily: (family) => p.onUpdateTextStyle?.({ fontFamily: family }),
|
|
3120
|
+
onSize: (size) => p.onUpdateTextStyle?.({
|
|
3121
|
+
fontSize: p.selectedElement && hasTextProperties(p.selectedElement) ? textFontSizePtToPx(size) : size
|
|
3122
|
+
})
|
|
3123
|
+
}
|
|
3124
|
+
),
|
|
3196
3125
|
sep
|
|
3197
3126
|
] });
|
|
3198
3127
|
}
|
|
@@ -5019,8 +4948,8 @@ function TextSection(p) {
|
|
|
5019
4948
|
);
|
|
5020
4949
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5021
4950
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-0.5", ...groupAttr("home.font"), children: [
|
|
5022
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
5023
|
-
/* @__PURE__ */ jsx("div", { className: grp, children: FMT.map((b, i, a) => {
|
|
4951
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", "data-pptx-chrome": "font-controls", children: [
|
|
4952
|
+
/* @__PURE__ */ jsx("div", { className: grp, "data-pptx-chrome": "control-cluster", children: FMT.map((b, i, a) => {
|
|
5024
4953
|
const flag = isTextDecorationFlag(b.id) ? b.id : void 0;
|
|
5025
4954
|
const handleClick = () => {
|
|
5026
4955
|
if (!canFormat || !p.selectedElement || !flag) {
|
|
@@ -5105,7 +5034,7 @@ function TextSection(p) {
|
|
|
5105
5034
|
)
|
|
5106
5035
|
}
|
|
5107
5036
|
),
|
|
5108
|
-
/* @__PURE__ */ jsxs("div", { className: grp, children: [
|
|
5037
|
+
/* @__PURE__ */ jsxs("div", { className: grp, "data-pptx-chrome": "control-cluster", children: [
|
|
5109
5038
|
/* @__PURE__ */ jsx(
|
|
5110
5039
|
"button",
|
|
5111
5040
|
{
|
|
@@ -5537,25 +5466,34 @@ function MobileMenuSheet(props) {
|
|
|
5537
5466
|
const { open, onClose } = props;
|
|
5538
5467
|
const [active, setActive] = useState("home");
|
|
5539
5468
|
const { isTabVisible } = useToolbarVisibility(props.hiddenActions);
|
|
5540
|
-
return /* @__PURE__ */ jsx(
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5469
|
+
return /* @__PURE__ */ jsx(
|
|
5470
|
+
MobileSheet,
|
|
5471
|
+
{
|
|
5472
|
+
open: open && !props.isThemeEditorOpen,
|
|
5473
|
+
onClose,
|
|
5474
|
+
autoHeight: true,
|
|
5475
|
+
title: t("pptx.mobileToolbar.menu"),
|
|
5476
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
5477
|
+
/* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 bg-background border-b border-border", children: /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5 px-3 py-2", children: MENU_ITEMS.filter(({ key }) => isTabVisible(key)).map(({ key, label, icon: Icon }) => /* @__PURE__ */ jsxs(
|
|
5478
|
+
"button",
|
|
5479
|
+
{
|
|
5480
|
+
type: "button",
|
|
5481
|
+
onClick: () => setActive(active === key ? null : key),
|
|
5482
|
+
className: cn(
|
|
5483
|
+
"inline-flex items-center gap-1.5 shrink-0 px-3 py-2 rounded-full text-[12px] font-medium border transition-colors min-h-[36px]",
|
|
5484
|
+
active === key ? "bg-primary text-white border-primary" : "border-border text-muted-foreground hover:text-foreground hover:bg-accent/40"
|
|
5485
|
+
),
|
|
5486
|
+
children: [
|
|
5487
|
+
/* @__PURE__ */ jsx(Icon, { className: "w-4 h-4" }),
|
|
5488
|
+
t(label)
|
|
5489
|
+
]
|
|
5490
|
+
},
|
|
5491
|
+
key
|
|
5492
|
+
)) }) }),
|
|
5493
|
+
/* @__PURE__ */ jsx("div", { className: "p-3", children: /* @__PURE__ */ jsx(MobileSectionBody, { active, ...props }) })
|
|
5494
|
+
] })
|
|
5495
|
+
}
|
|
5496
|
+
);
|
|
5559
5497
|
}
|
|
5560
5498
|
function MobileSectionBody({
|
|
5561
5499
|
active,
|
|
@@ -6000,7 +5938,7 @@ function DrawingGroup(p) {
|
|
|
6000
5938
|
const setArrangeOpen = arrange.setOpen;
|
|
6001
5939
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6002
5940
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-0.5", ...groupAttr("home.drawing"), children: [
|
|
6003
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
5941
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", "data-pptx-chrome": "drawing-controls", children: [
|
|
6004
5942
|
/* @__PURE__ */ jsxs("div", { className: "relative", ref: shapes.ref, ...controlAttr("home.drawing.shapes"), children: [
|
|
6005
5943
|
/* @__PURE__ */ jsxs(
|
|
6006
5944
|
"button",
|
|
@@ -6245,6 +6183,7 @@ function RibbonTabBar(p) {
|
|
|
6245
6183
|
"div",
|
|
6246
6184
|
{
|
|
6247
6185
|
role: "tablist",
|
|
6186
|
+
"data-pptx-chrome": "ribbon-tabs",
|
|
6248
6187
|
className: "flex items-center border-b border-border/60 px-1 max-md:overflow-x-auto max-md:scrollbar-none",
|
|
6249
6188
|
children: [
|
|
6250
6189
|
TOOLBAR_SECTIONS.filter((s) => p.isTabVisible(s.id)).map((s) => {
|
|
@@ -6661,131 +6600,138 @@ function ToolbarPrimaryRow(p) {
|
|
|
6661
6600
|
const showShare = isDialogAvailable(customization, "share");
|
|
6662
6601
|
const showSettings = isDialogAvailable(customization, "options");
|
|
6663
6602
|
const qab = "p-1 max-md:p-2 max-md:min-h-[40px] max-md:min-w-[40px] rounded-sm transition-colors hover:bg-accent/60 disabled:opacity-40 disabled:cursor-not-allowed active:scale-90 active:opacity-70";
|
|
6664
|
-
return /* @__PURE__ */ jsxs(
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
type: "button",
|
|
6681
|
-
onClick: p.onToggleComments,
|
|
6682
|
-
className: cn(
|
|
6683
|
-
qab,
|
|
6684
|
-
"relative max-md:hidden",
|
|
6685
|
-
p.isCommentsPanelOpen ? "text-foreground" : "text-muted-foreground"
|
|
6603
|
+
return /* @__PURE__ */ jsxs(
|
|
6604
|
+
"div",
|
|
6605
|
+
{
|
|
6606
|
+
"data-pptx-chrome": "ribbon-primary",
|
|
6607
|
+
className: "flex items-center gap-0.5 max-md:gap-0 px-1.5 py-0.5 max-md:px-1",
|
|
6608
|
+
children: [
|
|
6609
|
+
mode !== "present" && showSlidesToggle && /* @__PURE__ */ jsx(
|
|
6610
|
+
"button",
|
|
6611
|
+
{
|
|
6612
|
+
type: "button",
|
|
6613
|
+
onClick: onToggleSidebar,
|
|
6614
|
+
className: cn(qab, !isSidebarCollapsed ? "text-foreground" : "text-muted-foreground"),
|
|
6615
|
+
title: t("pptx.toolbar.toggleSlidesPanel"),
|
|
6616
|
+
"aria-label": t("pptx.toolbar.toggleSlidesPanel"),
|
|
6617
|
+
children: /* @__PURE__ */ jsx(LuPanelLeft, { className: ic })
|
|
6618
|
+
}
|
|
6686
6619
|
),
|
|
6687
|
-
|
|
6688
|
-
"
|
|
6689
|
-
|
|
6690
|
-
/* @__PURE__ */ jsx(LuMessageSquare, { className: ics }),
|
|
6691
|
-
(p.slideCommentCount ?? 0) > 0 && /* @__PURE__ */ jsx("span", { className: "absolute -top-0.5 -right-0.5 flex items-center justify-center w-3.5 h-3.5 rounded-full bg-primary text-[8px] text-white leading-none", children: p.slideCommentCount })
|
|
6692
|
-
]
|
|
6693
|
-
}
|
|
6694
|
-
),
|
|
6695
|
-
collab && showShare && (collab.status === "connected" || collab.status === "connecting") && collab.remoteUsers.length > 0 && /* @__PURE__ */ jsx(
|
|
6696
|
-
"button",
|
|
6697
|
-
{
|
|
6698
|
-
type: "button",
|
|
6699
|
-
onClick: p.onOpenShareDialog,
|
|
6700
|
-
className: "mx-1 rounded-sm px-1 py-0.5 hover:bg-accent/60 transition-colors cursor-pointer",
|
|
6701
|
-
title: t("pptx.toolbar.sharingUsers", { count: collab.connectedCount }),
|
|
6702
|
-
children: /* @__PURE__ */ jsx(
|
|
6703
|
-
UserAvatarBar,
|
|
6620
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 min-w-2 max-md:min-w-1" }),
|
|
6621
|
+
(mode === "edit" || mode === "master") && showComments && /* @__PURE__ */ jsxs(
|
|
6622
|
+
"button",
|
|
6704
6623
|
{
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6624
|
+
type: "button",
|
|
6625
|
+
onClick: p.onToggleComments,
|
|
6626
|
+
className: cn(
|
|
6627
|
+
qab,
|
|
6628
|
+
"relative max-md:hidden",
|
|
6629
|
+
p.isCommentsPanelOpen ? "text-foreground" : "text-muted-foreground"
|
|
6630
|
+
),
|
|
6631
|
+
title: t("pptx.toolbar.comments"),
|
|
6632
|
+
"aria-label": t("pptx.toolbar.comments"),
|
|
6633
|
+
children: [
|
|
6634
|
+
/* @__PURE__ */ jsx(LuMessageSquare, { className: ics }),
|
|
6635
|
+
(p.slideCommentCount ?? 0) > 0 && /* @__PURE__ */ jsx("span", { className: "absolute -top-0.5 -right-0.5 flex items-center justify-center w-3.5 h-3.5 rounded-full bg-primary text-[8px] text-white leading-none", children: p.slideCommentCount })
|
|
6636
|
+
]
|
|
6710
6637
|
}
|
|
6711
|
-
)
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6638
|
+
),
|
|
6639
|
+
collab && showShare && (collab.status === "connected" || collab.status === "connecting") && collab.remoteUsers.length > 0 && /* @__PURE__ */ jsx(
|
|
6640
|
+
"button",
|
|
6641
|
+
{
|
|
6642
|
+
type: "button",
|
|
6643
|
+
onClick: p.onOpenShareDialog,
|
|
6644
|
+
className: "mx-1 rounded-sm px-1 py-0.5 hover:bg-accent/60 transition-colors cursor-pointer",
|
|
6645
|
+
title: t("pptx.toolbar.sharingUsers", { count: collab.connectedCount }),
|
|
6646
|
+
children: /* @__PURE__ */ jsx(
|
|
6647
|
+
UserAvatarBar,
|
|
6648
|
+
{
|
|
6649
|
+
remoteUsers: collab.remoteUsers,
|
|
6650
|
+
localUserName: collab.config.userName,
|
|
6651
|
+
localUserColor: collab.config.userColor ?? "#6366f1",
|
|
6652
|
+
localUserAvatar: collab.config.userAvatar,
|
|
6653
|
+
status: collab.status
|
|
6654
|
+
}
|
|
6655
|
+
)
|
|
6656
|
+
}
|
|
6657
|
+
),
|
|
6658
|
+
/* @__PURE__ */ jsx(
|
|
6659
|
+
ModeSwitcher,
|
|
6660
|
+
{
|
|
6661
|
+
mode: p.mode,
|
|
6662
|
+
onSetMode: p.onSetMode,
|
|
6663
|
+
onCloseMasterView: p.onCloseMasterView,
|
|
6664
|
+
onToggleSlideSorter: p.onToggleSlideSorter,
|
|
6665
|
+
onEnterPresenterView: p.onEnterPresenterView,
|
|
6666
|
+
onEnterRehearsalMode: p.onEnterRehearsalMode,
|
|
6667
|
+
onOpenSetUpSlideShow: p.onOpenSetUpSlideShow,
|
|
6668
|
+
onOpenBroadcastDialog: p.onOpenBroadcastDialog,
|
|
6669
|
+
onToggleSubtitles: p.onToggleSubtitles,
|
|
6670
|
+
showSubtitles: p.showSubtitles
|
|
6671
|
+
}
|
|
6672
|
+
),
|
|
6673
|
+
/* @__PURE__ */ jsx(
|
|
6674
|
+
CustomShowsControls,
|
|
6675
|
+
{
|
|
6676
|
+
customShows: p.customShows,
|
|
6677
|
+
activeCustomShowId: p.activeCustomShowId,
|
|
6678
|
+
canEdit: p.canEdit,
|
|
6679
|
+
isCurrentSlideInActiveShow: p.isCurrentSlideInActiveShow,
|
|
6680
|
+
onSetActiveCustomShowId: p.onSetActiveCustomShowId,
|
|
6681
|
+
onCreateCustomShow: p.onCreateCustomShow,
|
|
6682
|
+
onRenameActiveCustomShow: p.onRenameActiveCustomShow,
|
|
6683
|
+
onDeleteActiveCustomShow: p.onDeleteActiveCustomShow,
|
|
6684
|
+
onToggleCurrentSlideInActiveShow: p.onToggleCurrentSlideInActiveShow
|
|
6685
|
+
}
|
|
6686
|
+
),
|
|
6687
|
+
sep,
|
|
6688
|
+
(mode === "edit" || mode === "master") && showInspectorToggle && /* @__PURE__ */ jsx(
|
|
6689
|
+
"button",
|
|
6690
|
+
{
|
|
6691
|
+
type: "button",
|
|
6692
|
+
onClick: onToggleInspector,
|
|
6693
|
+
className: cn(qab, isInspectorPaneOpen ? "text-foreground" : "text-muted-foreground"),
|
|
6694
|
+
title: t("pptx.toolbar.toggleInspector"),
|
|
6695
|
+
"aria-label": t("pptx.toolbar.toggleInspector"),
|
|
6696
|
+
children: /* @__PURE__ */ jsx(LuPanelRight, { className: ic })
|
|
6697
|
+
}
|
|
6698
|
+
),
|
|
6699
|
+
p.aiEnabled && (mode === "edit" || mode === "master") && /* @__PURE__ */ jsx(
|
|
6700
|
+
"button",
|
|
6701
|
+
{
|
|
6702
|
+
type: "button",
|
|
6703
|
+
onClick: p.onToggleAiPanel,
|
|
6704
|
+
className: cn(qab, p.isAiPanelOpen ? "text-primary" : "text-muted-foreground"),
|
|
6705
|
+
title: t("pptx.toolbar.toggleAiAssistant"),
|
|
6706
|
+
"aria-label": t("pptx.toolbar.toggleAiAssistant"),
|
|
6707
|
+
children: /* @__PURE__ */ jsx(LuSparkles, { className: ic })
|
|
6708
|
+
}
|
|
6709
|
+
),
|
|
6710
|
+
showSettings && /* @__PURE__ */ jsx(
|
|
6711
|
+
"button",
|
|
6712
|
+
{
|
|
6713
|
+
type: "button",
|
|
6714
|
+
onClick: p.onOpenSettings ?? p.onToggleShortcuts,
|
|
6715
|
+
className: cn(qab, "text-muted-foreground"),
|
|
6716
|
+
title: t("pptx.toolbar.settingsShortcuts"),
|
|
6717
|
+
"aria-label": t("pptx.toolbar.settings"),
|
|
6718
|
+
children: /* @__PURE__ */ jsx(LuSettings, { className: ics })
|
|
6719
|
+
}
|
|
6720
|
+
),
|
|
6721
|
+
!canEdit && p.isProtectedView && p.onEnableEditing ? /* @__PURE__ */ jsx(
|
|
6722
|
+
"button",
|
|
6723
|
+
{
|
|
6724
|
+
type: "button",
|
|
6725
|
+
onClick: p.onEnableEditing,
|
|
6726
|
+
className: "inline-flex items-center px-2 py-0.5 rounded-sm bg-amber-600/90 text-[10px] text-amber-50 transition-colors hover:bg-amber-600",
|
|
6727
|
+
title: t("pptx.options.trust.protectedViewInfo"),
|
|
6728
|
+
children: t("pptx.security.enableEditing")
|
|
6729
|
+
}
|
|
6730
|
+
) : !canEdit && /* @__PURE__ */ jsx("span", { className: "inline-flex items-center px-2 py-0.5 rounded-sm bg-amber-600/90 text-[10px] text-amber-50", children: t("pptx.toolbar.readOnly") }),
|
|
6731
|
+
/* @__PURE__ */ jsx(OverflowMenu, { ...p })
|
|
6732
|
+
]
|
|
6733
|
+
}
|
|
6734
|
+
);
|
|
6789
6735
|
}
|
|
6790
6736
|
function useContextualRibbonTab(selectedElement, customization, onFallback) {
|
|
6791
6737
|
const visible = visibleContextualTabs(selectedElement ?? null, customization);
|
|
@@ -6985,6 +6931,7 @@ function Toolbar(p) {
|
|
|
6985
6931
|
"div",
|
|
6986
6932
|
{
|
|
6987
6933
|
role: "toolbar",
|
|
6934
|
+
"data-pptx-chrome": "ribbon",
|
|
6988
6935
|
"aria-label": t("pptx.toolbar.presentationToolbarAria"),
|
|
6989
6936
|
className: "relative z-20 border-b border-border bg-secondary/50 overflow-visible",
|
|
6990
6937
|
children: [
|
|
@@ -7038,6 +6985,7 @@ function Toolbar(p) {
|
|
|
7038
6985
|
showRibbon && /* @__PURE__ */ jsxs(
|
|
7039
6986
|
"div",
|
|
7040
6987
|
{
|
|
6988
|
+
"data-pptx-chrome": "ribbon-content",
|
|
7041
6989
|
className: cn(
|
|
7042
6990
|
// Plain controls stay compact; labelled RibbonGroups opt into stretching.
|
|
7043
6991
|
// `RibbonGroupScope` wraps controls in a `display: contents` div, so its
|
|
@@ -10535,13 +10483,15 @@ function SlideThumbnailImpl({
|
|
|
10535
10483
|
slide,
|
|
10536
10484
|
templateElements,
|
|
10537
10485
|
canvasSize,
|
|
10486
|
+
previewWidth,
|
|
10538
10487
|
fieldContext,
|
|
10539
10488
|
tableStyleContext
|
|
10540
10489
|
}) {
|
|
10541
10490
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
10542
10491
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
10543
|
-
const
|
|
10544
|
-
const
|
|
10492
|
+
const width = previewWidth ?? SLIDE_NAV_THUMBNAIL_WIDTH;
|
|
10493
|
+
const scale = width / safeCanvasWidth;
|
|
10494
|
+
const previewHeight = editorThumbnailHeight(safeCanvasWidth, safeCanvasHeight, width);
|
|
10545
10495
|
const previewElements = buildPreviewElements(slide, templateElements);
|
|
10546
10496
|
const slideFieldContext = deriveSlideFieldContext(fieldContext, slide);
|
|
10547
10497
|
const { t } = useTranslation();
|
|
@@ -10552,7 +10502,7 @@ function SlideThumbnailImpl({
|
|
|
10552
10502
|
return /* @__PURE__ */ jsx(
|
|
10553
10503
|
"div",
|
|
10554
10504
|
{
|
|
10555
|
-
className: "relative w-full overflow-hidden rounded border border-border bg-white",
|
|
10505
|
+
className: previewWidth === void 0 ? "relative w-full overflow-hidden rounded border border-border bg-white" : "relative w-full overflow-hidden bg-white",
|
|
10556
10506
|
style: {
|
|
10557
10507
|
height: previewHeight,
|
|
10558
10508
|
...getReactSlideBackgroundStyle(slide, {
|
|
@@ -10599,6 +10549,9 @@ function SlideThumbnailImpl({
|
|
|
10599
10549
|
);
|
|
10600
10550
|
}
|
|
10601
10551
|
function slideThumbnailPropsEqual(prev, next) {
|
|
10552
|
+
if (prev.previewWidth !== next.previewWidth) {
|
|
10553
|
+
return false;
|
|
10554
|
+
}
|
|
10602
10555
|
if (prev.slide.id !== next.slide.id) {
|
|
10603
10556
|
return false;
|
|
10604
10557
|
}
|
|
@@ -10771,7 +10724,11 @@ function ContextMenu(props) {
|
|
|
10771
10724
|
const handlers = contextMenuHandlers(props, shapeFormat);
|
|
10772
10725
|
const entries = customizeContextMenuEntries(
|
|
10773
10726
|
buildContextMenuEntries(contextMenuContext(props, shapeFormat)),
|
|
10774
|
-
customization
|
|
10727
|
+
customization,
|
|
10728
|
+
{
|
|
10729
|
+
slideIndex: props.slideIndex ?? 0,
|
|
10730
|
+
elementIds: props.elementIds ?? (props.selectedElement ? [props.selectedElement.id] : [])
|
|
10731
|
+
}
|
|
10775
10732
|
);
|
|
10776
10733
|
if (entries.length === 0) {
|
|
10777
10734
|
return null;
|
|
@@ -10801,7 +10758,10 @@ function ContextMenu(props) {
|
|
|
10801
10758
|
top: menuPosition.top
|
|
10802
10759
|
},
|
|
10803
10760
|
children: entries.map((entry) => {
|
|
10804
|
-
const run =
|
|
10761
|
+
const run = "host" in entry ? () => {
|
|
10762
|
+
onClose();
|
|
10763
|
+
entry.onSelect();
|
|
10764
|
+
} : handlers[entry.id];
|
|
10805
10765
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
10806
10766
|
entry.separatorBefore && /* @__PURE__ */ jsx(ContextMenuSeparator, {}),
|
|
10807
10767
|
/* @__PURE__ */ jsx(
|
|
@@ -10810,7 +10770,7 @@ function ContextMenu(props) {
|
|
|
10810
10770
|
danger: entry.danger,
|
|
10811
10771
|
disabled: entry.disabled || !run,
|
|
10812
10772
|
onSelect: () => run?.(),
|
|
10813
|
-
children: t(entry.labelKey)
|
|
10773
|
+
children: "host" in entry ? entry.label : t(entry.labelKey)
|
|
10814
10774
|
}
|
|
10815
10775
|
)
|
|
10816
10776
|
] }, entry.id);
|
|
@@ -10871,7 +10831,8 @@ function CanvasContextMenu(props) {
|
|
|
10871
10831
|
const handlers = canvasContextMenuHandlers(props);
|
|
10872
10832
|
const entries = customizeCanvasContextMenuEntries(
|
|
10873
10833
|
buildCanvasContextMenuEntries(canvasContextMenuContext(props)),
|
|
10874
|
-
customization
|
|
10834
|
+
customization,
|
|
10835
|
+
{ slideIndex: props.slideIndex ?? 0 }
|
|
10875
10836
|
);
|
|
10876
10837
|
if (entries.length === 0) {
|
|
10877
10838
|
return null;
|
|
@@ -10901,7 +10862,10 @@ function CanvasContextMenu(props) {
|
|
|
10901
10862
|
top: menuPosition.top
|
|
10902
10863
|
},
|
|
10903
10864
|
children: entries.map((entry) => {
|
|
10904
|
-
const run =
|
|
10865
|
+
const run = "host" in entry ? () => {
|
|
10866
|
+
onClose();
|
|
10867
|
+
entry.onSelect();
|
|
10868
|
+
} : handlers[entry.id];
|
|
10905
10869
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
10906
10870
|
entry.separatorBefore && /* @__PURE__ */ jsx(ContextMenuSeparator, {}),
|
|
10907
10871
|
/* @__PURE__ */ jsx(
|
|
@@ -10910,7 +10874,7 @@ function CanvasContextMenu(props) {
|
|
|
10910
10874
|
disabled: entry.disabled || !run,
|
|
10911
10875
|
checked: entry.checked,
|
|
10912
10876
|
onSelect: () => run?.(),
|
|
10913
|
-
children: t(entry.labelKey)
|
|
10877
|
+
children: "host" in entry ? entry.label : t(entry.labelKey)
|
|
10914
10878
|
}
|
|
10915
10879
|
)
|
|
10916
10880
|
] }, entry.id);
|
|
@@ -11337,6 +11301,7 @@ function LazyThumbnailInner({
|
|
|
11337
11301
|
templateElements,
|
|
11338
11302
|
canvasSize,
|
|
11339
11303
|
previewHeight,
|
|
11304
|
+
previewWidth,
|
|
11340
11305
|
fieldContext,
|
|
11341
11306
|
tableStyleContext
|
|
11342
11307
|
}) {
|
|
@@ -11374,6 +11339,7 @@ function LazyThumbnailInner({
|
|
|
11374
11339
|
slide,
|
|
11375
11340
|
templateElements,
|
|
11376
11341
|
canvasSize,
|
|
11342
|
+
previewWidth,
|
|
11377
11343
|
fieldContext,
|
|
11378
11344
|
tableStyleContext
|
|
11379
11345
|
}
|
|
@@ -11383,7 +11349,7 @@ function LazyThumbnailInner({
|
|
|
11383
11349
|
className: "relative w-full overflow-hidden rounded border border-border bg-muted/30 animate-pulse",
|
|
11384
11350
|
style: {
|
|
11385
11351
|
height: previewHeight,
|
|
11386
|
-
minWidth:
|
|
11352
|
+
minWidth: previewWidth
|
|
11387
11353
|
}
|
|
11388
11354
|
}
|
|
11389
11355
|
) });
|
|
@@ -11417,12 +11383,8 @@ function buildFlatPaneItems(sectionGroups, showSectionHeaders, collapsedSections
|
|
|
11417
11383
|
}
|
|
11418
11384
|
return items;
|
|
11419
11385
|
}
|
|
11420
|
-
function estimateSlideItemHeight(canvasWidth, canvasHeight) {
|
|
11421
|
-
|
|
11422
|
-
const safeH = Math.max(canvasHeight, 1);
|
|
11423
|
-
const scale = SLIDE_NAV_THUMBNAIL_WIDTH / safeW;
|
|
11424
|
-
const previewHeight = Math.max(56, Math.round(safeH * scale));
|
|
11425
|
-
return previewHeight + 30;
|
|
11386
|
+
function estimateSlideItemHeight(canvasWidth, canvasHeight, width = EDITOR_THUMBNAIL_WIDTH) {
|
|
11387
|
+
return editorThumbnailStep(canvasWidth, canvasHeight, width);
|
|
11426
11388
|
}
|
|
11427
11389
|
function SlideItemInner({
|
|
11428
11390
|
slide,
|
|
@@ -11431,6 +11393,7 @@ function SlideItemInner({
|
|
|
11431
11393
|
isActive,
|
|
11432
11394
|
isSelected = false,
|
|
11433
11395
|
canvasSize,
|
|
11396
|
+
previewWidth = EDITOR_THUMBNAIL_WIDTH,
|
|
11434
11397
|
canEdit,
|
|
11435
11398
|
rehearsalTimings,
|
|
11436
11399
|
presenceUsers,
|
|
@@ -11461,8 +11424,7 @@ function SlideItemInner({
|
|
|
11461
11424
|
);
|
|
11462
11425
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
11463
11426
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
11464
|
-
const
|
|
11465
|
-
const previewHeight = Math.max(56, Math.round(safeCanvasHeight * scale));
|
|
11427
|
+
const previewHeight = editorThumbnailHeight(safeCanvasWidth, safeCanvasHeight, previewWidth);
|
|
11466
11428
|
return /* @__PURE__ */ jsxs(
|
|
11467
11429
|
"button",
|
|
11468
11430
|
{
|
|
@@ -11470,6 +11432,7 @@ function SlideItemInner({
|
|
|
11470
11432
|
ref: slideRef,
|
|
11471
11433
|
"aria-label": t("pptx.slidesPanel.goToSlide", { n: slideIndex + 1 }),
|
|
11472
11434
|
"aria-current": isActive ? "true" : void 0,
|
|
11435
|
+
"data-pptx-chrome": "slide-row",
|
|
11473
11436
|
"aria-describedby": cue.labelId,
|
|
11474
11437
|
"data-pptx-slide-hidden": cue.marker,
|
|
11475
11438
|
className: cn(
|
|
@@ -11485,28 +11448,35 @@ function SlideItemInner({
|
|
|
11485
11448
|
onDragOver,
|
|
11486
11449
|
onDrop: (e) => onDrop(e, slideIndex),
|
|
11487
11450
|
children: [
|
|
11488
|
-
/* @__PURE__ */ jsxs(
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
|
|
11493
|
-
|
|
11494
|
-
|
|
11451
|
+
/* @__PURE__ */ jsxs(
|
|
11452
|
+
"div",
|
|
11453
|
+
{
|
|
11454
|
+
"data-pptx-chrome": "slide-number",
|
|
11455
|
+
className: "flex flex-col items-center gap-0.5 w-5 shrink-0",
|
|
11456
|
+
children: [
|
|
11457
|
+
/* @__PURE__ */ jsx(
|
|
11458
|
+
"span",
|
|
11459
|
+
{
|
|
11460
|
+
className: cn(
|
|
11461
|
+
"text-[10px] tabular-nums text-right select-none w-full",
|
|
11462
|
+
isActive ? "text-primary font-medium" : "text-muted-foreground"
|
|
11463
|
+
),
|
|
11464
|
+
style: isHidden ? { backgroundImage: HIDDEN_SLIDE_SLASH_GRADIENT } : void 0,
|
|
11465
|
+
children: slideIndex + 1
|
|
11466
|
+
}
|
|
11495
11467
|
),
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
)) })
|
|
11509
|
-
] }),
|
|
11468
|
+
presenceUsers && presenceUsers.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap justify-center gap-px", children: presenceUsers.slice(0, 4).map((u, i) => /* @__PURE__ */ jsx(
|
|
11469
|
+
"span",
|
|
11470
|
+
{
|
|
11471
|
+
className: "w-[6px] h-[6px] rounded-full",
|
|
11472
|
+
style: { backgroundColor: u.userColor },
|
|
11473
|
+
title: u.userName
|
|
11474
|
+
},
|
|
11475
|
+
i
|
|
11476
|
+
)) })
|
|
11477
|
+
]
|
|
11478
|
+
}
|
|
11479
|
+
),
|
|
11510
11480
|
/* @__PURE__ */ jsxs(
|
|
11511
11481
|
"div",
|
|
11512
11482
|
{
|
|
@@ -11514,7 +11484,8 @@ function SlideItemInner({
|
|
|
11514
11484
|
"relative shrink-0 overflow-hidden border transition-colors bg-white",
|
|
11515
11485
|
isActive ? "border-primary/60" : "border-transparent group-hover:border-border/40"
|
|
11516
11486
|
),
|
|
11517
|
-
|
|
11487
|
+
"data-pptx-chrome": "slide-frame",
|
|
11488
|
+
style: { width: previewWidth, height: previewHeight },
|
|
11518
11489
|
children: [
|
|
11519
11490
|
isHidden && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 pointer-events-none z-10 bg-[repeating-linear-gradient(135deg,transparent,transparent_4px,rgba(255,255,255,0.04)_4px,rgba(255,255,255,0.04)_8px)]" }),
|
|
11520
11491
|
/* @__PURE__ */ jsx(
|
|
@@ -11524,6 +11495,7 @@ function SlideItemInner({
|
|
|
11524
11495
|
templateElements,
|
|
11525
11496
|
canvasSize,
|
|
11526
11497
|
previewHeight,
|
|
11498
|
+
previewWidth,
|
|
11527
11499
|
fieldContext,
|
|
11528
11500
|
tableStyleContext
|
|
11529
11501
|
}
|
|
@@ -11727,9 +11699,10 @@ function SlidesPaneSidebar({
|
|
|
11727
11699
|
}
|
|
11728
11700
|
return map;
|
|
11729
11701
|
}, [collab]);
|
|
11702
|
+
const previewWidth = editorThumbnailWidth(panelWidth);
|
|
11730
11703
|
const estimatedItemHeight = useMemo(
|
|
11731
|
-
() => estimateSlideItemHeight(canvasSize.width, canvasSize.height),
|
|
11732
|
-
[canvasSize.width, canvasSize.height]
|
|
11704
|
+
() => estimateSlideItemHeight(canvasSize.width, canvasSize.height, previewWidth),
|
|
11705
|
+
[canvasSize.width, canvasSize.height, previewWidth]
|
|
11733
11706
|
);
|
|
11734
11707
|
const showSectionHeaders = sectionGroups.some((group) => group.id !== DEFAULT_SECTION_GROUP_ID);
|
|
11735
11708
|
const {
|
|
@@ -11841,80 +11814,89 @@ function SlidesPaneSidebar({
|
|
|
11841
11814
|
}
|
|
11842
11815
|
const renderVirtualized = () => {
|
|
11843
11816
|
const visibleItems = flatItems.slice(startIndex, endIndex + 1);
|
|
11844
|
-
return /* @__PURE__ */ jsx(
|
|
11817
|
+
return /* @__PURE__ */ jsx(
|
|
11845
11818
|
"div",
|
|
11846
11819
|
{
|
|
11847
|
-
|
|
11848
|
-
|
|
11849
|
-
|
|
11850
|
-
|
|
11851
|
-
|
|
11852
|
-
|
|
11853
|
-
|
|
11854
|
-
|
|
11855
|
-
|
|
11856
|
-
|
|
11857
|
-
|
|
11858
|
-
}
|
|
11859
|
-
const isCollapsed = effectiveCollapsed[section.id] ?? false;
|
|
11860
|
-
return /* @__PURE__ */ jsx(
|
|
11861
|
-
SectionHeader,
|
|
11862
|
-
{
|
|
11863
|
-
sectionId: section.id,
|
|
11864
|
-
label: section.label,
|
|
11865
|
-
slideCount: section.slideIndexes.length,
|
|
11866
|
-
isCollapsed,
|
|
11867
|
-
isRenaming: renamingSectionId === section.id,
|
|
11868
|
-
renameValue,
|
|
11869
|
-
canEdit,
|
|
11870
|
-
sectionIndex: item.sectionIndex,
|
|
11871
|
-
totalSections: sectionGroups.length,
|
|
11872
|
-
renameInputRef,
|
|
11873
|
-
onToggle: toggleSection,
|
|
11874
|
-
onContextMenu: handleSectionContextMenu,
|
|
11875
|
-
onStartRename: startRename,
|
|
11876
|
-
onRenameValueChange: setRenameValue,
|
|
11877
|
-
onCommitRename: commitRename,
|
|
11878
|
-
onCancelRename: cancelRename
|
|
11879
|
-
},
|
|
11880
|
-
`section-${section.id}`
|
|
11881
|
-
);
|
|
11882
|
-
}
|
|
11883
|
-
const slide = slides[item.slideIndex];
|
|
11884
|
-
if (!slide) {
|
|
11885
|
-
return null;
|
|
11886
|
-
}
|
|
11887
|
-
return /* @__PURE__ */ jsx(
|
|
11888
|
-
SlideItem,
|
|
11889
|
-
{
|
|
11890
|
-
slide,
|
|
11891
|
-
templateElements: templateElementsBySlideId[slide.id] ?? EMPTY_TEMPLATE_ELEMENTS,
|
|
11892
|
-
slideIndex: item.slideIndex,
|
|
11893
|
-
isActive: item.slideIndex === activeSlideIndex,
|
|
11894
|
-
isSelected: selectedSlideIds.includes(slide.id),
|
|
11895
|
-
canvasSize,
|
|
11896
|
-
canEdit,
|
|
11897
|
-
rehearsalTimings,
|
|
11898
|
-
presenceUsers: slidePresenceMap?.get(item.slideIndex),
|
|
11899
|
-
fieldContext,
|
|
11900
|
-
tableStyleContext,
|
|
11901
|
-
onSelectSlide: selectSlide,
|
|
11902
|
-
onSlideContextMenu,
|
|
11903
|
-
onOpenSlideCtxMenu: openSlideCtxMenu,
|
|
11904
|
-
onDragStart: handleDragStart,
|
|
11905
|
-
onDragOver: handleDragOver,
|
|
11906
|
-
onDrop: handleDrop,
|
|
11907
|
-
slideRef: setSlideRef(item.slideIndex)
|
|
11820
|
+
ref: scrollContainerRef,
|
|
11821
|
+
"data-pptx-chrome": "slide-list",
|
|
11822
|
+
className: "flex-1 overflow-y-auto px-1.5 pb-2",
|
|
11823
|
+
children: /* @__PURE__ */ jsx("div", { style: { height: totalHeight, position: "relative" }, children: /* @__PURE__ */ jsx(
|
|
11824
|
+
"div",
|
|
11825
|
+
{
|
|
11826
|
+
style: {
|
|
11827
|
+
position: "absolute",
|
|
11828
|
+
top: offsetY,
|
|
11829
|
+
left: 0,
|
|
11830
|
+
right: 0
|
|
11908
11831
|
},
|
|
11909
|
-
slide.
|
|
11910
|
-
|
|
11911
|
-
|
|
11832
|
+
children: /* @__PURE__ */ jsx("div", { className: "space-y-1", "data-pptx-chrome": "slide-window", children: visibleItems.map((item) => {
|
|
11833
|
+
if (item.type === "section") {
|
|
11834
|
+
const section = sectionGroups[item.sectionIndex];
|
|
11835
|
+
if (!section) {
|
|
11836
|
+
return null;
|
|
11837
|
+
}
|
|
11838
|
+
const isCollapsed = effectiveCollapsed[section.id] ?? false;
|
|
11839
|
+
return /* @__PURE__ */ jsx(
|
|
11840
|
+
SectionHeader,
|
|
11841
|
+
{
|
|
11842
|
+
sectionId: section.id,
|
|
11843
|
+
label: section.label,
|
|
11844
|
+
slideCount: section.slideIndexes.length,
|
|
11845
|
+
isCollapsed,
|
|
11846
|
+
isRenaming: renamingSectionId === section.id,
|
|
11847
|
+
renameValue,
|
|
11848
|
+
canEdit,
|
|
11849
|
+
sectionIndex: item.sectionIndex,
|
|
11850
|
+
totalSections: sectionGroups.length,
|
|
11851
|
+
renameInputRef,
|
|
11852
|
+
onToggle: toggleSection,
|
|
11853
|
+
onContextMenu: handleSectionContextMenu,
|
|
11854
|
+
onStartRename: startRename,
|
|
11855
|
+
onRenameValueChange: setRenameValue,
|
|
11856
|
+
onCommitRename: commitRename,
|
|
11857
|
+
onCancelRename: cancelRename
|
|
11858
|
+
},
|
|
11859
|
+
`section-${section.id}`
|
|
11860
|
+
);
|
|
11861
|
+
}
|
|
11862
|
+
const slide = slides[item.slideIndex];
|
|
11863
|
+
if (!slide) {
|
|
11864
|
+
return null;
|
|
11865
|
+
}
|
|
11866
|
+
return /* @__PURE__ */ jsx(
|
|
11867
|
+
SlideItem,
|
|
11868
|
+
{
|
|
11869
|
+
slide,
|
|
11870
|
+
templateElements: templateElementsBySlideId[slide.id] ?? EMPTY_TEMPLATE_ELEMENTS,
|
|
11871
|
+
slideIndex: item.slideIndex,
|
|
11872
|
+
isActive: item.slideIndex === activeSlideIndex,
|
|
11873
|
+
isSelected: selectedSlideIds.includes(slide.id),
|
|
11874
|
+
canvasSize,
|
|
11875
|
+
previewWidth,
|
|
11876
|
+
canEdit,
|
|
11877
|
+
rehearsalTimings,
|
|
11878
|
+
presenceUsers: slidePresenceMap?.get(item.slideIndex),
|
|
11879
|
+
fieldContext,
|
|
11880
|
+
tableStyleContext,
|
|
11881
|
+
onSelectSlide: selectSlide,
|
|
11882
|
+
onSlideContextMenu,
|
|
11883
|
+
onOpenSlideCtxMenu: openSlideCtxMenu,
|
|
11884
|
+
onDragStart: handleDragStart,
|
|
11885
|
+
onDragOver: handleDragOver,
|
|
11886
|
+
onDrop: handleDrop,
|
|
11887
|
+
slideRef: setSlideRef(item.slideIndex)
|
|
11888
|
+
},
|
|
11889
|
+
slide.id ?? item.slideIndex
|
|
11890
|
+
);
|
|
11891
|
+
}) })
|
|
11892
|
+
}
|
|
11893
|
+
) })
|
|
11912
11894
|
}
|
|
11913
|
-
)
|
|
11895
|
+
);
|
|
11914
11896
|
};
|
|
11915
|
-
const renderNonVirtualized = () => /* @__PURE__ */ jsx("div", { className: "flex-1 space-y-1 overflow-y-auto px-1.5 pb-2", children: sectionGroups.map((section, sectionIndex) => {
|
|
11897
|
+
const renderNonVirtualized = () => /* @__PURE__ */ jsx("div", { "data-pptx-chrome": "slide-list", className: "flex-1 space-y-1 overflow-y-auto px-1.5 pb-2", children: sectionGroups.map((section, sectionIndex) => {
|
|
11916
11898
|
const isCollapsed = effectiveCollapsed[section.id] ?? false;
|
|
11917
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
11899
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-1", "data-pptx-chrome": "slide-window", children: [
|
|
11918
11900
|
showSectionHeaders && /* @__PURE__ */ jsx(
|
|
11919
11901
|
SectionHeader,
|
|
11920
11902
|
{
|
|
@@ -11950,6 +11932,7 @@ function SlidesPaneSidebar({
|
|
|
11950
11932
|
isActive: idx === activeSlideIndex,
|
|
11951
11933
|
isSelected: selectedSlideIds.includes(slide.id),
|
|
11952
11934
|
canvasSize,
|
|
11935
|
+
previewWidth,
|
|
11953
11936
|
canEdit,
|
|
11954
11937
|
rehearsalTimings,
|
|
11955
11938
|
presenceUsers: slidePresenceMap?.get(idx),
|
|
@@ -11975,12 +11958,13 @@ function SlidesPaneSidebar({
|
|
|
11975
11958
|
{
|
|
11976
11959
|
role: "navigation",
|
|
11977
11960
|
"aria-label": t("pptx.sections.slides"),
|
|
11961
|
+
"data-pptx-chrome": "slides",
|
|
11978
11962
|
className: "flex h-full flex-col border-r border-border bg-secondary/30",
|
|
11979
11963
|
style: panelWidth ? { width: panelWidth, flexShrink: 0 } : void 0,
|
|
11980
11964
|
onKeyDown: onPaneKeyDown,
|
|
11981
11965
|
children: [
|
|
11982
11966
|
shouldVirtualize ? renderVirtualized() : renderNonVirtualized(),
|
|
11983
|
-
canEdit && /* @__PURE__ */ jsx("div", { className: "border-t border-border/60 px-2 py-1.5", children: /* @__PURE__ */ jsxs(
|
|
11967
|
+
canEdit && /* @__PURE__ */ jsx("div", { "data-pptx-chrome": "slide-footer", className: "border-t border-border/60 px-2 py-1.5", children: /* @__PURE__ */ jsxs(
|
|
11984
11968
|
"button",
|
|
11985
11969
|
{
|
|
11986
11970
|
type: "button",
|
|
@@ -14562,6 +14546,7 @@ function SlideNotesPanel({
|
|
|
14562
14546
|
"div",
|
|
14563
14547
|
{
|
|
14564
14548
|
ref: rootRef,
|
|
14549
|
+
"data-pptx-chrome": "notes",
|
|
14565
14550
|
className: cn(
|
|
14566
14551
|
"flex flex-col border-t border-border/60 bg-background select-none",
|
|
14567
14552
|
// On mobile, hide the entire notes strip when collapsed: the
|
|
@@ -14589,6 +14574,7 @@ function SlideNotesPanel({
|
|
|
14589
14574
|
{
|
|
14590
14575
|
type: "button",
|
|
14591
14576
|
onClick: onToggle,
|
|
14577
|
+
"data-pptx-chrome": "notes-header",
|
|
14592
14578
|
className: "flex items-center gap-1.5 px-3 py-1 text-[11px] text-muted-foreground hover:text-foreground hover:bg-accent/30 transition-colors w-full text-left shrink-0 max-md:hidden",
|
|
14593
14579
|
"aria-expanded": isExpanded,
|
|
14594
14580
|
"aria-controls": "slide-notes-content",
|
|
@@ -18730,8 +18716,8 @@ var INSPECTOR_TABS = [
|
|
|
18730
18716
|
{ key: "properties", labelKey: "pptx.inspector.properties", icon: LuSettings2 },
|
|
18731
18717
|
{ key: "comments", labelKey: "pptx.toolbar.comments", icon: LuMessageSquare }
|
|
18732
18718
|
];
|
|
18733
|
-
var HEADING2 = "text-[11px] uppercase tracking-wide text-muted-foreground";
|
|
18734
|
-
var CARD2 = "rounded border border-border bg-card p-2 space-y-2";
|
|
18719
|
+
var HEADING2 = "pptx-editor-heading text-[11px] uppercase tracking-wide text-muted-foreground";
|
|
18720
|
+
var CARD2 = "pptx-editor-card rounded border border-border bg-card p-2 space-y-2";
|
|
18735
18721
|
var INPUT2 = "flex-1 bg-muted border border-border rounded px-1.5 py-0.5 w-full max-md:min-h-[44px]!";
|
|
18736
18722
|
var BTN2 = "rounded bg-muted hover:bg-accent px-2 py-1 text-[11px] transition-colors max-md:min-h-[44px]! max-md:min-w-[44px]!";
|
|
18737
18723
|
var POS_FIELDS = [
|
|
@@ -27963,37 +27949,54 @@ function InspectorPaneHeader({
|
|
|
27963
27949
|
const { viewportWidth } = useIsMobile();
|
|
27964
27950
|
const touchTargetPx = getDensePanelTouchTargetPx(viewportWidth);
|
|
27965
27951
|
const touchBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
27966
|
-
return /* @__PURE__ */ jsxs(
|
|
27967
|
-
|
|
27968
|
-
|
|
27969
|
-
|
|
27970
|
-
|
|
27971
|
-
|
|
27972
|
-
|
|
27973
|
-
|
|
27974
|
-
|
|
27975
|
-
|
|
27952
|
+
return /* @__PURE__ */ jsxs(
|
|
27953
|
+
"div",
|
|
27954
|
+
{
|
|
27955
|
+
"data-pptx-chrome": "inspector-header",
|
|
27956
|
+
className: "flex items-center justify-between gap-2 px-3 py-2 border-b border-border",
|
|
27957
|
+
children: [
|
|
27958
|
+
/* @__PURE__ */ jsx(
|
|
27959
|
+
"div",
|
|
27960
|
+
{
|
|
27961
|
+
"data-pptx-chrome": "inspector-tabs",
|
|
27962
|
+
role: "tablist",
|
|
27963
|
+
className: "flex items-center gap-1 rounded bg-muted p-0.5",
|
|
27964
|
+
children: INSPECTOR_TABS.map(({ key, labelKey, icon: Icon }) => /* @__PURE__ */ jsxs(
|
|
27965
|
+
"button",
|
|
27966
|
+
{
|
|
27967
|
+
role: "tab",
|
|
27968
|
+
"aria-selected": activeTab === key,
|
|
27969
|
+
type: "button",
|
|
27970
|
+
title: t(labelKey),
|
|
27971
|
+
style: touchBtnStyle,
|
|
27972
|
+
className: cn(
|
|
27973
|
+
"flex items-center justify-center gap-1 px-2 py-1 rounded text-[11px] transition-colors",
|
|
27974
|
+
activeTab === key ? "bg-primary text-white" : "text-muted-foreground hover:text-foreground hover:bg-accent"
|
|
27975
|
+
),
|
|
27976
|
+
onClick: () => onSetActiveTab(key),
|
|
27977
|
+
children: [
|
|
27978
|
+
/* @__PURE__ */ jsx(Icon, { className: "w-3.5 h-3.5" }),
|
|
27979
|
+
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: t(labelKey) })
|
|
27980
|
+
]
|
|
27981
|
+
},
|
|
27982
|
+
key
|
|
27983
|
+
))
|
|
27984
|
+
}
|
|
27976
27985
|
),
|
|
27977
|
-
|
|
27978
|
-
|
|
27979
|
-
|
|
27980
|
-
|
|
27981
|
-
|
|
27982
|
-
|
|
27983
|
-
|
|
27984
|
-
|
|
27985
|
-
|
|
27986
|
-
|
|
27987
|
-
|
|
27988
|
-
|
|
27989
|
-
|
|
27990
|
-
|
|
27991
|
-
style: touchBtnStyle,
|
|
27992
|
-
className: "flex items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",
|
|
27993
|
-
children: /* @__PURE__ */ jsx(LuX, { className: "w-4 h-4" })
|
|
27994
|
-
}
|
|
27995
|
-
)
|
|
27996
|
-
] });
|
|
27986
|
+
/* @__PURE__ */ jsx(
|
|
27987
|
+
"button",
|
|
27988
|
+
{
|
|
27989
|
+
type: "button",
|
|
27990
|
+
onClick: onClose,
|
|
27991
|
+
title: t("pptx.common.close"),
|
|
27992
|
+
style: touchBtnStyle,
|
|
27993
|
+
className: "flex items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",
|
|
27994
|
+
children: /* @__PURE__ */ jsx(LuX, { className: "w-4 h-4" })
|
|
27995
|
+
}
|
|
27996
|
+
)
|
|
27997
|
+
]
|
|
27998
|
+
}
|
|
27999
|
+
);
|
|
27997
28000
|
}
|
|
27998
28001
|
function InfoRow({ label, value }) {
|
|
27999
28002
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
@@ -28338,9 +28341,9 @@ function PresentationSettingsCard({
|
|
|
28338
28341
|
onUpdate
|
|
28339
28342
|
}) {
|
|
28340
28343
|
const { t } = useTranslation();
|
|
28341
|
-
return /* @__PURE__ */ jsxs("div", { className: CARD2
|
|
28344
|
+
return /* @__PURE__ */ jsxs("div", { className: `${CARD2} pptx-editor-presentation-card`, children: [
|
|
28342
28345
|
/* @__PURE__ */ jsx("div", { className: HEADING2, children: t("pptx.slideInspector.presentation") }),
|
|
28343
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5 text-[11px]", children: [
|
|
28346
|
+
/* @__PURE__ */ jsxs("div", { "data-pptx-chrome": "presentation-fields", className: "space-y-1.5 text-[11px]", children: [
|
|
28344
28347
|
/* @__PURE__ */ jsxs("label", { className: "flex items-center justify-between gap-2", children: [
|
|
28345
28348
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.presentationSettings.showType") }),
|
|
28346
28349
|
/* @__PURE__ */ jsxs(
|
|
@@ -29026,7 +29029,7 @@ function PresentationPropertiesPanel({
|
|
|
29026
29029
|
},
|
|
29027
29030
|
[activeSlide?.transition, onUpdateSlide]
|
|
29028
29031
|
);
|
|
29029
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
29032
|
+
return /* @__PURE__ */ jsxs("div", { "data-pptx-chrome": "deck-properties", className: "space-y-3", children: [
|
|
29030
29033
|
/* @__PURE__ */ jsx(
|
|
29031
29034
|
PresentationSettingsCard,
|
|
29032
29035
|
{
|
|
@@ -29405,6 +29408,7 @@ function InspectorPane(props) {
|
|
|
29405
29408
|
/* @__PURE__ */ jsxs(
|
|
29406
29409
|
"div",
|
|
29407
29410
|
{
|
|
29411
|
+
"data-pptx-chrome": "inspector",
|
|
29408
29412
|
className: cn(
|
|
29409
29413
|
// Shared styles
|
|
29410
29414
|
"bg-background flex flex-col text-xs text-foreground shadow-xl",
|
|
@@ -29441,7 +29445,7 @@ function InspectorPane(props) {
|
|
|
29441
29445
|
onClose
|
|
29442
29446
|
}
|
|
29443
29447
|
),
|
|
29444
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto p-3 space-y-3", children: [
|
|
29448
|
+
/* @__PURE__ */ jsxs("div", { "data-pptx-chrome": "inspector-body", className: "flex-1 overflow-y-auto p-3 space-y-3", children: [
|
|
29445
29449
|
activeTab === "elements" && /* @__PURE__ */ jsx(
|
|
29446
29450
|
InspectorElementsTab,
|
|
29447
29451
|
{
|
|
@@ -34908,7 +34912,7 @@ function useTableStyleMapHandlers(input) {
|
|
|
34908
34912
|
var AiChatPanel = lazy(async () => {
|
|
34909
34913
|
const [{ useChat }, { default: Panel }] = await Promise.all([
|
|
34910
34914
|
import('@ai-sdk/react'),
|
|
34911
|
-
import('./AiChatPanel-
|
|
34915
|
+
import('./AiChatPanel-5Z4BYP7S.mjs')
|
|
34912
34916
|
]);
|
|
34913
34917
|
function BoundAiChatPanel(props) {
|
|
34914
34918
|
return /* @__PURE__ */ jsx(Panel, { ...props, useChat });
|
|
@@ -35030,348 +35034,38 @@ function AiChangeOverlay({ batch, activeSlideIndex }) {
|
|
|
35030
35034
|
))
|
|
35031
35035
|
] });
|
|
35032
35036
|
}
|
|
35033
|
-
|
|
35034
|
-
// src/viewer/components/inspector/theme-editor-constants.ts
|
|
35035
|
-
var THEME_EDITOR_CARD = "rounded bg-muted/50 p-2.5 space-y-2";
|
|
35036
|
-
var THEME_EDITOR_HEADING = "text-[11px] font-medium uppercase tracking-wide text-muted-foreground mb-1.5";
|
|
35037
|
-
var THEME_EDITOR_INPUT = "w-full rounded border border-border bg-background px-2 py-1 text-xs text-foreground focus:border-primary focus:outline-none";
|
|
35038
|
-
var THEME_EDITOR_BTN = "rounded bg-primary px-3 py-1.5 text-xs font-medium text-white hover:bg-primary/80 disabled:opacity-40 disabled:cursor-not-allowed transition-colors";
|
|
35039
|
-
var THEME_EDITOR_BTN_SECONDARY = "rounded bg-accent px-3 py-1.5 text-xs font-medium text-foreground hover:bg-accent/80 disabled:opacity-40 disabled:cursor-not-allowed transition-colors";
|
|
35040
|
-
function ThemeColorSchemeEditor({
|
|
35041
|
-
editColors,
|
|
35042
|
-
canEdit,
|
|
35043
|
-
activePickerKey,
|
|
35044
|
-
majorFont,
|
|
35045
|
-
minorFont,
|
|
35046
|
-
onSetActivePickerKey,
|
|
35047
|
-
onColorChange,
|
|
35048
|
-
onMajorFontChange,
|
|
35049
|
-
onMinorFontChange
|
|
35050
|
-
}) {
|
|
35051
|
-
const { t } = useTranslation();
|
|
35052
|
-
const slotLabel = useCallback((key) => themeColorLabel(key, t), [t]);
|
|
35053
|
-
const previewGrid = useMemo(() => buildThemeColorGrid(editColors, t), [editColors, t]);
|
|
35054
|
-
const handleColorText = useCallback(
|
|
35055
|
-
(val) => {
|
|
35056
|
-
if (activePickerKey && /^#[0-9a-fA-F]{6}$/.test(val)) {
|
|
35057
|
-
onColorChange(activePickerKey, val);
|
|
35058
|
-
}
|
|
35059
|
-
},
|
|
35060
|
-
[activePickerKey, onColorChange]
|
|
35061
|
-
);
|
|
35062
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
35063
|
-
/* @__PURE__ */ jsxs("div", { className: THEME_EDITOR_CARD, children: [
|
|
35064
|
-
/* @__PURE__ */ jsx("div", { className: THEME_EDITOR_HEADING, children: t("pptx.themeEditor.colorScheme") }),
|
|
35065
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-4 gap-1.5", children: THEME_COLOR_SCHEME_KEYS.map((key) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-0.5", children: [
|
|
35066
|
-
/* @__PURE__ */ jsx(
|
|
35067
|
-
"button",
|
|
35068
|
-
{
|
|
35069
|
-
type: "button",
|
|
35070
|
-
disabled: !canEdit,
|
|
35071
|
-
className: `h-6 w-full rounded-sm border transition-colors ${activePickerKey === key ? "border-primary ring-1 ring-primary" : "border-border hover:border-muted-foreground"} disabled:opacity-40 disabled:cursor-not-allowed`,
|
|
35072
|
-
style: { backgroundColor: editColors[key] },
|
|
35073
|
-
title: `${slotLabel(key)}: ${editColors[key]}`,
|
|
35074
|
-
"aria-label": `${slotLabel(key)}: ${editColors[key]}`,
|
|
35075
|
-
onClick: () => onSetActivePickerKey(activePickerKey === key ? null : key)
|
|
35076
|
-
}
|
|
35077
|
-
),
|
|
35078
|
-
/* @__PURE__ */ jsx("span", { className: "text-[9px] text-muted-foreground truncate w-full text-center", children: slotLabel(key) })
|
|
35079
|
-
] }, key)) }),
|
|
35080
|
-
activePickerKey && /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center gap-2 rounded bg-background p-2", children: [
|
|
35081
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground min-w-[60px]", children: slotLabel(activePickerKey) }),
|
|
35082
|
-
/* @__PURE__ */ jsx(
|
|
35083
|
-
"input",
|
|
35084
|
-
{
|
|
35085
|
-
type: "color",
|
|
35086
|
-
disabled: !canEdit,
|
|
35087
|
-
className: "h-6 w-8 cursor-pointer rounded border-0 bg-transparent p-0",
|
|
35088
|
-
value: editColors[activePickerKey],
|
|
35089
|
-
onChange: (e) => onColorChange(activePickerKey, e.target.value)
|
|
35090
|
-
}
|
|
35091
|
-
),
|
|
35092
|
-
/* @__PURE__ */ jsx(
|
|
35093
|
-
"input",
|
|
35094
|
-
{
|
|
35095
|
-
type: "text",
|
|
35096
|
-
disabled: !canEdit,
|
|
35097
|
-
className: "flex-1 rounded border border-border bg-muted px-1.5 py-0.5 text-[10px] text-foreground font-mono",
|
|
35098
|
-
value: editColors[activePickerKey],
|
|
35099
|
-
onChange: (e) => handleColorText(e.target.value)
|
|
35100
|
-
}
|
|
35101
|
-
)
|
|
35102
|
-
] })
|
|
35103
|
-
] }),
|
|
35104
|
-
previewGrid && /* @__PURE__ */ jsxs("div", { className: THEME_EDITOR_CARD, children: [
|
|
35105
|
-
/* @__PURE__ */ jsx("div", { className: THEME_EDITOR_HEADING, children: t("pptx.themeEditor.preview") }),
|
|
35106
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-px", children: previewGrid.map((row, rowIdx) => /* @__PURE__ */ jsx("div", { className: "grid grid-cols-12 gap-px", children: row.map((cell) => /* @__PURE__ */ jsx(
|
|
35107
|
-
"div",
|
|
35108
|
-
{
|
|
35109
|
-
className: "h-3.5 rounded-sm",
|
|
35110
|
-
style: { backgroundColor: cell.hex },
|
|
35111
|
-
title: `${cell.colLabel} -- ${cell.rowLabel} (${cell.hex})`
|
|
35112
|
-
},
|
|
35113
|
-
`${cell.schemeKey}-${rowIdx}`
|
|
35114
|
-
)) }, rowIdx)) })
|
|
35115
|
-
] }),
|
|
35116
|
-
/* @__PURE__ */ jsxs("div", { className: THEME_EDITOR_CARD, children: [
|
|
35117
|
-
/* @__PURE__ */ jsx("div", { className: THEME_EDITOR_HEADING, children: t("pptx.themeEditor.fonts") }),
|
|
35118
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
35119
|
-
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
35120
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground", children: t("pptx.themeEditor.headingFont") }),
|
|
35121
|
-
/* @__PURE__ */ jsxs(
|
|
35122
|
-
WebSelect,
|
|
35123
|
-
{
|
|
35124
|
-
"aria-label": t("pptx.themeEditor.headingFont"),
|
|
35125
|
-
className: THEME_EDITOR_INPUT,
|
|
35126
|
-
disabled: !canEdit,
|
|
35127
|
-
value: COMMON_FONTS.includes(majorFont) ? majorFont : "__custom__",
|
|
35128
|
-
onChange: (e) => {
|
|
35129
|
-
if (e.target.value !== "__custom__") {
|
|
35130
|
-
onMajorFontChange(e.target.value);
|
|
35131
|
-
}
|
|
35132
|
-
},
|
|
35133
|
-
children: [
|
|
35134
|
-
COMMON_FONTS.map((f) => /* @__PURE__ */ jsx("option", { value: f, children: f }, f)),
|
|
35135
|
-
!COMMON_FONTS.includes(majorFont) && /* @__PURE__ */ jsx("option", { value: "__custom__", children: majorFont })
|
|
35136
|
-
]
|
|
35137
|
-
}
|
|
35138
|
-
)
|
|
35139
|
-
] }),
|
|
35140
|
-
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-0.5", children: [
|
|
35141
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground", children: t("pptx.themeEditor.bodyFont") }),
|
|
35142
|
-
/* @__PURE__ */ jsxs(
|
|
35143
|
-
WebSelect,
|
|
35144
|
-
{
|
|
35145
|
-
"aria-label": t("pptx.themeEditor.bodyFont"),
|
|
35146
|
-
className: THEME_EDITOR_INPUT,
|
|
35147
|
-
disabled: !canEdit,
|
|
35148
|
-
value: COMMON_FONTS.includes(minorFont) ? minorFont : "__custom__",
|
|
35149
|
-
onChange: (e) => {
|
|
35150
|
-
if (e.target.value !== "__custom__") {
|
|
35151
|
-
onMinorFontChange(e.target.value);
|
|
35152
|
-
}
|
|
35153
|
-
},
|
|
35154
|
-
children: [
|
|
35155
|
-
COMMON_FONTS.map((f) => /* @__PURE__ */ jsx("option", { value: f, children: f }, f)),
|
|
35156
|
-
!COMMON_FONTS.includes(minorFont) && /* @__PURE__ */ jsx("option", { value: "__custom__", children: minorFont })
|
|
35157
|
-
]
|
|
35158
|
-
}
|
|
35159
|
-
)
|
|
35160
|
-
] }),
|
|
35161
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 pt-1 text-[10px] text-muted-foreground", children: [
|
|
35162
|
-
/* @__PURE__ */ jsx("span", { style: { fontFamily: majorFont }, className: "text-foreground", children: t("pptx.themeEditor.headingSample") }),
|
|
35163
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "|" }),
|
|
35164
|
-
/* @__PURE__ */ jsx("span", { style: { fontFamily: minorFont }, className: "text-foreground", children: t("pptx.themeEditor.bodySample") })
|
|
35165
|
-
] })
|
|
35166
|
-
] })
|
|
35167
|
-
] })
|
|
35168
|
-
] });
|
|
35169
|
-
}
|
|
35170
|
-
var ACCENT_KEYS = ["accent1", "accent2", "accent3", "accent4", "accent5", "accent6"];
|
|
35171
|
-
function ThemePresetGallery({
|
|
35172
|
-
canEdit,
|
|
35173
|
-
currentThemeName,
|
|
35174
|
-
onSelectPreset
|
|
35175
|
-
}) {
|
|
35037
|
+
function ThemeEditorPanel({ theme, canEdit, onApply, onClose }) {
|
|
35176
35038
|
const { t } = useTranslation();
|
|
35177
|
-
|
|
35178
|
-
|
|
35179
|
-
|
|
35180
|
-
|
|
35181
|
-
|
|
35182
|
-
|
|
35183
|
-
|
|
35184
|
-
|
|
35185
|
-
|
|
35186
|
-
|
|
35187
|
-
|
|
35188
|
-
|
|
35189
|
-
"div",
|
|
35190
|
-
{
|
|
35191
|
-
className: "h-3 flex-1 first:rounded-l-sm last:rounded-r-sm",
|
|
35192
|
-
style: { backgroundColor: preset.colorScheme[key] }
|
|
35193
|
-
},
|
|
35194
|
-
key
|
|
35195
|
-
)) }),
|
|
35196
|
-
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground truncate w-full", children: preset.name })
|
|
35197
|
-
]
|
|
35198
|
-
},
|
|
35199
|
-
preset.name
|
|
35200
|
-
)) })
|
|
35201
|
-
] });
|
|
35202
|
-
}
|
|
35203
|
-
function ThemeEditorPanel({
|
|
35204
|
-
theme,
|
|
35205
|
-
canEdit,
|
|
35206
|
-
onUpdateColorScheme,
|
|
35207
|
-
onUpdateFontScheme,
|
|
35208
|
-
onUpdateThemeName,
|
|
35209
|
-
onApplyToPresentation,
|
|
35210
|
-
onClose
|
|
35211
|
-
}) {
|
|
35212
|
-
const { t } = useTranslation();
|
|
35213
|
-
const [editColors, setEditColors] = useState(
|
|
35214
|
-
() => theme?.colorScheme ?? PRESET_THEMES[0].colorScheme
|
|
35215
|
-
);
|
|
35216
|
-
const [majorFont, setMajorFont] = useState(
|
|
35217
|
-
() => theme?.fontScheme?.majorFont?.latin ?? "Calibri Light"
|
|
35218
|
-
);
|
|
35219
|
-
const [minorFont, setMinorFont] = useState(
|
|
35220
|
-
() => theme?.fontScheme?.minorFont?.latin ?? "Calibri"
|
|
35221
|
-
);
|
|
35222
|
-
const [themeName, setThemeName] = useState(() => theme?.name ?? "Custom Theme");
|
|
35223
|
-
const [activePickerKey, setActivePickerKey] = useState(null);
|
|
35224
|
-
const handleColorChange = useCallback(
|
|
35225
|
-
(key, hex) => {
|
|
35226
|
-
const next = { ...editColors, [key]: hex };
|
|
35227
|
-
setEditColors(next);
|
|
35228
|
-
onUpdateColorScheme(next);
|
|
35229
|
-
},
|
|
35230
|
-
[editColors, onUpdateColorScheme]
|
|
35231
|
-
);
|
|
35232
|
-
const handleSelectPreset = useCallback(
|
|
35233
|
-
(preset) => {
|
|
35234
|
-
setEditColors(preset.colorScheme);
|
|
35235
|
-
setMajorFont(preset.majorFont);
|
|
35236
|
-
setMinorFont(preset.minorFont);
|
|
35237
|
-
setThemeName(preset.name);
|
|
35238
|
-
onUpdateColorScheme(preset.colorScheme);
|
|
35239
|
-
onUpdateFontScheme({
|
|
35240
|
-
majorFont: { latin: preset.majorFont },
|
|
35241
|
-
minorFont: { latin: preset.minorFont }
|
|
35242
|
-
});
|
|
35243
|
-
onUpdateThemeName(preset.name);
|
|
35244
|
-
},
|
|
35245
|
-
[onUpdateColorScheme, onUpdateFontScheme, onUpdateThemeName]
|
|
35246
|
-
);
|
|
35247
|
-
const handleReset = useCallback(() => {
|
|
35248
|
-
if (!theme?.colorScheme) {
|
|
35039
|
+
const ref = useRef(null);
|
|
35040
|
+
useEffect(() => {
|
|
35041
|
+
const node = ref.current;
|
|
35042
|
+
if (node) {
|
|
35043
|
+
node.theme = theme;
|
|
35044
|
+
node.labels = themeEditorLabels(t);
|
|
35045
|
+
node.disabled = !canEdit;
|
|
35046
|
+
}
|
|
35047
|
+
}, [theme, canEdit, t]);
|
|
35048
|
+
useEffect(() => {
|
|
35049
|
+
const node = ref.current;
|
|
35050
|
+
if (!node) {
|
|
35249
35051
|
return;
|
|
35250
35052
|
}
|
|
35251
|
-
|
|
35252
|
-
|
|
35253
|
-
|
|
35254
|
-
|
|
35255
|
-
|
|
35256
|
-
|
|
35257
|
-
majorFont: {
|
|
35258
|
-
latin: theme.fontScheme?.majorFont?.latin ?? "Calibri Light"
|
|
35259
|
-
},
|
|
35260
|
-
minorFont: { latin: theme.fontScheme?.minorFont?.latin ?? "Calibri" }
|
|
35261
|
-
});
|
|
35262
|
-
onUpdateThemeName(theme.name ?? "Custom Theme");
|
|
35263
|
-
}, [theme, onUpdateColorScheme, onUpdateFontScheme, onUpdateThemeName]);
|
|
35264
|
-
const handleMajorFontChange = useCallback(
|
|
35265
|
-
(font) => {
|
|
35266
|
-
setMajorFont(font);
|
|
35267
|
-
onUpdateFontScheme({
|
|
35268
|
-
majorFont: { latin: font },
|
|
35269
|
-
minorFont: { latin: minorFont }
|
|
35270
|
-
});
|
|
35271
|
-
},
|
|
35272
|
-
[minorFont, onUpdateFontScheme]
|
|
35273
|
-
);
|
|
35274
|
-
const handleMinorFontChange = useCallback(
|
|
35275
|
-
(font) => {
|
|
35276
|
-
setMinorFont(font);
|
|
35277
|
-
onUpdateFontScheme({
|
|
35278
|
-
majorFont: { latin: majorFont },
|
|
35279
|
-
minorFont: { latin: font }
|
|
35280
|
-
});
|
|
35281
|
-
},
|
|
35282
|
-
[majorFont, onUpdateFontScheme]
|
|
35283
|
-
);
|
|
35284
|
-
const handleNameChange = useCallback(
|
|
35285
|
-
(name) => {
|
|
35286
|
-
setThemeName(name);
|
|
35287
|
-
onUpdateThemeName(name);
|
|
35288
|
-
},
|
|
35289
|
-
[onUpdateThemeName]
|
|
35290
|
-
);
|
|
35291
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 overflow-y-auto max-h-[calc(100vh-120px)]", children: [
|
|
35292
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
35293
|
-
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground", children: t("pptx.themeEditor.title") }),
|
|
35294
|
-
/* @__PURE__ */ jsx(
|
|
35295
|
-
"button",
|
|
35296
|
-
{
|
|
35297
|
-
type: "button",
|
|
35298
|
-
onClick: onClose,
|
|
35299
|
-
className: "rounded p-1 text-muted-foreground hover:bg-accent hover:text-foreground",
|
|
35300
|
-
title: t("pptx.themeEditor.close"),
|
|
35301
|
-
"aria-label": t("pptx.themeEditor.close"),
|
|
35302
|
-
children: /* @__PURE__ */ jsx(
|
|
35303
|
-
"svg",
|
|
35304
|
-
{
|
|
35305
|
-
className: "h-4 w-4",
|
|
35306
|
-
fill: "none",
|
|
35307
|
-
viewBox: "0 0 24 24",
|
|
35308
|
-
stroke: "currentColor",
|
|
35309
|
-
strokeWidth: 2,
|
|
35310
|
-
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
35311
|
-
}
|
|
35312
|
-
)
|
|
35313
|
-
}
|
|
35314
|
-
)
|
|
35315
|
-
] }),
|
|
35316
|
-
/* @__PURE__ */ jsxs("div", { className: THEME_EDITOR_CARD, children: [
|
|
35317
|
-
/* @__PURE__ */ jsx("div", { className: THEME_EDITOR_HEADING, children: t("pptx.themeEditor.themeName") }),
|
|
35318
|
-
/* @__PURE__ */ jsx(
|
|
35319
|
-
"input",
|
|
35320
|
-
{
|
|
35321
|
-
type: "text",
|
|
35322
|
-
className: THEME_EDITOR_INPUT,
|
|
35323
|
-
disabled: !canEdit,
|
|
35324
|
-
value: themeName,
|
|
35325
|
-
onChange: (e) => handleNameChange(e.target.value),
|
|
35326
|
-
placeholder: t("pptx.themeEditor.themeNamePlaceholder")
|
|
35327
|
-
}
|
|
35328
|
-
)
|
|
35329
|
-
] }),
|
|
35330
|
-
/* @__PURE__ */ jsx(
|
|
35331
|
-
ThemePresetGallery,
|
|
35332
|
-
{
|
|
35333
|
-
canEdit,
|
|
35334
|
-
currentThemeName: themeName,
|
|
35335
|
-
onSelectPreset: handleSelectPreset
|
|
35336
|
-
}
|
|
35337
|
-
),
|
|
35338
|
-
/* @__PURE__ */ jsx(
|
|
35339
|
-
ThemeColorSchemeEditor,
|
|
35340
|
-
{
|
|
35341
|
-
editColors,
|
|
35342
|
-
canEdit,
|
|
35343
|
-
activePickerKey,
|
|
35344
|
-
majorFont,
|
|
35345
|
-
minorFont,
|
|
35346
|
-
onSetActivePickerKey: setActivePickerKey,
|
|
35347
|
-
onColorChange: handleColorChange,
|
|
35348
|
-
onMajorFontChange: handleMajorFontChange,
|
|
35349
|
-
onMinorFontChange: handleMinorFontChange
|
|
35053
|
+
const apply = (event) => {
|
|
35054
|
+
if (!node.disabled) {
|
|
35055
|
+
node.disabled = true;
|
|
35056
|
+
void Promise.resolve(onApply(event.detail)).finally(() => {
|
|
35057
|
+
node.disabled = !canEdit;
|
|
35058
|
+
});
|
|
35350
35059
|
}
|
|
35351
|
-
|
|
35352
|
-
|
|
35353
|
-
|
|
35354
|
-
|
|
35355
|
-
|
|
35356
|
-
|
|
35357
|
-
|
|
35358
|
-
|
|
35359
|
-
|
|
35360
|
-
children: t("pptx.themeEditor.applyToPresentation")
|
|
35361
|
-
}
|
|
35362
|
-
),
|
|
35363
|
-
/* @__PURE__ */ jsx(
|
|
35364
|
-
"button",
|
|
35365
|
-
{
|
|
35366
|
-
type: "button",
|
|
35367
|
-
disabled: !canEdit,
|
|
35368
|
-
className: THEME_EDITOR_BTN_SECONDARY,
|
|
35369
|
-
onClick: handleReset,
|
|
35370
|
-
children: t("pptx.themeEditor.reset")
|
|
35371
|
-
}
|
|
35372
|
-
)
|
|
35373
|
-
] })
|
|
35374
|
-
] });
|
|
35060
|
+
};
|
|
35061
|
+
node.addEventListener("theme-editor-apply", apply);
|
|
35062
|
+
node.addEventListener("theme-editor-close", onClose);
|
|
35063
|
+
return () => {
|
|
35064
|
+
node.removeEventListener("theme-editor-apply", apply);
|
|
35065
|
+
node.removeEventListener("theme-editor-close", onClose);
|
|
35066
|
+
};
|
|
35067
|
+
}, [canEdit, onApply, onClose]);
|
|
35068
|
+
return /* @__PURE__ */ jsx("pptx-ui-theme-editor", { ref });
|
|
35375
35069
|
}
|
|
35376
35070
|
function MobileDismissSheet({
|
|
35377
35071
|
onClose,
|
|
@@ -35918,22 +35612,15 @@ function ViewerSidePanels(props) {
|
|
|
35918
35612
|
}
|
|
35919
35613
|
),
|
|
35920
35614
|
s.isThemeEditorOpen && mode === "edit" && /* @__PURE__ */ jsx(
|
|
35921
|
-
|
|
35615
|
+
ThemeEditorPanel,
|
|
35922
35616
|
{
|
|
35923
|
-
|
|
35924
|
-
|
|
35925
|
-
|
|
35926
|
-
|
|
35927
|
-
|
|
35928
|
-
|
|
35929
|
-
|
|
35930
|
-
onUpdateColorScheme: themeHandlers.handleUpdateThemeColorScheme,
|
|
35931
|
-
onUpdateFontScheme: themeHandlers.handleUpdateThemeFontScheme,
|
|
35932
|
-
onUpdateThemeName: themeHandlers.handleUpdateThemeName,
|
|
35933
|
-
onApplyToPresentation: themeHandlers.handleApplyThemeToPresentation,
|
|
35934
|
-
onClose: () => s.setIsThemeEditorOpen(false)
|
|
35935
|
-
}
|
|
35936
|
-
)
|
|
35617
|
+
theme: s.theme,
|
|
35618
|
+
canEdit,
|
|
35619
|
+
onApply: async (edit) => {
|
|
35620
|
+
await themeHandlers.handleApplyThemeEdit(edit);
|
|
35621
|
+
s.setIsThemeEditorOpen(false);
|
|
35622
|
+
},
|
|
35623
|
+
onClose: () => s.setIsThemeEditorOpen(false)
|
|
35937
35624
|
}
|
|
35938
35625
|
),
|
|
35939
35626
|
aiPanel?.isOpen && aiConfig && aiBridge && (mode === "edit" || mode === "master") && /* @__PURE__ */ jsx(
|
|
@@ -35975,6 +35662,88 @@ function ViewerSidePanels(props) {
|
|
|
35975
35662
|
)
|
|
35976
35663
|
] });
|
|
35977
35664
|
}
|
|
35665
|
+
function ViewerContextMenus(props) {
|
|
35666
|
+
const {
|
|
35667
|
+
state,
|
|
35668
|
+
mode,
|
|
35669
|
+
selectedElement,
|
|
35670
|
+
activeSlideIndex,
|
|
35671
|
+
aiPanel,
|
|
35672
|
+
activeSlide,
|
|
35673
|
+
onApplyLayout,
|
|
35674
|
+
editorOps,
|
|
35675
|
+
setLayoutGalleryAnchor
|
|
35676
|
+
} = props;
|
|
35677
|
+
const { manipulation, tableOps } = editorOps;
|
|
35678
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
35679
|
+
state.contextMenuState && /* @__PURE__ */ jsx(
|
|
35680
|
+
ContextMenu,
|
|
35681
|
+
{
|
|
35682
|
+
slideIndex: activeSlideIndex,
|
|
35683
|
+
elementIds: state.effectiveSelectedIds,
|
|
35684
|
+
contextMenuState: state.contextMenuState,
|
|
35685
|
+
mode,
|
|
35686
|
+
selectedElement,
|
|
35687
|
+
tableEditorState: state.tableEditorState,
|
|
35688
|
+
hasMultiSelection: state.effectiveSelectedIds.length > 1,
|
|
35689
|
+
selectionGroupable: manipulation.selectionGroupable,
|
|
35690
|
+
hasClipboard: Boolean(state.clipboardPayload),
|
|
35691
|
+
editPointsAvailability: resolveEditPointsAvailability(selectedElement),
|
|
35692
|
+
onAction: manipulation.handleContextMenuAction,
|
|
35693
|
+
onInsertTableRow: tableOps.handleInsertTableRow,
|
|
35694
|
+
onDeleteTableRow: tableOps.handleDeleteTableRow,
|
|
35695
|
+
onInsertTableColumn: tableOps.handleInsertTableColumn,
|
|
35696
|
+
onDeleteTableColumn: tableOps.handleDeleteTableColumn,
|
|
35697
|
+
onMergeCellRight: tableOps.handleMergeCellRight,
|
|
35698
|
+
onMergeCellDown: tableOps.handleMergeCellDown,
|
|
35699
|
+
onMergeSelectedCells: tableOps.handleMergeSelectedCells,
|
|
35700
|
+
onSplitCell: tableOps.handleSplitCell,
|
|
35701
|
+
onAskAi: aiPanel && selectedElement ? () => {
|
|
35702
|
+
aiPanel.askAboutSelection();
|
|
35703
|
+
state.setContextMenuState(null);
|
|
35704
|
+
} : void 0,
|
|
35705
|
+
onFixAi: aiPanel && selectedElement ? () => {
|
|
35706
|
+
aiPanel.fixSelection();
|
|
35707
|
+
state.setContextMenuState(null);
|
|
35708
|
+
} : void 0,
|
|
35709
|
+
onClose: () => state.setContextMenuState(null)
|
|
35710
|
+
}
|
|
35711
|
+
),
|
|
35712
|
+
state.canvasContextMenuState && /* @__PURE__ */ jsx(
|
|
35713
|
+
CanvasContextMenu,
|
|
35714
|
+
{
|
|
35715
|
+
slideIndex: activeSlideIndex,
|
|
35716
|
+
canvasContextMenuState: state.canvasContextMenuState,
|
|
35717
|
+
mode,
|
|
35718
|
+
hasClipboard: Boolean(state.clipboardPayload),
|
|
35719
|
+
showGrid: state.showGrid,
|
|
35720
|
+
showRulers: state.showRulers,
|
|
35721
|
+
onPaste: () => manipulation.handlePaste(),
|
|
35722
|
+
onOpenLayoutGallery: () => {
|
|
35723
|
+
const pos = state.canvasContextMenuState;
|
|
35724
|
+
if (pos) {
|
|
35725
|
+
setLayoutGalleryAnchor(pos);
|
|
35726
|
+
}
|
|
35727
|
+
},
|
|
35728
|
+
onResetSlide: () => {
|
|
35729
|
+
const path = resetSlideLayoutPath(activeSlide);
|
|
35730
|
+
if (path) {
|
|
35731
|
+
onApplyLayout?.(path);
|
|
35732
|
+
}
|
|
35733
|
+
},
|
|
35734
|
+
onOpenFormatBackground: () => {
|
|
35735
|
+
state.setSelectedElementId(null);
|
|
35736
|
+
state.setSelectedElementIds([]);
|
|
35737
|
+
state.setSidebarPanelMode("properties");
|
|
35738
|
+
state.setIsInspectorPaneOpen(true);
|
|
35739
|
+
},
|
|
35740
|
+
onToggleGrid: () => state.setShowGrid((v) => !v),
|
|
35741
|
+
onToggleRulers: () => state.setShowRulers((v) => !v),
|
|
35742
|
+
onClose: () => state.setCanvasContextMenuState(null)
|
|
35743
|
+
}
|
|
35744
|
+
)
|
|
35745
|
+
] });
|
|
35746
|
+
}
|
|
35978
35747
|
function ViewerMainContent(props) {
|
|
35979
35748
|
const {
|
|
35980
35749
|
mode,
|
|
@@ -36021,8 +35790,8 @@ function ViewerMainContent(props) {
|
|
|
36021
35790
|
canvasHandlers,
|
|
36022
35791
|
insertHandlers,
|
|
36023
35792
|
manipulation,
|
|
36024
|
-
slideOps,
|
|
36025
35793
|
tableOps,
|
|
35794
|
+
slideOps,
|
|
36026
35795
|
findReplace
|
|
36027
35796
|
} = editorOps;
|
|
36028
35797
|
const hf = state.headerFooter;
|
|
@@ -36045,7 +35814,7 @@ function ViewerMainContent(props) {
|
|
|
36045
35814
|
);
|
|
36046
35815
|
const layoutGalleryAnchorRef = useRef(null);
|
|
36047
35816
|
const layoutGalleryPreviews = useLayoutPreviews(loadLayoutPreviews, layoutGalleryAnchor !== null);
|
|
36048
|
-
return /* @__PURE__ */ jsx(ChartPartSelectionProvider, { children: /* @__PURE__ */ jsxs("div", { className: "relative z-10 flex flex-1 min-h-0", children: [
|
|
35817
|
+
return /* @__PURE__ */ jsx(ChartPartSelectionProvider, { children: /* @__PURE__ */ jsxs("div", { "data-pptx-chrome": "body", className: "relative z-10 flex flex-1 min-h-0", children: [
|
|
36049
35818
|
showSlidesPane && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
36050
35819
|
/* @__PURE__ */ jsx(
|
|
36051
35820
|
SlidesPaneSidebar,
|
|
@@ -36177,69 +35946,7 @@ function ViewerMainContent(props) {
|
|
|
36177
35946
|
] }) : void 0
|
|
36178
35947
|
}
|
|
36179
35948
|
),
|
|
36180
|
-
|
|
36181
|
-
ContextMenu,
|
|
36182
|
-
{
|
|
36183
|
-
contextMenuState: state.contextMenuState,
|
|
36184
|
-
mode,
|
|
36185
|
-
selectedElement,
|
|
36186
|
-
tableEditorState: state.tableEditorState,
|
|
36187
|
-
hasMultiSelection: state.effectiveSelectedIds.length > 1,
|
|
36188
|
-
selectionGroupable: manipulation.selectionGroupable,
|
|
36189
|
-
hasClipboard: Boolean(state.clipboardPayload),
|
|
36190
|
-
editPointsAvailability: resolveEditPointsAvailability(selectedElement),
|
|
36191
|
-
onAction: manipulation.handleContextMenuAction,
|
|
36192
|
-
onInsertTableRow: tableOps.handleInsertTableRow,
|
|
36193
|
-
onDeleteTableRow: tableOps.handleDeleteTableRow,
|
|
36194
|
-
onInsertTableColumn: tableOps.handleInsertTableColumn,
|
|
36195
|
-
onDeleteTableColumn: tableOps.handleDeleteTableColumn,
|
|
36196
|
-
onMergeCellRight: tableOps.handleMergeCellRight,
|
|
36197
|
-
onMergeCellDown: tableOps.handleMergeCellDown,
|
|
36198
|
-
onMergeSelectedCells: tableOps.handleMergeSelectedCells,
|
|
36199
|
-
onSplitCell: tableOps.handleSplitCell,
|
|
36200
|
-
onAskAi: aiPanel && selectedElement ? () => {
|
|
36201
|
-
aiPanel.askAboutSelection();
|
|
36202
|
-
state.setContextMenuState(null);
|
|
36203
|
-
} : void 0,
|
|
36204
|
-
onFixAi: aiPanel && selectedElement ? () => {
|
|
36205
|
-
aiPanel.fixSelection();
|
|
36206
|
-
state.setContextMenuState(null);
|
|
36207
|
-
} : void 0,
|
|
36208
|
-
onClose: () => state.setContextMenuState(null)
|
|
36209
|
-
}
|
|
36210
|
-
),
|
|
36211
|
-
state.canvasContextMenuState && /* @__PURE__ */ jsx(
|
|
36212
|
-
CanvasContextMenu,
|
|
36213
|
-
{
|
|
36214
|
-
canvasContextMenuState: state.canvasContextMenuState,
|
|
36215
|
-
mode,
|
|
36216
|
-
hasClipboard: Boolean(state.clipboardPayload),
|
|
36217
|
-
showGrid: state.showGrid,
|
|
36218
|
-
showRulers: state.showRulers,
|
|
36219
|
-
onPaste: () => manipulation.handlePaste(),
|
|
36220
|
-
onOpenLayoutGallery: () => {
|
|
36221
|
-
const pos = state.canvasContextMenuState;
|
|
36222
|
-
if (pos) {
|
|
36223
|
-
setLayoutGalleryAnchor(pos);
|
|
36224
|
-
}
|
|
36225
|
-
},
|
|
36226
|
-
onResetSlide: () => {
|
|
36227
|
-
const path = resetSlideLayoutPath(activeSlide);
|
|
36228
|
-
if (path) {
|
|
36229
|
-
onApplyLayout?.(path);
|
|
36230
|
-
}
|
|
36231
|
-
},
|
|
36232
|
-
onOpenFormatBackground: () => {
|
|
36233
|
-
state.setSelectedElementId(null);
|
|
36234
|
-
state.setSelectedElementIds([]);
|
|
36235
|
-
state.setSidebarPanelMode("properties");
|
|
36236
|
-
state.setIsInspectorPaneOpen(true);
|
|
36237
|
-
},
|
|
36238
|
-
onToggleGrid: () => state.setShowGrid((v) => !v),
|
|
36239
|
-
onToggleRulers: () => state.setShowRulers((v) => !v),
|
|
36240
|
-
onClose: () => state.setCanvasContextMenuState(null)
|
|
36241
|
-
}
|
|
36242
|
-
),
|
|
35949
|
+
/* @__PURE__ */ jsx(ViewerContextMenus, { ...props, setLayoutGalleryAnchor }),
|
|
36243
35950
|
layoutGalleryAnchor && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
36244
35951
|
/* @__PURE__ */ jsx(
|
|
36245
35952
|
"div",
|
|
@@ -36423,6 +36130,9 @@ function CompatibilityToasts({
|
|
|
36423
36130
|
}
|
|
36424
36131
|
);
|
|
36425
36132
|
}
|
|
36133
|
+
function EditorChromeStyle() {
|
|
36134
|
+
return /* @__PURE__ */ jsx("style", { "data-pptx-editor-styles": "", children: EDITOR_CHROME_CSS });
|
|
36135
|
+
}
|
|
36426
36136
|
function ToggleRow({ checked, onChange, icon, label, testId }) {
|
|
36427
36137
|
return /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2.5 cursor-pointer group select-none", children: [
|
|
36428
36138
|
/* @__PURE__ */ jsxs("span", { className: "relative flex items-center justify-center w-4 h-4", children: [
|
|
@@ -36740,7 +36450,7 @@ function MobileChromeOverlay(props) {
|
|
|
36740
36450
|
/* @__PURE__ */ jsx(
|
|
36741
36451
|
MobileSlidesSheet,
|
|
36742
36452
|
{
|
|
36743
|
-
open: s.isSlidesPaneOpen,
|
|
36453
|
+
open: s.isSlidesPaneOpen && !s.isThemeEditorOpen,
|
|
36744
36454
|
onClose: () => s.setIsSlidesPaneOpen(false),
|
|
36745
36455
|
slides,
|
|
36746
36456
|
templateElementsBySlideId: s.templateElementsBySlideId,
|
|
@@ -39289,6 +38999,7 @@ var PowerPointViewer = forwardRef(
|
|
|
39289
38999
|
{
|
|
39290
39000
|
style: themeStyle,
|
|
39291
39001
|
"data-pptx-viewer": "",
|
|
39002
|
+
"data-pptx-editor-chrome": "",
|
|
39292
39003
|
...{ [RIBBON_SCOPE_ATTR]: ribbonScope },
|
|
39293
39004
|
"aria-busy": loading,
|
|
39294
39005
|
className: cn(
|
|
@@ -39296,6 +39007,7 @@ var PowerPointViewer = forwardRef(
|
|
|
39296
39007
|
...resolveOptionRootClasses(viewerOptions, "pptx")
|
|
39297
39008
|
),
|
|
39298
39009
|
children: [
|
|
39010
|
+
/* @__PURE__ */ jsx(EditorChromeStyle, {}),
|
|
39299
39011
|
/* @__PURE__ */ jsx(RibbonCustomizationStyle, { resolved: customizationResolved, scope: ribbonScope }),
|
|
39300
39012
|
/* @__PURE__ */ jsx(
|
|
39301
39013
|
"div",
|