pptx-react-viewer 1.21.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 (100) hide show
  1. package/CHANGELOG.md +10 -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-7P7QQGTI.mjs} +356 -89
  20. package/dist/chunk-7P7QQGTI.mjs.br +0 -0
  21. package/dist/chunk-7P7QQGTI.mjs.gz +0 -0
  22. package/dist/{chunk-PQUAAGKH.js → chunk-A6IFTYB5.js} +1046 -779
  23. package/dist/chunk-A6IFTYB5.js.br +0 -0
  24. package/dist/chunk-A6IFTYB5.js.gz +0 -0
  25. package/dist/{chunk-2C3XYEFM.mjs → chunk-DZUI64SO.mjs} +3 -3
  26. package/dist/chunk-DZUI64SO.mjs.br +0 -0
  27. package/dist/chunk-DZUI64SO.mjs.gz +0 -0
  28. package/dist/{chunk-4LPWBQTH.mjs → chunk-E3KJKCSV.mjs} +7 -1
  29. package/dist/chunk-E3KJKCSV.mjs.br +0 -0
  30. package/dist/{chunk-4LPWBQTH.mjs.gz → chunk-E3KJKCSV.mjs.gz} +0 -0
  31. package/dist/{chunk-2YHX6IAW.js → chunk-QVQTDWB7.js} +400 -400
  32. package/dist/chunk-QVQTDWB7.js.br +0 -0
  33. package/dist/chunk-QVQTDWB7.js.gz +0 -0
  34. package/dist/{chunk-UGAJLDGZ.js → chunk-VSNXVKJI.js} +182 -0
  35. package/dist/chunk-VSNXVKJI.js.br +0 -0
  36. package/dist/chunk-VSNXVKJI.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 }) {
@@ -2832,7 +2832,7 @@ function FailedToLoad() {
2832
2832
  var LazyModel3DScene = React14.lazy(
2833
2833
  async () => {
2834
2834
  try {
2835
- return await import('./Model3DScene-FERG6DP5.mjs');
2835
+ return await import('./Model3DScene-NLUSXHD6.mjs');
2836
2836
  } catch {
2837
2837
  return { default: FailedToLoad };
2838
2838
  }
@@ -13125,6 +13125,139 @@ function DrawSection(p) {
13125
13125
  ] })
13126
13126
  ] });
13127
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
+ }
13128
13261
  var ICONS = {
13129
13262
  home: LuHouse,
13130
13263
  new: LuFilePlus2,
@@ -13473,16 +13606,7 @@ function FileSection(p) {
13473
13606
  }
13474
13607
  )
13475
13608
  ] }),
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
- ] }),
13609
+ page === "account" && /* @__PURE__ */ jsx(AccountPage, {}),
13486
13610
  page === "options" && /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[760px] border border-border bg-card p-7 text-card-foreground", children: [
13487
13611
  /* @__PURE__ */ jsx(LuSettings, { className: "text-3xl text-primary" }),
13488
13612
  /* @__PURE__ */ jsx("h2", { className: "mt-4 text-lg font-semibold", children: "PowerPoint Options" }),
@@ -32258,6 +32382,75 @@ function MobileChromeOverlay(props) {
32258
32382
  )
32259
32383
  ] });
32260
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
+ }
32261
32454
  function ToggleSwitch({
32262
32455
  label,
32263
32456
  enabled,
@@ -32293,19 +32486,16 @@ function ToggleSwitch({
32293
32486
  function SettingsDialog({
32294
32487
  isOpen,
32295
32488
  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
32489
+ settings,
32490
+ onSettingsChange,
32491
+ themeKey,
32492
+ availableThemes,
32493
+ onSelectTheme,
32494
+ localeCode,
32495
+ availableLocales,
32496
+ onSelectLocale
32306
32497
  }) {
32307
32498
  const [activeTab, setActiveTab] = useState("general");
32308
- const [autoSave, setAutoSave] = useState(true);
32309
32499
  const { t } = useTranslation();
32310
32500
  const { panelStyle, handlers: dragHandlers } = useModalDismissDrag(onClose);
32311
32501
  const handleKeyDown = useCallback(
@@ -32327,6 +32517,8 @@ function SettingsDialog({
32327
32517
  }
32328
32518
  const tabs = [
32329
32519
  { id: "general", label: t("pptx.settings.general") },
32520
+ { id: "appearance", label: t("pptx.settings.appearance") },
32521
+ { id: "language", label: t("pptx.settings.language") },
32330
32522
  { id: "shortcuts", label: t("pptx.settings.keyboardShortcuts") }
32331
32523
  ];
32332
32524
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -32391,56 +32583,31 @@ function SettingsDialog({
32391
32583
  tab.id
32392
32584
  )) }),
32393
32585
  /* @__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
- ] }),
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
+ ),
32444
32611
  activeTab === "shortcuts" && /* @__PURE__ */ jsx("div", { className: "space-y-0.5", children: SHORTCUT_REFERENCE_ITEMS.map((shortcut, i) => /* @__PURE__ */ jsxs(
32445
32612
  "div",
32446
32613
  {
@@ -32481,6 +32648,13 @@ var PowerPointViewer = forwardRef(
32481
32648
  onSlideCountChange,
32482
32649
  onOpenFile: hostOpenFile,
32483
32650
  theme,
32651
+ defaultThemeKey,
32652
+ availableThemes,
32653
+ onThemeChange,
32654
+ defaultLocale,
32655
+ availableLocales,
32656
+ onLocaleChange,
32657
+ accountAuth,
32484
32658
  authorName,
32485
32659
  collaboration,
32486
32660
  onStartCollaboration,
@@ -32500,7 +32674,57 @@ var PowerPointViewer = forwardRef(
32500
32674
  document.head.appendChild(style);
32501
32675
  return () => style.remove();
32502
32676
  }, [fonts]);
32503
- 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
+ );
32504
32728
  const [content, setContent] = useState(incomingContent);
32505
32729
  useEffect(() => {
32506
32730
  setContent(incomingContent);
@@ -32545,6 +32769,51 @@ var PowerPointViewer = forwardRef(
32545
32769
  activeSlide,
32546
32770
  selectedElement
32547
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
+ );
32548
32817
  const mobile = useIsMobile({ containerRef });
32549
32818
  const { isMobile, isTouchDevice, isVirtualKeyboardOpen } = mobile;
32550
32819
  const resizablePanels = useResizablePanels();
@@ -32900,16 +33169,14 @@ var PowerPointViewer = forwardRef(
32900
33169
  {
32901
33170
  isOpen: isSettingsOpen,
32902
33171
  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
33172
+ settings,
33173
+ onSettingsChange: handleSettingsChange,
33174
+ themeKey,
33175
+ availableThemes: themeCatalog,
33176
+ onSelectTheme: handleThemeChange,
33177
+ localeCode,
33178
+ availableLocales: resolvedLocales,
33179
+ onSelectLocale: handleLocaleChange
32913
33180
  }
32914
33181
  ),
32915
33182
  isHeaderFooterOpen && /* @__PURE__ */ jsx(
@@ -33004,7 +33271,7 @@ var PowerPointViewer = forwardRef(
33004
33271
  ]
33005
33272
  }
33006
33273
  );
33007
- 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(
33008
33275
  CollaborationProvider,
33009
33276
  {
33010
33277
  config: collaboration,
@@ -33032,7 +33299,7 @@ var PowerPointViewer = forwardRef(
33032
33299
  viewerContent
33033
33300
  ]
33034
33301
  }
33035
- ) }) });
33302
+ ) }) }) });
33036
33303
  }
33037
33304
  );
33038
33305
  PowerPointViewer.displayName = "PowerPointViewer";
Binary file
Binary file