pptx-react-viewer 4.2.0 → 4.3.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 +32 -0
- package/dist/{AiChatPanel-VVTLQXQ5.js → AiChatPanel-7UQA25FA.js} +28 -28
- package/dist/AiChatPanel-7UQA25FA.js.br +0 -0
- package/dist/AiChatPanel-7UQA25FA.js.gz +0 -0
- package/dist/{AiChatPanel-SEIRQ3XP.mjs → AiChatPanel-UCEK3ZTD.mjs} +4 -4
- package/dist/AiChatPanel-UCEK3ZTD.mjs.br +0 -0
- package/dist/AiChatPanel-UCEK3ZTD.mjs.gz +0 -0
- package/dist/{Model3DScene-DCTVSK2F.mjs → Model3DScene-AI2JTBQM.mjs} +1 -1
- package/dist/Model3DScene-AI2JTBQM.mjs.br +0 -0
- package/dist/Model3DScene-AI2JTBQM.mjs.gz +0 -0
- package/dist/{Model3DScene-SCWQXMEA.js → Model3DScene-X3DS3ELB.js} +2 -2
- package/dist/Model3DScene-X3DS3ELB.js.br +0 -0
- package/dist/Model3DScene-X3DS3ELB.js.gz +0 -0
- package/dist/{chunk-VPJOJJ36.mjs → chunk-3UWJWJCR.mjs} +16274 -7901
- package/dist/chunk-3UWJWJCR.mjs.br +0 -0
- package/dist/chunk-3UWJWJCR.mjs.gz +0 -0
- package/dist/{chunk-KTSDPBQZ.js → chunk-42XEZVUQ.js} +1076 -1069
- package/dist/chunk-42XEZVUQ.js.br +0 -0
- package/dist/chunk-42XEZVUQ.js.gz +0 -0
- package/dist/{chunk-5MRNT4V6.js → chunk-E7O4HTS5.js} +195 -187
- package/dist/chunk-E7O4HTS5.js.br +0 -0
- package/dist/chunk-E7O4HTS5.js.gz +0 -0
- package/dist/{chunk-3WYNGYB6.js → chunk-KAO5USPE.js} +5 -5
- package/dist/chunk-KAO5USPE.js.br +0 -0
- package/dist/chunk-KAO5USPE.js.gz +0 -0
- package/dist/{chunk-PC7H3C5W.mjs → chunk-OBQ453H6.mjs} +2 -2
- package/dist/chunk-OBQ453H6.mjs.br +0 -0
- package/dist/chunk-OBQ453H6.mjs.gz +0 -0
- package/dist/{chunk-B5YZABYX.mjs → chunk-PLDG3CXW.mjs} +18 -10
- package/dist/chunk-PLDG3CXW.mjs.br +0 -0
- package/dist/chunk-PLDG3CXW.mjs.gz +0 -0
- package/dist/{chunk-ZYIJODUR.mjs → chunk-RXYLPESV.mjs} +17 -10
- package/dist/chunk-RXYLPESV.mjs.br +0 -0
- package/dist/chunk-RXYLPESV.mjs.gz +0 -0
- package/dist/{chunk-4GTDG2FH.mjs → chunk-SKTZSG7Q.mjs} +362 -157
- package/dist/chunk-SKTZSG7Q.mjs.br +0 -0
- package/dist/chunk-SKTZSG7Q.mjs.gz +0 -0
- package/dist/{chunk-S65QSO6T.js → chunk-UTI4CLYJ.js} +16291 -7909
- package/dist/chunk-UTI4CLYJ.js.br +0 -0
- package/dist/chunk-UTI4CLYJ.js.gz +0 -0
- package/dist/{chunk-NXGUR2DO.js → chunk-W5KLLGVH.js} +2 -2
- package/dist/chunk-W5KLLGVH.js.br +0 -0
- package/dist/chunk-W5KLLGVH.js.gz +0 -0
- package/dist/{chunk-P2SBIMYF.js → chunk-Y7LI2JIR.js} +1865 -1660
- package/dist/chunk-Y7LI2JIR.js.br +0 -0
- package/dist/chunk-Y7LI2JIR.js.gz +0 -0
- package/dist/{chunk-L4XBWL7J.mjs → chunk-YQJOCGOK.mjs} +1 -1
- package/dist/chunk-YQJOCGOK.mjs.br +0 -0
- package/dist/{chunk-L4XBWL7J.mjs.gz → chunk-YQJOCGOK.mjs.gz} +0 -0
- package/dist/i18n/de.cjs +2 -2
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +2 -2
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +2 -2
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +2 -2
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +2 -2
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +2 -2
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +2 -2
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +2 -2
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +245 -4
- package/dist/index.js +49 -49
- 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 +293 -4
- package/dist/internals.js +105 -105
- 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/viewer/index.d.ts +230 -2
- 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 +1 -1
- package/dist/AiChatPanel-SEIRQ3XP.mjs.br +0 -0
- package/dist/AiChatPanel-SEIRQ3XP.mjs.gz +0 -0
- package/dist/AiChatPanel-VVTLQXQ5.js.br +0 -0
- package/dist/AiChatPanel-VVTLQXQ5.js.gz +0 -0
- package/dist/Model3DScene-DCTVSK2F.mjs.br +0 -0
- package/dist/Model3DScene-DCTVSK2F.mjs.gz +0 -0
- package/dist/Model3DScene-SCWQXMEA.js.br +0 -0
- package/dist/Model3DScene-SCWQXMEA.js.gz +0 -0
- package/dist/chunk-3WYNGYB6.js.br +0 -0
- package/dist/chunk-3WYNGYB6.js.gz +0 -0
- package/dist/chunk-4GTDG2FH.mjs.br +0 -0
- package/dist/chunk-4GTDG2FH.mjs.gz +0 -0
- package/dist/chunk-5MRNT4V6.js.br +0 -0
- package/dist/chunk-5MRNT4V6.js.gz +0 -0
- package/dist/chunk-B5YZABYX.mjs.br +0 -0
- package/dist/chunk-B5YZABYX.mjs.gz +0 -0
- package/dist/chunk-KTSDPBQZ.js.br +0 -0
- package/dist/chunk-KTSDPBQZ.js.gz +0 -0
- package/dist/chunk-L4XBWL7J.mjs.br +0 -0
- package/dist/chunk-NXGUR2DO.js.br +0 -0
- package/dist/chunk-NXGUR2DO.js.gz +0 -0
- package/dist/chunk-P2SBIMYF.js.br +0 -0
- package/dist/chunk-P2SBIMYF.js.gz +0 -0
- package/dist/chunk-PC7H3C5W.mjs.br +0 -0
- package/dist/chunk-PC7H3C5W.mjs.gz +0 -0
- package/dist/chunk-S65QSO6T.js.br +0 -0
- package/dist/chunk-S65QSO6T.js.gz +0 -0
- package/dist/chunk-VPJOJJ36.mjs.br +0 -0
- package/dist/chunk-VPJOJJ36.mjs.gz +0 -0
- package/dist/chunk-ZYIJODUR.mjs.br +0 -0
- package/dist/chunk-ZYIJODUR.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,
|
|
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
|
-
import { translationsEn } from './chunk-
|
|
4
|
-
import
|
|
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, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, MIN_ELEMENT_SIZE, buildTextBody3DSceneStyle, getImageTilingStyle, 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-PLDG3CXW.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, isMediaFullscreenActive, shouldRenderHitTarget, elementHitTargetStyle, getImageEffectsOpacity, getImageEffectsFilter, inlineElementPointerEvents, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, ACTION_BUTTON_PRESETS, mediaTransportVisible, isInkElement, getGroupChildParentFill, getElementLabel, getResizeHandleHitAreaStyle, paintedStrokeWidth, buildCssGradientFromShapeStyle, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, paintedElementSize, MEDIA_FULLSCREEN_OVERLAY_STYLE, elementContainerHeightStyle, 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, mapInlineTextFormatKey, 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, getCachedNativeImageSize, probeNativeImageSize, 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, buildGlyphEnvelopeBlock, 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, resolveMediaBookmarkTimesMs, 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, collectReferencedFontFamilies, resolveGoogleWebfontHref, syncGoogleWebfontStylesheet, selectGoogleWebfontFamilies, fetchGoogleWebfontOutlineBytes, mapSlideShowStartKey, mapEditorKey, isEditorTextInputTarget, textFontSizePtToPx, stepFontSizePt, textFontSizePxToPt, cycleSelectableElement, 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, copyFormatFromElement, 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, applyFormatToElement, 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-3UWJWJCR.mjs';
|
|
3
|
+
import { translationsEn } from './chunk-OBQ453H6.mjs';
|
|
4
|
+
import React17, { 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';
|
|
@@ -1334,6 +1334,9 @@ function useAnimationPlayback(input) {
|
|
|
1334
1334
|
const activeAnimationGroupRef = useRef(createActiveAnimationGroup());
|
|
1335
1335
|
const seededCompletedRef = useRef(false);
|
|
1336
1336
|
const mediaTimeNodeElementIdsRef = useRef(/* @__PURE__ */ new Map());
|
|
1337
|
+
const mediaBookmarkTimesMsRef = useRef(
|
|
1338
|
+
/* @__PURE__ */ new Map()
|
|
1339
|
+
);
|
|
1337
1340
|
const lastSeedCompletedRef = useRef(false);
|
|
1338
1341
|
const buildPlaybackContext = useCallback(() => {
|
|
1339
1342
|
return {
|
|
@@ -1343,7 +1346,8 @@ function useAnimationPlayback(input) {
|
|
|
1343
1346
|
onPlayActionSound,
|
|
1344
1347
|
playSound: playAnimationSound,
|
|
1345
1348
|
stopSound: stopAnimationSound,
|
|
1346
|
-
mediaTimeNodeElementIds: mediaTimeNodeElementIdsRef.current
|
|
1349
|
+
mediaTimeNodeElementIds: mediaTimeNodeElementIdsRef.current,
|
|
1350
|
+
mediaBookmarkTimesMs: mediaBookmarkTimesMsRef.current
|
|
1347
1351
|
};
|
|
1348
1352
|
}, [onPlayActionSound]);
|
|
1349
1353
|
useEffect(() => {
|
|
@@ -1361,6 +1365,7 @@ function useAnimationPlayback(input) {
|
|
|
1361
1365
|
if (!slide) {
|
|
1362
1366
|
controllerRef.current = null;
|
|
1363
1367
|
mediaTimeNodeElementIdsRef.current = /* @__PURE__ */ new Map();
|
|
1368
|
+
mediaBookmarkTimesMsRef.current = /* @__PURE__ */ new Map();
|
|
1364
1369
|
setPresentationElementStates(/* @__PURE__ */ new Map());
|
|
1365
1370
|
setPresentationKeyframesCss("");
|
|
1366
1371
|
setInteractiveTriggerShapeIds(/* @__PURE__ */ new Set());
|
|
@@ -1377,6 +1382,7 @@ function useAnimationPlayback(input) {
|
|
|
1377
1382
|
mediaTimeNodeElementIdsRef.current = resolveMediaTimeNodeElementIds(
|
|
1378
1383
|
slide.nativeAnimations ?? []
|
|
1379
1384
|
);
|
|
1385
|
+
mediaBookmarkTimesMsRef.current = resolveMediaBookmarkTimesMs(slide.elements);
|
|
1380
1386
|
setPresentationKeyframesCss(controller.keyframesCss);
|
|
1381
1387
|
setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
|
|
1382
1388
|
setHoverTriggerShapeIds(controller.hoverTriggerShapeIds);
|
|
@@ -3331,7 +3337,7 @@ function useFindReplace({
|
|
|
3331
3337
|
canEdit: mode === "edit",
|
|
3332
3338
|
isTextInputTarget: isEditorTextInputTarget(event.target)
|
|
3333
3339
|
});
|
|
3334
|
-
if (action !== "find") {
|
|
3340
|
+
if (action !== "find" && action !== "findReplace") {
|
|
3335
3341
|
return;
|
|
3336
3342
|
}
|
|
3337
3343
|
event.preventDefault();
|
|
@@ -9803,6 +9809,103 @@ function useCanvasImagePaste(input) {
|
|
|
9803
9809
|
[loading, error, eligible, slideId, width, height]
|
|
9804
9810
|
);
|
|
9805
9811
|
}
|
|
9812
|
+
function formatPatchFor(element, format) {
|
|
9813
|
+
const updated = applyFormatToElement(element, format);
|
|
9814
|
+
const updates = {};
|
|
9815
|
+
if (hasShapeProperties(updated)) {
|
|
9816
|
+
updates.shapeStyle = updated.shapeStyle;
|
|
9817
|
+
}
|
|
9818
|
+
if (hasTextProperties(updated)) {
|
|
9819
|
+
updates.textStyle = updated.textStyle;
|
|
9820
|
+
}
|
|
9821
|
+
return updates;
|
|
9822
|
+
}
|
|
9823
|
+
function useFormatPainterEditing(input) {
|
|
9824
|
+
const {
|
|
9825
|
+
selectedElement,
|
|
9826
|
+
elementLookup,
|
|
9827
|
+
formatPainterActive,
|
|
9828
|
+
setFormatPainterActive,
|
|
9829
|
+
canvasHandlers,
|
|
9830
|
+
ops
|
|
9831
|
+
} = input;
|
|
9832
|
+
const copiedFormatRef = useRef(null);
|
|
9833
|
+
const prevFormatPainterRef = useRef(false);
|
|
9834
|
+
useEffect(() => {
|
|
9835
|
+
if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
|
|
9836
|
+
copiedFormatRef.current = copyFormatFromElement(selectedElement);
|
|
9837
|
+
} else if (!formatPainterActive) {
|
|
9838
|
+
copiedFormatRef.current = null;
|
|
9839
|
+
}
|
|
9840
|
+
prevFormatPainterRef.current = formatPainterActive;
|
|
9841
|
+
}, [formatPainterActive, selectedElement]);
|
|
9842
|
+
const copyFormatFromSelection = useCallback(() => {
|
|
9843
|
+
if (selectedElement) {
|
|
9844
|
+
setFormatPainterActive(true);
|
|
9845
|
+
}
|
|
9846
|
+
}, [selectedElement, setFormatPainterActive]);
|
|
9847
|
+
const pasteFormatToSelection = useCallback(
|
|
9848
|
+
(targetIds) => {
|
|
9849
|
+
const format = copiedFormatRef.current;
|
|
9850
|
+
if (!format) {
|
|
9851
|
+
return;
|
|
9852
|
+
}
|
|
9853
|
+
for (const id of targetIds) {
|
|
9854
|
+
const element = elementLookup.get(id);
|
|
9855
|
+
if (element) {
|
|
9856
|
+
ops.updateElementById(id, formatPatchFor(element, format));
|
|
9857
|
+
}
|
|
9858
|
+
}
|
|
9859
|
+
copiedFormatRef.current = null;
|
|
9860
|
+
setFormatPainterActive(false);
|
|
9861
|
+
},
|
|
9862
|
+
[elementLookup, ops, setFormatPainterActive]
|
|
9863
|
+
);
|
|
9864
|
+
useEffect(() => {
|
|
9865
|
+
if (!formatPainterActive) {
|
|
9866
|
+
return;
|
|
9867
|
+
}
|
|
9868
|
+
const onKey = (e) => {
|
|
9869
|
+
if (e.key === "Escape") {
|
|
9870
|
+
setFormatPainterActive(false);
|
|
9871
|
+
}
|
|
9872
|
+
};
|
|
9873
|
+
window.addEventListener("keydown", onKey);
|
|
9874
|
+
return () => window.removeEventListener("keydown", onKey);
|
|
9875
|
+
}, [formatPainterActive, setFormatPainterActive]);
|
|
9876
|
+
const wrappedCanvasHandlers = useMemo(
|
|
9877
|
+
() => ({
|
|
9878
|
+
...canvasHandlers,
|
|
9879
|
+
handleElementClick: (elementId, e) => {
|
|
9880
|
+
if (formatPainterActive && copiedFormatRef.current) {
|
|
9881
|
+
e.stopPropagation();
|
|
9882
|
+
const element = elementLookup.get(elementId);
|
|
9883
|
+
if (element) {
|
|
9884
|
+
ops.updateElementById(elementId, formatPatchFor(element, copiedFormatRef.current));
|
|
9885
|
+
}
|
|
9886
|
+
copiedFormatRef.current = null;
|
|
9887
|
+
setFormatPainterActive(false);
|
|
9888
|
+
ops.applySelection(elementId);
|
|
9889
|
+
return;
|
|
9890
|
+
}
|
|
9891
|
+
canvasHandlers.handleElementClick(elementId, e);
|
|
9892
|
+
},
|
|
9893
|
+
handleCanvasMouseDown: (e) => {
|
|
9894
|
+
if (formatPainterActive) {
|
|
9895
|
+
setFormatPainterActive(false);
|
|
9896
|
+
return;
|
|
9897
|
+
}
|
|
9898
|
+
canvasHandlers.handleCanvasMouseDown(e);
|
|
9899
|
+
}
|
|
9900
|
+
}),
|
|
9901
|
+
[canvasHandlers, ops, formatPainterActive, setFormatPainterActive, elementLookup]
|
|
9902
|
+
);
|
|
9903
|
+
return {
|
|
9904
|
+
canvasHandlers: wrappedCanvasHandlers,
|
|
9905
|
+
copyFormatFromSelection,
|
|
9906
|
+
pasteFormatToSelection
|
|
9907
|
+
};
|
|
9908
|
+
}
|
|
9806
9909
|
|
|
9807
9910
|
// src/viewer/hooks/useEditorOperations.ts
|
|
9808
9911
|
function useEditorOperations(input) {
|
|
@@ -10002,64 +10105,19 @@ function useEditorOperations(input) {
|
|
|
10002
10105
|
}),
|
|
10003
10106
|
[ops, combinedUpdateTextStyle]
|
|
10004
10107
|
);
|
|
10005
|
-
const copiedFormatRef = useRef(null);
|
|
10006
|
-
const prevFormatPainterRef = useRef(false);
|
|
10007
10108
|
const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
|
|
10011
|
-
|
|
10012
|
-
|
|
10013
|
-
|
|
10014
|
-
|
|
10015
|
-
|
|
10016
|
-
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
const onKey = (e) => {
|
|
10021
|
-
if (e.key === "Escape") {
|
|
10022
|
-
setFormatPainterActive(false);
|
|
10023
|
-
}
|
|
10024
|
-
};
|
|
10025
|
-
window.addEventListener("keydown", onKey);
|
|
10026
|
-
return () => window.removeEventListener("keydown", onKey);
|
|
10027
|
-
}, [formatPainterActive, setFormatPainterActive]);
|
|
10028
|
-
const formatPainterCanvasHandlers = useMemo(
|
|
10029
|
-
() => ({
|
|
10030
|
-
...canvasHandlers,
|
|
10031
|
-
handleElementClick: (elementId, e) => {
|
|
10032
|
-
if (formatPainterActive && copiedFormatRef.current) {
|
|
10033
|
-
e.stopPropagation();
|
|
10034
|
-
const element = elementLookup.get(elementId);
|
|
10035
|
-
if (element) {
|
|
10036
|
-
const updated = applyFormatToElement(element, copiedFormatRef.current);
|
|
10037
|
-
const updates = {};
|
|
10038
|
-
if (hasShapeProperties(updated)) {
|
|
10039
|
-
updates.shapeStyle = updated.shapeStyle;
|
|
10040
|
-
}
|
|
10041
|
-
if (hasTextProperties(updated)) {
|
|
10042
|
-
updates.textStyle = updated.textStyle;
|
|
10043
|
-
}
|
|
10044
|
-
ops.updateElementById(elementId, updates);
|
|
10045
|
-
}
|
|
10046
|
-
copiedFormatRef.current = null;
|
|
10047
|
-
setFormatPainterActive(false);
|
|
10048
|
-
ops.applySelection(elementId);
|
|
10049
|
-
return;
|
|
10050
|
-
}
|
|
10051
|
-
canvasHandlers.handleElementClick(elementId, e);
|
|
10052
|
-
},
|
|
10053
|
-
handleCanvasMouseDown: (e) => {
|
|
10054
|
-
if (formatPainterActive) {
|
|
10055
|
-
setFormatPainterActive(false);
|
|
10056
|
-
return;
|
|
10057
|
-
}
|
|
10058
|
-
canvasHandlers.handleCanvasMouseDown(e);
|
|
10059
|
-
}
|
|
10060
|
-
}),
|
|
10061
|
-
[canvasHandlers, ops, formatPainterActive, setFormatPainterActive, elementLookup]
|
|
10062
|
-
);
|
|
10109
|
+
const {
|
|
10110
|
+
canvasHandlers: formatPainterCanvasHandlers,
|
|
10111
|
+
copyFormatFromSelection,
|
|
10112
|
+
pasteFormatToSelection
|
|
10113
|
+
} = useFormatPainterEditing({
|
|
10114
|
+
selectedElement,
|
|
10115
|
+
elementLookup,
|
|
10116
|
+
formatPainterActive,
|
|
10117
|
+
setFormatPainterActive,
|
|
10118
|
+
canvasHandlers,
|
|
10119
|
+
ops
|
|
10120
|
+
});
|
|
10063
10121
|
return {
|
|
10064
10122
|
ops: combinedOps,
|
|
10065
10123
|
sectionOps,
|
|
@@ -10069,7 +10127,9 @@ function useEditorOperations(input) {
|
|
|
10069
10127
|
insertHandlers: { ...insertHandlers, imagePaste },
|
|
10070
10128
|
manipulation,
|
|
10071
10129
|
slideOps,
|
|
10072
|
-
tableOps
|
|
10130
|
+
tableOps,
|
|
10131
|
+
copyFormatFromSelection,
|
|
10132
|
+
pasteFormatToSelection
|
|
10073
10133
|
};
|
|
10074
10134
|
}
|
|
10075
10135
|
|
|
@@ -10542,6 +10602,48 @@ function useKeyboardShortcuts(input) {
|
|
|
10542
10602
|
case "nextSlide":
|
|
10543
10603
|
current.onNextSlide?.();
|
|
10544
10604
|
break;
|
|
10605
|
+
case "alignLeft":
|
|
10606
|
+
current.onAlignLeft?.();
|
|
10607
|
+
break;
|
|
10608
|
+
case "alignCenter":
|
|
10609
|
+
current.onAlignCenter?.();
|
|
10610
|
+
break;
|
|
10611
|
+
case "alignRight":
|
|
10612
|
+
current.onAlignRight?.();
|
|
10613
|
+
break;
|
|
10614
|
+
case "alignJustify":
|
|
10615
|
+
current.onAlignJustify?.();
|
|
10616
|
+
break;
|
|
10617
|
+
case "increaseFontSize":
|
|
10618
|
+
current.onIncreaseFontSize?.();
|
|
10619
|
+
break;
|
|
10620
|
+
case "decreaseFontSize":
|
|
10621
|
+
current.onDecreaseFontSize?.();
|
|
10622
|
+
break;
|
|
10623
|
+
case "copyFormat":
|
|
10624
|
+
current.onCopyFormat?.();
|
|
10625
|
+
break;
|
|
10626
|
+
case "pasteFormat":
|
|
10627
|
+
current.onPasteFormat?.();
|
|
10628
|
+
break;
|
|
10629
|
+
case "newSlide":
|
|
10630
|
+
current.onNewSlide?.();
|
|
10631
|
+
break;
|
|
10632
|
+
case "hyperlink":
|
|
10633
|
+
current.onHyperlink?.();
|
|
10634
|
+
break;
|
|
10635
|
+
case "findReplace":
|
|
10636
|
+
current.onFindReplace?.();
|
|
10637
|
+
break;
|
|
10638
|
+
case "clearFormatting":
|
|
10639
|
+
current.onClearFormatting?.();
|
|
10640
|
+
break;
|
|
10641
|
+
case "cycleSelectionNext":
|
|
10642
|
+
current.onCycleSelectionNext?.();
|
|
10643
|
+
break;
|
|
10644
|
+
case "cycleSelectionPrev":
|
|
10645
|
+
current.onCycleSelectionPrev?.();
|
|
10646
|
+
break;
|
|
10545
10647
|
}
|
|
10546
10648
|
}, []);
|
|
10547
10649
|
useEffect(() => {
|
|
@@ -10553,6 +10655,13 @@ function useKeyboardShortcuts(input) {
|
|
|
10553
10655
|
}
|
|
10554
10656
|
|
|
10555
10657
|
// src/viewer/hooks/useKeyboardShortcutWiring.ts
|
|
10658
|
+
var CLEAR_FORMATTING_PATCH = {
|
|
10659
|
+
bold: false,
|
|
10660
|
+
italic: false,
|
|
10661
|
+
underline: false,
|
|
10662
|
+
strikethrough: false,
|
|
10663
|
+
highlightColor: void 0
|
|
10664
|
+
};
|
|
10556
10665
|
function useKeyboardShortcutWiring(input) {
|
|
10557
10666
|
const {
|
|
10558
10667
|
state,
|
|
@@ -10564,7 +10673,11 @@ function useKeyboardShortcutWiring(input) {
|
|
|
10564
10673
|
manipulation,
|
|
10565
10674
|
history,
|
|
10566
10675
|
onEnterPresentModeFromBeginning,
|
|
10567
|
-
onSetMode
|
|
10676
|
+
onSetMode,
|
|
10677
|
+
handleAddSlide,
|
|
10678
|
+
onOpenHyperlinkDialog,
|
|
10679
|
+
copyFormatFromSelection,
|
|
10680
|
+
pasteFormatToSelection
|
|
10568
10681
|
} = input;
|
|
10569
10682
|
useKeyboardShortcuts({
|
|
10570
10683
|
containerRef: state.containerRef,
|
|
@@ -10638,9 +10751,38 @@ function useKeyboardShortcutWiring(input) {
|
|
|
10638
10751
|
state.setActiveSlideIndex((prev) => Math.min(slides.length - 1, prev + 1));
|
|
10639
10752
|
},
|
|
10640
10753
|
onStartShowFromBeginning: onEnterPresentModeFromBeginning,
|
|
10641
|
-
onStartShowFromCurrent: () => onSetMode("present")
|
|
10754
|
+
onStartShowFromCurrent: () => onSetMode("present"),
|
|
10755
|
+
onAlignLeft: () => ops.updateSelectedTextStyle({ align: "left" }),
|
|
10756
|
+
onAlignCenter: () => ops.updateSelectedTextStyle({ align: "center" }),
|
|
10757
|
+
onAlignRight: () => ops.updateSelectedTextStyle({ align: "right" }),
|
|
10758
|
+
onAlignJustify: () => ops.updateSelectedTextStyle({ align: "justify" }),
|
|
10759
|
+
onIncreaseFontSize: () => stepSelectedFontSize(state, ops, "increase"),
|
|
10760
|
+
onDecreaseFontSize: () => stepSelectedFontSize(state, ops, "decrease"),
|
|
10761
|
+
onCopyFormat: copyFormatFromSelection,
|
|
10762
|
+
onPasteFormat: () => pasteFormatToSelection(state.effectiveSelectedIds),
|
|
10763
|
+
onNewSlide: handleAddSlide,
|
|
10764
|
+
onHyperlink: onOpenHyperlinkDialog,
|
|
10765
|
+
onClearFormatting: () => ops.updateSelectedTextStyle({ ...CLEAR_FORMATTING_PATCH }),
|
|
10766
|
+
onCycleSelectionNext: () => cycleSelection(state, activeSlide, ops, "next"),
|
|
10767
|
+
onCycleSelectionPrev: () => cycleSelection(state, activeSlide, ops, "prev")
|
|
10642
10768
|
});
|
|
10643
10769
|
}
|
|
10770
|
+
function stepSelectedFontSize(state, ops, direction) {
|
|
10771
|
+
const selected = state.selectedElement;
|
|
10772
|
+
const currentPx = (selected && hasTextProperties(selected) ? selected.textStyle?.fontSize : void 0) ?? textFontSizePtToPx(18);
|
|
10773
|
+
const nextPt = stepFontSizePt(textFontSizePxToPt(currentPx), direction);
|
|
10774
|
+
ops.updateSelectedTextStyle({ fontSize: textFontSizePtToPx(nextPt) });
|
|
10775
|
+
}
|
|
10776
|
+
function cycleSelection(state, activeSlide, ops, direction) {
|
|
10777
|
+
if (!activeSlide) {
|
|
10778
|
+
return;
|
|
10779
|
+
}
|
|
10780
|
+
const ids = activeSlide.elements.map((el) => el.id);
|
|
10781
|
+
const nextId = cycleSelectableElement(ids, state.selectedElementId, direction);
|
|
10782
|
+
if (nextId) {
|
|
10783
|
+
ops.applySelection(nextId, [nextId]);
|
|
10784
|
+
}
|
|
10785
|
+
}
|
|
10644
10786
|
function useElementUpdateBatch(input) {
|
|
10645
10787
|
const live = useRef(input);
|
|
10646
10788
|
live.current = input;
|
|
@@ -11037,7 +11179,11 @@ function useViewerIntegration(input) {
|
|
|
11037
11179
|
manipulation: editorOps.manipulation,
|
|
11038
11180
|
history,
|
|
11039
11181
|
onEnterPresentModeFromBeginning: presentation.enterPresentModeFromBeginning,
|
|
11040
|
-
onSetMode: handleSetMode
|
|
11182
|
+
onSetMode: handleSetMode,
|
|
11183
|
+
handleAddSlide: editorOps.slideOps.handleAddSlide,
|
|
11184
|
+
onOpenHyperlinkDialog: () => dialogs.setIsHyperlinkDialogOpen(true),
|
|
11185
|
+
copyFormatFromSelection: editorOps.copyFormatFromSelection,
|
|
11186
|
+
pasteFormatToSelection: editorOps.pasteFormatToSelection
|
|
11041
11187
|
});
|
|
11042
11188
|
return {
|
|
11043
11189
|
exportHandlers,
|
|
@@ -12199,6 +12345,12 @@ function buildToolbarProps(input) {
|
|
|
12199
12345
|
onOpenSettings,
|
|
12200
12346
|
onRunAccessibilityCheck: dialogs.handleRunAccessibilityCheck,
|
|
12201
12347
|
onToggleSlideSorter: () => s.setShowSlideSorter((p) => !p),
|
|
12348
|
+
onGoToNormalView: () => {
|
|
12349
|
+
s.setShowSlideSorter(false);
|
|
12350
|
+
s.setShowReadingView(false);
|
|
12351
|
+
s.setShowOutlineView(false);
|
|
12352
|
+
dialogs.handleCloseMasterView();
|
|
12353
|
+
},
|
|
12202
12354
|
onOpenReadingView: () => s.setShowReadingView(true),
|
|
12203
12355
|
onOpenOutlineView: () => s.setShowOutlineView(true),
|
|
12204
12356
|
onUpdateTextStyle: ops.updateSelectedTextStyle,
|
|
@@ -13238,6 +13390,33 @@ function DuotoneImage({
|
|
|
13238
13390
|
}
|
|
13239
13391
|
);
|
|
13240
13392
|
}
|
|
13393
|
+
function TiledImageLayer({
|
|
13394
|
+
element,
|
|
13395
|
+
src,
|
|
13396
|
+
className,
|
|
13397
|
+
style
|
|
13398
|
+
}) {
|
|
13399
|
+
const [nativeSize, setNativeSize] = useState(() => getCachedNativeImageSize(src));
|
|
13400
|
+
useEffect(() => {
|
|
13401
|
+
const cached = getCachedNativeImageSize(src);
|
|
13402
|
+
if (cached) {
|
|
13403
|
+
setNativeSize(cached);
|
|
13404
|
+
return;
|
|
13405
|
+
}
|
|
13406
|
+
let cancelled = false;
|
|
13407
|
+
probeNativeImageSize(src).then((size) => {
|
|
13408
|
+
if (!cancelled && size) {
|
|
13409
|
+
setNativeSize(size);
|
|
13410
|
+
}
|
|
13411
|
+
return void 0;
|
|
13412
|
+
}).catch(() => {
|
|
13413
|
+
});
|
|
13414
|
+
return () => {
|
|
13415
|
+
cancelled = true;
|
|
13416
|
+
};
|
|
13417
|
+
}, [src]);
|
|
13418
|
+
return /* @__PURE__ */ jsx("div", { className, style: { ...getImageTilingStyle(element, nativeSize), ...style } });
|
|
13419
|
+
}
|
|
13241
13420
|
function renderImageEffectDefinitions(element, excludeDuotone = false) {
|
|
13242
13421
|
return getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsx(
|
|
13243
13422
|
"svg",
|
|
@@ -13313,10 +13492,12 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13313
13492
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13314
13493
|
renderImageEffectDefinitions(el),
|
|
13315
13494
|
/* @__PURE__ */ jsx(
|
|
13316
|
-
|
|
13495
|
+
TiledImageLayer,
|
|
13317
13496
|
{
|
|
13497
|
+
element: el,
|
|
13498
|
+
src: tileSrc,
|
|
13318
13499
|
className: "pointer-events-none select-none w-full h-full",
|
|
13319
|
-
style:
|
|
13500
|
+
style: effectStyles
|
|
13320
13501
|
}
|
|
13321
13502
|
)
|
|
13322
13503
|
] });
|
|
@@ -14196,7 +14377,7 @@ function ResizeHandles({
|
|
|
14196
14377
|
))
|
|
14197
14378
|
] });
|
|
14198
14379
|
}
|
|
14199
|
-
var ConnectorElementRenderer =
|
|
14380
|
+
var ConnectorElementRenderer = React17.memo(
|
|
14200
14381
|
// oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
|
|
14201
14382
|
function ConnectorElementRendererInner({
|
|
14202
14383
|
el,
|
|
@@ -14534,21 +14715,23 @@ function getContainerStyle({
|
|
|
14534
14715
|
);
|
|
14535
14716
|
const overflowValue = has3DExtrusion || blurGrowVisible || isPicture ? "visible" : isImg || el.type === "media" ? "hidden" : void 0;
|
|
14536
14717
|
const painted = paintedElementSize(el);
|
|
14718
|
+
const fs = MEDIA_FULLSCREEN_OVERLAY_STYLE;
|
|
14719
|
+
const heightStyle = isFullscreenMedia ? { height: fs.height } : el.type === "table" ? elementContainerHeightStyle(el, painted.height) : { height: painted.height };
|
|
14537
14720
|
return {
|
|
14538
|
-
left: isFullscreenMedia ?
|
|
14539
|
-
top: isFullscreenMedia ?
|
|
14540
|
-
width: isFullscreenMedia ?
|
|
14541
|
-
|
|
14542
|
-
transform: isFullscreenMedia ?
|
|
14721
|
+
left: isFullscreenMedia ? fs.left : el.x,
|
|
14722
|
+
top: isFullscreenMedia ? fs.top : el.y,
|
|
14723
|
+
width: isFullscreenMedia ? fs.width : painted.width,
|
|
14724
|
+
...heightStyle,
|
|
14725
|
+
transform: isFullscreenMedia ? fs.transform : getElementTransform(el),
|
|
14543
14726
|
transformOrigin: "center",
|
|
14544
14727
|
overflow: overflowValue,
|
|
14545
14728
|
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? getCropShapeClipPath(el) : void 0,
|
|
14546
|
-
zIndex: isFullscreenMedia ?
|
|
14729
|
+
zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
|
|
14547
14730
|
visibility: animationState?.visible === false ? "hidden" : "visible",
|
|
14548
14731
|
animation: animationState?.cssAnimation,
|
|
14549
|
-
background: isFullscreenMedia ?
|
|
14550
|
-
transition: isFullscreenMedia ?
|
|
14551
|
-
borderColor: isFullscreenMedia ?
|
|
14732
|
+
background: isFullscreenMedia ? fs.background : void 0,
|
|
14733
|
+
transition: isFullscreenMedia ? fs.transition : void 0,
|
|
14734
|
+
borderColor: isFullscreenMedia ? fs.borderColor : void 0,
|
|
14552
14735
|
...shapeVisualStyle,
|
|
14553
14736
|
...isPicture ? {
|
|
14554
14737
|
backgroundColor: "transparent",
|
|
@@ -14583,7 +14766,7 @@ function shapeParams(element) {
|
|
|
14583
14766
|
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
14584
14767
|
return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
|
|
14585
14768
|
}
|
|
14586
|
-
var Extrusion3DOverlay =
|
|
14769
|
+
var Extrusion3DOverlay = React17.memo(
|
|
14587
14770
|
// oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
|
|
14588
14771
|
function Extrusion3DOverlayInner({ data }) {
|
|
14589
14772
|
if (!data.hasExtrusion || data.panels.length === 0) {
|
|
@@ -14817,7 +15000,7 @@ function ShapeEffectOverlay({
|
|
|
14817
15000
|
) : null
|
|
14818
15001
|
] });
|
|
14819
15002
|
}
|
|
14820
|
-
var ElementRenderer =
|
|
15003
|
+
var ElementRenderer = React17.memo(
|
|
14821
15004
|
// oxlint-disable-next-line prefer-arrow-callback -- named fn gives the memo component its displayName
|
|
14822
15005
|
function ElementRendererInner({
|
|
14823
15006
|
element: el,
|
|
@@ -14953,7 +15136,11 @@ var ElementRenderer = React16.memo(
|
|
|
14953
15136
|
const selB = isSelected ? `outline-1 -outline-offset-1 outline-${selClr} ring-2 ring-${selClr}/50` : showHoverBorder ? "outline-1 -outline-offset-1 outline-transparent hover:outline-primary/40" : "";
|
|
14954
15137
|
const cur = effectiveIsInlineEditing ? "cursor-text" : effectiveCanInteract ? !allow.movable ? "cursor-default" : "cursor-move" : hasAction || isZoom ? "cursor-pointer" : "";
|
|
14955
15138
|
const isPresentationPassive = presenting === true;
|
|
14956
|
-
const isFullscreenMedia = el.type === "media" &&
|
|
15139
|
+
const isFullscreenMedia = el.type === "media" && isMediaFullscreenActive({
|
|
15140
|
+
fullScreen: el.fullScreen,
|
|
15141
|
+
presenting: isPresentationPassive,
|
|
15142
|
+
playing: isMediaPlaying
|
|
15143
|
+
});
|
|
14957
15144
|
const hitTargetStyle = shouldRenderHitTarget(effectiveCanInteract, isPresentationPassive) ? elementHitTargetStyle(el) : void 0;
|
|
14958
15145
|
const isFocusable = effectiveCanInteract || isActionable;
|
|
14959
15146
|
const containerStyle = getContainerStyle({
|
|
@@ -15140,30 +15327,48 @@ var ElementRenderer = React16.memo(
|
|
|
15140
15327
|
);
|
|
15141
15328
|
}
|
|
15142
15329
|
);
|
|
15143
|
-
function renderPressureStroke(circles, color, opacity, keyPrefix) {
|
|
15144
|
-
return /* @__PURE__ */ jsx(
|
|
15330
|
+
function renderPressureStroke(circles, color, opacity, blendMode, keyPrefix) {
|
|
15331
|
+
return /* @__PURE__ */ jsx(
|
|
15332
|
+
"g",
|
|
15333
|
+
{
|
|
15334
|
+
opacity,
|
|
15335
|
+
style: blendMode === "multiply" ? { mixBlendMode: "multiply" } : void 0,
|
|
15336
|
+
children: circles.map((c, j) => /* @__PURE__ */ jsx("circle", { cx: c.cx, cy: c.cy, r: c.r, fill: color }, `${keyPrefix}-pc-${j}`))
|
|
15337
|
+
}
|
|
15338
|
+
);
|
|
15145
15339
|
}
|
|
15146
|
-
function renderNibMarkStroke(marks, color, opacity, keyPrefix) {
|
|
15147
|
-
return /* @__PURE__ */ jsx(
|
|
15148
|
-
"
|
|
15340
|
+
function renderNibMarkStroke(marks, color, opacity, blendMode, keyPrefix) {
|
|
15341
|
+
return /* @__PURE__ */ jsx(
|
|
15342
|
+
"g",
|
|
15149
15343
|
{
|
|
15150
|
-
|
|
15151
|
-
|
|
15152
|
-
|
|
15153
|
-
|
|
15154
|
-
|
|
15155
|
-
|
|
15156
|
-
|
|
15157
|
-
|
|
15158
|
-
|
|
15344
|
+
opacity,
|
|
15345
|
+
style: blendMode === "multiply" ? { mixBlendMode: "multiply" } : void 0,
|
|
15346
|
+
children: marks.map((m, j) => /* @__PURE__ */ jsx(
|
|
15347
|
+
"ellipse",
|
|
15348
|
+
{
|
|
15349
|
+
cx: m.cx,
|
|
15350
|
+
cy: m.cy,
|
|
15351
|
+
rx: m.rPerp,
|
|
15352
|
+
ry: m.rTilt,
|
|
15353
|
+
transform: `rotate(${m.rotationDeg} ${m.cx} ${m.cy})`,
|
|
15354
|
+
fill: color
|
|
15355
|
+
},
|
|
15356
|
+
`${keyPrefix}-nib-${j}`
|
|
15357
|
+
))
|
|
15358
|
+
}
|
|
15359
|
+
);
|
|
15159
15360
|
}
|
|
15160
15361
|
function renderStrokeView(view, pressureSensitive, replayStyle, key) {
|
|
15161
15362
|
if (view.nibMarks) {
|
|
15162
|
-
return /* @__PURE__ */ jsx("g", { children: renderNibMarkStroke(view.nibMarks, view.color, view.opacity, key) }, key);
|
|
15363
|
+
return /* @__PURE__ */ jsx("g", { children: renderNibMarkStroke(view.nibMarks, view.color, view.opacity, view.blendMode, key) }, key);
|
|
15163
15364
|
}
|
|
15164
15365
|
if (pressureSensitive && view.circles) {
|
|
15165
|
-
return /* @__PURE__ */ jsx("g", { children: renderPressureStroke(view.circles, view.color, view.opacity, key) }, key);
|
|
15366
|
+
return /* @__PURE__ */ jsx("g", { children: renderPressureStroke(view.circles, view.color, view.opacity, view.blendMode, key) }, key);
|
|
15166
15367
|
}
|
|
15368
|
+
const style = {
|
|
15369
|
+
...replayStyle ? { animation: replayStyle.animation, "--ink-path-length": replayStyle.pathLength } : {},
|
|
15370
|
+
...view.blendMode === "multiply" ? { mixBlendMode: "multiply" } : {}
|
|
15371
|
+
};
|
|
15167
15372
|
return /* @__PURE__ */ jsx(
|
|
15168
15373
|
"path",
|
|
15169
15374
|
{
|
|
@@ -15177,12 +15382,9 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
|
|
|
15177
15382
|
vectorEffect: "non-scaling-stroke",
|
|
15178
15383
|
...replayStyle ? {
|
|
15179
15384
|
strokeDasharray: replayStyle.strokeDasharray,
|
|
15180
|
-
strokeDashoffset: replayStyle.strokeDashoffset
|
|
15181
|
-
|
|
15182
|
-
|
|
15183
|
-
"--ink-path-length": replayStyle.pathLength
|
|
15184
|
-
}
|
|
15185
|
-
} : {}
|
|
15385
|
+
strokeDashoffset: replayStyle.strokeDashoffset
|
|
15386
|
+
} : {},
|
|
15387
|
+
...Object.keys(style).length > 0 ? { style } : {}
|
|
15186
15388
|
},
|
|
15187
15389
|
key
|
|
15188
15390
|
);
|
|
@@ -15262,10 +15464,11 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15262
15464
|
renderGroup(c.children, getGroupChildParentFill(c, parentGroupFill))
|
|
15263
15465
|
) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 pointer-events-none", style: getImageSurfaceStyle(c), children: [
|
|
15264
15466
|
isImageTiled(c) ? /* @__PURE__ */ jsx(
|
|
15265
|
-
|
|
15467
|
+
TiledImageLayer,
|
|
15266
15468
|
{
|
|
15267
|
-
|
|
15268
|
-
|
|
15469
|
+
element: c,
|
|
15470
|
+
src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
|
|
15471
|
+
className: "pointer-events-none select-none w-full h-full"
|
|
15269
15472
|
}
|
|
15270
15473
|
) : /* @__PURE__ */ jsx(
|
|
15271
15474
|
"img",
|
|
@@ -15827,18 +16030,15 @@ function InlineTextEditor({
|
|
|
15827
16030
|
onCommit();
|
|
15828
16031
|
},
|
|
15829
16032
|
onKeyDown: (e) => {
|
|
15830
|
-
|
|
15831
|
-
|
|
15832
|
-
|
|
15833
|
-
|
|
15834
|
-
|
|
15835
|
-
|
|
15836
|
-
|
|
15837
|
-
if (value !== void 0) {
|
|
15838
|
-
onFormatText({ [property]: value });
|
|
15839
|
-
}
|
|
15840
|
-
return;
|
|
16033
|
+
const property = onFormatText ? mapInlineTextFormatKey(e) : null;
|
|
16034
|
+
if (property) {
|
|
16035
|
+
e.preventDefault();
|
|
16036
|
+
e.stopPropagation();
|
|
16037
|
+
const value = nextInlineStyleValue(property);
|
|
16038
|
+
if (value !== void 0) {
|
|
16039
|
+
onFormatText?.({ [property]: value });
|
|
15841
16040
|
}
|
|
16041
|
+
return;
|
|
15842
16042
|
}
|
|
15843
16043
|
if (e.key === "Escape") {
|
|
15844
16044
|
e.preventDefault();
|
|
@@ -15872,10 +16072,10 @@ function InlineTextEditor({
|
|
|
15872
16072
|
function FailedToLoad() {
|
|
15873
16073
|
return null;
|
|
15874
16074
|
}
|
|
15875
|
-
var LazyModel3DScene =
|
|
16075
|
+
var LazyModel3DScene = React17.lazy(
|
|
15876
16076
|
async () => {
|
|
15877
16077
|
try {
|
|
15878
|
-
return await import('./Model3DScene-
|
|
16078
|
+
return await import('./Model3DScene-AI2JTBQM.mjs');
|
|
15879
16079
|
} catch {
|
|
15880
16080
|
return { default: FailedToLoad };
|
|
15881
16081
|
}
|
|
@@ -15937,7 +16137,7 @@ function PosterFallback({
|
|
|
15937
16137
|
}
|
|
15938
16138
|
);
|
|
15939
16139
|
}
|
|
15940
|
-
var Model3DErrorBoundary = class extends
|
|
16140
|
+
var Model3DErrorBoundary = class extends React17.Component {
|
|
15941
16141
|
constructor(props) {
|
|
15942
16142
|
super(props);
|
|
15943
16143
|
this.state = { hasError: false };
|
|
@@ -16131,10 +16331,10 @@ function SmartArtInlineNodeEditor({
|
|
|
16131
16331
|
onCancel
|
|
16132
16332
|
}) {
|
|
16133
16333
|
const { t } = useTranslation();
|
|
16134
|
-
const ref =
|
|
16135
|
-
const [value, setValue] =
|
|
16136
|
-
const settled =
|
|
16137
|
-
|
|
16334
|
+
const ref = React17.useRef(null);
|
|
16335
|
+
const [value, setValue] = React17.useState(initialText);
|
|
16336
|
+
const settled = React17.useRef(false);
|
|
16337
|
+
React17.useEffect(() => {
|
|
16138
16338
|
const el = ref.current;
|
|
16139
16339
|
if (el) {
|
|
16140
16340
|
el.focus();
|
|
@@ -16227,16 +16427,16 @@ function findNodeIdFromEvent(target) {
|
|
|
16227
16427
|
return null;
|
|
16228
16428
|
}
|
|
16229
16429
|
function useSmartArtHoverState(containerRef, measureNodeRect = measureScreenNodeRect) {
|
|
16230
|
-
const [hoveredNodeId, setHoveredNodeId] =
|
|
16231
|
-
const [hoveredNodeRect, setHoveredNodeRect] =
|
|
16232
|
-
const hideTimeoutRef =
|
|
16233
|
-
const cancelPendingHide =
|
|
16430
|
+
const [hoveredNodeId, setHoveredNodeId] = React17.useState(null);
|
|
16431
|
+
const [hoveredNodeRect, setHoveredNodeRect] = React17.useState(null);
|
|
16432
|
+
const hideTimeoutRef = React17.useRef(null);
|
|
16433
|
+
const cancelPendingHide = React17.useCallback(() => {
|
|
16234
16434
|
if (hideTimeoutRef.current !== null) {
|
|
16235
16435
|
window.clearTimeout(hideTimeoutRef.current);
|
|
16236
16436
|
hideTimeoutRef.current = null;
|
|
16237
16437
|
}
|
|
16238
16438
|
}, []);
|
|
16239
|
-
const handleMouseMove =
|
|
16439
|
+
const handleMouseMove = React17.useCallback(
|
|
16240
16440
|
(e, ignoreRef) => {
|
|
16241
16441
|
const nodeEl = findNodeIdFromEvent(e.target);
|
|
16242
16442
|
const container = containerRef.current;
|
|
@@ -16259,12 +16459,12 @@ function useSmartArtHoverState(containerRef, measureNodeRect = measureScreenNode
|
|
|
16259
16459
|
},
|
|
16260
16460
|
[containerRef, cancelPendingHide, measureNodeRect]
|
|
16261
16461
|
);
|
|
16262
|
-
const clearHover =
|
|
16462
|
+
const clearHover = React17.useCallback(() => {
|
|
16263
16463
|
cancelPendingHide();
|
|
16264
16464
|
setHoveredNodeId(null);
|
|
16265
16465
|
setHoveredNodeRect(null);
|
|
16266
16466
|
}, [cancelPendingHide]);
|
|
16267
|
-
|
|
16467
|
+
React17.useEffect(() => cancelPendingHide, [cancelPendingHide]);
|
|
16268
16468
|
return { hoveredNodeId, hoveredNodeRect, handleMouseMove, clearHover };
|
|
16269
16469
|
}
|
|
16270
16470
|
var EDITOR_PADDING = 4;
|
|
@@ -16280,14 +16480,14 @@ function SmartArtEditableLayer({
|
|
|
16280
16480
|
measureNodeRect = measureScreenNodeRect,
|
|
16281
16481
|
children
|
|
16282
16482
|
}) {
|
|
16283
|
-
const containerRef =
|
|
16284
|
-
const styleBarRef =
|
|
16285
|
-
const [edit, setEdit] =
|
|
16483
|
+
const containerRef = React17.useRef(null);
|
|
16484
|
+
const styleBarRef = React17.useRef(null);
|
|
16485
|
+
const [edit, setEdit] = React17.useState(null);
|
|
16286
16486
|
const { hoveredNodeId, hoveredNodeRect, handleMouseMove, clearHover } = useSmartArtHoverState(
|
|
16287
16487
|
containerRef,
|
|
16288
16488
|
measureNodeRect
|
|
16289
16489
|
);
|
|
16290
|
-
const openEditor =
|
|
16490
|
+
const openEditor = React17.useCallback(
|
|
16291
16491
|
(target) => {
|
|
16292
16492
|
const nodeEl = findNodeIdFromEvent(target);
|
|
16293
16493
|
const container = containerRef.current;
|
|
@@ -16916,7 +17116,7 @@ function sameDiagramReveal(prev, next) {
|
|
|
16916
17116
|
}
|
|
16917
17117
|
return true;
|
|
16918
17118
|
}
|
|
16919
|
-
var SmartArtRenderer =
|
|
17119
|
+
var SmartArtRenderer = React17.memo(SmartArtRendererImpl, arePropsEqual);
|
|
16920
17120
|
function SmartArt3DView({
|
|
16921
17121
|
element,
|
|
16922
17122
|
className,
|
|
@@ -16993,7 +17193,12 @@ function groupIntoParagraphs2(element, fieldContext) {
|
|
|
16993
17193
|
element,
|
|
16994
17194
|
fieldContext ? (seg) => {
|
|
16995
17195
|
if (seg.fieldType) {
|
|
16996
|
-
const substituted = substituteFieldText(
|
|
17196
|
+
const substituted = substituteFieldText(
|
|
17197
|
+
seg.text,
|
|
17198
|
+
seg.fieldType,
|
|
17199
|
+
fieldContext,
|
|
17200
|
+
seg.style?.language
|
|
17201
|
+
);
|
|
16997
17202
|
if (substituted !== seg.text) {
|
|
16998
17203
|
return { ...seg, text: substituted };
|
|
16999
17204
|
}
|
|
@@ -17056,7 +17261,7 @@ function EnvelopeGlyph({
|
|
|
17056
17261
|
}
|
|
17057
17262
|
return /* @__PURE__ */ jsx("g", { "data-glyph-slices": glyph.slices.length, children: glyph.slices.map((slice, si) => {
|
|
17058
17263
|
const clipId = `${glyphKey}-s${si}`;
|
|
17059
|
-
return /* @__PURE__ */ jsxs(
|
|
17264
|
+
return /* @__PURE__ */ jsxs(React17.Fragment, { children: [
|
|
17060
17265
|
/* @__PURE__ */ jsx("clipPath", { id: clipId, clipPathUnits: "userSpaceOnUse", children: /* @__PURE__ */ jsx(
|
|
17061
17266
|
"rect",
|
|
17062
17267
|
{
|
|
@@ -17126,6 +17331,22 @@ function WarpedText({
|
|
|
17126
17331
|
const baseFontFamily = textEl.textStyle?.fontFamily ? getSubstituteFontFamily(textEl.textStyle.fontFamily) : DEFAULT_FONT_FAMILY;
|
|
17127
17332
|
const baseFill = normalizeHexColor(textEl.textStyle?.color, fallbackColor);
|
|
17128
17333
|
if (hasGlyphEnvelope(preset)) {
|
|
17334
|
+
const perLine = buildGlyphEnvelopeBlock(
|
|
17335
|
+
preset,
|
|
17336
|
+
paragraphs.map(
|
|
17337
|
+
(para) => para.segments.map((seg, i) => ({
|
|
17338
|
+
text: seg.text,
|
|
17339
|
+
font: resolveSegmentFont(seg, textEl),
|
|
17340
|
+
segmentIndex: i
|
|
17341
|
+
}))
|
|
17342
|
+
),
|
|
17343
|
+
width,
|
|
17344
|
+
height,
|
|
17345
|
+
align,
|
|
17346
|
+
warpAdj,
|
|
17347
|
+
warpAdj2,
|
|
17348
|
+
getGlyphOutline
|
|
17349
|
+
);
|
|
17129
17350
|
return /* @__PURE__ */ jsx(
|
|
17130
17351
|
"svg",
|
|
17131
17352
|
{
|
|
@@ -17136,23 +17357,7 @@ function WarpedText({
|
|
|
17136
17357
|
style: { overflow: "visible", position: "absolute", inset: 0, pointerEvents: "none" },
|
|
17137
17358
|
"aria-hidden": "true",
|
|
17138
17359
|
children: paragraphs.map((para, paraIdx) => {
|
|
17139
|
-
const
|
|
17140
|
-
text: seg.text,
|
|
17141
|
-
font: resolveSegmentFont(seg, textEl),
|
|
17142
|
-
segmentIndex: i
|
|
17143
|
-
}));
|
|
17144
|
-
const glyphs = buildGlyphEnvelope(
|
|
17145
|
-
preset,
|
|
17146
|
-
segsInput,
|
|
17147
|
-
width,
|
|
17148
|
-
height,
|
|
17149
|
-
align,
|
|
17150
|
-
warpAdj,
|
|
17151
|
-
warpAdj2,
|
|
17152
|
-
paraIdx,
|
|
17153
|
-
lineCount,
|
|
17154
|
-
getGlyphOutline
|
|
17155
|
-
);
|
|
17360
|
+
const glyphs = perLine[paraIdx] ?? [];
|
|
17156
17361
|
return /* @__PURE__ */ jsx(
|
|
17157
17362
|
EnvelopeLine,
|
|
17158
17363
|
{
|
|
@@ -17984,7 +18189,7 @@ function StaticElementRendererImpl({
|
|
|
17984
18189
|
}
|
|
17985
18190
|
);
|
|
17986
18191
|
}
|
|
17987
|
-
var StaticElementRenderer =
|
|
18192
|
+
var StaticElementRenderer = React17.memo(StaticElementRendererImpl);
|
|
17988
18193
|
StaticElementRenderer.displayName = "StaticElementRenderer";
|
|
17989
18194
|
function SlideLayer({
|
|
17990
18195
|
slide,
|