pptx-react-viewer 4.53.2 → 4.55.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 (87) hide show
  1. package/CHANGELOG.md +86 -0
  2. package/dist/{AiChatPanel-7GJQ66GR.js → AiChatPanel-7DESUEAZ.js} +19 -19
  3. package/dist/AiChatPanel-7DESUEAZ.js.br +0 -0
  4. package/dist/AiChatPanel-7DESUEAZ.js.gz +0 -0
  5. package/dist/{AiChatPanel-AI75AT6C.mjs → AiChatPanel-GQ64SIYP.mjs} +1 -1
  6. package/dist/AiChatPanel-GQ64SIYP.mjs.br +0 -0
  7. package/dist/AiChatPanel-GQ64SIYP.mjs.gz +0 -0
  8. package/dist/{chunk-3TN5SUQR.js → chunk-5KFSMXI4.js} +6 -3
  9. package/dist/chunk-5KFSMXI4.js.br +0 -0
  10. package/dist/chunk-5KFSMXI4.js.gz +0 -0
  11. package/dist/{chunk-QCNVTNVV.mjs → chunk-64BFLDBT.mjs} +34 -14
  12. package/dist/chunk-64BFLDBT.mjs.br +0 -0
  13. package/dist/chunk-64BFLDBT.mjs.gz +0 -0
  14. package/dist/{chunk-MBVSEIPO.mjs → chunk-EXSGJHOH.mjs} +8 -6
  15. package/dist/chunk-EXSGJHOH.mjs.br +0 -0
  16. package/dist/chunk-EXSGJHOH.mjs.gz +0 -0
  17. package/dist/{chunk-ID37Y3HG.mjs → chunk-MR3ZSEHS.mjs} +7 -4
  18. package/dist/chunk-MR3ZSEHS.mjs.br +0 -0
  19. package/dist/chunk-MR3ZSEHS.mjs.gz +0 -0
  20. package/dist/{chunk-433LAU63.js → chunk-OIQAJR57.js} +233 -213
  21. package/dist/chunk-OIQAJR57.js.br +0 -0
  22. package/dist/chunk-OIQAJR57.js.gz +0 -0
  23. package/dist/{chunk-SAYHKMPT.js → chunk-V7JICDSL.js} +572 -570
  24. package/dist/chunk-V7JICDSL.js.br +0 -0
  25. package/dist/chunk-V7JICDSL.js.gz +0 -0
  26. package/dist/i18n/de.cjs +426 -1
  27. package/dist/i18n/de.cjs.br +0 -0
  28. package/dist/i18n/de.cjs.gz +0 -0
  29. package/dist/i18n/de.mjs +426 -1
  30. package/dist/i18n/de.mjs.br +0 -0
  31. package/dist/i18n/de.mjs.gz +0 -0
  32. package/dist/i18n/es.cjs +426 -1
  33. package/dist/i18n/es.cjs.br +0 -0
  34. package/dist/i18n/es.cjs.gz +0 -0
  35. package/dist/i18n/es.mjs +426 -1
  36. package/dist/i18n/es.mjs.br +0 -0
  37. package/dist/i18n/es.mjs.gz +0 -0
  38. package/dist/i18n/fr.cjs +426 -1
  39. package/dist/i18n/fr.cjs.br +0 -0
  40. package/dist/i18n/fr.cjs.gz +0 -0
  41. package/dist/i18n/fr.mjs +426 -1
  42. package/dist/i18n/fr.mjs.br +0 -0
  43. package/dist/i18n/fr.mjs.gz +0 -0
  44. package/dist/i18n/zh-CN.cjs +426 -1
  45. package/dist/i18n/zh-CN.cjs.br +0 -0
  46. package/dist/i18n/zh-CN.cjs.gz +0 -0
  47. package/dist/i18n/zh-CN.mjs +426 -1
  48. package/dist/i18n/zh-CN.mjs.br +0 -0
  49. package/dist/i18n/zh-CN.mjs.gz +0 -0
  50. package/dist/index.d.ts +16 -1
  51. package/dist/index.js +25 -25
  52. package/dist/index.js.br +0 -0
  53. package/dist/index.js.gz +0 -0
  54. package/dist/index.mjs +3 -3
  55. package/dist/index.mjs.br +0 -0
  56. package/dist/index.mjs.gz +0 -0
  57. package/dist/internals.d.ts +18 -2
  58. package/dist/internals.js +81 -81
  59. package/dist/internals.js.br +0 -0
  60. package/dist/internals.js.gz +0 -0
  61. package/dist/internals.mjs +2 -2
  62. package/dist/internals.mjs.br +0 -0
  63. package/dist/internals.mjs.gz +0 -0
  64. package/dist/viewer/index.d.ts +10 -1
  65. package/dist/viewer/index.js +20 -20
  66. package/dist/viewer/index.js.br +0 -0
  67. package/dist/viewer/index.js.gz +0 -0
  68. package/dist/viewer/index.mjs +3 -3
  69. package/dist/viewer/index.mjs.br +0 -0
  70. package/dist/viewer/index.mjs.gz +0 -0
  71. package/package.json +4 -4
  72. package/dist/AiChatPanel-7GJQ66GR.js.br +0 -0
  73. package/dist/AiChatPanel-7GJQ66GR.js.gz +0 -0
  74. package/dist/AiChatPanel-AI75AT6C.mjs.br +0 -0
  75. package/dist/AiChatPanel-AI75AT6C.mjs.gz +0 -0
  76. package/dist/chunk-3TN5SUQR.js.br +0 -0
  77. package/dist/chunk-3TN5SUQR.js.gz +0 -0
  78. package/dist/chunk-433LAU63.js.br +0 -0
  79. package/dist/chunk-433LAU63.js.gz +0 -0
  80. package/dist/chunk-ID37Y3HG.mjs.br +0 -0
  81. package/dist/chunk-ID37Y3HG.mjs.gz +0 -0
  82. package/dist/chunk-MBVSEIPO.mjs.br +0 -0
  83. package/dist/chunk-MBVSEIPO.mjs.gz +0 -0
  84. package/dist/chunk-QCNVTNVV.mjs.br +0 -0
  85. package/dist/chunk-QCNVTNVV.mjs.gz +0 -0
  86. package/dist/chunk-SAYHKMPT.js.br +0 -0
  87. package/dist/chunk-SAYHKMPT.js.gz +0 -0
@@ -1,7 +1,7 @@
1
1
  import { translationsEn, keyToLabel } from 'ooxml-ui/pptx/i18n';
2
2
  import React8, { createContext, useContext, useState, useMemo, useRef, useEffect, useCallback, useLayoutEffect } from 'react';
3
3
  import { useTranslation as useTranslation$1 } from 'react-i18next';
4
- import { VIEWER_SHORTCUT_REFERENCE, getAnimationInitialStyle as getAnimationInitialStyle$1, cloneHistorySnapshot as cloneHistorySnapshot$1, SHAPE_PRESET_DEFS, 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, applyTableCellFontWeight, 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';
4
+ import { VIEWER_SHORTCUT_REFERENCE, getAnimationInitialStyle as getAnimationInitialStyle$1, cloneHistorySnapshot as cloneHistorySnapshot$1, SHAPE_PRESET_DEFS, 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, applyTableCellFontWeight, rectToCells, isCellInRect, tableContainerCss, buildChartViewModel, resolveChartKind, chartPreserveAspectRatio, buildNotesPdfBytes, buildTiledSlidesPdfBytes, buildPreviewAnimation, measurePreviewGeometry, buildMotionPathPreview, mediaFallbackVisual, scheduleMediaTrimAndFade, registerCrossSlideAudio, shouldShowMediaFullscreenStopButton, withInlineListDecorationDefaults, segmentStyleToCss, resolveAutoFitFontScale, applyUnderlineVariant, nestedTextDecorationStyle, textRunColor, 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';
5
5
  export { ACTION_BUTTON_PRESETS, DEFAULT_COLOR_CHANGE_TOLERANCE, INK_REPLAY_KEYFRAMES, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, SLIDE_TRANSITION_OPTIONS, TABLE_STYLE_PRESETS, applyColorChange, applyFormatToElement, applyReroutedConnectors, buildCacheKey, buildContentPartStrokes, buildCssGradientFromShapeStyle, buildInkGroupStrokes, buildSaveSlides, canvasToJpegData, clampCropValue, cloneSlide, cloneTemplateElementsBySlideId, colorWithOpacity, comparePresentation, computeHandoutLayout, 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';
6
6
  import { clsx } from 'clsx';
7
7
  import { twMerge } from 'tailwind-merge';
@@ -1394,9 +1394,12 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
1394
1394
  const segmentStyle = segment?.style ?? {};
1395
1395
  const textValue = run.text;
1396
1396
  const lines = textValue.split("\n");
1397
- const resolvedSegmentColor = normalizeHexColor(
1398
- segmentStyle.color || element.textStyle?.color,
1399
- run.hyperlink ? HYPERLINK_COLOR : fallbackColor
1397
+ const resolvedSegmentColor = textRunColor(
1398
+ normalizeHexColor(
1399
+ segmentStyle.color || element.textStyle?.color,
1400
+ run.hyperlink ? HYPERLINK_COLOR : fallbackColor
1401
+ ),
1402
+ segmentStyle.color ? segmentStyle.colorRef?.alpha : element.textStyle?.colorRef?.alpha
1400
1403
  );
1401
1404
  const rawBaseline = typeof segmentStyle.baseline === "number" ? segmentStyle.baseline : 0;
1402
1405
  const baselineFraction = rawBaseline === 0 ? 0 : Math.abs(rawBaseline) >= 1e3 ? rawBaseline / 1e5 : rawBaseline / 100;
Binary file
Binary file