pptx-react-viewer 2.17.0 → 2.19.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.
- package/CHANGELOG.md +703 -0
- package/README.md +14 -14
- package/dist/{AiChatPanel-HCHCVQN2.js → AiChatPanel-2GBJETOY.js} +24 -24
- package/dist/AiChatPanel-2GBJETOY.js.br +0 -0
- package/dist/AiChatPanel-2GBJETOY.js.gz +0 -0
- package/dist/{AiChatPanel-RZ4A7P4H.mjs → AiChatPanel-FZUKTQPQ.mjs} +4 -4
- package/dist/AiChatPanel-FZUKTQPQ.mjs.br +0 -0
- package/dist/AiChatPanel-FZUKTQPQ.mjs.gz +0 -0
- package/dist/{Model3DScene-LK7LSQNH.js → Model3DScene-JHTI2AQ6.js} +2 -2
- package/dist/Model3DScene-JHTI2AQ6.js.br +0 -0
- package/dist/Model3DScene-JHTI2AQ6.js.gz +0 -0
- package/dist/{Model3DScene-I7FR74AD.mjs → Model3DScene-WRRQSYAZ.mjs} +1 -1
- package/dist/Model3DScene-WRRQSYAZ.mjs.br +0 -0
- package/dist/Model3DScene-WRRQSYAZ.mjs.gz +0 -0
- package/dist/{PowerPointViewer-Du7u4INi.d.ts → PowerPointViewer-DVFkeluD.d.ts} +2 -2
- package/dist/PowerPointViewer-DVFkeluD.d.ts.map +1 -0
- package/dist/{audience-content-store-BvqKy7Hf.d.ts → audience-content-store-ChVOSdBh.d.ts} +2 -2
- package/dist/{audience-content-store-BvqKy7Hf.d.ts.map → audience-content-store-ChVOSdBh.d.ts.map} +1 -1
- package/dist/{chunk-7JPLVECA.js → chunk-7ARD2J6Y.js} +10502 -7059
- package/dist/chunk-7ARD2J6Y.js.br +0 -0
- package/dist/chunk-7ARD2J6Y.js.gz +0 -0
- package/dist/{chunk-ZA5JONCW.mjs → chunk-BO373PYH.mjs} +257 -184
- package/dist/chunk-BO373PYH.mjs.br +0 -0
- package/dist/chunk-BO373PYH.mjs.gz +0 -0
- package/dist/{chunk-TCGXGD6E.js → chunk-IRLOXBO7.js} +608 -535
- package/dist/chunk-IRLOXBO7.js.br +0 -0
- package/dist/chunk-IRLOXBO7.js.gz +0 -0
- package/dist/{chunk-AONFHTTJ.js → chunk-MVKRI3CZ.js} +36 -4
- package/dist/chunk-MVKRI3CZ.js.br +0 -0
- package/dist/chunk-MVKRI3CZ.js.gz +0 -0
- package/dist/{chunk-MQHC5TXI.mjs → chunk-MWEBCWVD.mjs} +38 -2347
- package/dist/chunk-MWEBCWVD.mjs.br +0 -0
- package/dist/chunk-MWEBCWVD.mjs.gz +0 -0
- package/dist/{chunk-NQJPPIVH.js → chunk-NFFV3RDS.js} +1632 -1201
- package/dist/chunk-NFFV3RDS.js.br +0 -0
- package/dist/chunk-NFFV3RDS.js.gz +0 -0
- package/dist/{chunk-5BXATG54.js → chunk-OVPJT4EQ.js} +182 -2490
- package/dist/chunk-OVPJT4EQ.js.br +0 -0
- package/dist/chunk-OVPJT4EQ.js.gz +0 -0
- package/dist/{chunk-ATOUVRRQ.js → chunk-RPJ2BIQ7.js} +3 -3
- package/dist/chunk-RPJ2BIQ7.js.br +0 -0
- package/dist/chunk-RPJ2BIQ7.js.gz +0 -0
- package/dist/{chunk-S64T7C4V.mjs → chunk-SQJBFMEX.mjs} +36 -4
- package/dist/chunk-SQJBFMEX.mjs.br +0 -0
- package/dist/chunk-SQJBFMEX.mjs.gz +0 -0
- package/dist/{chunk-K2QU73KB.mjs → chunk-XF3EOHY2.mjs} +10455 -7039
- package/dist/chunk-XF3EOHY2.mjs.br +0 -0
- package/dist/chunk-XF3EOHY2.mjs.gz +0 -0
- package/dist/{chunk-422DF424.mjs → chunk-YWJBD7KV.mjs} +654 -223
- package/dist/chunk-YWJBD7KV.mjs.br +0 -0
- package/dist/chunk-YWJBD7KV.mjs.gz +0 -0
- package/dist/{chunk-FXJOTEPO.mjs → chunk-ZMEYXAC6.mjs} +1 -1
- package/dist/chunk-ZMEYXAC6.mjs.br +0 -0
- package/dist/chunk-ZMEYXAC6.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +535 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +65 -41
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +645 -47
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +79 -79
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/{types-DU35aAJK.d.ts → types-TCH6icpi.d.ts} +25 -31
- package/dist/types-TCH6icpi.d.ts.map +1 -0
- package/dist/{useViewerBuildingBlocks-C9-prKYB.d.ts → useViewerBuildingBlocks-BKb0qs1j.d.ts} +34 -5
- package/dist/useViewerBuildingBlocks-BKb0qs1j.d.ts.map +1 -0
- package/dist/viewer/index.d.ts +465 -40
- package/dist/viewer/index.js +27 -27
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +2 -2
- package/dist/AiChatPanel-HCHCVQN2.js.br +0 -0
- package/dist/AiChatPanel-HCHCVQN2.js.gz +0 -0
- package/dist/AiChatPanel-RZ4A7P4H.mjs.br +0 -0
- package/dist/AiChatPanel-RZ4A7P4H.mjs.gz +0 -0
- package/dist/Model3DScene-I7FR74AD.mjs.br +0 -0
- package/dist/Model3DScene-I7FR74AD.mjs.gz +0 -0
- package/dist/Model3DScene-LK7LSQNH.js.br +0 -0
- package/dist/Model3DScene-LK7LSQNH.js.gz +0 -0
- package/dist/PowerPointViewer-Du7u4INi.d.ts.map +0 -1
- package/dist/SurfaceChart3DScene-DEQP5O3U.mjs +0 -76
- package/dist/SurfaceChart3DScene-DEQP5O3U.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-DEQP5O3U.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-ODQY77SZ.js +0 -78
- package/dist/SurfaceChart3DScene-ODQY77SZ.js.br +0 -0
- package/dist/SurfaceChart3DScene-ODQY77SZ.js.gz +0 -0
- package/dist/chunk-422DF424.mjs.br +0 -0
- package/dist/chunk-422DF424.mjs.gz +0 -0
- package/dist/chunk-5BXATG54.js.br +0 -0
- package/dist/chunk-5BXATG54.js.gz +0 -0
- package/dist/chunk-7JPLVECA.js.br +0 -0
- package/dist/chunk-7JPLVECA.js.gz +0 -0
- package/dist/chunk-AONFHTTJ.js.br +0 -0
- package/dist/chunk-AONFHTTJ.js.gz +0 -0
- package/dist/chunk-ATOUVRRQ.js.br +0 -0
- package/dist/chunk-ATOUVRRQ.js.gz +0 -0
- package/dist/chunk-FXJOTEPO.mjs.br +0 -0
- package/dist/chunk-FXJOTEPO.mjs.gz +0 -0
- package/dist/chunk-K2QU73KB.mjs.br +0 -0
- package/dist/chunk-K2QU73KB.mjs.gz +0 -0
- package/dist/chunk-MQHC5TXI.mjs.br +0 -0
- package/dist/chunk-MQHC5TXI.mjs.gz +0 -0
- package/dist/chunk-NQJPPIVH.js.br +0 -0
- package/dist/chunk-NQJPPIVH.js.gz +0 -0
- package/dist/chunk-S64T7C4V.mjs.br +0 -0
- package/dist/chunk-S64T7C4V.mjs.gz +0 -0
- package/dist/chunk-TCGXGD6E.js.br +0 -0
- package/dist/chunk-TCGXGD6E.js.gz +0 -0
- package/dist/chunk-ZA5JONCW.mjs.br +0 -0
- package/dist/chunk-ZA5JONCW.mjs.gz +0 -0
- package/dist/types-DU35aAJK.d.ts.map +0 -1
- package/dist/useViewerBuildingBlocks-C9-prKYB.d.ts.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { computeFocusTargets, aiChangeAnimationCss, changeGhostStyle, createChatHistoryStore, toRenderableParts } from './chunk-
|
|
2
|
-
import { useReducedMotion, useViewerState, useViewerOptions, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useLayoutSwitching, useYjsDocumentSync, useCollaborationLivePatch, useFollowMode, useBroadcastFollower, scopeLayoutOptionsToActiveSlide, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, useCollaborativeState, useVirtualizedSlides, useSwipeNavigation, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, downloadBlob } from './chunk-
|
|
3
|
-
import { MIN_ELEMENT_SIZE, DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, SHAPE_PRESETS, ANIMATION_PRESET_OPTIONS, DEFAULT_FILL_COLOR, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getCropShapeClipPath, getImageTilingStyle, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, buildTextBody3DSceneStyle, SLIDE_NAV_THUMBNAIL_WIDTH, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, TOOLBAR_SECTIONS, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, HYPERLINK_COLOR, GRID_SIZE, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, THEME_COLOR_SWATCHES, STROKE_DASH_OPTIONS } from './chunk-
|
|
4
|
-
import { LOCALE_CATALOG, translationsEn } from './chunk-
|
|
5
|
-
import { hasShapeProperties, normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, hasTextProperties, getElementTransform, getAriaRoleDescription, getAriaLabel, getAriaRole, resolveElementInteractivity, isEditableTextElement, isElementRendered, isElementActionable, getImageEffectsOpacity, getImageEffectsFilter, getElementTransformWithoutRotation, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, ACTION_BUTTON_PRESETS, mediaTransportVisible, isInkElement, getGroupChildParentFill, getElementLabel, SWITCHABLE_LAYOUT_TYPES, DEFAULT_VIEWER_OPTIONS, compileEquationTemplateMathMl, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, viewerOptionsToPreferences, applyPreferenceToOptions, listAutosaveSnapshots, deleteAutosaveSnapshot, resolveAutosaveIntervalSeconds, paintedStrokeWidth, buildCssGradientFromShapeStyle, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, getComputedEffectStyle, getSoftEdgeSvgFilter, buildStrokeOutline, buildHollowHitOutline, strokeOutlineViewBox, revealedSmartArtNodeCount, buildSmartArtA11y, computeSmartArtLayout, flattenNodes, buildSummaryZoomView, isImageTiled, getImageColorWashStyle, isImageLikeElement, placeCaretAtEnd, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, applyChartBuildReveal, formatAxisValue, hasPressureVariation, getInkReplayStyles, INK_REPLAY_KEYFRAMES, resolveInkColor, resolveInkWidth, resolveInkOpacity, pressuresToWidths, getContentPartReplayStyles, resolveOleType, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, RULER_THICKNESS, RULER_FONT_SIZE, buildPreviewElements, deriveSlideFieldContext, SLIDE_TRANSITION_OPTIONS, hiddenSlideCue, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, themeToCssVars, applyMotionPathPreset, resetSlideLayoutPath, DEFAULT_INSERT_CHART_KIND, hasCopyableFormat, templateSchemeFromTheme, createBackstagePresentation, printPropertiesFrameSlides, printPropertiesSlidesPerPage, VIEWER_OPTIONS_TABS, DEFAULT_QUICK_ACCESS_COMMAND_IDS, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_PANEL_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_HINT_CLASS, DEFAULT_PALETTE2, resolvePalette, computeDrawingViewBox, projectDrawingShapes, styleShadowFilter, resolveDrawingShapeNodeId, getImageSvgFilters, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, findChartPartTarget, dragValueForPart, withChartPointValue, dragAnchorViewY, withChartTitle, buildSmartArt3DModel, extractPathPoints, generatePressureCircles, isBrowserOpenableMime, formatBytes, getOleBadgeLabel, openUrlInNewTab, getSubstituteFontFamily, getWarpPath, getSlideBackgroundStyle, filterCommands, resolveTitleBarStatusKey, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, buildFieldSubstitutionContext, shouldConfirmExternalHyperlink, safeOpenUrl, isPpactionUrl, parsePpactionUrl, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, buildContextMenuEntries, themeColorSchemesEqual, EXPANDED_MAX_HEIGHT, STATUS_BAR_CLASSES, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, clampPercent, HANDOUT_OPTIONS, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS, resolveViewerAddinRows, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, CUSTOM_FONT_ACCEPT, activateModalFocus, buildCollaborationShareUrl, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, centeredSvgTextLines, computeInlineEditorRect, findSmartArtNodeText, setSmartArtNodeStyle, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, updateSmartArtNodeText, groupIntoParagraphs, substituteFieldText, extraQuickAccessCommands, TAB_ROW_ACTION_CLASSES, listBackstageRecentFiles, BACKSTAGE_NAV, INSERT_CHART_TYPES, CHARACTER_SPACING_OPTIONS, RIBBON_SHAPE_SWATCHES, shapeFillChange, shapeOutlineChange, readRibbonTransitionDraft, ribbonTransitionUpdates, RIBBON_TRANSITION_PRESETS, DEFAULT_MOTION_PATH_PRESET_ID, SLIDE_SHOW_OPTIONS, slideShowOptionChange, readSlideShowOption, SLIDE_VIRTUALIZATION_THRESHOLD, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, annotationOverlayZIndex, presentationInkPath, motionPathFor, setMotionPath,
|
|
1
|
+
import { computeFocusTargets, aiChangeAnimationCss, changeGhostStyle, createChatHistoryStore, toRenderableParts } from './chunk-ZMEYXAC6.mjs';
|
|
2
|
+
import { useReducedMotion, useViewerState, useViewerOptions, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useLayoutSwitching, useYjsDocumentSync, useCollaborationLivePatch, useFollowMode, useBroadcastFollower, scopeLayoutOptionsToActiveSlide, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, useCollaborativeState, useVirtualizedSlides, useSwipeNavigation, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, downloadBlob } from './chunk-BO373PYH.mjs';
|
|
3
|
+
import { MIN_ELEMENT_SIZE, DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, SHAPE_PRESETS, ANIMATION_PRESET_OPTIONS, DEFAULT_FILL_COLOR, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getCropShapeClipPath, getImageTilingStyle, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, buildTextBody3DSceneStyle, SLIDE_NAV_THUMBNAIL_WIDTH, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, TOOLBAR_SECTIONS, DEFAULT_SECTION_GROUP_ID, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, HYPERLINK_COLOR, GRID_SIZE, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, THEME_COLOR_SWATCHES, STROKE_DASH_OPTIONS } from './chunk-MWEBCWVD.mjs';
|
|
4
|
+
import { LOCALE_CATALOG, translationsEn } from './chunk-SQJBFMEX.mjs';
|
|
5
|
+
import { hasShapeProperties, normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, hasTextProperties, getElementTransform, getAriaRoleDescription, getAriaLabel, getAriaRole, resolveElementInteractivity, isEditableTextElement, isElementRendered, isElementActionable, getImageEffectsOpacity, getImageEffectsFilter, getElementTransformWithoutRotation, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, ACTION_BUTTON_PRESETS, mediaTransportVisible, isInkElement, getGroupChildParentFill, getElementLabel, SWITCHABLE_LAYOUT_TYPES, DEFAULT_VIEWER_OPTIONS, compileEquationTemplateMathMl, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, resolveAutosaveActivation, viewerOptionsToPreferences, applyPreferenceToOptions, listAutosaveSnapshots, deleteAutosaveSnapshot, resolveAutosaveIntervalMs, resolveAutosaveIntervalSeconds, shouldShowAutosaveRecoveryPrompt, paintedStrokeWidth, buildCssGradientFromShapeStyle, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, getComputedEffectStyle, getSoftEdgeSvgFilter, buildStrokeOutline, buildHollowHitOutline, strokeOutlineViewBox, revealedSmartArtNodeCount, buildSmartArtA11y, computeSmartArtLayout, flattenNodes, buildSummaryZoomView, isImageTiled, getImageColorWashStyle, isImageLikeElement, placeCaretAtEnd, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, ensureChartInteractionStyles, applyChartBuildReveal, formatAxisValue, hasPressureVariation, getInkReplayStyles, INK_REPLAY_KEYFRAMES, resolveInkColor, resolveInkWidth, resolveInkOpacity, pressuresToWidths, getContentPartReplayStyles, resolveOleType, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, getTextBodyRotationTransform, RULER_THICKNESS, RULER_FONT_SIZE, buildPreviewElements, deriveSlideFieldContext, SLIDE_TRANSITION_OPTIONS, hiddenSlideCue, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, themeToCssVars, applyMotionPathPreset, resetSlideLayoutPath, DEFAULT_INSERT_CHART_KIND, hasCopyableFormat, templateSchemeFromTheme, createBackstagePresentation, setMasterViewBackgroundColor, printPropertiesFrameSlides, printPropertiesSlidesPerPage, VIEWER_OPTIONS_TABS, DEFAULT_QUICK_ACCESS_COMMAND_IDS, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_PANEL_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_HINT_CLASS, DEFAULT_PALETTE2, resolvePalette, computeDrawingViewBox, projectDrawingShapes, styleShadowFilter, resolveDrawingShapeNodeId, getImageSvgFilters, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, findChartPartTarget, dragValueForPart, withChartPointValue, dragAnchorViewY, withChartTitle, buildSmartArt3DModel, extractPathPoints, generatePressureCircles, isBrowserOpenableMime, formatBytes, getOleBadgeLabel, openUrlInNewTab, getSubstituteFontFamily, getWarpPath, getSlideBackgroundStyle, filterCommands, resolveTitleBarStatusKey, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, masterViewBackgroundColor, buildFieldSubstitutionContext, shouldConfirmExternalHyperlink, safeOpenUrl, isPpactionUrl, parsePpactionUrl, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, buildContextMenuEntries, themeColorSchemesEqual, EXPANDED_MAX_HEIGHT, STATUS_BAR_CLASSES, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, clampPercent, HANDOUT_OPTIONS, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS, resolveViewerAddinRows, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, CUSTOM_FONT_ACCEPT, activateModalFocus, buildCollaborationShareUrl, SORTER_MIN_ZOOM, SORTER_ZOOM_STEP, SORTER_MAX_ZOOM, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, centeredSvgTextLines, computeInlineEditorRect, findSmartArtNodeText, setSmartArtNodeStyle, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, updateSmartArtNodeText, groupIntoParagraphs, substituteFieldText, extraQuickAccessCommands, TAB_ROW_ACTION_CLASSES, listBackstageRecentFiles, BACKSTAGE_NAV, INSERT_CHART_TYPES, CHARACTER_SPACING_OPTIONS, RIBBON_SHAPE_SWATCHES, shapeFillChange, shapeOutlineChange, readRibbonTransitionDraft, ribbonTransitionUpdates, playSlideTransitionPreview, RIBBON_TRANSITION_PRESETS, DEFAULT_MOTION_PATH_PRESET_ID, SLIDE_SHOW_OPTIONS, slideShowOptionChange, readSlideShowOption, SLIDE_VIRTUALIZATION_THRESHOLD, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, annotationOverlayZIndex, presentationInkPath, motionPathFor, setMotionPath, getShapeAdjustmentHandleDescriptors, PRESENTER_NAVIGATOR_LABEL_KEYS, PEN_COLORS, HIGHLIGHTER_COLORS, isBlackboardActive, slideSizeToCanvasPx, resolveSelectionPaneRename, PRESET_THEMES, normalizeSegments, createPlainNotesSegments, segmentsToEditorHtml, DEBOUNCE_MS, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX, isUrlSafe, escapeHtml2, sanitizeMathMl, computeHandoutLayout, getPrintableArea, generateNoteLineCount, computeAllNotesPages, getNotesPrintableArea, QUICK_ACCESS_COMMAND_CATALOG, registerCustomFont, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, PRESENTER_CONSOLE_CONTROLS, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, backstageCardsFor, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, resolveDefaultFontFamily, buildFontCatalog, ENTRANCE_PRESET_VALUES, EMPHASIS_PRESET_VALUES, EXIT_PRESET_VALUES, MOTION_PATH_FAMILIES, motionPathFamilyLabelKey, motionPathPresetsByFamily, motionPathPresetLabelKey, masterViewPseudoSlide, authorConnectorBetweenSites, generateTicks, rulerDragToGuidePosition, getCommentMarkerPosition, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, themeColorLabel, buildThemeColorGrid, THEME_COLOR_SCHEME_KEYS, COMMON_FONTS, buildSmartArtPresetData, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, isCurrentLayout, SLIDE_TEMPLATES, CONNECTOR_SITE_SNAP_PX, resolveConnectorEndpointUpdate, withConnectorEndpointUpdate, getShapeConnectionSites, isElementLocked, mergeSlideTransition, mapSlideSorterKey, isEditorTextInputTarget, clampSorterZoom, buildLayoutPreviewGeometry, buildSlideTemplateContent, elementLockTogglePatch, buildTableDataGrid, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, TABLE_STYLE_PRESETS, chartDataChangeType, setChartCategoryLabel, setChartCellValue, addChartCategory, removeChartCategory, addChartSeries, removeChartSeries, setChartAxisLogScale, setChartAxisTitleStyle, setChartAxisGridlineStyle, setChartSeriesMarker, setChartSeriesChartType, setChartDataPointFill, setChartDataPointExplosion, setChartDataPointMarker, setChartDataPointLabel, getOleObjectTypeLabel, sanitizeGradientStops, pptxActionToElementAction, withFrameSlides, withSlidesPerPage, applyThemeOverrideToSlide, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, resolveSlideSizeSelection, SLIDE_SIZE_PRESETS, TRANSITION_VALID_DIRECTIONS, TRANSITION_ORIENTATION_TYPES, clampTransitionNumber, flattenTagCollections, formatCommentTimestamp, clearMotionPath, DIRECTIONAL_PRESETS, motionPathPresetIdForPath, computeMergeCellRight, computeMergeCellDown, computeSplitCell, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, addSmartArtNodeAsChild, removeSmartArtNode, clampCropValue, DUOTONE_PRESETS, ARTISTIC_EFFECTS, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, toSlideIndex, elementActionToPptxAction, canCommitActionType, slideSizeFromPreset, withSlideSizeOrientation, TRANSITION_DIR_ARROWS, buildDirectionGrid, updateTagInCollections, deleteTagFromCollections, addTagToCollections, commentTextSegments, COMMENT_MENTION_CLASS, COMMENT_MENTION_ATTRIBUTE, animationEffectLabel, LBL, SEL, FILL_MODE_OPTIONS, SECTION_HEADING, NUM, switchSmartArtLayout, addSmartArtNode, demoteSmartArtNode, promoteSmartArtNode, reorderSmartArtNode, SHAPE_QUICK_STYLES, quickStyleSwatchCss, getPatternSvg, TEXT_WARP_PRESETS, warpPreviewPath, text3dPtToEmu, text3dEmuToPt, MATERIAL_PRESETS, GRADIENT_TYPE_OPTIONS, PATTERN_OPTIONS, FILL_PATTERN_LABEL_KEYS, openNativeEyeDropper, toggleText3dExtrusion, BEVEL_PRESETS } from './chunk-XF3EOHY2.mjs';
|
|
6
6
|
import React14, { createContext, useMemo, useState, useCallback, lazy, forwardRef, useEffect, useRef, Suspense, useLayoutEffect, useContext, Fragment as Fragment$1, useDeferredValue } from 'react';
|
|
7
7
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
|
-
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,
|
|
9
|
+
import { LuRotateCw, LuMessageSquare, LuEyeOff, LuHistory, LuTrash2, LuSettings, LuX, LuCalendarDays, LuHash, LuText, LuCast, LuSave, LuUndo, LuRedo, LuSearch, LuShieldCheck, LuPlus, LuPanelLeftClose, LuStickyNote, LuMonitor, LuColumns2, LuPresentation, LuMinus, LuLayers, LuSettings2, LuClock, LuDownload, LuCheck, LuLock, LuEye, LuFileText, LuType, LuLoader, LuShieldAlert, LuSignature, LuInfo, LuTriangleAlert, LuPrinter, LuPenTool, LuBug, LuChevronUp, LuChevronDown, LuUpload, LuWifi, LuWifiOff, LuUsers, LuCopy, LuChevronLeft, LuChevronRight, LuPlay, LuPause, LuZoomOut, LuZoomIn, LuSpellCheck, LuFileDown, LuMenu, LuSparkles, LuShare2, LuPanelLeft, LuPanelRight, LuArrowLeft, LuFolderOpen, LuClipboardPaste, LuScissors, LuPaintbrush, LuSquare, LuImage, LuVideo, LuDatabase, LuAArrowUp, LuAArrowDown, LuRemoveFormatting, LuHighlighter, LuList, LuListOrdered, LuIndentDecrease, LuIndentIncrease, LuReplace, LuMousePointer2, LuShapes, LuPaintBucket, LuPenLine, LuPalette, LuPencil, LuStar, LuMoveRight, LuMousePointerClick, LuClock3, LuMonitorPlay, LuListVideo, LuCaptions, LuCamera, LuEraser, LuRotateCcw, LuCircleHelp, LuBookOpen, LuLanguages, LuGlobe, LuGitCompare, LuMessageSquarePlus, LuLockKeyhole, LuPanelTop, LuLayoutGrid, LuGrid3X3, LuPipette, LuRuler, LuMaximize2, LuCode, LuCaseSensitive, LuTimer, LuGripVertical, LuLoaderCircle, LuBold, LuItalic, LuUnderline, LuStrikethrough, LuLink, LuGrid2X2, LuCopyPlus, LuScan, LuMonitorOff, LuCirclePlay, LuCirclePause, LuArrowLeftRight, LuClipboardCopy, LuWand, LuTextCursorInput, LuFile, LuEllipsis, LuUserRound, LuFilePlus2, LuHouse, LuPackage, LuFileJson, LuBox, LuFileImage, LuUser, LuHardDrive, LuLogIn, LuLayoutTemplate, LuFolderPlus, LuAlignLeft, LuAlignCenter, LuAlignRight, LuAlignJustify, LuColumns3, LuSpline, LuAlignHorizontalSpaceAround, LuAlignVerticalSpaceAround, LuGroup, LuUngroup, LuMove, LuRadio, LuLockOpen, LuArrowDown, LuArrowUp, LuArrowRight, LuReply, LuBookmark } from 'react-icons/lu';
|
|
10
10
|
|
|
11
11
|
var ViewerThemeContext = createContext(void 0);
|
|
12
12
|
function ViewerThemeProvider({ theme, children }) {
|
|
@@ -479,23 +479,6 @@ function useChartPartSelection() {
|
|
|
479
479
|
return useContext(ChartPartSelectionContext);
|
|
480
480
|
}
|
|
481
481
|
var DRAG_THRESHOLD_PX = 3;
|
|
482
|
-
var STYLE_ELEMENT_ID = "pptx-chart-interaction-styles";
|
|
483
|
-
var INTERACTION_CSS = `
|
|
484
|
-
.pptx-chart-interactive svg [data-chart-part] { pointer-events: auto; cursor: pointer; }
|
|
485
|
-
.pptx-chart-interactive svg [data-chart-part]:hover { filter: brightness(1.12); }
|
|
486
|
-
.pptx-chart-interactive svg [data-chart-part='title'] { cursor: text; }
|
|
487
|
-
.pptx-chart-interactive svg .pptx-chart-part-selected { filter: drop-shadow(0 0 2.5px #3b82f6); }
|
|
488
|
-
.pptx-chart-interactive svg .pptx-chart-part-selected:hover { filter: drop-shadow(0 0 2.5px #3b82f6) brightness(1.12); }
|
|
489
|
-
`;
|
|
490
|
-
function ensureInteractionStyles() {
|
|
491
|
-
if (typeof document === "undefined" || document.getElementById(STYLE_ELEMENT_ID)) {
|
|
492
|
-
return;
|
|
493
|
-
}
|
|
494
|
-
const style = document.createElement("style");
|
|
495
|
-
style.id = STYLE_ELEMENT_ID;
|
|
496
|
-
style.textContent = INTERACTION_CSS;
|
|
497
|
-
document.head.appendChild(style);
|
|
498
|
-
}
|
|
499
482
|
function ChartElementView({
|
|
500
483
|
element,
|
|
501
484
|
editable,
|
|
@@ -514,12 +497,15 @@ function ChartElementView({
|
|
|
514
497
|
() => canEdit ? buildReactChartViewModel(element) : null,
|
|
515
498
|
[canEdit, element]
|
|
516
499
|
);
|
|
517
|
-
useEffect(
|
|
500
|
+
useEffect(ensureChartInteractionStyles, []);
|
|
518
501
|
useEffect(() => {
|
|
502
|
+
if (!onUpdateElement) {
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
519
505
|
if (!canEdit && selection?.elementId === element.id) {
|
|
520
506
|
setSelection(null);
|
|
521
507
|
}
|
|
522
|
-
}, [canEdit, selection, element.id, setSelection]);
|
|
508
|
+
}, [canEdit, selection, element.id, setSelection, onUpdateElement]);
|
|
523
509
|
useEffect(() => {
|
|
524
510
|
const root = wrapperRef.current;
|
|
525
511
|
if (!root) {
|
|
@@ -1060,7 +1046,7 @@ var EDGE_HANDLES = [
|
|
|
1060
1046
|
];
|
|
1061
1047
|
function ResizeHandles({
|
|
1062
1048
|
elementId,
|
|
1063
|
-
|
|
1049
|
+
adjustmentHandles,
|
|
1064
1050
|
onResizePointerDown,
|
|
1065
1051
|
onAdjustmentPointerDown,
|
|
1066
1052
|
forcePointerEvents,
|
|
@@ -1178,16 +1164,17 @@ function ResizeHandles({
|
|
|
1178
1164
|
]
|
|
1179
1165
|
}
|
|
1180
1166
|
) : null,
|
|
1181
|
-
adjH
|
|
1167
|
+
adjustmentHandles.map((adjH) => /* @__PURE__ */ jsx(
|
|
1182
1168
|
"button",
|
|
1183
1169
|
{
|
|
1184
1170
|
type: "button",
|
|
1185
1171
|
"aria-label": t("pptx.canvas.adjustShape"),
|
|
1172
|
+
"data-pptx-adjust-key": adjH.key,
|
|
1186
1173
|
"data-pptx-compact": true,
|
|
1187
1174
|
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",
|
|
1188
1175
|
style: {
|
|
1189
1176
|
left: adjH.left - 5,
|
|
1190
|
-
top: adjH.top,
|
|
1177
|
+
top: adjH.top - 5,
|
|
1191
1178
|
cursor: adjH.cursor,
|
|
1192
1179
|
...HANDLE_TOUCH_ACTION,
|
|
1193
1180
|
...forcePointerEvents ? { pointerEvents: "auto" } : {}
|
|
@@ -1198,14 +1185,15 @@ function ResizeHandles({
|
|
|
1198
1185
|
}
|
|
1199
1186
|
e.stopPropagation();
|
|
1200
1187
|
e.currentTarget.setPointerCapture?.(e.pointerId);
|
|
1201
|
-
onAdjustmentPointerDown(elementId, e);
|
|
1188
|
+
onAdjustmentPointerDown(elementId, e, adjH);
|
|
1202
1189
|
},
|
|
1203
1190
|
onMouseDown: (e) => {
|
|
1204
1191
|
e.stopPropagation();
|
|
1205
|
-
onAdjustmentPointerDown(elementId, e);
|
|
1192
|
+
onAdjustmentPointerDown(elementId, e, adjH);
|
|
1206
1193
|
}
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1194
|
+
},
|
|
1195
|
+
adjH.key
|
|
1196
|
+
))
|
|
1209
1197
|
] });
|
|
1210
1198
|
}
|
|
1211
1199
|
var ConnectorElementRenderer = React14.memo(
|
|
@@ -1219,7 +1207,7 @@ var ConnectorElementRenderer = React14.memo(
|
|
|
1219
1207
|
selectionColorClass: selClr,
|
|
1220
1208
|
opacity,
|
|
1221
1209
|
zIndex,
|
|
1222
|
-
|
|
1210
|
+
adjustmentHandles: adjH,
|
|
1223
1211
|
onResizePointerDown,
|
|
1224
1212
|
onAdjustmentPointerDown,
|
|
1225
1213
|
animationState
|
|
@@ -1432,7 +1420,7 @@ var ConnectorElementRenderer = React14.memo(
|
|
|
1432
1420
|
ResizeHandles,
|
|
1433
1421
|
{
|
|
1434
1422
|
elementId: el.id,
|
|
1435
|
-
|
|
1423
|
+
adjustmentHandles: adjH,
|
|
1436
1424
|
onResizePointerDown,
|
|
1437
1425
|
onAdjustmentPointerDown,
|
|
1438
1426
|
forcePointerEvents: true
|
|
@@ -1770,7 +1758,7 @@ var ElementRenderer = React14.memo(
|
|
|
1770
1758
|
showResizeHandles,
|
|
1771
1759
|
renderInk: doInk,
|
|
1772
1760
|
renderGroups: doGrp,
|
|
1773
|
-
|
|
1761
|
+
adjustmentHandles: adjH,
|
|
1774
1762
|
onResizePointerDown,
|
|
1775
1763
|
onAdjustmentPointerDown,
|
|
1776
1764
|
onRotate,
|
|
@@ -1859,7 +1847,7 @@ var ElementRenderer = React14.memo(
|
|
|
1859
1847
|
selectionColorClass: selClr,
|
|
1860
1848
|
opacity,
|
|
1861
1849
|
zIndex,
|
|
1862
|
-
|
|
1850
|
+
adjustmentHandles: adjH,
|
|
1863
1851
|
onResizePointerDown,
|
|
1864
1852
|
onAdjustmentPointerDown,
|
|
1865
1853
|
animationState
|
|
@@ -2014,7 +2002,7 @@ var ElementRenderer = React14.memo(
|
|
|
2014
2002
|
ResizeHandles,
|
|
2015
2003
|
{
|
|
2016
2004
|
elementId: el.id,
|
|
2017
|
-
|
|
2005
|
+
adjustmentHandles: adjH,
|
|
2018
2006
|
onResizePointerDown,
|
|
2019
2007
|
onAdjustmentPointerDown,
|
|
2020
2008
|
rotation: el.rotation,
|
|
@@ -2586,7 +2574,7 @@ function FailedToLoad() {
|
|
|
2586
2574
|
var LazyModel3DScene = React14.lazy(
|
|
2587
2575
|
async () => {
|
|
2588
2576
|
try {
|
|
2589
|
-
return await import('./Model3DScene-
|
|
2577
|
+
return await import('./Model3DScene-WRRQSYAZ.mjs');
|
|
2590
2578
|
} catch {
|
|
2591
2579
|
return { default: FailedToLoad };
|
|
2592
2580
|
}
|
|
@@ -3965,8 +3953,7 @@ function renderTextElementBody(options) {
|
|
|
3965
3953
|
hasTextProperties(el) ? el.textStyle?.textWarpPreset : void 0
|
|
3966
3954
|
);
|
|
3967
3955
|
const scene3dStyle = hasTextProperties(el) ? buildTextBody3DSceneStyle(el.textStyle) : void 0;
|
|
3968
|
-
const
|
|
3969
|
-
const rotationTransform = typeof bodyRotation === "number" && Number.isFinite(bodyRotation) && bodyRotation !== 0 ? `rotate(${bodyRotation}deg)` : void 0;
|
|
3956
|
+
const rotationTransform = getTextBodyRotationTransform(el);
|
|
3970
3957
|
const composedTransform = [rotationTransform, getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
|
|
3971
3958
|
const transformStyle = {
|
|
3972
3959
|
transform: composedTransform,
|
|
@@ -5491,11 +5478,7 @@ function TransitionsSection(p) {
|
|
|
5491
5478
|
type: "button",
|
|
5492
5479
|
className: pill,
|
|
5493
5480
|
title: t("pptx.ribbon.previewTransition"),
|
|
5494
|
-
onClick: () =>
|
|
5495
|
-
if (p.activeSlide?.transition) {
|
|
5496
|
-
commit({});
|
|
5497
|
-
}
|
|
5498
|
-
},
|
|
5481
|
+
onClick: () => playSlideTransitionPreview(p.activeSlide?.transition, document),
|
|
5499
5482
|
children: [
|
|
5500
5483
|
/* @__PURE__ */ jsx(LuPlay, { className: ics }),
|
|
5501
5484
|
t("pptx.ribbon.preview")
|
|
@@ -5549,6 +5532,7 @@ function TransitionsSection(p) {
|
|
|
5549
5532
|
/* @__PURE__ */ jsx(
|
|
5550
5533
|
"select",
|
|
5551
5534
|
{
|
|
5535
|
+
"aria-label": t("pptx.ribbon.sound"),
|
|
5552
5536
|
className: "w-24 px-1.5 py-1 rounded border border-border bg-muted text-xs text-foreground disabled:opacity-50",
|
|
5553
5537
|
defaultValue: "none",
|
|
5554
5538
|
disabled: true,
|
|
@@ -5592,6 +5576,7 @@ function TransitionsSection(p) {
|
|
|
5592
5576
|
"input",
|
|
5593
5577
|
{
|
|
5594
5578
|
type: "checkbox",
|
|
5579
|
+
"aria-label": t("pptx.ribbon.afterDuration"),
|
|
5595
5580
|
disabled: !canEdit,
|
|
5596
5581
|
checked: draft.advanceAfter,
|
|
5597
5582
|
onChange: (e) => commit({ advanceAfter: e.target.checked }),
|
|
@@ -5603,6 +5588,7 @@ function TransitionsSection(p) {
|
|
|
5603
5588
|
"input",
|
|
5604
5589
|
{
|
|
5605
5590
|
type: "text",
|
|
5591
|
+
"aria-label": t("pptx.ribbon.advanceAfterSeconds"),
|
|
5606
5592
|
value: advanceBuffer ?? draft.advanceAfterText,
|
|
5607
5593
|
onChange: (e) => {
|
|
5608
5594
|
setAdvanceBuffer(e.target.value);
|
|
@@ -5668,10 +5654,10 @@ function DesignSection(p) {
|
|
|
5668
5654
|
}
|
|
5669
5655
|
),
|
|
5670
5656
|
sep,
|
|
5671
|
-
p.onOpenDocumentProperties && /* @__PURE__ */ jsxs(
|
|
5657
|
+
(p.onOpenSlideSize ?? p.onOpenDocumentProperties) && /* @__PURE__ */ jsxs(
|
|
5672
5658
|
"button",
|
|
5673
5659
|
{
|
|
5674
|
-
onClick: p.onOpenDocumentProperties,
|
|
5660
|
+
onClick: p.onOpenSlideSize ?? p.onOpenDocumentProperties,
|
|
5675
5661
|
className: pill,
|
|
5676
5662
|
title: t("pptx.ribbon.slideSizeTitle"),
|
|
5677
5663
|
children: [
|
|
@@ -5789,7 +5775,7 @@ function AccountPage() {
|
|
|
5789
5775
|
return void 0;
|
|
5790
5776
|
});
|
|
5791
5777
|
};
|
|
5792
|
-
const version = "2.
|
|
5778
|
+
const version = "2.18.0" ;
|
|
5793
5779
|
return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
5794
5780
|
/* @__PURE__ */ jsxs("section", { className: cardClass, children: [
|
|
5795
5781
|
/* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -8823,6 +8809,7 @@ function MobileSectionBody({
|
|
|
8823
8809
|
onToggleThemeEditor: p.onToggleThemeEditor,
|
|
8824
8810
|
isThemeEditorOpen: p.isThemeEditorOpen,
|
|
8825
8811
|
onOpenDocumentProperties: p.onOpenDocumentProperties,
|
|
8812
|
+
onOpenSlideSize: p.onOpenSlideSize,
|
|
8826
8813
|
onToggleInspector: p.onToggleInspector,
|
|
8827
8814
|
isInspectorPaneOpen: p.isInspectorPaneOpen
|
|
8828
8815
|
}
|
|
@@ -10082,6 +10069,7 @@ function Toolbar(p) {
|
|
|
10082
10069
|
onToggleThemeEditor: p.onToggleThemeEditor,
|
|
10083
10070
|
isThemeEditorOpen: p.isThemeEditorOpen,
|
|
10084
10071
|
onOpenDocumentProperties: p.onOpenDocumentProperties,
|
|
10072
|
+
onOpenSlideSize: p.onOpenSlideSize,
|
|
10085
10073
|
onToggleInspector: p.onToggleInspector,
|
|
10086
10074
|
isInspectorPaneOpen: p.isInspectorPaneOpen
|
|
10087
10075
|
}
|
|
@@ -10328,6 +10316,118 @@ function CommentMarkersOverlay({
|
|
|
10328
10316
|
);
|
|
10329
10317
|
}) });
|
|
10330
10318
|
}
|
|
10319
|
+
function ConnectorEndpointOverlay({
|
|
10320
|
+
connector,
|
|
10321
|
+
elements,
|
|
10322
|
+
editorScale,
|
|
10323
|
+
canvasStageRef,
|
|
10324
|
+
onUpdateElement
|
|
10325
|
+
}) {
|
|
10326
|
+
const { t } = useTranslation();
|
|
10327
|
+
const [drag, setDrag] = useState(null);
|
|
10328
|
+
const candidates = useMemo(
|
|
10329
|
+
() => collectConnectorSiteCandidates(elements.filter((el) => el.id !== connector.id)),
|
|
10330
|
+
[elements, connector.id]
|
|
10331
|
+
);
|
|
10332
|
+
const handles = getConnectorEndpointHandles(connector);
|
|
10333
|
+
const snap = drag ? findConnectorSiteNear(candidates, drag.x, drag.y) : null;
|
|
10334
|
+
const toSlidePoint = useCallback(
|
|
10335
|
+
(clientX, clientY) => {
|
|
10336
|
+
const rect = canvasStageRef.current?.getBoundingClientRect();
|
|
10337
|
+
const scale = editorScale || 1;
|
|
10338
|
+
return {
|
|
10339
|
+
x: (clientX - (rect?.left ?? 0)) / scale,
|
|
10340
|
+
y: (clientY - (rect?.top ?? 0)) / scale
|
|
10341
|
+
};
|
|
10342
|
+
},
|
|
10343
|
+
[canvasStageRef, editorScale]
|
|
10344
|
+
);
|
|
10345
|
+
useEffect(() => {
|
|
10346
|
+
if (!drag) {
|
|
10347
|
+
return;
|
|
10348
|
+
}
|
|
10349
|
+
const onMove = (event) => {
|
|
10350
|
+
const point = toSlidePoint(event.clientX, event.clientY);
|
|
10351
|
+
setDrag((prev) => prev ? { ...prev, ...point } : prev);
|
|
10352
|
+
};
|
|
10353
|
+
const onUp = (event) => {
|
|
10354
|
+
const point = toSlidePoint(event.clientX, event.clientY);
|
|
10355
|
+
const target = findConnectorSiteNear(candidates, point.x, point.y, CONNECTOR_SITE_SNAP_PX);
|
|
10356
|
+
const update = resolveConnectorEndpointUpdate(connector, elements, drag.kind, point, target);
|
|
10357
|
+
const next = withConnectorEndpointUpdate(connector, update);
|
|
10358
|
+
onUpdateElement(connector.id, {
|
|
10359
|
+
x: next.x,
|
|
10360
|
+
y: next.y,
|
|
10361
|
+
width: next.width,
|
|
10362
|
+
height: next.height,
|
|
10363
|
+
flipHorizontal: next.flipHorizontal,
|
|
10364
|
+
flipVertical: next.flipVertical,
|
|
10365
|
+
// Sent whole: a DETACHED end has had its binding key deleted, so a
|
|
10366
|
+
// merge of only the surviving keys would leave the stale one behind.
|
|
10367
|
+
shapeStyle: next.shapeStyle
|
|
10368
|
+
});
|
|
10369
|
+
setDrag(null);
|
|
10370
|
+
};
|
|
10371
|
+
window.addEventListener("pointermove", onMove);
|
|
10372
|
+
window.addEventListener("pointerup", onUp);
|
|
10373
|
+
window.addEventListener("pointercancel", onUp);
|
|
10374
|
+
return () => {
|
|
10375
|
+
window.removeEventListener("pointermove", onMove);
|
|
10376
|
+
window.removeEventListener("pointerup", onUp);
|
|
10377
|
+
window.removeEventListener("pointercancel", onUp);
|
|
10378
|
+
};
|
|
10379
|
+
}, [drag, candidates, connector, elements, onUpdateElement, toSlidePoint]);
|
|
10380
|
+
return /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 z-[56] pointer-events-none", "data-pptx-connector-endpoints": true, children: [
|
|
10381
|
+
drag ? candidates.map((site) => /* @__PURE__ */ jsx(
|
|
10382
|
+
"div",
|
|
10383
|
+
{
|
|
10384
|
+
"aria-hidden": "true",
|
|
10385
|
+
"data-pptx-connection-site": true,
|
|
10386
|
+
className: "absolute rounded-full border-2 border-blue-500",
|
|
10387
|
+
style: {
|
|
10388
|
+
left: site.x - 4,
|
|
10389
|
+
top: site.y - 4,
|
|
10390
|
+
width: 8,
|
|
10391
|
+
height: 8,
|
|
10392
|
+
background: snap?.elementId === site.elementId && snap.siteIndex === site.siteIndex ? "#3b82f6" : "rgba(96,165,250,0.6)"
|
|
10393
|
+
}
|
|
10394
|
+
},
|
|
10395
|
+
`${site.elementId}-${site.siteIndex}`
|
|
10396
|
+
)) : null,
|
|
10397
|
+
handles.map((handle) => /* @__PURE__ */ jsx(
|
|
10398
|
+
"button",
|
|
10399
|
+
{
|
|
10400
|
+
type: "button",
|
|
10401
|
+
"data-pptx-connector-endpoint": handle.kind,
|
|
10402
|
+
"data-pptx-connector-attached": String(handle.attached),
|
|
10403
|
+
"aria-label": t(
|
|
10404
|
+
handle.kind === "start" ? "pptx.canvas.connectorEndpointStart" : "pptx.canvas.connectorEndpointEnd"
|
|
10405
|
+
),
|
|
10406
|
+
className: "absolute rounded-full border-2 border-white shadow",
|
|
10407
|
+
style: {
|
|
10408
|
+
left: (drag?.kind === handle.kind ? drag.x : handle.x) - 5,
|
|
10409
|
+
top: (drag?.kind === handle.kind ? drag.y : handle.y) - 5,
|
|
10410
|
+
width: 10,
|
|
10411
|
+
height: 10,
|
|
10412
|
+
// A bound end is filled, a loose one hollow, so "is this
|
|
10413
|
+
// connector actually attached?" is answerable at a glance.
|
|
10414
|
+
background: handle.attached ? "#16a34a" : "#ffffff",
|
|
10415
|
+
boxShadow: "0 0 0 1px #16a34a",
|
|
10416
|
+
cursor: "crosshair",
|
|
10417
|
+
pointerEvents: "auto",
|
|
10418
|
+
touchAction: "none"
|
|
10419
|
+
},
|
|
10420
|
+
onPointerDown: (event) => {
|
|
10421
|
+
event.stopPropagation();
|
|
10422
|
+
event.preventDefault();
|
|
10423
|
+
const point = toSlidePoint(event.clientX, event.clientY);
|
|
10424
|
+
setDrag({ kind: handle.kind, ...point });
|
|
10425
|
+
}
|
|
10426
|
+
},
|
|
10427
|
+
handle.kind
|
|
10428
|
+
))
|
|
10429
|
+
] });
|
|
10430
|
+
}
|
|
10331
10431
|
function ConnectorOverlay({
|
|
10332
10432
|
activeSlide,
|
|
10333
10433
|
canvasSize,
|
|
@@ -10346,26 +10446,24 @@ function ConnectorOverlay({
|
|
|
10346
10446
|
onMouseUp: onConnectorDragEnd,
|
|
10347
10447
|
style: { pointerEvents: connectorDragState ? "auto" : "none" },
|
|
10348
10448
|
children: [
|
|
10349
|
-
activeSlide.elements.
|
|
10350
|
-
|
|
10351
|
-
|
|
10352
|
-
"
|
|
10353
|
-
|
|
10354
|
-
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
zIndex: 56
|
|
10362
|
-
},
|
|
10363
|
-
onMouseDown: (e) => onConnectionSiteDown(el.id, site.index, e),
|
|
10364
|
-
onMouseUp: () => connectorDragState ? onConnectionSiteDrop(el.id, site.index) : void 0
|
|
10449
|
+
collectConnectorSiteCandidates(activeSlide.elements).map((site) => /* @__PURE__ */ jsx(
|
|
10450
|
+
"div",
|
|
10451
|
+
{
|
|
10452
|
+
"data-pptx-connection-site": true,
|
|
10453
|
+
className: "absolute rounded-full border-2 border-blue-500 bg-blue-400/60 hover:bg-blue-500 hover:scale-125 transition-transform cursor-crosshair",
|
|
10454
|
+
style: {
|
|
10455
|
+
left: site.x - 5,
|
|
10456
|
+
top: site.y - 5,
|
|
10457
|
+
width: 10,
|
|
10458
|
+
height: 10,
|
|
10459
|
+
pointerEvents: "auto",
|
|
10460
|
+
zIndex: 56
|
|
10365
10461
|
},
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10462
|
+
onMouseDown: (e) => onConnectionSiteDown(site.elementId, site.siteIndex, e),
|
|
10463
|
+
onMouseUp: () => connectorDragState ? onConnectionSiteDrop(site.elementId, site.siteIndex) : void 0
|
|
10464
|
+
},
|
|
10465
|
+
`${site.elementId}-site-${site.siteIndex}`
|
|
10466
|
+
)),
|
|
10369
10467
|
connectorDragState && /* @__PURE__ */ jsx(
|
|
10370
10468
|
ConnectorDragPreview,
|
|
10371
10469
|
{
|
|
@@ -10389,7 +10487,7 @@ function ConnectorDragPreview({
|
|
|
10389
10487
|
if (!startEl) {
|
|
10390
10488
|
return null;
|
|
10391
10489
|
}
|
|
10392
|
-
const startSites =
|
|
10490
|
+
const startSites = getShapeConnectionSites(startEl);
|
|
10393
10491
|
const startSite = startSites[connectorDragState.startSiteIndex] ?? startSites[0];
|
|
10394
10492
|
const sx = startEl.x + startSite.x;
|
|
10395
10493
|
const sy = startEl.y + startSite.y;
|
|
@@ -11380,7 +11478,7 @@ function useStableCallbacks(callbacks) {
|
|
|
11380
11478
|
[]
|
|
11381
11479
|
);
|
|
11382
11480
|
const stableAdjustmentPointerDown = useCallback(
|
|
11383
|
-
(elementId, e) => cbRef.current.onAdjustmentPointerDown(elementId, e),
|
|
11481
|
+
(elementId, e, descriptor) => cbRef.current.onAdjustmentPointerDown(elementId, e, descriptor),
|
|
11384
11482
|
[]
|
|
11385
11483
|
);
|
|
11386
11484
|
const stableRotate = useCallback(
|
|
@@ -11501,6 +11599,7 @@ function ActiveXControlOverlay({
|
|
|
11501
11599
|
);
|
|
11502
11600
|
}) });
|
|
11503
11601
|
}
|
|
11602
|
+
var EMPTY_ADJUSTMENT_HANDLES = [];
|
|
11504
11603
|
function SlideCanvas({
|
|
11505
11604
|
activeSlide,
|
|
11506
11605
|
templateElements,
|
|
@@ -11757,7 +11856,7 @@ function SlideCanvas({
|
|
|
11757
11856
|
showResizeHandles: isEditableCanvas && selectedElementIdSet.has(element.id) && selectedElementIdSet.size <= 1 && !inlineEditingElementId,
|
|
11758
11857
|
renderInk: false,
|
|
11759
11858
|
renderGroups: true,
|
|
11760
|
-
|
|
11859
|
+
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ? getShapeAdjustmentHandleDescriptors(element) : EMPTY_ADJUSTMENT_HANDLES,
|
|
11761
11860
|
onResizePointerDown: stableResizePointerDown,
|
|
11762
11861
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
11763
11862
|
onRotate: stableRotate,
|
|
@@ -11797,7 +11896,7 @@ function SlideCanvas({
|
|
|
11797
11896
|
showResizeHandles: isEditableCanvas && selectedElementIdSet.has(element.id) && selectedElementIdSet.size <= 1 && !inlineEditingElementId,
|
|
11798
11897
|
renderInk: true,
|
|
11799
11898
|
renderGroups: true,
|
|
11800
|
-
|
|
11899
|
+
adjustmentHandles: isEditableCanvas && selectedElement?.id === element.id ? getShapeAdjustmentHandleDescriptors(element) : EMPTY_ADJUSTMENT_HANDLES,
|
|
11801
11900
|
onResizePointerDown: stableResizePointerDown,
|
|
11802
11901
|
onAdjustmentPointerDown: stableAdjustmentPointerDown,
|
|
11803
11902
|
onRotate: stableRotate,
|
|
@@ -11834,6 +11933,16 @@ function SlideCanvas({
|
|
|
11834
11933
|
}
|
|
11835
11934
|
),
|
|
11836
11935
|
/* @__PURE__ */ jsx(SnapLinesOverlay, { snapLines }),
|
|
11936
|
+
isEditableCanvas && selectedElement?.type === "connector" && activeSlide && /* @__PURE__ */ jsx(
|
|
11937
|
+
ConnectorEndpointOverlay,
|
|
11938
|
+
{
|
|
11939
|
+
connector: selectedElement,
|
|
11940
|
+
elements: activeSlide.elements,
|
|
11941
|
+
editorScale: zoom.editorScale,
|
|
11942
|
+
canvasStageRef: zoom.canvasStageRef,
|
|
11943
|
+
onUpdateElement: stableUpdateSmartArtElement
|
|
11944
|
+
}
|
|
11945
|
+
),
|
|
11837
11946
|
connectorCreationMode && activeSlide && /* @__PURE__ */ jsx(
|
|
11838
11947
|
ConnectorOverlay,
|
|
11839
11948
|
{
|
|
@@ -12848,7 +12957,7 @@ function SectionHeader({
|
|
|
12848
12957
|
{
|
|
12849
12958
|
type: "button",
|
|
12850
12959
|
className: "flex w-full items-center gap-1 rounded px-1.5 py-1 text-[11px] uppercase tracking-wide text-muted-foreground hover:bg-muted/60 hover:text-foreground",
|
|
12851
|
-
onClick: () => onToggle(sectionId),
|
|
12960
|
+
onClick: () => onToggle(sectionId, isCollapsed),
|
|
12852
12961
|
onContextMenu: (e) => canEdit ? onContextMenu(e, sectionId, sectionIndex, totalSections) : void 0,
|
|
12853
12962
|
onDoubleClick: (e) => {
|
|
12854
12963
|
if (!canEdit) {
|
|
@@ -13134,7 +13243,7 @@ function SlideItemInner({
|
|
|
13134
13243
|
);
|
|
13135
13244
|
}
|
|
13136
13245
|
var SlideItem = React14.memo(SlideItemInner);
|
|
13137
|
-
function useSlidePaneCallbacks(onMoveSlide, onRenameSection) {
|
|
13246
|
+
function useSlidePaneCallbacks(onMoveSlide, onRenameSection, onToggleSectionCollapse) {
|
|
13138
13247
|
const [collapsedSections, setCollapsedSections] = useState({});
|
|
13139
13248
|
const [renamingSectionId, setRenamingSectionId] = useState(null);
|
|
13140
13249
|
const [renameValue, setRenameValue] = useState("");
|
|
@@ -13172,12 +13281,16 @@ function useSlidePaneCallbacks(onMoveSlide, onRenameSection) {
|
|
|
13172
13281
|
},
|
|
13173
13282
|
[onMoveSlide]
|
|
13174
13283
|
);
|
|
13175
|
-
const toggleSection = useCallback(
|
|
13176
|
-
|
|
13177
|
-
|
|
13178
|
-
|
|
13179
|
-
|
|
13180
|
-
|
|
13284
|
+
const toggleSection = useCallback(
|
|
13285
|
+
(sectionId, isCollapsed) => {
|
|
13286
|
+
setCollapsedSections((prev) => ({
|
|
13287
|
+
...prev,
|
|
13288
|
+
[sectionId]: !isCollapsed
|
|
13289
|
+
}));
|
|
13290
|
+
onToggleSectionCollapse?.(sectionId);
|
|
13291
|
+
},
|
|
13292
|
+
[onToggleSectionCollapse]
|
|
13293
|
+
);
|
|
13181
13294
|
const startRename = useCallback((sectionId, currentLabel) => {
|
|
13182
13295
|
setRenamingSectionId(sectionId);
|
|
13183
13296
|
setRenameValue(currentLabel);
|
|
@@ -13257,6 +13370,7 @@ function SlidesPaneSidebar({
|
|
|
13257
13370
|
onDeleteSection,
|
|
13258
13371
|
onMoveSectionUp,
|
|
13259
13372
|
onMoveSectionDown,
|
|
13373
|
+
onToggleSectionCollapse,
|
|
13260
13374
|
rehearsalTimings,
|
|
13261
13375
|
panelWidth,
|
|
13262
13376
|
fieldContext,
|
|
@@ -13287,7 +13401,7 @@ function SlidesPaneSidebar({
|
|
|
13287
13401
|
() => estimateSlideItemHeight(canvasSize.width, canvasSize.height),
|
|
13288
13402
|
[canvasSize.width, canvasSize.height]
|
|
13289
13403
|
);
|
|
13290
|
-
const showSectionHeaders = sectionGroups.
|
|
13404
|
+
const showSectionHeaders = sectionGroups.some((group) => group.id !== DEFAULT_SECTION_GROUP_ID);
|
|
13291
13405
|
const {
|
|
13292
13406
|
collapsedSections,
|
|
13293
13407
|
renamingSectionId,
|
|
@@ -13306,10 +13420,17 @@ function SlidesPaneSidebar({
|
|
|
13306
13420
|
handleOpenSlideCtxMenu,
|
|
13307
13421
|
closeSectionContextMenu,
|
|
13308
13422
|
closeSlideCtxMenu
|
|
13309
|
-
} = useSlidePaneCallbacks(onMoveSlide, onRenameSection);
|
|
13423
|
+
} = useSlidePaneCallbacks(onMoveSlide, onRenameSection, onToggleSectionCollapse);
|
|
13424
|
+
const effectiveCollapsed = useMemo(() => {
|
|
13425
|
+
const map = {};
|
|
13426
|
+
for (const group of sectionGroups) {
|
|
13427
|
+
map[group.id] = collapsedSections[group.id] ?? group.defaultCollapsed ?? false;
|
|
13428
|
+
}
|
|
13429
|
+
return map;
|
|
13430
|
+
}, [sectionGroups, collapsedSections]);
|
|
13310
13431
|
const flatItems = useMemo(
|
|
13311
|
-
() => buildFlatPaneItems(sectionGroups, showSectionHeaders,
|
|
13312
|
-
[sectionGroups, showSectionHeaders,
|
|
13432
|
+
() => buildFlatPaneItems(sectionGroups, showSectionHeaders, effectiveCollapsed),
|
|
13433
|
+
[sectionGroups, showSectionHeaders, effectiveCollapsed]
|
|
13313
13434
|
);
|
|
13314
13435
|
const shouldVirtualize = slides.length >= VIRTUALIZATION_THRESHOLD;
|
|
13315
13436
|
const { startIndex, endIndex, totalHeight, offsetY, scrollContainerRef, scrollToIndex } = useVirtualizedSlides({
|
|
@@ -13367,7 +13488,7 @@ function SlidesPaneSidebar({
|
|
|
13367
13488
|
if (!section) {
|
|
13368
13489
|
return null;
|
|
13369
13490
|
}
|
|
13370
|
-
const isCollapsed =
|
|
13491
|
+
const isCollapsed = effectiveCollapsed[section.id] ?? false;
|
|
13371
13492
|
return /* @__PURE__ */ jsx(
|
|
13372
13493
|
SectionHeader,
|
|
13373
13494
|
{
|
|
@@ -13424,7 +13545,7 @@ function SlidesPaneSidebar({
|
|
|
13424
13545
|
) }) });
|
|
13425
13546
|
};
|
|
13426
13547
|
const renderNonVirtualized = () => /* @__PURE__ */ jsx("div", { className: "flex-1 space-y-1 overflow-y-auto px-1.5 pb-2", children: sectionGroups.map((section, sectionIndex) => {
|
|
13427
|
-
const isCollapsed =
|
|
13548
|
+
const isCollapsed = effectiveCollapsed[section.id] ?? false;
|
|
13428
13549
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
13429
13550
|
showSectionHeaders && /* @__PURE__ */ jsx(
|
|
13430
13551
|
SectionHeader,
|
|
@@ -13658,11 +13779,14 @@ function SlideMastersList({
|
|
|
13658
13779
|
const layouts = master.layouts ?? [];
|
|
13659
13780
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
13660
13781
|
/* @__PURE__ */ jsxs(
|
|
13661
|
-
"
|
|
13782
|
+
"button",
|
|
13662
13783
|
{
|
|
13784
|
+
type: "button",
|
|
13663
13785
|
ref: isMasterActive ? activeRef : void 0,
|
|
13786
|
+
"aria-pressed": isMasterActive,
|
|
13787
|
+
"aria-label": master.name || t("pptx.master.master"),
|
|
13664
13788
|
className: cn(
|
|
13665
|
-
"group relative cursor-pointer rounded-lg border-2 p-1 transition-all",
|
|
13789
|
+
"group relative block w-full cursor-pointer rounded-lg border-2 p-1 text-left transition-all",
|
|
13666
13790
|
isMasterActive ? "border-amber-500 bg-amber-500/10" : "border-border bg-background/40 hover:border-border"
|
|
13667
13791
|
),
|
|
13668
13792
|
onClick: () => onSelectMaster(masterIdx),
|
|
@@ -13691,11 +13815,14 @@ function SlideMastersList({
|
|
|
13691
13815
|
layouts.length > 0 && /* @__PURE__ */ jsx("div", { className: "ml-3 space-y-1 border-l border-border/40 pl-2", children: layouts.map((layout, layoutIdx) => {
|
|
13692
13816
|
const isLayoutActive = masterIdx === activeMasterIndex && layoutIdx === activeLayoutIndex;
|
|
13693
13817
|
return /* @__PURE__ */ jsxs(
|
|
13694
|
-
"
|
|
13818
|
+
"button",
|
|
13695
13819
|
{
|
|
13820
|
+
type: "button",
|
|
13696
13821
|
ref: isLayoutActive ? activeRef : void 0,
|
|
13822
|
+
"aria-pressed": isLayoutActive,
|
|
13823
|
+
"aria-label": layout.name || t("pptx.master.layout"),
|
|
13697
13824
|
className: cn(
|
|
13698
|
-
"group relative cursor-pointer rounded-md border-2 p-0.5 transition-all",
|
|
13825
|
+
"group relative block w-full cursor-pointer rounded-md border-2 p-0.5 text-left transition-all",
|
|
13699
13826
|
isLayoutActive ? "border-primary bg-primary/10" : "border-border bg-background/40 hover:border-border"
|
|
13700
13827
|
),
|
|
13701
13828
|
onClick: () => onSelectLayout(masterIdx, layoutIdx),
|
|
@@ -13742,16 +13869,22 @@ function MasterViewSidebar({
|
|
|
13742
13869
|
notesMaster,
|
|
13743
13870
|
handoutMaster,
|
|
13744
13871
|
handoutSlidesPerPage,
|
|
13872
|
+
canEdit,
|
|
13745
13873
|
onSelectMaster,
|
|
13746
13874
|
onSelectLayout,
|
|
13747
13875
|
onCollapse,
|
|
13748
13876
|
onTabChange,
|
|
13749
13877
|
onHandoutSlidesPerPageChange,
|
|
13750
13878
|
onNotesMasterBackgroundChange,
|
|
13751
|
-
onHandoutMasterBackgroundChange
|
|
13879
|
+
onHandoutMasterBackgroundChange,
|
|
13880
|
+
onSlidesBackgroundChange
|
|
13752
13881
|
}) {
|
|
13753
13882
|
const scrollRef = useRef(null);
|
|
13754
13883
|
const { t } = useTranslation();
|
|
13884
|
+
const slidesBackground = masterViewBackgroundColor(
|
|
13885
|
+
{ slideMasters },
|
|
13886
|
+
{ tab: "slides", masterIndex: activeMasterIndex, layoutIndex: activeLayoutIndex }
|
|
13887
|
+
);
|
|
13755
13888
|
const handleMasterClick = useCallback(
|
|
13756
13889
|
(index) => {
|
|
13757
13890
|
onSelectMaster(index);
|
|
@@ -13807,6 +13940,19 @@ function MasterViewSidebar({
|
|
|
13807
13940
|
}
|
|
13808
13941
|
),
|
|
13809
13942
|
/* @__PURE__ */ jsxs("div", { ref: scrollRef, className: "flex-1 space-y-2 overflow-y-auto px-1.5 pb-2 pt-1", children: [
|
|
13943
|
+
masterViewTab === "slides" && canEdit && /* @__PURE__ */ jsxs("section", { className: "space-y-1.5 rounded-md border border-border/60 p-2", children: [
|
|
13944
|
+
/* @__PURE__ */ jsx("div", { className: "text-[11px] text-muted-foreground", children: t("pptx.master.notesMasterBackground") }),
|
|
13945
|
+
/* @__PURE__ */ jsx(
|
|
13946
|
+
"input",
|
|
13947
|
+
{
|
|
13948
|
+
type: "color",
|
|
13949
|
+
"aria-label": t("pptx.master.backgroundColorLabel"),
|
|
13950
|
+
className: "h-7 w-full cursor-pointer rounded border border-border/60 bg-transparent",
|
|
13951
|
+
value: slidesBackground ?? "#ffffff",
|
|
13952
|
+
onChange: (event) => onSlidesBackgroundChange(event.target.value)
|
|
13953
|
+
}
|
|
13954
|
+
)
|
|
13955
|
+
] }),
|
|
13810
13956
|
masterViewTab === "slides" && /* @__PURE__ */ jsx(
|
|
13811
13957
|
SlideMastersList,
|
|
13812
13958
|
{
|
|
@@ -14521,100 +14667,73 @@ function SorterContextMenu({
|
|
|
14521
14667
|
}
|
|
14522
14668
|
|
|
14523
14669
|
// src/viewer/components/slide-sorter/types.ts
|
|
14524
|
-
var MIN_ZOOM =
|
|
14525
|
-
var MAX_ZOOM =
|
|
14670
|
+
var MIN_ZOOM = SORTER_MIN_ZOOM;
|
|
14671
|
+
var MAX_ZOOM = SORTER_MAX_ZOOM;
|
|
14526
14672
|
var DEFAULT_ZOOM = 100;
|
|
14527
|
-
var ZOOM_STEP =
|
|
14673
|
+
var ZOOM_STEP = SORTER_ZOOM_STEP;
|
|
14528
14674
|
function useKeyboardShortcuts(params) {
|
|
14529
|
-
const
|
|
14530
|
-
|
|
14531
|
-
activeSlideIndex,
|
|
14532
|
-
canEdit,
|
|
14533
|
-
selectedSlideIds,
|
|
14534
|
-
selectedIndexes,
|
|
14535
|
-
contextMenu,
|
|
14536
|
-
setContextMenu,
|
|
14537
|
-
setSelectedSlideIds,
|
|
14538
|
-
setZoom,
|
|
14539
|
-
onClose,
|
|
14540
|
-
handleDeleteSelected,
|
|
14541
|
-
handleCopySelected,
|
|
14542
|
-
handlePaste,
|
|
14543
|
-
handleDuplicateSelected,
|
|
14544
|
-
handleSelectAll
|
|
14545
|
-
} = params;
|
|
14675
|
+
const paramsRef = useRef(params);
|
|
14676
|
+
paramsRef.current = params;
|
|
14546
14677
|
useEffect(() => {
|
|
14547
14678
|
const handleKeyDown = (e) => {
|
|
14548
|
-
|
|
14549
|
-
|
|
14550
|
-
|
|
14551
|
-
|
|
14552
|
-
|
|
14553
|
-
|
|
14554
|
-
|
|
14555
|
-
|
|
14556
|
-
|
|
14557
|
-
|
|
14558
|
-
onClose();
|
|
14559
|
-
}
|
|
14679
|
+
const current = paramsRef.current;
|
|
14680
|
+
if (current.contextMenu) {
|
|
14681
|
+
current.setContextMenu(null);
|
|
14682
|
+
}
|
|
14683
|
+
const { action } = mapSlideSorterKey(e, {
|
|
14684
|
+
canEdit: current.canEdit,
|
|
14685
|
+
hasMultiSelection: current.selectedSlideIds.length > 1,
|
|
14686
|
+
isTextInputTarget: isEditorTextInputTarget(e.target)
|
|
14687
|
+
});
|
|
14688
|
+
if (action === null) {
|
|
14560
14689
|
return;
|
|
14561
14690
|
}
|
|
14562
|
-
|
|
14563
|
-
|
|
14564
|
-
|
|
14565
|
-
|
|
14691
|
+
switch (action) {
|
|
14692
|
+
case "collapseSelection": {
|
|
14693
|
+
e.stopPropagation();
|
|
14694
|
+
const activeSlide = current.slides[current.activeSlideIndex];
|
|
14695
|
+
current.setSelectedSlideIds(activeSlide?.id ? [activeSlide.id] : []);
|
|
14696
|
+
return;
|
|
14566
14697
|
}
|
|
14567
|
-
|
|
14568
|
-
|
|
14569
|
-
|
|
14570
|
-
|
|
14571
|
-
|
|
14572
|
-
|
|
14573
|
-
|
|
14574
|
-
|
|
14575
|
-
|
|
14576
|
-
|
|
14577
|
-
|
|
14578
|
-
|
|
14579
|
-
|
|
14580
|
-
|
|
14581
|
-
|
|
14582
|
-
|
|
14583
|
-
|
|
14584
|
-
|
|
14585
|
-
|
|
14586
|
-
|
|
14587
|
-
|
|
14588
|
-
|
|
14589
|
-
|
|
14590
|
-
|
|
14591
|
-
|
|
14592
|
-
|
|
14593
|
-
|
|
14594
|
-
|
|
14595
|
-
|
|
14596
|
-
|
|
14698
|
+
case "close":
|
|
14699
|
+
e.stopPropagation();
|
|
14700
|
+
current.onClose();
|
|
14701
|
+
return;
|
|
14702
|
+
case "delete":
|
|
14703
|
+
e.preventDefault();
|
|
14704
|
+
if (current.selectedIndexes.length > 0) {
|
|
14705
|
+
current.handleDeleteSelected();
|
|
14706
|
+
}
|
|
14707
|
+
return;
|
|
14708
|
+
case "copy":
|
|
14709
|
+
e.preventDefault();
|
|
14710
|
+
current.handleCopySelected();
|
|
14711
|
+
return;
|
|
14712
|
+
case "paste":
|
|
14713
|
+
e.preventDefault();
|
|
14714
|
+
current.handlePaste();
|
|
14715
|
+
return;
|
|
14716
|
+
case "duplicate":
|
|
14717
|
+
e.preventDefault();
|
|
14718
|
+
current.handleDuplicateSelected();
|
|
14719
|
+
return;
|
|
14720
|
+
case "selectAll":
|
|
14721
|
+
e.preventDefault();
|
|
14722
|
+
current.handleSelectAll();
|
|
14723
|
+
return;
|
|
14724
|
+
case "zoomIn":
|
|
14725
|
+
e.preventDefault();
|
|
14726
|
+
current.setZoom((z) => clampSorterZoom(z + ZOOM_STEP));
|
|
14727
|
+
return;
|
|
14728
|
+
case "zoomOut":
|
|
14729
|
+
e.preventDefault();
|
|
14730
|
+
current.setZoom((z) => clampSorterZoom(z - ZOOM_STEP));
|
|
14731
|
+
break;
|
|
14597
14732
|
}
|
|
14598
14733
|
};
|
|
14599
14734
|
window.addEventListener("keydown", handleKeyDown);
|
|
14600
14735
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
14601
|
-
}, [
|
|
14602
|
-
onClose,
|
|
14603
|
-
canEdit,
|
|
14604
|
-
selectedSlideIds,
|
|
14605
|
-
selectedIndexes,
|
|
14606
|
-
activeSlideIndex,
|
|
14607
|
-
slides,
|
|
14608
|
-
contextMenu,
|
|
14609
|
-
setContextMenu,
|
|
14610
|
-
setSelectedSlideIds,
|
|
14611
|
-
setZoom,
|
|
14612
|
-
handleDeleteSelected,
|
|
14613
|
-
handleCopySelected,
|
|
14614
|
-
handlePaste,
|
|
14615
|
-
handleDuplicateSelected,
|
|
14616
|
-
handleSelectAll
|
|
14617
|
-
]);
|
|
14736
|
+
}, []);
|
|
14618
14737
|
}
|
|
14619
14738
|
|
|
14620
14739
|
// src/viewer/components/slide-sorter/useSlideSorterState.ts
|
|
@@ -18130,12 +18249,13 @@ function PresenterNotesRail({
|
|
|
18130
18249
|
templateElements,
|
|
18131
18250
|
now,
|
|
18132
18251
|
elapsed,
|
|
18252
|
+
activeCustomShow,
|
|
18133
18253
|
onMove,
|
|
18134
18254
|
onUpdateNotes
|
|
18135
18255
|
}) {
|
|
18136
18256
|
const { t } = useTranslation();
|
|
18137
18257
|
const slide = slides[current];
|
|
18138
|
-
const nextSlide = nextPresentedSlide(slides, current);
|
|
18258
|
+
const nextSlide = nextPresentedSlide(slides, current, activeCustomShow);
|
|
18139
18259
|
const notesText = slide?.notes ?? "";
|
|
18140
18260
|
const notesSegments = slide?.notesSegments;
|
|
18141
18261
|
const [notesDraft, setNotesDraft] = useState(notesText);
|
|
@@ -18380,6 +18500,7 @@ function PresenterView({
|
|
|
18380
18500
|
canvasSize,
|
|
18381
18501
|
templateElements,
|
|
18382
18502
|
presentationStartTime,
|
|
18503
|
+
activeCustomShow,
|
|
18383
18504
|
onMovePresentationSlide,
|
|
18384
18505
|
onExit,
|
|
18385
18506
|
onOpenAudienceWindow,
|
|
@@ -18490,6 +18611,7 @@ function PresenterView({
|
|
|
18490
18611
|
current: currentSlideIndex,
|
|
18491
18612
|
canvasSize,
|
|
18492
18613
|
templateElements,
|
|
18614
|
+
activeCustomShow,
|
|
18493
18615
|
now,
|
|
18494
18616
|
elapsed,
|
|
18495
18617
|
onMove: onMovePresentationSlide,
|
|
@@ -19224,6 +19346,7 @@ function MotionPathRow({
|
|
|
19224
19346
|
/* @__PURE__ */ jsxs(
|
|
19225
19347
|
"select",
|
|
19226
19348
|
{
|
|
19349
|
+
"aria-label": t("pptx.animation.motionPath.label"),
|
|
19227
19350
|
value: isCustom ? "custom" : presetId ?? "none",
|
|
19228
19351
|
onChange: (event) => onChange(event.target.value),
|
|
19229
19352
|
disabled: !canEdit,
|
|
@@ -19673,6 +19796,7 @@ function AnimationPanel({
|
|
|
19673
19796
|
/* @__PURE__ */ jsxs(
|
|
19674
19797
|
"select",
|
|
19675
19798
|
{
|
|
19799
|
+
"aria-label": t("pptx.animation.entrance"),
|
|
19676
19800
|
value: selectedElementAnimation?.entrance ?? "none",
|
|
19677
19801
|
onChange: handleEntranceChange,
|
|
19678
19802
|
disabled: !canEdit,
|
|
@@ -19689,6 +19813,7 @@ function AnimationPanel({
|
|
|
19689
19813
|
/* @__PURE__ */ jsxs(
|
|
19690
19814
|
"select",
|
|
19691
19815
|
{
|
|
19816
|
+
"aria-label": t("pptx.animation.emphasis"),
|
|
19692
19817
|
value: selectedElementAnimation?.emphasis ?? "none",
|
|
19693
19818
|
onChange: handleEmphasisChange,
|
|
19694
19819
|
disabled: !canEdit,
|
|
@@ -19705,6 +19830,7 @@ function AnimationPanel({
|
|
|
19705
19830
|
/* @__PURE__ */ jsxs(
|
|
19706
19831
|
"select",
|
|
19707
19832
|
{
|
|
19833
|
+
"aria-label": t("pptx.animation.exit"),
|
|
19708
19834
|
value: selectedElementAnimation?.exit ?? "none",
|
|
19709
19835
|
onChange: handleExitChange,
|
|
19710
19836
|
disabled: !canEdit,
|
|
@@ -19752,6 +19878,7 @@ function AnimationPanel({
|
|
|
19752
19878
|
/* @__PURE__ */ jsx(
|
|
19753
19879
|
"select",
|
|
19754
19880
|
{
|
|
19881
|
+
"aria-label": t("pptx.animation.sequence"),
|
|
19755
19882
|
value: selectedElementAnimation?.sequence ?? "asOne",
|
|
19756
19883
|
onChange: handleSequenceChange,
|
|
19757
19884
|
disabled: !canEdit,
|
|
@@ -19766,6 +19893,7 @@ function AnimationPanel({
|
|
|
19766
19893
|
/* @__PURE__ */ jsx(
|
|
19767
19894
|
"select",
|
|
19768
19895
|
{
|
|
19896
|
+
"aria-label": t("pptx.animation.trigger"),
|
|
19769
19897
|
value: selectedElementAnimation?.trigger ?? "onClick",
|
|
19770
19898
|
onChange: handleTriggerChange,
|
|
19771
19899
|
disabled: !canEdit,
|
|
@@ -19779,6 +19907,7 @@ function AnimationPanel({
|
|
|
19779
19907
|
/* @__PURE__ */ jsxs(
|
|
19780
19908
|
"select",
|
|
19781
19909
|
{
|
|
19910
|
+
"aria-label": t("pptx.animation.trigger.shapeLabel"),
|
|
19782
19911
|
value: selectedElementAnimation?.triggerShapeId ?? "",
|
|
19783
19912
|
onChange: handleTriggerShapeChange,
|
|
19784
19913
|
disabled: !canEdit,
|
|
@@ -19827,6 +19956,7 @@ function AnimationPanel({
|
|
|
19827
19956
|
/* @__PURE__ */ jsx(
|
|
19828
19957
|
"select",
|
|
19829
19958
|
{
|
|
19959
|
+
"aria-label": t("pptx.animation.timingCurve"),
|
|
19830
19960
|
value: selectedElementAnimation?.timingCurve ?? "ease",
|
|
19831
19961
|
onChange: handleTimingCurveChange,
|
|
19832
19962
|
disabled: !canEdit,
|
|
@@ -19856,6 +19986,7 @@ function AnimationPanel({
|
|
|
19856
19986
|
/* @__PURE__ */ jsx(
|
|
19857
19987
|
"select",
|
|
19858
19988
|
{
|
|
19989
|
+
"aria-label": t("pptx.animation.repeatUntil"),
|
|
19859
19990
|
value: selectedElementAnimation?.repeatMode ?? "none",
|
|
19860
19991
|
onChange: handleRepeatModeChange,
|
|
19861
19992
|
disabled: !canEdit,
|
|
@@ -20215,6 +20346,7 @@ function ChartAxisOptions({ axes, canEdit, onUpdateAxis }) {
|
|
|
20215
20346
|
/* @__PURE__ */ jsx(
|
|
20216
20347
|
"select",
|
|
20217
20348
|
{
|
|
20349
|
+
"aria-label": t("pptx.chart.displayUnits"),
|
|
20218
20350
|
disabled: !canEdit,
|
|
20219
20351
|
className: INPUT2,
|
|
20220
20352
|
value: axis.displayUnits ?? "",
|
|
@@ -20262,6 +20394,7 @@ function ChartAxisOptions({ axes, canEdit, onUpdateAxis }) {
|
|
|
20262
20394
|
/* @__PURE__ */ jsx(
|
|
20263
20395
|
"select",
|
|
20264
20396
|
{
|
|
20397
|
+
"aria-label": t("pptx.chart.tickLabels"),
|
|
20265
20398
|
disabled: !canEdit,
|
|
20266
20399
|
className: INPUT2,
|
|
20267
20400
|
value: axis.tickLblPos ?? "nextTo",
|
|
@@ -20666,6 +20799,7 @@ function ChartDataLabelOptions({
|
|
|
20666
20799
|
/* @__PURE__ */ jsx(
|
|
20667
20800
|
"select",
|
|
20668
20801
|
{
|
|
20802
|
+
"aria-label": t("pptx.chart.labelPosition"),
|
|
20669
20803
|
disabled: !canEdit,
|
|
20670
20804
|
className: INPUT2,
|
|
20671
20805
|
value: labels.position ?? "",
|
|
@@ -20701,6 +20835,7 @@ function ChartDataPointMarkerOptions({
|
|
|
20701
20835
|
/* @__PURE__ */ jsx(
|
|
20702
20836
|
"select",
|
|
20703
20837
|
{
|
|
20838
|
+
"aria-label": t("pptx.chart.series"),
|
|
20704
20839
|
disabled: !canEdit,
|
|
20705
20840
|
className: "flex-1 bg-muted border border-border rounded px-1.5 py-0.5 w-full",
|
|
20706
20841
|
value: Math.min(seriesIndex, series.length - 1),
|
|
@@ -20806,6 +20941,7 @@ function ChartDataPointOptions({
|
|
|
20806
20941
|
/* @__PURE__ */ jsx(
|
|
20807
20942
|
"select",
|
|
20808
20943
|
{
|
|
20944
|
+
"aria-label": t("pptx.chart.series"),
|
|
20809
20945
|
disabled: !canEdit,
|
|
20810
20946
|
className: INPUT2,
|
|
20811
20947
|
value: Math.min(seriesIndex, series.length - 1),
|
|
@@ -20919,6 +21055,7 @@ function ChartDisplayOptions({ style, canEdit, onUpdateStyle }) {
|
|
|
20919
21055
|
/* @__PURE__ */ jsx(
|
|
20920
21056
|
"select",
|
|
20921
21057
|
{
|
|
21058
|
+
"aria-label": t("pptx.chart.legendPosition"),
|
|
20922
21059
|
disabled: !canEdit,
|
|
20923
21060
|
className: INPUT2,
|
|
20924
21061
|
value: style.legendPosition ?? "b",
|
|
@@ -21290,6 +21427,7 @@ function ChartTypeSelector({
|
|
|
21290
21427
|
/* @__PURE__ */ jsx(
|
|
21291
21428
|
"select",
|
|
21292
21429
|
{
|
|
21430
|
+
"aria-label": t("pptx.chart.type"),
|
|
21293
21431
|
disabled: !canEdit,
|
|
21294
21432
|
className: INPUT2,
|
|
21295
21433
|
value: chartType,
|
|
@@ -21305,6 +21443,7 @@ function ChartTypeSelector({
|
|
|
21305
21443
|
/* @__PURE__ */ jsx(
|
|
21306
21444
|
"select",
|
|
21307
21445
|
{
|
|
21446
|
+
"aria-label": t("pptx.chart.grouping"),
|
|
21308
21447
|
disabled: !canEdit,
|
|
21309
21448
|
className: INPUT2,
|
|
21310
21449
|
value: grouping ?? "clustered",
|
|
@@ -21657,6 +21796,7 @@ function ConnectorArrowsSection({
|
|
|
21657
21796
|
/* @__PURE__ */ jsx(
|
|
21658
21797
|
"select",
|
|
21659
21798
|
{
|
|
21799
|
+
"aria-label": t(END_LABEL_KEYS[end].arrow),
|
|
21660
21800
|
value: selectedShapeStyle?.[key] || "none",
|
|
21661
21801
|
onChange: (e) => {
|
|
21662
21802
|
onUpdateShapeStyle({
|
|
@@ -21680,6 +21820,7 @@ function ConnectorArrowsSection({
|
|
|
21680
21820
|
/* @__PURE__ */ jsx(
|
|
21681
21821
|
"select",
|
|
21682
21822
|
{
|
|
21823
|
+
"aria-label": t(END_LABEL_KEYS[end].width),
|
|
21683
21824
|
value: selectedShapeStyle?.[widthKey] || "med",
|
|
21684
21825
|
onChange: (e) => {
|
|
21685
21826
|
onUpdateShapeStyle({
|
|
@@ -21698,6 +21839,7 @@ function ConnectorArrowsSection({
|
|
|
21698
21839
|
/* @__PURE__ */ jsx(
|
|
21699
21840
|
"select",
|
|
21700
21841
|
{
|
|
21842
|
+
"aria-label": t(END_LABEL_KEYS[end].length),
|
|
21701
21843
|
value: selectedShapeStyle?.[lengthKey] || "med",
|
|
21702
21844
|
onChange: (e) => {
|
|
21703
21845
|
onUpdateShapeStyle({
|
|
@@ -22890,6 +23032,7 @@ function MediaPlaybackBookmarks({
|
|
|
22890
23032
|
/* @__PURE__ */ jsxs(
|
|
22891
23033
|
"select",
|
|
22892
23034
|
{
|
|
23035
|
+
"aria-label": t("pptx.media.speed"),
|
|
22893
23036
|
disabled: !canEdit,
|
|
22894
23037
|
className: `${INPUT4} text-[11px] max-w-[100px]`,
|
|
22895
23038
|
value: element.playbackSpeed ?? 1,
|
|
@@ -22965,6 +23108,7 @@ function MediaPlaybackBookmarks({
|
|
|
22965
23108
|
/* @__PURE__ */ jsxs(
|
|
22966
23109
|
"select",
|
|
22967
23110
|
{
|
|
23111
|
+
"aria-label": t("pptx.media.startTrigger"),
|
|
22968
23112
|
disabled: !canEdit,
|
|
22969
23113
|
className: "text-[11px] bg-transparent border border-border rounded px-1 py-0.5",
|
|
22970
23114
|
value: element.autoPlay ? "auto" : "onClick",
|
|
@@ -23964,14 +24108,36 @@ var safeNum = (raw, fallback) => {
|
|
|
23964
24108
|
const n = Number(raw);
|
|
23965
24109
|
return Number.isFinite(n) ? n : fallback;
|
|
23966
24110
|
};
|
|
23967
|
-
|
|
24111
|
+
function SelectRow({
|
|
24112
|
+
label,
|
|
24113
|
+
value,
|
|
24114
|
+
span2,
|
|
24115
|
+
options,
|
|
24116
|
+
onChange
|
|
24117
|
+
}) {
|
|
23968
24118
|
const { t } = useTranslation();
|
|
23969
24119
|
return /* @__PURE__ */ jsxs("label", { className: `flex flex-col gap-1 ${span2 ? COL2 : ""}`, children: [
|
|
23970
24120
|
/* @__PURE__ */ jsx("span", { className: LBL2, children: label }),
|
|
23971
|
-
/* @__PURE__ */ jsx(
|
|
24121
|
+
/* @__PURE__ */ jsx(
|
|
24122
|
+
"select",
|
|
24123
|
+
{
|
|
24124
|
+
"aria-label": label,
|
|
24125
|
+
value,
|
|
24126
|
+
onChange: (e) => onChange(e.target.value),
|
|
24127
|
+
className: SEL2,
|
|
24128
|
+
children: options.map((o) => /* @__PURE__ */ jsx("option", { value: o.value, children: o.i18nKey ? t(o.i18nKey) : o.label }, o.value))
|
|
24129
|
+
}
|
|
24130
|
+
)
|
|
23972
24131
|
] });
|
|
23973
|
-
}
|
|
23974
|
-
|
|
24132
|
+
}
|
|
24133
|
+
function ColorPickerRow({
|
|
24134
|
+
label,
|
|
24135
|
+
value,
|
|
24136
|
+
disabled,
|
|
24137
|
+
prefix,
|
|
24138
|
+
recentColors,
|
|
24139
|
+
onChange
|
|
24140
|
+
}) {
|
|
23975
24141
|
const { t } = useTranslation();
|
|
23976
24142
|
const handleEyedropper = async () => {
|
|
23977
24143
|
const color = await openNativeEyeDropper();
|
|
@@ -24037,8 +24203,14 @@ var ColorPickerRow = ({ label, value, disabled, prefix, recentColors, onChange }
|
|
|
24037
24203
|
))
|
|
24038
24204
|
] })
|
|
24039
24205
|
] });
|
|
24040
|
-
}
|
|
24041
|
-
|
|
24206
|
+
}
|
|
24207
|
+
function GradientStopRow({
|
|
24208
|
+
stop,
|
|
24209
|
+
index,
|
|
24210
|
+
total,
|
|
24211
|
+
onUpdate,
|
|
24212
|
+
allStops
|
|
24213
|
+
}) {
|
|
24042
24214
|
const { t } = useTranslation();
|
|
24043
24215
|
const patchStop = (patch) => {
|
|
24044
24216
|
const next = allStops.map((s, i) => i === index ? { ...s, ...patch } : s);
|
|
@@ -24096,8 +24268,12 @@ var GradientStopRow = ({ stop, index, total, onUpdate, allStops }) => {
|
|
|
24096
24268
|
] })
|
|
24097
24269
|
] })
|
|
24098
24270
|
] });
|
|
24099
|
-
}
|
|
24100
|
-
|
|
24271
|
+
}
|
|
24272
|
+
function EffectField({
|
|
24273
|
+
field,
|
|
24274
|
+
style,
|
|
24275
|
+
onUpdate
|
|
24276
|
+
}) {
|
|
24101
24277
|
const { t } = useTranslation();
|
|
24102
24278
|
const fieldLabel = field.i18nKey ? t(field.i18nKey) : field.label;
|
|
24103
24279
|
const val = field.read(style);
|
|
@@ -24108,6 +24284,7 @@ var EffectField = ({ field, style, onUpdate }) => {
|
|
|
24108
24284
|
/* @__PURE__ */ jsx(
|
|
24109
24285
|
"select",
|
|
24110
24286
|
{
|
|
24287
|
+
"aria-label": fieldLabel,
|
|
24111
24288
|
value: String(val),
|
|
24112
24289
|
onChange: (e) => {
|
|
24113
24290
|
const result = field.write(e.target.value, style);
|
|
@@ -24191,7 +24368,7 @@ var EffectField = ({ field, style, onUpdate }) => {
|
|
|
24191
24368
|
}
|
|
24192
24369
|
)
|
|
24193
24370
|
] });
|
|
24194
|
-
}
|
|
24371
|
+
}
|
|
24195
24372
|
function FillAdvancedControls({
|
|
24196
24373
|
style,
|
|
24197
24374
|
gradientStops,
|
|
@@ -24469,6 +24646,7 @@ function StrokeEffectsSection({
|
|
|
24469
24646
|
/* @__PURE__ */ jsx(
|
|
24470
24647
|
"select",
|
|
24471
24648
|
{
|
|
24649
|
+
"aria-label": t("pptx.strokeEffects.strokeDash"),
|
|
24472
24650
|
value: style?.strokeDash || "solid",
|
|
24473
24651
|
onChange: (e) => onUpdateShapeStyle({
|
|
24474
24652
|
strokeDash: e.target.value
|
|
@@ -24754,6 +24932,7 @@ function Text3DProperties({
|
|
|
24754
24932
|
/* @__PURE__ */ jsx(
|
|
24755
24933
|
"select",
|
|
24756
24934
|
{
|
|
24935
|
+
"aria-label": t("pptx.text3d.material"),
|
|
24757
24936
|
value: t3d?.presetMaterial ?? "",
|
|
24758
24937
|
onChange: (e) => {
|
|
24759
24938
|
const v = e.target.value;
|
|
@@ -24786,6 +24965,7 @@ function BevelSection({
|
|
|
24786
24965
|
/* @__PURE__ */ jsx(
|
|
24787
24966
|
"select",
|
|
24788
24967
|
{
|
|
24968
|
+
"aria-label": t("pptx.text3d.bevelType"),
|
|
24789
24969
|
value: bevelType ?? "none",
|
|
24790
24970
|
onChange: (e) => onTypeChange(e.target.value),
|
|
24791
24971
|
className: INPUT_CLS2,
|
|
@@ -24910,6 +25090,7 @@ function AdvancedTextFormatting({
|
|
|
24910
25090
|
/* @__PURE__ */ jsx(
|
|
24911
25091
|
"select",
|
|
24912
25092
|
{
|
|
25093
|
+
"aria-label": t("pptx.textProperties.underlineStyle"),
|
|
24913
25094
|
value: ts?.underlineStyle || "sng",
|
|
24914
25095
|
disabled: !canEdit,
|
|
24915
25096
|
onChange: (e) => onUpdateTextStyle({
|
|
@@ -26467,6 +26648,7 @@ function TableCellPatternFill({
|
|
|
26467
26648
|
/* @__PURE__ */ jsx(
|
|
26468
26649
|
"select",
|
|
26469
26650
|
{
|
|
26651
|
+
"aria-label": t("pptx.table.patternPreset"),
|
|
26470
26652
|
disabled: !canEdit,
|
|
26471
26653
|
className: SEL,
|
|
26472
26654
|
value: cellStyle.patternFillPreset ?? "ltDnDiag",
|
|
@@ -26541,6 +26723,7 @@ function TableCellAdvancedFill({
|
|
|
26541
26723
|
/* @__PURE__ */ jsx(
|
|
26542
26724
|
"select",
|
|
26543
26725
|
{
|
|
26726
|
+
"aria-label": t("pptx.table.fillMode"),
|
|
26544
26727
|
disabled: !canEdit,
|
|
26545
26728
|
className: SEL,
|
|
26546
26729
|
value: fillMode,
|
|
@@ -26616,6 +26799,7 @@ function GradientControls({
|
|
|
26616
26799
|
/* @__PURE__ */ jsx(
|
|
26617
26800
|
"select",
|
|
26618
26801
|
{
|
|
26802
|
+
"aria-label": t("pptx.table.gradientType"),
|
|
26619
26803
|
disabled: !canEdit,
|
|
26620
26804
|
className: SEL,
|
|
26621
26805
|
value: gradType,
|
|
@@ -27273,6 +27457,27 @@ function ElementInspectorBody({
|
|
|
27273
27457
|
/* @__PURE__ */ jsx(LayerOrderButtons, { canEdit, onMoveLayer })
|
|
27274
27458
|
] });
|
|
27275
27459
|
}
|
|
27460
|
+
function CommentBody({ text, mentions, className }) {
|
|
27461
|
+
const segments = commentTextSegments(text, mentions);
|
|
27462
|
+
if (!segments.some((segment) => segment.kind === "mention")) {
|
|
27463
|
+
return /* @__PURE__ */ jsx("div", { className, children: text });
|
|
27464
|
+
}
|
|
27465
|
+
return /* @__PURE__ */ jsx("div", { className, children: segments.map(
|
|
27466
|
+
(segment, index) => segment.kind === "mention" ? /* @__PURE__ */ jsx(
|
|
27467
|
+
"span",
|
|
27468
|
+
{
|
|
27469
|
+
className: `${COMMENT_MENTION_CLASS} rounded bg-primary/15 px-0.5 font-semibold text-primary`,
|
|
27470
|
+
...{ [COMMENT_MENTION_ATTRIBUTE]: segment.personId || "" },
|
|
27471
|
+
title: segment.authorName,
|
|
27472
|
+
children: segment.text
|
|
27473
|
+
},
|
|
27474
|
+
index
|
|
27475
|
+
) : (
|
|
27476
|
+
// eslint-disable-next-line react/no-array-index-key -- segments are positional
|
|
27477
|
+
/* @__PURE__ */ jsx(React14.Fragment, { children: segment.text }, index)
|
|
27478
|
+
)
|
|
27479
|
+
) });
|
|
27480
|
+
}
|
|
27276
27481
|
function InspectorCommentRow({
|
|
27277
27482
|
comment,
|
|
27278
27483
|
canEdit,
|
|
@@ -27366,7 +27571,14 @@ function InspectorCommentRow({
|
|
|
27366
27571
|
)
|
|
27367
27572
|
] })
|
|
27368
27573
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
27369
|
-
/* @__PURE__ */ jsx(
|
|
27574
|
+
/* @__PURE__ */ jsx(
|
|
27575
|
+
CommentBody,
|
|
27576
|
+
{
|
|
27577
|
+
text: comment.text,
|
|
27578
|
+
mentions: comment.mentions,
|
|
27579
|
+
className: "mt-1 whitespace-pre-wrap break-words text-[11px] text-foreground"
|
|
27580
|
+
}
|
|
27581
|
+
),
|
|
27370
27582
|
canEdit && /* @__PURE__ */ jsxs("div", { className: "mt-1.5 inline-flex items-center rounded bg-muted overflow-hidden", children: [
|
|
27371
27583
|
/* @__PURE__ */ jsx(
|
|
27372
27584
|
"button",
|
|
@@ -27894,6 +28106,85 @@ function DocumentPropertiesCard({
|
|
|
27894
28106
|
] })
|
|
27895
28107
|
] });
|
|
27896
28108
|
}
|
|
28109
|
+
var CUSTOM_PRESET_VALUE = "";
|
|
28110
|
+
function SlideSizeCard({
|
|
28111
|
+
canvasSize,
|
|
28112
|
+
slideSizeEmu,
|
|
28113
|
+
canEdit,
|
|
28114
|
+
onUpdate,
|
|
28115
|
+
onUpdateSlideSize
|
|
28116
|
+
}) {
|
|
28117
|
+
const { t } = useTranslation();
|
|
28118
|
+
const selection = resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize });
|
|
28119
|
+
const presetDisabled = !canEdit || !onUpdateSlideSize;
|
|
28120
|
+
const handlePreset = (labelKey) => {
|
|
28121
|
+
const preset = SLIDE_SIZE_PRESETS.find((candidate) => candidate.labelKey === labelKey);
|
|
28122
|
+
if (!preset) {
|
|
28123
|
+
return;
|
|
28124
|
+
}
|
|
28125
|
+
onUpdateSlideSize?.(slideSizeFromPreset(preset, selection.orientation));
|
|
28126
|
+
};
|
|
28127
|
+
const handleOrientation = (orientation) => {
|
|
28128
|
+
onUpdateSlideSize?.(withSlideSizeOrientation(selection.size, orientation));
|
|
28129
|
+
};
|
|
28130
|
+
return /* @__PURE__ */ jsxs("div", { className: CARD, children: [
|
|
28131
|
+
/* @__PURE__ */ jsx("div", { className: HEADING, children: t("pptx.slideSize.title") }),
|
|
28132
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5 text-[11px]", children: [
|
|
28133
|
+
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
28134
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.slideSize.presets") }),
|
|
28135
|
+
/* @__PURE__ */ jsxs(
|
|
28136
|
+
"select",
|
|
28137
|
+
{
|
|
28138
|
+
"aria-label": t("pptx.slideSize.presets"),
|
|
28139
|
+
"data-pptx-slide-size-preset": true,
|
|
28140
|
+
disabled: presetDisabled,
|
|
28141
|
+
className: INPUT,
|
|
28142
|
+
value: selection.preset?.labelKey ?? CUSTOM_PRESET_VALUE,
|
|
28143
|
+
onChange: (e) => handlePreset(e.target.value),
|
|
28144
|
+
children: [
|
|
28145
|
+
selection.preset === void 0 && /* @__PURE__ */ jsx("option", { value: CUSTOM_PRESET_VALUE, children: t("pptx.slideSize.customSize") }),
|
|
28146
|
+
SLIDE_SIZE_PRESETS.map((preset) => /* @__PURE__ */ jsx("option", { value: preset.labelKey, children: t(`pptx.slideSize.preset.${preset.labelKey}`) }, preset.labelKey))
|
|
28147
|
+
]
|
|
28148
|
+
}
|
|
28149
|
+
)
|
|
28150
|
+
] }),
|
|
28151
|
+
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
28152
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.slideSize.orientation") }),
|
|
28153
|
+
/* @__PURE__ */ jsxs(
|
|
28154
|
+
"select",
|
|
28155
|
+
{
|
|
28156
|
+
"aria-label": t("pptx.slideSize.orientation"),
|
|
28157
|
+
"data-pptx-slide-size-orientation": true,
|
|
28158
|
+
disabled: presetDisabled,
|
|
28159
|
+
className: INPUT,
|
|
28160
|
+
value: selection.orientation,
|
|
28161
|
+
onChange: (e) => handleOrientation(e.target.value),
|
|
28162
|
+
children: [
|
|
28163
|
+
/* @__PURE__ */ jsx("option", { value: "landscape", children: t("pptx.slideSize.landscape") }),
|
|
28164
|
+
/* @__PURE__ */ jsx("option", { value: "portrait", children: t("pptx.slideSize.portrait") })
|
|
28165
|
+
]
|
|
28166
|
+
}
|
|
28167
|
+
)
|
|
28168
|
+
] }),
|
|
28169
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-1.5", children: [
|
|
28170
|
+
["W", "width"],
|
|
28171
|
+
["H", "height"]
|
|
28172
|
+
].map(([label, key]) => /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1", children: [
|
|
28173
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: label }),
|
|
28174
|
+
/* @__PURE__ */ jsx(
|
|
28175
|
+
"input",
|
|
28176
|
+
{
|
|
28177
|
+
type: "number",
|
|
28178
|
+
className: INPUT,
|
|
28179
|
+
disabled: !canEdit,
|
|
28180
|
+
value: canvasSize[key],
|
|
28181
|
+
onChange: (e) => onUpdate({ ...canvasSize, [key]: Number(e.target.value) })
|
|
28182
|
+
}
|
|
28183
|
+
)
|
|
28184
|
+
] }, key)) })
|
|
28185
|
+
] })
|
|
28186
|
+
] });
|
|
28187
|
+
}
|
|
27897
28188
|
function CheckboxRow({
|
|
27898
28189
|
label,
|
|
27899
28190
|
disabled,
|
|
@@ -27927,6 +28218,7 @@ function PresentationSettingsCard({
|
|
|
27927
28218
|
/* @__PURE__ */ jsxs(
|
|
27928
28219
|
"select",
|
|
27929
28220
|
{
|
|
28221
|
+
"aria-label": t("pptx.presentationSettings.showType"),
|
|
27930
28222
|
disabled: !canEdit,
|
|
27931
28223
|
className: cn(INPUT, "w-28"),
|
|
27932
28224
|
value: presentationProperties.showType ?? "presented",
|
|
@@ -28018,6 +28310,7 @@ function ThemeSelectorCard({
|
|
|
28018
28310
|
/* @__PURE__ */ jsx(
|
|
28019
28311
|
"select",
|
|
28020
28312
|
{
|
|
28313
|
+
"aria-label": t("pptx.documentProperties.themeHeading"),
|
|
28021
28314
|
disabled: themeOptions.length === 0,
|
|
28022
28315
|
className: INPUT,
|
|
28023
28316
|
value: selectedThemePath,
|
|
@@ -28051,32 +28344,6 @@ function ThemeSelectorCard({
|
|
|
28051
28344
|
] })
|
|
28052
28345
|
] });
|
|
28053
28346
|
}
|
|
28054
|
-
function SlideSizeCard({
|
|
28055
|
-
canvasSize,
|
|
28056
|
-
canEdit,
|
|
28057
|
-
onUpdate
|
|
28058
|
-
}) {
|
|
28059
|
-
const { t } = useTranslation();
|
|
28060
|
-
return /* @__PURE__ */ jsxs("div", { className: CARD, children: [
|
|
28061
|
-
/* @__PURE__ */ jsx("div", { className: HEADING, children: t("pptx.slideSize.title") }),
|
|
28062
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-1.5 text-[11px]", children: [
|
|
28063
|
-
["W", "width"],
|
|
28064
|
-
["H", "height"]
|
|
28065
|
-
].map(([label, key]) => /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-1", children: [
|
|
28066
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: label }),
|
|
28067
|
-
/* @__PURE__ */ jsx(
|
|
28068
|
-
"input",
|
|
28069
|
-
{
|
|
28070
|
-
type: "number",
|
|
28071
|
-
className: INPUT,
|
|
28072
|
-
disabled: !canEdit,
|
|
28073
|
-
value: canvasSize[key],
|
|
28074
|
-
onChange: (e) => onUpdate({ ...canvasSize, [key]: Number(e.target.value) })
|
|
28075
|
-
}
|
|
28076
|
-
)
|
|
28077
|
-
] }, key)) })
|
|
28078
|
-
] });
|
|
28079
|
-
}
|
|
28080
28347
|
var ALIAS_LABELS = {
|
|
28081
28348
|
bg1: "Background 1",
|
|
28082
28349
|
tx1: "Text 1",
|
|
@@ -28538,6 +28805,8 @@ function PresentationPropertiesPanel({
|
|
|
28538
28805
|
onUpdateSlide,
|
|
28539
28806
|
canvasSize,
|
|
28540
28807
|
onUpdateCanvasSize,
|
|
28808
|
+
slideSizeEmu,
|
|
28809
|
+
onUpdateSlideSize,
|
|
28541
28810
|
notesCanvasSize,
|
|
28542
28811
|
notesMaster,
|
|
28543
28812
|
handoutMaster,
|
|
@@ -28590,7 +28859,16 @@ function PresentationPropertiesPanel({
|
|
|
28590
28859
|
}
|
|
28591
28860
|
)
|
|
28592
28861
|
] }),
|
|
28593
|
-
/* @__PURE__ */ jsx(
|
|
28862
|
+
/* @__PURE__ */ jsx(
|
|
28863
|
+
SlideSizeCard,
|
|
28864
|
+
{
|
|
28865
|
+
canvasSize,
|
|
28866
|
+
slideSizeEmu,
|
|
28867
|
+
canEdit,
|
|
28868
|
+
onUpdate: onUpdateCanvasSize,
|
|
28869
|
+
onUpdateSlideSize
|
|
28870
|
+
}
|
|
28871
|
+
),
|
|
28594
28872
|
/* @__PURE__ */ jsx(
|
|
28595
28873
|
SlideTransitionSection,
|
|
28596
28874
|
{
|
|
@@ -28892,6 +29170,8 @@ function InspectorPane(props) {
|
|
|
28892
29170
|
replyingToCommentId,
|
|
28893
29171
|
replyDraftByCommentId,
|
|
28894
29172
|
onUpdateCanvasSize,
|
|
29173
|
+
slideSizeEmu,
|
|
29174
|
+
onUpdateSlideSize,
|
|
28895
29175
|
onUpdateElementStyle,
|
|
28896
29176
|
onUpdateTextStyle,
|
|
28897
29177
|
onUpdateSlide,
|
|
@@ -29011,6 +29291,8 @@ function InspectorPane(props) {
|
|
|
29011
29291
|
tagCollections,
|
|
29012
29292
|
onUpdateTagCollections,
|
|
29013
29293
|
onUpdateCanvasSize,
|
|
29294
|
+
slideSizeEmu,
|
|
29295
|
+
onUpdateSlideSize,
|
|
29014
29296
|
activeSlide,
|
|
29015
29297
|
theme,
|
|
29016
29298
|
onUpdateSlide
|
|
@@ -32088,6 +32370,8 @@ function ViewerInspector({
|
|
|
32088
32370
|
onUpdateElement,
|
|
32089
32371
|
onApplySelection,
|
|
32090
32372
|
onSetCanvasSize,
|
|
32373
|
+
slideSizeEmu,
|
|
32374
|
+
onSetSlideSize,
|
|
32091
32375
|
onMoveLayer,
|
|
32092
32376
|
onMoveLayerToEdge,
|
|
32093
32377
|
onDeleteElement,
|
|
@@ -32190,6 +32474,8 @@ function ViewerInspector({
|
|
|
32190
32474
|
replyingToCommentId: comments.replyingToCommentId,
|
|
32191
32475
|
replyDraftByCommentId: comments.replyDraftByCommentId,
|
|
32192
32476
|
onUpdateCanvasSize: onSetCanvasSize,
|
|
32477
|
+
slideSizeEmu,
|
|
32478
|
+
onUpdateSlideSize: onSetSlideSize,
|
|
32193
32479
|
editTemplateMode,
|
|
32194
32480
|
slideMasters,
|
|
32195
32481
|
onSetTemplateBackground,
|
|
@@ -32553,6 +32839,12 @@ function ViewerToolbarSection(props) {
|
|
|
32553
32839
|
const handleAddSection = useCallback(() => {
|
|
32554
32840
|
sectionOps?.addSection(t("pptx.sections.defaultName"), activeSlideIndex);
|
|
32555
32841
|
}, [sectionOps, activeSlideIndex, t]);
|
|
32842
|
+
const handleOpenSlideSize = useCallback(() => {
|
|
32843
|
+
s.setSelectedElementId(null);
|
|
32844
|
+
s.setSelectedElementIds([]);
|
|
32845
|
+
s.setSidebarPanelMode("properties");
|
|
32846
|
+
s.setIsInspectorPaneOpen(true);
|
|
32847
|
+
}, [s]);
|
|
32556
32848
|
const handleSelectAll = useCallback(() => {
|
|
32557
32849
|
const allIds = activeSlide?.elements.map((element) => element.id) ?? [];
|
|
32558
32850
|
if (allIds.length > 0) {
|
|
@@ -32671,7 +32963,7 @@ function ViewerToolbarSection(props) {
|
|
|
32671
32963
|
s.setIsThemeGalleryOpen((p) => !p);
|
|
32672
32964
|
break;
|
|
32673
32965
|
case "slideSize":
|
|
32674
|
-
|
|
32966
|
+
handleOpenSlideSize();
|
|
32675
32967
|
break;
|
|
32676
32968
|
}
|
|
32677
32969
|
break;
|
|
@@ -32700,7 +32992,17 @@ function ViewerToolbarSection(props) {
|
|
|
32700
32992
|
break;
|
|
32701
32993
|
}
|
|
32702
32994
|
},
|
|
32703
|
-
[
|
|
32995
|
+
[
|
|
32996
|
+
ops,
|
|
32997
|
+
insertHandlers,
|
|
32998
|
+
s,
|
|
32999
|
+
dialogs,
|
|
33000
|
+
zoom,
|
|
33001
|
+
onSetMode,
|
|
33002
|
+
onEnterPresenterView,
|
|
33003
|
+
manipulation,
|
|
33004
|
+
handleOpenSlideSize
|
|
33005
|
+
]
|
|
32704
33006
|
);
|
|
32705
33007
|
const handleQuickAccessCommand = useCallback(
|
|
32706
33008
|
(id) => {
|
|
@@ -32893,6 +33195,7 @@ function ViewerToolbarSection(props) {
|
|
|
32893
33195
|
onToggleVersionHistory: () => propertyHandlers.setIsVersionHistoryOpen((p) => !p),
|
|
32894
33196
|
onOpenPasswordProtection: () => dialogs.setIsPasswordDialogOpen(true),
|
|
32895
33197
|
onOpenDocumentProperties: () => dialogs.setIsDocPropsDialogOpen(true),
|
|
33198
|
+
onOpenSlideSize: handleOpenSlideSize,
|
|
32896
33199
|
onOpenFontEmbedding: () => dialogs.setIsFontEmbeddingOpen(true),
|
|
32897
33200
|
onOpenDigitalSignatures: () => dialogs.setIsDigitalSigDialogOpen(true),
|
|
32898
33201
|
onEnterPresenterView,
|
|
@@ -33571,6 +33874,7 @@ function ViewerPresentationLayer(props) {
|
|
|
33571
33874
|
canvasSize,
|
|
33572
33875
|
templateElements,
|
|
33573
33876
|
presentation,
|
|
33877
|
+
activeCustomShow,
|
|
33574
33878
|
onExitPresentation,
|
|
33575
33879
|
isMobile,
|
|
33576
33880
|
onUpdateNotes
|
|
@@ -33595,6 +33899,7 @@ function ViewerPresentationLayer(props) {
|
|
|
33595
33899
|
currentSlideIndex: presentation.presentationSlideIndex,
|
|
33596
33900
|
canvasSize,
|
|
33597
33901
|
templateElements,
|
|
33902
|
+
activeCustomShow,
|
|
33598
33903
|
presentationStartTime: presentation.presentationStartTime,
|
|
33599
33904
|
onMovePresentationSlide: presentation.movePresentationSlide,
|
|
33600
33905
|
onExit: onExitPresentation,
|
|
@@ -33753,7 +34058,7 @@ function PresentationStage({
|
|
|
33753
34058
|
showResizeHandles: false,
|
|
33754
34059
|
renderInk: false,
|
|
33755
34060
|
renderGroups: true,
|
|
33756
|
-
|
|
34061
|
+
adjustmentHandles: [],
|
|
33757
34062
|
onResizePointerDown: noop2,
|
|
33758
34063
|
onAdjustmentPointerDown: noop2,
|
|
33759
34064
|
onInlineEditChange: noop2,
|
|
@@ -33790,7 +34095,7 @@ function PresentationStage({
|
|
|
33790
34095
|
showResizeHandles: false,
|
|
33791
34096
|
renderInk: true,
|
|
33792
34097
|
renderGroups: true,
|
|
33793
|
-
|
|
34098
|
+
adjustmentHandles: [],
|
|
33794
34099
|
onResizePointerDown: noop2,
|
|
33795
34100
|
onAdjustmentPointerDown: noop2,
|
|
33796
34101
|
onInlineEditChange: noop2,
|
|
@@ -34356,7 +34661,7 @@ ${url}`)) {
|
|
|
34356
34661
|
var AiChatPanel = lazy(async () => {
|
|
34357
34662
|
const [{ useChat }, { default: Panel }] = await Promise.all([
|
|
34358
34663
|
import('@ai-sdk/react'),
|
|
34359
|
-
import('./AiChatPanel-
|
|
34664
|
+
import('./AiChatPanel-FZUKTQPQ.mjs')
|
|
34360
34665
|
]);
|
|
34361
34666
|
function BoundAiChatPanel(props) {
|
|
34362
34667
|
return /* @__PURE__ */ jsx(Panel, { ...props, useChat });
|
|
@@ -34569,6 +34874,7 @@ function ThemeColorSchemeEditor({
|
|
|
34569
34874
|
/* @__PURE__ */ jsxs(
|
|
34570
34875
|
"select",
|
|
34571
34876
|
{
|
|
34877
|
+
"aria-label": t("pptx.themeEditor.headingFont"),
|
|
34572
34878
|
className: THEME_EDITOR_INPUT,
|
|
34573
34879
|
disabled: !canEdit,
|
|
34574
34880
|
value: COMMON_FONTS.includes(majorFont) ? majorFont : "__custom__",
|
|
@@ -34589,6 +34895,7 @@ function ThemeColorSchemeEditor({
|
|
|
34589
34895
|
/* @__PURE__ */ jsxs(
|
|
34590
34896
|
"select",
|
|
34591
34897
|
{
|
|
34898
|
+
"aria-label": t("pptx.themeEditor.bodyFont"),
|
|
34592
34899
|
className: THEME_EDITOR_INPUT,
|
|
34593
34900
|
disabled: !canEdit,
|
|
34594
34901
|
value: COMMON_FONTS.includes(minorFont) ? minorFont : "__custom__",
|
|
@@ -35261,6 +35568,11 @@ function ViewerSidePanels(props) {
|
|
|
35261
35568
|
aiBridge,
|
|
35262
35569
|
aiPanel
|
|
35263
35570
|
} = props;
|
|
35571
|
+
const handleSetSlideSize = (size) => {
|
|
35572
|
+
s.setSlideSizeEmu(size);
|
|
35573
|
+
s.setCanvasSize(slideSizeToCanvasPx(size));
|
|
35574
|
+
history.markDirty();
|
|
35575
|
+
};
|
|
35264
35576
|
const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
|
|
35265
35577
|
const currentBuiltInTheme = BUILT_IN_THEMES.find(
|
|
35266
35578
|
(candidate) => themeColorSchemesEqual(s.theme?.colorScheme, candidate.colorScheme)
|
|
@@ -35289,6 +35601,8 @@ function ViewerSidePanels(props) {
|
|
|
35289
35601
|
onUpdateElement: ops.updateSelectedElement,
|
|
35290
35602
|
onApplySelection: ops.applySelection,
|
|
35291
35603
|
onSetCanvasSize: s.setCanvasSize,
|
|
35604
|
+
slideSizeEmu: s.slideSizeEmu,
|
|
35605
|
+
onSetSlideSize: handleSetSlideSize,
|
|
35292
35606
|
onMoveLayer: manipulation.handleMoveLayer,
|
|
35293
35607
|
onMoveLayerToEdge: manipulation.handleMoveLayerToEdge,
|
|
35294
35608
|
onDeleteElement: manipulation.handleDelete,
|
|
@@ -35480,6 +35794,7 @@ function ViewerMainContent(props) {
|
|
|
35480
35794
|
onDeleteSection: sectionOps.deleteSection,
|
|
35481
35795
|
onMoveSectionUp: sectionOps.moveSectionUp,
|
|
35482
35796
|
onMoveSectionDown: sectionOps.moveSectionDown,
|
|
35797
|
+
onToggleSectionCollapse: sectionOps.toggleSectionCollapse,
|
|
35483
35798
|
rehearsalTimings: Object.keys(presentation.recordedTimings).length > 0 ? presentation.recordedTimings : void 0,
|
|
35484
35799
|
panelWidth: leftPanelWidth,
|
|
35485
35800
|
fieldContext: thumbnailFieldContext,
|
|
@@ -35519,6 +35834,22 @@ function ViewerMainContent(props) {
|
|
|
35519
35834
|
(master) => master ? { ...master, backgroundColor } : master
|
|
35520
35835
|
);
|
|
35521
35836
|
state.setIsDirty(true);
|
|
35837
|
+
},
|
|
35838
|
+
canEdit,
|
|
35839
|
+
onSlidesBackgroundChange: (backgroundColor) => {
|
|
35840
|
+
const write = setMasterViewBackgroundColor(
|
|
35841
|
+
{ slideMasters: state.slideMasters },
|
|
35842
|
+
{
|
|
35843
|
+
tab: "slides",
|
|
35844
|
+
masterIndex: state.activeMasterIndex,
|
|
35845
|
+
layoutIndex: state.activeLayoutIndex
|
|
35846
|
+
},
|
|
35847
|
+
backgroundColor
|
|
35848
|
+
);
|
|
35849
|
+
if (write?.slideMasters) {
|
|
35850
|
+
state.setSlideMasters(write.slideMasters);
|
|
35851
|
+
state.setIsDirty(true);
|
|
35852
|
+
}
|
|
35522
35853
|
}
|
|
35523
35854
|
}
|
|
35524
35855
|
),
|
|
@@ -35617,6 +35948,69 @@ function ViewerMainContent(props) {
|
|
|
35617
35948
|
)
|
|
35618
35949
|
] }) });
|
|
35619
35950
|
}
|
|
35951
|
+
function AutosaveRecoveryDialog({
|
|
35952
|
+
prompt,
|
|
35953
|
+
onRestore,
|
|
35954
|
+
onDiscard
|
|
35955
|
+
}) {
|
|
35956
|
+
const { t } = useTranslation();
|
|
35957
|
+
if (!prompt) {
|
|
35958
|
+
return null;
|
|
35959
|
+
}
|
|
35960
|
+
const title = t(prompt.titleKey);
|
|
35961
|
+
const when = t(prompt.ageKey, prompt.ageParams);
|
|
35962
|
+
return /* @__PURE__ */ jsx(
|
|
35963
|
+
"div",
|
|
35964
|
+
{
|
|
35965
|
+
style: { zIndex: 1200 },
|
|
35966
|
+
className: "fixed inset-0 flex items-center justify-center bg-black/50",
|
|
35967
|
+
"data-pptx-autosave-recovery": "true",
|
|
35968
|
+
children: /* @__PURE__ */ jsxs(
|
|
35969
|
+
"div",
|
|
35970
|
+
{
|
|
35971
|
+
role: "dialog",
|
|
35972
|
+
"aria-modal": "true",
|
|
35973
|
+
"aria-label": title,
|
|
35974
|
+
className: "bg-background border border-border rounded-lg shadow-xl w-[440px] max-w-[90vw] p-6",
|
|
35975
|
+
children: [
|
|
35976
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 mb-3", children: [
|
|
35977
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center w-10 h-10 rounded-full bg-primary/10", children: /* @__PURE__ */ jsx(LuHistory, { className: "w-5 h-5 text-primary" }) }),
|
|
35978
|
+
/* @__PURE__ */ jsx("h2", { className: "text-base font-semibold text-foreground", children: title })
|
|
35979
|
+
] }),
|
|
35980
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t(prompt.messageKey, prompt.messageParams) }),
|
|
35981
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-2", children: t("pptx.autosave.recovery.savedLabel", { when }) }),
|
|
35982
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2 mt-6", children: [
|
|
35983
|
+
/* @__PURE__ */ jsxs(
|
|
35984
|
+
"button",
|
|
35985
|
+
{
|
|
35986
|
+
type: "button",
|
|
35987
|
+
className: "inline-flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-md border border-border bg-background text-foreground hover:bg-accent transition-colors",
|
|
35988
|
+
onClick: onDiscard,
|
|
35989
|
+
children: [
|
|
35990
|
+
/* @__PURE__ */ jsx(LuTrash2, { className: "w-4 h-4" }),
|
|
35991
|
+
t(prompt.discardKey)
|
|
35992
|
+
]
|
|
35993
|
+
}
|
|
35994
|
+
),
|
|
35995
|
+
/* @__PURE__ */ jsxs(
|
|
35996
|
+
"button",
|
|
35997
|
+
{
|
|
35998
|
+
type: "button",
|
|
35999
|
+
className: "inline-flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-md bg-primary text-white hover:bg-primary/90 transition-colors",
|
|
36000
|
+
onClick: onRestore,
|
|
36001
|
+
children: [
|
|
36002
|
+
/* @__PURE__ */ jsx(LuHistory, { className: "w-4 h-4" }),
|
|
36003
|
+
t(prompt.restoreKey)
|
|
36004
|
+
]
|
|
36005
|
+
}
|
|
36006
|
+
)
|
|
36007
|
+
] })
|
|
36008
|
+
]
|
|
36009
|
+
}
|
|
36010
|
+
)
|
|
36011
|
+
}
|
|
36012
|
+
);
|
|
36013
|
+
}
|
|
35620
36014
|
var ToggleRow = ({ checked, onChange, icon, label }) => /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2.5 cursor-pointer group select-none", children: [
|
|
35621
36015
|
/* @__PURE__ */ jsxs("span", { className: "relative flex items-center justify-center w-4 h-4", children: [
|
|
35622
36016
|
/* @__PURE__ */ jsx(
|
|
@@ -35886,6 +36280,7 @@ function MobileChromeOverlay(props) {
|
|
|
35886
36280
|
onDeleteSection: editorOps.sectionOps.deleteSection,
|
|
35887
36281
|
onMoveSectionUp: editorOps.sectionOps.moveSectionUp,
|
|
35888
36282
|
onMoveSectionDown: editorOps.sectionOps.moveSectionDown,
|
|
36283
|
+
onToggleSectionCollapse: editorOps.sectionOps.toggleSectionCollapse,
|
|
35889
36284
|
rehearsalTimings: Object.keys(presentation.recordedTimings).length > 0 ? presentation.recordedTimings : void 0
|
|
35890
36285
|
}
|
|
35891
36286
|
),
|
|
@@ -37304,6 +37699,8 @@ var PowerPointViewer = forwardRef(
|
|
|
37304
37699
|
filePath,
|
|
37305
37700
|
fileName,
|
|
37306
37701
|
canEdit = false,
|
|
37702
|
+
autosave: hostAutosave,
|
|
37703
|
+
autosaveIntervalMs: hostAutosaveIntervalMs,
|
|
37307
37704
|
onContentChange,
|
|
37308
37705
|
onDirtyChange,
|
|
37309
37706
|
onActiveSlideChange,
|
|
@@ -37424,6 +37821,12 @@ var PowerPointViewer = forwardRef(
|
|
|
37424
37821
|
const [isSettingsOpen, setIsSettingsOpen] = useState(false);
|
|
37425
37822
|
const [isHeaderFooterOpen, setIsHeaderFooterOpen] = useState(false);
|
|
37426
37823
|
const [autosaveEnabled, setAutosaveEnabled] = useState(true);
|
|
37824
|
+
const autosaveActivation = resolveAutosaveActivation({
|
|
37825
|
+
hostAutosave,
|
|
37826
|
+
userEnabled: autosaveEnabled,
|
|
37827
|
+
canEdit,
|
|
37828
|
+
filePath
|
|
37829
|
+
});
|
|
37427
37830
|
const [isShareDialogOpen, setIsShareDialogOpen] = useState(false);
|
|
37428
37831
|
const { reducedMotion, toggleReducedMotion } = useReducedMotion();
|
|
37429
37832
|
const state = useViewerState({ content, canEdit });
|
|
@@ -37544,6 +37947,7 @@ var PowerPointViewer = forwardRef(
|
|
|
37544
37947
|
activeMaster: state.activeMaster,
|
|
37545
37948
|
presentationGridSpacing: state.presentationProperties.gridSpacing
|
|
37546
37949
|
});
|
|
37950
|
+
const activeCustomShow = state.customShows.find((show) => show.id === state.activeCustomShowId) ?? null;
|
|
37547
37951
|
const hasActivePointerInteraction = useCallback(
|
|
37548
37952
|
() => Boolean(
|
|
37549
37953
|
state.dragStateRef.current || state.resizeStateRef.current || state.marqueeStateRef.current || state.shapeAdjustmentDragStateRef.current || state.isDrawingRef.current
|
|
@@ -37602,7 +38006,13 @@ var PowerPointViewer = forwardRef(
|
|
|
37602
38006
|
setMode: state.setMode,
|
|
37603
38007
|
setActiveSlideIndex: state.setActiveSlideIndex,
|
|
37604
38008
|
setSlides: state.setSlides,
|
|
37605
|
-
history
|
|
38009
|
+
history,
|
|
38010
|
+
// PowerPoint's bare `J` during a show toggles live captions. It resolves
|
|
38011
|
+
// in the shared slide-show keymap; this is the state it has to reach.
|
|
38012
|
+
onToggleSubtitles: () => state.setPresentationProperties((prev) => ({
|
|
38013
|
+
...prev,
|
|
38014
|
+
showSubtitles: !prev.showSubtitles
|
|
38015
|
+
}))
|
|
37606
38016
|
});
|
|
37607
38017
|
useTouchGestures({
|
|
37608
38018
|
targetRef: zoom.canvasViewportRef,
|
|
@@ -37698,6 +38108,7 @@ var PowerPointViewer = forwardRef(
|
|
|
37698
38108
|
handleEnterPresenterView,
|
|
37699
38109
|
handleEnterRehearsalMode,
|
|
37700
38110
|
autosaveStatus,
|
|
38111
|
+
recovery,
|
|
37701
38112
|
isEncryptedDialogOpen,
|
|
37702
38113
|
setIsEncryptedDialogOpen,
|
|
37703
38114
|
handlerRef,
|
|
@@ -37714,10 +38125,14 @@ var PowerPointViewer = forwardRef(
|
|
|
37714
38125
|
gridSpacingPx,
|
|
37715
38126
|
content,
|
|
37716
38127
|
filePath,
|
|
37717
|
-
autosaveEnabled,
|
|
37718
|
-
|
|
37719
|
-
//
|
|
37720
|
-
|
|
38128
|
+
autosaveEnabled: autosaveActivation.active,
|
|
38129
|
+
autosaveAllowed: hostAutosave !== false,
|
|
38130
|
+
// Host prop first (an explicit policy), else File > Options > Save >
|
|
38131
|
+
// "Save AutoRecover information every N minutes", else the shared 120s.
|
|
38132
|
+
autosaveIntervalMs: resolveAutosaveIntervalMs({
|
|
38133
|
+
hostIntervalMs: hostAutosaveIntervalMs,
|
|
38134
|
+
optionsIntervalSeconds: resolveAutosaveIntervalSeconds(viewerOptions)
|
|
38135
|
+
}),
|
|
37721
38136
|
canEdit,
|
|
37722
38137
|
mode,
|
|
37723
38138
|
slides,
|
|
@@ -37850,8 +38265,12 @@ var PowerPointViewer = forwardRef(
|
|
|
37850
38265
|
onOpenRecentFile: handleOpenRecentFile,
|
|
37851
38266
|
fileName,
|
|
37852
38267
|
autosaveStatus,
|
|
37853
|
-
autosaveEnabled,
|
|
37854
|
-
onToggleAutosave: () =>
|
|
38268
|
+
autosaveEnabled: autosaveActivation.active,
|
|
38269
|
+
onToggleAutosave: () => {
|
|
38270
|
+
if (autosaveActivation.toggleAvailable) {
|
|
38271
|
+
setAutosaveEnabled((p) => !p);
|
|
38272
|
+
}
|
|
38273
|
+
},
|
|
37855
38274
|
hiddenActions,
|
|
37856
38275
|
aiEnabled: Boolean(ai),
|
|
37857
38276
|
isAiPanelOpen: aiPanel.isOpen,
|
|
@@ -37969,6 +38388,17 @@ var PowerPointViewer = forwardRef(
|
|
|
37969
38388
|
onDiscardAnnotations: handleDiscardAnnotations
|
|
37970
38389
|
}
|
|
37971
38390
|
),
|
|
38391
|
+
/* @__PURE__ */ jsx(
|
|
38392
|
+
AutosaveRecoveryDialog,
|
|
38393
|
+
{
|
|
38394
|
+
prompt: shouldShowAutosaveRecoveryPrompt({
|
|
38395
|
+
prompt: recovery.prompt,
|
|
38396
|
+
presenting: mode === "present"
|
|
38397
|
+
}) ? recovery.prompt : null,
|
|
38398
|
+
onRestore: recovery.restore,
|
|
38399
|
+
onDiscard: recovery.discard
|
|
38400
|
+
}
|
|
38401
|
+
),
|
|
37972
38402
|
/* @__PURE__ */ jsx(
|
|
37973
38403
|
SettingsDialog,
|
|
37974
38404
|
{
|
|
@@ -38087,6 +38517,7 @@ var PowerPointViewer = forwardRef(
|
|
|
38087
38517
|
canvasSize,
|
|
38088
38518
|
templateElements: state.templateElements,
|
|
38089
38519
|
presentation,
|
|
38520
|
+
activeCustomShow,
|
|
38090
38521
|
onExitPresentation: () => handleSetMode("edit"),
|
|
38091
38522
|
onUpdateNotes: propertyHandlers.handleUpdateNotes,
|
|
38092
38523
|
isMobile
|