pptx-react-viewer 2.5.3 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/{AiChatPanel-DPMHPOWF.js → AiChatPanel-53W2JG6G.js} +22 -22
  3. package/dist/AiChatPanel-53W2JG6G.js.br +0 -0
  4. package/dist/AiChatPanel-53W2JG6G.js.gz +0 -0
  5. package/dist/{AiChatPanel-OFOOWR4U.mjs → AiChatPanel-L5IOO72H.mjs} +3 -3
  6. package/dist/AiChatPanel-L5IOO72H.mjs.br +0 -0
  7. package/dist/AiChatPanel-L5IOO72H.mjs.gz +0 -0
  8. package/dist/{Model3DScene-PD2MDBIE.js → Model3DScene-E7JGXNJN.js} +2 -2
  9. package/dist/Model3DScene-E7JGXNJN.js.br +0 -0
  10. package/dist/Model3DScene-E7JGXNJN.js.gz +0 -0
  11. package/dist/{Model3DScene-P4OKVQBF.mjs → Model3DScene-EW7OWRJK.mjs} +1 -1
  12. package/dist/Model3DScene-EW7OWRJK.mjs.br +0 -0
  13. package/dist/Model3DScene-EW7OWRJK.mjs.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-FECS3THE.js → SurfaceChart3DScene-3QB6NVKD.js} +2 -2
  15. package/dist/SurfaceChart3DScene-3QB6NVKD.js.br +0 -0
  16. package/dist/SurfaceChart3DScene-3QB6NVKD.js.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-TL4ZIOI4.mjs → SurfaceChart3DScene-64HI3U7Y.mjs} +1 -1
  18. package/dist/{SurfaceChart3DScene-TL4ZIOI4.mjs.br → SurfaceChart3DScene-64HI3U7Y.mjs.br} +0 -0
  19. package/dist/SurfaceChart3DScene-64HI3U7Y.mjs.gz +0 -0
  20. package/dist/{chunk-6KOM27PS.mjs → chunk-34ZW32XK.mjs} +902 -52
  21. package/dist/chunk-34ZW32XK.mjs.br +0 -0
  22. package/dist/chunk-34ZW32XK.mjs.gz +0 -0
  23. package/dist/{chunk-QDIF3ZXF.mjs → chunk-DWQJW3UM.mjs} +19 -4
  24. package/dist/chunk-DWQJW3UM.mjs.br +0 -0
  25. package/dist/chunk-DWQJW3UM.mjs.gz +0 -0
  26. package/dist/{chunk-UUS7QT22.js → chunk-EJ24IFPL.js} +346 -315
  27. package/dist/chunk-EJ24IFPL.js.br +0 -0
  28. package/dist/chunk-EJ24IFPL.js.gz +0 -0
  29. package/dist/{chunk-FFLUALX5.js → chunk-NXSAYLYI.js} +251 -236
  30. package/dist/chunk-NXSAYLYI.js.br +0 -0
  31. package/dist/chunk-NXSAYLYI.js.gz +0 -0
  32. package/dist/{chunk-SAXG53MO.mjs → chunk-PENV7S7Z.mjs} +1 -1
  33. package/dist/chunk-PENV7S7Z.mjs.br +0 -0
  34. package/dist/chunk-PENV7S7Z.mjs.gz +0 -0
  35. package/dist/{chunk-F3JUUSC4.mjs → chunk-UO55N46T.mjs} +91 -13
  36. package/dist/chunk-UO55N46T.mjs.br +0 -0
  37. package/dist/chunk-UO55N46T.mjs.gz +0 -0
  38. package/dist/{chunk-23Q3I2LM.js → chunk-UVA55CRK.js} +904 -51
  39. package/dist/chunk-UVA55CRK.js.br +0 -0
  40. package/dist/chunk-UVA55CRK.js.gz +0 -0
  41. package/dist/{chunk-USHZUHHG.js → chunk-V5XVTKFS.js} +925 -847
  42. package/dist/chunk-V5XVTKFS.js.br +0 -0
  43. package/dist/chunk-V5XVTKFS.js.gz +0 -0
  44. package/dist/{chunk-H2FZ2NJ7.js → chunk-VBWWICDF.js} +3 -3
  45. package/dist/chunk-VBWWICDF.js.br +0 -0
  46. package/dist/chunk-VBWWICDF.js.gz +0 -0
  47. package/dist/{chunk-ZZA62IND.mjs → chunk-WCO3NEH5.mjs} +35 -4
  48. package/dist/chunk-WCO3NEH5.mjs.br +0 -0
  49. package/dist/chunk-WCO3NEH5.mjs.gz +0 -0
  50. package/dist/index.d.ts +15 -0
  51. package/dist/index.js +34 -34
  52. package/dist/index.js.br +0 -0
  53. package/dist/index.js.gz +0 -0
  54. package/dist/index.mjs +5 -5
  55. package/dist/index.mjs.br +0 -0
  56. package/dist/index.mjs.gz +0 -0
  57. package/dist/internals.d.ts +42 -0
  58. package/dist/internals.d.ts.map +1 -1
  59. package/dist/internals.js +78 -78
  60. package/dist/internals.js.br +0 -0
  61. package/dist/internals.js.gz +0 -0
  62. package/dist/internals.mjs +3 -3
  63. package/dist/internals.mjs.br +0 -0
  64. package/dist/internals.mjs.gz +0 -0
  65. package/dist/pptx-viewer.css +1 -1
  66. package/dist/pptx-viewer.css.br +0 -0
  67. package/dist/pptx-viewer.css.gz +0 -0
  68. package/dist/viewer/index.d.ts +15 -0
  69. package/dist/viewer/index.js +21 -21
  70. package/dist/viewer/index.js.br +0 -0
  71. package/dist/viewer/index.js.gz +0 -0
  72. package/dist/viewer/index.mjs +5 -5
  73. package/dist/viewer/index.mjs.br +0 -0
  74. package/dist/viewer/index.mjs.gz +0 -0
  75. package/package.json +1 -1
  76. package/dist/AiChatPanel-DPMHPOWF.js.br +0 -0
  77. package/dist/AiChatPanel-DPMHPOWF.js.gz +0 -0
  78. package/dist/AiChatPanel-OFOOWR4U.mjs.br +0 -0
  79. package/dist/AiChatPanel-OFOOWR4U.mjs.gz +0 -0
  80. package/dist/Model3DScene-P4OKVQBF.mjs.br +0 -0
  81. package/dist/Model3DScene-P4OKVQBF.mjs.gz +0 -0
  82. package/dist/Model3DScene-PD2MDBIE.js.br +0 -0
  83. package/dist/Model3DScene-PD2MDBIE.js.gz +0 -0
  84. package/dist/SurfaceChart3DScene-FECS3THE.js.br +0 -0
  85. package/dist/SurfaceChart3DScene-FECS3THE.js.gz +0 -0
  86. package/dist/SurfaceChart3DScene-TL4ZIOI4.mjs.gz +0 -0
  87. package/dist/chunk-23Q3I2LM.js.br +0 -0
  88. package/dist/chunk-23Q3I2LM.js.gz +0 -0
  89. package/dist/chunk-6KOM27PS.mjs.br +0 -0
  90. package/dist/chunk-6KOM27PS.mjs.gz +0 -0
  91. package/dist/chunk-F3JUUSC4.mjs.br +0 -0
  92. package/dist/chunk-F3JUUSC4.mjs.gz +0 -0
  93. package/dist/chunk-FFLUALX5.js.br +0 -0
  94. package/dist/chunk-FFLUALX5.js.gz +0 -0
  95. package/dist/chunk-H2FZ2NJ7.js.br +0 -0
  96. package/dist/chunk-H2FZ2NJ7.js.gz +0 -0
  97. package/dist/chunk-QDIF3ZXF.mjs.br +0 -0
  98. package/dist/chunk-QDIF3ZXF.mjs.gz +0 -0
  99. package/dist/chunk-SAXG53MO.mjs.br +0 -0
  100. package/dist/chunk-SAXG53MO.mjs.gz +0 -0
  101. package/dist/chunk-USHZUHHG.js.br +0 -0
  102. package/dist/chunk-USHZUHHG.js.gz +0 -0
  103. package/dist/chunk-UUS7QT22.js.br +0 -0
  104. package/dist/chunk-UUS7QT22.js.gz +0 -0
  105. package/dist/chunk-ZZA62IND.mjs.br +0 -0
  106. package/dist/chunk-ZZA62IND.mjs.gz +0 -0
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  import { translationsEn } from './chunk-Z6HIZWIQ.mjs';
2
- import { SHAPE_PRESET_DEFS, computeValueRangeForChart, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, isTemplateElement, isImageLikeElement, clampCropValue, parseMediaCommand, hasTextProperties, normalizeHexColor, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, computeAutoFitTextStyle, resolveLineHeight, getKinsokuLineBreakStyles, buildTextBody3DSceneStyle, resolveParagraphRtl, resolveParagraphAlign, resolveCssTextAlign, colorWithOpacity, build3DExtrusionData, getResolvedShapeClipPath, normalizeStrokeDashType, buildCssGradientFromShapeStyle, buildShadowCssFromShapeStyle, buildInnerShadowCssFromShapeStyle, buildMultiLayerShadowCss, buildGlowBoxShadow, getCompoundLineBoxShadow, getSoftEdgeFilterId, getEffectDagFilter, buildPatternFillCss, buildReflectionCss, getCssBorderDashStyle, getCompoundLineBorderWidth, getSvgStrokeDasharray, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, computeSelectionRect, rectToCells, isCellInRect, buildChartViewModel, buildNotesPdfBytes, buildSlidesPdfBytes, buildPreviewAnimation, getRoundRectRadiusPx, substituteFieldText, resolveUnderlineDecorationStyle, getSubstituteFontFamily, hasDistinctScriptFonts, buildTextReflectionCss, getTextAlphaOpacity, buildTextRunFilterChain, buildTextShadowCss, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, evaluatePresetShape, apply3dEffects, clampUnitInterval, customGeometryPathsToSvgSubpaths, computeColumnBoundaries, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, getPatternSvg, ooxmlDashToCssBorderStyle, cell3DBevelCss, getChartStylePalette, computeLayout, valueToY, formatAxisValue, computeLayoutOptions, splitSeriesByAxis, computeValueRange, getSecondaryValueAxis, seriesColor, paletteColor, resolveRegionCode, normalizeValue, sequentialColorScale, convertOmmlToMathMl, sanitizeMathMl, buildTextFillCss, resolvePictureBullet, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, resolveFontRefIdx, tintColor2, shadeColor2, ooxmlGradientAngleToCssDegrees, segmentByScript, resolveFontForScript, generateLogTicks, formatAxisValueWithUnits, getDisplayUnitLabel, hexToRgbChannels, chartPartToAttrs } from './chunk-6KOM27PS.mjs';
2
+ import { SHAPE_PRESET_DEFS, computeValueRangeForChart, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, isTemplateElement, isImageLikeElement, clampCropValue, parseMediaCommand, hasTextProperties, normalizeHexColor, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, computeAutoFitTextStyle, resolveLineHeight, getKinsokuLineBreakStyles, buildTextBody3DSceneStyle, resolveParagraphRtl, resolveParagraphAlign, resolveCssTextAlign, resolveParagraphStrutFontSize, colorWithOpacity, build3DExtrusionData, getResolvedShapeClipPath, normalizeStrokeDashType, buildCssGradientFromShapeStyle, buildShadowCssFromShapeStyle, buildInnerShadowCssFromShapeStyle, buildMultiLayerShadowCss, buildGlowBoxShadow, getCompoundLineBoxShadow, getSoftEdgeFilterId, getEffectDagFilter, buildPatternFillCss, buildReflectionCss, getCssBorderDashStyle, getCompoundLineBorderWidth, getSvgStrokeDasharray, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, computeSelectionRect, rectToCells, isCellInRect, buildChartViewModel, buildNotesPdfBytes, buildSlidesPdfBytes, buildPreviewAnimation, getRoundRectRadiusPx, substituteFieldText, resolveUnderlineDecorationStyle, getSubstituteFontFamily, hasDistinctScriptFonts, buildTextReflectionCss, getTextAlphaOpacity, buildTextRunFilterChain, buildTextShadowCss, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, evaluatePresetShape, apply3dEffects, clampUnitInterval, customGeometryPathsToSvgSubpaths, computeColumnBoundaries, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, getPatternSvg, ooxmlDashToCssBorderStyle, cell3DBevelCss, getChartStylePalette, computeLayout, valueToY, formatAxisValue, computeLayoutOptions, splitSeriesByAxis, computeValueRange, getSecondaryValueAxis, seriesColor, paletteColor, resolveRegionCode, normalizeValue, sequentialColorScale, convertOmmlToMathMl, sanitizeMathMl, buildTextFillCss, resolvePictureBullet, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, resolveFontRefIdx, tintColor2, shadeColor2, ooxmlGradientAngleToCssDegrees, segmentByScript, resolveFontForScript, generateLogTicks, formatAxisValueWithUnits, getDisplayUnitLabel, hexToRgbChannels, chartPartToAttrs } from './chunk-34ZW32XK.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';
@@ -2136,10 +2136,17 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
2136
2136
  isLast: paraIndex === paragraphs.length - 1,
2137
2137
  spaceFirstLast
2138
2138
  });
2139
+ const strutFontSize = resolveParagraphStrutFontSize(
2140
+ paraSegments.map(({ segment }) => segment),
2141
+ bodyStyle?.fontSize
2142
+ );
2139
2143
  const hasParaSpacing = spacing.marginTop !== void 0 || spacing.marginBottom !== void 0 || spacing.lineHeight !== void 0;
2140
2144
  const paraStyle = {
2141
2145
  ...paraKinsokuStyle
2142
2146
  };
2147
+ if (strutFontSize !== void 0) {
2148
+ paraStyle.fontSize = strutFontSize;
2149
+ }
2143
2150
  if (spacing.marginTop !== void 0) {
2144
2151
  paraStyle.marginTop = spacing.marginTop;
2145
2152
  }
@@ -2165,7 +2172,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
2165
2172
  if (cssTextAlign !== void 0) {
2166
2173
  paraStyle.textAlign = cssTextAlign;
2167
2174
  }
2168
- const needsWrapper = paraMarginLeft !== void 0 || paraMarginRight !== void 0 || paraTextIndent !== void 0 || hasBullet || paraRtl !== void 0 || cssTextAlign !== void 0 || hasParaKinsoku || hasParaSpacing;
2175
+ const needsWrapper = paraMarginLeft !== void 0 || paraMarginRight !== void 0 || paraTextIndent !== void 0 || hasBullet || paraRtl !== void 0 || cssTextAlign !== void 0 || hasParaKinsoku || hasParaSpacing || strutFontSize !== void 0;
2169
2176
  const renderedSegments = paraSegments.filter(({ segment }) => {
2170
2177
  if (!hasBullet && segment.bulletInfo) {
2171
2178
  return false;
@@ -2537,7 +2544,15 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
2537
2544
  // is present, `ShapeEffectOverlay` paints a separate blended tint layer so
2538
2545
  // the colour is actually rendered (and text/children are not tinted).
2539
2546
  mixBlendMode: hasFillOverlayColor ? void 0 : mapDagBlendModeToCss(ss?.dagFillOverlayBlend),
2540
- borderWidth: strokeWidth > 0 ? getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : void 0,
2547
+ // An unstroked element must occupy EXACTLY its authored box. The
2548
+ // container class carries a 1px (transparent) border for the
2549
+ // selection/hover affordance and `box-sizing: border-box`, which
2550
+ // silently shrank every unstroked element's content by 2px and shifted
2551
+ // it 1px down-right. On a 40x40 icon that is a visible 5% shrink, and
2552
+ // two adjacent 40px buttons rendered with a 2px gap PowerPoint does not
2553
+ // draw. The affordance is an `outline` instead (see `ElementRenderer`),
2554
+ // which paints in the same place without taking part in layout.
2555
+ borderWidth: strokeWidth > 0 ? getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : 0,
2541
2556
  borderColor: strokeWidth > 0 ? resolvedStrokeColor : void 0,
2542
2557
  borderStyle: strokeWidth > 0 ? getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
2543
2558
  strokeLinejoin: lineJoinCss,
@@ -6257,7 +6272,7 @@ function FailedToLoad() {
6257
6272
  var LazySurfaceChart3DScene = React6.lazy(
6258
6273
  async () => {
6259
6274
  try {
6260
- return await import('./SurfaceChart3DScene-TL4ZIOI4.mjs');
6275
+ return await import('./SurfaceChart3DScene-64HI3U7Y.mjs');
6261
6276
  } catch {
6262
6277
  return { default: FailedToLoad };
6263
6278
  }
Binary file
Binary file