pptx-react-viewer 2.6.0 → 2.6.2

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 (97) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AiChatPanel-L5IOO72H.mjs → AiChatPanel-5IAXQYGH.mjs} +3 -3
  3. package/dist/AiChatPanel-5IAXQYGH.mjs.br +0 -0
  4. package/dist/AiChatPanel-5IAXQYGH.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-53W2JG6G.js → AiChatPanel-IC2Q3H3N.js} +22 -22
  6. package/dist/AiChatPanel-IC2Q3H3N.js.br +0 -0
  7. package/dist/AiChatPanel-IC2Q3H3N.js.gz +0 -0
  8. package/dist/{Model3DScene-E7JGXNJN.js → Model3DScene-GOFY2PQS.js} +2 -2
  9. package/dist/Model3DScene-GOFY2PQS.js.br +0 -0
  10. package/dist/Model3DScene-GOFY2PQS.js.gz +0 -0
  11. package/dist/{Model3DScene-EW7OWRJK.mjs → Model3DScene-UEU7L4QY.mjs} +1 -1
  12. package/dist/Model3DScene-UEU7L4QY.mjs.br +0 -0
  13. package/dist/Model3DScene-UEU7L4QY.mjs.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-3QB6NVKD.js → SurfaceChart3DScene-5TILKZMY.js} +2 -2
  15. package/dist/SurfaceChart3DScene-5TILKZMY.js.br +0 -0
  16. package/dist/SurfaceChart3DScene-5TILKZMY.js.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-64HI3U7Y.mjs → SurfaceChart3DScene-KCJUDJUK.mjs} +1 -1
  18. package/dist/{SurfaceChart3DScene-64HI3U7Y.mjs.br → SurfaceChart3DScene-KCJUDJUK.mjs.br} +0 -0
  19. package/dist/SurfaceChart3DScene-KCJUDJUK.mjs.gz +0 -0
  20. package/dist/{chunk-UVA55CRK.js → chunk-G7PJSVUS.js} +76 -19
  21. package/dist/chunk-G7PJSVUS.js.br +0 -0
  22. package/dist/{chunk-UVA55CRK.js.gz → chunk-G7PJSVUS.js.gz} +0 -0
  23. package/dist/{chunk-VBWWICDF.js → chunk-IGYK3NK5.js} +3 -3
  24. package/dist/chunk-IGYK3NK5.js.br +0 -0
  25. package/dist/chunk-IGYK3NK5.js.gz +0 -0
  26. package/dist/{chunk-UO55N46T.mjs → chunk-LJPRMPNA.mjs} +11 -9
  27. package/dist/chunk-LJPRMPNA.mjs.br +0 -0
  28. package/dist/chunk-LJPRMPNA.mjs.gz +0 -0
  29. package/dist/{chunk-WCO3NEH5.mjs → chunk-MQYNBEOY.mjs} +2 -2
  30. package/dist/chunk-MQYNBEOY.mjs.br +0 -0
  31. package/dist/{chunk-WCO3NEH5.mjs.gz → chunk-MQYNBEOY.mjs.gz} +0 -0
  32. package/dist/{chunk-V5XVTKFS.js → chunk-TMU7Z3CU.js} +847 -845
  33. package/dist/chunk-TMU7Z3CU.js.br +0 -0
  34. package/dist/chunk-TMU7Z3CU.js.gz +0 -0
  35. package/dist/{chunk-DWQJW3UM.mjs → chunk-UV5R7IQY.mjs} +11 -6
  36. package/dist/chunk-UV5R7IQY.mjs.br +0 -0
  37. package/dist/chunk-UV5R7IQY.mjs.gz +0 -0
  38. package/dist/{chunk-EJ24IFPL.js → chunk-W27U3GQS.js} +315 -315
  39. package/dist/chunk-W27U3GQS.js.br +0 -0
  40. package/dist/chunk-W27U3GQS.js.gz +0 -0
  41. package/dist/{chunk-NXSAYLYI.js → chunk-XROVGBFQ.js} +245 -240
  42. package/dist/chunk-XROVGBFQ.js.br +0 -0
  43. package/dist/chunk-XROVGBFQ.js.gz +0 -0
  44. package/dist/{chunk-PENV7S7Z.mjs → chunk-Y4TIW2MM.mjs} +1 -1
  45. package/dist/chunk-Y4TIW2MM.mjs.br +0 -0
  46. package/dist/chunk-Y4TIW2MM.mjs.gz +0 -0
  47. package/dist/{chunk-34ZW32XK.mjs → chunk-Y6H2RSLB.mjs} +76 -19
  48. package/dist/chunk-Y6H2RSLB.mjs.br +0 -0
  49. package/dist/{chunk-34ZW32XK.mjs.gz → chunk-Y6H2RSLB.mjs.gz} +0 -0
  50. package/dist/index.js +34 -34
  51. package/dist/index.js.br +0 -0
  52. package/dist/index.js.gz +0 -0
  53. package/dist/index.mjs +5 -5
  54. package/dist/index.mjs.br +0 -0
  55. package/dist/index.mjs.gz +0 -0
  56. package/dist/internals.d.ts +5 -3
  57. package/dist/internals.js +78 -78
  58. package/dist/internals.js.br +0 -0
  59. package/dist/internals.js.gz +0 -0
  60. package/dist/internals.mjs +3 -3
  61. package/dist/internals.mjs.br +0 -0
  62. package/dist/internals.mjs.gz +0 -0
  63. package/dist/viewer/index.js +21 -21
  64. package/dist/viewer/index.js.br +0 -0
  65. package/dist/viewer/index.js.gz +0 -0
  66. package/dist/viewer/index.mjs +5 -5
  67. package/dist/viewer/index.mjs.br +0 -0
  68. package/dist/viewer/index.mjs.gz +0 -0
  69. package/package.json +1 -1
  70. package/dist/AiChatPanel-53W2JG6G.js.br +0 -0
  71. package/dist/AiChatPanel-53W2JG6G.js.gz +0 -0
  72. package/dist/AiChatPanel-L5IOO72H.mjs.br +0 -0
  73. package/dist/AiChatPanel-L5IOO72H.mjs.gz +0 -0
  74. package/dist/Model3DScene-E7JGXNJN.js.br +0 -0
  75. package/dist/Model3DScene-E7JGXNJN.js.gz +0 -0
  76. package/dist/Model3DScene-EW7OWRJK.mjs.br +0 -0
  77. package/dist/Model3DScene-EW7OWRJK.mjs.gz +0 -0
  78. package/dist/SurfaceChart3DScene-3QB6NVKD.js.br +0 -0
  79. package/dist/SurfaceChart3DScene-3QB6NVKD.js.gz +0 -0
  80. package/dist/SurfaceChart3DScene-64HI3U7Y.mjs.gz +0 -0
  81. package/dist/chunk-34ZW32XK.mjs.br +0 -0
  82. package/dist/chunk-DWQJW3UM.mjs.br +0 -0
  83. package/dist/chunk-DWQJW3UM.mjs.gz +0 -0
  84. package/dist/chunk-EJ24IFPL.js.br +0 -0
  85. package/dist/chunk-EJ24IFPL.js.gz +0 -0
  86. package/dist/chunk-NXSAYLYI.js.br +0 -0
  87. package/dist/chunk-NXSAYLYI.js.gz +0 -0
  88. package/dist/chunk-PENV7S7Z.mjs.br +0 -0
  89. package/dist/chunk-PENV7S7Z.mjs.gz +0 -0
  90. package/dist/chunk-UO55N46T.mjs.br +0 -0
  91. package/dist/chunk-UO55N46T.mjs.gz +0 -0
  92. package/dist/chunk-UVA55CRK.js.br +0 -0
  93. package/dist/chunk-V5XVTKFS.js.br +0 -0
  94. package/dist/chunk-V5XVTKFS.js.gz +0 -0
  95. package/dist/chunk-VBWWICDF.js.br +0 -0
  96. package/dist/chunk-VBWWICDF.js.gz +0 -0
  97. package/dist/chunk-WCO3NEH5.mjs.br +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, 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';
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-Y6H2RSLB.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';
@@ -1184,6 +1184,10 @@ function getTextStyleForElement(element, fallbackColor) {
1184
1184
  const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
1185
1185
  const bodyLeft = element.textStyle?.bodyInsetLeft ?? DEFAULT_BODY_INSET_LR_PX;
1186
1186
  const bodyRight = element.textStyle?.bodyInsetRight ?? DEFAULT_BODY_INSET_LR_PX;
1187
+ const hasParagraphIndents = (element.paragraphIndents?.length ?? 0) > 0;
1188
+ const bodyIndent = hasParagraphIndents ? 0 : element.textStyle?.paragraphIndent || 0;
1189
+ const bodyMarginLeft = hasParagraphIndents ? 0 : element.textStyle?.paragraphMarginLeft || 0;
1190
+ const bodyMarginRight = hasParagraphIndents ? 0 : element.textStyle?.paragraphMarginRight || 0;
1187
1191
  const writingMode = toCssWritingMode(element.textStyle?.textDirection);
1188
1192
  const textOrientation = toCssTextOrientation(element.textStyle?.textDirection);
1189
1193
  const verticalDirection = toCssVerticalDirection(element.textStyle?.textDirection);
@@ -1211,9 +1215,9 @@ function getTextStyleForElement(element, fallbackColor) {
1211
1215
  lineHeight: resolveLineHeight(element.textStyle, hasItalicRuns),
1212
1216
  paddingTop: bodyTop + (hasItalicRuns ? 1 : 0),
1213
1217
  paddingBottom: bodyBottom + (hasItalicRuns ? 1 : 0),
1214
- paddingLeft: bodyLeft + (element.textStyle?.paragraphMarginLeft || 0),
1215
- paddingRight: bodyRight + (element.textStyle?.paragraphMarginRight || 0),
1216
- textIndent: element.textStyle?.paragraphIndent || 0,
1218
+ paddingLeft: bodyLeft + bodyMarginLeft,
1219
+ paddingRight: bodyRight + bodyMarginRight,
1220
+ textIndent: bodyIndent,
1217
1221
  overflow: "visible",
1218
1222
  writingMode,
1219
1223
  textOrientation,
@@ -2214,13 +2218,14 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
2214
2218
  requireCtrlClick
2215
2219
  )
2216
2220
  );
2221
+ const isBlankParagraph = renderedSegments.length === 0;
2217
2222
  if (!needsWrapper) {
2218
2223
  return /* @__PURE__ */ jsxs(React6.Fragment, { children: [
2219
2224
  wrappedContent,
2220
2225
  paraIndex < paragraphs.length - 1 ? /* @__PURE__ */ jsx("br", {}) : null
2221
2226
  ] }, `${element.id}-para-${paraIndex}`);
2222
2227
  }
2223
- return /* @__PURE__ */ jsx("div", { style: paraStyle, children: wrappedContent }, `${element.id}-para-${paraIndex}`);
2228
+ return /* @__PURE__ */ jsx("div", { style: paraStyle, children: isBlankParagraph ? /* @__PURE__ */ jsx("br", {}) : wrappedContent }, `${element.id}-para-${paraIndex}`);
2224
2229
  });
2225
2230
  }
2226
2231
  function hexToRgbUnit(hex) {
@@ -6272,7 +6277,7 @@ function FailedToLoad() {
6272
6277
  var LazySurfaceChart3DScene = React6.lazy(
6273
6278
  async () => {
6274
6279
  try {
6275
- return await import('./SurfaceChart3DScene-64HI3U7Y.mjs');
6280
+ return await import('./SurfaceChart3DScene-KCJUDJUK.mjs');
6276
6281
  } catch {
6277
6282
  return { default: FailedToLoad };
6278
6283
  }
Binary file
Binary file