pptx-react-viewer 4.29.0 → 4.30.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 +72 -0
- package/README.md +37 -36
- package/dist/{AiChatPanel-AK6X4NJD.js → AiChatPanel-7XZQQZ4P.js} +9 -9
- package/dist/AiChatPanel-7XZQQZ4P.js.br +0 -0
- package/dist/AiChatPanel-7XZQQZ4P.js.gz +0 -0
- package/dist/{AiChatPanel-6EIOUV7J.mjs → AiChatPanel-XI272UTZ.mjs} +1 -1
- package/dist/AiChatPanel-XI272UTZ.mjs.br +0 -0
- package/dist/AiChatPanel-XI272UTZ.mjs.gz +0 -0
- package/dist/{chunk-K3EGXT6W.js → chunk-355ICDU6.js} +262 -258
- package/dist/chunk-355ICDU6.js.br +0 -0
- package/dist/chunk-355ICDU6.js.gz +0 -0
- package/dist/{chunk-VI575UU6.mjs → chunk-ATGP75C4.mjs} +66 -56
- package/dist/chunk-ATGP75C4.mjs.br +0 -0
- package/dist/chunk-ATGP75C4.mjs.gz +0 -0
- package/dist/{chunk-EW45F35P.mjs → chunk-CHZJORUW.mjs} +19 -15
- package/dist/chunk-CHZJORUW.mjs.br +0 -0
- package/dist/chunk-CHZJORUW.mjs.gz +0 -0
- package/dist/{chunk-6YOFWVII.mjs → chunk-FPACF36E.mjs} +16 -15
- package/dist/chunk-FPACF36E.mjs.br +0 -0
- package/dist/chunk-FPACF36E.mjs.gz +0 -0
- package/dist/{chunk-7JMO6R6B.js → chunk-M2AKDETN.js} +396 -395
- package/dist/chunk-M2AKDETN.js.br +0 -0
- package/dist/chunk-M2AKDETN.js.gz +0 -0
- package/dist/{chunk-CTL42ZRR.js → chunk-XRFJ7TAF.js} +65 -55
- package/dist/chunk-XRFJ7TAF.js.br +0 -0
- package/dist/chunk-XRFJ7TAF.js.gz +0 -0
- package/dist/index.d.ts +5 -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 +5 -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-6EIOUV7J.mjs.br +0 -0
- package/dist/AiChatPanel-6EIOUV7J.mjs.gz +0 -0
- package/dist/AiChatPanel-AK6X4NJD.js.br +0 -0
- package/dist/AiChatPanel-AK6X4NJD.js.gz +0 -0
- package/dist/chunk-6YOFWVII.mjs.br +0 -0
- package/dist/chunk-6YOFWVII.mjs.gz +0 -0
- package/dist/chunk-7JMO6R6B.js.br +0 -0
- package/dist/chunk-7JMO6R6B.js.gz +0 -0
- package/dist/chunk-CTL42ZRR.js.br +0 -0
- package/dist/chunk-CTL42ZRR.js.gz +0 -0
- package/dist/chunk-EW45F35P.mjs.br +0 -0
- package/dist/chunk-EW45F35P.mjs.gz +0 -0
- package/dist/chunk-K3EGXT6W.js.br +0 -0
- package/dist/chunk-K3EGXT6W.js.gz +0 -0
- package/dist/chunk-VI575UU6.mjs.br +0 -0
- package/dist/chunk-VI575UU6.mjs.gz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXRFJ7TAF_js = require('./chunk-XRFJ7TAF.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(chunkXRFJ7TAF_js.cloneHistorySnapshot(previous));
|
|
688
688
|
}
|
|
689
|
-
past.push({ ...
|
|
689
|
+
past.push({ ...chunkXRFJ7TAF_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(chunkXRFJ7TAF_js.cloneSlide),
|
|
779
|
+
templateElementsBySlideId: chunkXRFJ7TAF_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(chunkXRFJ7TAF_js.cloneSlide));
|
|
793
793
|
setTemplateElementsBySlideId(
|
|
794
|
-
|
|
794
|
+
chunkXRFJ7TAF_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 = chunkXRFJ7TAF_js.cloneHistorySnapshot(previousSnapshot);
|
|
834
|
+
lastHistorySnapshotRef.current = chunkXRFJ7TAF_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 = chunkXRFJ7TAF_js.cloneHistorySnapshot(nextSnapshot);
|
|
856
|
+
lastHistorySnapshotRef.current = chunkXRFJ7TAF_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 = chunkXRFJ7TAF_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(chunkXRFJ7TAF_js.cloneSlide) };
|
|
957
|
+
const after = { ...before, slides: nextSlides.map(chunkXRFJ7TAF_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 = chunkXRFJ7TAF_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, chunkXRFJ7TAF_js.MIN_ELEMENT_SIZE));
|
|
1147
|
+
maxY = Math.max(maxY, element.y + Math.max(element.height, chunkXRFJ7TAF_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, chunkXRFJ7TAF_js.MIN_ELEMENT_SIZE);
|
|
1154
|
+
const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkXRFJ7TAF_js.MIN_ELEMENT_SIZE);
|
|
1155
1155
|
const availableWidth = Math.max(
|
|
1156
|
-
effectiveEditorDimensions.width -
|
|
1157
|
-
|
|
1156
|
+
effectiveEditorDimensions.width - chunkXRFJ7TAF_js.ZOOM_TO_SELECTION_PADDING,
|
|
1157
|
+
chunkXRFJ7TAF_js.MIN_ELEMENT_SIZE
|
|
1158
1158
|
);
|
|
1159
1159
|
const availableHeight = Math.max(
|
|
1160
|
-
effectiveEditorDimensions.height -
|
|
1161
|
-
|
|
1160
|
+
effectiveEditorDimensions.height - chunkXRFJ7TAF_js.ZOOM_TO_SELECTION_PADDING,
|
|
1161
|
+
chunkXRFJ7TAF_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: chunkXRFJ7TAF_js.DEFAULT_CANVAS_WIDTH,
|
|
4101
|
+
height: chunkXRFJ7TAF_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 chunkXRFJ7TAF_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 = chunkXRFJ7TAF_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 ?? chunkXRFJ7TAF_js.DEFAULT_CANVAS_WIDTH,
|
|
4567
|
+
height: parsed.height ?? chunkXRFJ7TAF_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 chunkXRFJ7TAF_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, chunkXRFJ7TAF_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, chunkXRFJ7TAF_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, chunkXRFJ7TAF_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, chunkXRFJ7TAF_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 (chunkXRFJ7TAF_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, chunkXRFJ7TAF_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: chunkXRFJ7TAF_js.MIN_ELEMENT_SIZE });
|
|
5259
5259
|
if (lockAspect) {
|
|
5260
|
-
resized = pptx.lockResizeAspect(resized, startBox, handle,
|
|
5260
|
+
resized = pptx.lockResizeAspect(resized, startBox, handle, chunkXRFJ7TAF_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, chunkXRFJ7TAF_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 = chunkXRFJ7TAF_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, chunkXRFJ7TAF_js.MIN_ELEMENT_SIZE);
|
|
5454
|
+
const height = Math.max(geo.height, chunkXRFJ7TAF_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 = chunkXRFJ7TAF_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: chunkXRFJ7TAF_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 = chunkXRFJ7TAF_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
|
|
5606
|
+
return chunkXRFJ7TAF_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, chunkXRFJ7TAF_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, chunkXRFJ7TAF_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, chunkXRFJ7TAF_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, chunkXRFJ7TAF_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 && !chunkXRFJ7TAF_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 = chunkXRFJ7TAF_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, chunkXRFJ7TAF_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: chunkXRFJ7TAF_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(chunkXRFJ7TAF_js.DEFAULT_TABLE_ROWS, chunkXRFJ7TAF_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 && !chunkXRFJ7TAF_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 = chunkXRFJ7TAF_js.isTemplateElementId(group.id);
|
|
6729
6729
|
const childIds = group.children.map(
|
|
6730
|
-
(child) => intoTemplate ?
|
|
6730
|
+
(child) => intoTemplate ? chunkXRFJ7TAF_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, chunkXRFJ7TAF_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 = chunkXRFJ7TAF_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, chunkXRFJ7TAF_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 = chunkXRFJ7TAF_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, chunkXRFJ7TAF_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 = chunkXRFJ7TAF_js.mergeCells(ts.selectedCells, td);
|
|
7214
7214
|
const updates = { tableData: newTableData };
|
|
7215
|
-
const newRawXml = (0,
|
|
7215
|
+
const newRawXml = (0, chunkXRFJ7TAF_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 = chunkXRFJ7TAF_js.splitCell(rowIndex, columnIndex, td);
|
|
7233
7233
|
const updates = { tableData: newTableData };
|
|
7234
|
-
const newRawXml = (0,
|
|
7234
|
+
const newRawXml = (0, chunkXRFJ7TAF_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, chunkXRFJ7TAF_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, chunkXRFJ7TAF_js.dist_exports.updateCellTextStyleInRawXml)(
|
|
7294
7294
|
selectedElement,
|
|
7295
7295
|
rowIndex,
|
|
7296
7296
|
colIndex,
|
|
@@ -7307,15 +7307,9 @@ function createTableStructHandlers(input) {
|
|
|
7307
7307
|
}
|
|
7308
7308
|
return {
|
|
7309
7309
|
...row,
|
|
7310
|
-
cells: row.cells.map(
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
}
|
|
7314
|
-
return {
|
|
7315
|
-
...cell,
|
|
7316
|
-
style: { ...cell.style, ...styleUpdates }
|
|
7317
|
-
};
|
|
7318
|
-
})
|
|
7310
|
+
cells: row.cells.map(
|
|
7311
|
+
(cell, ci) => ci === colIndex ? pptx.withCellStyle(cell, styleUpdates) : cell
|
|
7312
|
+
)
|
|
7319
7313
|
};
|
|
7320
7314
|
});
|
|
7321
7315
|
updates.tableData = { ...selectedElement.tableData, rows: newRows };
|
|
@@ -7463,7 +7457,7 @@ function useExportSaveAs(input) {
|
|
|
7463
7457
|
const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
|
|
7464
7458
|
const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
|
|
7465
7459
|
const data = {
|
|
7466
|
-
slides:
|
|
7460
|
+
slides: chunkXRFJ7TAF_js.buildSaveSlides(slides, templateElementsBySlideId),
|
|
7467
7461
|
width: canvasSize.width,
|
|
7468
7462
|
height: canvasSize.height,
|
|
7469
7463
|
widthEmu: slideSize.widthEmu,
|
|
@@ -7621,7 +7615,7 @@ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActi
|
|
|
7621
7615
|
}
|
|
7622
7616
|
function tilesToPdfPage(tilesResult) {
|
|
7623
7617
|
return tilesResult.tiles.map((tile) => ({
|
|
7624
|
-
image:
|
|
7618
|
+
image: chunkXRFJ7TAF_js.canvasToJpegData(tile.canvas),
|
|
7625
7619
|
placement: pptx.placeTileOnPage(
|
|
7626
7620
|
tile,
|
|
7627
7621
|
tilesResult.fullWidth,
|
|
@@ -7654,7 +7648,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
|
|
|
7654
7648
|
if (pages.length === 0) {
|
|
7655
7649
|
throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
|
|
7656
7650
|
}
|
|
7657
|
-
const pdfBlobUrl =
|
|
7651
|
+
const pdfBlobUrl = chunkXRFJ7TAF_js.buildPdfFromTiledImageData(pages);
|
|
7658
7652
|
pptx.downloadDataUrl(pdfBlobUrl, filename);
|
|
7659
7653
|
}
|
|
7660
7654
|
async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
|
|
@@ -7684,7 +7678,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
|
|
|
7684
7678
|
if (pages.length === 0) {
|
|
7685
7679
|
throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
|
|
7686
7680
|
}
|
|
7687
|
-
const pdfDataUrl =
|
|
7681
|
+
const pdfDataUrl = chunkXRFJ7TAF_js.buildNotesPdf(pages);
|
|
7688
7682
|
pptx.downloadDataUrl(pdfDataUrl, filename);
|
|
7689
7683
|
}
|
|
7690
7684
|
async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
|
|
@@ -7879,7 +7873,7 @@ function exportAllSlidesToSvg(data, options = {}) {
|
|
|
7879
7873
|
continue;
|
|
7880
7874
|
}
|
|
7881
7875
|
onProgress?.(processedCount, data.slides.length);
|
|
7882
|
-
let svg =
|
|
7876
|
+
let svg = chunkXRFJ7TAF_js.dist_exports.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
|
|
7883
7877
|
if (embedFonts && fontFaces?.length) {
|
|
7884
7878
|
svg = injectFontFaces(svg, fontFaces);
|
|
7885
7879
|
}
|
|
@@ -8468,10 +8462,10 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
|
|
|
8468
8462
|
return;
|
|
8469
8463
|
}
|
|
8470
8464
|
await handler.applyTheme(colorScheme, fontScheme, name);
|
|
8471
|
-
const previousMap = theme?.colorScheme ? (0,
|
|
8465
|
+
const previousMap = theme?.colorScheme ? (0, chunkXRFJ7TAF_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
|
|
8472
8466
|
bumpHistory();
|
|
8473
8467
|
setSlides(
|
|
8474
|
-
(slides) => (0,
|
|
8468
|
+
(slides) => (0, chunkXRFJ7TAF_js.dist_exports.applyThemeToData)(
|
|
8475
8469
|
{ slides, theme, themeColorMap: previousMap },
|
|
8476
8470
|
colorScheme,
|
|
8477
8471
|
fontScheme,
|
|
@@ -8482,8 +8476,8 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
|
|
|
8482
8476
|
(prev) => Object.fromEntries(
|
|
8483
8477
|
Object.entries(prev).map(([id, elements]) => [
|
|
8484
8478
|
id,
|
|
8485
|
-
(0,
|
|
8486
|
-
(0,
|
|
8479
|
+
(0, chunkXRFJ7TAF_js.dist_exports.reResolveElementFonts)(
|
|
8480
|
+
(0, chunkXRFJ7TAF_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme),
|
|
8487
8481
|
theme?.fontScheme,
|
|
8488
8482
|
fontScheme
|
|
8489
8483
|
)
|
|
@@ -8541,13 +8535,13 @@ function useThemeHandlers(input) {
|
|
|
8541
8535
|
return;
|
|
8542
8536
|
}
|
|
8543
8537
|
await handler.updateThemeColorScheme(colorScheme);
|
|
8544
|
-
const previousMap = theme?.colorScheme ? (0,
|
|
8545
|
-
setSlides((prev) => (0,
|
|
8538
|
+
const previousMap = theme?.colorScheme ? (0, chunkXRFJ7TAF_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
|
|
8539
|
+
setSlides((prev) => (0, chunkXRFJ7TAF_js.dist_exports.reResolveSlideColors)(prev, previousMap, colorScheme));
|
|
8546
8540
|
if (Object.keys(templateElementsBySlideId).length > 0) {
|
|
8547
8541
|
setTemplateElementsBySlideId((prev) => {
|
|
8548
8542
|
const next = {};
|
|
8549
8543
|
for (const [slideId, elements] of Object.entries(prev)) {
|
|
8550
|
-
next[slideId] = (0,
|
|
8544
|
+
next[slideId] = (0, chunkXRFJ7TAF_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme);
|
|
8551
8545
|
}
|
|
8552
8546
|
return next;
|
|
8553
8547
|
});
|
|
@@ -8658,7 +8652,7 @@ function useThemeSwitching(input) {
|
|
|
8658
8652
|
}
|
|
8659
8653
|
try {
|
|
8660
8654
|
await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
|
|
8661
|
-
const newData = (0,
|
|
8655
|
+
const newData = (0, chunkXRFJ7TAF_js.dist_exports.applyThemeToData)(data, preset.colorScheme, preset.fontScheme, preset.name);
|
|
8662
8656
|
onDataChange(newData);
|
|
8663
8657
|
onThemeChanged?.(preset);
|
|
8664
8658
|
} catch (error) {
|
|
@@ -8675,7 +8669,7 @@ function useThemeSwitching(input) {
|
|
|
8675
8669
|
}
|
|
8676
8670
|
try {
|
|
8677
8671
|
await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
|
|
8678
|
-
const newData = (0,
|
|
8672
|
+
const newData = (0, chunkXRFJ7TAF_js.dist_exports.applyThemeToData)(data, colorScheme, fontScheme, themeName);
|
|
8679
8673
|
onDataChange(newData);
|
|
8680
8674
|
} catch (error) {
|
|
8681
8675
|
console.error("Failed to switch to custom theme:", error);
|
|
@@ -8687,12 +8681,12 @@ function useThemeSwitching(input) {
|
|
|
8687
8681
|
if (!data?.theme?.colorScheme) {
|
|
8688
8682
|
return void 0;
|
|
8689
8683
|
}
|
|
8690
|
-
return
|
|
8691
|
-
(p) => (0,
|
|
8684
|
+
return chunkXRFJ7TAF_js.dist_exports.THEME_PRESETS.find(
|
|
8685
|
+
(p) => (0, chunkXRFJ7TAF_js.dist_exports.themeColorSchemesEqual)(data.theme?.colorScheme, p.colorScheme)
|
|
8692
8686
|
);
|
|
8693
8687
|
}, [data?.theme?.colorScheme]);
|
|
8694
8688
|
return {
|
|
8695
|
-
presets:
|
|
8689
|
+
presets: chunkXRFJ7TAF_js.dist_exports.THEME_PRESETS,
|
|
8696
8690
|
switchToPreset,
|
|
8697
8691
|
switchToCustom,
|
|
8698
8692
|
currentPreset
|
|
@@ -8769,7 +8763,7 @@ function usePropertyHandlers(input) {
|
|
|
8769
8763
|
}
|
|
8770
8764
|
try {
|
|
8771
8765
|
const ab = await file.arrayBuffer();
|
|
8772
|
-
const h = new
|
|
8766
|
+
const h = new chunkXRFJ7TAF_js.dist_exports.PptxHandler();
|
|
8773
8767
|
const other = await h.load(ab);
|
|
8774
8768
|
if (!other) {
|
|
8775
8769
|
return;
|
|
@@ -8779,7 +8773,7 @@ function usePropertyHandlers(input) {
|
|
|
8779
8773
|
width: canvasSize.width,
|
|
8780
8774
|
height: canvasSize.height
|
|
8781
8775
|
};
|
|
8782
|
-
setCompareResult(
|
|
8776
|
+
setCompareResult(chunkXRFJ7TAF_js.comparePresentation(cur, other));
|
|
8783
8777
|
setIsComparePanelOpen(true);
|
|
8784
8778
|
} catch (err) {
|
|
8785
8779
|
console.warn("Compare failed:", err);
|
|
@@ -9132,7 +9126,7 @@ function useViewerDialogs(input) {
|
|
|
9132
9126
|
};
|
|
9133
9127
|
}
|
|
9134
9128
|
function computeGridSpacingPx(documentGridSpacing) {
|
|
9135
|
-
return pptx.computeGridSpacingPx(documentGridSpacing,
|
|
9129
|
+
return pptx.computeGridSpacingPx(documentGridSpacing, chunkXRFJ7TAF_js.GRID_SIZE);
|
|
9136
9130
|
}
|
|
9137
9131
|
function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
|
|
9138
9132
|
const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
|
|
@@ -9141,7 +9135,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
|
|
|
9141
9135
|
}
|
|
9142
9136
|
function computeSlideSectionGroups(slides, sections) {
|
|
9143
9137
|
return pptx.groupSlidesBySection(sections, slides).map((group) => ({
|
|
9144
|
-
id: group.section?.id ?? (sections.length > 0 ?
|
|
9138
|
+
id: group.section?.id ?? (sections.length > 0 ? chunkXRFJ7TAF_js.UNGROUPED_SECTION_ID : chunkXRFJ7TAF_js.DEFAULT_SECTION_GROUP_ID),
|
|
9145
9139
|
label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
|
|
9146
9140
|
slideIndexes: group.slideIndexes,
|
|
9147
9141
|
...group.section?.color !== void 0 ? { color: group.section.color } : {},
|
|
@@ -9186,10 +9180,10 @@ function useDerivedSlideState(input) {
|
|
|
9186
9180
|
);
|
|
9187
9181
|
const slideSectionGroups = React17.useMemo(
|
|
9188
9182
|
() => computeSlideSectionGroups(slides, sections).map((group) => {
|
|
9189
|
-
if (group.id ===
|
|
9183
|
+
if (group.id === chunkXRFJ7TAF_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
|
|
9190
9184
|
return { ...group, label: t("pptx.slides.ungroupedSlides") };
|
|
9191
9185
|
}
|
|
9192
|
-
if (group.id ===
|
|
9186
|
+
if (group.id === chunkXRFJ7TAF_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
|
|
9193
9187
|
return { ...group, label: t("pptx.sections.slides") };
|
|
9194
9188
|
}
|
|
9195
9189
|
return group;
|
|
@@ -9296,7 +9290,7 @@ function useAnnotationHandlers(input) {
|
|
|
9296
9290
|
if (nextMode === "present") {
|
|
9297
9291
|
presentation.enterPresentMode();
|
|
9298
9292
|
} else if (mode === "present" && annotations.hasAnyAnnotations) {
|
|
9299
|
-
|
|
9293
|
+
chunkXRFJ7TAF_js.stopAllPersistentAudio();
|
|
9300
9294
|
if (promptKeepInkAnnotations) {
|
|
9301
9295
|
pendingModeAfterAnnotationsRef.current = nextMode;
|
|
9302
9296
|
setShowKeepAnnotationsDialog(true);
|
|
@@ -9306,7 +9300,7 @@ function useAnnotationHandlers(input) {
|
|
|
9306
9300
|
}
|
|
9307
9301
|
} else {
|
|
9308
9302
|
if (mode === "present") {
|
|
9309
|
-
|
|
9303
|
+
chunkXRFJ7TAF_js.stopAllPersistentAudio();
|
|
9310
9304
|
}
|
|
9311
9305
|
setMode(nextMode);
|
|
9312
9306
|
}
|
|
@@ -9377,7 +9371,7 @@ function overlayPendingInlineEdit(document2, elementId, text, snapshot, transfor
|
|
|
9377
9371
|
(slide) => !elementId ? slide : {
|
|
9378
9372
|
...slide,
|
|
9379
9373
|
elements: slide.elements.map(
|
|
9380
|
-
(element) => element.id === elementId && (0,
|
|
9374
|
+
(element) => element.id === elementId && (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(element) ? {
|
|
9381
9375
|
...element,
|
|
9382
9376
|
text,
|
|
9383
9377
|
textSegments: pptx.remapTextToSegments(
|
|
@@ -9463,14 +9457,14 @@ function useSerialize(input) {
|
|
|
9463
9457
|
const pptxGuides = guides.map((g) => ({
|
|
9464
9458
|
id: g.id,
|
|
9465
9459
|
orientation: g.axis === "h" ? "horz" : "vert",
|
|
9466
|
-
positionEmu: (0,
|
|
9460
|
+
positionEmu: (0, chunkXRFJ7TAF_js.dist_exports.guidePxToEmu)(g.position)
|
|
9467
9461
|
}));
|
|
9468
9462
|
return {
|
|
9469
9463
|
...slide,
|
|
9470
9464
|
guides: pptxGuides.length > 0 ? pptxGuides : void 0
|
|
9471
9465
|
};
|
|
9472
9466
|
});
|
|
9473
|
-
const slidesToSave =
|
|
9467
|
+
const slidesToSave = chunkXRFJ7TAF_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
|
|
9474
9468
|
const saveOptions = pptx.buildDeckSaveOptions({
|
|
9475
9469
|
// Without this the Slide Size card edited a viewer-only pixel value and
|
|
9476
9470
|
// the saved `p:sldSz` never moved: passing `slideSize` is the only way a
|
|
@@ -9651,7 +9645,7 @@ function usePresentationSetup(input) {
|
|
|
9651
9645
|
return;
|
|
9652
9646
|
}
|
|
9653
9647
|
if (mode === "present" && nextMode !== "present") {
|
|
9654
|
-
|
|
9648
|
+
chunkXRFJ7TAF_js.stopAllPersistentAudio();
|
|
9655
9649
|
stopAnimationSound();
|
|
9656
9650
|
const exitHandler = exitModeHandlerRef.current;
|
|
9657
9651
|
if (exitHandler) {
|
|
@@ -9772,12 +9766,12 @@ function useCanvasImagePaste(input) {
|
|
|
9772
9766
|
);
|
|
9773
9767
|
}
|
|
9774
9768
|
function formatPatchFor(element, format) {
|
|
9775
|
-
const updated =
|
|
9769
|
+
const updated = chunkXRFJ7TAF_js.applyFormatToElement(element, format);
|
|
9776
9770
|
const updates = {};
|
|
9777
|
-
if ((0,
|
|
9771
|
+
if ((0, chunkXRFJ7TAF_js.dist_exports.hasShapeProperties)(updated)) {
|
|
9778
9772
|
updates.shapeStyle = updated.shapeStyle;
|
|
9779
9773
|
}
|
|
9780
|
-
if ((0,
|
|
9774
|
+
if ((0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(updated)) {
|
|
9781
9775
|
updates.textStyle = updated.textStyle;
|
|
9782
9776
|
}
|
|
9783
9777
|
return updates;
|
|
@@ -9795,7 +9789,7 @@ function useFormatPainterEditing(input) {
|
|
|
9795
9789
|
const prevFormatPainterRef = React17.useRef(false);
|
|
9796
9790
|
React17.useEffect(() => {
|
|
9797
9791
|
if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
|
|
9798
|
-
copiedFormatRef.current =
|
|
9792
|
+
copiedFormatRef.current = chunkXRFJ7TAF_js.copyFormatFromElement(selectedElement);
|
|
9799
9793
|
} else if (!formatPainterActive) {
|
|
9800
9794
|
copiedFormatRef.current = null;
|
|
9801
9795
|
}
|
|
@@ -10884,7 +10878,7 @@ function useKeyboardShortcutWiring(input) {
|
|
|
10884
10878
|
}
|
|
10885
10879
|
function stepSelectedFontSize(state, ops, direction) {
|
|
10886
10880
|
const selected = state.selectedElement;
|
|
10887
|
-
const currentPx = (selected && (0,
|
|
10881
|
+
const currentPx = (selected && (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(selected) ? selected.textStyle?.fontSize : void 0) ?? pptx.textFontSizePtToPx(18);
|
|
10888
10882
|
const nextPt = pptx.stepFontSizePt(pptx.textFontSizePxToPt(currentPx), direction);
|
|
10889
10883
|
ops.updateSelectedTextStyle({ fontSize: pptx.textFontSizePtToPx(nextPt) });
|
|
10890
10884
|
}
|
|
@@ -11435,7 +11429,7 @@ function useCollaborationWriteBack(input) {
|
|
|
11435
11429
|
getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
|
|
11436
11430
|
getSaveOptions: () => latest.current.getSaveOptions?.(),
|
|
11437
11431
|
getTemplateElements: () => latest.current.templateElementsBySlideId,
|
|
11438
|
-
mergeTemplateElements:
|
|
11432
|
+
mergeTemplateElements: chunkXRFJ7TAF_js.buildSaveSlides
|
|
11439
11433
|
}),
|
|
11440
11434
|
[latest]
|
|
11441
11435
|
);
|
|
@@ -11988,8 +11982,8 @@ function useTouchGestures(input) {
|
|
|
11988
11982
|
}
|
|
11989
11983
|
const recognizer = pptx.createTouchGestureRecognizer({
|
|
11990
11984
|
getScale: () => scaleRef.current,
|
|
11991
|
-
minScale:
|
|
11992
|
-
maxScale:
|
|
11985
|
+
minScale: chunkXRFJ7TAF_js.MIN_ZOOM_SCALE,
|
|
11986
|
+
maxScale: chunkXRFJ7TAF_js.MAX_ZOOM_SCALE,
|
|
11993
11987
|
callbacks: {
|
|
11994
11988
|
onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
|
|
11995
11989
|
onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
|
|
@@ -12112,7 +12106,7 @@ function buildCanvasProps(input) {
|
|
|
12112
12106
|
if (pptx.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
|
|
12113
12107
|
return;
|
|
12114
12108
|
}
|
|
12115
|
-
|
|
12109
|
+
chunkXRFJ7TAF_js.safeOpenUrl(url, target);
|
|
12116
12110
|
};
|
|
12117
12111
|
const handleActionClick = (elementId, action) => {
|
|
12118
12112
|
if (mode === "present") {
|
|
@@ -12127,9 +12121,9 @@ function buildCanvasProps(input) {
|
|
|
12127
12121
|
}
|
|
12128
12122
|
};
|
|
12129
12123
|
const handleHyperlinkClick = (url, target) => {
|
|
12130
|
-
if (
|
|
12124
|
+
if (chunkXRFJ7TAF_js.isPpactionUrl(url)) {
|
|
12131
12125
|
if (mode === "present") {
|
|
12132
|
-
const parsed =
|
|
12126
|
+
const parsed = chunkXRFJ7TAF_js.parsePpactionUrl(url);
|
|
12133
12127
|
if (parsed) {
|
|
12134
12128
|
presentation.handlePresentationAction({
|
|
12135
12129
|
action: parsed.action,
|
|
@@ -12522,7 +12516,7 @@ function buildToolbarProps(input) {
|
|
|
12522
12516
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
12523
12517
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
12524
12518
|
formatPainterActive: s.formatPainterActive,
|
|
12525
|
-
canActivateFormatPainter:
|
|
12519
|
+
canActivateFormatPainter: chunkXRFJ7TAF_js.hasCopyableFormat(selectedElement),
|
|
12526
12520
|
onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
|
|
12527
12521
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
12528
12522
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -12843,7 +12837,7 @@ function useViewerBuildingBlocksCore(input) {
|
|
|
12843
12837
|
documentGridSpacing: state.viewProperties?.gridSpacing
|
|
12844
12838
|
});
|
|
12845
12839
|
const themeColorMap = React17.useMemo(
|
|
12846
|
-
() => state.theme?.colorScheme ? (0,
|
|
12840
|
+
() => state.theme?.colorScheme ? (0, chunkXRFJ7TAF_js.dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
|
|
12847
12841
|
[state.theme?.colorScheme]
|
|
12848
12842
|
);
|
|
12849
12843
|
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
|
|
@@ -13418,23 +13412,23 @@ function ColorChangedImage({
|
|
|
13418
13412
|
className,
|
|
13419
13413
|
alt
|
|
13420
13414
|
}) {
|
|
13421
|
-
const tolerance = tolerancePct ??
|
|
13422
|
-
const cacheKey =
|
|
13415
|
+
const tolerance = tolerancePct ?? chunkXRFJ7TAF_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
|
|
13416
|
+
const cacheKey = chunkXRFJ7TAF_js.buildCacheKey(
|
|
13423
13417
|
src,
|
|
13424
13418
|
clrChange.clrFrom,
|
|
13425
13419
|
clrChange.clrTo,
|
|
13426
13420
|
tolerance,
|
|
13427
13421
|
Boolean(clrChange.clrToTransparent)
|
|
13428
13422
|
);
|
|
13429
|
-
const cached =
|
|
13423
|
+
const cached = chunkXRFJ7TAF_js.getCachedResult(cacheKey);
|
|
13430
13424
|
const [processedSrc, setProcessedSrc] = React17.useState(cached ?? null);
|
|
13431
13425
|
React17.useEffect(() => {
|
|
13432
|
-
if (
|
|
13433
|
-
setProcessedSrc(
|
|
13426
|
+
if (chunkXRFJ7TAF_js.getCachedResult(cacheKey)) {
|
|
13427
|
+
setProcessedSrc(chunkXRFJ7TAF_js.getCachedResult(cacheKey) ?? null);
|
|
13434
13428
|
return;
|
|
13435
13429
|
}
|
|
13436
13430
|
let cancelled = false;
|
|
13437
|
-
|
|
13431
|
+
chunkXRFJ7TAF_js.applyColorChange(
|
|
13438
13432
|
src,
|
|
13439
13433
|
clrChange.clrFrom,
|
|
13440
13434
|
clrChange.clrTo,
|
|
@@ -13442,7 +13436,7 @@ function ColorChangedImage({
|
|
|
13442
13436
|
Boolean(clrChange.clrToTransparent)
|
|
13443
13437
|
).then((result) => {
|
|
13444
13438
|
if (!cancelled) {
|
|
13445
|
-
|
|
13439
|
+
chunkXRFJ7TAF_js.setCachedResult(cacheKey, result.dataUrl);
|
|
13446
13440
|
setProcessedSrc(result.dataUrl);
|
|
13447
13441
|
}
|
|
13448
13442
|
return void 0;
|
|
@@ -13534,7 +13528,7 @@ function TiledImageLayer({
|
|
|
13534
13528
|
cancelled = true;
|
|
13535
13529
|
};
|
|
13536
13530
|
}, [src]);
|
|
13537
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...
|
|
13531
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunkXRFJ7TAF_js.getImageTilingStyle(element, nativeSize), ...style } });
|
|
13538
13532
|
}
|
|
13539
13533
|
function renderImageEffectDefinitions(element, excludeDuotone = false) {
|
|
13540
13534
|
return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13603,7 +13597,7 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13603
13597
|
...filter ? { filter } : {},
|
|
13604
13598
|
...opacity !== void 0 ? { opacity } : {}
|
|
13605
13599
|
};
|
|
13606
|
-
if (
|
|
13600
|
+
if (chunkXRFJ7TAF_js.isImageTiled(el)) {
|
|
13607
13601
|
const tileSrc = imgSrc(el);
|
|
13608
13602
|
if (!tileSrc) {
|
|
13609
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" });
|
|
@@ -13622,12 +13616,12 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13622
13616
|
] });
|
|
13623
13617
|
}
|
|
13624
13618
|
const colorWash = pptx.getImageColorWashStyle(
|
|
13625
|
-
(0,
|
|
13619
|
+
(0, chunkXRFJ7TAF_js.dist_exports.isImageLikeElement)(el) ? el.imageEffects?.colorWash : void 0
|
|
13626
13620
|
);
|
|
13627
13621
|
const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
|
|
13628
|
-
const duotoneColors =
|
|
13622
|
+
const duotoneColors = chunkXRFJ7TAF_js.getDuotoneColors(el);
|
|
13629
13623
|
const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
|
|
13630
|
-
const filterForImg = useDuotoneCanvas ?
|
|
13624
|
+
const filterForImg = useDuotoneCanvas ? chunkXRFJ7TAF_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
|
|
13631
13625
|
const canvasEffectStyles = {
|
|
13632
13626
|
...filterForImg ? { filter: filterForImg } : {},
|
|
13633
13627
|
...opacity !== void 0 ? { opacity } : {}
|
|
@@ -13703,10 +13697,10 @@ function SlideBackgroundImageLayer({
|
|
|
13703
13697
|
style: { zIndex: 0 },
|
|
13704
13698
|
children: renderImg(
|
|
13705
13699
|
backgroundElement,
|
|
13706
|
-
|
|
13707
|
-
|
|
13700
|
+
chunkXRFJ7TAF_js.getImageRenderStyle(backgroundElement),
|
|
13701
|
+
chunkXRFJ7TAF_js.getImageEffectsFilter(backgroundElement),
|
|
13708
13702
|
"",
|
|
13709
|
-
|
|
13703
|
+
chunkXRFJ7TAF_js.getImageEffectsOpacity(backgroundElement)
|
|
13710
13704
|
)
|
|
13711
13705
|
}
|
|
13712
13706
|
);
|
|
@@ -13977,7 +13971,7 @@ function ChartElementView({
|
|
|
13977
13971
|
pptx.getBarFacePicturePixelSampleVersion
|
|
13978
13972
|
);
|
|
13979
13973
|
const viewModel = React17.useMemo(() => {
|
|
13980
|
-
return canEdit ?
|
|
13974
|
+
return canEdit ? chunkXRFJ7TAF_js.buildReactChartViewModel(element) : null;
|
|
13981
13975
|
}, [canEdit, element, barFacePictureSampleVersion]);
|
|
13982
13976
|
React17.useEffect(pptx.ensureChartInteractionStyles, []);
|
|
13983
13977
|
React17.useEffect(() => {
|
|
@@ -14062,9 +14056,9 @@ function ChartElementView({
|
|
|
14062
14056
|
textStyle: animationState?.textStyle,
|
|
14063
14057
|
onSelect: chart3D.onSelect,
|
|
14064
14058
|
onDrag: chart3D.onDrag,
|
|
14065
|
-
children:
|
|
14059
|
+
children: chunkXRFJ7TAF_js.renderChartElement(renderedElement)
|
|
14066
14060
|
}
|
|
14067
|
-
) :
|
|
14061
|
+
) : chunkXRFJ7TAF_js.renderChartElement(renderedElement),
|
|
14068
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) }),
|
|
14069
14063
|
titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14070
14064
|
"input",
|
|
@@ -14394,7 +14388,7 @@ function ResizeHandles({
|
|
|
14394
14388
|
"aria-label": t("pptx.selectionOverlay.resize", { handle }),
|
|
14395
14389
|
"data-pptx-handle-kind": "resize",
|
|
14396
14390
|
"data-pptx-compact": true,
|
|
14397
|
-
className:
|
|
14391
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
14398
14392
|
"absolute z-10 group border-0 bg-transparent p-0",
|
|
14399
14393
|
RESIZE_DEFAULT_CLASSES,
|
|
14400
14394
|
posClass,
|
|
@@ -14420,7 +14414,7 @@ function ResizeHandles({
|
|
|
14420
14414
|
"div",
|
|
14421
14415
|
{
|
|
14422
14416
|
"data-pptx-handle-hit": true,
|
|
14423
|
-
className:
|
|
14417
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
14424
14418
|
"absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
|
|
14425
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]"
|
|
14426
14420
|
),
|
|
@@ -14441,7 +14435,7 @@ function ResizeHandles({
|
|
|
14441
14435
|
"aria-label": t("pptx.selectionOverlay.rotate"),
|
|
14442
14436
|
"data-pptx-handle-kind": "rotate",
|
|
14443
14437
|
"data-pptx-compact": true,
|
|
14444
|
-
className:
|
|
14438
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
14445
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",
|
|
14446
14440
|
ROTATE_DEFAULT_CLASSES
|
|
14447
14441
|
),
|
|
@@ -14511,17 +14505,17 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14511
14505
|
animationState,
|
|
14512
14506
|
textStyleOverrideCss
|
|
14513
14507
|
}) {
|
|
14514
|
-
const shapeEl = (0,
|
|
14508
|
+
const shapeEl = (0, chunkXRFJ7TAF_js.dist_exports.hasShapeProperties)(el) ? el : void 0;
|
|
14515
14509
|
const viewWidth = Math.max(el.width, 0);
|
|
14516
14510
|
const viewHeight = Math.max(el.height, 0);
|
|
14517
14511
|
const svgWidth = Math.max(el.width, 1);
|
|
14518
14512
|
const svgHeight = Math.max(el.height, 1);
|
|
14519
14513
|
const ss = shapeEl?.shapeStyle;
|
|
14520
14514
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
14521
|
-
const strokeColor =
|
|
14522
|
-
const strokePaint =
|
|
14523
|
-
const dashType =
|
|
14524
|
-
const dashArray =
|
|
14515
|
+
const strokeColor = chunkXRFJ7TAF_js.normalizeHexColor(ss?.strokeColor, chunkXRFJ7TAF_js.DEFAULT_STROKE_COLOR);
|
|
14516
|
+
const strokePaint = chunkXRFJ7TAF_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
|
|
14517
|
+
const dashType = chunkXRFJ7TAF_js.normalizeStrokeDashType(ss?.strokeDash);
|
|
14518
|
+
const dashArray = chunkXRFJ7TAF_js.getSvgStrokeDasharray(
|
|
14525
14519
|
dashType,
|
|
14526
14520
|
Math.max(strokeWidth, 1),
|
|
14527
14521
|
ss?.customDashSegments
|
|
@@ -14532,14 +14526,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14532
14526
|
const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
14533
14527
|
const startMarkerId = `${markerSeed}-sel-start`;
|
|
14534
14528
|
const endMarkerId = `${markerSeed}-sel-end`;
|
|
14535
|
-
const compoundOffsets =
|
|
14536
|
-
const compoundWidths =
|
|
14529
|
+
const compoundOffsets = chunkXRFJ7TAF_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
14530
|
+
const compoundWidths = chunkXRFJ7TAF_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
14537
14531
|
const strokeCap = pptx.svgLineCap(ss?.lineCap);
|
|
14538
|
-
const textEl = (0,
|
|
14532
|
+
const textEl = (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(el) ? el : void 0;
|
|
14539
14533
|
const connectorText = textEl?.text?.trim() ?? "";
|
|
14540
14534
|
const connectorTextSegments = textEl?.textSegments;
|
|
14541
14535
|
const connectorTextStyle = textEl?.textStyle;
|
|
14542
|
-
const pathGeometry = shapeEl ?
|
|
14536
|
+
const pathGeometry = shapeEl ? chunkXRFJ7TAF_js.getConnectorPathGeometry(shapeEl) : {
|
|
14543
14537
|
pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
|
|
14544
14538
|
startX: 0,
|
|
14545
14539
|
startY: 0,
|
|
@@ -14548,16 +14542,16 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14548
14542
|
};
|
|
14549
14543
|
const hitTargetWidth = Math.max(strokeWidth * 3, 14);
|
|
14550
14544
|
const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
|
|
14551
|
-
const lineShadow =
|
|
14552
|
-
const lineGlow =
|
|
14545
|
+
const lineShadow = chunkXRFJ7TAF_js.buildLineShadowCss(el);
|
|
14546
|
+
const lineGlow = chunkXRFJ7TAF_js.buildLineGlowFilter(el);
|
|
14553
14547
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14554
14548
|
"div",
|
|
14555
14549
|
{
|
|
14556
14550
|
"data-pptx-element": "true",
|
|
14557
14551
|
"data-element-id": el.id,
|
|
14558
|
-
role:
|
|
14559
|
-
"aria-label":
|
|
14560
|
-
"aria-roledescription":
|
|
14552
|
+
role: chunkXRFJ7TAF_js.getAriaRole(el, { actionable: false }),
|
|
14553
|
+
"aria-label": chunkXRFJ7TAF_js.getAriaLabel(el),
|
|
14554
|
+
"aria-roledescription": chunkXRFJ7TAF_js.getAriaRoleDescription(el),
|
|
14561
14555
|
"aria-selected": isSelected ? true : void 0,
|
|
14562
14556
|
className: "absolute",
|
|
14563
14557
|
style: {
|
|
@@ -14590,14 +14584,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14590
14584
|
style: { overflow: "visible", pointerEvents: "none" },
|
|
14591
14585
|
children: [
|
|
14592
14586
|
/* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
|
|
14593
|
-
|
|
14587
|
+
chunkXRFJ7TAF_js.renderConnectorMarker(
|
|
14594
14588
|
startMarkerId,
|
|
14595
14589
|
startArrow,
|
|
14596
14590
|
strokePaint,
|
|
14597
14591
|
ss?.connectorStartArrowWidth,
|
|
14598
14592
|
ss?.connectorStartArrowLength
|
|
14599
14593
|
),
|
|
14600
|
-
|
|
14594
|
+
chunkXRFJ7TAF_js.renderConnectorMarker(
|
|
14601
14595
|
endMarkerId,
|
|
14602
14596
|
endArrow,
|
|
14603
14597
|
strokePaint,
|
|
@@ -14677,6 +14671,8 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14677
14671
|
filter: idx === 0 && lineShadow ? `url(#${markerSeed}-line-shadow)` : void 0,
|
|
14678
14672
|
style: {
|
|
14679
14673
|
pointerEvents: "none",
|
|
14674
|
+
// Never under one device pixel on screen (shared `device-pixel-stroke`).
|
|
14675
|
+
strokeWidth: pptx.screenStrokeWidth(Math.max(compoundWidths[idx] ?? strokeWidth, 1)),
|
|
14680
14676
|
...offset !== 0 ? {
|
|
14681
14677
|
transform: `translate(0, ${offset}px)`
|
|
14682
14678
|
} : {}
|
|
@@ -14801,14 +14797,14 @@ function getElementInteractionProps({
|
|
|
14801
14797
|
};
|
|
14802
14798
|
}
|
|
14803
14799
|
function renderDagDuotoneFilterForElement(el) {
|
|
14804
|
-
if (!
|
|
14800
|
+
if (!chunkXRFJ7TAF_js.hasDagDuotoneEffect(el)) {
|
|
14805
14801
|
return null;
|
|
14806
14802
|
}
|
|
14807
14803
|
const duotone = el.shapeStyle?.dagDuotone;
|
|
14808
14804
|
if (!duotone) {
|
|
14809
14805
|
return null;
|
|
14810
14806
|
}
|
|
14811
|
-
return
|
|
14807
|
+
return chunkXRFJ7TAF_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
|
|
14812
14808
|
}
|
|
14813
14809
|
function getContainerStyle({
|
|
14814
14810
|
el,
|
|
@@ -14821,7 +14817,7 @@ function getContainerStyle({
|
|
|
14821
14817
|
has3DExtrusion,
|
|
14822
14818
|
templateEditing
|
|
14823
14819
|
}) {
|
|
14824
|
-
const ss = (0,
|
|
14820
|
+
const ss = (0, chunkXRFJ7TAF_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
|
|
14825
14821
|
const isPicture = el.type === "picture" || el.type === "image";
|
|
14826
14822
|
const blurGrowVisible = Boolean(
|
|
14827
14823
|
ss?.blurGrow && typeof ss.blurRadius === "number" && ss.blurRadius > 0
|
|
@@ -14835,10 +14831,10 @@ function getContainerStyle({
|
|
|
14835
14831
|
top: isFullscreenMedia ? fs.top : el.y,
|
|
14836
14832
|
width: isFullscreenMedia ? fs.width : painted.width,
|
|
14837
14833
|
...heightStyle,
|
|
14838
|
-
transform: isFullscreenMedia ? fs.transform :
|
|
14834
|
+
transform: isFullscreenMedia ? fs.transform : chunkXRFJ7TAF_js.getElementTransform(el),
|
|
14839
14835
|
transformOrigin: "center",
|
|
14840
14836
|
overflow: overflowValue,
|
|
14841
|
-
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ?
|
|
14837
|
+
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunkXRFJ7TAF_js.getCropShapeClipPath(el) : void 0,
|
|
14842
14838
|
zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
|
|
14843
14839
|
visibility: animationState?.visible === false ? "hidden" : "visible",
|
|
14844
14840
|
animation: animationState?.cssAnimation,
|
|
@@ -14870,11 +14866,11 @@ function getContainerStyle({
|
|
|
14870
14866
|
};
|
|
14871
14867
|
}
|
|
14872
14868
|
function shapeParams(element) {
|
|
14873
|
-
const style = (0,
|
|
14869
|
+
const style = (0, chunkXRFJ7TAF_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
|
|
14874
14870
|
const strokeWidth = pptx.paintedStrokeWidth(style);
|
|
14875
|
-
const strokeColor =
|
|
14876
|
-
const fillColor =
|
|
14877
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
14871
|
+
const strokeColor = chunkXRFJ7TAF_js.normalizeHexColor(style?.strokeColor, chunkXRFJ7TAF_js.DEFAULT_STROKE_COLOR);
|
|
14872
|
+
const fillColor = chunkXRFJ7TAF_js.normalizeHexColor(style?.fillColor, chunkXRFJ7TAF_js.DEFAULT_FILL_COLOR);
|
|
14873
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkXRFJ7TAF_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
14878
14874
|
return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
|
|
14879
14875
|
}
|
|
14880
14876
|
var Extrusion3DOverlay = React17__default.default.memo(
|
|
@@ -14979,7 +14975,7 @@ function ShapeEffectOverlay({
|
|
|
14979
14975
|
const fillOverlayStyle = overlay ? {
|
|
14980
14976
|
position: "absolute",
|
|
14981
14977
|
inset: 0,
|
|
14982
|
-
...(0,
|
|
14978
|
+
...(0, chunkXRFJ7TAF_js.dist_exports.isImageLikeElement)(element) ? chunkXRFJ7TAF_js.getImageSurfaceMaskStyle(element) : {},
|
|
14983
14979
|
background: overlay.color,
|
|
14984
14980
|
mixBlendMode: overlay.blendMode,
|
|
14985
14981
|
pointerEvents: "none"
|
|
@@ -15069,7 +15065,11 @@ function ShapeEffectOverlay({
|
|
|
15069
15065
|
strokeDasharray: strokeOutline.dashArray,
|
|
15070
15066
|
strokeLinecap: strokeOutline.lineCap,
|
|
15071
15067
|
strokeLinejoin: strokeOutline.lineJoin,
|
|
15072
|
-
style:
|
|
15068
|
+
style: {
|
|
15069
|
+
// Never under one device pixel on screen (shared `device-pixel-stroke`).
|
|
15070
|
+
strokeWidth: strand.cssStrokeWidth,
|
|
15071
|
+
transform: strand.offset !== 0 ? `translate(0, ${strand.offset}px)` : void 0
|
|
15072
|
+
}
|
|
15073
15073
|
},
|
|
15074
15074
|
idx
|
|
15075
15075
|
))
|
|
@@ -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 = chunkXRFJ7TAF_js.isEditableTextElement(el) && allow.textEditable;
|
|
15182
|
+
const txtSE = (0, chunkXRFJ7TAF_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 = chunkXRFJ7TAF_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 = chunkXRFJ7TAF_js.getTextStyleForElement(el, chunkXRFJ7TAF_js.DEFAULT_TEXT_COLOR);
|
|
15194
15194
|
const isImg = el.type === "picture" || el.type === "image";
|
|
15195
|
-
const vs =
|
|
15195
|
+
const vs = chunkXRFJ7TAF_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 = chunkXRFJ7TAF_js.isConnectorOrLineElement(el);
|
|
15206
|
+
const shapeStyle3d = (0, chunkXRFJ7TAF_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
|
|
15207
15207
|
const extrusionData = React17.useMemo(
|
|
15208
|
-
() =>
|
|
15208
|
+
() => chunkXRFJ7TAF_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: chunkXRFJ7TAF_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: chunkXRFJ7TAF_js.getImageRenderStyle(el),
|
|
15386
|
+
imgFilter: chunkXRFJ7TAF_js.getImageEffectsFilter(el),
|
|
15387
|
+
imgOpacity: chunkXRFJ7TAF_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 = chunkXRFJ7TAF_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 ? chunkXRFJ7TAF_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: chunkXRFJ7TAF_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 = chunkXRFJ7TAF_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 = chunkXRFJ7TAF_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
|
|
15543
|
+
const ts = chunkXRFJ7TAF_js.getTextStyleForElement(c, chunkXRFJ7TAF_js.DEFAULT_TEXT_COLOR);
|
|
15544
|
+
const isTxt = chunkXRFJ7TAF_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, chunkXRFJ7TAF_js.MIN_ELEMENT_SIZE),
|
|
15554
|
+
height: Math.max(c.height, chunkXRFJ7TAF_js.MIN_ELEMENT_SIZE),
|
|
15555
|
+
transform: chunkXRFJ7TAF_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: chunkXRFJ7TAF_js.getImageSurfaceStyle(c), children: [
|
|
15581
|
+
chunkXRFJ7TAF_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: chunkXRFJ7TAF_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: chunkXRFJ7TAF_js.renderTextSegments(c, chunkXRFJ7TAF_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 = chunkXRFJ7TAF_js.buildContentPartStrokes(el);
|
|
15621
|
+
const replayStyles = replay ? chunkXRFJ7TAF_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: chunkXRFJ7TAF_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 ? chunkXRFJ7TAF_js.renderTextSegments(
|
|
15857
15857
|
element,
|
|
15858
|
-
|
|
15858
|
+
chunkXRFJ7TAF_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, chunkXRFJ7TAF_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 = chunkXRFJ7TAF_js.getTextWarpStyle(textStyleRaw);
|
|
16095
|
+
const compensationTransform = chunkXRFJ7TAF_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, chunkXRFJ7TAF_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 ? chunkXRFJ7TAF_js.renderTextSegments(element, chunkXRFJ7TAF_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, chunkXRFJ7TAF_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, chunkXRFJ7TAF_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 = chunkXRFJ7TAF_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 ? chunkXRFJ7TAF_js.normalizeHexColor(s.color || element.textStyle?.color, chunkXRFJ7TAF_js.HYPERLINK_COLOR) : chunkXRFJ7TAF_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 ?? chunkXRFJ7TAF_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, chunkXRFJ7TAF_js.dist_exports.getSubstituteFontFamily)(s.fontFamily || element.textStyle?.fontFamily || "") : chunkXRFJ7TAF_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, chunkXRFJ7TAF_js.dist_exports.getSubstituteFontFamily)(family) : chunkXRFJ7TAF_js.DEFAULT_FONT_FAMILY,
|
|
17379
|
+
fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunkXRFJ7TAF_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, chunkXRFJ7TAF_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 ?? chunkXRFJ7TAF_js.DEFAULT_TEXT_FONT_SIZE;
|
|
17464
|
+
const baseFontFamily = textEl.textStyle?.fontFamily ? (0, chunkXRFJ7TAF_js.dist_exports.getSubstituteFontFamily)(textEl.textStyle.fontFamily) : chunkXRFJ7TAF_js.DEFAULT_FONT_FAMILY;
|
|
17465
|
+
const baseFill = chunkXRFJ7TAF_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
|
+
chunkXRFJ7TAF_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, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(el) ? el.textStyle?.textWarpPreset : void 0
|
|
17636
17636
|
);
|
|
17637
|
-
const scene3dStyle = (0,
|
|
17637
|
+
const scene3dStyle = (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(el) ? chunkXRFJ7TAF_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, chunkXRFJ7TAF_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: chunkXRFJ7TAF_js.cn(
|
|
17670
17670
|
"relative z-10 w-full h-full",
|
|
17671
17671
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
17672
17672
|
),
|
|
17673
|
-
style: { ...
|
|
17673
|
+
style: { ...chunkXRFJ7TAF_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: chunkXRFJ7TAF_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: chunkXRFJ7TAF_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
|
+
...chunkXRFJ7TAF_js.getTextLayoutStyle(el),
|
|
17695
17695
|
...txtS,
|
|
17696
|
-
...
|
|
17696
|
+
...chunkXRFJ7TAF_js.getTextWarpStyle(txtSE),
|
|
17697
17697
|
...transformStyle
|
|
17698
17698
|
},
|
|
17699
|
-
children:
|
|
17699
|
+
children: chunkXRFJ7TAF_js.renderTextSegments(
|
|
17700
17700
|
el,
|
|
17701
|
-
|
|
17701
|
+
chunkXRFJ7TAF_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: chunkXRFJ7TAF_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: chunkXRFJ7TAF_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 chunkXRFJ7TAF_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 chunkXRFJ7TAF_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, chunkXRFJ7TAF_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 (chunkXRFJ7TAF_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: chunkXRFJ7TAF_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 chunkXRFJ7TAF_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 ? chunkXRFJ7TAF_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, chunkXRFJ7TAF_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
|
|
18148
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkXRFJ7TAF_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
18149
|
+
const fill = chunkXRFJ7TAF_js.normalizeHexColor(style?.fillColor, chunkXRFJ7TAF_js.DEFAULT_FILL_COLOR);
|
|
18150
18150
|
const strokeWidth = pptx.paintedStrokeWidth(style);
|
|
18151
|
-
const stroke =
|
|
18152
|
-
const baseVisualStyle =
|
|
18151
|
+
const stroke = chunkXRFJ7TAF_js.normalizeHexColor(style?.strokeColor, chunkXRFJ7TAF_js.DEFAULT_STROKE_COLOR);
|
|
18152
|
+
const baseVisualStyle = chunkXRFJ7TAF_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 = chunkXRFJ7TAF_js.getTextStyleForElement(
|
|
18163
18163
|
element,
|
|
18164
|
-
element.type === "shape" && hasFill ? defaultTextColorForFill(fill) :
|
|
18164
|
+
element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunkXRFJ7TAF_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, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
18168
|
+
const shapeType = (0, chunkXRFJ7TAF_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" || chunkXRFJ7TAF_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 ? chunkXRFJ7TAF_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, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(element) ? element.textStyle : void 0,
|
|
18314
18314
|
txtS: textStyle,
|
|
18315
|
-
vecShape:
|
|
18315
|
+
vecShape: chunkXRFJ7TAF_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 ? { ...chunkXRFJ7TAF_js.getImageRenderStyle(element), animation: imageAnimation } : chunkXRFJ7TAF_js.getImageRenderStyle(element),
|
|
18323
|
+
imgFilter: chunkXRFJ7TAF_js.getImageEffectsFilter(element),
|
|
18324
|
+
imgOpacity: chunkXRFJ7TAF_js.getImageEffectsOpacity(element),
|
|
18325
18325
|
imgAlt: "",
|
|
18326
|
-
isTxtEl:
|
|
18326
|
+
isTxtEl: chunkXRFJ7TAF_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 ? chunkXRFJ7TAF_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
|
|
@@ -18429,7 +18429,8 @@ function FragmentedTransitionLayer({
|
|
|
18429
18429
|
height: canvasSize.height,
|
|
18430
18430
|
flexShrink: 0,
|
|
18431
18431
|
transform: `scale(${scale})`,
|
|
18432
|
-
transformOrigin: "center"
|
|
18432
|
+
transformOrigin: "center",
|
|
18433
|
+
...pptx.deviceStrokeStageStyle(scale)
|
|
18433
18434
|
},
|
|
18434
18435
|
children: /* @__PURE__ */ jsxRuntime.jsx(SlideLayer, { slide, templateElements, canvasSize })
|
|
18435
18436
|
}
|
|
@@ -18475,6 +18476,7 @@ function MorphTransitionOverlay({
|
|
|
18475
18476
|
flexShrink: 0,
|
|
18476
18477
|
transform: `scale(${scale})`,
|
|
18477
18478
|
transformOrigin: "center",
|
|
18479
|
+
...pptx.deviceStrokeStageStyle(scale),
|
|
18478
18480
|
position: "relative"
|
|
18479
18481
|
},
|
|
18480
18482
|
children: [
|
|
@@ -18691,7 +18693,8 @@ function PresentationTransitionOverlay({
|
|
|
18691
18693
|
height: canvasSize.height,
|
|
18692
18694
|
flexShrink: 0,
|
|
18693
18695
|
transform: `scale(${scale})`,
|
|
18694
|
-
transformOrigin: "center"
|
|
18696
|
+
transformOrigin: "center",
|
|
18697
|
+
...pptx.deviceStrokeStageStyle(scale)
|
|
18695
18698
|
},
|
|
18696
18699
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18697
18700
|
SlideLayer,
|
|
@@ -18736,7 +18739,8 @@ function PresentationTransitionOverlay({
|
|
|
18736
18739
|
// than the deck's canvas.
|
|
18737
18740
|
flexShrink: 0,
|
|
18738
18741
|
transform: `scale(${scale})`,
|
|
18739
|
-
transformOrigin: "center"
|
|
18742
|
+
transformOrigin: "center",
|
|
18743
|
+
...pptx.deviceStrokeStageStyle(scale)
|
|
18740
18744
|
},
|
|
18741
18745
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18742
18746
|
SlideLayer,
|