pptx-react-viewer 4.30.3 → 4.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/{AiChatPanel-STFWEZCZ.mjs → AiChatPanel-I3D2C4YR.mjs} +1 -1
- package/dist/AiChatPanel-I3D2C4YR.mjs.br +0 -0
- package/dist/AiChatPanel-I3D2C4YR.mjs.gz +0 -0
- package/dist/{AiChatPanel-6VWW4FHG.js → AiChatPanel-JKF3V3IM.js} +9 -9
- package/dist/AiChatPanel-JKF3V3IM.js.br +0 -0
- package/dist/AiChatPanel-JKF3V3IM.js.gz +0 -0
- package/dist/{chunk-RDT4I7MA.mjs → chunk-7EFQBIJG.mjs} +1 -1
- package/dist/chunk-7EFQBIJG.mjs.br +0 -0
- package/dist/chunk-7EFQBIJG.mjs.gz +0 -0
- package/dist/{chunk-FTNLOQ2T.mjs → chunk-CBR27PI3.mjs} +40 -6
- package/dist/chunk-CBR27PI3.mjs.br +0 -0
- package/dist/chunk-CBR27PI3.mjs.gz +0 -0
- package/dist/{chunk-IS76G64B.mjs → chunk-FBG42UO3.mjs} +4 -0
- package/dist/chunk-FBG42UO3.mjs.br +0 -0
- package/dist/chunk-FBG42UO3.mjs.gz +0 -0
- package/dist/{chunk-QO2AMZPA.js → chunk-POPGQIVR.js} +4 -0
- package/dist/chunk-POPGQIVR.js.br +0 -0
- package/dist/chunk-POPGQIVR.js.gz +0 -0
- package/dist/{chunk-BOQCAJIA.js → chunk-TUYNK3GE.js} +245 -245
- package/dist/chunk-TUYNK3GE.js.br +0 -0
- package/dist/chunk-TUYNK3GE.js.gz +0 -0
- package/dist/{chunk-3NIBDU4D.js → chunk-VLZXLGG5.js} +418 -384
- package/dist/chunk-VLZXLGG5.js.br +0 -0
- package/dist/chunk-VLZXLGG5.js.gz +0 -0
- package/dist/index.d.ts +2 -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.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/viewer/index.d.ts +2 -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-6VWW4FHG.js.br +0 -0
- package/dist/AiChatPanel-6VWW4FHG.js.gz +0 -0
- package/dist/AiChatPanel-STFWEZCZ.mjs.br +0 -0
- package/dist/AiChatPanel-STFWEZCZ.mjs.gz +0 -0
- package/dist/chunk-3NIBDU4D.js.br +0 -0
- package/dist/chunk-3NIBDU4D.js.gz +0 -0
- package/dist/chunk-BOQCAJIA.js.br +0 -0
- package/dist/chunk-BOQCAJIA.js.gz +0 -0
- package/dist/chunk-FTNLOQ2T.mjs.br +0 -0
- package/dist/chunk-FTNLOQ2T.mjs.gz +0 -0
- package/dist/chunk-IS76G64B.mjs.br +0 -0
- package/dist/chunk-IS76G64B.mjs.gz +0 -0
- package/dist/chunk-QO2AMZPA.js.br +0 -0
- package/dist/chunk-QO2AMZPA.js.gz +0 -0
- package/dist/chunk-RDT4I7MA.mjs.br +0 -0
- package/dist/chunk-RDT4I7MA.mjs.gz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPOPGQIVR_js = require('./chunk-POPGQIVR.js');
|
|
4
4
|
var pptx = require('ooxml-ui/pptx');
|
|
5
5
|
var React17 = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -684,9 +684,9 @@ function serializeHistoryDocument(snapshot) {
|
|
|
684
684
|
}
|
|
685
685
|
function recordExplicitSlideUpdate(past, future, previous, before, label, maxDepth) {
|
|
686
686
|
if (previous && serializeHistoryDocument(previous) !== serializeHistoryDocument(before)) {
|
|
687
|
-
past.push(
|
|
687
|
+
past.push(chunkPOPGQIVR_js.cloneHistorySnapshot(previous));
|
|
688
688
|
}
|
|
689
|
-
past.push({ ...
|
|
689
|
+
past.push({ ...chunkPOPGQIVR_js.cloneHistorySnapshot(before), actionLabel: label });
|
|
690
690
|
while (past.length > Math.max(1, maxDepth)) {
|
|
691
691
|
past.shift();
|
|
692
692
|
}
|
|
@@ -775,8 +775,8 @@ function useEditorHistory(input) {
|
|
|
775
775
|
width: canvasSize.width,
|
|
776
776
|
height: canvasSize.height,
|
|
777
777
|
activeSlideIndex,
|
|
778
|
-
slides: slides.map(
|
|
779
|
-
templateElementsBySlideId:
|
|
778
|
+
slides: slides.map(chunkPOPGQIVR_js.cloneSlide),
|
|
779
|
+
templateElementsBySlideId: chunkPOPGQIVR_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
|
|
780
780
|
...actionLabel ? { actionLabel } : {}
|
|
781
781
|
};
|
|
782
782
|
},
|
|
@@ -789,9 +789,9 @@ function useEditorHistory(input) {
|
|
|
789
789
|
width: snapshot.width,
|
|
790
790
|
height: snapshot.height
|
|
791
791
|
});
|
|
792
|
-
setSlides(snapshot.slides.map(
|
|
792
|
+
setSlides(snapshot.slides.map(chunkPOPGQIVR_js.cloneSlide));
|
|
793
793
|
setTemplateElementsBySlideId(
|
|
794
|
-
|
|
794
|
+
chunkPOPGQIVR_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
|
|
795
795
|
);
|
|
796
796
|
setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
|
|
797
797
|
setSelectedElementIds([]);
|
|
@@ -830,8 +830,8 @@ function useEditorHistory(input) {
|
|
|
830
830
|
const currentSnapshot = buildHistorySnapshot(previousSnapshot.actionLabel);
|
|
831
831
|
historyFutureRef.current.push(currentSnapshot);
|
|
832
832
|
isApplyingHistoryRef.current = true;
|
|
833
|
-
const nextSnapshot =
|
|
834
|
-
lastHistorySnapshotRef.current =
|
|
833
|
+
const nextSnapshot = chunkPOPGQIVR_js.cloneHistorySnapshot(previousSnapshot);
|
|
834
|
+
lastHistorySnapshotRef.current = chunkPOPGQIVR_js.cloneHistorySnapshot(nextSnapshot);
|
|
835
835
|
lastHistorySerializedRef.current = serializeHistoryDocument(nextSnapshot);
|
|
836
836
|
applyHistorySnapshot(nextSnapshot);
|
|
837
837
|
updateHistoryAvailability();
|
|
@@ -852,8 +852,8 @@ function useEditorHistory(input) {
|
|
|
852
852
|
const currentSnapshot = buildHistorySnapshot(nextSnapshot.actionLabel);
|
|
853
853
|
historyPastRef.current.push(currentSnapshot);
|
|
854
854
|
isApplyingHistoryRef.current = true;
|
|
855
|
-
const targetSnapshot =
|
|
856
|
-
lastHistorySnapshotRef.current =
|
|
855
|
+
const targetSnapshot = chunkPOPGQIVR_js.cloneHistorySnapshot(nextSnapshot);
|
|
856
|
+
lastHistorySnapshotRef.current = chunkPOPGQIVR_js.cloneHistorySnapshot(targetSnapshot);
|
|
857
857
|
lastHistorySerializedRef.current = serializeHistoryDocument(targetSnapshot);
|
|
858
858
|
applyHistorySnapshot(targetSnapshot);
|
|
859
859
|
updateHistoryAvailability();
|
|
@@ -871,7 +871,7 @@ function useEditorHistory(input) {
|
|
|
871
871
|
historyPastRef.current = [];
|
|
872
872
|
historyFutureRef.current = [];
|
|
873
873
|
if (initialSnapshot) {
|
|
874
|
-
const clonedInitial =
|
|
874
|
+
const clonedInitial = chunkPOPGQIVR_js.cloneHistorySnapshot(initialSnapshot);
|
|
875
875
|
lastHistorySnapshotRef.current = clonedInitial;
|
|
876
876
|
lastHistorySerializedRef.current = serializeHistoryDocument(clonedInitial);
|
|
877
877
|
} else {
|
|
@@ -953,8 +953,8 @@ function useEditorHistory(input) {
|
|
|
953
953
|
updateHistoryAvailability
|
|
954
954
|
]);
|
|
955
955
|
const commitSlides = (nextSlides, label, beforeSlides = slides) => {
|
|
956
|
-
const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(
|
|
957
|
-
const after = { ...before, slides: nextSlides.map(
|
|
956
|
+
const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(chunkPOPGQIVR_js.cloneSlide) };
|
|
957
|
+
const after = { ...before, slides: nextSlides.map(chunkPOPGQIVR_js.cloneSlide) };
|
|
958
958
|
recordExplicitSlideUpdate(
|
|
959
959
|
historyPastRef.current,
|
|
960
960
|
historyFutureRef.current,
|
|
@@ -963,7 +963,7 @@ function useEditorHistory(input) {
|
|
|
963
963
|
label,
|
|
964
964
|
maxHistoryEntries
|
|
965
965
|
);
|
|
966
|
-
lastHistorySnapshotRef.current =
|
|
966
|
+
lastHistorySnapshotRef.current = chunkPOPGQIVR_js.cloneHistorySnapshot(after);
|
|
967
967
|
lastHistorySerializedRef.current = serializeHistoryDocument(after);
|
|
968
968
|
isApplyingHistoryRef.current = false;
|
|
969
969
|
setSlides(nextSlides);
|
|
@@ -1143,22 +1143,22 @@ function useZoomViewport({
|
|
|
1143
1143
|
selectedElements.forEach((element) => {
|
|
1144
1144
|
minX = Math.min(minX, element.x);
|
|
1145
1145
|
minY = Math.min(minY, element.y);
|
|
1146
|
-
maxX = Math.max(maxX, element.x + Math.max(element.width,
|
|
1147
|
-
maxY = Math.max(maxY, element.y + Math.max(element.height,
|
|
1146
|
+
maxX = Math.max(maxX, element.x + Math.max(element.width, chunkPOPGQIVR_js.MIN_ELEMENT_SIZE));
|
|
1147
|
+
maxY = Math.max(maxY, element.y + Math.max(element.height, chunkPOPGQIVR_js.MIN_ELEMENT_SIZE));
|
|
1148
1148
|
});
|
|
1149
1149
|
if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
|
|
1150
1150
|
return;
|
|
1151
1151
|
}
|
|
1152
1152
|
const selectionBounds = { minX, minY, maxX, maxY };
|
|
1153
|
-
const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX,
|
|
1154
|
-
const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY,
|
|
1153
|
+
const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkPOPGQIVR_js.MIN_ELEMENT_SIZE);
|
|
1154
|
+
const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkPOPGQIVR_js.MIN_ELEMENT_SIZE);
|
|
1155
1155
|
const availableWidth = Math.max(
|
|
1156
|
-
effectiveEditorDimensions.width -
|
|
1157
|
-
|
|
1156
|
+
effectiveEditorDimensions.width - chunkPOPGQIVR_js.ZOOM_TO_SELECTION_PADDING,
|
|
1157
|
+
chunkPOPGQIVR_js.MIN_ELEMENT_SIZE
|
|
1158
1158
|
);
|
|
1159
1159
|
const availableHeight = Math.max(
|
|
1160
|
-
effectiveEditorDimensions.height -
|
|
1161
|
-
|
|
1160
|
+
effectiveEditorDimensions.height - chunkPOPGQIVR_js.ZOOM_TO_SELECTION_PADDING,
|
|
1161
|
+
chunkPOPGQIVR_js.MIN_ELEMENT_SIZE
|
|
1162
1162
|
);
|
|
1163
1163
|
const targetEditorScale = Math.min(
|
|
1164
1164
|
availableWidth / boundsWidth,
|
|
@@ -4097,8 +4097,8 @@ function useViewerCoreState(_input) {
|
|
|
4097
4097
|
const { slides, setSlides, slidesRef } = useSlideState();
|
|
4098
4098
|
const [templateElementsBySlideId, setTemplateElementsBySlideId] = React17.useState({});
|
|
4099
4099
|
const [canvasSize, setCanvasSize] = React17.useState({
|
|
4100
|
-
width:
|
|
4101
|
-
height:
|
|
4100
|
+
width: chunkPOPGQIVR_js.DEFAULT_CANVAS_WIDTH,
|
|
4101
|
+
height: chunkPOPGQIVR_js.DEFAULT_CANVAS_HEIGHT
|
|
4102
4102
|
});
|
|
4103
4103
|
const [slideSizeEmu, setSlideSizeEmu] = React17.useState();
|
|
4104
4104
|
const [activeSlideIndex, setActiveSlideIndex] = React17.useState(0);
|
|
@@ -4474,7 +4474,7 @@ function useLoadContent({
|
|
|
4474
4474
|
}
|
|
4475
4475
|
let cancelled = false;
|
|
4476
4476
|
const token = ++renderTokenRef.current;
|
|
4477
|
-
const handler = new
|
|
4477
|
+
const handler = new chunkPOPGQIVR_js.dist_exports.PptxHandler();
|
|
4478
4478
|
const resources = pptx.createPresentationLoadResources(handler);
|
|
4479
4479
|
const loadBlobUrls = resources.blobUrls;
|
|
4480
4480
|
(async () => {
|
|
@@ -4559,12 +4559,12 @@ function useLoadContent({
|
|
|
4559
4559
|
}
|
|
4560
4560
|
resources.commit();
|
|
4561
4561
|
handlerRef.current = handler;
|
|
4562
|
-
const partition =
|
|
4562
|
+
const partition = chunkPOPGQIVR_js.partitionTemplateElements(nextSlides);
|
|
4563
4563
|
setSlides(partition.slides);
|
|
4564
4564
|
setTemplateElementsBySlideId(partition.templateElementsBySlideId);
|
|
4565
4565
|
setCanvasSize({
|
|
4566
|
-
width: parsed.width ??
|
|
4567
|
-
height: parsed.height ??
|
|
4566
|
+
width: parsed.width ?? chunkPOPGQIVR_js.DEFAULT_CANVAS_WIDTH,
|
|
4567
|
+
height: parsed.height ?? chunkPOPGQIVR_js.DEFAULT_CANVAS_HEIGHT
|
|
4568
4568
|
});
|
|
4569
4569
|
setSlideSizeEmu(
|
|
4570
4570
|
typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
|
|
@@ -4627,7 +4627,7 @@ function useLoadContent({
|
|
|
4627
4627
|
onContentApplied?.();
|
|
4628
4628
|
} catch (err) {
|
|
4629
4629
|
if (!cancelled && token === renderTokenRef.current) {
|
|
4630
|
-
if (err instanceof
|
|
4630
|
+
if (err instanceof chunkPOPGQIVR_js.dist_exports.EncryptedFileError) {
|
|
4631
4631
|
setIsEncrypted(true);
|
|
4632
4632
|
} else {
|
|
4633
4633
|
console.error("[pptx] Failed to load presentation content:", err);
|
|
@@ -4752,7 +4752,7 @@ function useTextElementOperations(input) {
|
|
|
4752
4752
|
updateSelectedElement
|
|
4753
4753
|
} = input;
|
|
4754
4754
|
const liveTextSegments = React17.useCallback(() => {
|
|
4755
|
-
if (!selectedElement || !(0,
|
|
4755
|
+
if (!selectedElement || !(0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
4756
4756
|
return void 0;
|
|
4757
4757
|
}
|
|
4758
4758
|
if (selectedElement.id !== inlineEditingElementId) {
|
|
@@ -4770,7 +4770,7 @@ function useTextElementOperations(input) {
|
|
|
4770
4770
|
}, [selectedElement, inlineEditingElementId, inlineEditingText, inlineEditingSnapshotRef]);
|
|
4771
4771
|
const updateSelectedTextStyle = React17.useCallback(
|
|
4772
4772
|
(updates) => {
|
|
4773
|
-
if (!selectedElement || !(0,
|
|
4773
|
+
if (!selectedElement || !(0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
4774
4774
|
return;
|
|
4775
4775
|
}
|
|
4776
4776
|
const isLiveEditing = selectedElement.id === inlineEditingElementId;
|
|
@@ -4848,7 +4848,7 @@ function useTextElementOperations(input) {
|
|
|
4848
4848
|
);
|
|
4849
4849
|
const toggleSelectedBullets = React17.useCallback(
|
|
4850
4850
|
(kind) => {
|
|
4851
|
-
if (!selectedElement || !(0,
|
|
4851
|
+
if (!selectedElement || !(0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
4852
4852
|
return;
|
|
4853
4853
|
}
|
|
4854
4854
|
const currentSegments = liveTextSegments();
|
|
@@ -4899,7 +4899,7 @@ function useTextElementOperations(input) {
|
|
|
4899
4899
|
);
|
|
4900
4900
|
const updateSelectedTextCase = React17.useCallback(
|
|
4901
4901
|
(mode) => {
|
|
4902
|
-
if (!selectedElement || !(0,
|
|
4902
|
+
if (!selectedElement || !(0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
4903
4903
|
return;
|
|
4904
4904
|
}
|
|
4905
4905
|
const isLiveEditing = selectedElement.id === inlineEditingElementId;
|
|
@@ -5015,7 +5015,7 @@ function useElementOperations(input) {
|
|
|
5015
5015
|
);
|
|
5016
5016
|
return;
|
|
5017
5017
|
}
|
|
5018
|
-
if (
|
|
5018
|
+
if (chunkPOPGQIVR_js.isTemplateElementId(elementId)) {
|
|
5019
5019
|
const slideId = activeSlide?.id;
|
|
5020
5020
|
if (slideId) {
|
|
5021
5021
|
setTemplateElementsBySlideId((prev) => ({
|
|
@@ -5051,7 +5051,7 @@ function useElementOperations(input) {
|
|
|
5051
5051
|
);
|
|
5052
5052
|
const updateSelectedShapeStyle = React17.useCallback(
|
|
5053
5053
|
(updates) => {
|
|
5054
|
-
if (!selectedElement || !(0,
|
|
5054
|
+
if (!selectedElement || !(0, chunkPOPGQIVR_js.dist_exports.hasShapeProperties)(selectedElement)) {
|
|
5055
5055
|
return;
|
|
5056
5056
|
}
|
|
5057
5057
|
updateSelectedElement({
|
|
@@ -5255,15 +5255,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
|
|
|
5255
5255
|
// src/viewer/hooks/pointer-move-handlers.ts
|
|
5256
5256
|
function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
|
|
5257
5257
|
const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
|
|
5258
|
-
let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize:
|
|
5258
|
+
let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkPOPGQIVR_js.MIN_ELEMENT_SIZE });
|
|
5259
5259
|
if (lockAspect) {
|
|
5260
|
-
resized = pptx.lockResizeAspect(resized, startBox, handle,
|
|
5260
|
+
resized = pptx.lockResizeAspect(resized, startBox, handle, chunkPOPGQIVR_js.MIN_ELEMENT_SIZE);
|
|
5261
5261
|
}
|
|
5262
5262
|
const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
|
|
5263
5263
|
if (!snapToGrid) {
|
|
5264
5264
|
return box;
|
|
5265
5265
|
}
|
|
5266
|
-
return pptx.snapBoxToGrid(box, handle, gridSpacingPx,
|
|
5266
|
+
return pptx.snapBoxToGrid(box, handle, gridSpacingPx, chunkPOPGQIVR_js.MIN_ELEMENT_SIZE);
|
|
5267
5267
|
}
|
|
5268
5268
|
function resolveLiveTarget(input) {
|
|
5269
5269
|
const { livePatcher, editTemplateMode, activeSlide } = input;
|
|
@@ -5376,7 +5376,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
|
|
|
5376
5376
|
width: el.width,
|
|
5377
5377
|
height: el.height
|
|
5378
5378
|
}));
|
|
5379
|
-
const snapResult =
|
|
5379
|
+
const snapResult = chunkPOPGQIVR_js.computeSnapToShape(
|
|
5380
5380
|
targetX,
|
|
5381
5381
|
targetY,
|
|
5382
5382
|
primaryEl.width,
|
|
@@ -5450,8 +5450,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
|
|
|
5450
5450
|
rs.lastY = geo.y;
|
|
5451
5451
|
rs.lastWidth = geo.width;
|
|
5452
5452
|
rs.lastHeight = geo.height;
|
|
5453
|
-
const width = Math.max(geo.width,
|
|
5454
|
-
const height = Math.max(geo.height,
|
|
5453
|
+
const width = Math.max(geo.width, chunkPOPGQIVR_js.MIN_ELEMENT_SIZE);
|
|
5454
|
+
const height = Math.max(geo.height, chunkPOPGQIVR_js.MIN_ELEMENT_SIZE);
|
|
5455
5455
|
if (rs.domEl) {
|
|
5456
5456
|
rs.domEl.style.left = `${geo.x}px`;
|
|
5457
5457
|
rs.domEl.style.top = `${geo.y}px`;
|
|
@@ -5544,13 +5544,13 @@ function processPointerUp(input) {
|
|
|
5544
5544
|
if (i !== activeSlideIndex) {
|
|
5545
5545
|
return s;
|
|
5546
5546
|
}
|
|
5547
|
-
const rerouted =
|
|
5547
|
+
const rerouted = chunkPOPGQIVR_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
|
|
5548
5548
|
if (rerouted.length === 0) {
|
|
5549
5549
|
return s;
|
|
5550
5550
|
}
|
|
5551
5551
|
return {
|
|
5552
5552
|
...s,
|
|
5553
|
-
elements:
|
|
5553
|
+
elements: chunkPOPGQIVR_js.applyReroutedConnectors(s.elements, rerouted)
|
|
5554
5554
|
};
|
|
5555
5555
|
})
|
|
5556
5556
|
);
|
|
@@ -5602,8 +5602,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
|
|
|
5602
5602
|
}
|
|
5603
5603
|
return { ...el, x: start.x + dx, y: start.y + dy };
|
|
5604
5604
|
});
|
|
5605
|
-
const rerouted =
|
|
5606
|
-
return
|
|
5605
|
+
const rerouted = chunkPOPGQIVR_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
|
|
5606
|
+
return chunkPOPGQIVR_js.applyReroutedConnectors(movedElements, rerouted);
|
|
5607
5607
|
};
|
|
5608
5608
|
if (editTemplateMode) {
|
|
5609
5609
|
const slideId = activeSlide?.id;
|
|
@@ -5791,7 +5791,7 @@ function useCanvasInteractions(input) {
|
|
|
5791
5791
|
return;
|
|
5792
5792
|
}
|
|
5793
5793
|
const el = elementLookup.get(editId);
|
|
5794
|
-
if (el && (0,
|
|
5794
|
+
if (el && (0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(el)) {
|
|
5795
5795
|
const reader = inlineEditingReaderRef?.current;
|
|
5796
5796
|
const read = reader?.elementId === editId ? reader.read() : void 0;
|
|
5797
5797
|
if (read?.kind === "unsupported") {
|
|
@@ -5838,7 +5838,7 @@ function useCanvasInteractions(input) {
|
|
|
5838
5838
|
wasEditable.current = canEdit;
|
|
5839
5839
|
}, [canEdit]);
|
|
5840
5840
|
const openEquationEditorForElement = (el) => {
|
|
5841
|
-
if (!(0,
|
|
5841
|
+
if (!(0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(el)) {
|
|
5842
5842
|
return false;
|
|
5843
5843
|
}
|
|
5844
5844
|
const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
|
|
@@ -5871,7 +5871,7 @@ function useCanvasInteractions(input) {
|
|
|
5871
5871
|
justInteractedRef.current = false;
|
|
5872
5872
|
} else {
|
|
5873
5873
|
const el = elementLookup.get(elementId);
|
|
5874
|
-
if (el && (0,
|
|
5874
|
+
if (el && (0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
|
|
5875
5875
|
if (!openEquationEditorForElement(el)) {
|
|
5876
5876
|
pptx.setPendingCaretPoint(e);
|
|
5877
5877
|
setInlineEditingElementId(elementId);
|
|
@@ -5897,7 +5897,7 @@ function useCanvasInteractions(input) {
|
|
|
5897
5897
|
if (openEquationEditorForElement(el)) {
|
|
5898
5898
|
return;
|
|
5899
5899
|
}
|
|
5900
|
-
if ((0,
|
|
5900
|
+
if ((0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
|
|
5901
5901
|
setInlineEditingElementId(elementId);
|
|
5902
5902
|
setInlineEditingText(el.text ?? "");
|
|
5903
5903
|
}
|
|
@@ -6362,7 +6362,7 @@ function createStructuredElementHandlers(deps) {
|
|
|
6362
6362
|
return;
|
|
6363
6363
|
}
|
|
6364
6364
|
const resolved = resolveHyperlinkEditResult(data);
|
|
6365
|
-
if (resolved.url && !
|
|
6365
|
+
if (resolved.url && !chunkPOPGQIVR_js.isUrlSafe(resolved.url)) {
|
|
6366
6366
|
return;
|
|
6367
6367
|
}
|
|
6368
6368
|
const actionClick = {
|
|
@@ -6408,11 +6408,11 @@ function createStructuredElementHandlers(deps) {
|
|
|
6408
6408
|
if (!activeSlide) {
|
|
6409
6409
|
return;
|
|
6410
6410
|
}
|
|
6411
|
-
const preset =
|
|
6411
|
+
const preset = chunkPOPGQIVR_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
|
|
6412
6412
|
if (!preset) {
|
|
6413
6413
|
return;
|
|
6414
6414
|
}
|
|
6415
|
-
const defaultPptxAction = (0,
|
|
6415
|
+
const defaultPptxAction = (0, chunkPOPGQIVR_js.dist_exports.elementActionToPptxAction)({
|
|
6416
6416
|
trigger: "click",
|
|
6417
6417
|
type: preset.defaultAction
|
|
6418
6418
|
});
|
|
@@ -6495,7 +6495,7 @@ function useInsertElements(input) {
|
|
|
6495
6495
|
width: 300,
|
|
6496
6496
|
height: 60,
|
|
6497
6497
|
text: "",
|
|
6498
|
-
textStyle: { fontSize:
|
|
6498
|
+
textStyle: { fontSize: chunkPOPGQIVR_js.DEFAULT_TEXT_FONT_SIZE }
|
|
6499
6499
|
});
|
|
6500
6500
|
};
|
|
6501
6501
|
const handleAddShape = () => {
|
|
@@ -6522,7 +6522,7 @@ function useInsertElements(input) {
|
|
|
6522
6522
|
return;
|
|
6523
6523
|
}
|
|
6524
6524
|
addElement({
|
|
6525
|
-
...pptx.newTableElement(
|
|
6525
|
+
...pptx.newTableElement(chunkPOPGQIVR_js.DEFAULT_TABLE_ROWS, chunkPOPGQIVR_js.DEFAULT_TABLE_COLUMNS, 100, 200),
|
|
6526
6526
|
id: pptx.generateElementId()
|
|
6527
6527
|
});
|
|
6528
6528
|
};
|
|
@@ -6691,7 +6691,7 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
6691
6691
|
history
|
|
6692
6692
|
} = input;
|
|
6693
6693
|
const updateElementsOwning = (elementId, updater) => {
|
|
6694
|
-
if (editTemplateMode && !
|
|
6694
|
+
if (editTemplateMode && !chunkPOPGQIVR_js.isTemplateElementId(elementId)) {
|
|
6695
6695
|
ops.updateSlides(
|
|
6696
6696
|
(prev) => prev.map(
|
|
6697
6697
|
(slide, index) => index === activeSlideIndex ? { ...slide, elements: updater(slide.elements) } : slide
|
|
@@ -6725,9 +6725,9 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
6725
6725
|
return;
|
|
6726
6726
|
}
|
|
6727
6727
|
const group = selectedElement;
|
|
6728
|
-
const intoTemplate =
|
|
6728
|
+
const intoTemplate = chunkPOPGQIVR_js.isTemplateElementId(group.id);
|
|
6729
6729
|
const childIds = group.children.map(
|
|
6730
|
-
(child) => intoTemplate ?
|
|
6730
|
+
(child) => intoTemplate ? chunkPOPGQIVR_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
|
|
6731
6731
|
);
|
|
6732
6732
|
const { elements, childIds: usedIds } = pptx.ungroupElements(
|
|
6733
6733
|
ops.activeElements,
|
|
@@ -7050,7 +7050,7 @@ function useSlideManagement(input) {
|
|
|
7050
7050
|
if (!src) {
|
|
7051
7051
|
continue;
|
|
7052
7052
|
}
|
|
7053
|
-
const clone = { ...(0,
|
|
7053
|
+
const clone = { ...(0, chunkPOPGQIVR_js.dist_exports.duplicateSlide)(src, next.length + 1), id: pptx.makeSlideId() };
|
|
7054
7054
|
next.splice(i + offset + 1, 0, clone);
|
|
7055
7055
|
offset++;
|
|
7056
7056
|
}
|
|
@@ -7153,7 +7153,7 @@ function createTableMergeHandlers(input) {
|
|
|
7153
7153
|
if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
|
|
7154
7154
|
return;
|
|
7155
7155
|
}
|
|
7156
|
-
const newTableData =
|
|
7156
|
+
const newTableData = chunkPOPGQIVR_js.mergeCells(
|
|
7157
7157
|
[
|
|
7158
7158
|
{ row: rowIndex, col: columnIndex },
|
|
7159
7159
|
{ row: rowIndex, col: nextColIdx }
|
|
@@ -7161,7 +7161,7 @@ function createTableMergeHandlers(input) {
|
|
|
7161
7161
|
td
|
|
7162
7162
|
);
|
|
7163
7163
|
const updates = { tableData: newTableData };
|
|
7164
|
-
const newRawXml = (0,
|
|
7164
|
+
const newRawXml = (0, chunkPOPGQIVR_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
|
|
7165
7165
|
if (newRawXml) {
|
|
7166
7166
|
updates.rawXml = newRawXml;
|
|
7167
7167
|
}
|
|
@@ -7187,7 +7187,7 @@ function createTableMergeHandlers(input) {
|
|
|
7187
7187
|
if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
|
|
7188
7188
|
return;
|
|
7189
7189
|
}
|
|
7190
|
-
const newTableData =
|
|
7190
|
+
const newTableData = chunkPOPGQIVR_js.mergeCells(
|
|
7191
7191
|
[
|
|
7192
7192
|
{ row: rowIndex, col: columnIndex },
|
|
7193
7193
|
{ row: targetNextRowIdx, col: columnIndex }
|
|
@@ -7195,7 +7195,7 @@ function createTableMergeHandlers(input) {
|
|
|
7195
7195
|
td
|
|
7196
7196
|
);
|
|
7197
7197
|
const updates = { tableData: newTableData };
|
|
7198
|
-
const newRawXml = (0,
|
|
7198
|
+
const newRawXml = (0, chunkPOPGQIVR_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
|
|
7199
7199
|
if (newRawXml) {
|
|
7200
7200
|
updates.rawXml = newRawXml;
|
|
7201
7201
|
}
|
|
@@ -7210,9 +7210,9 @@ function createTableMergeHandlers(input) {
|
|
|
7210
7210
|
return;
|
|
7211
7211
|
}
|
|
7212
7212
|
const td = selectedElement.tableData;
|
|
7213
|
-
const newTableData =
|
|
7213
|
+
const newTableData = chunkPOPGQIVR_js.mergeCells(ts.selectedCells, td);
|
|
7214
7214
|
const updates = { tableData: newTableData };
|
|
7215
|
-
const newRawXml = (0,
|
|
7215
|
+
const newRawXml = (0, chunkPOPGQIVR_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
|
|
7216
7216
|
if (newRawXml) {
|
|
7217
7217
|
updates.rawXml = newRawXml;
|
|
7218
7218
|
}
|
|
@@ -7229,9 +7229,9 @@ function createTableMergeHandlers(input) {
|
|
|
7229
7229
|
}
|
|
7230
7230
|
const { rowIndex, columnIndex } = ts;
|
|
7231
7231
|
const td = selectedElement.tableData;
|
|
7232
|
-
const newTableData =
|
|
7232
|
+
const newTableData = chunkPOPGQIVR_js.splitCell(rowIndex, columnIndex, td);
|
|
7233
7233
|
const updates = { tableData: newTableData };
|
|
7234
|
-
const newRawXml = (0,
|
|
7234
|
+
const newRawXml = (0, chunkPOPGQIVR_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
|
|
7235
7235
|
if (newRawXml) {
|
|
7236
7236
|
updates.rawXml = newRawXml;
|
|
7237
7237
|
}
|
|
@@ -7266,7 +7266,7 @@ function createTableStructHandlers(input) {
|
|
|
7266
7266
|
updates.tableData = pptx.setCellText(el, rowIndex, colIndex, text).tableData;
|
|
7267
7267
|
}
|
|
7268
7268
|
if (el.rawXml) {
|
|
7269
|
-
const newRawXml = (0,
|
|
7269
|
+
const newRawXml = (0, chunkPOPGQIVR_js.dist_exports.updateCellTextInRawXml)(el, rowIndex, colIndex, text);
|
|
7270
7270
|
if (newRawXml) {
|
|
7271
7271
|
updates.rawXml = newRawXml;
|
|
7272
7272
|
}
|
|
@@ -7290,7 +7290,7 @@ function createTableStructHandlers(input) {
|
|
|
7290
7290
|
const { rowIndex, columnIndex: colIndex } = ts;
|
|
7291
7291
|
const updates = {};
|
|
7292
7292
|
if (selectedElement.rawXml) {
|
|
7293
|
-
const newRawXml = (0,
|
|
7293
|
+
const newRawXml = (0, chunkPOPGQIVR_js.dist_exports.updateCellTextStyleInRawXml)(
|
|
7294
7294
|
selectedElement,
|
|
7295
7295
|
rowIndex,
|
|
7296
7296
|
colIndex,
|
|
@@ -7457,7 +7457,7 @@ function useExportSaveAs(input) {
|
|
|
7457
7457
|
const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
|
|
7458
7458
|
const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
|
|
7459
7459
|
const data = {
|
|
7460
|
-
slides:
|
|
7460
|
+
slides: chunkPOPGQIVR_js.buildSaveSlides(slides, templateElementsBySlideId),
|
|
7461
7461
|
width: canvasSize.width,
|
|
7462
7462
|
height: canvasSize.height,
|
|
7463
7463
|
widthEmu: slideSize.widthEmu,
|
|
@@ -7615,7 +7615,7 @@ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActi
|
|
|
7615
7615
|
}
|
|
7616
7616
|
function tilesToPdfPage(tilesResult) {
|
|
7617
7617
|
return tilesResult.tiles.map((tile) => ({
|
|
7618
|
-
image:
|
|
7618
|
+
image: chunkPOPGQIVR_js.canvasToJpegData(tile.canvas),
|
|
7619
7619
|
placement: pptx.placeTileOnPage(
|
|
7620
7620
|
tile,
|
|
7621
7621
|
tilesResult.fullWidth,
|
|
@@ -7648,7 +7648,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
|
|
|
7648
7648
|
if (pages.length === 0) {
|
|
7649
7649
|
throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
|
|
7650
7650
|
}
|
|
7651
|
-
const pdfBlobUrl =
|
|
7651
|
+
const pdfBlobUrl = chunkPOPGQIVR_js.buildPdfFromTiledImageData(pages);
|
|
7652
7652
|
pptx.downloadDataUrl(pdfBlobUrl, filename);
|
|
7653
7653
|
}
|
|
7654
7654
|
async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
|
|
@@ -7678,7 +7678,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
|
|
|
7678
7678
|
if (pages.length === 0) {
|
|
7679
7679
|
throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
|
|
7680
7680
|
}
|
|
7681
|
-
const pdfDataUrl =
|
|
7681
|
+
const pdfDataUrl = chunkPOPGQIVR_js.buildNotesPdf(pages);
|
|
7682
7682
|
pptx.downloadDataUrl(pdfDataUrl, filename);
|
|
7683
7683
|
}
|
|
7684
7684
|
async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
|
|
@@ -7873,7 +7873,7 @@ function exportAllSlidesToSvg(data, options = {}) {
|
|
|
7873
7873
|
continue;
|
|
7874
7874
|
}
|
|
7875
7875
|
onProgress?.(processedCount, data.slides.length);
|
|
7876
|
-
let svg =
|
|
7876
|
+
let svg = chunkPOPGQIVR_js.dist_exports.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
|
|
7877
7877
|
if (embedFonts && fontFaces?.length) {
|
|
7878
7878
|
svg = injectFontFaces(svg, fontFaces);
|
|
7879
7879
|
}
|
|
@@ -8462,10 +8462,10 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
|
|
|
8462
8462
|
return;
|
|
8463
8463
|
}
|
|
8464
8464
|
await handler.applyTheme(colorScheme, fontScheme, name);
|
|
8465
|
-
const previousMap = theme?.colorScheme ? (0,
|
|
8465
|
+
const previousMap = theme?.colorScheme ? (0, chunkPOPGQIVR_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
|
|
8466
8466
|
bumpHistory();
|
|
8467
8467
|
setSlides(
|
|
8468
|
-
(slides) => (0,
|
|
8468
|
+
(slides) => (0, chunkPOPGQIVR_js.dist_exports.applyThemeToData)(
|
|
8469
8469
|
{ slides, theme, themeColorMap: previousMap },
|
|
8470
8470
|
colorScheme,
|
|
8471
8471
|
fontScheme,
|
|
@@ -8476,8 +8476,8 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
|
|
|
8476
8476
|
(prev) => Object.fromEntries(
|
|
8477
8477
|
Object.entries(prev).map(([id, elements]) => [
|
|
8478
8478
|
id,
|
|
8479
|
-
(0,
|
|
8480
|
-
(0,
|
|
8479
|
+
(0, chunkPOPGQIVR_js.dist_exports.reResolveElementFonts)(
|
|
8480
|
+
(0, chunkPOPGQIVR_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme),
|
|
8481
8481
|
theme?.fontScheme,
|
|
8482
8482
|
fontScheme
|
|
8483
8483
|
)
|
|
@@ -8535,13 +8535,13 @@ function useThemeHandlers(input) {
|
|
|
8535
8535
|
return;
|
|
8536
8536
|
}
|
|
8537
8537
|
await handler.updateThemeColorScheme(colorScheme);
|
|
8538
|
-
const previousMap = theme?.colorScheme ? (0,
|
|
8539
|
-
setSlides((prev) => (0,
|
|
8538
|
+
const previousMap = theme?.colorScheme ? (0, chunkPOPGQIVR_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
|
|
8539
|
+
setSlides((prev) => (0, chunkPOPGQIVR_js.dist_exports.reResolveSlideColors)(prev, previousMap, colorScheme));
|
|
8540
8540
|
if (Object.keys(templateElementsBySlideId).length > 0) {
|
|
8541
8541
|
setTemplateElementsBySlideId((prev) => {
|
|
8542
8542
|
const next = {};
|
|
8543
8543
|
for (const [slideId, elements] of Object.entries(prev)) {
|
|
8544
|
-
next[slideId] = (0,
|
|
8544
|
+
next[slideId] = (0, chunkPOPGQIVR_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme);
|
|
8545
8545
|
}
|
|
8546
8546
|
return next;
|
|
8547
8547
|
});
|
|
@@ -8652,7 +8652,7 @@ function useThemeSwitching(input) {
|
|
|
8652
8652
|
}
|
|
8653
8653
|
try {
|
|
8654
8654
|
await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
|
|
8655
|
-
const newData = (0,
|
|
8655
|
+
const newData = (0, chunkPOPGQIVR_js.dist_exports.applyThemeToData)(data, preset.colorScheme, preset.fontScheme, preset.name);
|
|
8656
8656
|
onDataChange(newData);
|
|
8657
8657
|
onThemeChanged?.(preset);
|
|
8658
8658
|
} catch (error) {
|
|
@@ -8669,7 +8669,7 @@ function useThemeSwitching(input) {
|
|
|
8669
8669
|
}
|
|
8670
8670
|
try {
|
|
8671
8671
|
await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
|
|
8672
|
-
const newData = (0,
|
|
8672
|
+
const newData = (0, chunkPOPGQIVR_js.dist_exports.applyThemeToData)(data, colorScheme, fontScheme, themeName);
|
|
8673
8673
|
onDataChange(newData);
|
|
8674
8674
|
} catch (error) {
|
|
8675
8675
|
console.error("Failed to switch to custom theme:", error);
|
|
@@ -8681,12 +8681,12 @@ function useThemeSwitching(input) {
|
|
|
8681
8681
|
if (!data?.theme?.colorScheme) {
|
|
8682
8682
|
return void 0;
|
|
8683
8683
|
}
|
|
8684
|
-
return
|
|
8685
|
-
(p) => (0,
|
|
8684
|
+
return chunkPOPGQIVR_js.dist_exports.THEME_PRESETS.find(
|
|
8685
|
+
(p) => (0, chunkPOPGQIVR_js.dist_exports.themeColorSchemesEqual)(data.theme?.colorScheme, p.colorScheme)
|
|
8686
8686
|
);
|
|
8687
8687
|
}, [data?.theme?.colorScheme]);
|
|
8688
8688
|
return {
|
|
8689
|
-
presets:
|
|
8689
|
+
presets: chunkPOPGQIVR_js.dist_exports.THEME_PRESETS,
|
|
8690
8690
|
switchToPreset,
|
|
8691
8691
|
switchToCustom,
|
|
8692
8692
|
currentPreset
|
|
@@ -8763,7 +8763,7 @@ function usePropertyHandlers(input) {
|
|
|
8763
8763
|
}
|
|
8764
8764
|
try {
|
|
8765
8765
|
const ab = await file.arrayBuffer();
|
|
8766
|
-
const h = new
|
|
8766
|
+
const h = new chunkPOPGQIVR_js.dist_exports.PptxHandler();
|
|
8767
8767
|
const other = await h.load(ab);
|
|
8768
8768
|
if (!other) {
|
|
8769
8769
|
return;
|
|
@@ -8773,7 +8773,7 @@ function usePropertyHandlers(input) {
|
|
|
8773
8773
|
width: canvasSize.width,
|
|
8774
8774
|
height: canvasSize.height
|
|
8775
8775
|
};
|
|
8776
|
-
setCompareResult(
|
|
8776
|
+
setCompareResult(chunkPOPGQIVR_js.comparePresentation(cur, other));
|
|
8777
8777
|
setIsComparePanelOpen(true);
|
|
8778
8778
|
} catch (err) {
|
|
8779
8779
|
console.warn("Compare failed:", err);
|
|
@@ -9126,7 +9126,7 @@ function useViewerDialogs(input) {
|
|
|
9126
9126
|
};
|
|
9127
9127
|
}
|
|
9128
9128
|
function computeGridSpacingPx(documentGridSpacing) {
|
|
9129
|
-
return pptx.computeGridSpacingPx(documentGridSpacing,
|
|
9129
|
+
return pptx.computeGridSpacingPx(documentGridSpacing, chunkPOPGQIVR_js.GRID_SIZE);
|
|
9130
9130
|
}
|
|
9131
9131
|
function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
|
|
9132
9132
|
const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
|
|
@@ -9135,7 +9135,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
|
|
|
9135
9135
|
}
|
|
9136
9136
|
function computeSlideSectionGroups(slides, sections) {
|
|
9137
9137
|
return pptx.groupSlidesBySection(sections, slides).map((group) => ({
|
|
9138
|
-
id: group.section?.id ?? (sections.length > 0 ?
|
|
9138
|
+
id: group.section?.id ?? (sections.length > 0 ? chunkPOPGQIVR_js.UNGROUPED_SECTION_ID : chunkPOPGQIVR_js.DEFAULT_SECTION_GROUP_ID),
|
|
9139
9139
|
label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
|
|
9140
9140
|
slideIndexes: group.slideIndexes,
|
|
9141
9141
|
...group.section?.color !== void 0 ? { color: group.section.color } : {},
|
|
@@ -9180,10 +9180,10 @@ function useDerivedSlideState(input) {
|
|
|
9180
9180
|
);
|
|
9181
9181
|
const slideSectionGroups = React17.useMemo(
|
|
9182
9182
|
() => computeSlideSectionGroups(slides, sections).map((group) => {
|
|
9183
|
-
if (group.id ===
|
|
9183
|
+
if (group.id === chunkPOPGQIVR_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
|
|
9184
9184
|
return { ...group, label: t("pptx.slides.ungroupedSlides") };
|
|
9185
9185
|
}
|
|
9186
|
-
if (group.id ===
|
|
9186
|
+
if (group.id === chunkPOPGQIVR_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
|
|
9187
9187
|
return { ...group, label: t("pptx.sections.slides") };
|
|
9188
9188
|
}
|
|
9189
9189
|
return group;
|
|
@@ -9290,7 +9290,7 @@ function useAnnotationHandlers(input) {
|
|
|
9290
9290
|
if (nextMode === "present") {
|
|
9291
9291
|
presentation.enterPresentMode();
|
|
9292
9292
|
} else if (mode === "present" && annotations.hasAnyAnnotations) {
|
|
9293
|
-
|
|
9293
|
+
chunkPOPGQIVR_js.stopAllPersistentAudio();
|
|
9294
9294
|
if (promptKeepInkAnnotations) {
|
|
9295
9295
|
pendingModeAfterAnnotationsRef.current = nextMode;
|
|
9296
9296
|
setShowKeepAnnotationsDialog(true);
|
|
@@ -9300,7 +9300,7 @@ function useAnnotationHandlers(input) {
|
|
|
9300
9300
|
}
|
|
9301
9301
|
} else {
|
|
9302
9302
|
if (mode === "present") {
|
|
9303
|
-
|
|
9303
|
+
chunkPOPGQIVR_js.stopAllPersistentAudio();
|
|
9304
9304
|
}
|
|
9305
9305
|
setMode(nextMode);
|
|
9306
9306
|
}
|
|
@@ -9371,7 +9371,7 @@ function overlayPendingInlineEdit(document2, elementId, text, snapshot, transfor
|
|
|
9371
9371
|
(slide) => !elementId ? slide : {
|
|
9372
9372
|
...slide,
|
|
9373
9373
|
elements: slide.elements.map(
|
|
9374
|
-
(element) => element.id === elementId && (0,
|
|
9374
|
+
(element) => element.id === elementId && (0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(element) ? {
|
|
9375
9375
|
...element,
|
|
9376
9376
|
text,
|
|
9377
9377
|
textSegments: pptx.remapTextToSegments(
|
|
@@ -9457,14 +9457,14 @@ function useSerialize(input) {
|
|
|
9457
9457
|
const pptxGuides = guides.map((g) => ({
|
|
9458
9458
|
id: g.id,
|
|
9459
9459
|
orientation: g.axis === "h" ? "horz" : "vert",
|
|
9460
|
-
positionEmu: (0,
|
|
9460
|
+
positionEmu: (0, chunkPOPGQIVR_js.dist_exports.guidePxToEmu)(g.position)
|
|
9461
9461
|
}));
|
|
9462
9462
|
return {
|
|
9463
9463
|
...slide,
|
|
9464
9464
|
guides: pptxGuides.length > 0 ? pptxGuides : void 0
|
|
9465
9465
|
};
|
|
9466
9466
|
});
|
|
9467
|
-
const slidesToSave =
|
|
9467
|
+
const slidesToSave = chunkPOPGQIVR_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
|
|
9468
9468
|
const saveOptions = pptx.buildDeckSaveOptions({
|
|
9469
9469
|
// Without this the Slide Size card edited a viewer-only pixel value and
|
|
9470
9470
|
// the saved `p:sldSz` never moved: passing `slideSize` is the only way a
|
|
@@ -9645,7 +9645,7 @@ function usePresentationSetup(input) {
|
|
|
9645
9645
|
return;
|
|
9646
9646
|
}
|
|
9647
9647
|
if (mode === "present" && nextMode !== "present") {
|
|
9648
|
-
|
|
9648
|
+
chunkPOPGQIVR_js.stopAllPersistentAudio();
|
|
9649
9649
|
stopAnimationSound();
|
|
9650
9650
|
const exitHandler = exitModeHandlerRef.current;
|
|
9651
9651
|
if (exitHandler) {
|
|
@@ -9766,12 +9766,12 @@ function useCanvasImagePaste(input) {
|
|
|
9766
9766
|
);
|
|
9767
9767
|
}
|
|
9768
9768
|
function formatPatchFor(element, format) {
|
|
9769
|
-
const updated =
|
|
9769
|
+
const updated = chunkPOPGQIVR_js.applyFormatToElement(element, format);
|
|
9770
9770
|
const updates = {};
|
|
9771
|
-
if ((0,
|
|
9771
|
+
if ((0, chunkPOPGQIVR_js.dist_exports.hasShapeProperties)(updated)) {
|
|
9772
9772
|
updates.shapeStyle = updated.shapeStyle;
|
|
9773
9773
|
}
|
|
9774
|
-
if ((0,
|
|
9774
|
+
if ((0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(updated)) {
|
|
9775
9775
|
updates.textStyle = updated.textStyle;
|
|
9776
9776
|
}
|
|
9777
9777
|
return updates;
|
|
@@ -9789,7 +9789,7 @@ function useFormatPainterEditing(input) {
|
|
|
9789
9789
|
const prevFormatPainterRef = React17.useRef(false);
|
|
9790
9790
|
React17.useEffect(() => {
|
|
9791
9791
|
if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
|
|
9792
|
-
copiedFormatRef.current =
|
|
9792
|
+
copiedFormatRef.current = chunkPOPGQIVR_js.copyFormatFromElement(selectedElement);
|
|
9793
9793
|
} else if (!formatPainterActive) {
|
|
9794
9794
|
copiedFormatRef.current = null;
|
|
9795
9795
|
}
|
|
@@ -10878,7 +10878,7 @@ function useKeyboardShortcutWiring(input) {
|
|
|
10878
10878
|
}
|
|
10879
10879
|
function stepSelectedFontSize(state, ops, direction) {
|
|
10880
10880
|
const selected = state.selectedElement;
|
|
10881
|
-
const currentPx = (selected && (0,
|
|
10881
|
+
const currentPx = (selected && (0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(selected) ? selected.textStyle?.fontSize : void 0) ?? pptx.textFontSizePtToPx(18);
|
|
10882
10882
|
const nextPt = pptx.stepFontSizePt(pptx.textFontSizePxToPt(currentPx), direction);
|
|
10883
10883
|
ops.updateSelectedTextStyle({ fontSize: pptx.textFontSizePtToPx(nextPt) });
|
|
10884
10884
|
}
|
|
@@ -11429,7 +11429,7 @@ function useCollaborationWriteBack(input) {
|
|
|
11429
11429
|
getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
|
|
11430
11430
|
getSaveOptions: () => latest.current.getSaveOptions?.(),
|
|
11431
11431
|
getTemplateElements: () => latest.current.templateElementsBySlideId,
|
|
11432
|
-
mergeTemplateElements:
|
|
11432
|
+
mergeTemplateElements: chunkPOPGQIVR_js.buildSaveSlides
|
|
11433
11433
|
}),
|
|
11434
11434
|
[latest]
|
|
11435
11435
|
);
|
|
@@ -11982,8 +11982,8 @@ function useTouchGestures(input) {
|
|
|
11982
11982
|
}
|
|
11983
11983
|
const recognizer = pptx.createTouchGestureRecognizer({
|
|
11984
11984
|
getScale: () => scaleRef.current,
|
|
11985
|
-
minScale:
|
|
11986
|
-
maxScale:
|
|
11985
|
+
minScale: chunkPOPGQIVR_js.MIN_ZOOM_SCALE,
|
|
11986
|
+
maxScale: chunkPOPGQIVR_js.MAX_ZOOM_SCALE,
|
|
11987
11987
|
callbacks: {
|
|
11988
11988
|
onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
|
|
11989
11989
|
onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
|
|
@@ -12106,7 +12106,7 @@ function buildCanvasProps(input) {
|
|
|
12106
12106
|
if (pptx.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
|
|
12107
12107
|
return;
|
|
12108
12108
|
}
|
|
12109
|
-
|
|
12109
|
+
chunkPOPGQIVR_js.safeOpenUrl(url, target);
|
|
12110
12110
|
};
|
|
12111
12111
|
const handleActionClick = (elementId, action) => {
|
|
12112
12112
|
if (mode === "present") {
|
|
@@ -12121,9 +12121,9 @@ function buildCanvasProps(input) {
|
|
|
12121
12121
|
}
|
|
12122
12122
|
};
|
|
12123
12123
|
const handleHyperlinkClick = (url, target) => {
|
|
12124
|
-
if (
|
|
12124
|
+
if (chunkPOPGQIVR_js.isPpactionUrl(url)) {
|
|
12125
12125
|
if (mode === "present") {
|
|
12126
|
-
const parsed =
|
|
12126
|
+
const parsed = chunkPOPGQIVR_js.parsePpactionUrl(url);
|
|
12127
12127
|
if (parsed) {
|
|
12128
12128
|
presentation.handlePresentationAction({
|
|
12129
12129
|
action: parsed.action,
|
|
@@ -12516,7 +12516,7 @@ function buildToolbarProps(input) {
|
|
|
12516
12516
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
12517
12517
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
12518
12518
|
formatPainterActive: s.formatPainterActive,
|
|
12519
|
-
canActivateFormatPainter:
|
|
12519
|
+
canActivateFormatPainter: chunkPOPGQIVR_js.hasCopyableFormat(selectedElement),
|
|
12520
12520
|
onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
|
|
12521
12521
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
12522
12522
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -12837,7 +12837,7 @@ function useViewerBuildingBlocksCore(input) {
|
|
|
12837
12837
|
documentGridSpacing: state.viewProperties?.gridSpacing
|
|
12838
12838
|
});
|
|
12839
12839
|
const themeColorMap = React17.useMemo(
|
|
12840
|
-
() => state.theme?.colorScheme ? (0,
|
|
12840
|
+
() => state.theme?.colorScheme ? (0, chunkPOPGQIVR_js.dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
|
|
12841
12841
|
[state.theme?.colorScheme]
|
|
12842
12842
|
);
|
|
12843
12843
|
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
|
|
@@ -13412,23 +13412,23 @@ function ColorChangedImage({
|
|
|
13412
13412
|
className,
|
|
13413
13413
|
alt
|
|
13414
13414
|
}) {
|
|
13415
|
-
const tolerance = tolerancePct ??
|
|
13416
|
-
const cacheKey =
|
|
13415
|
+
const tolerance = tolerancePct ?? chunkPOPGQIVR_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
|
|
13416
|
+
const cacheKey = chunkPOPGQIVR_js.buildCacheKey(
|
|
13417
13417
|
src,
|
|
13418
13418
|
clrChange.clrFrom,
|
|
13419
13419
|
clrChange.clrTo,
|
|
13420
13420
|
tolerance,
|
|
13421
13421
|
Boolean(clrChange.clrToTransparent)
|
|
13422
13422
|
);
|
|
13423
|
-
const cached =
|
|
13423
|
+
const cached = chunkPOPGQIVR_js.getCachedResult(cacheKey);
|
|
13424
13424
|
const [processedSrc, setProcessedSrc] = React17.useState(cached ?? null);
|
|
13425
13425
|
React17.useEffect(() => {
|
|
13426
|
-
if (
|
|
13427
|
-
setProcessedSrc(
|
|
13426
|
+
if (chunkPOPGQIVR_js.getCachedResult(cacheKey)) {
|
|
13427
|
+
setProcessedSrc(chunkPOPGQIVR_js.getCachedResult(cacheKey) ?? null);
|
|
13428
13428
|
return;
|
|
13429
13429
|
}
|
|
13430
13430
|
let cancelled = false;
|
|
13431
|
-
|
|
13431
|
+
chunkPOPGQIVR_js.applyColorChange(
|
|
13432
13432
|
src,
|
|
13433
13433
|
clrChange.clrFrom,
|
|
13434
13434
|
clrChange.clrTo,
|
|
@@ -13436,7 +13436,7 @@ function ColorChangedImage({
|
|
|
13436
13436
|
Boolean(clrChange.clrToTransparent)
|
|
13437
13437
|
).then((result) => {
|
|
13438
13438
|
if (!cancelled) {
|
|
13439
|
-
|
|
13439
|
+
chunkPOPGQIVR_js.setCachedResult(cacheKey, result.dataUrl);
|
|
13440
13440
|
setProcessedSrc(result.dataUrl);
|
|
13441
13441
|
}
|
|
13442
13442
|
return void 0;
|
|
@@ -13528,7 +13528,7 @@ function TiledImageLayer({
|
|
|
13528
13528
|
cancelled = true;
|
|
13529
13529
|
};
|
|
13530
13530
|
}, [src]);
|
|
13531
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...
|
|
13531
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunkPOPGQIVR_js.getImageTilingStyle(element, nativeSize), ...style } });
|
|
13532
13532
|
}
|
|
13533
13533
|
function renderImageEffectDefinitions(element, excludeDuotone = false) {
|
|
13534
13534
|
return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13597,7 +13597,7 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13597
13597
|
...filter ? { filter } : {},
|
|
13598
13598
|
...opacity !== void 0 ? { opacity } : {}
|
|
13599
13599
|
};
|
|
13600
|
-
if (
|
|
13600
|
+
if (chunkPOPGQIVR_js.isImageTiled(el)) {
|
|
13601
13601
|
const tileSrc = imgSrc(el);
|
|
13602
13602
|
if (!tileSrc) {
|
|
13603
13603
|
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" });
|
|
@@ -13616,12 +13616,12 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13616
13616
|
] });
|
|
13617
13617
|
}
|
|
13618
13618
|
const colorWash = pptx.getImageColorWashStyle(
|
|
13619
|
-
(0,
|
|
13619
|
+
(0, chunkPOPGQIVR_js.dist_exports.isImageLikeElement)(el) ? el.imageEffects?.colorWash : void 0
|
|
13620
13620
|
);
|
|
13621
13621
|
const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
|
|
13622
|
-
const duotoneColors =
|
|
13622
|
+
const duotoneColors = chunkPOPGQIVR_js.getDuotoneColors(el);
|
|
13623
13623
|
const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
|
|
13624
|
-
const filterForImg = useDuotoneCanvas ?
|
|
13624
|
+
const filterForImg = useDuotoneCanvas ? chunkPOPGQIVR_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
|
|
13625
13625
|
const canvasEffectStyles = {
|
|
13626
13626
|
...filterForImg ? { filter: filterForImg } : {},
|
|
13627
13627
|
...opacity !== void 0 ? { opacity } : {}
|
|
@@ -13697,10 +13697,10 @@ function SlideBackgroundImageLayer({
|
|
|
13697
13697
|
style: { zIndex: 0 },
|
|
13698
13698
|
children: renderImg(
|
|
13699
13699
|
backgroundElement,
|
|
13700
|
-
|
|
13701
|
-
|
|
13700
|
+
chunkPOPGQIVR_js.getImageRenderStyle(backgroundElement),
|
|
13701
|
+
chunkPOPGQIVR_js.getImageEffectsFilter(backgroundElement),
|
|
13702
13702
|
"",
|
|
13703
|
-
|
|
13703
|
+
chunkPOPGQIVR_js.getImageEffectsOpacity(backgroundElement)
|
|
13704
13704
|
)
|
|
13705
13705
|
}
|
|
13706
13706
|
);
|
|
@@ -13971,7 +13971,7 @@ function ChartElementView({
|
|
|
13971
13971
|
pptx.getBarFacePicturePixelSampleVersion
|
|
13972
13972
|
);
|
|
13973
13973
|
const viewModel = React17.useMemo(() => {
|
|
13974
|
-
return canEdit ?
|
|
13974
|
+
return canEdit ? chunkPOPGQIVR_js.buildReactChartViewModel(element) : null;
|
|
13975
13975
|
}, [canEdit, element, barFacePictureSampleVersion]);
|
|
13976
13976
|
React17.useEffect(pptx.ensureChartInteractionStyles, []);
|
|
13977
13977
|
React17.useEffect(() => {
|
|
@@ -14056,9 +14056,9 @@ function ChartElementView({
|
|
|
14056
14056
|
textStyle: animationState?.textStyle,
|
|
14057
14057
|
onSelect: chart3D.onSelect,
|
|
14058
14058
|
onDrag: chart3D.onDrag,
|
|
14059
|
-
children:
|
|
14059
|
+
children: chunkPOPGQIVR_js.renderChartElement(renderedElement)
|
|
14060
14060
|
}
|
|
14061
|
-
) :
|
|
14061
|
+
) : chunkPOPGQIVR_js.renderChartElement(renderedElement),
|
|
14062
14062
|
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) }),
|
|
14063
14063
|
titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14064
14064
|
"input",
|
|
@@ -14388,7 +14388,7 @@ function ResizeHandles({
|
|
|
14388
14388
|
"aria-label": t("pptx.selectionOverlay.resize", { handle }),
|
|
14389
14389
|
"data-pptx-handle-kind": "resize",
|
|
14390
14390
|
"data-pptx-compact": true,
|
|
14391
|
-
className:
|
|
14391
|
+
className: chunkPOPGQIVR_js.cn(
|
|
14392
14392
|
"absolute z-10 group border-0 bg-transparent p-0",
|
|
14393
14393
|
RESIZE_DEFAULT_CLASSES,
|
|
14394
14394
|
posClass,
|
|
@@ -14414,7 +14414,7 @@ function ResizeHandles({
|
|
|
14414
14414
|
"div",
|
|
14415
14415
|
{
|
|
14416
14416
|
"data-pptx-handle-hit": true,
|
|
14417
|
-
className:
|
|
14417
|
+
className: chunkPOPGQIVR_js.cn(
|
|
14418
14418
|
"absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
|
|
14419
14419
|
corner ? "max-md:-inset-1.5 max-md:[--pptx-handle-hit-inset:-6px]" : "max-md:-inset-2 max-md:[--pptx-handle-hit-inset:-8px]"
|
|
14420
14420
|
),
|
|
@@ -14435,7 +14435,7 @@ function ResizeHandles({
|
|
|
14435
14435
|
"aria-label": t("pptx.selectionOverlay.rotate"),
|
|
14436
14436
|
"data-pptx-handle-kind": "rotate",
|
|
14437
14437
|
"data-pptx-compact": true,
|
|
14438
|
-
className:
|
|
14438
|
+
className: chunkPOPGQIVR_js.cn(
|
|
14439
14439
|
"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",
|
|
14440
14440
|
ROTATE_DEFAULT_CLASSES
|
|
14441
14441
|
),
|
|
@@ -14505,17 +14505,17 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14505
14505
|
animationState,
|
|
14506
14506
|
textStyleOverrideCss
|
|
14507
14507
|
}) {
|
|
14508
|
-
const shapeEl = (0,
|
|
14508
|
+
const shapeEl = (0, chunkPOPGQIVR_js.dist_exports.hasShapeProperties)(el) ? el : void 0;
|
|
14509
14509
|
const viewWidth = Math.max(el.width, 0);
|
|
14510
14510
|
const viewHeight = Math.max(el.height, 0);
|
|
14511
14511
|
const svgWidth = Math.max(el.width, 1);
|
|
14512
14512
|
const svgHeight = Math.max(el.height, 1);
|
|
14513
14513
|
const ss = shapeEl?.shapeStyle;
|
|
14514
14514
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
14515
|
-
const strokeColor =
|
|
14516
|
-
const strokePaint =
|
|
14517
|
-
const dashType =
|
|
14518
|
-
const dashArray =
|
|
14515
|
+
const strokeColor = chunkPOPGQIVR_js.normalizeHexColor(ss?.strokeColor, chunkPOPGQIVR_js.DEFAULT_STROKE_COLOR);
|
|
14516
|
+
const strokePaint = chunkPOPGQIVR_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
|
|
14517
|
+
const dashType = chunkPOPGQIVR_js.normalizeStrokeDashType(ss?.strokeDash);
|
|
14518
|
+
const dashArray = chunkPOPGQIVR_js.getSvgStrokeDasharray(
|
|
14519
14519
|
dashType,
|
|
14520
14520
|
Math.max(strokeWidth, 1),
|
|
14521
14521
|
ss?.customDashSegments
|
|
@@ -14526,14 +14526,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14526
14526
|
const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
14527
14527
|
const startMarkerId = `${markerSeed}-sel-start`;
|
|
14528
14528
|
const endMarkerId = `${markerSeed}-sel-end`;
|
|
14529
|
-
const compoundOffsets =
|
|
14530
|
-
const compoundWidths =
|
|
14529
|
+
const compoundOffsets = chunkPOPGQIVR_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
14530
|
+
const compoundWidths = chunkPOPGQIVR_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
14531
14531
|
const strokeCap = pptx.svgLineCap(ss?.lineCap);
|
|
14532
|
-
const textEl = (0,
|
|
14532
|
+
const textEl = (0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(el) ? el : void 0;
|
|
14533
14533
|
const connectorText = textEl?.text?.trim() ?? "";
|
|
14534
14534
|
const connectorTextSegments = textEl?.textSegments;
|
|
14535
14535
|
const connectorTextStyle = textEl?.textStyle;
|
|
14536
|
-
const pathGeometry = shapeEl ?
|
|
14536
|
+
const pathGeometry = shapeEl ? chunkPOPGQIVR_js.getConnectorPathGeometry(shapeEl) : {
|
|
14537
14537
|
pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
|
|
14538
14538
|
startX: 0,
|
|
14539
14539
|
startY: 0,
|
|
@@ -14542,16 +14542,16 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14542
14542
|
};
|
|
14543
14543
|
const hitTargetWidth = Math.max(strokeWidth * 3, 14);
|
|
14544
14544
|
const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
|
|
14545
|
-
const lineShadow =
|
|
14546
|
-
const lineGlow =
|
|
14545
|
+
const lineShadow = chunkPOPGQIVR_js.buildLineShadowCss(el);
|
|
14546
|
+
const lineGlow = chunkPOPGQIVR_js.buildLineGlowFilter(el);
|
|
14547
14547
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14548
14548
|
"div",
|
|
14549
14549
|
{
|
|
14550
14550
|
"data-pptx-element": "true",
|
|
14551
14551
|
"data-element-id": el.id,
|
|
14552
|
-
role:
|
|
14553
|
-
"aria-label":
|
|
14554
|
-
"aria-roledescription":
|
|
14552
|
+
role: chunkPOPGQIVR_js.getAriaRole(el, { actionable: false }),
|
|
14553
|
+
"aria-label": chunkPOPGQIVR_js.getAriaLabel(el),
|
|
14554
|
+
"aria-roledescription": chunkPOPGQIVR_js.getAriaRoleDescription(el),
|
|
14555
14555
|
"aria-selected": isSelected ? true : void 0,
|
|
14556
14556
|
className: "absolute",
|
|
14557
14557
|
style: {
|
|
@@ -14584,14 +14584,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14584
14584
|
style: { overflow: "visible", pointerEvents: "none" },
|
|
14585
14585
|
children: [
|
|
14586
14586
|
/* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
|
|
14587
|
-
|
|
14587
|
+
chunkPOPGQIVR_js.renderConnectorMarker(
|
|
14588
14588
|
startMarkerId,
|
|
14589
14589
|
startArrow,
|
|
14590
14590
|
strokePaint,
|
|
14591
14591
|
ss?.connectorStartArrowWidth,
|
|
14592
14592
|
ss?.connectorStartArrowLength
|
|
14593
14593
|
),
|
|
14594
|
-
|
|
14594
|
+
chunkPOPGQIVR_js.renderConnectorMarker(
|
|
14595
14595
|
endMarkerId,
|
|
14596
14596
|
endArrow,
|
|
14597
14597
|
strokePaint,
|
|
@@ -14797,14 +14797,14 @@ function getElementInteractionProps({
|
|
|
14797
14797
|
};
|
|
14798
14798
|
}
|
|
14799
14799
|
function renderDagDuotoneFilterForElement(el) {
|
|
14800
|
-
if (!
|
|
14800
|
+
if (!chunkPOPGQIVR_js.hasDagDuotoneEffect(el)) {
|
|
14801
14801
|
return null;
|
|
14802
14802
|
}
|
|
14803
14803
|
const duotone = el.shapeStyle?.dagDuotone;
|
|
14804
14804
|
if (!duotone) {
|
|
14805
14805
|
return null;
|
|
14806
14806
|
}
|
|
14807
|
-
return
|
|
14807
|
+
return chunkPOPGQIVR_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
|
|
14808
14808
|
}
|
|
14809
14809
|
function getContainerStyle({
|
|
14810
14810
|
el,
|
|
@@ -14817,7 +14817,7 @@ function getContainerStyle({
|
|
|
14817
14817
|
has3DExtrusion,
|
|
14818
14818
|
templateEditing
|
|
14819
14819
|
}) {
|
|
14820
|
-
const ss = (0,
|
|
14820
|
+
const ss = (0, chunkPOPGQIVR_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
|
|
14821
14821
|
const isPicture = el.type === "picture" || el.type === "image";
|
|
14822
14822
|
const blurGrowVisible = Boolean(
|
|
14823
14823
|
ss?.blurGrow && typeof ss.blurRadius === "number" && ss.blurRadius > 0
|
|
@@ -14831,10 +14831,10 @@ function getContainerStyle({
|
|
|
14831
14831
|
top: isFullscreenMedia ? fs.top : el.y,
|
|
14832
14832
|
width: isFullscreenMedia ? fs.width : painted.width,
|
|
14833
14833
|
...heightStyle,
|
|
14834
|
-
transform: isFullscreenMedia ? fs.transform :
|
|
14834
|
+
transform: isFullscreenMedia ? fs.transform : chunkPOPGQIVR_js.getElementTransform(el),
|
|
14835
14835
|
transformOrigin: "center",
|
|
14836
14836
|
overflow: overflowValue,
|
|
14837
|
-
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ?
|
|
14837
|
+
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunkPOPGQIVR_js.getCropShapeClipPath(el) : void 0,
|
|
14838
14838
|
zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
|
|
14839
14839
|
visibility: animationState?.visible === false ? "hidden" : "visible",
|
|
14840
14840
|
animation: animationState?.cssAnimation,
|
|
@@ -14866,11 +14866,11 @@ function getContainerStyle({
|
|
|
14866
14866
|
};
|
|
14867
14867
|
}
|
|
14868
14868
|
function shapeParams(element) {
|
|
14869
|
-
const style = (0,
|
|
14869
|
+
const style = (0, chunkPOPGQIVR_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
|
|
14870
14870
|
const strokeWidth = pptx.paintedStrokeWidth(style);
|
|
14871
|
-
const strokeColor =
|
|
14872
|
-
const fillColor =
|
|
14873
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
14871
|
+
const strokeColor = chunkPOPGQIVR_js.normalizeHexColor(style?.strokeColor, chunkPOPGQIVR_js.DEFAULT_STROKE_COLOR);
|
|
14872
|
+
const fillColor = chunkPOPGQIVR_js.normalizeHexColor(style?.fillColor, chunkPOPGQIVR_js.DEFAULT_FILL_COLOR);
|
|
14873
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkPOPGQIVR_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
14874
14874
|
return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
|
|
14875
14875
|
}
|
|
14876
14876
|
var Extrusion3DOverlay = React17__default.default.memo(
|
|
@@ -14975,7 +14975,7 @@ function ShapeEffectOverlay({
|
|
|
14975
14975
|
const fillOverlayStyle = overlay ? {
|
|
14976
14976
|
position: "absolute",
|
|
14977
14977
|
inset: 0,
|
|
14978
|
-
...(0,
|
|
14978
|
+
...(0, chunkPOPGQIVR_js.dist_exports.isImageLikeElement)(element) ? chunkPOPGQIVR_js.getImageSurfaceMaskStyle(element) : {},
|
|
14979
14979
|
background: overlay.color,
|
|
14980
14980
|
mixBlendMode: overlay.blendMode,
|
|
14981
14981
|
pointerEvents: "none"
|
|
@@ -15178,10 +15178,10 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15178
15178
|
const allow = pptx.resolveElementInteractivity(el);
|
|
15179
15179
|
const backgroundAnimationState = presentationElementStates?.get(`${el.id}::pptx-bg`);
|
|
15180
15180
|
const visualAnimationState = backgroundAnimationState ?? animationState;
|
|
15181
|
-
const isTxt =
|
|
15182
|
-
const txtSE = (0,
|
|
15181
|
+
const isTxt = chunkPOPGQIVR_js.isEditableTextElement(el) && allow.textEditable;
|
|
15182
|
+
const txtSE = (0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(el) ? el.textStyle : void 0;
|
|
15183
15183
|
const textStyleOverrideCss = pptx.buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
|
|
15184
|
-
const ss =
|
|
15184
|
+
const ss = chunkPOPGQIVR_js.getShapeVisualStyle(
|
|
15185
15185
|
el,
|
|
15186
15186
|
hf,
|
|
15187
15187
|
fc,
|
|
@@ -15190,9 +15190,9 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15190
15190
|
visualAnimationState?.animatesFill,
|
|
15191
15191
|
visualAnimationState?.animatesStroke
|
|
15192
15192
|
);
|
|
15193
|
-
const ts =
|
|
15193
|
+
const ts = chunkPOPGQIVR_js.getTextStyleForElement(el, chunkPOPGQIVR_js.DEFAULT_TEXT_COLOR);
|
|
15194
15194
|
const isImg = el.type === "picture" || el.type === "image";
|
|
15195
|
-
const vs =
|
|
15195
|
+
const vs = chunkPOPGQIVR_js.renderVectorShape(
|
|
15196
15196
|
el,
|
|
15197
15197
|
isImg ? false : hf,
|
|
15198
15198
|
fc,
|
|
@@ -15202,10 +15202,10 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15202
15202
|
visualAnimationState?.animatesStroke
|
|
15203
15203
|
);
|
|
15204
15204
|
const isModel3D = el.type === "model3d";
|
|
15205
|
-
const isConn =
|
|
15206
|
-
const shapeStyle3d = (0,
|
|
15205
|
+
const isConn = chunkPOPGQIVR_js.isConnectorOrLineElement(el);
|
|
15206
|
+
const shapeStyle3d = (0, chunkPOPGQIVR_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
|
|
15207
15207
|
const extrusionData = React17.useMemo(
|
|
15208
|
-
() =>
|
|
15208
|
+
() => chunkPOPGQIVR_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
|
|
15209
15209
|
[shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
|
|
15210
15210
|
);
|
|
15211
15211
|
const actionAffordance = useActionAffordance(el, canInteract);
|
|
@@ -15294,7 +15294,7 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15294
15294
|
"aria-hidden": aria.hidden ? true : void 0,
|
|
15295
15295
|
"aria-selected": isSelected ? true : void 0,
|
|
15296
15296
|
tabIndex: isFocusable ? 0 : -1,
|
|
15297
|
-
className:
|
|
15297
|
+
className: chunkPOPGQIVR_js.cn(
|
|
15298
15298
|
"absolute",
|
|
15299
15299
|
"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
|
|
15300
15300
|
cur,
|
|
@@ -15382,9 +15382,9 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15382
15382
|
txtSE,
|
|
15383
15383
|
txtS: ts,
|
|
15384
15384
|
vecShape: backgroundAnimationState && !isImg ? null : vs,
|
|
15385
|
-
imgStyle:
|
|
15386
|
-
imgFilter:
|
|
15387
|
-
imgOpacity:
|
|
15385
|
+
imgStyle: chunkPOPGQIVR_js.getImageRenderStyle(el),
|
|
15386
|
+
imgFilter: chunkPOPGQIVR_js.getImageEffectsFilter(el),
|
|
15387
|
+
imgOpacity: chunkPOPGQIVR_js.getImageEffectsOpacity(el),
|
|
15388
15388
|
imgAlt: imageAltText,
|
|
15389
15389
|
isTxtEl: isTxt,
|
|
15390
15390
|
media: mediaDataUrls,
|
|
@@ -15506,10 +15506,10 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
|
|
|
15506
15506
|
}
|
|
15507
15507
|
function renderInk(el, options) {
|
|
15508
15508
|
const replay = options?.replay ?? false;
|
|
15509
|
-
const strokes =
|
|
15509
|
+
const strokes = chunkPOPGQIVR_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
|
|
15510
15510
|
strokes.some((s) => s.circles || s.nibMarks);
|
|
15511
15511
|
const pressureSensitive = options?.pressureSensitive;
|
|
15512
|
-
const replayStyles = replay ?
|
|
15512
|
+
const replayStyles = replay ? chunkPOPGQIVR_js.getInkReplayStyles(el, options?.replayConfig) : null;
|
|
15513
15513
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15514
15514
|
"svg",
|
|
15515
15515
|
{
|
|
@@ -15517,7 +15517,7 @@ function renderInk(el, options) {
|
|
|
15517
15517
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
15518
15518
|
preserveAspectRatio: "none",
|
|
15519
15519
|
children: [
|
|
15520
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
15520
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkPOPGQIVR_js.INK_REPLAY_KEYFRAMES }),
|
|
15521
15521
|
strokes.map(
|
|
15522
15522
|
(s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
|
|
15523
15523
|
)
|
|
@@ -15528,7 +15528,7 @@ function renderInk(el, options) {
|
|
|
15528
15528
|
function renderGroup(children, parentGroupFill) {
|
|
15529
15529
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: pptx.filterRenderedElements(children).map((c, childIndex) => {
|
|
15530
15530
|
const { hf, fc, sw, sc } = shapeParams(c);
|
|
15531
|
-
const baseSs =
|
|
15531
|
+
const baseSs = chunkPOPGQIVR_js.getShapeVisualStyle(c, hf, fc, sw, sc);
|
|
15532
15532
|
const inheritedFill = pptx.resolveGroupChildFill(c, parentGroupFill);
|
|
15533
15533
|
const ss = inheritedFill ? {
|
|
15534
15534
|
...baseSs,
|
|
@@ -15539,9 +15539,9 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15539
15539
|
backgroundPosition: inheritedFill.backgroundPosition
|
|
15540
15540
|
} : baseSs;
|
|
15541
15541
|
const isI = c.type === "picture" || c.type === "image";
|
|
15542
|
-
const vs =
|
|
15543
|
-
const ts =
|
|
15544
|
-
const isTxt =
|
|
15542
|
+
const vs = chunkPOPGQIVR_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
|
|
15543
|
+
const ts = chunkPOPGQIVR_js.getTextStyleForElement(c, chunkPOPGQIVR_js.DEFAULT_TEXT_COLOR);
|
|
15544
|
+
const isTxt = chunkPOPGQIVR_js.isEditableTextElement(c);
|
|
15545
15545
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15546
15546
|
"div",
|
|
15547
15547
|
{
|
|
@@ -15550,9 +15550,9 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15550
15550
|
style: {
|
|
15551
15551
|
left: c.x,
|
|
15552
15552
|
top: c.y,
|
|
15553
|
-
width: Math.max(c.width,
|
|
15554
|
-
height: Math.max(c.height,
|
|
15555
|
-
transform:
|
|
15553
|
+
width: Math.max(c.width, chunkPOPGQIVR_js.MIN_ELEMENT_SIZE),
|
|
15554
|
+
height: Math.max(c.height, chunkPOPGQIVR_js.MIN_ELEMENT_SIZE),
|
|
15555
|
+
transform: chunkPOPGQIVR_js.getElementTransform(c),
|
|
15556
15556
|
transformOrigin: "center",
|
|
15557
15557
|
...ss,
|
|
15558
15558
|
...isI ? {
|
|
@@ -15577,8 +15577,8 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15577
15577
|
// A nested group: recurse, chaining the inherited fill so a
|
|
15578
15578
|
// `grpFill` shape under a fill-less sub-group still paints.
|
|
15579
15579
|
renderGroup(c.children, pptx.getGroupChildParentFill(c, parentGroupFill))
|
|
15580
|
-
) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style:
|
|
15581
|
-
|
|
15580
|
+
) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunkPOPGQIVR_js.getImageSurfaceStyle(c), children: [
|
|
15581
|
+
chunkPOPGQIVR_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15582
15582
|
TiledImageLayer,
|
|
15583
15583
|
{
|
|
15584
15584
|
element: c,
|
|
@@ -15591,7 +15591,7 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15591
15591
|
src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
|
|
15592
15592
|
alt: i18n.translationsEn["pptx.ink.groupChildAlt"],
|
|
15593
15593
|
className: "pointer-events-none select-none",
|
|
15594
|
-
style:
|
|
15594
|
+
style: chunkPOPGQIVR_js.getImageRenderStyle(c),
|
|
15595
15595
|
draggable: false
|
|
15596
15596
|
}
|
|
15597
15597
|
),
|
|
@@ -15603,7 +15603,7 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15603
15603
|
{
|
|
15604
15604
|
className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
|
|
15605
15605
|
style: ts,
|
|
15606
|
-
children:
|
|
15606
|
+
children: chunkPOPGQIVR_js.renderTextSegments(c, chunkPOPGQIVR_js.DEFAULT_TEXT_COLOR)
|
|
15607
15607
|
}
|
|
15608
15608
|
) : null
|
|
15609
15609
|
] })
|
|
@@ -15617,8 +15617,8 @@ function renderContentPart(el, options) {
|
|
|
15617
15617
|
if (el.inkStrokes && el.inkStrokes.length > 0) {
|
|
15618
15618
|
const replay = options?.replay ?? false;
|
|
15619
15619
|
const pressureSensitive = options?.pressureSensitive ?? true;
|
|
15620
|
-
const strokes =
|
|
15621
|
-
const replayStyles = replay ?
|
|
15620
|
+
const strokes = chunkPOPGQIVR_js.buildContentPartStrokes(el);
|
|
15621
|
+
const replayStyles = replay ? chunkPOPGQIVR_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
|
|
15622
15622
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15623
15623
|
"svg",
|
|
15624
15624
|
{
|
|
@@ -15626,7 +15626,7 @@ function renderContentPart(el, options) {
|
|
|
15626
15626
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
15627
15627
|
preserveAspectRatio: "none",
|
|
15628
15628
|
children: [
|
|
15629
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
15629
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkPOPGQIVR_js.INK_REPLAY_KEYFRAMES }),
|
|
15630
15630
|
strokes.map(
|
|
15631
15631
|
(s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
|
|
15632
15632
|
)
|
|
@@ -15853,9 +15853,9 @@ function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
|
|
|
15853
15853
|
collaboration: connected,
|
|
15854
15854
|
model: pptx.createInlineListModelObserver(element),
|
|
15855
15855
|
activationSelection,
|
|
15856
|
-
children: seed && !connected ?
|
|
15856
|
+
children: seed && !connected ? chunkPOPGQIVR_js.renderTextSegments(
|
|
15857
15857
|
element,
|
|
15858
|
-
|
|
15858
|
+
chunkPOPGQIVR_js.DEFAULT_TEXT_COLOR,
|
|
15859
15859
|
void 0,
|
|
15860
15860
|
void 0,
|
|
15861
15861
|
void 0,
|
|
@@ -16025,7 +16025,7 @@ function InlineTextEditor({
|
|
|
16025
16025
|
seedRef.current = {
|
|
16026
16026
|
initialText,
|
|
16027
16027
|
hasRichSegments: Boolean(
|
|
16028
|
-
(0,
|
|
16028
|
+
(0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(element) && element.textSegments && element.textSegments.length > 0
|
|
16029
16029
|
)
|
|
16030
16030
|
};
|
|
16031
16031
|
}
|
|
@@ -16091,8 +16091,8 @@ function InlineTextEditor({
|
|
|
16091
16091
|
pending.endOffset
|
|
16092
16092
|
);
|
|
16093
16093
|
});
|
|
16094
|
-
const warpStyle =
|
|
16095
|
-
const compensationTransform =
|
|
16094
|
+
const warpStyle = chunkPOPGQIVR_js.getTextWarpStyle(textStyleRaw);
|
|
16095
|
+
const compensationTransform = chunkPOPGQIVR_js.getTextCompensationTransform(element);
|
|
16096
16096
|
const warpTransform = warpStyle?.transform;
|
|
16097
16097
|
const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
|
|
16098
16098
|
const wrapperStyle = {
|
|
@@ -16103,7 +16103,7 @@ function InlineTextEditor({
|
|
|
16103
16103
|
transformOrigin: warpStyle?.transformOrigin || "center"
|
|
16104
16104
|
};
|
|
16105
16105
|
const nextInlineStyleValue = (property) => {
|
|
16106
|
-
if (!(0,
|
|
16106
|
+
if (!(0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(element)) {
|
|
16107
16107
|
return true;
|
|
16108
16108
|
}
|
|
16109
16109
|
const result = pptx.getInlineEditorSelectionResult(element.textSegments);
|
|
@@ -16179,7 +16179,7 @@ function InlineTextEditor({
|
|
|
16179
16179
|
const text = e.clipboardData.getData("text/plain");
|
|
16180
16180
|
document.execCommand("insertText", false, text);
|
|
16181
16181
|
},
|
|
16182
|
-
children: list.seed ? list.children : seed.hasRichSegments ?
|
|
16182
|
+
children: list.seed ? list.children : seed.hasRichSegments ? chunkPOPGQIVR_js.renderTextSegments(element, chunkPOPGQIVR_js.DEFAULT_TEXT_COLOR) : seed.initialText
|
|
16183
16183
|
},
|
|
16184
16184
|
list.seed?.paragraphs[0].token ?? "plain"
|
|
16185
16185
|
);
|
|
@@ -17116,7 +17116,7 @@ function SmartArtRendererImpl({
|
|
|
17116
17116
|
if (!onUpdateElement || !pptx.shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
|
|
17117
17117
|
return;
|
|
17118
17118
|
}
|
|
17119
|
-
const updated = (0,
|
|
17119
|
+
const updated = (0, chunkPOPGQIVR_js.dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text);
|
|
17120
17120
|
const box = { width: element.width, height: element.height };
|
|
17121
17121
|
const reflowed = pptx.rebuildDrawingShapesIfCleared(
|
|
17122
17122
|
updated,
|
|
@@ -17132,7 +17132,7 @@ function SmartArtRendererImpl({
|
|
|
17132
17132
|
if (!onUpdateElement) {
|
|
17133
17133
|
return;
|
|
17134
17134
|
}
|
|
17135
|
-
const next = (0,
|
|
17135
|
+
const next = (0, chunkPOPGQIVR_js.dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, { fillColor: fill });
|
|
17136
17136
|
if (next !== smartArtData) {
|
|
17137
17137
|
const box = { width: element.width, height: element.height };
|
|
17138
17138
|
const reflowed = pptx.rebuildDrawingShapesIfCleared(
|
|
@@ -17326,7 +17326,7 @@ function groupIntoParagraphs(element, fieldContext) {
|
|
|
17326
17326
|
element,
|
|
17327
17327
|
fieldContext ? (seg) => {
|
|
17328
17328
|
if (seg.fieldType) {
|
|
17329
|
-
const substituted =
|
|
17329
|
+
const substituted = chunkPOPGQIVR_js.substituteFieldText(
|
|
17330
17330
|
seg.text,
|
|
17331
17331
|
seg.fieldType,
|
|
17332
17332
|
fieldContext,
|
|
@@ -17361,13 +17361,13 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
|
|
|
17361
17361
|
if (s.strikethrough) {
|
|
17362
17362
|
decos.push("line-through");
|
|
17363
17363
|
}
|
|
17364
|
-
const fill = s.hyperlink ?
|
|
17364
|
+
const fill = s.hyperlink ? chunkPOPGQIVR_js.normalizeHexColor(s.color || element.textStyle?.color, chunkPOPGQIVR_js.HYPERLINK_COLOR) : chunkPOPGQIVR_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
|
|
17365
17365
|
return {
|
|
17366
17366
|
fill,
|
|
17367
|
-
fontSize: s.fontSize ?? element.textStyle?.fontSize ??
|
|
17367
|
+
fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunkPOPGQIVR_js.DEFAULT_TEXT_FONT_SIZE,
|
|
17368
17368
|
fontWeight: s.bold ? 700 : 400,
|
|
17369
17369
|
fontStyle: s.italic ? "italic" : void 0,
|
|
17370
|
-
fontFamily: s.fontFamily || element.textStyle?.fontFamily ? (0,
|
|
17370
|
+
fontFamily: s.fontFamily || element.textStyle?.fontFamily ? (0, chunkPOPGQIVR_js.dist_exports.getSubstituteFontFamily)(s.fontFamily || element.textStyle?.fontFamily || "") : chunkPOPGQIVR_js.DEFAULT_FONT_FAMILY,
|
|
17371
17371
|
textDecoration: decos.length > 0 ? decos.join(" ") : void 0
|
|
17372
17372
|
};
|
|
17373
17373
|
}
|
|
@@ -17375,8 +17375,8 @@ function resolveSegmentFont(segment, element) {
|
|
|
17375
17375
|
const s = segment.style || {};
|
|
17376
17376
|
const family = s.fontFamily || element.textStyle?.fontFamily;
|
|
17377
17377
|
return {
|
|
17378
|
-
fontFamily: family ? (0,
|
|
17379
|
-
fontSizePx: s.fontSize ?? element.textStyle?.fontSize ??
|
|
17378
|
+
fontFamily: family ? (0, chunkPOPGQIVR_js.dist_exports.getSubstituteFontFamily)(family) : chunkPOPGQIVR_js.DEFAULT_FONT_FAMILY,
|
|
17379
|
+
fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunkPOPGQIVR_js.DEFAULT_TEXT_FONT_SIZE,
|
|
17380
17380
|
bold: s.bold ?? element.textStyle?.bold,
|
|
17381
17381
|
italic: s.italic ?? element.textStyle?.italic
|
|
17382
17382
|
};
|
|
@@ -17442,7 +17442,7 @@ function WarpedText({
|
|
|
17442
17442
|
fallbackColor,
|
|
17443
17443
|
fieldContext
|
|
17444
17444
|
}) {
|
|
17445
|
-
if (!(0,
|
|
17445
|
+
if (!(0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(element)) {
|
|
17446
17446
|
return null;
|
|
17447
17447
|
}
|
|
17448
17448
|
const textEl = element;
|
|
@@ -17460,9 +17460,9 @@ function WarpedText({
|
|
|
17460
17460
|
const warpAdj2 = textEl.textStyle?.textWarpAdj2;
|
|
17461
17461
|
const align = textEl.textStyle?.align ?? "center";
|
|
17462
17462
|
const { startOffset, textAnchor } = getAlignmentProps(align);
|
|
17463
|
-
const baseFontSize = textEl.textStyle?.fontSize ??
|
|
17464
|
-
const baseFontFamily = textEl.textStyle?.fontFamily ? (0,
|
|
17465
|
-
const baseFill =
|
|
17463
|
+
const baseFontSize = textEl.textStyle?.fontSize ?? chunkPOPGQIVR_js.DEFAULT_TEXT_FONT_SIZE;
|
|
17464
|
+
const baseFontFamily = textEl.textStyle?.fontFamily ? (0, chunkPOPGQIVR_js.dist_exports.getSubstituteFontFamily)(textEl.textStyle.fontFamily) : chunkPOPGQIVR_js.DEFAULT_FONT_FAMILY;
|
|
17465
|
+
const baseFill = chunkPOPGQIVR_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
|
|
17466
17466
|
if (pptx.hasGlyphEnvelope(preset)) {
|
|
17467
17467
|
const perLine = pptx.buildGlyphEnvelopeBlock(
|
|
17468
17468
|
preset,
|
|
@@ -17562,7 +17562,7 @@ function WarpedText({
|
|
|
17562
17562
|
);
|
|
17563
17563
|
}
|
|
17564
17564
|
var GLYPH_BY_SHAPE = Object.fromEntries(
|
|
17565
|
-
|
|
17565
|
+
chunkPOPGQIVR_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
|
|
17566
17566
|
);
|
|
17567
17567
|
GLYPH_BY_SHAPE["actionButtonForwardOrNext"] = GLYPH_BY_SHAPE["actionButtonForwardNext"];
|
|
17568
17568
|
GLYPH_BY_SHAPE["actionButtonBackOrPrevious"] = GLYPH_BY_SHAPE["actionButtonBackPrevious"];
|
|
@@ -17632,11 +17632,11 @@ function renderTextElementBody(options) {
|
|
|
17632
17632
|
const isLinkedTextBox = pptx.isLinkedTextBox(el);
|
|
17633
17633
|
const linkedSegments = pptx.getOverflowSegments(el, slideElements);
|
|
17634
17634
|
const useSvgWarp = pptx.shouldUseSvgWarp(
|
|
17635
|
-
(0,
|
|
17635
|
+
(0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(el) ? el.textStyle?.textWarpPreset : void 0
|
|
17636
17636
|
);
|
|
17637
|
-
const scene3dStyle = (0,
|
|
17637
|
+
const scene3dStyle = (0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(el) ? chunkPOPGQIVR_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
|
|
17638
17638
|
const rotationTransform = pptx.getTextBodyRotationTransform(el);
|
|
17639
|
-
const composedTransform = [rotationTransform,
|
|
17639
|
+
const composedTransform = [rotationTransform, chunkPOPGQIVR_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
|
|
17640
17640
|
const transformStyle = {
|
|
17641
17641
|
transform: composedTransform,
|
|
17642
17642
|
// A COM-measured homography (`scene3dStyle.transformOrigin === '0 0'`)
|
|
@@ -17666,18 +17666,18 @@ function renderTextElementBody(options) {
|
|
|
17666
17666
|
shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
17667
17667
|
"div",
|
|
17668
17668
|
{
|
|
17669
|
-
className:
|
|
17669
|
+
className: chunkPOPGQIVR_js.cn(
|
|
17670
17670
|
"relative z-10 w-full h-full",
|
|
17671
17671
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
17672
17672
|
),
|
|
17673
|
-
style: { ...
|
|
17673
|
+
style: { ...chunkPOPGQIVR_js.getTextLayoutStyle(el), ...transformStyle },
|
|
17674
17674
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17675
17675
|
WarpedText,
|
|
17676
17676
|
{
|
|
17677
17677
|
element: el,
|
|
17678
17678
|
width: el.width,
|
|
17679
17679
|
height: el.height,
|
|
17680
|
-
fallbackColor:
|
|
17680
|
+
fallbackColor: chunkPOPGQIVR_js.DEFAULT_TEXT_COLOR,
|
|
17681
17681
|
findHighlights: findHl,
|
|
17682
17682
|
fieldContext
|
|
17683
17683
|
}
|
|
@@ -17686,19 +17686,19 @@ function renderTextElementBody(options) {
|
|
|
17686
17686
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
17687
17687
|
"div",
|
|
17688
17688
|
{
|
|
17689
|
-
className:
|
|
17689
|
+
className: chunkPOPGQIVR_js.cn(
|
|
17690
17690
|
"relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
|
|
17691
17691
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
17692
17692
|
),
|
|
17693
17693
|
style: {
|
|
17694
|
-
...
|
|
17694
|
+
...chunkPOPGQIVR_js.getTextLayoutStyle(el),
|
|
17695
17695
|
...txtS,
|
|
17696
|
-
...
|
|
17696
|
+
...chunkPOPGQIVR_js.getTextWarpStyle(txtSE),
|
|
17697
17697
|
...transformStyle
|
|
17698
17698
|
},
|
|
17699
|
-
children:
|
|
17699
|
+
children: chunkPOPGQIVR_js.renderTextSegments(
|
|
17700
17700
|
el,
|
|
17701
|
-
|
|
17701
|
+
chunkPOPGQIVR_js.DEFAULT_TEXT_COLOR,
|
|
17702
17702
|
void 0,
|
|
17703
17703
|
findHl,
|
|
17704
17704
|
onHyperlinkClick,
|
|
@@ -18016,7 +18016,7 @@ function renderBody(options) {
|
|
|
18016
18016
|
);
|
|
18017
18017
|
}
|
|
18018
18018
|
if (isImg) {
|
|
18019
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style:
|
|
18019
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunkPOPGQIVR_js.getImageSurfaceStyle(el), children: [
|
|
18020
18020
|
renderImg(el, imgStyle, imgFilter, imgAlt, imgOpacity),
|
|
18021
18021
|
vecShape ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", children: vecShape }) : null
|
|
18022
18022
|
] });
|
|
@@ -18033,7 +18033,7 @@ function renderBody(options) {
|
|
|
18033
18033
|
textDirection: txtSE?.textDirection,
|
|
18034
18034
|
textStyle: txtS,
|
|
18035
18035
|
textStyleRaw: txtSE,
|
|
18036
|
-
layoutStyle:
|
|
18036
|
+
layoutStyle: chunkPOPGQIVR_js.getTextLayoutStyle(el),
|
|
18037
18037
|
element: el,
|
|
18038
18038
|
onCommit,
|
|
18039
18039
|
onCancel,
|
|
@@ -18044,7 +18044,7 @@ function renderBody(options) {
|
|
|
18044
18044
|
] });
|
|
18045
18045
|
}
|
|
18046
18046
|
if (el.type === "table") {
|
|
18047
|
-
return
|
|
18047
|
+
return chunkPOPGQIVR_js.renderTableElement(el, txtS, {
|
|
18048
18048
|
editable: isSel,
|
|
18049
18049
|
selectedCell: isSel ? tableSt : null,
|
|
18050
18050
|
onSelectCell: onCellSel,
|
|
@@ -18077,7 +18077,7 @@ function renderBody(options) {
|
|
|
18077
18077
|
);
|
|
18078
18078
|
}
|
|
18079
18079
|
if (el.type === "media") {
|
|
18080
|
-
return
|
|
18080
|
+
return chunkPOPGQIVR_js.renderMediaElement(el, media, {
|
|
18081
18081
|
// Present mode autoplays every media element on the active slide,
|
|
18082
18082
|
// not only ones persisted with their own `autoPlay` flag (matching
|
|
18083
18083
|
// the other four bindings' unconditional `presenting`-gated
|
|
@@ -18100,7 +18100,7 @@ function renderBody(options) {
|
|
|
18100
18100
|
onPlayStateChange: handleMediaPlayStateChange
|
|
18101
18101
|
});
|
|
18102
18102
|
}
|
|
18103
|
-
if (doInk && (0,
|
|
18103
|
+
if (doInk && (0, chunkPOPGQIVR_js.dist_exports.isInkElement)(el)) {
|
|
18104
18104
|
return renderInk(el, {
|
|
18105
18105
|
replay: isPresentationPassive,
|
|
18106
18106
|
pressureSensitive: true
|
|
@@ -18129,27 +18129,27 @@ function renderBody(options) {
|
|
|
18129
18129
|
}
|
|
18130
18130
|
return renderGroup(el.children, pptx.getGroupChildParentFill(el));
|
|
18131
18131
|
}
|
|
18132
|
-
if (
|
|
18133
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
18132
|
+
if (chunkPOPGQIVR_js.shouldRenderFallbackLabel(el, isTxtEl)) {
|
|
18133
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkPOPGQIVR_js.getElementLabel(el) });
|
|
18134
18134
|
}
|
|
18135
18135
|
return renderTextElementBody(options);
|
|
18136
18136
|
}
|
|
18137
18137
|
function defaultTextColorForFill(fillColor) {
|
|
18138
18138
|
const hex = String(fillColor ?? "").replace(/^#/u, "");
|
|
18139
18139
|
if (!/^[0-9a-f]{6}$/iu.test(hex)) {
|
|
18140
|
-
return
|
|
18140
|
+
return chunkPOPGQIVR_js.DEFAULT_TEXT_COLOR;
|
|
18141
18141
|
}
|
|
18142
18142
|
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);
|
|
18143
18143
|
const luminance = channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
|
|
18144
|
-
return luminance > 0.179 ?
|
|
18144
|
+
return luminance > 0.179 ? chunkPOPGQIVR_js.DEFAULT_TEXT_COLOR : "#ffffff";
|
|
18145
18145
|
}
|
|
18146
18146
|
function getStaticElementVisualState(element, parentGroupFill) {
|
|
18147
|
-
const style = (0,
|
|
18148
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
18149
|
-
const fill =
|
|
18147
|
+
const style = (0, chunkPOPGQIVR_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
|
|
18148
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkPOPGQIVR_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
18149
|
+
const fill = chunkPOPGQIVR_js.normalizeHexColor(style?.fillColor, chunkPOPGQIVR_js.DEFAULT_FILL_COLOR);
|
|
18150
18150
|
const strokeWidth = pptx.paintedStrokeWidth(style);
|
|
18151
|
-
const stroke =
|
|
18152
|
-
const baseVisualStyle =
|
|
18151
|
+
const stroke = chunkPOPGQIVR_js.normalizeHexColor(style?.strokeColor, chunkPOPGQIVR_js.DEFAULT_STROKE_COLOR);
|
|
18152
|
+
const baseVisualStyle = chunkPOPGQIVR_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
|
|
18153
18153
|
const inheritedFill = pptx.resolveGroupChildFill(element, parentGroupFill);
|
|
18154
18154
|
const visualStyle = inheritedFill ? {
|
|
18155
18155
|
...baseVisualStyle,
|
|
@@ -18159,13 +18159,13 @@ function getStaticElementVisualState(element, parentGroupFill) {
|
|
|
18159
18159
|
backgroundSize: inheritedFill.backgroundSize,
|
|
18160
18160
|
backgroundPosition: inheritedFill.backgroundPosition
|
|
18161
18161
|
} : baseVisualStyle;
|
|
18162
|
-
const textStyle =
|
|
18162
|
+
const textStyle = chunkPOPGQIVR_js.getTextStyleForElement(
|
|
18163
18163
|
element,
|
|
18164
|
-
element.type === "shape" && hasFill ? defaultTextColorForFill(fill) :
|
|
18164
|
+
element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunkPOPGQIVR_js.DEFAULT_TEXT_COLOR
|
|
18165
18165
|
);
|
|
18166
18166
|
const isImage = element.type === "picture" || element.type === "image";
|
|
18167
|
-
const letsTextOverflow = (0,
|
|
18168
|
-
const shapeType = (0,
|
|
18167
|
+
const letsTextOverflow = (0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
18168
|
+
const shapeType = (0, chunkPOPGQIVR_js.dist_exports.hasShapeProperties)(element) ? element.shapeType : void 0;
|
|
18169
18169
|
const isCallout = pptx.isWedgeCalloutPresetShape(shapeType) || String(shapeType ?? "").toLowerCase().includes("callout");
|
|
18170
18170
|
return {
|
|
18171
18171
|
hasFill,
|
|
@@ -18186,7 +18186,7 @@ function getStaticElementInteractionState(element, hasActionHandler, exposeEleme
|
|
|
18186
18186
|
return { action, isActionable, contractRole };
|
|
18187
18187
|
}
|
|
18188
18188
|
function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
|
|
18189
|
-
const overflowClass = visual.isImage || element.type === "group" ||
|
|
18189
|
+
const overflowClass = visual.isImage || element.type === "group" || chunkPOPGQIVR_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
|
|
18190
18190
|
const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
|
|
18191
18191
|
return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
|
|
18192
18192
|
}
|
|
@@ -18269,7 +18269,7 @@ function StaticElementRendererImpl({
|
|
|
18269
18269
|
top: positioned ? element.y : void 0,
|
|
18270
18270
|
width: positioned ? Math.max(element.width, 1) : "100%",
|
|
18271
18271
|
height: positioned ? Math.max(element.height, 1) : "100%",
|
|
18272
|
-
transform: positioned ?
|
|
18272
|
+
transform: positioned ? chunkPOPGQIVR_js.getElementTransform(element) : void 0,
|
|
18273
18273
|
transformOrigin: "center",
|
|
18274
18274
|
zIndex,
|
|
18275
18275
|
...visualStyle,
|
|
@@ -18310,20 +18310,20 @@ function StaticElementRendererImpl({
|
|
|
18310
18310
|
isEditing: false,
|
|
18311
18311
|
editText: "",
|
|
18312
18312
|
spellCheck: false,
|
|
18313
|
-
txtSE: (0,
|
|
18313
|
+
txtSE: (0, chunkPOPGQIVR_js.dist_exports.hasTextProperties)(element) ? element.textStyle : void 0,
|
|
18314
18314
|
txtS: textStyle,
|
|
18315
|
-
vecShape:
|
|
18315
|
+
vecShape: chunkPOPGQIVR_js.renderVectorShape(
|
|
18316
18316
|
element,
|
|
18317
18317
|
isImage ? false : hasFill,
|
|
18318
18318
|
fill,
|
|
18319
18319
|
strokeWidth,
|
|
18320
18320
|
stroke
|
|
18321
18321
|
),
|
|
18322
|
-
imgStyle: imageAnimation ? { ...
|
|
18323
|
-
imgFilter:
|
|
18324
|
-
imgOpacity:
|
|
18322
|
+
imgStyle: imageAnimation ? { ...chunkPOPGQIVR_js.getImageRenderStyle(element), animation: imageAnimation } : chunkPOPGQIVR_js.getImageRenderStyle(element),
|
|
18323
|
+
imgFilter: chunkPOPGQIVR_js.getImageEffectsFilter(element),
|
|
18324
|
+
imgOpacity: chunkPOPGQIVR_js.getImageEffectsOpacity(element),
|
|
18325
18325
|
imgAlt: "",
|
|
18326
|
-
isTxtEl:
|
|
18326
|
+
isTxtEl: chunkPOPGQIVR_js.isEditableTextElement(element),
|
|
18327
18327
|
media: mediaDataUrls,
|
|
18328
18328
|
tableSt: null,
|
|
18329
18329
|
isSel: false,
|
|
@@ -18368,7 +18368,7 @@ function SlideLayer({
|
|
|
18368
18368
|
style: {
|
|
18369
18369
|
width: safeWidth,
|
|
18370
18370
|
height: safeHeight,
|
|
18371
|
-
backgroundColor: slide.backgroundColor ?
|
|
18371
|
+
backgroundColor: slide.backgroundColor ? chunkPOPGQIVR_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
|
|
18372
18372
|
backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
|
|
18373
18373
|
backgroundSize: slide.backgroundImage ? "cover" : void 0,
|
|
18374
18374
|
backgroundPosition: slide.backgroundImage ? "center" : void 0
|