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.
Files changed (109) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AiChatPanel-6B26AZGA.mjs → AiChatPanel-2YYL6AKX.mjs} +3 -9
  3. package/dist/AiChatPanel-2YYL6AKX.mjs.br +0 -0
  4. package/dist/AiChatPanel-2YYL6AKX.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-FGEIZQCD.js → AiChatPanel-XSXMU2Q5.js} +23 -29
  6. package/dist/AiChatPanel-XSXMU2Q5.js.br +0 -0
  7. package/dist/AiChatPanel-XSXMU2Q5.js.gz +0 -0
  8. package/dist/{Model3DScene-2JX5CUPK.js → Model3DScene-36UJZLCO.js} +2 -2
  9. package/dist/Model3DScene-36UJZLCO.js.br +0 -0
  10. package/dist/Model3DScene-36UJZLCO.js.gz +0 -0
  11. package/dist/{Model3DScene-NKYNKUPP.mjs → Model3DScene-NVFP3JBJ.mjs} +1 -1
  12. package/dist/Model3DScene-NVFP3JBJ.mjs.br +0 -0
  13. package/dist/Model3DScene-NVFP3JBJ.mjs.gz +0 -0
  14. package/dist/PowerPointViewer-Du7u4INi.d.ts.map +1 -1
  15. package/dist/{SurfaceChart3DScene-TTL2FTEG.mjs → SurfaceChart3DScene-BMFEDBLF.mjs} +1 -1
  16. package/dist/{SurfaceChart3DScene-TTL2FTEG.mjs.br → SurfaceChart3DScene-BMFEDBLF.mjs.br} +0 -0
  17. package/dist/SurfaceChart3DScene-BMFEDBLF.mjs.gz +0 -0
  18. package/dist/{SurfaceChart3DScene-AE5SKG7U.js → SurfaceChart3DScene-W6I255VU.js} +2 -2
  19. package/dist/SurfaceChart3DScene-W6I255VU.js.br +0 -0
  20. package/dist/SurfaceChart3DScene-W6I255VU.js.gz +0 -0
  21. package/dist/{chunk-LCWZ4TD4.js → chunk-77TMRPDU.js} +2144 -1527
  22. package/dist/chunk-77TMRPDU.js.br +0 -0
  23. package/dist/chunk-77TMRPDU.js.gz +0 -0
  24. package/dist/{chunk-247XH4EN.mjs → chunk-D5TAZ5NL.mjs} +1214 -53
  25. package/dist/chunk-D5TAZ5NL.mjs.br +0 -0
  26. package/dist/chunk-D5TAZ5NL.mjs.gz +0 -0
  27. package/dist/{chunk-EFZ4K6V5.mjs → chunk-J56KVWI5.mjs} +1132 -515
  28. package/dist/chunk-J56KVWI5.mjs.br +0 -0
  29. package/dist/chunk-J56KVWI5.mjs.gz +0 -0
  30. package/dist/{chunk-5YGTUHNO.mjs → chunk-J5V7UCD2.mjs} +15 -1403
  31. package/dist/chunk-J5V7UCD2.mjs.br +0 -0
  32. package/dist/chunk-J5V7UCD2.mjs.gz +0 -0
  33. package/dist/{chunk-VZI35LEF.js → chunk-JSJZWA43.js} +9 -3
  34. package/dist/chunk-JSJZWA43.js.br +0 -0
  35. package/dist/chunk-JSJZWA43.js.gz +0 -0
  36. package/dist/{chunk-Y6W5LGTR.mjs → chunk-KVNZGR3L.mjs} +14 -93
  37. package/dist/chunk-KVNZGR3L.mjs.br +0 -0
  38. package/dist/chunk-KVNZGR3L.mjs.gz +0 -0
  39. package/dist/{chunk-P65VL2I6.js → chunk-NFJLF7TX.js} +258 -1676
  40. package/dist/chunk-NFJLF7TX.js.br +0 -0
  41. package/dist/chunk-NFJLF7TX.js.gz +0 -0
  42. package/dist/{chunk-MZN2UIYT.mjs → chunk-QNKJUUKD.mjs} +7 -2
  43. package/dist/chunk-QNKJUUKD.mjs.br +0 -0
  44. package/dist/chunk-QNKJUUKD.mjs.gz +0 -0
  45. package/dist/{chunk-UNWU6D2M.js → chunk-S7HPAJRX.js} +350 -429
  46. package/dist/chunk-S7HPAJRX.js.br +0 -0
  47. package/dist/chunk-S7HPAJRX.js.gz +0 -0
  48. package/dist/{chunk-6QGTRYSC.js → chunk-USAJMMF2.js} +1248 -59
  49. package/dist/chunk-USAJMMF2.js.br +0 -0
  50. package/dist/chunk-USAJMMF2.js.gz +0 -0
  51. package/dist/index.d.ts +14 -0
  52. package/dist/index.js +39 -39
  53. package/dist/index.js.br +0 -0
  54. package/dist/index.js.gz +0 -0
  55. package/dist/index.mjs +5 -5
  56. package/dist/index.mjs.br +0 -0
  57. package/dist/index.mjs.gz +0 -0
  58. package/dist/internals.d.ts +37 -7
  59. package/dist/internals.d.ts.map +1 -1
  60. package/dist/internals.js +78 -78
  61. package/dist/internals.js.br +5 -4
  62. package/dist/internals.js.gz +0 -0
  63. package/dist/internals.mjs +3 -3
  64. package/dist/internals.mjs.br +0 -0
  65. package/dist/internals.mjs.gz +0 -0
  66. package/dist/pptx-viewer.css +1 -1
  67. package/dist/pptx-viewer.css.br +0 -0
  68. package/dist/pptx-viewer.css.gz +0 -0
  69. package/dist/{useViewerBuildingBlocks-CBZrHhxl.d.ts → useViewerBuildingBlocks-Xddn6SFj.d.ts} +15 -1
  70. package/dist/useViewerBuildingBlocks-Xddn6SFj.d.ts.map +1 -0
  71. package/dist/viewer/index.js +26 -26
  72. package/dist/viewer/index.js.br +0 -0
  73. package/dist/viewer/index.js.gz +0 -0
  74. package/dist/viewer/index.mjs +5 -5
  75. package/dist/viewer/index.mjs.br +0 -0
  76. package/dist/viewer/index.mjs.gz +0 -0
  77. package/package.json +1 -1
  78. package/dist/AiChatPanel-6B26AZGA.mjs.br +0 -0
  79. package/dist/AiChatPanel-6B26AZGA.mjs.gz +0 -0
  80. package/dist/AiChatPanel-FGEIZQCD.js.br +0 -0
  81. package/dist/AiChatPanel-FGEIZQCD.js.gz +0 -0
  82. package/dist/Model3DScene-2JX5CUPK.js.br +0 -0
  83. package/dist/Model3DScene-2JX5CUPK.js.gz +0 -0
  84. package/dist/Model3DScene-NKYNKUPP.mjs.br +0 -0
  85. package/dist/Model3DScene-NKYNKUPP.mjs.gz +0 -0
  86. package/dist/SurfaceChart3DScene-AE5SKG7U.js.br +0 -0
  87. package/dist/SurfaceChart3DScene-AE5SKG7U.js.gz +0 -0
  88. package/dist/SurfaceChart3DScene-TTL2FTEG.mjs.gz +0 -0
  89. package/dist/chunk-247XH4EN.mjs.br +0 -0
  90. package/dist/chunk-247XH4EN.mjs.gz +0 -0
  91. package/dist/chunk-5YGTUHNO.mjs.br +0 -0
  92. package/dist/chunk-5YGTUHNO.mjs.gz +0 -0
  93. package/dist/chunk-6QGTRYSC.js.br +0 -0
  94. package/dist/chunk-6QGTRYSC.js.gz +0 -0
  95. package/dist/chunk-EFZ4K6V5.mjs.br +0 -0
  96. package/dist/chunk-EFZ4K6V5.mjs.gz +0 -0
  97. package/dist/chunk-LCWZ4TD4.js.br +0 -0
  98. package/dist/chunk-LCWZ4TD4.js.gz +0 -0
  99. package/dist/chunk-MZN2UIYT.mjs.br +0 -0
  100. package/dist/chunk-MZN2UIYT.mjs.gz +0 -0
  101. package/dist/chunk-P65VL2I6.js.br +0 -0
  102. package/dist/chunk-P65VL2I6.js.gz +0 -0
  103. package/dist/chunk-UNWU6D2M.js.br +0 -0
  104. package/dist/chunk-UNWU6D2M.js.gz +0 -0
  105. package/dist/chunk-VZI35LEF.js.br +0 -0
  106. package/dist/chunk-VZI35LEF.js.gz +0 -0
  107. package/dist/chunk-Y6W5LGTR.mjs.br +0 -0
  108. package/dist/chunk-Y6W5LGTR.mjs.gz +0 -0
  109. package/dist/useViewerBuildingBlocks-CBZrHhxl.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { translationsEn } from './chunk-5IUEPQTK.mjs';
2
- import { SHAPE_PRESET_DEFS, computeValueRangeForChart, VIEWER_SHORTCUT_REFERENCE, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, isTemplateElement, getImageFitStyle, isImageLikeElement, runMediaCommand, findMediaElementByElementId, mediaPlaybackAttributes, buildTextBlockStyle, hasTextProperties, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, getKinsokuLineBreakStyles, buildTextBody3DSceneStyle, resolveParagraphRtl, resolveParagraphAlign, resolveCssTextAlign, resolveParagraphStrutFontSize, colorWithOpacity, normalizeHexColor, build3DExtrusionData, isIdentityRectClip, getResolvedShapeClipPath, isStrokeOnlyPresetElement, normalizeStrokeDashType, buildCssGradientFromShapeStyle, buildShadowCssFromShapeStyle, buildInnerShadowCssFromShapeStyle, suppressesCssBorder, buildMultiLayerShadowCss, buildGlowBoxShadow, getCompoundLineBoxShadow, getSoftEdgeFilterId, getEffectDagFilter, buildPatternFillCss, buildReflectionCss, getCssBorderDashStyle, getCompoundLineBorderWidth, getSvgStrokeDasharray, buildSvgGradientDef, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, computeSelectionRect, DEFAULT_FONT_FAMILY, rectToCells, isCellInRect, buildChartViewModel, buildNotesPdfBytes, buildSlidesPdfBytes, buildPreviewAnimation, buildMotionPathPreview, getRoundRectRadiusPx2, mediaFallbackVisual, registerPersistentAudio, proportionalLineHeight, substituteFieldText, resolveUnderlineDecorationStyle, resolveAutoFitFontScale, getSubstituteFontFamily, parsePanoseString, hasDistinctScriptFonts, pieceLetterSpacing, resolveMetricTrackingPx, buildTextReflectionCss, getTextAlphaOpacity, buildTextRunFilterChain, buildTextShadowCss, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, sanitizeGradientStops, getGradientTileFlipCss, getGradientTileRectCss, apply3dEffects, clampUnitInterval, customGeometryPathsToSvgSubpaths, svgGradientFillRef, computeColumnBoundaries, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, getPatternSvg, ooxmlDashToCssBorderStyle, cell3DBevelCss, getChartStylePalette, chartAreaFill, computeLayout, valueToY, formatAxisValue, computeLayoutOptions, splitSeriesByAxis, computeValueRange, getSecondaryValueAxis, seriesColor, paletteColor, resolveRegionCode, normalizeValue, sequentialColorScale, mediaFallbackIcon, mediaFallbackLabelKey, MEDIA_CHROME_ATTRIBUTE, convertOmmlToMathMl, sanitizeMathMl, buildTextFillCss, resolvePictureBullet, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, resolveFontRefIdx, tintColor2, shadeColor2, ooxmlGradientAngleToCssDegrees, generateLogTicks, formatAxisValueWithUnits, getDisplayUnitLabel, splitRunForMetrics, hexToRgbChannels, chartPartToAttrs, segmentByScript, resolveFontForScript } from './chunk-247XH4EN.mjs';
2
+ import { SHAPE_PRESET_DEFS, computeValueRangeForChart, VIEWER_SHORTCUT_REFERENCE, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, getImageFitStyle, isImageLikeElement, runMediaCommand, findMediaElementByElementId, mediaPlaybackAttributes, buildTextBlockStyle, hasTextProperties, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, getKinsokuLineBreakStyles, buildTextBody3DSceneStyle, resolveParagraphRtl, resolveParagraphAlign, resolveCssTextAlign, resolveParagraphSpacing, resolveParagraphStrutFontSize, colorWithOpacity, normalizeHexColor, build3DExtrusionData, isIdentityRectClip, getResolvedShapeClipPath, isStrokeOnlyPresetElement, normalizeStrokeDashType, buildCssGradientFromShapeStyle, buildShadowCssFromShapeStyle, buildInnerShadowCssFromShapeStyle, suppressesCssBorder, buildMultiLayerShadowCss, buildGlowBoxShadow, getCompoundLineBoxShadow, getSoftEdgeFilterId, getEffectDagFilter, buildPatternFillCss, buildReflectionCss, getCssBorderDashStyle, getCompoundLineBorderWidth, getSvgStrokeDasharray, buildSvgGradientDef, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, computeSelectionRect, DEFAULT_FONT_FAMILY, cellStyleToCss, rectToCells, isCellInRect, buildChartViewModel, buildNotesPdfBytes, buildSlidesPdfBytes, buildPreviewAnimation, buildMotionPathPreview, getRoundRectRadiusPx2, mediaFallbackVisual, registerPersistentAudio, substituteFieldText, resolveUnderlineDecorationStyle, resolveAutoFitFontScale, getSubstituteFontFamily, parsePanoseString, hasDistinctScriptFonts, pieceLetterSpacing, resolveMetricTrackingPx, buildTextReflectionCss, getTextAlphaOpacity, buildTextRunFilterChain, buildTextShadowCss, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, sanitizeGradientStops, getGradientTileFlipCss, getGradientTileRectCss, apply3dEffects, clampUnitInterval, customGeometryPathsToSvgSubpaths, svgGradientFillRef, computeColumnBoundaries, getTableCellBandStyle, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, getChartStylePalette, chartAreaFill, computeLayout, valueToY, formatAxisValue, computeLayoutOptions, splitSeriesByAxis, computeValueRange, getSecondaryValueAxis, seriesColor, paletteColor, resolveRegionCode, normalizeValue, sequentialColorScale, mediaFallbackIcon, mediaFallbackLabelKey, MEDIA_CHROME_ATTRIBUTE, convertOmmlToMathMl, sanitizeMathMl, buildTextFillCss, resolvePictureBullet, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, ooxmlGradientAngleToCssDegrees, generateLogTicks, formatAxisValueWithUnits, getDisplayUnitLabel, splitRunForMetrics, hexToRgbChannels, chartPartToAttrs, segmentByScript, resolveFontForScript } from './chunk-D5TAZ5NL.mjs';
3
3
  import { clsx } from 'clsx';
4
4
  import { twMerge } from 'tailwind-merge';
5
5
  import React6, { useState, useEffect, useMemo, Suspense, useRef, useCallback, useLayoutEffect } from 'react';
@@ -267,29 +267,6 @@ function isConnectorOrLineElement(element) {
267
267
  return st === "connector" || st === "line" || element.shapeType === "line";
268
268
  }
269
269
 
270
- // src/viewer/utils/template-editing.ts
271
- function partitionTemplateElements(slides) {
272
- const templateElementsBySlideId = {};
273
- const nextSlides = slides.map((slide) => {
274
- const template = slide.elements.filter((el) => isTemplateElement(el));
275
- if (template.length === 0) {
276
- return slide;
277
- }
278
- templateElementsBySlideId[slide.id] = template;
279
- return { ...slide, elements: slide.elements.filter((el) => !isTemplateElement(el)) };
280
- });
281
- return { slides: nextSlides, templateElementsBySlideId };
282
- }
283
- function buildSaveSlides(slides, templateElementsBySlideId) {
284
- return slides.map((slide) => {
285
- const template = templateElementsBySlideId[slide.id];
286
- if (!template || template.length === 0) {
287
- return slide;
288
- }
289
- return { ...slide, elements: [...template, ...slide.elements] };
290
- });
291
- }
292
-
293
270
  // src/viewer/utils/image-style.ts
294
271
  function getImageMaskStyle(element) {
295
272
  if (!hasShapeProperties(element)) {
@@ -1917,31 +1894,6 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
1917
1894
  }
1918
1895
  return spanNode;
1919
1896
  }
1920
-
1921
- // src/viewer/utils/text-paragraph-spacing.ts
1922
- var PT_TO_PX = 96 / 72;
1923
- function resolveParagraphSpacing(input) {
1924
- const { paraProps, bodyStyle, isFirst, isLast, spaceFirstLast } = input;
1925
- const result = {};
1926
- const before = paraProps?.paragraphSpacingBefore ?? bodyStyle?.paragraphSpacingBefore;
1927
- if (typeof before === "number" && before > 0 && (!isFirst || spaceFirstLast)) {
1928
- result.marginTop = before;
1929
- }
1930
- const after = paraProps?.paragraphSpacingAfter ?? bodyStyle?.paragraphSpacingAfter;
1931
- if (typeof after === "number" && after > 0 && (!isLast || spaceFirstLast)) {
1932
- result.marginBottom = after;
1933
- }
1934
- const hasOwnLine = paraProps?.lineSpacing !== void 0 || paraProps?.lineSpacingExactPt !== void 0;
1935
- const lineSrc = hasOwnLine ? paraProps : bodyStyle;
1936
- const exactPt = lineSrc?.lineSpacingExactPt;
1937
- const multiplier = lineSrc?.lineSpacing;
1938
- if (typeof exactPt === "number" && exactPt > 0) {
1939
- result.lineHeight = `${exactPt * PT_TO_PX}px`;
1940
- } else if (typeof multiplier === "number" && multiplier > 0) {
1941
- result.lineHeight = proportionalLineHeight(multiplier);
1942
- }
1943
- return result;
1944
- }
1945
1897
  function groupSegmentsIntoParagraphs(segments) {
1946
1898
  const paragraphs = [];
1947
1899
  let current = [];
@@ -2020,18 +1972,18 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
2020
1972
  paraSegments.length > 0 ? paraSegments.map(({ segment }) => segment) : terminator ? [terminator] : [],
2021
1973
  bodyStyle?.fontSize
2022
1974
  );
2023
- const hasParaSpacing = spacing.marginTop !== void 0 || spacing.marginBottom !== void 0 || spacing.lineHeight !== void 0;
1975
+ const hasParaSpacing = spacing.spaceBeforePx !== void 0 || spacing.spaceAfterPx !== void 0 || spacing.lineHeight !== void 0;
2024
1976
  const paraStyle = {
2025
1977
  ...paraKinsokuStyle
2026
1978
  };
2027
1979
  if (strutFontSize !== void 0) {
2028
1980
  paraStyle.fontSize = strutFontSize;
2029
1981
  }
2030
- if (spacing.marginTop !== void 0) {
2031
- paraStyle.marginTop = spacing.marginTop;
1982
+ if (spacing.spaceBeforePx !== void 0) {
1983
+ paraStyle.marginTop = spacing.spaceBeforePx;
2032
1984
  }
2033
- if (spacing.marginBottom !== void 0) {
2034
- paraStyle.marginBottom = spacing.marginBottom;
1985
+ if (spacing.spaceAfterPx !== void 0) {
1986
+ paraStyle.marginBottom = spacing.spaceAfterPx;
2035
1987
  }
2036
1988
  if (spacing.lineHeight !== void 0) {
2037
1989
  paraStyle.lineHeight = spacing.lineHeight;
@@ -3385,191 +3337,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
3385
3337
  }
3386
3338
 
3387
3339
  // src/viewer/utils/table-band-style.tsx
3388
- function resolveTableStyleFillColor(fill, colorScheme) {
3389
- if (!fill) {
3390
- return void 0;
3391
- }
3392
- const key = fill.schemeColor;
3393
- const base = colorScheme ? colorScheme[key] : void 0;
3394
- if (!base) {
3395
- return void 0;
3396
- }
3397
- let color = base;
3398
- if (fill.tint !== void 0 && fill.tint > 0) {
3399
- color = tintColor2(color, fill.tint / 1e5);
3400
- }
3401
- if (fill.shade !== void 0 && fill.shade > 0) {
3402
- color = shadeColor2(color, 1 - fill.shade / 1e5);
3403
- }
3404
- return color;
3405
- }
3406
- function applyTableStyleText(text, colorScheme, style, fontScheme) {
3407
- if (!text) {
3408
- return false;
3409
- }
3410
- let applied = false;
3411
- if (text.bold) {
3412
- style.fontWeight = 700;
3413
- applied = true;
3414
- }
3415
- if (text.italic) {
3416
- style.fontStyle = "italic";
3417
- applied = true;
3418
- }
3419
- if (text.underline) {
3420
- style.textDecorationLine = "underline";
3421
- applied = true;
3422
- }
3423
- if (text.fontFace) {
3424
- style.fontFamily = text.fontFace;
3425
- applied = true;
3426
- } else {
3427
- const refFont = resolveFontRefIdx(text.fontRefIdx, fontScheme);
3428
- if (refFont) {
3429
- style.fontFamily = refFont;
3430
- applied = true;
3431
- }
3432
- }
3433
- if (text.fontSchemeColor && colorScheme) {
3434
- const base = colorScheme[text.fontSchemeColor];
3435
- if (base) {
3436
- let color = base;
3437
- if (text.fontTint !== void 0 && text.fontTint > 0) {
3438
- color = tintColor2(color, text.fontTint / 1e5);
3439
- }
3440
- if (text.fontShade !== void 0 && text.fontShade > 0) {
3441
- color = shadeColor2(color, 1 - text.fontShade / 1e5);
3442
- }
3443
- style.color = color;
3444
- applied = true;
3445
- }
3446
- }
3447
- return applied;
3448
- }
3449
- function resolveTableStyleEntry(tableStyleId, tableStyleMap) {
3450
- if (!tableStyleId || !tableStyleMap) {
3451
- return void 0;
3452
- }
3453
- const direct = tableStyleMap[tableStyleId];
3454
- if (direct) {
3455
- return direct;
3456
- }
3457
- const normalised = tableStyleId.trim().toUpperCase();
3458
- const withBraces = normalised.startsWith("{") ? normalised : `{${normalised}}`;
3459
- return tableStyleMap[withBraces];
3460
- }
3461
- function getTableCellBandStyle(element, rowIndex, cellIndex, rowCount, columnCount, styleCtx) {
3340
+ function getTableCellBandStyle2(element, rowIndex, cellIndex, rowCount, columnCount, styleCtx) {
3462
3341
  if (element.type !== "table") {
3463
3342
  return void 0;
3464
3343
  }
3465
- const td = element.tableData;
3466
- if (!td) {
3467
- return void 0;
3468
- }
3469
- const styleEntry = resolveTableStyleEntry(td.tableStyleId, styleCtx?.tableStyleMap);
3470
- const colorScheme = styleCtx?.theme?.colorScheme;
3471
- const fontScheme = styleCtx?.theme?.fontScheme;
3472
- const resolveFill = (fill, fallback) => resolveTableStyleFillColor(fill, colorScheme) ?? fallback;
3473
- const style = {};
3474
- let applied = false;
3475
- if (styleEntry?.wholeTblFill) {
3476
- const wholeBg = resolveFill(styleEntry.wholeTblFill, "");
3477
- if (wholeBg) {
3478
- style.backgroundColor = wholeBg;
3479
- applied = true;
3480
- }
3481
- }
3482
- if (applyTableStyleText(styleEntry?.wholeTblText, colorScheme, style, fontScheme)) {
3483
- applied = true;
3484
- }
3485
- const bandStartRow = td.firstRowHeader ? 1 : 0;
3486
- const bandEndRow = td.lastRow ? rowCount - 1 : rowCount;
3487
- if (td.bandedRows && rowIndex >= bandStartRow && rowIndex < bandEndRow) {
3488
- const bandIndex = rowIndex - bandStartRow;
3489
- const rowCycle = Math.max(td.bandRowCycle ?? 1, 1);
3490
- const bandGroup = Math.floor(bandIndex / rowCycle) % 2;
3491
- if (bandGroup === 0) {
3492
- const band1Bg = resolveFill(styleEntry?.band1HFill, "rgba(217, 226, 243, 0.5)");
3493
- style.backgroundColor = band1Bg;
3494
- applied = true;
3495
- } else if (styleEntry?.band2HFill) {
3496
- const band2Bg = resolveFill(styleEntry.band2HFill, "");
3497
- if (band2Bg) {
3498
- style.backgroundColor = band2Bg;
3499
- applied = true;
3500
- }
3501
- }
3502
- }
3503
- if (td.bandedColumns) {
3504
- const isFirstCol = td.firstCol;
3505
- const isLastCol = td.lastCol;
3506
- const colBandIndex = isFirstCol && cellIndex > 0 ? cellIndex - 1 : cellIndex;
3507
- const skipCol = isFirstCol && cellIndex === 0 || isLastCol && cellIndex === columnCount - 1;
3508
- if (!skipCol) {
3509
- const colCycle = Math.max(td.bandColCycle ?? 1, 1);
3510
- const colBandGroup = Math.floor(colBandIndex / colCycle) % 2;
3511
- if (colBandGroup === 0) {
3512
- if (!style.backgroundColor || !td.bandedRows) {
3513
- const band1Bg = resolveFill(styleEntry?.band1VFill, "rgba(217, 226, 243, 0.35)");
3514
- style.backgroundColor = band1Bg;
3515
- applied = true;
3516
- }
3517
- } else if (styleEntry?.band2VFill) {
3518
- if (!style.backgroundColor || !td.bandedRows) {
3519
- const band2Bg = resolveFill(styleEntry.band2VFill, "");
3520
- if (band2Bg) {
3521
- style.backgroundColor = band2Bg;
3522
- applied = true;
3523
- }
3524
- }
3525
- }
3526
- }
3527
- }
3528
- if (td.firstRowHeader && rowIndex === 0) {
3529
- style.fontWeight = 700;
3530
- const headerBg = resolveFill(styleEntry?.firstRowFill, "rgba(68, 114, 196, 0.85)");
3531
- style.backgroundColor = headerBg;
3532
- style.color = "#ffffff";
3533
- applyTableStyleText(styleEntry?.firstRowText, colorScheme, style, fontScheme);
3534
- applied = true;
3535
- }
3536
- if (td.lastRow && rowIndex === rowCount - 1) {
3537
- style.fontWeight = 700;
3538
- if (styleEntry?.lastRowFill) {
3539
- const lastRowBg = resolveFill(styleEntry.lastRowFill, "");
3540
- if (lastRowBg) {
3541
- style.backgroundColor = lastRowBg;
3542
- }
3543
- }
3544
- style.borderTopWidth = 2;
3545
- style.borderTopColor = resolveFill(styleEntry?.firstRowFill, "rgba(68, 114, 196, 0.7)");
3546
- style.borderTopStyle = "solid";
3547
- applyTableStyleText(styleEntry?.lastRowText, colorScheme, style, fontScheme);
3548
- applied = true;
3549
- }
3550
- if (td.firstCol && cellIndex === 0) {
3551
- style.fontWeight = 700;
3552
- if (styleEntry?.firstColFill) {
3553
- const firstColBg = resolveFill(styleEntry.firstColFill, "");
3554
- if (firstColBg) {
3555
- style.backgroundColor = firstColBg;
3556
- }
3557
- }
3558
- applyTableStyleText(styleEntry?.firstColText, colorScheme, style, fontScheme);
3559
- applied = true;
3560
- }
3561
- if (td.lastCol && cellIndex === columnCount - 1) {
3562
- style.fontWeight = 700;
3563
- if (styleEntry?.lastColFill) {
3564
- const lastColBg = resolveFill(styleEntry.lastColFill, "");
3565
- if (lastColBg) {
3566
- style.backgroundColor = lastColBg;
3567
- }
3568
- }
3569
- applyTableStyleText(styleEntry?.lastColText, colorScheme, style, fontScheme);
3570
- applied = true;
3571
- }
3572
- return applied ? style : void 0;
3344
+ return getTableCellBandStyle(element.tableData, rowIndex, cellIndex, rowCount, columnCount, {
3345
+ tableStyleMap: styleCtx?.tableStyleMap,
3346
+ colorScheme: styleCtx?.theme?.colorScheme,
3347
+ fontScheme: styleCtx?.theme?.fontScheme
3348
+ });
3573
3349
  }
3574
3350
 
3575
3351
  // src/viewer/utils/table-data-parse.tsx
@@ -3750,144 +3526,6 @@ function TableCellInput({
3750
3526
  }
3751
3527
  );
3752
3528
  }
3753
-
3754
- // src/viewer/utils/table-render-helpers.ts
3755
- function cellStyleToCss(style) {
3756
- if (!style) {
3757
- return {};
3758
- }
3759
- const css = {};
3760
- if (style.fontSize) {
3761
- css.fontSize = style.fontSize;
3762
- }
3763
- if (style.bold) {
3764
- css.fontWeight = "bold";
3765
- }
3766
- if (style.italic) {
3767
- css.fontStyle = "italic";
3768
- }
3769
- if (style.underline) {
3770
- css.textDecorationLine = "underline";
3771
- }
3772
- if (style.color) {
3773
- css.color = style.color;
3774
- }
3775
- if (style.gradientFillCss) {
3776
- css.background = style.gradientFillCss;
3777
- } else if (style.fillMode === "pattern" && style.patternFillPreset) {
3778
- const fg = normalizeHexColor(style.patternFillForeground, "#000000");
3779
- const bg = normalizeHexColor(style.patternFillBackground, "#ffffff");
3780
- const svgPattern = getPatternSvg(style.patternFillPreset, fg, bg);
3781
- if (svgPattern) {
3782
- const encoded = encodeURIComponent(svgPattern);
3783
- css.backgroundImage = `url("data:image/svg+xml,${encoded}")`;
3784
- css.backgroundColor = bg;
3785
- } else if (style.backgroundColor) {
3786
- css.backgroundColor = style.backgroundColor;
3787
- }
3788
- } else if (style.backgroundColor) {
3789
- css.backgroundColor = style.backgroundColor;
3790
- }
3791
- if (style.align) {
3792
- css.textAlign = style.align;
3793
- } else if (style.anchorCtr) {
3794
- css.textAlign = "center";
3795
- }
3796
- if (style.vAlign) {
3797
- css.verticalAlign = style.vAlign;
3798
- }
3799
- if (style.horzOverflow === "clip") {
3800
- css.overflowX = "hidden";
3801
- } else if (style.horzOverflow === "overflow") {
3802
- css.overflowX = "visible";
3803
- }
3804
- if (style.textDirection) {
3805
- switch (style.textDirection) {
3806
- case "vert":
3807
- case "eaVert":
3808
- case "wordArtVert":
3809
- case "wordArtVertRtl":
3810
- css.writingMode = "vertical-rl";
3811
- break;
3812
- case "vert270":
3813
- case "mongolianVert":
3814
- css.writingMode = "vertical-lr";
3815
- break;
3816
- }
3817
- if (style.textDirection === "wordArtVert") {
3818
- css.textOrientation = "upright";
3819
- } else if (css.writingMode) {
3820
- css.textOrientation = "mixed";
3821
- }
3822
- if (style.textDirection === "wordArtVertRtl") {
3823
- css.direction = "rtl";
3824
- }
3825
- }
3826
- const borderEdges = [
3827
- {
3828
- prefix: "borderTop",
3829
- width: style.borderTopWidth,
3830
- color: style.borderTopColor,
3831
- dash: style.borderTopDash
3832
- },
3833
- {
3834
- prefix: "borderBottom",
3835
- width: style.borderBottomWidth,
3836
- color: style.borderBottomColor,
3837
- dash: style.borderBottomDash
3838
- },
3839
- {
3840
- prefix: "borderLeft",
3841
- width: style.borderLeftWidth,
3842
- color: style.borderLeftColor,
3843
- dash: style.borderLeftDash
3844
- },
3845
- {
3846
- prefix: "borderRight",
3847
- width: style.borderRightWidth,
3848
- color: style.borderRightColor,
3849
- dash: style.borderRightDash
3850
- }
3851
- ];
3852
- for (const edge of borderEdges) {
3853
- if (edge.width || edge.color) {
3854
- const w = edge.width ?? 1;
3855
- const c = edge.color ?? style.borderColor ?? "#000000";
3856
- const s = ooxmlDashToCssBorderStyle(edge.dash);
3857
- css[edge.prefix] = `${w}px ${s} ${c}`;
3858
- }
3859
- }
3860
- if (style.marginLeft) {
3861
- css.paddingLeft = style.marginLeft;
3862
- }
3863
- if (style.marginRight) {
3864
- css.paddingRight = style.marginRight;
3865
- }
3866
- if (style.marginTop) {
3867
- css.paddingTop = style.marginTop;
3868
- }
3869
- if (style.marginBottom) {
3870
- css.paddingBottom = style.marginBottom;
3871
- }
3872
- const textShadowParts = [];
3873
- if (style.textShadowColor) {
3874
- const offX = style.textShadowOffsetX ?? 1;
3875
- const offY = style.textShadowOffsetY ?? 1;
3876
- const blur = style.textShadowBlur ?? 0;
3877
- textShadowParts.push(`${offX}px ${offY}px ${blur}px ${style.textShadowColor}`);
3878
- }
3879
- if (style.textGlowColor) {
3880
- const radius = style.textGlowRadius ?? 2;
3881
- textShadowParts.push(`0px 0px ${radius}px ${style.textGlowColor}`);
3882
- }
3883
- if (textShadowParts.length > 0) {
3884
- css.textShadow = textShadowParts.join(", ");
3885
- }
3886
- if (style.cell3D) {
3887
- Object.assign(css, cell3DBevelCss(style.cell3D));
3888
- }
3889
- return css;
3890
- }
3891
3529
  function TableResizeOverlay({
3892
3530
  children,
3893
3531
  columnWidths,
@@ -4240,7 +3878,7 @@ function renderTableElement(element, textStyle, options) {
4240
3878
  const colSpan = Number.isFinite(gridSpanRaw) && gridSpanRaw > 1 ? gridSpanRaw : void 0;
4241
3879
  const rowSpanRaw = Number.parseInt(String(cell["@_rowSpan"] || ""), 10);
4242
3880
  const rSpan = Number.isFinite(rowSpanRaw) && rowSpanRaw > 1 ? rowSpanRaw : void 0;
4243
- const bandStyle = getTableCellBandStyle(
3881
+ const bandStyle = getTableCellBandStyle2(
4244
3882
  element,
4245
3883
  rowIndex,
4246
3884
  cellIndex,
@@ -6181,7 +5819,7 @@ function FailedToLoad() {
6181
5819
  var LazySurfaceChart3DScene = React6.lazy(
6182
5820
  async () => {
6183
5821
  try {
6184
- return await import('./SurfaceChart3DScene-TTL2FTEG.mjs');
5822
+ return await import('./SurfaceChart3DScene-BMFEDBLF.mjs');
6185
5823
  } catch {
6186
5824
  return { default: FailedToLoad };
6187
5825
  }
@@ -6856,1032 +6494,6 @@ function renderChartElement(element) {
6856
6494
  }
6857
6495
  return renderDefaultBarChart(element);
6858
6496
  }
6859
- var PALETTES = {
6860
- colorful1: ["#3b82f6", "#22c55e", "#f97316", "#eab308", "#a855f7", "#ec4899"],
6861
- colorful2: ["#6366f1", "#14b8a6", "#f59e0b", "#ef4444", "#8b5cf6", "#06b6d4"],
6862
- colorful3: ["#0ea5e9", "#84cc16", "#f43e5e", "#a855f7", "#f97316", "#10b981"],
6863
- monochromatic1: ["#3b82f6", "#60a5fa", "#93c5fd", "#bfdbfe", "#2563eb", "#1d4ed8"],
6864
- monochromatic2: ["#6366f1", "#818cf8", "#a5b4fc", "#c7d2fe", "#4f46e5", "#4338ca"]
6865
- };
6866
- var DEFAULT_PALETTE = PALETTES.colorful1;
6867
- function colour(index, palette = DEFAULT_PALETTE) {
6868
- return palette[index % palette.length];
6869
- }
6870
- function nodeOpacity(index, total, style) {
6871
- const base = style === "intense" ? 1 : style === "moderate" ? 0.92 : 0.85;
6872
- if (total <= 1) {
6873
- return base;
6874
- }
6875
- return base - index / (total - 1) * 0.15;
6876
- }
6877
- function styleShadow(style) {
6878
- if (style === "intense") {
6879
- return "drop-shadow(0 2px 6px rgba(0,0,0,0.35))";
6880
- }
6881
- if (style === "moderate") {
6882
- return "drop-shadow(0 1px 3px rgba(0,0,0,0.2))";
6883
- }
6884
- return void 0;
6885
- }
6886
- function styleStroke(style) {
6887
- if (style === "intense") {
6888
- return 2;
6889
- }
6890
- if (style === "moderate") {
6891
- return 1.5;
6892
- }
6893
- return 0;
6894
- }
6895
- function truncate(text, max) {
6896
- if (text.length <= max) {
6897
- return text;
6898
- }
6899
- return `${text.slice(0, max - 1)}\u2026`;
6900
- }
6901
- function resolvePalette(el) {
6902
- if (el.type !== "smartArt" || !el.smartArtData) {
6903
- return DEFAULT_PALETTE;
6904
- }
6905
- const ctFills = el.smartArtData.colorTransform?.fillColors;
6906
- if (ctFills && ctFills.length > 0) {
6907
- return ctFills;
6908
- }
6909
- return PALETTES[el.smartArtData.colorScheme ?? "colorful1"] ?? DEFAULT_PALETTE;
6910
- }
6911
- function resolveStyle(el) {
6912
- if (el.type !== "smartArt" || !el.smartArtData) {
6913
- return "flat";
6914
- }
6915
- return el.smartArtData.style ?? "flat";
6916
- }
6917
- function resolveSmartArtDataPalette(data) {
6918
- const ctFills = data.colorTransform?.fillColors;
6919
- if (ctFills && ctFills.length > 0) {
6920
- return ctFills;
6921
- }
6922
- return PALETTES[data.colorScheme ?? "colorful1"] ?? DEFAULT_PALETTE;
6923
- }
6924
- function buildTree(nodes) {
6925
- const map = /* @__PURE__ */ new Map();
6926
- for (const n of nodes) {
6927
- map.set(n.id, { node: n, children: [] });
6928
- }
6929
- const roots = [];
6930
- for (const n of nodes) {
6931
- const treeNode = map.get(n.id);
6932
- if (n.parentId && map.has(n.parentId)) {
6933
- map.get(n.parentId).children.push(treeNode);
6934
- } else {
6935
- roots.push(treeNode);
6936
- }
6937
- }
6938
- return roots;
6939
- }
6940
- function treeWidth(t) {
6941
- if (t.children.length === 0) {
6942
- return 1;
6943
- }
6944
- return t.children.reduce((sum, c) => sum + treeWidth(c), 0);
6945
- }
6946
- function treeDepth(t) {
6947
- if (t.children.length === 0) {
6948
- return 1;
6949
- }
6950
- return 1 + Math.max(...t.children.map(treeDepth));
6951
- }
6952
- function layoutToCategory(layout) {
6953
- if (!layout) {
6954
- return "list";
6955
- }
6956
- const map = {
6957
- basicBlockList: "list",
6958
- alternatingHexagons: "list",
6959
- basicChevronProcess: "process",
6960
- basicCycle: "cycle",
6961
- basicPie: "cycle",
6962
- basicRadial: "radial",
6963
- basicVenn: "venn",
6964
- continuousBlockProcess: "process",
6965
- convergingRadial: "radial",
6966
- hierarchy: "hierarchy",
6967
- horizontalBulletList: "list",
6968
- linearVenn: "venn",
6969
- segmentedProcess: "process",
6970
- stackedList: "list",
6971
- tableList: "list",
6972
- trapezoidList: "list",
6973
- upwardArrow: "process",
6974
- basicFunnel: "funnel",
6975
- basicTarget: "radial",
6976
- interlockingGears: "radial",
6977
- basicTimeline: "process",
6978
- basicMatrix: "matrix",
6979
- basicPyramid: "pyramid",
6980
- invertedPyramid: "pyramid",
6981
- bendingProcess: "process",
6982
- stepDownProcess: "stepdown",
6983
- alternatingFlow: "alternatingflow",
6984
- descendingProcess: "descending",
6985
- pictureAccentList: "pictureaccent",
6986
- verticalBlockList: "verticalblock",
6987
- groupedList: "grouped",
6988
- pyramidList: "pyramidlist",
6989
- horizontalPictureList: "horizontalpicture",
6990
- accentProcess: "accentprocess",
6991
- verticalChevronList: "verticalchevron"
6992
- };
6993
- return map[layout] ?? "list";
6994
- }
6995
- function smartArtNodeGroupProps(nodeId, shadow, label2) {
6996
- const props = {
6997
- "data-smartart-node-id": nodeId,
6998
- style: { filter: shadow, pointerEvents: "auto" }
6999
- };
7000
- if (label2) {
7001
- props.role = "img";
7002
- props["aria-label"] = label2;
7003
- }
7004
- return props;
7005
- }
7006
- function fitFontSize(text, maxWidth, maxHeight, baseSize) {
7007
- const charWidthRatio = 0.6;
7008
- const maxByWidth = maxWidth / (text.length * charWidthRatio);
7009
- const maxByHeight = maxHeight * 0.5;
7010
- return Math.max(6, Math.min(baseSize, maxByWidth, maxByHeight));
7011
- }
7012
- function chevronPoints(x, y, w, h) {
7013
- const depth = Math.min(w * 0.2, h * 0.4);
7014
- return [
7015
- `${x},${y}`,
7016
- `${x + w - depth},${y}`,
7017
- `${x + w},${y + h / 2}`,
7018
- `${x + w - depth},${y + h}`,
7019
- `${x},${y + h}`,
7020
- `${x + depth},${y + h / 2}`
7021
- ].join(" ");
7022
- }
7023
- function gearPath(cx, cy, outerR, innerR, teeth) {
7024
- const segments = [];
7025
- const step = Math.PI * 2 / (teeth * 2);
7026
- for (let i = 0; i < teeth * 2; i++) {
7027
- const angle = i * step - Math.PI / 2;
7028
- const r = i % 2 === 0 ? outerR : innerR;
7029
- const x = cx + r * Math.cos(angle);
7030
- const y = cy + r * Math.sin(angle);
7031
- segments.push(i === 0 ? `M${x},${y}` : `L${x},${y}`);
7032
- }
7033
- segments.push("Z");
7034
- return segments.join(" ");
7035
- }
7036
- function SmartArtNodeText({
7037
- text,
7038
- x,
7039
- y,
7040
- fill,
7041
- fontSize,
7042
- fontWeight,
7043
- fontStyle,
7044
- className,
7045
- anchor = "middle"
7046
- }) {
7047
- const lines = text.split("\n").filter((l) => l.length > 0);
7048
- const lineHeight = fontSize * 1.2;
7049
- let startY;
7050
- let dominantBaseline;
7051
- if (anchor === "bottom") {
7052
- startY = lines.length > 0 ? y - (lines.length - 1) * lineHeight : y;
7053
- dominantBaseline = "auto";
7054
- } else if (anchor === "top") {
7055
- startY = y;
7056
- dominantBaseline = "hanging";
7057
- } else {
7058
- const totalHeight = lines.length * lineHeight;
7059
- startY = lines.length > 0 ? y - totalHeight / 2 + lineHeight / 2 : y;
7060
- dominantBaseline = "central";
7061
- }
7062
- return /* @__PURE__ */ jsx(
7063
- "text",
7064
- {
7065
- x,
7066
- textAnchor: "middle",
7067
- dominantBaseline,
7068
- fill,
7069
- fontSize,
7070
- fontWeight,
7071
- fontStyle,
7072
- className,
7073
- children: lines.map((line, i) => /* @__PURE__ */ jsx("tspan", { x, y: startY + i * lineHeight, children: line }, i))
7074
- }
7075
- );
7076
- }
7077
- function wrapChrome(chrome, content, className, a11y) {
7078
- const wrapperStyle = {};
7079
- if (chrome?.backgroundColor) {
7080
- wrapperStyle.backgroundColor = chrome.backgroundColor;
7081
- }
7082
- if (chrome?.outlineColor) {
7083
- wrapperStyle.border = `${chrome.outlineWidth ?? 1}px solid ${chrome.outlineColor}`;
7084
- }
7085
- return /* @__PURE__ */ jsx(
7086
- "div",
7087
- {
7088
- className: `w-full h-full ${className}`,
7089
- style: wrapperStyle,
7090
- role: a11y?.role,
7091
- "aria-label": a11y?.label,
7092
- children: content
7093
- }
7094
- );
7095
- }
7096
- function renderStepDownProcess(element, nodes, palette, style) {
7097
- const w = element.width;
7098
- const h = element.height;
7099
- const pad = 8;
7100
- const usableW = w - pad * 2;
7101
- const usableH = h - pad * 2;
7102
- const stepW = usableW / nodes.length;
7103
- const stepH = usableH / nodes.length;
7104
- const boxW = stepW * 0.85;
7105
- const boxH = stepH * 0.6;
7106
- const shadow = styleShadow(style);
7107
- const sw = styleStroke(style);
7108
- return /* @__PURE__ */ jsx(
7109
- "svg",
7110
- {
7111
- className: "w-full h-full pointer-events-none",
7112
- viewBox: `0 0 ${w} ${h}`,
7113
- preserveAspectRatio: "xMidYMid meet",
7114
- style: { filter: shadow },
7115
- children: nodes.map((node, i) => {
7116
- const x = pad + i * stepW;
7117
- const y = pad + i * stepH;
7118
- const fontSize = Math.max(7, Math.min(10, boxW * 0.1));
7119
- return /* @__PURE__ */ jsxs("g", { children: [
7120
- i < nodes.length - 1 && /* @__PURE__ */ jsx(
7121
- "line",
7122
- {
7123
- x1: x + boxW,
7124
- y1: y + boxH / 2,
7125
- x2: x + stepW,
7126
- y2: y + stepH + boxH / 2,
7127
- stroke: "#94a3b8",
7128
- strokeWidth: 1.5,
7129
- opacity: 0.5
7130
- }
7131
- ),
7132
- /* @__PURE__ */ jsx(
7133
- "rect",
7134
- {
7135
- x,
7136
- y,
7137
- width: boxW,
7138
- height: boxH,
7139
- rx: 5,
7140
- fill: colour(i, palette),
7141
- opacity: nodeOpacity(i, nodes.length, style),
7142
- stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
7143
- strokeWidth: sw
7144
- }
7145
- ),
7146
- /* @__PURE__ */ jsx(
7147
- SmartArtNodeText,
7148
- {
7149
- x: x + boxW / 2,
7150
- y: y + boxH / 2,
7151
- text: truncate(node.text, 20),
7152
- fill: "white",
7153
- fontSize,
7154
- className: "pointer-events-none"
7155
- }
7156
- )
7157
- ] }, `${element.id}-stepdown-${node.id}-${i}`);
7158
- })
7159
- }
7160
- );
7161
- }
7162
- function renderAlternatingFlow(element, nodes, palette, style) {
7163
- const w = element.width;
7164
- const h = element.height;
7165
- const pad = 8;
7166
- const usableH = h - pad * 2;
7167
- const rowH = usableH / nodes.length;
7168
- const halfW = (w - pad * 2) / 2;
7169
- const boxW = halfW * 0.8;
7170
- const boxH = Math.min(rowH * 0.7, 40);
7171
- const centerX = w / 2;
7172
- const shadow = styleShadow(style);
7173
- const sw = styleStroke(style);
7174
- return /* @__PURE__ */ jsxs(
7175
- "svg",
7176
- {
7177
- className: "w-full h-full pointer-events-none",
7178
- viewBox: `0 0 ${w} ${h}`,
7179
- preserveAspectRatio: "xMidYMid meet",
7180
- style: { filter: shadow },
7181
- children: [
7182
- /* @__PURE__ */ jsx(
7183
- "line",
7184
- {
7185
- x1: centerX,
7186
- y1: pad,
7187
- x2: centerX,
7188
- y2: h - pad,
7189
- stroke: "#94a3b8",
7190
- strokeWidth: 2,
7191
- opacity: 0.3
7192
- }
7193
- ),
7194
- nodes.map((node, i) => {
7195
- const isLeft = i % 2 === 0;
7196
- const y = pad + i * rowH + (rowH - boxH) / 2;
7197
- const x = isLeft ? centerX - boxW - 12 : centerX + 12;
7198
- const fontSize = Math.max(7, Math.min(10, boxW * 0.1));
7199
- return /* @__PURE__ */ jsxs("g", { children: [
7200
- /* @__PURE__ */ jsx(
7201
- "line",
7202
- {
7203
- x1: isLeft ? x + boxW : x,
7204
- y1: y + boxH / 2,
7205
- x2: centerX,
7206
- y2: y + boxH / 2,
7207
- stroke: colour(i, palette),
7208
- strokeWidth: 1.5,
7209
- opacity: 0.5
7210
- }
7211
- ),
7212
- /* @__PURE__ */ jsx("circle", { cx: centerX, cy: y + boxH / 2, r: 3, fill: colour(i, palette), opacity: 0.8 }),
7213
- /* @__PURE__ */ jsx(
7214
- "rect",
7215
- {
7216
- x,
7217
- y,
7218
- width: boxW,
7219
- height: boxH,
7220
- rx: 5,
7221
- fill: colour(i, palette),
7222
- opacity: nodeOpacity(i, nodes.length, style),
7223
- stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
7224
- strokeWidth: sw
7225
- }
7226
- ),
7227
- /* @__PURE__ */ jsx(
7228
- SmartArtNodeText,
7229
- {
7230
- x: x + boxW / 2,
7231
- y: y + boxH / 2,
7232
- text: truncate(node.text, 20),
7233
- fill: "white",
7234
- fontSize,
7235
- className: "pointer-events-none"
7236
- }
7237
- )
7238
- ] }, `${element.id}-altflow-${node.id}-${i}`);
7239
- })
7240
- ]
7241
- }
7242
- );
7243
- }
7244
- function renderDescendingProcess(element, nodes, palette, style) {
7245
- const w = element.width;
7246
- const h = element.height;
7247
- const pad = 8;
7248
- const gap = 4;
7249
- const usableH = h - pad * 2;
7250
- const maxW = w - pad * 2;
7251
- const itemH = (usableH - gap * (nodes.length - 1)) / nodes.length;
7252
- const shadow = styleShadow(style);
7253
- const sw = styleStroke(style);
7254
- return /* @__PURE__ */ jsx(
7255
- "svg",
7256
- {
7257
- className: "w-full h-full pointer-events-none",
7258
- viewBox: `0 0 ${w} ${h}`,
7259
- preserveAspectRatio: "xMidYMid meet",
7260
- style: { filter: shadow },
7261
- children: nodes.map((node, i) => {
7262
- const widthFraction = 1 - i / Math.max(nodes.length, 1) * 0.5;
7263
- const bw = maxW * widthFraction;
7264
- const x = (w - bw) / 2;
7265
- const y = pad + i * (itemH + gap);
7266
- const fontSize = Math.max(7, Math.min(11, itemH * 0.4));
7267
- return /* @__PURE__ */ jsxs("g", { children: [
7268
- i < nodes.length - 1 && /* @__PURE__ */ jsxs(Fragment, { children: [
7269
- /* @__PURE__ */ jsx(
7270
- "line",
7271
- {
7272
- x1: w / 2,
7273
- y1: y + itemH,
7274
- x2: w / 2,
7275
- y2: y + itemH + gap,
7276
- stroke: "#94a3b8",
7277
- strokeWidth: 1.5,
7278
- opacity: 0.5
7279
- }
7280
- ),
7281
- /* @__PURE__ */ jsx(
7282
- "polygon",
7283
- {
7284
- points: `${w / 2 - 3},${y + itemH + gap - 4} ${w / 2},${y + itemH + gap} ${w / 2 + 3},${y + itemH + gap - 4}`,
7285
- fill: "#94a3b8",
7286
- opacity: 0.5
7287
- }
7288
- )
7289
- ] }),
7290
- /* @__PURE__ */ jsx(
7291
- "rect",
7292
- {
7293
- x,
7294
- y,
7295
- width: bw,
7296
- height: itemH,
7297
- rx: 5,
7298
- fill: colour(i, palette),
7299
- opacity: nodeOpacity(i, nodes.length, style),
7300
- stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
7301
- strokeWidth: sw
7302
- }
7303
- ),
7304
- /* @__PURE__ */ jsx(
7305
- SmartArtNodeText,
7306
- {
7307
- x: w / 2,
7308
- y: y + itemH / 2,
7309
- text: truncate(node.text, 30),
7310
- fill: "white",
7311
- fontSize,
7312
- className: "pointer-events-none"
7313
- }
7314
- )
7315
- ] }, `${element.id}-desc-${node.id}-${i}`);
7316
- })
7317
- }
7318
- );
7319
- }
7320
- function renderPictureAccentList(element, nodes, palette, style) {
7321
- const w = element.width;
7322
- const h = element.height;
7323
- const pad = 8;
7324
- const gap = 6;
7325
- const usableH = h - pad * 2;
7326
- const usableW = w - pad * 2;
7327
- const itemH = (usableH - gap * (nodes.length - 1)) / nodes.length;
7328
- const circleR = Math.min(itemH * 0.38, 18);
7329
- const textX = pad + circleR * 2 + 12;
7330
- const textW = usableW - circleR * 2 - 16;
7331
- const shadow = styleShadow(style);
7332
- const sw = styleStroke(style);
7333
- return /* @__PURE__ */ jsx(
7334
- "svg",
7335
- {
7336
- className: "w-full h-full pointer-events-none",
7337
- viewBox: `0 0 ${w} ${h}`,
7338
- preserveAspectRatio: "xMidYMid meet",
7339
- style: { filter: shadow },
7340
- children: nodes.map((node, i) => {
7341
- const y = pad + i * (itemH + gap);
7342
- const cy = y + itemH / 2;
7343
- const col = colour(i, palette);
7344
- const fontSize = Math.max(7, Math.min(11, itemH * 0.35));
7345
- return /* @__PURE__ */ jsxs("g", { children: [
7346
- /* @__PURE__ */ jsx(
7347
- "circle",
7348
- {
7349
- cx: pad + circleR,
7350
- cy,
7351
- r: circleR,
7352
- fill: col,
7353
- opacity: nodeOpacity(i, nodes.length, style)
7354
- }
7355
- ),
7356
- /* @__PURE__ */ jsx(
7357
- "text",
7358
- {
7359
- x: pad + circleR,
7360
- y: cy,
7361
- textAnchor: "middle",
7362
- dominantBaseline: "central",
7363
- fill: "white",
7364
- fontSize: Math.max(7, circleR * 0.7),
7365
- fontWeight: "bold",
7366
- className: "pointer-events-none",
7367
- children: i + 1
7368
- }
7369
- ),
7370
- /* @__PURE__ */ jsx(
7371
- "rect",
7372
- {
7373
- x: textX,
7374
- y: y + 2,
7375
- width: textW,
7376
- height: itemH - 4,
7377
- rx: 4,
7378
- fill: col,
7379
- opacity: 0.12,
7380
- stroke: col,
7381
- strokeWidth: sw > 0 ? sw : 1,
7382
- strokeOpacity: 0.3
7383
- }
7384
- ),
7385
- /* @__PURE__ */ jsx(
7386
- "text",
7387
- {
7388
- x: textX + 8,
7389
- y: cy,
7390
- textAnchor: "start",
7391
- dominantBaseline: "central",
7392
- fill: col,
7393
- fontSize,
7394
- className: "pointer-events-none",
7395
- children: truncate(node.text, 40)
7396
- }
7397
- )
7398
- ] }, `${element.id}-picacc-${node.id}-${i}`);
7399
- })
7400
- }
7401
- );
7402
- }
7403
- function renderVerticalBlockList(element, nodes, palette, style) {
7404
- const w = element.width;
7405
- const h = element.height;
7406
- const pad = 8;
7407
- const gap = 4;
7408
- const usableH = h - pad * 2;
7409
- const usableW = w - pad * 2;
7410
- const itemH = (usableH - gap * (nodes.length - 1)) / nodes.length;
7411
- const headerW = usableW * 0.22;
7412
- const bodyW = usableW - headerW - 4;
7413
- const shadow = styleShadow(style);
7414
- const sw = styleStroke(style);
7415
- return /* @__PURE__ */ jsx(
7416
- "svg",
7417
- {
7418
- className: "w-full h-full pointer-events-none",
7419
- viewBox: `0 0 ${w} ${h}`,
7420
- preserveAspectRatio: "xMidYMid meet",
7421
- style: { filter: shadow },
7422
- children: nodes.map((node, i) => {
7423
- const y = pad + i * (itemH + gap);
7424
- const col = colour(i, palette);
7425
- const fontSize = Math.max(7, Math.min(11, itemH * 0.35));
7426
- return /* @__PURE__ */ jsxs("g", { children: [
7427
- /* @__PURE__ */ jsx(
7428
- "rect",
7429
- {
7430
- x: pad,
7431
- y,
7432
- width: headerW,
7433
- height: itemH,
7434
- rx: 3,
7435
- fill: col,
7436
- opacity: nodeOpacity(i, nodes.length, style),
7437
- stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
7438
- strokeWidth: sw
7439
- }
7440
- ),
7441
- /* @__PURE__ */ jsx(
7442
- "text",
7443
- {
7444
- x: pad + headerW / 2,
7445
- y: y + itemH / 2,
7446
- textAnchor: "middle",
7447
- dominantBaseline: "central",
7448
- fill: "white",
7449
- fontSize: Math.max(8, itemH * 0.4),
7450
- fontWeight: "bold",
7451
- className: "pointer-events-none",
7452
- children: i + 1
7453
- }
7454
- ),
7455
- /* @__PURE__ */ jsx(
7456
- "rect",
7457
- {
7458
- x: pad + headerW + 4,
7459
- y,
7460
- width: bodyW,
7461
- height: itemH,
7462
- rx: 3,
7463
- fill: col,
7464
- opacity: 0.1,
7465
- stroke: col,
7466
- strokeWidth: 1,
7467
- strokeOpacity: 0.3
7468
- }
7469
- ),
7470
- /* @__PURE__ */ jsx(
7471
- "text",
7472
- {
7473
- x: pad + headerW + 12,
7474
- y: y + itemH / 2,
7475
- textAnchor: "start",
7476
- dominantBaseline: "central",
7477
- fill: col,
7478
- fontSize,
7479
- className: "pointer-events-none",
7480
- children: truncate(node.text, 40)
7481
- }
7482
- )
7483
- ] }, `${element.id}-vblk-${node.id}-${i}`);
7484
- })
7485
- }
7486
- );
7487
- }
7488
- function renderGroupedList(element, nodes, palette, style) {
7489
- const w = element.width;
7490
- const h = element.height;
7491
- const pad = 8;
7492
- const gap = 8;
7493
- const shadow = styleShadow(style);
7494
- const sw = styleStroke(style);
7495
- const groupSize = nodes.length <= 4 ? 2 : 3;
7496
- const groups = [];
7497
- for (let i = 0; i < nodes.length; i += groupSize) {
7498
- groups.push(nodes.slice(i, i + groupSize));
7499
- }
7500
- const usableW = w - pad * 2;
7501
- const groupW = (usableW - gap * (groups.length - 1)) / groups.length;
7502
- const usableH = h - pad * 2;
7503
- const headerH = usableH * 0.18;
7504
- return /* @__PURE__ */ jsx(
7505
- "svg",
7506
- {
7507
- className: "w-full h-full pointer-events-none",
7508
- viewBox: `0 0 ${w} ${h}`,
7509
- preserveAspectRatio: "xMidYMid meet",
7510
- style: { filter: shadow },
7511
- children: groups.map((group, gi) => {
7512
- const gx = pad + gi * (groupW + gap);
7513
- const col = colour(gi, palette);
7514
- const subItemGap = 3;
7515
- const subItemH = (usableH - headerH - 4 - subItemGap * (group.length - 1)) / group.length;
7516
- return /* @__PURE__ */ jsxs("g", { children: [
7517
- /* @__PURE__ */ jsx(
7518
- "rect",
7519
- {
7520
- x: gx,
7521
- y: pad,
7522
- width: groupW,
7523
- height: headerH,
7524
- rx: 4,
7525
- fill: col,
7526
- opacity: nodeOpacity(gi, groups.length, style),
7527
- stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
7528
- strokeWidth: sw
7529
- }
7530
- ),
7531
- /* @__PURE__ */ jsx(
7532
- "text",
7533
- {
7534
- x: gx + groupW / 2,
7535
- y: pad + headerH / 2,
7536
- textAnchor: "middle",
7537
- dominantBaseline: "central",
7538
- fill: "white",
7539
- fontSize: Math.max(7, Math.min(10, groupW * 0.08)),
7540
- fontWeight: "bold",
7541
- className: "pointer-events-none",
7542
- children: `Group ${gi + 1}`
7543
- }
7544
- ),
7545
- group.map((node, si) => {
7546
- const sy = pad + headerH + 4 + si * (subItemH + subItemGap);
7547
- const fontSize = Math.max(7, Math.min(10, subItemH * 0.35));
7548
- return /* @__PURE__ */ jsxs("g", { children: [
7549
- /* @__PURE__ */ jsx(
7550
- "rect",
7551
- {
7552
- x: gx + 4,
7553
- y: sy,
7554
- width: groupW - 8,
7555
- height: subItemH,
7556
- rx: 3,
7557
- fill: col,
7558
- opacity: 0.15,
7559
- stroke: col,
7560
- strokeWidth: 1,
7561
- strokeOpacity: 0.3
7562
- }
7563
- ),
7564
- /* @__PURE__ */ jsx(
7565
- SmartArtNodeText,
7566
- {
7567
- x: gx + groupW / 2,
7568
- y: sy + subItemH / 2,
7569
- text: truncate(node.text, 20),
7570
- fill: col,
7571
- fontSize,
7572
- className: "pointer-events-none"
7573
- }
7574
- )
7575
- ] }, `${element.id}-grp-${gi}-item-${node.id}-${si}`);
7576
- })
7577
- ] }, `${element.id}-grp-${gi}`);
7578
- })
7579
- }
7580
- );
7581
- }
7582
- function renderPyramidList(element, nodes, palette, style) {
7583
- const w = element.width;
7584
- const h = element.height;
7585
- const pad = 8;
7586
- const gap = 4;
7587
- const usableH = h - pad * 2;
7588
- const pyramidW = w * 0.35;
7589
- const labelStartX = pyramidW + pad + 16;
7590
- const labelW = w - labelStartX - pad;
7591
- const bandH = (usableH - gap * (nodes.length - 1)) / nodes.length;
7592
- const shadow = styleShadow(style);
7593
- return /* @__PURE__ */ jsx(
7594
- "svg",
7595
- {
7596
- className: "w-full h-full pointer-events-none",
7597
- viewBox: `0 0 ${w} ${h}`,
7598
- preserveAspectRatio: "xMidYMid meet",
7599
- style: { filter: shadow },
7600
- children: nodes.map((node, i) => {
7601
- const y = pad + i * (bandH + gap);
7602
- const col = colour(i, palette);
7603
- const topFrac = 0.3 + i / Math.max(nodes.length - 1, 1) * 0.7;
7604
- const segW = pyramidW * topFrac;
7605
- const segX = pad + (pyramidW - segW) / 2;
7606
- const fontSize = Math.max(7, Math.min(11, bandH * 0.35));
7607
- return /* @__PURE__ */ jsxs("g", { children: [
7608
- /* @__PURE__ */ jsx(
7609
- "rect",
7610
- {
7611
- x: segX,
7612
- y,
7613
- width: segW,
7614
- height: bandH,
7615
- rx: 2,
7616
- fill: col,
7617
- opacity: nodeOpacity(i, nodes.length, style)
7618
- }
7619
- ),
7620
- /* @__PURE__ */ jsx(
7621
- "line",
7622
- {
7623
- x1: segX + segW,
7624
- y1: y + bandH / 2,
7625
- x2: labelStartX - 4,
7626
- y2: y + bandH / 2,
7627
- stroke: col,
7628
- strokeWidth: 1,
7629
- opacity: 0.5,
7630
- strokeDasharray: "3,2"
7631
- }
7632
- ),
7633
- /* @__PURE__ */ jsx(
7634
- "rect",
7635
- {
7636
- x: labelStartX,
7637
- y: y + 2,
7638
- width: labelW,
7639
- height: bandH - 4,
7640
- rx: 3,
7641
- fill: col,
7642
- opacity: 0.1,
7643
- stroke: col,
7644
- strokeWidth: 1,
7645
- strokeOpacity: 0.25
7646
- }
7647
- ),
7648
- /* @__PURE__ */ jsx(
7649
- "text",
7650
- {
7651
- x: labelStartX + 8,
7652
- y: y + bandH / 2,
7653
- textAnchor: "start",
7654
- dominantBaseline: "central",
7655
- fill: col,
7656
- fontSize,
7657
- className: "pointer-events-none",
7658
- children: truncate(node.text, 30)
7659
- }
7660
- )
7661
- ] }, `${element.id}-pyrlist-${node.id}-${i}`);
7662
- })
7663
- }
7664
- );
7665
- }
7666
- function renderHorizontalPictureList(element, nodes, palette, style) {
7667
- const w = element.width;
7668
- const h = element.height;
7669
- const pad = 8;
7670
- const gap = 8;
7671
- const usableW = w - pad * 2;
7672
- const colW = (usableW - gap * (nodes.length - 1)) / nodes.length;
7673
- const usableH = h - pad * 2;
7674
- const circleR = Math.min(colW * 0.38, usableH * 0.28);
7675
- const shadow = styleShadow(style);
7676
- const sw = styleStroke(style);
7677
- return /* @__PURE__ */ jsx(
7678
- "svg",
7679
- {
7680
- className: "w-full h-full pointer-events-none",
7681
- viewBox: `0 0 ${w} ${h}`,
7682
- preserveAspectRatio: "xMidYMid meet",
7683
- style: { filter: shadow },
7684
- children: nodes.map((node, i) => {
7685
- const cx = pad + i * (colW + gap) + colW / 2;
7686
- const cy = pad + circleR + 4;
7687
- const col = colour(i, palette);
7688
- const labelY = cy + circleR + 10;
7689
- const fontSize = Math.max(7, Math.min(10, colW * 0.1));
7690
- return /* @__PURE__ */ jsxs("g", { children: [
7691
- /* @__PURE__ */ jsx(
7692
- "circle",
7693
- {
7694
- cx,
7695
- cy,
7696
- r: circleR,
7697
- fill: col,
7698
- opacity: nodeOpacity(i, nodes.length, style),
7699
- stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
7700
- strokeWidth: sw
7701
- }
7702
- ),
7703
- /* @__PURE__ */ jsx(
7704
- "text",
7705
- {
7706
- x: cx,
7707
- y: cy,
7708
- textAnchor: "middle",
7709
- dominantBaseline: "central",
7710
- fill: "white",
7711
- fontSize: Math.max(8, circleR * 0.5),
7712
- fontWeight: "bold",
7713
- className: "pointer-events-none",
7714
- children: i + 1
7715
- }
7716
- ),
7717
- /* @__PURE__ */ jsx(
7718
- "text",
7719
- {
7720
- x: cx,
7721
- y: labelY,
7722
- textAnchor: "middle",
7723
- dominantBaseline: "hanging",
7724
- fill: col,
7725
- fontSize,
7726
- className: "pointer-events-none",
7727
- children: truncate(node.text, 15)
7728
- }
7729
- )
7730
- ] }, `${element.id}-hpic-${node.id}-${i}`);
7731
- })
7732
- }
7733
- );
7734
- }
7735
- function renderAccentProcess(element, nodes, palette, style) {
7736
- const w = element.width;
7737
- const h = element.height;
7738
- const pad = 8;
7739
- const arrowGap = 16;
7740
- const usableW = w - pad * 2;
7741
- const nodeW = (usableW - arrowGap * (nodes.length - 1)) / nodes.length;
7742
- const nodeH = h * 0.45;
7743
- const yMid = h / 2;
7744
- const circleR = Math.min(nodeW, nodeH) * 0.55;
7745
- const shadow = styleShadow(style);
7746
- const sw = styleStroke(style);
7747
- return /* @__PURE__ */ jsx(
7748
- "svg",
7749
- {
7750
- className: "w-full h-full pointer-events-none",
7751
- viewBox: `0 0 ${w} ${h}`,
7752
- preserveAspectRatio: "xMidYMid meet",
7753
- style: { filter: shadow },
7754
- children: nodes.map((node, i) => {
7755
- const x = pad + i * (nodeW + arrowGap);
7756
- const cx = x + nodeW / 2;
7757
- const col = colour(i, palette);
7758
- const fontSize = Math.max(7, Math.min(11, nodeW * 0.1));
7759
- return /* @__PURE__ */ jsxs("g", { children: [
7760
- /* @__PURE__ */ jsx("circle", { cx, cy: yMid, r: circleR, fill: col, opacity: 0.15 }),
7761
- /* @__PURE__ */ jsx(
7762
- "rect",
7763
- {
7764
- x,
7765
- y: yMid - nodeH / 2,
7766
- width: nodeW,
7767
- height: nodeH,
7768
- rx: 5,
7769
- fill: col,
7770
- opacity: nodeOpacity(i, nodes.length, style),
7771
- stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
7772
- strokeWidth: sw
7773
- }
7774
- ),
7775
- /* @__PURE__ */ jsx(
7776
- SmartArtNodeText,
7777
- {
7778
- x: cx,
7779
- y: yMid,
7780
- text: truncate(node.text, 20),
7781
- fill: "white",
7782
- fontSize,
7783
- className: "pointer-events-none"
7784
- }
7785
- ),
7786
- i < nodes.length - 1 && /* @__PURE__ */ jsxs(Fragment, { children: [
7787
- /* @__PURE__ */ jsx(
7788
- "line",
7789
- {
7790
- x1: x + nodeW + 2,
7791
- y1: yMid,
7792
- x2: x + nodeW + arrowGap - 2,
7793
- y2: yMid,
7794
- stroke: "#94a3b8",
7795
- strokeWidth: 1.5,
7796
- opacity: 0.5
7797
- }
7798
- ),
7799
- /* @__PURE__ */ jsx(
7800
- "polygon",
7801
- {
7802
- points: `${x + nodeW + arrowGap - 6},${yMid - 3} ${x + nodeW + arrowGap - 2},${yMid} ${x + nodeW + arrowGap - 6},${yMid + 3}`,
7803
- fill: "#94a3b8",
7804
- opacity: 0.5
7805
- }
7806
- )
7807
- ] })
7808
- ] }, `${element.id}-accproc-${node.id}-${i}`);
7809
- })
7810
- }
7811
- );
7812
- }
7813
- function renderVerticalChevronList(element, nodes, palette, style) {
7814
- const w = element.width;
7815
- const h = element.height;
7816
- const pad = 8;
7817
- const gap = 2;
7818
- const usableW = w - pad * 2;
7819
- const usableH = h - pad * 2;
7820
- const itemH = (usableH - gap * (nodes.length - 1)) / nodes.length;
7821
- const chevDepth = Math.min(12, itemH * 0.3);
7822
- const shadow = styleShadow(style);
7823
- const sw = styleStroke(style);
7824
- return /* @__PURE__ */ jsx(
7825
- "svg",
7826
- {
7827
- className: "w-full h-full pointer-events-none",
7828
- viewBox: `0 0 ${w} ${h}`,
7829
- preserveAspectRatio: "xMidYMid meet",
7830
- style: { filter: shadow },
7831
- children: nodes.map((node, i) => {
7832
- const x = pad;
7833
- const y = pad + i * (itemH + gap);
7834
- const col = colour(i, palette);
7835
- const fontSize = Math.max(7, Math.min(11, itemH * 0.4));
7836
- const isFirst = i === 0;
7837
- const isLast = i === nodes.length - 1;
7838
- const points = isFirst ? [
7839
- `${x},${y}`,
7840
- `${x + usableW},${y}`,
7841
- `${x + usableW},${y + itemH - chevDepth}`,
7842
- `${x + usableW / 2},${y + itemH}`,
7843
- `${x},${y + itemH - chevDepth}`
7844
- ].join(" ") : isLast ? [
7845
- `${x},${y + chevDepth}`,
7846
- `${x + usableW / 2},${y}`,
7847
- `${x + usableW},${y + chevDepth}`,
7848
- `${x + usableW},${y + itemH}`,
7849
- `${x},${y + itemH}`
7850
- ].join(" ") : [
7851
- `${x},${y + chevDepth}`,
7852
- `${x + usableW / 2},${y}`,
7853
- `${x + usableW},${y + chevDepth}`,
7854
- `${x + usableW},${y + itemH - chevDepth}`,
7855
- `${x + usableW / 2},${y + itemH}`,
7856
- `${x},${y + itemH - chevDepth}`
7857
- ].join(" ");
7858
- return /* @__PURE__ */ jsxs("g", { children: [
7859
- /* @__PURE__ */ jsx(
7860
- "polygon",
7861
- {
7862
- points,
7863
- fill: col,
7864
- opacity: nodeOpacity(i, nodes.length, style),
7865
- stroke: sw > 0 ? "rgba(255,255,255,0.3)" : "none",
7866
- strokeWidth: sw
7867
- }
7868
- ),
7869
- /* @__PURE__ */ jsx(
7870
- SmartArtNodeText,
7871
- {
7872
- x: x + usableW / 2,
7873
- y: y + itemH / 2,
7874
- text: truncate(node.text, 30),
7875
- fill: "white",
7876
- fontSize,
7877
- className: "pointer-events-none"
7878
- }
7879
- )
7880
- ] }, `${element.id}-vchev-${node.id}-${i}`);
7881
- })
7882
- }
7883
- );
7884
- }
7885
6497
 
7886
6498
  // src/viewer/utils/pdf-builder-notes-builder.ts
7887
6499
  function buildNotesPdf(pages) {
@@ -7987,4 +6599,4 @@ function stopPreviewAnimation() {
7987
6599
  activePreview = null;
7988
6600
  }
7989
6601
 
7990
- export { ANIMATION_PRESET_OPTIONS, ARROW_SIZE_OPTIONS, CONNECTOR_ARROW_OPTIONS, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY2 as DEFAULT_FONT_FAMILY, DEFAULT_STROKE_COLOR, DEFAULT_TABLE_COLUMNS, DEFAULT_TABLE_ROWS, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, EMU_PER_PX, GRID_SIZE, HYPERLINK_COLOR, MIN_ELEMENT_SIZE, SHAPE_PRESETS, SHORTCUT_REFERENCE_ITEMS, SLIDE_NAV_THUMBNAIL_WIDTH, STROKE_DASH_OPTIONS, SmartArtNodeText, THEME_COLOR_SWATCHES, TOOLBAR_SECTIONS, UNGROUPED_SECTION_ID, ZOOM_TO_SELECTION_PADDING, build3DExtrusionData2 as build3DExtrusionData, buildLineGlowFilter, buildLineShadowCss, buildNotesPdf, buildPdfFromImageData, buildReactChartViewModel, buildSaveSlides, buildTextBody3DSceneStyle2 as buildTextBody3DSceneStyle, buildTree, chevronPoints, cloneHistorySnapshot2 as cloneHistorySnapshot, cn, colour, executeMediaCommand, fitFontSize, gearPath, getAnimationInitialStyle2 as getAnimationInitialStyle, getConnectorPathGeometry, getCropShapeClipPath, getDuotoneColors, getImageRenderStyle, getImageTilingStyle, getShapeVisualStyle, getTextLayoutStyle, getTextStyleForElement, getTextWarpStyle, hasDagDuotoneEffect, isConnectorOrLineElement, isImageTiled, layoutToCategory, nodeOpacity, partitionTemplateElements, renderAccentProcess, renderAlternatingFlow, renderChartElement, renderConnectorMarker, renderDagDuotoneSvgFilter, renderDescendingProcess, renderGroupedList, renderHorizontalPictureList, renderMediaElement, renderPictureAccentList, renderPyramidList, renderStepDownProcess, renderTableElement, renderTextSegments, renderVectorShape, renderVerticalBlockList, renderVerticalChevronList, resolvePalette, resolveSmartArtDataPalette, resolveStyle, shouldRenderFallbackLabel, smartArtNodeGroupProps, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation, styleShadow, styleStroke, treeDepth, treeWidth, truncate, wrapChrome };
6602
+ export { ANIMATION_PRESET_OPTIONS, ARROW_SIZE_OPTIONS, CONNECTOR_ARROW_OPTIONS, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY2 as DEFAULT_FONT_FAMILY, DEFAULT_STROKE_COLOR, DEFAULT_TABLE_COLUMNS, DEFAULT_TABLE_ROWS, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, EMU_PER_PX, GRID_SIZE, HYPERLINK_COLOR, MIN_ELEMENT_SIZE, SHAPE_PRESETS, SHORTCUT_REFERENCE_ITEMS, SLIDE_NAV_THUMBNAIL_WIDTH, STROKE_DASH_OPTIONS, THEME_COLOR_SWATCHES, TOOLBAR_SECTIONS, UNGROUPED_SECTION_ID, ZOOM_TO_SELECTION_PADDING, build3DExtrusionData2 as build3DExtrusionData, buildLineGlowFilter, buildLineShadowCss, buildNotesPdf, buildPdfFromImageData, buildReactChartViewModel, buildTextBody3DSceneStyle2 as buildTextBody3DSceneStyle, cloneHistorySnapshot2 as cloneHistorySnapshot, cn, executeMediaCommand, getAnimationInitialStyle2 as getAnimationInitialStyle, getConnectorPathGeometry, getCropShapeClipPath, getDuotoneColors, getImageRenderStyle, getImageTilingStyle, getShapeVisualStyle, getTextLayoutStyle, getTextStyleForElement, getTextWarpStyle, hasDagDuotoneEffect, isConnectorOrLineElement, isImageTiled, renderChartElement, renderConnectorMarker, renderDagDuotoneSvgFilter, renderMediaElement, renderTableElement, renderTextSegments, renderVectorShape, shouldRenderFallbackLabel, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation };