pptx-react-viewer 4.30.0 → 4.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/{AiChatPanel-6VWCT6NE.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-42FL4CPM.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-MFGD7XVJ.js → chunk-355ICDU6.js} +259 -249
- package/dist/chunk-355ICDU6.js.br +0 -0
- package/dist/chunk-355ICDU6.js.gz +0 -0
- package/dist/{chunk-ZIBAN7RL.mjs → chunk-ATGP75C4.mjs} +35 -16
- package/dist/chunk-ATGP75C4.mjs.br +0 -0
- package/dist/chunk-ATGP75C4.mjs.gz +0 -0
- package/dist/{chunk-KRXS36RB.mjs → chunk-CHZJORUW.mjs} +16 -6
- package/dist/chunk-CHZJORUW.mjs.br +0 -0
- package/dist/chunk-CHZJORUW.mjs.gz +0 -0
- package/dist/{chunk-XKV2QDAO.js → chunk-QLGDQED2.js} +1329 -1321
- package/dist/chunk-QLGDQED2.js.br +0 -0
- package/dist/chunk-QLGDQED2.js.gz +0 -0
- package/dist/{chunk-RHNJ4IU2.js → chunk-XRFJ7TAF.js} +34 -15
- package/dist/chunk-XRFJ7TAF.js.br +0 -0
- package/dist/chunk-XRFJ7TAF.js.gz +0 -0
- package/dist/{chunk-GXMGJ5A3.mjs → chunk-YHJRKGJD.mjs} +77 -69
- package/dist/chunk-YHJRKGJD.mjs.br +0 -0
- package/dist/chunk-YHJRKGJD.mjs.gz +0 -0
- package/dist/index.js +24 -24
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.js +81 -81
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +2 -2
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/pptx-viewer.css +1 -1
- package/dist/pptx-viewer.css.br +0 -0
- package/dist/pptx-viewer.css.gz +0 -0
- package/dist/viewer/index.js +19 -19
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +3 -3
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +3 -3
- package/dist/AiChatPanel-42FL4CPM.mjs.br +0 -0
- package/dist/AiChatPanel-42FL4CPM.mjs.gz +0 -0
- package/dist/AiChatPanel-6VWCT6NE.js.br +0 -0
- package/dist/AiChatPanel-6VWCT6NE.js.gz +0 -0
- package/dist/chunk-GXMGJ5A3.mjs.br +0 -0
- package/dist/chunk-GXMGJ5A3.mjs.gz +0 -0
- package/dist/chunk-KRXS36RB.mjs.br +0 -0
- package/dist/chunk-KRXS36RB.mjs.gz +0 -0
- package/dist/chunk-MFGD7XVJ.js.br +0 -0
- package/dist/chunk-MFGD7XVJ.js.gz +0 -0
- package/dist/chunk-RHNJ4IU2.js.br +0 -0
- package/dist/chunk-RHNJ4IU2.js.gz +0 -0
- package/dist/chunk-XKV2QDAO.js.br +0 -0
- package/dist/chunk-XKV2QDAO.js.gz +0 -0
- package/dist/chunk-ZIBAN7RL.mjs.br +0 -0
- package/dist/chunk-ZIBAN7RL.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,
|
|
@@ -7457,7 +7457,7 @@ function useExportSaveAs(input) {
|
|
|
7457
7457
|
const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
|
|
7458
7458
|
const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
|
|
7459
7459
|
const data = {
|
|
7460
|
-
slides:
|
|
7460
|
+
slides: chunkXRFJ7TAF_js.buildSaveSlides(slides, templateElementsBySlideId),
|
|
7461
7461
|
width: canvasSize.width,
|
|
7462
7462
|
height: canvasSize.height,
|
|
7463
7463
|
widthEmu: slideSize.widthEmu,
|
|
@@ -7615,7 +7615,7 @@ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActi
|
|
|
7615
7615
|
}
|
|
7616
7616
|
function tilesToPdfPage(tilesResult) {
|
|
7617
7617
|
return tilesResult.tiles.map((tile) => ({
|
|
7618
|
-
image:
|
|
7618
|
+
image: chunkXRFJ7TAF_js.canvasToJpegData(tile.canvas),
|
|
7619
7619
|
placement: pptx.placeTileOnPage(
|
|
7620
7620
|
tile,
|
|
7621
7621
|
tilesResult.fullWidth,
|
|
@@ -7648,7 +7648,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
|
|
|
7648
7648
|
if (pages.length === 0) {
|
|
7649
7649
|
throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
|
|
7650
7650
|
}
|
|
7651
|
-
const pdfBlobUrl =
|
|
7651
|
+
const pdfBlobUrl = chunkXRFJ7TAF_js.buildPdfFromTiledImageData(pages);
|
|
7652
7652
|
pptx.downloadDataUrl(pdfBlobUrl, filename);
|
|
7653
7653
|
}
|
|
7654
7654
|
async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
|
|
@@ -7678,7 +7678,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
|
|
|
7678
7678
|
if (pages.length === 0) {
|
|
7679
7679
|
throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
|
|
7680
7680
|
}
|
|
7681
|
-
const pdfDataUrl =
|
|
7681
|
+
const pdfDataUrl = chunkXRFJ7TAF_js.buildNotesPdf(pages);
|
|
7682
7682
|
pptx.downloadDataUrl(pdfDataUrl, filename);
|
|
7683
7683
|
}
|
|
7684
7684
|
async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
|
|
@@ -7873,7 +7873,7 @@ function exportAllSlidesToSvg(data, options = {}) {
|
|
|
7873
7873
|
continue;
|
|
7874
7874
|
}
|
|
7875
7875
|
onProgress?.(processedCount, data.slides.length);
|
|
7876
|
-
let svg =
|
|
7876
|
+
let svg = chunkXRFJ7TAF_js.dist_exports.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
|
|
7877
7877
|
if (embedFonts && fontFaces?.length) {
|
|
7878
7878
|
svg = injectFontFaces(svg, fontFaces);
|
|
7879
7879
|
}
|
|
@@ -8462,10 +8462,10 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
|
|
|
8462
8462
|
return;
|
|
8463
8463
|
}
|
|
8464
8464
|
await handler.applyTheme(colorScheme, fontScheme, name);
|
|
8465
|
-
const previousMap = theme?.colorScheme ? (0,
|
|
8465
|
+
const previousMap = theme?.colorScheme ? (0, chunkXRFJ7TAF_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
|
|
8466
8466
|
bumpHistory();
|
|
8467
8467
|
setSlides(
|
|
8468
|
-
(slides) => (0,
|
|
8468
|
+
(slides) => (0, chunkXRFJ7TAF_js.dist_exports.applyThemeToData)(
|
|
8469
8469
|
{ slides, theme, themeColorMap: previousMap },
|
|
8470
8470
|
colorScheme,
|
|
8471
8471
|
fontScheme,
|
|
@@ -8476,8 +8476,8 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
|
|
|
8476
8476
|
(prev) => Object.fromEntries(
|
|
8477
8477
|
Object.entries(prev).map(([id, elements]) => [
|
|
8478
8478
|
id,
|
|
8479
|
-
(0,
|
|
8480
|
-
(0,
|
|
8479
|
+
(0, chunkXRFJ7TAF_js.dist_exports.reResolveElementFonts)(
|
|
8480
|
+
(0, chunkXRFJ7TAF_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme),
|
|
8481
8481
|
theme?.fontScheme,
|
|
8482
8482
|
fontScheme
|
|
8483
8483
|
)
|
|
@@ -8535,13 +8535,13 @@ function useThemeHandlers(input) {
|
|
|
8535
8535
|
return;
|
|
8536
8536
|
}
|
|
8537
8537
|
await handler.updateThemeColorScheme(colorScheme);
|
|
8538
|
-
const previousMap = theme?.colorScheme ? (0,
|
|
8539
|
-
setSlides((prev) => (0,
|
|
8538
|
+
const previousMap = theme?.colorScheme ? (0, chunkXRFJ7TAF_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
|
|
8539
|
+
setSlides((prev) => (0, chunkXRFJ7TAF_js.dist_exports.reResolveSlideColors)(prev, previousMap, colorScheme));
|
|
8540
8540
|
if (Object.keys(templateElementsBySlideId).length > 0) {
|
|
8541
8541
|
setTemplateElementsBySlideId((prev) => {
|
|
8542
8542
|
const next = {};
|
|
8543
8543
|
for (const [slideId, elements] of Object.entries(prev)) {
|
|
8544
|
-
next[slideId] = (0,
|
|
8544
|
+
next[slideId] = (0, chunkXRFJ7TAF_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme);
|
|
8545
8545
|
}
|
|
8546
8546
|
return next;
|
|
8547
8547
|
});
|
|
@@ -8652,7 +8652,7 @@ function useThemeSwitching(input) {
|
|
|
8652
8652
|
}
|
|
8653
8653
|
try {
|
|
8654
8654
|
await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
|
|
8655
|
-
const newData = (0,
|
|
8655
|
+
const newData = (0, chunkXRFJ7TAF_js.dist_exports.applyThemeToData)(data, preset.colorScheme, preset.fontScheme, preset.name);
|
|
8656
8656
|
onDataChange(newData);
|
|
8657
8657
|
onThemeChanged?.(preset);
|
|
8658
8658
|
} catch (error) {
|
|
@@ -8669,7 +8669,7 @@ function useThemeSwitching(input) {
|
|
|
8669
8669
|
}
|
|
8670
8670
|
try {
|
|
8671
8671
|
await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
|
|
8672
|
-
const newData = (0,
|
|
8672
|
+
const newData = (0, chunkXRFJ7TAF_js.dist_exports.applyThemeToData)(data, colorScheme, fontScheme, themeName);
|
|
8673
8673
|
onDataChange(newData);
|
|
8674
8674
|
} catch (error) {
|
|
8675
8675
|
console.error("Failed to switch to custom theme:", error);
|
|
@@ -8681,12 +8681,12 @@ function useThemeSwitching(input) {
|
|
|
8681
8681
|
if (!data?.theme?.colorScheme) {
|
|
8682
8682
|
return void 0;
|
|
8683
8683
|
}
|
|
8684
|
-
return
|
|
8685
|
-
(p) => (0,
|
|
8684
|
+
return chunkXRFJ7TAF_js.dist_exports.THEME_PRESETS.find(
|
|
8685
|
+
(p) => (0, chunkXRFJ7TAF_js.dist_exports.themeColorSchemesEqual)(data.theme?.colorScheme, p.colorScheme)
|
|
8686
8686
|
);
|
|
8687
8687
|
}, [data?.theme?.colorScheme]);
|
|
8688
8688
|
return {
|
|
8689
|
-
presets:
|
|
8689
|
+
presets: chunkXRFJ7TAF_js.dist_exports.THEME_PRESETS,
|
|
8690
8690
|
switchToPreset,
|
|
8691
8691
|
switchToCustom,
|
|
8692
8692
|
currentPreset
|
|
@@ -8763,7 +8763,7 @@ function usePropertyHandlers(input) {
|
|
|
8763
8763
|
}
|
|
8764
8764
|
try {
|
|
8765
8765
|
const ab = await file.arrayBuffer();
|
|
8766
|
-
const h = new
|
|
8766
|
+
const h = new chunkXRFJ7TAF_js.dist_exports.PptxHandler();
|
|
8767
8767
|
const other = await h.load(ab);
|
|
8768
8768
|
if (!other) {
|
|
8769
8769
|
return;
|
|
@@ -8773,7 +8773,7 @@ function usePropertyHandlers(input) {
|
|
|
8773
8773
|
width: canvasSize.width,
|
|
8774
8774
|
height: canvasSize.height
|
|
8775
8775
|
};
|
|
8776
|
-
setCompareResult(
|
|
8776
|
+
setCompareResult(chunkXRFJ7TAF_js.comparePresentation(cur, other));
|
|
8777
8777
|
setIsComparePanelOpen(true);
|
|
8778
8778
|
} catch (err) {
|
|
8779
8779
|
console.warn("Compare failed:", err);
|
|
@@ -9126,7 +9126,7 @@ function useViewerDialogs(input) {
|
|
|
9126
9126
|
};
|
|
9127
9127
|
}
|
|
9128
9128
|
function computeGridSpacingPx(documentGridSpacing) {
|
|
9129
|
-
return pptx.computeGridSpacingPx(documentGridSpacing,
|
|
9129
|
+
return pptx.computeGridSpacingPx(documentGridSpacing, chunkXRFJ7TAF_js.GRID_SIZE);
|
|
9130
9130
|
}
|
|
9131
9131
|
function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
|
|
9132
9132
|
const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
|
|
@@ -9135,7 +9135,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
|
|
|
9135
9135
|
}
|
|
9136
9136
|
function computeSlideSectionGroups(slides, sections) {
|
|
9137
9137
|
return pptx.groupSlidesBySection(sections, slides).map((group) => ({
|
|
9138
|
-
id: group.section?.id ?? (sections.length > 0 ?
|
|
9138
|
+
id: group.section?.id ?? (sections.length > 0 ? chunkXRFJ7TAF_js.UNGROUPED_SECTION_ID : chunkXRFJ7TAF_js.DEFAULT_SECTION_GROUP_ID),
|
|
9139
9139
|
label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
|
|
9140
9140
|
slideIndexes: group.slideIndexes,
|
|
9141
9141
|
...group.section?.color !== void 0 ? { color: group.section.color } : {},
|
|
@@ -9180,10 +9180,10 @@ function useDerivedSlideState(input) {
|
|
|
9180
9180
|
);
|
|
9181
9181
|
const slideSectionGroups = React17.useMemo(
|
|
9182
9182
|
() => computeSlideSectionGroups(slides, sections).map((group) => {
|
|
9183
|
-
if (group.id ===
|
|
9183
|
+
if (group.id === chunkXRFJ7TAF_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
|
|
9184
9184
|
return { ...group, label: t("pptx.slides.ungroupedSlides") };
|
|
9185
9185
|
}
|
|
9186
|
-
if (group.id ===
|
|
9186
|
+
if (group.id === chunkXRFJ7TAF_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
|
|
9187
9187
|
return { ...group, label: t("pptx.sections.slides") };
|
|
9188
9188
|
}
|
|
9189
9189
|
return group;
|
|
@@ -9290,7 +9290,7 @@ function useAnnotationHandlers(input) {
|
|
|
9290
9290
|
if (nextMode === "present") {
|
|
9291
9291
|
presentation.enterPresentMode();
|
|
9292
9292
|
} else if (mode === "present" && annotations.hasAnyAnnotations) {
|
|
9293
|
-
|
|
9293
|
+
chunkXRFJ7TAF_js.stopAllPersistentAudio();
|
|
9294
9294
|
if (promptKeepInkAnnotations) {
|
|
9295
9295
|
pendingModeAfterAnnotationsRef.current = nextMode;
|
|
9296
9296
|
setShowKeepAnnotationsDialog(true);
|
|
@@ -9300,7 +9300,7 @@ function useAnnotationHandlers(input) {
|
|
|
9300
9300
|
}
|
|
9301
9301
|
} else {
|
|
9302
9302
|
if (mode === "present") {
|
|
9303
|
-
|
|
9303
|
+
chunkXRFJ7TAF_js.stopAllPersistentAudio();
|
|
9304
9304
|
}
|
|
9305
9305
|
setMode(nextMode);
|
|
9306
9306
|
}
|
|
@@ -9371,7 +9371,7 @@ function overlayPendingInlineEdit(document2, elementId, text, snapshot, transfor
|
|
|
9371
9371
|
(slide) => !elementId ? slide : {
|
|
9372
9372
|
...slide,
|
|
9373
9373
|
elements: slide.elements.map(
|
|
9374
|
-
(element) => element.id === elementId && (0,
|
|
9374
|
+
(element) => element.id === elementId && (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(element) ? {
|
|
9375
9375
|
...element,
|
|
9376
9376
|
text,
|
|
9377
9377
|
textSegments: pptx.remapTextToSegments(
|
|
@@ -9457,14 +9457,14 @@ function useSerialize(input) {
|
|
|
9457
9457
|
const pptxGuides = guides.map((g) => ({
|
|
9458
9458
|
id: g.id,
|
|
9459
9459
|
orientation: g.axis === "h" ? "horz" : "vert",
|
|
9460
|
-
positionEmu: (0,
|
|
9460
|
+
positionEmu: (0, chunkXRFJ7TAF_js.dist_exports.guidePxToEmu)(g.position)
|
|
9461
9461
|
}));
|
|
9462
9462
|
return {
|
|
9463
9463
|
...slide,
|
|
9464
9464
|
guides: pptxGuides.length > 0 ? pptxGuides : void 0
|
|
9465
9465
|
};
|
|
9466
9466
|
});
|
|
9467
|
-
const slidesToSave =
|
|
9467
|
+
const slidesToSave = chunkXRFJ7TAF_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
|
|
9468
9468
|
const saveOptions = pptx.buildDeckSaveOptions({
|
|
9469
9469
|
// Without this the Slide Size card edited a viewer-only pixel value and
|
|
9470
9470
|
// the saved `p:sldSz` never moved: passing `slideSize` is the only way a
|
|
@@ -9645,7 +9645,7 @@ function usePresentationSetup(input) {
|
|
|
9645
9645
|
return;
|
|
9646
9646
|
}
|
|
9647
9647
|
if (mode === "present" && nextMode !== "present") {
|
|
9648
|
-
|
|
9648
|
+
chunkXRFJ7TAF_js.stopAllPersistentAudio();
|
|
9649
9649
|
stopAnimationSound();
|
|
9650
9650
|
const exitHandler = exitModeHandlerRef.current;
|
|
9651
9651
|
if (exitHandler) {
|
|
@@ -9766,12 +9766,12 @@ function useCanvasImagePaste(input) {
|
|
|
9766
9766
|
);
|
|
9767
9767
|
}
|
|
9768
9768
|
function formatPatchFor(element, format) {
|
|
9769
|
-
const updated =
|
|
9769
|
+
const updated = chunkXRFJ7TAF_js.applyFormatToElement(element, format);
|
|
9770
9770
|
const updates = {};
|
|
9771
|
-
if ((0,
|
|
9771
|
+
if ((0, chunkXRFJ7TAF_js.dist_exports.hasShapeProperties)(updated)) {
|
|
9772
9772
|
updates.shapeStyle = updated.shapeStyle;
|
|
9773
9773
|
}
|
|
9774
|
-
if ((0,
|
|
9774
|
+
if ((0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(updated)) {
|
|
9775
9775
|
updates.textStyle = updated.textStyle;
|
|
9776
9776
|
}
|
|
9777
9777
|
return updates;
|
|
@@ -9789,7 +9789,7 @@ function useFormatPainterEditing(input) {
|
|
|
9789
9789
|
const prevFormatPainterRef = React17.useRef(false);
|
|
9790
9790
|
React17.useEffect(() => {
|
|
9791
9791
|
if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
|
|
9792
|
-
copiedFormatRef.current =
|
|
9792
|
+
copiedFormatRef.current = chunkXRFJ7TAF_js.copyFormatFromElement(selectedElement);
|
|
9793
9793
|
} else if (!formatPainterActive) {
|
|
9794
9794
|
copiedFormatRef.current = null;
|
|
9795
9795
|
}
|
|
@@ -10878,7 +10878,7 @@ function useKeyboardShortcutWiring(input) {
|
|
|
10878
10878
|
}
|
|
10879
10879
|
function stepSelectedFontSize(state, ops, direction) {
|
|
10880
10880
|
const selected = state.selectedElement;
|
|
10881
|
-
const currentPx = (selected && (0,
|
|
10881
|
+
const currentPx = (selected && (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(selected) ? selected.textStyle?.fontSize : void 0) ?? pptx.textFontSizePtToPx(18);
|
|
10882
10882
|
const nextPt = pptx.stepFontSizePt(pptx.textFontSizePxToPt(currentPx), direction);
|
|
10883
10883
|
ops.updateSelectedTextStyle({ fontSize: pptx.textFontSizePtToPx(nextPt) });
|
|
10884
10884
|
}
|
|
@@ -11429,7 +11429,7 @@ function useCollaborationWriteBack(input) {
|
|
|
11429
11429
|
getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
|
|
11430
11430
|
getSaveOptions: () => latest.current.getSaveOptions?.(),
|
|
11431
11431
|
getTemplateElements: () => latest.current.templateElementsBySlideId,
|
|
11432
|
-
mergeTemplateElements:
|
|
11432
|
+
mergeTemplateElements: chunkXRFJ7TAF_js.buildSaveSlides
|
|
11433
11433
|
}),
|
|
11434
11434
|
[latest]
|
|
11435
11435
|
);
|
|
@@ -11982,8 +11982,8 @@ function useTouchGestures(input) {
|
|
|
11982
11982
|
}
|
|
11983
11983
|
const recognizer = pptx.createTouchGestureRecognizer({
|
|
11984
11984
|
getScale: () => scaleRef.current,
|
|
11985
|
-
minScale:
|
|
11986
|
-
maxScale:
|
|
11985
|
+
minScale: chunkXRFJ7TAF_js.MIN_ZOOM_SCALE,
|
|
11986
|
+
maxScale: chunkXRFJ7TAF_js.MAX_ZOOM_SCALE,
|
|
11987
11987
|
callbacks: {
|
|
11988
11988
|
onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
|
|
11989
11989
|
onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
|
|
@@ -12106,7 +12106,7 @@ function buildCanvasProps(input) {
|
|
|
12106
12106
|
if (pptx.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
|
|
12107
12107
|
return;
|
|
12108
12108
|
}
|
|
12109
|
-
|
|
12109
|
+
chunkXRFJ7TAF_js.safeOpenUrl(url, target);
|
|
12110
12110
|
};
|
|
12111
12111
|
const handleActionClick = (elementId, action) => {
|
|
12112
12112
|
if (mode === "present") {
|
|
@@ -12121,9 +12121,9 @@ function buildCanvasProps(input) {
|
|
|
12121
12121
|
}
|
|
12122
12122
|
};
|
|
12123
12123
|
const handleHyperlinkClick = (url, target) => {
|
|
12124
|
-
if (
|
|
12124
|
+
if (chunkXRFJ7TAF_js.isPpactionUrl(url)) {
|
|
12125
12125
|
if (mode === "present") {
|
|
12126
|
-
const parsed =
|
|
12126
|
+
const parsed = chunkXRFJ7TAF_js.parsePpactionUrl(url);
|
|
12127
12127
|
if (parsed) {
|
|
12128
12128
|
presentation.handlePresentationAction({
|
|
12129
12129
|
action: parsed.action,
|
|
@@ -12516,7 +12516,7 @@ function buildToolbarProps(input) {
|
|
|
12516
12516
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
12517
12517
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
12518
12518
|
formatPainterActive: s.formatPainterActive,
|
|
12519
|
-
canActivateFormatPainter:
|
|
12519
|
+
canActivateFormatPainter: chunkXRFJ7TAF_js.hasCopyableFormat(selectedElement),
|
|
12520
12520
|
onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
|
|
12521
12521
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
12522
12522
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -12837,7 +12837,7 @@ function useViewerBuildingBlocksCore(input) {
|
|
|
12837
12837
|
documentGridSpacing: state.viewProperties?.gridSpacing
|
|
12838
12838
|
});
|
|
12839
12839
|
const themeColorMap = React17.useMemo(
|
|
12840
|
-
() => state.theme?.colorScheme ? (0,
|
|
12840
|
+
() => state.theme?.colorScheme ? (0, chunkXRFJ7TAF_js.dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
|
|
12841
12841
|
[state.theme?.colorScheme]
|
|
12842
12842
|
);
|
|
12843
12843
|
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
|
|
@@ -13412,23 +13412,23 @@ function ColorChangedImage({
|
|
|
13412
13412
|
className,
|
|
13413
13413
|
alt
|
|
13414
13414
|
}) {
|
|
13415
|
-
const tolerance = tolerancePct ??
|
|
13416
|
-
const cacheKey =
|
|
13415
|
+
const tolerance = tolerancePct ?? chunkXRFJ7TAF_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
|
|
13416
|
+
const cacheKey = chunkXRFJ7TAF_js.buildCacheKey(
|
|
13417
13417
|
src,
|
|
13418
13418
|
clrChange.clrFrom,
|
|
13419
13419
|
clrChange.clrTo,
|
|
13420
13420
|
tolerance,
|
|
13421
13421
|
Boolean(clrChange.clrToTransparent)
|
|
13422
13422
|
);
|
|
13423
|
-
const cached =
|
|
13423
|
+
const cached = chunkXRFJ7TAF_js.getCachedResult(cacheKey);
|
|
13424
13424
|
const [processedSrc, setProcessedSrc] = React17.useState(cached ?? null);
|
|
13425
13425
|
React17.useEffect(() => {
|
|
13426
|
-
if (
|
|
13427
|
-
setProcessedSrc(
|
|
13426
|
+
if (chunkXRFJ7TAF_js.getCachedResult(cacheKey)) {
|
|
13427
|
+
setProcessedSrc(chunkXRFJ7TAF_js.getCachedResult(cacheKey) ?? null);
|
|
13428
13428
|
return;
|
|
13429
13429
|
}
|
|
13430
13430
|
let cancelled = false;
|
|
13431
|
-
|
|
13431
|
+
chunkXRFJ7TAF_js.applyColorChange(
|
|
13432
13432
|
src,
|
|
13433
13433
|
clrChange.clrFrom,
|
|
13434
13434
|
clrChange.clrTo,
|
|
@@ -13436,7 +13436,7 @@ function ColorChangedImage({
|
|
|
13436
13436
|
Boolean(clrChange.clrToTransparent)
|
|
13437
13437
|
).then((result) => {
|
|
13438
13438
|
if (!cancelled) {
|
|
13439
|
-
|
|
13439
|
+
chunkXRFJ7TAF_js.setCachedResult(cacheKey, result.dataUrl);
|
|
13440
13440
|
setProcessedSrc(result.dataUrl);
|
|
13441
13441
|
}
|
|
13442
13442
|
return void 0;
|
|
@@ -13528,7 +13528,7 @@ function TiledImageLayer({
|
|
|
13528
13528
|
cancelled = true;
|
|
13529
13529
|
};
|
|
13530
13530
|
}, [src]);
|
|
13531
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...
|
|
13531
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunkXRFJ7TAF_js.getImageTilingStyle(element, nativeSize), ...style } });
|
|
13532
13532
|
}
|
|
13533
13533
|
function renderImageEffectDefinitions(element, excludeDuotone = false) {
|
|
13534
13534
|
return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13597,7 +13597,7 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13597
13597
|
...filter ? { filter } : {},
|
|
13598
13598
|
...opacity !== void 0 ? { opacity } : {}
|
|
13599
13599
|
};
|
|
13600
|
-
if (
|
|
13600
|
+
if (chunkXRFJ7TAF_js.isImageTiled(el)) {
|
|
13601
13601
|
const tileSrc = imgSrc(el);
|
|
13602
13602
|
if (!tileSrc) {
|
|
13603
13603
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-gray-500 bg-gray-100", children: "Image" });
|
|
@@ -13616,12 +13616,12 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13616
13616
|
] });
|
|
13617
13617
|
}
|
|
13618
13618
|
const colorWash = pptx.getImageColorWashStyle(
|
|
13619
|
-
(0,
|
|
13619
|
+
(0, chunkXRFJ7TAF_js.dist_exports.isImageLikeElement)(el) ? el.imageEffects?.colorWash : void 0
|
|
13620
13620
|
);
|
|
13621
13621
|
const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
|
|
13622
|
-
const duotoneColors =
|
|
13622
|
+
const duotoneColors = chunkXRFJ7TAF_js.getDuotoneColors(el);
|
|
13623
13623
|
const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
|
|
13624
|
-
const filterForImg = useDuotoneCanvas ?
|
|
13624
|
+
const filterForImg = useDuotoneCanvas ? chunkXRFJ7TAF_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
|
|
13625
13625
|
const canvasEffectStyles = {
|
|
13626
13626
|
...filterForImg ? { filter: filterForImg } : {},
|
|
13627
13627
|
...opacity !== void 0 ? { opacity } : {}
|
|
@@ -13697,10 +13697,10 @@ function SlideBackgroundImageLayer({
|
|
|
13697
13697
|
style: { zIndex: 0 },
|
|
13698
13698
|
children: renderImg(
|
|
13699
13699
|
backgroundElement,
|
|
13700
|
-
|
|
13701
|
-
|
|
13700
|
+
chunkXRFJ7TAF_js.getImageRenderStyle(backgroundElement),
|
|
13701
|
+
chunkXRFJ7TAF_js.getImageEffectsFilter(backgroundElement),
|
|
13702
13702
|
"",
|
|
13703
|
-
|
|
13703
|
+
chunkXRFJ7TAF_js.getImageEffectsOpacity(backgroundElement)
|
|
13704
13704
|
)
|
|
13705
13705
|
}
|
|
13706
13706
|
);
|
|
@@ -13971,7 +13971,7 @@ function ChartElementView({
|
|
|
13971
13971
|
pptx.getBarFacePicturePixelSampleVersion
|
|
13972
13972
|
);
|
|
13973
13973
|
const viewModel = React17.useMemo(() => {
|
|
13974
|
-
return canEdit ?
|
|
13974
|
+
return canEdit ? chunkXRFJ7TAF_js.buildReactChartViewModel(element) : null;
|
|
13975
13975
|
}, [canEdit, element, barFacePictureSampleVersion]);
|
|
13976
13976
|
React17.useEffect(pptx.ensureChartInteractionStyles, []);
|
|
13977
13977
|
React17.useEffect(() => {
|
|
@@ -14056,9 +14056,9 @@ function ChartElementView({
|
|
|
14056
14056
|
textStyle: animationState?.textStyle,
|
|
14057
14057
|
onSelect: chart3D.onSelect,
|
|
14058
14058
|
onDrag: chart3D.onDrag,
|
|
14059
|
-
children:
|
|
14059
|
+
children: chunkXRFJ7TAF_js.renderChartElement(renderedElement)
|
|
14060
14060
|
}
|
|
14061
|
-
) :
|
|
14061
|
+
) : chunkXRFJ7TAF_js.renderChartElement(renderedElement),
|
|
14062
14062
|
dragValue !== null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1 right-1 z-10 rounded bg-primary/90 px-1.5 py-0.5 text-[10px] font-medium text-white pointer-events-none", children: pptx.formatAxisValue(dragValue) }),
|
|
14063
14063
|
titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14064
14064
|
"input",
|
|
@@ -14388,7 +14388,7 @@ function ResizeHandles({
|
|
|
14388
14388
|
"aria-label": t("pptx.selectionOverlay.resize", { handle }),
|
|
14389
14389
|
"data-pptx-handle-kind": "resize",
|
|
14390
14390
|
"data-pptx-compact": true,
|
|
14391
|
-
className:
|
|
14391
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
14392
14392
|
"absolute z-10 group border-0 bg-transparent p-0",
|
|
14393
14393
|
RESIZE_DEFAULT_CLASSES,
|
|
14394
14394
|
posClass,
|
|
@@ -14414,7 +14414,7 @@ function ResizeHandles({
|
|
|
14414
14414
|
"div",
|
|
14415
14415
|
{
|
|
14416
14416
|
"data-pptx-handle-hit": true,
|
|
14417
|
-
className:
|
|
14417
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
14418
14418
|
"absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
|
|
14419
14419
|
corner ? "max-md:-inset-1.5 max-md:[--pptx-handle-hit-inset:-6px]" : "max-md:-inset-2 max-md:[--pptx-handle-hit-inset:-8px]"
|
|
14420
14420
|
),
|
|
@@ -14435,7 +14435,7 @@ function ResizeHandles({
|
|
|
14435
14435
|
"aria-label": t("pptx.selectionOverlay.rotate"),
|
|
14436
14436
|
"data-pptx-handle-kind": "rotate",
|
|
14437
14437
|
"data-pptx-compact": true,
|
|
14438
|
-
className:
|
|
14438
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
14439
14439
|
"absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 z-20 border-0 bg-transparent p-0 cursor-grab active:cursor-grabbing",
|
|
14440
14440
|
ROTATE_DEFAULT_CLASSES
|
|
14441
14441
|
),
|
|
@@ -14505,17 +14505,17 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14505
14505
|
animationState,
|
|
14506
14506
|
textStyleOverrideCss
|
|
14507
14507
|
}) {
|
|
14508
|
-
const shapeEl = (0,
|
|
14508
|
+
const shapeEl = (0, chunkXRFJ7TAF_js.dist_exports.hasShapeProperties)(el) ? el : void 0;
|
|
14509
14509
|
const viewWidth = Math.max(el.width, 0);
|
|
14510
14510
|
const viewHeight = Math.max(el.height, 0);
|
|
14511
14511
|
const svgWidth = Math.max(el.width, 1);
|
|
14512
14512
|
const svgHeight = Math.max(el.height, 1);
|
|
14513
14513
|
const ss = shapeEl?.shapeStyle;
|
|
14514
14514
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
14515
|
-
const strokeColor =
|
|
14516
|
-
const strokePaint =
|
|
14517
|
-
const dashType =
|
|
14518
|
-
const dashArray =
|
|
14515
|
+
const strokeColor = 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(
|
|
14519
14519
|
dashType,
|
|
14520
14520
|
Math.max(strokeWidth, 1),
|
|
14521
14521
|
ss?.customDashSegments
|
|
@@ -14526,14 +14526,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14526
14526
|
const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
14527
14527
|
const startMarkerId = `${markerSeed}-sel-start`;
|
|
14528
14528
|
const endMarkerId = `${markerSeed}-sel-end`;
|
|
14529
|
-
const compoundOffsets =
|
|
14530
|
-
const compoundWidths =
|
|
14529
|
+
const compoundOffsets = chunkXRFJ7TAF_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
14530
|
+
const compoundWidths = chunkXRFJ7TAF_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
14531
14531
|
const strokeCap = pptx.svgLineCap(ss?.lineCap);
|
|
14532
|
-
const textEl = (0,
|
|
14532
|
+
const textEl = (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(el) ? el : void 0;
|
|
14533
14533
|
const connectorText = textEl?.text?.trim() ?? "";
|
|
14534
14534
|
const connectorTextSegments = textEl?.textSegments;
|
|
14535
14535
|
const connectorTextStyle = textEl?.textStyle;
|
|
14536
|
-
const pathGeometry = shapeEl ?
|
|
14536
|
+
const pathGeometry = shapeEl ? chunkXRFJ7TAF_js.getConnectorPathGeometry(shapeEl) : {
|
|
14537
14537
|
pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
|
|
14538
14538
|
startX: 0,
|
|
14539
14539
|
startY: 0,
|
|
@@ -14542,16 +14542,16 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14542
14542
|
};
|
|
14543
14543
|
const hitTargetWidth = Math.max(strokeWidth * 3, 14);
|
|
14544
14544
|
const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
|
|
14545
|
-
const lineShadow =
|
|
14546
|
-
const lineGlow =
|
|
14545
|
+
const lineShadow = chunkXRFJ7TAF_js.buildLineShadowCss(el);
|
|
14546
|
+
const lineGlow = chunkXRFJ7TAF_js.buildLineGlowFilter(el);
|
|
14547
14547
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14548
14548
|
"div",
|
|
14549
14549
|
{
|
|
14550
14550
|
"data-pptx-element": "true",
|
|
14551
14551
|
"data-element-id": el.id,
|
|
14552
|
-
role:
|
|
14553
|
-
"aria-label":
|
|
14554
|
-
"aria-roledescription":
|
|
14552
|
+
role: chunkXRFJ7TAF_js.getAriaRole(el, { actionable: false }),
|
|
14553
|
+
"aria-label": chunkXRFJ7TAF_js.getAriaLabel(el),
|
|
14554
|
+
"aria-roledescription": chunkXRFJ7TAF_js.getAriaRoleDescription(el),
|
|
14555
14555
|
"aria-selected": isSelected ? true : void 0,
|
|
14556
14556
|
className: "absolute",
|
|
14557
14557
|
style: {
|
|
@@ -14584,14 +14584,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14584
14584
|
style: { overflow: "visible", pointerEvents: "none" },
|
|
14585
14585
|
children: [
|
|
14586
14586
|
/* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
|
|
14587
|
-
|
|
14587
|
+
chunkXRFJ7TAF_js.renderConnectorMarker(
|
|
14588
14588
|
startMarkerId,
|
|
14589
14589
|
startArrow,
|
|
14590
14590
|
strokePaint,
|
|
14591
14591
|
ss?.connectorStartArrowWidth,
|
|
14592
14592
|
ss?.connectorStartArrowLength
|
|
14593
14593
|
),
|
|
14594
|
-
|
|
14594
|
+
chunkXRFJ7TAF_js.renderConnectorMarker(
|
|
14595
14595
|
endMarkerId,
|
|
14596
14596
|
endArrow,
|
|
14597
14597
|
strokePaint,
|
|
@@ -14671,6 +14671,8 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14671
14671
|
filter: idx === 0 && lineShadow ? `url(#${markerSeed}-line-shadow)` : void 0,
|
|
14672
14672
|
style: {
|
|
14673
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)),
|
|
14674
14676
|
...offset !== 0 ? {
|
|
14675
14677
|
transform: `translate(0, ${offset}px)`
|
|
14676
14678
|
} : {}
|
|
@@ -14795,14 +14797,14 @@ function getElementInteractionProps({
|
|
|
14795
14797
|
};
|
|
14796
14798
|
}
|
|
14797
14799
|
function renderDagDuotoneFilterForElement(el) {
|
|
14798
|
-
if (!
|
|
14800
|
+
if (!chunkXRFJ7TAF_js.hasDagDuotoneEffect(el)) {
|
|
14799
14801
|
return null;
|
|
14800
14802
|
}
|
|
14801
14803
|
const duotone = el.shapeStyle?.dagDuotone;
|
|
14802
14804
|
if (!duotone) {
|
|
14803
14805
|
return null;
|
|
14804
14806
|
}
|
|
14805
|
-
return
|
|
14807
|
+
return chunkXRFJ7TAF_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
|
|
14806
14808
|
}
|
|
14807
14809
|
function getContainerStyle({
|
|
14808
14810
|
el,
|
|
@@ -14815,7 +14817,7 @@ function getContainerStyle({
|
|
|
14815
14817
|
has3DExtrusion,
|
|
14816
14818
|
templateEditing
|
|
14817
14819
|
}) {
|
|
14818
|
-
const ss = (0,
|
|
14820
|
+
const ss = (0, chunkXRFJ7TAF_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
|
|
14819
14821
|
const isPicture = el.type === "picture" || el.type === "image";
|
|
14820
14822
|
const blurGrowVisible = Boolean(
|
|
14821
14823
|
ss?.blurGrow && typeof ss.blurRadius === "number" && ss.blurRadius > 0
|
|
@@ -14829,10 +14831,10 @@ function getContainerStyle({
|
|
|
14829
14831
|
top: isFullscreenMedia ? fs.top : el.y,
|
|
14830
14832
|
width: isFullscreenMedia ? fs.width : painted.width,
|
|
14831
14833
|
...heightStyle,
|
|
14832
|
-
transform: isFullscreenMedia ? fs.transform :
|
|
14834
|
+
transform: isFullscreenMedia ? fs.transform : chunkXRFJ7TAF_js.getElementTransform(el),
|
|
14833
14835
|
transformOrigin: "center",
|
|
14834
14836
|
overflow: overflowValue,
|
|
14835
|
-
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ?
|
|
14837
|
+
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunkXRFJ7TAF_js.getCropShapeClipPath(el) : void 0,
|
|
14836
14838
|
zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
|
|
14837
14839
|
visibility: animationState?.visible === false ? "hidden" : "visible",
|
|
14838
14840
|
animation: animationState?.cssAnimation,
|
|
@@ -14864,11 +14866,11 @@ function getContainerStyle({
|
|
|
14864
14866
|
};
|
|
14865
14867
|
}
|
|
14866
14868
|
function shapeParams(element) {
|
|
14867
|
-
const style = (0,
|
|
14869
|
+
const style = (0, chunkXRFJ7TAF_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
|
|
14868
14870
|
const strokeWidth = pptx.paintedStrokeWidth(style);
|
|
14869
|
-
const strokeColor =
|
|
14870
|
-
const fillColor =
|
|
14871
|
-
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);
|
|
14872
14874
|
return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
|
|
14873
14875
|
}
|
|
14874
14876
|
var Extrusion3DOverlay = React17__default.default.memo(
|
|
@@ -14973,7 +14975,7 @@ function ShapeEffectOverlay({
|
|
|
14973
14975
|
const fillOverlayStyle = overlay ? {
|
|
14974
14976
|
position: "absolute",
|
|
14975
14977
|
inset: 0,
|
|
14976
|
-
...(0,
|
|
14978
|
+
...(0, chunkXRFJ7TAF_js.dist_exports.isImageLikeElement)(element) ? chunkXRFJ7TAF_js.getImageSurfaceMaskStyle(element) : {},
|
|
14977
14979
|
background: overlay.color,
|
|
14978
14980
|
mixBlendMode: overlay.blendMode,
|
|
14979
14981
|
pointerEvents: "none"
|
|
@@ -15063,7 +15065,11 @@ function ShapeEffectOverlay({
|
|
|
15063
15065
|
strokeDasharray: strokeOutline.dashArray,
|
|
15064
15066
|
strokeLinecap: strokeOutline.lineCap,
|
|
15065
15067
|
strokeLinejoin: strokeOutline.lineJoin,
|
|
15066
|
-
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
|
+
}
|
|
15067
15073
|
},
|
|
15068
15074
|
idx
|
|
15069
15075
|
))
|
|
@@ -15172,10 +15178,10 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15172
15178
|
const allow = pptx.resolveElementInteractivity(el);
|
|
15173
15179
|
const backgroundAnimationState = presentationElementStates?.get(`${el.id}::pptx-bg`);
|
|
15174
15180
|
const visualAnimationState = backgroundAnimationState ?? animationState;
|
|
15175
|
-
const isTxt =
|
|
15176
|
-
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;
|
|
15177
15183
|
const textStyleOverrideCss = pptx.buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
|
|
15178
|
-
const ss =
|
|
15184
|
+
const ss = chunkXRFJ7TAF_js.getShapeVisualStyle(
|
|
15179
15185
|
el,
|
|
15180
15186
|
hf,
|
|
15181
15187
|
fc,
|
|
@@ -15184,9 +15190,9 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15184
15190
|
visualAnimationState?.animatesFill,
|
|
15185
15191
|
visualAnimationState?.animatesStroke
|
|
15186
15192
|
);
|
|
15187
|
-
const ts =
|
|
15193
|
+
const ts = chunkXRFJ7TAF_js.getTextStyleForElement(el, chunkXRFJ7TAF_js.DEFAULT_TEXT_COLOR);
|
|
15188
15194
|
const isImg = el.type === "picture" || el.type === "image";
|
|
15189
|
-
const vs =
|
|
15195
|
+
const vs = chunkXRFJ7TAF_js.renderVectorShape(
|
|
15190
15196
|
el,
|
|
15191
15197
|
isImg ? false : hf,
|
|
15192
15198
|
fc,
|
|
@@ -15196,10 +15202,10 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15196
15202
|
visualAnimationState?.animatesStroke
|
|
15197
15203
|
);
|
|
15198
15204
|
const isModel3D = el.type === "model3d";
|
|
15199
|
-
const isConn =
|
|
15200
|
-
const shapeStyle3d = (0,
|
|
15205
|
+
const isConn = chunkXRFJ7TAF_js.isConnectorOrLineElement(el);
|
|
15206
|
+
const shapeStyle3d = (0, chunkXRFJ7TAF_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
|
|
15201
15207
|
const extrusionData = React17.useMemo(
|
|
15202
|
-
() =>
|
|
15208
|
+
() => chunkXRFJ7TAF_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
|
|
15203
15209
|
[shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
|
|
15204
15210
|
);
|
|
15205
15211
|
const actionAffordance = useActionAffordance(el, canInteract);
|
|
@@ -15288,7 +15294,7 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15288
15294
|
"aria-hidden": aria.hidden ? true : void 0,
|
|
15289
15295
|
"aria-selected": isSelected ? true : void 0,
|
|
15290
15296
|
tabIndex: isFocusable ? 0 : -1,
|
|
15291
|
-
className:
|
|
15297
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
15292
15298
|
"absolute",
|
|
15293
15299
|
"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
|
|
15294
15300
|
cur,
|
|
@@ -15376,9 +15382,9 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15376
15382
|
txtSE,
|
|
15377
15383
|
txtS: ts,
|
|
15378
15384
|
vecShape: backgroundAnimationState && !isImg ? null : vs,
|
|
15379
|
-
imgStyle:
|
|
15380
|
-
imgFilter:
|
|
15381
|
-
imgOpacity:
|
|
15385
|
+
imgStyle: chunkXRFJ7TAF_js.getImageRenderStyle(el),
|
|
15386
|
+
imgFilter: chunkXRFJ7TAF_js.getImageEffectsFilter(el),
|
|
15387
|
+
imgOpacity: chunkXRFJ7TAF_js.getImageEffectsOpacity(el),
|
|
15382
15388
|
imgAlt: imageAltText,
|
|
15383
15389
|
isTxtEl: isTxt,
|
|
15384
15390
|
media: mediaDataUrls,
|
|
@@ -15500,10 +15506,10 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
|
|
|
15500
15506
|
}
|
|
15501
15507
|
function renderInk(el, options) {
|
|
15502
15508
|
const replay = options?.replay ?? false;
|
|
15503
|
-
const strokes =
|
|
15509
|
+
const strokes = chunkXRFJ7TAF_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
|
|
15504
15510
|
strokes.some((s) => s.circles || s.nibMarks);
|
|
15505
15511
|
const pressureSensitive = options?.pressureSensitive;
|
|
15506
|
-
const replayStyles = replay ?
|
|
15512
|
+
const replayStyles = replay ? chunkXRFJ7TAF_js.getInkReplayStyles(el, options?.replayConfig) : null;
|
|
15507
15513
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15508
15514
|
"svg",
|
|
15509
15515
|
{
|
|
@@ -15511,7 +15517,7 @@ function renderInk(el, options) {
|
|
|
15511
15517
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
15512
15518
|
preserveAspectRatio: "none",
|
|
15513
15519
|
children: [
|
|
15514
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
15520
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkXRFJ7TAF_js.INK_REPLAY_KEYFRAMES }),
|
|
15515
15521
|
strokes.map(
|
|
15516
15522
|
(s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
|
|
15517
15523
|
)
|
|
@@ -15522,7 +15528,7 @@ function renderInk(el, options) {
|
|
|
15522
15528
|
function renderGroup(children, parentGroupFill) {
|
|
15523
15529
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: pptx.filterRenderedElements(children).map((c, childIndex) => {
|
|
15524
15530
|
const { hf, fc, sw, sc } = shapeParams(c);
|
|
15525
|
-
const baseSs =
|
|
15531
|
+
const baseSs = chunkXRFJ7TAF_js.getShapeVisualStyle(c, hf, fc, sw, sc);
|
|
15526
15532
|
const inheritedFill = pptx.resolveGroupChildFill(c, parentGroupFill);
|
|
15527
15533
|
const ss = inheritedFill ? {
|
|
15528
15534
|
...baseSs,
|
|
@@ -15533,9 +15539,9 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15533
15539
|
backgroundPosition: inheritedFill.backgroundPosition
|
|
15534
15540
|
} : baseSs;
|
|
15535
15541
|
const isI = c.type === "picture" || c.type === "image";
|
|
15536
|
-
const vs =
|
|
15537
|
-
const ts =
|
|
15538
|
-
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);
|
|
15539
15545
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15540
15546
|
"div",
|
|
15541
15547
|
{
|
|
@@ -15544,9 +15550,9 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15544
15550
|
style: {
|
|
15545
15551
|
left: c.x,
|
|
15546
15552
|
top: c.y,
|
|
15547
|
-
width: Math.max(c.width,
|
|
15548
|
-
height: Math.max(c.height,
|
|
15549
|
-
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),
|
|
15550
15556
|
transformOrigin: "center",
|
|
15551
15557
|
...ss,
|
|
15552
15558
|
...isI ? {
|
|
@@ -15571,8 +15577,8 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15571
15577
|
// A nested group: recurse, chaining the inherited fill so a
|
|
15572
15578
|
// `grpFill` shape under a fill-less sub-group still paints.
|
|
15573
15579
|
renderGroup(c.children, pptx.getGroupChildParentFill(c, parentGroupFill))
|
|
15574
|
-
) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style:
|
|
15575
|
-
|
|
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(
|
|
15576
15582
|
TiledImageLayer,
|
|
15577
15583
|
{
|
|
15578
15584
|
element: c,
|
|
@@ -15585,7 +15591,7 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15585
15591
|
src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
|
|
15586
15592
|
alt: i18n.translationsEn["pptx.ink.groupChildAlt"],
|
|
15587
15593
|
className: "pointer-events-none select-none",
|
|
15588
|
-
style:
|
|
15594
|
+
style: chunkXRFJ7TAF_js.getImageRenderStyle(c),
|
|
15589
15595
|
draggable: false
|
|
15590
15596
|
}
|
|
15591
15597
|
),
|
|
@@ -15597,7 +15603,7 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15597
15603
|
{
|
|
15598
15604
|
className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
|
|
15599
15605
|
style: ts,
|
|
15600
|
-
children:
|
|
15606
|
+
children: chunkXRFJ7TAF_js.renderTextSegments(c, chunkXRFJ7TAF_js.DEFAULT_TEXT_COLOR)
|
|
15601
15607
|
}
|
|
15602
15608
|
) : null
|
|
15603
15609
|
] })
|
|
@@ -15611,8 +15617,8 @@ function renderContentPart(el, options) {
|
|
|
15611
15617
|
if (el.inkStrokes && el.inkStrokes.length > 0) {
|
|
15612
15618
|
const replay = options?.replay ?? false;
|
|
15613
15619
|
const pressureSensitive = options?.pressureSensitive ?? true;
|
|
15614
|
-
const strokes =
|
|
15615
|
-
const replayStyles = replay ?
|
|
15620
|
+
const strokes = chunkXRFJ7TAF_js.buildContentPartStrokes(el);
|
|
15621
|
+
const replayStyles = replay ? chunkXRFJ7TAF_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
|
|
15616
15622
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15617
15623
|
"svg",
|
|
15618
15624
|
{
|
|
@@ -15620,7 +15626,7 @@ function renderContentPart(el, options) {
|
|
|
15620
15626
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
15621
15627
|
preserveAspectRatio: "none",
|
|
15622
15628
|
children: [
|
|
15623
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
15629
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkXRFJ7TAF_js.INK_REPLAY_KEYFRAMES }),
|
|
15624
15630
|
strokes.map(
|
|
15625
15631
|
(s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
|
|
15626
15632
|
)
|
|
@@ -15847,9 +15853,9 @@ function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
|
|
|
15847
15853
|
collaboration: connected,
|
|
15848
15854
|
model: pptx.createInlineListModelObserver(element),
|
|
15849
15855
|
activationSelection,
|
|
15850
|
-
children: seed && !connected ?
|
|
15856
|
+
children: seed && !connected ? chunkXRFJ7TAF_js.renderTextSegments(
|
|
15851
15857
|
element,
|
|
15852
|
-
|
|
15858
|
+
chunkXRFJ7TAF_js.DEFAULT_TEXT_COLOR,
|
|
15853
15859
|
void 0,
|
|
15854
15860
|
void 0,
|
|
15855
15861
|
void 0,
|
|
@@ -16019,7 +16025,7 @@ function InlineTextEditor({
|
|
|
16019
16025
|
seedRef.current = {
|
|
16020
16026
|
initialText,
|
|
16021
16027
|
hasRichSegments: Boolean(
|
|
16022
|
-
(0,
|
|
16028
|
+
(0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(element) && element.textSegments && element.textSegments.length > 0
|
|
16023
16029
|
)
|
|
16024
16030
|
};
|
|
16025
16031
|
}
|
|
@@ -16085,8 +16091,8 @@ function InlineTextEditor({
|
|
|
16085
16091
|
pending.endOffset
|
|
16086
16092
|
);
|
|
16087
16093
|
});
|
|
16088
|
-
const warpStyle =
|
|
16089
|
-
const compensationTransform =
|
|
16094
|
+
const warpStyle = chunkXRFJ7TAF_js.getTextWarpStyle(textStyleRaw);
|
|
16095
|
+
const compensationTransform = chunkXRFJ7TAF_js.getTextCompensationTransform(element);
|
|
16090
16096
|
const warpTransform = warpStyle?.transform;
|
|
16091
16097
|
const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
|
|
16092
16098
|
const wrapperStyle = {
|
|
@@ -16097,7 +16103,7 @@ function InlineTextEditor({
|
|
|
16097
16103
|
transformOrigin: warpStyle?.transformOrigin || "center"
|
|
16098
16104
|
};
|
|
16099
16105
|
const nextInlineStyleValue = (property) => {
|
|
16100
|
-
if (!(0,
|
|
16106
|
+
if (!(0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(element)) {
|
|
16101
16107
|
return true;
|
|
16102
16108
|
}
|
|
16103
16109
|
const result = pptx.getInlineEditorSelectionResult(element.textSegments);
|
|
@@ -16173,7 +16179,7 @@ function InlineTextEditor({
|
|
|
16173
16179
|
const text = e.clipboardData.getData("text/plain");
|
|
16174
16180
|
document.execCommand("insertText", false, text);
|
|
16175
16181
|
},
|
|
16176
|
-
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
|
|
16177
16183
|
},
|
|
16178
16184
|
list.seed?.paragraphs[0].token ?? "plain"
|
|
16179
16185
|
);
|
|
@@ -17110,7 +17116,7 @@ function SmartArtRendererImpl({
|
|
|
17110
17116
|
if (!onUpdateElement || !pptx.shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
|
|
17111
17117
|
return;
|
|
17112
17118
|
}
|
|
17113
|
-
const updated = (0,
|
|
17119
|
+
const updated = (0, chunkXRFJ7TAF_js.dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text);
|
|
17114
17120
|
const box = { width: element.width, height: element.height };
|
|
17115
17121
|
const reflowed = pptx.rebuildDrawingShapesIfCleared(
|
|
17116
17122
|
updated,
|
|
@@ -17126,7 +17132,7 @@ function SmartArtRendererImpl({
|
|
|
17126
17132
|
if (!onUpdateElement) {
|
|
17127
17133
|
return;
|
|
17128
17134
|
}
|
|
17129
|
-
const next = (0,
|
|
17135
|
+
const next = (0, chunkXRFJ7TAF_js.dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, { fillColor: fill });
|
|
17130
17136
|
if (next !== smartArtData) {
|
|
17131
17137
|
const box = { width: element.width, height: element.height };
|
|
17132
17138
|
const reflowed = pptx.rebuildDrawingShapesIfCleared(
|
|
@@ -17320,7 +17326,7 @@ function groupIntoParagraphs(element, fieldContext) {
|
|
|
17320
17326
|
element,
|
|
17321
17327
|
fieldContext ? (seg) => {
|
|
17322
17328
|
if (seg.fieldType) {
|
|
17323
|
-
const substituted =
|
|
17329
|
+
const substituted = chunkXRFJ7TAF_js.substituteFieldText(
|
|
17324
17330
|
seg.text,
|
|
17325
17331
|
seg.fieldType,
|
|
17326
17332
|
fieldContext,
|
|
@@ -17355,13 +17361,13 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
|
|
|
17355
17361
|
if (s.strikethrough) {
|
|
17356
17362
|
decos.push("line-through");
|
|
17357
17363
|
}
|
|
17358
|
-
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);
|
|
17359
17365
|
return {
|
|
17360
17366
|
fill,
|
|
17361
|
-
fontSize: s.fontSize ?? element.textStyle?.fontSize ??
|
|
17367
|
+
fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunkXRFJ7TAF_js.DEFAULT_TEXT_FONT_SIZE,
|
|
17362
17368
|
fontWeight: s.bold ? 700 : 400,
|
|
17363
17369
|
fontStyle: s.italic ? "italic" : void 0,
|
|
17364
|
-
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,
|
|
17365
17371
|
textDecoration: decos.length > 0 ? decos.join(" ") : void 0
|
|
17366
17372
|
};
|
|
17367
17373
|
}
|
|
@@ -17369,8 +17375,8 @@ function resolveSegmentFont(segment, element) {
|
|
|
17369
17375
|
const s = segment.style || {};
|
|
17370
17376
|
const family = s.fontFamily || element.textStyle?.fontFamily;
|
|
17371
17377
|
return {
|
|
17372
|
-
fontFamily: family ? (0,
|
|
17373
|
-
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,
|
|
17374
17380
|
bold: s.bold ?? element.textStyle?.bold,
|
|
17375
17381
|
italic: s.italic ?? element.textStyle?.italic
|
|
17376
17382
|
};
|
|
@@ -17436,7 +17442,7 @@ function WarpedText({
|
|
|
17436
17442
|
fallbackColor,
|
|
17437
17443
|
fieldContext
|
|
17438
17444
|
}) {
|
|
17439
|
-
if (!(0,
|
|
17445
|
+
if (!(0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(element)) {
|
|
17440
17446
|
return null;
|
|
17441
17447
|
}
|
|
17442
17448
|
const textEl = element;
|
|
@@ -17454,9 +17460,9 @@ function WarpedText({
|
|
|
17454
17460
|
const warpAdj2 = textEl.textStyle?.textWarpAdj2;
|
|
17455
17461
|
const align = textEl.textStyle?.align ?? "center";
|
|
17456
17462
|
const { startOffset, textAnchor } = getAlignmentProps(align);
|
|
17457
|
-
const baseFontSize = textEl.textStyle?.fontSize ??
|
|
17458
|
-
const baseFontFamily = textEl.textStyle?.fontFamily ? (0,
|
|
17459
|
-
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);
|
|
17460
17466
|
if (pptx.hasGlyphEnvelope(preset)) {
|
|
17461
17467
|
const perLine = pptx.buildGlyphEnvelopeBlock(
|
|
17462
17468
|
preset,
|
|
@@ -17556,7 +17562,7 @@ function WarpedText({
|
|
|
17556
17562
|
);
|
|
17557
17563
|
}
|
|
17558
17564
|
var GLYPH_BY_SHAPE = Object.fromEntries(
|
|
17559
|
-
|
|
17565
|
+
chunkXRFJ7TAF_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
|
|
17560
17566
|
);
|
|
17561
17567
|
GLYPH_BY_SHAPE["actionButtonForwardOrNext"] = GLYPH_BY_SHAPE["actionButtonForwardNext"];
|
|
17562
17568
|
GLYPH_BY_SHAPE["actionButtonBackOrPrevious"] = GLYPH_BY_SHAPE["actionButtonBackPrevious"];
|
|
@@ -17626,11 +17632,11 @@ function renderTextElementBody(options) {
|
|
|
17626
17632
|
const isLinkedTextBox = pptx.isLinkedTextBox(el);
|
|
17627
17633
|
const linkedSegments = pptx.getOverflowSegments(el, slideElements);
|
|
17628
17634
|
const useSvgWarp = pptx.shouldUseSvgWarp(
|
|
17629
|
-
(0,
|
|
17635
|
+
(0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(el) ? el.textStyle?.textWarpPreset : void 0
|
|
17630
17636
|
);
|
|
17631
|
-
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;
|
|
17632
17638
|
const rotationTransform = pptx.getTextBodyRotationTransform(el);
|
|
17633
|
-
const composedTransform = [rotationTransform,
|
|
17639
|
+
const composedTransform = [rotationTransform, chunkXRFJ7TAF_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
|
|
17634
17640
|
const transformStyle = {
|
|
17635
17641
|
transform: composedTransform,
|
|
17636
17642
|
// A COM-measured homography (`scene3dStyle.transformOrigin === '0 0'`)
|
|
@@ -17660,18 +17666,18 @@ function renderTextElementBody(options) {
|
|
|
17660
17666
|
shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
17661
17667
|
"div",
|
|
17662
17668
|
{
|
|
17663
|
-
className:
|
|
17669
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
17664
17670
|
"relative z-10 w-full h-full",
|
|
17665
17671
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
17666
17672
|
),
|
|
17667
|
-
style: { ...
|
|
17673
|
+
style: { ...chunkXRFJ7TAF_js.getTextLayoutStyle(el), ...transformStyle },
|
|
17668
17674
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17669
17675
|
WarpedText,
|
|
17670
17676
|
{
|
|
17671
17677
|
element: el,
|
|
17672
17678
|
width: el.width,
|
|
17673
17679
|
height: el.height,
|
|
17674
|
-
fallbackColor:
|
|
17680
|
+
fallbackColor: chunkXRFJ7TAF_js.DEFAULT_TEXT_COLOR,
|
|
17675
17681
|
findHighlights: findHl,
|
|
17676
17682
|
fieldContext
|
|
17677
17683
|
}
|
|
@@ -17680,19 +17686,19 @@ function renderTextElementBody(options) {
|
|
|
17680
17686
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
17681
17687
|
"div",
|
|
17682
17688
|
{
|
|
17683
|
-
className:
|
|
17689
|
+
className: chunkXRFJ7TAF_js.cn(
|
|
17684
17690
|
"relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
|
|
17685
17691
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
17686
17692
|
),
|
|
17687
17693
|
style: {
|
|
17688
|
-
...
|
|
17694
|
+
...chunkXRFJ7TAF_js.getTextLayoutStyle(el),
|
|
17689
17695
|
...txtS,
|
|
17690
|
-
...
|
|
17696
|
+
...chunkXRFJ7TAF_js.getTextWarpStyle(txtSE),
|
|
17691
17697
|
...transformStyle
|
|
17692
17698
|
},
|
|
17693
|
-
children:
|
|
17699
|
+
children: chunkXRFJ7TAF_js.renderTextSegments(
|
|
17694
17700
|
el,
|
|
17695
|
-
|
|
17701
|
+
chunkXRFJ7TAF_js.DEFAULT_TEXT_COLOR,
|
|
17696
17702
|
void 0,
|
|
17697
17703
|
findHl,
|
|
17698
17704
|
onHyperlinkClick,
|
|
@@ -18010,7 +18016,7 @@ function renderBody(options) {
|
|
|
18010
18016
|
);
|
|
18011
18017
|
}
|
|
18012
18018
|
if (isImg) {
|
|
18013
|
-
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: [
|
|
18014
18020
|
renderImg(el, imgStyle, imgFilter, imgAlt, imgOpacity),
|
|
18015
18021
|
vecShape ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", children: vecShape }) : null
|
|
18016
18022
|
] });
|
|
@@ -18027,7 +18033,7 @@ function renderBody(options) {
|
|
|
18027
18033
|
textDirection: txtSE?.textDirection,
|
|
18028
18034
|
textStyle: txtS,
|
|
18029
18035
|
textStyleRaw: txtSE,
|
|
18030
|
-
layoutStyle:
|
|
18036
|
+
layoutStyle: chunkXRFJ7TAF_js.getTextLayoutStyle(el),
|
|
18031
18037
|
element: el,
|
|
18032
18038
|
onCommit,
|
|
18033
18039
|
onCancel,
|
|
@@ -18038,7 +18044,7 @@ function renderBody(options) {
|
|
|
18038
18044
|
] });
|
|
18039
18045
|
}
|
|
18040
18046
|
if (el.type === "table") {
|
|
18041
|
-
return
|
|
18047
|
+
return chunkXRFJ7TAF_js.renderTableElement(el, txtS, {
|
|
18042
18048
|
editable: isSel,
|
|
18043
18049
|
selectedCell: isSel ? tableSt : null,
|
|
18044
18050
|
onSelectCell: onCellSel,
|
|
@@ -18071,7 +18077,7 @@ function renderBody(options) {
|
|
|
18071
18077
|
);
|
|
18072
18078
|
}
|
|
18073
18079
|
if (el.type === "media") {
|
|
18074
|
-
return
|
|
18080
|
+
return chunkXRFJ7TAF_js.renderMediaElement(el, media, {
|
|
18075
18081
|
// Present mode autoplays every media element on the active slide,
|
|
18076
18082
|
// not only ones persisted with their own `autoPlay` flag (matching
|
|
18077
18083
|
// the other four bindings' unconditional `presenting`-gated
|
|
@@ -18094,7 +18100,7 @@ function renderBody(options) {
|
|
|
18094
18100
|
onPlayStateChange: handleMediaPlayStateChange
|
|
18095
18101
|
});
|
|
18096
18102
|
}
|
|
18097
|
-
if (doInk && (0,
|
|
18103
|
+
if (doInk && (0, chunkXRFJ7TAF_js.dist_exports.isInkElement)(el)) {
|
|
18098
18104
|
return renderInk(el, {
|
|
18099
18105
|
replay: isPresentationPassive,
|
|
18100
18106
|
pressureSensitive: true
|
|
@@ -18123,27 +18129,27 @@ function renderBody(options) {
|
|
|
18123
18129
|
}
|
|
18124
18130
|
return renderGroup(el.children, pptx.getGroupChildParentFill(el));
|
|
18125
18131
|
}
|
|
18126
|
-
if (
|
|
18127
|
-
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) });
|
|
18128
18134
|
}
|
|
18129
18135
|
return renderTextElementBody(options);
|
|
18130
18136
|
}
|
|
18131
18137
|
function defaultTextColorForFill(fillColor) {
|
|
18132
18138
|
const hex = String(fillColor ?? "").replace(/^#/u, "");
|
|
18133
18139
|
if (!/^[0-9a-f]{6}$/iu.test(hex)) {
|
|
18134
|
-
return
|
|
18140
|
+
return chunkXRFJ7TAF_js.DEFAULT_TEXT_COLOR;
|
|
18135
18141
|
}
|
|
18136
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);
|
|
18137
18143
|
const luminance = channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
|
|
18138
|
-
return luminance > 0.179 ?
|
|
18144
|
+
return luminance > 0.179 ? chunkXRFJ7TAF_js.DEFAULT_TEXT_COLOR : "#ffffff";
|
|
18139
18145
|
}
|
|
18140
18146
|
function getStaticElementVisualState(element, parentGroupFill) {
|
|
18141
|
-
const style = (0,
|
|
18142
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
18143
|
-
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);
|
|
18144
18150
|
const strokeWidth = pptx.paintedStrokeWidth(style);
|
|
18145
|
-
const stroke =
|
|
18146
|
-
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);
|
|
18147
18153
|
const inheritedFill = pptx.resolveGroupChildFill(element, parentGroupFill);
|
|
18148
18154
|
const visualStyle = inheritedFill ? {
|
|
18149
18155
|
...baseVisualStyle,
|
|
@@ -18153,13 +18159,13 @@ function getStaticElementVisualState(element, parentGroupFill) {
|
|
|
18153
18159
|
backgroundSize: inheritedFill.backgroundSize,
|
|
18154
18160
|
backgroundPosition: inheritedFill.backgroundPosition
|
|
18155
18161
|
} : baseVisualStyle;
|
|
18156
|
-
const textStyle =
|
|
18162
|
+
const textStyle = chunkXRFJ7TAF_js.getTextStyleForElement(
|
|
18157
18163
|
element,
|
|
18158
|
-
element.type === "shape" && hasFill ? defaultTextColorForFill(fill) :
|
|
18164
|
+
element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunkXRFJ7TAF_js.DEFAULT_TEXT_COLOR
|
|
18159
18165
|
);
|
|
18160
18166
|
const isImage = element.type === "picture" || element.type === "image";
|
|
18161
|
-
const letsTextOverflow = (0,
|
|
18162
|
-
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;
|
|
18163
18169
|
const isCallout = pptx.isWedgeCalloutPresetShape(shapeType) || String(shapeType ?? "").toLowerCase().includes("callout");
|
|
18164
18170
|
return {
|
|
18165
18171
|
hasFill,
|
|
@@ -18180,7 +18186,7 @@ function getStaticElementInteractionState(element, hasActionHandler, exposeEleme
|
|
|
18180
18186
|
return { action, isActionable, contractRole };
|
|
18181
18187
|
}
|
|
18182
18188
|
function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
|
|
18183
|
-
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";
|
|
18184
18190
|
const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
|
|
18185
18191
|
return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
|
|
18186
18192
|
}
|
|
@@ -18263,7 +18269,7 @@ function StaticElementRendererImpl({
|
|
|
18263
18269
|
top: positioned ? element.y : void 0,
|
|
18264
18270
|
width: positioned ? Math.max(element.width, 1) : "100%",
|
|
18265
18271
|
height: positioned ? Math.max(element.height, 1) : "100%",
|
|
18266
|
-
transform: positioned ?
|
|
18272
|
+
transform: positioned ? chunkXRFJ7TAF_js.getElementTransform(element) : void 0,
|
|
18267
18273
|
transformOrigin: "center",
|
|
18268
18274
|
zIndex,
|
|
18269
18275
|
...visualStyle,
|
|
@@ -18304,20 +18310,20 @@ function StaticElementRendererImpl({
|
|
|
18304
18310
|
isEditing: false,
|
|
18305
18311
|
editText: "",
|
|
18306
18312
|
spellCheck: false,
|
|
18307
|
-
txtSE: (0,
|
|
18313
|
+
txtSE: (0, chunkXRFJ7TAF_js.dist_exports.hasTextProperties)(element) ? element.textStyle : void 0,
|
|
18308
18314
|
txtS: textStyle,
|
|
18309
|
-
vecShape:
|
|
18315
|
+
vecShape: chunkXRFJ7TAF_js.renderVectorShape(
|
|
18310
18316
|
element,
|
|
18311
18317
|
isImage ? false : hasFill,
|
|
18312
18318
|
fill,
|
|
18313
18319
|
strokeWidth,
|
|
18314
18320
|
stroke
|
|
18315
18321
|
),
|
|
18316
|
-
imgStyle: imageAnimation ? { ...
|
|
18317
|
-
imgFilter:
|
|
18318
|
-
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),
|
|
18319
18325
|
imgAlt: "",
|
|
18320
|
-
isTxtEl:
|
|
18326
|
+
isTxtEl: chunkXRFJ7TAF_js.isEditableTextElement(element),
|
|
18321
18327
|
media: mediaDataUrls,
|
|
18322
18328
|
tableSt: null,
|
|
18323
18329
|
isSel: false,
|
|
@@ -18362,7 +18368,7 @@ function SlideLayer({
|
|
|
18362
18368
|
style: {
|
|
18363
18369
|
width: safeWidth,
|
|
18364
18370
|
height: safeHeight,
|
|
18365
|
-
backgroundColor: slide.backgroundColor ?
|
|
18371
|
+
backgroundColor: slide.backgroundColor ? chunkXRFJ7TAF_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
|
|
18366
18372
|
backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
|
|
18367
18373
|
backgroundSize: slide.backgroundImage ? "cover" : void 0,
|
|
18368
18374
|
backgroundPosition: slide.backgroundImage ? "center" : void 0
|
|
@@ -18423,7 +18429,8 @@ function FragmentedTransitionLayer({
|
|
|
18423
18429
|
height: canvasSize.height,
|
|
18424
18430
|
flexShrink: 0,
|
|
18425
18431
|
transform: `scale(${scale})`,
|
|
18426
|
-
transformOrigin: "center"
|
|
18432
|
+
transformOrigin: "center",
|
|
18433
|
+
...pptx.deviceStrokeStageStyle(scale)
|
|
18427
18434
|
},
|
|
18428
18435
|
children: /* @__PURE__ */ jsxRuntime.jsx(SlideLayer, { slide, templateElements, canvasSize })
|
|
18429
18436
|
}
|
|
@@ -18469,6 +18476,7 @@ function MorphTransitionOverlay({
|
|
|
18469
18476
|
flexShrink: 0,
|
|
18470
18477
|
transform: `scale(${scale})`,
|
|
18471
18478
|
transformOrigin: "center",
|
|
18479
|
+
...pptx.deviceStrokeStageStyle(scale),
|
|
18472
18480
|
position: "relative"
|
|
18473
18481
|
},
|
|
18474
18482
|
children: [
|
|
@@ -18685,7 +18693,8 @@ function PresentationTransitionOverlay({
|
|
|
18685
18693
|
height: canvasSize.height,
|
|
18686
18694
|
flexShrink: 0,
|
|
18687
18695
|
transform: `scale(${scale})`,
|
|
18688
|
-
transformOrigin: "center"
|
|
18696
|
+
transformOrigin: "center",
|
|
18697
|
+
...pptx.deviceStrokeStageStyle(scale)
|
|
18689
18698
|
},
|
|
18690
18699
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18691
18700
|
SlideLayer,
|
|
@@ -18730,7 +18739,8 @@ function PresentationTransitionOverlay({
|
|
|
18730
18739
|
// than the deck's canvas.
|
|
18731
18740
|
flexShrink: 0,
|
|
18732
18741
|
transform: `scale(${scale})`,
|
|
18733
|
-
transformOrigin: "center"
|
|
18742
|
+
transformOrigin: "center",
|
|
18743
|
+
...pptx.deviceStrokeStageStyle(scale)
|
|
18734
18744
|
},
|
|
18735
18745
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
18736
18746
|
SlideLayer,
|