pptx-react-viewer 4.42.0 → 4.42.1

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 (60) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/{AiChatPanel-IDP326YW.mjs → AiChatPanel-R5UTSMXU.mjs} +1 -1
  3. package/dist/AiChatPanel-R5UTSMXU.mjs.br +0 -0
  4. package/dist/AiChatPanel-R5UTSMXU.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-KEVVVR7C.js → AiChatPanel-VI2IQ7XU.js} +9 -9
  6. package/dist/AiChatPanel-VI2IQ7XU.js.br +0 -0
  7. package/dist/AiChatPanel-VI2IQ7XU.js.gz +0 -0
  8. package/dist/{chunk-36H3P2PB.js → chunk-2XVYVT25.js} +383 -383
  9. package/dist/chunk-2XVYVT25.js.br +0 -0
  10. package/dist/chunk-2XVYVT25.js.gz +0 -0
  11. package/dist/{chunk-MNT2CXDI.mjs → chunk-3LIHPZKS.mjs} +22 -22
  12. package/dist/chunk-3LIHPZKS.mjs.br +0 -0
  13. package/dist/chunk-3LIHPZKS.mjs.gz +0 -0
  14. package/dist/{chunk-3PKYNJJG.js → chunk-FKY33ZKL.js} +21 -21
  15. package/dist/chunk-FKY33ZKL.js.br +0 -0
  16. package/dist/chunk-FKY33ZKL.js.gz +0 -0
  17. package/dist/{chunk-QJ4X7Y7S.js → chunk-GLWV52C6.js} +248 -245
  18. package/dist/chunk-GLWV52C6.js.br +0 -0
  19. package/dist/chunk-GLWV52C6.js.gz +0 -0
  20. package/dist/{chunk-MPKUCUHD.mjs → chunk-PZUBHPGJ.mjs} +4 -4
  21. package/dist/chunk-PZUBHPGJ.mjs.br +0 -0
  22. package/dist/chunk-PZUBHPGJ.mjs.gz +0 -0
  23. package/dist/{chunk-EQTNWM5Y.mjs → chunk-UACDKMXF.mjs} +4 -1
  24. package/dist/chunk-UACDKMXF.mjs.br +0 -0
  25. package/dist/chunk-UACDKMXF.mjs.gz +0 -0
  26. package/dist/index.js +24 -24
  27. package/dist/index.js.br +0 -0
  28. package/dist/index.js.gz +0 -0
  29. package/dist/index.mjs +3 -3
  30. package/dist/index.mjs.br +0 -0
  31. package/dist/index.mjs.gz +0 -0
  32. package/dist/internals.js +81 -81
  33. package/dist/internals.js.br +0 -0
  34. package/dist/internals.js.gz +0 -0
  35. package/dist/internals.mjs +2 -2
  36. package/dist/internals.mjs.br +0 -0
  37. package/dist/internals.mjs.gz +0 -0
  38. package/dist/viewer/index.js +19 -19
  39. package/dist/viewer/index.js.br +0 -0
  40. package/dist/viewer/index.js.gz +0 -0
  41. package/dist/viewer/index.mjs +3 -3
  42. package/dist/viewer/index.mjs.br +2 -3
  43. package/dist/viewer/index.mjs.gz +0 -0
  44. package/package.json +8 -8
  45. package/dist/AiChatPanel-IDP326YW.mjs.br +0 -0
  46. package/dist/AiChatPanel-IDP326YW.mjs.gz +0 -0
  47. package/dist/AiChatPanel-KEVVVR7C.js.br +0 -0
  48. package/dist/AiChatPanel-KEVVVR7C.js.gz +0 -0
  49. package/dist/chunk-36H3P2PB.js.br +0 -0
  50. package/dist/chunk-36H3P2PB.js.gz +0 -0
  51. package/dist/chunk-3PKYNJJG.js.br +0 -0
  52. package/dist/chunk-3PKYNJJG.js.gz +0 -0
  53. package/dist/chunk-EQTNWM5Y.mjs.br +0 -0
  54. package/dist/chunk-EQTNWM5Y.mjs.gz +0 -0
  55. package/dist/chunk-MNT2CXDI.mjs.br +0 -0
  56. package/dist/chunk-MNT2CXDI.mjs.gz +0 -0
  57. package/dist/chunk-MPKUCUHD.mjs.br +0 -0
  58. package/dist/chunk-MPKUCUHD.mjs.gz +0 -0
  59. package/dist/chunk-QJ4X7Y7S.js.br +0 -0
  60. package/dist/chunk-QJ4X7Y7S.js.gz +0 -0
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  import { __reExport } from './chunk-Q3DHYOLK.mjs';
2
- import { SHAPE_PRESET_DEFS, VIEWER_SHORTCUT_REFERENCE, STROKE_DASH_OPTIONS as STROKE_DASH_OPTIONS$1, getAnimationInitialStyle as getAnimationInitialStyle$1, cloneHistorySnapshot as cloneHistorySnapshot$1, getImageFitStyle, getImageFillCounterTransform, getComputedFillStyle, getCropShapeClipPath as getCropShapeClipPath$1, getImageTilingStyle as getImageTilingStyle$1, mediaPlaybackAttributes, getOnlineVideoEmbed, ONLINE_VIDEO_IFRAME_SANDBOX, ONLINE_VIDEO_IFRAME_ALLOW, buildTextBlockStyle, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, buildTextBodyLayoutStyle, buildTextBody3DSceneStyle as buildTextBody3DSceneStyle$1, buildParagraphs, followingText, colorWithOpacity, normalizeHexColor, hexToRgbUnit, build3DExtrusionData as build3DExtrusionData$1, getFrameEffectStyle, getComputedEffectStyle, getComputedStrokeStyle, getAnimationColorBaseStyle, isStrokeOnlyPresetElement, resolveShapeGeometry, screenStrokeWidth, normalizeStrokeDashType, getSvgStrokeDasharray, buildSvgGradientDef, buildStrokeOutline, getPresetShapeVectorGeometry, isWedgeCalloutPresetShape, svgGradientFillRef, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, canDrillDown, computeSelectionRect, DEFAULT_FONT_FAMILY as DEFAULT_FONT_FAMILY$1, cellStyleToCss, TABLE_CELL_TEXT_DEFAULTS, rectToCells, isCellInRect, tableContainerCss, buildChartViewModel, resolveChartKind, chartPreserveAspectRatio, buildNotesPdfBytes, buildTiledSlidesPdfBytes, buildPreviewAnimation, measurePreviewGeometry, buildMotionPathPreview, mediaFallbackVisual, scheduleMediaTrimAndFade, registerCrossSlideAudio, shouldShowMediaFullscreenStopButton, withInlineListDecorationDefaults, segmentStyleToCss, resolveAutoFitFontScale, applyUnderlineVariant, nestedTextDecorationStyle, scaleFontSizeForAutoFit, resolveFontKerning, resolveScriptFontSet, hasDistinctScriptFonts, authoredLetterSpacingPx, eastAsianBreaksForRun, pieceLetterSpacing, resolveMetricTrackingPx, hollowTextFillStyle, splitsUnderlineIntoWords, stripUnderlineDecoration, buildTabContext, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, apply3dEffects as apply3dEffects$1, buildSubpathPaints, computeColumnBoundaries, computeTableMergeCrossings, columnHandleSegments, rowHandleSegments, getTableCellBandStyle as getTableCellBandStyle$1, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders as getCellDiagonalBorders$1, cellParagraphBlocks, resolveChartPalette, computeChartLegendLayout, resolveChartSvgDef, mediaFallbackIcon, mediaFallbackLabelKey, MEDIA_CHROME_ATTRIBUTE, convertOmmlToMathMl, sanitizeMathMl, tableCellCss, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, buildRectPathGradient, screenBorder, cellRunStyle, buildRunTabLines, chartPartToAttrs, splitWordsForUnderline, splitRunForMetrics, splitEastAsianBreaks, splitRunByScriptFont } from 'ooxml-ui/pptx';
2
+ import { SHAPE_PRESET_DEFS, VIEWER_SHORTCUT_REFERENCE, STROKE_DASH_OPTIONS as STROKE_DASH_OPTIONS$1, getAnimationInitialStyle as getAnimationInitialStyle$1, cloneHistorySnapshot as cloneHistorySnapshot$1, getImageFitStyle, getImageFillCounterTransform, getComputedFillStyle, getCropShapeClipPath as getCropShapeClipPath$1, getImageTilingStyle as getImageTilingStyle$1, mediaPlaybackAttributes, getOnlineVideoEmbed, ONLINE_VIDEO_IFRAME_SANDBOX, ONLINE_VIDEO_IFRAME_ALLOW, buildTextBlockStyle, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, buildTextBodyLayoutStyle, buildTextBody3DSceneStyle as buildTextBody3DSceneStyle$1, buildParagraphs, followingText, colorWithOpacity, normalizeHexColor, hexToRgbUnit, build3DExtrusionData as build3DExtrusionData$1, getFrameEffectStyle, getComputedEffectStyle, getComputedStrokeStyle, getAnimationColorBaseStyle, isStrokeOnlyPresetElement, resolveShapeGeometry, screenStrokeWidth, markerPath, normalizeStrokeDashType, getSvgStrokeDasharray, buildSvgGradientDef, isArrowedCustomPath, buildStrokeOutline, getPresetShapeVectorGeometry, isWedgeCalloutPresetShape, svgGradientFillRef, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, canDrillDown, computeSelectionRect, DEFAULT_FONT_FAMILY as DEFAULT_FONT_FAMILY$1, cellStyleToCss, TABLE_CELL_TEXT_DEFAULTS, rectToCells, isCellInRect, tableContainerCss, buildChartViewModel, resolveChartKind, chartPreserveAspectRatio, buildNotesPdfBytes, buildTiledSlidesPdfBytes, buildPreviewAnimation, measurePreviewGeometry, buildMotionPathPreview, mediaFallbackVisual, scheduleMediaTrimAndFade, registerCrossSlideAudio, shouldShowMediaFullscreenStopButton, withInlineListDecorationDefaults, segmentStyleToCss, resolveAutoFitFontScale, applyUnderlineVariant, nestedTextDecorationStyle, scaleFontSizeForAutoFit, resolveFontKerning, resolveScriptFontSet, hasDistinctScriptFonts, authoredLetterSpacingPx, eastAsianBreaksForRun, pieceLetterSpacing, resolveMetricTrackingPx, hollowTextFillStyle, splitsUnderlineIntoWords, stripUnderlineDecoration, buildTabContext, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, apply3dEffects as apply3dEffects$1, buildSubpathPaints, computeColumnBoundaries, computeTableMergeCrossings, columnHandleSegments, rowHandleSegments, getTableCellBandStyle as getTableCellBandStyle$1, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders as getCellDiagonalBorders$1, cellParagraphBlocks, resolveChartPalette, computeChartLegendLayout, resolveChartSvgDef, mediaFallbackIcon, mediaFallbackLabelKey, MEDIA_CHROME_ATTRIBUTE, convertOmmlToMathMl, sanitizeMathMl, tableCellCss, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, buildRectPathGradient, screenBorder, cellRunStyle, buildRunTabLines, chartPartToAttrs, splitWordsForUnderline, splitRunForMetrics, splitEastAsianBreaks, splitRunByScriptFont } from 'ooxml-ui/pptx';
3
3
  export { ACTION_BUTTON_PRESETS, DEFAULT_COLOR_CHANGE_TOLERANCE, INK_REPLAY_KEYFRAMES, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, SHAPE_QUICK_STYLES, SLIDE_TRANSITION_OPTIONS, TABLE_STYLE_PRESETS, applyColorChange, applyFormatToElement, applyReroutedConnectors, buildCacheKey, buildContentPartStrokes, buildCssGradientFromShapeStyle, buildInkGroupStrokes, buildSaveSlides, canvasToJpegData, clampCropValue, cloneSlide, cloneTemplateElementsBySlideId, colorWithOpacity, comparePresentation, computeHandoutLayout, computeSnapToShape, copyFormatFromElement, formatCommentTimestamp, generateNoteLineCount, getAriaLabel, getAriaRole, getAriaRoleDescription, getCachedResult, getCompoundLineOffsets, getCompoundLineWidths, getContentPartReplayStyles, getElementLabel, getElementTransform, getElementTransformWithoutRotation, getImageEffectsFilter, getImageEffectsOpacity, getInkReplayStyles, getPatternSvg, getPrintableArea, getShapeAdjustmentHandleDescriptors, getSvgStrokeDasharray, getTextCompensationTransform, hasCopyableFormat, isEditableTextElement, isImageTiled, isPpactionUrl, isTemplateElementId, isUrlSafe, makeCloneId, mergeCells, normalizeHexColor, normalizeStrokeDashType, openNativeEyeDropper, parsePpactionUrl, partitionTemplateElements, rerouteConnectorsForMovedElements, safeOpenUrl, sanitizeGradientStops, setCachedResult, splitCell, stopAllPersistentAudio, substituteFieldText } from 'ooxml-ui/pptx';
4
4
  import * as pptx_star from 'ooxml-core/pptx';
5
5
  import { clsx } from 'clsx';
@@ -1413,10 +1413,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
1413
1413
  spanStyle.fontFamily = baseFontFamily;
1414
1414
  spanStyle.verticalAlign = baselineShift;
1415
1415
  spanStyle.fontKerning = fontKerning;
1416
- spanStyle.letterSpacing = pieceLetterSpacing(
1417
- authoredLetterSpacing,
1418
- resolveMetricTrackingPx(textValue, metricFont)
1419
- );
1416
+ spanStyle.letterSpacing = ctx.textBuildPiece ? run.style.letterSpacing : pieceLetterSpacing(authoredLetterSpacing, resolveMetricTrackingPx(textValue, metricFont));
1420
1417
  const hollow = hollowTextFillStyle(segmentStyle, {
1421
1418
  color: resolvedSegmentColor,
1422
1419
  textStroke: typeof spanStyle.WebkitTextStroke === "string" ? spanStyle.WebkitTextStroke : void 0
@@ -1428,6 +1425,9 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
1428
1425
  if (runRtl !== void 0) {
1429
1426
  spanStyle.direction = runRtl ? "rtl" : "ltr";
1430
1427
  spanStyle.unicodeBidi = runRtl !== ctx.paragraphRtl ? "bidi-override" : "embed";
1428
+ if (ctx.textBuildPiece && runRtl === true === (ctx.paragraphRtl === true)) {
1429
+ spanStyle.unicodeBidi = "normal";
1430
+ }
1431
1431
  }
1432
1432
  const isUnderlineWords = splitsUnderlineIntoWords(segmentStyle);
1433
1433
  const wordDecoration = isUnderlineWords ? nestedStyle ?? run.underlineWordPieces?.find((piece) => piece.style)?.style : void 0;
@@ -1457,7 +1457,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
1457
1457
  Boolean(segmentStyle.italic),
1458
1458
  { language: segmentStyle.language, rtl: ctx.paragraphRtl === true }
1459
1459
  ),
1460
- metricContext,
1460
+ ctx.textBuildPiece ? void 0 : metricContext,
1461
1461
  isUnderlineWords,
1462
1462
  wordDecoration
1463
1463
  );
@@ -1595,7 +1595,7 @@ function renderParagraph(para, paraIndex, paraCount, segments, ctx, subElementAn
1595
1595
  element.id,
1596
1596
  paraIndex,
1597
1597
  renderedRuns,
1598
- runs,
1598
+ para.runs,
1599
1599
  subElementAnimStates,
1600
1600
  // A staged build splits the paragraph but must not flatten it: each piece
1601
1601
  // is re-rendered through the SAME run renderer, so it keeps its run's
@@ -1603,7 +1603,7 @@ function renderParagraph(para, paraIndex, paraCount, segments, ctx, subElementAn
1603
1603
  (run, text, pieceKey) => renderParagraphRun(
1604
1604
  { ...run, text },
1605
1605
  segments[run.segmentIndex ?? -1],
1606
- runCtx,
1606
+ { ...runCtx, textBuildPiece: true },
1607
1607
  `-build-${pieceKey}`
1608
1608
  )
1609
1609
  );
@@ -1896,31 +1896,31 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
1896
1896
  function getConnectorPathGeometry(element) {
1897
1897
  return (0, dist_exports.getConnectorPathGeometry)(element);
1898
1898
  }
1899
- var ARROW_SIZE_SCALE = {
1900
- sm: 0.6,
1901
- med: 1,
1902
- lg: 1.5
1903
- };
1904
1899
  function renderConnectorMarker(markerId, arrowType, color, arrowWidth, arrowLength) {
1905
1900
  if (!arrowType || arrowType === "none") {
1906
1901
  return null;
1907
1902
  }
1908
- const wScale = ARROW_SIZE_SCALE[arrowWidth || "med"] ?? 1;
1909
- const lScale = ARROW_SIZE_SCALE[arrowLength || "med"] ?? 1;
1910
- const mw = Math.round(8 * lScale);
1911
- const mh = Math.round(8 * wScale);
1903
+ const shape = markerPath(arrowType, arrowWidth, arrowLength);
1912
1904
  return /* @__PURE__ */ jsx(
1913
1905
  "marker",
1914
1906
  {
1915
1907
  id: markerId,
1916
- markerWidth: mw,
1917
- markerHeight: mh,
1918
- refX: 8,
1908
+ markerWidth: shape.markerWidth,
1909
+ markerHeight: shape.markerHeight,
1910
+ refX: shape.refX,
1919
1911
  refY: 5,
1920
1912
  orient: "auto-start-reverse",
1921
1913
  viewBox: "0 0 10 10",
1922
1914
  markerUnits: "strokeWidth",
1923
- children: arrowType === "triangle" ? /* @__PURE__ */ jsx("polygon", { points: "0,0 10,5 0,10", fill: color }) : arrowType === "stealth" ? /* @__PURE__ */ jsx("polygon", { points: "0,0 10,5 0,10 3.4,5", fill: color }) : arrowType === "diamond" ? /* @__PURE__ */ jsx("polygon", { points: "0,5 5,0 10,5 5,10", fill: color }) : arrowType === "oval" ? /* @__PURE__ */ jsx("ellipse", { cx: 5, cy: 5, rx: 4, ry: 3.3, fill: color }) : /* @__PURE__ */ jsx("path", { d: "M0 0 L10 5 L0 10", fill: "none", stroke: color, strokeWidth: 1.6 })
1915
+ preserveAspectRatio: "none",
1916
+ children: shape.shape === "circle" ? /* @__PURE__ */ jsx("circle", { cx: 5, cy: 5, r: 4, fill: color }) : /* @__PURE__ */ jsx(
1917
+ "path",
1918
+ {
1919
+ d: shape.d,
1920
+ fill: shape.strokeOnly ? "none" : color,
1921
+ stroke: shape.strokeOnly ? color : void 0
1922
+ }
1923
+ )
1924
1924
  }
1925
1925
  );
1926
1926
  }
@@ -2139,7 +2139,7 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
2139
2139
  fillColor,
2140
2140
  element.shapeStyle?.fillOpacity,
2141
2141
  strokePaint,
2142
- strokeWidth,
2142
+ isArrowedCustomPath(element) ? 0 : strokeWidth,
2143
2143
  dashArray,
2144
2144
  Boolean(animatesFill),
2145
2145
  // A freeform's `a:gradFill` needs a real SVG paint server: the
Binary file
Binary file
@@ -1437,10 +1437,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
1437
1437
  spanStyle.fontFamily = baseFontFamily;
1438
1438
  spanStyle.verticalAlign = baselineShift;
1439
1439
  spanStyle.fontKerning = fontKerning;
1440
- spanStyle.letterSpacing = pptx.pieceLetterSpacing(
1441
- authoredLetterSpacing,
1442
- pptx.resolveMetricTrackingPx(textValue, metricFont)
1443
- );
1440
+ spanStyle.letterSpacing = ctx.textBuildPiece ? run.style.letterSpacing : pptx.pieceLetterSpacing(authoredLetterSpacing, pptx.resolveMetricTrackingPx(textValue, metricFont));
1444
1441
  const hollow = pptx.hollowTextFillStyle(segmentStyle, {
1445
1442
  color: resolvedSegmentColor,
1446
1443
  textStroke: typeof spanStyle.WebkitTextStroke === "string" ? spanStyle.WebkitTextStroke : void 0
@@ -1452,6 +1449,9 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
1452
1449
  if (runRtl !== void 0) {
1453
1450
  spanStyle.direction = runRtl ? "rtl" : "ltr";
1454
1451
  spanStyle.unicodeBidi = runRtl !== ctx.paragraphRtl ? "bidi-override" : "embed";
1452
+ if (ctx.textBuildPiece && runRtl === true === (ctx.paragraphRtl === true)) {
1453
+ spanStyle.unicodeBidi = "normal";
1454
+ }
1455
1455
  }
1456
1456
  const isUnderlineWords = pptx.splitsUnderlineIntoWords(segmentStyle);
1457
1457
  const wordDecoration = isUnderlineWords ? nestedStyle ?? run.underlineWordPieces?.find((piece) => piece.style)?.style : void 0;
@@ -1481,7 +1481,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
1481
1481
  Boolean(segmentStyle.italic),
1482
1482
  { language: segmentStyle.language, rtl: ctx.paragraphRtl === true }
1483
1483
  ),
1484
- metricContext,
1484
+ ctx.textBuildPiece ? void 0 : metricContext,
1485
1485
  isUnderlineWords,
1486
1486
  wordDecoration
1487
1487
  );
@@ -1619,7 +1619,7 @@ function renderParagraph(para, paraIndex, paraCount, segments, ctx, subElementAn
1619
1619
  element.id,
1620
1620
  paraIndex,
1621
1621
  renderedRuns,
1622
- runs,
1622
+ para.runs,
1623
1623
  subElementAnimStates,
1624
1624
  // A staged build splits the paragraph but must not flatten it: each piece
1625
1625
  // is re-rendered through the SAME run renderer, so it keeps its run's
@@ -1627,7 +1627,7 @@ function renderParagraph(para, paraIndex, paraCount, segments, ctx, subElementAn
1627
1627
  (run, text, pieceKey) => renderParagraphRun(
1628
1628
  { ...run, text },
1629
1629
  segments[run.segmentIndex ?? -1],
1630
- runCtx,
1630
+ { ...runCtx, textBuildPiece: true },
1631
1631
  `-build-${pieceKey}`
1632
1632
  )
1633
1633
  );
@@ -1920,31 +1920,31 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
1920
1920
  function getConnectorPathGeometry(element) {
1921
1921
  return (0, dist_exports.getConnectorPathGeometry)(element);
1922
1922
  }
1923
- var ARROW_SIZE_SCALE = {
1924
- sm: 0.6,
1925
- med: 1,
1926
- lg: 1.5
1927
- };
1928
1923
  function renderConnectorMarker(markerId, arrowType, color, arrowWidth, arrowLength) {
1929
1924
  if (!arrowType || arrowType === "none") {
1930
1925
  return null;
1931
1926
  }
1932
- const wScale = ARROW_SIZE_SCALE[arrowWidth || "med"] ?? 1;
1933
- const lScale = ARROW_SIZE_SCALE[arrowLength || "med"] ?? 1;
1934
- const mw = Math.round(8 * lScale);
1935
- const mh = Math.round(8 * wScale);
1927
+ const shape = pptx.markerPath(arrowType, arrowWidth, arrowLength);
1936
1928
  return /* @__PURE__ */ jsxRuntime.jsx(
1937
1929
  "marker",
1938
1930
  {
1939
1931
  id: markerId,
1940
- markerWidth: mw,
1941
- markerHeight: mh,
1942
- refX: 8,
1932
+ markerWidth: shape.markerWidth,
1933
+ markerHeight: shape.markerHeight,
1934
+ refX: shape.refX,
1943
1935
  refY: 5,
1944
1936
  orient: "auto-start-reverse",
1945
1937
  viewBox: "0 0 10 10",
1946
1938
  markerUnits: "strokeWidth",
1947
- children: arrowType === "triangle" ? /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "0,0 10,5 0,10", fill: color }) : arrowType === "stealth" ? /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "0,0 10,5 0,10 3.4,5", fill: color }) : arrowType === "diamond" ? /* @__PURE__ */ jsxRuntime.jsx("polygon", { points: "0,5 5,0 10,5 5,10", fill: color }) : arrowType === "oval" ? /* @__PURE__ */ jsxRuntime.jsx("ellipse", { cx: 5, cy: 5, rx: 4, ry: 3.3, fill: color }) : /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 0 L10 5 L0 10", fill: "none", stroke: color, strokeWidth: 1.6 })
1939
+ preserveAspectRatio: "none",
1940
+ children: shape.shape === "circle" ? /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: 5, cy: 5, r: 4, fill: color }) : /* @__PURE__ */ jsxRuntime.jsx(
1941
+ "path",
1942
+ {
1943
+ d: shape.d,
1944
+ fill: shape.strokeOnly ? "none" : color,
1945
+ stroke: shape.strokeOnly ? color : void 0
1946
+ }
1947
+ )
1948
1948
  }
1949
1949
  );
1950
1950
  }
@@ -2163,7 +2163,7 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
2163
2163
  fillColor,
2164
2164
  element.shapeStyle?.fillOpacity,
2165
2165
  strokePaint,
2166
- strokeWidth,
2166
+ pptx.isArrowedCustomPath(element) ? 0 : strokeWidth,
2167
2167
  dashArray,
2168
2168
  Boolean(animatesFill),
2169
2169
  // A freeform's `a:gradFill` needs a real SVG paint server: the
Binary file
Binary file