pptx-react-viewer 4.46.0 → 4.47.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 +44 -0
- package/README.md +3 -0
- package/dist/{AiChatPanel-Z5VHI4WA.mjs → AiChatPanel-6S4LWXGM.mjs} +2 -2
- package/dist/AiChatPanel-6S4LWXGM.mjs.br +0 -0
- package/dist/AiChatPanel-6S4LWXGM.mjs.gz +0 -0
- package/dist/{AiChatPanel-TGZQBH3L.js → AiChatPanel-IEM43TTZ.js} +10 -10
- package/dist/AiChatPanel-IEM43TTZ.js.br +0 -0
- package/dist/AiChatPanel-IEM43TTZ.js.gz +0 -0
- package/dist/{Model3DScene-5HLXSIIK.js → Model3DScene-CCIG67DJ.js} +1 -1
- package/dist/Model3DScene-CCIG67DJ.js.br +0 -0
- package/dist/Model3DScene-CCIG67DJ.js.gz +0 -0
- package/dist/{Model3DScene-MSC4LEKG.mjs → Model3DScene-NUJH2UKM.mjs} +1 -1
- package/dist/Model3DScene-NUJH2UKM.mjs.br +0 -0
- package/dist/Model3DScene-NUJH2UKM.mjs.gz +0 -0
- package/dist/{chunk-CLHUOZSY.mjs → chunk-2I7ZAM4F.mjs} +244 -160
- package/dist/chunk-2I7ZAM4F.mjs.br +0 -0
- package/dist/chunk-2I7ZAM4F.mjs.gz +0 -0
- package/dist/{chunk-UQFIRJGG.mjs → chunk-BL7UYXYD.mjs} +233 -128
- package/dist/chunk-BL7UYXYD.mjs.br +0 -0
- package/dist/chunk-BL7UYXYD.mjs.gz +0 -0
- package/dist/{chunk-FBN7UFW2.mjs → chunk-BVQSH5SS.mjs} +36 -43
- package/dist/chunk-BVQSH5SS.mjs.br +0 -0
- package/dist/chunk-BVQSH5SS.mjs.gz +0 -0
- package/dist/{chunk-VJZJESNT.js → chunk-MA2BI7LX.js} +45 -61
- package/dist/chunk-MA2BI7LX.js.br +0 -0
- package/dist/chunk-MA2BI7LX.js.gz +0 -0
- package/dist/{chunk-W2IMY5SY.js → chunk-PIRHQTI4.js} +0 -2
- package/dist/chunk-PIRHQTI4.js.br +0 -0
- package/dist/chunk-PIRHQTI4.js.gz +0 -0
- package/dist/{chunk-2J3467IB.js → chunk-TANR7L7E.js} +546 -462
- package/dist/chunk-TANR7L7E.js.br +0 -0
- package/dist/chunk-TANR7L7E.js.gz +0 -0
- package/dist/{chunk-Q3DHYOLK.mjs → chunk-UV2HVMKZ.mjs} +1 -2
- package/dist/chunk-UV2HVMKZ.mjs.br +0 -0
- package/dist/chunk-UV2HVMKZ.mjs.gz +0 -0
- package/dist/{chunk-AMXSOQRH.js → chunk-VUVBSQLT.js} +408 -301
- package/dist/chunk-VUVBSQLT.js.br +0 -0
- package/dist/chunk-VUVBSQLT.js.gz +0 -0
- package/dist/i18n.js +1 -1
- package/dist/i18n.js.br +2 -2
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +1 -1
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +42 -5
- package/dist/index.js +25 -25
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +66 -7
- package/dist/internals.js +82 -82
- 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/pptx-viewer-canvas.css +2 -0
- package/dist/pptx-viewer-canvas.css.br +0 -0
- package/dist/pptx-viewer-canvas.css.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/{three.module-JPZUM7AI.mjs → three.module-EBJVANGB.mjs} +1 -1
- package/dist/three.module-EBJVANGB.mjs.br +0 -0
- package/dist/three.module-EBJVANGB.mjs.gz +0 -0
- package/dist/{three.module-RIUI7P3J.js → three.module-MBFHAT6M.js} +1 -1
- package/dist/three.module-MBFHAT6M.js.br +0 -0
- package/dist/three.module-MBFHAT6M.js.gz +0 -0
- package/dist/viewer/index.d.ts +44 -9
- package/dist/viewer/index.js +20 -20
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/dist/{y-webrtc-CCA4HVZZ.mjs → y-webrtc-2H7UYAQD.mjs} +1 -1
- package/dist/y-webrtc-2H7UYAQD.mjs.br +0 -0
- package/dist/y-webrtc-2H7UYAQD.mjs.gz +0 -0
- package/dist/{y-webrtc-MB5ZXFBA.js → y-webrtc-DVPQNFLL.js} +5 -5
- package/dist/y-webrtc-DVPQNFLL.js.br +0 -0
- package/dist/y-webrtc-DVPQNFLL.js.gz +0 -0
- package/dist/{y-websocket-JQQZVAMX.js → y-websocket-TN4OKPXQ.js} +1 -1
- package/dist/y-websocket-TN4OKPXQ.js.br +0 -0
- package/dist/y-websocket-TN4OKPXQ.js.gz +0 -0
- package/dist/{y-websocket-SCLLNICY.mjs → y-websocket-WORVRRQS.mjs} +1 -1
- package/dist/y-websocket-WORVRRQS.mjs.br +0 -0
- package/dist/y-websocket-WORVRRQS.mjs.gz +0 -0
- package/package.json +7 -5
- package/dist/AiChatPanel-TGZQBH3L.js.br +0 -0
- package/dist/AiChatPanel-TGZQBH3L.js.gz +0 -0
- package/dist/AiChatPanel-Z5VHI4WA.mjs.br +0 -0
- package/dist/AiChatPanel-Z5VHI4WA.mjs.gz +0 -0
- package/dist/Model3DScene-5HLXSIIK.js.br +0 -0
- package/dist/Model3DScene-5HLXSIIK.js.gz +0 -0
- package/dist/Model3DScene-MSC4LEKG.mjs.br +0 -0
- package/dist/Model3DScene-MSC4LEKG.mjs.gz +0 -0
- package/dist/chunk-2J3467IB.js.br +0 -0
- package/dist/chunk-2J3467IB.js.gz +0 -0
- package/dist/chunk-AMXSOQRH.js.br +0 -0
- package/dist/chunk-AMXSOQRH.js.gz +0 -0
- package/dist/chunk-CLHUOZSY.mjs.br +0 -0
- package/dist/chunk-CLHUOZSY.mjs.gz +0 -0
- package/dist/chunk-FBN7UFW2.mjs.br +0 -0
- package/dist/chunk-FBN7UFW2.mjs.gz +0 -0
- package/dist/chunk-Q3DHYOLK.mjs.br +0 -0
- package/dist/chunk-Q3DHYOLK.mjs.gz +0 -0
- package/dist/chunk-UQFIRJGG.mjs.br +0 -0
- package/dist/chunk-UQFIRJGG.mjs.gz +0 -0
- package/dist/chunk-VJZJESNT.js.br +0 -0
- package/dist/chunk-VJZJESNT.js.gz +0 -0
- package/dist/chunk-W2IMY5SY.js.br +0 -0
- package/dist/chunk-W2IMY5SY.js.gz +0 -0
- package/dist/three.module-JPZUM7AI.mjs.br +0 -0
- package/dist/three.module-JPZUM7AI.mjs.gz +0 -0
- package/dist/three.module-RIUI7P3J.js.br +0 -0
- package/dist/three.module-RIUI7P3J.js.gz +0 -0
- package/dist/y-webrtc-CCA4HVZZ.mjs.br +0 -0
- package/dist/y-webrtc-CCA4HVZZ.mjs.gz +0 -0
- package/dist/y-webrtc-MB5ZXFBA.js.br +0 -0
- package/dist/y-webrtc-MB5ZXFBA.js.gz +0 -0
- package/dist/y-websocket-JQQZVAMX.js.br +0 -0
- package/dist/y-websocket-JQQZVAMX.js.gz +0 -0
- package/dist/y-websocket-SCLLNICY.mjs.br +0 -0
- package/dist/y-websocket-SCLLNICY.mjs.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SHAPE_PRESET_DEFS, VIEWER_SHORTCUT_REFERENCE, STROKE_DASH_OPTIONS as STROKE_DASH_OPTIONS$1, getAnimationInitialStyle as getAnimationInitialStyle$1, cloneHistorySnapshot as cloneHistorySnapshot$1, getImageFitStyle, getImageFillCounterTransform, getComputedFillStyle, getCropShapeClipPath as getCropShapeClipPath$1, getImageTilingStyle as getImageTilingStyle$1, mediaPlaybackAttributes, getOnlineVideoEmbed, ONLINE_VIDEO_IFRAME_SANDBOX, ONLINE_VIDEO_IFRAME_ALLOW, buildTextBlockStyle, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, buildTextBodyLayoutStyle, buildTextBody3DSceneStyle as buildTextBody3DSceneStyle$1, buildParagraphs, followingText, colorWithOpacity, normalizeHexColor, hexToRgbUnit, build3DExtrusionData as build3DExtrusionData$1, getFrameEffectStyle, getComputedEffectStyle, getComputedStrokeStyle, getAnimationColorBaseStyle, isStrokeOnlyPresetElement, resolveShapeGeometry, screenStrokeWidth, markerPath, normalizeStrokeDashType, getSvgStrokeDasharray, buildSvgGradientDef, isArrowedCustomPath, buildStrokeOutline, getPresetShapeVectorGeometry, isWedgeCalloutPresetShape, svgGradientFillRef, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, canDrillDown, computeSelectionRect, DEFAULT_FONT_FAMILY as DEFAULT_FONT_FAMILY$1, cellStyleToCss, TABLE_CELL_TEXT_DEFAULTS, applyTableCellFontWeight, rectToCells, isCellInRect, tableContainerCss, buildChartViewModel, resolveChartKind, chartPreserveAspectRatio, buildNotesPdfBytes, buildTiledSlidesPdfBytes, buildPreviewAnimation, measurePreviewGeometry, buildMotionPathPreview, mediaFallbackVisual, scheduleMediaTrimAndFade, registerCrossSlideAudio, shouldShowMediaFullscreenStopButton, withInlineListDecorationDefaults, segmentStyleToCss, resolveAutoFitFontScale, applyUnderlineVariant, nestedTextDecorationStyle, scaleFontSizeForAutoFit, resolveFontKerning, resolveScriptFontSet, hasDistinctScriptFonts, authoredLetterSpacingPx, eastAsianBreaksForRun, pieceLetterSpacing, resolveMetricTrackingPx, hollowTextFillStyle, splitsUnderlineIntoWords, stripUnderlineDecoration, buildTabContext, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, apply3dEffects as apply3dEffects$1, buildSubpathPaints, computeColumnBoundaries, computeTableMergeCrossings, columnHandleSegments, rowHandleSegments, getTableCellBandStyle as getTableCellBandStyle$1, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders as getCellDiagonalBorders$1, cellParagraphBlocks, resolveChartPalette, computeChartLegendLayout, resolveChartSvgDef, mediaFallbackIcon, mediaFallbackLabelKey, MEDIA_CHROME_ATTRIBUTE, convertOmmlToMathMl, sanitizeMathMl, tableCellCss, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, buildRectPathGradient, screenBorder, cellRunStyle, buildRunTabLines, chartPartToAttrs, splitWordsForUnderline, splitRunForMetrics, splitEastAsianBreaks, splitRunByScriptFont } from 'ooxml-ui/pptx';
|
|
1
|
+
import { VIEWER_SHORTCUT_REFERENCE, STROKE_DASH_OPTIONS as STROKE_DASH_OPTIONS$1, getAnimationInitialStyle as getAnimationInitialStyle$1, cloneHistorySnapshot as cloneHistorySnapshot$1, SHAPE_PRESET_DEFS, getImageFitStyle, getImageFillCounterTransform, getComputedFillStyle, getCropShapeClipPath as getCropShapeClipPath$1, getImageTilingStyle as getImageTilingStyle$1, mediaPlaybackAttributes, getOnlineVideoEmbed, ONLINE_VIDEO_IFRAME_SANDBOX, ONLINE_VIDEO_IFRAME_ALLOW, buildTextBlockStyle, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, buildTextBodyLayoutStyle, buildTextBody3DSceneStyle as buildTextBody3DSceneStyle$1, buildParagraphs, followingText, colorWithOpacity, normalizeHexColor, hexToRgbUnit, build3DExtrusionData as build3DExtrusionData$1, getFrameEffectStyle, getComputedEffectStyle, getComputedStrokeStyle, getAnimationColorBaseStyle, isStrokeOnlyPresetElement, resolveShapeGeometry, screenStrokeWidth, markerPath, normalizeStrokeDashType, getSvgStrokeDasharray, buildSvgGradientDef, isArrowedCustomPath, buildStrokeOutline, getPresetShapeVectorGeometry, isWedgeCalloutPresetShape, svgGradientFillRef, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, canDrillDown, computeSelectionRect, DEFAULT_FONT_FAMILY as DEFAULT_FONT_FAMILY$1, cellStyleToCss, TABLE_CELL_TEXT_DEFAULTS, applyTableCellFontWeight, rectToCells, isCellInRect, tableContainerCss, buildChartViewModel, resolveChartKind, chartPreserveAspectRatio, buildNotesPdfBytes, buildTiledSlidesPdfBytes, buildPreviewAnimation, measurePreviewGeometry, buildMotionPathPreview, mediaFallbackVisual, scheduleMediaTrimAndFade, registerCrossSlideAudio, shouldShowMediaFullscreenStopButton, withInlineListDecorationDefaults, segmentStyleToCss, resolveAutoFitFontScale, applyUnderlineVariant, nestedTextDecorationStyle, scaleFontSizeForAutoFit, resolveFontKerning, resolveScriptFontSet, hasDistinctScriptFonts, authoredLetterSpacingPx, eastAsianBreaksForRun, pieceLetterSpacing, resolveMetricTrackingPx, hollowTextFillStyle, splitsUnderlineIntoWords, stripUnderlineDecoration, buildTabContext, TEXT_BUILD_ID_SEP, buildTextBuildSpec, textBuildSpanStyle, apply3dEffects as apply3dEffects$1, buildSubpathPaints, computeColumnBoundaries, computeTableMergeCrossings, columnHandleSegments, rowHandleSegments, getTableCellBandStyle as getTableCellBandStyle$1, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders as getCellDiagonalBorders$1, cellParagraphBlocks, resolveChartPalette, computeChartLegendLayout, resolveChartSvgDef, mediaFallbackIcon, mediaFallbackLabelKey, MEDIA_CHROME_ATTRIBUTE, convertOmmlToMathMl, sanitizeMathMl, tableCellCss, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, buildRectPathGradient, screenBorder, cellRunStyle, buildRunTabLines, chartPartToAttrs, splitWordsForUnderline, splitRunForMetrics, splitEastAsianBreaks, splitRunByScriptFont } from 'ooxml-ui/pptx';
|
|
3
2
|
export { ACTION_BUTTON_PRESETS, DEFAULT_COLOR_CHANGE_TOLERANCE, INK_REPLAY_KEYFRAMES, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, SHAPE_QUICK_STYLES, SLIDE_TRANSITION_OPTIONS, TABLE_STYLE_PRESETS, applyColorChange, applyFormatToElement, applyReroutedConnectors, buildCacheKey, buildContentPartStrokes, buildCssGradientFromShapeStyle, buildInkGroupStrokes, buildSaveSlides, canvasToJpegData, clampCropValue, cloneSlide, cloneTemplateElementsBySlideId, colorWithOpacity, comparePresentation, computeHandoutLayout, computeSnapToShape, copyFormatFromElement, formatCommentTimestamp, generateNoteLineCount, getAriaLabel, getAriaRole, getAriaRoleDescription, getCachedResult, getCompoundLineOffsets, getCompoundLineWidths, getContentPartReplayStyles, getElementLabel, getElementTransform, getElementTransformWithoutRotation, getImageEffectsFilter, getImageEffectsOpacity, getInkReplayStyles, getPatternSvg, getPrintableArea, getShapeAdjustmentHandleDescriptors, getSvgStrokeDasharray, getTextCompensationTransform, hasCopyableFormat, isEditableTextElement, isImageTiled, isPpactionUrl, isTemplateElementId, isUrlSafe, makeCloneId, mergeCells, normalizeHexColor, normalizeStrokeDashType, openNativeEyeDropper, parsePpactionUrl, partitionTemplateElements, rerouteConnectorsForMovedElements, safeOpenUrl, sanitizeGradientStops, setCachedResult, splitCell, stopAllPersistentAudio, substituteFieldText } from 'ooxml-ui/pptx';
|
|
4
|
-
import * as pptx_star from 'ooxml-core/pptx';
|
|
5
3
|
import { clsx } from 'clsx';
|
|
6
4
|
import { twMerge } from 'tailwind-merge';
|
|
7
5
|
import React8, { useRef, useState, useEffect, useCallback, useMemo, useLayoutEffect } from 'react';
|
|
8
6
|
import { LuTriangle, LuPlus, LuMoveRight, LuMinus, LuDiamond, LuDatabase, LuCircle, LuSquare } from 'react-icons/lu';
|
|
7
|
+
import { hasShapeProperties, isImageLikeElement, hasTextProperties, getConnectorPathGeometry as getConnectorPathGeometry$1, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, getSubstituteFontFamily, parsePanoseString, customGeometryPathsToSvgSubpaths, xmlText, ooxmlGradientAngleToCssDegrees } from 'ooxml-core/pptx';
|
|
8
|
+
export { updateCellTextInRawXml, updateCellTextStyleInRawXml, updateMergeAttrsInRawXml } from 'ooxml-core/pptx';
|
|
9
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
10
|
import { translationsEn } from 'ooxml-ui/pptx/i18n';
|
|
11
11
|
import { useTranslation } from 'react-i18next';
|
|
12
12
|
|
|
13
|
+
// src/viewer/utils/animation-effects.ts
|
|
13
14
|
function getAnimationInitialStyle(preset, nativeAnimation) {
|
|
14
15
|
return getAnimationInitialStyle$1(preset, nativeAnimation);
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
-
// ../core/dist/index.mjs
|
|
18
|
-
var dist_exports = {};
|
|
19
|
-
__reExport(dist_exports, pptx_star);
|
|
20
17
|
function cn(...inputs) {
|
|
21
18
|
return twMerge(clsx(inputs));
|
|
22
19
|
}
|
|
@@ -81,16 +78,14 @@ var GLYPH_COMPONENTS = {
|
|
|
81
78
|
plus: LuPlus,
|
|
82
79
|
triangle: LuTriangle
|
|
83
80
|
};
|
|
84
|
-
var SHAPE_PRESETS = SHAPE_PRESET_DEFS.map(
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
className: def.glyphClass ? `w-3.5 h-3.5 ${def.glyphClass}` : "w-3.5 h-3.5"
|
|
91
|
-
})
|
|
81
|
+
var SHAPE_PRESETS = /* @__PURE__ */ SHAPE_PRESET_DEFS.map((def) => ({
|
|
82
|
+
type: def.type,
|
|
83
|
+
label: def.label,
|
|
84
|
+
i18nKey: def.i18nKey,
|
|
85
|
+
icon: React8.createElement(GLYPH_COMPONENTS[def.glyph], {
|
|
86
|
+
className: def.glyphClass ? `w-3.5 h-3.5 ${def.glyphClass}` : "w-3.5 h-3.5"
|
|
92
87
|
})
|
|
93
|
-
);
|
|
88
|
+
}));
|
|
94
89
|
var CONNECTOR_ARROW_OPTIONS = [
|
|
95
90
|
{ value: "none", label: "None", i18nKey: "pptx.arrowhead.none" },
|
|
96
91
|
{ value: "triangle", label: "Triangle", i18nKey: "pptx.arrowhead.triangle" },
|
|
@@ -211,14 +206,14 @@ function isConnectorOrLineElement(element) {
|
|
|
211
206
|
if (element.type === "connector") {
|
|
212
207
|
return true;
|
|
213
208
|
}
|
|
214
|
-
if (!
|
|
209
|
+
if (!hasShapeProperties(element)) {
|
|
215
210
|
return false;
|
|
216
211
|
}
|
|
217
212
|
const st = getShapeType(element.shapeType);
|
|
218
213
|
return st === "connector" || st === "line" || element.shapeType === "line";
|
|
219
214
|
}
|
|
220
215
|
function getImageMaskStyle(element) {
|
|
221
|
-
if (!
|
|
216
|
+
if (!hasShapeProperties(element)) {
|
|
222
217
|
return void 0;
|
|
223
218
|
}
|
|
224
219
|
const geometry = resolveShapeGeometry(element);
|
|
@@ -248,7 +243,7 @@ function getImageSurfaceMaskStyle(element) {
|
|
|
248
243
|
};
|
|
249
244
|
}
|
|
250
245
|
function getImageSurfaceStyle(element) {
|
|
251
|
-
const fill =
|
|
246
|
+
const fill = hasShapeProperties(element) ? getComputedFillStyle(element) : void 0;
|
|
252
247
|
return {
|
|
253
248
|
position: "absolute",
|
|
254
249
|
inset: 0,
|
|
@@ -261,7 +256,7 @@ function getImageSurfaceStyle(element) {
|
|
|
261
256
|
};
|
|
262
257
|
}
|
|
263
258
|
function getCropShapeClipPath(element) {
|
|
264
|
-
if (!
|
|
259
|
+
if (!isImageLikeElement(element)) {
|
|
265
260
|
return void 0;
|
|
266
261
|
}
|
|
267
262
|
return getCropShapeClipPath$1(element.cropShape, element.width, element.height);
|
|
@@ -784,7 +779,7 @@ function getTextStyleForElement(element, fallbackColor) {
|
|
|
784
779
|
return buildTextBlockStyle(element, { fallbackColor });
|
|
785
780
|
}
|
|
786
781
|
function getTextLayoutStyle(element) {
|
|
787
|
-
if (!
|
|
782
|
+
if (!hasTextProperties(element)) {
|
|
788
783
|
return {};
|
|
789
784
|
}
|
|
790
785
|
const writingMode = toCssWritingMode(element.textStyle?.textDirection);
|
|
@@ -792,7 +787,7 @@ function getTextLayoutStyle(element) {
|
|
|
792
787
|
const verticalDirection = toCssVerticalDirection(element.textStyle?.textDirection);
|
|
793
788
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
794
789
|
const shapeAutoFitTextBox = element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
795
|
-
const hasParagraphIndents =
|
|
790
|
+
const hasParagraphIndents = hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
796
791
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
797
792
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
798
793
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
@@ -1385,9 +1380,9 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1385
1380
|
segmentStyle.scriptFallbackFont && segmentStyle.fontFamilyIsCascadeDefault
|
|
1386
1381
|
);
|
|
1387
1382
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1388
|
-
const baseFontFamily = scriptFallbackWins ?
|
|
1383
|
+
const baseFontFamily = scriptFallbackWins ? getSubstituteFontFamily(segmentStyle.scriptFallbackFont) : rawFontFamily ? getSubstituteFontFamily(
|
|
1389
1384
|
rawFontFamily,
|
|
1390
|
-
|
|
1385
|
+
parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1391
1386
|
) : DEFAULT_FONT_FAMILY;
|
|
1392
1387
|
const scriptFonts = resolveScriptFontSet(segmentStyle, element.textStyle, baseFontFamily);
|
|
1393
1388
|
const needsScriptFonts = hasDistinctScriptFonts(scriptFonts);
|
|
@@ -1503,7 +1498,7 @@ function renderSeededListRun(seed, runs, segments, context) {
|
|
|
1503
1498
|
});
|
|
1504
1499
|
}
|
|
1505
1500
|
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick, placeholderPrompt, inlineListSeed) {
|
|
1506
|
-
if (!
|
|
1501
|
+
if (!hasTextProperties(element)) {
|
|
1507
1502
|
return emptyFallback || null;
|
|
1508
1503
|
}
|
|
1509
1504
|
const segments = segmentOverrides ?? element.textSegments;
|
|
@@ -1667,13 +1662,13 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1667
1662
|
);
|
|
1668
1663
|
}
|
|
1669
1664
|
function getDuotoneColors(element) {
|
|
1670
|
-
if (!
|
|
1665
|
+
if (!isImageLikeElement(element)) {
|
|
1671
1666
|
return void 0;
|
|
1672
1667
|
}
|
|
1673
1668
|
return element.imageEffects?.duotone;
|
|
1674
1669
|
}
|
|
1675
1670
|
function buildLineShadowCss(element) {
|
|
1676
|
-
if (!
|
|
1671
|
+
if (!hasShapeProperties(element)) {
|
|
1677
1672
|
return void 0;
|
|
1678
1673
|
}
|
|
1679
1674
|
const ss = element.shapeStyle;
|
|
@@ -1690,7 +1685,7 @@ function buildLineShadowCss(element) {
|
|
|
1690
1685
|
)}`;
|
|
1691
1686
|
}
|
|
1692
1687
|
function buildLineGlowFilter(element) {
|
|
1693
|
-
if (!
|
|
1688
|
+
if (!hasShapeProperties(element)) {
|
|
1694
1689
|
return void 0;
|
|
1695
1690
|
}
|
|
1696
1691
|
const ss = element.shapeStyle;
|
|
@@ -1706,7 +1701,7 @@ function getDagDuotoneFilterId(elementId) {
|
|
|
1706
1701
|
return `dag-duotone-${elementId}`;
|
|
1707
1702
|
}
|
|
1708
1703
|
function hasDagDuotoneEffect(element) {
|
|
1709
|
-
if (!
|
|
1704
|
+
if (!hasShapeProperties(element)) {
|
|
1710
1705
|
return false;
|
|
1711
1706
|
}
|
|
1712
1707
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
@@ -1787,7 +1782,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1787
1782
|
if (frame) {
|
|
1788
1783
|
return { ...frame };
|
|
1789
1784
|
}
|
|
1790
|
-
if (!
|
|
1785
|
+
if (!hasShapeProperties(element)) {
|
|
1791
1786
|
return {};
|
|
1792
1787
|
}
|
|
1793
1788
|
const ss = element.shapeStyle;
|
|
@@ -1894,7 +1889,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1894
1889
|
}
|
|
1895
1890
|
}
|
|
1896
1891
|
function getConnectorPathGeometry(element) {
|
|
1897
|
-
return
|
|
1892
|
+
return getConnectorPathGeometry$1(element);
|
|
1898
1893
|
}
|
|
1899
1894
|
function renderConnectorMarker(markerId, arrowType, color, arrowWidth, arrowLength) {
|
|
1900
1895
|
if (!arrowType || arrowType === "none") {
|
|
@@ -1994,7 +1989,7 @@ function strokeStrands(d, keyBase, ctx) {
|
|
|
1994
1989
|
}
|
|
1995
1990
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
1996
1991
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
1997
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
1992
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
1998
1993
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
1999
1994
|
const gradientPaint = gradient ? svgGradientFillRef(gradient) : void 0;
|
|
2000
1995
|
const nodes = [];
|
|
@@ -2054,7 +2049,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2054
2049
|
);
|
|
2055
2050
|
}
|
|
2056
2051
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2057
|
-
if (!
|
|
2052
|
+
if (!hasShapeProperties(element)) {
|
|
2058
2053
|
return null;
|
|
2059
2054
|
}
|
|
2060
2055
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
@@ -2226,18 +2221,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2226
2221
|
);
|
|
2227
2222
|
}
|
|
2228
2223
|
}
|
|
2229
|
-
if (
|
|
2224
|
+
if (isCalloutShape(normalizedType)) {
|
|
2230
2225
|
const width = Math.max(element.width, 1);
|
|
2231
2226
|
const height = Math.max(element.height, 1);
|
|
2232
|
-
const geometry =
|
|
2227
|
+
const geometry = getCalloutLeaderLineGeometry(
|
|
2233
2228
|
normalizedType,
|
|
2234
2229
|
width,
|
|
2235
2230
|
height,
|
|
2236
2231
|
element.shapeAdjustments
|
|
2237
2232
|
);
|
|
2238
2233
|
if (geometry && geometry.points.length >= 2) {
|
|
2239
|
-
const leaderPath =
|
|
2240
|
-
const bounds =
|
|
2234
|
+
const leaderPath = buildCalloutLeaderLineSvgPath(geometry);
|
|
2235
|
+
const bounds = getCalloutViewBoxBounds(width, height, geometry);
|
|
2241
2236
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2242
2237
|
const offsetLeft = bounds.minX;
|
|
2243
2238
|
const offsetTop = bounds.minY;
|
|
@@ -2379,7 +2374,7 @@ function parseGradientFillCss(gradFill) {
|
|
|
2379
2374
|
const lin = gradFill["a:lin"];
|
|
2380
2375
|
if (lin) {
|
|
2381
2376
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
2382
|
-
const angleDeg = Math.round(
|
|
2377
|
+
const angleDeg = Math.round(ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
2383
2378
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
2384
2379
|
}
|
|
2385
2380
|
const path = gradFill["a:path"];
|
|
@@ -2575,8 +2570,6 @@ function parseCellTextEffects(runProps) {
|
|
|
2575
2570
|
}
|
|
2576
2571
|
return textShadowParts.length > 0 ? textShadowParts.join(", ") : void 0;
|
|
2577
2572
|
}
|
|
2578
|
-
|
|
2579
|
-
// src/viewer/utils/table-cell-style.tsx
|
|
2580
2573
|
function extractCellText(cellXml) {
|
|
2581
2574
|
if (!cellXml) {
|
|
2582
2575
|
return "";
|
|
@@ -2588,11 +2581,11 @@ function extractCellText(cellXml) {
|
|
|
2588
2581
|
const textParts = [];
|
|
2589
2582
|
const runs = ensureArrayValue(paragraph["a:r"]);
|
|
2590
2583
|
runs.forEach((run) => {
|
|
2591
|
-
textParts.push(
|
|
2584
|
+
textParts.push(xmlText(run["a:t"]) ?? "");
|
|
2592
2585
|
});
|
|
2593
2586
|
const fields = ensureArrayValue(paragraph["a:fld"]);
|
|
2594
2587
|
fields.forEach((field) => {
|
|
2595
|
-
textParts.push(
|
|
2588
|
+
textParts.push(xmlText(field["a:t"]) ?? "");
|
|
2596
2589
|
});
|
|
2597
2590
|
paragraphTexts.push(textParts.join(""));
|
|
2598
2591
|
});
|
|
@@ -3934,4 +3927,4 @@ function stopPreviewAnimation() {
|
|
|
3934
3927
|
activePreview = null;
|
|
3935
3928
|
}
|
|
3936
3929
|
|
|
3937
|
-
export { ANIMATION_PRESET_OPTIONS, ARROW_SIZE_OPTIONS, CONNECTOR_ARROW_OPTIONS, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_FILL_COLOR, 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_OPTIONS, TOOLBAR_SECTIONS, UNGROUPED_SECTION_ID, ZOOM_TO_SELECTION_PADDING, build3DExtrusionData, buildLineGlowFilter, buildLineShadowCss, buildNotesPdf, buildPdfFromTiledImageData, buildReactChartViewModel, buildTextBody3DSceneStyle, cloneHistorySnapshot, cn,
|
|
3930
|
+
export { ANIMATION_PRESET_OPTIONS, ARROW_SIZE_OPTIONS, CONNECTOR_ARROW_OPTIONS, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_FILL_COLOR, 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_OPTIONS, TOOLBAR_SECTIONS, UNGROUPED_SECTION_ID, ZOOM_TO_SELECTION_PADDING, build3DExtrusionData, buildLineGlowFilter, buildLineShadowCss, buildNotesPdf, buildPdfFromTiledImageData, buildReactChartViewModel, buildTextBody3DSceneStyle, cloneHistorySnapshot, cn, getAnimationInitialStyle, getConnectorPathGeometry, getCropShapeClipPath, getDuotoneColors, getImageRenderStyle, getImageSurfaceMaskStyle, getImageSurfaceStyle, getImageTilingStyle, getShapeVisualStyle, getTextLayoutStyle, getTextStyleForElement, getTextWarpStyle, hasDagDuotoneEffect, isConnectorOrLineElement, renderChartElement, renderConnectorMarker, renderDagDuotoneSvgFilter, renderMediaElement, renderTableElement, renderTextSegments, renderVectorShape, shouldRenderFallbackLabel, startMotionPathPreview, startPreviewAnimation, stopPreviewAnimation };
|
|
Binary file
|
|
Binary file
|
|
@@ -1,46 +1,23 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var chunkW2IMY5SY_js = require('./chunk-W2IMY5SY.js');
|
|
4
3
|
var pptx = require('ooxml-ui/pptx');
|
|
5
|
-
var pptx_star = require('ooxml-core/pptx');
|
|
6
4
|
var clsx = require('clsx');
|
|
7
5
|
var tailwindMerge = require('tailwind-merge');
|
|
8
6
|
var React8 = require('react');
|
|
9
7
|
var lu = require('react-icons/lu');
|
|
8
|
+
var pptx$1 = require('ooxml-core/pptx');
|
|
10
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
11
10
|
var i18n = require('ooxml-ui/pptx/i18n');
|
|
12
11
|
var reactI18next = require('react-i18next');
|
|
13
12
|
|
|
14
13
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
14
|
|
|
16
|
-
function _interopNamespace(e) {
|
|
17
|
-
if (e && e.__esModule) return e;
|
|
18
|
-
var n = Object.create(null);
|
|
19
|
-
if (e) {
|
|
20
|
-
Object.keys(e).forEach(function (k) {
|
|
21
|
-
if (k !== 'default') {
|
|
22
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
23
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
24
|
-
enumerable: true,
|
|
25
|
-
get: function () { return e[k]; }
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
n.default = e;
|
|
31
|
-
return Object.freeze(n);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
var pptx_star__namespace = /*#__PURE__*/_interopNamespace(pptx_star);
|
|
35
15
|
var React8__default = /*#__PURE__*/_interopDefault(React8);
|
|
36
16
|
|
|
17
|
+
// src/viewer/utils/animation-effects.ts
|
|
37
18
|
function getAnimationInitialStyle(preset, nativeAnimation) {
|
|
38
19
|
return pptx.getAnimationInitialStyle(preset, nativeAnimation);
|
|
39
20
|
}
|
|
40
|
-
|
|
41
|
-
// ../core/dist/index.mjs
|
|
42
|
-
var dist_exports = {};
|
|
43
|
-
chunkW2IMY5SY_js.__reExport(dist_exports, pptx_star__namespace);
|
|
44
21
|
function cn(...inputs) {
|
|
45
22
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
46
23
|
}
|
|
@@ -105,16 +82,14 @@ var GLYPH_COMPONENTS = {
|
|
|
105
82
|
plus: lu.LuPlus,
|
|
106
83
|
triangle: lu.LuTriangle
|
|
107
84
|
};
|
|
108
|
-
var SHAPE_PRESETS = pptx.SHAPE_PRESET_DEFS.map(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
className: def.glyphClass ? `w-3.5 h-3.5 ${def.glyphClass}` : "w-3.5 h-3.5"
|
|
115
|
-
})
|
|
85
|
+
var SHAPE_PRESETS = /* @__PURE__ */ pptx.SHAPE_PRESET_DEFS.map((def) => ({
|
|
86
|
+
type: def.type,
|
|
87
|
+
label: def.label,
|
|
88
|
+
i18nKey: def.i18nKey,
|
|
89
|
+
icon: React8__default.default.createElement(GLYPH_COMPONENTS[def.glyph], {
|
|
90
|
+
className: def.glyphClass ? `w-3.5 h-3.5 ${def.glyphClass}` : "w-3.5 h-3.5"
|
|
116
91
|
})
|
|
117
|
-
);
|
|
92
|
+
}));
|
|
118
93
|
var CONNECTOR_ARROW_OPTIONS = [
|
|
119
94
|
{ value: "none", label: "None", i18nKey: "pptx.arrowhead.none" },
|
|
120
95
|
{ value: "triangle", label: "Triangle", i18nKey: "pptx.arrowhead.triangle" },
|
|
@@ -235,14 +210,14 @@ function isConnectorOrLineElement(element) {
|
|
|
235
210
|
if (element.type === "connector") {
|
|
236
211
|
return true;
|
|
237
212
|
}
|
|
238
|
-
if (!
|
|
213
|
+
if (!pptx$1.hasShapeProperties(element)) {
|
|
239
214
|
return false;
|
|
240
215
|
}
|
|
241
216
|
const st = getShapeType(element.shapeType);
|
|
242
217
|
return st === "connector" || st === "line" || element.shapeType === "line";
|
|
243
218
|
}
|
|
244
219
|
function getImageMaskStyle(element) {
|
|
245
|
-
if (!
|
|
220
|
+
if (!pptx$1.hasShapeProperties(element)) {
|
|
246
221
|
return void 0;
|
|
247
222
|
}
|
|
248
223
|
const geometry = pptx.resolveShapeGeometry(element);
|
|
@@ -272,7 +247,7 @@ function getImageSurfaceMaskStyle(element) {
|
|
|
272
247
|
};
|
|
273
248
|
}
|
|
274
249
|
function getImageSurfaceStyle(element) {
|
|
275
|
-
const fill =
|
|
250
|
+
const fill = pptx$1.hasShapeProperties(element) ? pptx.getComputedFillStyle(element) : void 0;
|
|
276
251
|
return {
|
|
277
252
|
position: "absolute",
|
|
278
253
|
inset: 0,
|
|
@@ -285,7 +260,7 @@ function getImageSurfaceStyle(element) {
|
|
|
285
260
|
};
|
|
286
261
|
}
|
|
287
262
|
function getCropShapeClipPath(element) {
|
|
288
|
-
if (!
|
|
263
|
+
if (!pptx$1.isImageLikeElement(element)) {
|
|
289
264
|
return void 0;
|
|
290
265
|
}
|
|
291
266
|
return pptx.getCropShapeClipPath(element.cropShape, element.width, element.height);
|
|
@@ -808,7 +783,7 @@ function getTextStyleForElement(element, fallbackColor) {
|
|
|
808
783
|
return pptx.buildTextBlockStyle(element, { fallbackColor });
|
|
809
784
|
}
|
|
810
785
|
function getTextLayoutStyle(element) {
|
|
811
|
-
if (!
|
|
786
|
+
if (!pptx$1.hasTextProperties(element)) {
|
|
812
787
|
return {};
|
|
813
788
|
}
|
|
814
789
|
const writingMode = pptx.toCssWritingMode(element.textStyle?.textDirection);
|
|
@@ -816,7 +791,7 @@ function getTextLayoutStyle(element) {
|
|
|
816
791
|
const verticalDirection = pptx.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
817
792
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
818
793
|
const shapeAutoFitTextBox = element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
819
|
-
const hasParagraphIndents =
|
|
794
|
+
const hasParagraphIndents = pptx$1.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
820
795
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
821
796
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
822
797
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
@@ -1409,9 +1384,9 @@ function renderParagraphRun(run, segment, ctx, keySuffix = "") {
|
|
|
1409
1384
|
segmentStyle.scriptFallbackFont && segmentStyle.fontFamilyIsCascadeDefault
|
|
1410
1385
|
);
|
|
1411
1386
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1412
|
-
const baseFontFamily = scriptFallbackWins ?
|
|
1387
|
+
const baseFontFamily = scriptFallbackWins ? pptx$1.getSubstituteFontFamily(segmentStyle.scriptFallbackFont) : rawFontFamily ? pptx$1.getSubstituteFontFamily(
|
|
1413
1388
|
rawFontFamily,
|
|
1414
|
-
|
|
1389
|
+
pptx$1.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1415
1390
|
) : DEFAULT_FONT_FAMILY;
|
|
1416
1391
|
const scriptFonts = pptx.resolveScriptFontSet(segmentStyle, element.textStyle, baseFontFamily);
|
|
1417
1392
|
const needsScriptFonts = pptx.hasDistinctScriptFonts(scriptFonts);
|
|
@@ -1527,7 +1502,7 @@ function renderSeededListRun(seed, runs, segments, context) {
|
|
|
1527
1502
|
});
|
|
1528
1503
|
}
|
|
1529
1504
|
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick, placeholderPrompt, inlineListSeed) {
|
|
1530
|
-
if (!
|
|
1505
|
+
if (!pptx$1.hasTextProperties(element)) {
|
|
1531
1506
|
return emptyFallback || null;
|
|
1532
1507
|
}
|
|
1533
1508
|
const segments = segmentOverrides ?? element.textSegments;
|
|
@@ -1691,13 +1666,13 @@ function renderBulletMarker(para, paraIndex, elementId) {
|
|
|
1691
1666
|
);
|
|
1692
1667
|
}
|
|
1693
1668
|
function getDuotoneColors(element) {
|
|
1694
|
-
if (!
|
|
1669
|
+
if (!pptx$1.isImageLikeElement(element)) {
|
|
1695
1670
|
return void 0;
|
|
1696
1671
|
}
|
|
1697
1672
|
return element.imageEffects?.duotone;
|
|
1698
1673
|
}
|
|
1699
1674
|
function buildLineShadowCss(element) {
|
|
1700
|
-
if (!
|
|
1675
|
+
if (!pptx$1.hasShapeProperties(element)) {
|
|
1701
1676
|
return void 0;
|
|
1702
1677
|
}
|
|
1703
1678
|
const ss = element.shapeStyle;
|
|
@@ -1714,7 +1689,7 @@ function buildLineShadowCss(element) {
|
|
|
1714
1689
|
)}`;
|
|
1715
1690
|
}
|
|
1716
1691
|
function buildLineGlowFilter(element) {
|
|
1717
|
-
if (!
|
|
1692
|
+
if (!pptx$1.hasShapeProperties(element)) {
|
|
1718
1693
|
return void 0;
|
|
1719
1694
|
}
|
|
1720
1695
|
const ss = element.shapeStyle;
|
|
@@ -1730,7 +1705,7 @@ function getDagDuotoneFilterId(elementId) {
|
|
|
1730
1705
|
return `dag-duotone-${elementId}`;
|
|
1731
1706
|
}
|
|
1732
1707
|
function hasDagDuotoneEffect(element) {
|
|
1733
|
-
if (!
|
|
1708
|
+
if (!pptx$1.hasShapeProperties(element)) {
|
|
1734
1709
|
return false;
|
|
1735
1710
|
}
|
|
1736
1711
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
@@ -1811,7 +1786,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1811
1786
|
if (frame) {
|
|
1812
1787
|
return { ...frame };
|
|
1813
1788
|
}
|
|
1814
|
-
if (!
|
|
1789
|
+
if (!pptx$1.hasShapeProperties(element)) {
|
|
1815
1790
|
return {};
|
|
1816
1791
|
}
|
|
1817
1792
|
const ss = element.shapeStyle;
|
|
@@ -1918,7 +1893,7 @@ function getShapeVisualStyle(element, _hasFill, fillColor, _strokeWidth, _stroke
|
|
|
1918
1893
|
}
|
|
1919
1894
|
}
|
|
1920
1895
|
function getConnectorPathGeometry(element) {
|
|
1921
|
-
return
|
|
1896
|
+
return pptx$1.getConnectorPathGeometry(element);
|
|
1922
1897
|
}
|
|
1923
1898
|
function renderConnectorMarker(markerId, arrowType, color, arrowWidth, arrowLength) {
|
|
1924
1899
|
if (!arrowType || arrowType === "none") {
|
|
@@ -2018,7 +1993,7 @@ function strokeStrands(d, keyBase, ctx) {
|
|
|
2018
1993
|
}
|
|
2019
1994
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
2020
1995
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
2021
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
1996
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? pptx$1.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
2022
1997
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
2023
1998
|
const gradientPaint = gradient ? pptx.svgGradientFillRef(gradient) : void 0;
|
|
2024
1999
|
const nodes = [];
|
|
@@ -2078,7 +2053,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2078
2053
|
);
|
|
2079
2054
|
}
|
|
2080
2055
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2081
|
-
if (!
|
|
2056
|
+
if (!pptx$1.hasShapeProperties(element)) {
|
|
2082
2057
|
return null;
|
|
2083
2058
|
}
|
|
2084
2059
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
@@ -2250,18 +2225,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2250
2225
|
);
|
|
2251
2226
|
}
|
|
2252
2227
|
}
|
|
2253
|
-
if (
|
|
2228
|
+
if (pptx$1.isCalloutShape(normalizedType)) {
|
|
2254
2229
|
const width = Math.max(element.width, 1);
|
|
2255
2230
|
const height = Math.max(element.height, 1);
|
|
2256
|
-
const geometry =
|
|
2231
|
+
const geometry = pptx$1.getCalloutLeaderLineGeometry(
|
|
2257
2232
|
normalizedType,
|
|
2258
2233
|
width,
|
|
2259
2234
|
height,
|
|
2260
2235
|
element.shapeAdjustments
|
|
2261
2236
|
);
|
|
2262
2237
|
if (geometry && geometry.points.length >= 2) {
|
|
2263
|
-
const leaderPath =
|
|
2264
|
-
const bounds =
|
|
2238
|
+
const leaderPath = pptx$1.buildCalloutLeaderLineSvgPath(geometry);
|
|
2239
|
+
const bounds = pptx$1.getCalloutViewBoxBounds(width, height, geometry);
|
|
2265
2240
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2266
2241
|
const offsetLeft = bounds.minX;
|
|
2267
2242
|
const offsetTop = bounds.minY;
|
|
@@ -2403,7 +2378,7 @@ function parseGradientFillCss(gradFill) {
|
|
|
2403
2378
|
const lin = gradFill["a:lin"];
|
|
2404
2379
|
if (lin) {
|
|
2405
2380
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
2406
|
-
const angleDeg = Math.round(
|
|
2381
|
+
const angleDeg = Math.round(pptx$1.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
2407
2382
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
2408
2383
|
}
|
|
2409
2384
|
const path = gradFill["a:path"];
|
|
@@ -2599,8 +2574,6 @@ function parseCellTextEffects(runProps) {
|
|
|
2599
2574
|
}
|
|
2600
2575
|
return textShadowParts.length > 0 ? textShadowParts.join(", ") : void 0;
|
|
2601
2576
|
}
|
|
2602
|
-
|
|
2603
|
-
// src/viewer/utils/table-cell-style.tsx
|
|
2604
2577
|
function extractCellText(cellXml) {
|
|
2605
2578
|
if (!cellXml) {
|
|
2606
2579
|
return "";
|
|
@@ -2612,11 +2585,11 @@ function extractCellText(cellXml) {
|
|
|
2612
2585
|
const textParts = [];
|
|
2613
2586
|
const runs = ensureArrayValue(paragraph["a:r"]);
|
|
2614
2587
|
runs.forEach((run) => {
|
|
2615
|
-
textParts.push(
|
|
2588
|
+
textParts.push(pptx$1.xmlText(run["a:t"]) ?? "");
|
|
2616
2589
|
});
|
|
2617
2590
|
const fields = ensureArrayValue(paragraph["a:fld"]);
|
|
2618
2591
|
fields.forEach((field) => {
|
|
2619
|
-
textParts.push(
|
|
2592
|
+
textParts.push(pptx$1.xmlText(field["a:t"]) ?? "");
|
|
2620
2593
|
});
|
|
2621
2594
|
paragraphTexts.push(textParts.join(""));
|
|
2622
2595
|
});
|
|
@@ -4218,6 +4191,18 @@ Object.defineProperty(exports, "substituteFieldText", {
|
|
|
4218
4191
|
enumerable: true,
|
|
4219
4192
|
get: function () { return pptx.substituteFieldText; }
|
|
4220
4193
|
});
|
|
4194
|
+
Object.defineProperty(exports, "updateCellTextInRawXml", {
|
|
4195
|
+
enumerable: true,
|
|
4196
|
+
get: function () { return pptx$1.updateCellTextInRawXml; }
|
|
4197
|
+
});
|
|
4198
|
+
Object.defineProperty(exports, "updateCellTextStyleInRawXml", {
|
|
4199
|
+
enumerable: true,
|
|
4200
|
+
get: function () { return pptx$1.updateCellTextStyleInRawXml; }
|
|
4201
|
+
});
|
|
4202
|
+
Object.defineProperty(exports, "updateMergeAttrsInRawXml", {
|
|
4203
|
+
enumerable: true,
|
|
4204
|
+
get: function () { return pptx$1.updateMergeAttrsInRawXml; }
|
|
4205
|
+
});
|
|
4221
4206
|
exports.ANIMATION_PRESET_OPTIONS = ANIMATION_PRESET_OPTIONS;
|
|
4222
4207
|
exports.ARROW_SIZE_OPTIONS = ARROW_SIZE_OPTIONS;
|
|
4223
4208
|
exports.CONNECTOR_ARROW_OPTIONS = CONNECTOR_ARROW_OPTIONS;
|
|
@@ -4250,7 +4235,6 @@ exports.buildReactChartViewModel = buildReactChartViewModel;
|
|
|
4250
4235
|
exports.buildTextBody3DSceneStyle = buildTextBody3DSceneStyle;
|
|
4251
4236
|
exports.cloneHistorySnapshot = cloneHistorySnapshot;
|
|
4252
4237
|
exports.cn = cn;
|
|
4253
|
-
exports.dist_exports = dist_exports;
|
|
4254
4238
|
exports.getAnimationInitialStyle = getAnimationInitialStyle;
|
|
4255
4239
|
exports.getConnectorPathGeometry = getConnectorPathGeometry;
|
|
4256
4240
|
exports.getCropShapeClipPath = getCropShapeClipPath;
|
|
Binary file
|
|
Binary file
|
|
@@ -27,7 +27,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
27
27
|
}
|
|
28
28
|
return to;
|
|
29
29
|
};
|
|
30
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
31
30
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
32
31
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
33
32
|
// file that has been converted to a CommonJS file using a Babel-
|
|
@@ -38,6 +37,5 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
38
37
|
));
|
|
39
38
|
|
|
40
39
|
exports.__commonJS = __commonJS;
|
|
41
|
-
exports.__reExport = __reExport;
|
|
42
40
|
exports.__require = __require;
|
|
43
41
|
exports.__toESM = __toESM;
|
|
Binary file
|
|
Binary file
|