pptx-react-viewer 4.27.0 → 4.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/README.md +3 -0
- package/dist/{AiChatPanel-3J6XGIJ4.mjs → AiChatPanel-6EIOUV7J.mjs} +2 -2
- package/dist/AiChatPanel-6EIOUV7J.mjs.br +0 -0
- package/dist/AiChatPanel-6EIOUV7J.mjs.gz +0 -0
- package/dist/{AiChatPanel-EGTSK4T5.js → AiChatPanel-AK6X4NJD.js} +10 -10
- package/dist/AiChatPanel-AK6X4NJD.js.br +0 -0
- package/dist/AiChatPanel-AK6X4NJD.js.gz +0 -0
- package/dist/{Model3DScene-2V2GQ6FY.mjs → Model3DScene-EZDCI7TT.mjs} +1 -1
- package/dist/Model3DScene-EZDCI7TT.mjs.br +0 -0
- package/dist/Model3DScene-EZDCI7TT.mjs.gz +0 -0
- package/dist/{Model3DScene-Q3XEZSWV.js → Model3DScene-KYIYYLMY.js} +1 -1
- package/dist/Model3DScene-KYIYYLMY.js.br +0 -0
- package/dist/Model3DScene-KYIYYLMY.js.gz +0 -0
- package/dist/{chunk-ZK7UEEXE.mjs → chunk-6YOFWVII.mjs} +83 -80
- package/dist/chunk-6YOFWVII.mjs.br +0 -0
- package/dist/chunk-6YOFWVII.mjs.gz +0 -0
- package/dist/{chunk-5RQTZ376.js → chunk-7JMO6R6B.js} +394 -391
- package/dist/chunk-7JMO6R6B.js.br +0 -0
- package/dist/chunk-7JMO6R6B.js.gz +0 -0
- package/dist/chunk-CTL42ZRR.js +4238 -0
- package/dist/chunk-CTL42ZRR.js.br +0 -0
- package/dist/chunk-CTL42ZRR.js.gz +0 -0
- package/dist/{chunk-QGM4M3NI.js → chunk-DFFCFNK2.js} +2 -0
- package/dist/chunk-DFFCFNK2.js.br +0 -0
- package/dist/chunk-DFFCFNK2.js.gz +0 -0
- package/dist/{chunk-34AXBLYH.mjs → chunk-EW45F35P.mjs} +80 -78
- package/dist/chunk-EW45F35P.mjs.br +0 -0
- package/dist/chunk-EW45F35P.mjs.gz +0 -0
- package/dist/{chunk-6DZX6EAA.mjs → chunk-GDQSMJQZ.mjs} +2 -1
- package/dist/chunk-GDQSMJQZ.mjs.br +0 -0
- package/dist/chunk-GDQSMJQZ.mjs.gz +0 -0
- package/dist/{chunk-MQCBMO6A.js → chunk-K3EGXT6W.js} +261 -259
- package/dist/chunk-K3EGXT6W.js.br +0 -0
- package/dist/chunk-K3EGXT6W.js.gz +0 -0
- package/dist/chunk-VI575UU6.mjs +3897 -0
- package/dist/chunk-VI575UU6.mjs.br +0 -0
- package/dist/chunk-VI575UU6.mjs.gz +0 -0
- package/dist/i18n.js +1 -1
- package/dist/i18n.js.br +2 -2
- package/dist/i18n.js.gz +0 -0
- package/dist/i18n.mjs +1 -1
- package/dist/i18n.mjs.br +0 -0
- package/dist/i18n.mjs.gz +0 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +25 -25
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +11 -1
- package/dist/internals.js +82 -82
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/{three.module-A6ACXOES.mjs → three.module-2R4ADL7W.mjs} +1 -1
- package/dist/three.module-2R4ADL7W.mjs.br +0 -0
- package/dist/three.module-2R4ADL7W.mjs.gz +0 -0
- package/dist/{three.module-IORLGCSX.js → three.module-LS32MK23.js} +1 -1
- package/dist/three.module-LS32MK23.js.br +0 -0
- package/dist/three.module-LS32MK23.js.gz +0 -0
- package/dist/viewer/index.d.ts +17 -0
- package/dist/viewer/index.js +20 -20
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/dist/{y-webrtc-F5IA7T5S.mjs → y-webrtc-6DZI5KUK.mjs} +1 -1
- package/dist/y-webrtc-6DZI5KUK.mjs.br +0 -0
- package/dist/y-webrtc-6DZI5KUK.mjs.gz +0 -0
- package/dist/{y-webrtc-6LID3XZO.js → y-webrtc-OTRGEYOH.js} +5 -5
- package/dist/y-webrtc-OTRGEYOH.js.br +0 -0
- package/dist/y-webrtc-OTRGEYOH.js.gz +0 -0
- package/dist/{y-websocket-HOY2HFMH.js → y-websocket-AWBYMAHL.js} +1 -1
- package/dist/y-websocket-AWBYMAHL.js.br +0 -0
- package/dist/y-websocket-AWBYMAHL.js.gz +0 -0
- package/dist/{y-websocket-VGLBV2HJ.mjs → y-websocket-VAKUVRQT.mjs} +1 -1
- package/dist/y-websocket-VAKUVRQT.mjs.br +0 -0
- package/dist/y-websocket-VAKUVRQT.mjs.gz +0 -0
- package/package.json +4 -3
- package/dist/AiChatPanel-3J6XGIJ4.mjs.br +0 -0
- package/dist/AiChatPanel-3J6XGIJ4.mjs.gz +0 -0
- package/dist/AiChatPanel-EGTSK4T5.js.br +0 -0
- package/dist/AiChatPanel-EGTSK4T5.js.gz +0 -0
- package/dist/Model3DScene-2V2GQ6FY.mjs.br +0 -0
- package/dist/Model3DScene-2V2GQ6FY.mjs.gz +0 -0
- package/dist/Model3DScene-Q3XEZSWV.js.br +0 -2
- package/dist/Model3DScene-Q3XEZSWV.js.gz +0 -0
- package/dist/UTIF-RPFRSSC5.mjs +0 -6400
- package/dist/UTIF-RPFRSSC5.mjs.br +0 -0
- package/dist/UTIF-RPFRSSC5.mjs.gz +0 -0
- package/dist/UTIF-XWCKRN6V.js +0 -6402
- package/dist/UTIF-XWCKRN6V.js.br +0 -0
- package/dist/UTIF-XWCKRN6V.js.gz +0 -0
- package/dist/chunk-34AXBLYH.mjs.br +0 -0
- package/dist/chunk-34AXBLYH.mjs.gz +0 -0
- package/dist/chunk-5RQTZ376.js.br +0 -0
- package/dist/chunk-5RQTZ376.js.gz +0 -0
- package/dist/chunk-6DZX6EAA.mjs.br +0 -0
- package/dist/chunk-6DZX6EAA.mjs.gz +0 -0
- package/dist/chunk-MQCBMO6A.js.br +0 -0
- package/dist/chunk-MQCBMO6A.js.gz +0 -0
- package/dist/chunk-QGM4M3NI.js.br +0 -0
- package/dist/chunk-QGM4M3NI.js.gz +0 -0
- package/dist/chunk-TYJZJJZ6.mjs +0 -208183
- package/dist/chunk-TYJZJJZ6.mjs.br +0 -0
- package/dist/chunk-TYJZJJZ6.mjs.gz +0 -0
- package/dist/chunk-WK6JBJCT.js +0 -208548
- package/dist/chunk-WK6JBJCT.js.br +0 -0
- package/dist/chunk-WK6JBJCT.js.gz +0 -0
- package/dist/chunk-ZK7UEEXE.mjs.br +0 -0
- package/dist/chunk-ZK7UEEXE.mjs.gz +0 -0
- package/dist/three.module-A6ACXOES.mjs.br +0 -0
- package/dist/three.module-A6ACXOES.mjs.gz +0 -0
- package/dist/three.module-IORLGCSX.js.br +0 -0
- package/dist/three.module-IORLGCSX.js.gz +0 -0
- package/dist/y-webrtc-6LID3XZO.js.br +0 -0
- package/dist/y-webrtc-6LID3XZO.js.gz +0 -0
- package/dist/y-webrtc-F5IA7T5S.mjs.br +0 -0
- package/dist/y-webrtc-F5IA7T5S.mjs.gz +0 -0
- package/dist/y-websocket-HOY2HFMH.js.br +0 -0
- package/dist/y-websocket-HOY2HFMH.js.gz +0 -0
- package/dist/y-websocket-VGLBV2HJ.mjs.br +0 -0
- package/dist/y-websocket-VGLBV2HJ.mjs.gz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCTL42ZRR_js = require('./chunk-CTL42ZRR.js');
|
|
4
4
|
var pptx = require('ooxml-ui/pptx');
|
|
5
5
|
var React17 = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -130,7 +130,7 @@ function useYjsProvider({ config: inputConfig }) {
|
|
|
130
130
|
}
|
|
131
131
|
setStatus("connecting");
|
|
132
132
|
try {
|
|
133
|
-
const [Y, { WebrtcProvider }] = await Promise.all([import('yjs'), import('./y-webrtc-
|
|
133
|
+
const [Y, { WebrtcProvider }] = await Promise.all([import('yjs'), import('./y-webrtc-OTRGEYOH.js')]);
|
|
134
134
|
if (generation !== generationRef.current) {
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
@@ -205,7 +205,7 @@ function useYjsProvider({ config: inputConfig }) {
|
|
|
205
205
|
}
|
|
206
206
|
setStatus("connecting");
|
|
207
207
|
try {
|
|
208
|
-
const [Y, { WebsocketProvider }] = await Promise.all([import('yjs'), import('./y-websocket-
|
|
208
|
+
const [Y, { WebsocketProvider }] = await Promise.all([import('yjs'), import('./y-websocket-AWBYMAHL.js')]);
|
|
209
209
|
if (generation !== generationRef.current) {
|
|
210
210
|
return;
|
|
211
211
|
}
|
|
@@ -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(chunkCTL42ZRR_js.cloneHistorySnapshot(previous));
|
|
688
688
|
}
|
|
689
|
-
past.push({ ...
|
|
689
|
+
past.push({ ...chunkCTL42ZRR_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(chunkCTL42ZRR_js.cloneSlide),
|
|
779
|
+
templateElementsBySlideId: chunkCTL42ZRR_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(chunkCTL42ZRR_js.cloneSlide));
|
|
793
793
|
setTemplateElementsBySlideId(
|
|
794
|
-
|
|
794
|
+
chunkCTL42ZRR_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 = chunkCTL42ZRR_js.cloneHistorySnapshot(previousSnapshot);
|
|
834
|
+
lastHistorySnapshotRef.current = chunkCTL42ZRR_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 = chunkCTL42ZRR_js.cloneHistorySnapshot(nextSnapshot);
|
|
856
|
+
lastHistorySnapshotRef.current = chunkCTL42ZRR_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 = chunkCTL42ZRR_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(chunkCTL42ZRR_js.cloneSlide) };
|
|
957
|
+
const after = { ...before, slides: nextSlides.map(chunkCTL42ZRR_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 = chunkCTL42ZRR_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, chunkCTL42ZRR_js.MIN_ELEMENT_SIZE));
|
|
1147
|
+
maxY = Math.max(maxY, element.y + Math.max(element.height, chunkCTL42ZRR_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, chunkCTL42ZRR_js.MIN_ELEMENT_SIZE);
|
|
1154
|
+
const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkCTL42ZRR_js.MIN_ELEMENT_SIZE);
|
|
1155
1155
|
const availableWidth = Math.max(
|
|
1156
|
-
effectiveEditorDimensions.width -
|
|
1157
|
-
|
|
1156
|
+
effectiveEditorDimensions.width - chunkCTL42ZRR_js.ZOOM_TO_SELECTION_PADDING,
|
|
1157
|
+
chunkCTL42ZRR_js.MIN_ELEMENT_SIZE
|
|
1158
1158
|
);
|
|
1159
1159
|
const availableHeight = Math.max(
|
|
1160
|
-
effectiveEditorDimensions.height -
|
|
1161
|
-
|
|
1160
|
+
effectiveEditorDimensions.height - chunkCTL42ZRR_js.ZOOM_TO_SELECTION_PADDING,
|
|
1161
|
+
chunkCTL42ZRR_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: chunkCTL42ZRR_js.DEFAULT_CANVAS_WIDTH,
|
|
4101
|
+
height: chunkCTL42ZRR_js.DEFAULT_CANVAS_HEIGHT
|
|
4102
4102
|
});
|
|
4103
4103
|
const [slideSizeEmu, setSlideSizeEmu] = React17.useState();
|
|
4104
4104
|
const [activeSlideIndex, setActiveSlideIndex] = React17.useState(0);
|
|
@@ -4460,9 +4460,12 @@ function useLoadContent({
|
|
|
4460
4460
|
setIsDirty,
|
|
4461
4461
|
setIsEncrypted,
|
|
4462
4462
|
onContentApplied,
|
|
4463
|
-
allowExternalImages
|
|
4463
|
+
allowExternalImages,
|
|
4464
|
+
initialSlide
|
|
4464
4465
|
}) {
|
|
4465
4466
|
const handlerRef = React17.useRef(null);
|
|
4467
|
+
const initialSlideRef = React17.useRef(initialSlide);
|
|
4468
|
+
initialSlideRef.current = initialSlide;
|
|
4466
4469
|
const originalBufferRef = React17.useRef(null);
|
|
4467
4470
|
const renderTokenRef = React17.useRef(0);
|
|
4468
4471
|
React17.useEffect(() => {
|
|
@@ -4471,7 +4474,7 @@ function useLoadContent({
|
|
|
4471
4474
|
}
|
|
4472
4475
|
let cancelled = false;
|
|
4473
4476
|
const token = ++renderTokenRef.current;
|
|
4474
|
-
const handler = new
|
|
4477
|
+
const handler = new chunkCTL42ZRR_js.dist_exports.PptxHandler();
|
|
4475
4478
|
const resources = pptx.createPresentationLoadResources(handler);
|
|
4476
4479
|
const loadBlobUrls = resources.blobUrls;
|
|
4477
4480
|
(async () => {
|
|
@@ -4556,12 +4559,12 @@ function useLoadContent({
|
|
|
4556
4559
|
}
|
|
4557
4560
|
resources.commit();
|
|
4558
4561
|
handlerRef.current = handler;
|
|
4559
|
-
const partition =
|
|
4562
|
+
const partition = chunkCTL42ZRR_js.partitionTemplateElements(nextSlides);
|
|
4560
4563
|
setSlides(partition.slides);
|
|
4561
4564
|
setTemplateElementsBySlideId(partition.templateElementsBySlideId);
|
|
4562
4565
|
setCanvasSize({
|
|
4563
|
-
width: parsed.width ??
|
|
4564
|
-
height: parsed.height ??
|
|
4566
|
+
width: parsed.width ?? chunkCTL42ZRR_js.DEFAULT_CANVAS_WIDTH,
|
|
4567
|
+
height: parsed.height ?? chunkCTL42ZRR_js.DEFAULT_CANVAS_HEIGHT
|
|
4565
4568
|
});
|
|
4566
4569
|
setSlideSizeEmu(
|
|
4567
4570
|
typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
|
|
@@ -4615,14 +4618,16 @@ function useLoadContent({
|
|
|
4615
4618
|
...parsed.slides.flatMap((slide) => slide.warnings ?? [])
|
|
4616
4619
|
])
|
|
4617
4620
|
);
|
|
4618
|
-
setActiveSlideIndex(
|
|
4621
|
+
setActiveSlideIndex(
|
|
4622
|
+
pptx.resolveInitialSlideIndex(initialSlideRef.current, parsed.slides.length)
|
|
4623
|
+
);
|
|
4619
4624
|
clearSelection();
|
|
4620
4625
|
setIsDirty(false);
|
|
4621
4626
|
history.resetHistory();
|
|
4622
4627
|
onContentApplied?.();
|
|
4623
4628
|
} catch (err) {
|
|
4624
4629
|
if (!cancelled && token === renderTokenRef.current) {
|
|
4625
|
-
if (err instanceof
|
|
4630
|
+
if (err instanceof chunkCTL42ZRR_js.dist_exports.EncryptedFileError) {
|
|
4626
4631
|
setIsEncrypted(true);
|
|
4627
4632
|
} else {
|
|
4628
4633
|
console.error("[pptx] Failed to load presentation content:", err);
|
|
@@ -4747,7 +4752,7 @@ function useTextElementOperations(input) {
|
|
|
4747
4752
|
updateSelectedElement
|
|
4748
4753
|
} = input;
|
|
4749
4754
|
const liveTextSegments = React17.useCallback(() => {
|
|
4750
|
-
if (!selectedElement || !
|
|
4755
|
+
if (!selectedElement || !(0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
4751
4756
|
return void 0;
|
|
4752
4757
|
}
|
|
4753
4758
|
if (selectedElement.id !== inlineEditingElementId) {
|
|
@@ -4765,7 +4770,7 @@ function useTextElementOperations(input) {
|
|
|
4765
4770
|
}, [selectedElement, inlineEditingElementId, inlineEditingText, inlineEditingSnapshotRef]);
|
|
4766
4771
|
const updateSelectedTextStyle = React17.useCallback(
|
|
4767
4772
|
(updates) => {
|
|
4768
|
-
if (!selectedElement || !
|
|
4773
|
+
if (!selectedElement || !(0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
4769
4774
|
return;
|
|
4770
4775
|
}
|
|
4771
4776
|
const isLiveEditing = selectedElement.id === inlineEditingElementId;
|
|
@@ -4843,7 +4848,7 @@ function useTextElementOperations(input) {
|
|
|
4843
4848
|
);
|
|
4844
4849
|
const toggleSelectedBullets = React17.useCallback(
|
|
4845
4850
|
(kind) => {
|
|
4846
|
-
if (!selectedElement || !
|
|
4851
|
+
if (!selectedElement || !(0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
4847
4852
|
return;
|
|
4848
4853
|
}
|
|
4849
4854
|
const currentSegments = liveTextSegments();
|
|
@@ -4894,7 +4899,7 @@ function useTextElementOperations(input) {
|
|
|
4894
4899
|
);
|
|
4895
4900
|
const updateSelectedTextCase = React17.useCallback(
|
|
4896
4901
|
(mode) => {
|
|
4897
|
-
if (!selectedElement || !
|
|
4902
|
+
if (!selectedElement || !(0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
4898
4903
|
return;
|
|
4899
4904
|
}
|
|
4900
4905
|
const isLiveEditing = selectedElement.id === inlineEditingElementId;
|
|
@@ -5010,7 +5015,7 @@ function useElementOperations(input) {
|
|
|
5010
5015
|
);
|
|
5011
5016
|
return;
|
|
5012
5017
|
}
|
|
5013
|
-
if (
|
|
5018
|
+
if (chunkCTL42ZRR_js.isTemplateElementId(elementId)) {
|
|
5014
5019
|
const slideId = activeSlide?.id;
|
|
5015
5020
|
if (slideId) {
|
|
5016
5021
|
setTemplateElementsBySlideId((prev) => ({
|
|
@@ -5046,7 +5051,7 @@ function useElementOperations(input) {
|
|
|
5046
5051
|
);
|
|
5047
5052
|
const updateSelectedShapeStyle = React17.useCallback(
|
|
5048
5053
|
(updates) => {
|
|
5049
|
-
if (!selectedElement || !
|
|
5054
|
+
if (!selectedElement || !(0, chunkCTL42ZRR_js.dist_exports.hasShapeProperties)(selectedElement)) {
|
|
5050
5055
|
return;
|
|
5051
5056
|
}
|
|
5052
5057
|
updateSelectedElement({
|
|
@@ -5250,15 +5255,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
|
|
|
5250
5255
|
// src/viewer/hooks/pointer-move-handlers.ts
|
|
5251
5256
|
function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
|
|
5252
5257
|
const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
|
|
5253
|
-
let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize:
|
|
5258
|
+
let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkCTL42ZRR_js.MIN_ELEMENT_SIZE });
|
|
5254
5259
|
if (lockAspect) {
|
|
5255
|
-
resized = pptx.lockResizeAspect(resized, startBox, handle,
|
|
5260
|
+
resized = pptx.lockResizeAspect(resized, startBox, handle, chunkCTL42ZRR_js.MIN_ELEMENT_SIZE);
|
|
5256
5261
|
}
|
|
5257
5262
|
const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
|
|
5258
5263
|
if (!snapToGrid) {
|
|
5259
5264
|
return box;
|
|
5260
5265
|
}
|
|
5261
|
-
return pptx.snapBoxToGrid(box, handle, gridSpacingPx,
|
|
5266
|
+
return pptx.snapBoxToGrid(box, handle, gridSpacingPx, chunkCTL42ZRR_js.MIN_ELEMENT_SIZE);
|
|
5262
5267
|
}
|
|
5263
5268
|
function resolveLiveTarget(input) {
|
|
5264
5269
|
const { livePatcher, editTemplateMode, activeSlide } = input;
|
|
@@ -5371,7 +5376,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
|
|
|
5371
5376
|
width: el.width,
|
|
5372
5377
|
height: el.height
|
|
5373
5378
|
}));
|
|
5374
|
-
const snapResult =
|
|
5379
|
+
const snapResult = chunkCTL42ZRR_js.computeSnapToShape(
|
|
5375
5380
|
targetX,
|
|
5376
5381
|
targetY,
|
|
5377
5382
|
primaryEl.width,
|
|
@@ -5445,8 +5450,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
|
|
|
5445
5450
|
rs.lastY = geo.y;
|
|
5446
5451
|
rs.lastWidth = geo.width;
|
|
5447
5452
|
rs.lastHeight = geo.height;
|
|
5448
|
-
const width = Math.max(geo.width,
|
|
5449
|
-
const height = Math.max(geo.height,
|
|
5453
|
+
const width = Math.max(geo.width, chunkCTL42ZRR_js.MIN_ELEMENT_SIZE);
|
|
5454
|
+
const height = Math.max(geo.height, chunkCTL42ZRR_js.MIN_ELEMENT_SIZE);
|
|
5450
5455
|
if (rs.domEl) {
|
|
5451
5456
|
rs.domEl.style.left = `${geo.x}px`;
|
|
5452
5457
|
rs.domEl.style.top = `${geo.y}px`;
|
|
@@ -5539,13 +5544,13 @@ function processPointerUp(input) {
|
|
|
5539
5544
|
if (i !== activeSlideIndex) {
|
|
5540
5545
|
return s;
|
|
5541
5546
|
}
|
|
5542
|
-
const rerouted =
|
|
5547
|
+
const rerouted = chunkCTL42ZRR_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
|
|
5543
5548
|
if (rerouted.length === 0) {
|
|
5544
5549
|
return s;
|
|
5545
5550
|
}
|
|
5546
5551
|
return {
|
|
5547
5552
|
...s,
|
|
5548
|
-
elements:
|
|
5553
|
+
elements: chunkCTL42ZRR_js.applyReroutedConnectors(s.elements, rerouted)
|
|
5549
5554
|
};
|
|
5550
5555
|
})
|
|
5551
5556
|
);
|
|
@@ -5597,8 +5602,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
|
|
|
5597
5602
|
}
|
|
5598
5603
|
return { ...el, x: start.x + dx, y: start.y + dy };
|
|
5599
5604
|
});
|
|
5600
|
-
const rerouted =
|
|
5601
|
-
return
|
|
5605
|
+
const rerouted = chunkCTL42ZRR_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
|
|
5606
|
+
return chunkCTL42ZRR_js.applyReroutedConnectors(movedElements, rerouted);
|
|
5602
5607
|
};
|
|
5603
5608
|
if (editTemplateMode) {
|
|
5604
5609
|
const slideId = activeSlide?.id;
|
|
@@ -5786,7 +5791,7 @@ function useCanvasInteractions(input) {
|
|
|
5786
5791
|
return;
|
|
5787
5792
|
}
|
|
5788
5793
|
const el = elementLookup.get(editId);
|
|
5789
|
-
if (el &&
|
|
5794
|
+
if (el && (0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(el)) {
|
|
5790
5795
|
const reader = inlineEditingReaderRef?.current;
|
|
5791
5796
|
const read = reader?.elementId === editId ? reader.read() : void 0;
|
|
5792
5797
|
if (read?.kind === "unsupported") {
|
|
@@ -5833,7 +5838,7 @@ function useCanvasInteractions(input) {
|
|
|
5833
5838
|
wasEditable.current = canEdit;
|
|
5834
5839
|
}, [canEdit]);
|
|
5835
5840
|
const openEquationEditorForElement = (el) => {
|
|
5836
|
-
if (!
|
|
5841
|
+
if (!(0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(el)) {
|
|
5837
5842
|
return false;
|
|
5838
5843
|
}
|
|
5839
5844
|
const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
|
|
@@ -5866,7 +5871,7 @@ function useCanvasInteractions(input) {
|
|
|
5866
5871
|
justInteractedRef.current = false;
|
|
5867
5872
|
} else {
|
|
5868
5873
|
const el = elementLookup.get(elementId);
|
|
5869
|
-
if (el &&
|
|
5874
|
+
if (el && (0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
|
|
5870
5875
|
if (!openEquationEditorForElement(el)) {
|
|
5871
5876
|
pptx.setPendingCaretPoint(e);
|
|
5872
5877
|
setInlineEditingElementId(elementId);
|
|
@@ -5892,7 +5897,7 @@ function useCanvasInteractions(input) {
|
|
|
5892
5897
|
if (openEquationEditorForElement(el)) {
|
|
5893
5898
|
return;
|
|
5894
5899
|
}
|
|
5895
|
-
if (
|
|
5900
|
+
if ((0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
|
|
5896
5901
|
setInlineEditingElementId(elementId);
|
|
5897
5902
|
setInlineEditingText(el.text ?? "");
|
|
5898
5903
|
}
|
|
@@ -6357,7 +6362,7 @@ function createStructuredElementHandlers(deps) {
|
|
|
6357
6362
|
return;
|
|
6358
6363
|
}
|
|
6359
6364
|
const resolved = resolveHyperlinkEditResult(data);
|
|
6360
|
-
if (resolved.url && !
|
|
6365
|
+
if (resolved.url && !chunkCTL42ZRR_js.isUrlSafe(resolved.url)) {
|
|
6361
6366
|
return;
|
|
6362
6367
|
}
|
|
6363
6368
|
const actionClick = {
|
|
@@ -6403,11 +6408,11 @@ function createStructuredElementHandlers(deps) {
|
|
|
6403
6408
|
if (!activeSlide) {
|
|
6404
6409
|
return;
|
|
6405
6410
|
}
|
|
6406
|
-
const preset =
|
|
6411
|
+
const preset = chunkCTL42ZRR_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
|
|
6407
6412
|
if (!preset) {
|
|
6408
6413
|
return;
|
|
6409
6414
|
}
|
|
6410
|
-
const defaultPptxAction =
|
|
6415
|
+
const defaultPptxAction = (0, chunkCTL42ZRR_js.dist_exports.elementActionToPptxAction)({
|
|
6411
6416
|
trigger: "click",
|
|
6412
6417
|
type: preset.defaultAction
|
|
6413
6418
|
});
|
|
@@ -6490,7 +6495,7 @@ function useInsertElements(input) {
|
|
|
6490
6495
|
width: 300,
|
|
6491
6496
|
height: 60,
|
|
6492
6497
|
text: "",
|
|
6493
|
-
textStyle: { fontSize:
|
|
6498
|
+
textStyle: { fontSize: chunkCTL42ZRR_js.DEFAULT_TEXT_FONT_SIZE }
|
|
6494
6499
|
});
|
|
6495
6500
|
};
|
|
6496
6501
|
const handleAddShape = () => {
|
|
@@ -6517,7 +6522,7 @@ function useInsertElements(input) {
|
|
|
6517
6522
|
return;
|
|
6518
6523
|
}
|
|
6519
6524
|
addElement({
|
|
6520
|
-
...pptx.newTableElement(
|
|
6525
|
+
...pptx.newTableElement(chunkCTL42ZRR_js.DEFAULT_TABLE_ROWS, chunkCTL42ZRR_js.DEFAULT_TABLE_COLUMNS, 100, 200),
|
|
6521
6526
|
id: pptx.generateElementId()
|
|
6522
6527
|
});
|
|
6523
6528
|
};
|
|
@@ -6686,7 +6691,7 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
6686
6691
|
history
|
|
6687
6692
|
} = input;
|
|
6688
6693
|
const updateElementsOwning = (elementId, updater) => {
|
|
6689
|
-
if (editTemplateMode && !
|
|
6694
|
+
if (editTemplateMode && !chunkCTL42ZRR_js.isTemplateElementId(elementId)) {
|
|
6690
6695
|
ops.updateSlides(
|
|
6691
6696
|
(prev) => prev.map(
|
|
6692
6697
|
(slide, index) => index === activeSlideIndex ? { ...slide, elements: updater(slide.elements) } : slide
|
|
@@ -6720,9 +6725,9 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
6720
6725
|
return;
|
|
6721
6726
|
}
|
|
6722
6727
|
const group = selectedElement;
|
|
6723
|
-
const intoTemplate =
|
|
6728
|
+
const intoTemplate = chunkCTL42ZRR_js.isTemplateElementId(group.id);
|
|
6724
6729
|
const childIds = group.children.map(
|
|
6725
|
-
(child) => intoTemplate ?
|
|
6730
|
+
(child) => intoTemplate ? chunkCTL42ZRR_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
|
|
6726
6731
|
);
|
|
6727
6732
|
const { elements, childIds: usedIds } = pptx.ungroupElements(
|
|
6728
6733
|
ops.activeElements,
|
|
@@ -7045,14 +7050,7 @@ function useSlideManagement(input) {
|
|
|
7045
7050
|
if (!src) {
|
|
7046
7051
|
continue;
|
|
7047
7052
|
}
|
|
7048
|
-
const clone = {
|
|
7049
|
-
...src,
|
|
7050
|
-
id: pptx.makeSlideId(),
|
|
7051
|
-
elements: src.elements.map((el) => ({
|
|
7052
|
-
...el,
|
|
7053
|
-
id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
|
|
7054
|
-
}))
|
|
7055
|
-
};
|
|
7053
|
+
const clone = { ...(0, chunkCTL42ZRR_js.dist_exports.duplicateSlide)(src, next.length + 1), id: pptx.makeSlideId() };
|
|
7056
7054
|
next.splice(i + offset + 1, 0, clone);
|
|
7057
7055
|
offset++;
|
|
7058
7056
|
}
|
|
@@ -7155,7 +7153,7 @@ function createTableMergeHandlers(input) {
|
|
|
7155
7153
|
if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
|
|
7156
7154
|
return;
|
|
7157
7155
|
}
|
|
7158
|
-
const newTableData =
|
|
7156
|
+
const newTableData = chunkCTL42ZRR_js.mergeCells(
|
|
7159
7157
|
[
|
|
7160
7158
|
{ row: rowIndex, col: columnIndex },
|
|
7161
7159
|
{ row: rowIndex, col: nextColIdx }
|
|
@@ -7163,7 +7161,7 @@ function createTableMergeHandlers(input) {
|
|
|
7163
7161
|
td
|
|
7164
7162
|
);
|
|
7165
7163
|
const updates = { tableData: newTableData };
|
|
7166
|
-
const newRawXml =
|
|
7164
|
+
const newRawXml = (0, chunkCTL42ZRR_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
|
|
7167
7165
|
if (newRawXml) {
|
|
7168
7166
|
updates.rawXml = newRawXml;
|
|
7169
7167
|
}
|
|
@@ -7189,7 +7187,7 @@ function createTableMergeHandlers(input) {
|
|
|
7189
7187
|
if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
|
|
7190
7188
|
return;
|
|
7191
7189
|
}
|
|
7192
|
-
const newTableData =
|
|
7190
|
+
const newTableData = chunkCTL42ZRR_js.mergeCells(
|
|
7193
7191
|
[
|
|
7194
7192
|
{ row: rowIndex, col: columnIndex },
|
|
7195
7193
|
{ row: targetNextRowIdx, col: columnIndex }
|
|
@@ -7197,7 +7195,7 @@ function createTableMergeHandlers(input) {
|
|
|
7197
7195
|
td
|
|
7198
7196
|
);
|
|
7199
7197
|
const updates = { tableData: newTableData };
|
|
7200
|
-
const newRawXml =
|
|
7198
|
+
const newRawXml = (0, chunkCTL42ZRR_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
|
|
7201
7199
|
if (newRawXml) {
|
|
7202
7200
|
updates.rawXml = newRawXml;
|
|
7203
7201
|
}
|
|
@@ -7212,9 +7210,9 @@ function createTableMergeHandlers(input) {
|
|
|
7212
7210
|
return;
|
|
7213
7211
|
}
|
|
7214
7212
|
const td = selectedElement.tableData;
|
|
7215
|
-
const newTableData =
|
|
7213
|
+
const newTableData = chunkCTL42ZRR_js.mergeCells(ts.selectedCells, td);
|
|
7216
7214
|
const updates = { tableData: newTableData };
|
|
7217
|
-
const newRawXml =
|
|
7215
|
+
const newRawXml = (0, chunkCTL42ZRR_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
|
|
7218
7216
|
if (newRawXml) {
|
|
7219
7217
|
updates.rawXml = newRawXml;
|
|
7220
7218
|
}
|
|
@@ -7231,9 +7229,9 @@ function createTableMergeHandlers(input) {
|
|
|
7231
7229
|
}
|
|
7232
7230
|
const { rowIndex, columnIndex } = ts;
|
|
7233
7231
|
const td = selectedElement.tableData;
|
|
7234
|
-
const newTableData =
|
|
7232
|
+
const newTableData = chunkCTL42ZRR_js.splitCell(rowIndex, columnIndex, td);
|
|
7235
7233
|
const updates = { tableData: newTableData };
|
|
7236
|
-
const newRawXml =
|
|
7234
|
+
const newRawXml = (0, chunkCTL42ZRR_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
|
|
7237
7235
|
if (newRawXml) {
|
|
7238
7236
|
updates.rawXml = newRawXml;
|
|
7239
7237
|
}
|
|
@@ -7268,7 +7266,7 @@ function createTableStructHandlers(input) {
|
|
|
7268
7266
|
updates.tableData = pptx.setCellText(el, rowIndex, colIndex, text).tableData;
|
|
7269
7267
|
}
|
|
7270
7268
|
if (el.rawXml) {
|
|
7271
|
-
const newRawXml =
|
|
7269
|
+
const newRawXml = (0, chunkCTL42ZRR_js.dist_exports.updateCellTextInRawXml)(el, rowIndex, colIndex, text);
|
|
7272
7270
|
if (newRawXml) {
|
|
7273
7271
|
updates.rawXml = newRawXml;
|
|
7274
7272
|
}
|
|
@@ -7292,7 +7290,7 @@ function createTableStructHandlers(input) {
|
|
|
7292
7290
|
const { rowIndex, columnIndex: colIndex } = ts;
|
|
7293
7291
|
const updates = {};
|
|
7294
7292
|
if (selectedElement.rawXml) {
|
|
7295
|
-
const newRawXml =
|
|
7293
|
+
const newRawXml = (0, chunkCTL42ZRR_js.dist_exports.updateCellTextStyleInRawXml)(
|
|
7296
7294
|
selectedElement,
|
|
7297
7295
|
rowIndex,
|
|
7298
7296
|
colIndex,
|
|
@@ -7465,7 +7463,7 @@ function useExportSaveAs(input) {
|
|
|
7465
7463
|
const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
|
|
7466
7464
|
const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
|
|
7467
7465
|
const data = {
|
|
7468
|
-
slides:
|
|
7466
|
+
slides: chunkCTL42ZRR_js.buildSaveSlides(slides, templateElementsBySlideId),
|
|
7469
7467
|
width: canvasSize.width,
|
|
7470
7468
|
height: canvasSize.height,
|
|
7471
7469
|
widthEmu: slideSize.widthEmu,
|
|
@@ -7623,7 +7621,7 @@ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActi
|
|
|
7623
7621
|
}
|
|
7624
7622
|
function tilesToPdfPage(tilesResult) {
|
|
7625
7623
|
return tilesResult.tiles.map((tile) => ({
|
|
7626
|
-
image:
|
|
7624
|
+
image: chunkCTL42ZRR_js.canvasToJpegData(tile.canvas),
|
|
7627
7625
|
placement: pptx.placeTileOnPage(
|
|
7628
7626
|
tile,
|
|
7629
7627
|
tilesResult.fullWidth,
|
|
@@ -7656,7 +7654,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
|
|
|
7656
7654
|
if (pages.length === 0) {
|
|
7657
7655
|
throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
|
|
7658
7656
|
}
|
|
7659
|
-
const pdfBlobUrl =
|
|
7657
|
+
const pdfBlobUrl = chunkCTL42ZRR_js.buildPdfFromTiledImageData(pages);
|
|
7660
7658
|
pptx.downloadDataUrl(pdfBlobUrl, filename);
|
|
7661
7659
|
}
|
|
7662
7660
|
async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
|
|
@@ -7686,7 +7684,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
|
|
|
7686
7684
|
if (pages.length === 0) {
|
|
7687
7685
|
throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
|
|
7688
7686
|
}
|
|
7689
|
-
const pdfDataUrl =
|
|
7687
|
+
const pdfDataUrl = chunkCTL42ZRR_js.buildNotesPdf(pages);
|
|
7690
7688
|
pptx.downloadDataUrl(pdfDataUrl, filename);
|
|
7691
7689
|
}
|
|
7692
7690
|
async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
|
|
@@ -7881,7 +7879,7 @@ function exportAllSlidesToSvg(data, options = {}) {
|
|
|
7881
7879
|
continue;
|
|
7882
7880
|
}
|
|
7883
7881
|
onProgress?.(processedCount, data.slides.length);
|
|
7884
|
-
let svg =
|
|
7882
|
+
let svg = chunkCTL42ZRR_js.dist_exports.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
|
|
7885
7883
|
if (embedFonts && fontFaces?.length) {
|
|
7886
7884
|
svg = injectFontFaces(svg, fontFaces);
|
|
7887
7885
|
}
|
|
@@ -8470,10 +8468,10 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
|
|
|
8470
8468
|
return;
|
|
8471
8469
|
}
|
|
8472
8470
|
await handler.applyTheme(colorScheme, fontScheme, name);
|
|
8473
|
-
const previousMap = theme?.colorScheme ?
|
|
8471
|
+
const previousMap = theme?.colorScheme ? (0, chunkCTL42ZRR_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
|
|
8474
8472
|
bumpHistory();
|
|
8475
8473
|
setSlides(
|
|
8476
|
-
(slides) =>
|
|
8474
|
+
(slides) => (0, chunkCTL42ZRR_js.dist_exports.applyThemeToData)(
|
|
8477
8475
|
{ slides, theme, themeColorMap: previousMap },
|
|
8478
8476
|
colorScheme,
|
|
8479
8477
|
fontScheme,
|
|
@@ -8484,8 +8482,8 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
|
|
|
8484
8482
|
(prev) => Object.fromEntries(
|
|
8485
8483
|
Object.entries(prev).map(([id, elements]) => [
|
|
8486
8484
|
id,
|
|
8487
|
-
|
|
8488
|
-
|
|
8485
|
+
(0, chunkCTL42ZRR_js.dist_exports.reResolveElementFonts)(
|
|
8486
|
+
(0, chunkCTL42ZRR_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme),
|
|
8489
8487
|
theme?.fontScheme,
|
|
8490
8488
|
fontScheme
|
|
8491
8489
|
)
|
|
@@ -8543,13 +8541,13 @@ function useThemeHandlers(input) {
|
|
|
8543
8541
|
return;
|
|
8544
8542
|
}
|
|
8545
8543
|
await handler.updateThemeColorScheme(colorScheme);
|
|
8546
|
-
const previousMap = theme?.colorScheme ?
|
|
8547
|
-
setSlides((prev) =>
|
|
8544
|
+
const previousMap = theme?.colorScheme ? (0, chunkCTL42ZRR_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
|
|
8545
|
+
setSlides((prev) => (0, chunkCTL42ZRR_js.dist_exports.reResolveSlideColors)(prev, previousMap, colorScheme));
|
|
8548
8546
|
if (Object.keys(templateElementsBySlideId).length > 0) {
|
|
8549
8547
|
setTemplateElementsBySlideId((prev) => {
|
|
8550
8548
|
const next = {};
|
|
8551
8549
|
for (const [slideId, elements] of Object.entries(prev)) {
|
|
8552
|
-
next[slideId] =
|
|
8550
|
+
next[slideId] = (0, chunkCTL42ZRR_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme);
|
|
8553
8551
|
}
|
|
8554
8552
|
return next;
|
|
8555
8553
|
});
|
|
@@ -8660,7 +8658,7 @@ function useThemeSwitching(input) {
|
|
|
8660
8658
|
}
|
|
8661
8659
|
try {
|
|
8662
8660
|
await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
|
|
8663
|
-
const newData =
|
|
8661
|
+
const newData = (0, chunkCTL42ZRR_js.dist_exports.applyThemeToData)(data, preset.colorScheme, preset.fontScheme, preset.name);
|
|
8664
8662
|
onDataChange(newData);
|
|
8665
8663
|
onThemeChanged?.(preset);
|
|
8666
8664
|
} catch (error) {
|
|
@@ -8677,7 +8675,7 @@ function useThemeSwitching(input) {
|
|
|
8677
8675
|
}
|
|
8678
8676
|
try {
|
|
8679
8677
|
await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
|
|
8680
|
-
const newData =
|
|
8678
|
+
const newData = (0, chunkCTL42ZRR_js.dist_exports.applyThemeToData)(data, colorScheme, fontScheme, themeName);
|
|
8681
8679
|
onDataChange(newData);
|
|
8682
8680
|
} catch (error) {
|
|
8683
8681
|
console.error("Failed to switch to custom theme:", error);
|
|
@@ -8689,12 +8687,12 @@ function useThemeSwitching(input) {
|
|
|
8689
8687
|
if (!data?.theme?.colorScheme) {
|
|
8690
8688
|
return void 0;
|
|
8691
8689
|
}
|
|
8692
|
-
return
|
|
8693
|
-
(p) =>
|
|
8690
|
+
return chunkCTL42ZRR_js.dist_exports.THEME_PRESETS.find(
|
|
8691
|
+
(p) => (0, chunkCTL42ZRR_js.dist_exports.themeColorSchemesEqual)(data.theme?.colorScheme, p.colorScheme)
|
|
8694
8692
|
);
|
|
8695
8693
|
}, [data?.theme?.colorScheme]);
|
|
8696
8694
|
return {
|
|
8697
|
-
presets:
|
|
8695
|
+
presets: chunkCTL42ZRR_js.dist_exports.THEME_PRESETS,
|
|
8698
8696
|
switchToPreset,
|
|
8699
8697
|
switchToCustom,
|
|
8700
8698
|
currentPreset
|
|
@@ -8771,7 +8769,7 @@ function usePropertyHandlers(input) {
|
|
|
8771
8769
|
}
|
|
8772
8770
|
try {
|
|
8773
8771
|
const ab = await file.arrayBuffer();
|
|
8774
|
-
const h = new
|
|
8772
|
+
const h = new chunkCTL42ZRR_js.dist_exports.PptxHandler();
|
|
8775
8773
|
const other = await h.load(ab);
|
|
8776
8774
|
if (!other) {
|
|
8777
8775
|
return;
|
|
@@ -8781,7 +8779,7 @@ function usePropertyHandlers(input) {
|
|
|
8781
8779
|
width: canvasSize.width,
|
|
8782
8780
|
height: canvasSize.height
|
|
8783
8781
|
};
|
|
8784
|
-
setCompareResult(
|
|
8782
|
+
setCompareResult(chunkCTL42ZRR_js.comparePresentation(cur, other));
|
|
8785
8783
|
setIsComparePanelOpen(true);
|
|
8786
8784
|
} catch (err) {
|
|
8787
8785
|
console.warn("Compare failed:", err);
|
|
@@ -9134,7 +9132,7 @@ function useViewerDialogs(input) {
|
|
|
9134
9132
|
};
|
|
9135
9133
|
}
|
|
9136
9134
|
function computeGridSpacingPx(documentGridSpacing) {
|
|
9137
|
-
return pptx.computeGridSpacingPx(documentGridSpacing,
|
|
9135
|
+
return pptx.computeGridSpacingPx(documentGridSpacing, chunkCTL42ZRR_js.GRID_SIZE);
|
|
9138
9136
|
}
|
|
9139
9137
|
function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
|
|
9140
9138
|
const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
|
|
@@ -9143,7 +9141,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
|
|
|
9143
9141
|
}
|
|
9144
9142
|
function computeSlideSectionGroups(slides, sections) {
|
|
9145
9143
|
return pptx.groupSlidesBySection(sections, slides).map((group) => ({
|
|
9146
|
-
id: group.section?.id ?? (sections.length > 0 ?
|
|
9144
|
+
id: group.section?.id ?? (sections.length > 0 ? chunkCTL42ZRR_js.UNGROUPED_SECTION_ID : chunkCTL42ZRR_js.DEFAULT_SECTION_GROUP_ID),
|
|
9147
9145
|
label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
|
|
9148
9146
|
slideIndexes: group.slideIndexes,
|
|
9149
9147
|
...group.section?.color !== void 0 ? { color: group.section.color } : {},
|
|
@@ -9188,10 +9186,10 @@ function useDerivedSlideState(input) {
|
|
|
9188
9186
|
);
|
|
9189
9187
|
const slideSectionGroups = React17.useMemo(
|
|
9190
9188
|
() => computeSlideSectionGroups(slides, sections).map((group) => {
|
|
9191
|
-
if (group.id ===
|
|
9189
|
+
if (group.id === chunkCTL42ZRR_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
|
|
9192
9190
|
return { ...group, label: t("pptx.slides.ungroupedSlides") };
|
|
9193
9191
|
}
|
|
9194
|
-
if (group.id ===
|
|
9192
|
+
if (group.id === chunkCTL42ZRR_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
|
|
9195
9193
|
return { ...group, label: t("pptx.sections.slides") };
|
|
9196
9194
|
}
|
|
9197
9195
|
return group;
|
|
@@ -9298,7 +9296,7 @@ function useAnnotationHandlers(input) {
|
|
|
9298
9296
|
if (nextMode === "present") {
|
|
9299
9297
|
presentation.enterPresentMode();
|
|
9300
9298
|
} else if (mode === "present" && annotations.hasAnyAnnotations) {
|
|
9301
|
-
|
|
9299
|
+
chunkCTL42ZRR_js.stopAllPersistentAudio();
|
|
9302
9300
|
if (promptKeepInkAnnotations) {
|
|
9303
9301
|
pendingModeAfterAnnotationsRef.current = nextMode;
|
|
9304
9302
|
setShowKeepAnnotationsDialog(true);
|
|
@@ -9308,7 +9306,7 @@ function useAnnotationHandlers(input) {
|
|
|
9308
9306
|
}
|
|
9309
9307
|
} else {
|
|
9310
9308
|
if (mode === "present") {
|
|
9311
|
-
|
|
9309
|
+
chunkCTL42ZRR_js.stopAllPersistentAudio();
|
|
9312
9310
|
}
|
|
9313
9311
|
setMode(nextMode);
|
|
9314
9312
|
}
|
|
@@ -9379,7 +9377,7 @@ function overlayPendingInlineEdit(document2, elementId, text, snapshot, transfor
|
|
|
9379
9377
|
(slide) => !elementId ? slide : {
|
|
9380
9378
|
...slide,
|
|
9381
9379
|
elements: slide.elements.map(
|
|
9382
|
-
(element) => element.id === elementId &&
|
|
9380
|
+
(element) => element.id === elementId && (0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(element) ? {
|
|
9383
9381
|
...element,
|
|
9384
9382
|
text,
|
|
9385
9383
|
textSegments: pptx.remapTextToSegments(
|
|
@@ -9465,14 +9463,14 @@ function useSerialize(input) {
|
|
|
9465
9463
|
const pptxGuides = guides.map((g) => ({
|
|
9466
9464
|
id: g.id,
|
|
9467
9465
|
orientation: g.axis === "h" ? "horz" : "vert",
|
|
9468
|
-
positionEmu:
|
|
9466
|
+
positionEmu: (0, chunkCTL42ZRR_js.dist_exports.guidePxToEmu)(g.position)
|
|
9469
9467
|
}));
|
|
9470
9468
|
return {
|
|
9471
9469
|
...slide,
|
|
9472
9470
|
guides: pptxGuides.length > 0 ? pptxGuides : void 0
|
|
9473
9471
|
};
|
|
9474
9472
|
});
|
|
9475
|
-
const slidesToSave =
|
|
9473
|
+
const slidesToSave = chunkCTL42ZRR_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
|
|
9476
9474
|
const saveOptions = pptx.buildDeckSaveOptions({
|
|
9477
9475
|
// Without this the Slide Size card edited a viewer-only pixel value and
|
|
9478
9476
|
// the saved `p:sldSz` never moved: passing `slideSize` is the only way a
|
|
@@ -9653,7 +9651,7 @@ function usePresentationSetup(input) {
|
|
|
9653
9651
|
return;
|
|
9654
9652
|
}
|
|
9655
9653
|
if (mode === "present" && nextMode !== "present") {
|
|
9656
|
-
|
|
9654
|
+
chunkCTL42ZRR_js.stopAllPersistentAudio();
|
|
9657
9655
|
stopAnimationSound();
|
|
9658
9656
|
const exitHandler = exitModeHandlerRef.current;
|
|
9659
9657
|
if (exitHandler) {
|
|
@@ -9774,12 +9772,12 @@ function useCanvasImagePaste(input) {
|
|
|
9774
9772
|
);
|
|
9775
9773
|
}
|
|
9776
9774
|
function formatPatchFor(element, format) {
|
|
9777
|
-
const updated =
|
|
9775
|
+
const updated = chunkCTL42ZRR_js.applyFormatToElement(element, format);
|
|
9778
9776
|
const updates = {};
|
|
9779
|
-
if (
|
|
9777
|
+
if ((0, chunkCTL42ZRR_js.dist_exports.hasShapeProperties)(updated)) {
|
|
9780
9778
|
updates.shapeStyle = updated.shapeStyle;
|
|
9781
9779
|
}
|
|
9782
|
-
if (
|
|
9780
|
+
if ((0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(updated)) {
|
|
9783
9781
|
updates.textStyle = updated.textStyle;
|
|
9784
9782
|
}
|
|
9785
9783
|
return updates;
|
|
@@ -9797,7 +9795,7 @@ function useFormatPainterEditing(input) {
|
|
|
9797
9795
|
const prevFormatPainterRef = React17.useRef(false);
|
|
9798
9796
|
React17.useEffect(() => {
|
|
9799
9797
|
if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
|
|
9800
|
-
copiedFormatRef.current =
|
|
9798
|
+
copiedFormatRef.current = chunkCTL42ZRR_js.copyFormatFromElement(selectedElement);
|
|
9801
9799
|
} else if (!formatPainterActive) {
|
|
9802
9800
|
copiedFormatRef.current = null;
|
|
9803
9801
|
}
|
|
@@ -10488,6 +10486,7 @@ function useContentLifecycle(input) {
|
|
|
10488
10486
|
password,
|
|
10489
10487
|
onContentApplied,
|
|
10490
10488
|
allowExternalImages,
|
|
10489
|
+
initialSlide,
|
|
10491
10490
|
setReadOnlyRecommendation,
|
|
10492
10491
|
setModifyVerifier,
|
|
10493
10492
|
setCompatToasts
|
|
@@ -10537,7 +10536,8 @@ function useContentLifecycle(input) {
|
|
|
10537
10536
|
setIsDirty: state.setIsDirty,
|
|
10538
10537
|
setIsEncrypted: setIsEncryptedDialogOpen,
|
|
10539
10538
|
onContentApplied,
|
|
10540
|
-
allowExternalImages
|
|
10539
|
+
allowExternalImages,
|
|
10540
|
+
initialSlide
|
|
10541
10541
|
});
|
|
10542
10542
|
React17.useEffect(() => {
|
|
10543
10543
|
actionSoundHandlerRef.current = handlerRef.current;
|
|
@@ -10884,7 +10884,7 @@ function useKeyboardShortcutWiring(input) {
|
|
|
10884
10884
|
}
|
|
10885
10885
|
function stepSelectedFontSize(state, ops, direction) {
|
|
10886
10886
|
const selected = state.selectedElement;
|
|
10887
|
-
const currentPx = (selected &&
|
|
10887
|
+
const currentPx = (selected && (0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(selected) ? selected.textStyle?.fontSize : void 0) ?? pptx.textFontSizePtToPx(18);
|
|
10888
10888
|
const nextPt = pptx.stepFontSizePt(pptx.textFontSizePxToPt(currentPx), direction);
|
|
10889
10889
|
ops.updateSelectedTextStyle({ fontSize: pptx.textFontSizePtToPx(nextPt) });
|
|
10890
10890
|
}
|
|
@@ -10951,6 +10951,7 @@ function useViewerIntegration(input) {
|
|
|
10951
10951
|
autosaveAllowed = true,
|
|
10952
10952
|
autosaveIntervalMs,
|
|
10953
10953
|
allowExternalImages,
|
|
10954
|
+
initialSlide,
|
|
10954
10955
|
setReadOnlyRecommendation,
|
|
10955
10956
|
setModifyVerifier,
|
|
10956
10957
|
setCompatToasts,
|
|
@@ -11026,6 +11027,7 @@ function useViewerIntegration(input) {
|
|
|
11026
11027
|
password: dialogs.presentationPassword ?? void 0,
|
|
11027
11028
|
onContentApplied: () => setLoadVersion((v) => v + 1),
|
|
11028
11029
|
allowExternalImages,
|
|
11030
|
+
initialSlide,
|
|
11029
11031
|
setReadOnlyRecommendation,
|
|
11030
11032
|
setModifyVerifier,
|
|
11031
11033
|
setCompatToasts
|
|
@@ -11433,7 +11435,7 @@ function useCollaborationWriteBack(input) {
|
|
|
11433
11435
|
getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
|
|
11434
11436
|
getSaveOptions: () => latest.current.getSaveOptions?.(),
|
|
11435
11437
|
getTemplateElements: () => latest.current.templateElementsBySlideId,
|
|
11436
|
-
mergeTemplateElements:
|
|
11438
|
+
mergeTemplateElements: chunkCTL42ZRR_js.buildSaveSlides
|
|
11437
11439
|
}),
|
|
11438
11440
|
[latest]
|
|
11439
11441
|
);
|
|
@@ -11986,8 +11988,8 @@ function useTouchGestures(input) {
|
|
|
11986
11988
|
}
|
|
11987
11989
|
const recognizer = pptx.createTouchGestureRecognizer({
|
|
11988
11990
|
getScale: () => scaleRef.current,
|
|
11989
|
-
minScale:
|
|
11990
|
-
maxScale:
|
|
11991
|
+
minScale: chunkCTL42ZRR_js.MIN_ZOOM_SCALE,
|
|
11992
|
+
maxScale: chunkCTL42ZRR_js.MAX_ZOOM_SCALE,
|
|
11991
11993
|
callbacks: {
|
|
11992
11994
|
onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
|
|
11993
11995
|
onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
|
|
@@ -12110,7 +12112,7 @@ function buildCanvasProps(input) {
|
|
|
12110
12112
|
if (pptx.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
|
|
12111
12113
|
return;
|
|
12112
12114
|
}
|
|
12113
|
-
|
|
12115
|
+
chunkCTL42ZRR_js.safeOpenUrl(url, target);
|
|
12114
12116
|
};
|
|
12115
12117
|
const handleActionClick = (elementId, action) => {
|
|
12116
12118
|
if (mode === "present") {
|
|
@@ -12125,9 +12127,9 @@ function buildCanvasProps(input) {
|
|
|
12125
12127
|
}
|
|
12126
12128
|
};
|
|
12127
12129
|
const handleHyperlinkClick = (url, target) => {
|
|
12128
|
-
if (
|
|
12130
|
+
if (chunkCTL42ZRR_js.isPpactionUrl(url)) {
|
|
12129
12131
|
if (mode === "present") {
|
|
12130
|
-
const parsed =
|
|
12132
|
+
const parsed = chunkCTL42ZRR_js.parsePpactionUrl(url);
|
|
12131
12133
|
if (parsed) {
|
|
12132
12134
|
presentation.handlePresentationAction({
|
|
12133
12135
|
action: parsed.action,
|
|
@@ -12520,7 +12522,7 @@ function buildToolbarProps(input) {
|
|
|
12520
12522
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
12521
12523
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
12522
12524
|
formatPainterActive: s.formatPainterActive,
|
|
12523
|
-
canActivateFormatPainter:
|
|
12525
|
+
canActivateFormatPainter: chunkCTL42ZRR_js.hasCopyableFormat(selectedElement),
|
|
12524
12526
|
onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
|
|
12525
12527
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
12526
12528
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -12841,7 +12843,7 @@ function useViewerBuildingBlocksCore(input) {
|
|
|
12841
12843
|
documentGridSpacing: state.viewProperties?.gridSpacing
|
|
12842
12844
|
});
|
|
12843
12845
|
const themeColorMap = React17.useMemo(
|
|
12844
|
-
() => state.theme?.colorScheme ?
|
|
12846
|
+
() => state.theme?.colorScheme ? (0, chunkCTL42ZRR_js.dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
|
|
12845
12847
|
[state.theme?.colorScheme]
|
|
12846
12848
|
);
|
|
12847
12849
|
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
|
|
@@ -13416,23 +13418,23 @@ function ColorChangedImage({
|
|
|
13416
13418
|
className,
|
|
13417
13419
|
alt
|
|
13418
13420
|
}) {
|
|
13419
|
-
const tolerance = tolerancePct ??
|
|
13420
|
-
const cacheKey =
|
|
13421
|
+
const tolerance = tolerancePct ?? chunkCTL42ZRR_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
|
|
13422
|
+
const cacheKey = chunkCTL42ZRR_js.buildCacheKey(
|
|
13421
13423
|
src,
|
|
13422
13424
|
clrChange.clrFrom,
|
|
13423
13425
|
clrChange.clrTo,
|
|
13424
13426
|
tolerance,
|
|
13425
13427
|
Boolean(clrChange.clrToTransparent)
|
|
13426
13428
|
);
|
|
13427
|
-
const cached =
|
|
13429
|
+
const cached = chunkCTL42ZRR_js.getCachedResult(cacheKey);
|
|
13428
13430
|
const [processedSrc, setProcessedSrc] = React17.useState(cached ?? null);
|
|
13429
13431
|
React17.useEffect(() => {
|
|
13430
|
-
if (
|
|
13431
|
-
setProcessedSrc(
|
|
13432
|
+
if (chunkCTL42ZRR_js.getCachedResult(cacheKey)) {
|
|
13433
|
+
setProcessedSrc(chunkCTL42ZRR_js.getCachedResult(cacheKey) ?? null);
|
|
13432
13434
|
return;
|
|
13433
13435
|
}
|
|
13434
13436
|
let cancelled = false;
|
|
13435
|
-
|
|
13437
|
+
chunkCTL42ZRR_js.applyColorChange(
|
|
13436
13438
|
src,
|
|
13437
13439
|
clrChange.clrFrom,
|
|
13438
13440
|
clrChange.clrTo,
|
|
@@ -13440,7 +13442,7 @@ function ColorChangedImage({
|
|
|
13440
13442
|
Boolean(clrChange.clrToTransparent)
|
|
13441
13443
|
).then((result) => {
|
|
13442
13444
|
if (!cancelled) {
|
|
13443
|
-
|
|
13445
|
+
chunkCTL42ZRR_js.setCachedResult(cacheKey, result.dataUrl);
|
|
13444
13446
|
setProcessedSrc(result.dataUrl);
|
|
13445
13447
|
}
|
|
13446
13448
|
return void 0;
|
|
@@ -13532,7 +13534,7 @@ function TiledImageLayer({
|
|
|
13532
13534
|
cancelled = true;
|
|
13533
13535
|
};
|
|
13534
13536
|
}, [src]);
|
|
13535
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...
|
|
13537
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunkCTL42ZRR_js.getImageTilingStyle(element, nativeSize), ...style } });
|
|
13536
13538
|
}
|
|
13537
13539
|
function renderImageEffectDefinitions(element, excludeDuotone = false) {
|
|
13538
13540
|
return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13601,7 +13603,7 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13601
13603
|
...filter ? { filter } : {},
|
|
13602
13604
|
...opacity !== void 0 ? { opacity } : {}
|
|
13603
13605
|
};
|
|
13604
|
-
if (
|
|
13606
|
+
if (chunkCTL42ZRR_js.isImageTiled(el)) {
|
|
13605
13607
|
const tileSrc = imgSrc(el);
|
|
13606
13608
|
if (!tileSrc) {
|
|
13607
13609
|
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" });
|
|
@@ -13620,12 +13622,12 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13620
13622
|
] });
|
|
13621
13623
|
}
|
|
13622
13624
|
const colorWash = pptx.getImageColorWashStyle(
|
|
13623
|
-
|
|
13625
|
+
(0, chunkCTL42ZRR_js.dist_exports.isImageLikeElement)(el) ? el.imageEffects?.colorWash : void 0
|
|
13624
13626
|
);
|
|
13625
13627
|
const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
|
|
13626
|
-
const duotoneColors =
|
|
13628
|
+
const duotoneColors = chunkCTL42ZRR_js.getDuotoneColors(el);
|
|
13627
13629
|
const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
|
|
13628
|
-
const filterForImg = useDuotoneCanvas ?
|
|
13630
|
+
const filterForImg = useDuotoneCanvas ? chunkCTL42ZRR_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
|
|
13629
13631
|
const canvasEffectStyles = {
|
|
13630
13632
|
...filterForImg ? { filter: filterForImg } : {},
|
|
13631
13633
|
...opacity !== void 0 ? { opacity } : {}
|
|
@@ -13701,10 +13703,10 @@ function SlideBackgroundImageLayer({
|
|
|
13701
13703
|
style: { zIndex: 0 },
|
|
13702
13704
|
children: renderImg(
|
|
13703
13705
|
backgroundElement,
|
|
13704
|
-
|
|
13705
|
-
|
|
13706
|
+
chunkCTL42ZRR_js.getImageRenderStyle(backgroundElement),
|
|
13707
|
+
chunkCTL42ZRR_js.getImageEffectsFilter(backgroundElement),
|
|
13706
13708
|
"",
|
|
13707
|
-
|
|
13709
|
+
chunkCTL42ZRR_js.getImageEffectsOpacity(backgroundElement)
|
|
13708
13710
|
)
|
|
13709
13711
|
}
|
|
13710
13712
|
);
|
|
@@ -13975,7 +13977,7 @@ function ChartElementView({
|
|
|
13975
13977
|
pptx.getBarFacePicturePixelSampleVersion
|
|
13976
13978
|
);
|
|
13977
13979
|
const viewModel = React17.useMemo(() => {
|
|
13978
|
-
return canEdit ?
|
|
13980
|
+
return canEdit ? chunkCTL42ZRR_js.buildReactChartViewModel(element) : null;
|
|
13979
13981
|
}, [canEdit, element, barFacePictureSampleVersion]);
|
|
13980
13982
|
React17.useEffect(pptx.ensureChartInteractionStyles, []);
|
|
13981
13983
|
React17.useEffect(() => {
|
|
@@ -14060,9 +14062,9 @@ function ChartElementView({
|
|
|
14060
14062
|
textStyle: animationState?.textStyle,
|
|
14061
14063
|
onSelect: chart3D.onSelect,
|
|
14062
14064
|
onDrag: chart3D.onDrag,
|
|
14063
|
-
children:
|
|
14065
|
+
children: chunkCTL42ZRR_js.renderChartElement(renderedElement)
|
|
14064
14066
|
}
|
|
14065
|
-
) :
|
|
14067
|
+
) : chunkCTL42ZRR_js.renderChartElement(renderedElement),
|
|
14066
14068
|
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) }),
|
|
14067
14069
|
titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14068
14070
|
"input",
|
|
@@ -14392,7 +14394,7 @@ function ResizeHandles({
|
|
|
14392
14394
|
"aria-label": t("pptx.selectionOverlay.resize", { handle }),
|
|
14393
14395
|
"data-pptx-handle-kind": "resize",
|
|
14394
14396
|
"data-pptx-compact": true,
|
|
14395
|
-
className:
|
|
14397
|
+
className: chunkCTL42ZRR_js.cn(
|
|
14396
14398
|
"absolute z-10 group border-0 bg-transparent p-0",
|
|
14397
14399
|
RESIZE_DEFAULT_CLASSES,
|
|
14398
14400
|
posClass,
|
|
@@ -14418,7 +14420,7 @@ function ResizeHandles({
|
|
|
14418
14420
|
"div",
|
|
14419
14421
|
{
|
|
14420
14422
|
"data-pptx-handle-hit": true,
|
|
14421
|
-
className:
|
|
14423
|
+
className: chunkCTL42ZRR_js.cn(
|
|
14422
14424
|
"absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
|
|
14423
14425
|
corner ? "max-md:-inset-1.5 max-md:[--pptx-handle-hit-inset:-6px]" : "max-md:-inset-2 max-md:[--pptx-handle-hit-inset:-8px]"
|
|
14424
14426
|
),
|
|
@@ -14439,7 +14441,7 @@ function ResizeHandles({
|
|
|
14439
14441
|
"aria-label": t("pptx.selectionOverlay.rotate"),
|
|
14440
14442
|
"data-pptx-handle-kind": "rotate",
|
|
14441
14443
|
"data-pptx-compact": true,
|
|
14442
|
-
className:
|
|
14444
|
+
className: chunkCTL42ZRR_js.cn(
|
|
14443
14445
|
"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",
|
|
14444
14446
|
ROTATE_DEFAULT_CLASSES
|
|
14445
14447
|
),
|
|
@@ -14509,17 +14511,17 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14509
14511
|
animationState,
|
|
14510
14512
|
textStyleOverrideCss
|
|
14511
14513
|
}) {
|
|
14512
|
-
const shapeEl =
|
|
14514
|
+
const shapeEl = (0, chunkCTL42ZRR_js.dist_exports.hasShapeProperties)(el) ? el : void 0;
|
|
14513
14515
|
const viewWidth = Math.max(el.width, 0);
|
|
14514
14516
|
const viewHeight = Math.max(el.height, 0);
|
|
14515
14517
|
const svgWidth = Math.max(el.width, 1);
|
|
14516
14518
|
const svgHeight = Math.max(el.height, 1);
|
|
14517
14519
|
const ss = shapeEl?.shapeStyle;
|
|
14518
14520
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
14519
|
-
const strokeColor =
|
|
14520
|
-
const strokePaint =
|
|
14521
|
-
const dashType =
|
|
14522
|
-
const dashArray =
|
|
14521
|
+
const strokeColor = chunkCTL42ZRR_js.normalizeHexColor(ss?.strokeColor, chunkCTL42ZRR_js.DEFAULT_STROKE_COLOR);
|
|
14522
|
+
const strokePaint = chunkCTL42ZRR_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
|
|
14523
|
+
const dashType = chunkCTL42ZRR_js.normalizeStrokeDashType(ss?.strokeDash);
|
|
14524
|
+
const dashArray = chunkCTL42ZRR_js.getSvgStrokeDasharray(
|
|
14523
14525
|
dashType,
|
|
14524
14526
|
Math.max(strokeWidth, 1),
|
|
14525
14527
|
ss?.customDashSegments
|
|
@@ -14530,14 +14532,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14530
14532
|
const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
14531
14533
|
const startMarkerId = `${markerSeed}-sel-start`;
|
|
14532
14534
|
const endMarkerId = `${markerSeed}-sel-end`;
|
|
14533
|
-
const compoundOffsets =
|
|
14534
|
-
const compoundWidths =
|
|
14535
|
+
const compoundOffsets = chunkCTL42ZRR_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
14536
|
+
const compoundWidths = chunkCTL42ZRR_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
14535
14537
|
const strokeCap = pptx.svgLineCap(ss?.lineCap);
|
|
14536
|
-
const textEl =
|
|
14538
|
+
const textEl = (0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(el) ? el : void 0;
|
|
14537
14539
|
const connectorText = textEl?.text?.trim() ?? "";
|
|
14538
14540
|
const connectorTextSegments = textEl?.textSegments;
|
|
14539
14541
|
const connectorTextStyle = textEl?.textStyle;
|
|
14540
|
-
const pathGeometry = shapeEl ?
|
|
14542
|
+
const pathGeometry = shapeEl ? chunkCTL42ZRR_js.getConnectorPathGeometry(shapeEl) : {
|
|
14541
14543
|
pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
|
|
14542
14544
|
startX: 0,
|
|
14543
14545
|
startY: 0,
|
|
@@ -14546,16 +14548,16 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14546
14548
|
};
|
|
14547
14549
|
const hitTargetWidth = Math.max(strokeWidth * 3, 14);
|
|
14548
14550
|
const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
|
|
14549
|
-
const lineShadow =
|
|
14550
|
-
const lineGlow =
|
|
14551
|
+
const lineShadow = chunkCTL42ZRR_js.buildLineShadowCss(el);
|
|
14552
|
+
const lineGlow = chunkCTL42ZRR_js.buildLineGlowFilter(el);
|
|
14551
14553
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14552
14554
|
"div",
|
|
14553
14555
|
{
|
|
14554
14556
|
"data-pptx-element": "true",
|
|
14555
14557
|
"data-element-id": el.id,
|
|
14556
|
-
role:
|
|
14557
|
-
"aria-label":
|
|
14558
|
-
"aria-roledescription":
|
|
14558
|
+
role: chunkCTL42ZRR_js.getAriaRole(el, { actionable: false }),
|
|
14559
|
+
"aria-label": chunkCTL42ZRR_js.getAriaLabel(el),
|
|
14560
|
+
"aria-roledescription": chunkCTL42ZRR_js.getAriaRoleDescription(el),
|
|
14559
14561
|
"aria-selected": isSelected ? true : void 0,
|
|
14560
14562
|
className: "absolute",
|
|
14561
14563
|
style: {
|
|
@@ -14588,14 +14590,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14588
14590
|
style: { overflow: "visible", pointerEvents: "none" },
|
|
14589
14591
|
children: [
|
|
14590
14592
|
/* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
|
|
14591
|
-
|
|
14593
|
+
chunkCTL42ZRR_js.renderConnectorMarker(
|
|
14592
14594
|
startMarkerId,
|
|
14593
14595
|
startArrow,
|
|
14594
14596
|
strokePaint,
|
|
14595
14597
|
ss?.connectorStartArrowWidth,
|
|
14596
14598
|
ss?.connectorStartArrowLength
|
|
14597
14599
|
),
|
|
14598
|
-
|
|
14600
|
+
chunkCTL42ZRR_js.renderConnectorMarker(
|
|
14599
14601
|
endMarkerId,
|
|
14600
14602
|
endArrow,
|
|
14601
14603
|
strokePaint,
|
|
@@ -14799,14 +14801,14 @@ function getElementInteractionProps({
|
|
|
14799
14801
|
};
|
|
14800
14802
|
}
|
|
14801
14803
|
function renderDagDuotoneFilterForElement(el) {
|
|
14802
|
-
if (!
|
|
14804
|
+
if (!chunkCTL42ZRR_js.hasDagDuotoneEffect(el)) {
|
|
14803
14805
|
return null;
|
|
14804
14806
|
}
|
|
14805
14807
|
const duotone = el.shapeStyle?.dagDuotone;
|
|
14806
14808
|
if (!duotone) {
|
|
14807
14809
|
return null;
|
|
14808
14810
|
}
|
|
14809
|
-
return
|
|
14811
|
+
return chunkCTL42ZRR_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
|
|
14810
14812
|
}
|
|
14811
14813
|
function getContainerStyle({
|
|
14812
14814
|
el,
|
|
@@ -14819,7 +14821,7 @@ function getContainerStyle({
|
|
|
14819
14821
|
has3DExtrusion,
|
|
14820
14822
|
templateEditing
|
|
14821
14823
|
}) {
|
|
14822
|
-
const ss =
|
|
14824
|
+
const ss = (0, chunkCTL42ZRR_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
|
|
14823
14825
|
const isPicture = el.type === "picture" || el.type === "image";
|
|
14824
14826
|
const blurGrowVisible = Boolean(
|
|
14825
14827
|
ss?.blurGrow && typeof ss.blurRadius === "number" && ss.blurRadius > 0
|
|
@@ -14833,10 +14835,10 @@ function getContainerStyle({
|
|
|
14833
14835
|
top: isFullscreenMedia ? fs.top : el.y,
|
|
14834
14836
|
width: isFullscreenMedia ? fs.width : painted.width,
|
|
14835
14837
|
...heightStyle,
|
|
14836
|
-
transform: isFullscreenMedia ? fs.transform :
|
|
14838
|
+
transform: isFullscreenMedia ? fs.transform : chunkCTL42ZRR_js.getElementTransform(el),
|
|
14837
14839
|
transformOrigin: "center",
|
|
14838
14840
|
overflow: overflowValue,
|
|
14839
|
-
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ?
|
|
14841
|
+
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunkCTL42ZRR_js.getCropShapeClipPath(el) : void 0,
|
|
14840
14842
|
zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
|
|
14841
14843
|
visibility: animationState?.visible === false ? "hidden" : "visible",
|
|
14842
14844
|
animation: animationState?.cssAnimation,
|
|
@@ -14868,11 +14870,11 @@ function getContainerStyle({
|
|
|
14868
14870
|
};
|
|
14869
14871
|
}
|
|
14870
14872
|
function shapeParams(element) {
|
|
14871
|
-
const style =
|
|
14873
|
+
const style = (0, chunkCTL42ZRR_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
|
|
14872
14874
|
const strokeWidth = pptx.paintedStrokeWidth(style);
|
|
14873
|
-
const strokeColor =
|
|
14874
|
-
const fillColor =
|
|
14875
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
14875
|
+
const strokeColor = chunkCTL42ZRR_js.normalizeHexColor(style?.strokeColor, chunkCTL42ZRR_js.DEFAULT_STROKE_COLOR);
|
|
14876
|
+
const fillColor = chunkCTL42ZRR_js.normalizeHexColor(style?.fillColor, chunkCTL42ZRR_js.DEFAULT_FILL_COLOR);
|
|
14877
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkCTL42ZRR_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
14876
14878
|
return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
|
|
14877
14879
|
}
|
|
14878
14880
|
var Extrusion3DOverlay = React17__default.default.memo(
|
|
@@ -14977,7 +14979,7 @@ function ShapeEffectOverlay({
|
|
|
14977
14979
|
const fillOverlayStyle = overlay ? {
|
|
14978
14980
|
position: "absolute",
|
|
14979
14981
|
inset: 0,
|
|
14980
|
-
...
|
|
14982
|
+
...(0, chunkCTL42ZRR_js.dist_exports.isImageLikeElement)(element) ? chunkCTL42ZRR_js.getImageSurfaceMaskStyle(element) : {},
|
|
14981
14983
|
background: overlay.color,
|
|
14982
14984
|
mixBlendMode: overlay.blendMode,
|
|
14983
14985
|
pointerEvents: "none"
|
|
@@ -15176,10 +15178,10 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15176
15178
|
const allow = pptx.resolveElementInteractivity(el);
|
|
15177
15179
|
const backgroundAnimationState = presentationElementStates?.get(`${el.id}::pptx-bg`);
|
|
15178
15180
|
const visualAnimationState = backgroundAnimationState ?? animationState;
|
|
15179
|
-
const isTxt =
|
|
15180
|
-
const txtSE =
|
|
15181
|
+
const isTxt = chunkCTL42ZRR_js.isEditableTextElement(el) && allow.textEditable;
|
|
15182
|
+
const txtSE = (0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(el) ? el.textStyle : void 0;
|
|
15181
15183
|
const textStyleOverrideCss = pptx.buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
|
|
15182
|
-
const ss =
|
|
15184
|
+
const ss = chunkCTL42ZRR_js.getShapeVisualStyle(
|
|
15183
15185
|
el,
|
|
15184
15186
|
hf,
|
|
15185
15187
|
fc,
|
|
@@ -15188,9 +15190,9 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15188
15190
|
visualAnimationState?.animatesFill,
|
|
15189
15191
|
visualAnimationState?.animatesStroke
|
|
15190
15192
|
);
|
|
15191
|
-
const ts =
|
|
15193
|
+
const ts = chunkCTL42ZRR_js.getTextStyleForElement(el, chunkCTL42ZRR_js.DEFAULT_TEXT_COLOR);
|
|
15192
15194
|
const isImg = el.type === "picture" || el.type === "image";
|
|
15193
|
-
const vs =
|
|
15195
|
+
const vs = chunkCTL42ZRR_js.renderVectorShape(
|
|
15194
15196
|
el,
|
|
15195
15197
|
isImg ? false : hf,
|
|
15196
15198
|
fc,
|
|
@@ -15200,10 +15202,10 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15200
15202
|
visualAnimationState?.animatesStroke
|
|
15201
15203
|
);
|
|
15202
15204
|
const isModel3D = el.type === "model3d";
|
|
15203
|
-
const isConn =
|
|
15204
|
-
const shapeStyle3d =
|
|
15205
|
+
const isConn = chunkCTL42ZRR_js.isConnectorOrLineElement(el);
|
|
15206
|
+
const shapeStyle3d = (0, chunkCTL42ZRR_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
|
|
15205
15207
|
const extrusionData = React17.useMemo(
|
|
15206
|
-
() =>
|
|
15208
|
+
() => chunkCTL42ZRR_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
|
|
15207
15209
|
[shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
|
|
15208
15210
|
);
|
|
15209
15211
|
const actionAffordance = useActionAffordance(el, canInteract);
|
|
@@ -15292,7 +15294,7 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15292
15294
|
"aria-hidden": aria.hidden ? true : void 0,
|
|
15293
15295
|
"aria-selected": isSelected ? true : void 0,
|
|
15294
15296
|
tabIndex: isFocusable ? 0 : -1,
|
|
15295
|
-
className:
|
|
15297
|
+
className: chunkCTL42ZRR_js.cn(
|
|
15296
15298
|
"absolute",
|
|
15297
15299
|
"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
|
|
15298
15300
|
cur,
|
|
@@ -15380,9 +15382,9 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15380
15382
|
txtSE,
|
|
15381
15383
|
txtS: ts,
|
|
15382
15384
|
vecShape: backgroundAnimationState && !isImg ? null : vs,
|
|
15383
|
-
imgStyle:
|
|
15384
|
-
imgFilter:
|
|
15385
|
-
imgOpacity:
|
|
15385
|
+
imgStyle: chunkCTL42ZRR_js.getImageRenderStyle(el),
|
|
15386
|
+
imgFilter: chunkCTL42ZRR_js.getImageEffectsFilter(el),
|
|
15387
|
+
imgOpacity: chunkCTL42ZRR_js.getImageEffectsOpacity(el),
|
|
15386
15388
|
imgAlt: imageAltText,
|
|
15387
15389
|
isTxtEl: isTxt,
|
|
15388
15390
|
media: mediaDataUrls,
|
|
@@ -15504,10 +15506,10 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
|
|
|
15504
15506
|
}
|
|
15505
15507
|
function renderInk(el, options) {
|
|
15506
15508
|
const replay = options?.replay ?? false;
|
|
15507
|
-
const strokes =
|
|
15509
|
+
const strokes = chunkCTL42ZRR_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
|
|
15508
15510
|
strokes.some((s) => s.circles || s.nibMarks);
|
|
15509
15511
|
const pressureSensitive = options?.pressureSensitive;
|
|
15510
|
-
const replayStyles = replay ?
|
|
15512
|
+
const replayStyles = replay ? chunkCTL42ZRR_js.getInkReplayStyles(el, options?.replayConfig) : null;
|
|
15511
15513
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15512
15514
|
"svg",
|
|
15513
15515
|
{
|
|
@@ -15515,7 +15517,7 @@ function renderInk(el, options) {
|
|
|
15515
15517
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
15516
15518
|
preserveAspectRatio: "none",
|
|
15517
15519
|
children: [
|
|
15518
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
15520
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkCTL42ZRR_js.INK_REPLAY_KEYFRAMES }),
|
|
15519
15521
|
strokes.map(
|
|
15520
15522
|
(s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
|
|
15521
15523
|
)
|
|
@@ -15526,7 +15528,7 @@ function renderInk(el, options) {
|
|
|
15526
15528
|
function renderGroup(children, parentGroupFill) {
|
|
15527
15529
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: pptx.filterRenderedElements(children).map((c, childIndex) => {
|
|
15528
15530
|
const { hf, fc, sw, sc } = shapeParams(c);
|
|
15529
|
-
const baseSs =
|
|
15531
|
+
const baseSs = chunkCTL42ZRR_js.getShapeVisualStyle(c, hf, fc, sw, sc);
|
|
15530
15532
|
const inheritedFill = pptx.resolveGroupChildFill(c, parentGroupFill);
|
|
15531
15533
|
const ss = inheritedFill ? {
|
|
15532
15534
|
...baseSs,
|
|
@@ -15537,9 +15539,9 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15537
15539
|
backgroundPosition: inheritedFill.backgroundPosition
|
|
15538
15540
|
} : baseSs;
|
|
15539
15541
|
const isI = c.type === "picture" || c.type === "image";
|
|
15540
|
-
const vs =
|
|
15541
|
-
const ts =
|
|
15542
|
-
const isTxt =
|
|
15542
|
+
const vs = chunkCTL42ZRR_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
|
|
15543
|
+
const ts = chunkCTL42ZRR_js.getTextStyleForElement(c, chunkCTL42ZRR_js.DEFAULT_TEXT_COLOR);
|
|
15544
|
+
const isTxt = chunkCTL42ZRR_js.isEditableTextElement(c);
|
|
15543
15545
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15544
15546
|
"div",
|
|
15545
15547
|
{
|
|
@@ -15548,9 +15550,9 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15548
15550
|
style: {
|
|
15549
15551
|
left: c.x,
|
|
15550
15552
|
top: c.y,
|
|
15551
|
-
width: Math.max(c.width,
|
|
15552
|
-
height: Math.max(c.height,
|
|
15553
|
-
transform:
|
|
15553
|
+
width: Math.max(c.width, chunkCTL42ZRR_js.MIN_ELEMENT_SIZE),
|
|
15554
|
+
height: Math.max(c.height, chunkCTL42ZRR_js.MIN_ELEMENT_SIZE),
|
|
15555
|
+
transform: chunkCTL42ZRR_js.getElementTransform(c),
|
|
15554
15556
|
transformOrigin: "center",
|
|
15555
15557
|
...ss,
|
|
15556
15558
|
...isI ? {
|
|
@@ -15575,8 +15577,8 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15575
15577
|
// A nested group: recurse, chaining the inherited fill so a
|
|
15576
15578
|
// `grpFill` shape under a fill-less sub-group still paints.
|
|
15577
15579
|
renderGroup(c.children, pptx.getGroupChildParentFill(c, parentGroupFill))
|
|
15578
|
-
) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style:
|
|
15579
|
-
|
|
15580
|
+
) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunkCTL42ZRR_js.getImageSurfaceStyle(c), children: [
|
|
15581
|
+
chunkCTL42ZRR_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15580
15582
|
TiledImageLayer,
|
|
15581
15583
|
{
|
|
15582
15584
|
element: c,
|
|
@@ -15589,7 +15591,7 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15589
15591
|
src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
|
|
15590
15592
|
alt: i18n.translationsEn["pptx.ink.groupChildAlt"],
|
|
15591
15593
|
className: "pointer-events-none select-none",
|
|
15592
|
-
style:
|
|
15594
|
+
style: chunkCTL42ZRR_js.getImageRenderStyle(c),
|
|
15593
15595
|
draggable: false
|
|
15594
15596
|
}
|
|
15595
15597
|
),
|
|
@@ -15601,7 +15603,7 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15601
15603
|
{
|
|
15602
15604
|
className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
|
|
15603
15605
|
style: ts,
|
|
15604
|
-
children:
|
|
15606
|
+
children: chunkCTL42ZRR_js.renderTextSegments(c, chunkCTL42ZRR_js.DEFAULT_TEXT_COLOR)
|
|
15605
15607
|
}
|
|
15606
15608
|
) : null
|
|
15607
15609
|
] })
|
|
@@ -15615,8 +15617,8 @@ function renderContentPart(el, options) {
|
|
|
15615
15617
|
if (el.inkStrokes && el.inkStrokes.length > 0) {
|
|
15616
15618
|
const replay = options?.replay ?? false;
|
|
15617
15619
|
const pressureSensitive = options?.pressureSensitive ?? true;
|
|
15618
|
-
const strokes =
|
|
15619
|
-
const replayStyles = replay ?
|
|
15620
|
+
const strokes = chunkCTL42ZRR_js.buildContentPartStrokes(el);
|
|
15621
|
+
const replayStyles = replay ? chunkCTL42ZRR_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
|
|
15620
15622
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15621
15623
|
"svg",
|
|
15622
15624
|
{
|
|
@@ -15624,7 +15626,7 @@ function renderContentPart(el, options) {
|
|
|
15624
15626
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
15625
15627
|
preserveAspectRatio: "none",
|
|
15626
15628
|
children: [
|
|
15627
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
15629
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkCTL42ZRR_js.INK_REPLAY_KEYFRAMES }),
|
|
15628
15630
|
strokes.map(
|
|
15629
15631
|
(s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
|
|
15630
15632
|
)
|
|
@@ -15851,9 +15853,9 @@ function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
|
|
|
15851
15853
|
collaboration: connected,
|
|
15852
15854
|
model: pptx.createInlineListModelObserver(element),
|
|
15853
15855
|
activationSelection,
|
|
15854
|
-
children: seed && !connected ?
|
|
15856
|
+
children: seed && !connected ? chunkCTL42ZRR_js.renderTextSegments(
|
|
15855
15857
|
element,
|
|
15856
|
-
|
|
15858
|
+
chunkCTL42ZRR_js.DEFAULT_TEXT_COLOR,
|
|
15857
15859
|
void 0,
|
|
15858
15860
|
void 0,
|
|
15859
15861
|
void 0,
|
|
@@ -16023,7 +16025,7 @@ function InlineTextEditor({
|
|
|
16023
16025
|
seedRef.current = {
|
|
16024
16026
|
initialText,
|
|
16025
16027
|
hasRichSegments: Boolean(
|
|
16026
|
-
|
|
16028
|
+
(0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(element) && element.textSegments && element.textSegments.length > 0
|
|
16027
16029
|
)
|
|
16028
16030
|
};
|
|
16029
16031
|
}
|
|
@@ -16089,8 +16091,8 @@ function InlineTextEditor({
|
|
|
16089
16091
|
pending.endOffset
|
|
16090
16092
|
);
|
|
16091
16093
|
});
|
|
16092
|
-
const warpStyle =
|
|
16093
|
-
const compensationTransform =
|
|
16094
|
+
const warpStyle = chunkCTL42ZRR_js.getTextWarpStyle(textStyleRaw);
|
|
16095
|
+
const compensationTransform = chunkCTL42ZRR_js.getTextCompensationTransform(element);
|
|
16094
16096
|
const warpTransform = warpStyle?.transform;
|
|
16095
16097
|
const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
|
|
16096
16098
|
const wrapperStyle = {
|
|
@@ -16101,7 +16103,7 @@ function InlineTextEditor({
|
|
|
16101
16103
|
transformOrigin: warpStyle?.transformOrigin || "center"
|
|
16102
16104
|
};
|
|
16103
16105
|
const nextInlineStyleValue = (property) => {
|
|
16104
|
-
if (!
|
|
16106
|
+
if (!(0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(element)) {
|
|
16105
16107
|
return true;
|
|
16106
16108
|
}
|
|
16107
16109
|
const result = pptx.getInlineEditorSelectionResult(element.textSegments);
|
|
@@ -16177,7 +16179,7 @@ function InlineTextEditor({
|
|
|
16177
16179
|
const text = e.clipboardData.getData("text/plain");
|
|
16178
16180
|
document.execCommand("insertText", false, text);
|
|
16179
16181
|
},
|
|
16180
|
-
children: list.seed ? list.children : seed.hasRichSegments ?
|
|
16182
|
+
children: list.seed ? list.children : seed.hasRichSegments ? chunkCTL42ZRR_js.renderTextSegments(element, chunkCTL42ZRR_js.DEFAULT_TEXT_COLOR) : seed.initialText
|
|
16181
16183
|
},
|
|
16182
16184
|
list.seed?.paragraphs[0].token ?? "plain"
|
|
16183
16185
|
);
|
|
@@ -16188,7 +16190,7 @@ function FailedToLoad() {
|
|
|
16188
16190
|
var LazyModel3DScene = React17__default.default.lazy(
|
|
16189
16191
|
async () => {
|
|
16190
16192
|
try {
|
|
16191
|
-
return await import('./Model3DScene-
|
|
16193
|
+
return await import('./Model3DScene-KYIYYLMY.js');
|
|
16192
16194
|
} catch {
|
|
16193
16195
|
return { default: FailedToLoad };
|
|
16194
16196
|
}
|
|
@@ -16269,7 +16271,7 @@ function Model3DRenderer({ element, width, height, interactive }) {
|
|
|
16269
16271
|
const [threeAvailable, setThreeAvailable] = React17.useState(null);
|
|
16270
16272
|
React17.useEffect(() => {
|
|
16271
16273
|
let cancelled = false;
|
|
16272
|
-
import('./three.module-
|
|
16274
|
+
import('./three.module-LS32MK23.js').then(() => {
|
|
16273
16275
|
if (!cancelled) {
|
|
16274
16276
|
setThreeAvailable(true);
|
|
16275
16277
|
}
|
|
@@ -17114,7 +17116,7 @@ function SmartArtRendererImpl({
|
|
|
17114
17116
|
if (!onUpdateElement || !pptx.shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
|
|
17115
17117
|
return;
|
|
17116
17118
|
}
|
|
17117
|
-
const updated =
|
|
17119
|
+
const updated = (0, chunkCTL42ZRR_js.dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text);
|
|
17118
17120
|
const box = { width: element.width, height: element.height };
|
|
17119
17121
|
const reflowed = pptx.rebuildDrawingShapesIfCleared(
|
|
17120
17122
|
updated,
|
|
@@ -17130,7 +17132,7 @@ function SmartArtRendererImpl({
|
|
|
17130
17132
|
if (!onUpdateElement) {
|
|
17131
17133
|
return;
|
|
17132
17134
|
}
|
|
17133
|
-
const next =
|
|
17135
|
+
const next = (0, chunkCTL42ZRR_js.dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, { fillColor: fill });
|
|
17134
17136
|
if (next !== smartArtData) {
|
|
17135
17137
|
const box = { width: element.width, height: element.height };
|
|
17136
17138
|
const reflowed = pptx.rebuildDrawingShapesIfCleared(
|
|
@@ -17324,7 +17326,7 @@ function groupIntoParagraphs(element, fieldContext) {
|
|
|
17324
17326
|
element,
|
|
17325
17327
|
fieldContext ? (seg) => {
|
|
17326
17328
|
if (seg.fieldType) {
|
|
17327
|
-
const substituted =
|
|
17329
|
+
const substituted = chunkCTL42ZRR_js.substituteFieldText(
|
|
17328
17330
|
seg.text,
|
|
17329
17331
|
seg.fieldType,
|
|
17330
17332
|
fieldContext,
|
|
@@ -17359,13 +17361,13 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
|
|
|
17359
17361
|
if (s.strikethrough) {
|
|
17360
17362
|
decos.push("line-through");
|
|
17361
17363
|
}
|
|
17362
|
-
const fill = s.hyperlink ?
|
|
17364
|
+
const fill = s.hyperlink ? chunkCTL42ZRR_js.normalizeHexColor(s.color || element.textStyle?.color, chunkCTL42ZRR_js.HYPERLINK_COLOR) : chunkCTL42ZRR_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
|
|
17363
17365
|
return {
|
|
17364
17366
|
fill,
|
|
17365
|
-
fontSize: s.fontSize ?? element.textStyle?.fontSize ??
|
|
17367
|
+
fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunkCTL42ZRR_js.DEFAULT_TEXT_FONT_SIZE,
|
|
17366
17368
|
fontWeight: s.bold ? 700 : 400,
|
|
17367
17369
|
fontStyle: s.italic ? "italic" : void 0,
|
|
17368
|
-
fontFamily: s.fontFamily || element.textStyle?.fontFamily ?
|
|
17370
|
+
fontFamily: s.fontFamily || element.textStyle?.fontFamily ? (0, chunkCTL42ZRR_js.dist_exports.getSubstituteFontFamily)(s.fontFamily || element.textStyle?.fontFamily || "") : chunkCTL42ZRR_js.DEFAULT_FONT_FAMILY,
|
|
17369
17371
|
textDecoration: decos.length > 0 ? decos.join(" ") : void 0
|
|
17370
17372
|
};
|
|
17371
17373
|
}
|
|
@@ -17373,8 +17375,8 @@ function resolveSegmentFont(segment, element) {
|
|
|
17373
17375
|
const s = segment.style || {};
|
|
17374
17376
|
const family = s.fontFamily || element.textStyle?.fontFamily;
|
|
17375
17377
|
return {
|
|
17376
|
-
fontFamily: family ?
|
|
17377
|
-
fontSizePx: s.fontSize ?? element.textStyle?.fontSize ??
|
|
17378
|
+
fontFamily: family ? (0, chunkCTL42ZRR_js.dist_exports.getSubstituteFontFamily)(family) : chunkCTL42ZRR_js.DEFAULT_FONT_FAMILY,
|
|
17379
|
+
fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunkCTL42ZRR_js.DEFAULT_TEXT_FONT_SIZE,
|
|
17378
17380
|
bold: s.bold ?? element.textStyle?.bold,
|
|
17379
17381
|
italic: s.italic ?? element.textStyle?.italic
|
|
17380
17382
|
};
|
|
@@ -17440,7 +17442,7 @@ function WarpedText({
|
|
|
17440
17442
|
fallbackColor,
|
|
17441
17443
|
fieldContext
|
|
17442
17444
|
}) {
|
|
17443
|
-
if (!
|
|
17445
|
+
if (!(0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(element)) {
|
|
17444
17446
|
return null;
|
|
17445
17447
|
}
|
|
17446
17448
|
const textEl = element;
|
|
@@ -17458,9 +17460,9 @@ function WarpedText({
|
|
|
17458
17460
|
const warpAdj2 = textEl.textStyle?.textWarpAdj2;
|
|
17459
17461
|
const align = textEl.textStyle?.align ?? "center";
|
|
17460
17462
|
const { startOffset, textAnchor } = getAlignmentProps(align);
|
|
17461
|
-
const baseFontSize = textEl.textStyle?.fontSize ??
|
|
17462
|
-
const baseFontFamily = textEl.textStyle?.fontFamily ?
|
|
17463
|
-
const baseFill =
|
|
17463
|
+
const baseFontSize = textEl.textStyle?.fontSize ?? chunkCTL42ZRR_js.DEFAULT_TEXT_FONT_SIZE;
|
|
17464
|
+
const baseFontFamily = textEl.textStyle?.fontFamily ? (0, chunkCTL42ZRR_js.dist_exports.getSubstituteFontFamily)(textEl.textStyle.fontFamily) : chunkCTL42ZRR_js.DEFAULT_FONT_FAMILY;
|
|
17465
|
+
const baseFill = chunkCTL42ZRR_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
|
|
17464
17466
|
if (pptx.hasGlyphEnvelope(preset)) {
|
|
17465
17467
|
const perLine = pptx.buildGlyphEnvelopeBlock(
|
|
17466
17468
|
preset,
|
|
@@ -17560,7 +17562,7 @@ function WarpedText({
|
|
|
17560
17562
|
);
|
|
17561
17563
|
}
|
|
17562
17564
|
var GLYPH_BY_SHAPE = Object.fromEntries(
|
|
17563
|
-
|
|
17565
|
+
chunkCTL42ZRR_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
|
|
17564
17566
|
);
|
|
17565
17567
|
GLYPH_BY_SHAPE["actionButtonForwardOrNext"] = GLYPH_BY_SHAPE["actionButtonForwardNext"];
|
|
17566
17568
|
GLYPH_BY_SHAPE["actionButtonBackOrPrevious"] = GLYPH_BY_SHAPE["actionButtonBackPrevious"];
|
|
@@ -17630,11 +17632,11 @@ function renderTextElementBody(options) {
|
|
|
17630
17632
|
const isLinkedTextBox = pptx.isLinkedTextBox(el);
|
|
17631
17633
|
const linkedSegments = pptx.getOverflowSegments(el, slideElements);
|
|
17632
17634
|
const useSvgWarp = pptx.shouldUseSvgWarp(
|
|
17633
|
-
|
|
17635
|
+
(0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(el) ? el.textStyle?.textWarpPreset : void 0
|
|
17634
17636
|
);
|
|
17635
|
-
const scene3dStyle =
|
|
17637
|
+
const scene3dStyle = (0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(el) ? chunkCTL42ZRR_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
|
|
17636
17638
|
const rotationTransform = pptx.getTextBodyRotationTransform(el);
|
|
17637
|
-
const composedTransform = [rotationTransform,
|
|
17639
|
+
const composedTransform = [rotationTransform, chunkCTL42ZRR_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
|
|
17638
17640
|
const transformStyle = {
|
|
17639
17641
|
transform: composedTransform,
|
|
17640
17642
|
// A COM-measured homography (`scene3dStyle.transformOrigin === '0 0'`)
|
|
@@ -17664,18 +17666,18 @@ function renderTextElementBody(options) {
|
|
|
17664
17666
|
shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
17665
17667
|
"div",
|
|
17666
17668
|
{
|
|
17667
|
-
className:
|
|
17669
|
+
className: chunkCTL42ZRR_js.cn(
|
|
17668
17670
|
"relative z-10 w-full h-full",
|
|
17669
17671
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
17670
17672
|
),
|
|
17671
|
-
style: { ...
|
|
17673
|
+
style: { ...chunkCTL42ZRR_js.getTextLayoutStyle(el), ...transformStyle },
|
|
17672
17674
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17673
17675
|
WarpedText,
|
|
17674
17676
|
{
|
|
17675
17677
|
element: el,
|
|
17676
17678
|
width: el.width,
|
|
17677
17679
|
height: el.height,
|
|
17678
|
-
fallbackColor:
|
|
17680
|
+
fallbackColor: chunkCTL42ZRR_js.DEFAULT_TEXT_COLOR,
|
|
17679
17681
|
findHighlights: findHl,
|
|
17680
17682
|
fieldContext
|
|
17681
17683
|
}
|
|
@@ -17684,19 +17686,19 @@ function renderTextElementBody(options) {
|
|
|
17684
17686
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
17685
17687
|
"div",
|
|
17686
17688
|
{
|
|
17687
|
-
className:
|
|
17689
|
+
className: chunkCTL42ZRR_js.cn(
|
|
17688
17690
|
"relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
|
|
17689
17691
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
17690
17692
|
),
|
|
17691
17693
|
style: {
|
|
17692
|
-
...
|
|
17694
|
+
...chunkCTL42ZRR_js.getTextLayoutStyle(el),
|
|
17693
17695
|
...txtS,
|
|
17694
|
-
...
|
|
17696
|
+
...chunkCTL42ZRR_js.getTextWarpStyle(txtSE),
|
|
17695
17697
|
...transformStyle
|
|
17696
17698
|
},
|
|
17697
|
-
children:
|
|
17699
|
+
children: chunkCTL42ZRR_js.renderTextSegments(
|
|
17698
17700
|
el,
|
|
17699
|
-
|
|
17701
|
+
chunkCTL42ZRR_js.DEFAULT_TEXT_COLOR,
|
|
17700
17702
|
void 0,
|
|
17701
17703
|
findHl,
|
|
17702
17704
|
onHyperlinkClick,
|
|
@@ -18014,7 +18016,7 @@ function renderBody(options) {
|
|
|
18014
18016
|
);
|
|
18015
18017
|
}
|
|
18016
18018
|
if (isImg) {
|
|
18017
|
-
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: chunkCTL42ZRR_js.getImageSurfaceStyle(el), children: [
|
|
18018
18020
|
renderImg(el, imgStyle, imgFilter, imgAlt, imgOpacity),
|
|
18019
18021
|
vecShape ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", children: vecShape }) : null
|
|
18020
18022
|
] });
|
|
@@ -18031,7 +18033,7 @@ function renderBody(options) {
|
|
|
18031
18033
|
textDirection: txtSE?.textDirection,
|
|
18032
18034
|
textStyle: txtS,
|
|
18033
18035
|
textStyleRaw: txtSE,
|
|
18034
|
-
layoutStyle:
|
|
18036
|
+
layoutStyle: chunkCTL42ZRR_js.getTextLayoutStyle(el),
|
|
18035
18037
|
element: el,
|
|
18036
18038
|
onCommit,
|
|
18037
18039
|
onCancel,
|
|
@@ -18042,7 +18044,7 @@ function renderBody(options) {
|
|
|
18042
18044
|
] });
|
|
18043
18045
|
}
|
|
18044
18046
|
if (el.type === "table") {
|
|
18045
|
-
return
|
|
18047
|
+
return chunkCTL42ZRR_js.renderTableElement(el, txtS, {
|
|
18046
18048
|
editable: isSel,
|
|
18047
18049
|
selectedCell: isSel ? tableSt : null,
|
|
18048
18050
|
onSelectCell: onCellSel,
|
|
@@ -18075,7 +18077,7 @@ function renderBody(options) {
|
|
|
18075
18077
|
);
|
|
18076
18078
|
}
|
|
18077
18079
|
if (el.type === "media") {
|
|
18078
|
-
return
|
|
18080
|
+
return chunkCTL42ZRR_js.renderMediaElement(el, media, {
|
|
18079
18081
|
// Present mode autoplays every media element on the active slide,
|
|
18080
18082
|
// not only ones persisted with their own `autoPlay` flag (matching
|
|
18081
18083
|
// the other four bindings' unconditional `presenting`-gated
|
|
@@ -18098,7 +18100,7 @@ function renderBody(options) {
|
|
|
18098
18100
|
onPlayStateChange: handleMediaPlayStateChange
|
|
18099
18101
|
});
|
|
18100
18102
|
}
|
|
18101
|
-
if (doInk &&
|
|
18103
|
+
if (doInk && (0, chunkCTL42ZRR_js.dist_exports.isInkElement)(el)) {
|
|
18102
18104
|
return renderInk(el, {
|
|
18103
18105
|
replay: isPresentationPassive,
|
|
18104
18106
|
pressureSensitive: true
|
|
@@ -18127,27 +18129,27 @@ function renderBody(options) {
|
|
|
18127
18129
|
}
|
|
18128
18130
|
return renderGroup(el.children, pptx.getGroupChildParentFill(el));
|
|
18129
18131
|
}
|
|
18130
|
-
if (
|
|
18131
|
-
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 (chunkCTL42ZRR_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: chunkCTL42ZRR_js.getElementLabel(el) });
|
|
18132
18134
|
}
|
|
18133
18135
|
return renderTextElementBody(options);
|
|
18134
18136
|
}
|
|
18135
18137
|
function defaultTextColorForFill(fillColor) {
|
|
18136
18138
|
const hex = String(fillColor ?? "").replace(/^#/u, "");
|
|
18137
18139
|
if (!/^[0-9a-f]{6}$/iu.test(hex)) {
|
|
18138
|
-
return
|
|
18140
|
+
return chunkCTL42ZRR_js.DEFAULT_TEXT_COLOR;
|
|
18139
18141
|
}
|
|
18140
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);
|
|
18141
18143
|
const luminance = channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
|
|
18142
|
-
return luminance > 0.179 ?
|
|
18144
|
+
return luminance > 0.179 ? chunkCTL42ZRR_js.DEFAULT_TEXT_COLOR : "#ffffff";
|
|
18143
18145
|
}
|
|
18144
18146
|
function getStaticElementVisualState(element, parentGroupFill) {
|
|
18145
|
-
const style =
|
|
18146
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
18147
|
-
const fill =
|
|
18147
|
+
const style = (0, chunkCTL42ZRR_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
|
|
18148
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkCTL42ZRR_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
18149
|
+
const fill = chunkCTL42ZRR_js.normalizeHexColor(style?.fillColor, chunkCTL42ZRR_js.DEFAULT_FILL_COLOR);
|
|
18148
18150
|
const strokeWidth = pptx.paintedStrokeWidth(style);
|
|
18149
|
-
const stroke =
|
|
18150
|
-
const baseVisualStyle =
|
|
18151
|
+
const stroke = chunkCTL42ZRR_js.normalizeHexColor(style?.strokeColor, chunkCTL42ZRR_js.DEFAULT_STROKE_COLOR);
|
|
18152
|
+
const baseVisualStyle = chunkCTL42ZRR_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
|
|
18151
18153
|
const inheritedFill = pptx.resolveGroupChildFill(element, parentGroupFill);
|
|
18152
18154
|
const visualStyle = inheritedFill ? {
|
|
18153
18155
|
...baseVisualStyle,
|
|
@@ -18157,13 +18159,13 @@ function getStaticElementVisualState(element, parentGroupFill) {
|
|
|
18157
18159
|
backgroundSize: inheritedFill.backgroundSize,
|
|
18158
18160
|
backgroundPosition: inheritedFill.backgroundPosition
|
|
18159
18161
|
} : baseVisualStyle;
|
|
18160
|
-
const textStyle =
|
|
18162
|
+
const textStyle = chunkCTL42ZRR_js.getTextStyleForElement(
|
|
18161
18163
|
element,
|
|
18162
|
-
element.type === "shape" && hasFill ? defaultTextColorForFill(fill) :
|
|
18164
|
+
element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunkCTL42ZRR_js.DEFAULT_TEXT_COLOR
|
|
18163
18165
|
);
|
|
18164
18166
|
const isImage = element.type === "picture" || element.type === "image";
|
|
18165
|
-
const letsTextOverflow =
|
|
18166
|
-
const shapeType =
|
|
18167
|
+
const letsTextOverflow = (0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
18168
|
+
const shapeType = (0, chunkCTL42ZRR_js.dist_exports.hasShapeProperties)(element) ? element.shapeType : void 0;
|
|
18167
18169
|
const isCallout = pptx.isWedgeCalloutPresetShape(shapeType) || String(shapeType ?? "").toLowerCase().includes("callout");
|
|
18168
18170
|
return {
|
|
18169
18171
|
hasFill,
|
|
@@ -18184,7 +18186,7 @@ function getStaticElementInteractionState(element, hasActionHandler, exposeEleme
|
|
|
18184
18186
|
return { action, isActionable, contractRole };
|
|
18185
18187
|
}
|
|
18186
18188
|
function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
|
|
18187
|
-
const overflowClass = visual.isImage || element.type === "group" ||
|
|
18189
|
+
const overflowClass = visual.isImage || element.type === "group" || chunkCTL42ZRR_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
|
|
18188
18190
|
const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
|
|
18189
18191
|
return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
|
|
18190
18192
|
}
|
|
@@ -18267,7 +18269,7 @@ function StaticElementRendererImpl({
|
|
|
18267
18269
|
top: positioned ? element.y : void 0,
|
|
18268
18270
|
width: positioned ? Math.max(element.width, 1) : "100%",
|
|
18269
18271
|
height: positioned ? Math.max(element.height, 1) : "100%",
|
|
18270
|
-
transform: positioned ?
|
|
18272
|
+
transform: positioned ? chunkCTL42ZRR_js.getElementTransform(element) : void 0,
|
|
18271
18273
|
transformOrigin: "center",
|
|
18272
18274
|
zIndex,
|
|
18273
18275
|
...visualStyle,
|
|
@@ -18308,20 +18310,20 @@ function StaticElementRendererImpl({
|
|
|
18308
18310
|
isEditing: false,
|
|
18309
18311
|
editText: "",
|
|
18310
18312
|
spellCheck: false,
|
|
18311
|
-
txtSE:
|
|
18313
|
+
txtSE: (0, chunkCTL42ZRR_js.dist_exports.hasTextProperties)(element) ? element.textStyle : void 0,
|
|
18312
18314
|
txtS: textStyle,
|
|
18313
|
-
vecShape:
|
|
18315
|
+
vecShape: chunkCTL42ZRR_js.renderVectorShape(
|
|
18314
18316
|
element,
|
|
18315
18317
|
isImage ? false : hasFill,
|
|
18316
18318
|
fill,
|
|
18317
18319
|
strokeWidth,
|
|
18318
18320
|
stroke
|
|
18319
18321
|
),
|
|
18320
|
-
imgStyle: imageAnimation ? { ...
|
|
18321
|
-
imgFilter:
|
|
18322
|
-
imgOpacity:
|
|
18322
|
+
imgStyle: imageAnimation ? { ...chunkCTL42ZRR_js.getImageRenderStyle(element), animation: imageAnimation } : chunkCTL42ZRR_js.getImageRenderStyle(element),
|
|
18323
|
+
imgFilter: chunkCTL42ZRR_js.getImageEffectsFilter(element),
|
|
18324
|
+
imgOpacity: chunkCTL42ZRR_js.getImageEffectsOpacity(element),
|
|
18323
18325
|
imgAlt: "",
|
|
18324
|
-
isTxtEl:
|
|
18326
|
+
isTxtEl: chunkCTL42ZRR_js.isEditableTextElement(element),
|
|
18325
18327
|
media: mediaDataUrls,
|
|
18326
18328
|
tableSt: null,
|
|
18327
18329
|
isSel: false,
|
|
@@ -18366,7 +18368,7 @@ function SlideLayer({
|
|
|
18366
18368
|
style: {
|
|
18367
18369
|
width: safeWidth,
|
|
18368
18370
|
height: safeHeight,
|
|
18369
|
-
backgroundColor: slide.backgroundColor ?
|
|
18371
|
+
backgroundColor: slide.backgroundColor ? chunkCTL42ZRR_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
|
|
18370
18372
|
backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
|
|
18371
18373
|
backgroundSize: slide.backgroundImage ? "cover" : void 0,
|
|
18372
18374
|
backgroundPosition: slide.backgroundImage ? "center" : void 0
|