@aixa-transformation/pptx-viewer 2.0.2 → 2.0.3
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/README.md +9 -9
- package/dist/{Model3DScene-VLHFNN5B.js → Model3DScene-AXKDOUCK.js} +3 -3
- package/dist/{Model3DScene-5ODZLKJM.mjs → Model3DScene-UD6SIIUP.mjs} +2 -2
- package/dist/{SurfaceChart3DScene-C6GQQQB7.mjs → SurfaceChart3DScene-JBEJR7Z4.mjs} +2 -2
- package/dist/{SurfaceChart3DScene-KHMGQAGP.js → SurfaceChart3DScene-JU2MS2BP.js} +3 -3
- package/dist/{chunk-XAVVR6OX.mjs → chunk-34H7NGLC.mjs} +1 -1
- package/dist/{chunk-F2HFXS2Z.mjs → chunk-3HJVAFGP.mjs} +47 -7
- package/dist/{chunk-KVM4DBEU.mjs → chunk-7H2BJF4H.mjs} +29 -1
- package/dist/{chunk-2TOLRBFU.js → chunk-CHHLFKT6.js} +41 -41
- package/dist/{chunk-TB5ZWNMX.mjs → chunk-E4CJYQAL.mjs} +46 -11
- package/dist/{chunk-HNI6JYAI.js → chunk-N57QTSTQ.js} +866 -831
- package/dist/{chunk-AD2CLKY6.js → chunk-ODMFBYAP.js} +29 -1
- package/dist/{chunk-MOEXMRVK.js → chunk-ZIXTDOJD.js} +524 -483
- package/dist/{dist-NVA3FEUV.js → dist-CPLP356W.js} +568 -568
- package/dist/{dist-LQJHTLHL.mjs → dist-OEO77LEX.mjs} +1 -1
- package/dist/index.js +34 -34
- package/dist/index.mjs +4 -4
- package/dist/internals.js +78 -78
- package/dist/internals.mjs +3 -3
- package/dist/presentation.js +2 -2
- package/dist/presentation.mjs +1 -1
- package/dist/viewer/index.js +20 -20
- package/dist/viewer/index.mjs +4 -4
- package/package.json +20 -20
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SHAPE_PRESETS, DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, MIN_ELEMENT_SIZE, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, ANIMATION_PRESET_OPTIONS, useReducedMotion, useViewerState, useViewerOptions, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useYjsDocumentSync, useFollowMode, useBroadcastFollower, resolvePalette, resolveStyle, layoutToCategory, wrapChrome, DEFAULT_FILL_COLOR, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, getCropShapeClipPath, SLIDE_TRANSITION_OPTIONS, SLIDE_NAV_THUMBNAIL_WIDTH, scopeLayoutOptionsToActiveSlide, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, useCollaborativeState, styleShadow, styleStroke, colour, fitFontSize, smartArtNodeGroupProps, chevronPoints, SmartArtNodeText,
|
|
2
|
-
import { RULER_THICKNESS, RULER_FONT_SIZE, normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, getElementTransform, ACTION_BUTTON_PRESETS, isEditableTextElement, getAriaRole, getAriaLabel, getAriaRoleDescription, getImageEffectsOpacity, getImageEffectsFilter, getElementTransformWithoutRotation, EQUATION_TEMPLATES, convertLatexToOmml, convertOmmlToMathMl, sanitizeMathMl, DEFAULT_VIEWER_OPTIONS, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, viewerOptionsToPreferences, applyPreferenceToOptions, listAutosaveSnapshots, deleteAutosaveSnapshot, revealedSmartArtNodeCount, buildSmartArtA11y, buildCssGradientFromShapeStyle, resolveGroupChildFill, getGroupChildParentFill, getComputedEffectStyle, getSoftEdgeSvgFilter, getElementLabel, buildPreviewElements, themeToCssVars, DEFAULT_INSERT_CHART_TYPE, hasCopyableFormat, createBackstagePresentation, printPropertiesFrameSlides, printPropertiesSlidesPerPage, VIEWER_OPTIONS_TABS, DEFAULT_QUICK_ACCESS_COMMAND_IDS, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, resolveDrawingShapeNodeId, buildSummaryZoomView, getImageColorWashStyle, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, applyChartBuildReveal, formatAxisValue, hasPressureVariation, getInkReplayStyles, INK_REPLAY_KEYFRAMES, resolveInkColor, resolveInkWidth, resolveInkOpacity, pressuresToWidths, getContentPartReplayStyles, resolveOleType, getOleTypeColor, getOleTypeLabel, shouldUseSvgWarp, getSlideBackgroundStyle, filterCommands, resolveTitleBarStatusKey, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, shouldConfirmExternalHyperlink, safeOpenUrl, isPpactionUrl, parsePpactionUrl, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, clampPercent, HANDOUT_OPTIONS, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS, resolveViewerAddinRows, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, activateModalFocus, buildCollaborationShareUrl, presentationInkPath, mobileElapsedSince, isFirstSlide, isLastSlide, formatMobileElapsed, mobileSlideCounter, formatElapsed, computeInlineEditorRect, findSmartArtNodeText, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, 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, getWarpPath, TAB_ROW_ACTION_CLASSES, listBackstageRecentFiles, BACKSTAGE_NAV, INSERT_CHART_TYPES, SLIDE_VIRTUALIZATION_THRESHOLD, getShapeAdjustmentHandleDescriptor, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, formatSlideCounter, isUrlSafe, computeHandoutLayout, getPrintableArea, generateNoteLineCount, computeAllNotesPages, getNotesPrintableArea, QUICK_ACCESS_COMMAND_CATALOG, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, groupIntoParagraphs, substituteFieldText, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, getConnectionSites, generateTicks, getCommentMarkerPosition, buildThemeColorGrid, THEME_COLOR_LABELS, buildSmartArtPresetData, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, TABLE_STYLE_PRESETS, withFrameSlides, withSlidesPerPage, formatCommentTimestamp, DIRECTIONAL_PRESETS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, DUOTONE_PRESETS, ARTISTIC_EFFECTS, LBL, SEL, FILL_MODE_OPTIONS, SECTION_HEADING, NUM, GRADIENT_TYPE_OPTIONS, PATTERN_OPTIONS } from './chunk-
|
|
1
|
+
import { SHAPE_PRESETS, DEFAULT_STROKE_COLOR, getConnectorPathGeometry, buildLineShadowCss, buildLineGlowFilter, renderConnectorMarker, MIN_ELEMENT_SIZE, getShapeVisualStyle, getTextStyleForElement, DEFAULT_TEXT_COLOR, renderVectorShape, isConnectorOrLineElement, build3DExtrusionData, getImageRenderStyle, cn, ANIMATION_PRESET_OPTIONS, useReducedMotion, useViewerState, useViewerOptions, useIsMobile, useResizablePanels, useDerivedSlideState, useZoomViewport, useEditorHistory, usePresentationSetup, useTouchGestures, useViewerDialogs, useEditorOperations, useViewerIntegration, useYjsDocumentSync, useFollowMode, useBroadcastFollower, resolvePalette, resolveStyle, layoutToCategory, wrapChrome, DEFAULT_FILL_COLOR, hasDagDuotoneEffect, renderDagDuotoneSvgFilter, getTextLayoutStyle, renderTableElement, renderMediaElement, shouldRenderFallbackLabel, getCropShapeClipPath, SLIDE_TRANSITION_OPTIONS, SLIDE_NAV_THUMBNAIL_WIDTH, scopeLayoutOptionsToActiveSlide, useToolbarVisibility, useKeyboardInsets, useModalDismissDrag, useCollaborativeState, styleShadow, styleStroke, colour, fitFontSize, smartArtNodeGroupProps, chevronPoints, SmartArtNodeText, contrastingTextColor, renderStepDownProcess, renderAlternatingFlow, renderDescendingProcess, renderPictureAccentList, renderVerticalBlockList, renderGroupedList, renderPyramidList, renderHorizontalPictureList, renderAccentProcess, renderVerticalChevronList, isImageTiled, getImageTilingStyle, getDuotoneColors, getTextWarpStyle, renderTextSegments, buildReactChartViewModel, renderChartElement, buildTextBody3DSceneStyle, TOOLBAR_SECTIONS, useVirtualizedSlides, useSwipeNavigation, useSheetDismissDrag, detectTargetType, parseEmailUrl, parseSlideFromUrl, ACTION_VERB_MAP, SHORTCUT_REFERENCE_ITEMS as SHORTCUT_REFERENCE_ITEMS$1, buildTree, treeWidth, treeDepth, nodeOpacity, truncate, gearPath, resolveSmartArtDataPalette, DEFAULT_TEXT_FONT_SIZE, DEFAULT_FONT_FAMILY, HYPERLINK_COLOR, GRID_SIZE, startPreviewAnimation, stopPreviewAnimation } from './chunk-3HJVAFGP.mjs';
|
|
2
|
+
import { RULER_THICKNESS, RULER_FONT_SIZE, normalizeHexColor, colorWithOpacity, normalizeStrokeDashType, getSvgStrokeDasharray, getCompoundLineOffsets, getCompoundLineWidths, svgLineCap, getElementTransform, ACTION_BUTTON_PRESETS, isEditableTextElement, getAriaRole, getAriaLabel, getAriaRoleDescription, getImageEffectsOpacity, getImageEffectsFilter, getElementTransformWithoutRotation, EQUATION_TEMPLATES, convertLatexToOmml, convertOmmlToMathMl, sanitizeMathMl, DEFAULT_VIEWER_OPTIONS, buildUserFontFaceStyles, readStoredViewerPrefs, resolveThemeCatalogEntry, THEME_CATALOG, writeStoredViewerPrefs, openPptxFile, readBackstageRecentFile, viewerOptionsToPreferences, applyPreferenceToOptions, listAutosaveSnapshots, deleteAutosaveSnapshot, revealedSmartArtNodeCount, buildSmartArtA11y, buildCssGradientFromShapeStyle, resolveGroupChildFill, getGroupChildParentFill, getComputedEffectStyle, getSoftEdgeSvgFilter, getElementLabel, buildPreviewElements, themeToCssVars, DEFAULT_INSERT_CHART_TYPE, hasCopyableFormat, createBackstagePresentation, printPropertiesFrameSlides, printPropertiesSlidesPerPage, VIEWER_OPTIONS_TABS, DEFAULT_QUICK_ACCESS_COMMAND_IDS, buildJoinCollaborationConfig, buildCreateCollaborationConfig, generateBroadcastRoomId, DEFAULT_BROADCAST_SERVER_URL, buildBroadcastViewerUrl, resolveTransportForServerUrl, resolveDrawingShapeNodeId, buildSummaryZoomView, getImageColorWashStyle, getPendingSelectionRestore, restoreSegmentSelection, getTextCompensationTransform, applyChartBuildReveal, formatAxisValue, hasPressureVariation, getInkReplayStyles, INK_REPLAY_KEYFRAMES, resolveInkColor, resolveInkWidth, resolveInkOpacity, pressuresToWidths, getContentPartReplayStyles, resolveOleType, getOleTypeColor, getOleTypeLabel, shouldUseSvgWarp, getSlideBackgroundStyle, filterCommands, resolveTitleBarStatusKey, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, shouldConfirmExternalHyperlink, safeOpenUrl, isPpactionUrl, parsePpactionUrl, formatVersionTimestamp, formatRelativeTime, scanAvailableFontFamilies, PRESETS, CATEGORIES, convertOmmlToLatex, clampPercent, HANDOUT_OPTIONS, TOOLBAR_TABS, SHORTCUT_REFERENCE_ITEMS, resolveViewerAddinRows, availableQuickAccessCommands, addQuickAccessCommand, removeQuickAccessCommand, moveQuickAccessCommand, activateModalFocus, buildCollaborationShareUrl, presentationInkPath, mobileElapsedSince, isFirstSlide, isLastSlide, formatMobileElapsed, mobileSlideCounter, formatElapsed, computeInlineEditorRect, findSmartArtNodeText, rebuildDrawingShapesIfCleared, shouldCommitSmartArtNodeText, 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, getWarpPath, TAB_ROW_ACTION_CLASSES, listBackstageRecentFiles, BACKSTAGE_NAV, INSERT_CHART_TYPES, SLIDE_VIRTUALIZATION_THRESHOLD, getShapeAdjustmentHandleDescriptor, getSlideTransitionAnimations, SLIDE_TRANSITION_KEYFRAMES, formatSlideCounter, isUrlSafe, computeHandoutLayout, getPrintableArea, generateNoteLineCount, computeAllNotesPages, getNotesPrintableArea, QUICK_ACCESS_COMMAND_CATALOG, notesSegmentsToSpans, erasePresentationInkAt, movePresenterPointer, appendPresentationInkPoint, NOTES_FONT_SIZE_DEFAULT, formatTime, NOTES_FONT_SIZE_MIN, clampNotesFontSize, NOTES_FONT_SIZE_STEP, NOTES_FONT_SIZE_MAX, groupIntoParagraphs, substituteFieldText, BACKSTAGE_TEMPLATES, formatBackstageDate, formatBackstageSize, DEFAULT_VIEWER_PROFILE, resolveProfileInitial, AVATAR_COLOR_SWATCHES, getConnectionSites, generateTicks, getCommentMarkerPosition, buildThemeColorGrid, THEME_COLOR_LABELS, buildSmartArtPresetData, getLocalStorageUsageSummary, saveViewerProfile, clearAllLocalViewerData, TABLE_STYLE_PRESETS, withFrameSlides, withSlidesPerPage, formatCommentTimestamp, DIRECTIONAL_PRESETS, computeMergeCellRight, computeMergeCellDown, computeSplitCell, DUOTONE_PRESETS, ARTISTIC_EFFECTS, LBL, SEL, FILL_MODE_OPTIONS, SECTION_HEADING, NUM, GRADIENT_TYPE_OPTIONS, PATTERN_OPTIONS } from './chunk-34H7NGLC.mjs';
|
|
3
3
|
import { LOCALE_CATALOG, translationsEn } from './chunk-2X72MOPZ.mjs';
|
|
4
|
-
import { hasShapeProperties, hasTextProperties, SWITCHABLE_LAYOUT_TYPES, isInkElement, isImageLikeElement, getLinkedTextBoxSegments, themeColorSchemesEqual, setSmartArtNodeStyle, updateSmartArtNodeText, getSubstituteFontFamily, THEME_COLOR_SCHEME_KEYS, chartDataChangeType, chartDataUpdatePoint, chartDataAddCategory, chartDataRemoveCategory, chartDataAddSeries, chartDataRemoveSeries, setChartAxisLogScale, setChartAxisTitleStyle, setChartAxisGridlineStyle, setChartSeriesMarker, setChartSeriesChartType, setChartDataPointFill, setChartDataPointExplosion, setChartDataPointMarker, setChartDataPointLabel, getOleObjectTypeLabel, pptxActionToElementAction, applyThemeOverrideToSlide, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, addSmartArtNodeAsChild, removeSmartArtNode, elementActionToPptxAction, switchSmartArtLayout, addSmartArtNode, demoteSmartArtNode, promoteSmartArtNode, reorderSmartArtNode } from './chunk-
|
|
4
|
+
import { hasShapeProperties, hasTextProperties, SWITCHABLE_LAYOUT_TYPES, isInkElement, isImageLikeElement, getLinkedTextBoxSegments, themeColorSchemesEqual, setSmartArtNodeStyle, updateSmartArtNodeText, getSubstituteFontFamily, THEME_COLOR_SCHEME_KEYS, chartDataChangeType, chartDataUpdatePoint, chartDataAddCategory, chartDataRemoveCategory, chartDataAddSeries, chartDataRemoveSeries, setChartAxisLogScale, setChartAxisTitleStyle, setChartAxisGridlineStyle, setChartSeriesMarker, setChartSeriesChartType, setChartDataPointFill, setChartDataPointExplosion, setChartDataPointMarker, setChartDataPointLabel, getOleObjectTypeLabel, pptxActionToElementAction, applyThemeOverrideToSlide, COLOR_MAP_ALIAS_KEYS, DEFAULT_COLOR_MAP, addSmartArtNodeAsChild, removeSmartArtNode, elementActionToPptxAction, switchSmartArtLayout, addSmartArtNode, demoteSmartArtNode, promoteSmartArtNode, reorderSmartArtNode } from './chunk-7H2BJF4H.mjs';
|
|
5
5
|
import React32, { createContext, useMemo, useState, useCallback, forwardRef, useEffect, useRef, useContext, Suspense, useLayoutEffect, useDeferredValue } from 'react';
|
|
6
6
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import { useTranslation } from 'react-i18next';
|
|
@@ -1334,7 +1334,7 @@ function AccountPage() {
|
|
|
1334
1334
|
return void 0;
|
|
1335
1335
|
});
|
|
1336
1336
|
};
|
|
1337
|
-
const version = "2.0.
|
|
1337
|
+
const version = "2.0.3" ;
|
|
1338
1338
|
return /* @__PURE__ */ jsxs("div", { className: "mt-8 max-w-[700px] space-y-6", children: [
|
|
1339
1339
|
/* @__PURE__ */ jsxs("section", { className: cardClass, children: [
|
|
1340
1340
|
/* @__PURE__ */ jsxs("h2", { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -8353,7 +8353,7 @@ function FailedToLoad() {
|
|
|
8353
8353
|
var LazyModel3DScene = React32.lazy(
|
|
8354
8354
|
async () => {
|
|
8355
8355
|
try {
|
|
8356
|
-
return await import('./Model3DScene-
|
|
8356
|
+
return await import('./Model3DScene-UD6SIIUP.mjs');
|
|
8357
8357
|
} catch {
|
|
8358
8358
|
return { default: FailedToLoad };
|
|
8359
8359
|
}
|
|
@@ -8925,6 +8925,23 @@ function drawingShapeGradientDef(id, shape) {
|
|
|
8925
8925
|
)
|
|
8926
8926
|
};
|
|
8927
8927
|
}
|
|
8928
|
+
function upArrowCalloutPoints(x, y, width, height) {
|
|
8929
|
+
const bannerBottom = y + height * 0.66;
|
|
8930
|
+
const stemLeft = x + width * 0.47;
|
|
8931
|
+
const stemRight = x + width * 0.53;
|
|
8932
|
+
const shoulderY = y + height * 0.78;
|
|
8933
|
+
return [
|
|
8934
|
+
`${x},${y}`,
|
|
8935
|
+
`${x + width},${y}`,
|
|
8936
|
+
`${x + width},${bannerBottom}`,
|
|
8937
|
+
`${stemRight},${bannerBottom}`,
|
|
8938
|
+
`${stemRight},${shoulderY}`,
|
|
8939
|
+
`${x + width / 2},${y + height}`,
|
|
8940
|
+
`${stemLeft},${shoulderY}`,
|
|
8941
|
+
`${stemLeft},${bannerBottom}`,
|
|
8942
|
+
`${x},${bannerBottom}`
|
|
8943
|
+
].join(" ");
|
|
8944
|
+
}
|
|
8928
8945
|
function DrawingShapeRenderer({
|
|
8929
8946
|
elementId,
|
|
8930
8947
|
shapes,
|
|
@@ -8964,15 +8981,21 @@ function DrawingShapeRenderer({
|
|
|
8964
8981
|
"data-testid": "smartart-drawing-shapes",
|
|
8965
8982
|
children: shapes.map((shape, i) => {
|
|
8966
8983
|
const gradient = drawingShapeGradientDef(`${elementId}-dspgrad-${shape.id}-${i}`, shape);
|
|
8967
|
-
const fill = gradient?.ref ?? shape.fillPatternForegroundColor ?? shape.fillColor ?? colour(i, palette);
|
|
8984
|
+
const fill = shape.fillNone ? "none" : gradient?.ref ?? shape.fillPatternForegroundColor ?? shape.fillColor ?? colour(i, palette);
|
|
8968
8985
|
const relX = shape.x - minX;
|
|
8969
8986
|
const relY = shape.y - minY;
|
|
8970
8987
|
const rx = shape.shapeType === "roundRect" ? Math.min(shape.width, shape.height) * 0.1 : 0;
|
|
8971
8988
|
const isEllipse = shape.shapeType === "ellipse";
|
|
8972
8989
|
const isChevron = shape.shapeType === "chevron" || shape.shapeType === "homePlate";
|
|
8990
|
+
const isUpArrowCallout = shape.shapeType === "upArrowCallout";
|
|
8973
8991
|
const rotation = shape.rotation ? `rotate(${shape.rotation} ${relX + shape.width / 2} ${relY + shape.height / 2})` : void 0;
|
|
8974
8992
|
const strokeCol = shape.strokeColor ?? (sw > 0 ? "rgba(255,255,255,0.3)" : "none");
|
|
8975
8993
|
const strokeW = shape.strokeWidth ?? sw;
|
|
8994
|
+
const underlayFill = shape.fillNone ? shapes.slice(0, i).reverse().find((candidate) => {
|
|
8995
|
+
const centerX = shape.x + shape.width / 2;
|
|
8996
|
+
const centerY = shape.y + shape.height / 2;
|
|
8997
|
+
return !candidate.fillNone && centerX >= candidate.x && centerX <= candidate.x + candidate.width && centerY >= candidate.y && centerY <= candidate.y + candidate.height;
|
|
8998
|
+
})?.fillColor : void 0;
|
|
8976
8999
|
const fontSize = shape.fontSize ?? fitFontSize(shape.text ?? "", shape.width * 0.85, shape.height, 14);
|
|
8977
9000
|
const nodeId = nodes ? resolveDrawingShapeNodeId(shape, i, shapes, nodes) : void 0;
|
|
8978
9001
|
const nodeLabel = nodeId ? nodeLabels?.get(nodeId) : void 0;
|
|
@@ -8980,7 +9003,18 @@ function DrawingShapeRenderer({
|
|
|
8980
9003
|
return /* @__PURE__ */ jsxs("g", { ...groupProps, children: [
|
|
8981
9004
|
nodeLabel ? /* @__PURE__ */ jsx("title", { children: nodeLabel }) : null,
|
|
8982
9005
|
gradient ? /* @__PURE__ */ jsx("defs", { children: gradient.def }) : null,
|
|
8983
|
-
|
|
9006
|
+
shape.fillImageUrl ? /* @__PURE__ */ jsx(
|
|
9007
|
+
"image",
|
|
9008
|
+
{
|
|
9009
|
+
x: relX,
|
|
9010
|
+
y: relY,
|
|
9011
|
+
width: shape.width,
|
|
9012
|
+
height: shape.height,
|
|
9013
|
+
href: shape.fillImageUrl,
|
|
9014
|
+
preserveAspectRatio: "xMidYMid meet",
|
|
9015
|
+
transform: rotation
|
|
9016
|
+
}
|
|
9017
|
+
) : isEllipse ? /* @__PURE__ */ jsx(
|
|
8984
9018
|
"ellipse",
|
|
8985
9019
|
{
|
|
8986
9020
|
cx: relX + shape.width / 2,
|
|
@@ -8992,10 +9026,10 @@ function DrawingShapeRenderer({
|
|
|
8992
9026
|
strokeWidth: strokeW,
|
|
8993
9027
|
transform: rotation
|
|
8994
9028
|
}
|
|
8995
|
-
) : isChevron ? /* @__PURE__ */ jsx(
|
|
9029
|
+
) : isChevron || isUpArrowCallout ? /* @__PURE__ */ jsx(
|
|
8996
9030
|
"polygon",
|
|
8997
9031
|
{
|
|
8998
|
-
points: chevronPoints(relX, relY, shape.width, shape.height),
|
|
9032
|
+
points: isUpArrowCallout ? upArrowCalloutPoints(relX, relY, shape.width, shape.height) : chevronPoints(relX, relY, shape.width, shape.height),
|
|
8999
9033
|
fill,
|
|
9000
9034
|
stroke: strokeCol,
|
|
9001
9035
|
strokeWidth: strokeW,
|
|
@@ -9020,9 +9054,10 @@ function DrawingShapeRenderer({
|
|
|
9020
9054
|
{
|
|
9021
9055
|
x: relX + shape.width / 2,
|
|
9022
9056
|
y: relY + shape.height / 2,
|
|
9023
|
-
text:
|
|
9024
|
-
fill: shape.fontColor ??
|
|
9057
|
+
text: shape.text,
|
|
9058
|
+
fill: shape.fontColor ?? contrastingTextColor(underlayFill ?? fill),
|
|
9025
9059
|
fontSize,
|
|
9060
|
+
maxWidth: shape.width * 0.82,
|
|
9026
9061
|
className: "pointer-events-none"
|
|
9027
9062
|
}
|
|
9028
9063
|
) : null
|