pptx-react-viewer 1.21.0 → 1.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/{Model3DScene-IGFOR6UG.js → Model3DScene-3YB3JAJS.js} +2 -2
  3. package/dist/{Model3DScene-IGFOR6UG.js.br → Model3DScene-3YB3JAJS.js.br} +0 -0
  4. package/dist/Model3DScene-3YB3JAJS.js.gz +0 -0
  5. package/dist/{Model3DScene-FERG6DP5.mjs → Model3DScene-NLUSXHD6.mjs} +1 -1
  6. package/dist/Model3DScene-NLUSXHD6.mjs.br +0 -0
  7. package/dist/Model3DScene-NLUSXHD6.mjs.gz +0 -0
  8. package/dist/{PowerPointViewer-JxHuwp4K.d.ts → PowerPointViewer-WGVR_u4z.d.ts} +2 -2
  9. package/dist/PowerPointViewer-WGVR_u4z.d.ts.map +1 -0
  10. package/dist/{SurfaceChart3DScene-S2UEFUQ5.js → SurfaceChart3DScene-PUQ5DCO5.js} +2 -2
  11. package/dist/SurfaceChart3DScene-PUQ5DCO5.js.br +0 -0
  12. package/dist/SurfaceChart3DScene-PUQ5DCO5.js.gz +0 -0
  13. package/dist/{SurfaceChart3DScene-754VHVLW.mjs → SurfaceChart3DScene-YBMJQGH3.mjs} +1 -1
  14. package/dist/{SurfaceChart3DScene-754VHVLW.mjs.br → SurfaceChart3DScene-YBMJQGH3.mjs.br} +0 -0
  15. package/dist/SurfaceChart3DScene-YBMJQGH3.mjs.gz +0 -0
  16. package/dist/{chunk-FTJ5JKLB.mjs → chunk-5SBQZEKD.mjs} +170 -1
  17. package/dist/chunk-5SBQZEKD.mjs.br +0 -0
  18. package/dist/chunk-5SBQZEKD.mjs.gz +0 -0
  19. package/dist/{chunk-K6C5G2J6.mjs → chunk-B7JRQB5F.mjs} +363 -89
  20. package/dist/chunk-B7JRQB5F.mjs.br +0 -0
  21. package/dist/chunk-B7JRQB5F.mjs.gz +0 -0
  22. package/dist/{chunk-2C3XYEFM.mjs → chunk-DZUI64SO.mjs} +3 -3
  23. package/dist/chunk-DZUI64SO.mjs.br +0 -0
  24. package/dist/chunk-DZUI64SO.mjs.gz +0 -0
  25. package/dist/{chunk-4LPWBQTH.mjs → chunk-E3KJKCSV.mjs} +7 -1
  26. package/dist/chunk-E3KJKCSV.mjs.br +0 -0
  27. package/dist/{chunk-4LPWBQTH.mjs.gz → chunk-E3KJKCSV.mjs.gz} +0 -0
  28. package/dist/{chunk-2YHX6IAW.js → chunk-QVQTDWB7.js} +400 -400
  29. package/dist/chunk-QVQTDWB7.js.br +0 -0
  30. package/dist/chunk-QVQTDWB7.js.gz +0 -0
  31. package/dist/{chunk-UGAJLDGZ.js → chunk-VSNXVKJI.js} +182 -0
  32. package/dist/chunk-VSNXVKJI.js.br +0 -0
  33. package/dist/chunk-VSNXVKJI.js.gz +0 -0
  34. package/dist/{chunk-PQUAAGKH.js → chunk-YPZV4KJT.js} +1053 -779
  35. package/dist/chunk-YPZV4KJT.js.br +0 -0
  36. package/dist/chunk-YPZV4KJT.js.gz +0 -0
  37. package/dist/{chunk-4SRCC7NB.js → chunk-ZISXRMDJ.js} +7 -0
  38. package/dist/chunk-ZISXRMDJ.js.br +0 -0
  39. package/dist/{chunk-4SRCC7NB.js.gz → chunk-ZISXRMDJ.js.gz} +0 -0
  40. package/dist/hooks-unstable.js +76 -76
  41. package/dist/hooks-unstable.js.br +0 -0
  42. package/dist/hooks-unstable.js.gz +0 -0
  43. package/dist/hooks-unstable.mjs +3 -3
  44. package/dist/hooks-unstable.mjs.br +0 -0
  45. package/dist/hooks-unstable.mjs.gz +0 -0
  46. package/dist/i18n.d.ts +18 -2
  47. package/dist/i18n.js +7 -3
  48. package/dist/i18n.js.br +0 -0
  49. package/dist/i18n.js.gz +0 -0
  50. package/dist/i18n.mjs +1 -1
  51. package/dist/i18n.mjs.br +0 -0
  52. package/dist/i18n.mjs.gz +0 -0
  53. package/dist/index-SUL_8gq8.d.ts +43 -0
  54. package/dist/index-SUL_8gq8.d.ts.map +1 -0
  55. package/dist/{index-BhR8ykQj.d.ts → index-ntF3kHHU.d.ts} +2 -2
  56. package/dist/{index-BhR8ykQj.d.ts.map → index-ntF3kHHU.d.ts.map} +1 -1
  57. package/dist/index.d.ts +153 -2
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +70 -18
  60. package/dist/index.js.br +0 -0
  61. package/dist/index.js.gz +0 -0
  62. package/dist/index.mjs +4 -4
  63. package/dist/index.mjs.br +0 -0
  64. package/dist/index.mjs.gz +0 -0
  65. package/dist/pptx-viewer.css +1 -1
  66. package/dist/pptx-viewer.css.br +0 -0
  67. package/dist/pptx-viewer.css.gz +0 -0
  68. package/dist/{types-DGauquE9.d.ts → types-Cdh0XYcS.d.ts} +48 -3
  69. package/dist/types-Cdh0XYcS.d.ts.map +1 -0
  70. package/dist/viewer/index.d.ts +79 -0
  71. package/dist/viewer/index.js +20 -20
  72. package/dist/viewer/index.js.br +0 -0
  73. package/dist/viewer/index.js.gz +0 -0
  74. package/dist/viewer/index.mjs +4 -4
  75. package/dist/viewer/index.mjs.br +0 -0
  76. package/dist/viewer/index.mjs.gz +0 -0
  77. package/package.json +1 -1
  78. package/dist/Model3DScene-FERG6DP5.mjs.br +0 -0
  79. package/dist/Model3DScene-FERG6DP5.mjs.gz +0 -0
  80. package/dist/Model3DScene-IGFOR6UG.js.gz +0 -0
  81. package/dist/PowerPointViewer-JxHuwp4K.d.ts.map +0 -1
  82. package/dist/SurfaceChart3DScene-754VHVLW.mjs.gz +0 -0
  83. package/dist/SurfaceChart3DScene-S2UEFUQ5.js.br +0 -0
  84. package/dist/SurfaceChart3DScene-S2UEFUQ5.js.gz +0 -0
  85. package/dist/chunk-2C3XYEFM.mjs.br +0 -0
  86. package/dist/chunk-2C3XYEFM.mjs.gz +0 -0
  87. package/dist/chunk-2YHX6IAW.js.br +0 -0
  88. package/dist/chunk-2YHX6IAW.js.gz +0 -0
  89. package/dist/chunk-4LPWBQTH.mjs.br +0 -0
  90. package/dist/chunk-4SRCC7NB.js.br +0 -0
  91. package/dist/chunk-FTJ5JKLB.mjs.br +0 -0
  92. package/dist/chunk-FTJ5JKLB.mjs.gz +0 -0
  93. package/dist/chunk-K6C5G2J6.mjs.br +0 -0
  94. package/dist/chunk-K6C5G2J6.mjs.gz +0 -0
  95. package/dist/chunk-PQUAAGKH.js.br +0 -0
  96. package/dist/chunk-PQUAAGKH.js.gz +0 -0
  97. package/dist/chunk-UGAJLDGZ.js.br +0 -0
  98. package/dist/chunk-UGAJLDGZ.js.gz +0 -0
  99. package/dist/i18n.d.ts.map +0 -1
  100. package/dist/types-DGauquE9.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, 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-2C3XYEFM.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-FTJ5JKLB.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 }) {
@@ -1564,6 +1564,7 @@ function ResizeHandles({
1564
1564
  {
1565
1565
  type: "button",
1566
1566
  "aria-label": t("pptx.resizeHandles.rotateAria"),
1567
+ "data-pptx-compact": true,
1567
1568
  className: "absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 z-20 flex items-center justify-center w-5 h-5 max-md:w-7 max-md:h-7 rounded-full border border-white bg-primary text-white shadow cursor-grab active:cursor-grabbing",
1568
1569
  style: peStyle,
1569
1570
  onPointerDown: (e) => {
@@ -1588,6 +1589,7 @@ function ResizeHandles({
1588
1589
  {
1589
1590
  type: "button",
1590
1591
  "aria-label": t("pptx.canvas.adjustShape"),
1592
+ "data-pptx-compact": true,
1591
1593
  className: "absolute h-2.5 w-2.5 max-md:h-4 max-md:w-4 rotate-45 border border-amber-700 bg-amber-300 shadow z-10",
1592
1594
  style: {
1593
1595
  left: adjH.left - 5,
@@ -2832,7 +2834,7 @@ function FailedToLoad() {
2832
2834
  var LazyModel3DScene = React14.lazy(
2833
2835
  async () => {
2834
2836
  try {
2835
- return await import('./Model3DScene-FERG6DP5.mjs');
2837
+ return await import('./Model3DScene-NLUSXHD6.mjs');
2836
2838
  } catch {
2837
2839
  return { default: FailedToLoad };
2838
2840
  }
@@ -3179,6 +3181,7 @@ function SmartArtNodeStyleBar({
3179
3181
  {
3180
3182
  type: "button",
3181
3183
  "aria-label": `Set fill to ${color}`,
3184
+ "data-pptx-compact": true,
3182
3185
  className: "w-5 h-5 rounded-full border border-black/10 hover:scale-125 transition-transform",
3183
3186
  style: { background: color },
3184
3187
  onClick: () => onPickFill(color)
@@ -13125,6 +13128,139 @@ function DrawSection(p) {
13125
13128
  ] })
13126
13129
  ] });
13127
13130
  }
13131
+ var AccountAuthContext = createContext(void 0);
13132
+ var cardClass = "border border-border bg-card p-6 text-card-foreground";
13133
+ function AccountPage() {
13134
+ const { t } = useTranslation();
13135
+ const accountAuth = useContext(AccountAuthContext);
13136
+ const [profile, setProfile] = useState(
13137
+ () => readStoredViewerPrefs().profile ?? DEFAULT_VIEWER_PROFILE
13138
+ );
13139
+ const updateProfile = (patch) => {
13140
+ const next = { ...profile, ...patch };
13141
+ setProfile(next);
13142
+ saveViewerProfile(next);
13143
+ };
13144
+ const [usage, setUsage] = useState(null);
13145
+ const [cleared, setCleared] = useState(false);
13146
+ const refreshUsage = () => {
13147
+ void getLocalStorageUsageSummary().then(setUsage);
13148
+ };
13149
+ useEffect(refreshUsage, []);
13150
+ const handleClear = () => {
13151
+ if (!window.confirm(t("pptx.account.storage.clearConfirm"))) {
13152
+ return;
13153
+ }
13154
+ void clearAllLocalViewerData().then(() => {
13155
+ setCleared(true);
13156
+ refreshUsage();
13157
+ setTimeout(() => setCleared(false), 4e3);
13158
+ return void 0;
13159
+ });
13160
+ };
13161
+ const version = "1.22.0" ;
13162
+ return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
13163
+ /* @__PURE__ */ jsxs("section", { className: cardClass, children: [
13164
+ /* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
13165
+ /* @__PURE__ */ jsx(LuUser, { className: "text-primary" }),
13166
+ " ",
13167
+ t("pptx.account.profile.title")
13168
+ ] }),
13169
+ /* @__PURE__ */ jsxs("div", { className: "mt-4 flex items-center gap-4", children: [
13170
+ /* @__PURE__ */ jsx(
13171
+ "span",
13172
+ {
13173
+ className: "grid size-14 shrink-0 place-items-center rounded-full text-xl font-semibold text-white",
13174
+ style: { background: profile.avatarColor },
13175
+ children: resolveProfileInitial(profile)
13176
+ }
13177
+ ),
13178
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
13179
+ /* @__PURE__ */ jsx("label", { htmlFor: "pptx-account-name", className: "text-xs text-muted-foreground", children: t("pptx.account.profile.nameLabel") }),
13180
+ /* @__PURE__ */ jsx(
13181
+ "input",
13182
+ {
13183
+ id: "pptx-account-name",
13184
+ type: "text",
13185
+ value: profile.displayName,
13186
+ onChange: (e) => updateProfile({ displayName: e.target.value }),
13187
+ placeholder: t("pptx.account.profile.namePlaceholder"),
13188
+ className: "mt-1 h-9 w-full border border-input bg-background px-3 text-sm outline-none focus:border-ring"
13189
+ }
13190
+ )
13191
+ ] })
13192
+ ] }),
13193
+ /* @__PURE__ */ jsx("p", { className: "mt-4 text-xs text-muted-foreground", children: t("pptx.account.profile.avatarColorLabel") }),
13194
+ /* @__PURE__ */ jsx("div", { className: "mt-2 flex gap-2", children: AVATAR_COLOR_SWATCHES.map((color) => /* @__PURE__ */ jsx(
13195
+ "button",
13196
+ {
13197
+ type: "button",
13198
+ "aria-label": color,
13199
+ "aria-pressed": profile.avatarColor === color,
13200
+ onClick: () => updateProfile({ avatarColor: color }),
13201
+ className: cn(
13202
+ "size-7 rounded-full border-2 transition-transform",
13203
+ profile.avatarColor === color ? "border-foreground scale-110" : "border-transparent hover:scale-105"
13204
+ ),
13205
+ style: { background: color }
13206
+ },
13207
+ color
13208
+ )) })
13209
+ ] }),
13210
+ /* @__PURE__ */ jsxs("section", { className: cardClass, children: [
13211
+ /* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
13212
+ /* @__PURE__ */ jsx(LuHardDrive, { className: "text-primary" }),
13213
+ " ",
13214
+ t("pptx.account.storage.title")
13215
+ ] }),
13216
+ /* @__PURE__ */ jsx("p", { className: "mt-3 text-sm text-muted-foreground", children: usage && usage.presentationCount > 0 ? t("pptx.account.storage.usage", {
13217
+ count: usage.presentationCount,
13218
+ size: formatBackstageSize(usage.totalBytes)
13219
+ }) : t("pptx.account.storage.usageEmpty") }),
13220
+ /* @__PURE__ */ jsx("p", { className: "mt-3 text-xs leading-5 text-muted-foreground", children: t("pptx.account.storage.privacyBlurb") }),
13221
+ /* @__PURE__ */ jsx(
13222
+ "button",
13223
+ {
13224
+ type: "button",
13225
+ onClick: handleClear,
13226
+ className: "mt-4 border border-destructive/40 px-4 py-2 text-xs font-semibold text-destructive hover:bg-destructive/10",
13227
+ children: t("pptx.account.storage.clear")
13228
+ }
13229
+ ),
13230
+ cleared && /* @__PURE__ */ jsx("p", { className: "mt-2 text-xs text-primary", children: t("pptx.account.storage.clearedNotice") })
13231
+ ] }),
13232
+ /* @__PURE__ */ jsxs("section", { className: cardClass, children: [
13233
+ /* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
13234
+ /* @__PURE__ */ jsx(LuInfo, { className: "text-primary" }),
13235
+ " ",
13236
+ t("pptx.account.about.title")
13237
+ ] }),
13238
+ /* @__PURE__ */ jsxs("p", { className: "mt-3 text-sm text-muted-foreground", children: [
13239
+ "pptx-react-viewer",
13240
+ ` \xB7 ${t("pptx.account.about.version", { version })}`
13241
+ ] })
13242
+ ] }),
13243
+ accountAuth?.enabled && /* @__PURE__ */ jsxs("section", { className: cardClass, children: [
13244
+ /* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
13245
+ /* @__PURE__ */ jsx(LuLogIn, { className: "text-primary" }),
13246
+ " ",
13247
+ t("pptx.account.signIn.title")
13248
+ ] }),
13249
+ 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: [
13250
+ /* @__PURE__ */ jsx("p", { className: "mt-3 text-sm text-muted-foreground", children: t("pptx.account.signIn.description") }),
13251
+ /* @__PURE__ */ jsx(
13252
+ "button",
13253
+ {
13254
+ type: "button",
13255
+ onClick: accountAuth.onSignIn,
13256
+ className: "mt-4 bg-primary px-5 py-2.5 text-sm font-semibold text-primary-foreground hover:opacity-90",
13257
+ children: t("pptx.account.signIn.button")
13258
+ }
13259
+ )
13260
+ ] })
13261
+ ] })
13262
+ ] });
13263
+ }
13128
13264
  var ICONS = {
13129
13265
  home: LuHouse,
13130
13266
  new: LuFilePlus2,
@@ -13473,16 +13609,7 @@ function FileSection(p) {
13473
13609
  }
13474
13610
  )
13475
13611
  ] }),
13476
- page === "account" && /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] border border-border bg-card p-7 text-card-foreground", children: [
13477
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
13478
- /* @__PURE__ */ jsx("span", { className: "grid size-14 place-items-center rounded-full bg-primary text-xl font-semibold text-primary-foreground", children: "P" }),
13479
- /* @__PURE__ */ jsxs("div", { children: [
13480
- /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold", children: "PowerPoint Viewer" }),
13481
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Local-first presentation editing" })
13482
- ] })
13483
- ] }),
13484
- /* @__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." })
13485
- ] }),
13612
+ page === "account" && /* @__PURE__ */ jsx(AccountPage, {}),
13486
13613
  page === "options" && /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[760px] border border-border bg-card p-7 text-card-foreground", children: [
13487
13614
  /* @__PURE__ */ jsx(LuSettings, { className: "text-3xl text-primary" }),
13488
13615
  /* @__PURE__ */ jsx("h2", { className: "mt-4 text-lg font-semibold", children: "PowerPoint Options" }),
@@ -15138,6 +15265,7 @@ function TextSection(p) {
15138
15265
  {
15139
15266
  type: "button",
15140
15267
  "aria-label": c,
15268
+ "data-pptx-compact": true,
15141
15269
  className: `w-5 h-5 rounded-full border transition-transform hover:scale-125 ${currentColor?.toLowerCase() === c ? "border-primary ring-1 ring-primary" : "border-border"}`,
15142
15270
  style: { backgroundColor: c },
15143
15271
  onMouseDown: (e) => e.preventDefault(),
@@ -15195,6 +15323,7 @@ function TextSection(p) {
15195
15323
  {
15196
15324
  type: "button",
15197
15325
  "aria-label": c,
15326
+ "data-pptx-compact": true,
15198
15327
  className: `w-5 h-5 rounded-full border transition-transform hover:scale-125 ${currentHighlight?.toLowerCase() === c ? "border-primary ring-1 ring-primary" : "border-border"}`,
15199
15328
  style: { backgroundColor: c },
15200
15329
  onMouseDown: (e) => e.preventDefault(),
@@ -16144,6 +16273,7 @@ function DrawingGroup(p) {
16144
16273
  {
16145
16274
  type: "button",
16146
16275
  "aria-label": `Fill colour ${c}`,
16276
+ "data-pptx-compact": true,
16147
16277
  className: "w-5 h-5 rounded border border-border/60 hover:scale-110 transition-transform",
16148
16278
  style: { backgroundColor: c },
16149
16279
  title: c,
@@ -16172,6 +16302,7 @@ function DrawingGroup(p) {
16172
16302
  {
16173
16303
  type: "button",
16174
16304
  "aria-label": `Outline colour ${c}`,
16305
+ "data-pptx-compact": true,
16175
16306
  className: "w-5 h-5 rounded border border-border/60 hover:scale-110 transition-transform",
16176
16307
  style: { backgroundColor: c },
16177
16308
  title: c,
@@ -32258,6 +32389,75 @@ function MobileChromeOverlay(props) {
32258
32389
  )
32259
32390
  ] });
32260
32391
  }
32392
+ function SettingsAppearanceTab({
32393
+ activeThemeKey,
32394
+ themes,
32395
+ onSelectTheme
32396
+ }) {
32397
+ const { t } = useTranslation();
32398
+ return /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-3", children: themes.map((entry) => {
32399
+ const isActive = entry.key === activeThemeKey;
32400
+ const previewBackground = entry.theme?.colors?.background ?? "#0b0f19";
32401
+ const previewPrimary = entry.theme?.colors?.primary ?? "#6366f1";
32402
+ return /* @__PURE__ */ jsxs(
32403
+ "button",
32404
+ {
32405
+ type: "button",
32406
+ onClick: () => onSelectTheme(entry.key),
32407
+ "aria-pressed": isActive,
32408
+ className: cn(
32409
+ "flex items-center gap-3 rounded-lg border px-3 py-2.5 text-left transition-colors",
32410
+ isActive ? "border-primary bg-primary/10" : "border-border hover:border-primary/50 hover:bg-accent"
32411
+ ),
32412
+ children: [
32413
+ /* @__PURE__ */ jsx(
32414
+ "span",
32415
+ {
32416
+ className: "h-8 w-8 shrink-0 rounded-full border border-border/60 shadow-inner",
32417
+ style: {
32418
+ background: `linear-gradient(135deg, ${previewBackground} 50%, ${previewPrimary} 50%)`
32419
+ }
32420
+ }
32421
+ ),
32422
+ /* @__PURE__ */ jsx(
32423
+ "span",
32424
+ {
32425
+ className: cn("text-xs font-medium", isActive ? "text-primary" : "text-foreground"),
32426
+ children: t(entry.labelKey)
32427
+ }
32428
+ )
32429
+ ]
32430
+ },
32431
+ entry.key
32432
+ );
32433
+ }) });
32434
+ }
32435
+ function SettingsLanguageTab({
32436
+ activeLocale,
32437
+ locales,
32438
+ onSelectLocale
32439
+ }) {
32440
+ return /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: locales.map((locale) => {
32441
+ const isActive = locale.code === activeLocale;
32442
+ return /* @__PURE__ */ jsxs(
32443
+ "button",
32444
+ {
32445
+ type: "button",
32446
+ onClick: () => onSelectLocale(locale.code),
32447
+ "aria-pressed": isActive,
32448
+ className: cn(
32449
+ "flex w-full items-center justify-between rounded px-3 py-2.5 text-left transition-colors",
32450
+ isActive ? "bg-primary/10 text-primary" : "text-foreground hover:bg-accent"
32451
+ ),
32452
+ children: [
32453
+ /* @__PURE__ */ jsx("span", { className: "text-sm", children: locale.nativeLabel }),
32454
+ locale.nativeLabel !== locale.label && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: locale.label })
32455
+ ]
32456
+ },
32457
+ locale.code
32458
+ );
32459
+ }) });
32460
+ }
32261
32461
  function ToggleSwitch({
32262
32462
  label,
32263
32463
  enabled,
@@ -32293,19 +32493,16 @@ function ToggleSwitch({
32293
32493
  function SettingsDialog({
32294
32494
  isOpen,
32295
32495
  onClose,
32296
- spellCheckEnabled = false,
32297
- onSetSpellCheckEnabled,
32298
- showGrid = false,
32299
- onSetShowGrid,
32300
- showRulers = false,
32301
- onSetShowRulers,
32302
- snapToGrid = false,
32303
- onSetSnapToGrid,
32304
- reducedMotion = false,
32305
- onToggleReducedMotion
32496
+ settings,
32497
+ onSettingsChange,
32498
+ themeKey,
32499
+ availableThemes,
32500
+ onSelectTheme,
32501
+ localeCode,
32502
+ availableLocales,
32503
+ onSelectLocale
32306
32504
  }) {
32307
32505
  const [activeTab, setActiveTab] = useState("general");
32308
- const [autoSave, setAutoSave] = useState(true);
32309
32506
  const { t } = useTranslation();
32310
32507
  const { panelStyle, handlers: dragHandlers } = useModalDismissDrag(onClose);
32311
32508
  const handleKeyDown = useCallback(
@@ -32327,6 +32524,8 @@ function SettingsDialog({
32327
32524
  }
32328
32525
  const tabs = [
32329
32526
  { id: "general", label: t("pptx.settings.general") },
32527
+ { id: "appearance", label: t("pptx.settings.appearance") },
32528
+ { id: "language", label: t("pptx.settings.language") },
32330
32529
  { id: "shortcuts", label: t("pptx.settings.keyboardShortcuts") }
32331
32530
  ];
32332
32531
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -32391,56 +32590,31 @@ function SettingsDialog({
32391
32590
  tab.id
32392
32591
  )) }),
32393
32592
  /* @__PURE__ */ jsxs("div", { className: "px-5 py-4 max-h-[60vh] overflow-y-auto", children: [
32394
- activeTab === "general" && /* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
32395
- /* @__PURE__ */ jsx(
32396
- ToggleSwitch,
32397
- {
32398
- label: t("pptx.settings.autoSave"),
32399
- enabled: autoSave,
32400
- onToggle: () => setAutoSave(!autoSave)
32401
- }
32402
- ),
32403
- /* @__PURE__ */ jsx(
32404
- ToggleSwitch,
32405
- {
32406
- label: t("pptx.settings.spellCheck"),
32407
- enabled: spellCheckEnabled,
32408
- onToggle: () => onSetSpellCheckEnabled?.(!spellCheckEnabled)
32409
- }
32410
- ),
32411
- /* @__PURE__ */ jsx(
32412
- ToggleSwitch,
32413
- {
32414
- label: t("pptx.settings.showGrid"),
32415
- enabled: showGrid,
32416
- onToggle: () => onSetShowGrid?.(!showGrid)
32417
- }
32418
- ),
32419
- /* @__PURE__ */ jsx(
32420
- ToggleSwitch,
32421
- {
32422
- label: t("pptx.settings.showRulers"),
32423
- enabled: showRulers,
32424
- onToggle: () => onSetShowRulers?.(!showRulers)
32425
- }
32426
- ),
32427
- /* @__PURE__ */ jsx(
32428
- ToggleSwitch,
32429
- {
32430
- label: t("pptx.settings.snapToGrid"),
32431
- enabled: snapToGrid,
32432
- onToggle: () => onSetSnapToGrid?.(!snapToGrid)
32433
- }
32434
- ),
32435
- /* @__PURE__ */ jsx(
32436
- ToggleSwitch,
32437
- {
32438
- label: t("pptx.settings.reducedMotion"),
32439
- enabled: reducedMotion,
32440
- onToggle: () => onToggleReducedMotion?.()
32441
- }
32442
- )
32443
- ] }),
32593
+ activeTab === "general" && /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: SETTING_TOGGLES.map((toggle) => /* @__PURE__ */ jsx(
32594
+ ToggleSwitch,
32595
+ {
32596
+ label: t(toggle.labelKey),
32597
+ enabled: settings[toggle.key],
32598
+ onToggle: () => onSettingsChange(toggle.key, !settings[toggle.key])
32599
+ },
32600
+ toggle.key
32601
+ )) }),
32602
+ activeTab === "appearance" && /* @__PURE__ */ jsx(
32603
+ SettingsAppearanceTab,
32604
+ {
32605
+ activeThemeKey: themeKey,
32606
+ themes: availableThemes,
32607
+ onSelectTheme
32608
+ }
32609
+ ),
32610
+ activeTab === "language" && /* @__PURE__ */ jsx(
32611
+ SettingsLanguageTab,
32612
+ {
32613
+ activeLocale: localeCode,
32614
+ locales: availableLocales,
32615
+ onSelectLocale
32616
+ }
32617
+ ),
32444
32618
  activeTab === "shortcuts" && /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: SHORTCUT_REFERENCE_ITEMS.map((shortcut, i) => /* @__PURE__ */ jsxs(
32445
32619
  "div",
32446
32620
  {
@@ -32481,6 +32655,13 @@ var PowerPointViewer = forwardRef(
32481
32655
  onSlideCountChange,
32482
32656
  onOpenFile: hostOpenFile,
32483
32657
  theme,
32658
+ defaultThemeKey,
32659
+ availableThemes,
32660
+ onThemeChange,
32661
+ defaultLocale,
32662
+ availableLocales,
32663
+ onLocaleChange,
32664
+ accountAuth,
32484
32665
  authorName,
32485
32666
  collaboration,
32486
32667
  onStartCollaboration,
@@ -32500,7 +32681,57 @@ var PowerPointViewer = forwardRef(
32500
32681
  document.head.appendChild(style);
32501
32682
  return () => style.remove();
32502
32683
  }, [fonts]);
32503
- const themeStyle = useThemeStyle(theme);
32684
+ const [themeKey, setThemeKey] = useState(
32685
+ () => defaultThemeKey ?? readStoredViewerPrefs().themeKey ?? "default"
32686
+ );
32687
+ const themeCatalog = availableThemes ?? THEME_CATALOG;
32688
+ const effectiveTheme = theme ?? resolveThemeCatalogEntry(themeKey, themeCatalog);
32689
+ const handleThemeChange = useCallback(
32690
+ (key) => {
32691
+ setThemeKey(key);
32692
+ if (onThemeChange) {
32693
+ onThemeChange(key);
32694
+ } else {
32695
+ writeStoredViewerPrefs({ themeKey: key });
32696
+ }
32697
+ },
32698
+ [onThemeChange]
32699
+ );
32700
+ const themeStyle = useThemeStyle(effectiveTheme);
32701
+ const { i18n } = useTranslation();
32702
+ const [localeCode, setLocaleCode] = useState(
32703
+ () => defaultLocale ?? readStoredViewerPrefs().localeCode ?? "en"
32704
+ );
32705
+ useEffect(() => {
32706
+ if (localeCode !== "en" && !onLocaleChange) {
32707
+ void i18n.changeLanguage(localeCode);
32708
+ }
32709
+ }, []);
32710
+ const resolvedLocales = useMemo(() => {
32711
+ if (availableLocales) {
32712
+ return availableLocales;
32713
+ }
32714
+ const registeredCodes = i18n.options.resources ? Object.keys(i18n.options.resources) : i18n.languages ?? ["en"];
32715
+ return registeredCodes.map(
32716
+ (code) => LOCALE_CATALOG.find((entry) => entry.code === code) ?? {
32717
+ code,
32718
+ label: code,
32719
+ nativeLabel: code
32720
+ }
32721
+ );
32722
+ }, [availableLocales, i18n]);
32723
+ const handleLocaleChange = useCallback(
32724
+ (code) => {
32725
+ setLocaleCode(code);
32726
+ if (onLocaleChange) {
32727
+ onLocaleChange(code);
32728
+ } else {
32729
+ void i18n.changeLanguage(code);
32730
+ writeStoredViewerPrefs({ localeCode: code });
32731
+ }
32732
+ },
32733
+ [onLocaleChange, i18n]
32734
+ );
32504
32735
  const [content, setContent] = useState(incomingContent);
32505
32736
  useEffect(() => {
32506
32737
  setContent(incomingContent);
@@ -32545,6 +32776,51 @@ var PowerPointViewer = forwardRef(
32545
32776
  activeSlide,
32546
32777
  selectedElement
32547
32778
  } = state;
32779
+ const settings = useMemo(
32780
+ () => ({
32781
+ autoSave: autosaveEnabled,
32782
+ spellCheck: state.spellCheckEnabled,
32783
+ showGrid: state.showGrid,
32784
+ showRulers: state.showRulers,
32785
+ snapToGrid: state.snapToGrid,
32786
+ reducedMotion
32787
+ }),
32788
+ [
32789
+ autosaveEnabled,
32790
+ state.spellCheckEnabled,
32791
+ state.showGrid,
32792
+ state.showRulers,
32793
+ state.snapToGrid,
32794
+ reducedMotion
32795
+ ]
32796
+ );
32797
+ const handleSettingsChange = useCallback(
32798
+ (key, value) => {
32799
+ switch (key) {
32800
+ case "autoSave":
32801
+ setAutosaveEnabled(value);
32802
+ break;
32803
+ case "spellCheck":
32804
+ state.setSpellCheckEnabled(value);
32805
+ break;
32806
+ case "showGrid":
32807
+ state.setShowGrid(value);
32808
+ break;
32809
+ case "showRulers":
32810
+ state.setShowRulers(value);
32811
+ break;
32812
+ case "snapToGrid":
32813
+ state.setSnapToGrid(value);
32814
+ break;
32815
+ case "reducedMotion":
32816
+ if (value !== reducedMotion) {
32817
+ toggleReducedMotion();
32818
+ }
32819
+ break;
32820
+ }
32821
+ },
32822
+ [state, reducedMotion, toggleReducedMotion]
32823
+ );
32548
32824
  const mobile = useIsMobile({ containerRef });
32549
32825
  const { isMobile, isTouchDevice, isVirtualKeyboardOpen } = mobile;
32550
32826
  const resizablePanels = useResizablePanels();
@@ -32900,16 +33176,14 @@ var PowerPointViewer = forwardRef(
32900
33176
  {
32901
33177
  isOpen: isSettingsOpen,
32902
33178
  onClose: () => setIsSettingsOpen(false),
32903
- spellCheckEnabled: state.spellCheckEnabled,
32904
- onSetSpellCheckEnabled: state.setSpellCheckEnabled,
32905
- showGrid: state.showGrid,
32906
- onSetShowGrid: state.setShowGrid,
32907
- showRulers: state.showRulers,
32908
- onSetShowRulers: state.setShowRulers,
32909
- snapToGrid: state.snapToGrid,
32910
- onSetSnapToGrid: state.setSnapToGrid,
32911
- reducedMotion,
32912
- onToggleReducedMotion: toggleReducedMotion
33179
+ settings,
33180
+ onSettingsChange: handleSettingsChange,
33181
+ themeKey,
33182
+ availableThemes: themeCatalog,
33183
+ onSelectTheme: handleThemeChange,
33184
+ localeCode,
33185
+ availableLocales: resolvedLocales,
33186
+ onSelectLocale: handleLocaleChange
32913
33187
  }
32914
33188
  ),
32915
33189
  isHeaderFooterOpen && /* @__PURE__ */ jsx(
@@ -33004,7 +33278,7 @@ var PowerPointViewer = forwardRef(
33004
33278
  ]
33005
33279
  }
33006
33280
  );
33007
- return /* @__PURE__ */ jsx(SmartArt3DContext.Provider, { value: smartArt3D, children: /* @__PURE__ */ jsx(ViewerThemeProvider, { theme, children: /* @__PURE__ */ jsxs(
33281
+ return /* @__PURE__ */ jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsx(SmartArt3DContext.Provider, { value: smartArt3D, children: /* @__PURE__ */ jsx(ViewerThemeProvider, { theme: effectiveTheme, children: /* @__PURE__ */ jsxs(
33008
33282
  CollaborationProvider,
33009
33283
  {
33010
33284
  config: collaboration,
@@ -33032,7 +33306,7 @@ var PowerPointViewer = forwardRef(
33032
33306
  viewerContent
33033
33307
  ]
33034
33308
  }
33035
- ) }) });
33309
+ ) }) }) });
33036
33310
  }
33037
33311
  );
33038
33312
  PowerPointViewer.displayName = "PowerPointViewer";
Binary file
Binary file