pptx-react-viewer 1.20.0 → 1.22.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 (102) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +14 -13
  3. package/dist/{Model3DScene-BLUWY36S.js → Model3DScene-3YB3JAJS.js} +2 -2
  4. package/dist/{Model3DScene-BLUWY36S.js.br → Model3DScene-3YB3JAJS.js.br} +0 -0
  5. package/dist/Model3DScene-3YB3JAJS.js.gz +0 -0
  6. package/dist/{Model3DScene-RYHVTFOT.mjs → Model3DScene-NLUSXHD6.mjs} +1 -1
  7. package/dist/Model3DScene-NLUSXHD6.mjs.br +0 -0
  8. package/dist/Model3DScene-NLUSXHD6.mjs.gz +0 -0
  9. package/dist/{PowerPointViewer-C4d7SKZf.d.ts → PowerPointViewer-WGVR_u4z.d.ts} +2 -2
  10. package/dist/PowerPointViewer-WGVR_u4z.d.ts.map +1 -0
  11. package/dist/{SurfaceChart3DScene-BW2YTOPQ.js → SurfaceChart3DScene-PUQ5DCO5.js} +2 -2
  12. package/dist/{SurfaceChart3DScene-BW2YTOPQ.js.br → SurfaceChart3DScene-PUQ5DCO5.js.br} +0 -0
  13. package/dist/SurfaceChart3DScene-PUQ5DCO5.js.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-U6QOMUJF.mjs → SurfaceChart3DScene-YBMJQGH3.mjs} +1 -1
  15. package/dist/{SurfaceChart3DScene-U6QOMUJF.mjs.br → SurfaceChart3DScene-YBMJQGH3.mjs.br} +0 -0
  16. package/dist/SurfaceChart3DScene-YBMJQGH3.mjs.gz +0 -0
  17. package/dist/{chunk-GG2KBJSN.mjs → chunk-5SBQZEKD.mjs} +187 -1
  18. package/dist/chunk-5SBQZEKD.mjs.br +0 -0
  19. package/dist/chunk-5SBQZEKD.mjs.gz +0 -0
  20. package/dist/{chunk-TUVSZMLW.mjs → chunk-7P7QQGTI.mjs} +487 -184
  21. package/dist/chunk-7P7QQGTI.mjs.br +0 -0
  22. package/dist/chunk-7P7QQGTI.mjs.gz +0 -0
  23. package/dist/{chunk-KRK367H5.js → chunk-A6IFTYB5.js} +1166 -863
  24. package/dist/chunk-A6IFTYB5.js.br +0 -0
  25. package/dist/chunk-A6IFTYB5.js.gz +0 -0
  26. package/dist/{chunk-UDJHJM5B.mjs → chunk-DZUI64SO.mjs} +13 -4
  27. package/dist/chunk-DZUI64SO.mjs.br +0 -0
  28. package/dist/chunk-DZUI64SO.mjs.gz +0 -0
  29. package/dist/{chunk-4LPWBQTH.mjs → chunk-E3KJKCSV.mjs} +7 -1
  30. package/dist/chunk-E3KJKCSV.mjs.br +0 -0
  31. package/dist/{chunk-4LPWBQTH.mjs.gz → chunk-E3KJKCSV.mjs.gz} +0 -0
  32. package/dist/{chunk-LXUMBK2O.js → chunk-QVQTDWB7.js} +409 -398
  33. package/dist/chunk-QVQTDWB7.js.br +0 -0
  34. package/dist/chunk-QVQTDWB7.js.gz +0 -0
  35. package/dist/{chunk-BXACB3BG.js → chunk-VSNXVKJI.js} +201 -0
  36. package/dist/chunk-VSNXVKJI.js.br +0 -0
  37. package/dist/chunk-VSNXVKJI.js.gz +0 -0
  38. package/dist/{chunk-4SRCC7NB.js → chunk-ZISXRMDJ.js} +7 -0
  39. package/dist/chunk-ZISXRMDJ.js.br +0 -0
  40. package/dist/{chunk-4SRCC7NB.js.gz → chunk-ZISXRMDJ.js.gz} +0 -0
  41. package/dist/hooks-unstable.d.ts +51 -2
  42. package/dist/hooks-unstable.d.ts.map +1 -1
  43. package/dist/hooks-unstable.js +82 -74
  44. package/dist/hooks-unstable.js.br +0 -0
  45. package/dist/hooks-unstable.js.gz +0 -0
  46. package/dist/hooks-unstable.mjs +3 -3
  47. package/dist/hooks-unstable.mjs.br +0 -0
  48. package/dist/hooks-unstable.mjs.gz +0 -0
  49. package/dist/i18n.d.ts +18 -2
  50. package/dist/i18n.js +7 -3
  51. package/dist/i18n.js.br +0 -0
  52. package/dist/i18n.js.gz +0 -0
  53. package/dist/i18n.mjs +1 -1
  54. package/dist/i18n.mjs.br +0 -0
  55. package/dist/i18n.mjs.gz +0 -0
  56. package/dist/index-SUL_8gq8.d.ts +43 -0
  57. package/dist/index-SUL_8gq8.d.ts.map +1 -0
  58. package/dist/{index-DmHVR48M.d.ts → index-ntF3kHHU.d.ts} +2 -2
  59. package/dist/{index-DmHVR48M.d.ts.map → index-ntF3kHHU.d.ts.map} +1 -1
  60. package/dist/index.d.ts +196 -2
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +70 -18
  63. package/dist/index.js.br +0 -0
  64. package/dist/index.js.gz +0 -0
  65. package/dist/index.mjs +4 -4
  66. package/dist/index.mjs.br +0 -0
  67. package/dist/index.mjs.gz +0 -0
  68. package/dist/pptx-viewer.css +1 -1
  69. package/dist/pptx-viewer.css.br +0 -0
  70. package/dist/pptx-viewer.css.gz +0 -0
  71. package/dist/{types-BK7Nt13M.d.ts → types-Cdh0XYcS.d.ts} +66 -3
  72. package/dist/types-Cdh0XYcS.d.ts.map +1 -0
  73. package/dist/viewer/index.d.ts +122 -0
  74. package/dist/viewer/index.js +20 -20
  75. package/dist/viewer/index.js.br +0 -0
  76. package/dist/viewer/index.js.gz +0 -0
  77. package/dist/viewer/index.mjs +4 -4
  78. package/dist/viewer/index.mjs.br +0 -0
  79. package/dist/viewer/index.mjs.gz +0 -0
  80. package/package.json +1 -1
  81. package/dist/Model3DScene-BLUWY36S.js.gz +0 -0
  82. package/dist/Model3DScene-RYHVTFOT.mjs.br +0 -0
  83. package/dist/Model3DScene-RYHVTFOT.mjs.gz +0 -0
  84. package/dist/PowerPointViewer-C4d7SKZf.d.ts.map +0 -1
  85. package/dist/SurfaceChart3DScene-BW2YTOPQ.js.gz +0 -0
  86. package/dist/SurfaceChart3DScene-U6QOMUJF.mjs.gz +0 -0
  87. package/dist/chunk-4LPWBQTH.mjs.br +0 -0
  88. package/dist/chunk-4SRCC7NB.js.br +0 -0
  89. package/dist/chunk-BXACB3BG.js.br +0 -0
  90. package/dist/chunk-BXACB3BG.js.gz +0 -0
  91. package/dist/chunk-GG2KBJSN.mjs.br +0 -0
  92. package/dist/chunk-GG2KBJSN.mjs.gz +0 -0
  93. package/dist/chunk-KRK367H5.js.br +0 -0
  94. package/dist/chunk-KRK367H5.js.gz +0 -0
  95. package/dist/chunk-LXUMBK2O.js.br +0 -0
  96. package/dist/chunk-LXUMBK2O.js.gz +0 -0
  97. package/dist/chunk-TUVSZMLW.mjs.br +0 -0
  98. package/dist/chunk-TUVSZMLW.mjs.gz +0 -0
  99. package/dist/chunk-UDJHJM5B.mjs.br +0 -0
  100. package/dist/chunk-UDJHJM5B.mjs.gz +0 -0
  101. package/dist/i18n.d.ts.map +0 -1
  102. package/dist/types-BK7Nt13M.d.ts.map +0 -1
@@ -1,11 +1,11 @@
1
- import { DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, MIN_ELEMENT_SIZE, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, SHAPE_PRESETS, ANIMATION_PRESET_OPTIONS, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useYjsDocumentSync, useFollowMode, useBroadcastFollower, DEFAULT_FILL_COLOR, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getCropShapeClipPath, resolvePalette, resolveStyle, layoutToCategory, wrapChrome, isImageTiled, getImageTilingStyle, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, buildTextBody3DSceneStyle, SLIDE_TRANSITION_OPTIONS, SLIDE_NAV_THUMBNAIL_WIDTH, useKeyboardInsets, useModalDismissDrag, SHORTCUT_REFERENCE_ITEMS, useCollaborativeState, styleShadow, styleStroke, colour, fitFontSize, smartArtNodeGroupProps, chevronPoints, SmartArtNodeText, truncate, renderStepDownProcess, renderAlternatingFlow, renderDescendingProcess, renderPictureAccentList, renderVerticalBlockList, renderGroupedList, renderPyramidList, renderHorizontalPictureList, renderAccentProcess, renderVerticalChevronList, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, TOOLBAR_SECTIONS, useVirtualizedSlides, useSwipeNavigation, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, buildTree, treeWidth, treeDepth, nodeOpacity, gearPath, resolveSmartArtDataPalette, HYPERLINK_COLOR, GRID_SIZE, startPreviewAnimation, stopPreviewAnimation } from './chunk-UDJHJM5B.mjs';
2
- import { normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, getElementTransform, isEditableTextElement, getAriaRole, getAriaLabel, getAriaRoleDescription, getImageEffectsOpacity, getImageEffectsFilter, getElementTransformWithoutRotation, ACTION_BUTTON_PRESETS, getElementLabel, RULER_THICKNESS, RULER_FONT_SIZE, convertLatexToOmml, convertOmmlToMathMl, sanitizeMathMl, buildUserFontFaceStyles, openPptxFile, readBackstageRecentFile, buildCssGradientFromShapeStyle, buildSmartArtA11y, buildSummaryZoomView, getImageColorWashStyle, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, formatAxisValue, hasPressureVariation, getInkReplayStyles, INK_REPLAY_KEYFRAMES, resolveInkColor, resolveInkWidth, resolveInkOpacity, pressuresToWidths, getContentPartReplayStyles, resolveOleType, getOleTypeColor, getOleTypeLabel, shouldUseSvgWarp, themeToCssVars, DEFAULT_INSERT_CHART_TYPE, hasCopyableFormat, createBackstagePresentation, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, resolveDrawingShapeNodeId, getImageSvgFilters, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, findChartPartTarget, dragValueForPart, withChartPointValue, dragAnchorViewY, withChartTitle, computeSmartArtLayout, buildSmartArt3DModel, extractPathPoints, generatePressureCircles, isBrowserOpenableMime, formatBytes, getOleBadgeLabel, openUrlInNewTab, getWarpPath, getSlideBackgroundStyle, filterCommands, resolveTitleBarStatusKey, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, safeOpenUrl, isPpactionUrl, parsePpactionUrl, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, clampPercent, HANDOUT_OPTIONS, activateModalFocus, buildCollaborationShareUrl, presentationInkPath, mobileElapsedSince, isFirstSlide, isLastSlide, formatMobileElapsed, mobileSlideCounter, formatElapsed, computeInlineEditorRect, findSmartArtNodeText, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, groupIntoParagraphs, substituteFieldText, TAB_ROW_ACTION_CLASSES, listBackstageRecentFiles, BACKSTAGE_NAV, INSERT_CHART_TYPES, SLIDE_VIRTUALIZATION_THRESHOLD, getShapeAdjustmentHandleDescriptor, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, formatSlideCounter, isUrlSafe, computeHandoutLayout, getPrintableArea, generateNoteLineCount, computeAllNotesPages, getNotesPrintableArea, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, getConnectionSites, generateTicks, getCommentMarkerPosition, buildThemeColorGrid, THEME_COLOR_LABELS, buildSmartArtPresetData, TABLE_STYLE_PRESETS, formatCommentTimestamp, DIRECTIONAL_PRESETS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, DUOTONE_PRESETS, ARTISTIC_EFFECTS, LBL, SEL, FILL_MODE_OPTIONS, SECTION_HEADING, NUM, GRADIENT_TYPE_OPTIONS, PATTERN_OPTIONS } from './chunk-GG2KBJSN.mjs';
3
- import { translationsEn } from './chunk-4LPWBQTH.mjs';
1
+ import { DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, MIN_ELEMENT_SIZE, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, SHAPE_PRESETS, ANIMATION_PRESET_OPTIONS, useReducedMotion, useViewerState, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useYjsDocumentSync, useFollowMode, useBroadcastFollower, DEFAULT_FILL_COLOR, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getCropShapeClipPath, resolvePalette, resolveStyle, layoutToCategory, wrapChrome, isImageTiled, getImageTilingStyle, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, buildTextBody3DSceneStyle, SLIDE_TRANSITION_OPTIONS, SLIDE_NAV_THUMBNAIL_WIDTH, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, SHORTCUT_REFERENCE_ITEMS, useCollaborativeState, styleShadow, styleStroke, colour, fitFontSize, smartArtNodeGroupProps, chevronPoints, SmartArtNodeText, truncate, renderStepDownProcess, renderAlternatingFlow, renderDescendingProcess, renderPictureAccentList, renderVerticalBlockList, renderGroupedList, renderPyramidList, renderHorizontalPictureList, renderAccentProcess, renderVerticalChevronList, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, TOOLBAR_SECTIONS, useVirtualizedSlides, useSwipeNavigation, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, buildTree, treeWidth, treeDepth, nodeOpacity, gearPath, resolveSmartArtDataPalette, HYPERLINK_COLOR, GRID_SIZE, startPreviewAnimation, stopPreviewAnimation } from './chunk-DZUI64SO.mjs';
2
+ import { normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, getElementTransform, isEditableTextElement, getAriaRole, getAriaLabel, getAriaRoleDescription, getImageEffectsOpacity, getImageEffectsFilter, getElementTransformWithoutRotation, ACTION_BUTTON_PRESETS, getElementLabel, RULER_THICKNESS, RULER_FONT_SIZE, convertLatexToOmml, convertOmmlToMathMl, sanitizeMathMl, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, buildCssGradientFromShapeStyle, buildSmartArtA11y, buildSummaryZoomView, getImageColorWashStyle, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, formatAxisValue, hasPressureVariation, getInkReplayStyles, INK_REPLAY_KEYFRAMES, resolveInkColor, resolveInkWidth, resolveInkOpacity, pressuresToWidths, getContentPartReplayStyles, resolveOleType, getOleTypeColor, getOleTypeLabel, shouldUseSvgWarp, themeToCssVars, DEFAULT_INSERT_CHART_TYPE, hasCopyableFormat, createBackstagePresentation, SETTING_TOGGLES, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, resolveDrawingShapeNodeId, getImageSvgFilters, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, findChartPartTarget, dragValueForPart, withChartPointValue, dragAnchorViewY, withChartTitle, computeSmartArtLayout, buildSmartArt3DModel, extractPathPoints, generatePressureCircles, isBrowserOpenableMime, formatBytes, getOleBadgeLabel, openUrlInNewTab, getWarpPath, getSlideBackgroundStyle, filterCommands, resolveTitleBarStatusKey, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, safeOpenUrl, isPpactionUrl, parsePpactionUrl, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, clampPercent, HANDOUT_OPTIONS, activateModalFocus, buildCollaborationShareUrl, presentationInkPath, mobileElapsedSince, isFirstSlide, isLastSlide, formatMobileElapsed, mobileSlideCounter, formatElapsed, computeInlineEditorRect, findSmartArtNodeText, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, groupIntoParagraphs, substituteFieldText, TAB_ROW_ACTION_CLASSES, listBackstageRecentFiles, BACKSTAGE_NAV, INSERT_CHART_TYPES, SLIDE_VIRTUALIZATION_THRESHOLD, getShapeAdjustmentHandleDescriptor, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, formatSlideCounter, isUrlSafe, computeHandoutLayout, getPrintableArea, generateNoteLineCount, computeAllNotesPages, getNotesPrintableArea, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, getConnectionSites, generateTicks, getCommentMarkerPosition, buildThemeColorGrid, THEME_COLOR_LABELS, buildSmartArtPresetData, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, TABLE_STYLE_PRESETS, formatCommentTimestamp, DIRECTIONAL_PRESETS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, DUOTONE_PRESETS, ARTISTIC_EFFECTS, LBL, SEL, FILL_MODE_OPTIONS, SECTION_HEADING, NUM, GRADIENT_TYPE_OPTIONS, PATTERN_OPTIONS } from './chunk-5SBQZEKD.mjs';
3
+ import { LOCALE_CATALOG, translationsEn } from './chunk-E3KJKCSV.mjs';
4
4
  import { hasShapeProperties, hasTextProperties, isInkElement, SWITCHABLE_LAYOUT_TYPES, isImageLikeElement, getLinkedTextBoxSegments, getSubstituteFontFamily, themeColorSchemesEqual, setSmartArtNodeStyle, updateSmartArtNodeText, THEME_COLOR_SCHEME_KEYS, chartDataChangeType, chartDataUpdatePoint, chartDataAddCategory, chartDataRemoveCategory, chartDataAddSeries, chartDataRemoveSeries, setChartAxisLogScale, setChartAxisTitleStyle, setChartAxisGridlineStyle, setChartSeriesMarker, setChartSeriesChartType, setChartDataPointFill, setChartDataPointExplosion, setChartDataPointMarker, setChartDataPointLabel, getOleObjectTypeLabel, pptxActionToElementAction, applyThemeOverrideToSlide, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, addSmartArtNodeAsChild, removeSmartArtNode, elementActionToPptxAction, switchSmartArtLayout, addSmartArtNode, demoteSmartArtNode, promoteSmartArtNode, reorderSmartArtNode } from './chunk-3ZGCM6RC.mjs';
5
5
  import React14, { createContext, useMemo, useState, useCallback, forwardRef, useEffect, useRef, Suspense, useLayoutEffect, useContext, useDeferredValue } from 'react';
6
6
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
7
7
  import { useTranslation } from 'react-i18next';
8
- import { LuRotateCw, LuMessageSquare, LuEyeOff, LuSettings, LuX, LuCalendarDays, LuHash, LuText, LuCast, LuSave, LuUndo, LuRedo, LuSearch, LuShieldCheck, LuPlus, LuPanelLeftClose, LuStickyNote, LuMonitor, LuColumns2, LuPresentation, LuMinus, LuLayers, LuSettings2, LuClock, LuDownload, LuTrash2, LuCheck, LuLock, LuEye, LuFileText, LuType, LuLoader, LuShieldAlert, LuSignature, LuInfo, LuTriangleAlert, LuPrinter, LuPenTool, LuWifi, LuWifiOff, LuUsers, LuCopy, LuChevronLeft, LuChevronRight, LuPlay, LuPause, LuMenu, LuShare2, LuPanelLeft, LuPanelRight, LuArrowLeft, LuFolderOpen, LuPackage, LuFileImage, LuVideo, LuBox, LuClipboardPaste, LuScissors, LuPaintbrush, LuChevronDown, LuSquare, LuImage, LuDatabase, LuAArrowUp, LuAArrowDown, LuRemoveFormatting, LuHighlighter, LuList, LuListOrdered, LuIndentDecrease, LuIndentIncrease, LuReplace, LuMousePointer2, LuShapes, LuPaintBucket, LuPenLine, LuSparkles, LuChevronUp, LuPalette, LuPencil, LuStar, LuMoveRight, LuMousePointerClick, LuClock3, LuMonitorPlay, LuListVideo, LuCaptions, LuCamera, LuEraser, LuRotateCcw, LuCircleHelp, LuSpellCheck, LuBookOpen, LuLanguages, LuGlobe, LuGitCompare, LuMessageSquarePlus, LuLockKeyhole, LuPanelTop, LuLayoutGrid, LuGrid3X3, LuPipette, LuRuler, LuZoomIn, LuMaximize2, LuCode, LuCaseSensitive, LuTimer, LuGripVertical, LuUpload, LuBold, LuItalic, LuUnderline, LuStrikethrough, LuLink, LuGrid2X2, LuCopyPlus, LuCirclePlay, LuCirclePause, LuZoomOut, LuScan, LuMonitorOff, LuClipboardCopy, LuWand, LuTextCursorInput, LuFile, LuEllipsis, LuUserRound, LuFilePlus2, LuHouse, LuFolderPlus, LuAlignLeft, LuAlignCenter, LuAlignRight, LuAlignJustify, LuColumns3, LuSpline, LuAlignHorizontalSpaceAround, LuAlignVerticalSpaceAround, LuMove, LuRadio, LuLockOpen, LuArrowDown, LuArrowUp, LuArrowRight, LuReply, LuBookmark } from 'react-icons/lu';
8
+ import { LuRotateCw, LuMessageSquare, LuEyeOff, LuSettings, LuX, LuCalendarDays, LuHash, LuText, LuCast, LuSave, LuUndo, LuRedo, LuSearch, LuShieldCheck, LuPlus, LuPanelLeftClose, LuStickyNote, LuMonitor, LuColumns2, LuPresentation, LuMinus, LuLayers, LuSettings2, LuClock, LuDownload, LuTrash2, LuCheck, LuLock, LuEye, LuFileText, LuType, LuLoader, LuShieldAlert, LuSignature, LuInfo, LuTriangleAlert, LuPrinter, LuPenTool, LuWifi, LuWifiOff, LuUsers, LuCopy, LuChevronLeft, LuChevronRight, LuPlay, LuPause, LuMenu, LuShare2, LuPanelLeft, LuPanelRight, LuArrowLeft, LuFolderOpen, LuPackage, LuFileImage, LuVideo, LuBox, LuClipboardPaste, LuScissors, LuPaintbrush, LuChevronDown, LuSquare, LuImage, LuDatabase, LuAArrowUp, LuAArrowDown, LuRemoveFormatting, LuHighlighter, LuList, LuListOrdered, LuIndentDecrease, LuIndentIncrease, LuReplace, LuMousePointer2, LuShapes, LuPaintBucket, LuPenLine, LuSparkles, LuChevronUp, LuPalette, LuPencil, LuStar, LuMoveRight, LuMousePointerClick, LuClock3, LuMonitorPlay, LuListVideo, LuCaptions, LuCamera, LuEraser, LuRotateCcw, LuCircleHelp, LuSpellCheck, LuBookOpen, LuLanguages, LuGlobe, LuGitCompare, LuMessageSquarePlus, LuLockKeyhole, LuPanelTop, LuLayoutGrid, LuGrid3X3, LuPipette, LuRuler, LuZoomIn, LuMaximize2, LuCode, LuCaseSensitive, LuTimer, LuGripVertical, LuUpload, LuBold, LuItalic, LuUnderline, LuStrikethrough, LuLink, LuGrid2X2, LuCopyPlus, LuCirclePlay, LuCirclePause, LuZoomOut, LuScan, LuMonitorOff, LuClipboardCopy, LuWand, LuTextCursorInput, LuFile, LuEllipsis, LuUserRound, LuFilePlus2, LuHouse, LuUser, LuHardDrive, LuLogIn, LuFolderPlus, LuAlignLeft, LuAlignCenter, LuAlignRight, LuAlignJustify, LuColumns3, LuSpline, LuAlignHorizontalSpaceAround, LuAlignVerticalSpaceAround, LuMove, LuRadio, LuLockOpen, LuArrowDown, LuArrowUp, LuArrowRight, LuReply, LuBookmark } from 'react-icons/lu';
9
9
 
10
10
  var ViewerThemeContext = createContext(void 0);
11
11
  function ViewerThemeProvider({ theme, children }) {
@@ -700,7 +700,10 @@ function StatusBar({
700
700
  mode,
701
701
  onSetMode,
702
702
  onToggleSlideSorter,
703
- collaborationSlot
703
+ collaborationSlot,
704
+ hideZoomControls = false,
705
+ hideNotesToggle = false,
706
+ hideFullscreenToggle = false
704
707
  }) {
705
708
  const { t } = useTranslation();
706
709
  let statusText;
@@ -737,7 +740,7 @@ function StatusBar({
737
740
  }
738
741
  ),
739
742
  /* @__PURE__ */ jsx("div", { className: "flex-1" }),
740
- onToggleNotes && /* @__PURE__ */ jsxs(
743
+ onToggleNotes && !hideNotesToggle && /* @__PURE__ */ jsxs(
741
744
  "button",
742
745
  {
743
746
  type: "button",
@@ -779,7 +782,7 @@ function StatusBar({
779
782
  children: /* @__PURE__ */ jsx(LuColumns2, { className: "w-3.5 h-3.5" })
780
783
  }
781
784
  ),
782
- /* @__PURE__ */ jsx(
785
+ !hideFullscreenToggle && /* @__PURE__ */ jsx(
783
786
  "button",
784
787
  {
785
788
  type: "button",
@@ -795,7 +798,7 @@ function StatusBar({
795
798
  /* @__PURE__ */ jsx("div", { className: "w-px h-3 bg-border/40 mx-0.5" }),
796
799
  collaborationSlot
797
800
  ] }),
798
- scale !== void 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
801
+ scale !== void 0 && !hideZoomControls && /* @__PURE__ */ jsxs(Fragment, { children: [
799
802
  /* @__PURE__ */ jsx("div", { className: "w-px h-3 bg-border/60 mx-0.5" }),
800
803
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5", children: [
801
804
  onZoomOut && /* @__PURE__ */ jsx(
@@ -2829,7 +2832,7 @@ function FailedToLoad() {
2829
2832
  var LazyModel3DScene = React14.lazy(
2830
2833
  async () => {
2831
2834
  try {
2832
- return await import('./Model3DScene-RYHVTFOT.mjs');
2835
+ return await import('./Model3DScene-NLUSXHD6.mjs');
2833
2836
  } catch {
2834
2837
  return { default: FailedToLoad };
2835
2838
  }
@@ -13122,6 +13125,139 @@ function DrawSection(p) {
13122
13125
  ] })
13123
13126
  ] });
13124
13127
  }
13128
+ var AccountAuthContext = createContext(void 0);
13129
+ var cardClass = "border border-border bg-card p-6 text-card-foreground";
13130
+ function AccountPage() {
13131
+ const { t } = useTranslation();
13132
+ const accountAuth = useContext(AccountAuthContext);
13133
+ const [profile, setProfile] = useState(
13134
+ () => readStoredViewerPrefs().profile ?? DEFAULT_VIEWER_PROFILE
13135
+ );
13136
+ const updateProfile = (patch) => {
13137
+ const next = { ...profile, ...patch };
13138
+ setProfile(next);
13139
+ saveViewerProfile(next);
13140
+ };
13141
+ const [usage, setUsage] = useState(null);
13142
+ const [cleared, setCleared] = useState(false);
13143
+ const refreshUsage = () => {
13144
+ void getLocalStorageUsageSummary().then(setUsage);
13145
+ };
13146
+ useEffect(refreshUsage, []);
13147
+ const handleClear = () => {
13148
+ if (!window.confirm(t("pptx.account.storage.clearConfirm"))) {
13149
+ return;
13150
+ }
13151
+ void clearAllLocalViewerData().then(() => {
13152
+ setCleared(true);
13153
+ refreshUsage();
13154
+ setTimeout(() => setCleared(false), 4e3);
13155
+ return void 0;
13156
+ });
13157
+ };
13158
+ const version = "1.21.0" ;
13159
+ return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
13160
+ /* @__PURE__ */ jsxs("section", { className: cardClass, children: [
13161
+ /* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
13162
+ /* @__PURE__ */ jsx(LuUser, { className: "text-primary" }),
13163
+ " ",
13164
+ t("pptx.account.profile.title")
13165
+ ] }),
13166
+ /* @__PURE__ */ jsxs("div", { className: "mt-4 flex items-center gap-4", children: [
13167
+ /* @__PURE__ */ jsx(
13168
+ "span",
13169
+ {
13170
+ className: "grid size-14 shrink-0 place-items-center rounded-full text-xl font-semibold text-white",
13171
+ style: { background: profile.avatarColor },
13172
+ children: resolveProfileInitial(profile)
13173
+ }
13174
+ ),
13175
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
13176
+ /* @__PURE__ */ jsx("label", { htmlFor: "pptx-account-name", className: "text-xs text-muted-foreground", children: t("pptx.account.profile.nameLabel") }),
13177
+ /* @__PURE__ */ jsx(
13178
+ "input",
13179
+ {
13180
+ id: "pptx-account-name",
13181
+ type: "text",
13182
+ value: profile.displayName,
13183
+ onChange: (e) => updateProfile({ displayName: e.target.value }),
13184
+ placeholder: t("pptx.account.profile.namePlaceholder"),
13185
+ className: "mt-1 h-9 w-full border border-input bg-background px-3 text-sm outline-none focus:border-ring"
13186
+ }
13187
+ )
13188
+ ] })
13189
+ ] }),
13190
+ /* @__PURE__ */ jsx("p", { className: "mt-4 text-xs text-muted-foreground", children: t("pptx.account.profile.avatarColorLabel") }),
13191
+ /* @__PURE__ */ jsx("div", { className: "mt-2 flex gap-2", children: AVATAR_COLOR_SWATCHES.map((color) => /* @__PURE__ */ jsx(
13192
+ "button",
13193
+ {
13194
+ type: "button",
13195
+ "aria-label": color,
13196
+ "aria-pressed": profile.avatarColor === color,
13197
+ onClick: () => updateProfile({ avatarColor: color }),
13198
+ className: cn(
13199
+ "size-7 rounded-full border-2 transition-transform",
13200
+ profile.avatarColor === color ? "border-foreground scale-110" : "border-transparent hover:scale-105"
13201
+ ),
13202
+ style: { background: color }
13203
+ },
13204
+ color
13205
+ )) })
13206
+ ] }),
13207
+ /* @__PURE__ */ jsxs("section", { className: cardClass, children: [
13208
+ /* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
13209
+ /* @__PURE__ */ jsx(LuHardDrive, { className: "text-primary" }),
13210
+ " ",
13211
+ t("pptx.account.storage.title")
13212
+ ] }),
13213
+ /* @__PURE__ */ jsx("p", { className: "mt-3 text-sm text-muted-foreground", children: usage && usage.presentationCount > 0 ? t("pptx.account.storage.usage", {
13214
+ count: usage.presentationCount,
13215
+ size: formatBackstageSize(usage.totalBytes)
13216
+ }) : t("pptx.account.storage.usageEmpty") }),
13217
+ /* @__PURE__ */ jsx("p", { className: "mt-3 text-xs leading-5 text-muted-foreground", children: t("pptx.account.storage.privacyBlurb") }),
13218
+ /* @__PURE__ */ jsx(
13219
+ "button",
13220
+ {
13221
+ type: "button",
13222
+ onClick: handleClear,
13223
+ className: "mt-4 border border-destructive/40 px-4 py-2 text-xs font-semibold text-destructive hover:bg-destructive/10",
13224
+ children: t("pptx.account.storage.clear")
13225
+ }
13226
+ ),
13227
+ cleared && /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-primary", children: t("pptx.account.storage.clearedNotice") })
13228
+ ] }),
13229
+ /* @__PURE__ */ jsxs("section", { className: cardClass, children: [
13230
+ /* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
13231
+ /* @__PURE__ */ jsx(LuInfo, { className: "text-primary" }),
13232
+ " ",
13233
+ t("pptx.account.about.title")
13234
+ ] }),
13235
+ /* @__PURE__ */ jsxs("p", { className: "mt-3 text-sm text-muted-foreground", children: [
13236
+ "pptx-react-viewer",
13237
+ ` \xB7 ${t("pptx.account.about.version", { version })}`
13238
+ ] })
13239
+ ] }),
13240
+ accountAuth?.enabled && /* @__PURE__ */ jsxs("section", { className: cardClass, children: [
13241
+ /* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
13242
+ /* @__PURE__ */ jsx(LuLogIn, { className: "text-primary" }),
13243
+ " ",
13244
+ t("pptx.account.signIn.title")
13245
+ ] }),
13246
+ accountAuth.signedInUser ? /* @__PURE__ */ jsx("p", { className: "mt-3 text-sm text-muted-foreground", children: t("pptx.account.signIn.signedInAs", { name: accountAuth.signedInUser.name }) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
13247
+ /* @__PURE__ */ jsx("p", { className: "mt-3 text-sm text-muted-foreground", children: t("pptx.account.signIn.description") }),
13248
+ /* @__PURE__ */ jsx(
13249
+ "button",
13250
+ {
13251
+ type: "button",
13252
+ onClick: accountAuth.onSignIn,
13253
+ className: "mt-4 bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground hover:opacity-90",
13254
+ children: t("pptx.account.signIn.button")
13255
+ }
13256
+ )
13257
+ ] })
13258
+ ] })
13259
+ ] });
13260
+ }
13125
13261
  var ICONS = {
13126
13262
  home: LuHouse,
13127
13263
  new: LuFilePlus2,
@@ -13209,6 +13345,8 @@ function FileSection(p) {
13209
13345
  const [page, setPage] = useState("home");
13210
13346
  const [query, setQuery] = useState("");
13211
13347
  const [recent, setRecent] = useState([]);
13348
+ const { isHidden } = useToolbarVisibility(p.hiddenActions);
13349
+ const exportHidden = isHidden("export");
13212
13350
  useEffect(() => {
13213
13351
  void listBackstageRecentFiles().then(setRecent);
13214
13352
  }, []);
@@ -13243,7 +13381,9 @@ function FileSection(p) {
13243
13381
  }
13244
13382
  ),
13245
13383
  /* @__PURE__ */ jsxs("nav", { className: "flex min-h-0 flex-1 flex-col py-2", children: [
13246
- BACKSTAGE_NAV.filter((item) => !item.group).map((item) => /* @__PURE__ */ jsxs(
13384
+ BACKSTAGE_NAV.filter(
13385
+ (item) => !item.group && !(item.id === "export" && exportHidden)
13386
+ ).map((item) => /* @__PURE__ */ jsxs(
13247
13387
  "button",
13248
13388
  {
13249
13389
  type: "button",
@@ -13390,7 +13530,7 @@ function FileSection(p) {
13390
13530
  }
13391
13531
  )
13392
13532
  ] }),
13393
- page === "export" && /* @__PURE__ */ jsxs("div", { className: "mt-8 grid max-w-[900px] grid-cols-2 gap-5", children: [
13533
+ page === "export" && !exportHidden && /* @__PURE__ */ jsxs("div", { className: "mt-8 grid max-w-[900px] grid-cols-2 gap-5", children: [
13394
13534
  /* @__PURE__ */ jsx(
13395
13535
  BackstageAction,
13396
13536
  {
@@ -13466,16 +13606,7 @@ function FileSection(p) {
13466
13606
  }
13467
13607
  )
13468
13608
  ] }),
13469
- page === "account" && /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] border border-border bg-card p-7 text-card-foreground", children: [
13470
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
13471
- /* @__PURE__ */ jsx("span", { className: "grid size-14 place-items-center rounded-full bg-primary text-xl font-semibold text-primary-foreground", children: "P" }),
13472
- /* @__PURE__ */ jsxs("div", { children: [
13473
- /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold", children: "PowerPoint Viewer" }),
13474
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Local-first presentation editing" })
13475
- ] })
13476
- ] }),
13477
- /* @__PURE__ */ jsx("p", { className: "mt-6 text-sm leading-6 text-muted-foreground", children: "Your presentations and recovery history stay in your browser unless you explicitly share or download them." })
13478
- ] }),
13609
+ page === "account" && /* @__PURE__ */ jsx(AccountPage, {}),
13479
13610
  page === "options" && /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[760px] border border-border bg-card p-7 text-card-foreground", children: [
13480
13611
  /* @__PURE__ */ jsx(LuSettings, { className: "text-3xl text-primary" }),
13481
13612
  /* @__PURE__ */ jsx("h2", { className: "mt-4 text-lg font-semibold", children: "PowerPoint Options" }),
@@ -14431,6 +14562,7 @@ function ReviewSection(p) {
14431
14562
  }
14432
14563
  function SlideShowSection(p) {
14433
14564
  const { t } = useTranslation();
14565
+ const { isHidden } = useToolbarVisibility(p.hiddenActions);
14434
14566
  return /* @__PURE__ */ jsxs(Fragment, { children: [
14435
14567
  /* @__PURE__ */ jsxs(RibbonGroup, { label: t("pptx.slideShow.start", { defaultValue: "Start Slide Show" }), children: [
14436
14568
  /* @__PURE__ */ jsx(
@@ -14470,7 +14602,7 @@ function SlideShowSection(p) {
14470
14602
  disabled: true
14471
14603
  }
14472
14604
  ),
14473
- /* @__PURE__ */ jsx(
14605
+ !isHidden("broadcast") && /* @__PURE__ */ jsx(
14474
14606
  RibbonCommand,
14475
14607
  {
14476
14608
  label: t("pptx.slideShow.broadcast"),
@@ -15614,8 +15746,9 @@ function MobileMenuSheet(props) {
15614
15746
  const { t } = useTranslation();
15615
15747
  const { open, onClose } = props;
15616
15748
  const [active, setActive] = useState("home");
15749
+ const { isTabVisible } = useToolbarVisibility(props.hiddenActions);
15617
15750
  return /* @__PURE__ */ jsx(MobileSheet, { open, onClose, autoHeight: true, title: t("pptx.mobileToolbar.menu"), children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
15618
- /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 bg-background border-b border-border", children: /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5 px-3 py-2", children: MENU_ITEMS.map(({ key, label, icon: Icon }) => /* @__PURE__ */ jsxs(
15751
+ /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 bg-background border-b border-border", children: /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5 px-3 py-2", children: MENU_ITEMS.filter(({ key }) => isTabVisible(key)).map(({ key, label, icon: Icon }) => /* @__PURE__ */ jsxs(
15619
15752
  "button",
15620
15753
  {
15621
15754
  type: "button",
@@ -15774,7 +15907,8 @@ function MobileSectionBody({
15774
15907
  onToggleSubtitles: p.onToggleSubtitles ?? (() => {
15775
15908
  }),
15776
15909
  showSubtitles: p.showSubtitles ?? false,
15777
- onSetMode: p.onSetMode
15910
+ onSetMode: p.onSetMode,
15911
+ hiddenActions: p.hiddenActions
15778
15912
  }
15779
15913
  ) });
15780
15914
  case "review":
@@ -15840,7 +15974,8 @@ function MobileSectionBody({
15840
15974
  onOpenDocumentProperties: p.onOpenDocumentProperties,
15841
15975
  onOpenPasswordProtection: p.onOpenPasswordProtection,
15842
15976
  onOpenFontEmbedding: p.onOpenFontEmbedding,
15843
- onOpenDigitalSignatures: p.onOpenDigitalSignatures
15977
+ onOpenDigitalSignatures: p.onOpenDigitalSignatures,
15978
+ hiddenActions: p.hiddenActions
15844
15979
  }
15845
15980
  ) });
15846
15981
  default:
@@ -15854,6 +15989,7 @@ function MobileToolbar(props) {
15854
15989
  const { t } = useTranslation();
15855
15990
  const { mode, canUndo, canRedo, onUndo, onRedo, onSetMode, onSaveAsPptx } = props;
15856
15991
  const [menuOpen, setMenuOpen] = useState(false);
15992
+ const { isHidden } = useToolbarVisibility(props.hiddenActions);
15857
15993
  const showEdit = mode === "edit" || mode === "master";
15858
15994
  const btn = "inline-flex items-center justify-center min-w-[44px] min-h-[44px] rounded-md text-foreground/80 hover:bg-accent/60 disabled:opacity-40 disabled:cursor-not-allowed active:scale-95 transition-transform";
15859
15995
  return /* @__PURE__ */ jsxs(
@@ -15874,32 +16010,30 @@ function MobileToolbar(props) {
15874
16010
  children: /* @__PURE__ */ jsx(LuMenu, { className: "w-5 h-5" })
15875
16011
  }
15876
16012
  ),
15877
- showEdit && /* @__PURE__ */ jsxs(Fragment, { children: [
15878
- /* @__PURE__ */ jsx(
15879
- "button",
15880
- {
15881
- type: "button",
15882
- onClick: onUndo,
15883
- disabled: !canUndo,
15884
- className: btn,
15885
- title: t("pptx.toolbar.undo"),
15886
- "aria-label": t("pptx.toolbar.undo"),
15887
- children: /* @__PURE__ */ jsx(LuUndo, { className: "w-5 h-5" })
15888
- }
15889
- ),
15890
- /* @__PURE__ */ jsx(
15891
- "button",
15892
- {
15893
- type: "button",
15894
- onClick: onRedo,
15895
- disabled: !canRedo,
15896
- className: btn,
15897
- title: t("pptx.toolbar.redo"),
15898
- "aria-label": t("pptx.toolbar.redo"),
15899
- children: /* @__PURE__ */ jsx(LuRedo, { className: "w-5 h-5" })
15900
- }
15901
- )
15902
- ] }),
16013
+ showEdit && !isHidden("undo") && /* @__PURE__ */ jsx(
16014
+ "button",
16015
+ {
16016
+ type: "button",
16017
+ onClick: onUndo,
16018
+ disabled: !canUndo,
16019
+ className: btn,
16020
+ title: t("pptx.toolbar.undo"),
16021
+ "aria-label": t("pptx.toolbar.undo"),
16022
+ children: /* @__PURE__ */ jsx(LuUndo, { className: "w-5 h-5" })
16023
+ }
16024
+ ),
16025
+ showEdit && !isHidden("redo") && /* @__PURE__ */ jsx(
16026
+ "button",
16027
+ {
16028
+ type: "button",
16029
+ onClick: onRedo,
16030
+ disabled: !canRedo,
16031
+ className: btn,
16032
+ title: t("pptx.toolbar.redo"),
16033
+ "aria-label": t("pptx.toolbar.redo"),
16034
+ children: /* @__PURE__ */ jsx(LuRedo, { className: "w-5 h-5" })
16035
+ }
16036
+ ),
15903
16037
  /* @__PURE__ */ jsx("div", { className: "flex-1" }),
15904
16038
  /* @__PURE__ */ jsx(
15905
16039
  "button",
@@ -15912,7 +16046,7 @@ function MobileToolbar(props) {
15912
16046
  children: /* @__PURE__ */ jsx(LuDownload, { className: "w-5 h-5" })
15913
16047
  }
15914
16048
  ),
15915
- /* @__PURE__ */ jsx(
16049
+ !isHidden("fullscreen") && /* @__PURE__ */ jsx(
15916
16050
  "button",
15917
16051
  {
15918
16052
  type: "button",
@@ -15923,7 +16057,7 @@ function MobileToolbar(props) {
15923
16057
  children: /* @__PURE__ */ jsx(LuPresentation, { className: "w-5 h-5" })
15924
16058
  }
15925
16059
  ),
15926
- showEdit && /* @__PURE__ */ jsx(
16060
+ showEdit && !isHidden("share") && /* @__PURE__ */ jsx(
15927
16061
  "button",
15928
16062
  {
15929
16063
  type: "button",
@@ -16285,8 +16419,9 @@ function TabRowActions(p) {
16285
16419
  const { t } = useTranslation();
16286
16420
  const collab = useCollaboration();
16287
16421
  const isCollaborating = collab && collab.status === "connected";
16422
+ const { isHidden } = useToolbarVisibility(p.hiddenActions);
16288
16423
  return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 pr-1", children: [
16289
- p.onEnterRehearsalMode && /* @__PURE__ */ jsxs(
16424
+ p.onEnterRehearsalMode && !isHidden("record") && /* @__PURE__ */ jsxs(
16290
16425
  "button",
16291
16426
  {
16292
16427
  type: "button",
@@ -16300,7 +16435,7 @@ function TabRowActions(p) {
16300
16435
  ]
16301
16436
  }
16302
16437
  ),
16303
- /* @__PURE__ */ jsxs(
16438
+ !isHidden("share") && /* @__PURE__ */ jsxs(
16304
16439
  "button",
16305
16440
  {
16306
16441
  type: "button",
@@ -16792,6 +16927,7 @@ function ToolbarPrimaryRow(p) {
16792
16927
  function Toolbar(p) {
16793
16928
  const { mode, isNarrowViewport, isCompactToolbarOpen, toolbarSection, onSetToolbarSection } = p;
16794
16929
  const { t } = useTranslation();
16930
+ const { isTabVisible } = useToolbarVisibility(p.hiddenActions);
16795
16931
  if (isNarrowViewport && mode !== "present") {
16796
16932
  return /* @__PURE__ */ jsx(MobileToolbar, { ...p });
16797
16933
  }
@@ -16824,7 +16960,7 @@ function Toolbar(p) {
16824
16960
  role: "tablist",
16825
16961
  className: "flex items-center border-b border-border/60 px-1 max-md:overflow-x-auto max-md:scrollbar-none",
16826
16962
  children: [
16827
- TOOLBAR_SECTIONS.map((s) => /* @__PURE__ */ jsx(
16963
+ TOOLBAR_SECTIONS.filter((s) => isTabVisible(s.id)).map((s) => /* @__PURE__ */ jsx(
16828
16964
  "button",
16829
16965
  {
16830
16966
  type: "button",
@@ -16845,7 +16981,8 @@ function Toolbar(p) {
16845
16981
  {
16846
16982
  onEnterRehearsalMode: p.canEdit ? p.onEnterRehearsalMode : void 0,
16847
16983
  onOpenShareDialog: p.onOpenShareDialog,
16848
- onPackageForSharing: p.onPackageForSharing
16984
+ onPackageForSharing: p.onPackageForSharing,
16985
+ hiddenActions: p.hiddenActions
16849
16986
  }
16850
16987
  ),
16851
16988
  isNarrowViewport && /* @__PURE__ */ jsx(
@@ -16898,7 +17035,8 @@ function Toolbar(p) {
16898
17035
  onOpenDocumentProperties: p.onOpenDocumentProperties,
16899
17036
  onOpenPasswordProtection: p.onOpenPasswordProtection,
16900
17037
  onOpenFontEmbedding: p.onOpenFontEmbedding,
16901
- onOpenDigitalSignatures: p.onOpenDigitalSignatures
17038
+ onOpenDigitalSignatures: p.onOpenDigitalSignatures,
17039
+ hiddenActions: p.hiddenActions
16902
17040
  }
16903
17041
  ),
16904
17042
  sHome && /* @__PURE__ */ jsx(
@@ -17040,7 +17178,8 @@ function Toolbar(p) {
17040
17178
  onToggleSubtitles: p.onToggleSubtitles ?? (() => {
17041
17179
  }),
17042
17180
  showSubtitles: p.showSubtitles ?? false,
17043
- onSetMode: p.onSetMode
17181
+ onSetMode: p.onSetMode,
17182
+ hiddenActions: p.hiddenActions
17044
17183
  }
17045
17184
  ),
17046
17185
  sRec && /* @__PURE__ */ jsx(
@@ -24926,7 +25065,8 @@ function PresentationTouchControls({
24926
25065
  currentSlideIndex,
24927
25066
  totalSlides,
24928
25067
  onMovePresentationSlide,
24929
- onEndPresentation
25068
+ onEndPresentation,
25069
+ hideNavigation = false
24930
25070
  }) {
24931
25071
  const { t } = useTranslation();
24932
25072
  const { isTouchDevice } = useIsMobile();
@@ -24956,42 +25096,44 @@ function PresentationTouchControls({
24956
25096
  children: /* @__PURE__ */ jsx(LuX, { size: 22 })
24957
25097
  }
24958
25098
  ),
24959
- /* @__PURE__ */ jsx(
24960
- "button",
24961
- {
24962
- type: "button",
24963
- className: `fixed z-[90] top-1/2 -translate-y-1/2 ${btnClass} disabled:opacity-30`,
24964
- style: {
24965
- left: "calc(env(safe-area-inset-left, 0px) + 0.5rem)",
24966
- touchAction: "manipulation"
24967
- },
24968
- disabled: currentSlideIndex <= 0,
24969
- onClick: (e) => {
24970
- stop(e);
24971
- onMovePresentationSlide(-1);
24972
- },
24973
- "aria-label": t("pptx.presenter.previousSlide"),
24974
- children: /* @__PURE__ */ jsx(LuChevronLeft, { size: 26 })
24975
- }
24976
- ),
24977
- /* @__PURE__ */ jsx(
24978
- "button",
24979
- {
24980
- type: "button",
24981
- className: `fixed z-[90] top-1/2 -translate-y-1/2 ${btnClass} disabled:opacity-30`,
24982
- style: {
24983
- right: "calc(env(safe-area-inset-right, 0px) + 0.5rem)",
24984
- touchAction: "manipulation"
24985
- },
24986
- disabled: currentSlideIndex >= totalSlides - 1,
24987
- onClick: (e) => {
24988
- stop(e);
24989
- onMovePresentationSlide(1);
24990
- },
24991
- "aria-label": t("pptx.presenter.nextSlide"),
24992
- children: /* @__PURE__ */ jsx(LuChevronRight, { size: 26 })
24993
- }
24994
- ),
25099
+ !hideNavigation && /* @__PURE__ */ jsxs(Fragment, { children: [
25100
+ /* @__PURE__ */ jsx(
25101
+ "button",
25102
+ {
25103
+ type: "button",
25104
+ className: `fixed z-[90] top-1/2 -translate-y-1/2 ${btnClass} disabled:opacity-30`,
25105
+ style: {
25106
+ left: "calc(env(safe-area-inset-left, 0px) + 0.5rem)",
25107
+ touchAction: "manipulation"
25108
+ },
25109
+ disabled: currentSlideIndex <= 0,
25110
+ onClick: (e) => {
25111
+ stop(e);
25112
+ onMovePresentationSlide(-1);
25113
+ },
25114
+ "aria-label": t("pptx.presenter.previousSlide"),
25115
+ children: /* @__PURE__ */ jsx(LuChevronLeft, { size: 26 })
25116
+ }
25117
+ ),
25118
+ /* @__PURE__ */ jsx(
25119
+ "button",
25120
+ {
25121
+ type: "button",
25122
+ className: `fixed z-[90] top-1/2 -translate-y-1/2 ${btnClass} disabled:opacity-30`,
25123
+ style: {
25124
+ right: "calc(env(safe-area-inset-right, 0px) + 0.5rem)",
25125
+ touchAction: "manipulation"
25126
+ },
25127
+ disabled: currentSlideIndex >= totalSlides - 1,
25128
+ onClick: (e) => {
25129
+ stop(e);
25130
+ onMovePresentationSlide(1);
25131
+ },
25132
+ "aria-label": t("pptx.presenter.nextSlide"),
25133
+ children: /* @__PURE__ */ jsx(LuChevronRight, { size: 26 })
25134
+ }
25135
+ )
25136
+ ] }),
24995
25137
  /* @__PURE__ */ jsx(
24996
25138
  "span",
24997
25139
  {
@@ -28699,8 +28841,10 @@ function ViewerBottomPanels({
28699
28841
  mode,
28700
28842
  onSetMode,
28701
28843
  onToggleSlideSorter,
28702
- hideStatusBar = false
28844
+ hideStatusBar = false,
28845
+ hiddenActions
28703
28846
  }) {
28847
+ const { isHidden } = useToolbarVisibility(hiddenActions);
28704
28848
  return /* @__PURE__ */ jsxs(Fragment, { children: [
28705
28849
  onResizeBottom && !isSlideNotesCollapsed && /* @__PURE__ */ jsx(ResizeHandle, { direction: "vertical", onResize: onResizeBottom }),
28706
28850
  /* @__PURE__ */ jsx(
@@ -28731,7 +28875,10 @@ function ViewerBottomPanels({
28731
28875
  mode,
28732
28876
  onSetMode,
28733
28877
  onToggleSlideSorter,
28734
- collaborationSlot
28878
+ collaborationSlot,
28879
+ hideZoomControls: isHidden("zoom"),
28880
+ hideNotesToggle: isHidden("notes"),
28881
+ hideFullscreenToggle: isHidden("fullscreen")
28735
28882
  }
28736
28883
  )
28737
28884
  ] });
@@ -28916,6 +29063,7 @@ function scopeLayoutOptionsToActiveSlide(options, activeSlide) {
28916
29063
  function TitleBar(p) {
28917
29064
  const { t } = useTranslation();
28918
29065
  const editing = (p.mode === "edit" || p.mode === "master") && p.canEdit;
29066
+ const { isHidden } = useToolbarVisibility(p.hiddenActions);
28919
29067
  const [searchQuery, setSearchQuery] = useState("");
28920
29068
  const [searchFocused, setSearchFocused] = useState(false);
28921
29069
  const searchRef = useRef(null);
@@ -29002,7 +29150,7 @@ function TitleBar(p) {
29002
29150
  children: /* @__PURE__ */ jsx(LuSave, { className: "w-3.5 h-3.5" })
29003
29151
  }
29004
29152
  ),
29005
- /* @__PURE__ */ jsx(
29153
+ !isHidden("undo") && /* @__PURE__ */ jsx(
29006
29154
  "button",
29007
29155
  {
29008
29156
  type: "button",
@@ -29014,7 +29162,7 @@ function TitleBar(p) {
29014
29162
  children: /* @__PURE__ */ jsx(LuUndo, { className: "w-3.5 h-3.5" })
29015
29163
  }
29016
29164
  ),
29017
- /* @__PURE__ */ jsx(
29165
+ !isHidden("redo") && /* @__PURE__ */ jsx(
29018
29166
  "button",
29019
29167
  {
29020
29168
  type: "button",
@@ -29144,7 +29292,8 @@ function ViewerToolbarSection(props) {
29144
29292
  fileName,
29145
29293
  autosaveStatus,
29146
29294
  autosaveEnabled = true,
29147
- onToggleAutosave
29295
+ onToggleAutosave,
29296
+ hiddenActions
29148
29297
  } = props;
29149
29298
  const handleAddAnimation = useCallback(
29150
29299
  (preset, group) => {
@@ -29351,7 +29500,8 @@ function ViewerToolbarSection(props) {
29351
29500
  onSave: exportHandlers.handleSaveAsPptx,
29352
29501
  findReplaceOpen: findReplace.findReplaceOpen,
29353
29502
  onToggleFindReplace: () => findReplace.setFindReplaceOpen(!findReplace.findReplaceOpen),
29354
- onCommandSearch: handleCommandSearch
29503
+ onCommandSearch: handleCommandSearch,
29504
+ hiddenActions
29355
29505
  }
29356
29506
  ),
29357
29507
  /* @__PURE__ */ jsx(
@@ -29360,6 +29510,7 @@ function ViewerToolbarSection(props) {
29360
29510
  fileName,
29361
29511
  mode,
29362
29512
  canEdit,
29513
+ hiddenActions,
29363
29514
  isNarrowViewport: dialogs.isNarrowViewport,
29364
29515
  isSidebarCollapsed: !s.isSlidesPaneOpen,
29365
29516
  isInspectorPaneOpen: s.isInspectorPaneOpen,
@@ -30315,9 +30466,11 @@ function ViewerCanvasArea(props) {
30315
30466
  annotations,
30316
30467
  presentation,
30317
30468
  onEndPresentation,
30318
- findReplace
30469
+ findReplace,
30470
+ hiddenActions
30319
30471
  } = props;
30320
30472
  const { t } = useTranslation();
30473
+ const { isHidden } = useToolbarVisibility(hiddenActions);
30321
30474
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
30322
30475
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
30323
30476
  const fieldContext = useMemo(() => {
@@ -30593,7 +30746,8 @@ function ViewerCanvasArea(props) {
30593
30746
  totalSlides: slides.length,
30594
30747
  onMovePresentationSlide: presentation.movePresentationSlide,
30595
30748
  onEndPresentation: onEndPresentation ?? (() => {
30596
- })
30749
+ }),
30750
+ hideNavigation: isHidden("navigation")
30597
30751
  }
30598
30752
  ),
30599
30753
  mode === "present" && /* @__PURE__ */ jsx(
@@ -31783,7 +31937,8 @@ function ViewerMainContent(props) {
31783
31937
  leftPanelWidth,
31784
31938
  onResizeLeft,
31785
31939
  rightPanelWidth,
31786
- onResizeRight
31940
+ onResizeRight,
31941
+ hiddenActions
31787
31942
  } = props;
31788
31943
  const {
31789
31944
  ops,
@@ -31878,7 +32033,8 @@ function ViewerMainContent(props) {
31878
32033
  annotations,
31879
32034
  presentation,
31880
32035
  onEndPresentation,
31881
- findReplace
32036
+ findReplace,
32037
+ hiddenActions
31882
32038
  }
31883
32039
  ),
31884
32040
  state.contextMenuState && /* @__PURE__ */ jsx(
@@ -32226,6 +32382,75 @@ function MobileChromeOverlay(props) {
32226
32382
  )
32227
32383
  ] });
32228
32384
  }
32385
+ function SettingsAppearanceTab({
32386
+ activeThemeKey,
32387
+ themes,
32388
+ onSelectTheme
32389
+ }) {
32390
+ const { t } = useTranslation();
32391
+ return /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-3", children: themes.map((entry) => {
32392
+ const isActive = entry.key === activeThemeKey;
32393
+ const previewBackground = entry.theme?.colors?.background ?? "#0b0f19";
32394
+ const previewPrimary = entry.theme?.colors?.primary ?? "#6366f1";
32395
+ return /* @__PURE__ */ jsxs(
32396
+ "button",
32397
+ {
32398
+ type: "button",
32399
+ onClick: () => onSelectTheme(entry.key),
32400
+ "aria-pressed": isActive,
32401
+ className: cn(
32402
+ "flex items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",
32403
+ isActive ? "border-primary bg-primary/10" : "border-border hover:border-primary/50 hover:bg-accent"
32404
+ ),
32405
+ children: [
32406
+ /* @__PURE__ */ jsx(
32407
+ "span",
32408
+ {
32409
+ className: "h-8 w-8 shrink-0 rounded-full border border-border/60 shadow-inner",
32410
+ style: {
32411
+ background: `linear-gradient(135deg, ${previewBackground} 50%, ${previewPrimary} 50%)`
32412
+ }
32413
+ }
32414
+ ),
32415
+ /* @__PURE__ */ jsx(
32416
+ "span",
32417
+ {
32418
+ className: cn("text-xs font-medium", isActive ? "text-primary" : "text-foreground"),
32419
+ children: t(entry.labelKey)
32420
+ }
32421
+ )
32422
+ ]
32423
+ },
32424
+ entry.key
32425
+ );
32426
+ }) });
32427
+ }
32428
+ function SettingsLanguageTab({
32429
+ activeLocale,
32430
+ locales,
32431
+ onSelectLocale
32432
+ }) {
32433
+ return /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: locales.map((locale) => {
32434
+ const isActive = locale.code === activeLocale;
32435
+ return /* @__PURE__ */ jsxs(
32436
+ "button",
32437
+ {
32438
+ type: "button",
32439
+ onClick: () => onSelectLocale(locale.code),
32440
+ "aria-pressed": isActive,
32441
+ className: cn(
32442
+ "flex w-full items-center justify-between rounded px-3 py-2.5 text-left transition-colors",
32443
+ isActive ? "bg-primary/10 text-primary" : "text-foreground hover:bg-accent"
32444
+ ),
32445
+ children: [
32446
+ /* @__PURE__ */ jsx("span", { className: "text-sm", children: locale.nativeLabel }),
32447
+ locale.nativeLabel !== locale.label && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: locale.label })
32448
+ ]
32449
+ },
32450
+ locale.code
32451
+ );
32452
+ }) });
32453
+ }
32229
32454
  function ToggleSwitch({
32230
32455
  label,
32231
32456
  enabled,
@@ -32261,19 +32486,16 @@ function ToggleSwitch({
32261
32486
  function SettingsDialog({
32262
32487
  isOpen,
32263
32488
  onClose,
32264
- spellCheckEnabled = false,
32265
- onSetSpellCheckEnabled,
32266
- showGrid = false,
32267
- onSetShowGrid,
32268
- showRulers = false,
32269
- onSetShowRulers,
32270
- snapToGrid = false,
32271
- onSetSnapToGrid,
32272
- reducedMotion = false,
32273
- onToggleReducedMotion
32489
+ settings,
32490
+ onSettingsChange,
32491
+ themeKey,
32492
+ availableThemes,
32493
+ onSelectTheme,
32494
+ localeCode,
32495
+ availableLocales,
32496
+ onSelectLocale
32274
32497
  }) {
32275
32498
  const [activeTab, setActiveTab] = useState("general");
32276
- const [autoSave, setAutoSave] = useState(true);
32277
32499
  const { t } = useTranslation();
32278
32500
  const { panelStyle, handlers: dragHandlers } = useModalDismissDrag(onClose);
32279
32501
  const handleKeyDown = useCallback(
@@ -32295,6 +32517,8 @@ function SettingsDialog({
32295
32517
  }
32296
32518
  const tabs = [
32297
32519
  { id: "general", label: t("pptx.settings.general") },
32520
+ { id: "appearance", label: t("pptx.settings.appearance") },
32521
+ { id: "language", label: t("pptx.settings.language") },
32298
32522
  { id: "shortcuts", label: t("pptx.settings.keyboardShortcuts") }
32299
32523
  ];
32300
32524
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -32359,56 +32583,31 @@ function SettingsDialog({
32359
32583
  tab.id
32360
32584
  )) }),
32361
32585
  /* @__PURE__ */ jsxs("div", { className: "px-5 py-4 max-h-[60vh] overflow-y-auto", children: [
32362
- activeTab === "general" && /* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
32363
- /* @__PURE__ */ jsx(
32364
- ToggleSwitch,
32365
- {
32366
- label: t("pptx.settings.autoSave"),
32367
- enabled: autoSave,
32368
- onToggle: () => setAutoSave(!autoSave)
32369
- }
32370
- ),
32371
- /* @__PURE__ */ jsx(
32372
- ToggleSwitch,
32373
- {
32374
- label: t("pptx.settings.spellCheck"),
32375
- enabled: spellCheckEnabled,
32376
- onToggle: () => onSetSpellCheckEnabled?.(!spellCheckEnabled)
32377
- }
32378
- ),
32379
- /* @__PURE__ */ jsx(
32380
- ToggleSwitch,
32381
- {
32382
- label: t("pptx.settings.showGrid"),
32383
- enabled: showGrid,
32384
- onToggle: () => onSetShowGrid?.(!showGrid)
32385
- }
32386
- ),
32387
- /* @__PURE__ */ jsx(
32388
- ToggleSwitch,
32389
- {
32390
- label: t("pptx.settings.showRulers"),
32391
- enabled: showRulers,
32392
- onToggle: () => onSetShowRulers?.(!showRulers)
32393
- }
32394
- ),
32395
- /* @__PURE__ */ jsx(
32396
- ToggleSwitch,
32397
- {
32398
- label: t("pptx.settings.snapToGrid"),
32399
- enabled: snapToGrid,
32400
- onToggle: () => onSetSnapToGrid?.(!snapToGrid)
32401
- }
32402
- ),
32403
- /* @__PURE__ */ jsx(
32404
- ToggleSwitch,
32405
- {
32406
- label: t("pptx.settings.reducedMotion"),
32407
- enabled: reducedMotion,
32408
- onToggle: () => onToggleReducedMotion?.()
32409
- }
32410
- )
32411
- ] }),
32586
+ activeTab === "general" && /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: SETTING_TOGGLES.map((toggle) => /* @__PURE__ */ jsx(
32587
+ ToggleSwitch,
32588
+ {
32589
+ label: t(toggle.labelKey),
32590
+ enabled: settings[toggle.key],
32591
+ onToggle: () => onSettingsChange(toggle.key, !settings[toggle.key])
32592
+ },
32593
+ toggle.key
32594
+ )) }),
32595
+ activeTab === "appearance" && /* @__PURE__ */ jsx(
32596
+ SettingsAppearanceTab,
32597
+ {
32598
+ activeThemeKey: themeKey,
32599
+ themes: availableThemes,
32600
+ onSelectTheme
32601
+ }
32602
+ ),
32603
+ activeTab === "language" && /* @__PURE__ */ jsx(
32604
+ SettingsLanguageTab,
32605
+ {
32606
+ activeLocale: localeCode,
32607
+ locales: availableLocales,
32608
+ onSelectLocale
32609
+ }
32610
+ ),
32412
32611
  activeTab === "shortcuts" && /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: SHORTCUT_REFERENCE_ITEMS.map((shortcut, i) => /* @__PURE__ */ jsxs(
32413
32612
  "div",
32414
32613
  {
@@ -32449,12 +32648,20 @@ var PowerPointViewer = forwardRef(
32449
32648
  onSlideCountChange,
32450
32649
  onOpenFile: hostOpenFile,
32451
32650
  theme,
32651
+ defaultThemeKey,
32652
+ availableThemes,
32653
+ onThemeChange,
32654
+ defaultLocale,
32655
+ availableLocales,
32656
+ onLocaleChange,
32657
+ accountAuth,
32452
32658
  authorName,
32453
32659
  collaboration,
32454
32660
  onStartCollaboration,
32455
32661
  onStopCollaboration,
32456
32662
  shareDefaults,
32457
- smartArt3D = false
32663
+ smartArt3D = false,
32664
+ hiddenActions
32458
32665
  } = props;
32459
32666
  useEffect(() => {
32460
32667
  const css = buildUserFontFaceStyles(fonts);
@@ -32467,7 +32674,57 @@ var PowerPointViewer = forwardRef(
32467
32674
  document.head.appendChild(style);
32468
32675
  return () => style.remove();
32469
32676
  }, [fonts]);
32470
- const themeStyle = useThemeStyle(theme);
32677
+ const [themeKey, setThemeKey] = useState(
32678
+ () => defaultThemeKey ?? readStoredViewerPrefs().themeKey ?? "default"
32679
+ );
32680
+ const themeCatalog = availableThemes ?? THEME_CATALOG;
32681
+ const effectiveTheme = theme ?? resolveThemeCatalogEntry(themeKey, themeCatalog);
32682
+ const handleThemeChange = useCallback(
32683
+ (key) => {
32684
+ setThemeKey(key);
32685
+ if (onThemeChange) {
32686
+ onThemeChange(key);
32687
+ } else {
32688
+ writeStoredViewerPrefs({ themeKey: key });
32689
+ }
32690
+ },
32691
+ [onThemeChange]
32692
+ );
32693
+ const themeStyle = useThemeStyle(effectiveTheme);
32694
+ const { i18n } = useTranslation();
32695
+ const [localeCode, setLocaleCode] = useState(
32696
+ () => defaultLocale ?? readStoredViewerPrefs().localeCode ?? "en"
32697
+ );
32698
+ useEffect(() => {
32699
+ if (localeCode !== "en" && !onLocaleChange) {
32700
+ void i18n.changeLanguage(localeCode);
32701
+ }
32702
+ }, []);
32703
+ const resolvedLocales = useMemo(() => {
32704
+ if (availableLocales) {
32705
+ return availableLocales;
32706
+ }
32707
+ const registeredCodes = i18n.options.resources ? Object.keys(i18n.options.resources) : i18n.languages ?? ["en"];
32708
+ return registeredCodes.map(
32709
+ (code) => LOCALE_CATALOG.find((entry) => entry.code === code) ?? {
32710
+ code,
32711
+ label: code,
32712
+ nativeLabel: code
32713
+ }
32714
+ );
32715
+ }, [availableLocales, i18n]);
32716
+ const handleLocaleChange = useCallback(
32717
+ (code) => {
32718
+ setLocaleCode(code);
32719
+ if (onLocaleChange) {
32720
+ onLocaleChange(code);
32721
+ } else {
32722
+ void i18n.changeLanguage(code);
32723
+ writeStoredViewerPrefs({ localeCode: code });
32724
+ }
32725
+ },
32726
+ [onLocaleChange, i18n]
32727
+ );
32471
32728
  const [content, setContent] = useState(incomingContent);
32472
32729
  useEffect(() => {
32473
32730
  setContent(incomingContent);
@@ -32512,6 +32769,51 @@ var PowerPointViewer = forwardRef(
32512
32769
  activeSlide,
32513
32770
  selectedElement
32514
32771
  } = state;
32772
+ const settings = useMemo(
32773
+ () => ({
32774
+ autoSave: autosaveEnabled,
32775
+ spellCheck: state.spellCheckEnabled,
32776
+ showGrid: state.showGrid,
32777
+ showRulers: state.showRulers,
32778
+ snapToGrid: state.snapToGrid,
32779
+ reducedMotion
32780
+ }),
32781
+ [
32782
+ autosaveEnabled,
32783
+ state.spellCheckEnabled,
32784
+ state.showGrid,
32785
+ state.showRulers,
32786
+ state.snapToGrid,
32787
+ reducedMotion
32788
+ ]
32789
+ );
32790
+ const handleSettingsChange = useCallback(
32791
+ (key, value) => {
32792
+ switch (key) {
32793
+ case "autoSave":
32794
+ setAutosaveEnabled(value);
32795
+ break;
32796
+ case "spellCheck":
32797
+ state.setSpellCheckEnabled(value);
32798
+ break;
32799
+ case "showGrid":
32800
+ state.setShowGrid(value);
32801
+ break;
32802
+ case "showRulers":
32803
+ state.setShowRulers(value);
32804
+ break;
32805
+ case "snapToGrid":
32806
+ state.setSnapToGrid(value);
32807
+ break;
32808
+ case "reducedMotion":
32809
+ if (value !== reducedMotion) {
32810
+ toggleReducedMotion();
32811
+ }
32812
+ break;
32813
+ }
32814
+ },
32815
+ [state, reducedMotion, toggleReducedMotion]
32816
+ );
32515
32817
  const mobile = useIsMobile({ containerRef });
32516
32818
  const { isMobile, isTouchDevice, isVirtualKeyboardOpen } = mobile;
32517
32819
  const resizablePanels = useResizablePanels();
@@ -32750,7 +33052,8 @@ var PowerPointViewer = forwardRef(
32750
33052
  fileName,
32751
33053
  autosaveStatus,
32752
33054
  autosaveEnabled,
32753
- onToggleAutosave: () => setAutosaveEnabled((p) => !p)
33055
+ onToggleAutosave: () => setAutosaveEnabled((p) => !p),
33056
+ hiddenActions
32754
33057
  }
32755
33058
  ),
32756
33059
  /* @__PURE__ */ jsx(
@@ -32784,7 +33087,8 @@ var PowerPointViewer = forwardRef(
32784
33087
  leftPanelWidth: isMobile ? void 0 : resizablePanels.leftWidth,
32785
33088
  onResizeLeft: isMobile ? void 0 : resizablePanels.onResizeLeft,
32786
33089
  rightPanelWidth: isMobile ? void 0 : resizablePanels.rightWidth,
32787
- onResizeRight: isMobile ? void 0 : resizablePanels.onResizeRight
33090
+ onResizeRight: isMobile ? void 0 : resizablePanels.onResizeRight,
33091
+ hiddenActions
32788
33092
  }
32789
33093
  ),
32790
33094
  mode !== "present" && (!isVirtualKeyboardOpen || !state.isSlideNotesCollapsed) && /* @__PURE__ */ jsx(
@@ -32810,7 +33114,8 @@ var PowerPointViewer = forwardRef(
32810
33114
  mode,
32811
33115
  onSetMode: handleSetMode,
32812
33116
  onToggleSlideSorter: () => state.setShowSlideSorter((p) => !p),
32813
- hideStatusBar: isMobile
33117
+ hideStatusBar: isMobile,
33118
+ hiddenActions
32814
33119
  }
32815
33120
  ),
32816
33121
  mode !== "present" && isMobile && /* @__PURE__ */ jsx(
@@ -32864,16 +33169,14 @@ var PowerPointViewer = forwardRef(
32864
33169
  {
32865
33170
  isOpen: isSettingsOpen,
32866
33171
  onClose: () => setIsSettingsOpen(false),
32867
- spellCheckEnabled: state.spellCheckEnabled,
32868
- onSetSpellCheckEnabled: state.setSpellCheckEnabled,
32869
- showGrid: state.showGrid,
32870
- onSetShowGrid: state.setShowGrid,
32871
- showRulers: state.showRulers,
32872
- onSetShowRulers: state.setShowRulers,
32873
- snapToGrid: state.snapToGrid,
32874
- onSetSnapToGrid: state.setSnapToGrid,
32875
- reducedMotion,
32876
- onToggleReducedMotion: toggleReducedMotion
33172
+ settings,
33173
+ onSettingsChange: handleSettingsChange,
33174
+ themeKey,
33175
+ availableThemes: themeCatalog,
33176
+ onSelectTheme: handleThemeChange,
33177
+ localeCode,
33178
+ availableLocales: resolvedLocales,
33179
+ onSelectLocale: handleLocaleChange
32877
33180
  }
32878
33181
  ),
32879
33182
  isHeaderFooterOpen && /* @__PURE__ */ jsx(
@@ -32968,7 +33271,7 @@ var PowerPointViewer = forwardRef(
32968
33271
  ]
32969
33272
  }
32970
33273
  );
32971
- return /* @__PURE__ */ jsx(SmartArt3DContext.Provider, { value: smartArt3D, children: /* @__PURE__ */ jsx(ViewerThemeProvider, { theme, children: /* @__PURE__ */ jsxs(
33274
+ return /* @__PURE__ */ jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsx(SmartArt3DContext.Provider, { value: smartArt3D, children: /* @__PURE__ */ jsx(ViewerThemeProvider, { theme: effectiveTheme, children: /* @__PURE__ */ jsxs(
32972
33275
  CollaborationProvider,
32973
33276
  {
32974
33277
  config: collaboration,
@@ -32996,7 +33299,7 @@ var PowerPointViewer = forwardRef(
32996
33299
  viewerContent
32997
33300
  ]
32998
33301
  }
32999
- ) }) });
33302
+ ) }) }) });
33000
33303
  }
33001
33304
  );
33002
33305
  PowerPointViewer.displayName = "PowerPointViewer";