@aixa-transformation/pptx-viewer 2.0.3 → 2.0.24
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/dist/{Model3DScene-UD6SIIUP.mjs → Model3DScene-QPOSBRM4.mjs} +2 -2
- package/dist/{Model3DScene-AXKDOUCK.js → Model3DScene-VK4AKXGO.js} +3 -3
- package/dist/{SurfaceChart3DScene-JBEJR7Z4.mjs → SurfaceChart3DScene-GIAS6HZ7.mjs} +2 -2
- package/dist/{SurfaceChart3DScene-JU2MS2BP.js → SurfaceChart3DScene-LBHZDSGV.js} +3 -3
- package/dist/{chunk-34H7NGLC.mjs → chunk-45A3IISI.mjs} +8 -2
- package/dist/{chunk-CHHLFKT6.js → chunk-DHNQHQ66.js} +48 -42
- package/dist/{chunk-ODMFBYAP.js → chunk-HUD73YBT.js} +282 -59
- package/dist/{chunk-7H2BJF4H.mjs → chunk-LTBO2ZJC.mjs} +282 -59
- package/dist/chunk-OUD7I3ER.mjs +34907 -0
- package/dist/{chunk-3HJVAFGP.mjs → chunk-RI6OBMEG.mjs} +89 -21
- package/dist/chunk-VFVF632V.js +34921 -0
- package/dist/{chunk-ZIXTDOJD.js → chunk-ZSZ2WR4A.js} +565 -497
- package/dist/{dist-OEO77LEX.mjs → dist-DPZ5B7L7.mjs} +1 -1
- package/dist/{dist-CPLP356W.js → dist-L2EUDG6W.js} +568 -568
- package/dist/index.js +34 -34
- package/dist/index.mjs +4 -4
- package/dist/internals.js +78 -78
- package/dist/internals.mjs +3 -3
- package/dist/pptx-viewer.css +1 -1
- package/dist/presentation.js +2 -2
- package/dist/presentation.mjs +1 -1
- package/dist/viewer/index.js +20 -20
- package/dist/viewer/index.mjs +4 -4
- package/package.json +3 -2
- package/dist/chunk-E4CJYQAL.mjs +0 -34612
- package/dist/chunk-N57QTSTQ.js +0 -34626
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SHAPE_PRESET_DEFS, TOOLBAR_TABS, computeValueRangeForChart, getAnimationInitialStyle, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, BROADCAST_THROTTLE_MS, createSyncGate, validateRoomId, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, PresentationAnimationController, computeEntranceAnimationDelay, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, collectMediaElements, collectImagePaths, buildInitialGuides, saveAutosaveSnapshot, normalizeHexColor, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, computeAutoFitTextStyle, resolveLineHeight, getKinsokuLineBreakStyles, buildTextBody3DSceneStyle, resolveParagraphRtl, resolveParagraphAlign, resolveCssTextAlign, colorWithOpacity, build3DExtrusionData, getResolvedShapeClipPath, normalizeStrokeDashType, buildCssGradientFromShapeStyle, buildShadowCssFromShapeStyle, buildInnerShadowCssFromShapeStyle, buildMultiLayerShadowCss, buildGlowBoxShadow, getCompoundLineBoxShadow, getSoftEdgeFilterId, getEffectDagFilter, buildPatternFillCss, buildReflectionCss, getCssBorderDashStyle, getCompoundLineBorderWidth, getSvgStrokeDasharray, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, clampCropValue, computeSelectionRect, rectToCells, isCellInRect, buildChartViewModel, buildPreviewAnimation, isTemplateElementId, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, detectTouchDevice, detectOrientation, isMobileViewport, MOBILE_BREAKPOINT, TABLET_BREAKPOINT, remapTextToSegments, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, createViewerOptionsStore, readSlidesFromYDoc, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, shouldAutoFollowBroadcaster, createTouchGestureRecognizer, isKeyboardOpen, openPptxFile, readBackstageRecentFile, isActionHidden, buildElementClipboardPayload, generatePackageReadme, downloadBlob, groupElements, generateElementId, makeCloneId, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, derivePresenceList, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, cloneHistorySnapshot, createPresentationSessionId, resolveTransitionDurationMs, isUrlSafe, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, presenterElapsed, stepPresenterZoom, resetPresenterTimer, togglePresenterTimer, isTemplateElement, substituteFieldText, resolveUnderlineDecorationStyle, hasDistinctScriptFonts, buildTextReflectionCss, getTextAlphaOpacity, buildTextRunFilterChain, buildTextShadowCss, TEXT_BUILD_ID_SEP, apply3dEffects, clampUnitInterval, getRoundRectRadiusPx, computeColumnBoundaries, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, getPatternSvg, ooxmlDashToCssBorderStyle, cell3DBevelCss, getChartStylePalette, computeLayout, valueToY, formatAxisValue, computeLayoutOptions, splitSeriesByAxis, computeValueRange, getSecondaryValueAxis, seriesColor, paletteColor, resolveRegionCode, normalizeValue, sequentialColorScale, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, sanitizeDownloadFilename, encodeGif, groupSlidesBySection, hasCopyableFormat, createBackstagePresentation, cloneElementForPaste, computeScrollDelta, rerouteConnectorsForMovedElements, applyReroutedConnectors, buildPrintHtmlDocument, parseMediaCommand, convertOmmlToMathMl, sanitizeMathMl, buildTextFillCss, resolvePictureBullet, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, resolveFontRefIdx, tintColor2, shadeColor2, deleteTableColumn, insertTableColumn, deleteTableRow, insertTableRow, splitCell, mergeCells, buildSlidesPdfBytes, buildNotesPdfBytes, isPpactionUrl, parsePpactionUrl, safeOpenUrl, ACTION_BUTTON_PRESETS, buildSmartArtPresetData, computeSnapToShape, computeMarqueeHitIds, mergeAdditiveSelection, segmentByScript, resolveFontForScript, generateLogTicks, formatAxisValueWithUnits, getDisplayUnitLabel, applyResize, snapBoxToGrid, hexToRgbChannels, chartPartToAttrs } from './chunk-
|
|
1
|
+
import { SHAPE_PRESET_DEFS, TOOLBAR_TABS, computeValueRangeForChart, getAnimationInitialStyle, computeVirtualRange, DEFAULT_VIRTUAL_OVERSCAN, BROADCAST_THROTTLE_MS, createSyncGate, validateRoomId, resolveTransportForServerUrl, isMixedContentBlocked, CONNECTION_TIMEOUT_MS, sanitizeColor, cloneTemplateElementsBySlideId, cloneSlide, PresentationAnimationController, computeEntranceAnimationDelay, PRESENTATION_HASH, PRESENTATION_NONCE_KEY, PRESENTATION_CHANNEL_NAME, swapPresentationWindows, PRESENTATION_MESSAGE_ORIGIN, clearAudienceContent, buildPresentationAudienceUrl, resolveAudienceScreenPlacement, placeAudienceWindow, storeAudienceContent, isPresentationSessionMessage, collectMediaElements, collectImagePaths, buildInitialGuides, saveAutosaveSnapshot, normalizeHexColor, toCssWritingMode, toCssTextOrientation, toCssVerticalDirection, computeAutoFitTextStyle, resolveLineHeight, getKinsokuLineBreakStyles, buildTextBody3DSceneStyle, resolveParagraphRtl, resolveParagraphAlign, resolveCssTextAlign, colorWithOpacity, build3DExtrusionData, getResolvedShapeClipPath, normalizeStrokeDashType, buildCssGradientFromShapeStyle, buildShadowCssFromShapeStyle, buildInnerShadowCssFromShapeStyle, buildMultiLayerShadowCss, buildGlowBoxShadow, getCompoundLineBoxShadow, getSoftEdgeFilterId, getEffectDagFilter, buildPatternFillCss, buildReflectionCss, getCssBorderDashStyle, getCompoundLineBorderWidth, getSvgStrokeDasharray, svgLineCap, getCompoundLineOffsets, getCompoundLineWidths, clampCropValue, computeSelectionRect, rectToCells, isCellInRect, buildChartViewModel, buildPreviewAnimation, isTemplateElementId, getInlineEditorSelection, applyStyleToSelectedSegments, setPendingSelectionRestore, applyCaseTransformToSegments, transformTextCase, addSection, renameSection, deleteSection, moveSectionUp, moveSectionDown, moveSlidesToSection, normalizeColorsForCapture, preprocessCssForCapture, slideProgressPercent, slideStatusLabel, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, isExportAbortError, recordProgressPercent, comparePresentation, applyAcceptSlide, applyAcceptAllSlides, collectUsedFonts, detectTouchDevice, detectOrientation, isMobileViewport, MOBILE_BREAKPOINT, TABLET_BREAKPOINT, remapTextToSegments, shouldLoopContinuously, applyRehearsalTimings, copyFormatFromElement, applyFormatToElement, createViewerOptionsStore, readSlidesFromYDoc, reconcileSlidesInYDoc, LOCAL_SYNC_ORIGIN, observeYDocSlides, shouldAutoFollowBroadcaster, createTouchGestureRecognizer, isKeyboardOpen, openPptxFile, readBackstageRecentFile, isActionHidden, buildElementClipboardPayload, generatePackageReadme, downloadBlob, groupElements, generateElementId, makeCloneId, alignElements, distributeElements, bringForward, sendBackward, bringToFront, sendToBack, newTableElement, createDefaultChartElement, readViewportMetrics, computeKeyboardInset, derivePresenceList, buildPrintDocument, buildOutlineHtml, buildSlidesHtml, buildNotesHtml, buildHandoutsHtml, createBlankSlide, makeSlideId, cloneHistorySnapshot, createPresentationSessionId, resolveTransitionDurationMs, isUrlSafe, createPresenterTimer, createInitialPresentationSnapshot, mergePresentationSnapshot, presenterElapsed, stepPresenterZoom, resetPresenterTimer, togglePresenterTimer, isTemplateElement, substituteFieldText, resolveUnderlineDecorationStyle, hasDistinctScriptFonts, buildTextReflectionCss, getTextAlphaOpacity, buildTextRunFilterChain, buildTextShadowCss, TEXT_BUILD_ID_SEP, apply3dEffects, clampUnitInterval, getRoundRectRadiusPx, computeColumnBoundaries, parseDrawingColor, parseDrawingColorOpacity, getCellDiagonalBorders, getPatternSvg, ooxmlDashToCssBorderStyle, cell3DBevelCss, getChartStylePalette, computeLayout, valueToY, formatAxisValue, computeLayoutOptions, splitSeriesByAxis, computeValueRange, getSecondaryValueAxis, seriesColor, paletteColor, resolveRegionCode, normalizeValue, sequentialColorScale, canvasToJpegData, downloadDataUrl, pickSupportedMimeType, WEBM_MIME_CANDIDATES, fpsToFrameIntervalMs, segmentFrameCount, sanitizeDownloadFilename, encodeGif, groupSlidesBySection, hasCopyableFormat, createBackstagePresentation, cloneElementForPaste, computeScrollDelta, rerouteConnectorsForMovedElements, applyReroutedConnectors, buildPrintHtmlDocument, parseMediaCommand, convertOmmlToMathMl, sanitizeMathMl, buildTextFillCss, resolvePictureBullet, computeResizedColumnWidths, computeResizedRowHeight, DEFAULT_ROW_HEIGHT, resolveFontRefIdx, tintColor2, shadeColor2, deleteTableColumn, insertTableColumn, deleteTableRow, insertTableRow, splitCell, mergeCells, buildSlidesPdfBytes, buildNotesPdfBytes, isPpactionUrl, parsePpactionUrl, safeOpenUrl, ACTION_BUTTON_PRESETS, buildSmartArtPresetData, computeSnapToShape, computeMarqueeHitIds, mergeAdditiveSelection, segmentByScript, resolveFontForScript, generateLogTicks, formatAxisValueWithUnits, getDisplayUnitLabel, applyResize, snapBoxToGrid, hexToRgbChannels, chartPartToAttrs } from './chunk-45A3IISI.mjs';
|
|
2
2
|
import { translationsEn } from './chunk-2X72MOPZ.mjs';
|
|
3
|
-
import { PptxHandler, EncryptedFileError, hasTextProperties, hasShapeProperties, isImageLikeElement, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, guidePxToEmu, mergeShapes, buildThemeColorMap, reResolveSlideColors, getSubstituteFontFamily, evaluatePresetShape, customGeometryPathsToSvgSubpaths, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, SvgExporter, rebuildTableStructureInRawXml, updateCellTextStyleInRawXml, updateCellTextInRawXml, updateMergeAttrsInRawXml, elementActionToPptxAction } from './chunk-
|
|
3
|
+
import { PptxHandler, EncryptedFileError, hasTextProperties, hasShapeProperties, isImageLikeElement, isCalloutShape, getCalloutLeaderLineGeometry, buildCalloutLeaderLineSvgPath, getCalloutViewBoxBounds, applyThemeToData, THEME_PRESETS, themeColorSchemesEqual, guidePxToEmu, mergeShapes, buildThemeColorMap, reResolveSlideColors, getSubstituteFontFamily, evaluatePresetShape, customGeometryPathsToSvgSubpaths, getPresetShapeClipPath, svgPathToPolygons, polygonsToSvgPath, SvgExporter, rebuildTableStructureInRawXml, updateCellTextStyleInRawXml, updateCellTextInRawXml, updateMergeAttrsInRawXml, elementActionToPptxAction } from './chunk-LTBO2ZJC.mjs';
|
|
4
4
|
import React4, { useState, useEffect, useMemo, Suspense, useRef, useCallback, useSyncExternalStore, useImperativeHandle, useLayoutEffect } from 'react';
|
|
5
5
|
import { LuTriangle, LuPlus, LuMoveRight, LuMinus, LuDiamond, LuDatabase, LuCircle, LuSquare } from 'react-icons/lu';
|
|
6
6
|
import { clsx } from 'clsx';
|
|
@@ -4148,6 +4148,10 @@ function getTextStyleForElement(element, fallbackColor) {
|
|
|
4148
4148
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
4149
4149
|
const bodyLeft = element.textStyle?.bodyInsetLeft ?? DEFAULT_BODY_INSET_LR_PX;
|
|
4150
4150
|
const bodyRight = element.textStyle?.bodyInsetRight ?? DEFAULT_BODY_INSET_LR_PX;
|
|
4151
|
+
const hasParagraphIndents = Boolean(element.paragraphIndents?.length);
|
|
4152
|
+
const bodyParagraphMarginLeft = hasParagraphIndents ? 0 : element.textStyle?.paragraphMarginLeft ?? 0;
|
|
4153
|
+
const bodyParagraphMarginRight = hasParagraphIndents ? 0 : element.textStyle?.paragraphMarginRight ?? 0;
|
|
4154
|
+
const bodyParagraphIndent = hasParagraphIndents ? 0 : element.textStyle?.paragraphIndent ?? 0;
|
|
4151
4155
|
const writingMode = toCssWritingMode(element.textStyle?.textDirection);
|
|
4152
4156
|
const textOrientation = toCssTextOrientation(element.textStyle?.textDirection);
|
|
4153
4157
|
const verticalDirection = toCssVerticalDirection(element.textStyle?.textDirection);
|
|
@@ -4175,9 +4179,9 @@ function getTextStyleForElement(element, fallbackColor) {
|
|
|
4175
4179
|
lineHeight: resolveLineHeight(element.textStyle, hasItalicRuns),
|
|
4176
4180
|
paddingTop: bodyTop + (hasItalicRuns ? 1 : 0),
|
|
4177
4181
|
paddingBottom: bodyBottom + (hasItalicRuns ? 1 : 0),
|
|
4178
|
-
paddingLeft: bodyLeft +
|
|
4179
|
-
paddingRight: bodyRight +
|
|
4180
|
-
textIndent:
|
|
4182
|
+
paddingLeft: bodyLeft + bodyParagraphMarginLeft,
|
|
4183
|
+
paddingRight: bodyRight + bodyParagraphMarginRight,
|
|
4184
|
+
textIndent: bodyParagraphIndent,
|
|
4181
4185
|
overflow: "visible",
|
|
4182
4186
|
writingMode,
|
|
4183
4187
|
textOrientation,
|
|
@@ -4842,7 +4846,7 @@ function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize)
|
|
|
4842
4846
|
`${elementId}-seg-${segmentIndex}-bullet-img`
|
|
4843
4847
|
);
|
|
4844
4848
|
}
|
|
4845
|
-
function renderSingleSegment(element, segment, segmentIndex, fallbackColor, findHighlights, bulletInfo, onHyperlinkClick, fieldContext, paragraphRtl, requireCtrlClick) {
|
|
4849
|
+
function renderSingleSegment(element, segment, segmentIndex, fallbackColor, findHighlights, bulletInfo, onHyperlinkClick, fieldContext, paragraphRtl, requireCtrlClick, bulletMarkerWidth) {
|
|
4846
4850
|
if (segment.equationXml) {
|
|
4847
4851
|
return renderEquationSegment(
|
|
4848
4852
|
element.id,
|
|
@@ -4923,6 +4927,12 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
4923
4927
|
spanStyle.unicodeBidi = "embed";
|
|
4924
4928
|
}
|
|
4925
4929
|
if (bulletInfo) {
|
|
4930
|
+
if (typeof bulletMarkerWidth === "number" && bulletMarkerWidth > 0) {
|
|
4931
|
+
spanStyle.display = "inline-block";
|
|
4932
|
+
spanStyle.width = bulletMarkerWidth;
|
|
4933
|
+
spanStyle.textAlign = "right";
|
|
4934
|
+
spanStyle.textIndent = 0;
|
|
4935
|
+
}
|
|
4926
4936
|
if (bulletInfo.fontFamily) {
|
|
4927
4937
|
spanStyle.fontFamily = bulletInfo.fontFamily;
|
|
4928
4938
|
}
|
|
@@ -5092,7 +5102,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
5092
5102
|
const elementRtl = hasTextProperties(element) ? element.textStyle?.rtl : void 0;
|
|
5093
5103
|
const elementAlign = hasTextProperties(element) ? element.textStyle?.align : void 0;
|
|
5094
5104
|
const bodyStyle = hasTextProperties(element) ? element.textStyle : void 0;
|
|
5095
|
-
const spaceFirstLast = bodyStyle?.spaceFirstLastParagraph
|
|
5105
|
+
const spaceFirstLast = bodyStyle?.spaceFirstLastParagraph === true;
|
|
5096
5106
|
return paragraphs.map((paraSegments, paraIndex) => {
|
|
5097
5107
|
const paraIndent = paragraphIndents?.[paraIndex];
|
|
5098
5108
|
const rawMarginLeft = typeof paraIndent?.marginLeft === "number" && paraIndent.marginLeft !== 0 ? paraIndent.marginLeft : void 0;
|
|
@@ -5121,8 +5131,12 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
5121
5131
|
const paraKinsokuStyle = getKinsokuLineBreakStyles(firstSeg?.segment.style);
|
|
5122
5132
|
const hasParaKinsoku = Object.keys(paraKinsokuStyle).length > 0;
|
|
5123
5133
|
const paraProps = effectiveSegments[firstSeg?.globalIndex ?? -1]?.paragraphProperties;
|
|
5134
|
+
const effectiveParaProps = {
|
|
5135
|
+
...firstSeg?.segment.style,
|
|
5136
|
+
...paraProps
|
|
5137
|
+
};
|
|
5124
5138
|
const spacing = resolveParagraphSpacing({
|
|
5125
|
-
paraProps,
|
|
5139
|
+
paraProps: effectiveParaProps,
|
|
5126
5140
|
bodyStyle,
|
|
5127
5141
|
isFirst: paraIndex === 0,
|
|
5128
5142
|
isLast: paraIndex === paragraphs.length - 1,
|
|
@@ -5156,6 +5170,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
5156
5170
|
}
|
|
5157
5171
|
if (cssTextAlign !== void 0) {
|
|
5158
5172
|
paraStyle.textAlign = cssTextAlign;
|
|
5173
|
+
paraStyle["--pptx-paragraph-align"] = cssTextAlign;
|
|
5159
5174
|
}
|
|
5160
5175
|
const needsWrapper = paraMarginLeft !== void 0 || paraMarginRight !== void 0 || paraTextIndent !== void 0 || hasBullet || paraRtl !== void 0 || cssTextAlign !== void 0 || hasParaKinsoku || hasParaSpacing;
|
|
5161
5176
|
const renderedSegments = paraSegments.filter(({ segment }) => {
|
|
@@ -5174,7 +5189,8 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
5174
5189
|
onHyperlinkClick,
|
|
5175
5190
|
fieldContext,
|
|
5176
5191
|
paraRtl,
|
|
5177
|
-
requireCtrlClick
|
|
5192
|
+
requireCtrlClick,
|
|
5193
|
+
hasBullet && globalIndex === firstSeg.globalIndex ? Math.max(0, -(rawTextIndent ?? 0)) : void 0
|
|
5178
5194
|
)
|
|
5179
5195
|
);
|
|
5180
5196
|
const wrappedContent = wrapWithTextBuildAnimation(
|
|
@@ -5190,7 +5206,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
5190
5206
|
paraIndex < paragraphs.length - 1 ? /* @__PURE__ */ jsx("br", {}) : null
|
|
5191
5207
|
] }, `${element.id}-para-${paraIndex}`);
|
|
5192
5208
|
}
|
|
5193
|
-
return /* @__PURE__ */ jsx("div", { style: paraStyle, children: wrappedContent }, `${element.id}-para-${paraIndex}`);
|
|
5209
|
+
return /* @__PURE__ */ jsx("div", { "data-pptx-paragraph": true, style: paraStyle, children: wrappedContent }, `${element.id}-para-${paraIndex}`);
|
|
5194
5210
|
});
|
|
5195
5211
|
}
|
|
5196
5212
|
|
|
@@ -5854,6 +5870,41 @@ function strokeStrands(d, keyBase, ctx) {
|
|
|
5854
5870
|
}
|
|
5855
5871
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false) {
|
|
5856
5872
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
5873
|
+
const gradientStops = shapeStyle?.fillGradientStops;
|
|
5874
|
+
const hasGradient = Boolean(gradientStops && gradientStops.length > 0);
|
|
5875
|
+
let gradientId;
|
|
5876
|
+
let gradientNode;
|
|
5877
|
+
if (hasGradient && gradientStops) {
|
|
5878
|
+
let hash = 2166136261;
|
|
5879
|
+
for (let i = 0; i < pathData.length; i++) {
|
|
5880
|
+
hash = Math.imul(hash ^ pathData.charCodeAt(i), 16777619);
|
|
5881
|
+
}
|
|
5882
|
+
gradientId = `pptx-custom-gradient-${(hash >>> 0).toString(36)}`;
|
|
5883
|
+
const angle = shapeStyle?.fillGradientAngle ?? 0;
|
|
5884
|
+
const radians = (angle - 90) * Math.PI / 180;
|
|
5885
|
+
const dx = Math.cos(radians) * 50;
|
|
5886
|
+
const dy = Math.sin(radians) * 50;
|
|
5887
|
+
gradientNode = /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx(
|
|
5888
|
+
"linearGradient",
|
|
5889
|
+
{
|
|
5890
|
+
id: gradientId,
|
|
5891
|
+
x1: `${50 - dx}%`,
|
|
5892
|
+
y1: `${50 - dy}%`,
|
|
5893
|
+
x2: `${50 + dx}%`,
|
|
5894
|
+
y2: `${50 + dy}%`,
|
|
5895
|
+
children: [...gradientStops].sort((a, b) => a.position - b.position).map((stop, index) => /* @__PURE__ */ jsx(
|
|
5896
|
+
"stop",
|
|
5897
|
+
{
|
|
5898
|
+
offset: `${stop.position}%`,
|
|
5899
|
+
stopColor: stop.color,
|
|
5900
|
+
stopOpacity: stop.opacity ?? 1
|
|
5901
|
+
},
|
|
5902
|
+
`${stop.position}-${index}`
|
|
5903
|
+
))
|
|
5904
|
+
}
|
|
5905
|
+
) });
|
|
5906
|
+
}
|
|
5907
|
+
const customFillPaint = gradientId ? `url(#${gradientId})` : void 0;
|
|
5857
5908
|
const subpaths = structuredPaths && structuredPaths.length > 0 ? customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
5858
5909
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
5859
5910
|
const nodes = [];
|
|
@@ -5866,7 +5917,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
5866
5917
|
"path",
|
|
5867
5918
|
{
|
|
5868
5919
|
d: paint.d,
|
|
5869
|
-
fill: animatesFill ? "inherit" : paint.fill,
|
|
5920
|
+
fill: animatesFill ? "inherit" : customFillPaint ?? paint.fill,
|
|
5870
5921
|
stroke: "none",
|
|
5871
5922
|
vectorEffect: "non-scaling-stroke"
|
|
5872
5923
|
},
|
|
@@ -5885,7 +5936,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
5885
5936
|
"path",
|
|
5886
5937
|
{
|
|
5887
5938
|
d: pathData,
|
|
5888
|
-
fill: animatesFill ? "inherit" : colorWithOpacity(fillColor, fillOpacity),
|
|
5939
|
+
fill: animatesFill ? "inherit" : customFillPaint ?? colorWithOpacity(fillColor, fillOpacity),
|
|
5889
5940
|
stroke: "none",
|
|
5890
5941
|
vectorEffect: "non-scaling-stroke"
|
|
5891
5942
|
},
|
|
@@ -5897,13 +5948,16 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
5897
5948
|
nodes.push(...strokeStrands(pathData, "agg", ctx));
|
|
5898
5949
|
}
|
|
5899
5950
|
}
|
|
5900
|
-
return /* @__PURE__ */
|
|
5951
|
+
return /* @__PURE__ */ jsxs(
|
|
5901
5952
|
"svg",
|
|
5902
5953
|
{
|
|
5903
5954
|
viewBox: `0 0 ${pathWidth} ${pathHeight}`,
|
|
5904
5955
|
className: "w-full h-full pointer-events-none",
|
|
5905
5956
|
preserveAspectRatio: "none",
|
|
5906
|
-
children:
|
|
5957
|
+
children: [
|
|
5958
|
+
gradientNode,
|
|
5959
|
+
nodes
|
|
5960
|
+
]
|
|
5907
5961
|
}
|
|
5908
5962
|
);
|
|
5909
5963
|
}
|
|
@@ -6906,9 +6960,12 @@ function getTableCellBandStyle(element, rowIndex, cellIndex, rowCount, columnCou
|
|
|
6906
6960
|
}
|
|
6907
6961
|
if (td.firstRowHeader && rowIndex === 0) {
|
|
6908
6962
|
style.fontWeight = 700;
|
|
6909
|
-
const
|
|
6910
|
-
|
|
6911
|
-
|
|
6963
|
+
const authoredHeaderFill = styleEntry?.firstRowFill;
|
|
6964
|
+
const headerBg = resolveFill(authoredHeaderFill, "rgba(68, 114, 196, 0.85)");
|
|
6965
|
+
if (!authoredHeaderFill?.noFill) {
|
|
6966
|
+
style.backgroundColor = headerBg;
|
|
6967
|
+
style.color = "#ffffff";
|
|
6968
|
+
}
|
|
6912
6969
|
applyTableStyleText(styleEntry?.firstRowText, colorScheme, style, fontScheme);
|
|
6913
6970
|
applied = true;
|
|
6914
6971
|
}
|
|
@@ -9545,7 +9602,7 @@ function FailedToLoad() {
|
|
|
9545
9602
|
var LazySurfaceChart3DScene = React4.lazy(
|
|
9546
9603
|
async () => {
|
|
9547
9604
|
try {
|
|
9548
|
-
return await import('./SurfaceChart3DScene-
|
|
9605
|
+
return await import('./SurfaceChart3DScene-GIAS6HZ7.mjs');
|
|
9549
9606
|
} catch {
|
|
9550
9607
|
return { default: FailedToLoad };
|
|
9551
9608
|
}
|
|
@@ -17877,7 +17934,7 @@ function useYjsDocumentSync({
|
|
|
17877
17934
|
return;
|
|
17878
17935
|
}
|
|
17879
17936
|
try {
|
|
17880
|
-
const { PptxHandler: PptxHandler2 } = await import('./dist-
|
|
17937
|
+
const { PptxHandler: PptxHandler2 } = await import('./dist-DPZ5B7L7.mjs');
|
|
17881
17938
|
const handler = new PptxHandler2();
|
|
17882
17939
|
await handler.load(sourceBytes.buffer);
|
|
17883
17940
|
const currentSlides = readSlidesFromYDoc(
|
|
@@ -18055,7 +18112,7 @@ function useFollowMode({
|
|
|
18055
18112
|
return { followedClientId, followUser };
|
|
18056
18113
|
}
|
|
18057
18114
|
function useLayoutSwitching(input) {
|
|
18058
|
-
const { handler, slides, activeSlideIndex, ops, history } = input;
|
|
18115
|
+
const { handler, slides, activeSlideIndex, ops, history, setTemplateElementsBySlideId } = input;
|
|
18059
18116
|
const [availableLayouts, setAvailableLayouts] = useState([]);
|
|
18060
18117
|
const [isLoading, setIsLoading] = useState(false);
|
|
18061
18118
|
const slidesRef = useRef(slides);
|
|
@@ -18093,12 +18150,17 @@ function useLayoutSwitching(input) {
|
|
|
18093
18150
|
next[activeSlideIndex] = updated;
|
|
18094
18151
|
return next;
|
|
18095
18152
|
});
|
|
18153
|
+
const templateElements = await handler.getTemplateElementsForSlide(updated.id);
|
|
18154
|
+
setTemplateElementsBySlideId((prev) => ({
|
|
18155
|
+
...prev,
|
|
18156
|
+
[updated.id]: templateElements
|
|
18157
|
+
}));
|
|
18096
18158
|
history.markDirty();
|
|
18097
18159
|
} finally {
|
|
18098
18160
|
setIsLoading(false);
|
|
18099
18161
|
}
|
|
18100
18162
|
},
|
|
18101
|
-
[handler, activeSlideIndex, ops, history]
|
|
18163
|
+
[handler, activeSlideIndex, ops, history, setTemplateElementsBySlideId]
|
|
18102
18164
|
);
|
|
18103
18165
|
return {
|
|
18104
18166
|
availableLayouts,
|
|
@@ -18628,6 +18690,12 @@ function buildToolbarProps(input) {
|
|
|
18628
18690
|
isOverflowMenuOpen: s.isOverflowMenuOpen,
|
|
18629
18691
|
onSetOverflowMenuOpen: s.setIsOverflowMenuOpen,
|
|
18630
18692
|
layoutOptions: scopedLayoutOptions,
|
|
18693
|
+
currentLayoutPath: activeSlide?.layoutPath,
|
|
18694
|
+
themeFonts: {
|
|
18695
|
+
heading: s.theme?.fontScheme?.majorFont?.latin,
|
|
18696
|
+
body: s.theme?.fontScheme?.minorFont?.latin
|
|
18697
|
+
},
|
|
18698
|
+
embeddedFontFamilies: Array.from(new Set(s.embeddedFonts.map((font) => font.name))),
|
|
18631
18699
|
onInsertSlideFromLayout: slideOps.handleInsertSlideFromLayout,
|
|
18632
18700
|
customShows: s.customShows,
|
|
18633
18701
|
activeCustomShowId: s.activeCustomShowId,
|