pptx-react-viewer 3.6.0 → 3.8.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 +32 -0
- package/dist/{AiChatPanel-WRQGJJVD.mjs → AiChatPanel-A5DCEHTO.mjs} +4 -4
- package/dist/AiChatPanel-A5DCEHTO.mjs.br +0 -0
- package/dist/AiChatPanel-A5DCEHTO.mjs.gz +0 -0
- package/dist/{AiChatPanel-LEOEDIW2.js → AiChatPanel-XLQM4BQJ.js} +25 -25
- package/dist/AiChatPanel-XLQM4BQJ.js.br +0 -0
- package/dist/AiChatPanel-XLQM4BQJ.js.gz +0 -0
- package/dist/{Area3DChartScene-SJC2ZB6R.mjs → Area3DChartScene-5CMEMIBI.mjs} +1 -1
- package/dist/Area3DChartScene-5CMEMIBI.mjs.br +0 -0
- package/dist/Area3DChartScene-5CMEMIBI.mjs.gz +0 -0
- package/dist/{Area3DChartScene-3TJ2GTGI.js → Area3DChartScene-RZ3V3WOR.js} +2 -2
- package/dist/Area3DChartScene-RZ3V3WOR.js.br +0 -0
- package/dist/Area3DChartScene-RZ3V3WOR.js.gz +0 -0
- package/dist/{Bar3DChartScene-SPER4LQA.mjs → Bar3DChartScene-H3MYUJKV.mjs} +1 -1
- package/dist/Bar3DChartScene-H3MYUJKV.mjs.br +0 -0
- package/dist/Bar3DChartScene-H3MYUJKV.mjs.gz +0 -0
- package/dist/{Bar3DChartScene-2ZGOMOZO.js → Bar3DChartScene-KHCQ6TEC.js} +2 -2
- package/dist/Bar3DChartScene-KHCQ6TEC.js.br +0 -0
- package/dist/Bar3DChartScene-KHCQ6TEC.js.gz +0 -0
- package/dist/{Line3DChartScene-42FYFGLU.js → Line3DChartScene-QEACF3U3.js} +2 -2
- package/dist/Line3DChartScene-QEACF3U3.js.br +0 -0
- package/dist/Line3DChartScene-QEACF3U3.js.gz +0 -0
- package/dist/{Line3DChartScene-FH3YHPXE.mjs → Line3DChartScene-YFRPJHDX.mjs} +1 -1
- package/dist/Line3DChartScene-YFRPJHDX.mjs.br +0 -0
- package/dist/Line3DChartScene-YFRPJHDX.mjs.gz +0 -0
- package/dist/{Model3DScene-2BCR2YYD.mjs → Model3DScene-O24KP723.mjs} +1 -1
- package/dist/Model3DScene-O24KP723.mjs.br +0 -0
- package/dist/Model3DScene-O24KP723.mjs.gz +0 -0
- package/dist/{Model3DScene-EIU2GVUZ.js → Model3DScene-QQWKGJ3T.js} +2 -2
- package/dist/Model3DScene-QQWKGJ3T.js.br +0 -0
- package/dist/Model3DScene-QQWKGJ3T.js.gz +0 -0
- package/dist/{PieChart3DScene-QFQUJFDP.mjs → PieChart3DScene-CI6CW22C.mjs} +1 -1
- package/dist/PieChart3DScene-CI6CW22C.mjs.br +0 -0
- package/dist/PieChart3DScene-CI6CW22C.mjs.gz +0 -0
- package/dist/{PieChart3DScene-VQOHZPHI.js → PieChart3DScene-L3MHKQHW.js} +2 -2
- package/dist/PieChart3DScene-L3MHKQHW.js.br +0 -0
- package/dist/PieChart3DScene-L3MHKQHW.js.gz +0 -0
- package/dist/PowerPointViewer-Cl6jBPNw.d.ts.map +1 -1
- package/dist/{SurfaceChart3DScene-FTVXZN6O.js → SurfaceChart3DScene-5IER6VFW.js} +2 -2
- package/dist/SurfaceChart3DScene-5IER6VFW.js.br +0 -0
- package/dist/SurfaceChart3DScene-5IER6VFW.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-CGXMRBCL.mjs → SurfaceChart3DScene-JUXRC3K2.mjs} +1 -1
- package/dist/SurfaceChart3DScene-JUXRC3K2.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-JUXRC3K2.mjs.gz +0 -0
- package/dist/{audience-content-store-bR7Gs_1S.d.ts → audience-content-store-CB2WVM1K.d.ts} +12 -3
- package/dist/{audience-content-store-bR7Gs_1S.d.ts.map → audience-content-store-CB2WVM1K.d.ts.map} +1 -1
- package/dist/{chunk-NFOOONND.js → chunk-4222CHFH.js} +1944 -1299
- package/dist/chunk-4222CHFH.js.br +0 -0
- package/dist/chunk-4222CHFH.js.gz +0 -0
- package/dist/{chunk-ZUSYUWOV.mjs → chunk-6IMB5DNJ.mjs} +8927 -4870
- package/dist/chunk-6IMB5DNJ.mjs.br +0 -0
- package/dist/chunk-6IMB5DNJ.mjs.gz +0 -0
- package/dist/{chunk-ZHSBMG37.js → chunk-DE3S3UHX.js} +557 -682
- package/dist/chunk-DE3S3UHX.js.br +0 -0
- package/dist/chunk-DE3S3UHX.js.gz +0 -0
- package/dist/{chunk-ZWPHUPL4.js → chunk-F5NPGNMA.js} +9 -5
- package/dist/chunk-F5NPGNMA.js.br +0 -0
- package/dist/chunk-F5NPGNMA.js.gz +0 -0
- package/dist/{chunk-TGCSZXOG.mjs → chunk-FRZIBZTE.mjs} +57 -27
- package/dist/chunk-FRZIBZTE.mjs.br +0 -0
- package/dist/chunk-FRZIBZTE.mjs.gz +0 -0
- package/dist/{chunk-MZI4DG3S.js → chunk-L3ZIBQEB.js} +57 -27
- package/dist/chunk-L3ZIBQEB.js.br +0 -0
- package/dist/chunk-L3ZIBQEB.js.gz +0 -0
- package/dist/{chunk-FG5VQFWP.mjs → chunk-PFPKBNNZ.mjs} +761 -116
- package/dist/chunk-PFPKBNNZ.mjs.br +0 -0
- package/dist/chunk-PFPKBNNZ.mjs.gz +0 -0
- package/dist/{chunk-7VPDHSWF.js → chunk-QWA5YEIZ.js} +234 -241
- package/dist/chunk-QWA5YEIZ.js.br +0 -0
- package/dist/chunk-QWA5YEIZ.js.gz +0 -0
- package/dist/{chunk-WX7AFFBZ.mjs → chunk-RHWQKZLB.mjs} +63 -69
- package/dist/chunk-RHWQKZLB.mjs.br +0 -0
- package/dist/chunk-RHWQKZLB.mjs.gz +0 -0
- package/dist/{chunk-T3V5FBXJ.mjs → chunk-RNP5HP4L.mjs} +5 -2
- package/dist/chunk-RNP5HP4L.mjs.br +0 -0
- package/dist/chunk-RNP5HP4L.mjs.gz +0 -0
- package/dist/{chunk-AL2KLPOJ.js → chunk-SN5EUDIT.js} +8959 -4873
- package/dist/chunk-SN5EUDIT.js.br +0 -0
- package/dist/chunk-SN5EUDIT.js.gz +0 -0
- package/dist/{chunk-VYNICQ4O.mjs → chunk-UPJW34YG.mjs} +133 -258
- package/dist/chunk-UPJW34YG.mjs.br +0 -0
- package/dist/chunk-UPJW34YG.mjs.gz +0 -0
- package/dist/i18n.js +4 -4
- package/dist/i18n.js.br +0 -0
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +595 -38
- package/dist/index.js +47 -47
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +768 -186
- package/dist/internals.d.ts.map +1 -1
- package/dist/internals.js +79 -79
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +4 -4
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/types-Bzdkiakq.d.ts.map +1 -1
- package/dist/viewer/index.d.ts +534 -38
- package/dist/viewer/index.js +27 -27
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +6 -6
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +2 -2
- package/dist/AiChatPanel-LEOEDIW2.js.br +0 -0
- package/dist/AiChatPanel-LEOEDIW2.js.gz +0 -0
- package/dist/AiChatPanel-WRQGJJVD.mjs.br +0 -0
- package/dist/AiChatPanel-WRQGJJVD.mjs.gz +0 -0
- package/dist/Area3DChartScene-3TJ2GTGI.js.br +0 -0
- package/dist/Area3DChartScene-3TJ2GTGI.js.gz +0 -0
- package/dist/Area3DChartScene-SJC2ZB6R.mjs.br +0 -2
- package/dist/Area3DChartScene-SJC2ZB6R.mjs.gz +0 -0
- package/dist/Bar3DChartScene-2ZGOMOZO.js.br +0 -0
- package/dist/Bar3DChartScene-2ZGOMOZO.js.gz +0 -0
- package/dist/Bar3DChartScene-SPER4LQA.mjs.br +0 -0
- package/dist/Bar3DChartScene-SPER4LQA.mjs.gz +0 -0
- package/dist/Line3DChartScene-42FYFGLU.js.br +0 -0
- package/dist/Line3DChartScene-42FYFGLU.js.gz +0 -0
- package/dist/Line3DChartScene-FH3YHPXE.mjs.br +0 -2
- package/dist/Line3DChartScene-FH3YHPXE.mjs.gz +0 -0
- package/dist/Model3DScene-2BCR2YYD.mjs.br +0 -0
- package/dist/Model3DScene-2BCR2YYD.mjs.gz +0 -0
- package/dist/Model3DScene-EIU2GVUZ.js.br +0 -0
- package/dist/Model3DScene-EIU2GVUZ.js.gz +0 -0
- package/dist/PieChart3DScene-QFQUJFDP.mjs.br +0 -0
- package/dist/PieChart3DScene-QFQUJFDP.mjs.gz +0 -0
- package/dist/PieChart3DScene-VQOHZPHI.js.br +0 -0
- package/dist/PieChart3DScene-VQOHZPHI.js.gz +0 -0
- package/dist/SurfaceChart3DScene-CGXMRBCL.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-CGXMRBCL.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-FTVXZN6O.js.br +0 -0
- package/dist/SurfaceChart3DScene-FTVXZN6O.js.gz +0 -0
- package/dist/chunk-7VPDHSWF.js.br +0 -0
- package/dist/chunk-7VPDHSWF.js.gz +0 -0
- package/dist/chunk-AL2KLPOJ.js.br +0 -0
- package/dist/chunk-AL2KLPOJ.js.gz +0 -0
- package/dist/chunk-FG5VQFWP.mjs.br +0 -0
- package/dist/chunk-FG5VQFWP.mjs.gz +0 -0
- package/dist/chunk-MZI4DG3S.js.br +0 -0
- package/dist/chunk-MZI4DG3S.js.gz +0 -0
- package/dist/chunk-NFOOONND.js.br +0 -0
- package/dist/chunk-NFOOONND.js.gz +0 -0
- package/dist/chunk-T3V5FBXJ.mjs.br +0 -0
- package/dist/chunk-T3V5FBXJ.mjs.gz +0 -0
- package/dist/chunk-TGCSZXOG.mjs.br +0 -0
- package/dist/chunk-TGCSZXOG.mjs.gz +0 -0
- package/dist/chunk-VYNICQ4O.mjs.br +0 -0
- package/dist/chunk-VYNICQ4O.mjs.gz +0 -0
- package/dist/chunk-WX7AFFBZ.mjs.br +0 -0
- package/dist/chunk-WX7AFFBZ.mjs.gz +0 -0
- package/dist/chunk-ZHSBMG37.js.br +0 -0
- package/dist/chunk-ZHSBMG37.js.gz +0 -0
- package/dist/chunk-ZUSYUWOV.mjs.br +0 -0
- package/dist/chunk-ZUSYUWOV.mjs.gz +0 -0
- package/dist/chunk-ZWPHUPL4.js.br +0 -0
- package/dist/chunk-ZWPHUPL4.js.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SHAPE_PRESET_DEFS, VIEWER_SHORTCUT_REFERENCE, STROKE_DASH_OPTIONS, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, getImageFitStyle, getComputedFillStyle, isImageLikeElement, getCropShapeClipPath, getImageTilingStyle, mediaPlaybackAttributes, buildTextBlockStyle, hasTextProperties, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, buildTextBodyLayoutStyle, buildTextBody3DSceneStyle, buildParagraphs, colorWithOpacity, normalizeHexColor, hexToRgbUnit, build3DExtrusionData, getComputedEffectStyle, getComputedStrokeStyle, getAnimationColorBaseStyle, isStrokeOnlyPresetElement, resolveShapeGeometry, normalizeStrokeDashType, getSvgStrokeDasharray, buildSvgGradientDef, buildStrokeOutline, getPresetShapeVectorGeometry, isWedgeCalloutPresetShape, svgGradientFillRef, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, canDrillDown, computeSelectionRect, DEFAULT_FONT_FAMILY, cellStyleToCss, rectToCells, isCellInRect, tableContainerCss, buildChartViewModel, resolveChartKind, chartPreserveAspectRatio, buildNotesPdfBytes, buildSlidesPdfBytes, buildPreviewAnimation, buildMotionPathPreview, mediaFallbackVisual, scheduleMediaTrimAndFade, registerCrossSlideAudio, resolveAutoFitFontScale, resolveFontKerning, getSubstituteFontFamily, parsePanoseString, resolveScriptFontSet, hasDistinctScriptFonts, nestedTextDecorationStyle, pieceLetterSpacing, resolveMetricTrackingPx, hollowTextFillStyle, stripUnderlineDecoration, buildTabContext, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, apply3dEffects, clampUnitInterval, customGeometryPathsToSvgSubpaths, buildSubpathPaints, computeColumnBoundaries, getTableCellBandStyle, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, cellRunStyle, getChartStylePalette, computeChartLegendLayout, mediaFallbackIcon, mediaFallbackLabelKey, MEDIA_CHROME_ATTRIBUTE, convertOmmlToMathMl, sanitizeMathMl, tableCellCss, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, ooxmlGradientAngleToCssDegrees, buildRectPathGradient, buildRunTabLines, chartPartToAttrs, splitWordsForUnderline, splitRunForMetrics, splitRunByScriptFont } from './chunk-
|
|
2
|
-
import { translationsEn } from './chunk-
|
|
1
|
+
import { SHAPE_PRESET_DEFS, VIEWER_SHORTCUT_REFERENCE, STROKE_DASH_OPTIONS, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, getImageFitStyle, getComputedFillStyle, isImageLikeElement, getCropShapeClipPath, getImageTilingStyle, mediaPlaybackAttributes, buildTextBlockStyle, hasTextProperties, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, buildTextBodyLayoutStyle, buildTextBody3DSceneStyle, buildParagraphs, colorWithOpacity, normalizeHexColor, hexToRgbUnit, build3DExtrusionData, getComputedEffectStyle, getComputedStrokeStyle, getAnimationColorBaseStyle, isStrokeOnlyPresetElement, resolveShapeGeometry, normalizeStrokeDashType, getSvgStrokeDasharray, buildSvgGradientDef, buildStrokeOutline, getPresetShapeVectorGeometry, isWedgeCalloutPresetShape, svgGradientFillRef, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, canDrillDown, computeSelectionRect, DEFAULT_FONT_FAMILY, cellStyleToCss, rectToCells, isCellInRect, tableContainerCss, buildChartViewModel, resolveChartKind, chartPreserveAspectRatio, buildNotesPdfBytes, buildSlidesPdfBytes, buildPreviewAnimation, buildMotionPathPreview, mediaFallbackVisual, scheduleMediaTrimAndFade, registerCrossSlideAudio, resolveAutoFitFontScale, resolveFontKerning, getSubstituteFontFamily, parsePanoseString, resolveScriptFontSet, hasDistinctScriptFonts, nestedTextDecorationStyle, pieceLetterSpacing, resolveMetricTrackingPx, hollowTextFillStyle, stripUnderlineDecoration, buildTabContext, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, apply3dEffects, clampUnitInterval, customGeometryPathsToSvgSubpaths, buildSubpathPaints, computeColumnBoundaries, getTableCellBandStyle, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, cellRunStyle, getChartStylePalette, computeChartLegendLayout, mediaFallbackIcon, mediaFallbackLabelKey, MEDIA_CHROME_ATTRIBUTE, convertOmmlToMathMl, sanitizeMathMl, tableCellCss, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, ooxmlGradientAngleToCssDegrees, buildRectPathGradient, buildRunTabLines, chartPartToAttrs, splitWordsForUnderline, splitRunForMetrics, splitRunByScriptFont } from './chunk-6IMB5DNJ.mjs';
|
|
2
|
+
import { translationsEn } from './chunk-FRZIBZTE.mjs';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
5
|
import React7, { useRef, useState, useEffect, useCallback, useMemo, useLayoutEffect } from 'react';
|
|
@@ -57,22 +57,6 @@ var TOOLBAR_SECTIONS = [
|
|
|
57
57
|
];
|
|
58
58
|
var SHORTCUT_REFERENCE_ITEMS = VIEWER_SHORTCUT_REFERENCE;
|
|
59
59
|
|
|
60
|
-
// src/viewer/constants/theme.ts
|
|
61
|
-
var THEME_COLOR_SWATCHES = [
|
|
62
|
-
"#000000",
|
|
63
|
-
"#FFFFFF",
|
|
64
|
-
"#1F497D",
|
|
65
|
-
"#EEECE1",
|
|
66
|
-
"#4472C4",
|
|
67
|
-
"#ED7D31",
|
|
68
|
-
"#A5A5A5",
|
|
69
|
-
"#FFC000",
|
|
70
|
-
"#5B9BD5",
|
|
71
|
-
"#70AD47",
|
|
72
|
-
"#0563C1",
|
|
73
|
-
"#954F72"
|
|
74
|
-
];
|
|
75
|
-
|
|
76
60
|
// src/viewer/constants/transitions-animations.ts
|
|
77
61
|
var ANIMATION_PRESET_OPTIONS = [
|
|
78
62
|
{ value: "fadeIn", label: "Fade In", i18nKey: "pptx.animation.preset.fadeIn" },
|
|
@@ -1095,13 +1079,19 @@ function makeSegmentPieceRenderer(needsScriptFonts, scriptFonts, baseFontFamily,
|
|
|
1095
1079
|
)
|
|
1096
1080
|
);
|
|
1097
1081
|
}
|
|
1098
|
-
function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle) {
|
|
1099
|
-
const [lineLayout] = buildRunTabLines(
|
|
1082
|
+
function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle, underlineWords = false) {
|
|
1083
|
+
const [lineLayout] = buildRunTabLines(
|
|
1084
|
+
line,
|
|
1085
|
+
ctx,
|
|
1086
|
+
nestedStyle,
|
|
1087
|
+
void 0,
|
|
1088
|
+
underlineWords
|
|
1089
|
+
);
|
|
1100
1090
|
return /* @__PURE__ */ jsx("span", { style: { display: "inline-block", whiteSpace: "nowrap" }, children: lineLayout.pieces.map((piece, i) => {
|
|
1101
1091
|
const key = `${keyPrefix}-tab-${i}`;
|
|
1102
1092
|
return /* @__PURE__ */ jsxs(React7.Fragment, { children: [
|
|
1103
1093
|
piece.leaderStyle ? /* @__PURE__ */ jsx("span", { "aria-hidden": "true", style: piece.leaderStyle, children: piece.leaderText }) : null,
|
|
1104
|
-
/* @__PURE__ */ jsx("span", { style: piece.style, children: renderPiece(piece.text, key) })
|
|
1094
|
+
piece.words ? piece.words.map((word, w) => /* @__PURE__ */ jsx("span", { style: word.style, children: renderPiece(word.text, `${key}-w${w}`) }, `${key}-w${w}`)) : /* @__PURE__ */ jsx("span", { style: piece.style, children: renderPiece(piece.text, key) })
|
|
1105
1095
|
] }, key);
|
|
1106
1096
|
}) });
|
|
1107
1097
|
}
|
|
@@ -1156,7 +1146,14 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1156
1146
|
return lines.map((line, lineIndex) => {
|
|
1157
1147
|
const lineKey = `${elementId}-seg-${segmentIndex}-line-${lineIndex}`;
|
|
1158
1148
|
return /* @__PURE__ */ jsxs(React7.Fragment, { children: [
|
|
1159
|
-
tabContext && line.includes(" ") ? renderTabbedLine(
|
|
1149
|
+
tabContext && line.includes(" ") ? renderTabbedLine(
|
|
1150
|
+
line,
|
|
1151
|
+
tabContext,
|
|
1152
|
+
lineKey,
|
|
1153
|
+
renderLeaf,
|
|
1154
|
+
metric?.nestedStyle,
|
|
1155
|
+
isUnderlineWords
|
|
1156
|
+
) : renderLeaf(line, lineKey),
|
|
1160
1157
|
lineIndex < lines.length - 1 ? /* @__PURE__ */ jsx("br", {}) : null
|
|
1161
1158
|
] }, lineKey);
|
|
1162
1159
|
});
|
|
@@ -1384,7 +1381,7 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1384
1381
|
spanStyle.unicodeBidi = runRtl !== ctx.paragraphRtl ? "bidi-override" : "embed";
|
|
1385
1382
|
}
|
|
1386
1383
|
const isUnderlineWords = Boolean(segmentStyle.underline) && segmentStyle.underlineStyle === "words";
|
|
1387
|
-
const wordDecoration = isUnderlineWords ? nestedStyle : void 0;
|
|
1384
|
+
const wordDecoration = isUnderlineWords ? nestedStyle ?? run.underlineWordPieces?.find((piece) => piece.style)?.style : void 0;
|
|
1388
1385
|
if (isUnderlineWords) {
|
|
1389
1386
|
const stripped = stripUnderlineDecoration(spanStyle);
|
|
1390
1387
|
spanStyle.textDecoration = stripped.textDecoration;
|
|
@@ -1906,6 +1903,34 @@ function renderConnectorMarker(markerId, arrowType, color, arrowWidth, arrowLeng
|
|
|
1906
1903
|
}
|
|
1907
1904
|
);
|
|
1908
1905
|
}
|
|
1906
|
+
function renderSvgGradientDefs(gradient) {
|
|
1907
|
+
if (!gradient) {
|
|
1908
|
+
return null;
|
|
1909
|
+
}
|
|
1910
|
+
if (gradient.kind === "rectPath") {
|
|
1911
|
+
return /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("pattern", { id: gradient.id, patternUnits: "objectBoundingBox", width: 1, height: 1, children: /* @__PURE__ */ jsx("image", { href: gradient.href, x: 0, y: 0, width: 1, height: 1, preserveAspectRatio: "none" }) }) });
|
|
1912
|
+
}
|
|
1913
|
+
const stops = gradient.stops.map((stop, index) => /* @__PURE__ */ jsx(
|
|
1914
|
+
"stop",
|
|
1915
|
+
{
|
|
1916
|
+
offset: stop.offset,
|
|
1917
|
+
stopColor: stop.color,
|
|
1918
|
+
stopOpacity: typeof stop.opacity === "number" ? stop.opacity : void 0
|
|
1919
|
+
},
|
|
1920
|
+
index
|
|
1921
|
+
));
|
|
1922
|
+
return /* @__PURE__ */ jsx("defs", { children: gradient.kind === "radial" ? /* @__PURE__ */ jsx("radialGradient", { id: gradient.id, cx: gradient.cx, cy: gradient.cy, r: gradient.r, children: stops }) : /* @__PURE__ */ jsx(
|
|
1923
|
+
"linearGradient",
|
|
1924
|
+
{
|
|
1925
|
+
id: gradient.id,
|
|
1926
|
+
x1: gradient.x1,
|
|
1927
|
+
y1: gradient.y1,
|
|
1928
|
+
x2: gradient.x2,
|
|
1929
|
+
y2: gradient.y2,
|
|
1930
|
+
children: stops
|
|
1931
|
+
}
|
|
1932
|
+
) });
|
|
1933
|
+
}
|
|
1909
1934
|
function joinStyle(shapeStyle) {
|
|
1910
1935
|
const lineJoin = shapeStyle?.lineJoin === "bevel" ? "bevel" : shapeStyle?.lineJoin === "miter" ? "miter" : "round";
|
|
1911
1936
|
const miterLimit = lineJoin === "miter" && typeof shapeStyle?.miterLimit === "number" ? Math.max(shapeStyle.miterLimit / 1e5, 1) : void 0;
|
|
@@ -1942,31 +1967,6 @@ function strokeStrands(d, keyBase, ctx) {
|
|
|
1942
1967
|
`${keyBase}-s${idx}`
|
|
1943
1968
|
));
|
|
1944
1969
|
}
|
|
1945
|
-
function gradientDefs(gradient) {
|
|
1946
|
-
if (!gradient) {
|
|
1947
|
-
return null;
|
|
1948
|
-
}
|
|
1949
|
-
const stops = gradient.stops.map((stop, idx) => /* @__PURE__ */ jsx(
|
|
1950
|
-
"stop",
|
|
1951
|
-
{
|
|
1952
|
-
offset: stop.offset,
|
|
1953
|
-
stopColor: stop.color,
|
|
1954
|
-
stopOpacity: typeof stop.opacity === "number" ? stop.opacity : void 0
|
|
1955
|
-
},
|
|
1956
|
-
idx
|
|
1957
|
-
));
|
|
1958
|
-
return /* @__PURE__ */ jsx("defs", { children: gradient.kind === "radial" ? /* @__PURE__ */ jsx("radialGradient", { id: gradient.id, cx: gradient.cx, cy: gradient.cy, r: gradient.r, children: stops }) : /* @__PURE__ */ jsx(
|
|
1959
|
-
"linearGradient",
|
|
1960
|
-
{
|
|
1961
|
-
id: gradient.id,
|
|
1962
|
-
x1: gradient.x1,
|
|
1963
|
-
y1: gradient.y1,
|
|
1964
|
-
x2: gradient.x2,
|
|
1965
|
-
y2: gradient.y2,
|
|
1966
|
-
children: stops
|
|
1967
|
-
}
|
|
1968
|
-
) });
|
|
1969
|
-
}
|
|
1970
1970
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
1971
1971
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
1972
1972
|
const subpaths = structuredPaths && structuredPaths.length > 0 ? customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
@@ -2022,29 +2022,12 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2022
2022
|
className: "w-full h-full pointer-events-none",
|
|
2023
2023
|
preserveAspectRatio: "none",
|
|
2024
2024
|
children: [
|
|
2025
|
-
animatesFill ? null :
|
|
2025
|
+
animatesFill ? null : renderSvgGradientDefs(gradient),
|
|
2026
2026
|
nodes
|
|
2027
2027
|
]
|
|
2028
2028
|
}
|
|
2029
2029
|
);
|
|
2030
2030
|
}
|
|
2031
|
-
function renderGradientDefs(gradient) {
|
|
2032
|
-
if (!gradient) {
|
|
2033
|
-
return null;
|
|
2034
|
-
}
|
|
2035
|
-
const stops = gradient.stops.map((stop, index) => /* @__PURE__ */ jsx("stop", { offset: stop.offset, stopColor: stop.color, stopOpacity: stop.opacity }, index));
|
|
2036
|
-
return /* @__PURE__ */ jsx("defs", { children: gradient.kind === "radial" ? /* @__PURE__ */ jsx("radialGradient", { id: gradient.id, cx: gradient.cx, cy: gradient.cy, r: gradient.r, children: stops }) : /* @__PURE__ */ jsx(
|
|
2037
|
-
"linearGradient",
|
|
2038
|
-
{
|
|
2039
|
-
id: gradient.id,
|
|
2040
|
-
x1: gradient.x1,
|
|
2041
|
-
y1: gradient.y1,
|
|
2042
|
-
x2: gradient.x2,
|
|
2043
|
-
y2: gradient.y2,
|
|
2044
|
-
children: stops
|
|
2045
|
-
}
|
|
2046
|
-
) });
|
|
2047
|
-
}
|
|
2048
2031
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2049
2032
|
if (!hasShapeProperties(element)) {
|
|
2050
2033
|
return null;
|
|
@@ -2195,7 +2178,7 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2195
2178
|
overflow: "visible"
|
|
2196
2179
|
},
|
|
2197
2180
|
children: [
|
|
2198
|
-
animatesFill ? null :
|
|
2181
|
+
animatesFill ? null : renderSvgGradientDefs(gradient),
|
|
2199
2182
|
/* @__PURE__ */ jsx(
|
|
2200
2183
|
"path",
|
|
2201
2184
|
{
|
|
@@ -3656,7 +3639,18 @@ function renderChartViewModel(elementId, vm, preserveAspectRatio = "none") {
|
|
|
3656
3639
|
fontFamily: vm.titleStyle?.fontFamily,
|
|
3657
3640
|
fill: vm.titleStyle?.fill ?? "#1e293b",
|
|
3658
3641
|
"data-chart-part": "title",
|
|
3659
|
-
children: vm.
|
|
3642
|
+
children: vm.titleRunSpans && vm.titleRunSpans.length > 0 ? vm.titleRunSpans.map((run, i) => /* @__PURE__ */ jsx(
|
|
3643
|
+
"tspan",
|
|
3644
|
+
{
|
|
3645
|
+
fontSize: run.fontSize,
|
|
3646
|
+
fontWeight: run.fontWeight,
|
|
3647
|
+
fontStyle: run.fontStyle,
|
|
3648
|
+
fontFamily: run.fontFamily,
|
|
3649
|
+
fill: run.fill,
|
|
3650
|
+
children: run.text
|
|
3651
|
+
},
|
|
3652
|
+
`${elementId}-title-run-${i}`
|
|
3653
|
+
)) : vm.title
|
|
3660
3654
|
}
|
|
3661
3655
|
),
|
|
3662
3656
|
vm.gridlines.map((gl, i) => /* @__PURE__ */ jsx(
|
|
@@ -3848,4 +3842,4 @@ function stopPreviewAnimation() {
|
|
|
3848
3842
|
activePreview = null;
|
|
3849
3843
|
}
|
|
3850
3844
|
|
|
3851
|
-
export { ANIMATION_PRESET_OPTIONS, ARROW_SIZE_OPTIONS, CONNECTOR_ARROW_OPTIONS, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY2 as DEFAULT_FONT_FAMILY, DEFAULT_SECTION_GROUP_ID, DEFAULT_STROKE_COLOR, DEFAULT_TABLE_COLUMNS, DEFAULT_TABLE_ROWS, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, GRID_SIZE, HYPERLINK_COLOR, MIN_ELEMENT_SIZE, SHAPE_PRESETS, SHORTCUT_REFERENCE_ITEMS, SLIDE_NAV_THUMBNAIL_WIDTH, STROKE_DASH_OPTIONS2 as STROKE_DASH_OPTIONS,
|
|
3845
|
+
export { ANIMATION_PRESET_OPTIONS, ARROW_SIZE_OPTIONS, CONNECTOR_ARROW_OPTIONS, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY2 as DEFAULT_FONT_FAMILY, DEFAULT_SECTION_GROUP_ID, DEFAULT_STROKE_COLOR, DEFAULT_TABLE_COLUMNS, DEFAULT_TABLE_ROWS, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, GRID_SIZE, HYPERLINK_COLOR, MIN_ELEMENT_SIZE, SHAPE_PRESETS, SHORTCUT_REFERENCE_ITEMS, SLIDE_NAV_THUMBNAIL_WIDTH, STROKE_DASH_OPTIONS2 as STROKE_DASH_OPTIONS, TOOLBAR_SECTIONS, UNGROUPED_SECTION_ID, ZOOM_TO_SELECTION_PADDING, build3DExtrusionData2 as build3DExtrusionData, buildLineGlowFilter, buildLineShadowCss, buildNotesPdf, buildPdfFromImageData, buildReactChartViewModel, buildTextBody3DSceneStyle2 as buildTextBody3DSceneStyle, cloneHistorySnapshot2 as cloneHistorySnapshot, cn, getAnimationInitialStyle2 as getAnimationInitialStyle, getConnectorPathGeometry, getCropShapeClipPath2 as getCropShapeClipPath, getDuotoneColors, getImageRenderStyle, getImageSurfaceMaskStyle, getImageSurfaceStyle, getImageTilingStyle2 as getImageTilingStyle, getShapeVisualStyle, getTextLayoutStyle, getTextStyleForElement, getTextWarpStyle, hasDagDuotoneEffect, isConnectorOrLineElement, renderChartElement, renderConnectorMarker, renderDagDuotoneSvgFilter, renderMediaElement, renderTableElement, renderTextSegments, renderVectorShape, shouldRenderFallbackLabel, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation };
|
|
Binary file
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ThemePresets, PptxMarkdownConverter, hasTextProperties, hasShapeProperties } from './chunk-
|
|
1
|
+
import { ThemePresets, PptxMarkdownConverter, hasTextProperties, hasShapeProperties } from './chunk-6IMB5DNJ.mjs';
|
|
2
2
|
import { __export } from './chunk-XGB3TDIC.mjs';
|
|
3
3
|
import * as mcp from 'pptx-viewer-mcp';
|
|
4
4
|
import * as mcpSchemas from 'pptx-viewer-mcp/schemas';
|
|
@@ -14763,6 +14763,9 @@ async function loadAiSdk() {
|
|
|
14763
14763
|
async function isAiAvailable() {
|
|
14764
14764
|
return await loadAiSdk() !== null;
|
|
14765
14765
|
}
|
|
14766
|
+
function deckDataFieldChanged(a, b) {
|
|
14767
|
+
return JSON.stringify(a) !== JSON.stringify(b);
|
|
14768
|
+
}
|
|
14766
14769
|
function resolveChatTransport(options) {
|
|
14767
14770
|
const { sdk, connection } = options;
|
|
14768
14771
|
switch (connection.kind) {
|
|
@@ -16970,4 +16973,4 @@ function toolCanvasTarget(toolName, input) {
|
|
|
16970
16973
|
return { slideIndex: slideIndex2, elementIds };
|
|
16971
16974
|
}
|
|
16972
16975
|
|
|
16973
|
-
export { aiChangeAnimationCss, applyElementUpdate, buildDeckContext, changeGhostStyle, collectStoredChats, computeFocusTargets, createAiChatSession, createChatHistoryStore, deckIdFromBridge, describeToolActivity, exportAiChatLogs, focusTargetChips, humanizeDiffLine, isAiAvailable, isTwoTableFocus, mergeTablesDirective, summarizeToolArgs, toolCanvasTarget, toolLabel };
|
|
16976
|
+
export { aiChangeAnimationCss, applyElementUpdate, buildDeckContext, changeGhostStyle, collectStoredChats, computeFocusTargets, createAiChatSession, createChatHistoryStore, deckDataFieldChanged, deckIdFromBridge, describeToolActivity, exportAiChatLogs, focusTargetChips, humanizeDiffLine, isAiAvailable, isTwoTableFocus, mergeTablesDirective, summarizeToolArgs, toolCanvasTarget, toolLabel };
|
|
Binary file
|
|
Binary file
|