pptx-react-viewer 2.4.0 → 2.5.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.
- package/CHANGELOG.md +15 -0
- package/dist/{AiChatPanel-SXYMXFYS.mjs → AiChatPanel-EMF3UYCE.mjs} +3 -3
- package/dist/AiChatPanel-EMF3UYCE.mjs.br +0 -0
- package/dist/AiChatPanel-EMF3UYCE.mjs.gz +0 -0
- package/dist/{AiChatPanel-HLLGXBZF.js → AiChatPanel-OHSLJNYG.js} +22 -22
- package/dist/AiChatPanel-OHSLJNYG.js.br +0 -0
- package/dist/AiChatPanel-OHSLJNYG.js.gz +0 -0
- package/dist/{Model3DScene-ZQBWLAMC.js → Model3DScene-ULHIJPMU.js} +2 -2
- package/dist/Model3DScene-ULHIJPMU.js.br +0 -0
- package/dist/Model3DScene-ULHIJPMU.js.gz +0 -0
- package/dist/{Model3DScene-IECT4RWT.mjs → Model3DScene-X6QJTWHV.mjs} +1 -1
- package/dist/{Model3DScene-IECT4RWT.mjs.br → Model3DScene-X6QJTWHV.mjs.br} +0 -0
- package/dist/Model3DScene-X6QJTWHV.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-4KRMRWW6.js → SurfaceChart3DScene-K7Q5NYZ4.js} +2 -2
- package/dist/SurfaceChart3DScene-K7Q5NYZ4.js.br +0 -0
- package/dist/SurfaceChart3DScene-K7Q5NYZ4.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-52C3IMPQ.mjs → SurfaceChart3DScene-PRCKQJQQ.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-52C3IMPQ.mjs.br → SurfaceChart3DScene-PRCKQJQQ.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-PRCKQJQQ.mjs.gz +0 -0
- package/dist/{chunk-VEZO33T2.js → chunk-7Q7AEPO7.js} +378 -324
- package/dist/chunk-7Q7AEPO7.js.br +0 -0
- package/dist/chunk-7Q7AEPO7.js.gz +0 -0
- package/dist/{chunk-XSBFV6TL.js → chunk-I4AFCPUC.js} +843 -844
- package/dist/chunk-I4AFCPUC.js.br +0 -0
- package/dist/chunk-I4AFCPUC.js.gz +0 -0
- package/dist/{chunk-KK7FWBGO.mjs → chunk-JSFUU2BB.mjs} +7 -8
- package/dist/chunk-JSFUU2BB.mjs.br +0 -0
- package/dist/chunk-JSFUU2BB.mjs.gz +0 -0
- package/dist/{chunk-LRIXPSVT.mjs → chunk-LIQGO45T.mjs} +72 -18
- package/dist/chunk-LIQGO45T.mjs.br +0 -0
- package/dist/chunk-LIQGO45T.mjs.gz +0 -0
- package/dist/{chunk-WK56SFN7.js → chunk-LTEDT475.js} +392 -68
- package/dist/chunk-LTEDT475.js.br +0 -0
- package/dist/chunk-LTEDT475.js.gz +0 -0
- package/dist/{chunk-5GHLRHBR.js → chunk-MJAEB43A.js} +3 -3
- package/dist/chunk-MJAEB43A.js.br +0 -0
- package/dist/chunk-MJAEB43A.js.gz +0 -0
- package/dist/{chunk-5TPQJWEO.js → chunk-NVH3RIN7.js} +271 -279
- package/dist/chunk-NVH3RIN7.js.br +0 -0
- package/dist/chunk-NVH3RIN7.js.gz +0 -0
- package/dist/{chunk-G6Q3NXRV.mjs → chunk-TGVID6BB.mjs} +40 -48
- package/dist/chunk-TGVID6BB.mjs.br +0 -0
- package/dist/chunk-TGVID6BB.mjs.gz +0 -0
- package/dist/{chunk-QBZA2GMB.mjs → chunk-VOV2N3NY.mjs} +388 -69
- package/dist/chunk-VOV2N3NY.mjs.br +0 -0
- package/dist/chunk-VOV2N3NY.mjs.gz +0 -0
- package/dist/{chunk-Q6FC2552.mjs → chunk-WJKMTDXS.mjs} +1 -1
- package/dist/chunk-WJKMTDXS.mjs.br +0 -0
- package/dist/chunk-WJKMTDXS.mjs.gz +0 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +34 -34
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +58 -1
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +78 -78
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.d.ts +33 -0
- package/dist/viewer/index.js +21 -21
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-HLLGXBZF.js.br +0 -0
- package/dist/AiChatPanel-HLLGXBZF.js.gz +0 -0
- package/dist/AiChatPanel-SXYMXFYS.mjs.br +0 -0
- package/dist/AiChatPanel-SXYMXFYS.mjs.gz +0 -0
- package/dist/Model3DScene-IECT4RWT.mjs.gz +0 -0
- package/dist/Model3DScene-ZQBWLAMC.js.br +0 -0
- package/dist/Model3DScene-ZQBWLAMC.js.gz +0 -0
- package/dist/SurfaceChart3DScene-4KRMRWW6.js.br +0 -0
- package/dist/SurfaceChart3DScene-4KRMRWW6.js.gz +0 -0
- package/dist/SurfaceChart3DScene-52C3IMPQ.mjs.gz +0 -0
- package/dist/chunk-5GHLRHBR.js.br +0 -0
- package/dist/chunk-5GHLRHBR.js.gz +0 -0
- package/dist/chunk-5TPQJWEO.js.br +0 -0
- package/dist/chunk-5TPQJWEO.js.gz +0 -0
- package/dist/chunk-G6Q3NXRV.mjs.br +0 -0
- package/dist/chunk-G6Q3NXRV.mjs.gz +0 -0
- package/dist/chunk-KK7FWBGO.mjs.br +0 -0
- package/dist/chunk-KK7FWBGO.mjs.gz +0 -0
- package/dist/chunk-LRIXPSVT.mjs.br +0 -0
- package/dist/chunk-LRIXPSVT.mjs.gz +0 -0
- package/dist/chunk-Q6FC2552.mjs.br +0 -0
- package/dist/chunk-Q6FC2552.mjs.gz +0 -0
- package/dist/chunk-QBZA2GMB.mjs.br +0 -0
- package/dist/chunk-QBZA2GMB.mjs.gz +0 -0
- package/dist/chunk-VEZO33T2.js.br +0 -0
- package/dist/chunk-VEZO33T2.js.gz +0 -0
- package/dist/chunk-WK56SFN7.js.br +0 -0
- package/dist/chunk-WK56SFN7.js.gz +0 -0
- package/dist/chunk-XSBFV6TL.js.br +0 -0
- package/dist/chunk-XSBFV6TL.js.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, 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-
|
|
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-VOV2N3NY.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';
|
|
@@ -1509,7 +1509,7 @@ function buildAnimStyle(state) {
|
|
|
1509
1509
|
}
|
|
1510
1510
|
return Object.keys(style).length > 0 ? style : void 0;
|
|
1511
1511
|
}
|
|
1512
|
-
function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, paraSegments, subElementAnimStates) {
|
|
1512
|
+
function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, paraSegments, subElementAnimStates, renderPiece) {
|
|
1513
1513
|
if (!subElementAnimStates || subElementAnimStates.size === 0) {
|
|
1514
1514
|
return renderedSegments;
|
|
1515
1515
|
}
|
|
@@ -1519,53 +1519,30 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1519
1519
|
const style = buildAnimStyle(paraState);
|
|
1520
1520
|
return /* @__PURE__ */ jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
|
|
1521
1521
|
}
|
|
1522
|
-
const
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1522
|
+
const spec = buildTextBuildSpec(
|
|
1523
|
+
elementId,
|
|
1524
|
+
paraIndex,
|
|
1525
|
+
paraSegments.map((entry) => ({ text: entry.segment.text, style: entry })),
|
|
1526
|
+
subElementAnimStates
|
|
1527
|
+
);
|
|
1528
|
+
if (!spec?.spans) {
|
|
1529
|
+
return renderedSegments;
|
|
1529
1530
|
}
|
|
1530
|
-
return
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
const words = fullText.split(/(\s+)/);
|
|
1535
|
-
let wordIdx = 0;
|
|
1536
|
-
const nodes = [];
|
|
1537
|
-
for (let i = 0; i < words.length; i++) {
|
|
1538
|
-
const w = words[i];
|
|
1539
|
-
if (!w) {
|
|
1540
|
-
continue;
|
|
1541
|
-
}
|
|
1542
|
-
const isWhitespace = /^\s+$/.test(w);
|
|
1543
|
-
if (isWhitespace) {
|
|
1544
|
-
nodes.push(/* @__PURE__ */ jsx(React6.Fragment, { children: w }, `ws-${i}`));
|
|
1545
|
-
continue;
|
|
1531
|
+
return spec.spans.map((span, index) => {
|
|
1532
|
+
const content = span.style && renderPiece ? renderPiece(span.style, span.text) : span.text;
|
|
1533
|
+
if (!span.animId) {
|
|
1534
|
+
return /* @__PURE__ */ jsx(React6.Fragment, { children: content }, `ws-${index}`);
|
|
1546
1535
|
}
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
return nodes;
|
|
1556
|
-
}
|
|
1557
|
-
function wrapByChar(elementId, paraIndex, paraSegments, states) {
|
|
1558
|
-
const fullText = paraSegments.map((e) => e.segment.text).join("");
|
|
1559
|
-
const nodes = [];
|
|
1560
|
-
for (let i = 0; i < fullText.length; i++) {
|
|
1561
|
-
const key = `${elementId}${TEXT_BUILD_ID_SEP}c${paraIndex}-${i}`;
|
|
1562
|
-
const state = states.get(key);
|
|
1563
|
-
const style = buildAnimStyle(state);
|
|
1564
|
-
nodes.push(
|
|
1565
|
-
/* @__PURE__ */ jsx("span", { "data-anim-id": key, style: { display: "inline", ...style }, children: fullText[i] }, key)
|
|
1536
|
+
return /* @__PURE__ */ jsx(
|
|
1537
|
+
"span",
|
|
1538
|
+
{
|
|
1539
|
+
"data-anim-id": span.animId,
|
|
1540
|
+
style: textBuildSpanStyle(span),
|
|
1541
|
+
children: content
|
|
1542
|
+
},
|
|
1543
|
+
span.animId
|
|
1566
1544
|
);
|
|
1567
|
-
}
|
|
1568
|
-
return nodes;
|
|
1545
|
+
});
|
|
1569
1546
|
}
|
|
1570
1547
|
var EPS = 0.01;
|
|
1571
1548
|
var FALLBACK_STEP_PX = 48;
|
|
@@ -2213,7 +2190,22 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
2213
2190
|
paraIndex,
|
|
2214
2191
|
renderedSegments,
|
|
2215
2192
|
paraSegments,
|
|
2216
|
-
subElementAnimStates
|
|
2193
|
+
subElementAnimStates,
|
|
2194
|
+
// A staged build splits the paragraph but must not flatten it: each
|
|
2195
|
+
// piece is re-rendered through the SAME segment renderer, so it keeps
|
|
2196
|
+
// its run's font, size, colour and decoration while it animates.
|
|
2197
|
+
({ segment, globalIndex }, text) => renderSingleSegment(
|
|
2198
|
+
element,
|
|
2199
|
+
{ ...segment, text },
|
|
2200
|
+
globalIndex,
|
|
2201
|
+
fallbackColor,
|
|
2202
|
+
findHighlights,
|
|
2203
|
+
void 0,
|
|
2204
|
+
onHyperlinkClick,
|
|
2205
|
+
fieldContext,
|
|
2206
|
+
paraRtl,
|
|
2207
|
+
requireCtrlClick
|
|
2208
|
+
)
|
|
2217
2209
|
);
|
|
2218
2210
|
if (!needsWrapper) {
|
|
2219
2211
|
return /* @__PURE__ */ jsxs(React6.Fragment, { children: [
|
|
@@ -6265,7 +6257,7 @@ function FailedToLoad() {
|
|
|
6265
6257
|
var LazySurfaceChart3DScene = React6.lazy(
|
|
6266
6258
|
async () => {
|
|
6267
6259
|
try {
|
|
6268
|
-
return await import('./SurfaceChart3DScene-
|
|
6260
|
+
return await import('./SurfaceChart3DScene-PRCKQJQQ.mjs');
|
|
6269
6261
|
} catch {
|
|
6270
6262
|
return { default: FailedToLoad };
|
|
6271
6263
|
}
|
|
Binary file
|
|
Binary file
|