pptx-react-viewer 2.6.0 → 2.6.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 (97) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/{AiChatPanel-53W2JG6G.js → AiChatPanel-LBK6YRKH.js} +22 -22
  3. package/dist/AiChatPanel-LBK6YRKH.js.br +0 -0
  4. package/dist/AiChatPanel-LBK6YRKH.js.gz +0 -0
  5. package/dist/{AiChatPanel-L5IOO72H.mjs → AiChatPanel-RVZOGGFK.mjs} +3 -3
  6. package/dist/AiChatPanel-RVZOGGFK.mjs.br +0 -0
  7. package/dist/AiChatPanel-RVZOGGFK.mjs.gz +0 -0
  8. package/dist/{Model3DScene-E7JGXNJN.js → Model3DScene-L46RNRU5.js} +2 -2
  9. package/dist/Model3DScene-L46RNRU5.js.br +0 -0
  10. package/dist/Model3DScene-L46RNRU5.js.gz +0 -0
  11. package/dist/{Model3DScene-EW7OWRJK.mjs → Model3DScene-WBUZ74G3.mjs} +1 -1
  12. package/dist/Model3DScene-WBUZ74G3.mjs.br +0 -0
  13. package/dist/Model3DScene-WBUZ74G3.mjs.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-64HI3U7Y.mjs → SurfaceChart3DScene-CB32AJS4.mjs} +1 -1
  15. package/dist/{SurfaceChart3DScene-64HI3U7Y.mjs.br → SurfaceChart3DScene-CB32AJS4.mjs.br} +0 -0
  16. package/dist/SurfaceChart3DScene-CB32AJS4.mjs.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-3QB6NVKD.js → SurfaceChart3DScene-RWMGMREC.js} +2 -2
  18. package/dist/SurfaceChart3DScene-RWMGMREC.js.br +0 -0
  19. package/dist/SurfaceChart3DScene-RWMGMREC.js.gz +0 -0
  20. package/dist/{chunk-EJ24IFPL.js → chunk-2VE3LVKZ.js} +315 -315
  21. package/dist/chunk-2VE3LVKZ.js.br +0 -0
  22. package/dist/chunk-2VE3LVKZ.js.gz +0 -0
  23. package/dist/{chunk-NXSAYLYI.js → chunk-4O7PPQ2V.js} +245 -240
  24. package/dist/chunk-4O7PPQ2V.js.br +0 -0
  25. package/dist/chunk-4O7PPQ2V.js.gz +0 -0
  26. package/dist/{chunk-WCO3NEH5.mjs → chunk-54FSVX3O.mjs} +2 -2
  27. package/dist/chunk-54FSVX3O.mjs.br +0 -0
  28. package/dist/chunk-54FSVX3O.mjs.gz +0 -0
  29. package/dist/{chunk-VBWWICDF.js → chunk-AX4Q5JWN.js} +3 -3
  30. package/dist/chunk-AX4Q5JWN.js.br +0 -0
  31. package/dist/chunk-AX4Q5JWN.js.gz +0 -0
  32. package/dist/{chunk-UO55N46T.mjs → chunk-BL3WW2BS.mjs} +11 -9
  33. package/dist/chunk-BL3WW2BS.mjs.br +0 -0
  34. package/dist/chunk-BL3WW2BS.mjs.gz +0 -0
  35. package/dist/{chunk-34ZW32XK.mjs → chunk-EI456HZK.mjs} +69 -19
  36. package/dist/chunk-EI456HZK.mjs.br +0 -0
  37. package/dist/{chunk-34ZW32XK.mjs.gz → chunk-EI456HZK.mjs.gz} +0 -0
  38. package/dist/{chunk-PENV7S7Z.mjs → chunk-GC6HQMVG.mjs} +1 -1
  39. package/dist/chunk-GC6HQMVG.mjs.br +0 -0
  40. package/dist/{chunk-PENV7S7Z.mjs.gz → chunk-GC6HQMVG.mjs.gz} +0 -0
  41. package/dist/{chunk-V5XVTKFS.js → chunk-IEFH47TF.js} +847 -845
  42. package/dist/chunk-IEFH47TF.js.br +0 -0
  43. package/dist/chunk-IEFH47TF.js.gz +0 -0
  44. package/dist/{chunk-UVA55CRK.js → chunk-T7AMP24E.js} +69 -19
  45. package/dist/chunk-T7AMP24E.js.br +0 -0
  46. package/dist/{chunk-UVA55CRK.js.gz → chunk-T7AMP24E.js.gz} +0 -0
  47. package/dist/{chunk-DWQJW3UM.mjs → chunk-ZUNDIOGD.mjs} +11 -6
  48. package/dist/chunk-ZUNDIOGD.mjs.br +0 -0
  49. package/dist/chunk-ZUNDIOGD.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-UO55N46T.mjs.br +0 -0
  90. package/dist/chunk-UO55N46T.mjs.gz +0 -0
  91. package/dist/chunk-UVA55CRK.js.br +0 -0
  92. package/dist/chunk-V5XVTKFS.js.br +0 -0
  93. package/dist/chunk-V5XVTKFS.js.gz +0 -0
  94. package/dist/chunk-VBWWICDF.js.br +0 -0
  95. package/dist/chunk-VBWWICDF.js.gz +0 -0
  96. package/dist/chunk-WCO3NEH5.mjs.br +0 -0
  97. package/dist/chunk-WCO3NEH5.mjs.gz +0 -0
Binary file
Binary file
@@ -64366,18 +64366,6 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
64366
64366
  if (hasShapeProperties(el) && el.shapeStyle?.strokeWidth) {
64367
64367
  el.shapeStyle.strokeWidth *= avgScale;
64368
64368
  }
64369
- if (hasTextProperties(el)) {
64370
- if (el.textStyle?.fontSize) {
64371
- el.textStyle.fontSize *= Math.abs(scaleY);
64372
- }
64373
- if (el.textSegments) {
64374
- el.textSegments.forEach((seg) => {
64375
- if (seg.style.fontSize) {
64376
- seg.style.fontSize *= Math.abs(scaleY);
64377
- }
64378
- });
64379
- }
64380
- }
64381
64369
  return el;
64382
64370
  };
64383
64371
  this.unwrapAlternateContent(group);
@@ -98374,14 +98362,14 @@ function matchMorphElementsFull(fromSlide, toSlide) {
98374
98362
  }
98375
98363
  }
98376
98364
  for (const fromEl of fromSlide.elements) {
98377
- if (usedFrom.has(fromEl.id)) {
98365
+ if (usedFrom.has(fromEl.id) || !fromEl.shapeId) {
98378
98366
  continue;
98379
98367
  }
98380
98368
  for (const toEl of toSlide.elements) {
98381
98369
  if (usedTo.has(toEl.id)) {
98382
98370
  continue;
98383
98371
  }
98384
- if (fromEl.id === toEl.id) {
98372
+ if (toEl.shapeId && fromEl.shapeId === toEl.shapeId && fromEl.type === toEl.type) {
98385
98373
  pairs2.push({ fromElement: fromEl, toElement: toEl });
98386
98374
  usedFrom.add(fromEl.id);
98387
98375
  usedTo.add(toEl.id);
@@ -98622,6 +98610,30 @@ function buildStrokeInterpolationProps(fromElement, toElement) {
98622
98610
  toWidth
98623
98611
  };
98624
98612
  }
98613
+ function appearanceSignature(element) {
98614
+ const parts = [element.type];
98615
+ if (hasShapeProperties(element)) {
98616
+ const style = element.shapeStyle;
98617
+ parts.push(
98618
+ element.shapeType ?? "",
98619
+ style?.fillMode ?? "",
98620
+ style?.fillColor ?? "",
98621
+ style?.fillGradient ?? "",
98622
+ String(style?.fillOpacity ?? ""),
98623
+ style?.strokeColor ?? "",
98624
+ String(style?.strokeWidth ?? "")
98625
+ );
98626
+ }
98627
+ const image = element;
98628
+ parts.push(image.imagePath ?? "", image.svgPath ?? "");
98629
+ if (hasTextProperties(element)) {
98630
+ parts.push(element.text ?? "", element.textStyle?.color ?? "");
98631
+ }
98632
+ return parts.join("");
98633
+ }
98634
+ function morphPairNeedsCrossfade(fromElement, toElement) {
98635
+ return appearanceSignature(fromElement) !== appearanceSignature(toElement);
98636
+ }
98625
98637
  function generateMorphAnimations(pairs2, durationMs, _mode = "object") {
98626
98638
  const animations = [];
98627
98639
  for (let index = 0; index < pairs2.length; index++) {
@@ -98634,9 +98646,10 @@ function generateMorphAnimations(pairs2, durationMs, _mode = "object") {
98634
98646
  const dr = (fromElement.rotation ?? 0) - (toElement.rotation ?? 0);
98635
98647
  const fromOpacity = fromElement.opacity ?? 1;
98636
98648
  const toOpacity = toElement.opacity ?? 1;
98649
+ const crossfades = morphPairNeedsCrossfade(fromElement, toElement);
98637
98650
  const fromProps = [
98638
98651
  ` transform: translate(${dx}px, ${dy}px) scale(${sx}, ${sy}) rotate(${dr}deg);`,
98639
- ` opacity: ${fromOpacity};`
98652
+ ` opacity: ${crossfades ? 0 : fromOpacity};`
98640
98653
  ];
98641
98654
  const toProps = [
98642
98655
  " transform: translate(0, 0) scale(1, 1) rotate(0deg);",
@@ -98669,6 +98682,40 @@ ${toProps.join("\n")}
98669
98682
  }
98670
98683
  return animations;
98671
98684
  }
98685
+ function generateMorphGhostAnimations(pairs2, durationMs, startIndex) {
98686
+ const animations = [];
98687
+ for (let index = 0; index < pairs2.length; index++) {
98688
+ const { fromElement, toElement } = pairs2[index];
98689
+ const fadesOut = morphPairNeedsCrossfade(fromElement, toElement);
98690
+ const safeName = `pptx-morph-ghost-${startIndex + index}-${fromElement.id.replace(/[^a-zA-Z0-9]/gu, "")}`;
98691
+ const dx = toElement.x - fromElement.x;
98692
+ const dy = toElement.y - fromElement.y;
98693
+ const sx = Math.max(toElement.width, 1) / Math.max(fromElement.width, 1);
98694
+ const sy = Math.max(toElement.height, 1) / Math.max(fromElement.height, 1);
98695
+ const dr = (toElement.rotation ?? 0) - (fromElement.rotation ?? 0);
98696
+ const originX = fromElement.x + fromElement.width / 2;
98697
+ const originY = fromElement.y + fromElement.height / 2;
98698
+ const keyframes = `
98699
+ @keyframes ${safeName} {
98700
+ from {
98701
+ transform-origin: ${originX}px ${originY}px;
98702
+ transform: translate(0, 0) scale(1, 1) rotate(0deg);
98703
+ opacity: ${fromElement.opacity ?? 1};
98704
+ }
98705
+ to {
98706
+ transform-origin: ${originX}px ${originY}px;
98707
+ transform: translate(${dx}px, ${dy}px) scale(${sx}, ${sy}) rotate(${dr}deg);
98708
+ opacity: ${fadesOut ? 0 : fromElement.opacity ?? 1};
98709
+ }
98710
+ }`;
98711
+ animations.push({
98712
+ elementId: fromElement.id,
98713
+ animation: `${safeName} ${durationMs}ms ${MORPH_EASING} forwards`,
98714
+ keyframes
98715
+ });
98716
+ }
98717
+ return animations;
98718
+ }
98672
98719
  function generateUnmatchedFadeOutAnimations(elements, durationMs, startIndex) {
98673
98720
  return elements.map((el, i) => {
98674
98721
  const safeName = `pptx-morph-fadeout-${startIndex + i}-${el.id.replace(/[^a-zA-Z0-9]/gu, "")}`;
@@ -98746,16 +98793,18 @@ function generateFullMorphTransition(fromSlide, toSlide, durationMs, mode = "obj
98746
98793
  }
98747
98794
  }
98748
98795
  }
98796
+ const ghosts = generateMorphGhostAnimations(matchResult.pairs, durationMs, pairAnims.length);
98797
+ allAnimations.push(...ghosts);
98749
98798
  const fadeOuts = generateUnmatchedFadeOutAnimations(
98750
98799
  matchResult.unmatchedFrom,
98751
98800
  durationMs,
98752
- pairAnims.length
98801
+ pairAnims.length + ghosts.length
98753
98802
  );
98754
98803
  allAnimations.push(...fadeOuts);
98755
98804
  const fadeIns = generateUnmatchedFadeInAnimations(
98756
98805
  matchResult.unmatchedTo,
98757
98806
  durationMs,
98758
- pairAnims.length + fadeOuts.length
98807
+ pairAnims.length + ghosts.length + fadeOuts.length
98759
98808
  );
98760
98809
  allAnimations.push(...fadeIns);
98761
98810
  return allAnimations;
@@ -98778,7 +98827,8 @@ function buildMorphTransitionPlan(fromSlide, toSlide, durationMs, mode = "object
98778
98827
  return void 0;
98779
98828
  }
98780
98829
  const animations = generateFullMorphTransition(fromSlide, toSlide, durationMs, mode);
98781
- const outgoingIds = new Set(match.unmatchedFrom.map((element) => element.id));
98830
+ const outgoingElements = [...fromSlide.elements];
98831
+ const outgoingIds = new Set(outgoingElements.map((element) => element.id));
98782
98832
  const incomingAnimations = /* @__PURE__ */ new Map();
98783
98833
  const outgoingAnimations = /* @__PURE__ */ new Map();
98784
98834
  const keyframes = [];
@@ -98794,7 +98844,7 @@ function buildMorphTransitionPlan(fromSlide, toSlide, durationMs, mode = "object
98794
98844
  keyframesCss: keyframes.join("\n"),
98795
98845
  incomingAnimations,
98796
98846
  outgoingAnimations,
98797
- outgoingElements: match.unmatchedFrom,
98847
+ outgoingElements,
98798
98848
  durationMs
98799
98849
  };
98800
98850
  }
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-EI456HZK.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-CB32AJS4.mjs');
6276
6281
  } catch {
6277
6282
  return { default: FailedToLoad };
6278
6283
  }
Binary file
Binary file
package/dist/index.js CHANGED
@@ -1,46 +1,46 @@
1
1
  'use strict';
2
2
 
3
- var chunkV5XVTKFS_js = require('./chunk-V5XVTKFS.js');
4
- require('./chunk-VBWWICDF.js');
5
- var chunkEJ24IFPL_js = require('./chunk-EJ24IFPL.js');
6
- var chunkNXSAYLYI_js = require('./chunk-NXSAYLYI.js');
3
+ var chunkIEFH47TF_js = require('./chunk-IEFH47TF.js');
4
+ require('./chunk-AX4Q5JWN.js');
5
+ var chunk2VE3LVKZ_js = require('./chunk-2VE3LVKZ.js');
6
+ var chunk4O7PPQ2V_js = require('./chunk-4O7PPQ2V.js');
7
7
  var chunk25VSL2BB_js = require('./chunk-25VSL2BB.js');
8
- var chunkUVA55CRK_js = require('./chunk-UVA55CRK.js');
8
+ var chunkT7AMP24E_js = require('./chunk-T7AMP24E.js');
9
9
  require('./chunk-4VNS5WPM.js');
10
10
 
11
11
 
12
12
 
13
13
  Object.defineProperty(exports, "PowerPointViewer", {
14
14
  enumerable: true,
15
- get: function () { return chunkV5XVTKFS_js.PowerPointViewer; }
15
+ get: function () { return chunkIEFH47TF_js.PowerPointViewer; }
16
16
  });
17
17
  Object.defineProperty(exports, "SlideCanvas", {
18
18
  enumerable: true,
19
- get: function () { return chunkV5XVTKFS_js.SlideCanvas; }
19
+ get: function () { return chunkIEFH47TF_js.SlideCanvas; }
20
20
  });
21
21
  Object.defineProperty(exports, "Toolbar", {
22
22
  enumerable: true,
23
- get: function () { return chunkV5XVTKFS_js.Toolbar; }
23
+ get: function () { return chunkIEFH47TF_js.Toolbar; }
24
24
  });
25
25
  Object.defineProperty(exports, "ViewerThemeProvider", {
26
26
  enumerable: true,
27
- get: function () { return chunkV5XVTKFS_js.ViewerThemeProvider; }
27
+ get: function () { return chunkIEFH47TF_js.ViewerThemeProvider; }
28
28
  });
29
29
  Object.defineProperty(exports, "useViewerTheme", {
30
30
  enumerable: true,
31
- get: function () { return chunkV5XVTKFS_js.useViewerTheme; }
31
+ get: function () { return chunkIEFH47TF_js.useViewerTheme; }
32
32
  });
33
33
  Object.defineProperty(exports, "renderToCanvas", {
34
34
  enumerable: true,
35
- get: function () { return chunkEJ24IFPL_js.renderToCanvas; }
35
+ get: function () { return chunk2VE3LVKZ_js.renderToCanvas; }
36
36
  });
37
37
  Object.defineProperty(exports, "useViewerBuildingBlocks", {
38
38
  enumerable: true,
39
- get: function () { return chunkEJ24IFPL_js.useViewerBuildingBlocks; }
39
+ get: function () { return chunk2VE3LVKZ_js.useViewerBuildingBlocks; }
40
40
  });
41
41
  Object.defineProperty(exports, "getAnimationInitialStyle", {
42
42
  enumerable: true,
43
- get: function () { return chunkNXSAYLYI_js.getAnimationInitialStyle; }
43
+ get: function () { return chunk4O7PPQ2V_js.getAnimationInitialStyle; }
44
44
  });
45
45
  Object.defineProperty(exports, "LOCALE_CATALOG", {
46
46
  enumerable: true,
@@ -48,85 +48,85 @@ Object.defineProperty(exports, "LOCALE_CATALOG", {
48
48
  });
49
49
  Object.defineProperty(exports, "AVATAR_COLOR_SWATCHES", {
50
50
  enumerable: true,
51
- get: function () { return chunkUVA55CRK_js.AVATAR_COLOR_SWATCHES; }
51
+ get: function () { return chunkT7AMP24E_js.AVATAR_COLOR_SWATCHES; }
52
52
  });
53
53
  Object.defineProperty(exports, "DEFAULT_VIEWER_PROFILE", {
54
54
  enumerable: true,
55
- get: function () { return chunkUVA55CRK_js.DEFAULT_VIEWER_PROFILE; }
55
+ get: function () { return chunkT7AMP24E_js.DEFAULT_VIEWER_PROFILE; }
56
56
  });
57
57
  Object.defineProperty(exports, "THEME_CATALOG", {
58
58
  enumerable: true,
59
- get: function () { return chunkUVA55CRK_js.THEME_CATALOG; }
59
+ get: function () { return chunkT7AMP24E_js.THEME_CATALOG; }
60
60
  });
61
61
  Object.defineProperty(exports, "VIEWER_PREFS_STORAGE_KEY", {
62
62
  enumerable: true,
63
- get: function () { return chunkUVA55CRK_js.VIEWER_PREFS_STORAGE_KEY; }
63
+ get: function () { return chunkT7AMP24E_js.VIEWER_PREFS_STORAGE_KEY; }
64
64
  });
65
65
  Object.defineProperty(exports, "clearAllLocalViewerData", {
66
66
  enumerable: true,
67
- get: function () { return chunkUVA55CRK_js.clearAllLocalViewerData; }
67
+ get: function () { return chunkT7AMP24E_js.clearAllLocalViewerData; }
68
68
  });
69
69
  Object.defineProperty(exports, "clearStoredViewerPrefs", {
70
70
  enumerable: true,
71
- get: function () { return chunkUVA55CRK_js.clearStoredViewerPrefs; }
71
+ get: function () { return chunkT7AMP24E_js.clearStoredViewerPrefs; }
72
72
  });
73
73
  Object.defineProperty(exports, "defaultCssVars", {
74
74
  enumerable: true,
75
- get: function () { return chunkUVA55CRK_js.defaultCssVars; }
75
+ get: function () { return chunkT7AMP24E_js.defaultCssVars; }
76
76
  });
77
77
  Object.defineProperty(exports, "defaultRadius", {
78
78
  enumerable: true,
79
- get: function () { return chunkUVA55CRK_js.defaultRadius; }
79
+ get: function () { return chunkT7AMP24E_js.defaultRadius; }
80
80
  });
81
81
  Object.defineProperty(exports, "defaultThemeColors", {
82
82
  enumerable: true,
83
- get: function () { return chunkUVA55CRK_js.defaultThemeColors; }
83
+ get: function () { return chunkT7AMP24E_js.defaultThemeColors; }
84
84
  });
85
85
  Object.defineProperty(exports, "getLocalStorageUsageSummary", {
86
86
  enumerable: true,
87
- get: function () { return chunkUVA55CRK_js.getLocalStorageUsageSummary; }
87
+ get: function () { return chunkT7AMP24E_js.getLocalStorageUsageSummary; }
88
88
  });
89
89
  Object.defineProperty(exports, "readStoredViewerPrefs", {
90
90
  enumerable: true,
91
- get: function () { return chunkUVA55CRK_js.readStoredViewerPrefs; }
91
+ get: function () { return chunkT7AMP24E_js.readStoredViewerPrefs; }
92
92
  });
93
93
  Object.defineProperty(exports, "resolveProfileInitial", {
94
94
  enumerable: true,
95
- get: function () { return chunkUVA55CRK_js.resolveProfileInitial; }
95
+ get: function () { return chunkT7AMP24E_js.resolveProfileInitial; }
96
96
  });
97
97
  Object.defineProperty(exports, "resolveThemeCatalogEntry", {
98
98
  enumerable: true,
99
- get: function () { return chunkUVA55CRK_js.resolveThemeCatalogEntry; }
99
+ get: function () { return chunkT7AMP24E_js.resolveThemeCatalogEntry; }
100
100
  });
101
101
  Object.defineProperty(exports, "saveViewerProfile", {
102
102
  enumerable: true,
103
- get: function () { return chunkUVA55CRK_js.saveViewerProfile; }
103
+ get: function () { return chunkT7AMP24E_js.saveViewerProfile; }
104
104
  });
105
105
  Object.defineProperty(exports, "themeToCssVars", {
106
106
  enumerable: true,
107
- get: function () { return chunkUVA55CRK_js.themeToCssVars; }
107
+ get: function () { return chunkT7AMP24E_js.themeToCssVars; }
108
108
  });
109
109
  Object.defineProperty(exports, "vermilionDarkColors", {
110
110
  enumerable: true,
111
- get: function () { return chunkUVA55CRK_js.vermilionDarkColors; }
111
+ get: function () { return chunkT7AMP24E_js.vermilionDarkColors; }
112
112
  });
113
113
  Object.defineProperty(exports, "vermilionDarkTheme", {
114
114
  enumerable: true,
115
- get: function () { return chunkUVA55CRK_js.vermilionDarkTheme; }
115
+ get: function () { return chunkT7AMP24E_js.vermilionDarkTheme; }
116
116
  });
117
117
  Object.defineProperty(exports, "vermilionLightColors", {
118
118
  enumerable: true,
119
- get: function () { return chunkUVA55CRK_js.vermilionLightColors; }
119
+ get: function () { return chunkT7AMP24E_js.vermilionLightColors; }
120
120
  });
121
121
  Object.defineProperty(exports, "vermilionLightTheme", {
122
122
  enumerable: true,
123
- get: function () { return chunkUVA55CRK_js.vermilionLightTheme; }
123
+ get: function () { return chunkT7AMP24E_js.vermilionLightTheme; }
124
124
  });
125
125
  Object.defineProperty(exports, "vermilionRadius", {
126
126
  enumerable: true,
127
- get: function () { return chunkUVA55CRK_js.vermilionRadius; }
127
+ get: function () { return chunkT7AMP24E_js.vermilionRadius; }
128
128
  });
129
129
  Object.defineProperty(exports, "writeStoredViewerPrefs", {
130
130
  enumerable: true,
131
- get: function () { return chunkUVA55CRK_js.writeStoredViewerPrefs; }
131
+ get: function () { return chunkT7AMP24E_js.writeStoredViewerPrefs; }
132
132
  });
package/dist/index.js.br CHANGED
Binary file
package/dist/index.js.gz CHANGED
Binary file
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
- export { PowerPointViewer, SlideCanvas, Toolbar, ViewerThemeProvider, useViewerTheme } from './chunk-UO55N46T.mjs';
2
- import './chunk-PENV7S7Z.mjs';
3
- export { renderToCanvas, useViewerBuildingBlocks } from './chunk-WCO3NEH5.mjs';
4
- export { getAnimationInitialStyle } from './chunk-DWQJW3UM.mjs';
1
+ export { PowerPointViewer, SlideCanvas, Toolbar, ViewerThemeProvider, useViewerTheme } from './chunk-BL3WW2BS.mjs';
2
+ import './chunk-GC6HQMVG.mjs';
3
+ export { renderToCanvas, useViewerBuildingBlocks } from './chunk-54FSVX3O.mjs';
4
+ export { getAnimationInitialStyle } from './chunk-ZUNDIOGD.mjs';
5
5
  export { LOCALE_CATALOG } from './chunk-Z6HIZWIQ.mjs';
6
- export { AVATAR_COLOR_SWATCHES, DEFAULT_VIEWER_PROFILE, THEME_CATALOG, VIEWER_PREFS_STORAGE_KEY, clearAllLocalViewerData, clearStoredViewerPrefs, defaultCssVars, defaultRadius, defaultThemeColors, getLocalStorageUsageSummary, readStoredViewerPrefs, resolveProfileInitial, resolveThemeCatalogEntry, saveViewerProfile, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, writeStoredViewerPrefs } from './chunk-34ZW32XK.mjs';
6
+ export { AVATAR_COLOR_SWATCHES, DEFAULT_VIEWER_PROFILE, THEME_CATALOG, VIEWER_PREFS_STORAGE_KEY, clearAllLocalViewerData, clearStoredViewerPrefs, defaultCssVars, defaultRadius, defaultThemeColors, getLocalStorageUsageSummary, readStoredViewerPrefs, resolveProfileInitial, resolveThemeCatalogEntry, saveViewerProfile, themeToCssVars, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, writeStoredViewerPrefs } from './chunk-EI456HZK.mjs';
7
7
  import './chunk-XGB3TDIC.mjs';
package/dist/index.mjs.br CHANGED
Binary file
package/dist/index.mjs.gz CHANGED
Binary file
@@ -8488,9 +8488,11 @@ interface MorphTransitionPlan {
8488
8488
  /** Outgoing-slide element id -> CSS `animation` shorthand. */
8489
8489
  outgoingAnimations: Map<string, string>;
8490
8490
  /**
8491
- * Outgoing-slide elements with no counterpart on the incoming slide. The
8492
- * binding must render these itself (they exist nowhere else) for the
8493
- * duration of the transition so they can fade out.
8491
+ * The outgoing slide's elements, in document order, for the binding to
8492
+ * render in its transition overlay for the duration of the morph. Each one
8493
+ * carries an entry in {@link MorphTransitionPlan.outgoingAnimations}: it
8494
+ * either fades out in place (no counterpart) or glides onto its counterpart,
8495
+ * dissolving into it when the appearance changed.
8494
8496
  */
8495
8497
  outgoingElements: PptxElement[];
8496
8498
  /** Animation duration in ms, echoed for convenience. */