pptx-react-viewer 4.47.1 → 4.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/{AiChatPanel-6S4LWXGM.mjs → AiChatPanel-NKTBHT5B.mjs} +1 -1
- package/dist/AiChatPanel-NKTBHT5B.mjs.br +0 -0
- package/dist/AiChatPanel-NKTBHT5B.mjs.gz +0 -0
- package/dist/{AiChatPanel-IEM43TTZ.js → AiChatPanel-S4WNQCY4.js} +9 -9
- package/dist/AiChatPanel-S4WNQCY4.js.br +0 -0
- package/dist/AiChatPanel-S4WNQCY4.js.gz +0 -0
- package/dist/{chunk-TANR7L7E.js → chunk-5FAX7F3O.js} +1349 -1347
- package/dist/chunk-5FAX7F3O.js.br +0 -0
- package/dist/chunk-5FAX7F3O.js.gz +0 -0
- package/dist/{chunk-2I7ZAM4F.mjs → chunk-H7JRMKYC.mjs} +85 -83
- package/dist/chunk-H7JRMKYC.mjs.br +0 -0
- package/dist/chunk-H7JRMKYC.mjs.gz +0 -0
- package/dist/{chunk-MA2BI7LX.js → chunk-JAI42EXQ.js} +0 -4
- package/dist/chunk-JAI42EXQ.js.br +0 -0
- package/dist/{chunk-MA2BI7LX.js.gz → chunk-JAI42EXQ.js.gz} +0 -0
- package/dist/{chunk-BL7UYXYD.mjs → chunk-JHQHAO43.mjs} +45 -40
- package/dist/chunk-JHQHAO43.mjs.br +0 -0
- package/dist/chunk-JHQHAO43.mjs.gz +0 -0
- package/dist/{chunk-VUVBSQLT.js → chunk-JKZNL6HP.js} +238 -233
- package/dist/chunk-JKZNL6HP.js.br +0 -0
- package/dist/chunk-JKZNL6HP.js.gz +0 -0
- package/dist/{chunk-BVQSH5SS.mjs → chunk-PFV626ED.mjs} +1 -1
- package/dist/chunk-PFV626ED.mjs.br +0 -0
- package/dist/chunk-PFV626ED.mjs.gz +0 -0
- package/dist/index.js +24 -24
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +8 -1
- package/dist/internals.js +81 -81
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +2 -2
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.js +19 -19
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +3 -3
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +3 -3
- package/dist/AiChatPanel-6S4LWXGM.mjs.br +0 -0
- package/dist/AiChatPanel-6S4LWXGM.mjs.gz +0 -0
- package/dist/AiChatPanel-IEM43TTZ.js.br +0 -0
- package/dist/AiChatPanel-IEM43TTZ.js.gz +0 -0
- package/dist/chunk-2I7ZAM4F.mjs.br +0 -0
- package/dist/chunk-2I7ZAM4F.mjs.gz +0 -0
- package/dist/chunk-BL7UYXYD.mjs.br +0 -0
- package/dist/chunk-BL7UYXYD.mjs.gz +0 -0
- package/dist/chunk-BVQSH5SS.mjs.br +0 -0
- package/dist/chunk-BVQSH5SS.mjs.gz +0 -0
- package/dist/chunk-MA2BI7LX.js.br +0 -0
- package/dist/chunk-TANR7L7E.js.br +0 -0
- package/dist/chunk-TANR7L7E.js.gz +0 -0
- package/dist/chunk-VUVBSQLT.js.br +0 -0
- package/dist/chunk-VUVBSQLT.js.gz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJAI42EXQ_js = require('./chunk-JAI42EXQ.js');
|
|
4
4
|
var pptx = require('ooxml-ui/pptx');
|
|
5
5
|
var React17 = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -764,9 +764,9 @@ function serializeHistoryDocument(snapshot) {
|
|
|
764
764
|
}
|
|
765
765
|
function recordExplicitSlideUpdate(past, future, previous, before, label, maxDepth) {
|
|
766
766
|
if (previous && serializeHistoryDocument(previous) !== serializeHistoryDocument(before)) {
|
|
767
|
-
past.push(
|
|
767
|
+
past.push(chunkJAI42EXQ_js.cloneHistorySnapshot(previous));
|
|
768
768
|
}
|
|
769
|
-
past.push({ ...
|
|
769
|
+
past.push({ ...chunkJAI42EXQ_js.cloneHistorySnapshot(before), actionLabel: label });
|
|
770
770
|
while (past.length > Math.max(1, maxDepth)) {
|
|
771
771
|
past.shift();
|
|
772
772
|
}
|
|
@@ -856,8 +856,8 @@ function useEditorHistory(input) {
|
|
|
856
856
|
width: canvasSize.width,
|
|
857
857
|
height: canvasSize.height,
|
|
858
858
|
activeSlideIndex,
|
|
859
|
-
slides: slides.map(
|
|
860
|
-
templateElementsBySlideId:
|
|
859
|
+
slides: slides.map(chunkJAI42EXQ_js.cloneSlide),
|
|
860
|
+
templateElementsBySlideId: chunkJAI42EXQ_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
|
|
861
861
|
...actionLabel ? { actionLabel } : {}
|
|
862
862
|
};
|
|
863
863
|
},
|
|
@@ -870,9 +870,9 @@ function useEditorHistory(input) {
|
|
|
870
870
|
width: snapshot.width,
|
|
871
871
|
height: snapshot.height
|
|
872
872
|
});
|
|
873
|
-
setSlides(snapshot.slides.map(
|
|
873
|
+
setSlides(snapshot.slides.map(chunkJAI42EXQ_js.cloneSlide));
|
|
874
874
|
setTemplateElementsBySlideId(
|
|
875
|
-
|
|
875
|
+
chunkJAI42EXQ_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
|
|
876
876
|
);
|
|
877
877
|
setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
|
|
878
878
|
setSelectedElementIds([]);
|
|
@@ -911,8 +911,8 @@ function useEditorHistory(input) {
|
|
|
911
911
|
const currentSnapshot = buildHistorySnapshot(previousSnapshot.actionLabel);
|
|
912
912
|
historyFutureRef.current.push(currentSnapshot);
|
|
913
913
|
isApplyingHistoryRef.current = true;
|
|
914
|
-
const nextSnapshot =
|
|
915
|
-
lastHistorySnapshotRef.current =
|
|
914
|
+
const nextSnapshot = chunkJAI42EXQ_js.cloneHistorySnapshot(previousSnapshot);
|
|
915
|
+
lastHistorySnapshotRef.current = chunkJAI42EXQ_js.cloneHistorySnapshot(nextSnapshot);
|
|
916
916
|
lastHistorySerializedRef.current = serializeHistoryDocument(nextSnapshot);
|
|
917
917
|
applyHistorySnapshot(nextSnapshot);
|
|
918
918
|
updateHistoryAvailability();
|
|
@@ -933,8 +933,8 @@ function useEditorHistory(input) {
|
|
|
933
933
|
const currentSnapshot = buildHistorySnapshot(nextSnapshot.actionLabel);
|
|
934
934
|
historyPastRef.current.push(currentSnapshot);
|
|
935
935
|
isApplyingHistoryRef.current = true;
|
|
936
|
-
const targetSnapshot =
|
|
937
|
-
lastHistorySnapshotRef.current =
|
|
936
|
+
const targetSnapshot = chunkJAI42EXQ_js.cloneHistorySnapshot(nextSnapshot);
|
|
937
|
+
lastHistorySnapshotRef.current = chunkJAI42EXQ_js.cloneHistorySnapshot(targetSnapshot);
|
|
938
938
|
lastHistorySerializedRef.current = serializeHistoryDocument(targetSnapshot);
|
|
939
939
|
applyHistorySnapshot(targetSnapshot);
|
|
940
940
|
updateHistoryAvailability();
|
|
@@ -952,7 +952,7 @@ function useEditorHistory(input) {
|
|
|
952
952
|
historyPastRef.current = [];
|
|
953
953
|
historyFutureRef.current = [];
|
|
954
954
|
if (initialSnapshot) {
|
|
955
|
-
const clonedInitial =
|
|
955
|
+
const clonedInitial = chunkJAI42EXQ_js.cloneHistorySnapshot(initialSnapshot);
|
|
956
956
|
lastHistorySnapshotRef.current = clonedInitial;
|
|
957
957
|
lastHistorySerializedRef.current = serializeHistoryDocument(clonedInitial);
|
|
958
958
|
} else {
|
|
@@ -1034,8 +1034,8 @@ function useEditorHistory(input) {
|
|
|
1034
1034
|
updateHistoryAvailability
|
|
1035
1035
|
]);
|
|
1036
1036
|
const commitSlides = (nextSlides, label, beforeSlides = slides) => {
|
|
1037
|
-
const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(
|
|
1038
|
-
const after = { ...before, slides: nextSlides.map(
|
|
1037
|
+
const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(chunkJAI42EXQ_js.cloneSlide) };
|
|
1038
|
+
const after = { ...before, slides: nextSlides.map(chunkJAI42EXQ_js.cloneSlide) };
|
|
1039
1039
|
recordExplicitSlideUpdate(
|
|
1040
1040
|
historyPastRef.current,
|
|
1041
1041
|
historyFutureRef.current,
|
|
@@ -1044,7 +1044,7 @@ function useEditorHistory(input) {
|
|
|
1044
1044
|
label,
|
|
1045
1045
|
maxHistoryEntries
|
|
1046
1046
|
);
|
|
1047
|
-
lastHistorySnapshotRef.current =
|
|
1047
|
+
lastHistorySnapshotRef.current = chunkJAI42EXQ_js.cloneHistorySnapshot(after);
|
|
1048
1048
|
lastHistorySerializedRef.current = serializeHistoryDocument(after);
|
|
1049
1049
|
isApplyingHistoryRef.current = false;
|
|
1050
1050
|
setSlides(nextSlides);
|
|
@@ -1230,22 +1230,22 @@ function useZoomViewport({
|
|
|
1230
1230
|
selectedElements.forEach((element) => {
|
|
1231
1231
|
minX = Math.min(minX, element.x);
|
|
1232
1232
|
minY = Math.min(minY, element.y);
|
|
1233
|
-
maxX = Math.max(maxX, element.x + Math.max(element.width,
|
|
1234
|
-
maxY = Math.max(maxY, element.y + Math.max(element.height,
|
|
1233
|
+
maxX = Math.max(maxX, element.x + Math.max(element.width, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE));
|
|
1234
|
+
maxY = Math.max(maxY, element.y + Math.max(element.height, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE));
|
|
1235
1235
|
});
|
|
1236
1236
|
if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
|
|
1237
1237
|
return;
|
|
1238
1238
|
}
|
|
1239
1239
|
const selectionBounds = { minX, minY, maxX, maxY };
|
|
1240
|
-
const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX,
|
|
1241
|
-
const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY,
|
|
1240
|
+
const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE);
|
|
1241
|
+
const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE);
|
|
1242
1242
|
const availableWidth = Math.max(
|
|
1243
|
-
effectiveEditorDimensions.width -
|
|
1244
|
-
|
|
1243
|
+
effectiveEditorDimensions.width - chunkJAI42EXQ_js.ZOOM_TO_SELECTION_PADDING,
|
|
1244
|
+
chunkJAI42EXQ_js.MIN_ELEMENT_SIZE
|
|
1245
1245
|
);
|
|
1246
1246
|
const availableHeight = Math.max(
|
|
1247
|
-
effectiveEditorDimensions.height -
|
|
1248
|
-
|
|
1247
|
+
effectiveEditorDimensions.height - chunkJAI42EXQ_js.ZOOM_TO_SELECTION_PADDING,
|
|
1248
|
+
chunkJAI42EXQ_js.MIN_ELEMENT_SIZE
|
|
1249
1249
|
);
|
|
1250
1250
|
const targetEditorScale = Math.min(
|
|
1251
1251
|
availableWidth / boundsWidth,
|
|
@@ -4212,8 +4212,8 @@ function useViewerCoreState(_input) {
|
|
|
4212
4212
|
const { slides, setSlides, slidesRef } = useSlideState();
|
|
4213
4213
|
const [templateElementsBySlideId, setTemplateElementsBySlideId] = React17.useState({});
|
|
4214
4214
|
const [canvasSize, setCanvasSize] = React17.useState({
|
|
4215
|
-
width:
|
|
4216
|
-
height:
|
|
4215
|
+
width: chunkJAI42EXQ_js.DEFAULT_CANVAS_WIDTH,
|
|
4216
|
+
height: chunkJAI42EXQ_js.DEFAULT_CANVAS_HEIGHT
|
|
4217
4217
|
});
|
|
4218
4218
|
const [slideSizeEmu, setSlideSizeEmu] = React17.useState();
|
|
4219
4219
|
const [activeSlideIndex, setActiveSlideIndex] = React17.useState(0);
|
|
@@ -4686,12 +4686,12 @@ function useLoadContent({
|
|
|
4686
4686
|
}
|
|
4687
4687
|
resources.commit();
|
|
4688
4688
|
handlerRef.current = handler;
|
|
4689
|
-
const partition =
|
|
4689
|
+
const partition = chunkJAI42EXQ_js.partitionTemplateElements(nextSlides);
|
|
4690
4690
|
setSlides(partition.slides);
|
|
4691
4691
|
setTemplateElementsBySlideId(partition.templateElementsBySlideId);
|
|
4692
4692
|
setCanvasSize({
|
|
4693
|
-
width: parsed.width ??
|
|
4694
|
-
height: parsed.height ??
|
|
4693
|
+
width: parsed.width ?? chunkJAI42EXQ_js.DEFAULT_CANVAS_WIDTH,
|
|
4694
|
+
height: parsed.height ?? chunkJAI42EXQ_js.DEFAULT_CANVAS_HEIGHT
|
|
4695
4695
|
});
|
|
4696
4696
|
setSlideSizeEmu(
|
|
4697
4697
|
typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
|
|
@@ -5150,7 +5150,7 @@ function useElementOperations(input) {
|
|
|
5150
5150
|
);
|
|
5151
5151
|
return;
|
|
5152
5152
|
}
|
|
5153
|
-
if (
|
|
5153
|
+
if (chunkJAI42EXQ_js.isTemplateElementId(elementId)) {
|
|
5154
5154
|
const slideId = activeSlide?.id;
|
|
5155
5155
|
if (slideId) {
|
|
5156
5156
|
setTemplateElementsBySlideId((prev) => ({
|
|
@@ -5390,15 +5390,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
|
|
|
5390
5390
|
// src/viewer/hooks/pointer-move-handlers.ts
|
|
5391
5391
|
function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
|
|
5392
5392
|
const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
|
|
5393
|
-
let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize:
|
|
5393
|
+
let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkJAI42EXQ_js.MIN_ELEMENT_SIZE });
|
|
5394
5394
|
if (lockAspect) {
|
|
5395
|
-
resized = pptx.lockResizeAspect(resized, startBox, handle,
|
|
5395
|
+
resized = pptx.lockResizeAspect(resized, startBox, handle, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE);
|
|
5396
5396
|
}
|
|
5397
5397
|
const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
|
|
5398
5398
|
if (!snapToGrid) {
|
|
5399
5399
|
return box;
|
|
5400
5400
|
}
|
|
5401
|
-
return pptx.snapBoxToGrid(box, handle, gridSpacingPx,
|
|
5401
|
+
return pptx.snapBoxToGrid(box, handle, gridSpacingPx, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE);
|
|
5402
5402
|
}
|
|
5403
5403
|
function resolveLiveTarget(input) {
|
|
5404
5404
|
const { livePatcher, editTemplateMode, activeSlide } = input;
|
|
@@ -5511,7 +5511,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
|
|
|
5511
5511
|
width: el.width,
|
|
5512
5512
|
height: el.height
|
|
5513
5513
|
}));
|
|
5514
|
-
const snapResult =
|
|
5514
|
+
const snapResult = chunkJAI42EXQ_js.computeSnapToShape(
|
|
5515
5515
|
targetX,
|
|
5516
5516
|
targetY,
|
|
5517
5517
|
primaryEl.width,
|
|
@@ -5585,8 +5585,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
|
|
|
5585
5585
|
rs.lastY = geo.y;
|
|
5586
5586
|
rs.lastWidth = geo.width;
|
|
5587
5587
|
rs.lastHeight = geo.height;
|
|
5588
|
-
const width = Math.max(geo.width,
|
|
5589
|
-
const height = Math.max(geo.height,
|
|
5588
|
+
const width = Math.max(geo.width, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE);
|
|
5589
|
+
const height = Math.max(geo.height, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE);
|
|
5590
5590
|
if (rs.domEl) {
|
|
5591
5591
|
rs.domEl.style.left = `${geo.x}px`;
|
|
5592
5592
|
rs.domEl.style.top = `${geo.y}px`;
|
|
@@ -5679,13 +5679,13 @@ function processPointerUp(input) {
|
|
|
5679
5679
|
if (i !== activeSlideIndex) {
|
|
5680
5680
|
return s;
|
|
5681
5681
|
}
|
|
5682
|
-
const rerouted =
|
|
5682
|
+
const rerouted = chunkJAI42EXQ_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
|
|
5683
5683
|
if (rerouted.length === 0) {
|
|
5684
5684
|
return s;
|
|
5685
5685
|
}
|
|
5686
5686
|
return {
|
|
5687
5687
|
...s,
|
|
5688
|
-
elements:
|
|
5688
|
+
elements: chunkJAI42EXQ_js.applyReroutedConnectors(s.elements, rerouted)
|
|
5689
5689
|
};
|
|
5690
5690
|
})
|
|
5691
5691
|
);
|
|
@@ -5737,8 +5737,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
|
|
|
5737
5737
|
}
|
|
5738
5738
|
return { ...el, x: start.x + dx, y: start.y + dy };
|
|
5739
5739
|
});
|
|
5740
|
-
const rerouted =
|
|
5741
|
-
return
|
|
5740
|
+
const rerouted = chunkJAI42EXQ_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
|
|
5741
|
+
return chunkJAI42EXQ_js.applyReroutedConnectors(movedElements, rerouted);
|
|
5742
5742
|
};
|
|
5743
5743
|
if (editTemplateMode) {
|
|
5744
5744
|
const slideId = activeSlide?.id;
|
|
@@ -6497,7 +6497,7 @@ function createStructuredElementHandlers(deps) {
|
|
|
6497
6497
|
return;
|
|
6498
6498
|
}
|
|
6499
6499
|
const resolved = resolveHyperlinkEditResult(data);
|
|
6500
|
-
if (resolved.url && !
|
|
6500
|
+
if (resolved.url && !chunkJAI42EXQ_js.isUrlSafe(resolved.url)) {
|
|
6501
6501
|
return;
|
|
6502
6502
|
}
|
|
6503
6503
|
const actionClick = {
|
|
@@ -6543,7 +6543,7 @@ function createStructuredElementHandlers(deps) {
|
|
|
6543
6543
|
if (!activeSlide) {
|
|
6544
6544
|
return;
|
|
6545
6545
|
}
|
|
6546
|
-
const preset =
|
|
6546
|
+
const preset = chunkJAI42EXQ_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
|
|
6547
6547
|
if (!preset) {
|
|
6548
6548
|
return;
|
|
6549
6549
|
}
|
|
@@ -6630,7 +6630,7 @@ function useInsertElements(input) {
|
|
|
6630
6630
|
width: 300,
|
|
6631
6631
|
height: 60,
|
|
6632
6632
|
text: "",
|
|
6633
|
-
textStyle: { fontSize:
|
|
6633
|
+
textStyle: { fontSize: chunkJAI42EXQ_js.DEFAULT_TEXT_FONT_SIZE }
|
|
6634
6634
|
});
|
|
6635
6635
|
};
|
|
6636
6636
|
const handleAddShape = () => {
|
|
@@ -6652,7 +6652,7 @@ function useInsertElements(input) {
|
|
|
6652
6652
|
}
|
|
6653
6653
|
});
|
|
6654
6654
|
};
|
|
6655
|
-
const handleAddTable = (rows =
|
|
6655
|
+
const handleAddTable = (rows = chunkJAI42EXQ_js.DEFAULT_TABLE_ROWS, columns = chunkJAI42EXQ_js.DEFAULT_TABLE_COLUMNS) => {
|
|
6656
6656
|
if (!activeSlide) {
|
|
6657
6657
|
return;
|
|
6658
6658
|
}
|
|
@@ -6826,7 +6826,7 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
6826
6826
|
history
|
|
6827
6827
|
} = input;
|
|
6828
6828
|
const updateElementsOwning = (elementId, updater) => {
|
|
6829
|
-
if (editTemplateMode && !
|
|
6829
|
+
if (editTemplateMode && !chunkJAI42EXQ_js.isTemplateElementId(elementId)) {
|
|
6830
6830
|
ops.updateSlides(
|
|
6831
6831
|
(prev) => prev.map(
|
|
6832
6832
|
(slide, index) => index === activeSlideIndex ? { ...slide, elements: updater(slide.elements) } : slide
|
|
@@ -6860,9 +6860,9 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
6860
6860
|
return;
|
|
6861
6861
|
}
|
|
6862
6862
|
const group = selectedElement;
|
|
6863
|
-
const intoTemplate =
|
|
6863
|
+
const intoTemplate = chunkJAI42EXQ_js.isTemplateElementId(group.id);
|
|
6864
6864
|
const childIds = group.children.map(
|
|
6865
|
-
(child) => intoTemplate ?
|
|
6865
|
+
(child) => intoTemplate ? chunkJAI42EXQ_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
|
|
6866
6866
|
);
|
|
6867
6867
|
const { elements, childIds: usedIds } = pptx.ungroupElements(
|
|
6868
6868
|
ops.activeElements,
|
|
@@ -7298,7 +7298,7 @@ function createTableMergeHandlers(input) {
|
|
|
7298
7298
|
if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
|
|
7299
7299
|
return;
|
|
7300
7300
|
}
|
|
7301
|
-
const newTableData =
|
|
7301
|
+
const newTableData = chunkJAI42EXQ_js.mergeCells(
|
|
7302
7302
|
[
|
|
7303
7303
|
{ row: rowIndex, col: columnIndex },
|
|
7304
7304
|
{ row: rowIndex, col: nextColIdx }
|
|
@@ -7306,7 +7306,7 @@ function createTableMergeHandlers(input) {
|
|
|
7306
7306
|
td
|
|
7307
7307
|
);
|
|
7308
7308
|
const updates = { tableData: newTableData };
|
|
7309
|
-
const newRawXml =
|
|
7309
|
+
const newRawXml = chunkJAI42EXQ_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
|
|
7310
7310
|
if (newRawXml) {
|
|
7311
7311
|
updates.rawXml = newRawXml;
|
|
7312
7312
|
}
|
|
@@ -7332,7 +7332,7 @@ function createTableMergeHandlers(input) {
|
|
|
7332
7332
|
if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
|
|
7333
7333
|
return;
|
|
7334
7334
|
}
|
|
7335
|
-
const newTableData =
|
|
7335
|
+
const newTableData = chunkJAI42EXQ_js.mergeCells(
|
|
7336
7336
|
[
|
|
7337
7337
|
{ row: rowIndex, col: columnIndex },
|
|
7338
7338
|
{ row: targetNextRowIdx, col: columnIndex }
|
|
@@ -7340,7 +7340,7 @@ function createTableMergeHandlers(input) {
|
|
|
7340
7340
|
td
|
|
7341
7341
|
);
|
|
7342
7342
|
const updates = { tableData: newTableData };
|
|
7343
|
-
const newRawXml =
|
|
7343
|
+
const newRawXml = chunkJAI42EXQ_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
|
|
7344
7344
|
if (newRawXml) {
|
|
7345
7345
|
updates.rawXml = newRawXml;
|
|
7346
7346
|
}
|
|
@@ -7355,9 +7355,9 @@ function createTableMergeHandlers(input) {
|
|
|
7355
7355
|
return;
|
|
7356
7356
|
}
|
|
7357
7357
|
const td = selectedElement.tableData;
|
|
7358
|
-
const newTableData =
|
|
7358
|
+
const newTableData = chunkJAI42EXQ_js.mergeCells(ts.selectedCells, td);
|
|
7359
7359
|
const updates = { tableData: newTableData };
|
|
7360
|
-
const newRawXml =
|
|
7360
|
+
const newRawXml = chunkJAI42EXQ_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
|
|
7361
7361
|
if (newRawXml) {
|
|
7362
7362
|
updates.rawXml = newRawXml;
|
|
7363
7363
|
}
|
|
@@ -7374,9 +7374,9 @@ function createTableMergeHandlers(input) {
|
|
|
7374
7374
|
}
|
|
7375
7375
|
const { rowIndex, columnIndex } = ts;
|
|
7376
7376
|
const td = selectedElement.tableData;
|
|
7377
|
-
const newTableData =
|
|
7377
|
+
const newTableData = chunkJAI42EXQ_js.splitCell(rowIndex, columnIndex, td);
|
|
7378
7378
|
const updates = { tableData: newTableData };
|
|
7379
|
-
const newRawXml =
|
|
7379
|
+
const newRawXml = chunkJAI42EXQ_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
|
|
7380
7380
|
if (newRawXml) {
|
|
7381
7381
|
updates.rawXml = newRawXml;
|
|
7382
7382
|
}
|
|
@@ -7411,7 +7411,7 @@ function createTableStructHandlers(input) {
|
|
|
7411
7411
|
updates.tableData = pptx.setCellText(el, rowIndex, colIndex, text).tableData;
|
|
7412
7412
|
}
|
|
7413
7413
|
if (el.rawXml) {
|
|
7414
|
-
const newRawXml =
|
|
7414
|
+
const newRawXml = chunkJAI42EXQ_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
|
|
7415
7415
|
if (newRawXml) {
|
|
7416
7416
|
updates.rawXml = newRawXml;
|
|
7417
7417
|
}
|
|
@@ -7435,7 +7435,7 @@ function createTableStructHandlers(input) {
|
|
|
7435
7435
|
const { rowIndex, columnIndex: colIndex } = ts;
|
|
7436
7436
|
const updates = {};
|
|
7437
7437
|
if (selectedElement.rawXml) {
|
|
7438
|
-
const newRawXml =
|
|
7438
|
+
const newRawXml = chunkJAI42EXQ_js.updateCellTextStyleInRawXml(
|
|
7439
7439
|
selectedElement,
|
|
7440
7440
|
rowIndex,
|
|
7441
7441
|
colIndex,
|
|
@@ -7611,7 +7611,7 @@ function useExportSaveAs(input) {
|
|
|
7611
7611
|
const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
|
|
7612
7612
|
const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
|
|
7613
7613
|
const data = {
|
|
7614
|
-
slides:
|
|
7614
|
+
slides: chunkJAI42EXQ_js.buildSaveSlides(slides, templateElementsBySlideId),
|
|
7615
7615
|
width: canvasSize.width,
|
|
7616
7616
|
height: canvasSize.height,
|
|
7617
7617
|
widthEmu: slideSize.widthEmu,
|
|
@@ -7773,7 +7773,7 @@ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActi
|
|
|
7773
7773
|
}
|
|
7774
7774
|
function tilesToPdfPage(tilesResult) {
|
|
7775
7775
|
return tilesResult.tiles.map((tile) => ({
|
|
7776
|
-
image:
|
|
7776
|
+
image: chunkJAI42EXQ_js.canvasToJpegData(tile.canvas),
|
|
7777
7777
|
placement: pptx.placeTileOnPage(
|
|
7778
7778
|
tile,
|
|
7779
7779
|
tilesResult.fullWidth,
|
|
@@ -7806,7 +7806,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
|
|
|
7806
7806
|
if (pages.length === 0) {
|
|
7807
7807
|
throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
|
|
7808
7808
|
}
|
|
7809
|
-
const pdfBlobUrl =
|
|
7809
|
+
const pdfBlobUrl = chunkJAI42EXQ_js.buildPdfFromTiledImageData(pages);
|
|
7810
7810
|
pptx.downloadDataUrl(pdfBlobUrl, filename);
|
|
7811
7811
|
}
|
|
7812
7812
|
async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
|
|
@@ -7836,7 +7836,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
|
|
|
7836
7836
|
if (pages.length === 0) {
|
|
7837
7837
|
throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
|
|
7838
7838
|
}
|
|
7839
|
-
const pdfDataUrl =
|
|
7839
|
+
const pdfDataUrl = chunkJAI42EXQ_js.buildNotesPdf(pages);
|
|
7840
7840
|
pptx.downloadDataUrl(pdfDataUrl, filename);
|
|
7841
7841
|
}
|
|
7842
7842
|
async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
|
|
@@ -8939,7 +8939,7 @@ function usePropertyHandlers(input) {
|
|
|
8939
8939
|
width: canvasSize.width,
|
|
8940
8940
|
height: canvasSize.height
|
|
8941
8941
|
};
|
|
8942
|
-
setCompareResult(
|
|
8942
|
+
setCompareResult(chunkJAI42EXQ_js.comparePresentation(cur, other));
|
|
8943
8943
|
setIsComparePanelOpen(true);
|
|
8944
8944
|
} catch (err) {
|
|
8945
8945
|
console.warn("Compare failed:", err);
|
|
@@ -9292,7 +9292,7 @@ function useViewerDialogs(input) {
|
|
|
9292
9292
|
};
|
|
9293
9293
|
}
|
|
9294
9294
|
function computeGridSpacingPx(documentGridSpacing) {
|
|
9295
|
-
return pptx.computeGridSpacingPx(documentGridSpacing,
|
|
9295
|
+
return pptx.computeGridSpacingPx(documentGridSpacing, chunkJAI42EXQ_js.GRID_SIZE);
|
|
9296
9296
|
}
|
|
9297
9297
|
function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
|
|
9298
9298
|
const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
|
|
@@ -9301,7 +9301,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
|
|
|
9301
9301
|
}
|
|
9302
9302
|
function computeSlideSectionGroups(slides, sections) {
|
|
9303
9303
|
return pptx.groupSlidesBySection(sections, slides).map((group) => ({
|
|
9304
|
-
id: group.section?.id ?? (sections.length > 0 ?
|
|
9304
|
+
id: group.section?.id ?? (sections.length > 0 ? chunkJAI42EXQ_js.UNGROUPED_SECTION_ID : chunkJAI42EXQ_js.DEFAULT_SECTION_GROUP_ID),
|
|
9305
9305
|
label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
|
|
9306
9306
|
slideIndexes: group.slideIndexes,
|
|
9307
9307
|
...group.section?.color !== void 0 ? { color: group.section.color } : {},
|
|
@@ -9346,10 +9346,10 @@ function useDerivedSlideState(input) {
|
|
|
9346
9346
|
);
|
|
9347
9347
|
const slideSectionGroups = React17.useMemo(
|
|
9348
9348
|
() => computeSlideSectionGroups(slides, sections).map((group) => {
|
|
9349
|
-
if (group.id ===
|
|
9349
|
+
if (group.id === chunkJAI42EXQ_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
|
|
9350
9350
|
return { ...group, label: t("pptx.slides.ungroupedSlides") };
|
|
9351
9351
|
}
|
|
9352
|
-
if (group.id ===
|
|
9352
|
+
if (group.id === chunkJAI42EXQ_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
|
|
9353
9353
|
return { ...group, label: t("pptx.sections.slides") };
|
|
9354
9354
|
}
|
|
9355
9355
|
return group;
|
|
@@ -9456,7 +9456,7 @@ function useAnnotationHandlers(input) {
|
|
|
9456
9456
|
if (nextMode === "present") {
|
|
9457
9457
|
presentation.enterPresentMode();
|
|
9458
9458
|
} else if (mode === "present" && annotations.hasAnyAnnotations) {
|
|
9459
|
-
|
|
9459
|
+
chunkJAI42EXQ_js.stopAllPersistentAudio();
|
|
9460
9460
|
if (promptKeepInkAnnotations) {
|
|
9461
9461
|
pendingModeAfterAnnotationsRef.current = nextMode;
|
|
9462
9462
|
setShowKeepAnnotationsDialog(true);
|
|
@@ -9466,7 +9466,7 @@ function useAnnotationHandlers(input) {
|
|
|
9466
9466
|
}
|
|
9467
9467
|
} else {
|
|
9468
9468
|
if (mode === "present") {
|
|
9469
|
-
|
|
9469
|
+
chunkJAI42EXQ_js.stopAllPersistentAudio();
|
|
9470
9470
|
}
|
|
9471
9471
|
setMode(nextMode);
|
|
9472
9472
|
}
|
|
@@ -9633,7 +9633,7 @@ function useSerialize(input) {
|
|
|
9633
9633
|
guides: pptxGuides.length > 0 ? pptxGuides : void 0
|
|
9634
9634
|
};
|
|
9635
9635
|
});
|
|
9636
|
-
const slidesToSave =
|
|
9636
|
+
const slidesToSave = chunkJAI42EXQ_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
|
|
9637
9637
|
const saveOptions = pptx.buildDeckSaveOptions({
|
|
9638
9638
|
// Without this the Slide Size card edited a viewer-only pixel value and
|
|
9639
9639
|
// the saved `p:sldSz` never moved: passing `slideSize` is the only way a
|
|
@@ -9826,7 +9826,7 @@ function usePresentationSetup(input) {
|
|
|
9826
9826
|
return;
|
|
9827
9827
|
}
|
|
9828
9828
|
if (mode === "present" && nextMode !== "present") {
|
|
9829
|
-
|
|
9829
|
+
chunkJAI42EXQ_js.stopAllPersistentAudio();
|
|
9830
9830
|
stopAnimationSound();
|
|
9831
9831
|
const exitHandler = exitModeHandlerRef.current;
|
|
9832
9832
|
if (exitHandler) {
|
|
@@ -9947,7 +9947,7 @@ function useCanvasImagePaste(input) {
|
|
|
9947
9947
|
);
|
|
9948
9948
|
}
|
|
9949
9949
|
function formatPatchFor(element, format) {
|
|
9950
|
-
const updated =
|
|
9950
|
+
const updated = chunkJAI42EXQ_js.applyFormatToElement(element, format);
|
|
9951
9951
|
const updates = {};
|
|
9952
9952
|
if (pptx$1.hasShapeProperties(updated)) {
|
|
9953
9953
|
updates.shapeStyle = updated.shapeStyle;
|
|
@@ -9970,7 +9970,7 @@ function useFormatPainterEditing(input) {
|
|
|
9970
9970
|
const prevFormatPainterRef = React17.useRef(false);
|
|
9971
9971
|
React17.useEffect(() => {
|
|
9972
9972
|
if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
|
|
9973
|
-
copiedFormatRef.current =
|
|
9973
|
+
copiedFormatRef.current = chunkJAI42EXQ_js.copyFormatFromElement(selectedElement);
|
|
9974
9974
|
} else if (!formatPainterActive) {
|
|
9975
9975
|
copiedFormatRef.current = null;
|
|
9976
9976
|
}
|
|
@@ -11662,7 +11662,7 @@ function useCollaborationWriteBack(input) {
|
|
|
11662
11662
|
getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
|
|
11663
11663
|
getSaveOptions: () => latest.current.getSaveOptions?.(),
|
|
11664
11664
|
getTemplateElements: () => latest.current.templateElementsBySlideId,
|
|
11665
|
-
mergeTemplateElements:
|
|
11665
|
+
mergeTemplateElements: chunkJAI42EXQ_js.buildSaveSlides,
|
|
11666
11666
|
onWriteBackStatus: () => latest.current.onWriteBackStatus?.(
|
|
11667
11667
|
pptx.writeBackReport(latest.current.config, created.getState())
|
|
11668
11668
|
)
|
|
@@ -12221,8 +12221,8 @@ function useTouchGestures(input) {
|
|
|
12221
12221
|
}
|
|
12222
12222
|
const recognizer = pptx.createTouchGestureRecognizer({
|
|
12223
12223
|
getScale: () => scaleRef.current,
|
|
12224
|
-
minScale:
|
|
12225
|
-
maxScale:
|
|
12224
|
+
minScale: chunkJAI42EXQ_js.MIN_ZOOM_SCALE,
|
|
12225
|
+
maxScale: chunkJAI42EXQ_js.MAX_ZOOM_SCALE,
|
|
12226
12226
|
callbacks: {
|
|
12227
12227
|
onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
|
|
12228
12228
|
onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
|
|
@@ -12346,7 +12346,7 @@ function buildCanvasProps(input) {
|
|
|
12346
12346
|
if (pptx.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
|
|
12347
12347
|
return;
|
|
12348
12348
|
}
|
|
12349
|
-
|
|
12349
|
+
chunkJAI42EXQ_js.safeOpenUrl(url, target);
|
|
12350
12350
|
};
|
|
12351
12351
|
const handleActionClick = (elementId, action) => {
|
|
12352
12352
|
if (mode === "present") {
|
|
@@ -12361,9 +12361,9 @@ function buildCanvasProps(input) {
|
|
|
12361
12361
|
}
|
|
12362
12362
|
};
|
|
12363
12363
|
const handleHyperlinkClick = (url, target) => {
|
|
12364
|
-
if (
|
|
12364
|
+
if (chunkJAI42EXQ_js.isPpactionUrl(url)) {
|
|
12365
12365
|
if (mode === "present") {
|
|
12366
|
-
const parsed =
|
|
12366
|
+
const parsed = chunkJAI42EXQ_js.parsePpactionUrl(url);
|
|
12367
12367
|
if (parsed) {
|
|
12368
12368
|
presentation.handlePresentationAction({
|
|
12369
12369
|
action: parsed.action,
|
|
@@ -12790,7 +12790,7 @@ function buildToolbarProps(input) {
|
|
|
12790
12790
|
markDirty: history.markDirty
|
|
12791
12791
|
}),
|
|
12792
12792
|
formatPainterActive: s.formatPainterActive,
|
|
12793
|
-
canActivateFormatPainter:
|
|
12793
|
+
canActivateFormatPainter: chunkJAI42EXQ_js.hasCopyableFormat(selectedElement),
|
|
12794
12794
|
onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
|
|
12795
12795
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
12796
12796
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -13694,23 +13694,23 @@ function ColorChangedImage({
|
|
|
13694
13694
|
className,
|
|
13695
13695
|
alt
|
|
13696
13696
|
}) {
|
|
13697
|
-
const tolerance = tolerancePct ??
|
|
13698
|
-
const cacheKey =
|
|
13697
|
+
const tolerance = tolerancePct ?? chunkJAI42EXQ_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
|
|
13698
|
+
const cacheKey = chunkJAI42EXQ_js.buildCacheKey(
|
|
13699
13699
|
src,
|
|
13700
13700
|
clrChange.clrFrom,
|
|
13701
13701
|
clrChange.clrTo,
|
|
13702
13702
|
tolerance,
|
|
13703
13703
|
Boolean(clrChange.clrToTransparent)
|
|
13704
13704
|
);
|
|
13705
|
-
const cached =
|
|
13705
|
+
const cached = chunkJAI42EXQ_js.getCachedResult(cacheKey);
|
|
13706
13706
|
const [processedSrc, setProcessedSrc] = React17.useState(cached ?? null);
|
|
13707
13707
|
React17.useEffect(() => {
|
|
13708
|
-
if (
|
|
13709
|
-
setProcessedSrc(
|
|
13708
|
+
if (chunkJAI42EXQ_js.getCachedResult(cacheKey)) {
|
|
13709
|
+
setProcessedSrc(chunkJAI42EXQ_js.getCachedResult(cacheKey) ?? null);
|
|
13710
13710
|
return;
|
|
13711
13711
|
}
|
|
13712
13712
|
let cancelled = false;
|
|
13713
|
-
|
|
13713
|
+
chunkJAI42EXQ_js.applyColorChange(
|
|
13714
13714
|
src,
|
|
13715
13715
|
clrChange.clrFrom,
|
|
13716
13716
|
clrChange.clrTo,
|
|
@@ -13718,7 +13718,7 @@ function ColorChangedImage({
|
|
|
13718
13718
|
Boolean(clrChange.clrToTransparent)
|
|
13719
13719
|
).then((result) => {
|
|
13720
13720
|
if (!cancelled) {
|
|
13721
|
-
|
|
13721
|
+
chunkJAI42EXQ_js.setCachedResult(cacheKey, result.dataUrl);
|
|
13722
13722
|
setProcessedSrc(result.dataUrl);
|
|
13723
13723
|
}
|
|
13724
13724
|
return void 0;
|
|
@@ -13810,7 +13810,7 @@ function TiledImageLayer({
|
|
|
13810
13810
|
cancelled = true;
|
|
13811
13811
|
};
|
|
13812
13812
|
}, [src]);
|
|
13813
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...
|
|
13813
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunkJAI42EXQ_js.getImageTilingStyle(element, nativeSize), ...style } });
|
|
13814
13814
|
}
|
|
13815
13815
|
function renderImageEffectDefinitions(element, excludeDuotone = false) {
|
|
13816
13816
|
return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13879,7 +13879,7 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13879
13879
|
...filter ? { filter } : {},
|
|
13880
13880
|
...opacity !== void 0 ? { opacity } : {}
|
|
13881
13881
|
};
|
|
13882
|
-
if (
|
|
13882
|
+
if (chunkJAI42EXQ_js.isImageTiled(el)) {
|
|
13883
13883
|
const tileSrc = imgSrc(el);
|
|
13884
13884
|
if (!tileSrc) {
|
|
13885
13885
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-gray-500 bg-gray-100", children: "Image" });
|
|
@@ -13901,9 +13901,9 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13901
13901
|
pptx$1.isImageLikeElement(el) ? el.imageEffects?.colorWash : void 0
|
|
13902
13902
|
);
|
|
13903
13903
|
const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
|
|
13904
|
-
const duotoneColors =
|
|
13904
|
+
const duotoneColors = chunkJAI42EXQ_js.getDuotoneColors(el);
|
|
13905
13905
|
const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
|
|
13906
|
-
const filterForImg = useDuotoneCanvas ?
|
|
13906
|
+
const filterForImg = useDuotoneCanvas ? chunkJAI42EXQ_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
|
|
13907
13907
|
const canvasEffectStyles = {
|
|
13908
13908
|
...filterForImg ? { filter: filterForImg } : {},
|
|
13909
13909
|
...opacity !== void 0 ? { opacity } : {}
|
|
@@ -13979,10 +13979,10 @@ function SlideBackgroundImageLayer({
|
|
|
13979
13979
|
style: { zIndex: 0 },
|
|
13980
13980
|
children: renderImg(
|
|
13981
13981
|
backgroundElement,
|
|
13982
|
-
|
|
13983
|
-
|
|
13982
|
+
chunkJAI42EXQ_js.getImageRenderStyle(backgroundElement),
|
|
13983
|
+
chunkJAI42EXQ_js.getImageEffectsFilter(backgroundElement),
|
|
13984
13984
|
"",
|
|
13985
|
-
|
|
13985
|
+
chunkJAI42EXQ_js.getImageEffectsOpacity(backgroundElement)
|
|
13986
13986
|
)
|
|
13987
13987
|
}
|
|
13988
13988
|
);
|
|
@@ -14268,7 +14268,7 @@ function ChartElementView({
|
|
|
14268
14268
|
pptx.getBarFacePicturePixelSampleVersion
|
|
14269
14269
|
);
|
|
14270
14270
|
const viewModel = React17.useMemo(() => {
|
|
14271
|
-
return canEdit ?
|
|
14271
|
+
return canEdit ? chunkJAI42EXQ_js.buildReactChartViewModel(element) : null;
|
|
14272
14272
|
}, [canEdit, element, barFacePictureSampleVersion]);
|
|
14273
14273
|
React17.useEffect(pptx.ensureChartInteractionStyles, []);
|
|
14274
14274
|
React17.useEffect(() => {
|
|
@@ -14373,9 +14373,9 @@ function ChartElementView({
|
|
|
14373
14373
|
textStyle: animationState?.textStyle,
|
|
14374
14374
|
onSelect: chart3D.onSelect,
|
|
14375
14375
|
onDrag: chart3D.onDrag,
|
|
14376
|
-
children:
|
|
14376
|
+
children: chunkJAI42EXQ_js.renderChartElement(renderedElement, (key) => t(key))
|
|
14377
14377
|
}
|
|
14378
|
-
) :
|
|
14378
|
+
) : chunkJAI42EXQ_js.renderChartElement(renderedElement, (key) => t(key)),
|
|
14379
14379
|
dragValue !== null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1 right-1 z-10 rounded bg-primary/90 px-1.5 py-0.5 text-[10px] font-medium text-white pointer-events-none", children: pptx.formatAxisValue(dragValue) }),
|
|
14380
14380
|
titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14381
14381
|
"input",
|
|
@@ -14705,7 +14705,7 @@ function ResizeHandles({
|
|
|
14705
14705
|
"aria-label": t("pptx.selectionOverlay.resize", { handle }),
|
|
14706
14706
|
"data-pptx-handle-kind": "resize",
|
|
14707
14707
|
"data-pptx-compact": true,
|
|
14708
|
-
className:
|
|
14708
|
+
className: chunkJAI42EXQ_js.cn(
|
|
14709
14709
|
"absolute z-10 group border-0 bg-transparent p-0",
|
|
14710
14710
|
RESIZE_DEFAULT_CLASSES,
|
|
14711
14711
|
posClass,
|
|
@@ -14731,7 +14731,7 @@ function ResizeHandles({
|
|
|
14731
14731
|
"div",
|
|
14732
14732
|
{
|
|
14733
14733
|
"data-pptx-handle-hit": true,
|
|
14734
|
-
className:
|
|
14734
|
+
className: chunkJAI42EXQ_js.cn(
|
|
14735
14735
|
"absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
|
|
14736
14736
|
corner ? "max-md:-inset-1.5 max-md:[--pptx-handle-hit-inset:-6px]" : "max-md:-inset-2 max-md:[--pptx-handle-hit-inset:-8px]"
|
|
14737
14737
|
),
|
|
@@ -14752,7 +14752,7 @@ function ResizeHandles({
|
|
|
14752
14752
|
"aria-label": t("pptx.selectionOverlay.rotate"),
|
|
14753
14753
|
"data-pptx-handle-kind": "rotate",
|
|
14754
14754
|
"data-pptx-compact": true,
|
|
14755
|
-
className:
|
|
14755
|
+
className: chunkJAI42EXQ_js.cn(
|
|
14756
14756
|
"absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 z-20 border-0 bg-transparent p-0 cursor-grab active:cursor-grabbing",
|
|
14757
14757
|
ROTATE_DEFAULT_CLASSES
|
|
14758
14758
|
),
|
|
@@ -14829,10 +14829,10 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
|
|
|
14829
14829
|
const svgHeight = Math.max(el.height, 1);
|
|
14830
14830
|
const ss = shapeEl?.shapeStyle;
|
|
14831
14831
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
14832
|
-
const strokeColor =
|
|
14833
|
-
const strokePaint =
|
|
14834
|
-
const dashType =
|
|
14835
|
-
const dashArray =
|
|
14832
|
+
const strokeColor = chunkJAI42EXQ_js.normalizeHexColor(ss?.strokeColor, chunkJAI42EXQ_js.DEFAULT_STROKE_COLOR);
|
|
14833
|
+
const strokePaint = chunkJAI42EXQ_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
|
|
14834
|
+
const dashType = chunkJAI42EXQ_js.normalizeStrokeDashType(ss?.strokeDash);
|
|
14835
|
+
const dashArray = chunkJAI42EXQ_js.getSvgStrokeDasharray(
|
|
14836
14836
|
dashType,
|
|
14837
14837
|
Math.max(strokeWidth, 1),
|
|
14838
14838
|
ss?.customDashSegments
|
|
@@ -14843,14 +14843,14 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
|
|
|
14843
14843
|
const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
14844
14844
|
const startMarkerId = `${markerSeed}-sel-start`;
|
|
14845
14845
|
const endMarkerId = `${markerSeed}-sel-end`;
|
|
14846
|
-
const compoundOffsets =
|
|
14847
|
-
const compoundWidths =
|
|
14846
|
+
const compoundOffsets = chunkJAI42EXQ_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
14847
|
+
const compoundWidths = chunkJAI42EXQ_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
14848
14848
|
const strokeCap = pptx.svgLineCap(ss?.lineCap);
|
|
14849
14849
|
const textEl = pptx$1.hasTextProperties(el) ? el : void 0;
|
|
14850
14850
|
const connectorText = textEl?.text?.trim() ?? "";
|
|
14851
14851
|
const connectorTextSegments = textEl?.textSegments;
|
|
14852
14852
|
const connectorTextStyle = textEl?.textStyle;
|
|
14853
|
-
const pathGeometry = shapeEl ?
|
|
14853
|
+
const pathGeometry = shapeEl ? chunkJAI42EXQ_js.getConnectorPathGeometry(shapeEl) : {
|
|
14854
14854
|
pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
|
|
14855
14855
|
startX: 0,
|
|
14856
14856
|
startY: 0,
|
|
@@ -14859,16 +14859,16 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
|
|
|
14859
14859
|
};
|
|
14860
14860
|
const hitTargetWidth = Math.max(strokeWidth * 3, 14);
|
|
14861
14861
|
const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
|
|
14862
|
-
const lineShadow =
|
|
14863
|
-
const lineGlow =
|
|
14862
|
+
const lineShadow = chunkJAI42EXQ_js.buildLineShadowCss(el);
|
|
14863
|
+
const lineGlow = chunkJAI42EXQ_js.buildLineGlowFilter(el);
|
|
14864
14864
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14865
14865
|
"div",
|
|
14866
14866
|
{
|
|
14867
14867
|
"data-pptx-element": "true",
|
|
14868
14868
|
"data-element-id": el.id,
|
|
14869
|
-
role:
|
|
14870
|
-
"aria-label":
|
|
14871
|
-
"aria-roledescription":
|
|
14869
|
+
role: chunkJAI42EXQ_js.getAriaRole(el, { actionable: false }),
|
|
14870
|
+
"aria-label": chunkJAI42EXQ_js.getAriaLabel(el),
|
|
14871
|
+
"aria-roledescription": chunkJAI42EXQ_js.getAriaRoleDescription(el),
|
|
14872
14872
|
"aria-selected": isSelected ? true : void 0,
|
|
14873
14873
|
className: "absolute",
|
|
14874
14874
|
style: {
|
|
@@ -14901,14 +14901,14 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
|
|
|
14901
14901
|
style: { overflow: "visible", pointerEvents: "none" },
|
|
14902
14902
|
children: [
|
|
14903
14903
|
/* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
|
|
14904
|
-
|
|
14904
|
+
chunkJAI42EXQ_js.renderConnectorMarker(
|
|
14905
14905
|
startMarkerId,
|
|
14906
14906
|
startArrow,
|
|
14907
14907
|
strokePaint,
|
|
14908
14908
|
ss?.connectorStartArrowWidth,
|
|
14909
14909
|
ss?.connectorStartArrowLength
|
|
14910
14910
|
),
|
|
14911
|
-
|
|
14911
|
+
chunkJAI42EXQ_js.renderConnectorMarker(
|
|
14912
14912
|
endMarkerId,
|
|
14913
14913
|
endArrow,
|
|
14914
14914
|
strokePaint,
|
|
@@ -15117,14 +15117,14 @@ function getElementInteractionProps({
|
|
|
15117
15117
|
};
|
|
15118
15118
|
}
|
|
15119
15119
|
function renderDagDuotoneFilterForElement(el) {
|
|
15120
|
-
if (!
|
|
15120
|
+
if (!chunkJAI42EXQ_js.hasDagDuotoneEffect(el)) {
|
|
15121
15121
|
return null;
|
|
15122
15122
|
}
|
|
15123
15123
|
const duotone = el.shapeStyle?.dagDuotone;
|
|
15124
15124
|
if (!duotone) {
|
|
15125
15125
|
return null;
|
|
15126
15126
|
}
|
|
15127
|
-
return
|
|
15127
|
+
return chunkJAI42EXQ_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
|
|
15128
15128
|
}
|
|
15129
15129
|
function getContainerStyle({
|
|
15130
15130
|
el,
|
|
@@ -15151,10 +15151,10 @@ function getContainerStyle({
|
|
|
15151
15151
|
top: isFullscreenMedia ? fs.top : el.y,
|
|
15152
15152
|
width: isFullscreenMedia ? fs.width : painted.width,
|
|
15153
15153
|
...heightStyle,
|
|
15154
|
-
transform: isFullscreenMedia ? fs.transform :
|
|
15154
|
+
transform: isFullscreenMedia ? fs.transform : chunkJAI42EXQ_js.getElementTransform(el),
|
|
15155
15155
|
transformOrigin: "center",
|
|
15156
15156
|
overflow: overflowValue,
|
|
15157
|
-
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ?
|
|
15157
|
+
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunkJAI42EXQ_js.getCropShapeClipPath(el) : void 0,
|
|
15158
15158
|
zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
|
|
15159
15159
|
visibility: animationState?.visible === false ? "hidden" : "visible",
|
|
15160
15160
|
animation: animationState?.cssAnimation,
|
|
@@ -15191,9 +15191,9 @@ function getContainerStyle({
|
|
|
15191
15191
|
function shapeParams(element) {
|
|
15192
15192
|
const style = pptx$1.hasShapeProperties(element) ? element.shapeStyle : void 0;
|
|
15193
15193
|
const strokeWidth = pptx.paintedStrokeWidth(style);
|
|
15194
|
-
const strokeColor =
|
|
15195
|
-
const fillColor =
|
|
15196
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
15194
|
+
const strokeColor = chunkJAI42EXQ_js.normalizeHexColor(style?.strokeColor, chunkJAI42EXQ_js.DEFAULT_STROKE_COLOR);
|
|
15195
|
+
const fillColor = chunkJAI42EXQ_js.normalizeHexColor(style?.fillColor, chunkJAI42EXQ_js.DEFAULT_FILL_COLOR);
|
|
15196
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkJAI42EXQ_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
15197
15197
|
return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
|
|
15198
15198
|
}
|
|
15199
15199
|
var Extrusion3DOverlayMemo = /* @__PURE__ */ React17__default.default.memo(
|
|
@@ -15301,7 +15301,7 @@ function ShapeEffectOverlay({
|
|
|
15301
15301
|
const fillOverlayStyle = overlay ? {
|
|
15302
15302
|
position: "absolute",
|
|
15303
15303
|
inset: 0,
|
|
15304
|
-
...pptx$1.isImageLikeElement(element) ?
|
|
15304
|
+
...pptx$1.isImageLikeElement(element) ? chunkJAI42EXQ_js.getImageSurfaceMaskStyle(element) : {},
|
|
15305
15305
|
background: overlay.color,
|
|
15306
15306
|
mixBlendMode: overlay.blendMode,
|
|
15307
15307
|
pointerEvents: "none"
|
|
@@ -15508,10 +15508,10 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
|
|
|
15508
15508
|
const backgroundAnimationState = pptx.getBackgroundAnimationState(el, presentationElementStates);
|
|
15509
15509
|
const effectPlacement = pptx.getShapeEffectLayerPlacement(el);
|
|
15510
15510
|
const visualAnimationState = backgroundAnimationState ?? animationState;
|
|
15511
|
-
const isTxt =
|
|
15511
|
+
const isTxt = chunkJAI42EXQ_js.isEditableTextElement(el) && allow.textEditable;
|
|
15512
15512
|
const txtSE = pptx$1.hasTextProperties(el) ? el.textStyle : void 0;
|
|
15513
15513
|
const textStyleOverrideCss = pptx.buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
|
|
15514
|
-
const ss =
|
|
15514
|
+
const ss = chunkJAI42EXQ_js.getShapeVisualStyle(
|
|
15515
15515
|
el,
|
|
15516
15516
|
hf,
|
|
15517
15517
|
fc,
|
|
@@ -15520,9 +15520,9 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
|
|
|
15520
15520
|
visualAnimationState?.animatesFill,
|
|
15521
15521
|
visualAnimationState?.animatesStroke
|
|
15522
15522
|
);
|
|
15523
|
-
const ts =
|
|
15523
|
+
const ts = chunkJAI42EXQ_js.getTextStyleForElement(el, chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR);
|
|
15524
15524
|
const isImg = el.type === "picture" || el.type === "image";
|
|
15525
|
-
const vs =
|
|
15525
|
+
const vs = chunkJAI42EXQ_js.renderVectorShape(
|
|
15526
15526
|
el,
|
|
15527
15527
|
isImg ? false : hf,
|
|
15528
15528
|
fc,
|
|
@@ -15532,10 +15532,10 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
|
|
|
15532
15532
|
visualAnimationState?.animatesStroke
|
|
15533
15533
|
);
|
|
15534
15534
|
const isModel3D = el.type === "model3d";
|
|
15535
|
-
const isConn =
|
|
15535
|
+
const isConn = chunkJAI42EXQ_js.isConnectorOrLineElement(el);
|
|
15536
15536
|
const shapeStyle3d = pptx$1.hasShapeProperties(el) ? el.shapeStyle : void 0;
|
|
15537
15537
|
const extrusionData = React17.useMemo(
|
|
15538
|
-
() =>
|
|
15538
|
+
() => chunkJAI42EXQ_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
|
|
15539
15539
|
[shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
|
|
15540
15540
|
);
|
|
15541
15541
|
const actionAffordance = useActionAffordance(el, canInteract);
|
|
@@ -15625,7 +15625,7 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
|
|
|
15625
15625
|
"aria-hidden": aria.hidden ? true : void 0,
|
|
15626
15626
|
"aria-selected": isSelected ? true : void 0,
|
|
15627
15627
|
tabIndex: isFocusable ? 0 : -1,
|
|
15628
|
-
className:
|
|
15628
|
+
className: chunkJAI42EXQ_js.cn(
|
|
15629
15629
|
"absolute",
|
|
15630
15630
|
"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
|
|
15631
15631
|
cur,
|
|
@@ -15698,9 +15698,9 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
|
|
|
15698
15698
|
txtSE,
|
|
15699
15699
|
txtS: ts,
|
|
15700
15700
|
vecShape: backgroundAnimationState && !isImg ? null : vs,
|
|
15701
|
-
imgStyle:
|
|
15702
|
-
imgFilter:
|
|
15703
|
-
imgOpacity:
|
|
15701
|
+
imgStyle: chunkJAI42EXQ_js.getImageRenderStyle(el),
|
|
15702
|
+
imgFilter: chunkJAI42EXQ_js.getImageEffectsFilter(el),
|
|
15703
|
+
imgOpacity: chunkJAI42EXQ_js.getImageEffectsOpacity(el),
|
|
15704
15704
|
imgAlt: imageAltText,
|
|
15705
15705
|
isTxtEl: isTxt,
|
|
15706
15706
|
media: mediaDataUrls,
|
|
@@ -15837,10 +15837,10 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
|
|
|
15837
15837
|
}
|
|
15838
15838
|
function renderInk(el, options) {
|
|
15839
15839
|
const replay = options?.replay ?? false;
|
|
15840
|
-
const strokes =
|
|
15840
|
+
const strokes = chunkJAI42EXQ_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
|
|
15841
15841
|
strokes.some((s) => s.circles || s.nibMarks);
|
|
15842
15842
|
const pressureSensitive = options?.pressureSensitive;
|
|
15843
|
-
const replayStyles = replay ?
|
|
15843
|
+
const replayStyles = replay ? chunkJAI42EXQ_js.getInkReplayStyles(el, options?.replayConfig) : null;
|
|
15844
15844
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15845
15845
|
"svg",
|
|
15846
15846
|
{
|
|
@@ -15848,7 +15848,7 @@ function renderInk(el, options) {
|
|
|
15848
15848
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
15849
15849
|
preserveAspectRatio: "none",
|
|
15850
15850
|
children: [
|
|
15851
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
15851
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkJAI42EXQ_js.INK_REPLAY_KEYFRAMES }),
|
|
15852
15852
|
strokes.map(
|
|
15853
15853
|
(s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
|
|
15854
15854
|
)
|
|
@@ -15859,7 +15859,7 @@ function renderInk(el, options) {
|
|
|
15859
15859
|
function renderGroup(children, parentGroupFill) {
|
|
15860
15860
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: pptx.filterRenderedElements(children).map((c, childIndex) => {
|
|
15861
15861
|
const { hf, fc, sw, sc } = shapeParams(c);
|
|
15862
|
-
const baseSs =
|
|
15862
|
+
const baseSs = chunkJAI42EXQ_js.getShapeVisualStyle(c, hf, fc, sw, sc);
|
|
15863
15863
|
const inheritedFill = pptx.resolveGroupChildFill(c, parentGroupFill);
|
|
15864
15864
|
const ss = inheritedFill ? {
|
|
15865
15865
|
...baseSs,
|
|
@@ -15870,9 +15870,9 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15870
15870
|
backgroundPosition: inheritedFill.backgroundPosition
|
|
15871
15871
|
} : baseSs;
|
|
15872
15872
|
const isI = c.type === "picture" || c.type === "image";
|
|
15873
|
-
const vs =
|
|
15874
|
-
const ts =
|
|
15875
|
-
const isTxt =
|
|
15873
|
+
const vs = chunkJAI42EXQ_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
|
|
15874
|
+
const ts = chunkJAI42EXQ_js.getTextStyleForElement(c, chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR);
|
|
15875
|
+
const isTxt = chunkJAI42EXQ_js.isEditableTextElement(c);
|
|
15876
15876
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15877
15877
|
"div",
|
|
15878
15878
|
{
|
|
@@ -15881,9 +15881,9 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15881
15881
|
style: {
|
|
15882
15882
|
left: c.x,
|
|
15883
15883
|
top: c.y,
|
|
15884
|
-
width: Math.max(c.width,
|
|
15885
|
-
height: Math.max(c.height,
|
|
15886
|
-
transform:
|
|
15884
|
+
width: Math.max(c.width, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE),
|
|
15885
|
+
height: Math.max(c.height, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE),
|
|
15886
|
+
transform: chunkJAI42EXQ_js.getElementTransform(c),
|
|
15887
15887
|
transformOrigin: "center",
|
|
15888
15888
|
...ss,
|
|
15889
15889
|
...isI ? {
|
|
@@ -15908,8 +15908,8 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15908
15908
|
// A nested group: recurse, chaining the inherited fill so a
|
|
15909
15909
|
// `grpFill` shape under a fill-less sub-group still paints.
|
|
15910
15910
|
renderGroup(c.children, pptx.getGroupChildParentFill(c, parentGroupFill))
|
|
15911
|
-
) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style:
|
|
15912
|
-
|
|
15911
|
+
) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunkJAI42EXQ_js.getImageSurfaceStyle(c), children: [
|
|
15912
|
+
chunkJAI42EXQ_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15913
15913
|
TiledImageLayer,
|
|
15914
15914
|
{
|
|
15915
15915
|
element: c,
|
|
@@ -15922,7 +15922,7 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15922
15922
|
src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
|
|
15923
15923
|
alt: i18n.translationsEn["pptx.ink.groupChildAlt"],
|
|
15924
15924
|
className: "pointer-events-none select-none",
|
|
15925
|
-
style:
|
|
15925
|
+
style: chunkJAI42EXQ_js.getImageRenderStyle(c),
|
|
15926
15926
|
draggable: false
|
|
15927
15927
|
}
|
|
15928
15928
|
),
|
|
@@ -15934,7 +15934,7 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15934
15934
|
{
|
|
15935
15935
|
className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
|
|
15936
15936
|
style: ts,
|
|
15937
|
-
children:
|
|
15937
|
+
children: chunkJAI42EXQ_js.renderTextSegments(c, chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR)
|
|
15938
15938
|
}
|
|
15939
15939
|
) : null
|
|
15940
15940
|
] })
|
|
@@ -15948,8 +15948,8 @@ function renderContentPart(el, options) {
|
|
|
15948
15948
|
if (el.inkStrokes && el.inkStrokes.length > 0) {
|
|
15949
15949
|
const replay = options?.replay ?? false;
|
|
15950
15950
|
const pressureSensitive = options?.pressureSensitive ?? true;
|
|
15951
|
-
const strokes =
|
|
15952
|
-
const replayStyles = replay ?
|
|
15951
|
+
const strokes = chunkJAI42EXQ_js.buildContentPartStrokes(el);
|
|
15952
|
+
const replayStyles = replay ? chunkJAI42EXQ_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
|
|
15953
15953
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15954
15954
|
"svg",
|
|
15955
15955
|
{
|
|
@@ -15957,7 +15957,7 @@ function renderContentPart(el, options) {
|
|
|
15957
15957
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
15958
15958
|
preserveAspectRatio: "none",
|
|
15959
15959
|
children: [
|
|
15960
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
15960
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkJAI42EXQ_js.INK_REPLAY_KEYFRAMES }),
|
|
15961
15961
|
strokes.map(
|
|
15962
15962
|
(s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
|
|
15963
15963
|
)
|
|
@@ -16184,9 +16184,9 @@ function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
|
|
|
16184
16184
|
collaboration: connected,
|
|
16185
16185
|
model: pptx.createInlineListModelObserver(element),
|
|
16186
16186
|
activationSelection,
|
|
16187
|
-
children: seed && !connected ?
|
|
16187
|
+
children: seed && !connected ? chunkJAI42EXQ_js.renderTextSegments(
|
|
16188
16188
|
element,
|
|
16189
|
-
|
|
16189
|
+
chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR,
|
|
16190
16190
|
void 0,
|
|
16191
16191
|
void 0,
|
|
16192
16192
|
void 0,
|
|
@@ -16422,8 +16422,8 @@ function InlineTextEditor({
|
|
|
16422
16422
|
pending.endOffset
|
|
16423
16423
|
);
|
|
16424
16424
|
});
|
|
16425
|
-
const warpStyle =
|
|
16426
|
-
const compensationTransform =
|
|
16425
|
+
const warpStyle = chunkJAI42EXQ_js.getTextWarpStyle(textStyleRaw);
|
|
16426
|
+
const compensationTransform = chunkJAI42EXQ_js.getTextCompensationTransform(element);
|
|
16427
16427
|
const warpTransform = warpStyle?.transform;
|
|
16428
16428
|
const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
|
|
16429
16429
|
const wrapperStyle = {
|
|
@@ -16511,7 +16511,7 @@ function InlineTextEditor({
|
|
|
16511
16511
|
const text = e.clipboardData.getData("text/plain");
|
|
16512
16512
|
document.execCommand("insertText", false, text);
|
|
16513
16513
|
},
|
|
16514
|
-
children: list.seed ? list.children : seed.hasRichSegments ?
|
|
16514
|
+
children: list.seed ? list.children : seed.hasRichSegments ? chunkJAI42EXQ_js.renderTextSegments(element, chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR) : seed.initialText
|
|
16515
16515
|
},
|
|
16516
16516
|
list.seed?.paragraphs[0].token ?? "plain"
|
|
16517
16517
|
);
|
|
@@ -17658,7 +17658,7 @@ function groupIntoParagraphs(element, fieldContext) {
|
|
|
17658
17658
|
element,
|
|
17659
17659
|
fieldContext ? (seg) => {
|
|
17660
17660
|
if (seg.fieldType) {
|
|
17661
|
-
const substituted =
|
|
17661
|
+
const substituted = chunkJAI42EXQ_js.substituteFieldText(
|
|
17662
17662
|
seg.text,
|
|
17663
17663
|
seg.fieldType,
|
|
17664
17664
|
fieldContext,
|
|
@@ -17693,13 +17693,13 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
|
|
|
17693
17693
|
if (s.strikethrough) {
|
|
17694
17694
|
decos.push("line-through");
|
|
17695
17695
|
}
|
|
17696
|
-
const fill = s.hyperlink ?
|
|
17696
|
+
const fill = s.hyperlink ? chunkJAI42EXQ_js.normalizeHexColor(s.color || element.textStyle?.color, chunkJAI42EXQ_js.HYPERLINK_COLOR) : chunkJAI42EXQ_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
|
|
17697
17697
|
return {
|
|
17698
17698
|
fill,
|
|
17699
|
-
fontSize: s.fontSize ?? element.textStyle?.fontSize ??
|
|
17699
|
+
fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunkJAI42EXQ_js.DEFAULT_TEXT_FONT_SIZE,
|
|
17700
17700
|
fontWeight: pptx.resolveFontWeight(s.fontFamily || element.textStyle?.fontFamily, s.bold),
|
|
17701
17701
|
fontStyle: pptx.resolveFontItalic(s.fontFamily || element.textStyle?.fontFamily, s.italic) ? "italic" : void 0,
|
|
17702
|
-
fontFamily: s.fontFamily || element.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(s.fontFamily || element.textStyle?.fontFamily || "") :
|
|
17702
|
+
fontFamily: s.fontFamily || element.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(s.fontFamily || element.textStyle?.fontFamily || "") : chunkJAI42EXQ_js.DEFAULT_FONT_FAMILY,
|
|
17703
17703
|
textDecoration: decos.length > 0 ? decos.join(" ") : void 0
|
|
17704
17704
|
};
|
|
17705
17705
|
}
|
|
@@ -17707,8 +17707,8 @@ function resolveSegmentFont(segment, element) {
|
|
|
17707
17707
|
const s = segment.style || {};
|
|
17708
17708
|
const family = s.fontFamily || element.textStyle?.fontFamily;
|
|
17709
17709
|
return {
|
|
17710
|
-
fontFamily: family ? pptx$1.getSubstituteFontFamily(family) :
|
|
17711
|
-
fontSizePx: s.fontSize ?? element.textStyle?.fontSize ??
|
|
17710
|
+
fontFamily: family ? pptx$1.getSubstituteFontFamily(family) : chunkJAI42EXQ_js.DEFAULT_FONT_FAMILY,
|
|
17711
|
+
fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunkJAI42EXQ_js.DEFAULT_TEXT_FONT_SIZE,
|
|
17712
17712
|
bold: s.bold ?? element.textStyle?.bold,
|
|
17713
17713
|
italic: s.italic ?? element.textStyle?.italic
|
|
17714
17714
|
};
|
|
@@ -17792,9 +17792,9 @@ function WarpedText({
|
|
|
17792
17792
|
const warpAdj2 = textEl.textStyle?.textWarpAdj2;
|
|
17793
17793
|
const align = textEl.textStyle?.align ?? "center";
|
|
17794
17794
|
const { startOffset, textAnchor } = getAlignmentProps(align);
|
|
17795
|
-
const baseFontSize = textEl.textStyle?.fontSize ??
|
|
17796
|
-
const baseFontFamily = textEl.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(textEl.textStyle.fontFamily) :
|
|
17797
|
-
const baseFill =
|
|
17795
|
+
const baseFontSize = textEl.textStyle?.fontSize ?? chunkJAI42EXQ_js.DEFAULT_TEXT_FONT_SIZE;
|
|
17796
|
+
const baseFontFamily = textEl.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(textEl.textStyle.fontFamily) : chunkJAI42EXQ_js.DEFAULT_FONT_FAMILY;
|
|
17797
|
+
const baseFill = chunkJAI42EXQ_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
|
|
17798
17798
|
if (pptx.hasGlyphEnvelope(preset)) {
|
|
17799
17799
|
const perLine = pptx.buildGlyphEnvelopeBlock(
|
|
17800
17800
|
preset,
|
|
@@ -17896,7 +17896,7 @@ function WarpedText({
|
|
|
17896
17896
|
var GLYPH_BY_SHAPE = /* @__PURE__ */ buildGlyphByShape();
|
|
17897
17897
|
function buildGlyphByShape() {
|
|
17898
17898
|
const glyphs = Object.fromEntries(
|
|
17899
|
-
|
|
17899
|
+
chunkJAI42EXQ_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
|
|
17900
17900
|
);
|
|
17901
17901
|
glyphs["actionButtonForwardOrNext"] = glyphs["actionButtonForwardNext"];
|
|
17902
17902
|
glyphs["actionButtonBackOrPrevious"] = glyphs["actionButtonBackPrevious"];
|
|
@@ -17970,9 +17970,9 @@ function renderTextElementBody(options) {
|
|
|
17970
17970
|
const useSvgWarp = pptx.shouldUseSvgWarp(
|
|
17971
17971
|
pptx$1.hasTextProperties(el) ? el.textStyle?.textWarpPreset : void 0
|
|
17972
17972
|
);
|
|
17973
|
-
const scene3dStyle = pptx$1.hasTextProperties(el) ?
|
|
17973
|
+
const scene3dStyle = pptx$1.hasTextProperties(el) ? chunkJAI42EXQ_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
|
|
17974
17974
|
const rotationTransform = pptx.getTextBodyRotationTransform(el);
|
|
17975
|
-
const composedTransform = [rotationTransform,
|
|
17975
|
+
const composedTransform = [rotationTransform, chunkJAI42EXQ_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
|
|
17976
17976
|
const transformStyle = {
|
|
17977
17977
|
transform: composedTransform,
|
|
17978
17978
|
// A COM-measured homography (`scene3dStyle.transformOrigin === '0 0'`)
|
|
@@ -18002,18 +18002,18 @@ function renderTextElementBody(options) {
|
|
|
18002
18002
|
shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
18003
18003
|
"div",
|
|
18004
18004
|
{
|
|
18005
|
-
className:
|
|
18005
|
+
className: chunkJAI42EXQ_js.cn(
|
|
18006
18006
|
"relative z-10 w-full h-full",
|
|
18007
18007
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
18008
18008
|
),
|
|
18009
|
-
style: { ...
|
|
18009
|
+
style: { ...chunkJAI42EXQ_js.getTextLayoutStyle(el), ...transformStyle },
|
|
18010
18010
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18011
18011
|
WarpedText,
|
|
18012
18012
|
{
|
|
18013
18013
|
element: el,
|
|
18014
18014
|
width: el.width,
|
|
18015
18015
|
height: el.height,
|
|
18016
|
-
fallbackColor:
|
|
18016
|
+
fallbackColor: chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR,
|
|
18017
18017
|
findHighlights: findHl,
|
|
18018
18018
|
fieldContext
|
|
18019
18019
|
}
|
|
@@ -18022,19 +18022,19 @@ function renderTextElementBody(options) {
|
|
|
18022
18022
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
18023
18023
|
"div",
|
|
18024
18024
|
{
|
|
18025
|
-
className:
|
|
18025
|
+
className: chunkJAI42EXQ_js.cn(
|
|
18026
18026
|
"relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
|
|
18027
18027
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
18028
18028
|
),
|
|
18029
18029
|
style: {
|
|
18030
|
-
...
|
|
18030
|
+
...chunkJAI42EXQ_js.getTextLayoutStyle(el),
|
|
18031
18031
|
...txtS,
|
|
18032
|
-
...
|
|
18032
|
+
...chunkJAI42EXQ_js.getTextWarpStyle(txtSE),
|
|
18033
18033
|
...transformStyle
|
|
18034
18034
|
},
|
|
18035
|
-
children:
|
|
18035
|
+
children: chunkJAI42EXQ_js.renderTextSegments(
|
|
18036
18036
|
el,
|
|
18037
|
-
|
|
18037
|
+
chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR,
|
|
18038
18038
|
void 0,
|
|
18039
18039
|
findHl,
|
|
18040
18040
|
onHyperlinkClick,
|
|
@@ -18353,7 +18353,7 @@ function renderBody(options) {
|
|
|
18353
18353
|
);
|
|
18354
18354
|
}
|
|
18355
18355
|
if (isImg) {
|
|
18356
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style:
|
|
18356
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunkJAI42EXQ_js.getImageSurfaceStyle(el), children: [
|
|
18357
18357
|
renderImg(el, imgStyle, imgFilter, imgAlt, imgOpacity),
|
|
18358
18358
|
vecShape ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", children: vecShape }) : null
|
|
18359
18359
|
] });
|
|
@@ -18370,7 +18370,7 @@ function renderBody(options) {
|
|
|
18370
18370
|
textDirection: txtSE?.textDirection,
|
|
18371
18371
|
textStyle: txtS,
|
|
18372
18372
|
textStyleRaw: txtSE,
|
|
18373
|
-
layoutStyle:
|
|
18373
|
+
layoutStyle: chunkJAI42EXQ_js.getTextLayoutStyle(el),
|
|
18374
18374
|
element: el,
|
|
18375
18375
|
onCommit,
|
|
18376
18376
|
onCancel,
|
|
@@ -18381,7 +18381,7 @@ function renderBody(options) {
|
|
|
18381
18381
|
] });
|
|
18382
18382
|
}
|
|
18383
18383
|
if (el.type === "table") {
|
|
18384
|
-
return
|
|
18384
|
+
return chunkJAI42EXQ_js.renderTableElement(el, txtS, {
|
|
18385
18385
|
editable: isSel,
|
|
18386
18386
|
selectedCell: isSel ? tableSt : null,
|
|
18387
18387
|
onSelectCell: onCellSel,
|
|
@@ -18414,7 +18414,7 @@ function renderBody(options) {
|
|
|
18414
18414
|
);
|
|
18415
18415
|
}
|
|
18416
18416
|
if (el.type === "media") {
|
|
18417
|
-
return
|
|
18417
|
+
return chunkJAI42EXQ_js.renderMediaElement(el, media, {
|
|
18418
18418
|
// Present mode autoplays every media element on the active slide,
|
|
18419
18419
|
// not only ones persisted with their own `autoPlay` flag (matching
|
|
18420
18420
|
// the other four bindings' unconditional `presenting`-gated
|
|
@@ -18466,27 +18466,27 @@ function renderBody(options) {
|
|
|
18466
18466
|
}
|
|
18467
18467
|
return renderGroup(el.children, pptx.getGroupChildParentFill(el));
|
|
18468
18468
|
}
|
|
18469
|
-
if (
|
|
18470
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
18469
|
+
if (chunkJAI42EXQ_js.shouldRenderFallbackLabel(el, isTxtEl)) {
|
|
18470
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkJAI42EXQ_js.getElementLabel(el) });
|
|
18471
18471
|
}
|
|
18472
18472
|
return renderTextElementBody(options);
|
|
18473
18473
|
}
|
|
18474
18474
|
function defaultTextColorForFill(fillColor) {
|
|
18475
18475
|
const hex = String(fillColor ?? "").replace(/^#/u, "");
|
|
18476
18476
|
if (!/^[0-9a-f]{6}$/iu.test(hex)) {
|
|
18477
|
-
return
|
|
18477
|
+
return chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR;
|
|
18478
18478
|
}
|
|
18479
18479
|
const channels = [0, 2, 4].map((offset) => Number.parseInt(hex.slice(offset, offset + 2), 16) / 255).map((channel) => channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4);
|
|
18480
18480
|
const luminance = channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
|
|
18481
|
-
return luminance > 0.179 ?
|
|
18481
|
+
return luminance > 0.179 ? chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR : "#ffffff";
|
|
18482
18482
|
}
|
|
18483
18483
|
function getStaticElementVisualState(element, parentGroupFill) {
|
|
18484
18484
|
const style = pptx$1.hasShapeProperties(element) ? element.shapeStyle : void 0;
|
|
18485
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
18486
|
-
const fill =
|
|
18485
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkJAI42EXQ_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
18486
|
+
const fill = chunkJAI42EXQ_js.normalizeHexColor(style?.fillColor, chunkJAI42EXQ_js.DEFAULT_FILL_COLOR);
|
|
18487
18487
|
const strokeWidth = pptx.paintedStrokeWidth(style);
|
|
18488
|
-
const stroke =
|
|
18489
|
-
const baseVisualStyle =
|
|
18488
|
+
const stroke = chunkJAI42EXQ_js.normalizeHexColor(style?.strokeColor, chunkJAI42EXQ_js.DEFAULT_STROKE_COLOR);
|
|
18489
|
+
const baseVisualStyle = chunkJAI42EXQ_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
|
|
18490
18490
|
const inheritedFill = pptx.resolveGroupChildFill(element, parentGroupFill);
|
|
18491
18491
|
const visualStyle = inheritedFill ? {
|
|
18492
18492
|
...baseVisualStyle,
|
|
@@ -18496,9 +18496,9 @@ function getStaticElementVisualState(element, parentGroupFill) {
|
|
|
18496
18496
|
backgroundSize: inheritedFill.backgroundSize,
|
|
18497
18497
|
backgroundPosition: inheritedFill.backgroundPosition
|
|
18498
18498
|
} : baseVisualStyle;
|
|
18499
|
-
const textStyle =
|
|
18499
|
+
const textStyle = chunkJAI42EXQ_js.getTextStyleForElement(
|
|
18500
18500
|
element,
|
|
18501
|
-
element.type === "shape" && hasFill ? defaultTextColorForFill(fill) :
|
|
18501
|
+
element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR
|
|
18502
18502
|
);
|
|
18503
18503
|
const isImage = element.type === "picture" || element.type === "image";
|
|
18504
18504
|
const letsTextOverflow = pptx$1.hasTextProperties(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
@@ -18523,7 +18523,7 @@ function getStaticElementInteractionState(element, hasActionHandler, exposeEleme
|
|
|
18523
18523
|
return { action, isActionable, contractRole };
|
|
18524
18524
|
}
|
|
18525
18525
|
function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
|
|
18526
|
-
const overflowClass = visual.isImage || visual.strokeWidth > 0 || element.type === "group" ||
|
|
18526
|
+
const overflowClass = visual.isImage || visual.strokeWidth > 0 || element.type === "group" || chunkJAI42EXQ_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
|
|
18527
18527
|
const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
|
|
18528
18528
|
return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
|
|
18529
18529
|
}
|
|
@@ -18606,7 +18606,7 @@ function StaticElementRendererImpl({
|
|
|
18606
18606
|
top: positioned ? element.y : void 0,
|
|
18607
18607
|
width: positioned ? Math.max(element.width, 1) : "100%",
|
|
18608
18608
|
height: positioned ? Math.max(element.height, 1) : "100%",
|
|
18609
|
-
transform: positioned ?
|
|
18609
|
+
transform: positioned ? chunkJAI42EXQ_js.getElementTransform(element) : void 0,
|
|
18610
18610
|
transformOrigin: "center",
|
|
18611
18611
|
zIndex,
|
|
18612
18612
|
...visualStyle,
|
|
@@ -18649,18 +18649,18 @@ function StaticElementRendererImpl({
|
|
|
18649
18649
|
spellCheck: false,
|
|
18650
18650
|
txtSE: pptx$1.hasTextProperties(element) ? element.textStyle : void 0,
|
|
18651
18651
|
txtS: textStyle,
|
|
18652
|
-
vecShape:
|
|
18652
|
+
vecShape: chunkJAI42EXQ_js.renderVectorShape(
|
|
18653
18653
|
element,
|
|
18654
18654
|
isImage ? false : hasFill,
|
|
18655
18655
|
fill,
|
|
18656
18656
|
strokeWidth,
|
|
18657
18657
|
stroke
|
|
18658
18658
|
),
|
|
18659
|
-
imgStyle: imageAnimation ? { ...
|
|
18660
|
-
imgFilter:
|
|
18661
|
-
imgOpacity:
|
|
18659
|
+
imgStyle: imageAnimation ? { ...chunkJAI42EXQ_js.getImageRenderStyle(element), animation: imageAnimation } : chunkJAI42EXQ_js.getImageRenderStyle(element),
|
|
18660
|
+
imgFilter: chunkJAI42EXQ_js.getImageEffectsFilter(element),
|
|
18661
|
+
imgOpacity: chunkJAI42EXQ_js.getImageEffectsOpacity(element),
|
|
18662
18662
|
imgAlt: "",
|
|
18663
|
-
isTxtEl:
|
|
18663
|
+
isTxtEl: chunkJAI42EXQ_js.isEditableTextElement(element),
|
|
18664
18664
|
media: mediaDataUrls,
|
|
18665
18665
|
tableSt: null,
|
|
18666
18666
|
isSel: false,
|
|
@@ -18708,7 +18708,7 @@ function SlideLayer({
|
|
|
18708
18708
|
style: {
|
|
18709
18709
|
width: safeWidth,
|
|
18710
18710
|
height: safeHeight,
|
|
18711
|
-
backgroundColor: slide.backgroundColor ?
|
|
18711
|
+
backgroundColor: slide.backgroundColor ? chunkJAI42EXQ_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
|
|
18712
18712
|
backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
|
|
18713
18713
|
backgroundSize: slide.backgroundImage ? "cover" : void 0,
|
|
18714
18714
|
backgroundPosition: slide.backgroundImage ? "center" : void 0
|
|
@@ -18781,6 +18781,9 @@ function FragmentedTransitionLayer({
|
|
|
18781
18781
|
}
|
|
18782
18782
|
);
|
|
18783
18783
|
}
|
|
18784
|
+
function overlayEntries(plan, incomingSlide) {
|
|
18785
|
+
return plan.overlayLayers.filter((layer) => layer.side === "outgoing" || incomingSlide !== void 0).flatMap((layer) => layer.elements.map((element) => ({ element, side: layer.side }))).map((entry, zIndex) => ({ ...entry, zIndex }));
|
|
18786
|
+
}
|
|
18784
18787
|
function MorphTransitionOverlay({
|
|
18785
18788
|
canvasSize,
|
|
18786
18789
|
scale,
|
|
@@ -18820,43 +18823,44 @@ function MorphTransitionOverlay({
|
|
|
18820
18823
|
position: "relative"
|
|
18821
18824
|
},
|
|
18822
18825
|
children: [
|
|
18823
|
-
morphPlan
|
|
18824
|
-
"
|
|
18825
|
-
|
|
18826
|
-
|
|
18827
|
-
|
|
18828
|
-
|
|
18829
|
-
|
|
18830
|
-
|
|
18831
|
-
|
|
18832
|
-
|
|
18833
|
-
|
|
18834
|
-
|
|
18835
|
-
|
|
18836
|
-
|
|
18837
|
-
|
|
18838
|
-
|
|
18839
|
-
|
|
18840
|
-
|
|
18841
|
-
|
|
18842
|
-
|
|
18843
|
-
|
|
18844
|
-
|
|
18845
|
-
|
|
18846
|
-
|
|
18847
|
-
|
|
18848
|
-
|
|
18849
|
-
|
|
18850
|
-
|
|
18851
|
-
|
|
18852
|
-
|
|
18853
|
-
|
|
18854
|
-
|
|
18855
|
-
|
|
18856
|
-
|
|
18857
|
-
|
|
18858
|
-
|
|
18859
|
-
|
|
18826
|
+
overlayEntries(morphPlan, incomingSlide).map(
|
|
18827
|
+
({ element, side, zIndex }) => side === "outgoing" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
18828
|
+
"div",
|
|
18829
|
+
{
|
|
18830
|
+
"data-pptx-morph-outgoing": element.id,
|
|
18831
|
+
style: { position: "absolute", inset: 0 },
|
|
18832
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18833
|
+
StaticElementRenderer,
|
|
18834
|
+
{
|
|
18835
|
+
element,
|
|
18836
|
+
activeSlide: outgoingSlide,
|
|
18837
|
+
allSlides: [outgoingSlide],
|
|
18838
|
+
zIndex,
|
|
18839
|
+
animation: morphPlan.outgoingAnimations.get(element.id),
|
|
18840
|
+
imageAnimation: morphPlan.outgoingImageAnimations.get(element.id)
|
|
18841
|
+
}
|
|
18842
|
+
)
|
|
18843
|
+
},
|
|
18844
|
+
element.id
|
|
18845
|
+
) : incomingSlide && /* @__PURE__ */ jsxRuntime.jsx(
|
|
18846
|
+
"div",
|
|
18847
|
+
{
|
|
18848
|
+
"data-pptx-morph-lifted": element.id,
|
|
18849
|
+
style: { position: "absolute", inset: 0 },
|
|
18850
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18851
|
+
StaticElementRenderer,
|
|
18852
|
+
{
|
|
18853
|
+
element,
|
|
18854
|
+
activeSlide: incomingSlide,
|
|
18855
|
+
allSlides: [incomingSlide],
|
|
18856
|
+
zIndex,
|
|
18857
|
+
animation: morphPlan.overlayIncomingAnimations.get(element.id)
|
|
18858
|
+
}
|
|
18859
|
+
)
|
|
18860
|
+
},
|
|
18861
|
+
element.id
|
|
18862
|
+
)
|
|
18863
|
+
),
|
|
18860
18864
|
incomingSlide && morphPlan.crossfadeGroups.map((group, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
18861
18865
|
"div",
|
|
18862
18866
|
{
|
|
@@ -18921,6 +18925,7 @@ function PresentationTransitionOverlay({
|
|
|
18921
18925
|
scale: stageScale,
|
|
18922
18926
|
morphPlan,
|
|
18923
18927
|
incomingSlide,
|
|
18928
|
+
incomingTemplateElements = templateElements,
|
|
18924
18929
|
onComplete
|
|
18925
18930
|
}) {
|
|
18926
18931
|
const containerRef = React17.useRef(null);
|
|
@@ -19010,7 +19015,7 @@ function PresentationTransitionOverlay({
|
|
|
19010
19015
|
{
|
|
19011
19016
|
layer: fragmented.incoming,
|
|
19012
19017
|
slide: incomingSlide,
|
|
19013
|
-
templateElements,
|
|
19018
|
+
templateElements: incomingTemplateElements,
|
|
19014
19019
|
canvasSize,
|
|
19015
19020
|
scale,
|
|
19016
19021
|
zIndex: animations.outgoingOnTop ? 0 : 10,
|
|
@@ -19040,7 +19045,7 @@ function PresentationTransitionOverlay({
|
|
|
19040
19045
|
SlideLayer,
|
|
19041
19046
|
{
|
|
19042
19047
|
slide: incomingSlide,
|
|
19043
|
-
templateElements,
|
|
19048
|
+
templateElements: incomingTemplateElements,
|
|
19044
19049
|
canvasSize
|
|
19045
19050
|
}
|
|
19046
19051
|
)
|