pptx-react-viewer 2.16.5 → 2.16.7
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 +4 -0
- package/dist/{AiChatPanel-6B26AZGA.mjs → AiChatPanel-2YYL6AKX.mjs} +3 -9
- package/dist/AiChatPanel-2YYL6AKX.mjs.br +0 -0
- package/dist/AiChatPanel-2YYL6AKX.mjs.gz +0 -0
- package/dist/{AiChatPanel-FGEIZQCD.js → AiChatPanel-XSXMU2Q5.js} +23 -29
- package/dist/AiChatPanel-XSXMU2Q5.js.br +0 -0
- package/dist/AiChatPanel-XSXMU2Q5.js.gz +0 -0
- package/dist/{Model3DScene-2JX5CUPK.js → Model3DScene-36UJZLCO.js} +2 -2
- package/dist/Model3DScene-36UJZLCO.js.br +0 -0
- package/dist/Model3DScene-36UJZLCO.js.gz +0 -0
- package/dist/{Model3DScene-NKYNKUPP.mjs → Model3DScene-NVFP3JBJ.mjs} +1 -1
- package/dist/Model3DScene-NVFP3JBJ.mjs.br +0 -0
- package/dist/Model3DScene-NVFP3JBJ.mjs.gz +0 -0
- package/dist/PowerPointViewer-Du7u4INi.d.ts.map +1 -1
- package/dist/{SurfaceChart3DScene-TTL2FTEG.mjs → SurfaceChart3DScene-BMFEDBLF.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-TTL2FTEG.mjs.br → SurfaceChart3DScene-BMFEDBLF.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-BMFEDBLF.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-AE5SKG7U.js → SurfaceChart3DScene-W6I255VU.js} +2 -2
- package/dist/SurfaceChart3DScene-W6I255VU.js.br +0 -0
- package/dist/SurfaceChart3DScene-W6I255VU.js.gz +0 -0
- package/dist/{chunk-LCWZ4TD4.js → chunk-77TMRPDU.js} +2144 -1527
- package/dist/chunk-77TMRPDU.js.br +0 -0
- package/dist/chunk-77TMRPDU.js.gz +0 -0
- package/dist/{chunk-247XH4EN.mjs → chunk-D5TAZ5NL.mjs} +1214 -53
- package/dist/chunk-D5TAZ5NL.mjs.br +0 -0
- package/dist/chunk-D5TAZ5NL.mjs.gz +0 -0
- package/dist/{chunk-EFZ4K6V5.mjs → chunk-J56KVWI5.mjs} +1132 -515
- package/dist/chunk-J56KVWI5.mjs.br +0 -0
- package/dist/chunk-J56KVWI5.mjs.gz +0 -0
- package/dist/{chunk-5YGTUHNO.mjs → chunk-J5V7UCD2.mjs} +15 -1403
- package/dist/chunk-J5V7UCD2.mjs.br +0 -0
- package/dist/chunk-J5V7UCD2.mjs.gz +0 -0
- package/dist/{chunk-VZI35LEF.js → chunk-JSJZWA43.js} +9 -3
- package/dist/chunk-JSJZWA43.js.br +0 -0
- package/dist/chunk-JSJZWA43.js.gz +0 -0
- package/dist/{chunk-Y6W5LGTR.mjs → chunk-KVNZGR3L.mjs} +14 -93
- package/dist/chunk-KVNZGR3L.mjs.br +0 -0
- package/dist/chunk-KVNZGR3L.mjs.gz +0 -0
- package/dist/{chunk-P65VL2I6.js → chunk-NFJLF7TX.js} +258 -1676
- package/dist/chunk-NFJLF7TX.js.br +0 -0
- package/dist/chunk-NFJLF7TX.js.gz +0 -0
- package/dist/{chunk-MZN2UIYT.mjs → chunk-QNKJUUKD.mjs} +7 -2
- package/dist/chunk-QNKJUUKD.mjs.br +0 -0
- package/dist/chunk-QNKJUUKD.mjs.gz +0 -0
- package/dist/{chunk-UNWU6D2M.js → chunk-S7HPAJRX.js} +350 -429
- package/dist/chunk-S7HPAJRX.js.br +0 -0
- package/dist/chunk-S7HPAJRX.js.gz +0 -0
- package/dist/{chunk-6QGTRYSC.js → chunk-USAJMMF2.js} +1248 -59
- package/dist/chunk-USAJMMF2.js.br +0 -0
- package/dist/chunk-USAJMMF2.js.gz +0 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +39 -39
- 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 +37 -7
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +78 -78
- package/dist/internals.js.br +5 -4
- 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/{useViewerBuildingBlocks-CBZrHhxl.d.ts → useViewerBuildingBlocks-Xddn6SFj.d.ts} +15 -1
- package/dist/useViewerBuildingBlocks-Xddn6SFj.d.ts.map +1 -0
- 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-6B26AZGA.mjs.br +0 -0
- package/dist/AiChatPanel-6B26AZGA.mjs.gz +0 -0
- package/dist/AiChatPanel-FGEIZQCD.js.br +0 -0
- package/dist/AiChatPanel-FGEIZQCD.js.gz +0 -0
- package/dist/Model3DScene-2JX5CUPK.js.br +0 -0
- package/dist/Model3DScene-2JX5CUPK.js.gz +0 -0
- package/dist/Model3DScene-NKYNKUPP.mjs.br +0 -0
- package/dist/Model3DScene-NKYNKUPP.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-AE5SKG7U.js.br +0 -0
- package/dist/SurfaceChart3DScene-AE5SKG7U.js.gz +0 -0
- package/dist/SurfaceChart3DScene-TTL2FTEG.mjs.gz +0 -0
- package/dist/chunk-247XH4EN.mjs.br +0 -0
- package/dist/chunk-247XH4EN.mjs.gz +0 -0
- package/dist/chunk-5YGTUHNO.mjs.br +0 -0
- package/dist/chunk-5YGTUHNO.mjs.gz +0 -0
- package/dist/chunk-6QGTRYSC.js.br +0 -0
- package/dist/chunk-6QGTRYSC.js.gz +0 -0
- package/dist/chunk-EFZ4K6V5.mjs.br +0 -0
- package/dist/chunk-EFZ4K6V5.mjs.gz +0 -0
- package/dist/chunk-LCWZ4TD4.js.br +0 -0
- package/dist/chunk-LCWZ4TD4.js.gz +0 -0
- package/dist/chunk-MZN2UIYT.mjs.br +0 -0
- package/dist/chunk-MZN2UIYT.mjs.gz +0 -0
- package/dist/chunk-P65VL2I6.js.br +0 -0
- package/dist/chunk-P65VL2I6.js.gz +0 -0
- package/dist/chunk-UNWU6D2M.js.br +0 -0
- package/dist/chunk-UNWU6D2M.js.gz +0 -0
- package/dist/chunk-VZI35LEF.js.br +0 -0
- package/dist/chunk-VZI35LEF.js.gz +0 -0
- package/dist/chunk-Y6W5LGTR.mjs.br +0 -0
- package/dist/chunk-Y6W5LGTR.mjs.gz +0 -0
- package/dist/useViewerBuildingBlocks-CBZrHhxl.d.ts.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { computeFocusTargets, aiChangeAnimationCss, changeGhostStyle, createChatHistoryStore, toRenderableParts } from './chunk-
|
|
2
|
-
import { useReducedMotion, useViewerState, useViewerOptions, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useYjsDocumentSync, useCollaborationLivePatch, useFollowMode, useBroadcastFollower, scopeLayoutOptionsToActiveSlide, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, useCollaborativeState, useVirtualizedSlides, useSwipeNavigation, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, downloadBlob } from './chunk-
|
|
3
|
-
import { MIN_ELEMENT_SIZE, DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, SHAPE_PRESETS, ANIMATION_PRESET_OPTIONS, DEFAULT_FILL_COLOR, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getCropShapeClipPath,
|
|
1
|
+
import { computeFocusTargets, aiChangeAnimationCss, changeGhostStyle, createChatHistoryStore, toRenderableParts } from './chunk-QNKJUUKD.mjs';
|
|
2
|
+
import { useReducedMotion, useViewerState, useViewerOptions, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useLayoutSwitching, useYjsDocumentSync, useCollaborationLivePatch, useFollowMode, useBroadcastFollower, scopeLayoutOptionsToActiveSlide, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, useCollaborativeState, useVirtualizedSlides, useSwipeNavigation, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, downloadBlob } from './chunk-KVNZGR3L.mjs';
|
|
3
|
+
import { MIN_ELEMENT_SIZE, DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, SHAPE_PRESETS, ANIMATION_PRESET_OPTIONS, DEFAULT_FILL_COLOR, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getCropShapeClipPath, isImageTiled, getImageTilingStyle, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, buildTextBody3DSceneStyle, SLIDE_NAV_THUMBNAIL_WIDTH, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, TOOLBAR_SECTIONS, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, HYPERLINK_COLOR, GRID_SIZE, CONNECTOR_ARROW_OPTIONS, ARROW_SIZE_OPTIONS, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, THEME_COLOR_SWATCHES, STROKE_DASH_OPTIONS } from './chunk-J5V7UCD2.mjs';
|
|
4
4
|
import { LOCALE_CATALOG, translationsEn } from './chunk-5IUEPQTK.mjs';
|
|
5
|
-
import { hasShapeProperties, normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, hasTextProperties, getElementTransform, isEditableTextElement, isElementRendered, isElementActionable, getAriaRole, getAriaLabel, getAriaRoleDescription, getImageEffectsOpacity, getImageEffectsFilter, getElementTransformWithoutRotation, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, ACTION_BUTTON_PRESETS, mediaTransportVisible, isInkElement, getElementLabel, SWITCHABLE_LAYOUT_TYPES, DEFAULT_VIEWER_OPTIONS, compileEquationTemplateMathMl, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, viewerOptionsToPreferences, applyPreferenceToOptions, listAutosaveSnapshots, deleteAutosaveSnapshot, paintedStrokeWidth, buildCssGradientFromShapeStyle, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, getComputedEffectStyle, getSoftEdgeSvgFilter, buildStrokeOutline, buildHollowHitOutline, strokeOutlineViewBox, getGroupChildParentFill, revealedSmartArtNodeCount, buildSmartArtA11y, buildSummaryZoomView, getImageColorWashStyle, isImageLikeElement, placeCaretAtEnd, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, applyChartBuildReveal, formatAxisValue, hasPressureVariation, getInkReplayStyles, INK_REPLAY_KEYFRAMES, resolveInkColor, resolveInkWidth, resolveInkOpacity, pressuresToWidths, getContentPartReplayStyles, resolveOleType, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, RULER_THICKNESS, RULER_FONT_SIZE, buildPreviewElements, deriveSlideFieldContext, SLIDE_TRANSITION_OPTIONS, hiddenSlideCue, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, themeToCssVars, applyMotionPathPreset, DEFAULT_INSERT_CHART_KIND, hasCopyableFormat, templateSchemeFromTheme, createBackstagePresentation, printPropertiesFrameSlides, printPropertiesSlidesPerPage, VIEWER_OPTIONS_TABS, DEFAULT_QUICK_ACCESS_COMMAND_IDS, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_PANEL_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_HINT_CLASS, resolveDrawingShapeNodeId, getImageSvgFilters, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, findChartPartTarget, dragValueForPart, withChartPointValue, dragAnchorViewY, withChartTitle, computeSmartArtLayout, buildSmartArt3DModel, extractPathPoints, generatePressureCircles, isBrowserOpenableMime, formatBytes, getOleBadgeLabel, openUrlInNewTab, getSubstituteFontFamily, getWarpPath, getSlideBackgroundStyle, filterCommands, resolveTitleBarStatusKey, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, buildFieldSubstitutionContext, shouldConfirmExternalHyperlink, safeOpenUrl, isPpactionUrl, parsePpactionUrl, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, buildContextMenuEntries, themeColorSchemesEqual, STATUS_BAR_CLASSES, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, clampPercent, HANDOUT_OPTIONS, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS, resolveViewerAddinRows, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, activateModalFocus, buildCollaborationShareUrl, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, computeInlineEditorRect, findSmartArtNodeText, setSmartArtNodeStyle, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, updateSmartArtNodeText, groupIntoParagraphs, substituteFieldText, extraQuickAccessCommands, TAB_ROW_ACTION_CLASSES, listBackstageRecentFiles, BACKSTAGE_NAV, INSERT_CHART_TYPES, CHARACTER_SPACING_OPTIONS, DEFAULT_MOTION_PATH_PRESET_ID, SLIDE_VIRTUALIZATION_THRESHOLD, PRESENTATION_STAGE_ATTRIBUTE, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, annotationOverlayZIndex, presentationInkPath, motionPathFor, setMotionPath, getShapeAdjustmentHandleDescriptor, PRESENTER_NAVIGATOR_LABEL_KEYS, PEN_COLORS, HIGHLIGHTER_COLORS, isBlackboardActive, PRESET_THEMES, isUrlSafe, sanitizeMathMl, computeHandoutLayout, getPrintableArea, generateNoteLineCount, computeAllNotesPages, getNotesPrintableArea, QUICK_ACCESS_COMMAND_CATALOG, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, PRESENTER_CONSOLE_CONTROLS, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, backstageCardsFor, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, ENTRANCE_PRESET_VALUES, EMPHASIS_PRESET_VALUES, EXIT_PRESET_VALUES, MOTION_PATH_FAMILIES, motionPathFamilyLabelKey, motionPathPresetsByFamily, motionPathPresetLabelKey, getConnectionSites, generateTicks, rulerDragToGuidePosition, getCommentMarkerPosition, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, themeColorLabel, buildThemeColorGrid, THEME_COLOR_SCHEME_KEYS, COMMON_FONTS, buildSmartArtPresetData, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, SLIDE_TEMPLATES, mergeSlideTransition, buildSlideTemplateContent, buildTableDataGrid, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, TABLE_STYLE_PRESETS, chartDataChangeType, setChartCategoryLabel, setChartCellValue, addChartCategory, removeChartCategory, addChartSeries, removeChartSeries, setChartAxisLogScale, setChartAxisTitleStyle, setChartAxisGridlineStyle, setChartSeriesMarker, setChartSeriesChartType, setChartDataPointFill, setChartDataPointExplosion, setChartDataPointMarker, setChartDataPointLabel, getOleObjectTypeLabel, sanitizeGradientStops, pptxActionToElementAction, withFrameSlides, withSlidesPerPage, applyThemeOverrideToSlide, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, TRANSITION_VALID_DIRECTIONS, TRANSITION_ORIENTATION_TYPES, clampTransitionNumber, flattenTagCollections, formatCommentTimestamp, clearMotionPath, DIRECTIONAL_PRESETS, motionPathPresetIdForPath, computeMergeCellRight, computeMergeCellDown, computeSplitCell, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, addSmartArtNodeAsChild, removeSmartArtNode, clampCropValue, DUOTONE_PRESETS, ARTISTIC_EFFECTS, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, toSlideIndex, elementActionToPptxAction, canCommitActionType, TRANSITION_DIR_ARROWS, buildDirectionGrid, updateTagInCollections, deleteTagFromCollections, addTagToCollections, animationEffectLabel, LBL, SEL, FILL_MODE_OPTIONS, SECTION_HEADING, NUM, switchSmartArtLayout, addSmartArtNode, demoteSmartArtNode, promoteSmartArtNode, reorderSmartArtNode, SHAPE_QUICK_STYLES, quickStyleSwatchCss, getPatternSvg, TEXT_WARP_PRESETS, warpPreviewPath, text3dPtToEmu, text3dEmuToPt, MATERIAL_PRESETS, GRADIENT_TYPE_OPTIONS, PATTERN_OPTIONS, FILL_PATTERN_LABEL_KEYS, openNativeEyeDropper, toggleText3dExtrusion, BEVEL_PRESETS } from './chunk-
|
|
5
|
+
import { hasShapeProperties, normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, hasTextProperties, getElementTransform, isEditableTextElement, isElementRendered, isElementActionable, getAriaRole, getAriaLabel, getAriaRoleDescription, getImageEffectsOpacity, getImageEffectsFilter, getElementTransformWithoutRotation, isHollowShapeElement, LINK_TOOLTIP_HOST_CLASS, ACTION_BUTTON_PRESETS, mediaTransportVisible, isInkElement, getElementLabel, SWITCHABLE_LAYOUT_TYPES, DEFAULT_VIEWER_OPTIONS, compileEquationTemplateMathMl, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, viewerOptionsToPreferences, applyPreferenceToOptions, listAutosaveSnapshots, deleteAutosaveSnapshot, paintedStrokeWidth, buildCssGradientFromShapeStyle, ensureActionAffordanceStyles, resolveElementActionAffordance, actionAffordanceLabels, getComputedEffectStyle, getSoftEdgeSvgFilter, buildStrokeOutline, buildHollowHitOutline, strokeOutlineViewBox, getGroupChildParentFill, revealedSmartArtNodeCount, buildSmartArtA11y, buildSummaryZoomView, getImageColorWashStyle, isImageLikeElement, placeCaretAtEnd, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, applyChartBuildReveal, formatAxisValue, hasPressureVariation, getInkReplayStyles, INK_REPLAY_KEYFRAMES, resolveInkColor, resolveInkWidth, resolveInkOpacity, pressuresToWidths, getContentPartReplayStyles, resolveOleType, getOleTypeColor, getOleTypeLabel, filterRenderedElements, resolveGroupChildFill, isLinkedTextBox, getOverflowSegments, shouldUseSvgWarp, RULER_THICKNESS, RULER_FONT_SIZE, buildPreviewElements, deriveSlideFieldContext, SLIDE_TRANSITION_OPTIONS, hiddenSlideCue, HIDDEN_SLIDE_SLASH_GRADIENT, HIDDEN_SLIDE_LABEL_KEY, themeToCssVars, applyMotionPathPreset, DEFAULT_INSERT_CHART_KIND, hasCopyableFormat, templateSchemeFromTheme, createBackstagePresentation, printPropertiesFrameSlides, printPropertiesSlidesPerPage, VIEWER_OPTIONS_TABS, DEFAULT_QUICK_ACCESS_COMMAND_IDS, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, ACTION_INDICATOR_CLASS, ACTION_INDICATOR_ICON_PATH, LINK_TOOLTIP_CLASS, LINK_TOOLTIP_PANEL_CLASS, LINK_TOOLTIP_LABEL_CLASS, LINK_TOOLTIP_HINT_CLASS, DEFAULT_PALETTE2, resolvePalette, computeDrawingViewBox, projectDrawingShapes, styleShadowFilter, resolveDrawingShapeNodeId, getImageSvgFilters, buildDuotoneCacheKey, getDuotoneCachedResult, applyDuotone, setDuotoneCachedResult, buildCacheKey, DEFAULT_COLOR_CHANGE_TOLERANCE, getCachedResult, applyColorChange, setCachedResult, findChartPartTarget, dragValueForPart, withChartPointValue, dragAnchorViewY, withChartTitle, computeSmartArtLayout, buildSmartArt3DModel, extractPathPoints, generatePressureCircles, isBrowserOpenableMime, formatBytes, getOleBadgeLabel, openUrlInNewTab, getSubstituteFontFamily, getWarpPath, getSlideBackgroundStyle, filterCommands, resolveTitleBarStatusKey, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, buildFieldSubstitutionContext, shouldConfirmExternalHyperlink, safeOpenUrl, isPpactionUrl, parsePpactionUrl, isPresentationAdvanceClick, toggleBlackboard, PRESENT_TOOLBAR_CLASSES, buildContextMenuEntries, themeColorSchemesEqual, EXPANDED_MAX_HEIGHT, STATUS_BAR_CLASSES, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, compileLatexEquation, convertLatexToOmml, EQUATION_TEMPLATES, clampPercent, HANDOUT_OPTIONS, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS, resolveViewerAddinRows, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, activateModalFocus, buildCollaborationShareUrl, canGoPrevious, formatSlideCounter, READING_VIEW_COUNTER_ATTR, canGoNext, READING_VIEW_ATTR, OUTLINE_LEVEL_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_ROW_ATTR, OUTLINE_VIEW_ATTR, mobileElapsedSince, nextPresentedSlide, presenterPrevDisabled, presenterNextDisabled, formatMobileElapsed, mobileSlideCounter, presenterPaneAdvancesOnClick, presenterTimerProgress, PRESENTER_CONSOLE_CLASSES, formatElapsed, centeredSvgTextLines, buildTree, treeWidth, treeDepth, fitFontSize, computeInlineEditorRect, findSmartArtNodeText, setSmartArtNodeStyle, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, updateSmartArtNodeText, groupIntoParagraphs, substituteFieldText, extraQuickAccessCommands, TAB_ROW_ACTION_CLASSES, listBackstageRecentFiles, BACKSTAGE_NAV, INSERT_CHART_TYPES, CHARACTER_SPACING_OPTIONS, DEFAULT_MOTION_PATH_PRESET_ID, SLIDE_VIRTUALIZATION_THRESHOLD, PRESENTATION_STAGE_ATTRIBUTE, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, annotationOverlayZIndex, presentationInkPath, motionPathFor, setMotionPath, getShapeAdjustmentHandleDescriptor, PRESENTER_NAVIGATOR_LABEL_KEYS, PEN_COLORS, HIGHLIGHTER_COLORS, isBlackboardActive, PRESET_THEMES, normalizeSegments, createPlainNotesSegments, segmentsToEditorHtml, DEBOUNCE_MS, parseSegmentsFromRichEditor, segmentsToPlainText, getCurrentParagraphIndex, segmentsToParagraphs, paragraphsToSegments, MAX_INDENT_LEVEL, INDENT_PX, isUrlSafe, escapeHtml2, sanitizeMathMl, computeHandoutLayout, getPrintableArea, generateNoteLineCount, computeAllNotesPages, getNotesPrintableArea, QUICK_ACCESS_COMMAND_CATALOG, openReadingView, applyReadingViewCommand, createPresentationKeyBuffer, readingViewFitScale, READING_VIEW_STAGE_ATTR, buildOutline, applyOutlineEdit, mapOutlineKey, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, PRESENTER_CONSOLE_CONTROLS, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, styleShadow, styleStroke, nodeOpacity, truncate, paletteColour, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, backstageCardsFor, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, ENTRANCE_PRESET_VALUES, EMPHASIS_PRESET_VALUES, EXIT_PRESET_VALUES, MOTION_PATH_FAMILIES, motionPathFamilyLabelKey, motionPathPresetsByFamily, motionPathPresetLabelKey, getConnectionSites, generateTicks, rulerDragToGuidePosition, getCommentMarkerPosition, motionPathToSvgD, motionPathEndPixel, isEditableMotionPath, setMotionPathEnd, themeColorLabel, buildThemeColorGrid, THEME_COLOR_SCHEME_KEYS, COMMON_FONTS, buildSmartArtPresetData, handleReadingViewKey, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, SLIDE_TEMPLATES, mergeSlideTransition, buildSlideTemplateContent, buildTableDataGrid, appendTableElementRow, removeLastTableElementRow, appendTableElementColumn, removeLastTableElementColumn, removeTableElementColumn, removeTableElementRow, setTableElementCellText, TABLE_STYLE_PRESETS, chartDataChangeType, setChartCategoryLabel, setChartCellValue, addChartCategory, removeChartCategory, addChartSeries, removeChartSeries, setChartAxisLogScale, setChartAxisTitleStyle, setChartAxisGridlineStyle, setChartSeriesMarker, setChartSeriesChartType, setChartDataPointFill, setChartDataPointExplosion, setChartDataPointMarker, setChartDataPointLabel, getOleObjectTypeLabel, sanitizeGradientStops, pptxActionToElementAction, withFrameSlides, withSlidesPerPage, applyThemeOverrideToSlide, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, schemaLabel, THEME_COLOR_SLOT_LABEL_KEYS, TRANSITION_VALID_DIRECTIONS, TRANSITION_ORIENTATION_TYPES, clampTransitionNumber, flattenTagCollections, formatCommentTimestamp, clearMotionPath, DIRECTIONAL_PRESETS, motionPathPresetIdForPath, computeMergeCellRight, computeMergeCellDown, computeSplitCell, SMARTART_COLOR_SCHEME_LABEL_KEYS, SMARTART_STYLE_LABEL_KEYS, addSmartArtNodeAsChild, removeSmartArtNode, clampCropValue, DUOTONE_PRESETS, ARTISTIC_EFFECTS, resolveActionType, ELEMENT_ACTION_TYPE_OPTIONS, toSlideIndex, elementActionToPptxAction, canCommitActionType, TRANSITION_DIR_ARROWS, buildDirectionGrid, updateTagInCollections, deleteTagFromCollections, addTagToCollections, animationEffectLabel, LBL, SEL, FILL_MODE_OPTIONS, SECTION_HEADING, NUM, switchSmartArtLayout, addSmartArtNode, demoteSmartArtNode, promoteSmartArtNode, reorderSmartArtNode, SHAPE_QUICK_STYLES, quickStyleSwatchCss, getPatternSvg, TEXT_WARP_PRESETS, warpPreviewPath, text3dPtToEmu, text3dEmuToPt, MATERIAL_PRESETS, GRADIENT_TYPE_OPTIONS, PATTERN_OPTIONS, FILL_PATTERN_LABEL_KEYS, openNativeEyeDropper, toggleText3dExtrusion, BEVEL_PRESETS } from './chunk-D5TAZ5NL.mjs';
|
|
6
6
|
import React14, { createContext, useMemo, useState, useCallback, lazy, forwardRef, useEffect, useRef, Suspense, useLayoutEffect, useContext, Fragment as Fragment$1, useDeferredValue } from 'react';
|
|
7
7
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
@@ -2563,7 +2563,7 @@ function FailedToLoad() {
|
|
|
2563
2563
|
var LazyModel3DScene = React14.lazy(
|
|
2564
2564
|
async () => {
|
|
2565
2565
|
try {
|
|
2566
|
-
return await import('./Model3DScene-
|
|
2566
|
+
return await import('./Model3DScene-NVFP3JBJ.mjs');
|
|
2567
2567
|
} catch {
|
|
2568
2568
|
return { default: FailedToLoad };
|
|
2569
2569
|
}
|
|
@@ -2827,6 +2827,77 @@ function OleRenderer({ element: el }) {
|
|
|
2827
2827
|
);
|
|
2828
2828
|
}
|
|
2829
2829
|
var SmartArt3DContext = createContext(false);
|
|
2830
|
+
var DEFAULT_PALETTE = DEFAULT_PALETTE2;
|
|
2831
|
+
function colour(index, palette = DEFAULT_PALETTE) {
|
|
2832
|
+
return paletteColour(index, palette);
|
|
2833
|
+
}
|
|
2834
|
+
function nodeOpacity2(index, total, style) {
|
|
2835
|
+
return nodeOpacity(index, total, style ?? "flat");
|
|
2836
|
+
}
|
|
2837
|
+
function styleShadow2(style) {
|
|
2838
|
+
return styleShadow(style ?? "flat");
|
|
2839
|
+
}
|
|
2840
|
+
function styleStroke2(style) {
|
|
2841
|
+
return styleStroke(style ?? "flat");
|
|
2842
|
+
}
|
|
2843
|
+
function truncate2(text, max) {
|
|
2844
|
+
return truncate(text, max);
|
|
2845
|
+
}
|
|
2846
|
+
function resolvePalette2(el) {
|
|
2847
|
+
return el.type === "smartArt" ? resolvePalette(el.smartArtData) : DEFAULT_PALETTE;
|
|
2848
|
+
}
|
|
2849
|
+
function resolveStyle(el) {
|
|
2850
|
+
if (el.type !== "smartArt" || !el.smartArtData) {
|
|
2851
|
+
return "flat";
|
|
2852
|
+
}
|
|
2853
|
+
return el.smartArtData.style ?? "flat";
|
|
2854
|
+
}
|
|
2855
|
+
function resolveSmartArtDataPalette(data) {
|
|
2856
|
+
return resolvePalette(data);
|
|
2857
|
+
}
|
|
2858
|
+
function layoutToCategory(layout) {
|
|
2859
|
+
if (!layout) {
|
|
2860
|
+
return "list";
|
|
2861
|
+
}
|
|
2862
|
+
const map = {
|
|
2863
|
+
basicBlockList: "list",
|
|
2864
|
+
alternatingHexagons: "list",
|
|
2865
|
+
basicChevronProcess: "process",
|
|
2866
|
+
basicCycle: "cycle",
|
|
2867
|
+
basicPie: "cycle",
|
|
2868
|
+
basicRadial: "radial",
|
|
2869
|
+
basicVenn: "venn",
|
|
2870
|
+
continuousBlockProcess: "process",
|
|
2871
|
+
convergingRadial: "radial",
|
|
2872
|
+
hierarchy: "hierarchy",
|
|
2873
|
+
horizontalBulletList: "list",
|
|
2874
|
+
linearVenn: "venn",
|
|
2875
|
+
segmentedProcess: "process",
|
|
2876
|
+
stackedList: "list",
|
|
2877
|
+
tableList: "list",
|
|
2878
|
+
trapezoidList: "list",
|
|
2879
|
+
upwardArrow: "process",
|
|
2880
|
+
basicFunnel: "funnel",
|
|
2881
|
+
basicTarget: "radial",
|
|
2882
|
+
interlockingGears: "radial",
|
|
2883
|
+
basicTimeline: "process",
|
|
2884
|
+
basicMatrix: "matrix",
|
|
2885
|
+
basicPyramid: "pyramid",
|
|
2886
|
+
invertedPyramid: "pyramid",
|
|
2887
|
+
bendingProcess: "process",
|
|
2888
|
+
stepDownProcess: "stepdown",
|
|
2889
|
+
alternatingFlow: "alternatingflow",
|
|
2890
|
+
descendingProcess: "descending",
|
|
2891
|
+
pictureAccentList: "pictureaccent",
|
|
2892
|
+
verticalBlockList: "verticalblock",
|
|
2893
|
+
groupedList: "grouped",
|
|
2894
|
+
pyramidList: "pyramidlist",
|
|
2895
|
+
horizontalPictureList: "horizontalpicture",
|
|
2896
|
+
accentProcess: "accentprocess",
|
|
2897
|
+
verticalChevronList: "verticalchevron"
|
|
2898
|
+
};
|
|
2899
|
+
return map[layout] ?? "list";
|
|
2900
|
+
}
|
|
2830
2901
|
var LINE_HEIGHT_RATIO = 1.2;
|
|
2831
2902
|
var DEFAULT_FONT_SIZE = 12;
|
|
2832
2903
|
function SmartArtInlineNodeEditor({
|
|
@@ -3096,44 +3167,979 @@ function SmartArtEditableLayer({
|
|
|
3096
3167
|
}
|
|
3097
3168
|
);
|
|
3098
3169
|
}
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3170
|
+
var LABEL_WIDTH_FRACTION = 0.82;
|
|
3171
|
+
function smartArtNodeGroupProps(nodeId, shadow, label) {
|
|
3172
|
+
const props = {
|
|
3173
|
+
"data-smartart-node-id": nodeId,
|
|
3174
|
+
style: { filter: shadow, pointerEvents: "auto" }
|
|
3175
|
+
};
|
|
3176
|
+
if (label) {
|
|
3177
|
+
props.role = "img";
|
|
3178
|
+
props["aria-label"] = label;
|
|
3103
3179
|
}
|
|
3104
|
-
|
|
3180
|
+
return props;
|
|
3181
|
+
}
|
|
3182
|
+
function gearPath(cx, cy, outerR, innerR, teeth) {
|
|
3183
|
+
const segments = [];
|
|
3184
|
+
const step = Math.PI * 2 / (teeth * 2);
|
|
3185
|
+
for (let i = 0; i < teeth * 2; i++) {
|
|
3186
|
+
const angle = i * step - Math.PI / 2;
|
|
3187
|
+
const r = i % 2 === 0 ? outerR : innerR;
|
|
3188
|
+
const x = cx + r * Math.cos(angle);
|
|
3189
|
+
const y = cy + r * Math.sin(angle);
|
|
3190
|
+
segments.push(i === 0 ? `M${x},${y}` : `L${x},${y}`);
|
|
3191
|
+
}
|
|
3192
|
+
segments.push("Z");
|
|
3193
|
+
return segments.join(" ");
|
|
3194
|
+
}
|
|
3195
|
+
function SmartArtGradient({ gradient }) {
|
|
3196
|
+
const stops = gradient.stops.map((stop, i) => /* @__PURE__ */ jsx(
|
|
3105
3197
|
"stop",
|
|
3106
3198
|
{
|
|
3107
|
-
offset:
|
|
3108
|
-
stopColor:
|
|
3109
|
-
...
|
|
3199
|
+
offset: stop.offset,
|
|
3200
|
+
stopColor: stop.color,
|
|
3201
|
+
...stop.opacity !== void 0 ? { stopOpacity: stop.opacity } : {}
|
|
3110
3202
|
},
|
|
3111
|
-
`${id}-s${i}`
|
|
3203
|
+
`${gradient.id}-s${i}`
|
|
3112
3204
|
));
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3205
|
+
return gradient.kind === "radial" ? /* @__PURE__ */ jsx("radialGradient", { id: gradient.id, cx: gradient.cx, cy: gradient.cy, r: gradient.r, children: stops }) : /* @__PURE__ */ jsx(
|
|
3206
|
+
"linearGradient",
|
|
3207
|
+
{
|
|
3208
|
+
id: gradient.id,
|
|
3209
|
+
x1: gradient.x1,
|
|
3210
|
+
y1: gradient.y1,
|
|
3211
|
+
x2: gradient.x2,
|
|
3212
|
+
y2: gradient.y2,
|
|
3213
|
+
children: stops
|
|
3214
|
+
}
|
|
3215
|
+
);
|
|
3216
|
+
}
|
|
3217
|
+
function SmartArtNodeText({
|
|
3218
|
+
text,
|
|
3219
|
+
lines: positionedLines,
|
|
3220
|
+
x,
|
|
3221
|
+
y,
|
|
3222
|
+
fill,
|
|
3223
|
+
fontSize,
|
|
3224
|
+
fontWeight,
|
|
3225
|
+
fontStyle,
|
|
3226
|
+
className,
|
|
3227
|
+
anchor = "middle",
|
|
3228
|
+
maxWidth
|
|
3229
|
+
}) {
|
|
3230
|
+
if (positionedLines) {
|
|
3231
|
+
return /* @__PURE__ */ jsx(
|
|
3232
|
+
"text",
|
|
3233
|
+
{
|
|
3234
|
+
x,
|
|
3235
|
+
textAnchor: "middle",
|
|
3236
|
+
dominantBaseline: "central",
|
|
3237
|
+
fill,
|
|
3238
|
+
fontSize,
|
|
3239
|
+
fontWeight,
|
|
3240
|
+
fontStyle,
|
|
3241
|
+
className,
|
|
3242
|
+
children: positionedLines.map((line, i) => /* @__PURE__ */ jsx("tspan", { x, y: line.y, children: line.text }, i))
|
|
3243
|
+
}
|
|
3244
|
+
);
|
|
3245
|
+
}
|
|
3246
|
+
const source = text ?? "";
|
|
3247
|
+
const lines = maxWidth !== void 0 ? centeredSvgTextLines(source, fontSize, { maxWidth: maxWidth * LABEL_WIDTH_FRACTION }).map(
|
|
3248
|
+
(line) => line.text
|
|
3249
|
+
) : source.split("\n").filter((l) => l.length > 0);
|
|
3250
|
+
const lineHeight = fontSize * 1.2;
|
|
3251
|
+
let startY;
|
|
3252
|
+
let dominantBaseline;
|
|
3253
|
+
if (anchor === "bottom") {
|
|
3254
|
+
startY = lines.length > 0 ? y - (lines.length - 1) * lineHeight : y;
|
|
3255
|
+
dominantBaseline = "auto";
|
|
3256
|
+
} else if (anchor === "top") {
|
|
3257
|
+
startY = y;
|
|
3258
|
+
dominantBaseline = "hanging";
|
|
3259
|
+
} else {
|
|
3260
|
+
const totalHeight = lines.length * lineHeight;
|
|
3261
|
+
startY = lines.length > 0 ? y - totalHeight / 2 + lineHeight / 2 : y;
|
|
3262
|
+
dominantBaseline = "central";
|
|
3263
|
+
}
|
|
3264
|
+
return /* @__PURE__ */ jsx(
|
|
3265
|
+
"text",
|
|
3266
|
+
{
|
|
3267
|
+
x,
|
|
3268
|
+
textAnchor: "middle",
|
|
3269
|
+
dominantBaseline,
|
|
3270
|
+
fill,
|
|
3271
|
+
fontSize,
|
|
3272
|
+
fontWeight,
|
|
3273
|
+
fontStyle,
|
|
3274
|
+
className,
|
|
3275
|
+
children: lines.map((line, i) => /* @__PURE__ */ jsx("tspan", { x, y: startY + i * lineHeight, children: line }, i))
|
|
3276
|
+
}
|
|
3277
|
+
);
|
|
3278
|
+
}
|
|
3279
|
+
function wrapChrome(chrome, content, className, a11y) {
|
|
3280
|
+
const wrapperStyle = {};
|
|
3281
|
+
if (chrome?.backgroundColor) {
|
|
3282
|
+
wrapperStyle.backgroundColor = chrome.backgroundColor;
|
|
3283
|
+
}
|
|
3284
|
+
if (chrome?.outlineColor) {
|
|
3285
|
+
wrapperStyle.border = `${chrome.outlineWidth ?? 1}px solid ${chrome.outlineColor}`;
|
|
3286
|
+
}
|
|
3287
|
+
return /* @__PURE__ */ jsx(
|
|
3288
|
+
"div",
|
|
3289
|
+
{
|
|
3290
|
+
className: `w-full h-full ${className}`,
|
|
3291
|
+
style: wrapperStyle,
|
|
3292
|
+
role: a11y?.role,
|
|
3293
|
+
"aria-label": a11y?.label,
|
|
3294
|
+
children: content
|
|
3295
|
+
}
|
|
3296
|
+
);
|
|
3297
|
+
}
|
|
3298
|
+
function renderStepDownProcess(element, nodes, palette, style) {
|
|
3299
|
+
const w = element.width;
|
|
3300
|
+
const h = element.height;
|
|
3301
|
+
const pad = 8;
|
|
3302
|
+
const usableW = w - pad * 2;
|
|
3303
|
+
const usableH = h - pad * 2;
|
|
3304
|
+
const stepW = usableW / nodes.length;
|
|
3305
|
+
const stepH = usableH / nodes.length;
|
|
3306
|
+
const boxW = stepW * 0.85;
|
|
3307
|
+
const boxH = stepH * 0.6;
|
|
3308
|
+
const shadow = styleShadow2(style);
|
|
3309
|
+
const sw = styleStroke2(style);
|
|
3310
|
+
return /* @__PURE__ */ jsx(
|
|
3311
|
+
"svg",
|
|
3312
|
+
{
|
|
3313
|
+
className: "w-full h-full pointer-events-none",
|
|
3314
|
+
viewBox: `0 0 ${w} ${h}`,
|
|
3315
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
3316
|
+
style: { filter: shadow },
|
|
3317
|
+
children: nodes.map((node, i) => {
|
|
3318
|
+
const x = pad + i * stepW;
|
|
3319
|
+
const y = pad + i * stepH;
|
|
3320
|
+
const fontSize = Math.max(7, Math.min(10, boxW * 0.1));
|
|
3321
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
3322
|
+
i < nodes.length - 1 && /* @__PURE__ */ jsx(
|
|
3323
|
+
"line",
|
|
3324
|
+
{
|
|
3325
|
+
x1: x + boxW,
|
|
3326
|
+
y1: y + boxH / 2,
|
|
3327
|
+
x2: x + stepW,
|
|
3328
|
+
y2: y + stepH + boxH / 2,
|
|
3329
|
+
stroke: "#94a3b8",
|
|
3330
|
+
strokeWidth: 1.5,
|
|
3331
|
+
opacity: 0.5
|
|
3332
|
+
}
|
|
3333
|
+
),
|
|
3334
|
+
/* @__PURE__ */ jsx(
|
|
3335
|
+
"rect",
|
|
3336
|
+
{
|
|
3337
|
+
x,
|
|
3338
|
+
y,
|
|
3339
|
+
width: boxW,
|
|
3340
|
+
height: boxH,
|
|
3341
|
+
rx: 5,
|
|
3342
|
+
fill: colour(i, palette),
|
|
3343
|
+
opacity: nodeOpacity2(i, nodes.length, style),
|
|
3344
|
+
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
3345
|
+
strokeWidth: sw
|
|
3346
|
+
}
|
|
3347
|
+
),
|
|
3348
|
+
/* @__PURE__ */ jsx(
|
|
3349
|
+
SmartArtNodeText,
|
|
3350
|
+
{
|
|
3351
|
+
x: x + boxW / 2,
|
|
3352
|
+
y: y + boxH / 2,
|
|
3353
|
+
text: truncate2(node.text, 20),
|
|
3354
|
+
fill: "white",
|
|
3355
|
+
fontSize,
|
|
3356
|
+
className: "pointer-events-none"
|
|
3357
|
+
}
|
|
3358
|
+
)
|
|
3359
|
+
] }, `${element.id}-stepdown-${node.id}-${i}`);
|
|
3360
|
+
})
|
|
3361
|
+
}
|
|
3362
|
+
);
|
|
3363
|
+
}
|
|
3364
|
+
function renderAlternatingFlow(element, nodes, palette, style) {
|
|
3365
|
+
const w = element.width;
|
|
3366
|
+
const h = element.height;
|
|
3367
|
+
const pad = 8;
|
|
3368
|
+
const usableH = h - pad * 2;
|
|
3369
|
+
const rowH = usableH / nodes.length;
|
|
3370
|
+
const halfW = (w - pad * 2) / 2;
|
|
3371
|
+
const boxW = halfW * 0.8;
|
|
3372
|
+
const boxH = Math.min(rowH * 0.7, 40);
|
|
3373
|
+
const centerX = w / 2;
|
|
3374
|
+
const shadow = styleShadow2(style);
|
|
3375
|
+
const sw = styleStroke2(style);
|
|
3376
|
+
return /* @__PURE__ */ jsxs(
|
|
3377
|
+
"svg",
|
|
3378
|
+
{
|
|
3379
|
+
className: "w-full h-full pointer-events-none",
|
|
3380
|
+
viewBox: `0 0 ${w} ${h}`,
|
|
3381
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
3382
|
+
style: { filter: shadow },
|
|
3383
|
+
children: [
|
|
3384
|
+
/* @__PURE__ */ jsx(
|
|
3385
|
+
"line",
|
|
3386
|
+
{
|
|
3387
|
+
x1: centerX,
|
|
3388
|
+
y1: pad,
|
|
3389
|
+
x2: centerX,
|
|
3390
|
+
y2: h - pad,
|
|
3391
|
+
stroke: "#94a3b8",
|
|
3392
|
+
strokeWidth: 2,
|
|
3393
|
+
opacity: 0.3
|
|
3394
|
+
}
|
|
3395
|
+
),
|
|
3396
|
+
nodes.map((node, i) => {
|
|
3397
|
+
const isLeft = i % 2 === 0;
|
|
3398
|
+
const y = pad + i * rowH + (rowH - boxH) / 2;
|
|
3399
|
+
const x = isLeft ? centerX - boxW - 12 : centerX + 12;
|
|
3400
|
+
const fontSize = Math.max(7, Math.min(10, boxW * 0.1));
|
|
3401
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
3402
|
+
/* @__PURE__ */ jsx(
|
|
3403
|
+
"line",
|
|
3404
|
+
{
|
|
3405
|
+
x1: isLeft ? x + boxW : x,
|
|
3406
|
+
y1: y + boxH / 2,
|
|
3407
|
+
x2: centerX,
|
|
3408
|
+
y2: y + boxH / 2,
|
|
3409
|
+
stroke: colour(i, palette),
|
|
3410
|
+
strokeWidth: 1.5,
|
|
3411
|
+
opacity: 0.5
|
|
3412
|
+
}
|
|
3413
|
+
),
|
|
3414
|
+
/* @__PURE__ */ jsx("circle", { cx: centerX, cy: y + boxH / 2, r: 3, fill: colour(i, palette), opacity: 0.8 }),
|
|
3415
|
+
/* @__PURE__ */ jsx(
|
|
3416
|
+
"rect",
|
|
3417
|
+
{
|
|
3418
|
+
x,
|
|
3419
|
+
y,
|
|
3420
|
+
width: boxW,
|
|
3421
|
+
height: boxH,
|
|
3422
|
+
rx: 5,
|
|
3423
|
+
fill: colour(i, palette),
|
|
3424
|
+
opacity: nodeOpacity2(i, nodes.length, style),
|
|
3425
|
+
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
3426
|
+
strokeWidth: sw
|
|
3427
|
+
}
|
|
3428
|
+
),
|
|
3429
|
+
/* @__PURE__ */ jsx(
|
|
3430
|
+
SmartArtNodeText,
|
|
3431
|
+
{
|
|
3432
|
+
x: x + boxW / 2,
|
|
3433
|
+
y: y + boxH / 2,
|
|
3434
|
+
text: truncate2(node.text, 20),
|
|
3435
|
+
fill: "white",
|
|
3436
|
+
fontSize,
|
|
3437
|
+
className: "pointer-events-none"
|
|
3438
|
+
}
|
|
3439
|
+
)
|
|
3440
|
+
] }, `${element.id}-altflow-${node.id}-${i}`);
|
|
3441
|
+
})
|
|
3442
|
+
]
|
|
3443
|
+
}
|
|
3444
|
+
);
|
|
3445
|
+
}
|
|
3446
|
+
function renderDescendingProcess(element, nodes, palette, style) {
|
|
3447
|
+
const w = element.width;
|
|
3448
|
+
const h = element.height;
|
|
3449
|
+
const pad = 8;
|
|
3450
|
+
const gap = 4;
|
|
3451
|
+
const usableH = h - pad * 2;
|
|
3452
|
+
const maxW = w - pad * 2;
|
|
3453
|
+
const itemH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
3454
|
+
const shadow = styleShadow2(style);
|
|
3455
|
+
const sw = styleStroke2(style);
|
|
3456
|
+
return /* @__PURE__ */ jsx(
|
|
3457
|
+
"svg",
|
|
3458
|
+
{
|
|
3459
|
+
className: "w-full h-full pointer-events-none",
|
|
3460
|
+
viewBox: `0 0 ${w} ${h}`,
|
|
3461
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
3462
|
+
style: { filter: shadow },
|
|
3463
|
+
children: nodes.map((node, i) => {
|
|
3464
|
+
const widthFraction = 1 - i / Math.max(nodes.length, 1) * 0.5;
|
|
3465
|
+
const bw = maxW * widthFraction;
|
|
3466
|
+
const x = (w - bw) / 2;
|
|
3467
|
+
const y = pad + i * (itemH + gap);
|
|
3468
|
+
const fontSize = Math.max(7, Math.min(11, itemH * 0.4));
|
|
3469
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
3470
|
+
i < nodes.length - 1 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3471
|
+
/* @__PURE__ */ jsx(
|
|
3472
|
+
"line",
|
|
3473
|
+
{
|
|
3474
|
+
x1: w / 2,
|
|
3475
|
+
y1: y + itemH,
|
|
3476
|
+
x2: w / 2,
|
|
3477
|
+
y2: y + itemH + gap,
|
|
3478
|
+
stroke: "#94a3b8",
|
|
3479
|
+
strokeWidth: 1.5,
|
|
3480
|
+
opacity: 0.5
|
|
3481
|
+
}
|
|
3482
|
+
),
|
|
3483
|
+
/* @__PURE__ */ jsx(
|
|
3484
|
+
"polygon",
|
|
3485
|
+
{
|
|
3486
|
+
points: `${w / 2 - 3},${y + itemH + gap - 4} ${w / 2},${y + itemH + gap} ${w / 2 + 3},${y + itemH + gap - 4}`,
|
|
3487
|
+
fill: "#94a3b8",
|
|
3488
|
+
opacity: 0.5
|
|
3489
|
+
}
|
|
3490
|
+
)
|
|
3491
|
+
] }),
|
|
3492
|
+
/* @__PURE__ */ jsx(
|
|
3493
|
+
"rect",
|
|
3494
|
+
{
|
|
3495
|
+
x,
|
|
3496
|
+
y,
|
|
3497
|
+
width: bw,
|
|
3498
|
+
height: itemH,
|
|
3499
|
+
rx: 5,
|
|
3500
|
+
fill: colour(i, palette),
|
|
3501
|
+
opacity: nodeOpacity2(i, nodes.length, style),
|
|
3502
|
+
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
3503
|
+
strokeWidth: sw
|
|
3504
|
+
}
|
|
3505
|
+
),
|
|
3506
|
+
/* @__PURE__ */ jsx(
|
|
3507
|
+
SmartArtNodeText,
|
|
3508
|
+
{
|
|
3509
|
+
x: w / 2,
|
|
3510
|
+
y: y + itemH / 2,
|
|
3511
|
+
text: truncate2(node.text, 30),
|
|
3512
|
+
fill: "white",
|
|
3513
|
+
fontSize,
|
|
3514
|
+
className: "pointer-events-none"
|
|
3515
|
+
}
|
|
3516
|
+
)
|
|
3517
|
+
] }, `${element.id}-desc-${node.id}-${i}`);
|
|
3518
|
+
})
|
|
3519
|
+
}
|
|
3520
|
+
);
|
|
3521
|
+
}
|
|
3522
|
+
function renderPictureAccentList(element, nodes, palette, style) {
|
|
3523
|
+
const w = element.width;
|
|
3524
|
+
const h = element.height;
|
|
3525
|
+
const pad = 8;
|
|
3526
|
+
const gap = 6;
|
|
3527
|
+
const usableH = h - pad * 2;
|
|
3528
|
+
const usableW = w - pad * 2;
|
|
3529
|
+
const itemH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
3530
|
+
const circleR = Math.min(itemH * 0.38, 18);
|
|
3531
|
+
const textX = pad + circleR * 2 + 12;
|
|
3532
|
+
const textW = usableW - circleR * 2 - 16;
|
|
3533
|
+
const shadow = styleShadow2(style);
|
|
3534
|
+
const sw = styleStroke2(style);
|
|
3535
|
+
return /* @__PURE__ */ jsx(
|
|
3536
|
+
"svg",
|
|
3537
|
+
{
|
|
3538
|
+
className: "w-full h-full pointer-events-none",
|
|
3539
|
+
viewBox: `0 0 ${w} ${h}`,
|
|
3540
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
3541
|
+
style: { filter: shadow },
|
|
3542
|
+
children: nodes.map((node, i) => {
|
|
3543
|
+
const y = pad + i * (itemH + gap);
|
|
3544
|
+
const cy = y + itemH / 2;
|
|
3545
|
+
const col = colour(i, palette);
|
|
3546
|
+
const fontSize = Math.max(7, Math.min(11, itemH * 0.35));
|
|
3547
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
3548
|
+
/* @__PURE__ */ jsx(
|
|
3549
|
+
"circle",
|
|
3550
|
+
{
|
|
3551
|
+
cx: pad + circleR,
|
|
3552
|
+
cy,
|
|
3553
|
+
r: circleR,
|
|
3554
|
+
fill: col,
|
|
3555
|
+
opacity: nodeOpacity2(i, nodes.length, style)
|
|
3556
|
+
}
|
|
3557
|
+
),
|
|
3558
|
+
/* @__PURE__ */ jsx(
|
|
3559
|
+
"text",
|
|
3560
|
+
{
|
|
3561
|
+
x: pad + circleR,
|
|
3562
|
+
y: cy,
|
|
3563
|
+
textAnchor: "middle",
|
|
3564
|
+
dominantBaseline: "central",
|
|
3565
|
+
fill: "white",
|
|
3566
|
+
fontSize: Math.max(7, circleR * 0.7),
|
|
3567
|
+
fontWeight: "bold",
|
|
3568
|
+
className: "pointer-events-none",
|
|
3569
|
+
children: i + 1
|
|
3570
|
+
}
|
|
3571
|
+
),
|
|
3572
|
+
/* @__PURE__ */ jsx(
|
|
3573
|
+
"rect",
|
|
3574
|
+
{
|
|
3575
|
+
x: textX,
|
|
3576
|
+
y: y + 2,
|
|
3577
|
+
width: textW,
|
|
3578
|
+
height: itemH - 4,
|
|
3579
|
+
rx: 4,
|
|
3580
|
+
fill: col,
|
|
3581
|
+
opacity: 0.12,
|
|
3582
|
+
stroke: col,
|
|
3583
|
+
strokeWidth: sw > 0 ? sw : 1,
|
|
3584
|
+
strokeOpacity: 0.3
|
|
3585
|
+
}
|
|
3586
|
+
),
|
|
3587
|
+
/* @__PURE__ */ jsx(
|
|
3588
|
+
"text",
|
|
3589
|
+
{
|
|
3590
|
+
x: textX + 8,
|
|
3591
|
+
y: cy,
|
|
3592
|
+
textAnchor: "start",
|
|
3593
|
+
dominantBaseline: "central",
|
|
3594
|
+
fill: col,
|
|
3595
|
+
fontSize,
|
|
3596
|
+
className: "pointer-events-none",
|
|
3597
|
+
children: truncate2(node.text, 40)
|
|
3598
|
+
}
|
|
3599
|
+
)
|
|
3600
|
+
] }, `${element.id}-picacc-${node.id}-${i}`);
|
|
3601
|
+
})
|
|
3602
|
+
}
|
|
3603
|
+
);
|
|
3604
|
+
}
|
|
3605
|
+
function renderVerticalBlockList(element, nodes, palette, style) {
|
|
3606
|
+
const w = element.width;
|
|
3607
|
+
const h = element.height;
|
|
3608
|
+
const pad = 8;
|
|
3609
|
+
const gap = 4;
|
|
3610
|
+
const usableH = h - pad * 2;
|
|
3611
|
+
const usableW = w - pad * 2;
|
|
3612
|
+
const itemH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
3613
|
+
const headerW = usableW * 0.22;
|
|
3614
|
+
const bodyW = usableW - headerW - 4;
|
|
3615
|
+
const shadow = styleShadow2(style);
|
|
3616
|
+
const sw = styleStroke2(style);
|
|
3617
|
+
return /* @__PURE__ */ jsx(
|
|
3618
|
+
"svg",
|
|
3619
|
+
{
|
|
3620
|
+
className: "w-full h-full pointer-events-none",
|
|
3621
|
+
viewBox: `0 0 ${w} ${h}`,
|
|
3622
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
3623
|
+
style: { filter: shadow },
|
|
3624
|
+
children: nodes.map((node, i) => {
|
|
3625
|
+
const y = pad + i * (itemH + gap);
|
|
3626
|
+
const col = colour(i, palette);
|
|
3627
|
+
const fontSize = Math.max(7, Math.min(11, itemH * 0.35));
|
|
3628
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
3629
|
+
/* @__PURE__ */ jsx(
|
|
3630
|
+
"rect",
|
|
3631
|
+
{
|
|
3632
|
+
x: pad,
|
|
3633
|
+
y,
|
|
3634
|
+
width: headerW,
|
|
3635
|
+
height: itemH,
|
|
3636
|
+
rx: 3,
|
|
3637
|
+
fill: col,
|
|
3638
|
+
opacity: nodeOpacity2(i, nodes.length, style),
|
|
3639
|
+
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
3640
|
+
strokeWidth: sw
|
|
3641
|
+
}
|
|
3642
|
+
),
|
|
3643
|
+
/* @__PURE__ */ jsx(
|
|
3644
|
+
"text",
|
|
3645
|
+
{
|
|
3646
|
+
x: pad + headerW / 2,
|
|
3647
|
+
y: y + itemH / 2,
|
|
3648
|
+
textAnchor: "middle",
|
|
3649
|
+
dominantBaseline: "central",
|
|
3650
|
+
fill: "white",
|
|
3651
|
+
fontSize: Math.max(8, itemH * 0.4),
|
|
3652
|
+
fontWeight: "bold",
|
|
3653
|
+
className: "pointer-events-none",
|
|
3654
|
+
children: i + 1
|
|
3655
|
+
}
|
|
3656
|
+
),
|
|
3657
|
+
/* @__PURE__ */ jsx(
|
|
3658
|
+
"rect",
|
|
3659
|
+
{
|
|
3660
|
+
x: pad + headerW + 4,
|
|
3661
|
+
y,
|
|
3662
|
+
width: bodyW,
|
|
3663
|
+
height: itemH,
|
|
3664
|
+
rx: 3,
|
|
3665
|
+
fill: col,
|
|
3666
|
+
opacity: 0.1,
|
|
3667
|
+
stroke: col,
|
|
3668
|
+
strokeWidth: 1,
|
|
3669
|
+
strokeOpacity: 0.3
|
|
3670
|
+
}
|
|
3671
|
+
),
|
|
3672
|
+
/* @__PURE__ */ jsx(
|
|
3673
|
+
"text",
|
|
3674
|
+
{
|
|
3675
|
+
x: pad + headerW + 12,
|
|
3676
|
+
y: y + itemH / 2,
|
|
3677
|
+
textAnchor: "start",
|
|
3678
|
+
dominantBaseline: "central",
|
|
3679
|
+
fill: col,
|
|
3680
|
+
fontSize,
|
|
3681
|
+
className: "pointer-events-none",
|
|
3682
|
+
children: truncate2(node.text, 40)
|
|
3683
|
+
}
|
|
3684
|
+
)
|
|
3685
|
+
] }, `${element.id}-vblk-${node.id}-${i}`);
|
|
3686
|
+
})
|
|
3687
|
+
}
|
|
3688
|
+
);
|
|
3689
|
+
}
|
|
3690
|
+
function renderGroupedList(element, nodes, palette, style) {
|
|
3691
|
+
const w = element.width;
|
|
3692
|
+
const h = element.height;
|
|
3693
|
+
const pad = 8;
|
|
3694
|
+
const gap = 8;
|
|
3695
|
+
const shadow = styleShadow2(style);
|
|
3696
|
+
const sw = styleStroke2(style);
|
|
3697
|
+
const groupSize = nodes.length <= 4 ? 2 : 3;
|
|
3698
|
+
const groups = [];
|
|
3699
|
+
for (let i = 0; i < nodes.length; i += groupSize) {
|
|
3700
|
+
groups.push(nodes.slice(i, i + groupSize));
|
|
3701
|
+
}
|
|
3702
|
+
const usableW = w - pad * 2;
|
|
3703
|
+
const groupW = (usableW - gap * (groups.length - 1)) / groups.length;
|
|
3704
|
+
const usableH = h - pad * 2;
|
|
3705
|
+
const headerH = usableH * 0.18;
|
|
3706
|
+
return /* @__PURE__ */ jsx(
|
|
3707
|
+
"svg",
|
|
3708
|
+
{
|
|
3709
|
+
className: "w-full h-full pointer-events-none",
|
|
3710
|
+
viewBox: `0 0 ${w} ${h}`,
|
|
3711
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
3712
|
+
style: { filter: shadow },
|
|
3713
|
+
children: groups.map((group, gi) => {
|
|
3714
|
+
const gx = pad + gi * (groupW + gap);
|
|
3715
|
+
const col = colour(gi, palette);
|
|
3716
|
+
const subItemGap = 3;
|
|
3717
|
+
const subItemH = (usableH - headerH - 4 - subItemGap * (group.length - 1)) / group.length;
|
|
3718
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
3719
|
+
/* @__PURE__ */ jsx(
|
|
3720
|
+
"rect",
|
|
3721
|
+
{
|
|
3722
|
+
x: gx,
|
|
3723
|
+
y: pad,
|
|
3724
|
+
width: groupW,
|
|
3725
|
+
height: headerH,
|
|
3726
|
+
rx: 4,
|
|
3727
|
+
fill: col,
|
|
3728
|
+
opacity: nodeOpacity2(gi, groups.length, style),
|
|
3729
|
+
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
3730
|
+
strokeWidth: sw
|
|
3731
|
+
}
|
|
3732
|
+
),
|
|
3733
|
+
/* @__PURE__ */ jsx(
|
|
3734
|
+
"text",
|
|
3735
|
+
{
|
|
3736
|
+
x: gx + groupW / 2,
|
|
3737
|
+
y: pad + headerH / 2,
|
|
3738
|
+
textAnchor: "middle",
|
|
3739
|
+
dominantBaseline: "central",
|
|
3740
|
+
fill: "white",
|
|
3741
|
+
fontSize: Math.max(7, Math.min(10, groupW * 0.08)),
|
|
3742
|
+
fontWeight: "bold",
|
|
3743
|
+
className: "pointer-events-none",
|
|
3744
|
+
children: `Group ${gi + 1}`
|
|
3745
|
+
}
|
|
3746
|
+
),
|
|
3747
|
+
group.map((node, si) => {
|
|
3748
|
+
const sy = pad + headerH + 4 + si * (subItemH + subItemGap);
|
|
3749
|
+
const fontSize = Math.max(7, Math.min(10, subItemH * 0.35));
|
|
3750
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
3751
|
+
/* @__PURE__ */ jsx(
|
|
3752
|
+
"rect",
|
|
3753
|
+
{
|
|
3754
|
+
x: gx + 4,
|
|
3755
|
+
y: sy,
|
|
3756
|
+
width: groupW - 8,
|
|
3757
|
+
height: subItemH,
|
|
3758
|
+
rx: 3,
|
|
3759
|
+
fill: col,
|
|
3760
|
+
opacity: 0.15,
|
|
3761
|
+
stroke: col,
|
|
3762
|
+
strokeWidth: 1,
|
|
3763
|
+
strokeOpacity: 0.3
|
|
3764
|
+
}
|
|
3765
|
+
),
|
|
3766
|
+
/* @__PURE__ */ jsx(
|
|
3767
|
+
SmartArtNodeText,
|
|
3768
|
+
{
|
|
3769
|
+
x: gx + groupW / 2,
|
|
3770
|
+
y: sy + subItemH / 2,
|
|
3771
|
+
text: truncate2(node.text, 20),
|
|
3772
|
+
fill: col,
|
|
3773
|
+
fontSize,
|
|
3774
|
+
className: "pointer-events-none"
|
|
3775
|
+
}
|
|
3776
|
+
)
|
|
3777
|
+
] }, `${element.id}-grp-${gi}-item-${node.id}-${si}`);
|
|
3778
|
+
})
|
|
3779
|
+
] }, `${element.id}-grp-${gi}`);
|
|
3780
|
+
})
|
|
3781
|
+
}
|
|
3782
|
+
);
|
|
3783
|
+
}
|
|
3784
|
+
function renderPyramidList(element, nodes, palette, style) {
|
|
3785
|
+
const w = element.width;
|
|
3786
|
+
const h = element.height;
|
|
3787
|
+
const pad = 8;
|
|
3788
|
+
const gap = 4;
|
|
3789
|
+
const usableH = h - pad * 2;
|
|
3790
|
+
const pyramidW = w * 0.35;
|
|
3791
|
+
const labelStartX = pyramidW + pad + 16;
|
|
3792
|
+
const labelW = w - labelStartX - pad;
|
|
3793
|
+
const bandH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
3794
|
+
const shadow = styleShadow2(style);
|
|
3795
|
+
return /* @__PURE__ */ jsx(
|
|
3796
|
+
"svg",
|
|
3797
|
+
{
|
|
3798
|
+
className: "w-full h-full pointer-events-none",
|
|
3799
|
+
viewBox: `0 0 ${w} ${h}`,
|
|
3800
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
3801
|
+
style: { filter: shadow },
|
|
3802
|
+
children: nodes.map((node, i) => {
|
|
3803
|
+
const y = pad + i * (bandH + gap);
|
|
3804
|
+
const col = colour(i, palette);
|
|
3805
|
+
const topFrac = 0.3 + i / Math.max(nodes.length - 1, 1) * 0.7;
|
|
3806
|
+
const segW = pyramidW * topFrac;
|
|
3807
|
+
const segX = pad + (pyramidW - segW) / 2;
|
|
3808
|
+
const fontSize = Math.max(7, Math.min(11, bandH * 0.35));
|
|
3809
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
3810
|
+
/* @__PURE__ */ jsx(
|
|
3811
|
+
"rect",
|
|
3812
|
+
{
|
|
3813
|
+
x: segX,
|
|
3814
|
+
y,
|
|
3815
|
+
width: segW,
|
|
3816
|
+
height: bandH,
|
|
3817
|
+
rx: 2,
|
|
3818
|
+
fill: col,
|
|
3819
|
+
opacity: nodeOpacity2(i, nodes.length, style)
|
|
3820
|
+
}
|
|
3821
|
+
),
|
|
3822
|
+
/* @__PURE__ */ jsx(
|
|
3823
|
+
"line",
|
|
3824
|
+
{
|
|
3825
|
+
x1: segX + segW,
|
|
3826
|
+
y1: y + bandH / 2,
|
|
3827
|
+
x2: labelStartX - 4,
|
|
3828
|
+
y2: y + bandH / 2,
|
|
3829
|
+
stroke: col,
|
|
3830
|
+
strokeWidth: 1,
|
|
3831
|
+
opacity: 0.5,
|
|
3832
|
+
strokeDasharray: "3,2"
|
|
3833
|
+
}
|
|
3834
|
+
),
|
|
3835
|
+
/* @__PURE__ */ jsx(
|
|
3836
|
+
"rect",
|
|
3837
|
+
{
|
|
3838
|
+
x: labelStartX,
|
|
3839
|
+
y: y + 2,
|
|
3840
|
+
width: labelW,
|
|
3841
|
+
height: bandH - 4,
|
|
3842
|
+
rx: 3,
|
|
3843
|
+
fill: col,
|
|
3844
|
+
opacity: 0.1,
|
|
3845
|
+
stroke: col,
|
|
3846
|
+
strokeWidth: 1,
|
|
3847
|
+
strokeOpacity: 0.25
|
|
3848
|
+
}
|
|
3849
|
+
),
|
|
3850
|
+
/* @__PURE__ */ jsx(
|
|
3851
|
+
"text",
|
|
3852
|
+
{
|
|
3853
|
+
x: labelStartX + 8,
|
|
3854
|
+
y: y + bandH / 2,
|
|
3855
|
+
textAnchor: "start",
|
|
3856
|
+
dominantBaseline: "central",
|
|
3857
|
+
fill: col,
|
|
3858
|
+
fontSize,
|
|
3859
|
+
className: "pointer-events-none",
|
|
3860
|
+
children: truncate2(node.text, 30)
|
|
3861
|
+
}
|
|
3862
|
+
)
|
|
3863
|
+
] }, `${element.id}-pyrlist-${node.id}-${i}`);
|
|
3864
|
+
})
|
|
3865
|
+
}
|
|
3866
|
+
);
|
|
3867
|
+
}
|
|
3868
|
+
function renderHorizontalPictureList(element, nodes, palette, style) {
|
|
3869
|
+
const w = element.width;
|
|
3870
|
+
const h = element.height;
|
|
3871
|
+
const pad = 8;
|
|
3872
|
+
const gap = 8;
|
|
3873
|
+
const usableW = w - pad * 2;
|
|
3874
|
+
const colW = (usableW - gap * (nodes.length - 1)) / nodes.length;
|
|
3875
|
+
const usableH = h - pad * 2;
|
|
3876
|
+
const circleR = Math.min(colW * 0.38, usableH * 0.28);
|
|
3877
|
+
const shadow = styleShadow2(style);
|
|
3878
|
+
const sw = styleStroke2(style);
|
|
3879
|
+
return /* @__PURE__ */ jsx(
|
|
3880
|
+
"svg",
|
|
3881
|
+
{
|
|
3882
|
+
className: "w-full h-full pointer-events-none",
|
|
3883
|
+
viewBox: `0 0 ${w} ${h}`,
|
|
3884
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
3885
|
+
style: { filter: shadow },
|
|
3886
|
+
children: nodes.map((node, i) => {
|
|
3887
|
+
const cx = pad + i * (colW + gap) + colW / 2;
|
|
3888
|
+
const cy = pad + circleR + 4;
|
|
3889
|
+
const col = colour(i, palette);
|
|
3890
|
+
const labelY = cy + circleR + 10;
|
|
3891
|
+
const fontSize = Math.max(7, Math.min(10, colW * 0.1));
|
|
3892
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
3893
|
+
/* @__PURE__ */ jsx(
|
|
3894
|
+
"circle",
|
|
3895
|
+
{
|
|
3896
|
+
cx,
|
|
3897
|
+
cy,
|
|
3898
|
+
r: circleR,
|
|
3899
|
+
fill: col,
|
|
3900
|
+
opacity: nodeOpacity2(i, nodes.length, style),
|
|
3901
|
+
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
3902
|
+
strokeWidth: sw
|
|
3903
|
+
}
|
|
3904
|
+
),
|
|
3905
|
+
/* @__PURE__ */ jsx(
|
|
3906
|
+
"text",
|
|
3907
|
+
{
|
|
3908
|
+
x: cx,
|
|
3909
|
+
y: cy,
|
|
3910
|
+
textAnchor: "middle",
|
|
3911
|
+
dominantBaseline: "central",
|
|
3912
|
+
fill: "white",
|
|
3913
|
+
fontSize: Math.max(8, circleR * 0.5),
|
|
3914
|
+
fontWeight: "bold",
|
|
3915
|
+
className: "pointer-events-none",
|
|
3916
|
+
children: i + 1
|
|
3917
|
+
}
|
|
3918
|
+
),
|
|
3919
|
+
/* @__PURE__ */ jsx(
|
|
3920
|
+
"text",
|
|
3921
|
+
{
|
|
3922
|
+
x: cx,
|
|
3923
|
+
y: labelY,
|
|
3924
|
+
textAnchor: "middle",
|
|
3925
|
+
dominantBaseline: "hanging",
|
|
3926
|
+
fill: col,
|
|
3927
|
+
fontSize,
|
|
3928
|
+
className: "pointer-events-none",
|
|
3929
|
+
children: truncate2(node.text, 15)
|
|
3930
|
+
}
|
|
3931
|
+
)
|
|
3932
|
+
] }, `${element.id}-hpic-${node.id}-${i}`);
|
|
3933
|
+
})
|
|
3934
|
+
}
|
|
3935
|
+
);
|
|
3936
|
+
}
|
|
3937
|
+
function renderAccentProcess(element, nodes, palette, style) {
|
|
3938
|
+
const w = element.width;
|
|
3939
|
+
const h = element.height;
|
|
3940
|
+
const pad = 8;
|
|
3941
|
+
const arrowGap = 16;
|
|
3942
|
+
const usableW = w - pad * 2;
|
|
3943
|
+
const nodeW = (usableW - arrowGap * (nodes.length - 1)) / nodes.length;
|
|
3944
|
+
const nodeH = h * 0.45;
|
|
3945
|
+
const yMid = h / 2;
|
|
3946
|
+
const circleR = Math.min(nodeW, nodeH) * 0.55;
|
|
3947
|
+
const shadow = styleShadow2(style);
|
|
3948
|
+
const sw = styleStroke2(style);
|
|
3949
|
+
return /* @__PURE__ */ jsx(
|
|
3950
|
+
"svg",
|
|
3951
|
+
{
|
|
3952
|
+
className: "w-full h-full pointer-events-none",
|
|
3953
|
+
viewBox: `0 0 ${w} ${h}`,
|
|
3954
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
3955
|
+
style: { filter: shadow },
|
|
3956
|
+
children: nodes.map((node, i) => {
|
|
3957
|
+
const x = pad + i * (nodeW + arrowGap);
|
|
3958
|
+
const cx = x + nodeW / 2;
|
|
3959
|
+
const col = colour(i, palette);
|
|
3960
|
+
const fontSize = Math.max(7, Math.min(11, nodeW * 0.1));
|
|
3961
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
3962
|
+
/* @__PURE__ */ jsx("circle", { cx, cy: yMid, r: circleR, fill: col, opacity: 0.15 }),
|
|
3963
|
+
/* @__PURE__ */ jsx(
|
|
3964
|
+
"rect",
|
|
3965
|
+
{
|
|
3966
|
+
x,
|
|
3967
|
+
y: yMid - nodeH / 2,
|
|
3968
|
+
width: nodeW,
|
|
3969
|
+
height: nodeH,
|
|
3970
|
+
rx: 5,
|
|
3971
|
+
fill: col,
|
|
3972
|
+
opacity: nodeOpacity2(i, nodes.length, style),
|
|
3973
|
+
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
3974
|
+
strokeWidth: sw
|
|
3975
|
+
}
|
|
3976
|
+
),
|
|
3977
|
+
/* @__PURE__ */ jsx(
|
|
3978
|
+
SmartArtNodeText,
|
|
3979
|
+
{
|
|
3980
|
+
x: cx,
|
|
3981
|
+
y: yMid,
|
|
3982
|
+
text: truncate2(node.text, 20),
|
|
3983
|
+
fill: "white",
|
|
3984
|
+
fontSize,
|
|
3985
|
+
className: "pointer-events-none"
|
|
3986
|
+
}
|
|
3987
|
+
),
|
|
3988
|
+
i < nodes.length - 1 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3989
|
+
/* @__PURE__ */ jsx(
|
|
3990
|
+
"line",
|
|
3991
|
+
{
|
|
3992
|
+
x1: x + nodeW + 2,
|
|
3993
|
+
y1: yMid,
|
|
3994
|
+
x2: x + nodeW + arrowGap - 2,
|
|
3995
|
+
y2: yMid,
|
|
3996
|
+
stroke: "#94a3b8",
|
|
3997
|
+
strokeWidth: 1.5,
|
|
3998
|
+
opacity: 0.5
|
|
3999
|
+
}
|
|
4000
|
+
),
|
|
4001
|
+
/* @__PURE__ */ jsx(
|
|
4002
|
+
"polygon",
|
|
4003
|
+
{
|
|
4004
|
+
points: `${x + nodeW + arrowGap - 6},${yMid - 3} ${x + nodeW + arrowGap - 2},${yMid} ${x + nodeW + arrowGap - 6},${yMid + 3}`,
|
|
4005
|
+
fill: "#94a3b8",
|
|
4006
|
+
opacity: 0.5
|
|
4007
|
+
}
|
|
4008
|
+
)
|
|
4009
|
+
] })
|
|
4010
|
+
] }, `${element.id}-accproc-${node.id}-${i}`);
|
|
4011
|
+
})
|
|
4012
|
+
}
|
|
4013
|
+
);
|
|
4014
|
+
}
|
|
4015
|
+
function renderVerticalChevronList(element, nodes, palette, style) {
|
|
4016
|
+
const w = element.width;
|
|
4017
|
+
const h = element.height;
|
|
4018
|
+
const pad = 8;
|
|
4019
|
+
const gap = 2;
|
|
4020
|
+
const usableW = w - pad * 2;
|
|
4021
|
+
const usableH = h - pad * 2;
|
|
4022
|
+
const itemH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
4023
|
+
const chevDepth = Math.min(12, itemH * 0.3);
|
|
4024
|
+
const shadow = styleShadow2(style);
|
|
4025
|
+
const sw = styleStroke2(style);
|
|
4026
|
+
return /* @__PURE__ */ jsx(
|
|
4027
|
+
"svg",
|
|
4028
|
+
{
|
|
4029
|
+
className: "w-full h-full pointer-events-none",
|
|
4030
|
+
viewBox: `0 0 ${w} ${h}`,
|
|
4031
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
4032
|
+
style: { filter: shadow },
|
|
4033
|
+
children: nodes.map((node, i) => {
|
|
4034
|
+
const x = pad;
|
|
4035
|
+
const y = pad + i * (itemH + gap);
|
|
4036
|
+
const col = colour(i, palette);
|
|
4037
|
+
const fontSize = Math.max(7, Math.min(11, itemH * 0.4));
|
|
4038
|
+
const isFirst = i === 0;
|
|
4039
|
+
const isLast = i === nodes.length - 1;
|
|
4040
|
+
const points = isFirst ? [
|
|
4041
|
+
`${x},${y}`,
|
|
4042
|
+
`${x + usableW},${y}`,
|
|
4043
|
+
`${x + usableW},${y + itemH - chevDepth}`,
|
|
4044
|
+
`${x + usableW / 2},${y + itemH}`,
|
|
4045
|
+
`${x},${y + itemH - chevDepth}`
|
|
4046
|
+
].join(" ") : isLast ? [
|
|
4047
|
+
`${x},${y + chevDepth}`,
|
|
4048
|
+
`${x + usableW / 2},${y}`,
|
|
4049
|
+
`${x + usableW},${y + chevDepth}`,
|
|
4050
|
+
`${x + usableW},${y + itemH}`,
|
|
4051
|
+
`${x},${y + itemH}`
|
|
4052
|
+
].join(" ") : [
|
|
4053
|
+
`${x},${y + chevDepth}`,
|
|
4054
|
+
`${x + usableW / 2},${y}`,
|
|
4055
|
+
`${x + usableW},${y + chevDepth}`,
|
|
4056
|
+
`${x + usableW},${y + itemH - chevDepth}`,
|
|
4057
|
+
`${x + usableW / 2},${y + itemH}`,
|
|
4058
|
+
`${x},${y + itemH - chevDepth}`
|
|
4059
|
+
].join(" ");
|
|
4060
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
4061
|
+
/* @__PURE__ */ jsx(
|
|
4062
|
+
"polygon",
|
|
4063
|
+
{
|
|
4064
|
+
points,
|
|
4065
|
+
fill: col,
|
|
4066
|
+
opacity: nodeOpacity2(i, nodes.length, style),
|
|
4067
|
+
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
4068
|
+
strokeWidth: sw
|
|
4069
|
+
}
|
|
4070
|
+
),
|
|
4071
|
+
/* @__PURE__ */ jsx(
|
|
4072
|
+
SmartArtNodeText,
|
|
4073
|
+
{
|
|
4074
|
+
x: x + usableW / 2,
|
|
4075
|
+
y: y + itemH / 2,
|
|
4076
|
+
text: truncate2(node.text, 30),
|
|
4077
|
+
fill: "white",
|
|
4078
|
+
fontSize,
|
|
4079
|
+
className: "pointer-events-none"
|
|
4080
|
+
}
|
|
4081
|
+
)
|
|
4082
|
+
] }, `${element.id}-vchev-${node.id}-${i}`);
|
|
4083
|
+
})
|
|
4084
|
+
}
|
|
4085
|
+
);
|
|
4086
|
+
}
|
|
4087
|
+
function shapeBody(shape) {
|
|
4088
|
+
switch (shape.kind) {
|
|
4089
|
+
case "image":
|
|
4090
|
+
return /* @__PURE__ */ jsx(
|
|
4091
|
+
"image",
|
|
4092
|
+
{
|
|
4093
|
+
x: shape.x,
|
|
4094
|
+
y: shape.y,
|
|
4095
|
+
width: shape.width,
|
|
4096
|
+
height: shape.height,
|
|
4097
|
+
href: shape.imageUrl,
|
|
4098
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
4099
|
+
transform: shape.transform
|
|
4100
|
+
}
|
|
4101
|
+
);
|
|
4102
|
+
case "ellipse":
|
|
4103
|
+
return /* @__PURE__ */ jsx(
|
|
4104
|
+
"ellipse",
|
|
4105
|
+
{
|
|
4106
|
+
cx: shape.cx,
|
|
4107
|
+
cy: shape.cy,
|
|
4108
|
+
rx: shape.width / 2,
|
|
4109
|
+
ry: shape.height / 2,
|
|
4110
|
+
fill: shape.fill,
|
|
4111
|
+
stroke: shape.stroke,
|
|
4112
|
+
strokeWidth: shape.strokeWidth,
|
|
4113
|
+
transform: shape.transform
|
|
4114
|
+
}
|
|
4115
|
+
);
|
|
4116
|
+
case "polygon":
|
|
4117
|
+
return /* @__PURE__ */ jsx(
|
|
4118
|
+
"polygon",
|
|
4119
|
+
{
|
|
4120
|
+
points: shape.points,
|
|
4121
|
+
fill: shape.fill,
|
|
4122
|
+
stroke: shape.stroke,
|
|
4123
|
+
strokeWidth: shape.strokeWidth,
|
|
4124
|
+
transform: shape.transform
|
|
4125
|
+
}
|
|
4126
|
+
);
|
|
4127
|
+
default:
|
|
4128
|
+
return /* @__PURE__ */ jsx(
|
|
4129
|
+
"rect",
|
|
4130
|
+
{
|
|
4131
|
+
x: shape.x,
|
|
4132
|
+
y: shape.y,
|
|
4133
|
+
width: shape.width,
|
|
4134
|
+
height: shape.height,
|
|
4135
|
+
rx: shape.rx,
|
|
4136
|
+
fill: shape.fill,
|
|
4137
|
+
stroke: shape.stroke,
|
|
4138
|
+
strokeWidth: shape.strokeWidth,
|
|
4139
|
+
transform: shape.transform
|
|
4140
|
+
}
|
|
4141
|
+
);
|
|
3118
4142
|
}
|
|
3119
|
-
const rad = (shape.fillGradientAngle ?? 0) * Math.PI / 180;
|
|
3120
|
-
const dx = Math.cos(rad) / 2;
|
|
3121
|
-
const dy = Math.sin(rad) / 2;
|
|
3122
|
-
return {
|
|
3123
|
-
ref: `url(#${id})`,
|
|
3124
|
-
def: /* @__PURE__ */ jsx(
|
|
3125
|
-
"linearGradient",
|
|
3126
|
-
{
|
|
3127
|
-
id,
|
|
3128
|
-
x1: `${(0.5 - dx) * 100}%`,
|
|
3129
|
-
y1: `${(0.5 - dy) * 100}%`,
|
|
3130
|
-
x2: `${(0.5 + dx) * 100}%`,
|
|
3131
|
-
y2: `${(0.5 + dy) * 100}%`,
|
|
3132
|
-
children: stopEls
|
|
3133
|
-
},
|
|
3134
|
-
id
|
|
3135
|
-
)
|
|
3136
|
-
};
|
|
3137
4143
|
}
|
|
3138
4144
|
function DrawingShapeRenderer({
|
|
3139
4145
|
elementId,
|
|
@@ -3143,100 +4149,36 @@ function DrawingShapeRenderer({
|
|
|
3143
4149
|
nodes,
|
|
3144
4150
|
nodeLabels
|
|
3145
4151
|
}) {
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
let maxY = -Infinity;
|
|
3150
|
-
for (const s of shapes) {
|
|
3151
|
-
if (s.x < minX) {
|
|
3152
|
-
minX = s.x;
|
|
3153
|
-
}
|
|
3154
|
-
if (s.y < minY) {
|
|
3155
|
-
minY = s.y;
|
|
3156
|
-
}
|
|
3157
|
-
if (s.x + s.width > maxX) {
|
|
3158
|
-
maxX = s.x + s.width;
|
|
3159
|
-
}
|
|
3160
|
-
if (s.y + s.height > maxY) {
|
|
3161
|
-
maxY = s.y + s.height;
|
|
3162
|
-
}
|
|
3163
|
-
}
|
|
3164
|
-
const drawingW = maxX - minX || 1;
|
|
3165
|
-
const drawingH = maxY - minY || 1;
|
|
3166
|
-
const shadow = styleShadow(style);
|
|
3167
|
-
const sw = styleStroke(style);
|
|
4152
|
+
const viewBox = computeDrawingViewBox(shapes);
|
|
4153
|
+
const rendered = projectDrawingShapes(elementId, shapes, viewBox, palette, style);
|
|
4154
|
+
const shadow = styleShadowFilter(style);
|
|
3168
4155
|
return /* @__PURE__ */ jsx(
|
|
3169
4156
|
"svg",
|
|
3170
4157
|
{
|
|
3171
|
-
viewBox: `0 0 ${
|
|
4158
|
+
viewBox: `0 0 ${viewBox.width} ${viewBox.height}`,
|
|
3172
4159
|
className: "w-full h-full pointer-events-none",
|
|
3173
4160
|
preserveAspectRatio: "xMidYMid meet",
|
|
3174
4161
|
"data-testid": "smartart-drawing-shapes",
|
|
3175
|
-
children:
|
|
3176
|
-
const
|
|
3177
|
-
const fill = gradient?.ref ?? shape.fillPatternForegroundColor ?? shape.fillColor ?? colour(i, palette);
|
|
3178
|
-
const relX = shape.x - minX;
|
|
3179
|
-
const relY = shape.y - minY;
|
|
3180
|
-
const rx = shape.shapeType === "roundRect" ? Math.min(shape.width, shape.height) * 0.1 : 0;
|
|
3181
|
-
const isEllipse = shape.shapeType === "ellipse";
|
|
3182
|
-
const isChevron = shape.shapeType === "chevron" || shape.shapeType === "homePlate";
|
|
3183
|
-
const rotation = shape.rotation ? `rotate(${shape.rotation} ${relX + shape.width / 2} ${relY + shape.height / 2})` : void 0;
|
|
3184
|
-
const strokeCol = shape.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none");
|
|
3185
|
-
const strokeW = shape.strokeWidth ?? sw;
|
|
3186
|
-
const fontSize = shape.fontSize ?? fitFontSize(shape.text ?? "", shape.width * 0.85, shape.height, 14);
|
|
3187
|
-
const nodeId = nodes ? resolveDrawingShapeNodeId(shape, i, shapes, nodes) : void 0;
|
|
4162
|
+
children: rendered.map((shape, i) => {
|
|
4163
|
+
const nodeId = nodes ? resolveDrawingShapeNodeId(shapes[i], i, shapes, nodes) : void 0;
|
|
3188
4164
|
const nodeLabel = nodeId ? nodeLabels?.get(nodeId) : void 0;
|
|
3189
4165
|
const groupProps = nodeId ? smartArtNodeGroupProps(nodeId, shadow, nodeLabel) : { style: { filter: shadow } };
|
|
3190
4166
|
return /* @__PURE__ */ jsxs("g", { ...groupProps, children: [
|
|
3191
4167
|
nodeLabel ? /* @__PURE__ */ jsx("title", { children: nodeLabel }) : null,
|
|
3192
|
-
gradient ? /* @__PURE__ */ jsx("defs", { children: gradient.
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
{
|
|
3196
|
-
cx: relX + shape.width / 2,
|
|
3197
|
-
cy: relY + shape.height / 2,
|
|
3198
|
-
rx: shape.width / 2,
|
|
3199
|
-
ry: shape.height / 2,
|
|
3200
|
-
fill,
|
|
3201
|
-
stroke: strokeCol,
|
|
3202
|
-
strokeWidth: strokeW,
|
|
3203
|
-
transform: rotation
|
|
3204
|
-
}
|
|
3205
|
-
) : isChevron ? /* @__PURE__ */ jsx(
|
|
3206
|
-
"polygon",
|
|
3207
|
-
{
|
|
3208
|
-
points: chevronPoints(relX, relY, shape.width, shape.height),
|
|
3209
|
-
fill,
|
|
3210
|
-
stroke: strokeCol,
|
|
3211
|
-
strokeWidth: strokeW,
|
|
3212
|
-
transform: rotation
|
|
3213
|
-
}
|
|
3214
|
-
) : /* @__PURE__ */ jsx(
|
|
3215
|
-
"rect",
|
|
3216
|
-
{
|
|
3217
|
-
x: relX,
|
|
3218
|
-
y: relY,
|
|
3219
|
-
width: shape.width,
|
|
3220
|
-
height: shape.height,
|
|
3221
|
-
rx,
|
|
3222
|
-
fill,
|
|
3223
|
-
stroke: strokeCol,
|
|
3224
|
-
strokeWidth: strokeW,
|
|
3225
|
-
transform: rotation
|
|
3226
|
-
}
|
|
3227
|
-
),
|
|
3228
|
-
shape.text ? /* @__PURE__ */ jsx(
|
|
4168
|
+
shape.gradient ? /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(SmartArtGradient, { gradient: shape.gradient }) }) : null,
|
|
4169
|
+
shapeBody(shape),
|
|
4170
|
+
shape.textLines.length > 0 ? /* @__PURE__ */ jsx(
|
|
3229
4171
|
SmartArtNodeText,
|
|
3230
4172
|
{
|
|
3231
|
-
x:
|
|
3232
|
-
y:
|
|
3233
|
-
|
|
3234
|
-
fill: shape.fontColor
|
|
3235
|
-
fontSize,
|
|
4173
|
+
x: shape.textX,
|
|
4174
|
+
y: shape.textY,
|
|
4175
|
+
lines: shape.textLines,
|
|
4176
|
+
fill: shape.fontColor,
|
|
4177
|
+
fontSize: shape.fontSize,
|
|
3236
4178
|
className: "pointer-events-none"
|
|
3237
4179
|
}
|
|
3238
4180
|
) : null
|
|
3239
|
-
] },
|
|
4181
|
+
] }, shape.key);
|
|
3240
4182
|
})
|
|
3241
4183
|
}
|
|
3242
4184
|
);
|
|
@@ -3268,8 +4210,8 @@ function ListRenderer({
|
|
|
3268
4210
|
const itemH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
3269
4211
|
const itemW = w - pad * 2;
|
|
3270
4212
|
const rx = Math.min(6, itemH * 0.15);
|
|
3271
|
-
const shadow =
|
|
3272
|
-
const sw =
|
|
4213
|
+
const shadow = styleShadow2(style);
|
|
4214
|
+
const sw = styleStroke2(style);
|
|
3273
4215
|
return /* @__PURE__ */ jsx(
|
|
3274
4216
|
"svg",
|
|
3275
4217
|
{
|
|
@@ -3297,7 +4239,7 @@ function ListRenderer({
|
|
|
3297
4239
|
height: itemH,
|
|
3298
4240
|
rx,
|
|
3299
4241
|
fill: ns.fill,
|
|
3300
|
-
opacity:
|
|
4242
|
+
opacity: nodeOpacity2(i, nodes.length, style),
|
|
3301
4243
|
stroke: ns.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none"),
|
|
3302
4244
|
strokeWidth: sw
|
|
3303
4245
|
}
|
|
@@ -3307,7 +4249,7 @@ function ListRenderer({
|
|
|
3307
4249
|
{
|
|
3308
4250
|
x: pad + itemW / 2,
|
|
3309
4251
|
y: y + itemH / 2,
|
|
3310
|
-
text:
|
|
4252
|
+
text: truncate2(node.text, 40),
|
|
3311
4253
|
fill: ns.fontColor,
|
|
3312
4254
|
fontWeight: ns.fontWeight,
|
|
3313
4255
|
fontStyle: ns.fontStyle,
|
|
@@ -3339,8 +4281,8 @@ function ProcessRenderer({
|
|
|
3339
4281
|
const itemW = (usableW - gap * (nodes.length - 1)) / nodes.length;
|
|
3340
4282
|
const itemH = Math.min(h - pad * 2, h * 0.6);
|
|
3341
4283
|
const yMid = h / 2;
|
|
3342
|
-
const shadow =
|
|
3343
|
-
const sw =
|
|
4284
|
+
const shadow = styleShadow2(style);
|
|
4285
|
+
const sw = styleStroke2(style);
|
|
3344
4286
|
return /* @__PURE__ */ jsx(
|
|
3345
4287
|
"svg",
|
|
3346
4288
|
{
|
|
@@ -3368,7 +4310,7 @@ function ProcessRenderer({
|
|
|
3368
4310
|
{
|
|
3369
4311
|
points,
|
|
3370
4312
|
fill: ns.fill,
|
|
3371
|
-
opacity:
|
|
4313
|
+
opacity: nodeOpacity2(i, nodes.length, style),
|
|
3372
4314
|
stroke: ns.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none"),
|
|
3373
4315
|
strokeWidth: sw
|
|
3374
4316
|
}
|
|
@@ -3378,7 +4320,7 @@ function ProcessRenderer({
|
|
|
3378
4320
|
{
|
|
3379
4321
|
x: x + itemW / 2,
|
|
3380
4322
|
y: yMid,
|
|
3381
|
-
text:
|
|
4323
|
+
text: truncate2(node.text, 25),
|
|
3382
4324
|
fill: ns.fontColor,
|
|
3383
4325
|
fontWeight: ns.fontWeight,
|
|
3384
4326
|
fontStyle: ns.fontStyle,
|
|
@@ -3408,8 +4350,8 @@ function CycleRenderer({
|
|
|
3408
4350
|
const cy = h / 2;
|
|
3409
4351
|
const radius = size * 0.35;
|
|
3410
4352
|
const nodeR = Math.max(size * 0.06, Math.min(size * 0.12, 200 / nodes.length));
|
|
3411
|
-
const shadow =
|
|
3412
|
-
const sw =
|
|
4353
|
+
const shadow = styleShadow2(style);
|
|
4354
|
+
const sw = styleStroke2(style);
|
|
3413
4355
|
return /* @__PURE__ */ jsxs(
|
|
3414
4356
|
"svg",
|
|
3415
4357
|
{
|
|
@@ -3464,7 +4406,7 @@ function CycleRenderer({
|
|
|
3464
4406
|
cy: ny,
|
|
3465
4407
|
r: nodeR,
|
|
3466
4408
|
fill: ns.fill,
|
|
3467
|
-
opacity:
|
|
4409
|
+
opacity: nodeOpacity2(i, nodes.length, style),
|
|
3468
4410
|
stroke: ns.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none"),
|
|
3469
4411
|
strokeWidth: sw
|
|
3470
4412
|
}
|
|
@@ -3474,7 +4416,7 @@ function CycleRenderer({
|
|
|
3474
4416
|
{
|
|
3475
4417
|
x: nx,
|
|
3476
4418
|
y: ny,
|
|
3477
|
-
text:
|
|
4419
|
+
text: truncate2(node.text, 20),
|
|
3478
4420
|
fill: ns.fontColor,
|
|
3479
4421
|
fontWeight: ns.fontWeight,
|
|
3480
4422
|
fontStyle: ns.fontStyle,
|
|
@@ -3509,8 +4451,8 @@ function MatrixRenderer({
|
|
|
3509
4451
|
const cellW = (usableW - gap * (cols - 1)) / cols;
|
|
3510
4452
|
const cellH = (usableH - gap * (rows - 1)) / rows;
|
|
3511
4453
|
const rx = Math.min(6, Math.min(cellW, cellH) * 0.1);
|
|
3512
|
-
const shadow =
|
|
3513
|
-
const sw =
|
|
4454
|
+
const shadow = styleShadow2(style);
|
|
4455
|
+
const sw = styleStroke2(style);
|
|
3514
4456
|
return /* @__PURE__ */ jsx(
|
|
3515
4457
|
"svg",
|
|
3516
4458
|
{
|
|
@@ -3541,7 +4483,7 @@ function MatrixRenderer({
|
|
|
3541
4483
|
height: cellH,
|
|
3542
4484
|
rx,
|
|
3543
4485
|
fill: ns.fill,
|
|
3544
|
-
opacity:
|
|
4486
|
+
opacity: nodeOpacity2(i, nodes.length, style),
|
|
3545
4487
|
stroke: ns.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none"),
|
|
3546
4488
|
strokeWidth: sw
|
|
3547
4489
|
}
|
|
@@ -3551,7 +4493,7 @@ function MatrixRenderer({
|
|
|
3551
4493
|
{
|
|
3552
4494
|
x: x + cellW / 2,
|
|
3553
4495
|
y: y + cellH / 2,
|
|
3554
|
-
text:
|
|
4496
|
+
text: truncate2(node.text, 30),
|
|
3555
4497
|
fill: ns.fontColor,
|
|
3556
4498
|
fontWeight: ns.fontWeight ?? 500,
|
|
3557
4499
|
fontStyle: ns.fontStyle,
|
|
@@ -3580,8 +4522,8 @@ function PyramidRenderer({
|
|
|
3580
4522
|
const usableH = h - pad * 2;
|
|
3581
4523
|
const bandH = (usableH - gap * (nodes.length - 1)) / nodes.length;
|
|
3582
4524
|
const maxW = w - pad * 2;
|
|
3583
|
-
const shadow =
|
|
3584
|
-
const sw =
|
|
4525
|
+
const shadow = styleShadow2(style);
|
|
4526
|
+
const sw = styleStroke2(style);
|
|
3585
4527
|
return /* @__PURE__ */ jsx(
|
|
3586
4528
|
"svg",
|
|
3587
4529
|
{
|
|
@@ -3616,7 +4558,7 @@ function PyramidRenderer({
|
|
|
3616
4558
|
{
|
|
3617
4559
|
points,
|
|
3618
4560
|
fill: colour(i, palette),
|
|
3619
|
-
opacity:
|
|
4561
|
+
opacity: nodeOpacity2(i, nodes.length, style),
|
|
3620
4562
|
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
3621
4563
|
strokeWidth: sw
|
|
3622
4564
|
}
|
|
@@ -3626,7 +4568,7 @@ function PyramidRenderer({
|
|
|
3626
4568
|
{
|
|
3627
4569
|
x: w / 2,
|
|
3628
4570
|
y: y + bandH / 2,
|
|
3629
|
-
text:
|
|
4571
|
+
text: truncate2(node.text, 30),
|
|
3630
4572
|
fill: "white",
|
|
3631
4573
|
fontSize,
|
|
3632
4574
|
className: "pointer-events-none"
|
|
@@ -3648,7 +4590,7 @@ function VennRenderer({
|
|
|
3648
4590
|
}) {
|
|
3649
4591
|
const w = element.width;
|
|
3650
4592
|
const h = element.height;
|
|
3651
|
-
const shadow =
|
|
4593
|
+
const shadow = styleShadow2(style);
|
|
3652
4594
|
if (nodes.length <= 4) {
|
|
3653
4595
|
const cx = w / 2;
|
|
3654
4596
|
const cy2 = h / 2;
|
|
@@ -3677,7 +4619,7 @@ function VennRenderer({
|
|
|
3677
4619
|
{
|
|
3678
4620
|
x: nx,
|
|
3679
4621
|
y: ny,
|
|
3680
|
-
text:
|
|
4622
|
+
text: truncate2(node.text, 20),
|
|
3681
4623
|
fill: "white",
|
|
3682
4624
|
fontSize,
|
|
3683
4625
|
fontWeight: "bold",
|
|
@@ -3718,7 +4660,7 @@ function VennRenderer({
|
|
|
3718
4660
|
{
|
|
3719
4661
|
x: nx,
|
|
3720
4662
|
y: cy,
|
|
3721
|
-
text:
|
|
4663
|
+
text: truncate2(node.text, 20),
|
|
3722
4664
|
fill: "white",
|
|
3723
4665
|
fontSize,
|
|
3724
4666
|
fontWeight: "bold",
|
|
@@ -3744,7 +4686,7 @@ function FunnelRenderer({
|
|
|
3744
4686
|
const pad = 8;
|
|
3745
4687
|
const usableW = w - pad * 2;
|
|
3746
4688
|
const stageH = (h - pad * 2) / nodes.length;
|
|
3747
|
-
const shadow =
|
|
4689
|
+
const shadow = styleShadow2(style);
|
|
3748
4690
|
return /* @__PURE__ */ jsx(
|
|
3749
4691
|
"svg",
|
|
3750
4692
|
{
|
|
@@ -3777,7 +4719,7 @@ function FunnelRenderer({
|
|
|
3777
4719
|
{
|
|
3778
4720
|
points,
|
|
3779
4721
|
fill: colour(i, palette),
|
|
3780
|
-
opacity:
|
|
4722
|
+
opacity: nodeOpacity2(i, nodes.length, style)
|
|
3781
4723
|
}
|
|
3782
4724
|
),
|
|
3783
4725
|
/* @__PURE__ */ jsx(
|
|
@@ -3785,7 +4727,7 @@ function FunnelRenderer({
|
|
|
3785
4727
|
{
|
|
3786
4728
|
x: w / 2,
|
|
3787
4729
|
y: y + stageH / 2,
|
|
3788
|
-
text:
|
|
4730
|
+
text: truncate2(node.text, 30),
|
|
3789
4731
|
fill: "white",
|
|
3790
4732
|
fontSize,
|
|
3791
4733
|
className: "pointer-events-none"
|
|
@@ -3812,7 +4754,7 @@ function TargetRenderer({
|
|
|
3812
4754
|
const maxR = Math.min(cx - 8, cy - 8);
|
|
3813
4755
|
const fontSize = Math.max(7, Math.min(10, maxR / (nodes.length + 1)));
|
|
3814
4756
|
const labelX = cx + maxR + 8;
|
|
3815
|
-
const shadow =
|
|
4757
|
+
const shadow = styleShadow2(style);
|
|
3816
4758
|
return /* @__PURE__ */ jsx(
|
|
3817
4759
|
"svg",
|
|
3818
4760
|
{
|
|
@@ -3834,7 +4776,7 @@ function TargetRenderer({
|
|
|
3834
4776
|
cy,
|
|
3835
4777
|
r: Math.max(r, 4),
|
|
3836
4778
|
fill: colour(i, palette),
|
|
3837
|
-
opacity:
|
|
4779
|
+
opacity: nodeOpacity2(i, nodes.length, style)
|
|
3838
4780
|
}
|
|
3839
4781
|
),
|
|
3840
4782
|
/* @__PURE__ */ jsx(
|
|
@@ -3859,7 +4801,7 @@ function TargetRenderer({
|
|
|
3859
4801
|
fill: colour(i, palette),
|
|
3860
4802
|
fontSize,
|
|
3861
4803
|
className: "pointer-events-none",
|
|
3862
|
-
children:
|
|
4804
|
+
children: truncate2(node.text, 30)
|
|
3863
4805
|
}
|
|
3864
4806
|
)
|
|
3865
4807
|
]
|
|
@@ -3889,8 +4831,8 @@ function HierarchyRenderer({
|
|
|
3889
4831
|
const boxW = Math.min(cellW * 0.8, 140);
|
|
3890
4832
|
const boxH = Math.min(cellH * 0.4, 36);
|
|
3891
4833
|
const rx = Math.min(6, boxH * 0.15);
|
|
3892
|
-
const shadow =
|
|
3893
|
-
const sw =
|
|
4834
|
+
const shadow = styleShadow2(style);
|
|
4835
|
+
const sw = styleStroke2(style);
|
|
3894
4836
|
const elements = [];
|
|
3895
4837
|
let colourIdx = 0;
|
|
3896
4838
|
function renderTreeNode(t, xOffset, level) {
|
|
@@ -3940,7 +4882,7 @@ function HierarchyRenderer({
|
|
|
3940
4882
|
height: boxH,
|
|
3941
4883
|
rx,
|
|
3942
4884
|
fill: colour(ci, palette),
|
|
3943
|
-
opacity:
|
|
4885
|
+
opacity: nodeOpacity2(ci, nodes.length, style),
|
|
3944
4886
|
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
3945
4887
|
strokeWidth: sw
|
|
3946
4888
|
}
|
|
@@ -3950,7 +4892,7 @@ function HierarchyRenderer({
|
|
|
3950
4892
|
{
|
|
3951
4893
|
x: nodeCx,
|
|
3952
4894
|
y: nodeCy,
|
|
3953
|
-
text:
|
|
4895
|
+
text: truncate2(t.node.text, 40),
|
|
3954
4896
|
fill: "white",
|
|
3955
4897
|
fontSize,
|
|
3956
4898
|
className: "pointer-events-none"
|
|
@@ -3999,7 +4941,7 @@ function GearRenderer({
|
|
|
3999
4941
|
const gearR = Math.min(spacing * 0.4, h * 0.35);
|
|
4000
4942
|
const innerR = gearR * 0.7;
|
|
4001
4943
|
const teethCount = 8;
|
|
4002
|
-
const shadow =
|
|
4944
|
+
const shadow = styleShadow2(style);
|
|
4003
4945
|
return /* @__PURE__ */ jsxs(
|
|
4004
4946
|
"svg",
|
|
4005
4947
|
{
|
|
@@ -4022,7 +4964,7 @@ function GearRenderer({
|
|
|
4022
4964
|
{
|
|
4023
4965
|
d: gearPath(gx, gy, gearR, innerR, teethCount),
|
|
4024
4966
|
fill: colour(i, palette),
|
|
4025
|
-
opacity:
|
|
4967
|
+
opacity: nodeOpacity2(i, nodes.length, style)
|
|
4026
4968
|
}
|
|
4027
4969
|
),
|
|
4028
4970
|
/* @__PURE__ */ jsx("circle", { cx: gx, cy: gy, r: innerR * 0.5, fill: "white", opacity: 0.25 }),
|
|
@@ -4031,7 +4973,7 @@ function GearRenderer({
|
|
|
4031
4973
|
{
|
|
4032
4974
|
x: gx,
|
|
4033
4975
|
y: gy,
|
|
4034
|
-
text:
|
|
4976
|
+
text: truncate2(node.text, 20),
|
|
4035
4977
|
fill: "white",
|
|
4036
4978
|
fontSize,
|
|
4037
4979
|
fontWeight: "bold",
|
|
@@ -4054,7 +4996,7 @@ function GearRenderer({
|
|
|
4054
4996
|
cy: ly,
|
|
4055
4997
|
r: 3,
|
|
4056
4998
|
fill: colour(gearCount + i, palette),
|
|
4057
|
-
opacity:
|
|
4999
|
+
opacity: nodeOpacity2(gearCount + i, nodes.length, style)
|
|
4058
5000
|
}
|
|
4059
5001
|
),
|
|
4060
5002
|
/* @__PURE__ */ jsx(
|
|
@@ -4067,7 +5009,7 @@ function GearRenderer({
|
|
|
4067
5009
|
fill: colour(gearCount + i, palette),
|
|
4068
5010
|
fontSize: 10,
|
|
4069
5011
|
className: "pointer-events-none",
|
|
4070
|
-
children:
|
|
5012
|
+
children: truncate2(node.text, 30)
|
|
4071
5013
|
}
|
|
4072
5014
|
)
|
|
4073
5015
|
] }, `${element.id}-gear-extra-${node.id}-${i}`);
|
|
@@ -4091,7 +5033,7 @@ function TimelineRenderer({
|
|
|
4091
5033
|
const lineLen = lineEndX - lineStartX;
|
|
4092
5034
|
const dotR = Math.max(4, Math.min(8, lineLen / (nodes.length * 4)));
|
|
4093
5035
|
const labelOffset = Math.min(h * 0.28, 40);
|
|
4094
|
-
const shadow =
|
|
5036
|
+
const shadow = styleShadow2(style);
|
|
4095
5037
|
return /* @__PURE__ */ jsxs(
|
|
4096
5038
|
"svg",
|
|
4097
5039
|
{
|
|
@@ -4138,13 +5080,13 @@ function TimelineRenderer({
|
|
|
4138
5080
|
cy: lineY,
|
|
4139
5081
|
r: dotR,
|
|
4140
5082
|
fill: colour(i, palette),
|
|
4141
|
-
opacity:
|
|
5083
|
+
opacity: nodeOpacity2(i, nodes.length, style)
|
|
4142
5084
|
}
|
|
4143
5085
|
),
|
|
4144
5086
|
/* @__PURE__ */ jsx(
|
|
4145
5087
|
SmartArtNodeText,
|
|
4146
5088
|
{
|
|
4147
|
-
text:
|
|
5089
|
+
text: truncate2(node.text, 20) ?? "",
|
|
4148
5090
|
x,
|
|
4149
5091
|
y: textY,
|
|
4150
5092
|
fill: colour(i, palette),
|
|
@@ -4180,8 +5122,8 @@ function BendingProcessRenderer({
|
|
|
4180
5122
|
const boxH = Math.min(cellH * 0.6, 32);
|
|
4181
5123
|
const rx = Math.min(5, boxH * 0.15);
|
|
4182
5124
|
const arrowSize = 6;
|
|
4183
|
-
const shadow =
|
|
4184
|
-
const sw =
|
|
5125
|
+
const shadow = styleShadow2(style);
|
|
5126
|
+
const sw = styleStroke2(style);
|
|
4185
5127
|
return /* @__PURE__ */ jsx(
|
|
4186
5128
|
"svg",
|
|
4187
5129
|
{
|
|
@@ -4267,7 +5209,7 @@ function BendingProcessRenderer({
|
|
|
4267
5209
|
height: boxH,
|
|
4268
5210
|
rx,
|
|
4269
5211
|
fill: colour(i, palette),
|
|
4270
|
-
opacity:
|
|
5212
|
+
opacity: nodeOpacity2(i, nodes.length, style),
|
|
4271
5213
|
stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
|
|
4272
5214
|
strokeWidth: sw
|
|
4273
5215
|
}
|
|
@@ -4277,7 +5219,7 @@ function BendingProcessRenderer({
|
|
|
4277
5219
|
{
|
|
4278
5220
|
x: nodeCx,
|
|
4279
5221
|
y: nodeCy,
|
|
4280
|
-
text:
|
|
5222
|
+
text: truncate2(node.text, 20),
|
|
4281
5223
|
fill: "white",
|
|
4282
5224
|
fontSize,
|
|
4283
5225
|
className: "pointer-events-none"
|
|
@@ -4327,7 +5269,7 @@ function SmartArtRendererImpl({
|
|
|
4327
5269
|
}
|
|
4328
5270
|
);
|
|
4329
5271
|
}
|
|
4330
|
-
const palette =
|
|
5272
|
+
const palette = resolvePalette2(element);
|
|
4331
5273
|
const style = resolveStyle(element);
|
|
4332
5274
|
const a11y = buildSmartArtA11y(smartArtData);
|
|
4333
5275
|
const nodeLabels = new Map(a11y.nodes.map((n) => [n.id, n.label]));
|
|
@@ -4590,7 +5532,7 @@ function SmartArt3DRenderer({
|
|
|
4590
5532
|
if (nodes.length === 0) {
|
|
4591
5533
|
return null;
|
|
4592
5534
|
}
|
|
4593
|
-
const palette =
|
|
5535
|
+
const palette = resolvePalette2(element);
|
|
4594
5536
|
const style = resolveStyle(element);
|
|
4595
5537
|
const layoutResult = computeSmartArtLayout(
|
|
4596
5538
|
nodes,
|
|
@@ -6667,7 +7609,7 @@ function AccountPage() {
|
|
|
6667
7609
|
return void 0;
|
|
6668
7610
|
});
|
|
6669
7611
|
};
|
|
6670
|
-
const version = "2.16.
|
|
7612
|
+
const version = "2.16.6" ;
|
|
6671
7613
|
return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
6672
7614
|
/* @__PURE__ */ jsxs("section", { className: cardClass, children: [
|
|
6673
7615
|
/* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -10730,6 +11672,7 @@ function Toolbar(p) {
|
|
|
10730
11672
|
onToggleFormatPainter: p.onToggleFormatPainter,
|
|
10731
11673
|
layoutOptions: p.layoutOptions,
|
|
10732
11674
|
onInsertSlideFromLayout: p.onInsertSlideFromLayout,
|
|
11675
|
+
onApplyLayout: p.onApplyLayout,
|
|
10733
11676
|
onInsertSlideFromTemplate: p.onInsertSlideFromTemplate,
|
|
10734
11677
|
templateScheme: p.templateScheme,
|
|
10735
11678
|
selectedElement: p.selectedElement,
|
|
@@ -15838,7 +16781,7 @@ function useOutlineView(input) {
|
|
|
15838
16781
|
}, [rows]);
|
|
15839
16782
|
return { rows, containerRef, run, onRowKeyDown };
|
|
15840
16783
|
}
|
|
15841
|
-
var
|
|
16784
|
+
var INDENT_PX2 = 22;
|
|
15842
16785
|
function OutlineViewOverlay({
|
|
15843
16786
|
slides,
|
|
15844
16787
|
canvasSize,
|
|
@@ -15884,7 +16827,7 @@ function OutlineViewOverlay({
|
|
|
15884
16827
|
"div",
|
|
15885
16828
|
{
|
|
15886
16829
|
className: "flex items-center gap-2 py-0.5",
|
|
15887
|
-
style: { paddingLeft: row.level *
|
|
16830
|
+
style: { paddingLeft: row.level * INDENT_PX2 },
|
|
15888
16831
|
children: [
|
|
15889
16832
|
/* @__PURE__ */ jsx("span", { className: "w-6 shrink-0 text-right text-[10px] tabular-nums text-white/40", children: row.kind === "title" ? row.slideIndex + 1 : "" }),
|
|
15890
16833
|
/* @__PURE__ */ jsx(
|
|
@@ -16116,349 +17059,6 @@ function ReadingViewOverlay({
|
|
|
16116
17059
|
}
|
|
16117
17060
|
);
|
|
16118
17061
|
}
|
|
16119
|
-
|
|
16120
|
-
// src/viewer/components/notes/notes-utils.ts
|
|
16121
|
-
var DEBOUNCE_MS = 600;
|
|
16122
|
-
var EXPANDED_MAX_HEIGHT = 200;
|
|
16123
|
-
var PX_TO_PT = 0.75;
|
|
16124
|
-
var MAX_INDENT_LEVEL = 4;
|
|
16125
|
-
var INDENT_PX2 = 24;
|
|
16126
|
-
function escapeHtml(value) {
|
|
16127
|
-
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
16128
|
-
}
|
|
16129
|
-
function createPlainNotesSegments(text) {
|
|
16130
|
-
const lines = text.split("\n");
|
|
16131
|
-
const segments = [];
|
|
16132
|
-
lines.forEach((line, index) => {
|
|
16133
|
-
segments.push({ text: line, style: {} });
|
|
16134
|
-
if (index < lines.length - 1) {
|
|
16135
|
-
segments.push({ text: "", style: {}, isParagraphBreak: true });
|
|
16136
|
-
}
|
|
16137
|
-
});
|
|
16138
|
-
if (segments.length === 0) {
|
|
16139
|
-
segments.push({ text: "", style: {} });
|
|
16140
|
-
}
|
|
16141
|
-
return segments;
|
|
16142
|
-
}
|
|
16143
|
-
function segmentsToPlainText(segments) {
|
|
16144
|
-
return segments.map((segment) => segment.isParagraphBreak ? "\n" : segment.text).join("");
|
|
16145
|
-
}
|
|
16146
|
-
function normalizeSegments(segments) {
|
|
16147
|
-
const cleaned = segments.filter((segment) => segment.isParagraphBreak || segment.text.length > 0);
|
|
16148
|
-
while (cleaned.length > 0 && cleaned[cleaned.length - 1].isParagraphBreak) {
|
|
16149
|
-
cleaned.pop();
|
|
16150
|
-
}
|
|
16151
|
-
return cleaned.length > 0 ? cleaned : [{ text: "", style: {} }];
|
|
16152
|
-
}
|
|
16153
|
-
function parsePt(value) {
|
|
16154
|
-
if (!value) {
|
|
16155
|
-
return void 0;
|
|
16156
|
-
}
|
|
16157
|
-
const numeric = Number.parseFloat(value);
|
|
16158
|
-
if (Number.isNaN(numeric) || !Number.isFinite(numeric)) {
|
|
16159
|
-
return void 0;
|
|
16160
|
-
}
|
|
16161
|
-
if (value.endsWith("px")) {
|
|
16162
|
-
return numeric * PX_TO_PT;
|
|
16163
|
-
}
|
|
16164
|
-
return numeric;
|
|
16165
|
-
}
|
|
16166
|
-
function buildParagraph(segments) {
|
|
16167
|
-
const first = segments[0];
|
|
16168
|
-
let bulletType = "none";
|
|
16169
|
-
let indentLevel = 0;
|
|
16170
|
-
if (first?.bulletInfo) {
|
|
16171
|
-
if (first.bulletInfo.char) {
|
|
16172
|
-
bulletType = "bullet";
|
|
16173
|
-
} else if (first.bulletInfo.autoNumType) {
|
|
16174
|
-
bulletType = "numbered";
|
|
16175
|
-
}
|
|
16176
|
-
}
|
|
16177
|
-
if (first?.style.paragraphMarginLeft) {
|
|
16178
|
-
indentLevel = Math.min(
|
|
16179
|
-
MAX_INDENT_LEVEL,
|
|
16180
|
-
Math.max(0, Math.round(first.style.paragraphMarginLeft / INDENT_PX2))
|
|
16181
|
-
);
|
|
16182
|
-
}
|
|
16183
|
-
return {
|
|
16184
|
-
segments: segments.length > 0 ? segments : [{ text: "", style: {} }],
|
|
16185
|
-
bulletType,
|
|
16186
|
-
indentLevel
|
|
16187
|
-
};
|
|
16188
|
-
}
|
|
16189
|
-
function segmentsToParagraphs(segments) {
|
|
16190
|
-
const normalized = normalizeSegments(segments);
|
|
16191
|
-
const paragraphs = [];
|
|
16192
|
-
let current = [];
|
|
16193
|
-
for (const seg of normalized) {
|
|
16194
|
-
if (seg.isParagraphBreak) {
|
|
16195
|
-
paragraphs.push(buildParagraph(current));
|
|
16196
|
-
current = [];
|
|
16197
|
-
} else {
|
|
16198
|
-
current.push(seg);
|
|
16199
|
-
}
|
|
16200
|
-
}
|
|
16201
|
-
if (current.length > 0) {
|
|
16202
|
-
paragraphs.push(buildParagraph(current));
|
|
16203
|
-
}
|
|
16204
|
-
if (paragraphs.length === 0) {
|
|
16205
|
-
paragraphs.push({
|
|
16206
|
-
segments: [{ text: "", style: {} }],
|
|
16207
|
-
bulletType: "none",
|
|
16208
|
-
indentLevel: 0
|
|
16209
|
-
});
|
|
16210
|
-
}
|
|
16211
|
-
return paragraphs;
|
|
16212
|
-
}
|
|
16213
|
-
function paragraphsToSegments(paragraphs) {
|
|
16214
|
-
const result = [];
|
|
16215
|
-
let numberedCounter = 0;
|
|
16216
|
-
paragraphs.forEach((para, pIdx) => {
|
|
16217
|
-
if (para.bulletType === "numbered") {
|
|
16218
|
-
numberedCounter++;
|
|
16219
|
-
} else {
|
|
16220
|
-
numberedCounter = 0;
|
|
16221
|
-
}
|
|
16222
|
-
para.segments.forEach((seg, sIdx) => {
|
|
16223
|
-
const updated = { ...seg, style: { ...seg.style } };
|
|
16224
|
-
if (para.indentLevel > 0) {
|
|
16225
|
-
updated.style.paragraphMarginLeft = para.indentLevel * INDENT_PX2;
|
|
16226
|
-
} else {
|
|
16227
|
-
delete updated.style.paragraphMarginLeft;
|
|
16228
|
-
}
|
|
16229
|
-
if (sIdx === 0) {
|
|
16230
|
-
if (para.bulletType === "bullet") {
|
|
16231
|
-
updated.bulletInfo = { char: "\u2022" };
|
|
16232
|
-
} else if (para.bulletType === "numbered") {
|
|
16233
|
-
updated.bulletInfo = {
|
|
16234
|
-
autoNumType: "arabicPeriod",
|
|
16235
|
-
paragraphIndex: numberedCounter - 1
|
|
16236
|
-
};
|
|
16237
|
-
} else {
|
|
16238
|
-
delete updated.bulletInfo;
|
|
16239
|
-
}
|
|
16240
|
-
}
|
|
16241
|
-
result.push(updated);
|
|
16242
|
-
});
|
|
16243
|
-
if (pIdx < paragraphs.length - 1) {
|
|
16244
|
-
result.push({ text: "", style: {}, isParagraphBreak: true });
|
|
16245
|
-
}
|
|
16246
|
-
});
|
|
16247
|
-
return result;
|
|
16248
|
-
}
|
|
16249
|
-
function getCurrentParagraphIndex(editorEl, segments) {
|
|
16250
|
-
const sel = window.getSelection();
|
|
16251
|
-
if (!sel || sel.rangeCount === 0) {
|
|
16252
|
-
return 0;
|
|
16253
|
-
}
|
|
16254
|
-
const range = sel.getRangeAt(0);
|
|
16255
|
-
let charOffset = 0;
|
|
16256
|
-
const walker = document.createTreeWalker(editorEl, NodeFilter.SHOW_TEXT);
|
|
16257
|
-
let node = walker.nextNode();
|
|
16258
|
-
while (node) {
|
|
16259
|
-
if (range.startContainer === node) {
|
|
16260
|
-
charOffset += range.startOffset;
|
|
16261
|
-
break;
|
|
16262
|
-
}
|
|
16263
|
-
charOffset += (node.textContent ?? "").length;
|
|
16264
|
-
node = walker.nextNode();
|
|
16265
|
-
}
|
|
16266
|
-
let paraIdx = 0;
|
|
16267
|
-
let pos = 0;
|
|
16268
|
-
for (const seg of segments) {
|
|
16269
|
-
if (seg.isParagraphBreak) {
|
|
16270
|
-
paraIdx++;
|
|
16271
|
-
pos++;
|
|
16272
|
-
continue;
|
|
16273
|
-
}
|
|
16274
|
-
const segLen = seg.text.length;
|
|
16275
|
-
if (pos + segLen > charOffset) {
|
|
16276
|
-
return paraIdx;
|
|
16277
|
-
}
|
|
16278
|
-
pos += segLen;
|
|
16279
|
-
}
|
|
16280
|
-
return paraIdx;
|
|
16281
|
-
}
|
|
16282
|
-
var CSS_VALUE_SAFE = /^[a-zA-Z0-9 _,.\-+#'%/]{1,100}$/u;
|
|
16283
|
-
function isCssValueSafe(value) {
|
|
16284
|
-
if (value === void 0 || value === null) {
|
|
16285
|
-
return false;
|
|
16286
|
-
}
|
|
16287
|
-
const str = String(value);
|
|
16288
|
-
return str.length > 0 && CSS_VALUE_SAFE.test(str);
|
|
16289
|
-
}
|
|
16290
|
-
function deriveStyleFromElement(element, inheritedStyle) {
|
|
16291
|
-
const style = { ...inheritedStyle };
|
|
16292
|
-
const tagName = element.tagName.toLowerCase();
|
|
16293
|
-
if (tagName === "b" || tagName === "strong") {
|
|
16294
|
-
style.bold = true;
|
|
16295
|
-
}
|
|
16296
|
-
if (tagName === "i" || tagName === "em") {
|
|
16297
|
-
style.italic = true;
|
|
16298
|
-
}
|
|
16299
|
-
if (tagName === "u") {
|
|
16300
|
-
style.underline = true;
|
|
16301
|
-
}
|
|
16302
|
-
if (tagName === "s" || tagName === "strike") {
|
|
16303
|
-
style.strikethrough = true;
|
|
16304
|
-
}
|
|
16305
|
-
if (tagName === "a") {
|
|
16306
|
-
const href = element.getAttribute("href");
|
|
16307
|
-
if (href) {
|
|
16308
|
-
style.hyperlink = href;
|
|
16309
|
-
}
|
|
16310
|
-
style.underline = true;
|
|
16311
|
-
style.color = "#4a9eff";
|
|
16312
|
-
}
|
|
16313
|
-
const inlineStyle = element.style;
|
|
16314
|
-
if (inlineStyle.fontWeight === "bold" || Number(inlineStyle.fontWeight) >= 600) {
|
|
16315
|
-
style.bold = true;
|
|
16316
|
-
}
|
|
16317
|
-
if (inlineStyle.fontStyle === "italic") {
|
|
16318
|
-
style.italic = true;
|
|
16319
|
-
}
|
|
16320
|
-
if (inlineStyle.textDecoration.includes("underline") || inlineStyle.textDecorationLine.includes("underline")) {
|
|
16321
|
-
style.underline = true;
|
|
16322
|
-
}
|
|
16323
|
-
if (inlineStyle.textDecoration.includes("line-through") || inlineStyle.textDecorationLine.includes("line-through")) {
|
|
16324
|
-
style.strikethrough = true;
|
|
16325
|
-
}
|
|
16326
|
-
if (inlineStyle.color) {
|
|
16327
|
-
style.color = inlineStyle.color;
|
|
16328
|
-
}
|
|
16329
|
-
const fontSizePt = parsePt(inlineStyle.fontSize);
|
|
16330
|
-
if (fontSizePt !== void 0) {
|
|
16331
|
-
style.fontSize = fontSizePt;
|
|
16332
|
-
}
|
|
16333
|
-
if (inlineStyle.fontFamily) {
|
|
16334
|
-
style.fontFamily = inlineStyle.fontFamily;
|
|
16335
|
-
}
|
|
16336
|
-
return style;
|
|
16337
|
-
}
|
|
16338
|
-
function parseSegmentsFromRichEditor(root) {
|
|
16339
|
-
const segments = [];
|
|
16340
|
-
const walk = (node, inheritedStyle) => {
|
|
16341
|
-
if (node.nodeType === Node.TEXT_NODE) {
|
|
16342
|
-
const value = node.textContent ?? "";
|
|
16343
|
-
if (value.length > 0) {
|
|
16344
|
-
segments.push({ text: value, style: { ...inheritedStyle } });
|
|
16345
|
-
}
|
|
16346
|
-
return;
|
|
16347
|
-
}
|
|
16348
|
-
if (!(node instanceof HTMLElement)) {
|
|
16349
|
-
return;
|
|
16350
|
-
}
|
|
16351
|
-
if (node.tagName.toLowerCase() === "br") {
|
|
16352
|
-
segments.push({ text: "", style: {}, isParagraphBreak: true });
|
|
16353
|
-
return;
|
|
16354
|
-
}
|
|
16355
|
-
const nextStyle = deriveStyleFromElement(node, inheritedStyle);
|
|
16356
|
-
const tag = node.tagName.toLowerCase();
|
|
16357
|
-
const isBlock = ["div", "p", "li"].includes(tag);
|
|
16358
|
-
let bulletInfo;
|
|
16359
|
-
let paraIndent = 0;
|
|
16360
|
-
if (isBlock && node.dataset.bulletType) {
|
|
16361
|
-
const bt = node.dataset.bulletType;
|
|
16362
|
-
if (bt === "bullet") {
|
|
16363
|
-
bulletInfo = { char: "\u2022" };
|
|
16364
|
-
} else if (bt === "numbered") {
|
|
16365
|
-
bulletInfo = { autoNumType: "arabicPeriod" };
|
|
16366
|
-
}
|
|
16367
|
-
}
|
|
16368
|
-
if (isBlock && node.dataset.indentLevel) {
|
|
16369
|
-
paraIndent = Number.parseInt(node.dataset.indentLevel, 10) || 0;
|
|
16370
|
-
}
|
|
16371
|
-
const segStartIdx = segments.length;
|
|
16372
|
-
node.childNodes.forEach((child) => walk(child, nextStyle));
|
|
16373
|
-
if (isBlock && (bulletInfo || paraIndent > 0)) {
|
|
16374
|
-
for (let i = segStartIdx; i < segments.length; i++) {
|
|
16375
|
-
if (!segments[i].isParagraphBreak) {
|
|
16376
|
-
if (bulletInfo) {
|
|
16377
|
-
segments[i].bulletInfo = bulletInfo;
|
|
16378
|
-
}
|
|
16379
|
-
if (paraIndent > 0) {
|
|
16380
|
-
segments[i].style = {
|
|
16381
|
-
...segments[i].style,
|
|
16382
|
-
paragraphMarginLeft: paraIndent * INDENT_PX2
|
|
16383
|
-
};
|
|
16384
|
-
}
|
|
16385
|
-
break;
|
|
16386
|
-
}
|
|
16387
|
-
}
|
|
16388
|
-
}
|
|
16389
|
-
if (isBlock) {
|
|
16390
|
-
segments.push({ text: "", style: {}, isParagraphBreak: true });
|
|
16391
|
-
}
|
|
16392
|
-
};
|
|
16393
|
-
root.childNodes.forEach((child) => walk(child, {}));
|
|
16394
|
-
return normalizeSegments(segments);
|
|
16395
|
-
}
|
|
16396
|
-
function segmentsToEditorHtml(segments) {
|
|
16397
|
-
const paragraphs = segmentsToParagraphs(segments);
|
|
16398
|
-
let numberedCounter = 0;
|
|
16399
|
-
return paragraphs.map((para) => {
|
|
16400
|
-
if (para.bulletType === "numbered") {
|
|
16401
|
-
numberedCounter++;
|
|
16402
|
-
} else {
|
|
16403
|
-
numberedCounter = 0;
|
|
16404
|
-
}
|
|
16405
|
-
const runsHtml = para.segments.map((segment) => {
|
|
16406
|
-
if (segment.isParagraphBreak) {
|
|
16407
|
-
return "";
|
|
16408
|
-
}
|
|
16409
|
-
const inlineStyles = [];
|
|
16410
|
-
if (segment.style.bold) {
|
|
16411
|
-
inlineStyles.push("font-weight:700");
|
|
16412
|
-
}
|
|
16413
|
-
if (segment.style.italic) {
|
|
16414
|
-
inlineStyles.push("font-style:italic");
|
|
16415
|
-
}
|
|
16416
|
-
if (segment.style.underline) {
|
|
16417
|
-
inlineStyles.push("text-decoration:underline");
|
|
16418
|
-
}
|
|
16419
|
-
if (segment.style.strikethrough) {
|
|
16420
|
-
inlineStyles.push("text-decoration:line-through");
|
|
16421
|
-
}
|
|
16422
|
-
if (segment.style.color && isCssValueSafe(segment.style.color)) {
|
|
16423
|
-
inlineStyles.push(`color:${segment.style.color}`);
|
|
16424
|
-
}
|
|
16425
|
-
if (segment.style.fontSize && Number.isFinite(Number(segment.style.fontSize))) {
|
|
16426
|
-
inlineStyles.push(`font-size:${Number(segment.style.fontSize)}pt`);
|
|
16427
|
-
}
|
|
16428
|
-
if (segment.style.fontFamily && isCssValueSafe(segment.style.fontFamily)) {
|
|
16429
|
-
inlineStyles.push(`font-family:${segment.style.fontFamily}`);
|
|
16430
|
-
}
|
|
16431
|
-
const text = escapeHtml(segment.text);
|
|
16432
|
-
if (segment.style.hyperlink && isUrlSafe(segment.style.hyperlink)) {
|
|
16433
|
-
const href = escapeHtml(segment.style.hyperlink);
|
|
16434
|
-
return `<a href="${href}" style="color:#4a9eff;text-decoration:underline;cursor:pointer" data-hyperlink="${href}">${text}</a>`;
|
|
16435
|
-
}
|
|
16436
|
-
const styleAttr = inlineStyles.length > 0 ? ` style="${inlineStyles.join(";")}"` : "";
|
|
16437
|
-
return `<span${styleAttr}>${text}</span>`;
|
|
16438
|
-
}).join("");
|
|
16439
|
-
const attrs = [];
|
|
16440
|
-
if (para.bulletType !== "none") {
|
|
16441
|
-
attrs.push(`data-bullet-type="${para.bulletType}"`);
|
|
16442
|
-
}
|
|
16443
|
-
if (para.indentLevel > 0) {
|
|
16444
|
-
attrs.push(`data-indent-level="${para.indentLevel}"`);
|
|
16445
|
-
}
|
|
16446
|
-
const indent = para.indentLevel * INDENT_PX2;
|
|
16447
|
-
const divStyles = [];
|
|
16448
|
-
if (indent > 0) {
|
|
16449
|
-
divStyles.push(`padding-left:${indent}px`);
|
|
16450
|
-
}
|
|
16451
|
-
let prefix = "";
|
|
16452
|
-
if (para.bulletType === "bullet") {
|
|
16453
|
-
prefix = `<span style="margin-right:6px;color:#9ca3af" contenteditable="false">\u2022</span>`;
|
|
16454
|
-
} else if (para.bulletType === "numbered") {
|
|
16455
|
-
prefix = `<span style="margin-right:6px;color:#9ca3af" contenteditable="false">${numberedCounter}.</span>`;
|
|
16456
|
-
}
|
|
16457
|
-
const styleStr = divStyles.length > 0 ? ` style="${divStyles.join(";")}"` : "";
|
|
16458
|
-
const attrStr = attrs.length > 0 ? ` ${attrs.join(" ")}` : "";
|
|
16459
|
-
return `<div${attrStr}${styleStr}>${prefix}${runsHtml || "<br />"}</div>`;
|
|
16460
|
-
}).join("");
|
|
16461
|
-
}
|
|
16462
17062
|
function renderRichNotesSegments(segments) {
|
|
16463
17063
|
const paragraphs = segmentsToParagraphs(segments);
|
|
16464
17064
|
const nodes = [];
|
|
@@ -16471,7 +17071,7 @@ function renderRichNotesSegments(segments) {
|
|
|
16471
17071
|
}
|
|
16472
17072
|
const divStyle = {};
|
|
16473
17073
|
if (para.indentLevel > 0) {
|
|
16474
|
-
divStyle.paddingLeft = para.indentLevel *
|
|
17074
|
+
divStyle.paddingLeft = para.indentLevel * INDENT_PX;
|
|
16475
17075
|
}
|
|
16476
17076
|
const children = [];
|
|
16477
17077
|
if (para.bulletType === "bullet") {
|
|
@@ -16575,10 +17175,10 @@ function NotesPrintDialog({
|
|
|
16575
17175
|
const paras = segmentsToParagraphs(segs);
|
|
16576
17176
|
doc.write(`<div class="slide-page">`);
|
|
16577
17177
|
doc.write(
|
|
16578
|
-
`<div class="slide-header">${
|
|
17178
|
+
`<div class="slide-header">${escapeHtml2(t("pptx.notes.slideN", { n: slide.slideNumber }))}</div>`
|
|
16579
17179
|
);
|
|
16580
17180
|
doc.write(
|
|
16581
|
-
`<div class="slide-thumb">${
|
|
17181
|
+
`<div class="slide-thumb">${escapeHtml2(t("pptx.notes.slideN", { n: slide.slideNumber }))}</div>`
|
|
16582
17182
|
);
|
|
16583
17183
|
doc.write(`<div class="notes-text">`);
|
|
16584
17184
|
let numCounter = 0;
|
|
@@ -16595,9 +17195,9 @@ function NotesPrintDialog({
|
|
|
16595
17195
|
} else if (para.bulletType === "numbered") {
|
|
16596
17196
|
prefix = `${numCounter}. `;
|
|
16597
17197
|
}
|
|
16598
|
-
const text = para.segments.filter((s) => !s.isParagraphBreak).map((s) =>
|
|
17198
|
+
const text = para.segments.filter((s) => !s.isParagraphBreak).map((s) => escapeHtml2(s.text)).join("");
|
|
16599
17199
|
doc.write(
|
|
16600
|
-
`<div class="para" style="padding-left:${indent}px">${
|
|
17200
|
+
`<div class="para" style="padding-left:${indent}px">${escapeHtml2(prefix)}${text}</div>`
|
|
16601
17201
|
);
|
|
16602
17202
|
}
|
|
16603
17203
|
doc.write(`</div></div>`);
|
|
@@ -33552,6 +34152,7 @@ function ViewerToolbarSection(props) {
|
|
|
33552
34152
|
propertyHandlers,
|
|
33553
34153
|
dialogs,
|
|
33554
34154
|
slideOps,
|
|
34155
|
+
onApplyLayout,
|
|
33555
34156
|
ops,
|
|
33556
34157
|
onSetMode,
|
|
33557
34158
|
onEnterPresenterView,
|
|
@@ -33928,6 +34529,7 @@ function ViewerToolbarSection(props) {
|
|
|
33928
34529
|
onSetOverflowMenuOpen: s.setIsOverflowMenuOpen,
|
|
33929
34530
|
layoutOptions: scopedLayoutOptions,
|
|
33930
34531
|
onInsertSlideFromLayout: slideOps.handleInsertSlideFromLayout,
|
|
34532
|
+
onApplyLayout,
|
|
33931
34533
|
onInsertSlideFromTemplate: slideOps.handleInsertSlideFromTemplate,
|
|
33932
34534
|
templateScheme: templateSchemeFromTheme(s.theme?.colorScheme),
|
|
33933
34535
|
customShows: s.customShows,
|
|
@@ -35396,7 +35998,7 @@ ${url}`)) {
|
|
|
35396
35998
|
var AiChatPanel = lazy(async () => {
|
|
35397
35999
|
const [{ useChat }, { default: Panel }] = await Promise.all([
|
|
35398
36000
|
import('@ai-sdk/react'),
|
|
35399
|
-
import('./AiChatPanel-
|
|
36001
|
+
import('./AiChatPanel-2YYL6AKX.mjs')
|
|
35400
36002
|
]);
|
|
35401
36003
|
function BoundAiChatPanel(props) {
|
|
35402
36004
|
return /* @__PURE__ */ jsx(Panel, { ...props, useChat });
|
|
@@ -38691,6 +39293,20 @@ var PowerPointViewer = forwardRef(
|
|
|
38691
39293
|
onSelectionChange,
|
|
38692
39294
|
onSlideCountChange
|
|
38693
39295
|
});
|
|
39296
|
+
const handleTemplateElementsChanged = useCallback(
|
|
39297
|
+
(slideId, elements) => {
|
|
39298
|
+
state.setTemplateElementsBySlideId((prev) => ({ ...prev, [slideId]: elements }));
|
|
39299
|
+
},
|
|
39300
|
+
[state]
|
|
39301
|
+
);
|
|
39302
|
+
const layoutSwitching = useLayoutSwitching({
|
|
39303
|
+
handler: handlerRef.current,
|
|
39304
|
+
slides,
|
|
39305
|
+
activeSlideIndex,
|
|
39306
|
+
ops: editorOps.ops,
|
|
39307
|
+
history,
|
|
39308
|
+
onTemplateElementsChanged: handleTemplateElementsChanged
|
|
39309
|
+
});
|
|
38694
39310
|
const applyAiTheme = useCallback(
|
|
38695
39311
|
(updates) => {
|
|
38696
39312
|
if (updates.colorScheme) {
|
|
@@ -38776,6 +39392,7 @@ var PowerPointViewer = forwardRef(
|
|
|
38776
39392
|
propertyHandlers,
|
|
38777
39393
|
dialogs,
|
|
38778
39394
|
slideOps: editorOps.slideOps,
|
|
39395
|
+
onApplyLayout: (path) => void layoutSwitching.applyLayout(path),
|
|
38779
39396
|
ops: editorOps.ops,
|
|
38780
39397
|
onSetMode: handleSetMode,
|
|
38781
39398
|
onEnterPresenterView: handleEnterPresenterView,
|