pptx-react-viewer 3.0.4 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -0
- package/dist/{AiChatPanel-E4V3FYLR.js → AiChatPanel-6PERJN7M.js} +24 -24
- package/dist/AiChatPanel-6PERJN7M.js.br +0 -0
- package/dist/AiChatPanel-6PERJN7M.js.gz +0 -0
- package/dist/{AiChatPanel-GSTUOESI.mjs → AiChatPanel-EIENGCKW.mjs} +4 -4
- package/dist/AiChatPanel-EIENGCKW.mjs.br +0 -0
- package/dist/AiChatPanel-EIENGCKW.mjs.gz +0 -0
- package/dist/Area3DChartScene-TXCLQLBQ.js +47 -0
- package/dist/Area3DChartScene-TXCLQLBQ.js.br +0 -0
- package/dist/Area3DChartScene-TXCLQLBQ.js.gz +0 -0
- package/dist/Area3DChartScene-W6SVC235.mjs +45 -0
- package/dist/Area3DChartScene-W6SVC235.mjs.br +0 -0
- package/dist/Area3DChartScene-W6SVC235.mjs.gz +0 -0
- package/dist/Bar3DChartScene-6RHPFLZT.js +47 -0
- package/dist/Bar3DChartScene-6RHPFLZT.js.br +0 -0
- package/dist/Bar3DChartScene-6RHPFLZT.js.gz +0 -0
- package/dist/Bar3DChartScene-FCVUZIJ3.mjs +45 -0
- package/dist/Bar3DChartScene-FCVUZIJ3.mjs.br +0 -0
- package/dist/Bar3DChartScene-FCVUZIJ3.mjs.gz +0 -0
- package/dist/Line3DChartScene-2ZFE53KO.js +47 -0
- package/dist/Line3DChartScene-2ZFE53KO.js.br +0 -0
- package/dist/Line3DChartScene-2ZFE53KO.js.gz +0 -0
- package/dist/Line3DChartScene-MJXFXSPW.mjs +45 -0
- package/dist/Line3DChartScene-MJXFXSPW.mjs.br +0 -0
- package/dist/Line3DChartScene-MJXFXSPW.mjs.gz +0 -0
- package/dist/{Model3DScene-45JR5NXN.js → Model3DScene-7VQNRY5B.js} +2 -2
- package/dist/Model3DScene-7VQNRY5B.js.br +0 -0
- package/dist/Model3DScene-7VQNRY5B.js.gz +0 -0
- package/dist/{Model3DScene-634CXE46.mjs → Model3DScene-A5RV3KNJ.mjs} +1 -1
- package/dist/Model3DScene-A5RV3KNJ.mjs.br +0 -0
- package/dist/Model3DScene-A5RV3KNJ.mjs.gz +0 -0
- package/dist/PieChart3DScene-JTHZESS3.js +47 -0
- package/dist/PieChart3DScene-JTHZESS3.js.br +0 -0
- package/dist/PieChart3DScene-JTHZESS3.js.gz +0 -0
- package/dist/PieChart3DScene-UEVFZZVW.mjs +45 -0
- package/dist/PieChart3DScene-UEVFZZVW.mjs.br +0 -0
- package/dist/PieChart3DScene-UEVFZZVW.mjs.gz +0 -0
- package/dist/{PowerPointViewer-SkkxAGKa.d.ts → PowerPointViewer-Cl6jBPNw.d.ts} +2 -2
- package/dist/PowerPointViewer-Cl6jBPNw.d.ts.map +1 -0
- package/dist/{SurfaceChart3DScene-BBQFOGVR.js → SurfaceChart3DScene-FXUNT5OK.js} +2 -2
- package/dist/SurfaceChart3DScene-FXUNT5OK.js.br +0 -0
- package/dist/SurfaceChart3DScene-FXUNT5OK.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-OBVXGXSD.mjs → SurfaceChart3DScene-WD65PAG4.mjs} +1 -1
- package/dist/SurfaceChart3DScene-WD65PAG4.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-WD65PAG4.mjs.gz +0 -0
- package/dist/{audience-content-store-Bx4Yj2pN.d.ts → audience-content-store-bR7Gs_1S.d.ts} +2 -2
- package/dist/{audience-content-store-Bx4Yj2pN.d.ts.map → audience-content-store-bR7Gs_1S.d.ts.map} +1 -1
- package/dist/{chunk-J4KXCPQ3.mjs → chunk-5ERW2B25.mjs} +1 -1
- package/dist/chunk-5ERW2B25.mjs.br +0 -0
- package/dist/chunk-5ERW2B25.mjs.gz +0 -0
- package/dist/{chunk-Z4F5BCQB.js → chunk-GCE2TYHF.js} +170 -169
- package/dist/chunk-GCE2TYHF.js.br +0 -0
- package/dist/chunk-GCE2TYHF.js.gz +0 -0
- package/dist/{chunk-AX4JM6TW.js → chunk-GIFQWIW5.js} +2535 -1959
- package/dist/chunk-GIFQWIW5.js.br +0 -0
- package/dist/chunk-GIFQWIW5.js.gz +0 -0
- package/dist/{chunk-NPA3EBET.mjs → chunk-ICAYXQVJ.mjs} +720 -144
- package/dist/chunk-ICAYXQVJ.mjs.br +0 -0
- package/dist/chunk-ICAYXQVJ.mjs.gz +0 -0
- package/dist/{chunk-7HPI5HBA.js → chunk-IDTNKL4S.js} +6201 -2447
- package/dist/chunk-IDTNKL4S.js.br +0 -0
- package/dist/chunk-IDTNKL4S.js.gz +0 -0
- package/dist/{chunk-V7ZLEZ5W.mjs → chunk-ISDTM2V3.mjs} +6172 -2447
- package/dist/chunk-ISDTM2V3.mjs.br +0 -0
- package/dist/chunk-ISDTM2V3.mjs.gz +0 -0
- package/dist/{chunk-ROWGR6GY.mjs → chunk-MAOUVROK.mjs} +3 -3
- package/dist/chunk-MAOUVROK.mjs.br +0 -0
- package/dist/chunk-MAOUVROK.mjs.gz +0 -0
- package/dist/{chunk-L5MNLIQF.mjs → chunk-MKPSUHUH.mjs} +25 -0
- package/dist/chunk-MKPSUHUH.mjs.br +0 -0
- package/dist/chunk-MKPSUHUH.mjs.gz +0 -0
- package/dist/{chunk-XURJHY6K.js → chunk-OTBQBTTQ.js} +391 -391
- package/dist/chunk-OTBQBTTQ.js.br +0 -0
- package/dist/chunk-OTBQBTTQ.js.gz +0 -0
- package/dist/{chunk-6ILXI752.mjs → chunk-OUX4O5XK.mjs} +17 -16
- package/dist/chunk-OUX4O5XK.mjs.br +0 -0
- package/dist/chunk-OUX4O5XK.mjs.gz +0 -0
- package/dist/{chunk-5IYGA2HX.js → chunk-OZGFMZEX.js} +3 -3
- package/dist/chunk-OZGFMZEX.js.br +0 -0
- package/dist/chunk-OZGFMZEX.js.gz +0 -0
- package/dist/{chunk-U6A5FWWE.js → chunk-PIUB7R2K.js} +25 -0
- package/dist/chunk-PIUB7R2K.js.br +0 -0
- package/dist/chunk-PIUB7R2K.js.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 +202 -9
- package/dist/index.js +47 -47
- 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 +159 -9
- 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-kLpvSPxq.d.ts → types-Bzdkiakq.d.ts} +44 -1
- package/dist/{types-kLpvSPxq.d.ts.map → types-Bzdkiakq.d.ts.map} +1 -1
- package/dist/{useViewerBuildingBlocks-fh7rq4jc.d.ts → useViewerBuildingBlocks-DC1O_op4.d.ts} +2 -2
- package/dist/{useViewerBuildingBlocks-fh7rq4jc.d.ts.map → useViewerBuildingBlocks-DC1O_op4.d.ts.map} +1 -1
- package/dist/viewer/index.d.ts +196 -6
- 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-E4V3FYLR.js.br +0 -0
- package/dist/AiChatPanel-E4V3FYLR.js.gz +0 -0
- package/dist/AiChatPanel-GSTUOESI.mjs.br +0 -0
- package/dist/AiChatPanel-GSTUOESI.mjs.gz +0 -0
- package/dist/Model3DScene-45JR5NXN.js.br +0 -0
- package/dist/Model3DScene-45JR5NXN.js.gz +0 -0
- package/dist/Model3DScene-634CXE46.mjs.br +0 -0
- package/dist/Model3DScene-634CXE46.mjs.gz +0 -0
- package/dist/PowerPointViewer-SkkxAGKa.d.ts.map +0 -1
- package/dist/SurfaceChart3DScene-BBQFOGVR.js.br +0 -0
- package/dist/SurfaceChart3DScene-BBQFOGVR.js.gz +0 -0
- package/dist/SurfaceChart3DScene-OBVXGXSD.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-OBVXGXSD.mjs.gz +0 -0
- package/dist/chunk-5IYGA2HX.js.br +0 -0
- package/dist/chunk-5IYGA2HX.js.gz +0 -0
- package/dist/chunk-6ILXI752.mjs.br +0 -0
- package/dist/chunk-6ILXI752.mjs.gz +0 -0
- package/dist/chunk-7HPI5HBA.js.br +0 -0
- package/dist/chunk-7HPI5HBA.js.gz +0 -0
- package/dist/chunk-AX4JM6TW.js.br +0 -0
- package/dist/chunk-AX4JM6TW.js.gz +0 -0
- package/dist/chunk-J4KXCPQ3.mjs.br +0 -0
- package/dist/chunk-J4KXCPQ3.mjs.gz +0 -0
- package/dist/chunk-L5MNLIQF.mjs.br +0 -0
- package/dist/chunk-L5MNLIQF.mjs.gz +0 -0
- package/dist/chunk-NPA3EBET.mjs.br +0 -0
- package/dist/chunk-NPA3EBET.mjs.gz +0 -0
- package/dist/chunk-ROWGR6GY.mjs.br +0 -0
- package/dist/chunk-ROWGR6GY.mjs.gz +0 -0
- package/dist/chunk-U6A5FWWE.js.br +0 -0
- package/dist/chunk-U6A5FWWE.js.gz +0 -0
- package/dist/chunk-V7ZLEZ5W.mjs.br +0 -0
- package/dist/chunk-V7ZLEZ5W.mjs.gz +0 -0
- package/dist/chunk-XURJHY6K.js.br +0 -0
- package/dist/chunk-XURJHY6K.js.gz +0 -0
- package/dist/chunk-Z4F5BCQB.js.br +0 -0
- package/dist/chunk-Z4F5BCQB.js.gz +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
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 } 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, 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-
|
|
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, 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, buildSubpathFillOverlay, isImageLikeElement, getComputedFillStyle, strokeOutlineViewBox, revealedSmartArtNodeCount, buildSmartArtA11y, computeSmartArtElementLayout, flattenNodes, buildSummaryZoomView, isImageTiled, getImageColorWashStyle, placeCaretAtEnd, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, resolveChartKind, ensureChartInteractionStyles, applyChartPartHighlight, 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, buildChromeStyle, getImageSvgFilters, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, findChartPartTarget, advanceChartValueDrag, beginChartValueDrag, buildSurfaceChart3DDataForElement, 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, buildBarActions, 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, buildActiveSessionUsers, 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, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, SLIDE_TRANSITION_KEYFRAMES, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, motionPathFor, setMotionPath, getShapeAdjustmentHandleDescriptors, PRESENTER_NAVIGATOR_LABEL_KEYS, PEN_COLORS, HIGHLIGHTER_COLORS, isBlackboardActive, slideSizeToCanvasPx, resolveSelectionPaneRename, PRESET_THEMES, resolveNotesSegments, segmentsToEditorHtml, DEBOUNCE_MS, createPlainNotesSegments, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX, isUrlSafe, buildNotesPrintHtml, toggleSheet, sanitizeMathMl, computeHandoutLayout, getPrintableArea, generateNoteLineCount, computeAllNotesPages, getNotesPrintableArea, downloadBlob, clampOptionNumber, 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, getElementTransformWithoutRotation, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, themeColorLabel, buildThemeColorGrid, THEME_COLOR_SCHEME_KEYS, COMMON_FONTS, buildSmartArtPresetData, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, isCurrentLayout, SLIDE_TEMPLATES, computeAnchoredPopupPosition, 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, applyTableStylePreset, evenColumnWidths, redistributeColumnWidth, evenRowHeights, patchChartData, setChartCategoryLabel, setChartCellValue, addChartCategory, removeChartCategory, addChartSeries, removeChartSeries, setChartAxisLogScale, setChartAxisTitleStyle, setChartAxisGridlineStyle, setChartSeriesMarker, setChartSeriesChartType, setChartDataPointFill, setChartDataPointExplosion, setChartDataPointMarker, setChartDataPointLabel, describeSmartArtBounds, canAddTopLevelNode, classifyExtraConnections, siblingIndex, siblingCount, canRemoveTopLevelNode, 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, resolveTemplateBackgroundRows, formatCommentTimestamp, clearMotionPath, DIRECTIONAL_PRESETS, buildAnimationTimelineBars, motionPathPresetIdForPath, computeMergeCellRight, computeMergeCellDown, computeSplitCell, CHART_TYPE_OPTIONS, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, addSmartArtNodeAsChild, removeSmartArtNode, addSiblingAfter, removeEmptyNode, demote, promote, reorder, 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, reorderAnimationTo, animationEffectLabel, LBL, SEL, FILL_MODE_OPTIONS, SECTION_HEADING, NUM, switchSmartArtLayout, 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-V7ZLEZ5W.mjs';
|
|
6
|
-
import
|
|
1
|
+
import { computeFocusTargets, aiChangeAnimationCss, changeGhostStyle, createChatHistoryStore, toRenderableParts } from './chunk-5ERW2B25.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 } from './chunk-MAOUVROK.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-OUX4O5XK.mjs';
|
|
4
|
+
import { LOCALE_CATALOG, translationsEn } from './chunk-MKPSUHUH.mjs';
|
|
5
|
+
import { hasShapeProperties, normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, hasTextProperties, getElementTransform, getAriaRoleDescription, getAriaLabel, getAriaRole, resolveElementInteractivity, isEditableTextElement, isElementRendered, isElementActionable, getImageEffectsOpacity, getImageEffectsFilter, 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, buildSubpathFillOverlay, isImageLikeElement, getComputedFillStyle, strokeOutlineViewBox, revealedSmartArtNodeCount, buildSmartArtA11y, computeSmartArtElementLayout, flattenNodes, buildSummaryZoomView, isImageTiled, getImageColorWashStyle, placeCaretAtEnd, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, resolveChartKind, ensureChartInteractionStyles, applyChartPartHighlight, applyChartBuildReveal, formatAxisValue, hasPressureVariation, getInkReplayStyles, INK_REPLAY_KEYFRAMES, resolveInkColor, resolveInkWidth, resolveInkOpacity, pressuresToWidths, getContentPartReplayStyles, resolveOleType, getOleAriaLabel, 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, buildChromeStyle, getImageSvgFilters, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, findChartPartTarget, advanceChartValueDrag, beginChartValueDrag, buildSurfaceChart3DDataForElement, buildBarChart3DDataForElement, buildLineChart3DDataForElement, buildAreaChart3DDataForElement, buildPieChart3DDataForElement, withChartTitle, buildSmartArt3DModel, extractPathPoints, generatePressureCircles, generateNibMarks, isBrowserOpenableMime, formatBytes, getOleDisplayName, 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, buildBarActions, 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, buildActiveSessionUsers, 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, readSoundFileAsDataUrl, applyTransitionSoundFile, playSlideTransitionPreview, RIBBON_TRANSITION_PRESETS, transitionSoundOptions, transitionSoundSelectedValue, DEFAULT_MOTION_PATH_PRESET_ID, SLIDE_SHOW_OPTIONS, slideShowOptionChange, readSlideShowOption, SLIDE_VIRTUALIZATION_THRESHOLD, PRESENTATION_HIT_TEST_CSS, PRESENTATION_STAGE_ATTRIBUTE, getSlideTransitionAnimations, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, SLIDE_TRANSITION_KEYFRAMES, annotationOverlayZIndex, presentationInkPath, resolveNotesSchematicBodyFontSizePx, motionPathFor, setMotionPath, getShapeAdjustmentHandleDescriptors, PRESENTER_NAVIGATOR_LABEL_KEYS, PEN_COLORS, HIGHLIGHTER_COLORS, isBlackboardActive, slideSizeToCanvasPx, resolveSelectionPaneRename, PRESET_THEMES, resolveNotesSegments, segmentsToEditorHtml, DEBOUNCE_MS, createPlainNotesSegments, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX, isUrlSafe, buildNotesPrintHtml, toggleSheet, sanitizeMathMl, computeHandoutLayout, getPrintableArea, generateNoteLineCount, computeAllNotesPages, getNotesPrintableArea, downloadBlob, clampOptionNumber, 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, TRANSITION_SOUND_OTHER_VALUE, TRANSITION_SOUND_NONE_VALUE, clearTransitionSound, ENTRANCE_PRESET_VALUES, EMPHASIS_PRESET_VALUES, EXIT_PRESET_VALUES, MOTION_PATH_FAMILIES, motionPathFamilyLabelKey, motionPathPresetsByFamily, motionPathPresetLabelKey, masterViewPseudoSlide, authorConnectorBetweenSites, findEraserHitElementId, generateTicks, rulerDragToGuidePosition, getElementTransformWithoutRotation, buildCommentMarkers, COMMENT_MARKER_SIZE, collectConnectorSiteCandidates, getConnectorEndpointHandles, findConnectorSiteNear, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, themeColorLabel, buildThemeColorGrid, THEME_COLOR_SCHEME_KEYS, COMMON_FONTS, buildSmartArtPresetData, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, isCurrentLayout, SLIDE_TEMPLATES, computeAnchoredPopupPosition, 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, applyTableStylePreset, evenColumnWidths, redistributeColumnWidth, evenRowHeights, patchChartData, setChartCategoryLabel, setChartCellValue, addChartCategory, removeChartCategory, addChartSeries, removeChartSeries, setChartAxisLogScale, setChartAxisTitleStyle, setChartAxisGridlineStyle, setChartSeriesMarker, setChartSeriesChartType, setChartDataPointFill, setChartDataPointExplosion, setChartDataPointMarker, setChartDataPointLabel, describeSmartArtBounds, canAddTopLevelNode, classifyExtraConnections, siblingIndex, siblingCount, canRemoveTopLevelNode, buildOleObjectNamePatch, 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, TRANSITION_SPEED_OPTIONS, TRANSITION_MORPH_OPTIONS, flattenTagCollections, resolveTemplateBackgroundRows, formatCommentTimestamp, buildAnimationTimelineRows, clearMotionPath, getEffectSoundState, setEffectSound, setAfterAnimation, setAfterAnimationColor, DIRECTIONAL_PRESETS, buildAnimationTimelineBars, motionPathPresetIdForPath, computeMergeCellRight, computeMergeCellDown, computeSplitCell, CHART_TYPE_OPTIONS, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, addSmartArtNodeAsChild, removeSmartArtNode, addSiblingAfter, removeEmptyNode, demote, promote, reorder, 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, reorderAnimationTimelineRows, applyAnimationTimelineOrder, animationEffectLabel, LBL, SEL, FILL_MODE_OPTIONS, SECTION_HEADING, NUM, switchSmartArtLayout, 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-ISDTM2V3.mjs';
|
|
6
|
+
import React19, { 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
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, LuSettings2, LuLayers, 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';
|
|
@@ -478,20 +478,269 @@ function ChartPartSelectionProvider({
|
|
|
478
478
|
function useChartPartSelection() {
|
|
479
479
|
return useContext(ChartPartSelectionContext);
|
|
480
480
|
}
|
|
481
|
-
var
|
|
481
|
+
var AreaChart3DContext = createContext(false);
|
|
482
|
+
function LoadingState({ className }) {
|
|
483
|
+
const { t } = useTranslation();
|
|
484
|
+
return /* @__PURE__ */ jsx(
|
|
485
|
+
"div",
|
|
486
|
+
{
|
|
487
|
+
role: "status",
|
|
488
|
+
"aria-live": "polite",
|
|
489
|
+
"aria-atomic": "true",
|
|
490
|
+
className: cn(
|
|
491
|
+
"h-full w-full flex items-center justify-center text-muted-foreground",
|
|
492
|
+
className
|
|
493
|
+
),
|
|
494
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
495
|
+
/* @__PURE__ */ jsx(
|
|
496
|
+
"div",
|
|
497
|
+
{
|
|
498
|
+
className: "animate-spin rounded-full h-6 w-6 border-b-2 border-primary",
|
|
499
|
+
"aria-hidden": "true"
|
|
500
|
+
}
|
|
501
|
+
),
|
|
502
|
+
/* @__PURE__ */ jsx("span", { children: t("pptx.viewer.loading") })
|
|
503
|
+
] })
|
|
504
|
+
}
|
|
505
|
+
);
|
|
506
|
+
}
|
|
482
507
|
function FailedToLoad() {
|
|
483
508
|
return null;
|
|
484
509
|
}
|
|
485
|
-
var
|
|
510
|
+
var LazyArea3DChartScene = React19.lazy(
|
|
486
511
|
async () => {
|
|
487
512
|
try {
|
|
488
|
-
return await import('./
|
|
513
|
+
return await import('./Area3DChartScene-W6SVC235.mjs');
|
|
489
514
|
} catch {
|
|
490
515
|
return { default: FailedToLoad };
|
|
491
516
|
}
|
|
492
517
|
}
|
|
493
518
|
);
|
|
494
|
-
var SceneErrorBoundary = class extends
|
|
519
|
+
var SceneErrorBoundary = class extends React19.Component {
|
|
520
|
+
constructor(props) {
|
|
521
|
+
super(props);
|
|
522
|
+
this.state = { hasError: false };
|
|
523
|
+
}
|
|
524
|
+
static getDerivedStateFromError() {
|
|
525
|
+
return { hasError: true };
|
|
526
|
+
}
|
|
527
|
+
render() {
|
|
528
|
+
return this.state.hasError ? this.props.fallback : this.props.children;
|
|
529
|
+
}
|
|
530
|
+
};
|
|
531
|
+
function Area3DChartRenderer({ element }) {
|
|
532
|
+
const [threeAvailable, setThreeAvailable] = useState(null);
|
|
533
|
+
useEffect(() => {
|
|
534
|
+
let cancelled = false;
|
|
535
|
+
import('./three.module-AC7ESV4W.mjs').then(() => {
|
|
536
|
+
if (!cancelled) {
|
|
537
|
+
setThreeAvailable(true);
|
|
538
|
+
}
|
|
539
|
+
return void 0;
|
|
540
|
+
}).catch(() => {
|
|
541
|
+
if (!cancelled) {
|
|
542
|
+
setThreeAvailable(false);
|
|
543
|
+
}
|
|
544
|
+
});
|
|
545
|
+
return () => {
|
|
546
|
+
cancelled = true;
|
|
547
|
+
};
|
|
548
|
+
}, []);
|
|
549
|
+
const options = useMemo(
|
|
550
|
+
() => buildAreaChart3DDataForElement(element, { width: element.width, height: element.height }),
|
|
551
|
+
[element]
|
|
552
|
+
);
|
|
553
|
+
const svgFallback = /* @__PURE__ */ jsx(Fragment, { children: renderChartElement(element) });
|
|
554
|
+
if (!options || threeAvailable === false) {
|
|
555
|
+
return svgFallback;
|
|
556
|
+
}
|
|
557
|
+
if (threeAvailable === null) {
|
|
558
|
+
return /* @__PURE__ */ jsx(LoadingState, {});
|
|
559
|
+
}
|
|
560
|
+
return /* @__PURE__ */ jsx(SceneErrorBoundary, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(LazyArea3DChartScene, { options }) }) });
|
|
561
|
+
}
|
|
562
|
+
var BarChart3DContext = createContext(false);
|
|
563
|
+
function FailedToLoad2() {
|
|
564
|
+
return null;
|
|
565
|
+
}
|
|
566
|
+
var LazyBar3DChartScene = React19.lazy(
|
|
567
|
+
async () => {
|
|
568
|
+
try {
|
|
569
|
+
return await import('./Bar3DChartScene-FCVUZIJ3.mjs');
|
|
570
|
+
} catch {
|
|
571
|
+
return { default: FailedToLoad2 };
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
);
|
|
575
|
+
var SceneErrorBoundary2 = class extends React19.Component {
|
|
576
|
+
constructor(props) {
|
|
577
|
+
super(props);
|
|
578
|
+
this.state = { hasError: false };
|
|
579
|
+
}
|
|
580
|
+
static getDerivedStateFromError() {
|
|
581
|
+
return { hasError: true };
|
|
582
|
+
}
|
|
583
|
+
render() {
|
|
584
|
+
return this.state.hasError ? this.props.fallback : this.props.children;
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
function Bar3DChartRenderer({ element }) {
|
|
588
|
+
const [threeAvailable, setThreeAvailable] = useState(null);
|
|
589
|
+
useEffect(() => {
|
|
590
|
+
let cancelled = false;
|
|
591
|
+
import('./three.module-AC7ESV4W.mjs').then(() => {
|
|
592
|
+
if (!cancelled) {
|
|
593
|
+
setThreeAvailable(true);
|
|
594
|
+
}
|
|
595
|
+
return void 0;
|
|
596
|
+
}).catch(() => {
|
|
597
|
+
if (!cancelled) {
|
|
598
|
+
setThreeAvailable(false);
|
|
599
|
+
}
|
|
600
|
+
});
|
|
601
|
+
return () => {
|
|
602
|
+
cancelled = true;
|
|
603
|
+
};
|
|
604
|
+
}, []);
|
|
605
|
+
const options = useMemo(
|
|
606
|
+
() => buildBarChart3DDataForElement(element, { width: element.width, height: element.height }),
|
|
607
|
+
[element]
|
|
608
|
+
);
|
|
609
|
+
const svgFallback = /* @__PURE__ */ jsx(Fragment, { children: renderChartElement(element) });
|
|
610
|
+
if (!options || threeAvailable === false) {
|
|
611
|
+
return svgFallback;
|
|
612
|
+
}
|
|
613
|
+
if (threeAvailable === null) {
|
|
614
|
+
return /* @__PURE__ */ jsx(LoadingState, {});
|
|
615
|
+
}
|
|
616
|
+
return /* @__PURE__ */ jsx(SceneErrorBoundary2, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(LazyBar3DChartScene, { options }) }) });
|
|
617
|
+
}
|
|
618
|
+
var LineChart3DContext = createContext(false);
|
|
619
|
+
function FailedToLoad3() {
|
|
620
|
+
return null;
|
|
621
|
+
}
|
|
622
|
+
var LazyLine3DChartScene = React19.lazy(
|
|
623
|
+
async () => {
|
|
624
|
+
try {
|
|
625
|
+
return await import('./Line3DChartScene-MJXFXSPW.mjs');
|
|
626
|
+
} catch {
|
|
627
|
+
return { default: FailedToLoad3 };
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
);
|
|
631
|
+
var SceneErrorBoundary3 = class extends React19.Component {
|
|
632
|
+
constructor(props) {
|
|
633
|
+
super(props);
|
|
634
|
+
this.state = { hasError: false };
|
|
635
|
+
}
|
|
636
|
+
static getDerivedStateFromError() {
|
|
637
|
+
return { hasError: true };
|
|
638
|
+
}
|
|
639
|
+
render() {
|
|
640
|
+
return this.state.hasError ? this.props.fallback : this.props.children;
|
|
641
|
+
}
|
|
642
|
+
};
|
|
643
|
+
function Line3DChartRenderer({ element }) {
|
|
644
|
+
const [threeAvailable, setThreeAvailable] = useState(null);
|
|
645
|
+
useEffect(() => {
|
|
646
|
+
let cancelled = false;
|
|
647
|
+
import('./three.module-AC7ESV4W.mjs').then(() => {
|
|
648
|
+
if (!cancelled) {
|
|
649
|
+
setThreeAvailable(true);
|
|
650
|
+
}
|
|
651
|
+
return void 0;
|
|
652
|
+
}).catch(() => {
|
|
653
|
+
if (!cancelled) {
|
|
654
|
+
setThreeAvailable(false);
|
|
655
|
+
}
|
|
656
|
+
});
|
|
657
|
+
return () => {
|
|
658
|
+
cancelled = true;
|
|
659
|
+
};
|
|
660
|
+
}, []);
|
|
661
|
+
const options = useMemo(
|
|
662
|
+
() => buildLineChart3DDataForElement(element, { width: element.width, height: element.height }),
|
|
663
|
+
[element]
|
|
664
|
+
);
|
|
665
|
+
const svgFallback = /* @__PURE__ */ jsx(Fragment, { children: renderChartElement(element) });
|
|
666
|
+
if (!options || threeAvailable === false) {
|
|
667
|
+
return svgFallback;
|
|
668
|
+
}
|
|
669
|
+
if (threeAvailable === null) {
|
|
670
|
+
return /* @__PURE__ */ jsx(LoadingState, {});
|
|
671
|
+
}
|
|
672
|
+
return /* @__PURE__ */ jsx(SceneErrorBoundary3, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(LazyLine3DChartScene, { options }) }) });
|
|
673
|
+
}
|
|
674
|
+
var PieChart3DContext = createContext(false);
|
|
675
|
+
function FailedToLoad4() {
|
|
676
|
+
return null;
|
|
677
|
+
}
|
|
678
|
+
var LazyPieChart3DScene = React19.lazy(
|
|
679
|
+
async () => {
|
|
680
|
+
try {
|
|
681
|
+
return await import('./PieChart3DScene-UEVFZZVW.mjs');
|
|
682
|
+
} catch {
|
|
683
|
+
return { default: FailedToLoad4 };
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
);
|
|
687
|
+
var SceneErrorBoundary4 = class extends React19.Component {
|
|
688
|
+
constructor(props) {
|
|
689
|
+
super(props);
|
|
690
|
+
this.state = { hasError: false };
|
|
691
|
+
}
|
|
692
|
+
static getDerivedStateFromError() {
|
|
693
|
+
return { hasError: true };
|
|
694
|
+
}
|
|
695
|
+
render() {
|
|
696
|
+
return this.state.hasError ? this.props.fallback : this.props.children;
|
|
697
|
+
}
|
|
698
|
+
};
|
|
699
|
+
function PieChart3DRenderer({ element }) {
|
|
700
|
+
const [threeAvailable, setThreeAvailable] = useState(null);
|
|
701
|
+
useEffect(() => {
|
|
702
|
+
let cancelled = false;
|
|
703
|
+
import('./three.module-AC7ESV4W.mjs').then(() => {
|
|
704
|
+
if (!cancelled) {
|
|
705
|
+
setThreeAvailable(true);
|
|
706
|
+
}
|
|
707
|
+
return void 0;
|
|
708
|
+
}).catch(() => {
|
|
709
|
+
if (!cancelled) {
|
|
710
|
+
setThreeAvailable(false);
|
|
711
|
+
}
|
|
712
|
+
});
|
|
713
|
+
return () => {
|
|
714
|
+
cancelled = true;
|
|
715
|
+
};
|
|
716
|
+
}, []);
|
|
717
|
+
const options = useMemo(
|
|
718
|
+
() => buildPieChart3DDataForElement(element, { width: element.width, height: element.height }),
|
|
719
|
+
[element]
|
|
720
|
+
);
|
|
721
|
+
const svgFallback = /* @__PURE__ */ jsx(Fragment, { children: renderChartElement(element) });
|
|
722
|
+
if (!options || threeAvailable === false) {
|
|
723
|
+
return svgFallback;
|
|
724
|
+
}
|
|
725
|
+
if (threeAvailable === null) {
|
|
726
|
+
return /* @__PURE__ */ jsx(LoadingState, {});
|
|
727
|
+
}
|
|
728
|
+
return /* @__PURE__ */ jsx(SceneErrorBoundary4, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(LazyPieChart3DScene, { options }) }) });
|
|
729
|
+
}
|
|
730
|
+
var SurfaceChart3DContext = createContext(false);
|
|
731
|
+
function FailedToLoad5() {
|
|
732
|
+
return null;
|
|
733
|
+
}
|
|
734
|
+
var LazySurfaceChart3DScene = React19.lazy(
|
|
735
|
+
async () => {
|
|
736
|
+
try {
|
|
737
|
+
return await import('./SurfaceChart3DScene-WD65PAG4.mjs');
|
|
738
|
+
} catch {
|
|
739
|
+
return { default: FailedToLoad5 };
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
);
|
|
743
|
+
var SceneErrorBoundary5 = class extends React19.Component {
|
|
495
744
|
constructor(props) {
|
|
496
745
|
super(props);
|
|
497
746
|
this.state = { hasError: false };
|
|
@@ -532,9 +781,9 @@ function SurfaceChart3DRenderer({
|
|
|
532
781
|
return svgFallback;
|
|
533
782
|
}
|
|
534
783
|
if (threeAvailable === null) {
|
|
535
|
-
return
|
|
784
|
+
return /* @__PURE__ */ jsx(LoadingState, {});
|
|
536
785
|
}
|
|
537
|
-
return /* @__PURE__ */ jsx(
|
|
786
|
+
return /* @__PURE__ */ jsx(SceneErrorBoundary5, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(LazySurfaceChart3DScene, { options }) }) });
|
|
538
787
|
}
|
|
539
788
|
function ChartElementView({
|
|
540
789
|
element,
|
|
@@ -552,6 +801,14 @@ function ChartElementView({
|
|
|
552
801
|
const canEdit = editable && Boolean(onUpdateElement);
|
|
553
802
|
const use3D = useContext(SurfaceChart3DContext);
|
|
554
803
|
const isSurfaceKind = resolveChartKind(element.chartData?.chartType ?? "bar") === "surface";
|
|
804
|
+
const use3DBar = useContext(BarChart3DContext);
|
|
805
|
+
const isBar3DKind = element.chartData?.chartType === "bar3D";
|
|
806
|
+
const use3DLine = useContext(LineChart3DContext);
|
|
807
|
+
const isLine3DKind = element.chartData?.chartType === "line3D";
|
|
808
|
+
const use3DArea = useContext(AreaChart3DContext);
|
|
809
|
+
const isArea3DKind = element.chartData?.chartType === "area3D";
|
|
810
|
+
const use3DPie = useContext(PieChart3DContext);
|
|
811
|
+
const isPie3DKind = element.chartData?.chartType === "pie3D";
|
|
555
812
|
const viewModel = useMemo(
|
|
556
813
|
() => canEdit ? buildReactChartViewModel(element) : null,
|
|
557
814
|
[canEdit, element]
|
|
@@ -675,7 +932,7 @@ function ChartElementView({
|
|
|
675
932
|
onPointerUp: handlePointerUp,
|
|
676
933
|
onDoubleClick: handleDoubleClick,
|
|
677
934
|
children: [
|
|
678
|
-
use3D && isSurfaceKind ? /* @__PURE__ */ jsx(SurfaceChart3DRenderer, { element: renderedElement }) : renderChartElement(renderedElement),
|
|
935
|
+
use3D && isSurfaceKind ? /* @__PURE__ */ jsx(SurfaceChart3DRenderer, { element: renderedElement }) : use3DBar && isBar3DKind ? /* @__PURE__ */ jsx(Bar3DChartRenderer, { element: renderedElement }) : use3DLine && isLine3DKind ? /* @__PURE__ */ jsx(Line3DChartRenderer, { element: renderedElement }) : use3DArea && isArea3DKind ? /* @__PURE__ */ jsx(Area3DChartRenderer, { element: renderedElement }) : use3DPie && isPie3DKind ? /* @__PURE__ */ jsx(PieChart3DRenderer, { element: renderedElement }) : renderChartElement(renderedElement),
|
|
679
936
|
dragValue !== null && /* @__PURE__ */ jsx("div", { className: "absolute top-1 right-1 z-10 rounded bg-primary/90 px-1.5 py-0.5 text-[10px] font-medium text-white pointer-events-none", children: formatAxisValue(dragValue) }),
|
|
680
937
|
titleDraft !== null && /* @__PURE__ */ jsx(
|
|
681
938
|
"input",
|
|
@@ -1227,7 +1484,7 @@ function ResizeHandles({
|
|
|
1227
1484
|
))
|
|
1228
1485
|
] });
|
|
1229
1486
|
}
|
|
1230
|
-
var ConnectorElementRenderer =
|
|
1487
|
+
var ConnectorElementRenderer = React19.memo(
|
|
1231
1488
|
// oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
|
|
1232
1489
|
function ConnectorElementRendererInner({
|
|
1233
1490
|
el,
|
|
@@ -1597,7 +1854,7 @@ function shapeParams(element) {
|
|
|
1597
1854
|
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
1598
1855
|
return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
|
|
1599
1856
|
}
|
|
1600
|
-
var Extrusion3DOverlay =
|
|
1857
|
+
var Extrusion3DOverlay = React19.memo(
|
|
1601
1858
|
// oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
|
|
1602
1859
|
function Extrusion3DOverlayInner({ data }) {
|
|
1603
1860
|
if (!data.hasExtrusion || data.panels.length === 0) {
|
|
@@ -1816,7 +2073,7 @@ function ShapeEffectOverlay({
|
|
|
1816
2073
|
) : null
|
|
1817
2074
|
] });
|
|
1818
2075
|
}
|
|
1819
|
-
var ElementRenderer =
|
|
2076
|
+
var ElementRenderer = React19.memo(
|
|
1820
2077
|
// oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
|
|
1821
2078
|
function ElementRendererInner({
|
|
1822
2079
|
element: el,
|
|
@@ -2090,6 +2347,26 @@ function renderPressureStroke(pathD, widths, baseWidth, color, opacity, keyPrefi
|
|
|
2090
2347
|
});
|
|
2091
2348
|
return /* @__PURE__ */ jsx("g", { opacity, children: circles.map((c, j) => /* @__PURE__ */ jsx("circle", { cx: c.cx, cy: c.cy, r: c.r, fill: color }, `${keyPrefix}-pc-${j}`)) });
|
|
2092
2349
|
}
|
|
2350
|
+
function renderNibMarkStroke(pathD, widths, tiltAngles, tiltMagnitudes, baseWidth, color, opacity, keyPrefix) {
|
|
2351
|
+
const points = extractPathPoints(pathD);
|
|
2352
|
+
const marks = generateNibMarks(points, widths, tiltAngles, tiltMagnitudes, {
|
|
2353
|
+
baseWidth,
|
|
2354
|
+
minRadius: 0.5,
|
|
2355
|
+
maxRadius: baseWidth * 1.5
|
|
2356
|
+
});
|
|
2357
|
+
return /* @__PURE__ */ jsx("g", { opacity, children: marks.map((m, j) => /* @__PURE__ */ jsx(
|
|
2358
|
+
"ellipse",
|
|
2359
|
+
{
|
|
2360
|
+
cx: m.cx,
|
|
2361
|
+
cy: m.cy,
|
|
2362
|
+
rx: m.rPerp,
|
|
2363
|
+
ry: m.rTilt,
|
|
2364
|
+
transform: `rotate(${m.rotationDeg} ${m.cx} ${m.cy})`,
|
|
2365
|
+
fill: color
|
|
2366
|
+
},
|
|
2367
|
+
`${keyPrefix}-nib-${j}`
|
|
2368
|
+
)) });
|
|
2369
|
+
}
|
|
2093
2370
|
function renderInk(el, options) {
|
|
2094
2371
|
const replay = options?.replay ?? false;
|
|
2095
2372
|
Boolean(el.inkPointPressures) && el.inkPointPressures.length > 0;
|
|
@@ -2235,6 +2512,20 @@ function renderContentPart(el, options) {
|
|
|
2235
2512
|
children: [
|
|
2236
2513
|
replay && /* @__PURE__ */ jsx("style", { children: INK_REPLAY_KEYFRAMES }),
|
|
2237
2514
|
el.inkStrokes.map((stroke, i) => {
|
|
2515
|
+
if (stroke.tiltAngles && stroke.tiltAngles.length > 0) {
|
|
2516
|
+
const magnitudes = stroke.tiltMagnitudes ?? stroke.tiltAngles.map(() => 0.5);
|
|
2517
|
+
const widths = stroke.pressures && stroke.pressures.length > 1 && hasPressureVariation(stroke.pressures) ? pressuresToWidths(stroke.pressures, stroke.width) : [stroke.width];
|
|
2518
|
+
return /* @__PURE__ */ jsx("g", { children: renderNibMarkStroke(
|
|
2519
|
+
stroke.path,
|
|
2520
|
+
widths,
|
|
2521
|
+
stroke.tiltAngles,
|
|
2522
|
+
magnitudes,
|
|
2523
|
+
stroke.width,
|
|
2524
|
+
stroke.color,
|
|
2525
|
+
stroke.opacity,
|
|
2526
|
+
`${el.id}-cp-ink-${i}`
|
|
2527
|
+
) }, `${el.id}-cp-ink-${i}`);
|
|
2528
|
+
}
|
|
2238
2529
|
if (pressureSensitive && stroke.pressures && stroke.pressures.length > 1 && hasPressureVariation(stroke.pressures)) {
|
|
2239
2530
|
const pointWidths = pressuresToWidths(stroke.pressures, stroke.width);
|
|
2240
2531
|
return /* @__PURE__ */ jsx("g", { children: renderPressureStroke(
|
|
@@ -2447,14 +2738,6 @@ function getOleIcon(type, color, size = 32) {
|
|
|
2447
2738
|
return GenericOleIcon(color, size);
|
|
2448
2739
|
}
|
|
2449
2740
|
}
|
|
2450
|
-
function getOleAriaLabel(el) {
|
|
2451
|
-
const oleType = resolveOleType(el);
|
|
2452
|
-
const typeLabel = getOleTypeLabel(oleType);
|
|
2453
|
-
if (el.fileName) {
|
|
2454
|
-
return `${typeLabel}: ${el.fileName}`;
|
|
2455
|
-
}
|
|
2456
|
-
return typeLabel;
|
|
2457
|
-
}
|
|
2458
2741
|
function renderOleBadge(oleType) {
|
|
2459
2742
|
const color = getOleTypeColor(oleType);
|
|
2460
2743
|
const shortLabel = getOleBadgeLabel(oleType);
|
|
@@ -2634,15 +2917,15 @@ function InlineTextEditor({
|
|
|
2634
2917
|
}
|
|
2635
2918
|
);
|
|
2636
2919
|
}
|
|
2637
|
-
function
|
|
2920
|
+
function FailedToLoad6() {
|
|
2638
2921
|
return null;
|
|
2639
2922
|
}
|
|
2640
|
-
var LazyModel3DScene =
|
|
2923
|
+
var LazyModel3DScene = React19.lazy(
|
|
2641
2924
|
async () => {
|
|
2642
2925
|
try {
|
|
2643
|
-
return await import('./Model3DScene-
|
|
2926
|
+
return await import('./Model3DScene-A5RV3KNJ.mjs');
|
|
2644
2927
|
} catch {
|
|
2645
|
-
return { default:
|
|
2928
|
+
return { default: FailedToLoad6 };
|
|
2646
2929
|
}
|
|
2647
2930
|
}
|
|
2648
2931
|
);
|
|
@@ -2723,7 +3006,7 @@ function PosterFallback({
|
|
|
2723
3006
|
}
|
|
2724
3007
|
);
|
|
2725
3008
|
}
|
|
2726
|
-
var Model3DErrorBoundary = class extends
|
|
3009
|
+
var Model3DErrorBoundary = class extends React19.Component {
|
|
2727
3010
|
constructor(props) {
|
|
2728
3011
|
super(props);
|
|
2729
3012
|
this.state = { hasError: false };
|
|
@@ -2785,6 +3068,7 @@ function buildEmbedInfo(el) {
|
|
|
2785
3068
|
const canDownload = Boolean(el.oleEmbeddedData);
|
|
2786
3069
|
return {
|
|
2787
3070
|
fileName: el.oleEmbeddedFileName ?? el.fileName,
|
|
3071
|
+
displayName: getOleDisplayName(el),
|
|
2788
3072
|
readableSize: formatBytes(el.oleEmbeddedByteSize),
|
|
2789
3073
|
progId: el.oleProgId,
|
|
2790
3074
|
typeLabel: getOleTypeLabel(resolveOleType(el)),
|
|
@@ -2793,7 +3077,7 @@ function buildEmbedInfo(el) {
|
|
|
2793
3077
|
};
|
|
2794
3078
|
}
|
|
2795
3079
|
function buildTooltip(info) {
|
|
2796
|
-
const parts = [info.
|
|
3080
|
+
const parts = [info.displayName, info.typeLabel];
|
|
2797
3081
|
if (info.readableSize) {
|
|
2798
3082
|
parts.push(info.readableSize);
|
|
2799
3083
|
}
|
|
@@ -2881,7 +3165,7 @@ function OleRenderer({ element: el }) {
|
|
|
2881
3165
|
}
|
|
2882
3166
|
const color = getOleTypeColor(oleType);
|
|
2883
3167
|
const label = getOleTypeLabel(oleType);
|
|
2884
|
-
const displayName = info.
|
|
3168
|
+
const displayName = info.displayName;
|
|
2885
3169
|
return /* @__PURE__ */ jsxs(
|
|
2886
3170
|
"div",
|
|
2887
3171
|
{
|
|
@@ -2928,10 +3212,10 @@ function SmartArtInlineNodeEditor({
|
|
|
2928
3212
|
onCancel
|
|
2929
3213
|
}) {
|
|
2930
3214
|
const { t } = useTranslation();
|
|
2931
|
-
const ref =
|
|
2932
|
-
const [value, setValue] =
|
|
2933
|
-
const settled =
|
|
2934
|
-
|
|
3215
|
+
const ref = React19.useRef(null);
|
|
3216
|
+
const [value, setValue] = React19.useState(initialText);
|
|
3217
|
+
const settled = React19.useRef(false);
|
|
3218
|
+
React19.useEffect(() => {
|
|
2935
3219
|
const el = ref.current;
|
|
2936
3220
|
if (el) {
|
|
2937
3221
|
el.focus();
|
|
@@ -3023,16 +3307,16 @@ function findNodeIdFromEvent(target) {
|
|
|
3023
3307
|
return null;
|
|
3024
3308
|
}
|
|
3025
3309
|
function useSmartArtHoverState(containerRef) {
|
|
3026
|
-
const [hoveredNodeId, setHoveredNodeId] =
|
|
3027
|
-
const [hoveredNodeRect, setHoveredNodeRect] =
|
|
3028
|
-
const hideTimeoutRef =
|
|
3029
|
-
const cancelPendingHide =
|
|
3310
|
+
const [hoveredNodeId, setHoveredNodeId] = React19.useState(null);
|
|
3311
|
+
const [hoveredNodeRect, setHoveredNodeRect] = React19.useState(null);
|
|
3312
|
+
const hideTimeoutRef = React19.useRef(null);
|
|
3313
|
+
const cancelPendingHide = React19.useCallback(() => {
|
|
3030
3314
|
if (hideTimeoutRef.current !== null) {
|
|
3031
3315
|
window.clearTimeout(hideTimeoutRef.current);
|
|
3032
3316
|
hideTimeoutRef.current = null;
|
|
3033
3317
|
}
|
|
3034
3318
|
}, []);
|
|
3035
|
-
const handleMouseMove =
|
|
3319
|
+
const handleMouseMove = React19.useCallback(
|
|
3036
3320
|
(e, ignoreRef) => {
|
|
3037
3321
|
const nodeEl = findNodeIdFromEvent(e.target);
|
|
3038
3322
|
const container = containerRef.current;
|
|
@@ -3060,12 +3344,12 @@ function useSmartArtHoverState(containerRef) {
|
|
|
3060
3344
|
},
|
|
3061
3345
|
[containerRef, cancelPendingHide]
|
|
3062
3346
|
);
|
|
3063
|
-
const clearHover =
|
|
3347
|
+
const clearHover = React19.useCallback(() => {
|
|
3064
3348
|
cancelPendingHide();
|
|
3065
3349
|
setHoveredNodeId(null);
|
|
3066
3350
|
setHoveredNodeRect(null);
|
|
3067
3351
|
}, [cancelPendingHide]);
|
|
3068
|
-
|
|
3352
|
+
React19.useEffect(() => cancelPendingHide, [cancelPendingHide]);
|
|
3069
3353
|
return { hoveredNodeId, hoveredNodeRect, handleMouseMove, clearHover };
|
|
3070
3354
|
}
|
|
3071
3355
|
var EDITOR_PADDING = 4;
|
|
@@ -3080,11 +3364,11 @@ function SmartArtEditableLayer({
|
|
|
3080
3364
|
onChangeNodeStyle,
|
|
3081
3365
|
children
|
|
3082
3366
|
}) {
|
|
3083
|
-
const containerRef =
|
|
3084
|
-
const styleBarRef =
|
|
3085
|
-
const [edit, setEdit] =
|
|
3367
|
+
const containerRef = React19.useRef(null);
|
|
3368
|
+
const styleBarRef = React19.useRef(null);
|
|
3369
|
+
const [edit, setEdit] = React19.useState(null);
|
|
3086
3370
|
const { hoveredNodeId, hoveredNodeRect, handleMouseMove, clearHover } = useSmartArtHoverState(containerRef);
|
|
3087
|
-
const openEditor =
|
|
3371
|
+
const openEditor = React19.useCallback(
|
|
3088
3372
|
(target) => {
|
|
3089
3373
|
const nodeEl = findNodeIdFromEvent(target);
|
|
3090
3374
|
const container = containerRef.current;
|
|
@@ -3667,20 +3951,20 @@ function arePropsEqual(prev, next) {
|
|
|
3667
3951
|
}
|
|
3668
3952
|
return true;
|
|
3669
3953
|
}
|
|
3670
|
-
var SmartArtRenderer =
|
|
3671
|
-
function
|
|
3954
|
+
var SmartArtRenderer = React19.memo(SmartArtRendererImpl, arePropsEqual);
|
|
3955
|
+
function FailedToLoad7() {
|
|
3672
3956
|
return null;
|
|
3673
3957
|
}
|
|
3674
|
-
var LazySmartArt3DScene =
|
|
3958
|
+
var LazySmartArt3DScene = React19.lazy(
|
|
3675
3959
|
async () => {
|
|
3676
3960
|
try {
|
|
3677
3961
|
return await import('./SmartArt3DScene-XCFVGCXE.mjs');
|
|
3678
3962
|
} catch {
|
|
3679
|
-
return { default:
|
|
3963
|
+
return { default: FailedToLoad7 };
|
|
3680
3964
|
}
|
|
3681
3965
|
}
|
|
3682
3966
|
);
|
|
3683
|
-
var
|
|
3967
|
+
var SceneErrorBoundary6 = class extends React19.Component {
|
|
3684
3968
|
constructor(props) {
|
|
3685
3969
|
super(props);
|
|
3686
3970
|
this.state = { hasError: false };
|
|
@@ -3746,7 +4030,7 @@ function SmartArt3DRenderer({
|
|
|
3746
4030
|
if (threeAvailable === null) {
|
|
3747
4031
|
return svgFallback;
|
|
3748
4032
|
}
|
|
3749
|
-
const sceneNode = /* @__PURE__ */ jsx(
|
|
4033
|
+
const sceneNode = /* @__PURE__ */ jsx(SceneErrorBoundary6, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: svgFallback, children: /* @__PURE__ */ jsx(
|
|
3750
4034
|
LazySmartArt3DScene,
|
|
3751
4035
|
{
|
|
3752
4036
|
model,
|
|
@@ -4599,7 +4883,7 @@ function StaticElementRendererImpl({
|
|
|
4599
4883
|
}
|
|
4600
4884
|
);
|
|
4601
4885
|
}
|
|
4602
|
-
var StaticElementRenderer =
|
|
4886
|
+
var StaticElementRenderer = React19.memo(StaticElementRendererImpl);
|
|
4603
4887
|
StaticElementRenderer.displayName = "StaticElementRenderer";
|
|
4604
4888
|
var PREVIEW_CANVAS_WIDTH = 1280;
|
|
4605
4889
|
var PREVIEW_CANVAS_HEIGHT = 720;
|
|
@@ -5521,15 +5805,38 @@ function ArrangeSection(p) {
|
|
|
5521
5805
|
function TransitionsSection(p) {
|
|
5522
5806
|
const { t } = useTranslation();
|
|
5523
5807
|
const canEdit = p.canEdit !== false;
|
|
5524
|
-
const draft =
|
|
5525
|
-
const [durationBuffer, setDurationBuffer] =
|
|
5526
|
-
const [advanceBuffer, setAdvanceBuffer] =
|
|
5527
|
-
const commit =
|
|
5808
|
+
const draft = React19.useMemo(() => readRibbonTransitionDraft(p.activeSlide), [p.activeSlide]);
|
|
5809
|
+
const [durationBuffer, setDurationBuffer] = React19.useState(null);
|
|
5810
|
+
const [advanceBuffer, setAdvanceBuffer] = React19.useState(null);
|
|
5811
|
+
const commit = React19.useCallback(
|
|
5528
5812
|
(changes) => {
|
|
5529
5813
|
p.onTransitionChange(ribbonTransitionUpdates({ ...draft, ...changes }));
|
|
5530
5814
|
},
|
|
5531
5815
|
[draft, p]
|
|
5532
5816
|
);
|
|
5817
|
+
const soundFileInputRef = React19.useRef(null);
|
|
5818
|
+
const handleSoundFilePicked = React19.useCallback(
|
|
5819
|
+
(file) => {
|
|
5820
|
+
void readSoundFileAsDataUrl(file).then((dataUrl) => {
|
|
5821
|
+
if (dataUrl) {
|
|
5822
|
+
p.onTransitionChange(applyTransitionSoundFile({ name: file.name, dataUrl }));
|
|
5823
|
+
}
|
|
5824
|
+
return void 0;
|
|
5825
|
+
});
|
|
5826
|
+
},
|
|
5827
|
+
[p]
|
|
5828
|
+
);
|
|
5829
|
+
const handleSoundSelectChange = (event) => {
|
|
5830
|
+
const value = event.target.value;
|
|
5831
|
+
if (value === TRANSITION_SOUND_OTHER_VALUE) {
|
|
5832
|
+
soundFileInputRef.current?.click();
|
|
5833
|
+
event.target.value = transitionSoundSelectedValue(p.activeSlide?.transition);
|
|
5834
|
+
return;
|
|
5835
|
+
}
|
|
5836
|
+
if (value === TRANSITION_SOUND_NONE_VALUE) {
|
|
5837
|
+
p.onTransitionChange(clearTransitionSound());
|
|
5838
|
+
}
|
|
5839
|
+
};
|
|
5533
5840
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5534
5841
|
/* @__PURE__ */ jsxs(
|
|
5535
5842
|
"button",
|
|
@@ -5593,9 +5900,26 @@ function TransitionsSection(p) {
|
|
|
5593
5900
|
{
|
|
5594
5901
|
"aria-label": t("pptx.ribbon.sound"),
|
|
5595
5902
|
className: "w-24 px-1.5 py-1 rounded border border-border bg-muted text-xs text-foreground disabled:opacity-50",
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5903
|
+
disabled: !canEdit,
|
|
5904
|
+
value: transitionSoundSelectedValue(p.activeSlide?.transition),
|
|
5905
|
+
onChange: handleSoundSelectChange,
|
|
5906
|
+
children: transitionSoundOptions(p.activeSlide?.transition).map((option) => /* @__PURE__ */ jsx("option", { value: option.value, children: option.i18nKey ? t(option.i18nKey) : option.label }, option.value))
|
|
5907
|
+
}
|
|
5908
|
+
),
|
|
5909
|
+
/* @__PURE__ */ jsx(
|
|
5910
|
+
"input",
|
|
5911
|
+
{
|
|
5912
|
+
ref: soundFileInputRef,
|
|
5913
|
+
type: "file",
|
|
5914
|
+
accept: "audio/*",
|
|
5915
|
+
className: "hidden",
|
|
5916
|
+
onChange: (e) => {
|
|
5917
|
+
const file = e.target.files?.[0];
|
|
5918
|
+
if (file) {
|
|
5919
|
+
handleSoundFilePicked(file);
|
|
5920
|
+
}
|
|
5921
|
+
e.target.value = "";
|
|
5922
|
+
}
|
|
5599
5923
|
}
|
|
5600
5924
|
)
|
|
5601
5925
|
] }),
|
|
@@ -5834,7 +6158,7 @@ function AccountPage() {
|
|
|
5834
6158
|
return void 0;
|
|
5835
6159
|
});
|
|
5836
6160
|
};
|
|
5837
|
-
const version = "3.0
|
|
6161
|
+
const version = "3.1.0" ;
|
|
5838
6162
|
return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
5839
6163
|
/* @__PURE__ */ jsxs("section", { className: cardClass, children: [
|
|
5840
6164
|
/* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -6274,7 +6598,7 @@ function FontFamilyMenu(p) {
|
|
|
6274
6598
|
embeddedFonts: p.embeddedFonts,
|
|
6275
6599
|
customFonts: p.customFonts
|
|
6276
6600
|
});
|
|
6277
|
-
return /* @__PURE__ */ jsx(RibbonMenu, { anchorRef: p.anchorRef, className: "flex flex-col w-64 pt-1", children: /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-border bg-popover backdrop-blur-lg shadow-2xl py-1 max-h-80 overflow-y-auto", children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs(
|
|
6601
|
+
return /* @__PURE__ */ jsx(RibbonMenu, { anchorRef: p.anchorRef, className: "flex flex-col w-64 pt-1", children: /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-border bg-popover backdrop-blur-lg shadow-2xl py-1 max-h-80 overflow-y-auto", children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxs(React19.Fragment, { children: [
|
|
6278
6602
|
/* @__PURE__ */ jsx(
|
|
6279
6603
|
"div",
|
|
6280
6604
|
{
|
|
@@ -10831,7 +11155,7 @@ function HorizontalRulerView({ ticks, widthPx, highlight }) {
|
|
|
10831
11155
|
}
|
|
10832
11156
|
);
|
|
10833
11157
|
}
|
|
10834
|
-
var HorizontalRuler =
|
|
11158
|
+
var HorizontalRuler = React19.memo(HorizontalRulerView);
|
|
10835
11159
|
HorizontalRuler.displayName = "HorizontalRuler";
|
|
10836
11160
|
function VerticalRulerView({ ticks, heightPx, highlight }) {
|
|
10837
11161
|
return /* @__PURE__ */ jsxs(
|
|
@@ -10903,7 +11227,7 @@ function VerticalRulerView({ ticks, heightPx, highlight }) {
|
|
|
10903
11227
|
}
|
|
10904
11228
|
);
|
|
10905
11229
|
}
|
|
10906
|
-
var VerticalRuler =
|
|
11230
|
+
var VerticalRuler = React19.memo(VerticalRulerView);
|
|
10907
11231
|
VerticalRuler.displayName = "VerticalRuler";
|
|
10908
11232
|
function Ruler({
|
|
10909
11233
|
canvasSize,
|
|
@@ -11417,15 +11741,9 @@ function useDrawingOverlay({
|
|
|
11417
11741
|
if (!pt2) {
|
|
11418
11742
|
return;
|
|
11419
11743
|
}
|
|
11420
|
-
const
|
|
11421
|
-
|
|
11422
|
-
|
|
11423
|
-
continue;
|
|
11424
|
-
}
|
|
11425
|
-
if (pt2.x >= el.x - HIT_RADIUS && pt2.x <= el.x + el.width + HIT_RADIUS && pt2.y >= el.y - HIT_RADIUS && pt2.y <= el.y + el.height + HIT_RADIUS) {
|
|
11426
|
-
onEraseInkElement?.(el.id);
|
|
11427
|
-
break;
|
|
11428
|
-
}
|
|
11744
|
+
const hitId = findEraserHitElementId(activeSlide.elements, pt2);
|
|
11745
|
+
if (hitId) {
|
|
11746
|
+
onEraseInkElement?.(hitId);
|
|
11429
11747
|
}
|
|
11430
11748
|
return;
|
|
11431
11749
|
}
|
|
@@ -12115,31 +12433,6 @@ function SlideCanvas({
|
|
|
12115
12433
|
}
|
|
12116
12434
|
);
|
|
12117
12435
|
}
|
|
12118
|
-
function LoadingState({ className }) {
|
|
12119
|
-
const { t } = useTranslation();
|
|
12120
|
-
return /* @__PURE__ */ jsx(
|
|
12121
|
-
"div",
|
|
12122
|
-
{
|
|
12123
|
-
role: "status",
|
|
12124
|
-
"aria-live": "polite",
|
|
12125
|
-
"aria-atomic": "true",
|
|
12126
|
-
className: cn(
|
|
12127
|
-
"h-full w-full flex items-center justify-center text-muted-foreground",
|
|
12128
|
-
className
|
|
12129
|
-
),
|
|
12130
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
12131
|
-
/* @__PURE__ */ jsx(
|
|
12132
|
-
"div",
|
|
12133
|
-
{
|
|
12134
|
-
className: "animate-spin rounded-full h-6 w-6 border-b-2 border-primary",
|
|
12135
|
-
"aria-hidden": "true"
|
|
12136
|
-
}
|
|
12137
|
-
),
|
|
12138
|
-
/* @__PURE__ */ jsx("span", { children: t("pptx.viewer.loading") })
|
|
12139
|
-
] })
|
|
12140
|
-
}
|
|
12141
|
-
);
|
|
12142
|
-
}
|
|
12143
12436
|
function ErrorState({ className, error }) {
|
|
12144
12437
|
return /* @__PURE__ */ jsx(
|
|
12145
12438
|
"div",
|
|
@@ -12663,7 +12956,7 @@ function arePropsEqual2(prev, next) {
|
|
|
12663
12956
|
}
|
|
12664
12957
|
return true;
|
|
12665
12958
|
}
|
|
12666
|
-
var SlideThumbnail =
|
|
12959
|
+
var SlideThumbnail = React19.memo(SlideThumbnailImpl, arePropsEqual2);
|
|
12667
12960
|
|
|
12668
12961
|
// src/viewer/components/context-menu-dispatch.ts
|
|
12669
12962
|
function tableCell(props) {
|
|
@@ -13212,7 +13505,7 @@ function LazyThumbnailInner({
|
|
|
13212
13505
|
}
|
|
13213
13506
|
) });
|
|
13214
13507
|
}
|
|
13215
|
-
var LazyThumbnail =
|
|
13508
|
+
var LazyThumbnail = React19.memo(LazyThumbnailInner);
|
|
13216
13509
|
|
|
13217
13510
|
// src/viewer/components/slides-pane/utils.ts
|
|
13218
13511
|
function formatTimingMs(ms) {
|
|
@@ -13366,7 +13659,7 @@ function SlideItemInner({
|
|
|
13366
13659
|
}
|
|
13367
13660
|
);
|
|
13368
13661
|
}
|
|
13369
|
-
var SlideItem =
|
|
13662
|
+
var SlideItem = React19.memo(SlideItemInner);
|
|
13370
13663
|
function useSlidePaneCallbacks(onMoveSlide, onRenameSection, onToggleSectionCollapse) {
|
|
13371
13664
|
const [collapsedSections, setCollapsedSections] = useState({});
|
|
13372
13665
|
const [renamingSectionId, setRenamingSectionId] = useState(null);
|
|
@@ -14672,7 +14965,7 @@ function arePropsEqual3(prev, next) {
|
|
|
14672
14965
|
}
|
|
14673
14966
|
return true;
|
|
14674
14967
|
}
|
|
14675
|
-
var SlideCard =
|
|
14968
|
+
var SlideCard = React19.memo(SlideCardImpl, arePropsEqual3);
|
|
14676
14969
|
function SorterContextMenu({
|
|
14677
14970
|
x,
|
|
14678
14971
|
y,
|
|
@@ -18116,9 +18409,9 @@ function PresentationSubtitleBar({
|
|
|
18116
18409
|
function renderNotesSegments(segments) {
|
|
18117
18410
|
return notesSegmentsToSpans(segments).map((span) => {
|
|
18118
18411
|
if (span.kind === "break") {
|
|
18119
|
-
return
|
|
18412
|
+
return React19.createElement("br", { key: span.key });
|
|
18120
18413
|
}
|
|
18121
|
-
return
|
|
18414
|
+
return React19.createElement(
|
|
18122
18415
|
"span",
|
|
18123
18416
|
{ key: span.key, style: span.style },
|
|
18124
18417
|
span.text
|
|
@@ -18344,7 +18637,7 @@ function arePropsEqual4(prev, next) {
|
|
|
18344
18637
|
}
|
|
18345
18638
|
return true;
|
|
18346
18639
|
}
|
|
18347
|
-
var ScaledSlidePreview =
|
|
18640
|
+
var ScaledSlidePreview = React19.memo(ScaledSlidePreviewImpl, arePropsEqual4);
|
|
18348
18641
|
function PresenterNotesRail({
|
|
18349
18642
|
slides,
|
|
18350
18643
|
current,
|
|
@@ -19303,6 +19596,51 @@ var SEQUENCE_OPTIONS = [
|
|
|
19303
19596
|
{ value: "byWord", labelKey: "pptx.animation.sequence.byWord" },
|
|
19304
19597
|
{ value: "byLetter", labelKey: "pptx.animation.sequence.byLetter" }
|
|
19305
19598
|
];
|
|
19599
|
+
var AFTER_ANIMATION_OPTIONS = [
|
|
19600
|
+
{ value: "none", labelKey: "pptx.animation.afterAnimation.none" },
|
|
19601
|
+
{ value: "dimToColor", labelKey: "pptx.animation.afterAnimation.dimToColor" },
|
|
19602
|
+
{ value: "hideAfterAnimation", labelKey: "pptx.animation.afterAnimation.hideAfterAnimation" },
|
|
19603
|
+
{ value: "hideOnNextClick", labelKey: "pptx.animation.afterAnimation.hideOnNextClick" }
|
|
19604
|
+
];
|
|
19605
|
+
function AfterAnimationRow({
|
|
19606
|
+
action,
|
|
19607
|
+
color,
|
|
19608
|
+
canEdit,
|
|
19609
|
+
onActionChange,
|
|
19610
|
+
onColorChange
|
|
19611
|
+
}) {
|
|
19612
|
+
const { t } = useTranslation();
|
|
19613
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
19614
|
+
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
19615
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-[11px]", children: t("pptx.animation.afterAnimation") }),
|
|
19616
|
+
/* @__PURE__ */ jsx(
|
|
19617
|
+
"select",
|
|
19618
|
+
{
|
|
19619
|
+
"aria-label": t("pptx.animation.afterAnimation"),
|
|
19620
|
+
value: action,
|
|
19621
|
+
onChange: (event) => onActionChange(event.target.value),
|
|
19622
|
+
disabled: !canEdit,
|
|
19623
|
+
className: SELECT_CLS,
|
|
19624
|
+
children: AFTER_ANIMATION_OPTIONS.map((option) => /* @__PURE__ */ jsx("option", { value: option.value, children: t(option.labelKey) }, option.value))
|
|
19625
|
+
}
|
|
19626
|
+
)
|
|
19627
|
+
] }),
|
|
19628
|
+
action === "dimToColor" && /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2", children: [
|
|
19629
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-[11px]", children: t("pptx.animation.afterAnimation.color") }),
|
|
19630
|
+
/* @__PURE__ */ jsx(
|
|
19631
|
+
"input",
|
|
19632
|
+
{
|
|
19633
|
+
type: "color",
|
|
19634
|
+
"aria-label": t("pptx.animation.afterAnimation.color"),
|
|
19635
|
+
value: color ?? "#808080",
|
|
19636
|
+
onChange: (event) => onColorChange(event.target.value),
|
|
19637
|
+
disabled: !canEdit,
|
|
19638
|
+
className: "h-6 w-10 rounded border border-border bg-transparent p-0"
|
|
19639
|
+
}
|
|
19640
|
+
)
|
|
19641
|
+
] })
|
|
19642
|
+
] });
|
|
19643
|
+
}
|
|
19306
19644
|
function animationTypeColor(anim) {
|
|
19307
19645
|
if (anim.entrance) {
|
|
19308
19646
|
return "bg-green-500/60";
|
|
@@ -19324,6 +19662,7 @@ function AnimationTimelineSection({
|
|
|
19324
19662
|
const effectLabel = (anim) => animationEffectLabel(anim, (key) => t(key));
|
|
19325
19663
|
const {
|
|
19326
19664
|
sortedAnimations,
|
|
19665
|
+
timelineRows,
|
|
19327
19666
|
dragIndex,
|
|
19328
19667
|
dragOverIndex,
|
|
19329
19668
|
timelineBarData,
|
|
@@ -19337,11 +19676,13 @@ function AnimationTimelineSection({
|
|
|
19337
19676
|
handleDragEnd,
|
|
19338
19677
|
handleMoveUp,
|
|
19339
19678
|
handleMoveDown,
|
|
19340
|
-
getTimelineLabel
|
|
19679
|
+
getTimelineLabel,
|
|
19680
|
+
getNativeRowLabel
|
|
19341
19681
|
} = handlers;
|
|
19342
|
-
if (
|
|
19682
|
+
if (timelineRows.length === 0 && timelineBarData.length === 0) {
|
|
19343
19683
|
return null;
|
|
19344
19684
|
}
|
|
19685
|
+
const animationByElementId = new Map(sortedAnimations.map((anim) => [anim.elementId, anim]));
|
|
19345
19686
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19346
19687
|
timelineBarData.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mt-2 pt-2 border-t border-border", children: [
|
|
19347
19688
|
/* @__PURE__ */ jsx("div", { className: "text-[10px] uppercase tracking-wide text-muted-foreground mb-1", children: t("pptx.animation.timelineBar") }),
|
|
@@ -19364,12 +19705,46 @@ function AnimationTimelineSection({
|
|
|
19364
19705
|
bar.anim.elementId
|
|
19365
19706
|
)) })
|
|
19366
19707
|
] }),
|
|
19367
|
-
|
|
19708
|
+
timelineRows.length > 0 && /* @__PURE__ */ jsxs("div", { className: "mt-2 pt-2 border-t border-border", children: [
|
|
19368
19709
|
/* @__PURE__ */ jsx("div", { className: "text-[10px] uppercase tracking-wide text-muted-foreground mb-1", children: t("pptx.animation.timeline") }),
|
|
19369
|
-
/* @__PURE__ */ jsx("div", { className: "space-y-0.5 max-h-40 overflow-y-auto", children:
|
|
19710
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-0.5 max-h-40 overflow-y-auto", children: timelineRows.map((row, index) => {
|
|
19711
|
+
const isDragOver = dragOverIndex === index;
|
|
19712
|
+
if (row.kind === "native") {
|
|
19713
|
+
return /* @__PURE__ */ jsxs(
|
|
19714
|
+
"div",
|
|
19715
|
+
{
|
|
19716
|
+
onDragOver: (e) => handleDragOver(index, e),
|
|
19717
|
+
onDragEnter: () => handleDragEnter(index),
|
|
19718
|
+
onDragLeave: handleDragLeave,
|
|
19719
|
+
onDrop: (e) => handleDrop(index, e),
|
|
19720
|
+
title: t("pptx.animation.nativeEffectHint"),
|
|
19721
|
+
className: cn(
|
|
19722
|
+
"flex items-center gap-1 px-1 py-0.5 rounded text-[10px] italic",
|
|
19723
|
+
"bg-muted/20 text-muted-foreground/70",
|
|
19724
|
+
isDragOver && "border-t-2 border-primary"
|
|
19725
|
+
),
|
|
19726
|
+
children: [
|
|
19727
|
+
/* @__PURE__ */ jsx("span", { className: "w-3 h-3 shrink-0" }),
|
|
19728
|
+
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground/70 w-4 shrink-0", children: [
|
|
19729
|
+
index + 1,
|
|
19730
|
+
"."
|
|
19731
|
+
] }),
|
|
19732
|
+
/* @__PURE__ */ jsxs("span", { className: "truncate flex-1", children: [
|
|
19733
|
+
t("pptx.animation.nativeEffect"),
|
|
19734
|
+
": ",
|
|
19735
|
+
getNativeRowLabel(row.targetIds)
|
|
19736
|
+
] })
|
|
19737
|
+
]
|
|
19738
|
+
},
|
|
19739
|
+
row.key
|
|
19740
|
+
);
|
|
19741
|
+
}
|
|
19742
|
+
const anim = animationByElementId.get(row.elementId);
|
|
19743
|
+
if (!anim) {
|
|
19744
|
+
return null;
|
|
19745
|
+
}
|
|
19370
19746
|
const isSelected = selectedElementId === anim.elementId;
|
|
19371
19747
|
const isDragging = dragIndex === index;
|
|
19372
|
-
const isDragOver = dragOverIndex === index;
|
|
19373
19748
|
return /* @__PURE__ */ jsxs(
|
|
19374
19749
|
"div",
|
|
19375
19750
|
{
|
|
@@ -19417,7 +19792,7 @@ function AnimationTimelineSection({
|
|
|
19417
19792
|
"button",
|
|
19418
19793
|
{
|
|
19419
19794
|
type: "button",
|
|
19420
|
-
disabled: index ===
|
|
19795
|
+
disabled: index === timelineRows.length - 1,
|
|
19421
19796
|
className: "text-muted-foreground hover:text-foreground disabled:opacity-30 transition-colors",
|
|
19422
19797
|
onClick: (e) => {
|
|
19423
19798
|
e.stopPropagation();
|
|
@@ -19430,12 +19805,70 @@ function AnimationTimelineSection({
|
|
|
19430
19805
|
] })
|
|
19431
19806
|
]
|
|
19432
19807
|
},
|
|
19433
|
-
|
|
19808
|
+
row.key
|
|
19434
19809
|
);
|
|
19435
19810
|
}) })
|
|
19436
19811
|
] })
|
|
19437
19812
|
] });
|
|
19438
19813
|
}
|
|
19814
|
+
function EffectSoundRow({
|
|
19815
|
+
soundState,
|
|
19816
|
+
canEdit,
|
|
19817
|
+
onPick
|
|
19818
|
+
}) {
|
|
19819
|
+
const { t } = useTranslation();
|
|
19820
|
+
const fileInputRef = React19.useRef(null);
|
|
19821
|
+
const handleSelectChange = (event) => {
|
|
19822
|
+
if (event.target.value === "custom") {
|
|
19823
|
+
fileInputRef.current?.click();
|
|
19824
|
+
return;
|
|
19825
|
+
}
|
|
19826
|
+
onPick(void 0);
|
|
19827
|
+
};
|
|
19828
|
+
const handleFileChange = (event) => {
|
|
19829
|
+
const file = event.target.files?.[0];
|
|
19830
|
+
event.target.value = "";
|
|
19831
|
+
if (!file) {
|
|
19832
|
+
return;
|
|
19833
|
+
}
|
|
19834
|
+
const reader = new FileReader();
|
|
19835
|
+
reader.onload = () => {
|
|
19836
|
+
if (typeof reader.result === "string") {
|
|
19837
|
+
onPick({ dataUrl: reader.result, fileName: file.name });
|
|
19838
|
+
}
|
|
19839
|
+
};
|
|
19840
|
+
reader.readAsDataURL(file);
|
|
19841
|
+
};
|
|
19842
|
+
return /* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
19843
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-[11px]", children: t("pptx.animation.sound") }),
|
|
19844
|
+
/* @__PURE__ */ jsxs(
|
|
19845
|
+
"select",
|
|
19846
|
+
{
|
|
19847
|
+
"aria-label": t("pptx.animation.sound"),
|
|
19848
|
+
value: soundState.hasSound ? "custom" : "none",
|
|
19849
|
+
onChange: handleSelectChange,
|
|
19850
|
+
disabled: !canEdit,
|
|
19851
|
+
className: SELECT_CLS,
|
|
19852
|
+
children: [
|
|
19853
|
+
/* @__PURE__ */ jsx("option", { value: "none", children: t("pptx.animation.sound.none") }),
|
|
19854
|
+
/* @__PURE__ */ jsx("option", { value: "custom", children: soundState.hasSound && soundState.fileName ? soundState.fileName : t("pptx.animation.sound.custom") })
|
|
19855
|
+
]
|
|
19856
|
+
}
|
|
19857
|
+
),
|
|
19858
|
+
/* @__PURE__ */ jsx(
|
|
19859
|
+
"input",
|
|
19860
|
+
{
|
|
19861
|
+
ref: fileInputRef,
|
|
19862
|
+
type: "file",
|
|
19863
|
+
accept: "audio/*",
|
|
19864
|
+
"aria-label": t("pptx.animation.sound.chooseFile"),
|
|
19865
|
+
className: "hidden",
|
|
19866
|
+
onChange: handleFileChange,
|
|
19867
|
+
tabIndex: -1
|
|
19868
|
+
}
|
|
19869
|
+
)
|
|
19870
|
+
] });
|
|
19871
|
+
}
|
|
19439
19872
|
function MotionPathRow({
|
|
19440
19873
|
motionPath,
|
|
19441
19874
|
canEdit,
|
|
@@ -19466,6 +19899,7 @@ function MotionPathRow({
|
|
|
19466
19899
|
}
|
|
19467
19900
|
function useAnimationDragDrop({
|
|
19468
19901
|
canEdit,
|
|
19902
|
+
rows,
|
|
19469
19903
|
updateAnimations
|
|
19470
19904
|
}) {
|
|
19471
19905
|
const [dragIndex, setDragIndex] = useState(null);
|
|
@@ -19473,14 +19907,14 @@ function useAnimationDragDrop({
|
|
|
19473
19907
|
const dragCounterRef = useRef(0);
|
|
19474
19908
|
const handleDragStart = useCallback(
|
|
19475
19909
|
(index, event) => {
|
|
19476
|
-
if (!canEdit) {
|
|
19910
|
+
if (!canEdit || rows[index]?.kind !== "editor") {
|
|
19477
19911
|
return;
|
|
19478
19912
|
}
|
|
19479
19913
|
setDragIndex(index);
|
|
19480
19914
|
event.dataTransfer.effectAllowed = "move";
|
|
19481
19915
|
event.dataTransfer.setData("text/plain", String(index));
|
|
19482
19916
|
},
|
|
19483
|
-
[canEdit]
|
|
19917
|
+
[canEdit, rows]
|
|
19484
19918
|
);
|
|
19485
19919
|
const handleDragOver = useCallback((_index, event) => {
|
|
19486
19920
|
event.preventDefault();
|
|
@@ -19498,13 +19932,16 @@ function useAnimationDragDrop({
|
|
|
19498
19932
|
dragCounterRef.current = 0;
|
|
19499
19933
|
}
|
|
19500
19934
|
}, []);
|
|
19501
|
-
const
|
|
19935
|
+
const reorderRows = useCallback(
|
|
19502
19936
|
(sourceIndex, targetIndex) => {
|
|
19503
|
-
|
|
19504
|
-
|
|
19505
|
-
|
|
19937
|
+
const sourceRow = rows[sourceIndex];
|
|
19938
|
+
if (!sourceRow || sourceRow.kind !== "editor") {
|
|
19939
|
+
return;
|
|
19940
|
+
}
|
|
19941
|
+
const nextRows = reorderAnimationTimelineRows(rows, sourceRow.key, targetIndex);
|
|
19942
|
+
updateAnimations((anims) => applyAnimationTimelineOrder(anims, nextRows));
|
|
19506
19943
|
},
|
|
19507
|
-
[updateAnimations]
|
|
19944
|
+
[rows, updateAnimations]
|
|
19508
19945
|
);
|
|
19509
19946
|
const handleDrop = useCallback(
|
|
19510
19947
|
(targetIndex, event) => {
|
|
@@ -19516,9 +19953,9 @@ function useAnimationDragDrop({
|
|
|
19516
19953
|
if (sourceIndex === null || sourceIndex === targetIndex) {
|
|
19517
19954
|
return;
|
|
19518
19955
|
}
|
|
19519
|
-
|
|
19956
|
+
reorderRows(sourceIndex, targetIndex);
|
|
19520
19957
|
},
|
|
19521
|
-
[dragIndex,
|
|
19958
|
+
[dragIndex, reorderRows]
|
|
19522
19959
|
);
|
|
19523
19960
|
const handleDragEnd = useCallback(() => {
|
|
19524
19961
|
setDragIndex(null);
|
|
@@ -19526,19 +19963,19 @@ function useAnimationDragDrop({
|
|
|
19526
19963
|
dragCounterRef.current = 0;
|
|
19527
19964
|
}, []);
|
|
19528
19965
|
const handleMoveUp = useCallback(
|
|
19529
|
-
(
|
|
19530
|
-
if (
|
|
19966
|
+
(rowIndex) => {
|
|
19967
|
+
if (rowIndex <= 0) {
|
|
19531
19968
|
return;
|
|
19532
19969
|
}
|
|
19533
|
-
|
|
19970
|
+
reorderRows(rowIndex, rowIndex - 1);
|
|
19534
19971
|
},
|
|
19535
|
-
[
|
|
19972
|
+
[reorderRows]
|
|
19536
19973
|
);
|
|
19537
19974
|
const handleMoveDown = useCallback(
|
|
19538
|
-
(
|
|
19539
|
-
|
|
19975
|
+
(rowIndex) => {
|
|
19976
|
+
reorderRows(rowIndex, rowIndex + 1);
|
|
19540
19977
|
},
|
|
19541
|
-
[
|
|
19978
|
+
[reorderRows]
|
|
19542
19979
|
);
|
|
19543
19980
|
return {
|
|
19544
19981
|
dragIndex,
|
|
@@ -19621,6 +20058,13 @@ function useAnimationHandlers({
|
|
|
19621
20058
|
() => [...activeSlide.animations ?? []].sort((a, b) => (a.order ?? 0) - (b.order ?? 0)),
|
|
19622
20059
|
[activeSlide.animations]
|
|
19623
20060
|
);
|
|
20061
|
+
const timelineRows = useMemo(
|
|
20062
|
+
() => buildAnimationTimelineRows(
|
|
20063
|
+
activeSlide.animations ?? [],
|
|
20064
|
+
activeSlide.animationTimelineAnchors ?? []
|
|
20065
|
+
),
|
|
20066
|
+
[activeSlide.animations, activeSlide.animationTimelineAnchors]
|
|
20067
|
+
);
|
|
19624
20068
|
const updateAnimations = useCallback(
|
|
19625
20069
|
(updater) => {
|
|
19626
20070
|
if (!canEdit) {
|
|
@@ -19768,11 +20212,42 @@ function useAnimationHandlers({
|
|
|
19768
20212
|
(e) => updateAnimationField("sequence", e.target.value),
|
|
19769
20213
|
[updateAnimationField]
|
|
19770
20214
|
);
|
|
20215
|
+
const effectSoundState = useMemo(
|
|
20216
|
+
() => getEffectSoundState(activeSlide.animations ?? [], selectedElement.id),
|
|
20217
|
+
[activeSlide.animations, selectedElement.id]
|
|
20218
|
+
);
|
|
20219
|
+
const handleEffectSoundPick = useCallback(
|
|
20220
|
+
(pick) => {
|
|
20221
|
+
if (!canEdit) {
|
|
20222
|
+
return;
|
|
20223
|
+
}
|
|
20224
|
+
updateAnimations((anims) => setEffectSound(anims, selectedElement.id, pick));
|
|
20225
|
+
},
|
|
20226
|
+
[canEdit, updateAnimations, selectedElement.id]
|
|
20227
|
+
);
|
|
20228
|
+
const handleAfterAnimationChange = useCallback(
|
|
20229
|
+
(action) => {
|
|
20230
|
+
if (!canEdit) {
|
|
20231
|
+
return;
|
|
20232
|
+
}
|
|
20233
|
+
updateAnimations((anims) => setAfterAnimation(anims, selectedElement.id, action));
|
|
20234
|
+
},
|
|
20235
|
+
[canEdit, updateAnimations, selectedElement.id]
|
|
20236
|
+
);
|
|
20237
|
+
const handleAfterAnimationColorChange = useCallback(
|
|
20238
|
+
(color) => {
|
|
20239
|
+
if (!canEdit) {
|
|
20240
|
+
return;
|
|
20241
|
+
}
|
|
20242
|
+
updateAnimations((anims) => setAfterAnimationColor(anims, selectedElement.id, color));
|
|
20243
|
+
},
|
|
20244
|
+
[canEdit, updateAnimations, selectedElement.id]
|
|
20245
|
+
);
|
|
19771
20246
|
const preview = useAnimationPreview({
|
|
19772
20247
|
selectedElementId: selectedElement.id,
|
|
19773
20248
|
selectedElementAnimation
|
|
19774
20249
|
});
|
|
19775
|
-
const dragDrop = useAnimationDragDrop({ canEdit, updateAnimations });
|
|
20250
|
+
const dragDrop = useAnimationDragDrop({ canEdit, rows: timelineRows, updateAnimations });
|
|
19776
20251
|
const getTimelineLabel = useCallback(
|
|
19777
20252
|
(anim) => {
|
|
19778
20253
|
const el = activeSlide.elements?.find((e) => e.id === anim.elementId);
|
|
@@ -19784,6 +20259,17 @@ function useAnimationHandlers({
|
|
|
19784
20259
|
},
|
|
19785
20260
|
[activeSlide.elements]
|
|
19786
20261
|
);
|
|
20262
|
+
const getNativeRowLabel = useCallback(
|
|
20263
|
+
(targetIds) => targetIds.map((id) => {
|
|
20264
|
+
const el = activeSlide.elements?.find((e) => e.id === id);
|
|
20265
|
+
if (!el) {
|
|
20266
|
+
return id.slice(0, 8);
|
|
20267
|
+
}
|
|
20268
|
+
const text = hasTextProperties(el) ? el.text : void 0;
|
|
20269
|
+
return text || getElementLabel(el);
|
|
20270
|
+
}).join(", "),
|
|
20271
|
+
[activeSlide.elements]
|
|
20272
|
+
);
|
|
19787
20273
|
const hasAnimation = Boolean(
|
|
19788
20274
|
selectedElementAnimation?.entrance || selectedElementAnimation?.exit || selectedElementAnimation?.emphasis || selectedElementAnimation?.motionPath
|
|
19789
20275
|
);
|
|
@@ -19799,6 +20285,7 @@ function useAnimationHandlers({
|
|
|
19799
20285
|
return {
|
|
19800
20286
|
selectedElementAnimation,
|
|
19801
20287
|
sortedAnimations,
|
|
20288
|
+
timelineRows,
|
|
19802
20289
|
hasAnimation,
|
|
19803
20290
|
showDirectionPicker,
|
|
19804
20291
|
timelineBarData,
|
|
@@ -19815,7 +20302,12 @@ function useAnimationHandlers({
|
|
|
19815
20302
|
handleDirectionChange,
|
|
19816
20303
|
handleSequenceChange,
|
|
19817
20304
|
handleMotionPathChange,
|
|
20305
|
+
effectSoundState,
|
|
20306
|
+
handleEffectSoundPick,
|
|
20307
|
+
handleAfterAnimationChange,
|
|
20308
|
+
handleAfterAnimationColorChange,
|
|
19818
20309
|
getTimelineLabel,
|
|
20310
|
+
getNativeRowLabel,
|
|
19819
20311
|
...preview,
|
|
19820
20312
|
...dragDrop
|
|
19821
20313
|
};
|
|
@@ -19850,6 +20342,10 @@ function AnimationPanel({
|
|
|
19850
20342
|
handleDirectionChange,
|
|
19851
20343
|
handleSequenceChange,
|
|
19852
20344
|
handleMotionPathChange,
|
|
20345
|
+
effectSoundState,
|
|
20346
|
+
handleEffectSoundPick,
|
|
20347
|
+
handleAfterAnimationChange,
|
|
20348
|
+
handleAfterAnimationColorChange,
|
|
19853
20349
|
handlePreviewClick
|
|
19854
20350
|
} = handlers;
|
|
19855
20351
|
return /* @__PURE__ */ jsxs("div", { className: "rounded border border-border bg-card p-2 space-y-2", children: [
|
|
@@ -19965,6 +20461,26 @@ function AnimationPanel({
|
|
|
19965
20461
|
}
|
|
19966
20462
|
)
|
|
19967
20463
|
] }),
|
|
20464
|
+
/* @__PURE__ */ jsxs("div", { className: "pt-1 border-t border-border flex flex-col gap-2", children: [
|
|
20465
|
+
/* @__PURE__ */ jsx(
|
|
20466
|
+
EffectSoundRow,
|
|
20467
|
+
{
|
|
20468
|
+
soundState: effectSoundState,
|
|
20469
|
+
canEdit,
|
|
20470
|
+
onPick: handleEffectSoundPick
|
|
20471
|
+
}
|
|
20472
|
+
),
|
|
20473
|
+
/* @__PURE__ */ jsx(
|
|
20474
|
+
AfterAnimationRow,
|
|
20475
|
+
{
|
|
20476
|
+
action: selectedElementAnimation?.afterAnimation ?? "none",
|
|
20477
|
+
color: selectedElementAnimation?.afterAnimationColor,
|
|
20478
|
+
canEdit,
|
|
20479
|
+
onActionChange: handleAfterAnimationChange,
|
|
20480
|
+
onColorChange: handleAfterAnimationColorChange
|
|
20481
|
+
}
|
|
20482
|
+
)
|
|
20483
|
+
] }),
|
|
19968
20484
|
/* @__PURE__ */ jsx("div", { className: "text-[11px] uppercase tracking-wide text-muted-foreground pt-1 border-t border-border", children: t("pptx.animation.timing") }),
|
|
19969
20485
|
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
19970
20486
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-[11px]", children: t("pptx.animation.trigger") }),
|
|
@@ -21871,7 +22387,7 @@ function ConnectorArrowsSection({
|
|
|
21871
22387
|
["Start", "End"].map((end) => {
|
|
21872
22388
|
const widthKey = end === "Start" ? "connectorStartArrowWidth" : "connectorEndArrowWidth";
|
|
21873
22389
|
const lengthKey = end === "Start" ? "connectorStartArrowLength" : "connectorEndArrowLength";
|
|
21874
|
-
return /* @__PURE__ */ jsxs(
|
|
22390
|
+
return /* @__PURE__ */ jsxs(React19.Fragment, { children: [
|
|
21875
22391
|
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
21876
22392
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t(END_LABEL_KEYS[end].width) }),
|
|
21877
22393
|
/* @__PURE__ */ jsx(
|
|
@@ -21948,7 +22464,9 @@ function GroupInfoPanel({
|
|
|
21948
22464
|
] });
|
|
21949
22465
|
}
|
|
21950
22466
|
function OlePropertiesPanel({
|
|
21951
|
-
selectedElement
|
|
22467
|
+
selectedElement,
|
|
22468
|
+
canEdit,
|
|
22469
|
+
onUpdateElement
|
|
21952
22470
|
}) {
|
|
21953
22471
|
const { t } = useTranslation();
|
|
21954
22472
|
if (selectedElement.type !== "ole") {
|
|
@@ -21958,6 +22476,20 @@ function OlePropertiesPanel({
|
|
|
21958
22476
|
return /* @__PURE__ */ jsxs("div", { className: CARD, children: [
|
|
21959
22477
|
/* @__PURE__ */ jsx("div", { className: HEADING, children: t("pptx.ole.title") }),
|
|
21960
22478
|
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5 text-[11px]", children: [
|
|
22479
|
+
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
22480
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.ole.objectName") }),
|
|
22481
|
+
/* @__PURE__ */ jsx(
|
|
22482
|
+
"input",
|
|
22483
|
+
{
|
|
22484
|
+
type: "text",
|
|
22485
|
+
disabled: !canEdit,
|
|
22486
|
+
className: INPUT,
|
|
22487
|
+
value: ole.oleName ?? "",
|
|
22488
|
+
placeholder: t("pptx.ole.objectNamePlaceholder"),
|
|
22489
|
+
onChange: (e) => onUpdateElement(buildOleObjectNamePatch(e.target.value))
|
|
22490
|
+
}
|
|
22491
|
+
)
|
|
22492
|
+
] }),
|
|
21961
22493
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
21962
22494
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.ole.type") }),
|
|
21963
22495
|
/* @__PURE__ */ jsx("span", { className: "text-foreground truncate", children: getOleObjectTypeLabel(ole.oleObjectType) })
|
|
@@ -24739,7 +25271,7 @@ function StrokeEffectsSection({
|
|
|
24739
25271
|
] }),
|
|
24740
25272
|
EFFECT_CONFIGS.map((cfg) => {
|
|
24741
25273
|
const on = cfg.isOn(style);
|
|
24742
|
-
return /* @__PURE__ */ jsxs(
|
|
25274
|
+
return /* @__PURE__ */ jsxs(React19.Fragment, { children: [
|
|
24743
25275
|
/* @__PURE__ */ jsxs("label", { className: `inline-flex items-center gap-2 text-foreground ${COL2}`, children: [
|
|
24744
25276
|
/* @__PURE__ */ jsx(
|
|
24745
25277
|
"input",
|
|
@@ -25579,7 +26111,7 @@ function TextWarpGallery({
|
|
|
25579
26111
|
onUpdateTextStyle
|
|
25580
26112
|
}) {
|
|
25581
26113
|
const { t } = useTranslation();
|
|
25582
|
-
const [expanded, setExpanded] =
|
|
26114
|
+
const [expanded, setExpanded] = React19.useState(false);
|
|
25583
26115
|
const currentPreset = ts?.textWarpPreset || "textNoShape";
|
|
25584
26116
|
return /* @__PURE__ */ jsxs("div", { className: "mt-2 rounded border border-border bg-card p-2 space-y-2", children: [
|
|
25585
26117
|
/* @__PURE__ */ jsxs(
|
|
@@ -26197,7 +26729,7 @@ function SmartArtStyleControls({
|
|
|
26197
26729
|
onChangeStyle
|
|
26198
26730
|
}) {
|
|
26199
26731
|
const { t } = useTranslation();
|
|
26200
|
-
const translate =
|
|
26732
|
+
const translate = React19.useCallback((key) => t(key), [t]);
|
|
26201
26733
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26202
26734
|
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1 text-[11px]", children: [
|
|
26203
26735
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: t("pptx.smartart.colorScheme") }),
|
|
@@ -26252,9 +26784,9 @@ function SmartArtPropertiesPanel({
|
|
|
26252
26784
|
const nodes = smartArtData.nodes ?? [];
|
|
26253
26785
|
const layout = smartArtData.resolvedLayoutType;
|
|
26254
26786
|
const topLevelCount = nodes.filter((n) => !n.parentId).length;
|
|
26255
|
-
const inputRefs =
|
|
26256
|
-
const pendingFocusId =
|
|
26257
|
-
|
|
26787
|
+
const inputRefs = React19.useRef(/* @__PURE__ */ new Map());
|
|
26788
|
+
const pendingFocusId = React19.useRef(null);
|
|
26789
|
+
React19.useEffect(() => {
|
|
26258
26790
|
const id = pendingFocusId.current;
|
|
26259
26791
|
if (id) {
|
|
26260
26792
|
inputRefs.current.get(id)?.focus();
|
|
@@ -27349,7 +27881,14 @@ function ElementInspectorBody({
|
|
|
27349
27881
|
}
|
|
27350
27882
|
),
|
|
27351
27883
|
/* @__PURE__ */ jsx(GroupInfoPanel, { selectedElement }),
|
|
27352
|
-
/* @__PURE__ */ jsx(
|
|
27884
|
+
/* @__PURE__ */ jsx(
|
|
27885
|
+
OlePropertiesPanel,
|
|
27886
|
+
{
|
|
27887
|
+
selectedElement,
|
|
27888
|
+
canEdit,
|
|
27889
|
+
onUpdateElement
|
|
27890
|
+
}
|
|
27891
|
+
),
|
|
27353
27892
|
/* @__PURE__ */ jsx(
|
|
27354
27893
|
ShapeTextPanels,
|
|
27355
27894
|
{
|
|
@@ -27397,7 +27936,7 @@ function CommentBody({ text, mentions, className }) {
|
|
|
27397
27936
|
index
|
|
27398
27937
|
) : (
|
|
27399
27938
|
// eslint-disable-next-line react/no-array-index-key -- segments are positional
|
|
27400
|
-
/* @__PURE__ */ jsx(
|
|
27939
|
+
/* @__PURE__ */ jsx(React19.Fragment, { children: segment.text }, index)
|
|
27401
27940
|
)
|
|
27402
27941
|
) });
|
|
27403
27942
|
}
|
|
@@ -28522,6 +29061,7 @@ function SlideTransitionSection({
|
|
|
28522
29061
|
const hasDirections = validDirections !== void 0 && validDirections.length > 0;
|
|
28523
29062
|
const usesOrientation = TRANSITION_ORIENTATION_TYPES.has(transitionType);
|
|
28524
29063
|
const isWheel = transitionType === "wheel";
|
|
29064
|
+
const isMorph = transitionType === "morph";
|
|
28525
29065
|
return /* @__PURE__ */ jsxs(
|
|
28526
29066
|
"div",
|
|
28527
29067
|
{
|
|
@@ -28614,6 +29154,38 @@ function SlideTransitionSection({
|
|
|
28614
29154
|
}
|
|
28615
29155
|
)
|
|
28616
29156
|
] }),
|
|
29157
|
+
/* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
29158
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs", children: t("pptx.transition.speed") }),
|
|
29159
|
+
/* @__PURE__ */ jsx(
|
|
29160
|
+
"select",
|
|
29161
|
+
{
|
|
29162
|
+
value: activeSlide.transition?.speed ?? "fast",
|
|
29163
|
+
disabled: !canEdit,
|
|
29164
|
+
"aria-label": t("pptx.transition.speed"),
|
|
29165
|
+
onChange: (e) => onTransitionChange({
|
|
29166
|
+
speed: e.target.value
|
|
29167
|
+
}),
|
|
29168
|
+
className: "bg-muted border border-border rounded px-2 py-1",
|
|
29169
|
+
children: TRANSITION_SPEED_OPTIONS.map((option) => /* @__PURE__ */ jsx("option", { value: option.value, children: t(option.i18nKey) }, option.value))
|
|
29170
|
+
}
|
|
29171
|
+
)
|
|
29172
|
+
] }),
|
|
29173
|
+
isMorph && /* @__PURE__ */ jsxs("label", { className: "flex flex-col gap-1", children: [
|
|
29174
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-xs", children: t("pptx.transition.morphOption") }),
|
|
29175
|
+
/* @__PURE__ */ jsx(
|
|
29176
|
+
"select",
|
|
29177
|
+
{
|
|
29178
|
+
value: activeSlide.transition?.morphOption ?? "byObject",
|
|
29179
|
+
disabled: !canEdit,
|
|
29180
|
+
"aria-label": t("pptx.transition.morphOption"),
|
|
29181
|
+
onChange: (e) => onTransitionChange({
|
|
29182
|
+
morphOption: e.target.value
|
|
29183
|
+
}),
|
|
29184
|
+
className: "bg-muted border border-border rounded px-2 py-1",
|
|
29185
|
+
children: TRANSITION_MORPH_OPTIONS.map((option) => /* @__PURE__ */ jsx("option", { value: option.value, children: t(option.i18nKey) }, option.value))
|
|
29186
|
+
}
|
|
29187
|
+
)
|
|
29188
|
+
] }),
|
|
28617
29189
|
/* @__PURE__ */ jsxs("label", { className: "inline-flex items-center gap-2 text-foreground text-xs", children: [
|
|
28618
29190
|
/* @__PURE__ */ jsx(
|
|
28619
29191
|
"input",
|
|
@@ -28743,7 +29315,7 @@ function PresentationPropertiesPanel({
|
|
|
28743
29315
|
onUpdateTagCollections
|
|
28744
29316
|
}) {
|
|
28745
29317
|
const { t } = useTranslation();
|
|
28746
|
-
const handleTransitionChange =
|
|
29318
|
+
const handleTransitionChange = React19.useCallback(
|
|
28747
29319
|
(updates) => {
|
|
28748
29320
|
onUpdateSlide({
|
|
28749
29321
|
transition: mergeSlideTransition(activeSlide?.transition, updates)
|
|
@@ -32761,7 +33333,7 @@ function ViewerToolbarSection(props) {
|
|
|
32761
33333
|
},
|
|
32762
33334
|
[activeSlide, propertyHandlers]
|
|
32763
33335
|
);
|
|
32764
|
-
const scopedLayoutOptions =
|
|
33336
|
+
const scopedLayoutOptions = React19.useMemo(
|
|
32765
33337
|
() => scopeLayoutOptionsToActiveSlide(s.layoutOptions, activeSlide),
|
|
32766
33338
|
[s.layoutOptions, activeSlide]
|
|
32767
33339
|
);
|
|
@@ -34596,7 +35168,7 @@ ${url}`)) {
|
|
|
34596
35168
|
var AiChatPanel = lazy(async () => {
|
|
34597
35169
|
const [{ useChat }, { default: Panel }] = await Promise.all([
|
|
34598
35170
|
import('@ai-sdk/react'),
|
|
34599
|
-
import('./AiChatPanel-
|
|
35171
|
+
import('./AiChatPanel-EIENGCKW.mjs')
|
|
34600
35172
|
]);
|
|
34601
35173
|
function BoundAiChatPanel(props) {
|
|
34602
35174
|
return /* @__PURE__ */ jsx(Panel, { ...props, useChat });
|
|
@@ -37666,6 +38238,10 @@ var PowerPointViewer = forwardRef(
|
|
|
37666
38238
|
shareDefaults,
|
|
37667
38239
|
smartArt3D = false,
|
|
37668
38240
|
surfaceChart3D = false,
|
|
38241
|
+
barChart3D = false,
|
|
38242
|
+
lineChart3D = false,
|
|
38243
|
+
areaChart3D = false,
|
|
38244
|
+
pieChart3D = false,
|
|
37669
38245
|
hiddenActions,
|
|
37670
38246
|
ai
|
|
37671
38247
|
} = props;
|
|
@@ -38474,7 +39050,7 @@ var PowerPointViewer = forwardRef(
|
|
|
38474
39050
|
]
|
|
38475
39051
|
}
|
|
38476
39052
|
);
|
|
38477
|
-
return /* @__PURE__ */ jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsx(SmartArt3DContext.Provider, { value: smartArt3D, children: /* @__PURE__ */ jsx(SurfaceChart3DContext.Provider, { value: surfaceChart3D, children: /* @__PURE__ */ jsx(ViewerThemeProvider, { theme: effectiveTheme, children: /* @__PURE__ */ jsxs(
|
|
39053
|
+
return /* @__PURE__ */ jsx(AccountAuthContext.Provider, { value: accountAuth, children: /* @__PURE__ */ jsx(SmartArt3DContext.Provider, { value: smartArt3D, children: /* @__PURE__ */ jsx(SurfaceChart3DContext.Provider, { value: surfaceChart3D, children: /* @__PURE__ */ jsx(BarChart3DContext.Provider, { value: barChart3D, children: /* @__PURE__ */ jsx(LineChart3DContext.Provider, { value: lineChart3D, children: /* @__PURE__ */ jsx(AreaChart3DContext.Provider, { value: areaChart3D, children: /* @__PURE__ */ jsx(PieChart3DContext.Provider, { value: pieChart3D, children: /* @__PURE__ */ jsx(ViewerThemeProvider, { theme: effectiveTheme, children: /* @__PURE__ */ jsxs(
|
|
38478
39054
|
CollaborationProvider,
|
|
38479
39055
|
{
|
|
38480
39056
|
config: collaboration,
|
|
@@ -38505,7 +39081,7 @@ var PowerPointViewer = forwardRef(
|
|
|
38505
39081
|
viewerContent
|
|
38506
39082
|
]
|
|
38507
39083
|
}
|
|
38508
|
-
) }) }) }) });
|
|
39084
|
+
) }) }) }) }) }) }) }) });
|
|
38509
39085
|
}
|
|
38510
39086
|
);
|
|
38511
39087
|
PowerPointViewer.displayName = "PowerPointViewer";
|