pptx-react-viewer 4.36.3 → 4.38.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/dist/{chunk-F76MGAHF.mjs → chunk-3SFBCFHJ.mjs} +43 -6
  3. package/dist/chunk-3SFBCFHJ.mjs.br +0 -0
  4. package/dist/chunk-3SFBCFHJ.mjs.gz +0 -0
  5. package/dist/{chunk-JPVT7TY7.mjs → chunk-LLH3I2XY.mjs} +630 -677
  6. package/dist/chunk-LLH3I2XY.mjs.br +0 -0
  7. package/dist/chunk-LLH3I2XY.mjs.gz +0 -0
  8. package/dist/{chunk-VCRUM3NE.js → chunk-Q5WEQ37H.js} +1621 -1668
  9. package/dist/chunk-Q5WEQ37H.js.br +0 -0
  10. package/dist/chunk-Q5WEQ37H.js.gz +0 -0
  11. package/dist/{chunk-ODFNNB5X.js → chunk-TCEDOLGE.js} +42 -4
  12. package/dist/chunk-TCEDOLGE.js.br +0 -0
  13. package/dist/chunk-TCEDOLGE.js.gz +0 -0
  14. package/dist/i18n/de.cjs +142 -8
  15. package/dist/i18n/de.cjs.br +0 -0
  16. package/dist/i18n/de.cjs.gz +0 -0
  17. package/dist/i18n/de.mjs +142 -8
  18. package/dist/i18n/de.mjs.br +0 -0
  19. package/dist/i18n/de.mjs.gz +0 -0
  20. package/dist/i18n/es.cjs +142 -8
  21. package/dist/i18n/es.cjs.br +0 -0
  22. package/dist/i18n/es.cjs.gz +0 -0
  23. package/dist/i18n/es.mjs +142 -8
  24. package/dist/i18n/es.mjs.br +0 -0
  25. package/dist/i18n/es.mjs.gz +0 -0
  26. package/dist/i18n/fr.cjs +142 -8
  27. package/dist/i18n/fr.cjs.br +0 -0
  28. package/dist/i18n/fr.cjs.gz +0 -0
  29. package/dist/i18n/fr.mjs +142 -8
  30. package/dist/i18n/fr.mjs.br +0 -0
  31. package/dist/i18n/fr.mjs.gz +0 -0
  32. package/dist/i18n/zh-CN.cjs +143 -9
  33. package/dist/i18n/zh-CN.cjs.br +0 -0
  34. package/dist/i18n/zh-CN.cjs.gz +0 -0
  35. package/dist/i18n/zh-CN.mjs +143 -9
  36. package/dist/i18n/zh-CN.mjs.br +0 -0
  37. package/dist/i18n/zh-CN.mjs.gz +0 -0
  38. package/dist/index.d.ts +21 -5
  39. package/dist/index.js +22 -22
  40. package/dist/index.js.br +0 -0
  41. package/dist/index.js.gz +0 -0
  42. package/dist/index.mjs +2 -2
  43. package/dist/index.mjs.br +0 -0
  44. package/dist/index.mjs.gz +0 -0
  45. package/dist/internals.d.ts +34 -30
  46. package/dist/internals.js +80 -80
  47. package/dist/internals.js.br +0 -0
  48. package/dist/internals.js.gz +0 -0
  49. package/dist/internals.mjs +1 -1
  50. package/dist/internals.mjs.br +0 -0
  51. package/dist/internals.mjs.gz +0 -0
  52. package/dist/pptx-viewer.css +1 -1
  53. package/dist/pptx-viewer.css.br +0 -0
  54. package/dist/pptx-viewer.css.gz +0 -0
  55. package/dist/viewer/index.d.ts +17 -3
  56. package/dist/viewer/index.js +17 -17
  57. package/dist/viewer/index.js.br +0 -0
  58. package/dist/viewer/index.js.gz +0 -0
  59. package/dist/viewer/index.mjs +2 -2
  60. package/dist/viewer/index.mjs.br +0 -0
  61. package/dist/viewer/index.mjs.gz +0 -0
  62. package/package.json +3 -3
  63. package/dist/chunk-F76MGAHF.mjs.br +0 -0
  64. package/dist/chunk-F76MGAHF.mjs.gz +0 -0
  65. package/dist/chunk-JPVT7TY7.mjs.br +0 -0
  66. package/dist/chunk-JPVT7TY7.mjs.gz +0 -0
  67. package/dist/chunk-ODFNNB5X.js.br +0 -0
  68. package/dist/chunk-ODFNNB5X.js.gz +0 -0
  69. package/dist/chunk-VCRUM3NE.js.br +0 -0
  70. package/dist/chunk-VCRUM3NE.js.gz +0 -0
@@ -1,11 +1,11 @@
1
- import { useViewerOptions, useReadOnlyRecommendationState, useCompatibilityToastsState, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useViewPreferencesSync, useLayoutSwitching, Rendering3DFlagsContext, CollaborationProvider, useCollaboration, useCollaborationDocumentSync, useFollowMode, useBroadcastFollower, SlideBackgroundImageLayer, StaticElementRenderer, safePrompt, scopeLayoutOptionsToActiveSlide, ChartPartSelectionProvider, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, ViewerOptionsStoreContext, ViewerOptionsContext, useViewerOptionsContext, useVirtualizedSlides, useSwipeNavigation, PresentationTransitionOverlay, RemoteSelectionOverlay, CollaborationCursorOverlay, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, ElementRenderer, InlineCollaborationContext, SmartArtRenderer, downloadBlob, playAnimationSound, ResizeHandles, imgSrc, renderStrokeView, useChartPartSelection, DUOTONE_PRESETS, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, resolveSmartArtDataPalette } from './chunk-F76MGAHF.mjs';
2
- import { ANIMATION_PRESET_OPTIONS, dist_exports, cn, SLIDE_NAV_THUMBNAIL_WIDTH, SLIDE_TRANSITION_OPTIONS, normalizeHexColor, hasCopyableFormat, DEFAULT_SECTION_GROUP_ID, safeOpenUrl, isPpactionUrl, parsePpactionUrl, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, TOOLBAR_SECTIONS, isUrlSafe, computeHandoutLayout, getPrintableArea, generateNoteLineCount, UNGROUPED_SECTION_ID, getShapeAdjustmentHandleDescriptors, isConnectorOrLineElement, GRID_SIZE, getElementTransformWithoutRotation, getElementTransform, MIN_ELEMENT_SIZE, getElementLabel, TABLE_STYLE_PRESETS, SHAPE_PRESETS, sanitizeGradientStops, formatCommentTimestamp, clampCropValue, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, DEFAULT_FILL_COLOR, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, SHAPE_QUICK_STYLES, getPatternSvg, DEFAULT_STROKE_COLOR, STROKE_DASH_OPTIONS, openNativeEyeDropper } from './chunk-UC2VQORY.mjs';
3
- import { EMPTY_RESOLVED_CUSTOMIZATION, ANIMATION_DIRECTION_LABEL_KEYS, compileEquationTemplateMathMl, resolveViewerRootOptions, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, isFeatureEnabled, isDialogAvailable, resolveAutosaveActivation, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, attachViewerHyperlinks, shouldConfirmExternalHyperlink, applyAutoCorrect, resolveImageResolutionScale, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, createSlidePackageClipboard, isPanelVisible, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, RIBBON_SCOPE_ATTR, resolve3DRenderingFlags, resolveSlideSizeSelection, RULER_THICKNESS, RULER_FONT_SIZE, editorThumbnailHeight, buildPreviewElements, deriveSlideFieldContext, deviceStrokeStageStyle, hiddenSlideCue, EDITOR_THUMBNAIL_WIDTH, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, visibleTemplateElements, themeToCssVars, createCustomizationController, resolveEffectiveHiddenActions, listAutosaveSnapshots, resolveExpiredAutosaveSnapshots, deleteAutosaveSnapshot, masterViewCrudActions, applyMasterViewCrudAction, masterViewCrudFailureKey, EDITOR_CHROME_CSS, ribbonCustomizationCss, applyMotionPathPreset, resetSlideLayoutPath, DEFAULT_INSERT_CHART_KIND, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, shouldDiscardAutosaveOnSuccessfulSave, buildFieldSubstitutionContext, setMasterViewBackgroundColor, canUseClipboard, runProgramNoticeStackStyle, printPropertiesFrameSlides, printPropertiesSlidesPerPage, PASTE_SPECIAL_OPTIONS, findCanvasElementNode, 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, homeLaunchers, attachRibbonOverflow, editorThumbnailWidth, masterViewBackgroundColor, resolvePresentationAction, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, resolveEditPointsAvailability, isCurrentLayout, observeElementHeight, EXPANDED_MAX_HEIGHT, resolveStatusBarSave, statusBarViewMode, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, clampPercent, resolveDefaultPrintSettings, HANDOUT_OPTIONS, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS, resolveViewerAddinRows, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, CUSTOM_FONT_ACCEPT, activateModalFocus, buildCollaborationShareUrl, buildActiveSessionUsers, slideClipboardLabels, sorterPasteInsertAt, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, SORTER_MAX_ZOOM, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, listenForOutlineViewDismiss, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, cropModeKeyAction, buildTitleBarState, resolveScreenTip, visibleContextualTabs, resolveActiveRibbonTab, visibleRibbonAddIns, RIBBON_ADD_IN_TAB_ATTR, contextualTabLabelKey, RIBBON_CONTEXTUAL_TAB_ATTR, buildTabRowActionsState, TAB_ROW_ACTION_CLASSES, tabRowActionsAttributes, customizeBackstageNav, BACKSTAGE_NAV, listBackstageRecentFiles, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, FREEFORM_TOOL_IDS, isDrawingToolVisible, textFontSizePtToPx, withHomeGalleries, drawingHomeControls, homeGalleryControls, homeGalleryApply, shapeOutlineChange, shapeFillChange, editingHomeControls, arrangeHomeControls, arrangePainterHomeControls, arrangeAlignAction, DESIGN_RIBBON_GROUPS, DESIGN_RIBBON_COMMANDS, designCommandState, FIXED_TAB_GALLERIES, CONTEXTUAL_TAB_GROUPS, editorThumbnailStep, resolveSlidePaneClick, SLIDE_VIRTUALIZATION_THRESHOLD, buildSectionContextMenuEntries, buildSlidePaneContextMenuEntries, slidePaneViewItems, isEditPointsEnabled, findReplacementAvailability, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, buildStrokePathD, cursorForTool, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, PRESENTER_NAVIGATOR_LABEL_KEYS, getPresentationContextMenuSections, CONTEXT_MENU_PRESENTATION_LAYER, presentationViewItems, subtitleRecognitionLanguage, subtitleSettingsFromOptions, getSpeechRecognitionCtor, mergeCaptionResults, customizeContextMenuEntries, buildContextMenuEntries, contextMenuViewItems, customizeCanvasContextMenuEntries, buildCanvasContextMenuEntries, buildLayoutPreviewGeometry, scaleSlidesForSizeChange, slideSizeToCanvasPx, resolveSelectionPaneRename, themeEditorLabels, resolveNotesSegments, defaultRichEnabled, segmentsToEditorHtml, DEBOUNCE_MS, createPlainNotesSegments, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX as INDENT_PX$1, buildNotesPrintHtml, MIN_TOUCH_TARGET_PX, toggleSheet, SMARTART_PREVIEW_ELEMENT_HEIGHT, SMARTART_PREVIEW_ELEMENT_WIDTH, buildSmartArtPreviewElement, sanitizeMathMl, computeAllNotesPages, getNotesPrintableArea, clampOptionNumber, QUICK_ACCESS_COMMAND_CATALOG, registerCustomFont, createSlideSorterState, sorterSelectionIndexes, selectSorterSlide, applySorterAction, sorterGridColumns, sorterMenuContext, buildSlideSorterContextMenuEntries, slideSorterContextMenuLabel, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, presenterConsoleAction, presenterConsoleViewState, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, customizeBackstageCards, backstageCardsFor, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, clipboardHomeControls, slidesHomeControls, resolveDefaultFontFamily, textFontSizePxToPt, getInlineEditorSelectionResult, selectedParagraphBulletKind, elementBulletKind, selectionBulletKind, fontPickerHomeControls, fontHomeControls, nextToggleValue, RIBBON_GROUP_ATTR, paragraphHomeAlign, paragraphHomeControls, paragraphHomeAction, arrangeShapeHomeControls, strokeWidthOf, canSetStrokeWidth, canUngroupSelection, canGroupSelection, buildRibbonGallery, readRibbonTransitionDraft, SLIDE_SHOW_COMMAND_GROUPS, RECORD_COMMAND_GROUPS, buildReviewRibbon, HELP_RIBBON_COMMANDS, galleryTextLabel, pictureSizeHomeControls, sectionAddAfterSlideIndex, masterViewPseudoSlide, PRESENTATION_ANIM_TRIGGER_ATTRIBUTE, parentSelection, slideSpaceElement, isGroupMember, motionPathFor, setMotionPath, shouldShowElementHandles, computeAnchoredPopupPosition, applyTableStyleDelete, applyTableStyleMapChange, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, SLIDE_TEMPLATES, getSelectionTextStyleFlags, TEXT_DECORATION_FLAGS, dispatchCropRequest, applyRibbonGalleryItem, ribbonTransitionsDraftPatch, ribbonTransitionUpdates, ribbonTransitionsSoundChange, ribbonTransitionStockSoundUrl, playSlideTransitionPreview, playAnimationRibbonPreview, SLIDE_SHOW_OPTIONS, createViewerOptionsStore, subtitleSettingsLabels, attachEditorImagePaste, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, resolveElementInteractivity, buildChartQuickActionsDescriptor, applyChartElementToggle, CHART_QUICK_ACTION_BUTTON_SIZE, applyChartStylePreset, hideChartSeries, restoreFilteredSeries, buildCropOverlay, CROP_HANDLE_ARIA_KEY, getActiveXControlOverlayView, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, canEditElementPoints, MERGE_SHAPES_MENU_ITEMS, hasMultipleSelectedTableCells, isElementLocked, mergeSlideTransition, slideBackgroundClearState, slideBackgroundClearPatch, effectiveDirection, TRIGGER_OPTIONS, effectiveTimingCurve, getAfterAnimationState, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, buildSlideTemplateContent, updateSubtitleSettings, buildFreeformShapeElement, buildLiveInkStrokeView, beginCropDrag, CONNECTOR_SITE_SNAP_PX, resolveConnectorEndpointUpdate, withConnectorEndpointUpdate, getShapeConnectionSites, FreeformToolSession, attachOverlayKeyboard, EditPointsSession, EDIT_POINTS_STYLE, elementLockTogglePatch, buildTableDataGrid, getDenseGridLayoutPlan, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, applyTableStylePreset, tableStyleAssignmentUpdate, evenColumnWidths, redistributeColumnWidth, evenRowHeights, inspectorNumber, patchChartData, collapseChartTitleRunsForEdit, chartGridlinesState, chartGridlinesPatch, seriesSecondaryAxisPatch, setChartCategoryLabel, setChartCellValue, addChartCategory, removeChartCategory, addChartSeries, removeChartSeries, setDataLabelsRangeCache, describeSmartArtBounds, canAddTopLevelNode, classifyExtraConnections, siblingIndex, siblingCount, canRemoveTopLevelNode, imageResetPatch, imageResetState, canInteractWithElement, buildOleObjectNamePatch, shouldShowAccessibilitySection, withFrameSlides, withSlidesPerPage, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, SLIDE_SIZE_PRESETS, TRANSITION_ORIENTATION_TYPES, clampTransitionNumber, TRANSITION_SPEED_OPTIONS, TRANSITION_MORPH_OPTIONS, flattenTagCollections, resolveTemplateBackgroundRows, commentMentionQuery, matchCommentMentionAuthors, buildAnimationTimelineRows, clearMotionPath, setTrigger, setTriggerBookmark, getEffectSoundState, setEffectSound, setEffectStockSound, setAfterAnimation, setAfterAnimationColor, directionValuesFor, buildAnimationTimelineBars, motionPathPresetIdForPath, MOTION_PATH_FAMILIES, motionPathPresetsByFamily, motionPathPresetLabelKey, motionPathFamilyLabelKey, EFFECT_SOUND_CATALOGUE, listMediaBookmarkOptions, selectedBookmarkOptionValue, hasTiltData, toElementAxes, dragCropHandle, panCropImage, clientToSlidePoint, EDIT_POINTS_TARGET_ATTR, describeTableStyleEditor, TABLE_STYLE_EDITOR_PARTS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, resolveDisplayedChartType, CHART_TYPE_OPTIONS, chartDataLabelsTogglePatch, BAR3D_SHAPE_OPTIONS, bar3DShapePatch, RADAR_STYLE_OPTIONS, radarStylePatch, SURFACE_WIREFRAME_OPTIONS, surfaceWireframePatch, isSeriesUsingSecondaryAxis, seriesColorClearState, listChartUserShapeRows, withChartUserShapeAdded, createDefaultChartUserShape, withChartUserShapeRowRemoved, withChartUserShapeRowTextUpdated, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, addSiblingAfter, removeEmptyNode, demote, promote, reorder, cropResetState, cropResetPatch, ARTISTIC_EFFECTS, mediaTrimEndSeconds, trimmedMediaDurationMs, mediaTrimEndAbsoluteMs, mediaTrimResetState, mediaTrimEndMsFromAbsoluteMs, mediaTrimResetPatch, buildOleEditDialogDescriptor, buildOleContentUpdatePatch, buildThemeColorSwatchGrid, themeColorSwatchRows, findSelectedThemeSwatch, themeSwatchCommit, getNonVisualDescriptionFields, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, canCommitActionType, slideSizeFromPreset, withSlideSizeOrientation, TRANSITION_DIR_ARROWS, buildDirectionGrid, updateTagInCollections, deleteTagFromCollections, addTagToCollections, commentTextSegments, COMMENT_MENTION_CLASS, COMMENT_MENTION_ATTRIBUTE, insertCommentMention, reorderAnimationTimelineRows, applyAnimationTimelineOrder, getEffectSoundAsset, animationEffectLabel, overlayPointerInput, TABLE_STYLE_BORDER_SIDES, applyTableStyleFieldEdit, withCellStyle, LBL as LBL$1, SEL as SEL$1, FILL_MODE_OPTIONS as FILL_MODE_OPTIONS$1, SECTION_HEADING, NUM as NUM$1, getChartUserShapeGroupTransform, withChartUserShapeGroupChildAdded, createDefaultChartUserShapeGroupChild, withChartUserShapeRowUpdated, getChartUserShapeRowChartBox, withChartUserShapeRowFlipUpdated, withChartUserShapeRowRotationUpdated, withChartUserShapeRowChartBoxUpdated, smartArtLayoutSwitchPatch, rebuildDrawingShapesIfCleared, mediaTrimEndMsFromSeconds, validateMediaTrimRange, quickStyleSwatchCss, shapeQuickStyleLabel, OFFICE_COLOR_SWATCHES, officeColorSwatchLabel, PATTERN_PRESET_OPTIONS as PATTERN_PRESET_OPTIONS$1, COMPOUND_LINE_OPTIONS as COMPOUND_LINE_OPTIONS$1, LINE_JOIN_OPTIONS as LINE_JOIN_OPTIONS$1, LINE_CAP_OPTIONS as LINE_CAP_OPTIONS$1, TEXT_WARP_PRESETS, warpPreviewPath, text3dPtToEmu, text3dEmuToPt, MATERIAL_PRESETS, toSlideIndex, TABLE_STYLE_BORDER_SIDE_LABEL_KEYS, TABLE_STYLE_DASH_PRESETS, GRADIENT_TYPE_OPTIONS as GRADIENT_TYPE_OPTIONS$1, PATTERN_OPTIONS, FILL_PATTERN_LABEL_KEYS, toggleText3dExtrusion, BEVEL_PRESETS, cropFit, cropFill, cropToAspectRatio } from 'ooxml-ui/pptx';
1
+ import { useViewerOptions, useReadOnlyRecommendationState, useCompatibilityToastsState, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useViewPreferencesSync, useLayoutSwitching, Rendering3DFlagsContext, CollaborationProvider, useCollaboration, useCollaborationDocumentSync, useFollowMode, useBroadcastFollower, SlideBackgroundImageLayer, StaticElementRenderer, safePrompt, scopeLayoutOptionsToActiveSlide, createReviewCommentsHost, ChartPartSelectionProvider, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, ViewerOptionsStoreContext, ViewerOptionsContext, useViewerOptionsContext, useVirtualizedSlides, useSwipeNavigation, PresentationTransitionOverlay, RemoteSelectionOverlay, CollaborationCursorOverlay, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, ElementRenderer, InlineCollaborationContext, SmartArtRenderer, downloadBlob, playAnimationSound, ResizeHandles, imgSrc, renderStrokeView, useChartPartSelection, DUOTONE_PRESETS, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, resolveSmartArtDataPalette } from './chunk-3SFBCFHJ.mjs';
2
+ import { ANIMATION_PRESET_OPTIONS, dist_exports, cn, SLIDE_NAV_THUMBNAIL_WIDTH, SLIDE_TRANSITION_OPTIONS, normalizeHexColor, hasCopyableFormat, DEFAULT_SECTION_GROUP_ID, safeOpenUrl, isPpactionUrl, parsePpactionUrl, SHORTCUT_REFERENCE_ITEMS, TOOLBAR_SECTIONS, isUrlSafe, computeHandoutLayout, getPrintableArea, generateNoteLineCount, UNGROUPED_SECTION_ID, getShapeAdjustmentHandleDescriptors, isConnectorOrLineElement, GRID_SIZE, getElementTransformWithoutRotation, getElementTransform, MIN_ELEMENT_SIZE, getElementLabel, TABLE_STYLE_PRESETS, SHAPE_PRESETS, sanitizeGradientStops, formatCommentTimestamp, clampCropValue, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, DEFAULT_FILL_COLOR, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, SHAPE_QUICK_STYLES, getPatternSvg, DEFAULT_STROKE_COLOR, STROKE_DASH_OPTIONS, openNativeEyeDropper } from './chunk-UC2VQORY.mjs';
3
+ import { EMPTY_RESOLVED_CUSTOMIZATION, ANIMATION_DIRECTION_LABEL_KEYS, compileEquationTemplateMathMl, resolveViewerRootOptions, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, isFeatureEnabled, isDialogAvailable, isEditingAllowed, resolveAutosaveActivation, viewerOptionsToPreferences, applyPreferenceToOptions, resolveHistoryDepth, attachViewerHyperlinks, shouldConfirmExternalHyperlink, applyAutoCorrect, resolveImageResolutionScale, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, createSlidePackageClipboard, isPanelVisible, shouldShowAutosaveRecoveryPrompt, resolveOptionRootClasses, RIBBON_SCOPE_ATTR, resolve3DRenderingFlags, resolveSlideSizeSelection, RULER_THICKNESS, RULER_FONT_SIZE, editorThumbnailHeight, buildPreviewElements, deriveSlideFieldContext, deviceStrokeStageStyle, hiddenSlideCue, EDITOR_THUMBNAIL_WIDTH, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, visibleTemplateElements, themeToCssVars, createCustomizationController, resolveEffectiveHiddenActions, listAutosaveSnapshots, resolveExpiredAutosaveSnapshots, deleteAutosaveSnapshot, tableLayoutCells, masterViewCrudActions, applyMasterViewCrudAction, masterViewCrudFailureKey, EDITOR_CHROME_CSS, ribbonCustomizationCss, applyMotionPathPreset, resetSlideLayoutPath, DEFAULT_INSERT_CHART_KIND, templateSchemeFromTheme, createBackstagePresentation, playFeedbackSound, shouldDiscardAutosaveOnSuccessfulSave, buildFieldSubstitutionContext, setMasterViewBackgroundColor, canUseClipboard, runProgramNoticeStackStyle, observeElementHeight, printPropertiesFrameSlides, printPropertiesSlidesPerPage, PASTE_SPECIAL_OPTIONS, findCanvasElementNode, isHeaderFooterDateTextVisible, isHeaderFooterHeaderTextVisible, isHeaderFooterFooterTextVisible, getDensePanelTouchTargetPx, shouldStickyActionRow, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, getSlideBackgroundStyle, pushRecentColor, mruColorsPatch, shouldClearAutosaveCacheOnClose, canCropElement, cropSessionChanged, cancelCropUpdate, startCropSession, homeLaunchers, attachRibbonOverflow, getRegionRenderer, ViewerRegionHost, editorThumbnailWidth, masterViewBackgroundColor, resolvePresentationAction, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, resolveEditPointsAvailability, isCurrentLayout, EXPANDED_MAX_HEIGHT, resolveStatusBarSave, statusBarViewMode, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, clampPercent, resolveDefaultPrintSettings, HANDOUT_OPTIONS, bindPptxOptionsDialog, optionsBlockSlot, optionsPaneSlot, DEFAULT_QUICK_ACCESS_COMMAND_IDS, AI_OPTIONS_CATEGORY, activateModalFocus, buildCollaborationShareUrl, buildActiveSessionUsers, slideClipboardLabels, sorterPasteInsertAt, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, SORTER_MAX_ZOOM, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, listenForOutlineViewDismiss, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, cropModeKeyAction, buildTitleBarState, resolveScreenTip, visibleContextualTabs, resolveActiveRibbonTab, visibleRibbonAddIns, RIBBON_ADD_IN_TAB_ATTR, contextualTabLabelKey, RIBBON_CONTEXTUAL_TAB_ATTR, buildTabRowActionsState, TAB_ROW_ACTION_CLASSES, tabRowActionsAttributes, backstageNavEntries, BACKSTAGE_NAV, listBackstageRecentFiles, BACKSTAGE_BACK_CLASSES, BACKSTAGE_NAV_CLASSES, FREEFORM_TOOL_IDS, isDrawingToolVisible, textFontSizePtToPx, withHomeGalleries, drawingHomeControls, homeGalleryControls, homeGalleryApply, shapeOutlineChange, shapeFillChange, editingHomeControls, arrangeHomeControls, arrangePainterHomeControls, arrangeAlignAction, DESIGN_RIBBON_GROUPS, DESIGN_RIBBON_COMMANDS, designCommandState, FIXED_TAB_GALLERIES, CONTEXTUAL_TAB_GROUPS, editorThumbnailStep, resolveSlidePaneClick, SLIDE_VIRTUALIZATION_THRESHOLD, buildSectionContextMenuEntries, buildSlidePaneContextMenuEntries, slidePaneViewItems, isEditPointsEnabled, findReplacementAvailability, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, buildStrokePathD, cursorForTool, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, PRESENTER_NAVIGATOR_LABEL_KEYS, getPresentationContextMenuSections, CONTEXT_MENU_PRESENTATION_LAYER, presentationViewItems, subtitleRecognitionLanguage, subtitleSettingsFromOptions, getSpeechRecognitionCtor, mergeCaptionResults, customizeContextMenuEntries, buildContextMenuEntries, contextMenuViewItems, customizeCanvasContextMenuEntries, buildCanvasContextMenuEntries, buildLayoutPreviewGeometry, scaleSlidesForSizeChange, slideSizeToCanvasPx, resolveSelectionPaneRename, themeEditorLabels, resolveNotesSegments, defaultRichEnabled, segmentsToEditorHtml, DEBOUNCE_MS, createPlainNotesSegments, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX as INDENT_PX$1, buildNotesPrintHtml, MIN_TOUCH_TARGET_PX, toggleSheet, SMARTART_PREVIEW_ELEMENT_HEIGHT, SMARTART_PREVIEW_ELEMENT_WIDTH, buildSmartArtPreviewElement, sanitizeMathMl, computeAllNotesPages, getNotesPrintableArea, CUSTOM_FONT_ACCEPT, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, resolveViewerAddinRows, createSlideSorterState, sorterSelectionIndexes, selectSorterSlide, applySorterAction, sorterGridColumns, sorterMenuContext, buildSlideSorterContextMenuEntries, slideSorterContextMenuLabel, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, presenterConsoleAction, presenterConsoleViewState, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, customizeBackstageCards, backstageCardsFor, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, clipboardHomeControls, slidesHomeControls, resolveInsertSlideLayout, resolveDefaultFontFamily, textFontSizePxToPt, getInlineEditorSelectionResult, selectedParagraphBulletKind, elementBulletKind, selectionBulletKind, fontPickerHomeControls, fontHomeControls, nextToggleValue, RIBBON_GROUP_ATTR, paragraphHomeAlign, paragraphHomeControls, paragraphHomeAction, arrangeShapeHomeControls, strokeWidthOf, canSetStrokeWidth, canUngroupSelection, canGroupSelection, buildRibbonGallery, readRibbonTransitionDraft, SLIDE_SHOW_COMMAND_GROUPS, RECORD_COMMAND_GROUPS, trackActiveComment, commentCounts, findCommentLocation, buildReviewRibbon, HELP_RIBBON_COMMANDS, galleryTextLabel, pictureSizeHomeControls, sectionAddAfterSlideIndex, masterViewPseudoSlide, PRESENTATION_ANIM_TRIGGER_ATTRIBUTE, parentSelection, slideSpaceElement, isGroupMember, motionPathFor, setMotionPath, shouldShowElementHandles, computeAnchoredPopupPosition, applyTableStyleDelete, applyTableStyleMapChange, registerCustomFont, QUICK_ACCESS_COMMAND_CATALOG, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, SLIDE_TEMPLATES, getSelectionTextStyleFlags, TEXT_DECORATION_FLAGS, dispatchCropRequest, applyRibbonGalleryItem, ribbonTransitionsDraftPatch, ribbonTransitionUpdates, ribbonTransitionsSoundChange, ribbonTransitionStockSoundUrl, playSlideTransitionPreview, playAnimationRibbonPreview, SLIDE_SHOW_OPTIONS, createViewerOptionsStore, subtitleSettingsLabels, isReviewCommentCommand, runReviewCommentCommand, attachEditorImagePaste, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, resolveElementInteractivity, buildChartQuickActionsDescriptor, applyChartElementToggle, CHART_QUICK_ACTION_BUTTON_SIZE, applyChartStylePreset, hideChartSeries, restoreFilteredSeries, buildCropOverlay, CROP_HANDLE_ARIA_KEY, getActiveXControlOverlayView, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, canEditElementPoints, MERGE_SHAPES_MENU_ITEMS, hasMultipleSelectedTableCells, isElementLocked, mergeSlideTransition, slideBackgroundClearState, slideBackgroundClearPatch, effectiveDirection, TRIGGER_OPTIONS, effectiveTimingCurve, getAfterAnimationState, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, buildSlideTemplateContent, updateSubtitleSettings, buildFreeformShapeElement, buildLiveInkStrokeView, beginCropDrag, CONNECTOR_SITE_SNAP_PX, resolveConnectorEndpointUpdate, withConnectorEndpointUpdate, getShapeConnectionSites, FreeformToolSession, attachOverlayKeyboard, EditPointsSession, EDIT_POINTS_STYLE, elementLockTogglePatch, buildTableDataGrid, getDenseGridLayoutPlan, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, applyTableStylePreset, tableStyleAssignmentUpdate, evenColumnWidths, redistributeColumnWidth, evenRowHeights, inspectorNumber, patchChartData, collapseChartTitleRunsForEdit, chartGridlinesState, chartGridlinesPatch, seriesSecondaryAxisPatch, setChartCategoryLabel, setChartCellValue, addChartCategory, removeChartCategory, addChartSeries, removeChartSeries, setDataLabelsRangeCache, describeSmartArtBounds, canAddTopLevelNode, classifyExtraConnections, siblingIndex, siblingCount, canRemoveTopLevelNode, imageResetPatch, imageResetState, canInteractWithElement, buildOleObjectNamePatch, shouldShowAccessibilitySection, withFrameSlides, withSlidesPerPage, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, SLIDE_SIZE_PRESETS, TRANSITION_ORIENTATION_TYPES, clampTransitionNumber, TRANSITION_SPEED_OPTIONS, TRANSITION_MORPH_OPTIONS, flattenTagCollections, resolveTemplateBackgroundRows, commentMentionQuery, matchCommentMentionAuthors, buildAnimationTimelineRows, clearMotionPath, setTrigger, setTriggerBookmark, getEffectSoundState, setEffectSound, setEffectStockSound, setAfterAnimation, setAfterAnimationColor, directionValuesFor, buildAnimationTimelineBars, motionPathPresetIdForPath, MOTION_PATH_FAMILIES, motionPathPresetsByFamily, motionPathPresetLabelKey, motionPathFamilyLabelKey, EFFECT_SOUND_CATALOGUE, listMediaBookmarkOptions, selectedBookmarkOptionValue, hasTiltData, toElementAxes, dragCropHandle, panCropImage, clientToSlidePoint, EDIT_POINTS_TARGET_ATTR, describeTableStyleEditor, TABLE_STYLE_EDITOR_PARTS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, resolveDisplayedChartType, CHART_TYPE_OPTIONS, chartDataLabelsTogglePatch, BAR3D_SHAPE_OPTIONS, bar3DShapePatch, RADAR_STYLE_OPTIONS, radarStylePatch, SURFACE_WIREFRAME_OPTIONS, surfaceWireframePatch, isSeriesUsingSecondaryAxis, seriesColorClearState, listChartUserShapeRows, withChartUserShapeAdded, createDefaultChartUserShape, withChartUserShapeRowRemoved, withChartUserShapeRowTextUpdated, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, addSiblingAfter, removeEmptyNode, demote, promote, reorder, cropResetState, cropResetPatch, ARTISTIC_EFFECTS, mediaTrimEndSeconds, trimmedMediaDurationMs, mediaTrimEndAbsoluteMs, mediaTrimResetState, mediaTrimEndMsFromAbsoluteMs, mediaTrimResetPatch, buildOleEditDialogDescriptor, buildOleContentUpdatePatch, buildThemeColorSwatchGrid, themeColorSwatchRows, findSelectedThemeSwatch, themeSwatchCommit, getNonVisualDescriptionFields, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, canCommitActionType, slideSizeFromPreset, withSlideSizeOrientation, TRANSITION_DIR_ARROWS, buildDirectionGrid, updateTagInCollections, deleteTagFromCollections, addTagToCollections, commentTextSegments, COMMENT_MENTION_CLASS, COMMENT_MENTION_ATTRIBUTE, insertCommentMention, reorderAnimationTimelineRows, applyAnimationTimelineOrder, getEffectSoundAsset, animationEffectLabel, overlayPointerInput, TABLE_STYLE_BORDER_SIDES, applyTableStyleFieldEdit, withCellStyle, LBL as LBL$1, SEL as SEL$1, FILL_MODE_OPTIONS as FILL_MODE_OPTIONS$1, SECTION_HEADING, NUM as NUM$1, getChartUserShapeGroupTransform, withChartUserShapeGroupChildAdded, createDefaultChartUserShapeGroupChild, withChartUserShapeRowUpdated, getChartUserShapeRowChartBox, withChartUserShapeRowFlipUpdated, withChartUserShapeRowRotationUpdated, withChartUserShapeRowChartBoxUpdated, smartArtLayoutSwitchPatch, rebuildDrawingShapesIfCleared, mediaTrimEndMsFromSeconds, validateMediaTrimRange, quickStyleSwatchCss, shapeQuickStyleLabel, OFFICE_COLOR_SWATCHES, officeColorSwatchLabel, PATTERN_PRESET_OPTIONS as PATTERN_PRESET_OPTIONS$1, COMPOUND_LINE_OPTIONS as COMPOUND_LINE_OPTIONS$1, LINE_JOIN_OPTIONS as LINE_JOIN_OPTIONS$1, LINE_CAP_OPTIONS as LINE_CAP_OPTIONS$1, TEXT_WARP_PRESETS, warpPreviewPath, text3dPtToEmu, text3dEmuToPt, MATERIAL_PRESETS, toSlideIndex, TABLE_STYLE_BORDER_SIDE_LABEL_KEYS, TABLE_STYLE_DASH_PRESETS, GRADIENT_TYPE_OPTIONS as GRADIENT_TYPE_OPTIONS$1, PATTERN_OPTIONS, FILL_PATTERN_LABEL_KEYS, toggleText3dExtrusion, BEVEL_PRESETS, cropFit, cropFill, cropToAspectRatio } from 'ooxml-ui/pptx';
4
4
  export { THEME_CATALOG, defaultCssVars, defaultRadius, defaultThemeColors, resolveThemeCatalogEntry, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius } from 'ooxml-ui/pptx';
5
- import React102, { createContext, lazy, forwardRef, useEffect, useState, useCallback, useMemo, useRef, useLayoutEffect, useSyncExternalStore, useId, useContext, useDeferredValue, Suspense, useReducer, Fragment as Fragment$1 } from 'react';
5
+ import React103, { createContext, lazy, forwardRef, useEffect, useState, useCallback, useMemo, useRef, useLayoutEffect, useSyncExternalStore, useId, useContext, useDeferredValue, Suspense, useReducer, Fragment as Fragment$1 } from 'react';
6
6
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
7
7
  import { useTranslation } from 'react-i18next';
8
- import { LuArrowDown, LuArrowUp, LuArrowRight, LuArrowLeft, LuArrowDownRight, LuArrowDownLeft, LuArrowUpRight, LuArrowUpLeft, LuMessageSquare, LuEyeOff, LuHistory, LuSettings, LuX, LuCalendarDays, LuClock, LuHash, LuFileText, LuText, LuCast, LuShieldCheck, LuPlus, LuPanelLeftClose, LuDownload, LuTrash2, LuCheck, LuLock, LuEye, LuType, LuLoader, LuShieldAlert, LuSignature, LuInfo, LuTriangleAlert, LuPrinter, LuPenTool, LuBug, LuChevronUp, LuChevronDown, LuUpload, LuWifi, LuWifiOff, LuUsers, LuCopy, LuMinus, LuChevronLeft, LuChevronRight, LuPlay, LuPause, LuPanelLeft, LuPanelRight, LuSparkles, LuFolderOpen, LuPalette, LuSearch, LuCaseSensitive, LuReplace, LuGripVertical, LuLoaderCircle, LuGrid2X2, LuStickyNote, LuList, LuClipboardCopy, LuPaintbrush, LuShapes, LuLayoutGrid, LuWand, LuPresentation, LuTextCursorInput, LuFile, LuEllipsis, LuUserRound, LuShare2, LuSave, LuFilePlus2, LuHouse, LuFileJson, LuBox, LuVideo, LuFileImage, LuDatabase, LuClock3, LuUser, LuHardDrive, LuLogIn, LuMove, LuCopyPlus, LuClipboardPaste, LuMonitor, LuRadio, LuCaptions, LuImage, LuFilter, LuLayers, LuSettings2, LuLockOpen, LuPencil, LuReply, LuMoveRight, LuRotateCw, LuScissors, LuBookmark, LuPipette } from 'react-icons/lu';
8
+ import { LuArrowDown, LuArrowUp, LuArrowRight, LuArrowLeft, LuArrowDownRight, LuArrowDownLeft, LuArrowUpRight, LuArrowUpLeft, LuMessageSquare, LuEyeOff, LuHistory, LuX, LuCalendarDays, LuClock, LuHash, LuFileText, LuText, LuCast, LuShieldCheck, LuPlus, LuPanelLeftClose, LuDownload, LuTrash2, LuCheck, LuLock, LuEye, LuType, LuLoader, LuShieldAlert, LuSignature, LuInfo, LuTriangleAlert, LuPrinter, LuPenTool, LuWifi, LuWifiOff, LuUsers, LuCopy, LuMinus, LuChevronLeft, LuChevronRight, LuPlay, LuPause, LuPanelLeft, LuPanelRight, LuSparkles, LuSettings, LuFolderOpen, LuPalette, LuSearch, LuCaseSensitive, LuChevronUp, LuChevronDown, LuReplace, LuGripVertical, LuLoaderCircle, LuUpload, LuGrid2X2, LuStickyNote, LuList, LuBug, LuClipboardCopy, LuPaintbrush, LuShapes, LuLayoutGrid, LuWand, LuPresentation, LuTextCursorInput, LuFile, LuEllipsis, LuUserRound, LuShare2, LuSave, LuFilePlus2, LuHouse, LuFileJson, LuBox, LuVideo, LuFileImage, LuDatabase, LuClock3, LuUser, LuHardDrive, LuLogIn, LuMove, LuCopyPlus, LuClipboardPaste, LuMonitor, LuRadio, LuCaptions, LuImage, LuFilter, LuLayers, LuSettings2, LuLockOpen, LuPencil, LuReply, LuMoveRight, LuRotateCw, LuScissors, LuBookmark, LuPipette } from 'react-icons/lu';
9
9
  import { createPortal } from 'react-dom';
10
10
  import { LOCALE_CATALOG } from 'ooxml-ui/pptx/i18n';
11
11
  import { computeFocusTargets, deckDataFieldChanged, aiChangeAnimationCss, changeGhostStyle, createChatHistoryStore, collectStoredChats, exportAiChatLogs as exportAiChatLogs$1, applyElementUpdate } from 'ooxml-ui/pptx/ai';
@@ -723,7 +723,7 @@ function WebHomeControls({
723
723
  host.addEventListener("home-popup", listener);
724
724
  return () => host.removeEventListener("home-popup", listener);
725
725
  }, [onPopup]);
726
- return React102.createElement(`pptx-ui-ribbon-home-${family}`, { ref });
726
+ return React103.createElement(`pptx-ui-ribbon-home-${family}`, { ref });
727
727
  }
728
728
  function ShapeArrangeExtras(p) {
729
729
  const commands = useShapeFormatContext();
@@ -1180,6 +1180,44 @@ var ViewerCustomizationContext = createContext(
1180
1180
  function useViewerCustomizationContext() {
1181
1181
  return useContext(ViewerCustomizationContext);
1182
1182
  }
1183
+ var ViewerRegionBaseContext = createContext(null);
1184
+ function useRegionRenderer(id) {
1185
+ const customization = useViewerCustomizationContext();
1186
+ const base = useContext(ViewerRegionBaseContext);
1187
+ return base ? getRegionRenderer(customization, id) : void 0;
1188
+ }
1189
+ var FILL = { width: "100%", height: "100%" };
1190
+ var NOOP = () => {
1191
+ };
1192
+ function ViewerRegion(props) {
1193
+ const { region, renderer, close = NOOP, extra, className, style } = props;
1194
+ const base = useContext(ViewerRegionBaseContext);
1195
+ const containerRef = useRef(null);
1196
+ const hostRef = useRef(null);
1197
+ useLayoutEffect(() => {
1198
+ const host = new ViewerRegionHost(containerRef.current);
1199
+ hostRef.current = host;
1200
+ return () => {
1201
+ host.destroy();
1202
+ hostRef.current = null;
1203
+ };
1204
+ }, []);
1205
+ useLayoutEffect(() => {
1206
+ if (!base) {
1207
+ return;
1208
+ }
1209
+ const context = { ...base, ...extra, region, close };
1210
+ hostRef.current?.render(renderer, context);
1211
+ });
1212
+ return /* @__PURE__ */ jsx(
1213
+ "div",
1214
+ {
1215
+ ref: containerRef,
1216
+ className: className ? `pptx-region-host ${className}` : "pptx-region-host",
1217
+ style: style ?? FILL
1218
+ }
1219
+ );
1220
+ }
1183
1221
  var AccountAuthContext = createContext(void 0);
1184
1222
  var cardClass = "border border-border bg-card p-6 text-card-foreground";
1185
1223
  function AccountPage() {
@@ -1210,7 +1248,7 @@ function AccountPage() {
1210
1248
  return void 0;
1211
1249
  });
1212
1250
  };
1213
- const version = "4.36.3" ;
1251
+ const version = "4.38.0" ;
1214
1252
  return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
1215
1253
  /* @__PURE__ */ jsxs("section", { className: cardClass, children: [
1216
1254
  /* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
@@ -1468,7 +1506,8 @@ function BackstageNavIcon({ page }) {
1468
1506
  function FileSection(p) {
1469
1507
  const { t } = useTranslation();
1470
1508
  const [requestedPage, setRequestedPage] = useState("home");
1471
- const nav = customizeBackstageNav(BACKSTAGE_NAV, useViewerCustomizationContext());
1509
+ const customization = useViewerCustomizationContext();
1510
+ const nav = backstageNavEntries(BACKSTAGE_NAV, customization);
1472
1511
  const offered = (id) => nav.some((item) => item.id === id);
1473
1512
  const page = offered(requestedPage) ? requestedPage : offered("home") ? "home" : nav.find((item) => item.id !== "save" && item.id !== "close")?.id ?? "home";
1474
1513
  const [query, setQuery] = useState("");
@@ -1489,7 +1528,12 @@ function FileSection(p) {
1489
1528
  }
1490
1529
  };
1491
1530
  const current = nav.find((item) => item.id === page);
1492
- const title = current ? t(current.labelKey, { defaultValue: current.label }) : t("pptx.backstage.nav.home");
1531
+ const hostPage = current?.host;
1532
+ const builtInPage = hostPage ? void 0 : page;
1533
+ const title = current ? current.labelKey ? t(current.labelKey, { defaultValue: current.label }) : current.label : t("pptx.backstage.nav.home");
1534
+ const regionId = hostPage ? `backstage.host.${hostPage.id}` : `backstage.${page}`;
1535
+ const builtInRegionRenderer = useRegionRenderer(regionId);
1536
+ const regionRenderer = hostPage ? hostPage.render : builtInRegionRenderer;
1493
1537
  return /* @__PURE__ */ jsxs(
1494
1538
  "div",
1495
1539
  {
@@ -1510,7 +1554,7 @@ function FileSection(p) {
1510
1554
  }
1511
1555
  ) }),
1512
1556
  /* @__PURE__ */ jsxs("nav", { className: "flex min-h-0 flex-1 flex-col overflow-y-auto pb-2 max-md:flex-row max-md:items-center max-md:overflow-y-visible max-md:pb-0", children: [
1513
- nav.filter((item) => !item.group && !(item.id === "export" && exportHidden)).map((item) => /* @__PURE__ */ jsxs(
1557
+ nav.filter((item) => item.group !== "footer" && !(item.id === "export" && exportHidden)).map((item) => /* @__PURE__ */ jsxs(
1514
1558
  "button",
1515
1559
  {
1516
1560
  type: "button",
@@ -1519,14 +1563,14 @@ function FileSection(p) {
1519
1563
  onClick: () => item.id === "close" ? p.onClose() : item.id === "save" ? run(p.onSaveAsPptx) : setRequestedPage(item.id),
1520
1564
  className: `${BACKSTAGE_NAV_CLASSES.row} ${page === item.id ? BACKSTAGE_NAV_CLASSES.active : BACKSTAGE_NAV_CLASSES.inactive}`,
1521
1565
  children: [
1522
- /* @__PURE__ */ jsx(BackstageNavIcon, { page: item.id }),
1523
- t(item.labelKey, { defaultValue: item.label })
1566
+ !item.host && /* @__PURE__ */ jsx(BackstageNavIcon, { page: item.id }),
1567
+ item.labelKey ? t(item.labelKey, { defaultValue: item.label }) : item.label
1524
1568
  ]
1525
1569
  },
1526
1570
  item.id
1527
1571
  )),
1528
1572
  /* @__PURE__ */ jsx("div", { className: "flex-1 max-md:hidden" }),
1529
- nav.filter((item) => item.group).map((item) => /* @__PURE__ */ jsxs(
1573
+ nav.filter((item) => item.group === "footer").map((item) => /* @__PURE__ */ jsxs(
1530
1574
  "button",
1531
1575
  {
1532
1576
  type: "button",
@@ -1535,8 +1579,8 @@ function FileSection(p) {
1535
1579
  onClick: () => item.id === "options" && p.onOpenSettings ? run(p.onOpenSettings) : setRequestedPage(item.id),
1536
1580
  className: `${BACKSTAGE_NAV_CLASSES.row} ${page === item.id ? BACKSTAGE_NAV_CLASSES.active : BACKSTAGE_NAV_CLASSES.inactive}`,
1537
1581
  children: [
1538
- /* @__PURE__ */ jsx(BackstageNavIcon, { page: item.id }),
1539
- t(item.labelKey, { defaultValue: item.label })
1582
+ !item.host && /* @__PURE__ */ jsx(BackstageNavIcon, { page: item.id }),
1583
+ item.labelKey ? t(item.labelKey, { defaultValue: item.label }) : item.label
1540
1584
  ]
1541
1585
  },
1542
1586
  item.id
@@ -1545,63 +1589,76 @@ function FileSection(p) {
1545
1589
  ] }),
1546
1590
  /* @__PURE__ */ jsxs("main", { className: "min-w-0 flex-1 overflow-y-auto bg-background px-[clamp(32px,4vw,72px)] py-5 max-md:px-4 max-md:py-4", children: [
1547
1591
  /* @__PURE__ */ jsx("h1", { className: "text-[24px] font-semibold", children: page === "home" ? t("pptx.backstage.greeting") : title }),
1548
- (page === "home" || page === "new") && /* @__PURE__ */ jsx(
1549
- BackstageNewGallery,
1550
- {
1551
- onCreate: (templateId) => run(() => p.onCreatePresentation(templateId))
1552
- }
1553
- ),
1554
- (page === "home" || page === "open") && /* @__PURE__ */ jsxs(Fragment, { children: [
1555
- /* @__PURE__ */ jsx(
1556
- WebSearch,
1592
+ regionRenderer ? (
1593
+ // The nav, title and back button stay the viewer's; the host fills the page body.
1594
+ /* @__PURE__ */ jsx("div", { className: "mt-6", children: /* @__PURE__ */ jsx(
1595
+ ViewerRegion,
1557
1596
  {
1558
- "data-pptx-search-surface": true,
1559
- "data-pptx-search-input": true,
1560
- className: "mt-8 w-full max-w-[540px]",
1561
- value: query,
1562
- onInput: (event) => setQuery(event.currentTarget.value),
1563
- placeholder: t("pptx.backstage.searchPlaceholder"),
1564
- "aria-label": t("pptx.backstage.searchPlaceholder")
1597
+ region: regionId,
1598
+ renderer: regionRenderer,
1599
+ close: p.onClose,
1600
+ style: { width: "100%", minHeight: "12rem" }
1565
1601
  }
1566
- ),
1567
- page === "open" && /* @__PURE__ */ jsxs(
1568
- "button",
1602
+ ) })
1603
+ ) : builtInPage ? /* @__PURE__ */ jsxs(Fragment, { children: [
1604
+ (page === "home" || page === "new") && /* @__PURE__ */ jsx(
1605
+ BackstageNewGallery,
1569
1606
  {
1570
- type: "button",
1571
- className: "mt-4 inline-flex items-center gap-2 bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground hover:opacity-90",
1572
- onClick: () => run(p.onOpenFile),
1573
- children: [
1574
- /* @__PURE__ */ jsx(LuFolderOpen, {}),
1575
- " ",
1576
- t("pptx.backstage.browseDevice")
1577
- ]
1607
+ onCreate: (templateId) => run(() => p.onCreatePresentation(templateId))
1578
1608
  }
1579
1609
  ),
1580
- /* @__PURE__ */ jsx("h2", { className: "mt-6 text-[16px] font-semibold", children: t("pptx.backstage.recentHeading") }),
1581
- /* @__PURE__ */ jsx(
1582
- BackstageRecentList,
1583
- {
1584
- files: visibleRecent,
1585
- onOpen: (key) => run(() => p.onOpenRecentFile?.(key))
1586
- }
1587
- )
1588
- ] }),
1589
- !(page === "export" && exportHidden) && /* @__PURE__ */ jsx(BackstageCards, { page, props: p, run }),
1590
- page === "account" && /* @__PURE__ */ jsx(AccountPage, {}),
1591
- page === "options" && /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[760px] border border-border bg-card p-7 text-card-foreground", children: [
1592
- /* @__PURE__ */ jsx(LuSettings, { className: "text-3xl text-primary" }),
1593
- /* @__PURE__ */ jsx("h2", { className: "mt-4 text-lg font-semibold", children: t("pptx.backstage.optionsTitle") }),
1594
- /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm text-muted-foreground", children: t("pptx.backstage.optionsBody") }),
1595
- /* @__PURE__ */ jsx(
1596
- "button",
1597
- {
1598
- type: "button",
1599
- className: "mt-6 bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground hover:opacity-90",
1600
- onClick: () => run(p.onOpenSettings),
1601
- children: t("pptx.backstage.openOptions")
1602
- }
1603
- )
1604
- ] }),
1610
+ (page === "home" || page === "open") && /* @__PURE__ */ jsxs(Fragment, { children: [
1611
+ /* @__PURE__ */ jsx(
1612
+ WebSearch,
1613
+ {
1614
+ "data-pptx-search-surface": true,
1615
+ "data-pptx-search-input": true,
1616
+ className: "mt-8 w-full max-w-[540px]",
1617
+ value: query,
1618
+ onInput: (event) => setQuery(event.currentTarget.value),
1619
+ placeholder: t("pptx.backstage.searchPlaceholder"),
1620
+ "aria-label": t("pptx.backstage.searchPlaceholder")
1621
+ }
1622
+ ),
1623
+ page === "open" && /* @__PURE__ */ jsxs(
1624
+ "button",
1625
+ {
1626
+ type: "button",
1627
+ className: "mt-4 inline-flex items-center gap-2 bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground hover:opacity-90",
1628
+ onClick: () => run(p.onOpenFile),
1629
+ children: [
1630
+ /* @__PURE__ */ jsx(LuFolderOpen, {}),
1631
+ " ",
1632
+ t("pptx.backstage.browseDevice")
1633
+ ]
1634
+ }
1635
+ ),
1636
+ /* @__PURE__ */ jsx("h2", { className: "mt-6 text-[16px] font-semibold", children: t("pptx.backstage.recentHeading") }),
1637
+ /* @__PURE__ */ jsx(
1638
+ BackstageRecentList,
1639
+ {
1640
+ files: visibleRecent,
1641
+ onOpen: (key) => run(() => p.onOpenRecentFile?.(key))
1642
+ }
1643
+ )
1644
+ ] }),
1645
+ !(page === "export" && exportHidden) && /* @__PURE__ */ jsx(BackstageCards, { page, props: p, run }),
1646
+ page === "account" && /* @__PURE__ */ jsx(AccountPage, {}),
1647
+ page === "options" && /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[760px] border border-border bg-card p-7 text-card-foreground", children: [
1648
+ /* @__PURE__ */ jsx(LuSettings, { className: "text-3xl text-primary" }),
1649
+ /* @__PURE__ */ jsx("h2", { className: "mt-4 text-lg font-semibold", children: t("pptx.backstage.optionsTitle") }),
1650
+ /* @__PURE__ */ jsx("p", { className: "mt-2 text-sm text-muted-foreground", children: t("pptx.backstage.optionsBody") }),
1651
+ /* @__PURE__ */ jsx(
1652
+ "button",
1653
+ {
1654
+ type: "button",
1655
+ className: "mt-6 bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground hover:opacity-90",
1656
+ onClick: () => run(p.onOpenSettings),
1657
+ children: t("pptx.backstage.openOptions")
1658
+ }
1659
+ )
1660
+ ] })
1661
+ ] }) : null,
1605
1662
  /* @__PURE__ */ jsxs("p", { className: "mt-12 text-[11px] text-muted-foreground", children: [
1606
1663
  p.fileName || t("pptx.backstage.untitled"),
1607
1664
  " \xB7 ",
@@ -1915,6 +1972,7 @@ var OV = [
1915
1972
  ];
1916
1973
  var nextTile = 0;
1917
1974
  function SlidesGroup(p) {
1975
+ const customization = useViewerCustomizationContext();
1918
1976
  const [templateGalleryOpen, setTemplateGalleryOpen] = useState(false);
1919
1977
  const [galleryOpen, setGalleryOpen] = useState(false);
1920
1978
  const [tiles, setTiles] = useState([]);
@@ -2002,7 +2060,7 @@ function SlidesGroup(p) {
2002
2060
  )
2003
2061
  ),
2004
2062
  sep,
2005
- p.onInsertSlideFromTemplate && /* @__PURE__ */ jsx(
2063
+ p.onInsertSlideFromTemplate && isDialogAvailable(customization, "slideTemplates") && /* @__PURE__ */ jsx(
2006
2064
  SlideTemplateGalleryDialog,
2007
2065
  {
2008
2066
  isOpen: templateGalleryOpen,
@@ -2174,6 +2232,10 @@ function InsertSection(p) {
2174
2232
  chartAvailable: Boolean(p.onAddChart),
2175
2233
  fieldAvailable: Boolean(p.onInsertField),
2176
2234
  headerFooterAvailable: Boolean(p.onOpenHeaderFooter),
2235
+ newSlideAvailable: Boolean(p.onInsertSlideFromLayout && p.layoutOptions?.length),
2236
+ commentAvailable: Boolean(p.onToggleComments),
2237
+ layouts: p.layoutOptions ?? [],
2238
+ ...p.currentLayoutPath ? { currentLayoutPath: p.currentLayoutPath } : {},
2177
2239
  translate: t
2178
2240
  };
2179
2241
  }, [p, chartKind, customization, t]);
@@ -2194,11 +2256,27 @@ function InsertSection(p) {
2194
2256
  smartArt: p.onAddSmartArt,
2195
2257
  equation: p.onAddEquation,
2196
2258
  link: p.onOpenHyperlinkDialog,
2197
- headerFooter: p.onOpenHeaderFooter
2259
+ headerFooter: p.onOpenHeaderFooter,
2260
+ // Opening an already open pane would toggle it shut.
2261
+ comment: p.isCommentsPanelOpen ? void 0 : p.onToggleComments
2198
2262
  };
2199
2263
  commands[intent.value]?.();
2200
2264
  break;
2201
2265
  }
2266
+ case "table":
2267
+ p.onAddTable(intent.rows, intent.columns);
2268
+ break;
2269
+ case "newSlide": {
2270
+ const layout = resolveInsertSlideLayout(
2271
+ p.layoutOptions ?? [],
2272
+ intent.value,
2273
+ p.currentLayoutPath
2274
+ );
2275
+ if (layout) {
2276
+ p.onInsertSlideFromLayout?.(layout.path, layout.name);
2277
+ }
2278
+ break;
2279
+ }
2202
2280
  case "shapeType":
2203
2281
  p.onSetNewShapeType(intent.value);
2204
2282
  break;
@@ -2265,6 +2343,12 @@ function WebRibbonSection({
2265
2343
  }
2266
2344
  function ReviewSection(p) {
2267
2345
  const { t } = useTranslation();
2346
+ const [activeCommentId, setActiveCommentId] = useState(null);
2347
+ useEffect(() => trackActiveComment(document, setActiveCommentId), []);
2348
+ const host = p.commentsHost;
2349
+ const slides = host?.slides() ?? [];
2350
+ const counts = commentCounts(slides, host?.currentSlide() ?? 0);
2351
+ const hasActiveComment = findCommentLocation(slides, activeCommentId) !== null;
2268
2352
  const groups = buildReviewRibbon(t, {
2269
2353
  editable: p.canEdit,
2270
2354
  spellCheck: p.spellCheckEnabled,
@@ -2273,9 +2357,22 @@ function ReviewSection(p) {
2273
2357
  canCompare: Boolean(p.onCompare),
2274
2358
  canComments: Boolean(p.onToggleComments),
2275
2359
  commentsOpen: p.isCommentsPanelOpen,
2276
- commentCount: p.slideCommentCount
2360
+ commentCount: p.slideCommentCount,
2361
+ totalCommentCount: counts.total,
2362
+ canNavigateComments: Boolean(host),
2363
+ hasActiveComment
2277
2364
  });
2278
2365
  const request = (id) => {
2366
+ if (isReviewCommentCommand(id)) {
2367
+ const navigation = id === "review.comments.previous" || id === "review.comments.next";
2368
+ if (host && (navigation || p.canEdit)) {
2369
+ const next = runReviewCommentCommand(id, host, activeCommentId);
2370
+ if (next !== void 0) {
2371
+ setActiveCommentId(next);
2372
+ }
2373
+ }
2374
+ return;
2375
+ }
2279
2376
  switch (id) {
2280
2377
  case "review.proofing.spelling":
2281
2378
  p.onSetSpellCheckEnabled(!p.spellCheckEnabled);
@@ -3149,7 +3246,12 @@ function MobileSectionBody({
3149
3246
  onOpenImagePicker: p.onOpenImagePicker,
3150
3247
  onOpenMediaPicker: p.onOpenMediaPicker,
3151
3248
  hasSelection: Boolean(p.selectedElement),
3152
- onOpenHyperlinkDialog: p.onOpenHyperlinkDialog
3249
+ onOpenHyperlinkDialog: p.onOpenHyperlinkDialog,
3250
+ layoutOptions: p.layoutOptions,
3251
+ currentLayoutPath: p.currentLayoutPath,
3252
+ onInsertSlideFromLayout: p.onInsertSlideFromLayout,
3253
+ onToggleComments: p.onToggleComments,
3254
+ isCommentsPanelOpen: p.isCommentsPanelOpen
3153
3255
  }
3154
3256
  ) });
3155
3257
  case "text":
@@ -3281,6 +3383,7 @@ function MobileSectionBody({
3281
3383
  onToggleComments: p.onToggleComments,
3282
3384
  isCommentsPanelOpen: p.isCommentsPanelOpen,
3283
3385
  slideCommentCount: p.slideCommentCount,
3386
+ commentsHost: p.reviewComments,
3284
3387
  onCompare: p.onCompare
3285
3388
  }
3286
3389
  ) });
@@ -4296,6 +4399,7 @@ function ToolbarLateTabs({
4296
4399
  onToggleComments: p.onToggleComments,
4297
4400
  isCommentsPanelOpen: p.isCommentsPanelOpen,
4298
4401
  slideCommentCount: p.slideCommentCount,
4402
+ commentsHost: p.reviewComments,
4299
4403
  onCompare: p.onCompare,
4300
4404
  onOpenAccessibilityCheck: p.onRunAccessibilityCheck,
4301
4405
  onSetLanguage: p.onOpenSettings
@@ -4552,7 +4656,12 @@ function Toolbar(p) {
4552
4656
  onOpenImagePicker: p.onOpenImagePicker,
4553
4657
  onOpenMediaPicker: p.onOpenMediaPicker,
4554
4658
  hasSelection: Boolean(p.selectedElement),
4555
- onOpenHyperlinkDialog: p.onOpenHyperlinkDialog
4659
+ onOpenHyperlinkDialog: p.onOpenHyperlinkDialog,
4660
+ layoutOptions: p.layoutOptions,
4661
+ currentLayoutPath: p.currentLayoutPath,
4662
+ onInsertSlideFromLayout: p.onInsertSlideFromLayout,
4663
+ onToggleComments: p.onToggleComments,
4664
+ isCommentsPanelOpen: p.isCommentsPanelOpen
4556
4665
  }
4557
4666
  ),
4558
4667
  sTxt && /* @__PURE__ */ jsx(
@@ -4912,7 +5021,7 @@ function ChartQuickActionsOverlay({
4912
5021
  "data-export-ignore": "true",
4913
5022
  style: { position: "absolute", left: 0, top: 0, zIndex: 59 },
4914
5023
  onMouseDown: (e) => e.stopPropagation(),
4915
- children: descriptor.buttons.map((button) => /* @__PURE__ */ jsxs(React102.Fragment, { children: [
5024
+ children: descriptor.buttons.map((button) => /* @__PURE__ */ jsxs(React103.Fragment, { children: [
4916
5025
  /* @__PURE__ */ jsx(
4917
5026
  "button",
4918
5027
  {
@@ -4932,7 +5041,7 @@ function ChartQuickActionsOverlay({
4932
5041
  transformOrigin: "top left"
4933
5042
  },
4934
5043
  className: "flex items-center justify-center rounded bg-white border border-gray-300 shadow-sm hover:bg-gray-100 text-gray-700",
4935
- children: React102.createElement(ICONS3[button.id], { className: "size-3.5" })
5044
+ children: React103.createElement(ICONS3[button.id], { className: "size-3.5" })
4936
5045
  }
4937
5046
  ),
4938
5047
  open === button.id && button.id === "elements" && /* @__PURE__ */ jsxs(
@@ -6078,7 +6187,7 @@ function HorizontalRulerView({ ticks, widthPx, highlight }) {
6078
6187
  }
6079
6188
  );
6080
6189
  }
6081
- var HorizontalRuler = React102.memo(HorizontalRulerView);
6190
+ var HorizontalRuler = React103.memo(HorizontalRulerView);
6082
6191
  HorizontalRuler.displayName = "HorizontalRuler";
6083
6192
  function VerticalRulerView({ ticks, heightPx, highlight }) {
6084
6193
  return /* @__PURE__ */ jsxs(
@@ -6150,7 +6259,7 @@ function VerticalRulerView({ ticks, heightPx, highlight }) {
6150
6259
  }
6151
6260
  );
6152
6261
  }
6153
- var VerticalRuler = React102.memo(VerticalRulerView);
6262
+ var VerticalRuler = React103.memo(VerticalRulerView);
6154
6263
  VerticalRuler.displayName = "VerticalRuler";
6155
6264
  function Ruler({
6156
6265
  canvasSize,
@@ -7651,7 +7760,7 @@ function ShortcutPanel({ isOpen, onClose }) {
7651
7760
  }
7652
7761
  )
7653
7762
  ] }),
7654
- /* @__PURE__ */ jsx("div", { className: "max-h-64 overflow-y-auto p-2 space-y-1", children: SHORTCUT_REFERENCE_ITEMS$1.map((shortcut) => /* @__PURE__ */ jsxs(
7763
+ /* @__PURE__ */ jsx("div", { className: "max-h-64 overflow-y-auto p-2 space-y-1", children: SHORTCUT_REFERENCE_ITEMS.map((shortcut) => /* @__PURE__ */ jsxs(
7655
7764
  "div",
7656
7765
  {
7657
7766
  className: "flex items-center justify-between gap-3 rounded bg-muted/80 px-2 py-1.5",
@@ -8032,7 +8141,7 @@ function slideThumbnailPropsEqual(prev, next) {
8032
8141
  }
8033
8142
  return true;
8034
8143
  }
8035
- var SlideThumbnail = React102.memo(SlideThumbnailImpl, slideThumbnailPropsEqual);
8144
+ var SlideThumbnail = React103.memo(SlideThumbnailImpl, slideThumbnailPropsEqual);
8036
8145
  function tableCell(props) {
8037
8146
  const { selectedElement, tableEditorState } = props;
8038
8147
  if (selectedElement?.type !== "table" || tableEditorState === null) {
@@ -8718,7 +8827,7 @@ function LazyThumbnailInner({
8718
8827
  }
8719
8828
  ) });
8720
8829
  }
8721
- var LazyThumbnail = React102.memo(LazyThumbnailInner);
8830
+ var LazyThumbnail = React103.memo(LazyThumbnailInner);
8722
8831
  function declaredSectionFacts(groups, sectionId) {
8723
8832
  const declared = groups.filter((group) => group.id !== DEFAULT_SECTION_GROUP_ID && group.id !== UNGROUPED_SECTION_ID).map((group) => group.id);
8724
8833
  return {
@@ -8886,7 +8995,7 @@ function SlideItemInner({
8886
8995
  }
8887
8996
  );
8888
8997
  }
8889
- var SlideItem = React102.memo(SlideItemInner);
8998
+ var SlideItem = React103.memo(SlideItemInner);
8890
8999
  function useSlidePaneCallbacks(onMoveSlide, onRenameSection, onToggleSectionCollapse) {
8891
9000
  const [collapsedSections, setCollapsedSections] = useState({});
8892
9001
  const [renamingSectionId, setRenamingSectionId] = useState(null);
@@ -10299,7 +10408,7 @@ function arePropsEqual(prev, next) {
10299
10408
  }
10300
10409
  return true;
10301
10410
  }
10302
- var SlideCard = React102.memo(SlideCardImpl, arePropsEqual);
10411
+ var SlideCard = React103.memo(SlideCardImpl, arePropsEqual);
10303
10412
  var ICON_CLASS = "h-3.5 w-3.5 text-muted-foreground";
10304
10413
  function SorterContextMenu({
10305
10414
  x,
@@ -10724,7 +10833,7 @@ function SlideSorterOverlay({
10724
10833
  count: state.selectedSlideIds.length
10725
10834
  }) })
10726
10835
  ] }),
10727
- React102.createElement("pptx-ui-slide-clipboard", {
10836
+ React103.createElement("pptx-ui-slide-clipboard", {
10728
10837
  ref: (node) => {
10729
10838
  if (!node) {
10730
10839
  return;
@@ -11640,8 +11749,8 @@ function SlideNotesPanel({
11640
11749
  onHeightChange
11641
11750
  }) {
11642
11751
  const { t } = useTranslation();
11643
- const rootRef = React102.useRef(null);
11644
- React102.useEffect(() => {
11752
+ const rootRef = React103.useRef(null);
11753
+ React103.useEffect(() => {
11645
11754
  const el = rootRef.current;
11646
11755
  if (!el || !onHeightChange) {
11647
11756
  return void 0;
@@ -13484,9 +13593,9 @@ function PresentationSubtitleBar({
13484
13593
  function renderNotesSegments(segments) {
13485
13594
  return notesSegmentsToSpans(segments).map((span) => {
13486
13595
  if (span.kind === "break") {
13487
- return React102.createElement("br", { key: span.key });
13596
+ return React103.createElement("br", { key: span.key });
13488
13597
  }
13489
- return React102.createElement(
13598
+ return React103.createElement(
13490
13599
  "span",
13491
13600
  { key: span.key, style: span.style },
13492
13601
  span.text
@@ -13662,7 +13771,7 @@ function scaledSlidePreviewPropsEqual(prev, next) {
13662
13771
  }
13663
13772
  return true;
13664
13773
  }
13665
- var ScaledSlidePreview = React102.memo(ScaledSlidePreviewImpl, scaledSlidePreviewPropsEqual);
13774
+ var ScaledSlidePreview = React103.memo(ScaledSlidePreviewImpl, scaledSlidePreviewPropsEqual);
13666
13775
  function PresenterNotesRail({
13667
13776
  slides,
13668
13777
  current,
@@ -14891,7 +15000,7 @@ function EffectSoundRow({
14891
15000
  onPickStock
14892
15001
  }) {
14893
15002
  const { t } = useTranslation();
14894
- const fileInputRef = React102.useRef(null);
15003
+ const fileInputRef = React103.useRef(null);
14895
15004
  const selectedValue = soundState.catalogueId ?? (soundState.hasSound ? CURRENT_VALUE : NONE_VALUE);
14896
15005
  const handleSelectChange = (event) => {
14897
15006
  const value = event.target.value;
@@ -16455,7 +16564,7 @@ function ChartDataGrid({
16455
16564
  "input",
16456
16565
  {
16457
16566
  type: "number",
16458
- "aria-label": `${s.name} value ${ci + 1}`,
16567
+ "aria-label": t("pptx.chart.seriesValueCell", { name: s.name, number: ci + 1 }),
16459
16568
  disabled: !canEdit,
16460
16569
  ref: isValueHighlight(si, ci) ? highlightRef : null,
16461
16570
  className: `${CELL_INPUT}${isValueHighlight(si, ci) ? highlightClass : ""}`,
@@ -18462,7 +18571,7 @@ function ConnectorArrowsSection({
18462
18571
  ["Start", "End"].map((end) => {
18463
18572
  const widthKey = end === "Start" ? "connectorStartArrowWidth" : "connectorEndArrowWidth";
18464
18573
  const lengthKey = end === "Start" ? "connectorStartArrowLength" : "connectorEndArrowLength";
18465
- return /* @__PURE__ */ jsxs(React102.Fragment, { children: [
18574
+ return /* @__PURE__ */ jsxs(React103.Fragment, { children: [
18466
18575
  /* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
18467
18576
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t(END_LABEL_KEYS[end].width) }),
18468
18577
  /* @__PURE__ */ jsx(
@@ -21390,7 +21499,7 @@ function StrokeEffectsSection({
21390
21499
  ] }),
21391
21500
  EFFECT_CONFIGS.map((cfg) => {
21392
21501
  const on = cfg.isOn(style);
21393
- return /* @__PURE__ */ jsxs(React102.Fragment, { children: [
21502
+ return /* @__PURE__ */ jsxs(React103.Fragment, { children: [
21394
21503
  /* @__PURE__ */ jsxs("label", { className: `inline-flex items-center gap-2 text-foreground ${COL2}`, children: [
21395
21504
  /* @__PURE__ */ jsx(
21396
21505
  WebCheckbox,
@@ -22245,7 +22354,7 @@ function TextWarpGallery({
22245
22354
  onUpdateTextStyle
22246
22355
  }) {
22247
22356
  const { t } = useTranslation();
22248
- const [expanded, setExpanded] = React102.useState(false);
22357
+ const [expanded, setExpanded] = React103.useState(false);
22249
22358
  const currentPreset = ts?.textWarpPreset || "textNoShape";
22250
22359
  return /* @__PURE__ */ jsxs("div", { className: "mt-2 rounded border border-border bg-card p-2 space-y-2", children: [
22251
22360
  /* @__PURE__ */ jsxs(
@@ -22888,7 +22997,7 @@ function SmartArtStyleControls({
22888
22997
  onChangeStyle
22889
22998
  }) {
22890
22999
  const { t } = useTranslation();
22891
- const translate = React102.useCallback((key) => t(key), [t]);
23000
+ const translate = React103.useCallback((key) => t(key), [t]);
22892
23001
  return /* @__PURE__ */ jsxs(Fragment, { children: [
22893
23002
  /* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1 text-[11px]", children: [
22894
23003
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.smartart.colorScheme") }),
@@ -22943,9 +23052,9 @@ function SmartArtPropertiesPanel({
22943
23052
  const nodes = smartArtData.nodes ?? [];
22944
23053
  const layout = smartArtData.resolvedLayoutType;
22945
23054
  const topLevelCount = nodes.filter((n) => !n.parentId).length;
22946
- const inputRefs = React102.useRef(/* @__PURE__ */ new Map());
22947
- const pendingFocusId = React102.useRef(null);
22948
- React102.useEffect(() => {
23055
+ const inputRefs = React103.useRef(/* @__PURE__ */ new Map());
23056
+ const pendingFocusId = React103.useRef(null);
23057
+ React103.useEffect(() => {
22949
23058
  const id = pendingFocusId.current;
22950
23059
  if (id) {
22951
23060
  inputRefs.current.get(id)?.focus();
@@ -24551,7 +24660,7 @@ function CommentBody({ text, mentions, className }) {
24551
24660
  index
24552
24661
  ) : (
24553
24662
  // eslint-disable-next-line react/no-array-index-key -- segments are positional
24554
- /* @__PURE__ */ jsx(React102.Fragment, { children: segment.text }, index)
24663
+ /* @__PURE__ */ jsx(React103.Fragment, { children: segment.text }, index)
24555
24664
  )
24556
24665
  ) });
24557
24666
  }
@@ -24645,6 +24754,7 @@ function InspectorCommentRow({
24645
24754
  "rounded border border-border bg-card p-2",
24646
24755
  depth > 0 && "ml-3 border-l-2 border-l-primary/40"
24647
24756
  ),
24757
+ "data-comment-id": comment.id,
24648
24758
  children: [
24649
24759
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
24650
24760
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 min-w-0", children: [
@@ -26067,7 +26177,7 @@ function PresentationPropertiesPanel({
26067
26177
  onUpdateTagCollections
26068
26178
  }) {
26069
26179
  const { t } = useTranslation();
26070
- const handleTransitionChange = React102.useCallback(
26180
+ const handleTransitionChange = React103.useCallback(
26071
26181
  (updates) => {
26072
26182
  onUpdateSlide({
26073
26183
  transition: mergeSlideTransition(activeSlide?.transition, updates)
@@ -27487,6 +27597,7 @@ function PrintDialog({
27487
27597
  defaultFrameSlides
27488
27598
  }) {
27489
27599
  const { t } = useTranslation();
27600
+ const regionRenderer = useRegionRenderer("dialog.print");
27490
27601
  const { panelStyle, handlers: dragHandlers } = useModalDismissDrag(onClose);
27491
27602
  const { viewportWidth } = useIsMobile();
27492
27603
  const touchTargetPx = getDensePanelTouchTargetPx(viewportWidth);
@@ -27616,68 +27727,81 @@ function PrintDialog({
27616
27727
  ]
27617
27728
  }
27618
27729
  ),
27619
- /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto px-5 py-4 flex gap-5 max-md:flex-col", children: [
27620
- /* @__PURE__ */ jsx(
27621
- PrintSettingsPanel,
27730
+ regionRenderer ? (
27731
+ // The frame (backdrop, title bar, close, dismiss) stays the viewer's; the host replaces the body.
27732
+ /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx(
27733
+ ViewerRegion,
27622
27734
  {
27623
- printWhat,
27624
- onPrintWhatChange: setPrintWhat,
27625
- orientation,
27626
- onOrientationChange: setOrientation,
27627
- colorMode,
27628
- onColorModeChange: setColorMode,
27629
- frameSlides,
27630
- onFrameSlidesChange: setFrameSlides,
27631
- slidesPerPage,
27632
- onSlidesPerPageChange: setSlidesPerPage,
27633
- slideRange,
27634
- onSlideRangeChange: setSlideRange,
27635
- customFrom,
27636
- onCustomFromChange: setCustomFrom,
27637
- customTo,
27638
- onCustomToChange: setCustomTo,
27639
- totalSlides: slides.length,
27640
- activeSlideIndex
27641
- }
27642
- ),
27643
- printWhat === "handouts" && /* @__PURE__ */ jsx("div", { className: "w-[230px] shrink-0 border-l border-border pl-4 overflow-y-auto max-md:w-full max-md:border-l-0 max-md:border-t max-md:pl-0 max-md:pt-3", children: /* @__PURE__ */ jsx(
27644
- PrintPreview,
27645
- {
27646
- slideIndices: previewSlideIndices,
27647
- slidesPerPage,
27648
- orientation: effectiveOrientation,
27649
- frameSlides
27650
- }
27651
- ) }),
27652
- printWhat === "notes" && /* @__PURE__ */ jsx("div", { className: "w-[230px] shrink-0 border-l border-border pl-4 overflow-y-auto max-md:w-full max-md:border-l-0 max-md:border-t max-md:pl-0 max-md:pt-3", children: /* @__PURE__ */ jsx(
27653
- NotesPagePreview,
27654
- {
27655
- slideIndices: previewSlideIndices,
27656
- slides,
27657
- frameSlides
27658
- }
27659
- ) })
27660
- ] }),
27661
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-5 py-3 border-t border-border", children: [
27662
- /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: t("pptx.print.pageEstimate", {
27663
- pages: pageCount,
27664
- slides: slideCount
27665
- }) }),
27666
- /* @__PURE__ */ jsx("div", { className: "flex gap-2", children: /* @__PURE__ */ jsx(
27667
- DialogFooter,
27668
- {
27669
- actions: [
27670
- { id: "cancel", label: t("pptx.common.cancel") },
27671
- {
27672
- id: "print",
27673
- label: t("pptx.print.printButton"),
27674
- variant: "primary",
27675
- icon: "print"
27676
- }
27677
- ],
27678
- onAction: (id) => id === "print" ? handlePrint() : onClose()
27735
+ region: "dialog.print",
27736
+ renderer: regionRenderer,
27737
+ close: onClose,
27738
+ style: { width: "100%", minHeight: "8rem" }
27679
27739
  }
27680
27740
  ) })
27741
+ ) : /* @__PURE__ */ jsxs(Fragment, { children: [
27742
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto px-5 py-4 flex gap-5 max-md:flex-col", children: [
27743
+ /* @__PURE__ */ jsx(
27744
+ PrintSettingsPanel,
27745
+ {
27746
+ printWhat,
27747
+ onPrintWhatChange: setPrintWhat,
27748
+ orientation,
27749
+ onOrientationChange: setOrientation,
27750
+ colorMode,
27751
+ onColorModeChange: setColorMode,
27752
+ frameSlides,
27753
+ onFrameSlidesChange: setFrameSlides,
27754
+ slidesPerPage,
27755
+ onSlidesPerPageChange: setSlidesPerPage,
27756
+ slideRange,
27757
+ onSlideRangeChange: setSlideRange,
27758
+ customFrom,
27759
+ onCustomFromChange: setCustomFrom,
27760
+ customTo,
27761
+ onCustomToChange: setCustomTo,
27762
+ totalSlides: slides.length,
27763
+ activeSlideIndex
27764
+ }
27765
+ ),
27766
+ printWhat === "handouts" && /* @__PURE__ */ jsx("div", { className: "w-[230px] shrink-0 border-l border-border pl-4 overflow-y-auto max-md:w-full max-md:border-l-0 max-md:border-t max-md:pl-0 max-md:pt-3", children: /* @__PURE__ */ jsx(
27767
+ PrintPreview,
27768
+ {
27769
+ slideIndices: previewSlideIndices,
27770
+ slidesPerPage,
27771
+ orientation: effectiveOrientation,
27772
+ frameSlides
27773
+ }
27774
+ ) }),
27775
+ printWhat === "notes" && /* @__PURE__ */ jsx("div", { className: "w-[230px] shrink-0 border-l border-border pl-4 overflow-y-auto max-md:w-full max-md:border-l-0 max-md:border-t max-md:pl-0 max-md:pt-3", children: /* @__PURE__ */ jsx(
27776
+ NotesPagePreview,
27777
+ {
27778
+ slideIndices: previewSlideIndices,
27779
+ slides,
27780
+ frameSlides
27781
+ }
27782
+ ) })
27783
+ ] }),
27784
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-5 py-3 border-t border-border", children: [
27785
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: t("pptx.print.pageEstimate", {
27786
+ pages: pageCount,
27787
+ slides: slideCount
27788
+ }) }),
27789
+ /* @__PURE__ */ jsx("div", { className: "flex gap-2", children: /* @__PURE__ */ jsx(
27790
+ DialogFooter,
27791
+ {
27792
+ actions: [
27793
+ { id: "cancel", label: t("pptx.common.cancel") },
27794
+ {
27795
+ id: "print",
27796
+ label: t("pptx.print.printButton"),
27797
+ variant: "primary",
27798
+ icon: "print"
27799
+ }
27800
+ ],
27801
+ onAction: (id) => id === "print" ? handlePrint() : onClose()
27802
+ }
27803
+ ) })
27804
+ ] })
27681
27805
  ] })
27682
27806
  ]
27683
27807
  }
@@ -27994,6 +28118,7 @@ function BroadcastDialog({
27994
28118
  defaultServerUrl
27995
28119
  }) {
27996
28120
  const { t } = useTranslation();
28121
+ const regionRenderer = useRegionRenderer("dialog.broadcast");
27997
28122
  const collab = useCollaboration();
27998
28123
  const isBroadcasting = collab !== null && collab.status !== "disconnected" && collab.status !== "error" && collab.config.role === "owner";
27999
28124
  const [roomId, setRoomId] = useState("");
@@ -28097,41 +28222,54 @@ function BroadcastDialog({
28097
28222
  ]
28098
28223
  }
28099
28224
  ),
28100
- /* @__PURE__ */ jsx("div", { className: "px-5 py-4", children: isBroadcasting ? /* @__PURE__ */ jsx(
28101
- ActiveBroadcastView,
28102
- {
28103
- collab,
28104
- broadcastUrl,
28105
- copied,
28106
- onCopyUrl: handleCopyUrl,
28107
- onStopBroadcast: handleStopBroadcast
28108
- }
28109
- ) : /* @__PURE__ */ jsx(
28110
- StartBroadcastForm,
28111
- {
28112
- roomId,
28113
- userName,
28114
- serverUrl,
28115
- onRoomIdChange: setRoomId,
28116
- onUserNameChange: setUserName,
28117
- onServerUrlChange: setServerUrl
28118
- }
28119
- ) }),
28120
- !isBroadcasting && /* @__PURE__ */ jsx("div", { className: "flex justify-end gap-2 px-5 py-3 border-t border-border", children: /* @__PURE__ */ jsx(
28121
- DialogFooter,
28122
- {
28123
- actions: [
28124
- { id: "close", label: t("pptx.common.close") },
28125
- {
28126
- id: "start",
28127
- label: t("pptx.broadcast.startBroadcast"),
28128
- variant: "primary",
28129
- disabled: !canStart
28130
- }
28131
- ],
28132
- onAction: (id) => id === "start" ? handleStartBroadcast() : onClose()
28133
- }
28134
- ) })
28225
+ regionRenderer ? (
28226
+ // The frame (backdrop, title bar, close, dismiss) stays the viewer's; the host replaces the body.
28227
+ /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx(
28228
+ ViewerRegion,
28229
+ {
28230
+ region: "dialog.broadcast",
28231
+ renderer: regionRenderer,
28232
+ close: onClose,
28233
+ style: { width: "100%", minHeight: "8rem" }
28234
+ }
28235
+ ) })
28236
+ ) : /* @__PURE__ */ jsxs(Fragment, { children: [
28237
+ /* @__PURE__ */ jsx("div", { className: "px-5 py-4", children: isBroadcasting ? /* @__PURE__ */ jsx(
28238
+ ActiveBroadcastView,
28239
+ {
28240
+ collab,
28241
+ broadcastUrl,
28242
+ copied,
28243
+ onCopyUrl: handleCopyUrl,
28244
+ onStopBroadcast: handleStopBroadcast
28245
+ }
28246
+ ) : /* @__PURE__ */ jsx(
28247
+ StartBroadcastForm,
28248
+ {
28249
+ roomId,
28250
+ userName,
28251
+ serverUrl,
28252
+ onRoomIdChange: setRoomId,
28253
+ onUserNameChange: setUserName,
28254
+ onServerUrlChange: setServerUrl
28255
+ }
28256
+ ) }),
28257
+ !isBroadcasting && /* @__PURE__ */ jsx("div", { className: "flex justify-end gap-2 px-5 py-3 border-t border-border", children: /* @__PURE__ */ jsx(
28258
+ DialogFooter,
28259
+ {
28260
+ actions: [
28261
+ { id: "close", label: t("pptx.common.close") },
28262
+ {
28263
+ id: "start",
28264
+ label: t("pptx.broadcast.startBroadcast"),
28265
+ variant: "primary",
28266
+ disabled: !canStart
28267
+ }
28268
+ ],
28269
+ onAction: (id) => id === "start" ? handleStartBroadcast() : onClose()
28270
+ }
28271
+ ) })
28272
+ ] })
28135
28273
  ]
28136
28274
  }
28137
28275
  )
@@ -28540,6 +28678,7 @@ function ShareDialog({
28540
28678
  const collab = useCollaboration();
28541
28679
  const isActive = collab !== null && collab.status !== "disconnected" && collab.status !== "error";
28542
28680
  const { t } = useTranslation();
28681
+ const regionRenderer = useRegionRenderer("dialog.share");
28543
28682
  const [roomId, setRoomId] = useState(defaultRoomId ?? "");
28544
28683
  const [userName, setUserName] = useState(defaultUserName ?? "");
28545
28684
  const [serverUrl, setServerUrl] = useState(defaultServerUrl ?? "");
@@ -28626,58 +28765,74 @@ function ShareDialog({
28626
28765
  ]
28627
28766
  }
28628
28767
  ),
28629
- /* @__PURE__ */ jsx("div", { className: "px-5 py-4", children: isActive ? /* @__PURE__ */ jsx(
28630
- ActiveSessionView,
28631
- {
28632
- collab,
28633
- activeCollaboration,
28634
- copied,
28635
- onCopyRoomId: handleCopyRoomId,
28636
- onStopCollaboration
28637
- }
28638
- ) : /* @__PURE__ */ jsx(
28639
- StartSessionForm,
28640
- {
28641
- mode,
28642
- invitation,
28643
- roomId,
28644
- userName,
28645
- serverUrl,
28646
- onRoomIdChange: setRoomId,
28647
- onUserNameChange: setUserName,
28648
- onServerUrlChange: setServerUrl,
28649
- onModeChange: setMode,
28650
- onInvitationChange: setInvitation,
28651
- preconfigured,
28652
- connectionFailed: collab?.status === "error",
28653
- onRetry: collab?.retry
28654
- }
28655
- ) }),
28656
- /* @__PURE__ */ jsx(
28657
- "div",
28658
- {
28659
- className: `flex justify-end gap-2 px-5 py-3 border-t border-border ${stickyFooterClass}`,
28660
- children: /* @__PURE__ */ jsx(
28661
- DialogFooter,
28662
- {
28663
- actions: [
28664
- { id: "cancel", label: isActive ? t("pptx.share.close") : t("pptx.share.cancel") },
28665
- ...isActive ? [] : [
28768
+ regionRenderer ? (
28769
+ // The frame (backdrop, title bar, close, dismiss) stays the viewer's; the host replaces the body.
28770
+ /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ jsx(
28771
+ ViewerRegion,
28772
+ {
28773
+ region: "dialog.share",
28774
+ renderer: regionRenderer,
28775
+ close: onClose,
28776
+ style: { width: "100%", minHeight: "8rem" }
28777
+ }
28778
+ ) })
28779
+ ) : /* @__PURE__ */ jsxs(Fragment, { children: [
28780
+ /* @__PURE__ */ jsx("div", { className: "px-5 py-4", children: isActive ? /* @__PURE__ */ jsx(
28781
+ ActiveSessionView,
28782
+ {
28783
+ collab,
28784
+ activeCollaboration,
28785
+ copied,
28786
+ onCopyRoomId: handleCopyRoomId,
28787
+ onStopCollaboration
28788
+ }
28789
+ ) : /* @__PURE__ */ jsx(
28790
+ StartSessionForm,
28791
+ {
28792
+ mode,
28793
+ invitation,
28794
+ roomId,
28795
+ userName,
28796
+ serverUrl,
28797
+ onRoomIdChange: setRoomId,
28798
+ onUserNameChange: setUserName,
28799
+ onServerUrlChange: setServerUrl,
28800
+ onModeChange: setMode,
28801
+ onInvitationChange: setInvitation,
28802
+ preconfigured,
28803
+ connectionFailed: collab?.status === "error",
28804
+ onRetry: collab?.retry
28805
+ }
28806
+ ) }),
28807
+ /* @__PURE__ */ jsx(
28808
+ "div",
28809
+ {
28810
+ className: `flex justify-end gap-2 px-5 py-3 border-t border-border ${stickyFooterClass}`,
28811
+ children: /* @__PURE__ */ jsx(
28812
+ DialogFooter,
28813
+ {
28814
+ actions: [
28666
28815
  {
28667
- id: "start",
28668
- label: t(
28669
- mode === "join" ? "pptx.share.joinSession" : "pptx.share.startSharing"
28670
- ),
28671
- variant: "primary",
28672
- disabled: !canStart
28673
- }
28674
- ]
28675
- ],
28676
- onAction: (id) => id === "start" ? handleStartSharing() : onClose()
28677
- }
28678
- )
28679
- }
28680
- )
28816
+ id: "cancel",
28817
+ label: isActive ? t("pptx.share.close") : t("pptx.share.cancel")
28818
+ },
28819
+ ...isActive ? [] : [
28820
+ {
28821
+ id: "start",
28822
+ label: t(
28823
+ mode === "join" ? "pptx.share.joinSession" : "pptx.share.startSharing"
28824
+ ),
28825
+ variant: "primary",
28826
+ disabled: !canStart
28827
+ }
28828
+ ]
28829
+ ],
28830
+ onAction: (id) => id === "start" ? handleStartSharing() : onClose()
28831
+ }
28832
+ )
28833
+ }
28834
+ )
28835
+ ] })
28681
28836
  ]
28682
28837
  }
28683
28838
  )
@@ -29027,13 +29182,14 @@ function ViewerOverlays({
29027
29182
  reducedMotion,
29028
29183
  onToggleReducedMotion
29029
29184
  }) {
29185
+ const customization = useViewerCustomizationContext();
29030
29186
  const hasOverlay = isShortcutHelpOpen || isAccessibilityPanelOpen || showSlideSorter || showReadingView || showOutlineView;
29031
29187
  if (!hasOverlay) {
29032
29188
  return null;
29033
29189
  }
29034
29190
  return /* @__PURE__ */ jsxs(Fragment, { children: [
29035
29191
  isShortcutHelpOpen && /* @__PURE__ */ jsx(ShortcutPanel, { isOpen: isShortcutHelpOpen, onClose: onCloseShortcuts }),
29036
- isAccessibilityPanelOpen && /* @__PURE__ */ jsx(
29192
+ isAccessibilityPanelOpen && isPanelVisible(customization, "accessibilityPane") && /* @__PURE__ */ jsx(
29037
29193
  AccessibilityPanel,
29038
29194
  {
29039
29195
  isOpen: isAccessibilityPanelOpen,
@@ -29116,9 +29272,38 @@ function ViewerBottomPanels({
29116
29272
  const { isHidden } = useToolbarVisibility(hiddenActions);
29117
29273
  const customization = useViewerCustomizationContext();
29118
29274
  const showNotes = isPanelVisible(customization, "notes");
29275
+ const notesRenderer = useRegionRenderer("notes");
29276
+ const statusBarRenderer = useRegionRenderer("statusBar");
29277
+ const [notesSlot, setNotesSlot] = useState(null);
29278
+ const reportsNotesHeight = Boolean(showNotes && notesRenderer);
29279
+ useEffect(() => {
29280
+ if (!notesSlot || !reportsNotesHeight || !onNotesHeightChange) {
29281
+ return void 0;
29282
+ }
29283
+ const stop2 = observeElementHeight(notesSlot, onNotesHeightChange);
29284
+ return () => {
29285
+ stop2();
29286
+ onNotesHeightChange(0);
29287
+ };
29288
+ }, [notesSlot, reportsNotesHeight, onNotesHeightChange]);
29119
29289
  return /* @__PURE__ */ jsxs(Fragment, { children: [
29120
29290
  showNotes && onResizeBottom && !isSlideNotesCollapsed && /* @__PURE__ */ jsx(ResizeHandle, { direction: "vertical", onResize: onResizeBottom }),
29121
- showNotes && /* @__PURE__ */ jsx(
29291
+ showNotes && notesRenderer && // The slot (height, resize handle, collapse) stays the viewer's; a
29292
+ // collapsed strip is hidden, not unmounted, so the host keeps its state.
29293
+ /* @__PURE__ */ jsx(
29294
+ "div",
29295
+ {
29296
+ ref: setNotesSlot,
29297
+ "data-pptx-chrome": "notes",
29298
+ className: "flex-shrink-0 overflow-hidden border-t border-border/60 bg-background",
29299
+ style: {
29300
+ height: notesPanelHeight ?? 120,
29301
+ display: isSlideNotesCollapsed ? "none" : void 0
29302
+ },
29303
+ children: /* @__PURE__ */ jsx(ViewerRegion, { region: "notes", renderer: notesRenderer })
29304
+ }
29305
+ ),
29306
+ showNotes && !notesRenderer && /* @__PURE__ */ jsx(
29122
29307
  SlideNotesPanel,
29123
29308
  {
29124
29309
  activeSlide,
@@ -29132,7 +29317,8 @@ function ViewerBottomPanels({
29132
29317
  onHeightChange: onNotesHeightChange
29133
29318
  }
29134
29319
  ),
29135
- !hideStatusBar && isPanelVisible(customization, "statusBar") && /* @__PURE__ */ jsx(
29320
+ !hideStatusBar && isPanelVisible(customization, "statusBar") && statusBarRenderer && /* @__PURE__ */ jsx("div", { "data-pptx-chrome": "status-bar", className: "flex-shrink-0", children: /* @__PURE__ */ jsx(ViewerRegion, { region: "statusBar", renderer: statusBarRenderer }) }),
29321
+ !hideStatusBar && isPanelVisible(customization, "statusBar") && !statusBarRenderer && /* @__PURE__ */ jsx(
29136
29322
  StatusBar,
29137
29323
  {
29138
29324
  slideCount,
@@ -29211,9 +29397,23 @@ function ViewerInspector({
29211
29397
  panelWidth
29212
29398
  }) {
29213
29399
  const { t } = useTranslation();
29400
+ const regionRenderer = useRegionRenderer("inspector");
29214
29401
  if (!isOpen) {
29215
29402
  return null;
29216
29403
  }
29404
+ if (regionRenderer) {
29405
+ return /* @__PURE__ */ jsx(
29406
+ "div",
29407
+ {
29408
+ "data-pptx-inspector": true,
29409
+ role: "complementary",
29410
+ "aria-label": t("pptx.inspector.properties"),
29411
+ className: "h-full flex-shrink-0 max-md:absolute max-md:inset-x-0 max-md:bottom-0 max-md:top-auto max-md:z-30",
29412
+ style: panelWidth ? { width: panelWidth } : void 0,
29413
+ children: /* @__PURE__ */ jsx(ViewerRegion, { region: "inspector", renderer: regionRenderer, close: onClose })
29414
+ }
29415
+ );
29416
+ }
29217
29417
  const slideId = activeSlide?.id ?? "";
29218
29418
  const commentDraft = comments.commentDraftBySlideId[slideId] ?? "";
29219
29419
  const editingCommentId = comments.editingCommentIdBySlideId[slideId] ?? null;
@@ -29458,7 +29658,7 @@ function ViewerToolbarSection(props) {
29458
29658
  },
29459
29659
  [activeSlide, propertyHandlers]
29460
29660
  );
29461
- const scopedLayoutOptions = React102.useMemo(
29661
+ const scopedLayoutOptions = React103.useMemo(
29462
29662
  () => scopeLayoutOptionsToActiveSlide(s.layoutOptions, activeSlide),
29463
29663
  [s.layoutOptions, activeSlide]
29464
29664
  );
@@ -29862,6 +30062,12 @@ function ViewerToolbarSection(props) {
29862
30062
  },
29863
30063
  isCommentsPanelOpen: s.isInspectorPaneOpen,
29864
30064
  slideCommentCount: activeSlide?.comments?.length ?? 0,
30065
+ reviewComments: createReviewCommentsHost({
30066
+ state: s,
30067
+ activeSlideIndex,
30068
+ updateSlides: ops.updateSlides,
30069
+ markDirty: history.markDirty
30070
+ }),
29865
30071
  formatPainterActive: s.formatPainterActive,
29866
30072
  canActivateFormatPainter: hasCopyableFormat(selectedElement),
29867
30073
  onToggleFormatPainter: onToggleFormatPainterProp ?? (() => s.setFormatPainterActive((p) => !p)),
@@ -30322,7 +30528,8 @@ function ViewerDialogGroup(props) {
30322
30528
  onKeepAnnotations,
30323
30529
  onDiscardAnnotations
30324
30530
  } = props;
30325
- const printAvailable = isDialogAvailable(useViewerCustomizationContext(), "print");
30531
+ const customization = useViewerCustomizationContext();
30532
+ const printAvailable = isDialogAvailable(customization, "print");
30326
30533
  return /* @__PURE__ */ jsxs(Fragment, { children: [
30327
30534
  /* @__PURE__ */ jsx(
30328
30535
  VersionHistoryPanel,
@@ -30336,7 +30543,7 @@ function ViewerDialogGroup(props) {
30336
30543
  /* @__PURE__ */ jsx(
30337
30544
  ComparePanel,
30338
30545
  {
30339
- isOpen: propertyHandlers.isComparePanelOpen,
30546
+ isOpen: propertyHandlers.isComparePanelOpen && isPanelVisible(customization, "comparePane"),
30340
30547
  compareResult: propertyHandlers.compareResult,
30341
30548
  canvasSize,
30342
30549
  onClose: () => propertyHandlers.setIsComparePanelOpen(false),
@@ -30348,7 +30555,7 @@ function ViewerDialogGroup(props) {
30348
30555
  /* @__PURE__ */ jsx(
30349
30556
  PasswordProtectionDialog,
30350
30557
  {
30351
- isOpen: dialogs.isPasswordDialogOpen,
30558
+ isOpen: dialogs.isPasswordDialogOpen && isDialogAvailable(customization, "passwordProtection"),
30352
30559
  isCurrentlyProtected: dialogs.isPasswordProtected,
30353
30560
  onClose: () => dialogs.setIsPasswordDialogOpen(false),
30354
30561
  onSetPassword: dialogs.handleSetPassword,
@@ -30388,7 +30595,7 @@ function ViewerDialogGroup(props) {
30388
30595
  /* @__PURE__ */ jsx(
30389
30596
  DigitalSignaturesDialog,
30390
30597
  {
30391
- isOpen: dialogs.isDigitalSigDialogOpen,
30598
+ isOpen: dialogs.isDigitalSigDialogOpen && isDialogAvailable(customization, "signatures"),
30392
30599
  onClose: () => dialogs.setIsDigitalSigDialogOpen(false),
30393
30600
  hasSignatures: hasDigitalSignatures,
30394
30601
  signatureCount: digitalSignatureCount
@@ -30421,7 +30628,7 @@ function ViewerDialogGroup(props) {
30421
30628
  /* @__PURE__ */ jsx(
30422
30629
  EquationEditorDialog,
30423
30630
  {
30424
- isOpen: dialogs.isEquationDialogOpen,
30631
+ isOpen: dialogs.isEquationDialogOpen && isDialogAvailable(customization, "equation"),
30425
30632
  onClose: () => dialogs.setIsEquationDialogOpen(false),
30426
30633
  onInsert: dialogs.editingEquationOmml ? insertHandlers.handleUpdateEquation : insertHandlers.handleInsertEquation,
30427
30634
  existingOmml: dialogs.editingEquationOmml
@@ -30430,7 +30637,7 @@ function ViewerDialogGroup(props) {
30430
30637
  /* @__PURE__ */ jsx(
30431
30638
  HyperlinkEditDialog,
30432
30639
  {
30433
- open: dialogs.isHyperlinkDialogOpen,
30640
+ open: dialogs.isHyperlinkDialogOpen && isDialogAvailable(customization, "hyperlink"),
30434
30641
  initialUrl: selectedElements[0]?.actionClick?.url,
30435
30642
  initialTooltip: selectedElements[0]?.actionClick?.tooltip,
30436
30643
  initialAction: selectedElements[0]?.actionClick?.action,
@@ -30890,6 +31097,7 @@ function PresentationContextMenu(p) {
30890
31097
  );
30891
31098
  }
30892
31099
  function ViewerCanvasArea(props) {
31100
+ const customization = useViewerCustomizationContext();
30893
31101
  const {
30894
31102
  mode,
30895
31103
  canEdit,
@@ -31082,7 +31290,7 @@ ${url}`)) {
31082
31290
  onTouchEnd: swipe.onTouchEnd,
31083
31291
  onContextMenu: mode === "present" ? handlePresentationContextMenu : void 0,
31084
31292
  children: [
31085
- findReplace.findReplaceOpen && /* @__PURE__ */ jsx(
31293
+ findReplace.findReplaceOpen && isPanelVisible(customization, "findReplace") && /* @__PURE__ */ jsx(
31086
31294
  FindReplacePanel,
31087
31295
  {
31088
31296
  findQuery: findReplace.findQuery,
@@ -32072,7 +32280,7 @@ function ViewerSidePanels(props) {
32072
32280
  panelWidth
32073
32281
  }
32074
32282
  ),
32075
- s.isSelectionPaneOpen && (mode === "edit" || mode === "master") && /* @__PURE__ */ jsx(
32283
+ s.isSelectionPaneOpen && isPanelVisible(customization, "selectionPane") && (mode === "edit" || mode === "master") && /* @__PURE__ */ jsx(
32076
32284
  MobileDismissSheet,
32077
32285
  {
32078
32286
  onClose: () => s.setIsSelectionPaneOpen(false),
@@ -32267,6 +32475,7 @@ function ViewerMainContent(props) {
32267
32475
  onApplyLayout,
32268
32476
  loadLayoutPreviews
32269
32477
  } = props;
32478
+ const slidesPaneRenderer = useRegionRenderer("slidesPane");
32270
32479
  const {
32271
32480
  ops,
32272
32481
  sectionOps,
@@ -32296,7 +32505,22 @@ function ViewerMainContent(props) {
32296
32505
  const layoutGalleryPreviews = useLayoutPreviews(loadLayoutPreviews, layoutGalleryAnchor !== null);
32297
32506
  return /* @__PURE__ */ jsx(ChartPartSelectionProvider, { children: /* @__PURE__ */ jsxs("div", { "data-pptx-chrome": "body", className: "relative z-10 flex flex-1 min-h-0", children: [
32298
32507
  showSlidesPane && /* @__PURE__ */ jsxs(Fragment, { children: [
32299
- /* @__PURE__ */ jsx(
32508
+ slidesPaneRenderer ? (
32509
+ // The rail's slot (width, collapse, resize handle) stays the viewer's.
32510
+ /* @__PURE__ */ jsx(
32511
+ "div",
32512
+ {
32513
+ "data-pptx-chrome": "slides",
32514
+ className: "h-full flex-shrink-0 overflow-hidden border-r border-border bg-secondary/30",
32515
+ style: {
32516
+ width: leftPanelWidth ?? 220,
32517
+ // Same collapse rule as the built-in rail; hidden, not unmounted.
32518
+ display: state.isSlidesPaneOpen ? void 0 : "none"
32519
+ },
32520
+ children: /* @__PURE__ */ jsx(ViewerRegion, { region: "slidesPane", renderer: slidesPaneRenderer })
32521
+ }
32522
+ )
32523
+ ) : /* @__PURE__ */ jsx(
32300
32524
  SlidesPaneSidebar,
32301
32525
  {
32302
32526
  slides,
@@ -33042,157 +33266,6 @@ function OptionsAddInsPane({ addinStatus }) {
33042
33266
  ] })
33043
33267
  ] });
33044
33268
  }
33045
- function readValue(options, control) {
33046
- const group = options[control.group];
33047
- const value = group[control.key];
33048
- return typeof value === "boolean" || typeof value === "number" || typeof value === "string" ? value : void 0;
33049
- }
33050
- function InfoTip({ text }) {
33051
- return /* @__PURE__ */ jsx("span", { title: text, className: "inline-flex cursor-help align-middle", children: /* @__PURE__ */ jsx(LuInfo, { className: "ml-1 h-3.5 w-3.5 text-primary/70", "aria-label": text }) });
33052
- }
33053
- var IGNORE_CHANGE = () => void 0;
33054
- function ControlRow({
33055
- control,
33056
- options,
33057
- onOptionChange: emitChange
33058
- }) {
33059
- const { t } = useTranslation();
33060
- const { viewportWidth } = useIsMobile();
33061
- const fieldMinHeight = getDensePanelTouchTargetPx(viewportWidth);
33062
- const value = readValue(options, control);
33063
- const label = t(control.labelKey);
33064
- const info = control.infoKey ? /* @__PURE__ */ jsx(InfoTip, { text: t(control.infoKey) }) : null;
33065
- const rowClass = cn("flex items-center justify-between gap-3 py-1.5", control.indent && "pl-6");
33066
- const rowStyle = { minHeight: fieldMinHeight };
33067
- const locked = control.readOnly === true;
33068
- const lockedTitle = locked ? t("pptx.options.lockedByHost") : void 0;
33069
- const onOptionChange = locked ? IGNORE_CHANGE : emitChange;
33070
- if (control.kind === "toggle") {
33071
- return /* @__PURE__ */ jsxs("label", { className: cn(rowClass, "cursor-pointer select-none"), style: rowStyle, children: [
33072
- /* @__PURE__ */ jsxs("span", { className: "text-sm text-foreground", children: [
33073
- label,
33074
- info
33075
- ] }),
33076
- /* @__PURE__ */ jsx(
33077
- WebCheckbox,
33078
- {
33079
- checked: value === true,
33080
- "aria-label": label,
33081
- disabled: locked,
33082
- title: lockedTitle,
33083
- onChange: (event) => onOptionChange(
33084
- control.group,
33085
- control.key,
33086
- event.currentTarget.checked
33087
- )
33088
- }
33089
- )
33090
- ] });
33091
- }
33092
- if (control.kind === "select") {
33093
- return /* @__PURE__ */ jsxs("div", { className: rowClass, style: rowStyle, children: [
33094
- /* @__PURE__ */ jsxs("span", { className: "text-sm text-foreground", children: [
33095
- label,
33096
- info
33097
- ] }),
33098
- /* @__PURE__ */ jsx(
33099
- WebSelect,
33100
- {
33101
- "aria-label": label,
33102
- disabled: locked,
33103
- title: lockedTitle,
33104
- style: { minHeight: fieldMinHeight },
33105
- value: typeof value === "string" ? value : "",
33106
- onChange: (event) => onOptionChange(
33107
- control.group,
33108
- control.key,
33109
- event.currentTarget.value
33110
- ),
33111
- children: control.choices.map((choice) => /* @__PURE__ */ jsx("option", { value: choice.value, children: t(choice.labelKey) }, choice.value))
33112
- }
33113
- )
33114
- ] });
33115
- }
33116
- if (control.kind === "number") {
33117
- return /* @__PURE__ */ jsxs("div", { className: rowClass, style: rowStyle, children: [
33118
- /* @__PURE__ */ jsxs("span", { className: "text-sm text-foreground", children: [
33119
- label,
33120
- info
33121
- ] }),
33122
- /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5", children: [
33123
- /* @__PURE__ */ jsx(
33124
- "input",
33125
- {
33126
- type: "number",
33127
- "aria-label": label,
33128
- disabled: locked,
33129
- title: lockedTitle,
33130
- style: { minHeight: fieldMinHeight },
33131
- className: "w-20 rounded border border-border bg-background px-2 py-1 text-right text-xs text-foreground",
33132
- min: control.min,
33133
- max: control.max,
33134
- step: control.step ?? 1,
33135
- value: typeof value === "number" ? value : control.min,
33136
- onChange: (event) => {
33137
- const clamped = clampOptionNumber(event.target.value, control.min, control.max);
33138
- if (clamped !== void 0) {
33139
- onOptionChange(control.group, control.key, clamped);
33140
- }
33141
- }
33142
- }
33143
- ),
33144
- control.unitKey && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: t(control.unitKey) })
33145
- ] })
33146
- ] });
33147
- }
33148
- return /* @__PURE__ */ jsxs("div", { className: rowClass, style: rowStyle, children: [
33149
- /* @__PURE__ */ jsxs("span", { className: "text-sm text-foreground", children: [
33150
- label,
33151
- info
33152
- ] }),
33153
- /* @__PURE__ */ jsx(
33154
- "input",
33155
- {
33156
- type: "text",
33157
- "aria-label": label,
33158
- disabled: locked,
33159
- title: lockedTitle,
33160
- style: { minHeight: fieldMinHeight },
33161
- className: "w-48 max-w-[55%] rounded border border-border bg-background px-2 py-1 text-xs text-foreground",
33162
- maxLength: control.maxLength,
33163
- value: typeof value === "string" ? value : "",
33164
- onChange: (event) => onOptionChange(control.group, control.key, event.target.value)
33165
- }
33166
- )
33167
- ] });
33168
- }
33169
- function OptionsPane({
33170
- tab,
33171
- options,
33172
- onOptionChange,
33173
- renderSpecial,
33174
- children
33175
- }) {
33176
- const { t } = useTranslation();
33177
- return /* @__PURE__ */ jsxs("div", { className: "space-y-5", children: [
33178
- /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-foreground", children: t(tab.descriptionKey) }),
33179
- tab.sections.map((section) => /* @__PURE__ */ jsxs("section", { children: [
33180
- /* @__PURE__ */ jsx("h3", { className: "mb-1 border-b border-border/60 pb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: t(section.titleKey) }),
33181
- section.descriptionKey && /* @__PURE__ */ jsx("p", { className: "mb-2 text-xs text-muted-foreground", children: t(section.descriptionKey) }),
33182
- /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: section.controls.map((control) => /* @__PURE__ */ jsx(
33183
- ControlRow,
33184
- {
33185
- control,
33186
- options,
33187
- onOptionChange
33188
- },
33189
- `${control.group}.${control.key}.${section.id}`
33190
- )) }),
33191
- section.special && renderSpecial?.(section)
33192
- ] }, section.id)),
33193
- children
33194
- ] });
33195
- }
33196
33269
  function CommandList({
33197
33270
  title,
33198
33271
  commandIds,
@@ -33395,7 +33468,7 @@ function OptionsRibbonPane({
33395
33468
  ] }),
33396
33469
  /* @__PURE__ */ jsxs("section", { children: [
33397
33470
  /* @__PURE__ */ jsx("h3", { className: "mb-1 border-b border-border/60 pb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: t("pptx.settings.keyboardShortcuts") }),
33398
- /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: SHORTCUT_REFERENCE_ITEMS.map((shortcut, i) => /* @__PURE__ */ jsxs(
33471
+ /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: SHORTCUT_REFERENCE_ITEMS$1.map((shortcut, i) => /* @__PURE__ */ jsxs(
33399
33472
  "div",
33400
33473
  {
33401
33474
  className: cn(
@@ -33637,10 +33710,11 @@ function SettingsLanguageTab({
33637
33710
  );
33638
33711
  }) });
33639
33712
  }
33640
- var AI_TAB_ID = "ai";
33641
33713
  var NO_CUSTOM_FONT_FAMILIES = [];
33642
- function SettingsDialog({
33643
- isOpen,
33714
+ function SettingsDialog(props) {
33715
+ return props.isOpen ? /* @__PURE__ */ jsx(OpenSettingsDialog, { ...props }) : null;
33716
+ }
33717
+ function OpenSettingsDialog({
33644
33718
  onClose,
33645
33719
  options,
33646
33720
  onOptionChange,
@@ -33661,272 +33735,98 @@ function SettingsDialog({
33661
33735
  customFontFamilies = NO_CUSTOM_FONT_FAMILIES,
33662
33736
  onCustomFontRegistered
33663
33737
  }) {
33664
- const [activeTabId, setActiveTabId] = useState("general");
33665
33738
  const { t } = useTranslation();
33666
33739
  const customization = useViewerCustomizationContext();
33667
- const { panelStyle, handlers: dragHandlers } = useModalDismissDrag(onClose);
33668
- const { viewportWidth, viewportHeight } = useIsMobile();
33669
- const touchTargetPx = getDensePanelTouchTargetPx(viewportWidth);
33670
- const navBtnStyle = { minHeight: touchTargetPx, minWidth: touchTargetPx };
33671
- const closeBtnStyle = { minWidth: touchTargetPx, minHeight: touchTargetPx };
33672
- const footerBtnStyle = { minHeight: touchTargetPx };
33673
- const stickyFooterClass = shouldStickyActionRow(viewportWidth, viewportHeight) ? "sticky bottom-0 bg-popover" : "";
33674
- const snapshotRef = useRef(null);
33675
- const wasOpenRef = useRef(false);
33676
- useEffect(() => {
33677
- if (isOpen && !wasOpenRef.current) {
33678
- snapshotRef.current = options;
33679
- }
33680
- wasOpenRef.current = isOpen;
33681
- }, [isOpen, options]);
33682
- const handleCancel = useCallback(() => {
33683
- if (snapshotRef.current) {
33684
- onRestoreOptions(snapshotRef.current);
33685
- }
33686
- onClose();
33687
- }, [onClose, onRestoreOptions]);
33688
- const handleKeyDown = useCallback(
33689
- (e) => {
33690
- if (e.key === "Escape") {
33691
- onClose();
33692
- }
33693
- },
33694
- [onClose]
33740
+ const regionBase = useContext(ViewerRegionBaseContext);
33741
+ const regionContext = useMemo(
33742
+ () => regionBase ? { ...regionBase, region: "dialog.options", close: onClose } : null,
33743
+ [regionBase, onClose]
33695
33744
  );
33696
- useEffect(() => {
33697
- if (isOpen) {
33698
- document.addEventListener("keydown", handleKeyDown);
33699
- return () => document.removeEventListener("keydown", handleKeyDown);
33700
- }
33701
- }, [isOpen, handleKeyDown]);
33702
- if (!isOpen) {
33703
- return null;
33704
- }
33705
- const tabs = customizeOptionsTabs(VIEWER_OPTIONS_TABS, customization);
33706
- const showAiTab = Boolean(aiEnabled) && isOptionsPageVisible(customization, AI_TAB_ID);
33707
- const activeTab = tabs.find((tab) => tab.id === activeTabId) ?? tabs[0];
33708
- const aiActive = activeTabId === AI_TAB_ID && showAiTab;
33709
- if (!activeTab) {
33710
- return null;
33711
- }
33712
- const currentTabId = aiActive ? AI_TAB_ID : activeTab.id;
33713
- return /* @__PURE__ */ jsxs(Fragment, { children: [
33714
- /* @__PURE__ */ jsx(
33715
- "button",
33745
+ const dialogRef = useRef(null);
33746
+ const bindingRef = useRef(null);
33747
+ const [category, setCategory] = useState("general");
33748
+ const latest = useRef({ onClose, onOptionChange, onRestoreOptions, onResetOptions });
33749
+ latest.current = { onClose, onOptionChange, onRestoreOptions, onResetOptions };
33750
+ useLayoutEffect(() => {
33751
+ const binding = bindPptxOptionsDialog(dialogRef.current, {
33752
+ setOption: (group, key, value) => latest.current.onOptionChange(group, key, value),
33753
+ restoreOptions: (snapshot) => latest.current.onRestoreOptions(snapshot),
33754
+ resetOptions: () => latest.current.onResetOptions(),
33755
+ close: () => latest.current.onClose(),
33756
+ categoryChanged: setCategory
33757
+ });
33758
+ bindingRef.current = binding;
33759
+ return () => {
33760
+ binding.dispose();
33761
+ bindingRef.current = null;
33762
+ };
33763
+ }, []);
33764
+ useLayoutEffect(() => {
33765
+ bindingRef.current?.sync({
33766
+ options,
33767
+ t,
33768
+ customization,
33769
+ aiEnabled: Boolean(aiEnabled),
33770
+ regionContext
33771
+ });
33772
+ }, [options, t, customization, aiEnabled, regionContext]);
33773
+ return /* @__PURE__ */ jsxs("pptx-ui-options-dialog", { ref: dialogRef, children: [
33774
+ category === "general" && /* @__PURE__ */ jsxs(Fragment, { children: [
33775
+ /* @__PURE__ */ jsx("div", { slot: optionsBlockSlot("themePicker"), className: "mt-2", children: /* @__PURE__ */ jsx(
33776
+ SettingsAppearanceTab,
33777
+ {
33778
+ activeThemeKey: themeKey,
33779
+ themes: availableThemes,
33780
+ onSelectTheme
33781
+ }
33782
+ ) }),
33783
+ /* @__PURE__ */ jsx("div", { slot: optionsBlockSlot("customFonts"), children: /* @__PURE__ */ jsx(
33784
+ SettingsCustomFontsSection,
33785
+ {
33786
+ enabled: options.general.enableCustomFontUpload,
33787
+ families: customFontFamilies,
33788
+ onRegistered: (family) => onCustomFontRegistered?.(family)
33789
+ }
33790
+ ) })
33791
+ ] }),
33792
+ category === "save" && /* @__PURE__ */ jsxs("div", { slot: optionsBlockSlot("clearCache"), className: "mt-2", children: [
33793
+ /* @__PURE__ */ jsx("p", { className: "mb-2 text-xs text-muted-foreground", children: t("pptx.options.save.clearCacheDescription") }),
33794
+ /* @__PURE__ */ jsx(
33795
+ "button",
33796
+ {
33797
+ type: "button",
33798
+ onClick: onClearCache,
33799
+ className: "rounded border border-border px-3 py-1.5 text-xs text-foreground transition-colors hover:bg-accent",
33800
+ children: t("pptx.options.save.clearCacheNow")
33801
+ }
33802
+ )
33803
+ ] }),
33804
+ category === "language" && /* @__PURE__ */ jsx("div", { slot: optionsBlockSlot("language"), children: /* @__PURE__ */ jsx(
33805
+ SettingsLanguageTab,
33716
33806
  {
33717
- type: "button",
33718
- style: { zIndex: 1200 },
33719
- className: "fixed inset-0 bg-black/60",
33720
- "aria-label": t("pptx.settings.closeSettings"),
33721
- onClick: onClose
33807
+ activeLocale: localeCode,
33808
+ locales: availableLocales,
33809
+ onSelectLocale
33722
33810
  }
33723
- ),
33724
- /* @__PURE__ */ jsx(
33725
- "div",
33811
+ ) }),
33812
+ category === "ribbon" && /* @__PURE__ */ jsx("div", { slot: optionsPaneSlot("ribbon"), children: /* @__PURE__ */ jsx(
33813
+ OptionsRibbonPane,
33726
33814
  {
33727
- style: { zIndex: 1201 },
33728
- className: "fixed inset-0 flex items-center justify-center pointer-events-none",
33729
- children: /* @__PURE__ */ jsxs(
33730
- "div",
33731
- {
33732
- style: panelStyle,
33733
- role: "dialog",
33734
- "aria-modal": "true",
33735
- "aria-label": t("pptx.options.title"),
33736
- className: "pointer-events-auto flex max-h-[85vh] w-[min(56rem,calc(100%-2rem))] flex-col rounded-xl border border-border bg-popover shadow-2xl backdrop-blur-xl max-md:fixed max-md:inset-x-0 max-md:bottom-0 max-md:top-auto max-md:max-h-[88dvh] max-md:w-full max-md:rounded-t-2xl max-md:rounded-b-none max-md:border-x-0 max-md:border-b-0 max-md:pb-[max(env(safe-area-inset-bottom),0px)]",
33737
- children: [
33738
- /* @__PURE__ */ jsxs(
33739
- "div",
33740
- {
33741
- ...dragHandlers,
33742
- className: "flex items-center justify-between border-b border-border/60 px-5 py-4 touch-none",
33743
- children: [
33744
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
33745
- /* @__PURE__ */ jsx(LuSettings, { className: "h-5 w-5 text-primary" }),
33746
- /* @__PURE__ */ jsx("h2", { className: "text-sm font-semibold text-foreground", children: t("pptx.options.title") })
33747
- ] }),
33748
- /* @__PURE__ */ jsx(
33749
- "button",
33750
- {
33751
- type: "button",
33752
- onClick: onClose,
33753
- style: closeBtnStyle,
33754
- className: "rounded p-1 transition-colors hover:bg-accent inline-flex items-center justify-center",
33755
- "aria-label": t("pptx.settings.close"),
33756
- children: /* @__PURE__ */ jsx(LuX, { className: "h-4 w-4 text-muted-foreground" })
33757
- }
33758
- )
33759
- ]
33760
- }
33761
- ),
33762
- /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-1 max-md:flex-col", children: [
33763
- /* @__PURE__ */ jsxs(
33764
- "nav",
33765
- {
33766
- "aria-label": t("pptx.options.title"),
33767
- className: "w-44 shrink-0 space-y-0.5 overflow-y-auto border-r border-border/60 p-2 max-md:flex max-md:w-full max-md:space-y-0 max-md:gap-1 max-md:overflow-x-auto max-md:border-b max-md:border-r-0",
33768
- children: [
33769
- tabs.map((tab) => /* @__PURE__ */ jsx(
33770
- "button",
33771
- {
33772
- type: "button",
33773
- onClick: () => setActiveTabId(tab.id),
33774
- "aria-current": currentTabId === tab.id,
33775
- style: navBtnStyle,
33776
- className: cn(
33777
- "flex w-full items-center whitespace-nowrap rounded px-3 py-2 text-left text-sm transition-colors max-md:w-auto",
33778
- currentTabId === tab.id ? "bg-primary/10 font-medium text-primary" : "text-foreground hover:bg-accent"
33779
- ),
33780
- children: t(tab.labelKey)
33781
- },
33782
- tab.id
33783
- )),
33784
- showAiTab && /* @__PURE__ */ jsx(
33785
- "button",
33786
- {
33787
- type: "button",
33788
- onClick: () => setActiveTabId(AI_TAB_ID),
33789
- "aria-current": aiActive,
33790
- style: navBtnStyle,
33791
- className: cn(
33792
- "flex w-full items-center whitespace-nowrap rounded px-3 py-2 text-left text-sm transition-colors max-md:w-auto",
33793
- aiActive ? "bg-primary/10 font-medium text-primary" : "text-foreground hover:bg-accent"
33794
- ),
33795
- children: t("pptx.ai.settingsSectionTitle")
33796
- }
33797
- )
33798
- ]
33799
- }
33800
- ),
33801
- /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1 overflow-y-auto px-5 py-4", children: aiActive ? /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
33802
- /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-foreground", children: t("pptx.ai.settingsSectionTitle") }),
33803
- /* @__PURE__ */ jsx(SettingsAiTab, { store: chatStore })
33804
- ] }) : activeTab.custom === "language" ? /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
33805
- /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-foreground", children: t(activeTab.descriptionKey) }),
33806
- /* @__PURE__ */ jsxs("section", { children: [
33807
- /* @__PURE__ */ jsx("h3", { className: "mb-1 border-b border-border/60 pb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: t("pptx.options.language.displayLanguage") }),
33808
- /* @__PURE__ */ jsx("p", { className: "mb-2 text-xs text-muted-foreground", children: t("pptx.options.language.displayLanguageDescription") }),
33809
- /* @__PURE__ */ jsx(
33810
- SettingsLanguageTab,
33811
- {
33812
- activeLocale: localeCode,
33813
- locales: availableLocales,
33814
- onSelectLocale
33815
- }
33816
- )
33817
- ] })
33818
- ] }) : activeTab.custom === "ribbon" ? /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
33819
- /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-foreground", children: t(activeTab.descriptionKey) }),
33820
- /* @__PURE__ */ jsx(
33821
- OptionsRibbonPane,
33822
- {
33823
- options,
33824
- onRibbonTabHiddenChange,
33825
- onResetRibbon: () => onResetOptions("ribbon")
33826
- }
33827
- )
33828
- ] }) : activeTab.custom === "addIns" ? /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
33829
- /* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-foreground", children: t(activeTab.descriptionKey) }),
33830
- /* @__PURE__ */ jsx(OptionsAddInsPane, { addinStatus })
33831
- ] }) : /* @__PURE__ */ jsx(
33832
- OptionsPane,
33833
- {
33834
- tab: activeTab,
33835
- options,
33836
- onOptionChange,
33837
- renderSpecial: (section) => {
33838
- if (section.special === "themePicker") {
33839
- return /* @__PURE__ */ jsx("div", { className: "mt-2", children: /* @__PURE__ */ jsx(
33840
- SettingsAppearanceTab,
33841
- {
33842
- activeThemeKey: themeKey,
33843
- themes: availableThemes,
33844
- onSelectTheme
33845
- }
33846
- ) });
33847
- }
33848
- if (section.special === "customFonts") {
33849
- return /* @__PURE__ */ jsx(
33850
- SettingsCustomFontsSection,
33851
- {
33852
- enabled: options.general.enableCustomFontUpload,
33853
- families: customFontFamilies,
33854
- onRegistered: (family) => onCustomFontRegistered?.(family)
33855
- }
33856
- );
33857
- }
33858
- if (section.special === "clearCache") {
33859
- return /* @__PURE__ */ jsxs("div", { className: "mt-2", children: [
33860
- /* @__PURE__ */ jsx("p", { className: "mb-2 text-xs text-muted-foreground", children: t("pptx.options.save.clearCacheDescription") }),
33861
- /* @__PURE__ */ jsx(
33862
- "button",
33863
- {
33864
- type: "button",
33865
- onClick: onClearCache,
33866
- className: "rounded border border-border px-3 py-1.5 text-xs text-foreground transition-colors hover:bg-accent",
33867
- children: t("pptx.options.save.clearCacheNow")
33868
- }
33869
- )
33870
- ] });
33871
- }
33872
- return null;
33873
- },
33874
- children: activeTab.custom === "quickAccess" && /* @__PURE__ */ jsx(
33875
- OptionsQuickAccessPane,
33876
- {
33877
- options,
33878
- onQuickAccessCommandsChange,
33879
- onResetQuickAccess: () => onQuickAccessCommandsChange([...DEFAULT_QUICK_ACCESS_COMMAND_IDS])
33880
- }
33881
- )
33882
- }
33883
- ) })
33884
- ] }),
33885
- /* @__PURE__ */ jsxs(
33886
- "div",
33887
- {
33888
- className: `flex items-center justify-between gap-2 border-t border-border/60 px-5 py-3 ${stickyFooterClass}`,
33889
- children: [
33890
- /* @__PURE__ */ jsx(
33891
- "button",
33892
- {
33893
- type: "button",
33894
- onClick: () => onResetOptions(),
33895
- style: footerBtnStyle,
33896
- className: "rounded border border-border px-3 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
33897
- children: t("pptx.options.resetAll")
33898
- }
33899
- ),
33900
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
33901
- /* @__PURE__ */ jsx(
33902
- "button",
33903
- {
33904
- type: "button",
33905
- onClick: handleCancel,
33906
- style: footerBtnStyle,
33907
- className: "rounded border border-border px-4 py-1.5 text-xs text-foreground transition-colors hover:bg-accent",
33908
- children: t("pptx.common.cancel")
33909
- }
33910
- ),
33911
- /* @__PURE__ */ jsx(
33912
- "button",
33913
- {
33914
- type: "button",
33915
- onClick: onClose,
33916
- style: footerBtnStyle,
33917
- className: "rounded bg-primary px-4 py-1.5 text-xs font-medium text-primary-foreground transition-colors hover:bg-primary/90",
33918
- children: t("pptx.common.ok")
33919
- }
33920
- )
33921
- ] })
33922
- ]
33923
- }
33924
- )
33925
- ]
33926
- }
33927
- )
33815
+ options,
33816
+ onRibbonTabHiddenChange,
33817
+ onResetRibbon: () => onResetOptions("ribbon")
33928
33818
  }
33929
- )
33819
+ ) }),
33820
+ category === "quickAccess" && /* @__PURE__ */ jsx("div", { slot: optionsPaneSlot("quickAccess"), children: /* @__PURE__ */ jsx(
33821
+ OptionsQuickAccessPane,
33822
+ {
33823
+ options,
33824
+ onQuickAccessCommandsChange,
33825
+ onResetQuickAccess: () => onQuickAccessCommandsChange([...DEFAULT_QUICK_ACCESS_COMMAND_IDS])
33826
+ }
33827
+ ) }),
33828
+ category === "addIns" && /* @__PURE__ */ jsx("div", { slot: optionsPaneSlot("addIns"), children: /* @__PURE__ */ jsx(OptionsAddInsPane, { addinStatus }) }),
33829
+ category === AI_OPTIONS_CATEGORY && /* @__PURE__ */ jsx("div", { slot: optionsPaneSlot(AI_OPTIONS_CATEGORY), children: /* @__PURE__ */ jsx(SettingsAiTab, { store: chatStore }) })
33930
33830
  ] });
33931
33831
  }
33932
33832
  function ViewerOptionsProvider({
@@ -34222,6 +34122,31 @@ function useAutosaveCacheMaintenance(viewerOptions) {
34222
34122
  }, [viewerOptions]);
34223
34123
  return handleClearOptionsCache;
34224
34124
  }
34125
+ function useLoadNotifications(input) {
34126
+ const { loading, error } = input;
34127
+ const latest = useRef(input);
34128
+ latest.current = input;
34129
+ const wasLoading = useRef(loading);
34130
+ const announcedError = useRef(null);
34131
+ useEffect(() => {
34132
+ const finished = wasLoading.current && !loading;
34133
+ wasLoading.current = loading;
34134
+ if (finished && !latest.current.error) {
34135
+ latest.current.onLoad?.({
34136
+ slideCount: latest.current.slideCount,
34137
+ canvasSize: latest.current.canvasSize
34138
+ });
34139
+ }
34140
+ }, [loading]);
34141
+ useEffect(() => {
34142
+ if (error && error !== announcedError.current) {
34143
+ announcedError.current = error;
34144
+ latest.current.onError?.(error);
34145
+ } else if (!error) {
34146
+ announcedError.current = null;
34147
+ }
34148
+ }, [error]);
34149
+ }
34225
34150
  function useMasterViewCrud(input) {
34226
34151
  const {
34227
34152
  handlerRef,
@@ -34332,6 +34257,7 @@ function useRibbonGalleryCommands2(input) {
34332
34257
  themeColorMap,
34333
34258
  handlerRef,
34334
34259
  editable,
34260
+ tableEditorState,
34335
34261
  updateElementById,
34336
34262
  updateThemeColorScheme,
34337
34263
  updateThemeFontScheme
@@ -34342,9 +34268,10 @@ function useRibbonGalleryCommands2(input) {
34342
34268
  element: selectedElement ?? null,
34343
34269
  themeColorMap,
34344
34270
  theme,
34345
- resolveStyleMatrix: handler ? (styleXml) => handler.resolveStyleMatrixReferences(styleXml) : void 0
34271
+ resolveStyleMatrix: handler ? (styleXml) => handler.resolveStyleMatrixReferences(styleXml) : void 0,
34272
+ selectedTableCells: tableLayoutCells(tableEditorState)
34346
34273
  }),
34347
- [selectedElement, themeColorMap, theme, handler]
34274
+ [selectedElement, themeColorMap, theme, handler, tableEditorState]
34348
34275
  );
34349
34276
  const dispatch = useCallback(
34350
34277
  (result) => {
@@ -34593,6 +34520,8 @@ var PowerPointViewer = forwardRef(
34593
34520
  onZoomChange,
34594
34521
  onSelectionChange,
34595
34522
  onSlideCountChange,
34523
+ onLoad,
34524
+ onError,
34596
34525
  onOpenFile: hostOpenFile,
34597
34526
  theme,
34598
34527
  defaultThemeKey,
@@ -34735,7 +34664,7 @@ var PowerPointViewer = forwardRef(
34735
34664
  const [notesBarHeight, setNotesBarHeight] = useState(0);
34736
34665
  const runProgramNoticesState = useRunProgramNoticesState();
34737
34666
  const [collaborationReadOnly, setCollaborationReadOnly] = useState(Boolean(collaboration));
34738
- const canEdit = hostCanEdit && !collaborationReadOnly && !isProtectedView && !readOnlyRec.locked;
34667
+ const canEdit = hostCanEdit && isEditingAllowed(customizationResolved) && !collaborationReadOnly && !isProtectedView && !readOnlyRec.locked;
34739
34668
  const [isSettingsOpen, setIsSettingsOpen] = useState(false);
34740
34669
  const [isHeaderFooterOpen, setIsHeaderFooterOpen] = useState(false);
34741
34670
  const [autosaveEnabled, setAutosaveEnabled] = useState(true);
@@ -34767,6 +34696,14 @@ var PowerPointViewer = forwardRef(
34767
34696
  activeSlide,
34768
34697
  selectedElement
34769
34698
  } = state;
34699
+ useLoadNotifications({
34700
+ loading,
34701
+ error,
34702
+ slideCount: slides.length,
34703
+ canvasSize,
34704
+ onLoad,
34705
+ onError
34706
+ });
34770
34707
  const { pushColor } = useRecentColorsSync({
34771
34708
  setRecentColors: state.setRecentColors,
34772
34709
  setPresentationProperties: state.setPresentationProperties
@@ -35120,6 +35057,7 @@ ${url}`)
35120
35057
  isEncryptedDialogOpen,
35121
35058
  setIsEncryptedDialogOpen,
35122
35059
  handlerRef,
35060
+ viewerApi,
35123
35061
  loadVersion
35124
35062
  } = useViewerIntegration({
35125
35063
  transformCommittedText: (text) => applyAutoCorrect(text, viewerOptions.proofing),
@@ -35219,6 +35157,7 @@ ${url}`)
35219
35157
  themeColorMap: themeColorMapValue,
35220
35158
  handlerRef,
35221
35159
  editable: canEdit && (mode === "edit" || mode === "master"),
35160
+ tableEditorState: state.tableEditorState,
35222
35161
  updateElementById: editorOps.ops.updateElementById,
35223
35162
  updateThemeColorScheme: themeHandlers.handleUpdateThemeColorScheme,
35224
35163
  updateThemeFontScheme: themeHandlers.handleUpdateThemeFontScheme
@@ -35350,6 +35289,20 @@ ${url}`)
35350
35289
  collaboration: Boolean(collaboration),
35351
35290
  locales: resolvedLocales.length > 1
35352
35291
  };
35292
+ const selectionKey = state.effectiveSelectedIds.join("\0");
35293
+ const regionBase = useMemo(
35294
+ () => ({
35295
+ viewer: viewerApi,
35296
+ mode,
35297
+ canEdit,
35298
+ activeSlideIndex,
35299
+ slideCount: slides.length,
35300
+ selectedElementIds: [...state.effectiveSelectedIds],
35301
+ locale: localeCode
35302
+ }),
35303
+ // oxlint-disable-next-line react-hooks/exhaustive-deps -- selectionKey stands for the ids
35304
+ [viewerApi, mode, canEdit, activeSlideIndex, slides.length, selectionKey, localeCode]
35305
+ );
35353
35306
  const viewerContent = /* @__PURE__ */ jsxs(
35354
35307
  "div",
35355
35308
  {
@@ -35420,7 +35373,7 @@ ${url}`)
35420
35373
  isAiPanelOpen: aiPanel.isOpen,
35421
35374
  onToggleAiPanel: aiPanel.toggle,
35422
35375
  isProtectedView,
35423
- onEnableEditing: hostCanEdit ? handleEnableEditing : void 0,
35376
+ onEnableEditing: hostCanEdit && isEditingAllowed(customizationResolved) ? handleEnableEditing : void 0,
35424
35377
  onSetSnapToGrid: viewPreferencesSync.handleSetSnapToGrid,
35425
35378
  onSetSnapToShape: viewPreferencesSync.handleSetSnapToShape,
35426
35379
  onSetShowGuides: viewPreferencesSync.handleSetShowGuides
@@ -35584,7 +35537,7 @@ ${url}`)
35584
35537
  /* @__PURE__ */ jsx(
35585
35538
  PasteSpecialDialog,
35586
35539
  {
35587
- isOpen: editorOps.pasteSpecial.isPasteSpecialDialogOpen,
35540
+ isOpen: editorOps.pasteSpecial.isPasteSpecialDialogOpen && isDialogAvailable(customizationResolved, "pasteSpecial"),
35588
35541
  onCancel: editorOps.pasteSpecial.closePasteSpecialDialog,
35589
35542
  onConfirm: (format) => {
35590
35543
  void editorOps.pasteSpecial.pasteWithFormat(format);
@@ -35753,7 +35706,7 @@ ${url}`)
35753
35706
  // Nothing previously provided it, so every one of those consumers was
35754
35707
  // silently reading `DEFAULT_VIEWER_OPTIONS` forever, no matter what
35755
35708
  // the user changed in the Options dialog.
35756
- /* @__PURE__ */ jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsx(RibbonAddInsContext.Provider, { value: ribbonAddIns ?? NO_RIBBON_ADD_INS, children: /* @__PURE__ */ jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsx(Rendering3DFlagsContext.Provider, { value: effective3D, children: /* @__PURE__ */ jsx(ViewerThemeProvider, { theme: effectiveTheme, children: /* @__PURE__ */ jsxs(
35709
+ /* @__PURE__ */ jsx(ViewerOptionsProvider, { options: viewerOptions, store: optionsStore, children: /* @__PURE__ */ jsx(ViewerCustomizationContext.Provider, { value: customizationResolved, children: /* @__PURE__ */ jsx(ViewerRegionBaseContext.Provider, { value: regionBase, children: /* @__PURE__ */ jsx(RibbonAddInsContext.Provider, { value: ribbonAddIns ?? NO_RIBBON_ADD_INS, children: /* @__PURE__ */ jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsx(Rendering3DFlagsContext.Provider, { value: effective3D, children: /* @__PURE__ */ jsx(ViewerThemeProvider, { theme: effectiveTheme, children: /* @__PURE__ */ jsxs(
35757
35710
  CollaborationProvider,
35758
35711
  {
35759
35712
  config: collaboration,
@@ -35806,7 +35759,7 @@ ${url}`)
35806
35759
  /* @__PURE__ */ jsx(ShapeFormatContext.Provider, { value: shapeFormat, children: /* @__PURE__ */ jsx(RibbonGalleryCommandsContext.Provider, { value: ribbonGalleries, children: viewerContent }) })
35807
35760
  ]
35808
35761
  }
35809
- ) }) }) }) }) }) })
35762
+ ) }) }) }) }) }) }) })
35810
35763
  );
35811
35764
  }
35812
35765
  );