pptx-react-viewer 4.15.0 → 4.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/dist/{AiChatPanel-CDQWJTWL.js → AiChatPanel-DFZSMXJB.js} +28 -28
- package/dist/AiChatPanel-DFZSMXJB.js.br +0 -0
- package/dist/AiChatPanel-DFZSMXJB.js.gz +0 -0
- package/dist/{AiChatPanel-7OVUGUKW.mjs → AiChatPanel-K3PL6O3M.mjs} +4 -4
- package/dist/AiChatPanel-K3PL6O3M.mjs.br +0 -0
- package/dist/AiChatPanel-K3PL6O3M.mjs.gz +0 -0
- package/dist/{Model3DScene-A3CPMFAO.mjs → Model3DScene-EOKTWVG7.mjs} +1 -1
- package/dist/Model3DScene-EOKTWVG7.mjs.br +0 -0
- package/dist/Model3DScene-EOKTWVG7.mjs.gz +0 -0
- package/dist/{Model3DScene-OLGB7Z7Q.js → Model3DScene-ZYC5U7NY.js} +2 -2
- package/dist/Model3DScene-ZYC5U7NY.js.br +0 -0
- package/dist/Model3DScene-ZYC5U7NY.js.gz +0 -0
- package/dist/{chunk-CJSIEITL.mjs → chunk-33XJSD62.mjs} +3 -0
- package/dist/chunk-33XJSD62.mjs.br +0 -0
- package/dist/{chunk-CJSIEITL.mjs.gz → chunk-33XJSD62.mjs.gz} +0 -0
- package/dist/{chunk-2CSRCH4H.js → chunk-4VV5HJXQ.js} +3691 -858
- package/dist/chunk-4VV5HJXQ.js.br +0 -0
- package/dist/chunk-4VV5HJXQ.js.gz +0 -0
- package/dist/{chunk-RQCAXUVQ.mjs → chunk-6PWT46Y4.mjs} +816 -1407
- package/dist/chunk-6PWT46Y4.mjs.br +0 -0
- package/dist/chunk-6PWT46Y4.mjs.gz +0 -0
- package/dist/{chunk-UP6PJEHM.js → chunk-CWVPHCMJ.js} +5 -5
- package/dist/chunk-CWVPHCMJ.js.br +0 -0
- package/dist/chunk-CWVPHCMJ.js.gz +0 -0
- package/dist/{chunk-Q5VQ53R3.mjs → chunk-KK2CFTKC.mjs} +2 -2
- package/dist/chunk-KK2CFTKC.mjs.br +0 -0
- package/dist/chunk-KK2CFTKC.mjs.gz +0 -0
- package/dist/{chunk-XEYB25ZT.js → chunk-LJEI7O6S.js} +3 -0
- package/dist/chunk-LJEI7O6S.js.br +0 -0
- package/dist/{chunk-XEYB25ZT.js.gz → chunk-LJEI7O6S.js.gz} +0 -0
- package/dist/{chunk-AHJ4ND7Q.mjs → chunk-QZSA3E4L.mjs} +1 -1
- package/dist/chunk-QZSA3E4L.mjs.br +0 -0
- package/dist/chunk-QZSA3E4L.mjs.gz +0 -0
- package/dist/{chunk-CNXVOFUW.js → chunk-RE6NDQH7.js} +197 -197
- package/dist/chunk-RE6NDQH7.js.br +0 -0
- package/dist/chunk-RE6NDQH7.js.gz +0 -0
- package/dist/{chunk-DNWIW75I.mjs → chunk-VUI3VE7K.mjs} +52 -8
- package/dist/chunk-VUI3VE7K.mjs.br +0 -0
- package/dist/chunk-VUI3VE7K.mjs.gz +0 -0
- package/dist/{chunk-AIWEM7VE.mjs → chunk-VUNRFZRR.mjs} +3679 -849
- package/dist/chunk-VUNRFZRR.mjs.br +0 -0
- package/dist/chunk-VUNRFZRR.mjs.gz +0 -0
- package/dist/{chunk-6ZPXMS64.js → chunk-VVGYZBF5.js} +2803 -3394
- package/dist/chunk-VVGYZBF5.js.br +0 -0
- package/dist/chunk-VVGYZBF5.js.gz +0 -0
- package/dist/{chunk-HGO243GV.js → chunk-XVJSAY7C.js} +864 -820
- package/dist/chunk-XVJSAY7C.js.br +0 -0
- package/dist/chunk-XVJSAY7C.js.gz +0 -0
- package/dist/i18n/de.cjs +6 -0
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +6 -0
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +6 -0
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +6 -0
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +6 -0
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +6 -0
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +6 -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 +6 -0
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +140 -1
- package/dist/index.js +63 -63
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +147 -0
- package/dist/internals.js +105 -105
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.d.ts +137 -0
- package/dist/viewer/index.js +27 -27
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +1 -2
- 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.br +0 -0
- package/dist/Model3DScene-A3CPMFAO.mjs.gz +0 -0
- package/dist/Model3DScene-OLGB7Z7Q.js.br +0 -0
- package/dist/Model3DScene-OLGB7Z7Q.js.gz +0 -0
- package/dist/chunk-2CSRCH4H.js.br +0 -0
- package/dist/chunk-2CSRCH4H.js.gz +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-AIWEM7VE.mjs.gz +0 -0
- package/dist/chunk-CJSIEITL.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
- package/dist/chunk-XEYB25ZT.js.br +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
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';
|
|
5
|
-
import { LOCALE_CATALOG, ALIGNMENT_LABEL_KEYS } from './chunk-
|
|
6
|
-
import
|
|
1
|
+
import { computeFocusTargets, deckDataFieldChanged, aiChangeAnimationCss, changeGhostStyle, createChatHistoryStore, collectStoredChats, exportAiChatLogs, applyElementUpdate } from './chunk-QZSA3E4L.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-VUI3VE7K.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-KK2CFTKC.mjs';
|
|
4
|
+
import { EMPTY_RESOLVED_CUSTOMIZATION, FIXED_TAB_GALLERIES, 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, DESIGN_RIBBON_GROUPS, DESIGN_RIBBON_COMMANDS, designCommandState, 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, canGroupSelection, canUngroupSelection, canSetStrokeWidth, strokeWidthOf, readRibbonTransitionDraft, ribbonTransitionUpdates, playSlideTransitionPreview, RIBBON_TRANSITION_PRESETS, transitionSoundOptions, transitionSoundSelectedValue, DEFAULT_MOTION_PATH_PRESET_ID, SLIDE_SHOW_COMMAND_GROUPS, RECORD_COMMAND_GROUPS, buildReviewRibbon, HELP_RIBBON_COMMANDS, galleryTextLabel, masterViewPseudoSlide, PRESENTATION_ANIM_TRIGGER_ATTRIBUTE, motionPathFor, setMotionPath, getShapeAdjustmentHandleDescriptors, shouldShowElementHandles, clampFlyoutPosition, computeAnchoredPopupPosition, applyTableStyleDelete, applyTableStyleMapChange, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, SLIDE_TEMPLATES, buildThemeColorSwatchGrid, themeColorSwatchRows, findSelectedThemeSwatch, themeSwatchCommit, applyRibbonGalleryItem, 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-VUNRFZRR.mjs';
|
|
5
|
+
import { LOCALE_CATALOG, ALIGNMENT_LABEL_KEYS } from './chunk-33XJSD62.mjs';
|
|
6
|
+
import React7, { 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
|
-
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,
|
|
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, 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, LuPencil, LuAlignLeft, LuAlignCenter, LuAlignRight, LuAlignHorizontalSpaceAround, LuAlignVerticalSpaceAround, LuGroup, LuUngroup, LuStar, LuMousePointerClick, LuPanelTop, LuBookOpen, LuGrid3X3, LuPipette, LuRuler, LuMaximize2, LuCode, LuMove, LuRadio, LuAlignJustify, LuColumns3, LuCombine, LuCrop, LuFilter, LuLockOpen, LuReply, LuRotateCw, LuBookmark } from 'react-icons/lu';
|
|
10
10
|
|
|
11
11
|
var ViewerThemeContext = createContext(void 0);
|
|
12
12
|
function ViewerThemeProvider({ theme, children }) {
|
|
@@ -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
|
{
|
|
@@ -1457,183 +1459,137 @@ var RibbonGalleryCommandsContext = createContext(null);
|
|
|
1457
1459
|
function useRibbonGalleryCommands() {
|
|
1458
1460
|
return useContext(RibbonGalleryCommandsContext);
|
|
1459
1461
|
}
|
|
1460
|
-
function
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
return fallback;
|
|
1465
|
-
}
|
|
1466
|
-
const translated = t(key);
|
|
1467
|
-
return translated && translated !== key ? translated : fallback;
|
|
1468
|
-
};
|
|
1469
|
-
}
|
|
1470
|
-
function RibbonGalleryTile({
|
|
1471
|
-
item,
|
|
1472
|
-
disabled,
|
|
1473
|
-
inStrip,
|
|
1474
|
-
onPick
|
|
1462
|
+
function RibbonGallery({
|
|
1463
|
+
placement,
|
|
1464
|
+
chevronOnly = false,
|
|
1465
|
+
tagControl = true
|
|
1475
1466
|
}) {
|
|
1476
1467
|
const { t } = useTranslation();
|
|
1477
|
-
const
|
|
1468
|
+
const ref = useRef(null);
|
|
1469
|
+
const commands = useRibbonGalleryCommands();
|
|
1470
|
+
const context = commands?.context;
|
|
1471
|
+
const descriptor = useMemo(
|
|
1472
|
+
() => buildRibbonGallery(placement.gallery, context ?? { element: null }),
|
|
1473
|
+
[placement.gallery, context]
|
|
1474
|
+
);
|
|
1475
|
+
useEffect(() => {
|
|
1476
|
+
const host = ref.current;
|
|
1477
|
+
if (host) {
|
|
1478
|
+
host.descriptor = descriptor;
|
|
1479
|
+
host.translateLabel = t;
|
|
1480
|
+
host.disabled = !commands?.editable;
|
|
1481
|
+
}
|
|
1482
|
+
}, [descriptor, t, commands?.editable]);
|
|
1483
|
+
useEffect(() => {
|
|
1484
|
+
const host = ref.current;
|
|
1485
|
+
if (!host) {
|
|
1486
|
+
return;
|
|
1487
|
+
}
|
|
1488
|
+
const pick = (event) => {
|
|
1489
|
+
if (!commands?.editable) {
|
|
1490
|
+
return;
|
|
1491
|
+
}
|
|
1492
|
+
const result = applyRibbonGalleryItem(
|
|
1493
|
+
placement.gallery,
|
|
1494
|
+
event.detail.itemId,
|
|
1495
|
+
commands.context
|
|
1496
|
+
);
|
|
1497
|
+
if (result) {
|
|
1498
|
+
commands.dispatch(result);
|
|
1499
|
+
}
|
|
1500
|
+
};
|
|
1501
|
+
host.addEventListener("gallery-pick", pick);
|
|
1502
|
+
return () => host.removeEventListener("gallery-pick", pick);
|
|
1503
|
+
}, [commands, placement.gallery]);
|
|
1478
1504
|
return /* @__PURE__ */ jsx(
|
|
1479
|
-
"
|
|
1505
|
+
"pptx-ui-ribbon-gallery",
|
|
1480
1506
|
{
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
"
|
|
1485
|
-
|
|
1486
|
-
disabled,
|
|
1487
|
-
onMouseDown: (event) => event.preventDefault(),
|
|
1488
|
-
onClick: () => onPick(item),
|
|
1489
|
-
className: cn(
|
|
1490
|
-
"grid shrink-0 place-items-center rounded-sm border border-transparent p-0.5 transition-colors hover:border-primary/60 hover:bg-accent disabled:cursor-not-allowed disabled:opacity-40",
|
|
1491
|
-
item.applied && "border-primary ring-1 ring-primary/40",
|
|
1492
|
-
inStrip && "[&>svg]:h-[40px] [&>svg]:w-auto"
|
|
1493
|
-
),
|
|
1494
|
-
dangerouslySetInnerHTML: { __html: item.previewSvg }
|
|
1507
|
+
ref,
|
|
1508
|
+
label: descriptor.label,
|
|
1509
|
+
mode: placement.mode,
|
|
1510
|
+
"chevron-only": chevronOnly || void 0,
|
|
1511
|
+
"data-ribbon-control": tagControl ? placement.control : void 0
|
|
1495
1512
|
}
|
|
1496
1513
|
);
|
|
1497
1514
|
}
|
|
1498
|
-
function
|
|
1499
|
-
|
|
1500
|
-
|
|
1515
|
+
function useIntent(ref, type, callback) {
|
|
1516
|
+
useEffect(() => {
|
|
1517
|
+
const host = ref.current;
|
|
1518
|
+
if (!host || !callback) {
|
|
1519
|
+
return;
|
|
1520
|
+
}
|
|
1521
|
+
host.addEventListener(type, callback);
|
|
1522
|
+
return () => host.removeEventListener(type, callback);
|
|
1523
|
+
}, [ref, type, callback]);
|
|
1524
|
+
}
|
|
1525
|
+
function WebRibbonGroup({
|
|
1526
|
+
label,
|
|
1527
|
+
groupId,
|
|
1528
|
+
children
|
|
1501
1529
|
}) {
|
|
1502
|
-
|
|
1503
|
-
if (section.items.length === 0) {
|
|
1504
|
-
return null;
|
|
1505
|
-
}
|
|
1506
|
-
const heading = section.titleKey || section.title ? translateOr(section.titleKey, section.title ?? "") : "";
|
|
1507
|
-
return /* @__PURE__ */ jsxs("div", { className: "px-2 py-1", children: [
|
|
1508
|
-
heading && /* @__PURE__ */ jsx("div", { className: "pb-1 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground", children: heading }),
|
|
1509
|
-
/* @__PURE__ */ jsx(
|
|
1510
|
-
"div",
|
|
1511
|
-
{
|
|
1512
|
-
className: "grid gap-1",
|
|
1513
|
-
style: { gridTemplateColumns: `repeat(${Math.max(1, section.columns)}, max-content)` },
|
|
1514
|
-
children: section.items.map((item) => /* @__PURE__ */ jsx(RibbonGalleryTile, { item, onPick }, item.id))
|
|
1515
|
-
}
|
|
1516
|
-
)
|
|
1517
|
-
] });
|
|
1530
|
+
return /* @__PURE__ */ jsx("pptx-ui-ribbon-group", { label, "data-ribbon-group": groupId, children });
|
|
1518
1531
|
}
|
|
1519
|
-
function
|
|
1520
|
-
descriptor,
|
|
1521
|
-
anchorRef,
|
|
1532
|
+
function WebRibbonCommand({
|
|
1522
1533
|
label,
|
|
1523
|
-
|
|
1534
|
+
icon,
|
|
1535
|
+
controlId,
|
|
1536
|
+
title,
|
|
1537
|
+
disabled,
|
|
1538
|
+
active,
|
|
1539
|
+
pressed,
|
|
1540
|
+
expanded,
|
|
1541
|
+
compact,
|
|
1542
|
+
onCommand
|
|
1524
1543
|
}) {
|
|
1525
|
-
|
|
1526
|
-
|
|
1544
|
+
const ref = useRef(null);
|
|
1545
|
+
useIntent(
|
|
1546
|
+
ref,
|
|
1547
|
+
"command-request",
|
|
1548
|
+
onCommand ? (event) => onCommand(event.detail.id) : void 0
|
|
1549
|
+
);
|
|
1550
|
+
return /* @__PURE__ */ jsx(
|
|
1551
|
+
"pptx-ui-ribbon-command",
|
|
1527
1552
|
{
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1553
|
+
ref,
|
|
1554
|
+
label,
|
|
1555
|
+
icon,
|
|
1556
|
+
"data-ribbon-control": controlId,
|
|
1557
|
+
title,
|
|
1558
|
+
disabled: disabled || void 0,
|
|
1559
|
+
active: active || void 0,
|
|
1560
|
+
pressed: pressed === void 0 ? void 0 : String(pressed),
|
|
1561
|
+
expanded: expanded === void 0 ? void 0 : String(expanded),
|
|
1562
|
+
compact: compact || void 0
|
|
1533
1563
|
}
|
|
1534
|
-
)
|
|
1564
|
+
);
|
|
1535
1565
|
}
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1566
|
+
function WebRibbonToggle({
|
|
1567
|
+
label,
|
|
1568
|
+
controlId,
|
|
1569
|
+
checked,
|
|
1570
|
+
title,
|
|
1571
|
+
onToggle
|
|
1542
1572
|
}) {
|
|
1543
|
-
const
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
const disabled = !commands?.editable || descriptor.disabled || !galleryHasItems(descriptor);
|
|
1552
|
-
const open = dropdown.open && !disabled;
|
|
1553
|
-
const pick = (item) => {
|
|
1554
|
-
const result = applyRibbonGalleryItem(gallery, item.id, ctx);
|
|
1555
|
-
if (result) {
|
|
1556
|
-
commands?.dispatch(result);
|
|
1557
|
-
}
|
|
1558
|
-
dropdown.setOpen(false);
|
|
1559
|
-
};
|
|
1560
|
-
const controlAttrs = tagControl ? { [RIBBON_CONTROL_ATTR]: control } : {};
|
|
1561
|
-
const galleryAttrs = { [RIBBON_GALLERY_ATTR]: gallery };
|
|
1562
|
-
const popup = open && /* @__PURE__ */ jsx(
|
|
1563
|
-
RibbonGalleryPopup,
|
|
1573
|
+
const ref = useRef(null);
|
|
1574
|
+
useIntent(
|
|
1575
|
+
ref,
|
|
1576
|
+
"toggle-request",
|
|
1577
|
+
onToggle ? (event) => onToggle(event.detail.checked) : void 0
|
|
1578
|
+
);
|
|
1579
|
+
return /* @__PURE__ */ jsx(
|
|
1580
|
+
"pptx-ui-ribbon-toggle",
|
|
1564
1581
|
{
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1582
|
+
ref,
|
|
1583
|
+
label,
|
|
1584
|
+
"data-ribbon-control": controlId,
|
|
1585
|
+
checked: checked || void 0,
|
|
1586
|
+
title
|
|
1569
1587
|
}
|
|
1570
1588
|
);
|
|
1571
|
-
if (mode === "inline") {
|
|
1572
|
-
const moreLabel = t("pptx.gallery.more", { name: title });
|
|
1573
|
-
return /* @__PURE__ */ jsxs(
|
|
1574
|
-
"div",
|
|
1575
|
-
{
|
|
1576
|
-
ref: dropdown.ref,
|
|
1577
|
-
...controlAttrs,
|
|
1578
|
-
className: "relative inline-flex items-stretch rounded border border-border/60 bg-background/40",
|
|
1579
|
-
children: [
|
|
1580
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5 p-0.5", children: inlineGalleryItems(descriptor).map((item) => /* @__PURE__ */ jsx(
|
|
1581
|
-
RibbonGalleryTile,
|
|
1582
|
-
{
|
|
1583
|
-
item,
|
|
1584
|
-
disabled,
|
|
1585
|
-
inStrip: true,
|
|
1586
|
-
onPick: pick
|
|
1587
|
-
},
|
|
1588
|
-
item.id
|
|
1589
|
-
)) }),
|
|
1590
|
-
/* @__PURE__ */ jsx(
|
|
1591
|
-
"button",
|
|
1592
|
-
{
|
|
1593
|
-
type: "button",
|
|
1594
|
-
...galleryAttrs,
|
|
1595
|
-
"aria-label": moreLabel,
|
|
1596
|
-
"aria-haspopup": "true",
|
|
1597
|
-
"aria-expanded": open,
|
|
1598
|
-
title: moreLabel,
|
|
1599
|
-
disabled,
|
|
1600
|
-
onClick: () => dropdown.setOpen((v) => !v),
|
|
1601
|
-
className: "inline-flex items-center border-l border-border/60 px-0.5 hover:bg-accent disabled:cursor-not-allowed disabled:opacity-40",
|
|
1602
|
-
children: /* @__PURE__ */ jsx(LuChevronDown, { className: "h-3 w-3" })
|
|
1603
|
-
}
|
|
1604
|
-
),
|
|
1605
|
-
popup
|
|
1606
|
-
]
|
|
1607
|
-
}
|
|
1608
|
-
);
|
|
1609
|
-
}
|
|
1610
|
-
return /* @__PURE__ */ jsxs("div", { ref: dropdown.ref, ...controlAttrs, className: "relative inline-flex items-center", children: [
|
|
1611
|
-
/* @__PURE__ */ jsxs(
|
|
1612
|
-
"button",
|
|
1613
|
-
{
|
|
1614
|
-
type: "button",
|
|
1615
|
-
...galleryAttrs,
|
|
1616
|
-
"aria-haspopup": "true",
|
|
1617
|
-
"aria-expanded": open,
|
|
1618
|
-
"aria-label": title,
|
|
1619
|
-
title,
|
|
1620
|
-
disabled,
|
|
1621
|
-
onMouseDown: (event) => event.preventDefault(),
|
|
1622
|
-
onClick: () => dropdown.setOpen((v) => !v),
|
|
1623
|
-
className: chevronOnly ? "inline-flex items-center self-stretch px-0.5 hover:bg-accent disabled:cursor-not-allowed disabled:opacity-40" : pill,
|
|
1624
|
-
children: [
|
|
1625
|
-
!chevronOnly && icon,
|
|
1626
|
-
!chevronOnly && /* @__PURE__ */ jsx("span", { className: "whitespace-nowrap", children: title }),
|
|
1627
|
-
/* @__PURE__ */ jsx(LuChevronDown, { className: "h-3 w-3" })
|
|
1628
|
-
]
|
|
1629
|
-
}
|
|
1630
|
-
),
|
|
1631
|
-
popup
|
|
1632
|
-
] });
|
|
1633
1589
|
}
|
|
1634
1590
|
function useTransitionSoundPicker(activeSlide, onTransitionChange) {
|
|
1635
|
-
const soundFileInputRef =
|
|
1636
|
-
const handleSoundFilePicked =
|
|
1591
|
+
const soundFileInputRef = React7.useRef(null);
|
|
1592
|
+
const handleSoundFilePicked = React7.useCallback(
|
|
1637
1593
|
(file) => {
|
|
1638
1594
|
void readSoundFileAsDataUrl(file).then((dataUrl) => {
|
|
1639
1595
|
if (dataUrl) {
|
|
@@ -1644,7 +1600,7 @@ function useTransitionSoundPicker(activeSlide, onTransitionChange) {
|
|
|
1644
1600
|
},
|
|
1645
1601
|
[onTransitionChange]
|
|
1646
1602
|
);
|
|
1647
|
-
const handleSoundSelectChange =
|
|
1603
|
+
const handleSoundSelectChange = React7.useCallback(
|
|
1648
1604
|
(event) => {
|
|
1649
1605
|
const value = event.target.value;
|
|
1650
1606
|
if (value === TRANSITION_SOUND_OTHER_VALUE) {
|
|
@@ -1663,7 +1619,7 @@ function useTransitionSoundPicker(activeSlide, onTransitionChange) {
|
|
|
1663
1619
|
},
|
|
1664
1620
|
[activeSlide, onTransitionChange]
|
|
1665
1621
|
);
|
|
1666
|
-
const handleSoundFileChange =
|
|
1622
|
+
const handleSoundFileChange = React7.useCallback(
|
|
1667
1623
|
(event) => {
|
|
1668
1624
|
const file = event.target.files?.[0];
|
|
1669
1625
|
if (file) {
|
|
@@ -1674,7 +1630,7 @@ function useTransitionSoundPicker(activeSlide, onTransitionChange) {
|
|
|
1674
1630
|
[handleSoundFilePicked]
|
|
1675
1631
|
);
|
|
1676
1632
|
const stockSoundId = transitionStockSoundId(activeSlide?.transition);
|
|
1677
|
-
const handleSoundPreview =
|
|
1633
|
+
const handleSoundPreview = React7.useCallback(() => {
|
|
1678
1634
|
if (!stockSoundId) {
|
|
1679
1635
|
return;
|
|
1680
1636
|
}
|
|
@@ -1694,10 +1650,10 @@ function useTransitionSoundPicker(activeSlide, onTransitionChange) {
|
|
|
1694
1650
|
function TransitionsSection(p) {
|
|
1695
1651
|
const { t } = useTranslation();
|
|
1696
1652
|
const canEdit = p.canEdit !== false;
|
|
1697
|
-
const draft =
|
|
1698
|
-
const [durationBuffer, setDurationBuffer] =
|
|
1699
|
-
const [advanceBuffer, setAdvanceBuffer] =
|
|
1700
|
-
const commit =
|
|
1653
|
+
const draft = React7.useMemo(() => readRibbonTransitionDraft(p.activeSlide), [p.activeSlide]);
|
|
1654
|
+
const [durationBuffer, setDurationBuffer] = React7.useState(null);
|
|
1655
|
+
const [advanceBuffer, setAdvanceBuffer] = React7.useState(null);
|
|
1656
|
+
const commit = React7.useCallback(
|
|
1701
1657
|
(changes) => {
|
|
1702
1658
|
p.onTransitionChange(ribbonTransitionUpdates({ ...draft, ...changes }));
|
|
1703
1659
|
},
|
|
@@ -1921,93 +1877,54 @@ function TransitionsSection(p) {
|
|
|
1921
1877
|
)
|
|
1922
1878
|
] });
|
|
1923
1879
|
}
|
|
1924
|
-
var DESIGN_VARIANT_GALLERIES = FIXED_TAB_GALLERIES.filter(
|
|
1925
|
-
(placement) => placement.control.startsWith("design.variants.")
|
|
1926
|
-
);
|
|
1927
1880
|
function DesignSection(p) {
|
|
1928
1881
|
const { t } = useTranslation();
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
{
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
)) }),
|
|
1976
|
-
/* @__PURE__ */ jsx("span", { className: "text-[9px] text-muted-foreground leading-none", children: t("pptx.ribbon.groupVariants") })
|
|
1977
|
-
] }),
|
|
1978
|
-
sep,
|
|
1979
|
-
/* @__PURE__ */ jsxs(RibbonGroupScope, { id: "design.customize", children: [
|
|
1980
|
-
(p.onOpenSlideSize ?? p.onOpenDocumentProperties) && /* @__PURE__ */ jsxs(
|
|
1981
|
-
"button",
|
|
1982
|
-
{
|
|
1983
|
-
onClick: p.onOpenSlideSize ?? p.onOpenDocumentProperties,
|
|
1984
|
-
className: pill,
|
|
1985
|
-
title: t("pptx.ribbon.slideSizeTitle"),
|
|
1986
|
-
...controlAttr("design.customize.slideSize"),
|
|
1987
|
-
children: [
|
|
1988
|
-
/* @__PURE__ */ jsx(LuMonitor, { className: ics }),
|
|
1989
|
-
t("pptx.ribbon.slideSize")
|
|
1990
|
-
]
|
|
1991
|
-
}
|
|
1992
|
-
),
|
|
1993
|
-
p.onToggleInspector && /* @__PURE__ */ jsxs(
|
|
1994
|
-
"button",
|
|
1995
|
-
{
|
|
1996
|
-
onClick: p.onToggleInspector,
|
|
1997
|
-
className: cn(
|
|
1998
|
-
pill,
|
|
1999
|
-
p.isInspectorPaneOpen ? "bg-primary hover:bg-primary/80 text-white" : ""
|
|
2000
|
-
),
|
|
2001
|
-
title: t("pptx.ribbon.formatBackgroundTitle"),
|
|
2002
|
-
...controlAttr("design.customize.formatBackground"),
|
|
2003
|
-
children: [
|
|
2004
|
-
/* @__PURE__ */ jsx(LuPaintBucket, { className: ics }),
|
|
2005
|
-
t("pptx.ribbon.formatBackground")
|
|
2006
|
-
]
|
|
2007
|
-
}
|
|
2008
|
-
)
|
|
2009
|
-
] })
|
|
2010
|
-
] });
|
|
1882
|
+
const actions = {
|
|
1883
|
+
"design.themes.browseThemes": p.onToggleThemeGallery,
|
|
1884
|
+
"design.themes.editTheme": p.onToggleThemeEditor,
|
|
1885
|
+
"design.customize.slideSize": p.onOpenSlideSize ?? p.onOpenDocumentProperties,
|
|
1886
|
+
"design.customize.formatBackground": p.onToggleInspector
|
|
1887
|
+
};
|
|
1888
|
+
const state = {
|
|
1889
|
+
editable: p.canEdit,
|
|
1890
|
+
galleryOpen: p.isThemeGalleryOpen,
|
|
1891
|
+
editorOpen: p.isThemeEditorOpen,
|
|
1892
|
+
backgroundOpen: p.isInspectorPaneOpen,
|
|
1893
|
+
hasSlideSize: Boolean(actions["design.customize.slideSize"]),
|
|
1894
|
+
hasBackground: Boolean(p.onToggleInspector)
|
|
1895
|
+
};
|
|
1896
|
+
return /* @__PURE__ */ jsx(Fragment, { children: DESIGN_RIBBON_GROUPS.map((group) => /* @__PURE__ */ jsxs(WebRibbonGroup, { groupId: group.id, label: t(group.labelKey), children: [
|
|
1897
|
+
DESIGN_RIBBON_COMMANDS.filter((command) => command.id.startsWith(`${group.id}.`)).map(
|
|
1898
|
+
(command) => {
|
|
1899
|
+
const view = designCommandState(command.id, state);
|
|
1900
|
+
return view.hidden ? null : /* @__PURE__ */ jsx(
|
|
1901
|
+
WebRibbonCommand,
|
|
1902
|
+
{
|
|
1903
|
+
controlId: command.id,
|
|
1904
|
+
label: t(command.labelKey),
|
|
1905
|
+
title: t(command.titleKey),
|
|
1906
|
+
icon: command.icon,
|
|
1907
|
+
compact: true,
|
|
1908
|
+
disabled: view.disabled,
|
|
1909
|
+
active: view.active,
|
|
1910
|
+
expanded: view.expanded,
|
|
1911
|
+
onCommand: () => actions[command.id]?.()
|
|
1912
|
+
},
|
|
1913
|
+
command.id
|
|
1914
|
+
);
|
|
1915
|
+
}
|
|
1916
|
+
),
|
|
1917
|
+
FIXED_TAB_GALLERIES.filter(
|
|
1918
|
+
(placement) => placement.control.startsWith(`${group.id}.`)
|
|
1919
|
+
).map((placement) => /* @__PURE__ */ jsx(
|
|
1920
|
+
RibbonGallery,
|
|
1921
|
+
{
|
|
1922
|
+
placement,
|
|
1923
|
+
icon: placement.gallery === "themeFonts" ? /* @__PURE__ */ jsx(LuType, {}) : /* @__PURE__ */ jsx(LuPalette, {})
|
|
1924
|
+
},
|
|
1925
|
+
placement.control
|
|
1926
|
+
))
|
|
1927
|
+
] }, group.id)) });
|
|
2011
1928
|
}
|
|
2012
1929
|
var DEFAULT_VALUE = {
|
|
2013
1930
|
recentColors: [],
|
|
@@ -2222,7 +2139,7 @@ function AccountPage() {
|
|
|
2222
2139
|
return void 0;
|
|
2223
2140
|
});
|
|
2224
2141
|
};
|
|
2225
|
-
const version = "4.
|
|
2142
|
+
const version = "4.16.0" ;
|
|
2226
2143
|
return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
2227
2144
|
/* @__PURE__ */ jsxs("section", { className: cardClass, children: [
|
|
2228
2145
|
/* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -2695,42 +2612,50 @@ function ClipboardGroup(p) {
|
|
|
2695
2612
|
/* @__PURE__ */ jsx("span", { className: "text-[9px] text-muted-foreground leading-none", children: t("pptx.ribbon.clipboard") })
|
|
2696
2613
|
] });
|
|
2697
2614
|
}
|
|
2698
|
-
function
|
|
2699
|
-
const { t } = useTranslation();
|
|
2700
|
-
const groups = buildFontCatalog({
|
|
2701
|
-
themeFonts: p.themeFonts,
|
|
2702
|
-
embeddedFonts: p.embeddedFonts,
|
|
2703
|
-
customFonts: p.customFonts
|
|
2704
|
-
});
|
|
2705
|
-
return /* @__PURE__ */ jsx(RibbonMenu, { anchorRef: p.anchorRef, className: "flex flex-col w-64 pt-1", children: /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-border bg-popover backdrop-blur-lg shadow-2xl py-1 max-h-80 overflow-y-auto", children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs(React6.Fragment, { children: [
|
|
2706
|
-
/* @__PURE__ */ jsx(
|
|
2707
|
-
"div",
|
|
2708
|
-
{
|
|
2709
|
-
className: `px-3 pb-1 pt-2 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground${groupIndex > 0 ? " border-t border-border/60 mt-1" : ""}`,
|
|
2710
|
-
children: t(group.labelKey)
|
|
2711
|
-
}
|
|
2712
|
-
),
|
|
2713
|
-
group.entries.map((entry) => /* @__PURE__ */ jsx(FontRow, { entry, onSelect: p.onSelect }, `${group.id}-${entry.family}`))
|
|
2714
|
-
] }, group.id)) }) });
|
|
2715
|
-
}
|
|
2716
|
-
function FontRow({
|
|
2717
|
-
entry,
|
|
2718
|
-
onSelect
|
|
2719
|
-
}) {
|
|
2615
|
+
function FontPickers(p) {
|
|
2720
2616
|
const { t } = useTranslation();
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
{
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2617
|
+
const groups = buildFontCatalog(p);
|
|
2618
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-0.5", "data-ribbon-group": "home.font", children: [
|
|
2619
|
+
/* @__PURE__ */ jsxs("div", { "data-pptx-chrome": "font-picker-controls", children: [
|
|
2620
|
+
/* @__PURE__ */ jsx(
|
|
2621
|
+
WebSelect,
|
|
2622
|
+
{
|
|
2623
|
+
variant: "ribbon-font",
|
|
2624
|
+
"data-font-picker": "family",
|
|
2625
|
+
"data-ribbon-control": "home.font.fontFamily",
|
|
2626
|
+
"aria-label": t("pptx.ribbon.fontFamily"),
|
|
2627
|
+
value: p.fontFamily,
|
|
2628
|
+
disabled: !p.enabled,
|
|
2629
|
+
onChange: (e) => p.onFamily(e.target.value),
|
|
2630
|
+
children: groups.map((group) => /* @__PURE__ */ jsx("optgroup", { label: t(group.labelKey), children: group.entries.map((entry) => /* @__PURE__ */ jsx(
|
|
2631
|
+
"option",
|
|
2632
|
+
{
|
|
2633
|
+
value: entry.family,
|
|
2634
|
+
style: { fontFamily: entry.family },
|
|
2635
|
+
"data-display-label": entry.family,
|
|
2636
|
+
"data-description": entry.themeRole ? t(`pptx.font.role.${entry.themeRole}`) : void 0,
|
|
2637
|
+
children: entry.family
|
|
2638
|
+
},
|
|
2639
|
+
entry.family
|
|
2640
|
+
)) }, group.id))
|
|
2641
|
+
}
|
|
2642
|
+
),
|
|
2643
|
+
/* @__PURE__ */ jsx(
|
|
2644
|
+
WebSelect,
|
|
2645
|
+
{
|
|
2646
|
+
variant: "ribbon-font",
|
|
2647
|
+
"data-font-picker": "size",
|
|
2648
|
+
"data-ribbon-control": "home.font.fontSize",
|
|
2649
|
+
"aria-label": t("pptx.ribbon.fontSize"),
|
|
2650
|
+
value: p.fontSize,
|
|
2651
|
+
disabled: !p.enabled,
|
|
2652
|
+
onChange: (e) => p.onSize(Number(e.target.value)),
|
|
2653
|
+
children: COMMON_FONT_SIZES.map((size) => /* @__PURE__ */ jsx("option", { value: size, children: size }, size))
|
|
2654
|
+
}
|
|
2655
|
+
)
|
|
2656
|
+
] }),
|
|
2657
|
+
/* @__PURE__ */ jsx("span", { "data-pptx-chrome": "ribbon-group-label", children: t("pptx.ribbon.font") })
|
|
2658
|
+
] });
|
|
2734
2659
|
}
|
|
2735
2660
|
function useLayoutPreviews(loadPreviews, enabled) {
|
|
2736
2661
|
const [previews, setPreviews] = useState(/* @__PURE__ */ new Map());
|
|
@@ -2889,17 +2814,19 @@ function SlidesGroup(p) {
|
|
|
2889
2814
|
}, [layoutMenuOpen]);
|
|
2890
2815
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2891
2816
|
/* @__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: [
|
|
2817
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", "data-pptx-chrome": "slides-controls", children: [
|
|
2893
2818
|
/* @__PURE__ */ jsxs(
|
|
2894
2819
|
"div",
|
|
2895
2820
|
{
|
|
2896
2821
|
className: "relative inline-flex items-center",
|
|
2897
2822
|
ref: newSlideMenuRef,
|
|
2898
2823
|
...controlAttr("home.slides.newSlide"),
|
|
2824
|
+
"data-pptx-chrome": "split-button",
|
|
2899
2825
|
children: [
|
|
2900
2826
|
/* @__PURE__ */ jsxs(
|
|
2901
2827
|
"button",
|
|
2902
2828
|
{
|
|
2829
|
+
"data-pptx-chrome": "split-main",
|
|
2903
2830
|
type: "button",
|
|
2904
2831
|
onClick: handleNewSlide,
|
|
2905
2832
|
disabled: !p.canEdit || p.layoutOptions.length === 0,
|
|
@@ -2918,6 +2845,7 @@ function SlidesGroup(p) {
|
|
|
2918
2845
|
p.layoutOptions.length > 0 && /* @__PURE__ */ jsx(
|
|
2919
2846
|
"button",
|
|
2920
2847
|
{
|
|
2848
|
+
"data-pptx-chrome": "split-caret",
|
|
2921
2849
|
type: "button",
|
|
2922
2850
|
disabled: !p.canEdit,
|
|
2923
2851
|
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 +2985,11 @@ function extractFontInfo(element, themeFonts) {
|
|
|
3057
2985
|
};
|
|
3058
2986
|
}
|
|
3059
2987
|
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
2988
|
const { fontFamily, fontSize } = extractFontInfo(p.selectedElement, p.themeFonts);
|
|
3066
2989
|
const hasSelection = Boolean(p.selectedElement);
|
|
3067
2990
|
const canFormat = p.canEdit && Boolean(p.onUpdateTextStyle) && Boolean(
|
|
3068
2991
|
p.selectedElement && (hasTextProperties(p.selectedElement) || p.selectedElement.type === "table" && p.tableEditorState)
|
|
3069
2992
|
);
|
|
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
2993
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3101
2994
|
/* @__PURE__ */ jsx(
|
|
3102
2995
|
ClipboardGroup,
|
|
@@ -3128,71 +3021,21 @@ function HomeSection(p) {
|
|
|
3128
3021
|
onAddSection: p.onAddSection
|
|
3129
3022
|
}
|
|
3130
3023
|
),
|
|
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
|
-
] }),
|
|
3024
|
+
/* @__PURE__ */ jsx(
|
|
3025
|
+
FontPickers,
|
|
3026
|
+
{
|
|
3027
|
+
enabled: canFormat,
|
|
3028
|
+
fontFamily,
|
|
3029
|
+
fontSize,
|
|
3030
|
+
themeFonts: p.themeFonts,
|
|
3031
|
+
embeddedFonts: p.embeddedFontFamilies,
|
|
3032
|
+
customFonts: p.customFontFamilies,
|
|
3033
|
+
onFamily: (family) => p.onUpdateTextStyle?.({ fontFamily: family }),
|
|
3034
|
+
onSize: (size) => p.onUpdateTextStyle?.({
|
|
3035
|
+
fontSize: p.selectedElement && hasTextProperties(p.selectedElement) ? textFontSizePtToPx(size) : size
|
|
3036
|
+
})
|
|
3037
|
+
}
|
|
3038
|
+
),
|
|
3196
3039
|
sep
|
|
3197
3040
|
] });
|
|
3198
3041
|
}
|
|
@@ -3741,200 +3584,62 @@ function InsertSection(p) {
|
|
|
3741
3584
|
)
|
|
3742
3585
|
] });
|
|
3743
3586
|
}
|
|
3587
|
+
function WebRibbonSection({
|
|
3588
|
+
groups,
|
|
3589
|
+
onCommand
|
|
3590
|
+
}) {
|
|
3591
|
+
const ref = useRef(null);
|
|
3592
|
+
useEffect(() => {
|
|
3593
|
+
if (ref.current) {
|
|
3594
|
+
ref.current.groups = groups;
|
|
3595
|
+
}
|
|
3596
|
+
}, [groups]);
|
|
3597
|
+
useEffect(() => {
|
|
3598
|
+
const host = ref.current;
|
|
3599
|
+
if (!host) {
|
|
3600
|
+
return;
|
|
3601
|
+
}
|
|
3602
|
+
const request = (event) => onCommand(event.detail.id);
|
|
3603
|
+
host.addEventListener("command-request", request);
|
|
3604
|
+
return () => host.removeEventListener("command-request", request);
|
|
3605
|
+
}, [onCommand]);
|
|
3606
|
+
return /* @__PURE__ */ jsx("pptx-ui-ribbon-section", { ref });
|
|
3607
|
+
}
|
|
3744
3608
|
function ReviewSection(p) {
|
|
3745
3609
|
const { t } = useTranslation();
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
disabled: true
|
|
3771
|
-
}
|
|
3772
|
-
)
|
|
3773
|
-
]
|
|
3774
|
-
}
|
|
3775
|
-
),
|
|
3776
|
-
/* @__PURE__ */ jsx(
|
|
3777
|
-
RibbonGroup,
|
|
3778
|
-
{
|
|
3779
|
-
label: t("pptx.review.accessibility", { defaultValue: "Accessibility" }),
|
|
3780
|
-
groupId: "review.accessibility",
|
|
3781
|
-
children: /* @__PURE__ */ jsx(
|
|
3782
|
-
RibbonCommand,
|
|
3783
|
-
{
|
|
3784
|
-
controlId: "review.accessibility.check",
|
|
3785
|
-
label: t("pptx.review.accessibilityCheck"),
|
|
3786
|
-
icon: /* @__PURE__ */ jsx(LuShieldCheck, {}),
|
|
3787
|
-
onClick: p.onOpenAccessibilityCheck
|
|
3788
|
-
}
|
|
3789
|
-
)
|
|
3790
|
-
}
|
|
3791
|
-
),
|
|
3792
|
-
/* @__PURE__ */ jsxs(RibbonGroup, { label: t("pptx.review.language"), groupId: "review.language", children: [
|
|
3793
|
-
/* @__PURE__ */ jsx(
|
|
3794
|
-
RibbonCommand,
|
|
3795
|
-
{
|
|
3796
|
-
controlId: "review.language.translate",
|
|
3797
|
-
label: t("pptx.review.translate", { defaultValue: "Translate" }),
|
|
3798
|
-
icon: /* @__PURE__ */ jsx(LuLanguages, {}),
|
|
3799
|
-
disabled: true
|
|
3800
|
-
}
|
|
3801
|
-
),
|
|
3802
|
-
/* @__PURE__ */ jsx(
|
|
3803
|
-
RibbonCommand,
|
|
3804
|
-
{
|
|
3805
|
-
label: t("pptx.review.language"),
|
|
3806
|
-
icon: /* @__PURE__ */ jsx(LuGlobe, {}),
|
|
3807
|
-
disabled: !p.onSetLanguage,
|
|
3808
|
-
onClick: p.onSetLanguage
|
|
3610
|
+
const groups = buildReviewRibbon(t, {
|
|
3611
|
+
editable: p.canEdit,
|
|
3612
|
+
spellCheck: p.spellCheckEnabled,
|
|
3613
|
+
canAccessibility: Boolean(p.onOpenAccessibilityCheck),
|
|
3614
|
+
canLanguage: Boolean(p.onSetLanguage),
|
|
3615
|
+
canCompare: Boolean(p.onCompare),
|
|
3616
|
+
canComments: Boolean(p.onToggleComments),
|
|
3617
|
+
commentsOpen: p.isCommentsPanelOpen,
|
|
3618
|
+
commentCount: p.slideCommentCount
|
|
3619
|
+
});
|
|
3620
|
+
const request = (id) => {
|
|
3621
|
+
switch (id) {
|
|
3622
|
+
case "review.proofing.spelling":
|
|
3623
|
+
p.onSetSpellCheckEnabled(!p.spellCheckEnabled);
|
|
3624
|
+
break;
|
|
3625
|
+
case "review.accessibility.check":
|
|
3626
|
+
p.onOpenAccessibilityCheck?.();
|
|
3627
|
+
break;
|
|
3628
|
+
case "review.language.language":
|
|
3629
|
+
p.onSetLanguage?.();
|
|
3630
|
+
break;
|
|
3631
|
+
case "review.compare.compare":
|
|
3632
|
+
if (p.canEdit) {
|
|
3633
|
+
p.onCompare?.();
|
|
3809
3634
|
}
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
/* @__PURE__ */ jsx(
|
|
3819
|
-
RibbonCommand,
|
|
3820
|
-
{
|
|
3821
|
-
controlId: "review.compare.markAllRead",
|
|
3822
|
-
label: t("pptx.review.markAllRead", { defaultValue: "Mark All as Read" }),
|
|
3823
|
-
icon: /* @__PURE__ */ jsx(LuCopy, {}),
|
|
3824
|
-
disabled: true
|
|
3825
|
-
}
|
|
3826
|
-
),
|
|
3827
|
-
p.onCompare && /* @__PURE__ */ jsx(
|
|
3828
|
-
RibbonCommand,
|
|
3829
|
-
{
|
|
3830
|
-
controlId: "review.compare.compare",
|
|
3831
|
-
label: t("pptx.ribbon.compare"),
|
|
3832
|
-
icon: /* @__PURE__ */ jsx(LuGitCompare, {}),
|
|
3833
|
-
onClick: p.onCompare,
|
|
3834
|
-
disabled: !p.canEdit,
|
|
3835
|
-
title: t("pptx.ribbon.compareTitle")
|
|
3836
|
-
}
|
|
3837
|
-
)
|
|
3838
|
-
]
|
|
3839
|
-
}
|
|
3840
|
-
),
|
|
3841
|
-
/* @__PURE__ */ jsxs(RibbonGroup, { label: t("pptx.toolbar.comments"), groupId: "review.comments", children: [
|
|
3842
|
-
p.onToggleComments && /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
3843
|
-
/* @__PURE__ */ jsx(
|
|
3844
|
-
RibbonCommand,
|
|
3845
|
-
{
|
|
3846
|
-
controlId: "review.comments.newComment",
|
|
3847
|
-
label: t("pptx.toolbar.comments"),
|
|
3848
|
-
icon: /* @__PURE__ */ jsx(LuMessageSquarePlus, {}),
|
|
3849
|
-
onClick: p.onToggleComments,
|
|
3850
|
-
active: p.isCommentsPanelOpen,
|
|
3851
|
-
title: t("pptx.review.toggleComments")
|
|
3852
|
-
}
|
|
3853
|
-
),
|
|
3854
|
-
Boolean(p.slideCommentCount) && /* @__PURE__ */ jsx("span", { className: "absolute right-0 top-0 rounded-full bg-primary px-1 text-[9px] text-white", children: p.slideCommentCount })
|
|
3855
|
-
] }),
|
|
3856
|
-
/* @__PURE__ */ jsxs(RibbonCommandStack, { children: [
|
|
3857
|
-
/* @__PURE__ */ jsx(
|
|
3858
|
-
RibbonCommand,
|
|
3859
|
-
{
|
|
3860
|
-
compact: true,
|
|
3861
|
-
controlId: "review.comments.delete",
|
|
3862
|
-
label: t("pptx.common.delete", { defaultValue: "Delete" }),
|
|
3863
|
-
icon: /* @__PURE__ */ jsx(LuTrash2, {}),
|
|
3864
|
-
disabled: true
|
|
3865
|
-
}
|
|
3866
|
-
),
|
|
3867
|
-
/* @__PURE__ */ jsx(
|
|
3868
|
-
RibbonCommand,
|
|
3869
|
-
{
|
|
3870
|
-
compact: true,
|
|
3871
|
-
controlId: "review.comments.previous",
|
|
3872
|
-
label: t("pptx.common.previous", { defaultValue: "Previous" }),
|
|
3873
|
-
icon: /* @__PURE__ */ jsx(LuChevronLeft, {}),
|
|
3874
|
-
disabled: true
|
|
3875
|
-
}
|
|
3876
|
-
)
|
|
3877
|
-
] }),
|
|
3878
|
-
/* @__PURE__ */ jsxs(RibbonCommandStack, { children: [
|
|
3879
|
-
/* @__PURE__ */ jsx(
|
|
3880
|
-
RibbonCommand,
|
|
3881
|
-
{
|
|
3882
|
-
compact: true,
|
|
3883
|
-
controlId: "review.comments.next",
|
|
3884
|
-
label: t("pptx.common.next", { defaultValue: "Next" }),
|
|
3885
|
-
icon: /* @__PURE__ */ jsx(LuChevronRight, {}),
|
|
3886
|
-
disabled: true
|
|
3887
|
-
}
|
|
3888
|
-
),
|
|
3889
|
-
/* @__PURE__ */ jsx(
|
|
3890
|
-
RibbonCommand,
|
|
3891
|
-
{
|
|
3892
|
-
compact: true,
|
|
3893
|
-
controlId: "review.comments.showComments",
|
|
3894
|
-
label: t("pptx.review.showComments", { defaultValue: "Show Comments" }),
|
|
3895
|
-
icon: /* @__PURE__ */ jsx(LuMessageSquare, {}),
|
|
3896
|
-
onClick: p.onToggleComments
|
|
3897
|
-
}
|
|
3898
|
-
)
|
|
3899
|
-
] })
|
|
3900
|
-
] }),
|
|
3901
|
-
/* @__PURE__ */ jsxs(
|
|
3902
|
-
RibbonGroup,
|
|
3903
|
-
{
|
|
3904
|
-
label: t("pptx.review.protect", { defaultValue: "Protect" }),
|
|
3905
|
-
groupId: "review.protect",
|
|
3906
|
-
children: [
|
|
3907
|
-
/* @__PURE__ */ jsx(
|
|
3908
|
-
RibbonCommand,
|
|
3909
|
-
{
|
|
3910
|
-
controlId: "review.protect.readOnly",
|
|
3911
|
-
label: t("pptx.review.readOnly", { defaultValue: "Always Open Read-only" }),
|
|
3912
|
-
icon: /* @__PURE__ */ jsx(LuLockKeyhole, {}),
|
|
3913
|
-
disabled: true
|
|
3914
|
-
}
|
|
3915
|
-
),
|
|
3916
|
-
/* @__PURE__ */ jsx(
|
|
3917
|
-
RibbonCommand,
|
|
3918
|
-
{
|
|
3919
|
-
controlId: "review.protect.restrictPermission",
|
|
3920
|
-
label: t("pptx.review.restrictPermission", { defaultValue: "Restrict Permission" }),
|
|
3921
|
-
icon: /* @__PURE__ */ jsx(LuShieldCheck, {}),
|
|
3922
|
-
disabled: true
|
|
3923
|
-
}
|
|
3924
|
-
),
|
|
3925
|
-
/* @__PURE__ */ jsx(
|
|
3926
|
-
RibbonCommand,
|
|
3927
|
-
{
|
|
3928
|
-
controlId: "review.ink.hideInk",
|
|
3929
|
-
label: t("pptx.review.hideInk", { defaultValue: "Hide Ink" }),
|
|
3930
|
-
icon: /* @__PURE__ */ jsx(LuEyeOff, {}),
|
|
3931
|
-
disabled: true
|
|
3932
|
-
}
|
|
3933
|
-
)
|
|
3934
|
-
]
|
|
3935
|
-
}
|
|
3936
|
-
)
|
|
3937
|
-
] });
|
|
3635
|
+
break;
|
|
3636
|
+
case "review.comments.newComment":
|
|
3637
|
+
case "review.comments.showComments":
|
|
3638
|
+
p.onToggleComments?.();
|
|
3639
|
+
break;
|
|
3640
|
+
}
|
|
3641
|
+
};
|
|
3642
|
+
return /* @__PURE__ */ jsx(WebRibbonSection, { groups, onCommand: request });
|
|
3938
3643
|
}
|
|
3939
3644
|
function CustomShowsControls({
|
|
3940
3645
|
customShows,
|
|
@@ -4089,81 +3794,6 @@ function SubtitleSettingsControl() {
|
|
|
4089
3794
|
}
|
|
4090
3795
|
);
|
|
4091
3796
|
}
|
|
4092
|
-
function useIntent(ref, type, callback) {
|
|
4093
|
-
useEffect(() => {
|
|
4094
|
-
const host = ref.current;
|
|
4095
|
-
if (!host || !callback) {
|
|
4096
|
-
return;
|
|
4097
|
-
}
|
|
4098
|
-
host.addEventListener(type, callback);
|
|
4099
|
-
return () => host.removeEventListener(type, callback);
|
|
4100
|
-
}, [ref, type, callback]);
|
|
4101
|
-
}
|
|
4102
|
-
function WebRibbonGroup({
|
|
4103
|
-
label,
|
|
4104
|
-
groupId,
|
|
4105
|
-
children
|
|
4106
|
-
}) {
|
|
4107
|
-
return /* @__PURE__ */ jsx("pptx-ui-ribbon-group", { label, "data-ribbon-group": groupId, children });
|
|
4108
|
-
}
|
|
4109
|
-
function WebRibbonCommand({
|
|
4110
|
-
label,
|
|
4111
|
-
icon,
|
|
4112
|
-
controlId,
|
|
4113
|
-
title,
|
|
4114
|
-
disabled,
|
|
4115
|
-
active,
|
|
4116
|
-
pressed,
|
|
4117
|
-
expanded,
|
|
4118
|
-
compact,
|
|
4119
|
-
onCommand
|
|
4120
|
-
}) {
|
|
4121
|
-
const ref = useRef(null);
|
|
4122
|
-
useIntent(
|
|
4123
|
-
ref,
|
|
4124
|
-
"command-request",
|
|
4125
|
-
onCommand ? (event) => onCommand(event.detail.id) : void 0
|
|
4126
|
-
);
|
|
4127
|
-
return /* @__PURE__ */ jsx(
|
|
4128
|
-
"pptx-ui-ribbon-command",
|
|
4129
|
-
{
|
|
4130
|
-
ref,
|
|
4131
|
-
label,
|
|
4132
|
-
icon,
|
|
4133
|
-
"data-ribbon-control": controlId,
|
|
4134
|
-
title,
|
|
4135
|
-
disabled: disabled || void 0,
|
|
4136
|
-
active: active || void 0,
|
|
4137
|
-
pressed: pressed === void 0 ? void 0 : String(pressed),
|
|
4138
|
-
expanded: expanded === void 0 ? void 0 : String(expanded),
|
|
4139
|
-
compact: compact || void 0
|
|
4140
|
-
}
|
|
4141
|
-
);
|
|
4142
|
-
}
|
|
4143
|
-
function WebRibbonToggle({
|
|
4144
|
-
label,
|
|
4145
|
-
controlId,
|
|
4146
|
-
checked,
|
|
4147
|
-
title,
|
|
4148
|
-
onToggle
|
|
4149
|
-
}) {
|
|
4150
|
-
const ref = useRef(null);
|
|
4151
|
-
useIntent(
|
|
4152
|
-
ref,
|
|
4153
|
-
"toggle-request",
|
|
4154
|
-
onToggle ? (event) => onToggle(event.detail.checked) : void 0
|
|
4155
|
-
);
|
|
4156
|
-
return /* @__PURE__ */ jsx(
|
|
4157
|
-
"pptx-ui-ribbon-toggle",
|
|
4158
|
-
{
|
|
4159
|
-
ref,
|
|
4160
|
-
label,
|
|
4161
|
-
"data-ribbon-control": controlId,
|
|
4162
|
-
checked: checked || void 0,
|
|
4163
|
-
title
|
|
4164
|
-
}
|
|
4165
|
-
);
|
|
4166
|
-
}
|
|
4167
3797
|
function SlideShowSection(p) {
|
|
4168
3798
|
const { t } = useTranslation();
|
|
4169
3799
|
const { isHidden } = useToolbarVisibility(p.hiddenActions);
|
|
@@ -5019,8 +4649,8 @@ function TextSection(p) {
|
|
|
5019
4649
|
);
|
|
5020
4650
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5021
4651
|
/* @__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) => {
|
|
4652
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", "data-pptx-chrome": "font-controls", children: [
|
|
4653
|
+
/* @__PURE__ */ jsx("div", { className: grp, "data-pptx-chrome": "control-cluster", children: FMT.map((b, i, a) => {
|
|
5024
4654
|
const flag = isTextDecorationFlag(b.id) ? b.id : void 0;
|
|
5025
4655
|
const handleClick = () => {
|
|
5026
4656
|
if (!canFormat || !p.selectedElement || !flag) {
|
|
@@ -5105,7 +4735,7 @@ function TextSection(p) {
|
|
|
5105
4735
|
)
|
|
5106
4736
|
}
|
|
5107
4737
|
),
|
|
5108
|
-
/* @__PURE__ */ jsxs("div", { className: grp, children: [
|
|
4738
|
+
/* @__PURE__ */ jsxs("div", { className: grp, "data-pptx-chrome": "control-cluster", children: [
|
|
5109
4739
|
/* @__PURE__ */ jsx(
|
|
5110
4740
|
"button",
|
|
5111
4741
|
{
|
|
@@ -5537,25 +5167,34 @@ function MobileMenuSheet(props) {
|
|
|
5537
5167
|
const { open, onClose } = props;
|
|
5538
5168
|
const [active, setActive] = useState("home");
|
|
5539
5169
|
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
|
-
|
|
5170
|
+
return /* @__PURE__ */ jsx(
|
|
5171
|
+
MobileSheet,
|
|
5172
|
+
{
|
|
5173
|
+
open: open && !props.isThemeEditorOpen,
|
|
5174
|
+
onClose,
|
|
5175
|
+
autoHeight: true,
|
|
5176
|
+
title: t("pptx.mobileToolbar.menu"),
|
|
5177
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
5178
|
+
/* @__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(
|
|
5179
|
+
"button",
|
|
5180
|
+
{
|
|
5181
|
+
type: "button",
|
|
5182
|
+
onClick: () => setActive(active === key ? null : key),
|
|
5183
|
+
className: cn(
|
|
5184
|
+
"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]",
|
|
5185
|
+
active === key ? "bg-primary text-white border-primary" : "border-border text-muted-foreground hover:text-foreground hover:bg-accent/40"
|
|
5186
|
+
),
|
|
5187
|
+
children: [
|
|
5188
|
+
/* @__PURE__ */ jsx(Icon, { className: "w-4 h-4" }),
|
|
5189
|
+
t(label)
|
|
5190
|
+
]
|
|
5191
|
+
},
|
|
5192
|
+
key
|
|
5193
|
+
)) }) }),
|
|
5194
|
+
/* @__PURE__ */ jsx("div", { className: "p-3", children: /* @__PURE__ */ jsx(MobileSectionBody, { active, ...props }) })
|
|
5195
|
+
] })
|
|
5196
|
+
}
|
|
5197
|
+
);
|
|
5559
5198
|
}
|
|
5560
5199
|
function MobileSectionBody({
|
|
5561
5200
|
active,
|
|
@@ -5901,22 +5540,18 @@ function MobileToolbar(props) {
|
|
|
5901
5540
|
}
|
|
5902
5541
|
);
|
|
5903
5542
|
}
|
|
5543
|
+
function useTranslateOr() {
|
|
5544
|
+
const { t } = useTranslation();
|
|
5545
|
+
return (key, fallback) => galleryTextLabel(t, key, fallback);
|
|
5546
|
+
}
|
|
5904
5547
|
function ContextualTabSection({ tab }) {
|
|
5905
5548
|
const translateOr = useTranslateOr();
|
|
5906
5549
|
return /* @__PURE__ */ jsx(Fragment, { children: CONTEXTUAL_TAB_GROUPS[tab].map((group) => /* @__PURE__ */ jsx(
|
|
5907
|
-
|
|
5550
|
+
WebRibbonGroup,
|
|
5908
5551
|
{
|
|
5909
5552
|
groupId: group.group,
|
|
5910
5553
|
label: translateOr(group.labelKey, group.label),
|
|
5911
|
-
|
|
5912
|
-
children: group.galleries.map((placement) => /* @__PURE__ */ jsx(
|
|
5913
|
-
RibbonGallery,
|
|
5914
|
-
{
|
|
5915
|
-
placement,
|
|
5916
|
-
icon: /* @__PURE__ */ jsx(LuSparkles, { className: ics })
|
|
5917
|
-
},
|
|
5918
|
-
placement.control
|
|
5919
|
-
))
|
|
5554
|
+
children: group.galleries.map((placement) => /* @__PURE__ */ jsx(RibbonGallery, { placement }, placement.control))
|
|
5920
5555
|
},
|
|
5921
5556
|
group.group
|
|
5922
5557
|
)) });
|
|
@@ -6000,7 +5635,7 @@ function DrawingGroup(p) {
|
|
|
6000
5635
|
const setArrangeOpen = arrange.setOpen;
|
|
6001
5636
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6002
5637
|
/* @__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: [
|
|
5638
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", "data-pptx-chrome": "drawing-controls", children: [
|
|
6004
5639
|
/* @__PURE__ */ jsxs("div", { className: "relative", ref: shapes.ref, ...controlAttr("home.drawing.shapes"), children: [
|
|
6005
5640
|
/* @__PURE__ */ jsxs(
|
|
6006
5641
|
"button",
|
|
@@ -6245,6 +5880,7 @@ function RibbonTabBar(p) {
|
|
|
6245
5880
|
"div",
|
|
6246
5881
|
{
|
|
6247
5882
|
role: "tablist",
|
|
5883
|
+
"data-pptx-chrome": "ribbon-tabs",
|
|
6248
5884
|
className: "flex items-center border-b border-border/60 px-1 max-md:overflow-x-auto max-md:scrollbar-none",
|
|
6249
5885
|
children: [
|
|
6250
5886
|
TOOLBAR_SECTIONS.filter((s) => p.isTabVisible(s.id)).map((s) => {
|
|
@@ -6661,131 +6297,138 @@ function ToolbarPrimaryRow(p) {
|
|
|
6661
6297
|
const showShare = isDialogAvailable(customization, "share");
|
|
6662
6298
|
const showSettings = isDialogAvailable(customization, "options");
|
|
6663
6299
|
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"
|
|
6300
|
+
return /* @__PURE__ */ jsxs(
|
|
6301
|
+
"div",
|
|
6302
|
+
{
|
|
6303
|
+
"data-pptx-chrome": "ribbon-primary",
|
|
6304
|
+
className: "flex items-center gap-0.5 max-md:gap-0 px-1.5 py-0.5 max-md:px-1",
|
|
6305
|
+
children: [
|
|
6306
|
+
mode !== "present" && showSlidesToggle && /* @__PURE__ */ jsx(
|
|
6307
|
+
"button",
|
|
6308
|
+
{
|
|
6309
|
+
type: "button",
|
|
6310
|
+
onClick: onToggleSidebar,
|
|
6311
|
+
className: cn(qab, !isSidebarCollapsed ? "text-foreground" : "text-muted-foreground"),
|
|
6312
|
+
title: t("pptx.toolbar.toggleSlidesPanel"),
|
|
6313
|
+
"aria-label": t("pptx.toolbar.toggleSlidesPanel"),
|
|
6314
|
+
children: /* @__PURE__ */ jsx(LuPanelLeft, { className: ic })
|
|
6315
|
+
}
|
|
6686
6316
|
),
|
|
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,
|
|
6317
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 min-w-2 max-md:min-w-1" }),
|
|
6318
|
+
(mode === "edit" || mode === "master") && showComments && /* @__PURE__ */ jsxs(
|
|
6319
|
+
"button",
|
|
6704
6320
|
{
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6321
|
+
type: "button",
|
|
6322
|
+
onClick: p.onToggleComments,
|
|
6323
|
+
className: cn(
|
|
6324
|
+
qab,
|
|
6325
|
+
"relative max-md:hidden",
|
|
6326
|
+
p.isCommentsPanelOpen ? "text-foreground" : "text-muted-foreground"
|
|
6327
|
+
),
|
|
6328
|
+
title: t("pptx.toolbar.comments"),
|
|
6329
|
+
"aria-label": t("pptx.toolbar.comments"),
|
|
6330
|
+
children: [
|
|
6331
|
+
/* @__PURE__ */ jsx(LuMessageSquare, { className: ics }),
|
|
6332
|
+
(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 })
|
|
6333
|
+
]
|
|
6710
6334
|
}
|
|
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
|
-
|
|
6335
|
+
),
|
|
6336
|
+
collab && showShare && (collab.status === "connected" || collab.status === "connecting") && collab.remoteUsers.length > 0 && /* @__PURE__ */ jsx(
|
|
6337
|
+
"button",
|
|
6338
|
+
{
|
|
6339
|
+
type: "button",
|
|
6340
|
+
onClick: p.onOpenShareDialog,
|
|
6341
|
+
className: "mx-1 rounded-sm px-1 py-0.5 hover:bg-accent/60 transition-colors cursor-pointer",
|
|
6342
|
+
title: t("pptx.toolbar.sharingUsers", { count: collab.connectedCount }),
|
|
6343
|
+
children: /* @__PURE__ */ jsx(
|
|
6344
|
+
UserAvatarBar,
|
|
6345
|
+
{
|
|
6346
|
+
remoteUsers: collab.remoteUsers,
|
|
6347
|
+
localUserName: collab.config.userName,
|
|
6348
|
+
localUserColor: collab.config.userColor ?? "#6366f1",
|
|
6349
|
+
localUserAvatar: collab.config.userAvatar,
|
|
6350
|
+
status: collab.status
|
|
6351
|
+
}
|
|
6352
|
+
)
|
|
6353
|
+
}
|
|
6354
|
+
),
|
|
6355
|
+
/* @__PURE__ */ jsx(
|
|
6356
|
+
ModeSwitcher,
|
|
6357
|
+
{
|
|
6358
|
+
mode: p.mode,
|
|
6359
|
+
onSetMode: p.onSetMode,
|
|
6360
|
+
onCloseMasterView: p.onCloseMasterView,
|
|
6361
|
+
onToggleSlideSorter: p.onToggleSlideSorter,
|
|
6362
|
+
onEnterPresenterView: p.onEnterPresenterView,
|
|
6363
|
+
onEnterRehearsalMode: p.onEnterRehearsalMode,
|
|
6364
|
+
onOpenSetUpSlideShow: p.onOpenSetUpSlideShow,
|
|
6365
|
+
onOpenBroadcastDialog: p.onOpenBroadcastDialog,
|
|
6366
|
+
onToggleSubtitles: p.onToggleSubtitles,
|
|
6367
|
+
showSubtitles: p.showSubtitles
|
|
6368
|
+
}
|
|
6369
|
+
),
|
|
6370
|
+
/* @__PURE__ */ jsx(
|
|
6371
|
+
CustomShowsControls,
|
|
6372
|
+
{
|
|
6373
|
+
customShows: p.customShows,
|
|
6374
|
+
activeCustomShowId: p.activeCustomShowId,
|
|
6375
|
+
canEdit: p.canEdit,
|
|
6376
|
+
isCurrentSlideInActiveShow: p.isCurrentSlideInActiveShow,
|
|
6377
|
+
onSetActiveCustomShowId: p.onSetActiveCustomShowId,
|
|
6378
|
+
onCreateCustomShow: p.onCreateCustomShow,
|
|
6379
|
+
onRenameActiveCustomShow: p.onRenameActiveCustomShow,
|
|
6380
|
+
onDeleteActiveCustomShow: p.onDeleteActiveCustomShow,
|
|
6381
|
+
onToggleCurrentSlideInActiveShow: p.onToggleCurrentSlideInActiveShow
|
|
6382
|
+
}
|
|
6383
|
+
),
|
|
6384
|
+
sep,
|
|
6385
|
+
(mode === "edit" || mode === "master") && showInspectorToggle && /* @__PURE__ */ jsx(
|
|
6386
|
+
"button",
|
|
6387
|
+
{
|
|
6388
|
+
type: "button",
|
|
6389
|
+
onClick: onToggleInspector,
|
|
6390
|
+
className: cn(qab, isInspectorPaneOpen ? "text-foreground" : "text-muted-foreground"),
|
|
6391
|
+
title: t("pptx.toolbar.toggleInspector"),
|
|
6392
|
+
"aria-label": t("pptx.toolbar.toggleInspector"),
|
|
6393
|
+
children: /* @__PURE__ */ jsx(LuPanelRight, { className: ic })
|
|
6394
|
+
}
|
|
6395
|
+
),
|
|
6396
|
+
p.aiEnabled && (mode === "edit" || mode === "master") && /* @__PURE__ */ jsx(
|
|
6397
|
+
"button",
|
|
6398
|
+
{
|
|
6399
|
+
type: "button",
|
|
6400
|
+
onClick: p.onToggleAiPanel,
|
|
6401
|
+
className: cn(qab, p.isAiPanelOpen ? "text-primary" : "text-muted-foreground"),
|
|
6402
|
+
title: t("pptx.toolbar.toggleAiAssistant"),
|
|
6403
|
+
"aria-label": t("pptx.toolbar.toggleAiAssistant"),
|
|
6404
|
+
children: /* @__PURE__ */ jsx(LuSparkles, { className: ic })
|
|
6405
|
+
}
|
|
6406
|
+
),
|
|
6407
|
+
showSettings && /* @__PURE__ */ jsx(
|
|
6408
|
+
"button",
|
|
6409
|
+
{
|
|
6410
|
+
type: "button",
|
|
6411
|
+
onClick: p.onOpenSettings ?? p.onToggleShortcuts,
|
|
6412
|
+
className: cn(qab, "text-muted-foreground"),
|
|
6413
|
+
title: t("pptx.toolbar.settingsShortcuts"),
|
|
6414
|
+
"aria-label": t("pptx.toolbar.settings"),
|
|
6415
|
+
children: /* @__PURE__ */ jsx(LuSettings, { className: ics })
|
|
6416
|
+
}
|
|
6417
|
+
),
|
|
6418
|
+
!canEdit && p.isProtectedView && p.onEnableEditing ? /* @__PURE__ */ jsx(
|
|
6419
|
+
"button",
|
|
6420
|
+
{
|
|
6421
|
+
type: "button",
|
|
6422
|
+
onClick: p.onEnableEditing,
|
|
6423
|
+
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",
|
|
6424
|
+
title: t("pptx.options.trust.protectedViewInfo"),
|
|
6425
|
+
children: t("pptx.security.enableEditing")
|
|
6426
|
+
}
|
|
6427
|
+
) : !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") }),
|
|
6428
|
+
/* @__PURE__ */ jsx(OverflowMenu, { ...p })
|
|
6429
|
+
]
|
|
6430
|
+
}
|
|
6431
|
+
);
|
|
6789
6432
|
}
|
|
6790
6433
|
function useContextualRibbonTab(selectedElement, customization, onFallback) {
|
|
6791
6434
|
const visible = visibleContextualTabs(selectedElement ?? null, customization);
|
|
@@ -6985,6 +6628,7 @@ function Toolbar(p) {
|
|
|
6985
6628
|
"div",
|
|
6986
6629
|
{
|
|
6987
6630
|
role: "toolbar",
|
|
6631
|
+
"data-pptx-chrome": "ribbon",
|
|
6988
6632
|
"aria-label": t("pptx.toolbar.presentationToolbarAria"),
|
|
6989
6633
|
className: "relative z-20 border-b border-border bg-secondary/50 overflow-visible",
|
|
6990
6634
|
children: [
|
|
@@ -7038,6 +6682,7 @@ function Toolbar(p) {
|
|
|
7038
6682
|
showRibbon && /* @__PURE__ */ jsxs(
|
|
7039
6683
|
"div",
|
|
7040
6684
|
{
|
|
6685
|
+
"data-pptx-chrome": "ribbon-content",
|
|
7041
6686
|
className: cn(
|
|
7042
6687
|
// Plain controls stay compact; labelled RibbonGroups opt into stretching.
|
|
7043
6688
|
// `RibbonGroupScope` wraps controls in a `display: contents` div, so its
|
|
@@ -7477,7 +7122,7 @@ function ChartQuickActionsOverlay({
|
|
|
7477
7122
|
"data-export-ignore": "true",
|
|
7478
7123
|
style: { position: "absolute", left: 0, top: 0, zIndex: 59 },
|
|
7479
7124
|
onMouseDown: (e) => e.stopPropagation(),
|
|
7480
|
-
children: descriptor.buttons.map((button) => /* @__PURE__ */ jsxs(
|
|
7125
|
+
children: descriptor.buttons.map((button) => /* @__PURE__ */ jsxs(React7.Fragment, { children: [
|
|
7481
7126
|
/* @__PURE__ */ jsx(
|
|
7482
7127
|
"button",
|
|
7483
7128
|
{
|
|
@@ -7497,7 +7142,7 @@ function ChartQuickActionsOverlay({
|
|
|
7497
7142
|
transformOrigin: "top left"
|
|
7498
7143
|
},
|
|
7499
7144
|
className: "flex items-center justify-center rounded bg-white border border-gray-300 shadow-sm hover:bg-gray-100 text-gray-700",
|
|
7500
|
-
children:
|
|
7145
|
+
children: React7.createElement(ICONS4[button.id], { className: "size-3.5" })
|
|
7501
7146
|
}
|
|
7502
7147
|
),
|
|
7503
7148
|
open === button.id && button.id === "elements" && /* @__PURE__ */ jsxs(
|
|
@@ -8647,7 +8292,7 @@ function HorizontalRulerView({ ticks, widthPx, highlight }) {
|
|
|
8647
8292
|
}
|
|
8648
8293
|
);
|
|
8649
8294
|
}
|
|
8650
|
-
var HorizontalRuler =
|
|
8295
|
+
var HorizontalRuler = React7.memo(HorizontalRulerView);
|
|
8651
8296
|
HorizontalRuler.displayName = "HorizontalRuler";
|
|
8652
8297
|
function VerticalRulerView({ ticks, heightPx, highlight }) {
|
|
8653
8298
|
return /* @__PURE__ */ jsxs(
|
|
@@ -8719,7 +8364,7 @@ function VerticalRulerView({ ticks, heightPx, highlight }) {
|
|
|
8719
8364
|
}
|
|
8720
8365
|
);
|
|
8721
8366
|
}
|
|
8722
|
-
var VerticalRuler =
|
|
8367
|
+
var VerticalRuler = React7.memo(VerticalRulerView);
|
|
8723
8368
|
VerticalRuler.displayName = "VerticalRuler";
|
|
8724
8369
|
function Ruler({
|
|
8725
8370
|
canvasSize,
|
|
@@ -10535,13 +10180,15 @@ function SlideThumbnailImpl({
|
|
|
10535
10180
|
slide,
|
|
10536
10181
|
templateElements,
|
|
10537
10182
|
canvasSize,
|
|
10183
|
+
previewWidth,
|
|
10538
10184
|
fieldContext,
|
|
10539
10185
|
tableStyleContext
|
|
10540
10186
|
}) {
|
|
10541
10187
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
10542
10188
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
10543
|
-
const
|
|
10544
|
-
const
|
|
10189
|
+
const width = previewWidth ?? SLIDE_NAV_THUMBNAIL_WIDTH;
|
|
10190
|
+
const scale = width / safeCanvasWidth;
|
|
10191
|
+
const previewHeight = editorThumbnailHeight(safeCanvasWidth, safeCanvasHeight, width);
|
|
10545
10192
|
const previewElements = buildPreviewElements(slide, templateElements);
|
|
10546
10193
|
const slideFieldContext = deriveSlideFieldContext(fieldContext, slide);
|
|
10547
10194
|
const { t } = useTranslation();
|
|
@@ -10552,7 +10199,7 @@ function SlideThumbnailImpl({
|
|
|
10552
10199
|
return /* @__PURE__ */ jsx(
|
|
10553
10200
|
"div",
|
|
10554
10201
|
{
|
|
10555
|
-
className: "relative w-full overflow-hidden rounded border border-border bg-white",
|
|
10202
|
+
className: previewWidth === void 0 ? "relative w-full overflow-hidden rounded border border-border bg-white" : "relative w-full overflow-hidden bg-white",
|
|
10556
10203
|
style: {
|
|
10557
10204
|
height: previewHeight,
|
|
10558
10205
|
...getReactSlideBackgroundStyle(slide, {
|
|
@@ -10599,6 +10246,9 @@ function SlideThumbnailImpl({
|
|
|
10599
10246
|
);
|
|
10600
10247
|
}
|
|
10601
10248
|
function slideThumbnailPropsEqual(prev, next) {
|
|
10249
|
+
if (prev.previewWidth !== next.previewWidth) {
|
|
10250
|
+
return false;
|
|
10251
|
+
}
|
|
10602
10252
|
if (prev.slide.id !== next.slide.id) {
|
|
10603
10253
|
return false;
|
|
10604
10254
|
}
|
|
@@ -10640,7 +10290,7 @@ function slideThumbnailPropsEqual(prev, next) {
|
|
|
10640
10290
|
}
|
|
10641
10291
|
return true;
|
|
10642
10292
|
}
|
|
10643
|
-
var SlideThumbnail =
|
|
10293
|
+
var SlideThumbnail = React7.memo(SlideThumbnailImpl, slideThumbnailPropsEqual);
|
|
10644
10294
|
|
|
10645
10295
|
// src/viewer/components/context-menu-dispatch.ts
|
|
10646
10296
|
function tableCell(props) {
|
|
@@ -10771,7 +10421,11 @@ function ContextMenu(props) {
|
|
|
10771
10421
|
const handlers = contextMenuHandlers(props, shapeFormat);
|
|
10772
10422
|
const entries = customizeContextMenuEntries(
|
|
10773
10423
|
buildContextMenuEntries(contextMenuContext(props, shapeFormat)),
|
|
10774
|
-
customization
|
|
10424
|
+
customization,
|
|
10425
|
+
{
|
|
10426
|
+
slideIndex: props.slideIndex ?? 0,
|
|
10427
|
+
elementIds: props.elementIds ?? (props.selectedElement ? [props.selectedElement.id] : [])
|
|
10428
|
+
}
|
|
10775
10429
|
);
|
|
10776
10430
|
if (entries.length === 0) {
|
|
10777
10431
|
return null;
|
|
@@ -10801,7 +10455,10 @@ function ContextMenu(props) {
|
|
|
10801
10455
|
top: menuPosition.top
|
|
10802
10456
|
},
|
|
10803
10457
|
children: entries.map((entry) => {
|
|
10804
|
-
const run =
|
|
10458
|
+
const run = "host" in entry ? () => {
|
|
10459
|
+
onClose();
|
|
10460
|
+
entry.onSelect();
|
|
10461
|
+
} : handlers[entry.id];
|
|
10805
10462
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
10806
10463
|
entry.separatorBefore && /* @__PURE__ */ jsx(ContextMenuSeparator, {}),
|
|
10807
10464
|
/* @__PURE__ */ jsx(
|
|
@@ -10810,7 +10467,7 @@ function ContextMenu(props) {
|
|
|
10810
10467
|
danger: entry.danger,
|
|
10811
10468
|
disabled: entry.disabled || !run,
|
|
10812
10469
|
onSelect: () => run?.(),
|
|
10813
|
-
children: t(entry.labelKey)
|
|
10470
|
+
children: "host" in entry ? entry.label : t(entry.labelKey)
|
|
10814
10471
|
}
|
|
10815
10472
|
)
|
|
10816
10473
|
] }, entry.id);
|
|
@@ -10871,7 +10528,8 @@ function CanvasContextMenu(props) {
|
|
|
10871
10528
|
const handlers = canvasContextMenuHandlers(props);
|
|
10872
10529
|
const entries = customizeCanvasContextMenuEntries(
|
|
10873
10530
|
buildCanvasContextMenuEntries(canvasContextMenuContext(props)),
|
|
10874
|
-
customization
|
|
10531
|
+
customization,
|
|
10532
|
+
{ slideIndex: props.slideIndex ?? 0 }
|
|
10875
10533
|
);
|
|
10876
10534
|
if (entries.length === 0) {
|
|
10877
10535
|
return null;
|
|
@@ -10901,7 +10559,10 @@ function CanvasContextMenu(props) {
|
|
|
10901
10559
|
top: menuPosition.top
|
|
10902
10560
|
},
|
|
10903
10561
|
children: entries.map((entry) => {
|
|
10904
|
-
const run =
|
|
10562
|
+
const run = "host" in entry ? () => {
|
|
10563
|
+
onClose();
|
|
10564
|
+
entry.onSelect();
|
|
10565
|
+
} : handlers[entry.id];
|
|
10905
10566
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
10906
10567
|
entry.separatorBefore && /* @__PURE__ */ jsx(ContextMenuSeparator, {}),
|
|
10907
10568
|
/* @__PURE__ */ jsx(
|
|
@@ -10910,7 +10571,7 @@ function CanvasContextMenu(props) {
|
|
|
10910
10571
|
disabled: entry.disabled || !run,
|
|
10911
10572
|
checked: entry.checked,
|
|
10912
10573
|
onSelect: () => run?.(),
|
|
10913
|
-
children: t(entry.labelKey)
|
|
10574
|
+
children: "host" in entry ? entry.label : t(entry.labelKey)
|
|
10914
10575
|
}
|
|
10915
10576
|
)
|
|
10916
10577
|
] }, entry.id);
|
|
@@ -11337,6 +10998,7 @@ function LazyThumbnailInner({
|
|
|
11337
10998
|
templateElements,
|
|
11338
10999
|
canvasSize,
|
|
11339
11000
|
previewHeight,
|
|
11001
|
+
previewWidth,
|
|
11340
11002
|
fieldContext,
|
|
11341
11003
|
tableStyleContext
|
|
11342
11004
|
}) {
|
|
@@ -11374,6 +11036,7 @@ function LazyThumbnailInner({
|
|
|
11374
11036
|
slide,
|
|
11375
11037
|
templateElements,
|
|
11376
11038
|
canvasSize,
|
|
11039
|
+
previewWidth,
|
|
11377
11040
|
fieldContext,
|
|
11378
11041
|
tableStyleContext
|
|
11379
11042
|
}
|
|
@@ -11383,12 +11046,12 @@ function LazyThumbnailInner({
|
|
|
11383
11046
|
className: "relative w-full overflow-hidden rounded border border-border bg-muted/30 animate-pulse",
|
|
11384
11047
|
style: {
|
|
11385
11048
|
height: previewHeight,
|
|
11386
|
-
minWidth:
|
|
11049
|
+
minWidth: previewWidth
|
|
11387
11050
|
}
|
|
11388
11051
|
}
|
|
11389
11052
|
) });
|
|
11390
11053
|
}
|
|
11391
|
-
var LazyThumbnail =
|
|
11054
|
+
var LazyThumbnail = React7.memo(LazyThumbnailInner);
|
|
11392
11055
|
|
|
11393
11056
|
// src/viewer/components/slides-pane/utils.ts
|
|
11394
11057
|
function formatTimingMs(ms) {
|
|
@@ -11417,12 +11080,8 @@ function buildFlatPaneItems(sectionGroups, showSectionHeaders, collapsedSections
|
|
|
11417
11080
|
}
|
|
11418
11081
|
return items;
|
|
11419
11082
|
}
|
|
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;
|
|
11083
|
+
function estimateSlideItemHeight(canvasWidth, canvasHeight, width = EDITOR_THUMBNAIL_WIDTH) {
|
|
11084
|
+
return editorThumbnailStep(canvasWidth, canvasHeight, width);
|
|
11426
11085
|
}
|
|
11427
11086
|
function SlideItemInner({
|
|
11428
11087
|
slide,
|
|
@@ -11431,6 +11090,7 @@ function SlideItemInner({
|
|
|
11431
11090
|
isActive,
|
|
11432
11091
|
isSelected = false,
|
|
11433
11092
|
canvasSize,
|
|
11093
|
+
previewWidth = EDITOR_THUMBNAIL_WIDTH,
|
|
11434
11094
|
canEdit,
|
|
11435
11095
|
rehearsalTimings,
|
|
11436
11096
|
presenceUsers,
|
|
@@ -11461,8 +11121,7 @@ function SlideItemInner({
|
|
|
11461
11121
|
);
|
|
11462
11122
|
const safeCanvasWidth = Math.max(canvasSize.width, 1);
|
|
11463
11123
|
const safeCanvasHeight = Math.max(canvasSize.height, 1);
|
|
11464
|
-
const
|
|
11465
|
-
const previewHeight = Math.max(56, Math.round(safeCanvasHeight * scale));
|
|
11124
|
+
const previewHeight = editorThumbnailHeight(safeCanvasWidth, safeCanvasHeight, previewWidth);
|
|
11466
11125
|
return /* @__PURE__ */ jsxs(
|
|
11467
11126
|
"button",
|
|
11468
11127
|
{
|
|
@@ -11470,6 +11129,7 @@ function SlideItemInner({
|
|
|
11470
11129
|
ref: slideRef,
|
|
11471
11130
|
"aria-label": t("pptx.slidesPanel.goToSlide", { n: slideIndex + 1 }),
|
|
11472
11131
|
"aria-current": isActive ? "true" : void 0,
|
|
11132
|
+
"data-pptx-chrome": "slide-row",
|
|
11473
11133
|
"aria-describedby": cue.labelId,
|
|
11474
11134
|
"data-pptx-slide-hidden": cue.marker,
|
|
11475
11135
|
className: cn(
|
|
@@ -11485,28 +11145,35 @@ function SlideItemInner({
|
|
|
11485
11145
|
onDragOver,
|
|
11486
11146
|
onDrop: (e) => onDrop(e, slideIndex),
|
|
11487
11147
|
children: [
|
|
11488
|
-
/* @__PURE__ */ jsxs(
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
|
|
11493
|
-
|
|
11494
|
-
|
|
11148
|
+
/* @__PURE__ */ jsxs(
|
|
11149
|
+
"div",
|
|
11150
|
+
{
|
|
11151
|
+
"data-pptx-chrome": "slide-number",
|
|
11152
|
+
className: "flex flex-col items-center gap-0.5 w-5 shrink-0",
|
|
11153
|
+
children: [
|
|
11154
|
+
/* @__PURE__ */ jsx(
|
|
11155
|
+
"span",
|
|
11156
|
+
{
|
|
11157
|
+
className: cn(
|
|
11158
|
+
"text-[10px] tabular-nums text-right select-none w-full",
|
|
11159
|
+
isActive ? "text-primary font-medium" : "text-muted-foreground"
|
|
11160
|
+
),
|
|
11161
|
+
style: isHidden ? { backgroundImage: HIDDEN_SLIDE_SLASH_GRADIENT } : void 0,
|
|
11162
|
+
children: slideIndex + 1
|
|
11163
|
+
}
|
|
11495
11164
|
),
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
)) })
|
|
11509
|
-
] }),
|
|
11165
|
+
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(
|
|
11166
|
+
"span",
|
|
11167
|
+
{
|
|
11168
|
+
className: "w-[6px] h-[6px] rounded-full",
|
|
11169
|
+
style: { backgroundColor: u.userColor },
|
|
11170
|
+
title: u.userName
|
|
11171
|
+
},
|
|
11172
|
+
i
|
|
11173
|
+
)) })
|
|
11174
|
+
]
|
|
11175
|
+
}
|
|
11176
|
+
),
|
|
11510
11177
|
/* @__PURE__ */ jsxs(
|
|
11511
11178
|
"div",
|
|
11512
11179
|
{
|
|
@@ -11514,7 +11181,8 @@ function SlideItemInner({
|
|
|
11514
11181
|
"relative shrink-0 overflow-hidden border transition-colors bg-white",
|
|
11515
11182
|
isActive ? "border-primary/60" : "border-transparent group-hover:border-border/40"
|
|
11516
11183
|
),
|
|
11517
|
-
|
|
11184
|
+
"data-pptx-chrome": "slide-frame",
|
|
11185
|
+
style: { width: previewWidth, height: previewHeight },
|
|
11518
11186
|
children: [
|
|
11519
11187
|
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
11188
|
/* @__PURE__ */ jsx(
|
|
@@ -11524,6 +11192,7 @@ function SlideItemInner({
|
|
|
11524
11192
|
templateElements,
|
|
11525
11193
|
canvasSize,
|
|
11526
11194
|
previewHeight,
|
|
11195
|
+
previewWidth,
|
|
11527
11196
|
fieldContext,
|
|
11528
11197
|
tableStyleContext
|
|
11529
11198
|
}
|
|
@@ -11544,7 +11213,7 @@ function SlideItemInner({
|
|
|
11544
11213
|
}
|
|
11545
11214
|
);
|
|
11546
11215
|
}
|
|
11547
|
-
var SlideItem =
|
|
11216
|
+
var SlideItem = React7.memo(SlideItemInner);
|
|
11548
11217
|
function useSlidePaneCallbacks(onMoveSlide, onRenameSection, onToggleSectionCollapse) {
|
|
11549
11218
|
const [collapsedSections, setCollapsedSections] = useState({});
|
|
11550
11219
|
const [renamingSectionId, setRenamingSectionId] = useState(null);
|
|
@@ -11727,9 +11396,10 @@ function SlidesPaneSidebar({
|
|
|
11727
11396
|
}
|
|
11728
11397
|
return map;
|
|
11729
11398
|
}, [collab]);
|
|
11399
|
+
const previewWidth = editorThumbnailWidth(panelWidth);
|
|
11730
11400
|
const estimatedItemHeight = useMemo(
|
|
11731
|
-
() => estimateSlideItemHeight(canvasSize.width, canvasSize.height),
|
|
11732
|
-
[canvasSize.width, canvasSize.height]
|
|
11401
|
+
() => estimateSlideItemHeight(canvasSize.width, canvasSize.height, previewWidth),
|
|
11402
|
+
[canvasSize.width, canvasSize.height, previewWidth]
|
|
11733
11403
|
);
|
|
11734
11404
|
const showSectionHeaders = sectionGroups.some((group) => group.id !== DEFAULT_SECTION_GROUP_ID);
|
|
11735
11405
|
const {
|
|
@@ -11841,80 +11511,89 @@ function SlidesPaneSidebar({
|
|
|
11841
11511
|
}
|
|
11842
11512
|
const renderVirtualized = () => {
|
|
11843
11513
|
const visibleItems = flatItems.slice(startIndex, endIndex + 1);
|
|
11844
|
-
return /* @__PURE__ */ jsx(
|
|
11514
|
+
return /* @__PURE__ */ jsx(
|
|
11845
11515
|
"div",
|
|
11846
11516
|
{
|
|
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)
|
|
11517
|
+
ref: scrollContainerRef,
|
|
11518
|
+
"data-pptx-chrome": "slide-list",
|
|
11519
|
+
className: "flex-1 overflow-y-auto px-1.5 pb-2",
|
|
11520
|
+
children: /* @__PURE__ */ jsx("div", { style: { height: totalHeight, position: "relative" }, children: /* @__PURE__ */ jsx(
|
|
11521
|
+
"div",
|
|
11522
|
+
{
|
|
11523
|
+
style: {
|
|
11524
|
+
position: "absolute",
|
|
11525
|
+
top: offsetY,
|
|
11526
|
+
left: 0,
|
|
11527
|
+
right: 0
|
|
11908
11528
|
},
|
|
11909
|
-
slide.
|
|
11910
|
-
|
|
11911
|
-
|
|
11529
|
+
children: /* @__PURE__ */ jsx("div", { className: "space-y-1", "data-pptx-chrome": "slide-window", children: visibleItems.map((item) => {
|
|
11530
|
+
if (item.type === "section") {
|
|
11531
|
+
const section = sectionGroups[item.sectionIndex];
|
|
11532
|
+
if (!section) {
|
|
11533
|
+
return null;
|
|
11534
|
+
}
|
|
11535
|
+
const isCollapsed = effectiveCollapsed[section.id] ?? false;
|
|
11536
|
+
return /* @__PURE__ */ jsx(
|
|
11537
|
+
SectionHeader,
|
|
11538
|
+
{
|
|
11539
|
+
sectionId: section.id,
|
|
11540
|
+
label: section.label,
|
|
11541
|
+
slideCount: section.slideIndexes.length,
|
|
11542
|
+
isCollapsed,
|
|
11543
|
+
isRenaming: renamingSectionId === section.id,
|
|
11544
|
+
renameValue,
|
|
11545
|
+
canEdit,
|
|
11546
|
+
sectionIndex: item.sectionIndex,
|
|
11547
|
+
totalSections: sectionGroups.length,
|
|
11548
|
+
renameInputRef,
|
|
11549
|
+
onToggle: toggleSection,
|
|
11550
|
+
onContextMenu: handleSectionContextMenu,
|
|
11551
|
+
onStartRename: startRename,
|
|
11552
|
+
onRenameValueChange: setRenameValue,
|
|
11553
|
+
onCommitRename: commitRename,
|
|
11554
|
+
onCancelRename: cancelRename
|
|
11555
|
+
},
|
|
11556
|
+
`section-${section.id}`
|
|
11557
|
+
);
|
|
11558
|
+
}
|
|
11559
|
+
const slide = slides[item.slideIndex];
|
|
11560
|
+
if (!slide) {
|
|
11561
|
+
return null;
|
|
11562
|
+
}
|
|
11563
|
+
return /* @__PURE__ */ jsx(
|
|
11564
|
+
SlideItem,
|
|
11565
|
+
{
|
|
11566
|
+
slide,
|
|
11567
|
+
templateElements: templateElementsBySlideId[slide.id] ?? EMPTY_TEMPLATE_ELEMENTS,
|
|
11568
|
+
slideIndex: item.slideIndex,
|
|
11569
|
+
isActive: item.slideIndex === activeSlideIndex,
|
|
11570
|
+
isSelected: selectedSlideIds.includes(slide.id),
|
|
11571
|
+
canvasSize,
|
|
11572
|
+
previewWidth,
|
|
11573
|
+
canEdit,
|
|
11574
|
+
rehearsalTimings,
|
|
11575
|
+
presenceUsers: slidePresenceMap?.get(item.slideIndex),
|
|
11576
|
+
fieldContext,
|
|
11577
|
+
tableStyleContext,
|
|
11578
|
+
onSelectSlide: selectSlide,
|
|
11579
|
+
onSlideContextMenu,
|
|
11580
|
+
onOpenSlideCtxMenu: openSlideCtxMenu,
|
|
11581
|
+
onDragStart: handleDragStart,
|
|
11582
|
+
onDragOver: handleDragOver,
|
|
11583
|
+
onDrop: handleDrop,
|
|
11584
|
+
slideRef: setSlideRef(item.slideIndex)
|
|
11585
|
+
},
|
|
11586
|
+
slide.id ?? item.slideIndex
|
|
11587
|
+
);
|
|
11588
|
+
}) })
|
|
11589
|
+
}
|
|
11590
|
+
) })
|
|
11912
11591
|
}
|
|
11913
|
-
)
|
|
11592
|
+
);
|
|
11914
11593
|
};
|
|
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) => {
|
|
11594
|
+
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
11595
|
const isCollapsed = effectiveCollapsed[section.id] ?? false;
|
|
11917
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
11596
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-1", "data-pptx-chrome": "slide-window", children: [
|
|
11918
11597
|
showSectionHeaders && /* @__PURE__ */ jsx(
|
|
11919
11598
|
SectionHeader,
|
|
11920
11599
|
{
|
|
@@ -11950,6 +11629,7 @@ function SlidesPaneSidebar({
|
|
|
11950
11629
|
isActive: idx === activeSlideIndex,
|
|
11951
11630
|
isSelected: selectedSlideIds.includes(slide.id),
|
|
11952
11631
|
canvasSize,
|
|
11632
|
+
previewWidth,
|
|
11953
11633
|
canEdit,
|
|
11954
11634
|
rehearsalTimings,
|
|
11955
11635
|
presenceUsers: slidePresenceMap?.get(idx),
|
|
@@ -11975,12 +11655,13 @@ function SlidesPaneSidebar({
|
|
|
11975
11655
|
{
|
|
11976
11656
|
role: "navigation",
|
|
11977
11657
|
"aria-label": t("pptx.sections.slides"),
|
|
11658
|
+
"data-pptx-chrome": "slides",
|
|
11978
11659
|
className: "flex h-full flex-col border-r border-border bg-secondary/30",
|
|
11979
11660
|
style: panelWidth ? { width: panelWidth, flexShrink: 0 } : void 0,
|
|
11980
11661
|
onKeyDown: onPaneKeyDown,
|
|
11981
11662
|
children: [
|
|
11982
11663
|
shouldVirtualize ? renderVirtualized() : renderNonVirtualized(),
|
|
11983
|
-
canEdit && /* @__PURE__ */ jsx("div", { className: "border-t border-border/60 px-2 py-1.5", children: /* @__PURE__ */ jsxs(
|
|
11664
|
+
canEdit && /* @__PURE__ */ jsx("div", { "data-pptx-chrome": "slide-footer", className: "border-t border-border/60 px-2 py-1.5", children: /* @__PURE__ */ jsxs(
|
|
11984
11665
|
"button",
|
|
11985
11666
|
{
|
|
11986
11667
|
type: "button",
|
|
@@ -12941,7 +12622,7 @@ function arePropsEqual(prev, next) {
|
|
|
12941
12622
|
}
|
|
12942
12623
|
return true;
|
|
12943
12624
|
}
|
|
12944
|
-
var SlideCard =
|
|
12625
|
+
var SlideCard = React7.memo(SlideCardImpl, arePropsEqual);
|
|
12945
12626
|
function SorterContextMenu({
|
|
12946
12627
|
x,
|
|
12947
12628
|
y,
|
|
@@ -14500,8 +14181,8 @@ function SlideNotesPanel({
|
|
|
14500
14181
|
onHeightChange
|
|
14501
14182
|
}) {
|
|
14502
14183
|
const { t } = useTranslation();
|
|
14503
|
-
const rootRef =
|
|
14504
|
-
|
|
14184
|
+
const rootRef = React7.useRef(null);
|
|
14185
|
+
React7.useEffect(() => {
|
|
14505
14186
|
const el = rootRef.current;
|
|
14506
14187
|
if (!el || !onHeightChange) {
|
|
14507
14188
|
return void 0;
|
|
@@ -14562,6 +14243,7 @@ function SlideNotesPanel({
|
|
|
14562
14243
|
"div",
|
|
14563
14244
|
{
|
|
14564
14245
|
ref: rootRef,
|
|
14246
|
+
"data-pptx-chrome": "notes",
|
|
14565
14247
|
className: cn(
|
|
14566
14248
|
"flex flex-col border-t border-border/60 bg-background select-none",
|
|
14567
14249
|
// On mobile, hide the entire notes strip when collapsed: the
|
|
@@ -14589,6 +14271,7 @@ function SlideNotesPanel({
|
|
|
14589
14271
|
{
|
|
14590
14272
|
type: "button",
|
|
14591
14273
|
onClick: onToggle,
|
|
14274
|
+
"data-pptx-chrome": "notes-header",
|
|
14592
14275
|
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
14276
|
"aria-expanded": isExpanded,
|
|
14594
14277
|
"aria-controls": "slide-notes-content",
|
|
@@ -16391,9 +16074,9 @@ function PresentationSubtitleBar({
|
|
|
16391
16074
|
function renderNotesSegments(segments) {
|
|
16392
16075
|
return notesSegmentsToSpans(segments).map((span) => {
|
|
16393
16076
|
if (span.kind === "break") {
|
|
16394
|
-
return
|
|
16077
|
+
return React7.createElement("br", { key: span.key });
|
|
16395
16078
|
}
|
|
16396
|
-
return
|
|
16079
|
+
return React7.createElement(
|
|
16397
16080
|
"span",
|
|
16398
16081
|
{ key: span.key, style: span.style },
|
|
16399
16082
|
span.text
|
|
@@ -16625,7 +16308,7 @@ function scaledSlidePreviewPropsEqual(prev, next) {
|
|
|
16625
16308
|
}
|
|
16626
16309
|
return true;
|
|
16627
16310
|
}
|
|
16628
|
-
var ScaledSlidePreview =
|
|
16311
|
+
var ScaledSlidePreview = React7.memo(ScaledSlidePreviewImpl, scaledSlidePreviewPropsEqual);
|
|
16629
16312
|
function PresenterNotesRail({
|
|
16630
16313
|
slides,
|
|
16631
16314
|
current,
|
|
@@ -17863,7 +17546,7 @@ function EffectSoundRow({
|
|
|
17863
17546
|
onPickStock
|
|
17864
17547
|
}) {
|
|
17865
17548
|
const { t } = useTranslation();
|
|
17866
|
-
const fileInputRef =
|
|
17549
|
+
const fileInputRef = React7.useRef(null);
|
|
17867
17550
|
const selectedValue = soundState.catalogueId ?? (soundState.hasSound ? CURRENT_VALUE : NONE_VALUE);
|
|
17868
17551
|
const handleSelectChange = (event) => {
|
|
17869
17552
|
const value = event.target.value;
|
|
@@ -18730,8 +18413,8 @@ var INSPECTOR_TABS = [
|
|
|
18730
18413
|
{ key: "properties", labelKey: "pptx.inspector.properties", icon: LuSettings2 },
|
|
18731
18414
|
{ key: "comments", labelKey: "pptx.toolbar.comments", icon: LuMessageSquare }
|
|
18732
18415
|
];
|
|
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";
|
|
18416
|
+
var HEADING2 = "pptx-editor-heading text-[11px] uppercase tracking-wide text-muted-foreground";
|
|
18417
|
+
var CARD2 = "pptx-editor-card rounded border border-border bg-card p-2 space-y-2";
|
|
18735
18418
|
var INPUT2 = "flex-1 bg-muted border border-border rounded px-1.5 py-0.5 w-full max-md:min-h-[44px]!";
|
|
18736
18419
|
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
18420
|
var POS_FIELDS = [
|
|
@@ -21449,7 +21132,7 @@ function ConnectorArrowsSection({
|
|
|
21449
21132
|
["Start", "End"].map((end) => {
|
|
21450
21133
|
const widthKey = end === "Start" ? "connectorStartArrowWidth" : "connectorEndArrowWidth";
|
|
21451
21134
|
const lengthKey = end === "Start" ? "connectorStartArrowLength" : "connectorEndArrowLength";
|
|
21452
|
-
return /* @__PURE__ */ jsxs(
|
|
21135
|
+
return /* @__PURE__ */ jsxs(React7.Fragment, { children: [
|
|
21453
21136
|
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
21454
21137
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t(END_LABEL_KEYS[end].width) }),
|
|
21455
21138
|
/* @__PURE__ */ jsx(
|
|
@@ -24326,7 +24009,7 @@ function StrokeEffectsSection({
|
|
|
24326
24009
|
] }),
|
|
24327
24010
|
EFFECT_CONFIGS.map((cfg) => {
|
|
24328
24011
|
const on = cfg.isOn(style);
|
|
24329
|
-
return /* @__PURE__ */ jsxs(
|
|
24012
|
+
return /* @__PURE__ */ jsxs(React7.Fragment, { children: [
|
|
24330
24013
|
/* @__PURE__ */ jsxs("label", { className: `inline-flex items-center gap-2 text-foreground ${COL2}`, children: [
|
|
24331
24014
|
/* @__PURE__ */ jsx(
|
|
24332
24015
|
WebCheckbox,
|
|
@@ -25194,7 +24877,7 @@ function TextWarpGallery({
|
|
|
25194
24877
|
onUpdateTextStyle
|
|
25195
24878
|
}) {
|
|
25196
24879
|
const { t } = useTranslation();
|
|
25197
|
-
const [expanded, setExpanded] =
|
|
24880
|
+
const [expanded, setExpanded] = React7.useState(false);
|
|
25198
24881
|
const currentPreset = ts?.textWarpPreset || "textNoShape";
|
|
25199
24882
|
return /* @__PURE__ */ jsxs("div", { className: "mt-2 rounded border border-border bg-card p-2 space-y-2", children: [
|
|
25200
24883
|
/* @__PURE__ */ jsxs(
|
|
@@ -25845,7 +25528,7 @@ function SmartArtStyleControls({
|
|
|
25845
25528
|
onChangeStyle
|
|
25846
25529
|
}) {
|
|
25847
25530
|
const { t } = useTranslation();
|
|
25848
|
-
const translate =
|
|
25531
|
+
const translate = React7.useCallback((key) => t(key), [t]);
|
|
25849
25532
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
25850
25533
|
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1 text-[11px]", children: [
|
|
25851
25534
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.smartart.colorScheme") }),
|
|
@@ -25900,9 +25583,9 @@ function SmartArtPropertiesPanel({
|
|
|
25900
25583
|
const nodes = smartArtData.nodes ?? [];
|
|
25901
25584
|
const layout = smartArtData.resolvedLayoutType;
|
|
25902
25585
|
const topLevelCount = nodes.filter((n) => !n.parentId).length;
|
|
25903
|
-
const inputRefs =
|
|
25904
|
-
const pendingFocusId =
|
|
25905
|
-
|
|
25586
|
+
const inputRefs = React7.useRef(/* @__PURE__ */ new Map());
|
|
25587
|
+
const pendingFocusId = React7.useRef(null);
|
|
25588
|
+
React7.useEffect(() => {
|
|
25906
25589
|
const id = pendingFocusId.current;
|
|
25907
25590
|
if (id) {
|
|
25908
25591
|
inputRefs.current.get(id)?.focus();
|
|
@@ -27516,7 +27199,7 @@ function CommentBody({ text, mentions, className }) {
|
|
|
27516
27199
|
index
|
|
27517
27200
|
) : (
|
|
27518
27201
|
// eslint-disable-next-line react/no-array-index-key -- segments are positional
|
|
27519
|
-
/* @__PURE__ */ jsx(
|
|
27202
|
+
/* @__PURE__ */ jsx(React7.Fragment, { children: segment.text }, index)
|
|
27520
27203
|
)
|
|
27521
27204
|
) });
|
|
27522
27205
|
}
|
|
@@ -27963,37 +27646,54 @@ function InspectorPaneHeader({
|
|
|
27963
27646
|
const { viewportWidth } = useIsMobile();
|
|
27964
27647
|
const touchTargetPx = getDensePanelTouchTargetPx(viewportWidth);
|
|
27965
27648
|
const touchBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
|
|
27966
|
-
return /* @__PURE__ */ jsxs(
|
|
27967
|
-
|
|
27968
|
-
|
|
27969
|
-
|
|
27970
|
-
|
|
27971
|
-
|
|
27972
|
-
|
|
27973
|
-
|
|
27974
|
-
|
|
27975
|
-
|
|
27649
|
+
return /* @__PURE__ */ jsxs(
|
|
27650
|
+
"div",
|
|
27651
|
+
{
|
|
27652
|
+
"data-pptx-chrome": "inspector-header",
|
|
27653
|
+
className: "flex items-center justify-between gap-2 px-3 py-2 border-b border-border",
|
|
27654
|
+
children: [
|
|
27655
|
+
/* @__PURE__ */ jsx(
|
|
27656
|
+
"div",
|
|
27657
|
+
{
|
|
27658
|
+
"data-pptx-chrome": "inspector-tabs",
|
|
27659
|
+
role: "tablist",
|
|
27660
|
+
className: "flex items-center gap-1 rounded bg-muted p-0.5",
|
|
27661
|
+
children: INSPECTOR_TABS.map(({ key, labelKey, icon: Icon }) => /* @__PURE__ */ jsxs(
|
|
27662
|
+
"button",
|
|
27663
|
+
{
|
|
27664
|
+
role: "tab",
|
|
27665
|
+
"aria-selected": activeTab === key,
|
|
27666
|
+
type: "button",
|
|
27667
|
+
title: t(labelKey),
|
|
27668
|
+
style: touchBtnStyle,
|
|
27669
|
+
className: cn(
|
|
27670
|
+
"flex items-center justify-center gap-1 px-2 py-1 rounded text-[11px] transition-colors",
|
|
27671
|
+
activeTab === key ? "bg-primary text-white" : "text-muted-foreground hover:text-foreground hover:bg-accent"
|
|
27672
|
+
),
|
|
27673
|
+
onClick: () => onSetActiveTab(key),
|
|
27674
|
+
children: [
|
|
27675
|
+
/* @__PURE__ */ jsx(Icon, { className: "w-3.5 h-3.5" }),
|
|
27676
|
+
/* @__PURE__ */ jsx("span", { className: "hidden sm:inline", children: t(labelKey) })
|
|
27677
|
+
]
|
|
27678
|
+
},
|
|
27679
|
+
key
|
|
27680
|
+
))
|
|
27681
|
+
}
|
|
27976
27682
|
),
|
|
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
|
-
] });
|
|
27683
|
+
/* @__PURE__ */ jsx(
|
|
27684
|
+
"button",
|
|
27685
|
+
{
|
|
27686
|
+
type: "button",
|
|
27687
|
+
onClick: onClose,
|
|
27688
|
+
title: t("pptx.common.close"),
|
|
27689
|
+
style: touchBtnStyle,
|
|
27690
|
+
className: "flex items-center justify-center rounded text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",
|
|
27691
|
+
children: /* @__PURE__ */ jsx(LuX, { className: "w-4 h-4" })
|
|
27692
|
+
}
|
|
27693
|
+
)
|
|
27694
|
+
]
|
|
27695
|
+
}
|
|
27696
|
+
);
|
|
27997
27697
|
}
|
|
27998
27698
|
function InfoRow({ label, value }) {
|
|
27999
27699
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
@@ -28338,9 +28038,9 @@ function PresentationSettingsCard({
|
|
|
28338
28038
|
onUpdate
|
|
28339
28039
|
}) {
|
|
28340
28040
|
const { t } = useTranslation();
|
|
28341
|
-
return /* @__PURE__ */ jsxs("div", { className: CARD2
|
|
28041
|
+
return /* @__PURE__ */ jsxs("div", { className: `${CARD2} pptx-editor-presentation-card`, children: [
|
|
28342
28042
|
/* @__PURE__ */ jsx("div", { className: HEADING2, children: t("pptx.slideInspector.presentation") }),
|
|
28343
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5 text-[11px]", children: [
|
|
28043
|
+
/* @__PURE__ */ jsxs("div", { "data-pptx-chrome": "presentation-fields", className: "space-y-1.5 text-[11px]", children: [
|
|
28344
28044
|
/* @__PURE__ */ jsxs("label", { className: "flex items-center justify-between gap-2", children: [
|
|
28345
28045
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.presentationSettings.showType") }),
|
|
28346
28046
|
/* @__PURE__ */ jsxs(
|
|
@@ -29018,7 +28718,7 @@ function PresentationPropertiesPanel({
|
|
|
29018
28718
|
onUpdateTagCollections
|
|
29019
28719
|
}) {
|
|
29020
28720
|
const { t } = useTranslation();
|
|
29021
|
-
const handleTransitionChange =
|
|
28721
|
+
const handleTransitionChange = React7.useCallback(
|
|
29022
28722
|
(updates) => {
|
|
29023
28723
|
onUpdateSlide({
|
|
29024
28724
|
transition: mergeSlideTransition(activeSlide?.transition, updates)
|
|
@@ -29026,7 +28726,7 @@ function PresentationPropertiesPanel({
|
|
|
29026
28726
|
},
|
|
29027
28727
|
[activeSlide?.transition, onUpdateSlide]
|
|
29028
28728
|
);
|
|
29029
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
28729
|
+
return /* @__PURE__ */ jsxs("div", { "data-pptx-chrome": "deck-properties", className: "space-y-3", children: [
|
|
29030
28730
|
/* @__PURE__ */ jsx(
|
|
29031
28731
|
PresentationSettingsCard,
|
|
29032
28732
|
{
|
|
@@ -29405,6 +29105,7 @@ function InspectorPane(props) {
|
|
|
29405
29105
|
/* @__PURE__ */ jsxs(
|
|
29406
29106
|
"div",
|
|
29407
29107
|
{
|
|
29108
|
+
"data-pptx-chrome": "inspector",
|
|
29408
29109
|
className: cn(
|
|
29409
29110
|
// Shared styles
|
|
29410
29111
|
"bg-background flex flex-col text-xs text-foreground shadow-xl",
|
|
@@ -29441,7 +29142,7 @@ function InspectorPane(props) {
|
|
|
29441
29142
|
onClose
|
|
29442
29143
|
}
|
|
29443
29144
|
),
|
|
29444
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto p-3 space-y-3", children: [
|
|
29145
|
+
/* @__PURE__ */ jsxs("div", { "data-pptx-chrome": "inspector-body", className: "flex-1 overflow-y-auto p-3 space-y-3", children: [
|
|
29445
29146
|
activeTab === "elements" && /* @__PURE__ */ jsx(
|
|
29446
29147
|
InspectorElementsTab,
|
|
29447
29148
|
{
|
|
@@ -32936,7 +32637,7 @@ function ViewerToolbarSection(props) {
|
|
|
32936
32637
|
},
|
|
32937
32638
|
[activeSlide, propertyHandlers]
|
|
32938
32639
|
);
|
|
32939
|
-
const scopedLayoutOptions =
|
|
32640
|
+
const scopedLayoutOptions = React7.useMemo(
|
|
32940
32641
|
() => scopeLayoutOptionsToActiveSlide(s.layoutOptions, activeSlide),
|
|
32941
32642
|
[s.layoutOptions, activeSlide]
|
|
32942
32643
|
);
|
|
@@ -34908,7 +34609,7 @@ function useTableStyleMapHandlers(input) {
|
|
|
34908
34609
|
var AiChatPanel = lazy(async () => {
|
|
34909
34610
|
const [{ useChat }, { default: Panel }] = await Promise.all([
|
|
34910
34611
|
import('@ai-sdk/react'),
|
|
34911
|
-
import('./AiChatPanel-
|
|
34612
|
+
import('./AiChatPanel-K3PL6O3M.mjs')
|
|
34912
34613
|
]);
|
|
34913
34614
|
function BoundAiChatPanel(props) {
|
|
34914
34615
|
return /* @__PURE__ */ jsx(Panel, { ...props, useChat });
|
|
@@ -35030,348 +34731,38 @@ function AiChangeOverlay({ batch, activeSlideIndex }) {
|
|
|
35030
34731
|
))
|
|
35031
34732
|
] });
|
|
35032
34733
|
}
|
|
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
|
-
}) {
|
|
34734
|
+
function ThemeEditorPanel({ theme, canEdit, onApply, onClose }) {
|
|
35176
34735
|
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) {
|
|
34736
|
+
const ref = useRef(null);
|
|
34737
|
+
useEffect(() => {
|
|
34738
|
+
const node = ref.current;
|
|
34739
|
+
if (node) {
|
|
34740
|
+
node.theme = theme;
|
|
34741
|
+
node.labels = themeEditorLabels(t);
|
|
34742
|
+
node.disabled = !canEdit;
|
|
34743
|
+
}
|
|
34744
|
+
}, [theme, canEdit, t]);
|
|
34745
|
+
useEffect(() => {
|
|
34746
|
+
const node = ref.current;
|
|
34747
|
+
if (!node) {
|
|
35249
34748
|
return;
|
|
35250
34749
|
}
|
|
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
|
|
34750
|
+
const apply = (event) => {
|
|
34751
|
+
if (!node.disabled) {
|
|
34752
|
+
node.disabled = true;
|
|
34753
|
+
void Promise.resolve(onApply(event.detail)).finally(() => {
|
|
34754
|
+
node.disabled = !canEdit;
|
|
34755
|
+
});
|
|
35350
34756
|
}
|
|
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
|
-
] });
|
|
34757
|
+
};
|
|
34758
|
+
node.addEventListener("theme-editor-apply", apply);
|
|
34759
|
+
node.addEventListener("theme-editor-close", onClose);
|
|
34760
|
+
return () => {
|
|
34761
|
+
node.removeEventListener("theme-editor-apply", apply);
|
|
34762
|
+
node.removeEventListener("theme-editor-close", onClose);
|
|
34763
|
+
};
|
|
34764
|
+
}, [canEdit, onApply, onClose]);
|
|
34765
|
+
return /* @__PURE__ */ jsx("pptx-ui-theme-editor", { ref });
|
|
35375
34766
|
}
|
|
35376
34767
|
function MobileDismissSheet({
|
|
35377
34768
|
onClose,
|
|
@@ -35918,22 +35309,15 @@ function ViewerSidePanels(props) {
|
|
|
35918
35309
|
}
|
|
35919
35310
|
),
|
|
35920
35311
|
s.isThemeEditorOpen && mode === "edit" && /* @__PURE__ */ jsx(
|
|
35921
|
-
|
|
35312
|
+
ThemeEditorPanel,
|
|
35922
35313
|
{
|
|
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
|
-
)
|
|
35314
|
+
theme: s.theme,
|
|
35315
|
+
canEdit,
|
|
35316
|
+
onApply: async (edit) => {
|
|
35317
|
+
await themeHandlers.handleApplyThemeEdit(edit);
|
|
35318
|
+
s.setIsThemeEditorOpen(false);
|
|
35319
|
+
},
|
|
35320
|
+
onClose: () => s.setIsThemeEditorOpen(false)
|
|
35937
35321
|
}
|
|
35938
35322
|
),
|
|
35939
35323
|
aiPanel?.isOpen && aiConfig && aiBridge && (mode === "edit" || mode === "master") && /* @__PURE__ */ jsx(
|
|
@@ -35975,6 +35359,88 @@ function ViewerSidePanels(props) {
|
|
|
35975
35359
|
)
|
|
35976
35360
|
] });
|
|
35977
35361
|
}
|
|
35362
|
+
function ViewerContextMenus(props) {
|
|
35363
|
+
const {
|
|
35364
|
+
state,
|
|
35365
|
+
mode,
|
|
35366
|
+
selectedElement,
|
|
35367
|
+
activeSlideIndex,
|
|
35368
|
+
aiPanel,
|
|
35369
|
+
activeSlide,
|
|
35370
|
+
onApplyLayout,
|
|
35371
|
+
editorOps,
|
|
35372
|
+
setLayoutGalleryAnchor
|
|
35373
|
+
} = props;
|
|
35374
|
+
const { manipulation, tableOps } = editorOps;
|
|
35375
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
35376
|
+
state.contextMenuState && /* @__PURE__ */ jsx(
|
|
35377
|
+
ContextMenu,
|
|
35378
|
+
{
|
|
35379
|
+
slideIndex: activeSlideIndex,
|
|
35380
|
+
elementIds: state.effectiveSelectedIds,
|
|
35381
|
+
contextMenuState: state.contextMenuState,
|
|
35382
|
+
mode,
|
|
35383
|
+
selectedElement,
|
|
35384
|
+
tableEditorState: state.tableEditorState,
|
|
35385
|
+
hasMultiSelection: state.effectiveSelectedIds.length > 1,
|
|
35386
|
+
selectionGroupable: manipulation.selectionGroupable,
|
|
35387
|
+
hasClipboard: Boolean(state.clipboardPayload),
|
|
35388
|
+
editPointsAvailability: resolveEditPointsAvailability(selectedElement),
|
|
35389
|
+
onAction: manipulation.handleContextMenuAction,
|
|
35390
|
+
onInsertTableRow: tableOps.handleInsertTableRow,
|
|
35391
|
+
onDeleteTableRow: tableOps.handleDeleteTableRow,
|
|
35392
|
+
onInsertTableColumn: tableOps.handleInsertTableColumn,
|
|
35393
|
+
onDeleteTableColumn: tableOps.handleDeleteTableColumn,
|
|
35394
|
+
onMergeCellRight: tableOps.handleMergeCellRight,
|
|
35395
|
+
onMergeCellDown: tableOps.handleMergeCellDown,
|
|
35396
|
+
onMergeSelectedCells: tableOps.handleMergeSelectedCells,
|
|
35397
|
+
onSplitCell: tableOps.handleSplitCell,
|
|
35398
|
+
onAskAi: aiPanel && selectedElement ? () => {
|
|
35399
|
+
aiPanel.askAboutSelection();
|
|
35400
|
+
state.setContextMenuState(null);
|
|
35401
|
+
} : void 0,
|
|
35402
|
+
onFixAi: aiPanel && selectedElement ? () => {
|
|
35403
|
+
aiPanel.fixSelection();
|
|
35404
|
+
state.setContextMenuState(null);
|
|
35405
|
+
} : void 0,
|
|
35406
|
+
onClose: () => state.setContextMenuState(null)
|
|
35407
|
+
}
|
|
35408
|
+
),
|
|
35409
|
+
state.canvasContextMenuState && /* @__PURE__ */ jsx(
|
|
35410
|
+
CanvasContextMenu,
|
|
35411
|
+
{
|
|
35412
|
+
slideIndex: activeSlideIndex,
|
|
35413
|
+
canvasContextMenuState: state.canvasContextMenuState,
|
|
35414
|
+
mode,
|
|
35415
|
+
hasClipboard: Boolean(state.clipboardPayload),
|
|
35416
|
+
showGrid: state.showGrid,
|
|
35417
|
+
showRulers: state.showRulers,
|
|
35418
|
+
onPaste: () => manipulation.handlePaste(),
|
|
35419
|
+
onOpenLayoutGallery: () => {
|
|
35420
|
+
const pos = state.canvasContextMenuState;
|
|
35421
|
+
if (pos) {
|
|
35422
|
+
setLayoutGalleryAnchor(pos);
|
|
35423
|
+
}
|
|
35424
|
+
},
|
|
35425
|
+
onResetSlide: () => {
|
|
35426
|
+
const path = resetSlideLayoutPath(activeSlide);
|
|
35427
|
+
if (path) {
|
|
35428
|
+
onApplyLayout?.(path);
|
|
35429
|
+
}
|
|
35430
|
+
},
|
|
35431
|
+
onOpenFormatBackground: () => {
|
|
35432
|
+
state.setSelectedElementId(null);
|
|
35433
|
+
state.setSelectedElementIds([]);
|
|
35434
|
+
state.setSidebarPanelMode("properties");
|
|
35435
|
+
state.setIsInspectorPaneOpen(true);
|
|
35436
|
+
},
|
|
35437
|
+
onToggleGrid: () => state.setShowGrid((v) => !v),
|
|
35438
|
+
onToggleRulers: () => state.setShowRulers((v) => !v),
|
|
35439
|
+
onClose: () => state.setCanvasContextMenuState(null)
|
|
35440
|
+
}
|
|
35441
|
+
)
|
|
35442
|
+
] });
|
|
35443
|
+
}
|
|
35978
35444
|
function ViewerMainContent(props) {
|
|
35979
35445
|
const {
|
|
35980
35446
|
mode,
|
|
@@ -36021,8 +35487,8 @@ function ViewerMainContent(props) {
|
|
|
36021
35487
|
canvasHandlers,
|
|
36022
35488
|
insertHandlers,
|
|
36023
35489
|
manipulation,
|
|
36024
|
-
slideOps,
|
|
36025
35490
|
tableOps,
|
|
35491
|
+
slideOps,
|
|
36026
35492
|
findReplace
|
|
36027
35493
|
} = editorOps;
|
|
36028
35494
|
const hf = state.headerFooter;
|
|
@@ -36045,7 +35511,7 @@ function ViewerMainContent(props) {
|
|
|
36045
35511
|
);
|
|
36046
35512
|
const layoutGalleryAnchorRef = useRef(null);
|
|
36047
35513
|
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: [
|
|
35514
|
+
return /* @__PURE__ */ jsx(ChartPartSelectionProvider, { children: /* @__PURE__ */ jsxs("div", { "data-pptx-chrome": "body", className: "relative z-10 flex flex-1 min-h-0", children: [
|
|
36049
35515
|
showSlidesPane && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
36050
35516
|
/* @__PURE__ */ jsx(
|
|
36051
35517
|
SlidesPaneSidebar,
|
|
@@ -36177,69 +35643,7 @@ function ViewerMainContent(props) {
|
|
|
36177
35643
|
] }) : void 0
|
|
36178
35644
|
}
|
|
36179
35645
|
),
|
|
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
|
-
),
|
|
35646
|
+
/* @__PURE__ */ jsx(ViewerContextMenus, { ...props, setLayoutGalleryAnchor }),
|
|
36243
35647
|
layoutGalleryAnchor && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
36244
35648
|
/* @__PURE__ */ jsx(
|
|
36245
35649
|
"div",
|
|
@@ -36423,6 +35827,9 @@ function CompatibilityToasts({
|
|
|
36423
35827
|
}
|
|
36424
35828
|
);
|
|
36425
35829
|
}
|
|
35830
|
+
function EditorChromeStyle() {
|
|
35831
|
+
return /* @__PURE__ */ jsx("style", { "data-pptx-editor-styles": "", children: EDITOR_CHROME_CSS });
|
|
35832
|
+
}
|
|
36426
35833
|
function ToggleRow({ checked, onChange, icon, label, testId }) {
|
|
36427
35834
|
return /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2.5 cursor-pointer group select-none", children: [
|
|
36428
35835
|
/* @__PURE__ */ jsxs("span", { className: "relative flex items-center justify-center w-4 h-4", children: [
|
|
@@ -36740,7 +36147,7 @@ function MobileChromeOverlay(props) {
|
|
|
36740
36147
|
/* @__PURE__ */ jsx(
|
|
36741
36148
|
MobileSlidesSheet,
|
|
36742
36149
|
{
|
|
36743
|
-
open: s.isSlidesPaneOpen,
|
|
36150
|
+
open: s.isSlidesPaneOpen && !s.isThemeEditorOpen,
|
|
36744
36151
|
onClose: () => s.setIsSlidesPaneOpen(false),
|
|
36745
36152
|
slides,
|
|
36746
36153
|
templateElementsBySlideId: s.templateElementsBySlideId,
|
|
@@ -39289,6 +38696,7 @@ var PowerPointViewer = forwardRef(
|
|
|
39289
38696
|
{
|
|
39290
38697
|
style: themeStyle,
|
|
39291
38698
|
"data-pptx-viewer": "",
|
|
38699
|
+
"data-pptx-editor-chrome": "",
|
|
39292
38700
|
...{ [RIBBON_SCOPE_ATTR]: ribbonScope },
|
|
39293
38701
|
"aria-busy": loading,
|
|
39294
38702
|
className: cn(
|
|
@@ -39296,6 +38704,7 @@ var PowerPointViewer = forwardRef(
|
|
|
39296
38704
|
...resolveOptionRootClasses(viewerOptions, "pptx")
|
|
39297
38705
|
),
|
|
39298
38706
|
children: [
|
|
38707
|
+
/* @__PURE__ */ jsx(EditorChromeStyle, {}),
|
|
39299
38708
|
/* @__PURE__ */ jsx(RibbonCustomizationStyle, { resolved: customizationResolved, scope: ribbonScope }),
|
|
39300
38709
|
/* @__PURE__ */ jsx(
|
|
39301
38710
|
"div",
|