pptx-react-viewer 3.4.1 → 3.5.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.
- package/CHANGELOG.md +22 -0
- package/dist/{AiChatPanel-AIM55U76.mjs → AiChatPanel-6RN4FZ5Y.mjs} +4 -4
- package/dist/AiChatPanel-6RN4FZ5Y.mjs.br +0 -0
- package/dist/AiChatPanel-6RN4FZ5Y.mjs.gz +0 -0
- package/dist/{AiChatPanel-Q2ZVO4RR.js → AiChatPanel-D5DDUEIW.js} +25 -25
- package/dist/AiChatPanel-D5DDUEIW.js.br +0 -0
- package/dist/AiChatPanel-D5DDUEIW.js.gz +0 -0
- package/dist/{Area3DChartScene-DNLGOR5F.mjs → Area3DChartScene-PWBCCYGS.mjs} +1 -1
- package/dist/Area3DChartScene-PWBCCYGS.mjs.br +1 -0
- package/dist/Area3DChartScene-PWBCCYGS.mjs.gz +0 -0
- package/dist/{Area3DChartScene-W5HVINQ6.js → Area3DChartScene-UH6DXEDV.js} +2 -2
- package/dist/Area3DChartScene-UH6DXEDV.js.br +0 -0
- package/dist/Area3DChartScene-UH6DXEDV.js.gz +0 -0
- package/dist/{Bar3DChartScene-VYKQAY6X.mjs → Bar3DChartScene-6GDMTIFI.mjs} +1 -1
- package/dist/Bar3DChartScene-6GDMTIFI.mjs.br +0 -0
- package/dist/Bar3DChartScene-6GDMTIFI.mjs.gz +0 -0
- package/dist/{Bar3DChartScene-SOO62TCP.js → Bar3DChartScene-HN54LAH5.js} +2 -2
- package/dist/Bar3DChartScene-HN54LAH5.js.br +0 -0
- package/dist/Bar3DChartScene-HN54LAH5.js.gz +0 -0
- package/dist/{Line3DChartScene-ZVELPNOD.mjs → Line3DChartScene-5WIHGKH4.mjs} +1 -1
- package/dist/Line3DChartScene-5WIHGKH4.mjs.br +1 -0
- package/dist/Line3DChartScene-5WIHGKH4.mjs.gz +0 -0
- package/dist/{Line3DChartScene-BAP3YA3R.js → Line3DChartScene-WSDPBF5W.js} +2 -2
- package/dist/Line3DChartScene-WSDPBF5W.js.br +0 -0
- package/dist/Line3DChartScene-WSDPBF5W.js.gz +0 -0
- package/dist/{Model3DScene-ZJWU5IUY.mjs → Model3DScene-7ZUKNMXA.mjs} +1 -1
- package/dist/Model3DScene-7ZUKNMXA.mjs.br +0 -0
- package/dist/Model3DScene-7ZUKNMXA.mjs.gz +0 -0
- package/dist/{Model3DScene-BWNVCCAZ.js → Model3DScene-GUYP4VJP.js} +2 -2
- package/dist/Model3DScene-GUYP4VJP.js.br +0 -0
- package/dist/Model3DScene-GUYP4VJP.js.gz +0 -0
- package/dist/{PieChart3DScene-NNLKJ6LN.mjs → PieChart3DScene-FBYOJF2T.mjs} +1 -1
- package/dist/PieChart3DScene-FBYOJF2T.mjs.br +0 -0
- package/dist/PieChart3DScene-FBYOJF2T.mjs.gz +0 -0
- package/dist/{PieChart3DScene-2DJE4BM3.js → PieChart3DScene-W7QK76IY.js} +2 -2
- package/dist/PieChart3DScene-W7QK76IY.js.br +0 -0
- package/dist/PieChart3DScene-W7QK76IY.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-WRSCQKJV.js → SurfaceChart3DScene-6SRHNAYR.js} +2 -2
- package/dist/SurfaceChart3DScene-6SRHNAYR.js.br +0 -0
- package/dist/SurfaceChart3DScene-6SRHNAYR.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-NWB4QAOI.mjs → SurfaceChart3DScene-QIXANTOO.mjs} +1 -1
- package/dist/SurfaceChart3DScene-QIXANTOO.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-QIXANTOO.mjs.gz +0 -0
- package/dist/{chunk-EM3D67TB.mjs → chunk-2TKEP3LD.mjs} +43 -20
- package/dist/chunk-2TKEP3LD.mjs.br +0 -0
- package/dist/chunk-2TKEP3LD.mjs.gz +0 -0
- package/dist/{chunk-QEAU2XTI.mjs → chunk-3MJLEKOD.mjs} +81 -26
- package/dist/chunk-3MJLEKOD.mjs.br +0 -0
- package/dist/chunk-3MJLEKOD.mjs.gz +0 -0
- package/dist/{chunk-GKRE7272.js → chunk-BRUBTLWG.js} +173 -169
- package/dist/chunk-BRUBTLWG.js.br +0 -0
- package/dist/chunk-BRUBTLWG.js.gz +0 -0
- package/dist/{chunk-4YGGPPJZ.mjs → chunk-DGFYYQAK.mjs} +6 -2
- package/dist/chunk-DGFYYQAK.mjs.br +0 -0
- package/dist/chunk-DGFYYQAK.mjs.gz +0 -0
- package/dist/{chunk-XWUMM2TX.mjs → chunk-JCJ3EPG6.mjs} +1 -0
- package/dist/chunk-JCJ3EPG6.mjs.br +0 -0
- package/dist/chunk-JCJ3EPG6.mjs.gz +0 -0
- package/dist/{chunk-SEJEVNXW.js → chunk-MLDG7WX6.js} +250 -91
- package/dist/chunk-MLDG7WX6.js.br +0 -0
- package/dist/chunk-MLDG7WX6.js.gz +0 -0
- package/dist/{chunk-Y2B5EZEV.js → chunk-NZY4GXCF.js} +506 -451
- package/dist/chunk-NZY4GXCF.js.br +0 -0
- package/dist/chunk-NZY4GXCF.js.gz +0 -0
- package/dist/{chunk-PADP3NUM.mjs → chunk-P7SNHVMV.mjs} +247 -92
- package/dist/chunk-P7SNHVMV.mjs.br +0 -0
- package/dist/chunk-P7SNHVMV.mjs.gz +0 -0
- package/dist/{chunk-IJLTDBXT.mjs → chunk-QCFRIC6B.mjs} +1 -1
- package/dist/chunk-QCFRIC6B.mjs.br +0 -0
- package/dist/chunk-QCFRIC6B.mjs.gz +0 -0
- package/dist/{chunk-UNIJUD5C.js → chunk-UTIMT5CZ.js} +1 -0
- package/dist/chunk-UTIMT5CZ.js.br +0 -0
- package/dist/chunk-UTIMT5CZ.js.gz +0 -0
- package/dist/{chunk-WXQQ43IA.js → chunk-WPOZ2SAD.js} +1201 -1178
- package/dist/chunk-WPOZ2SAD.js.br +0 -0
- package/dist/chunk-WPOZ2SAD.js.gz +0 -0
- package/dist/{chunk-PDVJNNWP.js → chunk-ZGSPOPVM.js} +5 -5
- package/dist/chunk-ZGSPOPVM.js.br +0 -0
- package/dist/chunk-ZGSPOPVM.js.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.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 +22 -0
- 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/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 +1 -1
- package/dist/AiChatPanel-AIM55U76.mjs.br +0 -0
- package/dist/AiChatPanel-AIM55U76.mjs.gz +0 -0
- package/dist/AiChatPanel-Q2ZVO4RR.js.br +0 -0
- package/dist/AiChatPanel-Q2ZVO4RR.js.gz +0 -0
- package/dist/Area3DChartScene-DNLGOR5F.mjs.br +0 -0
- package/dist/Area3DChartScene-DNLGOR5F.mjs.gz +0 -0
- package/dist/Area3DChartScene-W5HVINQ6.js.br +0 -0
- package/dist/Area3DChartScene-W5HVINQ6.js.gz +0 -0
- package/dist/Bar3DChartScene-SOO62TCP.js.br +0 -0
- package/dist/Bar3DChartScene-SOO62TCP.js.gz +0 -0
- package/dist/Bar3DChartScene-VYKQAY6X.mjs.br +0 -0
- package/dist/Bar3DChartScene-VYKQAY6X.mjs.gz +0 -0
- package/dist/Line3DChartScene-BAP3YA3R.js.br +0 -0
- package/dist/Line3DChartScene-BAP3YA3R.js.gz +0 -0
- package/dist/Line3DChartScene-ZVELPNOD.mjs.br +0 -0
- package/dist/Line3DChartScene-ZVELPNOD.mjs.gz +0 -0
- package/dist/Model3DScene-BWNVCCAZ.js.br +0 -0
- package/dist/Model3DScene-BWNVCCAZ.js.gz +0 -0
- package/dist/Model3DScene-ZJWU5IUY.mjs.br +0 -0
- package/dist/Model3DScene-ZJWU5IUY.mjs.gz +0 -0
- package/dist/PieChart3DScene-2DJE4BM3.js.br +0 -0
- package/dist/PieChart3DScene-2DJE4BM3.js.gz +0 -0
- package/dist/PieChart3DScene-NNLKJ6LN.mjs.br +0 -0
- package/dist/PieChart3DScene-NNLKJ6LN.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-NWB4QAOI.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-NWB4QAOI.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-WRSCQKJV.js.br +0 -0
- package/dist/SurfaceChart3DScene-WRSCQKJV.js.gz +0 -0
- package/dist/chunk-4YGGPPJZ.mjs.br +0 -0
- package/dist/chunk-4YGGPPJZ.mjs.gz +0 -0
- package/dist/chunk-EM3D67TB.mjs.br +0 -0
- package/dist/chunk-EM3D67TB.mjs.gz +0 -0
- package/dist/chunk-GKRE7272.js.br +0 -0
- package/dist/chunk-GKRE7272.js.gz +0 -0
- package/dist/chunk-IJLTDBXT.mjs.br +0 -0
- package/dist/chunk-IJLTDBXT.mjs.gz +0 -0
- package/dist/chunk-PADP3NUM.mjs.br +0 -0
- package/dist/chunk-PADP3NUM.mjs.gz +0 -0
- package/dist/chunk-PDVJNNWP.js.br +0 -0
- package/dist/chunk-PDVJNNWP.js.gz +0 -0
- package/dist/chunk-QEAU2XTI.mjs.br +0 -0
- package/dist/chunk-QEAU2XTI.mjs.gz +0 -0
- package/dist/chunk-SEJEVNXW.js.br +0 -0
- package/dist/chunk-SEJEVNXW.js.gz +0 -0
- package/dist/chunk-UNIJUD5C.js.br +0 -0
- package/dist/chunk-UNIJUD5C.js.gz +0 -0
- package/dist/chunk-WXQQ43IA.js.br +0 -0
- package/dist/chunk-WXQQ43IA.js.gz +0 -0
- package/dist/chunk-XWUMM2TX.mjs.br +0 -0
- package/dist/chunk-XWUMM2TX.mjs.gz +0 -0
- package/dist/chunk-Y2B5EZEV.js.br +0 -0
- package/dist/chunk-Y2B5EZEV.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, computeSelectionRect, DEFAULT_FONT_FAMILY, cellStyleToCss, rectToCells, isCellInRect, tableContainerCss, buildChartViewModel, resolveChartKind, chartPreserveAspectRatio, buildNotesPdfBytes, buildSlidesPdfBytes, buildPreviewAnimation, buildMotionPathPreview, mediaFallbackVisual, registerCrossSlideAudio, resolveAutoFitFontScale, resolveFontKerning, getSubstituteFontFamily, parsePanoseString, resolveScriptFontSet, hasDistinctScriptFonts, nestedTextDecorationStyle, pieceLetterSpacing, resolveMetricTrackingPx, hollowTextFillStyle, 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, 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, computeSelectionRect, DEFAULT_FONT_FAMILY, cellStyleToCss, rectToCells, isCellInRect, tableContainerCss, buildChartViewModel, resolveChartKind, chartPreserveAspectRatio, buildNotesPdfBytes, buildSlidesPdfBytes, buildPreviewAnimation, buildMotionPathPreview, mediaFallbackVisual, registerCrossSlideAudio, resolveAutoFitFontScale, resolveFontKerning, getSubstituteFontFamily, parsePanoseString, resolveScriptFontSet, hasDistinctScriptFonts, nestedTextDecorationStyle, pieceLetterSpacing, resolveMetricTrackingPx, hollowTextFillStyle, 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, splitRunForMetrics, splitRunByScriptFont } from './chunk-P7SNHVMV.mjs';
|
|
2
|
+
import { translationsEn } from './chunk-JCJ3EPG6.mjs';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import { twMerge } from 'tailwind-merge';
|
|
5
5
|
import React6, { useRef, useState, useEffect, useCallback, useMemo, useLayoutEffect } from 'react';
|
|
@@ -1586,6 +1586,8 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1586
1586
|
return /* @__PURE__ */ jsx(
|
|
1587
1587
|
"img",
|
|
1588
1588
|
{
|
|
1589
|
+
"data-pptx-bullet-marker": true,
|
|
1590
|
+
contentEditable: false,
|
|
1589
1591
|
src: picture.src,
|
|
1590
1592
|
alt: picture.accessibleLabel,
|
|
1591
1593
|
style: {
|
|
@@ -1607,6 +1609,8 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1607
1609
|
"span",
|
|
1608
1610
|
{
|
|
1609
1611
|
className: "pptx-bullet",
|
|
1612
|
+
"data-pptx-bullet-marker": true,
|
|
1613
|
+
contentEditable: false,
|
|
1610
1614
|
style: para.bulletStyle,
|
|
1611
1615
|
"aria-label": picture?.accessibleLabel,
|
|
1612
1616
|
children: para.bulletMarker
|
|
Binary file
|
|
Binary file
|
|
@@ -1215,6 +1215,7 @@ var translationsEn = {
|
|
|
1215
1215
|
"pptx.slideBackground.backgroundPreview": "Background preview",
|
|
1216
1216
|
"pptx.slideBackground.removeBackgroundImage": "Remove background image",
|
|
1217
1217
|
"pptx.slideBackground.clearBackground": "Clear Background",
|
|
1218
|
+
"pptx.slideBackground.hideBackgroundGraphics": "Hide Background Graphics",
|
|
1218
1219
|
"pptx.presentationSettings.showType": "Show type",
|
|
1219
1220
|
"pptx.presentationSettings.showTypePresented": "Presented",
|
|
1220
1221
|
"pptx.presentationSettings.showTypeBrowsed": "Browsed",
|
|
Binary file
|
|
Binary file
|
|
@@ -7621,6 +7621,23 @@ function orderedPathCommandEntries(path, ensureArray18) {
|
|
|
7621
7621
|
return index < items.length ? [[key2, items[index]]] : [];
|
|
7622
7622
|
});
|
|
7623
7623
|
}
|
|
7624
|
+
function inheritCustomGeometryCommandOrder(target, ...sources) {
|
|
7625
|
+
let targetSignature;
|
|
7626
|
+
for (const source of sources) {
|
|
7627
|
+
if (!source) {
|
|
7628
|
+
continue;
|
|
7629
|
+
}
|
|
7630
|
+
const order = commandOrder.get(source);
|
|
7631
|
+
if (!order) {
|
|
7632
|
+
continue;
|
|
7633
|
+
}
|
|
7634
|
+
targetSignature ??= pathSignature(target);
|
|
7635
|
+
if (orderSignature(order) === targetSignature) {
|
|
7636
|
+
commandOrder.set(target, [...order]);
|
|
7637
|
+
return;
|
|
7638
|
+
}
|
|
7639
|
+
}
|
|
7640
|
+
}
|
|
7624
7641
|
function orderedXmlKey(baseName, order) {
|
|
7625
7642
|
return `${baseName}${ORDER_SUFFIX}${order}`;
|
|
7626
7643
|
}
|
|
@@ -21654,7 +21671,8 @@ var PptxSlideBackgroundBuilder = class {
|
|
|
21654
21671
|
const existingBg = cSld["p:bg"];
|
|
21655
21672
|
const existingBgPr = existingBg?.["p:bgPr"];
|
|
21656
21673
|
const existingHasBlipFill = existingBgPr?.["a:blipFill"] !== void 0;
|
|
21657
|
-
|
|
21674
|
+
const backgroundImageUnchangedFromAuthored = init.authoredBackground === void 0 || rawBackgroundImage === (init.authoredBackground.image ?? "");
|
|
21675
|
+
if (!hasDataUrlBackgroundImage && existingHasBlipFill && backgroundImageUnchangedFromAuthored) {
|
|
21658
21676
|
this.reorderCSldBgFirst(cSld, existingBg);
|
|
21659
21677
|
init.slideNode["p:cSld"] = cSld;
|
|
21660
21678
|
return;
|
|
@@ -35995,6 +36013,14 @@ function reResolveSlideColors(slides, oldColorMap, newColorScheme) {
|
|
|
35995
36013
|
}
|
|
35996
36014
|
return slides.map((slide) => remapSlideColors(slide, remap));
|
|
35997
36015
|
}
|
|
36016
|
+
function reResolveElementColors(elements2, oldColorMap, newColorScheme) {
|
|
36017
|
+
const newMap = buildThemeColorMap(newColorScheme);
|
|
36018
|
+
const remap = buildColorRemapTable(oldColorMap, newMap);
|
|
36019
|
+
if (remap.size === 0) {
|
|
36020
|
+
return elements2;
|
|
36021
|
+
}
|
|
36022
|
+
return elements2.map((el) => remapElementColors(el, remap));
|
|
36023
|
+
}
|
|
35998
36024
|
function applyThemeToData(data, newColorScheme, newFontScheme, themeName) {
|
|
35999
36025
|
const oldColorMap = data.themeColorMap ?? {};
|
|
36000
36026
|
const newColorMap = buildThemeColorMap(newColorScheme);
|
|
@@ -52226,13 +52252,22 @@ function mergeXmlObjects(base, override, depth = 0) {
|
|
|
52226
52252
|
return void 0;
|
|
52227
52253
|
}
|
|
52228
52254
|
if (!base) {
|
|
52229
|
-
|
|
52255
|
+
if (!override) {
|
|
52256
|
+
return void 0;
|
|
52257
|
+
}
|
|
52258
|
+
const merged2 = { ...override };
|
|
52259
|
+
inheritCustomGeometryCommandOrder(merged2, override);
|
|
52260
|
+
return merged2;
|
|
52230
52261
|
}
|
|
52231
52262
|
if (!override) {
|
|
52232
|
-
|
|
52263
|
+
const merged2 = { ...base };
|
|
52264
|
+
inheritCustomGeometryCommandOrder(merged2, base);
|
|
52265
|
+
return merged2;
|
|
52233
52266
|
}
|
|
52234
52267
|
if (depth > MAX_MERGE_DEPTH) {
|
|
52235
|
-
|
|
52268
|
+
const merged2 = { ...base, ...override };
|
|
52269
|
+
inheritCustomGeometryCommandOrder(merged2, override, base);
|
|
52270
|
+
return merged2;
|
|
52236
52271
|
}
|
|
52237
52272
|
const merged = { ...base };
|
|
52238
52273
|
for (const [key2, value] of Object.entries(override)) {
|
|
@@ -52245,6 +52280,7 @@ function mergeXmlObjects(base, override, depth = 0) {
|
|
|
52245
52280
|
merged[key2] = value;
|
|
52246
52281
|
}
|
|
52247
52282
|
}
|
|
52283
|
+
inheritCustomGeometryCommandOrder(merged, override, base);
|
|
52248
52284
|
return merged;
|
|
52249
52285
|
}
|
|
52250
52286
|
var RELATIONSHIPS_NS = "http://schemas.openxmlformats.org/package/2006/relationships";
|
|
@@ -62940,8 +62976,16 @@ var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
|
|
|
62940
62976
|
if (!bullet) {
|
|
62941
62977
|
return false;
|
|
62942
62978
|
}
|
|
62943
|
-
|
|
62944
|
-
|
|
62979
|
+
if (bullet.autoNumType) {
|
|
62980
|
+
if (bullet.paragraphIndex === void 0) {
|
|
62981
|
+
return false;
|
|
62982
|
+
}
|
|
62983
|
+
const ordinal = Math.max(1, (bullet.autoNumStartAt ?? 1) + bullet.paragraphIndex);
|
|
62984
|
+
const marker2 = formatAutoNumberMarker(bullet.autoNumType, ordinal);
|
|
62985
|
+
return segment.text === marker2 || segment.text === `${marker2} `;
|
|
62986
|
+
}
|
|
62987
|
+
const marker = bullet.char ? `${bullet.char} ` : bullet.imageRelId || bullet.imageDataUrl ? "\u{1F4CE} " : "\u2022 ";
|
|
62988
|
+
return segment.text === marker;
|
|
62945
62989
|
}
|
|
62946
62990
|
createParagraphsFromTextContent(text22, textStyle, textSegments, resolveHyperlinkRelationshipId) {
|
|
62947
62991
|
const runScopedTextStyle = toRunScopedTextStyle(textStyle);
|
|
@@ -72456,6 +72500,9 @@ var PptxHandlerRuntime40 = class _PptxHandlerRuntime17 extends PptxHandlerRuntim
|
|
|
72456
72500
|
if (slide.showMasterPhAnim !== void 0) {
|
|
72457
72501
|
slideNode["@_showMasterPhAnim"] = slide.showMasterPhAnim ? "1" : "0";
|
|
72458
72502
|
}
|
|
72503
|
+
if (slide.showMasterShapes !== void 0) {
|
|
72504
|
+
slideNode["@_showMasterSp"] = slide.showMasterShapes ? "1" : "0";
|
|
72505
|
+
}
|
|
72459
72506
|
slideNode["p:clrMapOvr"] = buildClrMapOverrideXml(slide.clrMapOverride);
|
|
72460
72507
|
const spTree = this.ensureSlideTree(xmlObj);
|
|
72461
72508
|
writeCommonSlideDataName(slideNode["p:cSld"], slide.name);
|
|
@@ -123204,6 +123251,9 @@ function elementLockTogglePatch(shouldLock) {
|
|
|
123204
123251
|
function filterInteractableIds(ids, lookup, interaction) {
|
|
123205
123252
|
return ids.filter((id) => canInteractWithElement(lookup(id), interaction));
|
|
123206
123253
|
}
|
|
123254
|
+
function shouldShowElementHandles(isEditableCanvas, isSelected, selectedCount) {
|
|
123255
|
+
return isEditableCanvas && isSelected && selectedCount <= 1;
|
|
123256
|
+
}
|
|
123207
123257
|
function getImageFitStyle(el) {
|
|
123208
123258
|
const uncropped = {
|
|
123209
123259
|
width: "100%",
|
|
@@ -123288,6 +123338,89 @@ function round2(value) {
|
|
|
123288
123338
|
function round6(value) {
|
|
123289
123339
|
return Math.round(value * 1e6) / 1e6;
|
|
123290
123340
|
}
|
|
123341
|
+
function resolvePictureBullet(info, baseFontSize) {
|
|
123342
|
+
if (!info.imageDataUrl && !info.imageRelId && !info.imageBlipFillXml) {
|
|
123343
|
+
return void 0;
|
|
123344
|
+
}
|
|
123345
|
+
const sizePx = typeof info.sizePts === "number" ? info.sizePts : typeof info.sizePercent === "number" ? baseFontSize * (info.sizePercent / 100) : baseFontSize;
|
|
123346
|
+
return {
|
|
123347
|
+
...info.imageDataUrl ? { src: info.imageDataUrl } : {},
|
|
123348
|
+
sizePx,
|
|
123349
|
+
fallbackMarker: "\u2022",
|
|
123350
|
+
accessibleLabel: "Bullet",
|
|
123351
|
+
...info.imageRelId ? { imageRelId: info.imageRelId } : {}
|
|
123352
|
+
};
|
|
123353
|
+
}
|
|
123354
|
+
function resolveParagraphBullet(firstSegment, baseFontSize = firstSegment?.style?.fontSize ?? 16) {
|
|
123355
|
+
if (!firstSegment) {
|
|
123356
|
+
return void 0;
|
|
123357
|
+
}
|
|
123358
|
+
if (firstSegment.style?.listType === "none") {
|
|
123359
|
+
return void 0;
|
|
123360
|
+
}
|
|
123361
|
+
const info = firstSegment.bulletInfo;
|
|
123362
|
+
if (!info || info.none) {
|
|
123363
|
+
return void 0;
|
|
123364
|
+
}
|
|
123365
|
+
const color2 = info.color;
|
|
123366
|
+
const fontFamily = info.fontFamily;
|
|
123367
|
+
const sizePts = typeof info.sizePts === "number" ? info.sizePts : void 0;
|
|
123368
|
+
const sizePercent = typeof info.sizePercent === "number" ? info.sizePercent : void 0;
|
|
123369
|
+
const picture = resolvePictureBullet(info, baseFontSize);
|
|
123370
|
+
if (picture) {
|
|
123371
|
+
return {
|
|
123372
|
+
marker: picture.fallbackMarker,
|
|
123373
|
+
isNumbered: false,
|
|
123374
|
+
color: color2,
|
|
123375
|
+
fontFamily,
|
|
123376
|
+
sizePts,
|
|
123377
|
+
sizePercent,
|
|
123378
|
+
picture
|
|
123379
|
+
};
|
|
123380
|
+
}
|
|
123381
|
+
if (info.autoNumType) {
|
|
123382
|
+
const startAt = typeof info.autoNumStartAt === "number" ? info.autoNumStartAt : 1;
|
|
123383
|
+
const paraIdx = typeof info.paragraphIndex === "number" ? info.paragraphIndex : 0;
|
|
123384
|
+
const seqNum = Math.max(1, startAt + paraIdx);
|
|
123385
|
+
return {
|
|
123386
|
+
marker: formatAutoNumberMarker(info.autoNumType, seqNum),
|
|
123387
|
+
isNumbered: true,
|
|
123388
|
+
color: color2,
|
|
123389
|
+
fontFamily,
|
|
123390
|
+
sizePts,
|
|
123391
|
+
sizePercent
|
|
123392
|
+
};
|
|
123393
|
+
}
|
|
123394
|
+
if (info.char) {
|
|
123395
|
+
return { marker: info.char, isNumbered: false, color: color2, fontFamily, sizePts, sizePercent };
|
|
123396
|
+
}
|
|
123397
|
+
return void 0;
|
|
123398
|
+
}
|
|
123399
|
+
var INDENT_PX_PER_LEVEL = 18;
|
|
123400
|
+
function bulletIndentPx(level) {
|
|
123401
|
+
const lvl = typeof level === "number" && level > 0 ? level : 0;
|
|
123402
|
+
return lvl * INDENT_PX_PER_LEVEL;
|
|
123403
|
+
}
|
|
123404
|
+
function resolveParagraphIndent(paraIndent, paragraphLevel) {
|
|
123405
|
+
const marginLeft = typeof paraIndent?.marginLeft === "number" && paraIndent.marginLeft !== 0 ? paraIndent.marginLeft : void 0;
|
|
123406
|
+
const textIndent = typeof paraIndent?.indent === "number" && paraIndent.indent !== 0 ? paraIndent.indent : void 0;
|
|
123407
|
+
if (marginLeft === void 0 && textIndent === void 0) {
|
|
123408
|
+
const levelPx = bulletIndentPx(paragraphLevel);
|
|
123409
|
+
return levelPx > 0 ? { marginLeftPx: levelPx } : {};
|
|
123410
|
+
}
|
|
123411
|
+
return { marginLeftPx: marginLeft, textIndentPx: textIndent };
|
|
123412
|
+
}
|
|
123413
|
+
function isBulletMarkerSegment(segment) {
|
|
123414
|
+
const bullet = segment.bulletInfo;
|
|
123415
|
+
if (!bullet || bullet.none) {
|
|
123416
|
+
return false;
|
|
123417
|
+
}
|
|
123418
|
+
const resolved = resolveParagraphBullet(segment);
|
|
123419
|
+
if (!resolved) {
|
|
123420
|
+
return false;
|
|
123421
|
+
}
|
|
123422
|
+
return segment.text.trim() === resolved.marker.trim() && segment.text.trim().length > 0;
|
|
123423
|
+
}
|
|
123291
123424
|
var OUTLINE_VIEW_ATTR = "data-pptx-outline-view";
|
|
123292
123425
|
var OUTLINE_ROW_ATTR = "data-pptx-outline-row";
|
|
123293
123426
|
var OUTLINE_SLIDE_ATTR = "data-pptx-outline-slide";
|
|
@@ -123343,10 +123476,13 @@ function isBulletMarker(segment) {
|
|
|
123343
123476
|
if (!bullet) {
|
|
123344
123477
|
return false;
|
|
123345
123478
|
}
|
|
123346
|
-
|
|
123347
|
-
|
|
123479
|
+
if (bullet.autoNumType) {
|
|
123480
|
+
return bullet.paragraphIndex !== void 0 && isBulletMarkerSegment(segment);
|
|
123481
|
+
}
|
|
123482
|
+
const marker = bullet.char ? `${bullet.char} ` : bullet.imageRelId || bullet.imageDataUrl ? "\u{1F4CE} " : "\u2022 ";
|
|
123483
|
+
return segment.text === marker;
|
|
123348
123484
|
}
|
|
123349
|
-
function
|
|
123485
|
+
function isParagraphSeparator2(segment) {
|
|
123350
123486
|
return Boolean(segment.isParagraphBreak) || segment.text === "\n" && !segment.isLineBreak;
|
|
123351
123487
|
}
|
|
123352
123488
|
function groupElementParagraphs(element) {
|
|
@@ -123360,7 +123496,7 @@ function groupElementParagraphs(element) {
|
|
|
123360
123496
|
}
|
|
123361
123497
|
const groups = [{ content: [] }];
|
|
123362
123498
|
for (const segment of segments) {
|
|
123363
|
-
if (
|
|
123499
|
+
if (isParagraphSeparator2(segment)) {
|
|
123364
123500
|
groups.push({ content: [] });
|
|
123365
123501
|
continue;
|
|
123366
123502
|
}
|
|
@@ -125107,6 +125243,7 @@ var translationsEn = {
|
|
|
125107
125243
|
"pptx.slideBackground.backgroundPreview": "Background preview",
|
|
125108
125244
|
"pptx.slideBackground.removeBackgroundImage": "Remove background image",
|
|
125109
125245
|
"pptx.slideBackground.clearBackground": "Clear Background",
|
|
125246
|
+
"pptx.slideBackground.hideBackgroundGraphics": "Hide Background Graphics",
|
|
125110
125247
|
"pptx.presentationSettings.showType": "Show type",
|
|
125111
125248
|
"pptx.presentationSettings.showTypePresented": "Presented",
|
|
125112
125249
|
"pptx.presentationSettings.showTypeBrowsed": "Browsed",
|
|
@@ -128385,78 +128522,6 @@ function rulerDragToGuidePosition(pointerOffsetPx, scale, slideLengthPx) {
|
|
|
128385
128522
|
}
|
|
128386
128523
|
return position2;
|
|
128387
128524
|
}
|
|
128388
|
-
function resolvePictureBullet(info, baseFontSize) {
|
|
128389
|
-
if (!info.imageDataUrl && !info.imageRelId && !info.imageBlipFillXml) {
|
|
128390
|
-
return void 0;
|
|
128391
|
-
}
|
|
128392
|
-
const sizePx = typeof info.sizePts === "number" ? info.sizePts : typeof info.sizePercent === "number" ? baseFontSize * (info.sizePercent / 100) : baseFontSize;
|
|
128393
|
-
return {
|
|
128394
|
-
...info.imageDataUrl ? { src: info.imageDataUrl } : {},
|
|
128395
|
-
sizePx,
|
|
128396
|
-
fallbackMarker: "\u2022",
|
|
128397
|
-
accessibleLabel: "Bullet",
|
|
128398
|
-
...info.imageRelId ? { imageRelId: info.imageRelId } : {}
|
|
128399
|
-
};
|
|
128400
|
-
}
|
|
128401
|
-
function resolveParagraphBullet(firstSegment, baseFontSize = firstSegment?.style?.fontSize ?? 16) {
|
|
128402
|
-
if (!firstSegment) {
|
|
128403
|
-
return void 0;
|
|
128404
|
-
}
|
|
128405
|
-
if (firstSegment.style?.listType === "none") {
|
|
128406
|
-
return void 0;
|
|
128407
|
-
}
|
|
128408
|
-
const info = firstSegment.bulletInfo;
|
|
128409
|
-
if (!info || info.none) {
|
|
128410
|
-
return void 0;
|
|
128411
|
-
}
|
|
128412
|
-
const color2 = info.color;
|
|
128413
|
-
const fontFamily = info.fontFamily;
|
|
128414
|
-
const sizePts = typeof info.sizePts === "number" ? info.sizePts : void 0;
|
|
128415
|
-
const sizePercent = typeof info.sizePercent === "number" ? info.sizePercent : void 0;
|
|
128416
|
-
const picture = resolvePictureBullet(info, baseFontSize);
|
|
128417
|
-
if (picture) {
|
|
128418
|
-
return {
|
|
128419
|
-
marker: picture.fallbackMarker,
|
|
128420
|
-
isNumbered: false,
|
|
128421
|
-
color: color2,
|
|
128422
|
-
fontFamily,
|
|
128423
|
-
sizePts,
|
|
128424
|
-
sizePercent,
|
|
128425
|
-
picture
|
|
128426
|
-
};
|
|
128427
|
-
}
|
|
128428
|
-
if (info.autoNumType) {
|
|
128429
|
-
const startAt = typeof info.autoNumStartAt === "number" ? info.autoNumStartAt : 1;
|
|
128430
|
-
const paraIdx = typeof info.paragraphIndex === "number" ? info.paragraphIndex : 0;
|
|
128431
|
-
const seqNum = Math.max(1, startAt + paraIdx);
|
|
128432
|
-
return {
|
|
128433
|
-
marker: formatAutoNumberMarker(info.autoNumType, seqNum),
|
|
128434
|
-
isNumbered: true,
|
|
128435
|
-
color: color2,
|
|
128436
|
-
fontFamily,
|
|
128437
|
-
sizePts,
|
|
128438
|
-
sizePercent
|
|
128439
|
-
};
|
|
128440
|
-
}
|
|
128441
|
-
if (info.char) {
|
|
128442
|
-
return { marker: info.char, isNumbered: false, color: color2, fontFamily, sizePts, sizePercent };
|
|
128443
|
-
}
|
|
128444
|
-
return void 0;
|
|
128445
|
-
}
|
|
128446
|
-
var INDENT_PX_PER_LEVEL = 18;
|
|
128447
|
-
function bulletIndentPx(level) {
|
|
128448
|
-
const lvl = typeof level === "number" && level > 0 ? level : 0;
|
|
128449
|
-
return lvl * INDENT_PX_PER_LEVEL;
|
|
128450
|
-
}
|
|
128451
|
-
function resolveParagraphIndent(paraIndent, paragraphLevel) {
|
|
128452
|
-
const marginLeft = typeof paraIndent?.marginLeft === "number" && paraIndent.marginLeft !== 0 ? paraIndent.marginLeft : void 0;
|
|
128453
|
-
const textIndent = typeof paraIndent?.indent === "number" && paraIndent.indent !== 0 ? paraIndent.indent : void 0;
|
|
128454
|
-
if (marginLeft === void 0 && textIndent === void 0) {
|
|
128455
|
-
const levelPx = bulletIndentPx(paragraphLevel);
|
|
128456
|
-
return levelPx > 0 ? { marginLeftPx: levelPx } : {};
|
|
128457
|
-
}
|
|
128458
|
-
return { marginLeftPx: marginLeft, textIndentPx: textIndent };
|
|
128459
|
-
}
|
|
128460
128525
|
var DEBOUNCE_MS = 600;
|
|
128461
128526
|
var EXPANDED_MAX_HEIGHT = 200;
|
|
128462
128527
|
var PX_TO_PT = 0.75;
|
|
@@ -133820,6 +133885,26 @@ function hasCopyableFormat(element) {
|
|
|
133820
133885
|
}
|
|
133821
133886
|
return hasShapeProperties(element) || hasTextProperties(element);
|
|
133822
133887
|
}
|
|
133888
|
+
function withoutRenderedBulletPrefix(text22, originalSegments, dedicatedMarker) {
|
|
133889
|
+
if (!dedicatedMarker) {
|
|
133890
|
+
return text22;
|
|
133891
|
+
}
|
|
133892
|
+
const resolved = resolveParagraphBullet(dedicatedMarker);
|
|
133893
|
+
if (!resolved || !text22.startsWith(resolved.marker)) {
|
|
133894
|
+
return text22;
|
|
133895
|
+
}
|
|
133896
|
+
const withoutMarker = text22.slice(resolved.marker.length);
|
|
133897
|
+
const originalContent = originalSegments.slice(1).map((segment) => segment.text).join("");
|
|
133898
|
+
if (originalContent.trim().length === 0) {
|
|
133899
|
+
return text22;
|
|
133900
|
+
}
|
|
133901
|
+
const originalLeadingSpaces = originalContent.length - originalContent.trimStart().length;
|
|
133902
|
+
const editedLeadingSpaces = withoutMarker.length - withoutMarker.trimStart().length;
|
|
133903
|
+
if (editedLeadingSpaces > originalLeadingSpaces) {
|
|
133904
|
+
return withoutMarker.slice(1);
|
|
133905
|
+
}
|
|
133906
|
+
return withoutMarker;
|
|
133907
|
+
}
|
|
133823
133908
|
function isAtomicOriginalSegment(seg) {
|
|
133824
133909
|
return seg.fieldType !== void 0 || seg.equationXml !== void 0;
|
|
133825
133910
|
}
|
|
@@ -133844,26 +133929,61 @@ function copySegmentMetadata(from, to) {
|
|
|
133844
133929
|
}
|
|
133845
133930
|
return to;
|
|
133846
133931
|
}
|
|
133932
|
+
function restoreParagraphMetadata(from, segments) {
|
|
133933
|
+
if (segments.length === 0) {
|
|
133934
|
+
return segments;
|
|
133935
|
+
}
|
|
133936
|
+
const [first, ...rest] = segments;
|
|
133937
|
+
const restored = { ...first };
|
|
133938
|
+
delete restored.paragraphLevel;
|
|
133939
|
+
delete restored.paragraphProperties;
|
|
133940
|
+
delete restored.endParaRunProperties;
|
|
133941
|
+
if (from?.paragraphLevel !== void 0) {
|
|
133942
|
+
restored.paragraphLevel = from.paragraphLevel;
|
|
133943
|
+
}
|
|
133944
|
+
if (from?.paragraphProperties !== void 0) {
|
|
133945
|
+
restored.paragraphProperties = from.paragraphProperties;
|
|
133946
|
+
}
|
|
133947
|
+
if (from?.endParaRunProperties !== void 0) {
|
|
133948
|
+
restored.endParaRunProperties = from.endParaRunProperties;
|
|
133949
|
+
}
|
|
133950
|
+
return [restored, ...rest];
|
|
133951
|
+
}
|
|
133847
133952
|
function remapTextToSegments(newText, originalSegments, elementTextStyle) {
|
|
133848
133953
|
const fallbackStyle = { ...elementTextStyle };
|
|
133849
133954
|
if (!originalSegments || originalSegments.length === 0) {
|
|
133850
133955
|
return [{ text: newText, style: fallbackStyle }];
|
|
133851
133956
|
}
|
|
133852
|
-
const originalParagraphs = [
|
|
133957
|
+
const originalParagraphs = [
|
|
133958
|
+
{ segments: [] }
|
|
133959
|
+
];
|
|
133853
133960
|
for (const seg of originalSegments) {
|
|
133854
133961
|
if (seg.text === "\n" || seg.isParagraphBreak) {
|
|
133855
|
-
originalParagraphs.
|
|
133962
|
+
originalParagraphs[originalParagraphs.length - 1].terminator = seg;
|
|
133963
|
+
originalParagraphs.push({ segments: [] });
|
|
133856
133964
|
} else {
|
|
133857
|
-
originalParagraphs[originalParagraphs.length - 1].push(seg);
|
|
133965
|
+
originalParagraphs[originalParagraphs.length - 1].segments.push(seg);
|
|
133858
133966
|
}
|
|
133859
133967
|
}
|
|
133860
133968
|
const newParagraphTexts = newText.split("\n");
|
|
133861
|
-
const firstContentSeg = originalParagraphs.
|
|
133969
|
+
const firstContentSeg = originalParagraphs.flatMap((paragraph) => paragraph.segments).find((s) => s.text.trim().length > 0);
|
|
133862
133970
|
const baseFallbackStyle = firstContentSeg?.style ? { ...firstContentSeg.style } : fallbackStyle;
|
|
133863
133971
|
function remapParagraph(paraNewText, paraOrigSegments) {
|
|
133864
133972
|
if (paraOrigSegments.length === 0) {
|
|
133865
133973
|
return paraNewText.length > 0 ? [{ text: paraNewText, style: { ...baseFallbackStyle } }] : [{ text: "", style: { ...baseFallbackStyle } }];
|
|
133866
133974
|
}
|
|
133975
|
+
const firstSegment = paraOrigSegments[0];
|
|
133976
|
+
const dedicatedMarker = isBulletMarkerSegment(firstSegment) && (!firstSegment.bulletInfo?.autoNumType || firstSegment.bulletInfo.paragraphIndex !== void 0) ? firstSegment : void 0;
|
|
133977
|
+
if (dedicatedMarker) {
|
|
133978
|
+
const contentSegments = paraOrigSegments.slice(1);
|
|
133979
|
+
const contentText = withoutRenderedBulletPrefix(
|
|
133980
|
+
paraNewText,
|
|
133981
|
+
paraOrigSegments,
|
|
133982
|
+
dedicatedMarker
|
|
133983
|
+
);
|
|
133984
|
+
const content = contentSegments.length > 0 ? remapParagraph(contentText, contentSegments) : [{ text: contentText, style: { ...dedicatedMarker.style } }];
|
|
133985
|
+
return [dedicatedMarker, ...content];
|
|
133986
|
+
}
|
|
133867
133987
|
const paragraphBulletInfo = paraOrigSegments[0].bulletInfo;
|
|
133868
133988
|
if (paraNewText.length === 0) {
|
|
133869
133989
|
const emptyStyle = { ...paraOrigSegments[0].style };
|
|
@@ -133933,15 +134053,19 @@ function remapTextToSegments(newText, originalSegments, elementTextStyle) {
|
|
|
133933
134053
|
return remapped;
|
|
133934
134054
|
}
|
|
133935
134055
|
const output = [];
|
|
133936
|
-
const lastOrigPara = originalParagraphs[originalParagraphs.length - 1];
|
|
134056
|
+
const lastOrigPara = originalParagraphs[originalParagraphs.length - 1]?.segments;
|
|
133937
134057
|
for (let pi = 0; pi < newParagraphTexts.length; pi++) {
|
|
133938
134058
|
if (pi > 0) {
|
|
133939
|
-
const precedingOrigPara = originalParagraphs[pi - 1] ?? [];
|
|
134059
|
+
const precedingOrigPara = originalParagraphs[pi - 1]?.segments ?? [];
|
|
133940
134060
|
const breakStyle = precedingOrigPara[0]?.style ? { ...precedingOrigPara[0].style } : { ...baseFallbackStyle };
|
|
133941
134061
|
output.push({ text: "\n", style: breakStyle, isParagraphBreak: true });
|
|
133942
134062
|
}
|
|
133943
|
-
const
|
|
133944
|
-
const
|
|
134063
|
+
const originalParagraph = originalParagraphs[pi];
|
|
134064
|
+
const origPara = originalParagraph?.segments ?? lastOrigPara ?? [];
|
|
134065
|
+
const paraSegments = restoreParagraphMetadata(
|
|
134066
|
+
originalParagraph?.segments[0] ?? originalParagraph?.terminator,
|
|
134067
|
+
remapParagraph(newParagraphTexts[pi], origPara)
|
|
134068
|
+
);
|
|
133945
134069
|
output.push(...paraSegments);
|
|
133946
134070
|
}
|
|
133947
134071
|
return output.length > 0 ? output : [{ text: "", style: { ...baseFallbackStyle } }];
|
|
@@ -149083,6 +149207,9 @@ function resolveTemplateBackgroundRows(activeSlide, slideMasters, fallbackLayout
|
|
|
149083
149207
|
}
|
|
149084
149208
|
return result;
|
|
149085
149209
|
}
|
|
149210
|
+
function visibleTemplateElements(slide, templateElements) {
|
|
149211
|
+
return slide?.showMasterShapes === false ? [] : templateElements;
|
|
149212
|
+
}
|
|
149086
149213
|
function partitionTemplateElements(slides) {
|
|
149087
149214
|
const templateElementsBySlideId = {};
|
|
149088
149215
|
const nextSlides = slides.map((slide) => {
|
|
@@ -149104,7 +149231,7 @@ function buildSaveSlides(slides, templateElementsBySlideId) {
|
|
|
149104
149231
|
var DEFAULT_PREVIEW_ELEMENT_CAP = 500;
|
|
149105
149232
|
function buildPreviewElements(slide, templateElements = [], options) {
|
|
149106
149233
|
const cap = options?.cap ?? DEFAULT_PREVIEW_ELEMENT_CAP;
|
|
149107
|
-
const merged = [...templateElements, ...slide.elements];
|
|
149234
|
+
const merged = [...visibleTemplateElements(slide, templateElements), ...slide.elements];
|
|
149108
149235
|
if (cap > 0 && merged.length > cap) {
|
|
149109
149236
|
return merged.slice(0, cap);
|
|
149110
149237
|
}
|
|
@@ -152276,6 +152403,34 @@ function updateElement(slides, slideIndex, elementId, updates) {
|
|
|
152276
152403
|
)
|
|
152277
152404
|
);
|
|
152278
152405
|
}
|
|
152406
|
+
function readEditableText(root) {
|
|
152407
|
+
let out = "";
|
|
152408
|
+
const walk2 = (node) => {
|
|
152409
|
+
for (const child27 of Array.from(node.childNodes)) {
|
|
152410
|
+
if (child27.nodeType === 3) {
|
|
152411
|
+
out += child27.nodeValue ?? "";
|
|
152412
|
+
continue;
|
|
152413
|
+
}
|
|
152414
|
+
if (!(child27 instanceof HTMLElement)) {
|
|
152415
|
+
continue;
|
|
152416
|
+
}
|
|
152417
|
+
if (child27.hasAttribute("data-pptx-bullet-marker")) {
|
|
152418
|
+
continue;
|
|
152419
|
+
}
|
|
152420
|
+
if (child27.tagName === "BR") {
|
|
152421
|
+
out += "\n";
|
|
152422
|
+
continue;
|
|
152423
|
+
}
|
|
152424
|
+
const isBlock = child27.tagName === "DIV" || child27.tagName === "P";
|
|
152425
|
+
if (isBlock && out.length > 0 && !out.endsWith("\n")) {
|
|
152426
|
+
out += "\n";
|
|
152427
|
+
}
|
|
152428
|
+
walk2(child27);
|
|
152429
|
+
}
|
|
152430
|
+
};
|
|
152431
|
+
walk2(root);
|
|
152432
|
+
return out;
|
|
152433
|
+
}
|
|
152279
152434
|
var STROKE_DASH_OPTIONS = [
|
|
152280
152435
|
{ value: "solid", label: "Solid", i18nKey: "pptx.stroke.dashSolid" },
|
|
152281
152436
|
{ value: "dot", label: "Dot", i18nKey: "pptx.stroke.dashDot" },
|
|
@@ -155162,8 +155317,10 @@ exports.publishLiveInlineText = publishLiveInlineText;
|
|
|
155162
155317
|
exports.pushRecentColor = pushRecentColor;
|
|
155163
155318
|
exports.quickStyleSwatchCss = quickStyleSwatchCss;
|
|
155164
155319
|
exports.radarStylePatch = radarStylePatch;
|
|
155320
|
+
exports.reResolveElementColors = reResolveElementColors;
|
|
155165
155321
|
exports.reResolveSlideColors = reResolveSlideColors;
|
|
155166
155322
|
exports.readBackstageRecentFile = readBackstageRecentFile;
|
|
155323
|
+
exports.readEditableText = readEditableText;
|
|
155167
155324
|
exports.readOnlyRecommendation = readOnlyRecommendation;
|
|
155168
155325
|
exports.readRibbonTransitionDraft = readRibbonTransitionDraft;
|
|
155169
155326
|
exports.readSlideShowOption = readSlideShowOption;
|
|
@@ -155312,6 +155469,7 @@ exports.shouldLoopContinuously = shouldLoopContinuously;
|
|
|
155312
155469
|
exports.shouldProbeAutosaveRecovery = shouldProbeAutosaveRecovery;
|
|
155313
155470
|
exports.shouldRoomSlidesReplaceLoad = shouldRoomSlidesReplaceLoad;
|
|
155314
155471
|
exports.shouldShowAutosaveRecoveryPrompt = shouldShowAutosaveRecoveryPrompt;
|
|
155472
|
+
exports.shouldShowElementHandles = shouldShowElementHandles;
|
|
155315
155473
|
exports.shouldUseSvgWarp = shouldUseSvgWarp;
|
|
155316
155474
|
exports.shouldWriteAutosaveSnapshot = shouldWriteAutosaveSnapshot;
|
|
155317
155475
|
exports.siblingCount = siblingCount;
|
|
@@ -155377,6 +155535,7 @@ exports.vermilionRadius = vermilionRadius;
|
|
|
155377
155535
|
exports.viewPropertiesPatchFromPreferences = viewPropertiesPatchFromPreferences;
|
|
155378
155536
|
exports.viewerOptionsToPreferences = viewerOptionsToPreferences;
|
|
155379
155537
|
exports.viewerPreferencesFromViewProperties = viewerPreferencesFromViewProperties;
|
|
155538
|
+
exports.visibleTemplateElements = visibleTemplateElements;
|
|
155380
155539
|
exports.warpPreviewPath = warpPreviewPath;
|
|
155381
155540
|
exports.withChartTitle = withChartTitle;
|
|
155382
155541
|
exports.withConnectorEndpointUpdate = withConnectorEndpointUpdate;
|
|
Binary file
|
|
Binary file
|