pptx-react-viewer 4.8.0 → 4.9.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 +78 -0
- package/dist/{AiChatPanel-4LMJIJUU.js → AiChatPanel-WJ64Q6KO.js} +28 -28
- package/dist/AiChatPanel-WJ64Q6KO.js.br +0 -0
- package/dist/AiChatPanel-WJ64Q6KO.js.gz +0 -0
- package/dist/{AiChatPanel-XWYLYN26.mjs → AiChatPanel-YRWC7C3B.mjs} +4 -4
- package/dist/AiChatPanel-YRWC7C3B.mjs.br +0 -0
- package/dist/AiChatPanel-YRWC7C3B.mjs.gz +0 -0
- package/dist/{Model3DScene-N6IZ7Q57.mjs → Model3DScene-DS6AQWFV.mjs} +1 -1
- package/dist/{Model3DScene-N6IZ7Q57.mjs.br → Model3DScene-DS6AQWFV.mjs.br} +0 -0
- package/dist/Model3DScene-DS6AQWFV.mjs.gz +0 -0
- package/dist/{Model3DScene-YAPQ5BCI.js → Model3DScene-VHDYCHO5.js} +2 -2
- package/dist/{Model3DScene-YAPQ5BCI.js.br → Model3DScene-VHDYCHO5.js.br} +0 -0
- package/dist/Model3DScene-VHDYCHO5.js.gz +0 -0
- package/dist/{chunk-SAYZSUNQ.js → chunk-7NTNFOPT.js} +221 -203
- package/dist/chunk-7NTNFOPT.js.br +0 -0
- package/dist/chunk-7NTNFOPT.js.gz +0 -0
- package/dist/{chunk-YPDPSXPK.mjs → chunk-HDH4KFDK.mjs} +259 -0
- package/dist/chunk-HDH4KFDK.mjs.br +0 -0
- package/dist/chunk-HDH4KFDK.mjs.gz +0 -0
- package/dist/{chunk-KHEJXP4I.mjs → chunk-K5HZD63F.mjs} +2547 -1856
- package/dist/chunk-K5HZD63F.mjs.br +0 -0
- package/dist/chunk-K5HZD63F.mjs.gz +0 -0
- package/dist/{chunk-LTBTG2QB.js → chunk-KPKO2ELT.js} +259 -0
- package/dist/chunk-KPKO2ELT.js.br +0 -0
- package/dist/chunk-KPKO2ELT.js.gz +0 -0
- package/dist/{chunk-SOMUGI3Y.mjs → chunk-M6KW27TZ.mjs} +4 -4
- package/dist/chunk-M6KW27TZ.mjs.br +0 -0
- package/dist/chunk-M6KW27TZ.mjs.gz +0 -0
- package/dist/{chunk-NV2H57Q4.js → chunk-NMXIX7E4.js} +4565 -3874
- package/dist/chunk-NMXIX7E4.js.br +0 -0
- package/dist/chunk-NMXIX7E4.js.gz +0 -0
- package/dist/{chunk-NPZOVIHG.mjs → chunk-PJT2DTOS.mjs} +11183 -3957
- package/dist/chunk-PJT2DTOS.mjs.br +0 -0
- package/dist/chunk-PJT2DTOS.mjs.gz +0 -0
- package/dist/{chunk-UTP22QYH.js → chunk-PSJTZIIK.js} +5 -5
- package/dist/chunk-PSJTZIIK.js.br +0 -0
- package/dist/chunk-PSJTZIIK.js.gz +0 -0
- package/dist/{chunk-SSXGPYBF.mjs → chunk-Y7RTQOD6.mjs} +34 -16
- package/dist/chunk-Y7RTQOD6.mjs.br +0 -0
- package/dist/chunk-Y7RTQOD6.mjs.gz +0 -0
- package/dist/{chunk-YF2BQIW3.js → chunk-YWAFJZ23.js} +11204 -3957
- package/dist/chunk-YWAFJZ23.js.br +0 -0
- package/dist/chunk-YWAFJZ23.js.gz +0 -0
- package/dist/{chunk-Q7NWWIPQ.js → chunk-ZZ6IPWOP.js} +816 -816
- package/dist/chunk-ZZ6IPWOP.js.br +0 -0
- package/dist/chunk-ZZ6IPWOP.js.gz +0 -0
- package/dist/{chunk-Q4XJSJYI.mjs → chunk-ZZY24BB7.mjs} +1 -1
- package/dist/chunk-ZZY24BB7.mjs.br +0 -0
- package/dist/{chunk-Q4XJSJYI.mjs.gz → chunk-ZZY24BB7.mjs.gz} +0 -0
- package/dist/i18n/de.cjs +276 -9
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +276 -9
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +276 -9
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +276 -9
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +276 -9
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +276 -9
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +279 -12
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +279 -12
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.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 +663 -19
- package/dist/index.js +63 -63
- 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 +655 -8
- package/dist/internals.js +105 -105
- 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/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.d.ts +657 -19
- 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 +3 -2
- package/dist/AiChatPanel-4LMJIJUU.js.br +0 -0
- package/dist/AiChatPanel-4LMJIJUU.js.gz +0 -0
- package/dist/AiChatPanel-XWYLYN26.mjs.br +0 -0
- package/dist/AiChatPanel-XWYLYN26.mjs.gz +0 -0
- package/dist/Model3DScene-N6IZ7Q57.mjs.gz +0 -0
- package/dist/Model3DScene-YAPQ5BCI.js.gz +0 -0
- package/dist/chunk-KHEJXP4I.mjs.br +0 -0
- package/dist/chunk-KHEJXP4I.mjs.gz +0 -0
- package/dist/chunk-LTBTG2QB.js.br +0 -0
- package/dist/chunk-LTBTG2QB.js.gz +0 -0
- package/dist/chunk-NPZOVIHG.mjs.br +0 -0
- package/dist/chunk-NPZOVIHG.mjs.gz +0 -0
- package/dist/chunk-NV2H57Q4.js.br +0 -0
- package/dist/chunk-NV2H57Q4.js.gz +0 -0
- package/dist/chunk-Q4XJSJYI.mjs.br +0 -0
- package/dist/chunk-Q7NWWIPQ.js.br +0 -0
- package/dist/chunk-Q7NWWIPQ.js.gz +0 -0
- package/dist/chunk-SAYZSUNQ.js.br +0 -0
- package/dist/chunk-SAYZSUNQ.js.gz +0 -0
- package/dist/chunk-SOMUGI3Y.mjs.br +0 -0
- package/dist/chunk-SOMUGI3Y.mjs.gz +0 -0
- package/dist/chunk-SSXGPYBF.mjs.br +0 -0
- package/dist/chunk-SSXGPYBF.mjs.gz +0 -0
- package/dist/chunk-UTP22QYH.js.br +0 -0
- package/dist/chunk-UTP22QYH.js.gz +0 -0
- package/dist/chunk-YF2BQIW3.js.br +0 -0
- package/dist/chunk-YF2BQIW3.js.gz +0 -0
- package/dist/chunk-YPDPSXPK.mjs.br +0 -0
- package/dist/chunk-YPDPSXPK.mjs.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkYWAFJZ23_js = require('./chunk-YWAFJZ23.js');
|
|
4
4
|
var chunk4VNS5WPM_js = require('./chunk-4VNS5WPM.js');
|
|
5
5
|
var mcp = require('pptx-viewer-mcp');
|
|
6
6
|
var mcpSchemas = require('pptx-viewer-mcp/schemas');
|
|
@@ -19079,7 +19079,7 @@ async function buildSlideMarkdown(slides, slideIndex2, meta3, options = {}) {
|
|
|
19079
19079
|
};
|
|
19080
19080
|
let markdown;
|
|
19081
19081
|
try {
|
|
19082
|
-
const converter = new
|
|
19082
|
+
const converter = new chunkYWAFJZ23_js.PptxMarkdownConverter(
|
|
19083
19083
|
"",
|
|
19084
19084
|
{
|
|
19085
19085
|
sourceName: meta3.title ?? "deck.pptx",
|
|
@@ -19671,7 +19671,7 @@ var getTheme = (ctx) => {
|
|
|
19671
19671
|
name: theme?.name,
|
|
19672
19672
|
colorScheme: theme?.colorScheme,
|
|
19673
19673
|
fontScheme: theme?.fontScheme,
|
|
19674
|
-
availablePresets: Object.keys(
|
|
19674
|
+
availablePresets: Object.keys(chunkYWAFJZ23_js.ThemePresets)
|
|
19675
19675
|
};
|
|
19676
19676
|
};
|
|
19677
19677
|
var readExecutors = {
|
|
@@ -20801,7 +20801,7 @@ function applyElementUpdate(el, u) {
|
|
|
20801
20801
|
applyShapeStyleUpdate(el, u);
|
|
20802
20802
|
}
|
|
20803
20803
|
function applyTextUpdate(el, u) {
|
|
20804
|
-
if (!
|
|
20804
|
+
if (!chunkYWAFJZ23_js.hasTextProperties(el)) {
|
|
20805
20805
|
return;
|
|
20806
20806
|
}
|
|
20807
20807
|
const textEl = el;
|
|
@@ -20847,7 +20847,7 @@ function applyShapeStyleUpdate(el, u) {
|
|
|
20847
20847
|
if (u.fillColor === void 0 && u.strokeColor === void 0 && u.strokeWidth === void 0) {
|
|
20848
20848
|
return;
|
|
20849
20849
|
}
|
|
20850
|
-
if (!
|
|
20850
|
+
if (!chunkYWAFJZ23_js.hasShapeProperties(el)) {
|
|
20851
20851
|
return;
|
|
20852
20852
|
}
|
|
20853
20853
|
const holder = el;
|
|
Binary file
|
|
Binary file
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SHAPE_PRESET_DEFS, VIEWER_SHORTCUT_REFERENCE, STROKE_DASH_OPTIONS, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, getImageFitStyle, getImageFillCounterTransform, getComputedFillStyle, isImageLikeElement, getCropShapeClipPath, getImageTilingStyle, mediaPlaybackAttributes, getOnlineVideoEmbed, ONLINE_VIDEO_IFRAME_SANDBOX, ONLINE_VIDEO_IFRAME_ALLOW, buildTextBlockStyle, hasTextProperties, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, buildTextBodyLayoutStyle, buildTextBody3DSceneStyle, buildParagraphs, colorWithOpacity, normalizeHexColor, hexToRgbUnit, build3DExtrusionData, getComputedEffectStyle, getComputedStrokeStyle, getAnimationColorBaseStyle, isStrokeOnlyPresetElement, resolveShapeGeometry, getConnectorPathGeometry, 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, buildTiledSlidesPdfBytes, buildPreviewAnimation, buildMotionPathPreview, mediaFallbackVisual, scheduleMediaTrimAndFade, registerCrossSlideAudio, shouldShowMediaFullscreenStopButton, withInlineListDecorationDefaults, segmentStyleToCss, resolveAutoFitFontScale, applyUnderlineVariant, nestedTextDecorationStyle, scaleFontSizeForAutoFit, resolveFontKerning, getSubstituteFontFamily, parsePanoseString, resolveScriptFontSet, hasDistinctScriptFonts, authoredLetterSpacingPx, pieceLetterSpacing, resolveMetricTrackingPx, hollowTextFillStyle, splitsUnderlineIntoWords, stripUnderlineDecoration, buildTabContext, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, apply3dEffects, customGeometryPathsToSvgSubpaths, buildSubpathPaints, computeColumnBoundaries, getTableCellBandStyle, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, xmlText, cellRunStyle, getChartStylePalette, computeChartLegendLayout, mediaFallbackIcon, mediaFallbackLabelKey, MEDIA_CHROME_ATTRIBUTE, convertOmmlToMathMl, sanitizeMathMl, tableCellCss, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, ooxmlGradientAngleToCssDegrees, buildRectPathGradient, buildRunTabLines, chartPartToAttrs, splitWordsForUnderline, splitRunForMetrics, splitEastAsianBreaks, splitRunByScriptFont } from './chunk-
|
|
2
|
-
import { translationsEn } from './chunk-
|
|
1
|
+
import { SHAPE_PRESET_DEFS, VIEWER_SHORTCUT_REFERENCE, STROKE_DASH_OPTIONS, getAnimationInitialStyle, cloneHistorySnapshot, hasShapeProperties, getImageFitStyle, getImageFillCounterTransform, getComputedFillStyle, isImageLikeElement, getCropShapeClipPath, getImageTilingStyle, mediaPlaybackAttributes, getOnlineVideoEmbed, ONLINE_VIDEO_IFRAME_SANDBOX, ONLINE_VIDEO_IFRAME_ALLOW, buildTextBlockStyle, hasTextProperties, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, buildTextBodyLayoutStyle, buildTextBody3DSceneStyle, buildParagraphs, followingText, colorWithOpacity, normalizeHexColor, hexToRgbUnit, build3DExtrusionData, getComputedEffectStyle, getComputedStrokeStyle, getAnimationColorBaseStyle, isStrokeOnlyPresetElement, resolveShapeGeometry, getConnectorPathGeometry, 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, buildTiledSlidesPdfBytes, buildPreviewAnimation, measurePreviewGeometry, buildMotionPathPreview, mediaFallbackVisual, scheduleMediaTrimAndFade, registerCrossSlideAudio, shouldShowMediaFullscreenStopButton, withInlineListDecorationDefaults, segmentStyleToCss, resolveAutoFitFontScale, applyUnderlineVariant, nestedTextDecorationStyle, scaleFontSizeForAutoFit, resolveFontKerning, getSubstituteFontFamily, parsePanoseString, resolveScriptFontSet, hasDistinctScriptFonts, authoredLetterSpacingPx, pieceLetterSpacing, resolveMetricTrackingPx, hollowTextFillStyle, splitsUnderlineIntoWords, stripUnderlineDecoration, buildTabContext, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, apply3dEffects, customGeometryPathsToSvgSubpaths, buildSubpathPaints, computeColumnBoundaries, getTableCellBandStyle, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, xmlText, cellRunStyle, getChartStylePalette, computeChartLegendLayout, mediaFallbackIcon, mediaFallbackLabelKey, MEDIA_CHROME_ATTRIBUTE, convertOmmlToMathMl, sanitizeMathMl, tableCellCss, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, ooxmlGradientAngleToCssDegrees, buildRectPathGradient, buildRunTabLines, chartPartToAttrs, splitWordsForUnderline, splitRunForMetrics, splitEastAsianBreaks, splitRunByScriptFont } from './chunk-PJT2DTOS.mjs';
|
|
2
|
+
import { translationsEn } from './chunk-HDH4KFDK.mjs';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
5
|
import React8, { useRef, useState, useEffect, useCallback, useMemo, useLayoutEffect } from 'react';
|
|
@@ -1072,18 +1072,19 @@ function renderUnderlineWords(text, isUnderlineWords, wordDecoration, metric, ke
|
|
|
1072
1072
|
} : void 0;
|
|
1073
1073
|
return pieces.map((piece, i) => {
|
|
1074
1074
|
const key = `${keyPrefix}-u${i}`;
|
|
1075
|
+
const following = followingText(pieces, i, metric?.following);
|
|
1075
1076
|
if (!piece.underline) {
|
|
1076
|
-
return /* @__PURE__ */ jsx(React8.Fragment, { children: inner(piece.text, key, gapMetric) }, key);
|
|
1077
|
+
return /* @__PURE__ */ jsx(React8.Fragment, { children: inner(piece.text, key, gapMetric && { ...gapMetric, following }) }, key);
|
|
1077
1078
|
}
|
|
1078
|
-
return /* @__PURE__ */ jsx("span", { style: wordDecoration, children: inner(piece.text, key, metric) }, key);
|
|
1079
|
+
return /* @__PURE__ */ jsx("span", { style: wordDecoration, children: inner(piece.text, key, metric && { ...metric, following }) }, key);
|
|
1079
1080
|
});
|
|
1080
1081
|
}
|
|
1081
1082
|
function makeSegmentPieceRenderer(needsScriptFonts, scriptFonts, baseFontFamily, isUnderlineWords, wordDecoration, metric) {
|
|
1082
|
-
return (text, key) => renderUnderlineWords(
|
|
1083
|
+
return (text, key, following) => renderUnderlineWords(
|
|
1083
1084
|
text,
|
|
1084
1085
|
isUnderlineWords,
|
|
1085
1086
|
wordDecoration,
|
|
1086
|
-
metric,
|
|
1087
|
+
metric && { ...metric, following },
|
|
1087
1088
|
key,
|
|
1088
1089
|
(subText, subKey, subMetric) => renderMetricPieces(
|
|
1089
1090
|
subText,
|
|
@@ -1116,8 +1117,8 @@ function renderTabbedLine(line, ctx, keyPrefix, renderPiece, nestedStyle, underl
|
|
|
1116
1117
|
] }, key);
|
|
1117
1118
|
}) });
|
|
1118
1119
|
}
|
|
1119
|
-
function renderEastAsianPieces(text, metric, keyPrefix, inner, baseStyle) {
|
|
1120
|
-
const parts = splitEastAsianBreaks(text, metric.eastAsian, metric.font);
|
|
1120
|
+
function renderEastAsianPieces(text, metric, keyPrefix, inner, baseStyle, following) {
|
|
1121
|
+
const parts = splitEastAsianBreaks(text, metric.eastAsian, metric.font, following);
|
|
1121
1122
|
if (parts.length === 1 && !parts[0].style) {
|
|
1122
1123
|
return inner(parts[0].text, keyPrefix);
|
|
1123
1124
|
}
|
|
@@ -1132,7 +1133,7 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1132
1133
|
}
|
|
1133
1134
|
const pieces = splitRunForMetrics(text, metric.font);
|
|
1134
1135
|
if (pieces.length <= 1) {
|
|
1135
|
-
return renderEastAsianPieces(text, metric, keyPrefix, inner, void 0);
|
|
1136
|
+
return renderEastAsianPieces(text, metric, keyPrefix, inner, void 0, metric.following);
|
|
1136
1137
|
}
|
|
1137
1138
|
return pieces.map((piece, i) => {
|
|
1138
1139
|
const key = `${keyPrefix}-w${i}`;
|
|
@@ -1140,7 +1141,14 @@ function renderMetricPieces(text, metric, keyPrefix, inner) {
|
|
|
1140
1141
|
...metric.nestedStyle,
|
|
1141
1142
|
letterSpacing: pieceLetterSpacing(metric.authoredPx, piece.tracking)
|
|
1142
1143
|
};
|
|
1143
|
-
return /* @__PURE__ */ jsx("span", { style, children: renderEastAsianPieces(
|
|
1144
|
+
return /* @__PURE__ */ jsx("span", { style, children: renderEastAsianPieces(
|
|
1145
|
+
piece.text,
|
|
1146
|
+
metric,
|
|
1147
|
+
key,
|
|
1148
|
+
inner,
|
|
1149
|
+
style,
|
|
1150
|
+
followingText(pieces, i, metric.following)
|
|
1151
|
+
) }, key);
|
|
1144
1152
|
});
|
|
1145
1153
|
}
|
|
1146
1154
|
function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFamily, keyPrefix, nestedStyle) {
|
|
@@ -1181,7 +1189,7 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1181
1189
|
renderLeaf,
|
|
1182
1190
|
metric?.nestedStyle,
|
|
1183
1191
|
isUnderlineWords
|
|
1184
|
-
) : renderLeaf(line, lineKey),
|
|
1192
|
+
) : renderLeaf(line, lineKey, lineIndex < lines.length - 1 ? "\n" : metric?.following),
|
|
1185
1193
|
lineIndex < lines.length - 1 ? /* @__PURE__ */ jsx("br", {}) : null
|
|
1186
1194
|
] }, lineKey);
|
|
1187
1195
|
});
|
|
@@ -1222,10 +1230,10 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1222
1230
|
color: "inherit",
|
|
1223
1231
|
borderRadius: 2
|
|
1224
1232
|
},
|
|
1225
|
-
children: renderLeaf(chunk.text, chunkKey)
|
|
1233
|
+
children: renderLeaf(chunk.text, chunkKey, followingText(chunks, ci, metric?.following))
|
|
1226
1234
|
},
|
|
1227
1235
|
chunkKey
|
|
1228
|
-
) : /* @__PURE__ */ jsx(React8.Fragment, { children: renderLeaf(chunk.text, chunkKey) }, chunkKey);
|
|
1236
|
+
) : /* @__PURE__ */ jsx(React8.Fragment, { children: renderLeaf(chunk.text, chunkKey, followingText(chunks, ci, metric?.following)) }, chunkKey);
|
|
1229
1237
|
});
|
|
1230
1238
|
}
|
|
1231
1239
|
function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber, fontSize) {
|
|
@@ -1406,7 +1414,8 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1406
1414
|
font: metricFont,
|
|
1407
1415
|
authoredPx: authoredLetterSpacing,
|
|
1408
1416
|
nestedStyle,
|
|
1409
|
-
eastAsian: ctx.eastAsianBreaks
|
|
1417
|
+
eastAsian: ctx.eastAsianBreaks,
|
|
1418
|
+
following: ctx.eastAsianFollowing
|
|
1410
1419
|
};
|
|
1411
1420
|
const spanStyle = { ...run.style };
|
|
1412
1421
|
spanStyle.color = resolvedSegmentColor;
|
|
@@ -1558,7 +1567,12 @@ function renderParagraph(para, paraIndex, paraCount, segments, ctx, subElementAn
|
|
|
1558
1567
|
};
|
|
1559
1568
|
const runs = joinRunsBySegment(para.runs);
|
|
1560
1569
|
const listParagraph = inlineListSeed?.paragraphs[paraIndex];
|
|
1561
|
-
const renderedRuns = listParagraph ? listParagraph.runs.map((run) => renderSeededListRun(run, runs, segments, runCtx)) : runs.map(
|
|
1570
|
+
const renderedRuns = listParagraph ? listParagraph.runs.map((run) => renderSeededListRun(run, runs, segments, runCtx)) : runs.map(
|
|
1571
|
+
(run, i) => renderParagraphRun(run, segments[run.segmentIndex ?? -1], {
|
|
1572
|
+
...runCtx,
|
|
1573
|
+
eastAsianFollowing: para.eastAsianBreaks ? followingText(runs, i) : void 0
|
|
1574
|
+
})
|
|
1575
|
+
);
|
|
1562
1576
|
const paraStyle = {
|
|
1563
1577
|
// `text-align`, BiDi `direction` / `unicode-bidi` and the kinsoku
|
|
1564
1578
|
// line-break rules, resolved by shared from this paragraph's own `a:pPr`.
|
|
@@ -3818,7 +3832,11 @@ function buildPdfFromTiledImageData(pages) {
|
|
|
3818
3832
|
var activePreview = null;
|
|
3819
3833
|
function startPreviewAnimation(elementId, preset, options) {
|
|
3820
3834
|
stopPreviewAnimation();
|
|
3821
|
-
const
|
|
3835
|
+
const domEl = document.querySelector(`[data-element-id="${elementId}"]`);
|
|
3836
|
+
const descriptor = buildPreviewAnimation(preset, {
|
|
3837
|
+
...options,
|
|
3838
|
+
geometry: domEl ? measurePreviewGeometry(domEl) : void 0
|
|
3839
|
+
});
|
|
3822
3840
|
if (!descriptor) {
|
|
3823
3841
|
return;
|
|
3824
3842
|
}
|
|
Binary file
|
|
Binary file
|