pptx-react-viewer 4.1.6 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/{AiChatPanel-Y2RKSHOO.mjs → AiChatPanel-SEIRQ3XP.mjs} +3 -3
- package/dist/AiChatPanel-SEIRQ3XP.mjs.br +0 -0
- package/dist/AiChatPanel-SEIRQ3XP.mjs.gz +0 -0
- package/dist/{AiChatPanel-DRCY3T2Z.js → AiChatPanel-VVTLQXQ5.js} +27 -27
- package/dist/AiChatPanel-VVTLQXQ5.js.br +0 -0
- package/dist/AiChatPanel-VVTLQXQ5.js.gz +0 -0
- package/dist/{Model3DScene-ITHRMCLT.mjs → Model3DScene-DCTVSK2F.mjs} +1 -1
- package/dist/Model3DScene-DCTVSK2F.mjs.br +0 -0
- package/dist/Model3DScene-DCTVSK2F.mjs.gz +0 -0
- package/dist/{Model3DScene-VJZS726S.js → Model3DScene-SCWQXMEA.js} +2 -2
- package/dist/Model3DScene-SCWQXMEA.js.br +0 -0
- package/dist/Model3DScene-SCWQXMEA.js.gz +0 -0
- package/dist/{chunk-IXS7DALE.js → OrbitControls-4TDJCTBA.js} +1 -0
- package/dist/OrbitControls-4TDJCTBA.js.br +0 -0
- package/dist/OrbitControls-4TDJCTBA.js.gz +0 -0
- package/dist/{chunk-MV2GCDBR.mjs → OrbitControls-WCOIJFFL.mjs} +1 -0
- package/dist/OrbitControls-WCOIJFFL.mjs.br +0 -0
- package/dist/OrbitControls-WCOIJFFL.mjs.gz +0 -0
- package/dist/{chunk-2O66VMWK.js → chunk-3WYNGYB6.js} +5 -5
- package/dist/chunk-3WYNGYB6.js.br +0 -0
- package/dist/chunk-3WYNGYB6.js.gz +0 -0
- package/dist/{chunk-OFSKGB3W.mjs → chunk-4GTDG2FH.mjs} +157 -579
- package/dist/chunk-4GTDG2FH.mjs.br +0 -0
- package/dist/chunk-4GTDG2FH.mjs.gz +0 -0
- package/dist/{chunk-P5LF34BT.js → chunk-5MRNT4V6.js} +173 -173
- package/dist/chunk-5MRNT4V6.js.br +0 -0
- package/dist/chunk-5MRNT4V6.js.gz +0 -0
- package/dist/{chunk-KDTE5JOW.mjs → chunk-B5YZABYX.mjs} +1 -1
- package/dist/chunk-B5YZABYX.mjs.br +0 -0
- package/dist/chunk-B5YZABYX.mjs.gz +0 -0
- package/dist/{chunk-LNSYROED.js → chunk-KTSDPBQZ.js} +1309 -1210
- package/dist/chunk-KTSDPBQZ.js.br +0 -0
- package/dist/chunk-KTSDPBQZ.js.gz +0 -0
- package/dist/{chunk-QEYWSHNE.mjs → chunk-L4XBWL7J.mjs} +1 -1
- package/dist/chunk-L4XBWL7J.mjs.br +0 -0
- package/dist/chunk-L4XBWL7J.mjs.gz +0 -0
- package/dist/{chunk-VWGJXNMR.js → chunk-P2SBIMYF.js} +1645 -2073
- package/dist/chunk-P2SBIMYF.js.br +0 -0
- package/dist/chunk-P2SBIMYF.js.gz +0 -0
- package/dist/{chunk-QMSSDBKN.js → chunk-S65QSO6T.js} +26522 -22546
- package/dist/chunk-S65QSO6T.js.br +0 -0
- package/dist/chunk-S65QSO6T.js.gz +0 -0
- package/dist/{chunk-FT3MMIXW.mjs → chunk-VPJOJJ36.mjs} +26518 -22532
- package/dist/chunk-VPJOJJ36.mjs.br +0 -0
- package/dist/chunk-VPJOJJ36.mjs.gz +0 -0
- package/dist/{chunk-YHTDDCSC.mjs → chunk-ZYIJODUR.mjs} +254 -155
- package/dist/chunk-ZYIJODUR.mjs.br +0 -0
- package/dist/chunk-ZYIJODUR.mjs.gz +0 -0
- package/dist/index.d.ts +65 -18
- package/dist/index.js +47 -47
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +65 -18
- package/dist/internals.js +104 -104
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- 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/viewer/index.d.ts +48 -1
- package/dist/viewer/index.js +26 -26
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-DRCY3T2Z.js.br +0 -0
- package/dist/AiChatPanel-DRCY3T2Z.js.gz +0 -0
- package/dist/AiChatPanel-Y2RKSHOO.mjs.br +0 -0
- package/dist/AiChatPanel-Y2RKSHOO.mjs.gz +0 -0
- package/dist/Area3DChartScene-J4LMNSGM.js +0 -64
- package/dist/Area3DChartScene-J4LMNSGM.js.br +0 -0
- package/dist/Area3DChartScene-J4LMNSGM.js.gz +0 -0
- package/dist/Area3DChartScene-TDACCSOI.mjs +0 -62
- package/dist/Area3DChartScene-TDACCSOI.mjs.br +0 -0
- package/dist/Area3DChartScene-TDACCSOI.mjs.gz +0 -0
- package/dist/Bar3DChartScene-AD72DLBJ.mjs +0 -62
- package/dist/Bar3DChartScene-AD72DLBJ.mjs.br +0 -0
- package/dist/Bar3DChartScene-AD72DLBJ.mjs.gz +0 -0
- package/dist/Bar3DChartScene-T7334CTK.js +0 -64
- package/dist/Bar3DChartScene-T7334CTK.js.br +0 -0
- package/dist/Bar3DChartScene-T7334CTK.js.gz +0 -0
- package/dist/Line3DChartScene-2ZQSCHK3.mjs +0 -62
- package/dist/Line3DChartScene-2ZQSCHK3.mjs.br +0 -0
- package/dist/Line3DChartScene-2ZQSCHK3.mjs.gz +0 -0
- package/dist/Line3DChartScene-ELVKCFJZ.js +0 -64
- package/dist/Line3DChartScene-ELVKCFJZ.js.br +0 -0
- package/dist/Line3DChartScene-ELVKCFJZ.js.gz +0 -0
- package/dist/Model3DScene-ITHRMCLT.mjs.br +0 -0
- package/dist/Model3DScene-ITHRMCLT.mjs.gz +0 -0
- package/dist/Model3DScene-VJZS726S.js.br +0 -0
- package/dist/Model3DScene-VJZS726S.js.gz +0 -0
- package/dist/OrbitControls-2XOMWUVE.mjs +0 -3
- package/dist/OrbitControls-2XOMWUVE.mjs.br +0 -0
- package/dist/OrbitControls-2XOMWUVE.mjs.gz +0 -0
- package/dist/OrbitControls-CGYUF3BY.js +0 -12
- package/dist/OrbitControls-CGYUF3BY.js.br +0 -0
- package/dist/OrbitControls-CGYUF3BY.js.gz +0 -0
- package/dist/PieChart3DScene-N3DM33FW.js +0 -58
- package/dist/PieChart3DScene-N3DM33FW.js.br +0 -0
- package/dist/PieChart3DScene-N3DM33FW.js.gz +0 -0
- package/dist/PieChart3DScene-PYHOA7BO.mjs +0 -56
- package/dist/PieChart3DScene-PYHOA7BO.mjs.br +0 -0
- package/dist/PieChart3DScene-PYHOA7BO.mjs.gz +0 -0
- package/dist/SmartArt3DScene-D4VNNPHS.mjs +0 -500
- package/dist/SmartArt3DScene-D4VNNPHS.mjs.br +0 -0
- package/dist/SmartArt3DScene-D4VNNPHS.mjs.gz +0 -0
- package/dist/SmartArt3DScene-NHD7CZJ5.js +0 -502
- package/dist/SmartArt3DScene-NHD7CZJ5.js.br +0 -0
- package/dist/SmartArt3DScene-NHD7CZJ5.js.gz +0 -0
- package/dist/SurfaceChart3DScene-IFBUOLNB.mjs +0 -62
- package/dist/SurfaceChart3DScene-IFBUOLNB.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-IFBUOLNB.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-PUWIMT7V.js +0 -64
- package/dist/SurfaceChart3DScene-PUWIMT7V.js.br +0 -0
- package/dist/SurfaceChart3DScene-PUWIMT7V.js.gz +0 -0
- package/dist/chunk-2O66VMWK.js.br +0 -0
- package/dist/chunk-2O66VMWK.js.gz +0 -0
- package/dist/chunk-DNR6CH6I.js +0 -30
- package/dist/chunk-DNR6CH6I.js.br +0 -0
- package/dist/chunk-DNR6CH6I.js.gz +0 -0
- package/dist/chunk-FT3MMIXW.mjs.br +0 -0
- package/dist/chunk-FT3MMIXW.mjs.gz +0 -0
- package/dist/chunk-IXS7DALE.js.br +0 -0
- package/dist/chunk-IXS7DALE.js.gz +0 -0
- package/dist/chunk-KDTE5JOW.mjs.br +0 -0
- package/dist/chunk-KDTE5JOW.mjs.gz +0 -0
- package/dist/chunk-LNSYROED.js.br +0 -0
- package/dist/chunk-LNSYROED.js.gz +0 -0
- package/dist/chunk-MV2GCDBR.mjs.br +0 -0
- package/dist/chunk-MV2GCDBR.mjs.gz +0 -0
- package/dist/chunk-OFSKGB3W.mjs.br +0 -0
- package/dist/chunk-OFSKGB3W.mjs.gz +0 -0
- package/dist/chunk-P5LF34BT.js.br +0 -0
- package/dist/chunk-P5LF34BT.js.gz +0 -0
- package/dist/chunk-QEYWSHNE.mjs.br +0 -0
- package/dist/chunk-QEYWSHNE.mjs.gz +0 -0
- package/dist/chunk-QMSSDBKN.js.br +0 -0
- package/dist/chunk-QMSSDBKN.js.gz +0 -0
- package/dist/chunk-T6GFCLSM.mjs +0 -27
- package/dist/chunk-T6GFCLSM.mjs.br +0 -4
- package/dist/chunk-T6GFCLSM.mjs.gz +0 -0
- package/dist/chunk-VWGJXNMR.js.br +0 -0
- package/dist/chunk-VWGJXNMR.js.gz +0 -0
- package/dist/chunk-YHTDDCSC.mjs.br +0 -0
- package/dist/chunk-YHTDDCSC.mjs.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, getImageSurfaceStyle, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, DEFAULT_FILL_COLOR, getCropShapeClipPath, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getImageSurfaceMaskStyle, getImageTilingStyle, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, MIN_ELEMENT_SIZE, buildTextBody3DSceneStyle, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, HYPERLINK_COLOR, cloneHistorySnapshot, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, buildPdfFromTiledImageData, GRID_SIZE, buildNotesPdf } from './chunk-
|
|
2
|
-
import { GlyphOutlineFontCache, createGlyphOutlineLookup, DEFAULT_VIEWER_OPTIONS, TOOLBAR_TABS, getSelectionControlArtworkStyle, hasShapeProperties, normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, hasTextProperties, getSelectionOutlineColor, connectorWrapperTransform, getAriaRoleDescription, getAriaLabel, getAriaRole, resolveElementInteractivity, isEditableTextElement, buildTextStyleOverrideCss, isElementRendered, resolveElementAriaAttributes, shouldRenderHitTarget, elementHitTargetStyle, getImageEffectsOpacity, getImageEffectsFilter, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, ACTION_BUTTON_PRESETS, mediaTransportVisible, isInkElement, getGroupChildParentFill, getElementLabel, getResizeHandleHitAreaStyle, paintedStrokeWidth, buildCssGradientFromShapeStyle, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, paintedElementSize, getElementTransform, resolveElementHighlightClick, applyHighlightClickStyle, getComputedEffectStyle, getSoftEdgeSvgFilter, getEffectStyleSource, getBevelLightingSvgFilter, buildStrokeOutline, buildHollowHitOutline, buildSubpathFillOverlay, isImageLikeElement, strokeOutlineViewBox, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, buildSmartArtA11y, canDrillDown, computeSmartArtElementLayout, flattenNodes, buildSummaryZoomView, isImageTiled, getImageColorWashStyle, readEditableText, placeCaretAtEnd, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, resolveChartKind, subscribeBarFacePicturePixelSamples, getBarFacePicturePixelSampleVersion, ensureChartInteractionStyles, applyChartPartHighlight, resolveRevealedChartData, formatAxisValue, buildInkGroupStrokes, getInkReplayStyles, INK_REPLAY_KEYFRAMES, buildContentPartStrokes, getContentPartReplayStyles, resolveOleType, getOleAriaLabel, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, getTextBodyRotationTransform, placeholderPromptDescriptor, attachRotateHandlePlacement, elementIdSelector, createRotationDrag, 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, resolveRevealedDrawingShapeNodeIds, styleShadowFilter, buildChromeStyle, measureSvgViewportRect, modelDataToBlobUrl, getImageSvgFilters, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, inlineListBodyText, createInlineListSeed, readListActivationSelection, createInlineListModelObserver, attachCollaborationInlineEditor, bindInlineListParagraph, bindInlineListRun, attachInlineListController, restoreInlineListBodySelection, getInlineEditorSelectionResult, isBulletMarkerSegment, findChartPartTarget, buildSurfaceChart3DDataForElement, buildBarChart3DDataForElement, buildLineChart3DDataForElement, buildAreaChart3DDataForElement, buildPieChart3DDataForElement, withChartTitle, resolveSmartArt3DLayout, buildSmartArt3DModel, collectCoherent3DOffNodeIds, isBrowserOpenableMime, formatBytes, getOleDisplayName, getOleBadgeLabel, openUrlInNewTab, getSubstituteFontFamily, hasGlyphEnvelope, buildGlyphEnvelope, getWarpPath, isWedgeCalloutPresetShape, isElementActionable, centeredSvgTextLines, findSmartArtNodeText, setSmartArtNodeStyle, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, updateSmartArtNodeText, advanceChartMarkDrag, advanceChartValueDrag, buildChartMarkDragGeometry, beginChartMarkDrag, beginChartValueDrag, groupIntoParagraphs, substituteFieldText, computeInlineEditorRect, withChartPointValue, MIN_TOUCH_TARGET_PX, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, createPresenceProjector, BROADCAST_THROTTLE_MS, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, createActiveAnimationGroup, cancelBuildReveal, clearPlaybackTimers, PresentationAnimationController, resolveMediaTimeNodeElementIds, advanceMainSequence, playGroup, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, createPresenterShowGuard, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, findInSlides, applyFindReplacements, visibleTemplateElements, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, createPresentationLoadResources, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, partitionTemplateElements, seedRecentColors, resolveAuthoredCustomShowId, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, EncryptedFileError, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, updateMasterViewElement, isTemplateElementId, updateElement, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canInteractWithElement, prepareExportClone, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, resolveImageResolutionScale, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, stopAllPersistentAudio, guidePxToEmu, buildSaveSlides, buildDeckSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, shouldProbeAutosaveRecovery, probeAutosaveRecovery, acceptAutosaveRecovery, acknowledgeAutosaveRecovery, discardAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, collectReferencedFontFamilies, resolveGoogleWebfontHref, syncGoogleWebfontStylesheet, selectGoogleWebfontFamilies, fetchGoogleWebfontOutlineBytes, mapSlideShowStartKey, mapEditorKey, isEditorTextInputTarget, prepareElementForInsertion, createViewerOptionsStore, observeYDocSlides, LOCAL_SYNC_ORIGIN, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, scopeLayoutOptionsToSlide, checkModifyPassword, viewerPreferencesFromViewProperties, DEFAULT_VIEWER_PREFERENCES, viewPropertiesPatchFromPreferences, openPptxFile, readBackstageRecentFile, resolveCollaborationShellEditability, resolveCollaborationShellState, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, getSlideTransitionAnimations, getFragmentedTransitionDescriptor, SLIDE_TRANSITION_KEYFRAMES, isActionHidden, buildInlineTextCommitPatch, resolveInlineEditAutoFitHeight, resolveInlineEditNormAutofitShrink, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, savedPresentationFileName, downloadBlob, exportDeckJson, groupElements, generateElementId, makeCloneId, ungroupElements, alignElements, distributeElements, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, openPendingPrintWindow, computeColorFilter, filterHiddenSlideIndices, computeSlideIndices, buildPrintDocument, finishPrintWindow, buildPrintHtmlDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, buildThemeColorMap, reResolveSlideColors, reResolveElementColors, resolveViewportFitOptions, calculateViewportFit, scheduleAutoAdvanceChain, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, resolveTransitionSoundAction, runPresentationAction, safeOpenUrl, buildRunProgramNotice, toggleStageElementMedia, resolveOleVerbTarget, downloadDataUrl, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, remapTextToSegments, buildInlineListStylePatch, applyActiveInlineListFormatting, applyListStyleUpdate, setPendingSelectionRestore, applyTextStyleUpdate, toggleSelectionBullets, transformInlineListCase, applyCaseTransformToSegments, transformTextCase, resolveExportCaptureDecision, recordProgressPercent, computeGridSpacingPx, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, overlayMasterViewInlineSnapshot, overlayInlineTextSnapshot, cloneElementUpdates, assertElementUpdateTarget, prepareElementUpdateBatch, createWriteBackScheduler, observeExternalCollaborationReadiness, resolveHistoryDepth, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, cloneElementForPaste, computeScrollDelta, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, replyToCommentInList, removeTableElementColumn, insertTableElementColumn, removeTableElementRow, insertTableElementRow, updateCellTextStyleInRawXml, setCellText, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, stopCaptureStream, GIF_POST_CAPTURE_MAX_SIDE, encodeGif, rasterResultToPngBlob, rasterizeElementTiles, placeTileOnPage, PDF_SLIDES_PAGE_WIDTH_PT, PDF_SLIDES_PAGE_HEIGHT_PT, canvasToJpegData, createSnapshotTextPositions, isPpactionUrl, parsePpactionUrl, resolvePresentationAction, elementActionToPptxAction, isUrlSafe, buildSmartArtPresetData, classifyMediaType, computeSnapToShape, publishLiveGeometry, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, rasterizeElementTiledToCanvas, borrowExternalCollaborationAwareness, observeExternalCollaborationSession, clampGifDimensions, rasterizeElement, shouldConfirmExternalHyperlink, applyResize, lockResizeAspect, snapBoxToGrid, applyMotionPathPreset, bringForward, sendBackward, bringToFront, sendToBack } from './chunk-FT3MMIXW.mjs';
|
|
1
|
+
import { DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, getImageSurfaceStyle, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, DEFAULT_FILL_COLOR, getCropShapeClipPath, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getImageSurfaceMaskStyle, getImageTilingStyle, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, MIN_ELEMENT_SIZE, buildTextBody3DSceneStyle, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, HYPERLINK_COLOR, cloneHistorySnapshot, ZOOM_TO_SELECTION_PADDING, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, UNGROUPED_SECTION_ID, DEFAULT_SECTION_GROUP_ID, DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, buildPdfFromTiledImageData, GRID_SIZE, buildNotesPdf } from './chunk-B5YZABYX.mjs';
|
|
2
|
+
import { GlyphOutlineFontCache, createGlyphOutlineLookup, DEFAULT_VIEWER_OPTIONS, TOOLBAR_TABS, defineThreeViewElement, getSelectionControlArtworkStyle, hasShapeProperties, normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, hasTextProperties, getSelectionOutlineColor, connectorWrapperTransform, getAriaRoleDescription, getAriaLabel, getAriaRole, resolveElementInteractivity, isEditableTextElement, buildTextStyleOverrideCss, isElementRendered, resolveElementAriaAttributes, shouldRenderHitTarget, elementHitTargetStyle, getImageEffectsOpacity, getImageEffectsFilter, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, ACTION_BUTTON_PRESETS, mediaTransportVisible, isInkElement, getGroupChildParentFill, getElementLabel, getResizeHandleHitAreaStyle, paintedStrokeWidth, buildCssGradientFromShapeStyle, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, paintedElementSize, getElementTransform, resolveElementHighlightClick, applyHighlightClickStyle, getComputedEffectStyle, getSoftEdgeSvgFilter, getEffectStyleSource, getBevelLightingSvgFilter, buildStrokeOutline, buildHollowHitOutline, buildSubpathFillOverlay, isImageLikeElement, strokeOutlineViewBox, resolveRevealedSmartArtNodes, resolveRevealedDrawingShapes, buildSmartArtA11y, canDrillDown, computeSmartArtElementLayout, flattenNodes, buildSummaryZoomView, isImageTiled, getImageColorWashStyle, readEditableText, placeCaretAtEnd, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, subscribeBarFacePicturePixelSamples, getBarFacePicturePixelSampleVersion, ensureChartInteractionStyles, applyChartPartHighlight, resolveRevealedChartData, formatAxisValue, buildInkGroupStrokes, getInkReplayStyles, INK_REPLAY_KEYFRAMES, buildContentPartStrokes, getContentPartReplayStyles, resolveOleType, getOleAriaLabel, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, getTextBodyRotationTransform, placeholderPromptDescriptor, attachRotateHandlePlacement, elementIdSelector, createRotationDrag, 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, resolveRevealedDrawingShapeNodeIds, styleShadowFilter, buildChromeStyle, measureSvgViewportRect, modelDataToBlobUrl, getImageSvgFilters, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, inlineListBodyText, createInlineListSeed, readListActivationSelection, createInlineListModelObserver, attachCollaborationInlineEditor, bindInlineListParagraph, bindInlineListRun, attachInlineListController, restoreInlineListBodySelection, getInlineEditorSelectionResult, isBulletMarkerSegment, resolveChartThreeViewSpec, applyChart3DDrag, applyChart3DSelect, findChartPartTarget, withChartTitle, resolveSmartArtThreeViewSpec, isBrowserOpenableMime, formatBytes, getOleDisplayName, getOleBadgeLabel, openUrlInNewTab, getSubstituteFontFamily, hasGlyphEnvelope, buildGlyphEnvelope, getWarpPath, isWedgeCalloutPresetShape, isElementActionable, centeredSvgTextLines, findSmartArtNodeText, setSmartArtNodeStyle, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, updateSmartArtNodeText, advanceChartMarkDrag, advanceChartValueDrag, resolveChartKind, buildChartMarkDragGeometry, beginChartMarkDrag, beginChartValueDrag, groupIntoParagraphs, substituteFieldText, computeInlineEditorRect, MIN_TOUCH_TARGET_PX, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, createSyncGate, clearLocalAwareness, validateRoomId, createDepartureChannel, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, registerCollaborationTeardown, createPresenceProjector, BROADCAST_THROTTLE_MS, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, createWheelStepBuffer, createViewerZoomStore, clampZoomScale, mapEditingWheel, createActiveAnimationGroup, cancelBuildReveal, clearPlaybackTimers, PresentationAnimationController, resolveMediaTimeNodeElementIds, advanceMainSequence, playGroup, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, endAudienceDisplay, createPresentationKeyBuffer, acceptsPresentationInput, resolveAutoAdvanceDelayMs, hasShowSlideAfter, nextShowSlideIndex, previousShowSlideIndex, createPresenterShowGuard, firstShowSlideIndex, attachPresentationVisibilityPause, presentationEntrySlideIndex, buildMorphTransitionPlan, morphOptionToMode, buildMorphAnimationRules, findInSlides, applyFindReplacements, visibleTemplateElements, createCollaborationLivePatcher, publishLiveInlineText, PptxHandler, createPresentationLoadResources, collectMediaElements, resolveMediaElementSource, collectImagePaths, applyImagePathPatches, resolveTableCellImageUrls, resolveTableStyleImageUrls, partitionTemplateElements, seedRecentColors, resolveAuthoredCustomShowId, buildInitialGuides, readOnlyRecommendation, compatibilityWarningToasts, EncryptedFileError, resolveAutosaveIntervalMs, shouldWriteAutosaveSnapshot, saveAutosaveSnapshot, autosaveSnapshotMark, updateMasterViewElement, isTemplateElementId, updateElement, masterViewElements, replaceMasterViewElements, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, canInteractWithElement, prepareExportClone, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, resolveImageResolutionScale, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, describeFontEmbedding, isMobileViewport, resolveAuthoredSlideRange, mayLeaveSlideShow, stopAllPersistentAudio, guidePxToEmu, buildSaveSlides, buildDeckSaveOptions, resolveSlideSizeSelection, saveDeckWithPassword, shouldProbeAutosaveRecovery, probeAutosaveRecovery, acceptAutosaveRecovery, acknowledgeAutosaveRecovery, discardAutosaveRecovery, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, collectReferencedFontFamilies, resolveGoogleWebfontHref, syncGoogleWebfontStylesheet, selectGoogleWebfontFamilies, fetchGoogleWebfontOutlineBytes, mapSlideShowStartKey, mapEditorKey, isEditorTextInputTarget, prepareElementForInsertion, createViewerOptionsStore, observeYDocSlides, LOCAL_SYNC_ORIGIN, readSlidesFromYDoc, shouldRoomSlidesReplaceLoad, reconcileSlidesInYDoc, shouldAutoFollowBroadcaster, detectTouchDevice, detectOrientation, deriveViewportBreakpoints, createTouchGestureRecognizer, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, isKeyboardOpen, scopeLayoutOptionsToSlide, checkModifyPassword, viewerPreferencesFromViewProperties, DEFAULT_VIEWER_PREFERENCES, viewPropertiesPatchFromPreferences, openPptxFile, readBackstageRecentFile, resolveCollaborationShellEditability, resolveCollaborationShellState, MORPH_CROSSFADE_GROUP_STYLE, MORPH_CROSSFADE_HALF_STYLE, getSlideTransitionAnimations, getFragmentedTransitionDescriptor, SLIDE_TRANSITION_KEYFRAMES, isActionHidden, buildInlineTextCommitPatch, resolveInlineEditAutoFitHeight, resolveInlineEditNormAutofitShrink, filterInteractableIds, beginShapeAdjustment, buildElementClipboardPayload, savedPresentationFileName, downloadBlob, exportDeckJson, groupElements, generateElementId, makeCloneId, ungroupElements, alignElements, distributeElements, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, mergeShapes, mapPresentationKey, lastShowSlideIndex, mapPresentationWheel, openPendingPrintWindow, computeColorFilter, filterHiddenSlideIndices, computeSlideIndices, buildPrintDocument, finishPrintWindow, buildPrintHtmlDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, buildSlideTemplateSlide, templateSchemeFromTheme, buildThemeColorMap, reResolveSlideColors, reResolveElementColors, resolveViewportFitOptions, calculateViewportFit, scheduleAutoAdvanceChain, computeEntranceAnimationDelay, createPresentationSessionId, resolveTransitionDurationMs, resolveTransitionSoundAction, runPresentationAction, safeOpenUrl, buildRunProgramNotice, toggleStageElementMedia, resolveOleVerbTarget, downloadDataUrl, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, resetPresenterTimer, presenterElapsed, stepPresenterZoom, togglePresenterTimer, addCommentToList, removeCommentFromList, editCommentInList, toggleCommentResolvedInList, remapTextToSegments, buildInlineListStylePatch, applyActiveInlineListFormatting, applyListStyleUpdate, setPendingSelectionRestore, applyTextStyleUpdate, toggleSelectionBullets, transformInlineListCase, applyCaseTransformToSegments, transformTextCase, resolveExportCaptureDecision, recordProgressPercent, computeGridSpacingPx, resolveShowSlideIndexes, groupSlidesBySection, masterViewPseudoSlide, overlayMasterViewInlineSnapshot, overlayInlineTextSnapshot, cloneElementUpdates, assertElementUpdateTarget, prepareElementUpdateBatch, createWriteBackScheduler, observeExternalCollaborationReadiness, resolveHistoryDepth, hasCopyableFormat, createBackstagePresentation, buildFieldSubstitutionContext, cloneElementForPaste, computeScrollDelta, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, rerouteConnectorsForMovedElements, applyReroutedConnectors, SvgExporter, replyToCommentInList, removeTableElementColumn, insertTableElementColumn, removeTableElementRow, insertTableElementRow, updateCellTextStyleInRawXml, setCellText, updateCellTextInRawXml, splitCell, updateMergeAttrsInRawXml, mergeCells, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, stopCaptureStream, GIF_POST_CAPTURE_MAX_SIDE, encodeGif, rasterResultToPngBlob, rasterizeElementTiles, placeTileOnPage, PDF_SLIDES_PAGE_WIDTH_PT, PDF_SLIDES_PAGE_HEIGHT_PT, canvasToJpegData, createSnapshotTextPositions, isPpactionUrl, parsePpactionUrl, resolvePresentationAction, elementActionToPptxAction, isUrlSafe, buildSmartArtPresetData, classifyMediaType, computeSnapToShape, publishLiveGeometry, getDraggedShapeAdjustments, computeMarqueeHitIds, mergeAdditiveSelection, rasterizeElementTiledToCanvas, borrowExternalCollaborationAwareness, observeExternalCollaborationSession, clampGifDimensions, rasterizeElement, shouldConfirmExternalHyperlink, applyResize, lockResizeAspect, snapBoxToGrid, applyMotionPathPreset, bringForward, sendBackward, bringToFront, sendToBack } from './chunk-VPJOJJ36.mjs';
|
|
3
3
|
import { translationsEn } from './chunk-PC7H3C5W.mjs';
|
|
4
|
-
import
|
|
4
|
+
import React16, { createContext, useMemo, useState, useCallback, useEffect, Suspense, useRef, useLayoutEffect, useContext, useSyncExternalStore, useImperativeHandle } from 'react';
|
|
5
5
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { flushSync } from 'react-dom';
|
|
@@ -13426,407 +13426,98 @@ function ChartPartSelectionProvider({
|
|
|
13426
13426
|
function useChartPartSelection() {
|
|
13427
13427
|
return useContext(ChartPartSelectionContext);
|
|
13428
13428
|
}
|
|
13429
|
-
var
|
|
13430
|
-
|
|
13431
|
-
|
|
13432
|
-
|
|
13433
|
-
|
|
13434
|
-
|
|
13435
|
-
|
|
13436
|
-
"aria-live": "polite",
|
|
13437
|
-
"aria-atomic": "true",
|
|
13438
|
-
className: cn(
|
|
13439
|
-
"h-full w-full flex items-center justify-center text-muted-foreground",
|
|
13440
|
-
className
|
|
13441
|
-
),
|
|
13442
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
13443
|
-
/* @__PURE__ */ jsx(
|
|
13444
|
-
"div",
|
|
13445
|
-
{
|
|
13446
|
-
className: "animate-spin rounded-full h-6 w-6 border-b-2 border-primary",
|
|
13447
|
-
"aria-hidden": "true"
|
|
13448
|
-
}
|
|
13449
|
-
),
|
|
13450
|
-
/* @__PURE__ */ jsx("span", { children: t("pptx.viewer.loading") })
|
|
13451
|
-
] })
|
|
13452
|
-
}
|
|
13453
|
-
);
|
|
13454
|
-
}
|
|
13455
|
-
function FailedToLoad() {
|
|
13456
|
-
return null;
|
|
13457
|
-
}
|
|
13458
|
-
var LazyArea3DChartScene = React20.lazy(
|
|
13459
|
-
async () => {
|
|
13460
|
-
try {
|
|
13461
|
-
return await import('./Area3DChartScene-TDACCSOI.mjs');
|
|
13462
|
-
} catch {
|
|
13463
|
-
return { default: FailedToLoad };
|
|
13464
|
-
}
|
|
13465
|
-
}
|
|
13466
|
-
);
|
|
13467
|
-
var SceneErrorBoundary = class extends React20.Component {
|
|
13468
|
-
constructor(props) {
|
|
13469
|
-
super(props);
|
|
13470
|
-
this.state = { hasError: false };
|
|
13471
|
-
}
|
|
13472
|
-
static getDerivedStateFromError() {
|
|
13473
|
-
return { hasError: true };
|
|
13474
|
-
}
|
|
13475
|
-
render() {
|
|
13476
|
-
return this.state.hasError ? this.props.fallback : this.props.children;
|
|
13477
|
-
}
|
|
13429
|
+
var DEFAULT_RENDERING_3D_FLAGS = {
|
|
13430
|
+
smartArt3D: false,
|
|
13431
|
+
surfaceChart3D: false,
|
|
13432
|
+
barChart3D: false,
|
|
13433
|
+
lineChart3D: false,
|
|
13434
|
+
areaChart3D: false,
|
|
13435
|
+
pieChart3D: false
|
|
13478
13436
|
};
|
|
13479
|
-
|
|
13480
|
-
|
|
13481
|
-
|
|
13482
|
-
|
|
13483
|
-
|
|
13484
|
-
|
|
13485
|
-
const [threeAvailable, setThreeAvailable] = useState(null);
|
|
13486
|
-
useEffect(() => {
|
|
13487
|
-
let cancelled = false;
|
|
13488
|
-
import('./three.module-LGUV2LI6.mjs').then(() => {
|
|
13489
|
-
if (!cancelled) {
|
|
13490
|
-
setThreeAvailable(true);
|
|
13491
|
-
}
|
|
13437
|
+
var Rendering3DFlagsContext = createContext(DEFAULT_RENDERING_3D_FLAGS);
|
|
13438
|
+
defineThreeViewElement();
|
|
13439
|
+
function useThreeViewEvent(ref, type, handler) {
|
|
13440
|
+
useLayoutEffect(() => {
|
|
13441
|
+
const host = ref.current;
|
|
13442
|
+
if (!host) {
|
|
13492
13443
|
return void 0;
|
|
13493
|
-
}).catch(() => {
|
|
13494
|
-
if (!cancelled) {
|
|
13495
|
-
setThreeAvailable(false);
|
|
13496
|
-
}
|
|
13497
|
-
});
|
|
13498
|
-
return () => {
|
|
13499
|
-
cancelled = true;
|
|
13500
|
-
};
|
|
13501
|
-
}, []);
|
|
13502
|
-
const options = useMemo(
|
|
13503
|
-
() => buildAreaChart3DDataForElement(element, { width: element.width, height: element.height }),
|
|
13504
|
-
[element]
|
|
13505
|
-
);
|
|
13506
|
-
const svgFallback = /* @__PURE__ */ jsx(Fragment, { children: renderChartElement(element) });
|
|
13507
|
-
if (!options || threeAvailable === false) {
|
|
13508
|
-
return svgFallback;
|
|
13509
|
-
}
|
|
13510
|
-
if (threeAvailable === null) {
|
|
13511
|
-
return /* @__PURE__ */ jsx(LoadingState, {});
|
|
13512
|
-
}
|
|
13513
|
-
return /* @__PURE__ */ jsx(SceneErrorBoundary, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(
|
|
13514
|
-
LazyArea3DChartScene,
|
|
13515
|
-
{
|
|
13516
|
-
options,
|
|
13517
|
-
interaction,
|
|
13518
|
-
selectedPart,
|
|
13519
|
-
textStyle
|
|
13520
13444
|
}
|
|
13521
|
-
|
|
13445
|
+
const listener = (event) => handler(event.detail);
|
|
13446
|
+
host.addEventListener(type, listener);
|
|
13447
|
+
return () => host.removeEventListener(type, listener);
|
|
13448
|
+
}, [ref, type, handler]);
|
|
13522
13449
|
}
|
|
13523
|
-
|
|
13524
|
-
|
|
13525
|
-
|
|
13526
|
-
|
|
13527
|
-
|
|
13528
|
-
|
|
13529
|
-
|
|
13530
|
-
|
|
13531
|
-
|
|
13532
|
-
|
|
13533
|
-
|
|
13534
|
-
}
|
|
13535
|
-
);
|
|
13536
|
-
var SceneErrorBoundary2 = class extends React20.Component {
|
|
13537
|
-
constructor(props) {
|
|
13538
|
-
super(props);
|
|
13539
|
-
this.state = { hasError: false };
|
|
13540
|
-
}
|
|
13541
|
-
static getDerivedStateFromError() {
|
|
13542
|
-
return { hasError: true };
|
|
13543
|
-
}
|
|
13544
|
-
render() {
|
|
13545
|
-
return this.state.hasError ? this.props.fallback : this.props.children;
|
|
13546
|
-
}
|
|
13547
|
-
};
|
|
13548
|
-
function Bar3DChartRenderer({
|
|
13549
|
-
element,
|
|
13550
|
-
interaction,
|
|
13551
|
-
selectedPart,
|
|
13552
|
-
textStyle
|
|
13450
|
+
function ThreeView({
|
|
13451
|
+
spec,
|
|
13452
|
+
interactive = true,
|
|
13453
|
+
selectedPart = null,
|
|
13454
|
+
textStyle,
|
|
13455
|
+
className,
|
|
13456
|
+
style,
|
|
13457
|
+
onSelect,
|
|
13458
|
+
onDrag,
|
|
13459
|
+
onStateChange,
|
|
13460
|
+
children
|
|
13553
13461
|
}) {
|
|
13554
|
-
const
|
|
13555
|
-
|
|
13556
|
-
|
|
13557
|
-
|
|
13558
|
-
if (!cancelled) {
|
|
13559
|
-
setThreeAvailable(true);
|
|
13560
|
-
}
|
|
13561
|
-
return void 0;
|
|
13562
|
-
}).catch(() => {
|
|
13563
|
-
if (!cancelled) {
|
|
13564
|
-
setThreeAvailable(false);
|
|
13565
|
-
}
|
|
13566
|
-
});
|
|
13567
|
-
return () => {
|
|
13568
|
-
cancelled = true;
|
|
13569
|
-
};
|
|
13570
|
-
}, []);
|
|
13571
|
-
const options = useMemo(
|
|
13572
|
-
() => buildBarChart3DDataForElement(element, { width: element.width, height: element.height }),
|
|
13573
|
-
[element]
|
|
13574
|
-
);
|
|
13575
|
-
const svgFallback = /* @__PURE__ */ jsx(Fragment, { children: renderChartElement(element) });
|
|
13576
|
-
if (!options || threeAvailable === false) {
|
|
13577
|
-
return svgFallback;
|
|
13578
|
-
}
|
|
13579
|
-
if (threeAvailable === null) {
|
|
13580
|
-
return /* @__PURE__ */ jsx(LoadingState, {});
|
|
13581
|
-
}
|
|
13582
|
-
return /* @__PURE__ */ jsx(SceneErrorBoundary2, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(
|
|
13583
|
-
LazyBar3DChartScene,
|
|
13584
|
-
{
|
|
13585
|
-
options,
|
|
13586
|
-
interaction,
|
|
13587
|
-
selectedPart,
|
|
13588
|
-
textStyle
|
|
13462
|
+
const ref = useRef(null);
|
|
13463
|
+
useLayoutEffect(() => {
|
|
13464
|
+
if (ref.current) {
|
|
13465
|
+
ref.current.spec = spec;
|
|
13589
13466
|
}
|
|
13590
|
-
|
|
13467
|
+
}, [spec]);
|
|
13468
|
+
useLayoutEffect(() => {
|
|
13469
|
+
if (ref.current) {
|
|
13470
|
+
ref.current.interactive = interactive;
|
|
13471
|
+
}
|
|
13472
|
+
}, [interactive]);
|
|
13473
|
+
useLayoutEffect(() => {
|
|
13474
|
+
if (ref.current) {
|
|
13475
|
+
ref.current.selectedPart = selectedPart;
|
|
13476
|
+
}
|
|
13477
|
+
}, [selectedPart]);
|
|
13478
|
+
useLayoutEffect(() => {
|
|
13479
|
+
if (ref.current) {
|
|
13480
|
+
ref.current.textStyle = textStyle;
|
|
13481
|
+
}
|
|
13482
|
+
}, [textStyle]);
|
|
13483
|
+
const handleSelectEvent = useCallback(
|
|
13484
|
+
(detail) => onSelect?.(detail.part),
|
|
13485
|
+
[onSelect]
|
|
13486
|
+
);
|
|
13487
|
+
const handleDragEvent = useCallback((detail) => onDrag?.(detail), [onDrag]);
|
|
13488
|
+
const handleStateEvent = useCallback(
|
|
13489
|
+
(detail) => onStateChange?.(detail.state),
|
|
13490
|
+
[onStateChange]
|
|
13491
|
+
);
|
|
13492
|
+
useThreeViewEvent(ref, "pptx-three-select", handleSelectEvent);
|
|
13493
|
+
useThreeViewEvent(ref, "pptx-three-drag", handleDragEvent);
|
|
13494
|
+
useThreeViewEvent(ref, "pptx-three-state", handleStateEvent);
|
|
13495
|
+
return /* @__PURE__ */ jsx("pptx-three-view", { ref, className, style, children });
|
|
13591
13496
|
}
|
|
13592
|
-
|
|
13593
|
-
// src/viewer/components/elements/build-chart3d-part-interaction.ts
|
|
13594
|
-
function buildChart3DPartInteraction({
|
|
13497
|
+
function useChart3DView({
|
|
13595
13498
|
element,
|
|
13499
|
+
flags,
|
|
13596
13500
|
canEdit,
|
|
13597
13501
|
onUpdateElement,
|
|
13598
13502
|
selection,
|
|
13599
13503
|
setSelection,
|
|
13600
13504
|
setDragValue
|
|
13601
13505
|
}) {
|
|
13602
|
-
|
|
13603
|
-
|
|
13604
|
-
|
|
13605
|
-
|
|
13606
|
-
|
|
13607
|
-
|
|
13608
|
-
|
|
13609
|
-
|
|
13610
|
-
}
|
|
13611
|
-
};
|
|
13612
|
-
const onValueDragPreview = (_part, value) => {
|
|
13613
|
-
setDragValue(value);
|
|
13506
|
+
const spec = useMemo(() => resolveChartThreeViewSpec(element, flags), [element, flags]);
|
|
13507
|
+
const bridge = {
|
|
13508
|
+
elementId: element.id,
|
|
13509
|
+
chartData: element.chartData,
|
|
13510
|
+
canSelect: canEdit,
|
|
13511
|
+
selectedElementId: selection?.elementId ?? null,
|
|
13512
|
+
setSelection,
|
|
13513
|
+
setDragValue,
|
|
13514
|
+
commitChartData: onUpdateElement ? (next) => onUpdateElement({ chartData: next }) : void 0
|
|
13614
13515
|
};
|
|
13615
|
-
|
|
13616
|
-
|
|
13617
|
-
|
|
13618
|
-
|
|
13619
|
-
}
|
|
13620
|
-
onUpdateElement({
|
|
13621
|
-
chartData: withChartPointValue(element.chartData, part.seriesIndex, part.pointIndex, value)
|
|
13622
|
-
});
|
|
13516
|
+
return {
|
|
13517
|
+
spec,
|
|
13518
|
+
onSelect: (part) => applyChart3DSelect(bridge, part),
|
|
13519
|
+
onDrag: (detail) => applyChart3DDrag(bridge, detail)
|
|
13623
13520
|
};
|
|
13624
|
-
return { onSelect, onValueDragPreview, onValueDragCommit };
|
|
13625
|
-
}
|
|
13626
|
-
var LineChart3DContext = createContext(false);
|
|
13627
|
-
function FailedToLoad3() {
|
|
13628
|
-
return null;
|
|
13629
|
-
}
|
|
13630
|
-
var LazyLine3DChartScene = React20.lazy(
|
|
13631
|
-
async () => {
|
|
13632
|
-
try {
|
|
13633
|
-
return await import('./Line3DChartScene-2ZQSCHK3.mjs');
|
|
13634
|
-
} catch {
|
|
13635
|
-
return { default: FailedToLoad3 };
|
|
13636
|
-
}
|
|
13637
|
-
}
|
|
13638
|
-
);
|
|
13639
|
-
var SceneErrorBoundary3 = class extends React20.Component {
|
|
13640
|
-
constructor(props) {
|
|
13641
|
-
super(props);
|
|
13642
|
-
this.state = { hasError: false };
|
|
13643
|
-
}
|
|
13644
|
-
static getDerivedStateFromError() {
|
|
13645
|
-
return { hasError: true };
|
|
13646
|
-
}
|
|
13647
|
-
render() {
|
|
13648
|
-
return this.state.hasError ? this.props.fallback : this.props.children;
|
|
13649
|
-
}
|
|
13650
|
-
};
|
|
13651
|
-
function Line3DChartRenderer({
|
|
13652
|
-
element,
|
|
13653
|
-
interaction,
|
|
13654
|
-
selectedPart,
|
|
13655
|
-
textStyle
|
|
13656
|
-
}) {
|
|
13657
|
-
const [threeAvailable, setThreeAvailable] = useState(null);
|
|
13658
|
-
useEffect(() => {
|
|
13659
|
-
let cancelled = false;
|
|
13660
|
-
import('./three.module-LGUV2LI6.mjs').then(() => {
|
|
13661
|
-
if (!cancelled) {
|
|
13662
|
-
setThreeAvailable(true);
|
|
13663
|
-
}
|
|
13664
|
-
return void 0;
|
|
13665
|
-
}).catch(() => {
|
|
13666
|
-
if (!cancelled) {
|
|
13667
|
-
setThreeAvailable(false);
|
|
13668
|
-
}
|
|
13669
|
-
});
|
|
13670
|
-
return () => {
|
|
13671
|
-
cancelled = true;
|
|
13672
|
-
};
|
|
13673
|
-
}, []);
|
|
13674
|
-
const options = useMemo(
|
|
13675
|
-
() => buildLineChart3DDataForElement(element, { width: element.width, height: element.height }),
|
|
13676
|
-
[element]
|
|
13677
|
-
);
|
|
13678
|
-
const svgFallback = /* @__PURE__ */ jsx(Fragment, { children: renderChartElement(element) });
|
|
13679
|
-
if (!options || threeAvailable === false) {
|
|
13680
|
-
return svgFallback;
|
|
13681
|
-
}
|
|
13682
|
-
if (threeAvailable === null) {
|
|
13683
|
-
return /* @__PURE__ */ jsx(LoadingState, {});
|
|
13684
|
-
}
|
|
13685
|
-
return /* @__PURE__ */ jsx(SceneErrorBoundary3, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(
|
|
13686
|
-
LazyLine3DChartScene,
|
|
13687
|
-
{
|
|
13688
|
-
options,
|
|
13689
|
-
interaction,
|
|
13690
|
-
selectedPart,
|
|
13691
|
-
textStyle
|
|
13692
|
-
}
|
|
13693
|
-
) }) });
|
|
13694
|
-
}
|
|
13695
|
-
var PieChart3DContext = createContext(false);
|
|
13696
|
-
function FailedToLoad4() {
|
|
13697
|
-
return null;
|
|
13698
|
-
}
|
|
13699
|
-
var LazyPieChart3DScene = React20.lazy(
|
|
13700
|
-
async () => {
|
|
13701
|
-
try {
|
|
13702
|
-
return await import('./PieChart3DScene-PYHOA7BO.mjs');
|
|
13703
|
-
} catch {
|
|
13704
|
-
return { default: FailedToLoad4 };
|
|
13705
|
-
}
|
|
13706
|
-
}
|
|
13707
|
-
);
|
|
13708
|
-
var SceneErrorBoundary4 = class extends React20.Component {
|
|
13709
|
-
constructor(props) {
|
|
13710
|
-
super(props);
|
|
13711
|
-
this.state = { hasError: false };
|
|
13712
|
-
}
|
|
13713
|
-
static getDerivedStateFromError() {
|
|
13714
|
-
return { hasError: true };
|
|
13715
|
-
}
|
|
13716
|
-
render() {
|
|
13717
|
-
return this.state.hasError ? this.props.fallback : this.props.children;
|
|
13718
|
-
}
|
|
13719
|
-
};
|
|
13720
|
-
function PieChart3DRenderer({
|
|
13721
|
-
element,
|
|
13722
|
-
interaction,
|
|
13723
|
-
selectedPart
|
|
13724
|
-
}) {
|
|
13725
|
-
const [threeAvailable, setThreeAvailable] = useState(null);
|
|
13726
|
-
useEffect(() => {
|
|
13727
|
-
let cancelled = false;
|
|
13728
|
-
import('./three.module-LGUV2LI6.mjs').then(() => {
|
|
13729
|
-
if (!cancelled) {
|
|
13730
|
-
setThreeAvailable(true);
|
|
13731
|
-
}
|
|
13732
|
-
return void 0;
|
|
13733
|
-
}).catch(() => {
|
|
13734
|
-
if (!cancelled) {
|
|
13735
|
-
setThreeAvailable(false);
|
|
13736
|
-
}
|
|
13737
|
-
});
|
|
13738
|
-
return () => {
|
|
13739
|
-
cancelled = true;
|
|
13740
|
-
};
|
|
13741
|
-
}, []);
|
|
13742
|
-
const options = useMemo(
|
|
13743
|
-
() => buildPieChart3DDataForElement(element, { width: element.width, height: element.height }),
|
|
13744
|
-
[element]
|
|
13745
|
-
);
|
|
13746
|
-
const svgFallback = /* @__PURE__ */ jsx(Fragment, { children: renderChartElement(element) });
|
|
13747
|
-
if (!options || threeAvailable === false) {
|
|
13748
|
-
return svgFallback;
|
|
13749
|
-
}
|
|
13750
|
-
if (threeAvailable === null) {
|
|
13751
|
-
return /* @__PURE__ */ jsx(LoadingState, {});
|
|
13752
|
-
}
|
|
13753
|
-
return /* @__PURE__ */ jsx(SceneErrorBoundary4, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(
|
|
13754
|
-
LazyPieChart3DScene,
|
|
13755
|
-
{
|
|
13756
|
-
options,
|
|
13757
|
-
interaction,
|
|
13758
|
-
selectedPart
|
|
13759
|
-
}
|
|
13760
|
-
) }) });
|
|
13761
|
-
}
|
|
13762
|
-
var SurfaceChart3DContext = createContext(false);
|
|
13763
|
-
function FailedToLoad5() {
|
|
13764
|
-
return null;
|
|
13765
|
-
}
|
|
13766
|
-
var LazySurfaceChart3DScene = React20.lazy(
|
|
13767
|
-
async () => {
|
|
13768
|
-
try {
|
|
13769
|
-
return await import('./SurfaceChart3DScene-IFBUOLNB.mjs');
|
|
13770
|
-
} catch {
|
|
13771
|
-
return { default: FailedToLoad5 };
|
|
13772
|
-
}
|
|
13773
|
-
}
|
|
13774
|
-
);
|
|
13775
|
-
var SceneErrorBoundary5 = class extends React20.Component {
|
|
13776
|
-
constructor(props) {
|
|
13777
|
-
super(props);
|
|
13778
|
-
this.state = { hasError: false };
|
|
13779
|
-
}
|
|
13780
|
-
static getDerivedStateFromError() {
|
|
13781
|
-
return { hasError: true };
|
|
13782
|
-
}
|
|
13783
|
-
render() {
|
|
13784
|
-
return this.state.hasError ? this.props.fallback : this.props.children;
|
|
13785
|
-
}
|
|
13786
|
-
};
|
|
13787
|
-
function SurfaceChart3DRenderer({
|
|
13788
|
-
element,
|
|
13789
|
-
interaction,
|
|
13790
|
-
selectedPart,
|
|
13791
|
-
textStyle
|
|
13792
|
-
}) {
|
|
13793
|
-
const [threeAvailable, setThreeAvailable] = useState(null);
|
|
13794
|
-
useEffect(() => {
|
|
13795
|
-
let cancelled = false;
|
|
13796
|
-
import('./three.module-LGUV2LI6.mjs').then(() => {
|
|
13797
|
-
if (!cancelled) {
|
|
13798
|
-
setThreeAvailable(true);
|
|
13799
|
-
}
|
|
13800
|
-
return void 0;
|
|
13801
|
-
}).catch(() => {
|
|
13802
|
-
if (!cancelled) {
|
|
13803
|
-
setThreeAvailable(false);
|
|
13804
|
-
}
|
|
13805
|
-
});
|
|
13806
|
-
return () => {
|
|
13807
|
-
cancelled = true;
|
|
13808
|
-
};
|
|
13809
|
-
}, []);
|
|
13810
|
-
const options = useMemo(
|
|
13811
|
-
() => buildSurfaceChart3DDataForElement(element, { width: element.width, height: element.height }),
|
|
13812
|
-
[element]
|
|
13813
|
-
);
|
|
13814
|
-
const svgFallback = /* @__PURE__ */ jsx(Fragment, { children: renderChartElement(element) });
|
|
13815
|
-
if (!options || threeAvailable === false) {
|
|
13816
|
-
return svgFallback;
|
|
13817
|
-
}
|
|
13818
|
-
if (threeAvailable === null) {
|
|
13819
|
-
return /* @__PURE__ */ jsx(LoadingState, {});
|
|
13820
|
-
}
|
|
13821
|
-
return /* @__PURE__ */ jsx(SceneErrorBoundary5, { fallback: svgFallback, children: /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(LoadingState, {}), children: /* @__PURE__ */ jsx(
|
|
13822
|
-
LazySurfaceChart3DScene,
|
|
13823
|
-
{
|
|
13824
|
-
options,
|
|
13825
|
-
interaction,
|
|
13826
|
-
selectedPart,
|
|
13827
|
-
textStyle
|
|
13828
|
-
}
|
|
13829
|
-
) }) });
|
|
13830
13521
|
}
|
|
13831
13522
|
function useChartMarkInteraction({
|
|
13832
13523
|
element,
|
|
@@ -13979,16 +13670,7 @@ function ChartElementView({
|
|
|
13979
13670
|
const [titleDraft, setTitleDraft] = useState(null);
|
|
13980
13671
|
const selectedPart = selection?.elementId === element.id ? selection.part : null;
|
|
13981
13672
|
const canEdit = editable && Boolean(onUpdateElement);
|
|
13982
|
-
const
|
|
13983
|
-
const isSurfaceKind = resolveChartKind(element.chartData?.chartType ?? "bar") === "surface";
|
|
13984
|
-
const use3DBar = useContext(BarChart3DContext);
|
|
13985
|
-
const isBar3DKind = element.chartData?.chartType === "bar3D";
|
|
13986
|
-
const use3DLine = useContext(LineChart3DContext);
|
|
13987
|
-
const isLine3DKind = element.chartData?.chartType === "line3D";
|
|
13988
|
-
const use3DArea = useContext(AreaChart3DContext);
|
|
13989
|
-
const isArea3DKind = element.chartData?.chartType === "area3D";
|
|
13990
|
-
const use3DPie = useContext(PieChart3DContext);
|
|
13991
|
-
const isPie3DKind = element.chartData?.chartType === "pie3D";
|
|
13673
|
+
const rendering3DFlags = useContext(Rendering3DFlagsContext);
|
|
13992
13674
|
const barFacePictureSampleVersion = useSyncExternalStore(
|
|
13993
13675
|
subscribeBarFacePicturePixelSamples,
|
|
13994
13676
|
getBarFacePicturePixelSampleVersion,
|
|
@@ -14024,14 +13706,6 @@ function ChartElementView({
|
|
|
14024
13706
|
wrapperRef,
|
|
14025
13707
|
setSelection
|
|
14026
13708
|
});
|
|
14027
|
-
const chart3DInteraction = buildChart3DPartInteraction({
|
|
14028
|
-
element,
|
|
14029
|
-
canEdit,
|
|
14030
|
-
onUpdateElement,
|
|
14031
|
-
selection,
|
|
14032
|
-
setSelection,
|
|
14033
|
-
setDragValue
|
|
14034
|
-
});
|
|
14035
13709
|
const handleDoubleClick = (e) => {
|
|
14036
13710
|
if (!canEdit || !canDrillDown(element)) {
|
|
14037
13711
|
return;
|
|
@@ -14060,6 +13734,15 @@ function ChartElementView({
|
|
|
14060
13734
|
const baseChartData = previewData ?? element.chartData;
|
|
14061
13735
|
const revealedChartData = baseChartData ? resolveRevealedChartData(baseChartData, animationState) : baseChartData;
|
|
14062
13736
|
const renderedElement = revealedChartData === element.chartData ? element : { ...element, chartData: revealedChartData };
|
|
13737
|
+
const chart3D = useChart3DView({
|
|
13738
|
+
element: renderedElement,
|
|
13739
|
+
flags: rendering3DFlags,
|
|
13740
|
+
canEdit,
|
|
13741
|
+
onUpdateElement,
|
|
13742
|
+
selection,
|
|
13743
|
+
setSelection,
|
|
13744
|
+
setDragValue
|
|
13745
|
+
});
|
|
14063
13746
|
return /* @__PURE__ */ jsxs(
|
|
14064
13747
|
"div",
|
|
14065
13748
|
{
|
|
@@ -14070,44 +13753,16 @@ function ChartElementView({
|
|
|
14070
13753
|
onPointerUp: handlePointerUp,
|
|
14071
13754
|
onDoubleClick: handleDoubleClick,
|
|
14072
13755
|
children: [
|
|
14073
|
-
|
|
14074
|
-
|
|
13756
|
+
chart3D.spec ? /* @__PURE__ */ jsx(
|
|
13757
|
+
ThreeView,
|
|
14075
13758
|
{
|
|
14076
|
-
|
|
14077
|
-
|
|
13759
|
+
spec: chart3D.spec,
|
|
13760
|
+
interactive: canEdit,
|
|
14078
13761
|
selectedPart,
|
|
14079
|
-
textStyle: animationState?.textStyle
|
|
14080
|
-
|
|
14081
|
-
|
|
14082
|
-
|
|
14083
|
-
{
|
|
14084
|
-
element: renderedElement,
|
|
14085
|
-
interaction: chart3DInteraction,
|
|
14086
|
-
selectedPart,
|
|
14087
|
-
textStyle: animationState?.textStyle
|
|
14088
|
-
}
|
|
14089
|
-
) : use3DLine && isLine3DKind ? /* @__PURE__ */ jsx(
|
|
14090
|
-
Line3DChartRenderer,
|
|
14091
|
-
{
|
|
14092
|
-
element: renderedElement,
|
|
14093
|
-
interaction: chart3DInteraction,
|
|
14094
|
-
selectedPart,
|
|
14095
|
-
textStyle: animationState?.textStyle
|
|
14096
|
-
}
|
|
14097
|
-
) : use3DArea && isArea3DKind ? /* @__PURE__ */ jsx(
|
|
14098
|
-
Area3DChartRenderer,
|
|
14099
|
-
{
|
|
14100
|
-
element: renderedElement,
|
|
14101
|
-
interaction: chart3DInteraction,
|
|
14102
|
-
selectedPart,
|
|
14103
|
-
textStyle: animationState?.textStyle
|
|
14104
|
-
}
|
|
14105
|
-
) : use3DPie && isPie3DKind ? /* @__PURE__ */ jsx(
|
|
14106
|
-
PieChart3DRenderer,
|
|
14107
|
-
{
|
|
14108
|
-
element: renderedElement,
|
|
14109
|
-
interaction: chart3DInteraction,
|
|
14110
|
-
selectedPart
|
|
13762
|
+
textStyle: animationState?.textStyle,
|
|
13763
|
+
onSelect: chart3D.onSelect,
|
|
13764
|
+
onDrag: chart3D.onDrag,
|
|
13765
|
+
children: renderChartElement(renderedElement)
|
|
14111
13766
|
}
|
|
14112
13767
|
) : renderChartElement(renderedElement),
|
|
14113
13768
|
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) }),
|
|
@@ -14541,7 +14196,7 @@ function ResizeHandles({
|
|
|
14541
14196
|
))
|
|
14542
14197
|
] });
|
|
14543
14198
|
}
|
|
14544
|
-
var ConnectorElementRenderer =
|
|
14199
|
+
var ConnectorElementRenderer = React16.memo(
|
|
14545
14200
|
// oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
|
|
14546
14201
|
function ConnectorElementRendererInner({
|
|
14547
14202
|
el,
|
|
@@ -14928,7 +14583,7 @@ function shapeParams(element) {
|
|
|
14928
14583
|
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
14929
14584
|
return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
|
|
14930
14585
|
}
|
|
14931
|
-
var Extrusion3DOverlay =
|
|
14586
|
+
var Extrusion3DOverlay = React16.memo(
|
|
14932
14587
|
// oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
|
|
14933
14588
|
function Extrusion3DOverlayInner({ data }) {
|
|
14934
14589
|
if (!data.hasExtrusion || data.panels.length === 0) {
|
|
@@ -15162,7 +14817,7 @@ function ShapeEffectOverlay({
|
|
|
15162
14817
|
) : null
|
|
15163
14818
|
] });
|
|
15164
14819
|
}
|
|
15165
|
-
var ElementRenderer =
|
|
14820
|
+
var ElementRenderer = React16.memo(
|
|
15166
14821
|
// oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
|
|
15167
14822
|
function ElementRendererInner({
|
|
15168
14823
|
element: el,
|
|
@@ -16214,15 +15869,15 @@ function InlineTextEditor({
|
|
|
16214
15869
|
list.seed?.paragraphs[0].token ?? "plain"
|
|
16215
15870
|
);
|
|
16216
15871
|
}
|
|
16217
|
-
function
|
|
15872
|
+
function FailedToLoad() {
|
|
16218
15873
|
return null;
|
|
16219
15874
|
}
|
|
16220
|
-
var LazyModel3DScene =
|
|
15875
|
+
var LazyModel3DScene = React16.lazy(
|
|
16221
15876
|
async () => {
|
|
16222
15877
|
try {
|
|
16223
|
-
return await import('./Model3DScene-
|
|
15878
|
+
return await import('./Model3DScene-DCTVSK2F.mjs');
|
|
16224
15879
|
} catch {
|
|
16225
|
-
return { default:
|
|
15880
|
+
return { default: FailedToLoad };
|
|
16226
15881
|
}
|
|
16227
15882
|
}
|
|
16228
15883
|
);
|
|
@@ -16282,7 +15937,7 @@ function PosterFallback({
|
|
|
16282
15937
|
}
|
|
16283
15938
|
);
|
|
16284
15939
|
}
|
|
16285
|
-
var Model3DErrorBoundary = class extends
|
|
15940
|
+
var Model3DErrorBoundary = class extends React16.Component {
|
|
16286
15941
|
constructor(props) {
|
|
16287
15942
|
super(props);
|
|
16288
15943
|
this.state = { hasError: false };
|
|
@@ -16466,21 +16121,6 @@ function OleRenderer({ element: el }) {
|
|
|
16466
16121
|
}
|
|
16467
16122
|
);
|
|
16468
16123
|
}
|
|
16469
|
-
var SmartArt3DContext = createContext(false);
|
|
16470
|
-
|
|
16471
|
-
// src/viewer/utils/smartart-helpers.tsx
|
|
16472
|
-
function resolvePalette2(el) {
|
|
16473
|
-
return el.type === "smartArt" ? resolvePalette(el.smartArtData) : DEFAULT_PALETTE2;
|
|
16474
|
-
}
|
|
16475
|
-
function resolveStyle(el) {
|
|
16476
|
-
if (el.type !== "smartArt" || !el.smartArtData) {
|
|
16477
|
-
return "flat";
|
|
16478
|
-
}
|
|
16479
|
-
return el.smartArtData.style ?? "flat";
|
|
16480
|
-
}
|
|
16481
|
-
function resolveSmartArtDataPalette(data) {
|
|
16482
|
-
return resolvePalette(data);
|
|
16483
|
-
}
|
|
16484
16124
|
var LINE_HEIGHT_RATIO = 1.2;
|
|
16485
16125
|
var DEFAULT_FONT_SIZE = 12;
|
|
16486
16126
|
function SmartArtInlineNodeEditor({
|
|
@@ -16491,10 +16131,10 @@ function SmartArtInlineNodeEditor({
|
|
|
16491
16131
|
onCancel
|
|
16492
16132
|
}) {
|
|
16493
16133
|
const { t } = useTranslation();
|
|
16494
|
-
const ref =
|
|
16495
|
-
const [value, setValue] =
|
|
16496
|
-
const settled =
|
|
16497
|
-
|
|
16134
|
+
const ref = React16.useRef(null);
|
|
16135
|
+
const [value, setValue] = React16.useState(initialText);
|
|
16136
|
+
const settled = React16.useRef(false);
|
|
16137
|
+
React16.useEffect(() => {
|
|
16498
16138
|
const el = ref.current;
|
|
16499
16139
|
if (el) {
|
|
16500
16140
|
el.focus();
|
|
@@ -16587,16 +16227,16 @@ function findNodeIdFromEvent(target) {
|
|
|
16587
16227
|
return null;
|
|
16588
16228
|
}
|
|
16589
16229
|
function useSmartArtHoverState(containerRef, measureNodeRect = measureScreenNodeRect) {
|
|
16590
|
-
const [hoveredNodeId, setHoveredNodeId] =
|
|
16591
|
-
const [hoveredNodeRect, setHoveredNodeRect] =
|
|
16592
|
-
const hideTimeoutRef =
|
|
16593
|
-
const cancelPendingHide =
|
|
16230
|
+
const [hoveredNodeId, setHoveredNodeId] = React16.useState(null);
|
|
16231
|
+
const [hoveredNodeRect, setHoveredNodeRect] = React16.useState(null);
|
|
16232
|
+
const hideTimeoutRef = React16.useRef(null);
|
|
16233
|
+
const cancelPendingHide = React16.useCallback(() => {
|
|
16594
16234
|
if (hideTimeoutRef.current !== null) {
|
|
16595
16235
|
window.clearTimeout(hideTimeoutRef.current);
|
|
16596
16236
|
hideTimeoutRef.current = null;
|
|
16597
16237
|
}
|
|
16598
16238
|
}, []);
|
|
16599
|
-
const handleMouseMove =
|
|
16239
|
+
const handleMouseMove = React16.useCallback(
|
|
16600
16240
|
(e, ignoreRef) => {
|
|
16601
16241
|
const nodeEl = findNodeIdFromEvent(e.target);
|
|
16602
16242
|
const container = containerRef.current;
|
|
@@ -16619,12 +16259,12 @@ function useSmartArtHoverState(containerRef, measureNodeRect = measureScreenNode
|
|
|
16619
16259
|
},
|
|
16620
16260
|
[containerRef, cancelPendingHide, measureNodeRect]
|
|
16621
16261
|
);
|
|
16622
|
-
const clearHover =
|
|
16262
|
+
const clearHover = React16.useCallback(() => {
|
|
16623
16263
|
cancelPendingHide();
|
|
16624
16264
|
setHoveredNodeId(null);
|
|
16625
16265
|
setHoveredNodeRect(null);
|
|
16626
16266
|
}, [cancelPendingHide]);
|
|
16627
|
-
|
|
16267
|
+
React16.useEffect(() => cancelPendingHide, [cancelPendingHide]);
|
|
16628
16268
|
return { hoveredNodeId, hoveredNodeRect, handleMouseMove, clearHover };
|
|
16629
16269
|
}
|
|
16630
16270
|
var EDITOR_PADDING = 4;
|
|
@@ -16640,14 +16280,14 @@ function SmartArtEditableLayer({
|
|
|
16640
16280
|
measureNodeRect = measureScreenNodeRect,
|
|
16641
16281
|
children
|
|
16642
16282
|
}) {
|
|
16643
|
-
const containerRef =
|
|
16644
|
-
const styleBarRef =
|
|
16645
|
-
const [edit, setEdit] =
|
|
16283
|
+
const containerRef = React16.useRef(null);
|
|
16284
|
+
const styleBarRef = React16.useRef(null);
|
|
16285
|
+
const [edit, setEdit] = React16.useState(null);
|
|
16646
16286
|
const { hoveredNodeId, hoveredNodeRect, handleMouseMove, clearHover } = useSmartArtHoverState(
|
|
16647
16287
|
containerRef,
|
|
16648
16288
|
measureNodeRect
|
|
16649
16289
|
);
|
|
16650
|
-
const openEditor =
|
|
16290
|
+
const openEditor = React16.useCallback(
|
|
16651
16291
|
(target) => {
|
|
16652
16292
|
const nodeEl = findNodeIdFromEvent(target);
|
|
16653
16293
|
const container = containerRef.current;
|
|
@@ -16752,6 +16392,20 @@ function SmartArtEditableLayer({
|
|
|
16752
16392
|
}
|
|
16753
16393
|
);
|
|
16754
16394
|
}
|
|
16395
|
+
|
|
16396
|
+
// src/viewer/utils/smartart-helpers.tsx
|
|
16397
|
+
function resolvePalette2(el) {
|
|
16398
|
+
return el.type === "smartArt" ? resolvePalette(el.smartArtData) : DEFAULT_PALETTE2;
|
|
16399
|
+
}
|
|
16400
|
+
function resolveStyle(el) {
|
|
16401
|
+
if (el.type !== "smartArt" || !el.smartArtData) {
|
|
16402
|
+
return "flat";
|
|
16403
|
+
}
|
|
16404
|
+
return el.smartArtData.style ?? "flat";
|
|
16405
|
+
}
|
|
16406
|
+
function resolveSmartArtDataPalette(data) {
|
|
16407
|
+
return resolvePalette(data);
|
|
16408
|
+
}
|
|
16755
16409
|
var LABEL_WIDTH_FRACTION = 0.82;
|
|
16756
16410
|
function smartArtNodeGroupProps(nodeId, shadow, label) {
|
|
16757
16411
|
const props = {
|
|
@@ -17262,97 +16916,32 @@ function sameDiagramReveal(prev, next) {
|
|
|
17262
16916
|
}
|
|
17263
16917
|
return true;
|
|
17264
16918
|
}
|
|
17265
|
-
var SmartArtRenderer =
|
|
17266
|
-
function
|
|
17267
|
-
return null;
|
|
17268
|
-
}
|
|
17269
|
-
var LazySmartArt3DScene = React20.lazy(
|
|
17270
|
-
async () => {
|
|
17271
|
-
try {
|
|
17272
|
-
return await import('./SmartArt3DScene-D4VNNPHS.mjs');
|
|
17273
|
-
} catch {
|
|
17274
|
-
return { default: FailedToLoad7 };
|
|
17275
|
-
}
|
|
17276
|
-
}
|
|
17277
|
-
);
|
|
17278
|
-
var SceneErrorBoundary6 = class extends React20.Component {
|
|
17279
|
-
constructor(props) {
|
|
17280
|
-
super(props);
|
|
17281
|
-
this.state = { hasError: false };
|
|
17282
|
-
}
|
|
17283
|
-
static getDerivedStateFromError() {
|
|
17284
|
-
return { hasError: true };
|
|
17285
|
-
}
|
|
17286
|
-
render() {
|
|
17287
|
-
return this.state.hasError ? this.props.fallback : this.props.children;
|
|
17288
|
-
}
|
|
17289
|
-
};
|
|
17290
|
-
function SmartArt3DRenderer({
|
|
16919
|
+
var SmartArtRenderer = React16.memo(SmartArtRendererImpl, arePropsEqual);
|
|
16920
|
+
function SmartArt3DView({
|
|
17291
16921
|
element,
|
|
17292
16922
|
className,
|
|
17293
|
-
|
|
16923
|
+
smartArt3D,
|
|
17294
16924
|
canEdit,
|
|
17295
16925
|
onUpdateElement,
|
|
17296
16926
|
animationState
|
|
17297
16927
|
}) {
|
|
17298
|
-
const
|
|
17299
|
-
|
|
17300
|
-
|
|
17301
|
-
|
|
17302
|
-
|
|
17303
|
-
|
|
17304
|
-
|
|
17305
|
-
|
|
17306
|
-
|
|
17307
|
-
|
|
17308
|
-
|
|
16928
|
+
const spec = useMemo(
|
|
16929
|
+
() => resolveSmartArtThreeViewSpec(element, smartArt3D),
|
|
16930
|
+
[element, smartArt3D]
|
|
16931
|
+
);
|
|
16932
|
+
if (!spec) {
|
|
16933
|
+
return /* @__PURE__ */ jsx(
|
|
16934
|
+
SmartArtRenderer,
|
|
16935
|
+
{
|
|
16936
|
+
element,
|
|
16937
|
+
className,
|
|
16938
|
+
canEdit,
|
|
16939
|
+
onUpdateElement,
|
|
16940
|
+
animationState
|
|
17309
16941
|
}
|
|
17310
|
-
});
|
|
17311
|
-
return () => {
|
|
17312
|
-
cancelled = true;
|
|
17313
|
-
};
|
|
17314
|
-
}, []);
|
|
17315
|
-
const model = useMemo(() => {
|
|
17316
|
-
if (element.type !== "smartArt" || !element.smartArtData) {
|
|
17317
|
-
return null;
|
|
17318
|
-
}
|
|
17319
|
-
const { nodes, chrome } = element.smartArtData;
|
|
17320
|
-
if (nodes.length === 0) {
|
|
17321
|
-
return null;
|
|
17322
|
-
}
|
|
17323
|
-
const palette = resolvePalette2(element);
|
|
17324
|
-
const style = resolveStyle(element);
|
|
17325
|
-
const layoutResult = resolveSmartArt3DLayout(
|
|
17326
|
-
element.smartArtData,
|
|
17327
|
-
nodes,
|
|
17328
|
-
{ width: element.width, height: element.height },
|
|
17329
|
-
palette,
|
|
17330
|
-
style,
|
|
17331
|
-
element.id
|
|
17332
16942
|
);
|
|
17333
|
-
return buildSmartArt3DModel(layoutResult, {
|
|
17334
|
-
background: chrome?.backgroundColor,
|
|
17335
|
-
spatial: true,
|
|
17336
|
-
coherent3DOffNodeIds: collectCoherent3DOffNodeIds(nodes)
|
|
17337
|
-
});
|
|
17338
|
-
}, [element]);
|
|
17339
|
-
const svgFallback = /* @__PURE__ */ jsx(SmartArtRenderer, { element, className });
|
|
17340
|
-
if (!model || model.meshes.length === 0 || threeAvailable === false) {
|
|
17341
|
-
return svgFallback;
|
|
17342
|
-
}
|
|
17343
|
-
if (threeAvailable === null) {
|
|
17344
|
-
return svgFallback;
|
|
17345
16943
|
}
|
|
17346
|
-
const sceneNode = /* @__PURE__ */ jsx(
|
|
17347
|
-
LazySmartArt3DScene,
|
|
17348
|
-
{
|
|
17349
|
-
model,
|
|
17350
|
-
width: element.width,
|
|
17351
|
-
height: element.height,
|
|
17352
|
-
interactive,
|
|
17353
|
-
textStyle: animationState?.textStyle
|
|
17354
|
-
}
|
|
17355
|
-
) }) });
|
|
16944
|
+
const sceneNode = /* @__PURE__ */ jsx(ThreeView, { spec, interactive: Boolean(canEdit), textStyle: animationState?.textStyle, children: /* @__PURE__ */ jsx(SmartArtRenderer, { element, className }) });
|
|
17356
16945
|
const editEnabled = canEdit && Boolean(onUpdateElement);
|
|
17357
16946
|
const smartArtData = element.type === "smartArt" ? element.smartArtData : void 0;
|
|
17358
16947
|
if (!editEnabled || !smartArtData) {
|
|
@@ -17386,24 +16975,13 @@ function SmartArtElement({
|
|
|
17386
16975
|
onUpdateElement,
|
|
17387
16976
|
animationState
|
|
17388
16977
|
}) {
|
|
17389
|
-
const
|
|
17390
|
-
if (use3D) {
|
|
17391
|
-
return /* @__PURE__ */ jsx(
|
|
17392
|
-
SmartArt3DRenderer,
|
|
17393
|
-
{
|
|
17394
|
-
element,
|
|
17395
|
-
className,
|
|
17396
|
-
canEdit,
|
|
17397
|
-
onUpdateElement,
|
|
17398
|
-
animationState
|
|
17399
|
-
}
|
|
17400
|
-
);
|
|
17401
|
-
}
|
|
16978
|
+
const { smartArt3D } = useContext(Rendering3DFlagsContext);
|
|
17402
16979
|
return /* @__PURE__ */ jsx(
|
|
17403
|
-
|
|
16980
|
+
SmartArt3DView,
|
|
17404
16981
|
{
|
|
17405
16982
|
element,
|
|
17406
16983
|
className,
|
|
16984
|
+
smartArt3D,
|
|
17407
16985
|
canEdit,
|
|
17408
16986
|
onUpdateElement,
|
|
17409
16987
|
animationState
|
|
@@ -17478,7 +17056,7 @@ function EnvelopeGlyph({
|
|
|
17478
17056
|
}
|
|
17479
17057
|
return /* @__PURE__ */ jsx("g", { "data-glyph-slices": glyph.slices.length, children: glyph.slices.map((slice, si) => {
|
|
17480
17058
|
const clipId = `${glyphKey}-s${si}`;
|
|
17481
|
-
return /* @__PURE__ */ jsxs(
|
|
17059
|
+
return /* @__PURE__ */ jsxs(React16.Fragment, { children: [
|
|
17482
17060
|
/* @__PURE__ */ jsx("clipPath", { id: clipId, clipPathUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsx(
|
|
17483
17061
|
"rect",
|
|
17484
17062
|
{
|
|
@@ -18406,7 +17984,7 @@ function StaticElementRendererImpl({
|
|
|
18406
17984
|
}
|
|
18407
17985
|
);
|
|
18408
17986
|
}
|
|
18409
|
-
var StaticElementRenderer =
|
|
17987
|
+
var StaticElementRenderer = React16.memo(StaticElementRendererImpl);
|
|
18410
17988
|
StaticElementRenderer.displayName = "StaticElementRenderer";
|
|
18411
17989
|
function SlideLayer({
|
|
18412
17990
|
slide,
|
|
@@ -18879,4 +18457,4 @@ function useResizablePanels() {
|
|
|
18879
18457
|
};
|
|
18880
18458
|
}
|
|
18881
18459
|
|
|
18882
|
-
export { ACTION_VERB_MAP,
|
|
18460
|
+
export { ACTION_VERB_MAP, ChartPartSelectionProvider, CollaborationCursorOverlay, CollaborationProvider, ElementRenderer, FragmentedTransitionLayer, InlineCollaborationContext, MIN_TOUCH_TARGET, MorphTransitionOverlay, PresentationTransitionOverlay, RemoteSelectionOverlay, RemoteUserCursors, Rendering3DFlagsContext, ResizeHandles, SlideBackgroundImageLayer, SlideLayer, SmartArtRenderer, StaticElementRenderer, ViewerOptionsContext, computeToolbarVisibility, detectTargetType, isAudienceTab, parseAudienceNonce, parseEmailUrl, parseSlideFromUrl, playAnimationSound, renderStrokeView, renderToCanvas, resolveSmartArtDataPalette, safePrompt, scopeLayoutOptionsToActiveSlide, useAnimationPlayback, useAnnotationHandlers, useAudienceMode, useAutosave, useBroadcastFollower, useCanvasInteractions, useChartPartSelection, useClipboardHandlers, useCollaboration, useCollaborationDocumentSync, useCollaborativeHistory, useCollaborativeState, useComments, useCompatibilityToastsState, useContentLifecycle, useDerivedElementState, useDerivedSlideState, useDialogCustomShows, useEditorHistory, useEditorOperations, useElementManipulation, useElementOperations, useExportHandlers, useExportSaveAs, useFindReplace, useFollowMode, useFontInjection, useGroupAlignLayerHandlers, useIOHandlers, useInsertElements, useIsMobile, useKeyboardInsets, useKeyboardShortcutWiring, useKeyboardShortcuts, useLayoutSwitching, useLoadContent, useMergeShapesHandler, useModalDismissDrag, usePointerHandlers, usePresenceTracking, usePresentationAnnotations, usePresentationKeyboard, usePresentationMode, usePresentationSetup, usePresenterWindow, usePrintHandlers, usePropertyHandlers, useReadOnlyRecommendationState, useRecoveryDetection, useReducedMotion, useRehearsalTimings, useResizablePanels, useSectionOperations, useSerialize, useSheetDismissDrag, useSlideManagement, useSlideNavigation, useSwipeNavigation, useTableOperations, useThemeHandlers, useThemeSwitching, useToolbarVisibility, useTouchGestures, useViewPreferencesSync, useViewerBuildingBlocks, useViewerCoreState, useViewerDialogs, useViewerIntegration, useViewerOptions, useViewerOptionsContext, useViewerState, useViewerUIState, useVirtualizedSlides, useYjsDocumentSync, useYjsProvider, useZoomNavigation, useZoomViewport };
|