pptx-react-viewer 4.36.2 → 4.37.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 +13 -0
- package/dist/{AiChatPanel-CX74JT77.mjs → AiChatPanel-5O6PHRSH.mjs} +1 -1
- package/dist/AiChatPanel-5O6PHRSH.mjs.br +0 -0
- package/dist/AiChatPanel-5O6PHRSH.mjs.gz +0 -0
- package/dist/{AiChatPanel-PVRSPIAY.js → AiChatPanel-FNHDAKPB.js} +9 -9
- package/dist/AiChatPanel-FNHDAKPB.js.br +0 -0
- package/dist/AiChatPanel-FNHDAKPB.js.gz +0 -0
- package/dist/{chunk-4MGJUBY7.js → chunk-43TOUP5U.js} +6 -3
- package/dist/chunk-43TOUP5U.js.br +0 -0
- package/dist/chunk-43TOUP5U.js.gz +0 -0
- package/dist/{chunk-XX5NMBNB.js → chunk-L4E5A5DE.js} +1344 -1310
- package/dist/chunk-L4E5A5DE.js.br +0 -0
- package/dist/chunk-L4E5A5DE.js.gz +0 -0
- package/dist/{chunk-KRBHBPI7.mjs → chunk-RXN5Q6CJ.mjs} +74 -40
- package/dist/chunk-RXN5Q6CJ.mjs.br +0 -0
- package/dist/chunk-RXN5Q6CJ.mjs.gz +0 -0
- package/dist/{chunk-BOLHGVKE.mjs → chunk-RZIXD6X7.mjs} +33 -2
- package/dist/chunk-RZIXD6X7.mjs.br +0 -0
- package/dist/chunk-RZIXD6X7.mjs.gz +0 -0
- package/dist/{chunk-SMPZ552M.mjs → chunk-UC2VQORY.mjs} +6 -3
- package/dist/chunk-UC2VQORY.mjs.br +0 -0
- package/dist/chunk-UC2VQORY.mjs.gz +0 -0
- package/dist/{chunk-UL6QTOEA.js → chunk-YAODOVJY.js} +277 -245
- package/dist/chunk-YAODOVJY.js.br +0 -0
- package/dist/chunk-YAODOVJY.js.gz +0 -0
- package/dist/i18n/de.cjs +134 -8
- package/dist/i18n/de.cjs.br +0 -0
- package/dist/i18n/de.cjs.gz +0 -0
- package/dist/i18n/de.mjs +134 -8
- package/dist/i18n/de.mjs.br +0 -0
- package/dist/i18n/de.mjs.gz +0 -0
- package/dist/i18n/es.cjs +134 -8
- package/dist/i18n/es.cjs.br +0 -0
- package/dist/i18n/es.cjs.gz +0 -0
- package/dist/i18n/es.mjs +134 -8
- package/dist/i18n/es.mjs.br +0 -0
- package/dist/i18n/es.mjs.gz +0 -0
- package/dist/i18n/fr.cjs +134 -8
- package/dist/i18n/fr.cjs.br +0 -0
- package/dist/i18n/fr.cjs.gz +0 -0
- package/dist/i18n/fr.mjs +134 -8
- package/dist/i18n/fr.mjs.br +0 -0
- package/dist/i18n/fr.mjs.gz +0 -0
- package/dist/i18n/zh-CN.cjs +135 -9
- package/dist/i18n/zh-CN.cjs.br +0 -0
- package/dist/i18n/zh-CN.cjs.gz +0 -0
- package/dist/i18n/zh-CN.mjs +135 -9
- package/dist/i18n/zh-CN.mjs.br +0 -0
- package/dist/i18n/zh-CN.mjs.gz +0 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +24 -24
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.d.ts +3 -1
- package/dist/internals.js +81 -81
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +2 -2
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.js +19 -19
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +3 -3
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +3 -3
- package/dist/AiChatPanel-CX74JT77.mjs.br +0 -0
- package/dist/AiChatPanel-CX74JT77.mjs.gz +0 -0
- package/dist/AiChatPanel-PVRSPIAY.js.br +0 -0
- package/dist/AiChatPanel-PVRSPIAY.js.gz +0 -0
- package/dist/chunk-4MGJUBY7.js.br +0 -0
- package/dist/chunk-4MGJUBY7.js.gz +0 -0
- package/dist/chunk-BOLHGVKE.mjs.br +0 -0
- package/dist/chunk-BOLHGVKE.mjs.gz +0 -0
- package/dist/chunk-KRBHBPI7.mjs.br +0 -0
- package/dist/chunk-KRBHBPI7.mjs.gz +0 -0
- package/dist/chunk-SMPZ552M.mjs.br +0 -0
- package/dist/chunk-SMPZ552M.mjs.gz +0 -0
- package/dist/chunk-UL6QTOEA.js.br +0 -0
- package/dist/chunk-UL6QTOEA.js.gz +0 -0
- package/dist/chunk-XX5NMBNB.js.br +0 -0
- package/dist/chunk-XX5NMBNB.js.gz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk43TOUP5U_js = require('./chunk-43TOUP5U.js');
|
|
4
4
|
var pptx = require('ooxml-ui/pptx');
|
|
5
5
|
var React17 = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -684,9 +684,9 @@ function serializeHistoryDocument(snapshot) {
|
|
|
684
684
|
}
|
|
685
685
|
function recordExplicitSlideUpdate(past, future, previous, before, label, maxDepth) {
|
|
686
686
|
if (previous && serializeHistoryDocument(previous) !== serializeHistoryDocument(before)) {
|
|
687
|
-
past.push(
|
|
687
|
+
past.push(chunk43TOUP5U_js.cloneHistorySnapshot(previous));
|
|
688
688
|
}
|
|
689
|
-
past.push({ ...
|
|
689
|
+
past.push({ ...chunk43TOUP5U_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(chunk43TOUP5U_js.cloneSlide),
|
|
779
|
+
templateElementsBySlideId: chunk43TOUP5U_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(chunk43TOUP5U_js.cloneSlide));
|
|
793
793
|
setTemplateElementsBySlideId(
|
|
794
|
-
|
|
794
|
+
chunk43TOUP5U_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 = chunk43TOUP5U_js.cloneHistorySnapshot(previousSnapshot);
|
|
834
|
+
lastHistorySnapshotRef.current = chunk43TOUP5U_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 = chunk43TOUP5U_js.cloneHistorySnapshot(nextSnapshot);
|
|
856
|
+
lastHistorySnapshotRef.current = chunk43TOUP5U_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 = chunk43TOUP5U_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(chunk43TOUP5U_js.cloneSlide) };
|
|
957
|
+
const after = { ...before, slides: nextSlides.map(chunk43TOUP5U_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 = chunk43TOUP5U_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, chunk43TOUP5U_js.MIN_ELEMENT_SIZE));
|
|
1147
|
+
maxY = Math.max(maxY, element.y + Math.max(element.height, chunk43TOUP5U_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, chunk43TOUP5U_js.MIN_ELEMENT_SIZE);
|
|
1154
|
+
const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk43TOUP5U_js.MIN_ELEMENT_SIZE);
|
|
1155
1155
|
const availableWidth = Math.max(
|
|
1156
|
-
effectiveEditorDimensions.width -
|
|
1157
|
-
|
|
1156
|
+
effectiveEditorDimensions.width - chunk43TOUP5U_js.ZOOM_TO_SELECTION_PADDING,
|
|
1157
|
+
chunk43TOUP5U_js.MIN_ELEMENT_SIZE
|
|
1158
1158
|
);
|
|
1159
1159
|
const availableHeight = Math.max(
|
|
1160
|
-
effectiveEditorDimensions.height -
|
|
1161
|
-
|
|
1160
|
+
effectiveEditorDimensions.height - chunk43TOUP5U_js.ZOOM_TO_SELECTION_PADDING,
|
|
1161
|
+
chunk43TOUP5U_js.MIN_ELEMENT_SIZE
|
|
1162
1162
|
);
|
|
1163
1163
|
const targetEditorScale = Math.min(
|
|
1164
1164
|
availableWidth / boundsWidth,
|
|
@@ -4125,8 +4125,8 @@ function useViewerCoreState(_input) {
|
|
|
4125
4125
|
const { slides, setSlides, slidesRef } = useSlideState();
|
|
4126
4126
|
const [templateElementsBySlideId, setTemplateElementsBySlideId] = React17.useState({});
|
|
4127
4127
|
const [canvasSize, setCanvasSize] = React17.useState({
|
|
4128
|
-
width:
|
|
4129
|
-
height:
|
|
4128
|
+
width: chunk43TOUP5U_js.DEFAULT_CANVAS_WIDTH,
|
|
4129
|
+
height: chunk43TOUP5U_js.DEFAULT_CANVAS_HEIGHT
|
|
4130
4130
|
});
|
|
4131
4131
|
const [slideSizeEmu, setSlideSizeEmu] = React17.useState();
|
|
4132
4132
|
const [activeSlideIndex, setActiveSlideIndex] = React17.useState(0);
|
|
@@ -4509,7 +4509,7 @@ function useLoadContent({
|
|
|
4509
4509
|
}
|
|
4510
4510
|
let cancelled = false;
|
|
4511
4511
|
const token = ++renderTokenRef.current;
|
|
4512
|
-
const handler = new
|
|
4512
|
+
const handler = new chunk43TOUP5U_js.dist_exports.PptxHandler();
|
|
4513
4513
|
const resources = pptx.createPresentationLoadResources(handler);
|
|
4514
4514
|
const loadBlobUrls = resources.blobUrls;
|
|
4515
4515
|
(async () => {
|
|
@@ -4594,12 +4594,12 @@ function useLoadContent({
|
|
|
4594
4594
|
}
|
|
4595
4595
|
resources.commit();
|
|
4596
4596
|
handlerRef.current = handler;
|
|
4597
|
-
const partition =
|
|
4597
|
+
const partition = chunk43TOUP5U_js.partitionTemplateElements(nextSlides);
|
|
4598
4598
|
setSlides(partition.slides);
|
|
4599
4599
|
setTemplateElementsBySlideId(partition.templateElementsBySlideId);
|
|
4600
4600
|
setCanvasSize({
|
|
4601
|
-
width: parsed.width ??
|
|
4602
|
-
height: parsed.height ??
|
|
4601
|
+
width: parsed.width ?? chunk43TOUP5U_js.DEFAULT_CANVAS_WIDTH,
|
|
4602
|
+
height: parsed.height ?? chunk43TOUP5U_js.DEFAULT_CANVAS_HEIGHT
|
|
4603
4603
|
});
|
|
4604
4604
|
setSlideSizeEmu(
|
|
4605
4605
|
typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
|
|
@@ -4663,7 +4663,7 @@ function useLoadContent({
|
|
|
4663
4663
|
onContentApplied?.();
|
|
4664
4664
|
} catch (err) {
|
|
4665
4665
|
if (!cancelled && token === renderTokenRef.current) {
|
|
4666
|
-
if (err instanceof
|
|
4666
|
+
if (err instanceof chunk43TOUP5U_js.dist_exports.EncryptedFileError) {
|
|
4667
4667
|
setIsEncrypted(true);
|
|
4668
4668
|
} else {
|
|
4669
4669
|
console.error("[pptx] Failed to load presentation content:", err);
|
|
@@ -4788,7 +4788,7 @@ function useTextElementOperations(input) {
|
|
|
4788
4788
|
updateSelectedElement
|
|
4789
4789
|
} = input;
|
|
4790
4790
|
const liveTextSegments = React17.useCallback(() => {
|
|
4791
|
-
if (!selectedElement || !(0,
|
|
4791
|
+
if (!selectedElement || !(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
4792
4792
|
return void 0;
|
|
4793
4793
|
}
|
|
4794
4794
|
if (selectedElement.id !== inlineEditingElementId) {
|
|
@@ -4806,7 +4806,7 @@ function useTextElementOperations(input) {
|
|
|
4806
4806
|
}, [selectedElement, inlineEditingElementId, inlineEditingText, inlineEditingSnapshotRef]);
|
|
4807
4807
|
const updateSelectedTextStyle = React17.useCallback(
|
|
4808
4808
|
(updates) => {
|
|
4809
|
-
if (!selectedElement || !(0,
|
|
4809
|
+
if (!selectedElement || !(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
4810
4810
|
return;
|
|
4811
4811
|
}
|
|
4812
4812
|
const isLiveEditing = selectedElement.id === inlineEditingElementId;
|
|
@@ -4884,7 +4884,7 @@ function useTextElementOperations(input) {
|
|
|
4884
4884
|
);
|
|
4885
4885
|
const toggleSelectedBullets = React17.useCallback(
|
|
4886
4886
|
(kind) => {
|
|
4887
|
-
if (!selectedElement || !(0,
|
|
4887
|
+
if (!selectedElement || !(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
4888
4888
|
return;
|
|
4889
4889
|
}
|
|
4890
4890
|
const currentSegments = liveTextSegments();
|
|
@@ -4935,7 +4935,7 @@ function useTextElementOperations(input) {
|
|
|
4935
4935
|
);
|
|
4936
4936
|
const updateSelectedTextCase = React17.useCallback(
|
|
4937
4937
|
(mode) => {
|
|
4938
|
-
if (!selectedElement || !(0,
|
|
4938
|
+
if (!selectedElement || !(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
4939
4939
|
return;
|
|
4940
4940
|
}
|
|
4941
4941
|
const isLiveEditing = selectedElement.id === inlineEditingElementId;
|
|
@@ -5051,7 +5051,7 @@ function useElementOperations(input) {
|
|
|
5051
5051
|
);
|
|
5052
5052
|
return;
|
|
5053
5053
|
}
|
|
5054
|
-
if (
|
|
5054
|
+
if (chunk43TOUP5U_js.isTemplateElementId(elementId)) {
|
|
5055
5055
|
const slideId = activeSlide?.id;
|
|
5056
5056
|
if (slideId) {
|
|
5057
5057
|
setTemplateElementsBySlideId((prev) => ({
|
|
@@ -5087,7 +5087,7 @@ function useElementOperations(input) {
|
|
|
5087
5087
|
);
|
|
5088
5088
|
const updateSelectedShapeStyle = React17.useCallback(
|
|
5089
5089
|
(updates) => {
|
|
5090
|
-
if (!selectedElement || !(0,
|
|
5090
|
+
if (!selectedElement || !(0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(selectedElement)) {
|
|
5091
5091
|
return;
|
|
5092
5092
|
}
|
|
5093
5093
|
updateSelectedElement({
|
|
@@ -5291,15 +5291,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
|
|
|
5291
5291
|
// src/viewer/hooks/pointer-move-handlers.ts
|
|
5292
5292
|
function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
|
|
5293
5293
|
const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
|
|
5294
|
-
let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize:
|
|
5294
|
+
let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize: chunk43TOUP5U_js.MIN_ELEMENT_SIZE });
|
|
5295
5295
|
if (lockAspect) {
|
|
5296
|
-
resized = pptx.lockResizeAspect(resized, startBox, handle,
|
|
5296
|
+
resized = pptx.lockResizeAspect(resized, startBox, handle, chunk43TOUP5U_js.MIN_ELEMENT_SIZE);
|
|
5297
5297
|
}
|
|
5298
5298
|
const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
|
|
5299
5299
|
if (!snapToGrid) {
|
|
5300
5300
|
return box;
|
|
5301
5301
|
}
|
|
5302
|
-
return pptx.snapBoxToGrid(box, handle, gridSpacingPx,
|
|
5302
|
+
return pptx.snapBoxToGrid(box, handle, gridSpacingPx, chunk43TOUP5U_js.MIN_ELEMENT_SIZE);
|
|
5303
5303
|
}
|
|
5304
5304
|
function resolveLiveTarget(input) {
|
|
5305
5305
|
const { livePatcher, editTemplateMode, activeSlide } = input;
|
|
@@ -5412,7 +5412,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
|
|
|
5412
5412
|
width: el.width,
|
|
5413
5413
|
height: el.height
|
|
5414
5414
|
}));
|
|
5415
|
-
const snapResult =
|
|
5415
|
+
const snapResult = chunk43TOUP5U_js.computeSnapToShape(
|
|
5416
5416
|
targetX,
|
|
5417
5417
|
targetY,
|
|
5418
5418
|
primaryEl.width,
|
|
@@ -5486,8 +5486,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
|
|
|
5486
5486
|
rs.lastY = geo.y;
|
|
5487
5487
|
rs.lastWidth = geo.width;
|
|
5488
5488
|
rs.lastHeight = geo.height;
|
|
5489
|
-
const width = Math.max(geo.width,
|
|
5490
|
-
const height = Math.max(geo.height,
|
|
5489
|
+
const width = Math.max(geo.width, chunk43TOUP5U_js.MIN_ELEMENT_SIZE);
|
|
5490
|
+
const height = Math.max(geo.height, chunk43TOUP5U_js.MIN_ELEMENT_SIZE);
|
|
5491
5491
|
if (rs.domEl) {
|
|
5492
5492
|
rs.domEl.style.left = `${geo.x}px`;
|
|
5493
5493
|
rs.domEl.style.top = `${geo.y}px`;
|
|
@@ -5580,13 +5580,13 @@ function processPointerUp(input) {
|
|
|
5580
5580
|
if (i !== activeSlideIndex) {
|
|
5581
5581
|
return s;
|
|
5582
5582
|
}
|
|
5583
|
-
const rerouted =
|
|
5583
|
+
const rerouted = chunk43TOUP5U_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
|
|
5584
5584
|
if (rerouted.length === 0) {
|
|
5585
5585
|
return s;
|
|
5586
5586
|
}
|
|
5587
5587
|
return {
|
|
5588
5588
|
...s,
|
|
5589
|
-
elements:
|
|
5589
|
+
elements: chunk43TOUP5U_js.applyReroutedConnectors(s.elements, rerouted)
|
|
5590
5590
|
};
|
|
5591
5591
|
})
|
|
5592
5592
|
);
|
|
@@ -5638,8 +5638,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
|
|
|
5638
5638
|
}
|
|
5639
5639
|
return { ...el, x: start.x + dx, y: start.y + dy };
|
|
5640
5640
|
});
|
|
5641
|
-
const rerouted =
|
|
5642
|
-
return
|
|
5641
|
+
const rerouted = chunk43TOUP5U_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
|
|
5642
|
+
return chunk43TOUP5U_js.applyReroutedConnectors(movedElements, rerouted);
|
|
5643
5643
|
};
|
|
5644
5644
|
if (editTemplateMode) {
|
|
5645
5645
|
const slideId = activeSlide?.id;
|
|
@@ -5827,7 +5827,7 @@ function useCanvasInteractions(input) {
|
|
|
5827
5827
|
return;
|
|
5828
5828
|
}
|
|
5829
5829
|
const el = elementLookup.get(editId);
|
|
5830
|
-
if (el && (0,
|
|
5830
|
+
if (el && (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el)) {
|
|
5831
5831
|
const reader = inlineEditingReaderRef?.current;
|
|
5832
5832
|
const read = reader?.elementId === editId ? reader.read() : void 0;
|
|
5833
5833
|
if (read?.kind === "unsupported") {
|
|
@@ -5874,7 +5874,7 @@ function useCanvasInteractions(input) {
|
|
|
5874
5874
|
wasEditable.current = canEdit;
|
|
5875
5875
|
}, [canEdit]);
|
|
5876
5876
|
const openEquationEditorForElement = (el) => {
|
|
5877
|
-
if (!(0,
|
|
5877
|
+
if (!(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el)) {
|
|
5878
5878
|
return false;
|
|
5879
5879
|
}
|
|
5880
5880
|
const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
|
|
@@ -5907,7 +5907,7 @@ function useCanvasInteractions(input) {
|
|
|
5907
5907
|
justInteractedRef.current = false;
|
|
5908
5908
|
} else {
|
|
5909
5909
|
const el = elementLookup.get(elementId);
|
|
5910
|
-
if (el && (0,
|
|
5910
|
+
if (el && (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
|
|
5911
5911
|
if (!openEquationEditorForElement(el)) {
|
|
5912
5912
|
pptx.setPendingCaretPoint(e);
|
|
5913
5913
|
setInlineEditingElementId(elementId);
|
|
@@ -5933,7 +5933,7 @@ function useCanvasInteractions(input) {
|
|
|
5933
5933
|
if (openEquationEditorForElement(el)) {
|
|
5934
5934
|
return;
|
|
5935
5935
|
}
|
|
5936
|
-
if ((0,
|
|
5936
|
+
if ((0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
|
|
5937
5937
|
setInlineEditingElementId(elementId);
|
|
5938
5938
|
setInlineEditingText(el.text ?? "");
|
|
5939
5939
|
}
|
|
@@ -6398,7 +6398,7 @@ function createStructuredElementHandlers(deps) {
|
|
|
6398
6398
|
return;
|
|
6399
6399
|
}
|
|
6400
6400
|
const resolved = resolveHyperlinkEditResult(data);
|
|
6401
|
-
if (resolved.url && !
|
|
6401
|
+
if (resolved.url && !chunk43TOUP5U_js.isUrlSafe(resolved.url)) {
|
|
6402
6402
|
return;
|
|
6403
6403
|
}
|
|
6404
6404
|
const actionClick = {
|
|
@@ -6444,11 +6444,11 @@ function createStructuredElementHandlers(deps) {
|
|
|
6444
6444
|
if (!activeSlide) {
|
|
6445
6445
|
return;
|
|
6446
6446
|
}
|
|
6447
|
-
const preset =
|
|
6447
|
+
const preset = chunk43TOUP5U_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
|
|
6448
6448
|
if (!preset) {
|
|
6449
6449
|
return;
|
|
6450
6450
|
}
|
|
6451
|
-
const defaultPptxAction = (0,
|
|
6451
|
+
const defaultPptxAction = (0, chunk43TOUP5U_js.dist_exports.elementActionToPptxAction)({
|
|
6452
6452
|
trigger: "click",
|
|
6453
6453
|
type: preset.defaultAction
|
|
6454
6454
|
});
|
|
@@ -6531,7 +6531,7 @@ function useInsertElements(input) {
|
|
|
6531
6531
|
width: 300,
|
|
6532
6532
|
height: 60,
|
|
6533
6533
|
text: "",
|
|
6534
|
-
textStyle: { fontSize:
|
|
6534
|
+
textStyle: { fontSize: chunk43TOUP5U_js.DEFAULT_TEXT_FONT_SIZE }
|
|
6535
6535
|
});
|
|
6536
6536
|
};
|
|
6537
6537
|
const handleAddShape = () => {
|
|
@@ -6558,7 +6558,7 @@ function useInsertElements(input) {
|
|
|
6558
6558
|
return;
|
|
6559
6559
|
}
|
|
6560
6560
|
addElement({
|
|
6561
|
-
...pptx.newTableElement(
|
|
6561
|
+
...pptx.newTableElement(chunk43TOUP5U_js.DEFAULT_TABLE_ROWS, chunk43TOUP5U_js.DEFAULT_TABLE_COLUMNS, 100, 200),
|
|
6562
6562
|
id: pptx.generateElementId()
|
|
6563
6563
|
});
|
|
6564
6564
|
};
|
|
@@ -6727,7 +6727,7 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
6727
6727
|
history
|
|
6728
6728
|
} = input;
|
|
6729
6729
|
const updateElementsOwning = (elementId, updater) => {
|
|
6730
|
-
if (editTemplateMode && !
|
|
6730
|
+
if (editTemplateMode && !chunk43TOUP5U_js.isTemplateElementId(elementId)) {
|
|
6731
6731
|
ops.updateSlides(
|
|
6732
6732
|
(prev) => prev.map(
|
|
6733
6733
|
(slide, index) => index === activeSlideIndex ? { ...slide, elements: updater(slide.elements) } : slide
|
|
@@ -6761,9 +6761,9 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
6761
6761
|
return;
|
|
6762
6762
|
}
|
|
6763
6763
|
const group = selectedElement;
|
|
6764
|
-
const intoTemplate =
|
|
6764
|
+
const intoTemplate = chunk43TOUP5U_js.isTemplateElementId(group.id);
|
|
6765
6765
|
const childIds = group.children.map(
|
|
6766
|
-
(child) => intoTemplate ?
|
|
6766
|
+
(child) => intoTemplate ? chunk43TOUP5U_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
|
|
6767
6767
|
);
|
|
6768
6768
|
const { elements, childIds: usedIds } = pptx.ungroupElements(
|
|
6769
6769
|
ops.activeElements,
|
|
@@ -7095,7 +7095,7 @@ function useSlideManagement(input) {
|
|
|
7095
7095
|
if (!src) {
|
|
7096
7096
|
continue;
|
|
7097
7097
|
}
|
|
7098
|
-
const clone = { ...(0,
|
|
7098
|
+
const clone = { ...(0, chunk43TOUP5U_js.dist_exports.duplicateSlide)(src, next.length + 1), id: pptx.makeSlideId() };
|
|
7099
7099
|
next.splice(i + offset + 1, 0, clone);
|
|
7100
7100
|
offset++;
|
|
7101
7101
|
}
|
|
@@ -7199,7 +7199,7 @@ function createTableMergeHandlers(input) {
|
|
|
7199
7199
|
if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
|
|
7200
7200
|
return;
|
|
7201
7201
|
}
|
|
7202
|
-
const newTableData =
|
|
7202
|
+
const newTableData = chunk43TOUP5U_js.mergeCells(
|
|
7203
7203
|
[
|
|
7204
7204
|
{ row: rowIndex, col: columnIndex },
|
|
7205
7205
|
{ row: rowIndex, col: nextColIdx }
|
|
@@ -7207,7 +7207,7 @@ function createTableMergeHandlers(input) {
|
|
|
7207
7207
|
td
|
|
7208
7208
|
);
|
|
7209
7209
|
const updates = { tableData: newTableData };
|
|
7210
|
-
const newRawXml = (0,
|
|
7210
|
+
const newRawXml = (0, chunk43TOUP5U_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
|
|
7211
7211
|
if (newRawXml) {
|
|
7212
7212
|
updates.rawXml = newRawXml;
|
|
7213
7213
|
}
|
|
@@ -7233,7 +7233,7 @@ function createTableMergeHandlers(input) {
|
|
|
7233
7233
|
if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
|
|
7234
7234
|
return;
|
|
7235
7235
|
}
|
|
7236
|
-
const newTableData =
|
|
7236
|
+
const newTableData = chunk43TOUP5U_js.mergeCells(
|
|
7237
7237
|
[
|
|
7238
7238
|
{ row: rowIndex, col: columnIndex },
|
|
7239
7239
|
{ row: targetNextRowIdx, col: columnIndex }
|
|
@@ -7241,7 +7241,7 @@ function createTableMergeHandlers(input) {
|
|
|
7241
7241
|
td
|
|
7242
7242
|
);
|
|
7243
7243
|
const updates = { tableData: newTableData };
|
|
7244
|
-
const newRawXml = (0,
|
|
7244
|
+
const newRawXml = (0, chunk43TOUP5U_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
|
|
7245
7245
|
if (newRawXml) {
|
|
7246
7246
|
updates.rawXml = newRawXml;
|
|
7247
7247
|
}
|
|
@@ -7256,9 +7256,9 @@ function createTableMergeHandlers(input) {
|
|
|
7256
7256
|
return;
|
|
7257
7257
|
}
|
|
7258
7258
|
const td = selectedElement.tableData;
|
|
7259
|
-
const newTableData =
|
|
7259
|
+
const newTableData = chunk43TOUP5U_js.mergeCells(ts.selectedCells, td);
|
|
7260
7260
|
const updates = { tableData: newTableData };
|
|
7261
|
-
const newRawXml = (0,
|
|
7261
|
+
const newRawXml = (0, chunk43TOUP5U_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
|
|
7262
7262
|
if (newRawXml) {
|
|
7263
7263
|
updates.rawXml = newRawXml;
|
|
7264
7264
|
}
|
|
@@ -7275,9 +7275,9 @@ function createTableMergeHandlers(input) {
|
|
|
7275
7275
|
}
|
|
7276
7276
|
const { rowIndex, columnIndex } = ts;
|
|
7277
7277
|
const td = selectedElement.tableData;
|
|
7278
|
-
const newTableData =
|
|
7278
|
+
const newTableData = chunk43TOUP5U_js.splitCell(rowIndex, columnIndex, td);
|
|
7279
7279
|
const updates = { tableData: newTableData };
|
|
7280
|
-
const newRawXml = (0,
|
|
7280
|
+
const newRawXml = (0, chunk43TOUP5U_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
|
|
7281
7281
|
if (newRawXml) {
|
|
7282
7282
|
updates.rawXml = newRawXml;
|
|
7283
7283
|
}
|
|
@@ -7312,7 +7312,7 @@ function createTableStructHandlers(input) {
|
|
|
7312
7312
|
updates.tableData = pptx.setCellText(el, rowIndex, colIndex, text).tableData;
|
|
7313
7313
|
}
|
|
7314
7314
|
if (el.rawXml) {
|
|
7315
|
-
const newRawXml = (0,
|
|
7315
|
+
const newRawXml = (0, chunk43TOUP5U_js.dist_exports.updateCellTextInRawXml)(el, rowIndex, colIndex, text);
|
|
7316
7316
|
if (newRawXml) {
|
|
7317
7317
|
updates.rawXml = newRawXml;
|
|
7318
7318
|
}
|
|
@@ -7336,7 +7336,7 @@ function createTableStructHandlers(input) {
|
|
|
7336
7336
|
const { rowIndex, columnIndex: colIndex } = ts;
|
|
7337
7337
|
const updates = {};
|
|
7338
7338
|
if (selectedElement.rawXml) {
|
|
7339
|
-
const newRawXml = (0,
|
|
7339
|
+
const newRawXml = (0, chunk43TOUP5U_js.dist_exports.updateCellTextStyleInRawXml)(
|
|
7340
7340
|
selectedElement,
|
|
7341
7341
|
rowIndex,
|
|
7342
7342
|
colIndex,
|
|
@@ -7503,7 +7503,7 @@ function useExportSaveAs(input) {
|
|
|
7503
7503
|
const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
|
|
7504
7504
|
const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
|
|
7505
7505
|
const data = {
|
|
7506
|
-
slides:
|
|
7506
|
+
slides: chunk43TOUP5U_js.buildSaveSlides(slides, templateElementsBySlideId),
|
|
7507
7507
|
width: canvasSize.width,
|
|
7508
7508
|
height: canvasSize.height,
|
|
7509
7509
|
widthEmu: slideSize.widthEmu,
|
|
@@ -7661,7 +7661,7 @@ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActi
|
|
|
7661
7661
|
}
|
|
7662
7662
|
function tilesToPdfPage(tilesResult) {
|
|
7663
7663
|
return tilesResult.tiles.map((tile) => ({
|
|
7664
|
-
image:
|
|
7664
|
+
image: chunk43TOUP5U_js.canvasToJpegData(tile.canvas),
|
|
7665
7665
|
placement: pptx.placeTileOnPage(
|
|
7666
7666
|
tile,
|
|
7667
7667
|
tilesResult.fullWidth,
|
|
@@ -7694,7 +7694,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
|
|
|
7694
7694
|
if (pages.length === 0) {
|
|
7695
7695
|
throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
|
|
7696
7696
|
}
|
|
7697
|
-
const pdfBlobUrl =
|
|
7697
|
+
const pdfBlobUrl = chunk43TOUP5U_js.buildPdfFromTiledImageData(pages);
|
|
7698
7698
|
pptx.downloadDataUrl(pdfBlobUrl, filename);
|
|
7699
7699
|
}
|
|
7700
7700
|
async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
|
|
@@ -7724,7 +7724,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
|
|
|
7724
7724
|
if (pages.length === 0) {
|
|
7725
7725
|
throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
|
|
7726
7726
|
}
|
|
7727
|
-
const pdfDataUrl =
|
|
7727
|
+
const pdfDataUrl = chunk43TOUP5U_js.buildNotesPdf(pages);
|
|
7728
7728
|
pptx.downloadDataUrl(pdfDataUrl, filename);
|
|
7729
7729
|
}
|
|
7730
7730
|
async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
|
|
@@ -7919,7 +7919,7 @@ function exportAllSlidesToSvg(data, options = {}) {
|
|
|
7919
7919
|
continue;
|
|
7920
7920
|
}
|
|
7921
7921
|
onProgress?.(processedCount, data.slides.length);
|
|
7922
|
-
let svg =
|
|
7922
|
+
let svg = chunk43TOUP5U_js.dist_exports.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
|
|
7923
7923
|
if (embedFonts && fontFaces?.length) {
|
|
7924
7924
|
svg = injectFontFaces(svg, fontFaces);
|
|
7925
7925
|
}
|
|
@@ -8508,10 +8508,10 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
|
|
|
8508
8508
|
return;
|
|
8509
8509
|
}
|
|
8510
8510
|
await handler.applyTheme(colorScheme, fontScheme, name);
|
|
8511
|
-
const previousMap = theme?.colorScheme ? (0,
|
|
8511
|
+
const previousMap = theme?.colorScheme ? (0, chunk43TOUP5U_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
|
|
8512
8512
|
bumpHistory();
|
|
8513
8513
|
setSlides(
|
|
8514
|
-
(slides) => (0,
|
|
8514
|
+
(slides) => (0, chunk43TOUP5U_js.dist_exports.applyThemeToData)(
|
|
8515
8515
|
{ slides, theme, themeColorMap: previousMap },
|
|
8516
8516
|
colorScheme,
|
|
8517
8517
|
fontScheme,
|
|
@@ -8522,8 +8522,8 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
|
|
|
8522
8522
|
(prev) => Object.fromEntries(
|
|
8523
8523
|
Object.entries(prev).map(([id, elements]) => [
|
|
8524
8524
|
id,
|
|
8525
|
-
(0,
|
|
8526
|
-
(0,
|
|
8525
|
+
(0, chunk43TOUP5U_js.dist_exports.reResolveElementFonts)(
|
|
8526
|
+
(0, chunk43TOUP5U_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme),
|
|
8527
8527
|
theme?.fontScheme,
|
|
8528
8528
|
fontScheme
|
|
8529
8529
|
)
|
|
@@ -8581,13 +8581,13 @@ function useThemeHandlers(input) {
|
|
|
8581
8581
|
return;
|
|
8582
8582
|
}
|
|
8583
8583
|
await handler.updateThemeColorScheme(colorScheme);
|
|
8584
|
-
const previousMap = theme?.colorScheme ? (0,
|
|
8585
|
-
setSlides((prev) => (0,
|
|
8584
|
+
const previousMap = theme?.colorScheme ? (0, chunk43TOUP5U_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
|
|
8585
|
+
setSlides((prev) => (0, chunk43TOUP5U_js.dist_exports.reResolveSlideColors)(prev, previousMap, colorScheme));
|
|
8586
8586
|
if (Object.keys(templateElementsBySlideId).length > 0) {
|
|
8587
8587
|
setTemplateElementsBySlideId((prev) => {
|
|
8588
8588
|
const next = {};
|
|
8589
8589
|
for (const [slideId, elements] of Object.entries(prev)) {
|
|
8590
|
-
next[slideId] = (0,
|
|
8590
|
+
next[slideId] = (0, chunk43TOUP5U_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme);
|
|
8591
8591
|
}
|
|
8592
8592
|
return next;
|
|
8593
8593
|
});
|
|
@@ -8698,7 +8698,7 @@ function useThemeSwitching(input) {
|
|
|
8698
8698
|
}
|
|
8699
8699
|
try {
|
|
8700
8700
|
await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
|
|
8701
|
-
const newData = (0,
|
|
8701
|
+
const newData = (0, chunk43TOUP5U_js.dist_exports.applyThemeToData)(data, preset.colorScheme, preset.fontScheme, preset.name);
|
|
8702
8702
|
onDataChange(newData);
|
|
8703
8703
|
onThemeChanged?.(preset);
|
|
8704
8704
|
} catch (error) {
|
|
@@ -8715,7 +8715,7 @@ function useThemeSwitching(input) {
|
|
|
8715
8715
|
}
|
|
8716
8716
|
try {
|
|
8717
8717
|
await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
|
|
8718
|
-
const newData = (0,
|
|
8718
|
+
const newData = (0, chunk43TOUP5U_js.dist_exports.applyThemeToData)(data, colorScheme, fontScheme, themeName);
|
|
8719
8719
|
onDataChange(newData);
|
|
8720
8720
|
} catch (error) {
|
|
8721
8721
|
console.error("Failed to switch to custom theme:", error);
|
|
@@ -8727,12 +8727,12 @@ function useThemeSwitching(input) {
|
|
|
8727
8727
|
if (!data?.theme?.colorScheme) {
|
|
8728
8728
|
return void 0;
|
|
8729
8729
|
}
|
|
8730
|
-
return
|
|
8731
|
-
(p) => (0,
|
|
8730
|
+
return chunk43TOUP5U_js.dist_exports.THEME_PRESETS.find(
|
|
8731
|
+
(p) => (0, chunk43TOUP5U_js.dist_exports.themeColorSchemesEqual)(data.theme?.colorScheme, p.colorScheme)
|
|
8732
8732
|
);
|
|
8733
8733
|
}, [data?.theme?.colorScheme]);
|
|
8734
8734
|
return {
|
|
8735
|
-
presets:
|
|
8735
|
+
presets: chunk43TOUP5U_js.dist_exports.THEME_PRESETS,
|
|
8736
8736
|
switchToPreset,
|
|
8737
8737
|
switchToCustom,
|
|
8738
8738
|
currentPreset
|
|
@@ -8809,7 +8809,7 @@ function usePropertyHandlers(input) {
|
|
|
8809
8809
|
}
|
|
8810
8810
|
try {
|
|
8811
8811
|
const ab = await file.arrayBuffer();
|
|
8812
|
-
const h = new
|
|
8812
|
+
const h = new chunk43TOUP5U_js.dist_exports.PptxHandler();
|
|
8813
8813
|
const other = await h.load(ab);
|
|
8814
8814
|
if (!other) {
|
|
8815
8815
|
return;
|
|
@@ -8819,7 +8819,7 @@ function usePropertyHandlers(input) {
|
|
|
8819
8819
|
width: canvasSize.width,
|
|
8820
8820
|
height: canvasSize.height
|
|
8821
8821
|
};
|
|
8822
|
-
setCompareResult(
|
|
8822
|
+
setCompareResult(chunk43TOUP5U_js.comparePresentation(cur, other));
|
|
8823
8823
|
setIsComparePanelOpen(true);
|
|
8824
8824
|
} catch (err) {
|
|
8825
8825
|
console.warn("Compare failed:", err);
|
|
@@ -9172,7 +9172,7 @@ function useViewerDialogs(input) {
|
|
|
9172
9172
|
};
|
|
9173
9173
|
}
|
|
9174
9174
|
function computeGridSpacingPx(documentGridSpacing) {
|
|
9175
|
-
return pptx.computeGridSpacingPx(documentGridSpacing,
|
|
9175
|
+
return pptx.computeGridSpacingPx(documentGridSpacing, chunk43TOUP5U_js.GRID_SIZE);
|
|
9176
9176
|
}
|
|
9177
9177
|
function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
|
|
9178
9178
|
const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
|
|
@@ -9181,7 +9181,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
|
|
|
9181
9181
|
}
|
|
9182
9182
|
function computeSlideSectionGroups(slides, sections) {
|
|
9183
9183
|
return pptx.groupSlidesBySection(sections, slides).map((group) => ({
|
|
9184
|
-
id: group.section?.id ?? (sections.length > 0 ?
|
|
9184
|
+
id: group.section?.id ?? (sections.length > 0 ? chunk43TOUP5U_js.UNGROUPED_SECTION_ID : chunk43TOUP5U_js.DEFAULT_SECTION_GROUP_ID),
|
|
9185
9185
|
label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
|
|
9186
9186
|
slideIndexes: group.slideIndexes,
|
|
9187
9187
|
...group.section?.color !== void 0 ? { color: group.section.color } : {},
|
|
@@ -9226,10 +9226,10 @@ function useDerivedSlideState(input) {
|
|
|
9226
9226
|
);
|
|
9227
9227
|
const slideSectionGroups = React17.useMemo(
|
|
9228
9228
|
() => computeSlideSectionGroups(slides, sections).map((group) => {
|
|
9229
|
-
if (group.id ===
|
|
9229
|
+
if (group.id === chunk43TOUP5U_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
|
|
9230
9230
|
return { ...group, label: t("pptx.slides.ungroupedSlides") };
|
|
9231
9231
|
}
|
|
9232
|
-
if (group.id ===
|
|
9232
|
+
if (group.id === chunk43TOUP5U_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
|
|
9233
9233
|
return { ...group, label: t("pptx.sections.slides") };
|
|
9234
9234
|
}
|
|
9235
9235
|
return group;
|
|
@@ -9336,7 +9336,7 @@ function useAnnotationHandlers(input) {
|
|
|
9336
9336
|
if (nextMode === "present") {
|
|
9337
9337
|
presentation.enterPresentMode();
|
|
9338
9338
|
} else if (mode === "present" && annotations.hasAnyAnnotations) {
|
|
9339
|
-
|
|
9339
|
+
chunk43TOUP5U_js.stopAllPersistentAudio();
|
|
9340
9340
|
if (promptKeepInkAnnotations) {
|
|
9341
9341
|
pendingModeAfterAnnotationsRef.current = nextMode;
|
|
9342
9342
|
setShowKeepAnnotationsDialog(true);
|
|
@@ -9346,7 +9346,7 @@ function useAnnotationHandlers(input) {
|
|
|
9346
9346
|
}
|
|
9347
9347
|
} else {
|
|
9348
9348
|
if (mode === "present") {
|
|
9349
|
-
|
|
9349
|
+
chunk43TOUP5U_js.stopAllPersistentAudio();
|
|
9350
9350
|
}
|
|
9351
9351
|
setMode(nextMode);
|
|
9352
9352
|
}
|
|
@@ -9417,7 +9417,7 @@ function overlayPendingInlineEdit(document2, elementId, text, snapshot, transfor
|
|
|
9417
9417
|
(slide) => !elementId ? slide : {
|
|
9418
9418
|
...slide,
|
|
9419
9419
|
elements: slide.elements.map(
|
|
9420
|
-
(element) => element.id === elementId && (0,
|
|
9420
|
+
(element) => element.id === elementId && (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(element) ? {
|
|
9421
9421
|
...element,
|
|
9422
9422
|
text,
|
|
9423
9423
|
textSegments: pptx.remapTextToSegments(
|
|
@@ -9505,14 +9505,14 @@ function useSerialize(input) {
|
|
|
9505
9505
|
const pptxGuides = guides.map((g) => ({
|
|
9506
9506
|
id: g.id,
|
|
9507
9507
|
orientation: g.axis === "h" ? "horz" : "vert",
|
|
9508
|
-
positionEmu: (0,
|
|
9508
|
+
positionEmu: (0, chunk43TOUP5U_js.dist_exports.guidePxToEmu)(g.position)
|
|
9509
9509
|
}));
|
|
9510
9510
|
return {
|
|
9511
9511
|
...slide,
|
|
9512
9512
|
guides: pptxGuides.length > 0 ? pptxGuides : void 0
|
|
9513
9513
|
};
|
|
9514
9514
|
});
|
|
9515
|
-
const slidesToSave =
|
|
9515
|
+
const slidesToSave = chunk43TOUP5U_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
|
|
9516
9516
|
const saveOptions = pptx.buildDeckSaveOptions({
|
|
9517
9517
|
// Without this the Slide Size card edited a viewer-only pixel value and
|
|
9518
9518
|
// the saved `p:sldSz` never moved: passing `slideSize` is the only way a
|
|
@@ -9693,7 +9693,7 @@ function usePresentationSetup(input) {
|
|
|
9693
9693
|
return;
|
|
9694
9694
|
}
|
|
9695
9695
|
if (mode === "present" && nextMode !== "present") {
|
|
9696
|
-
|
|
9696
|
+
chunk43TOUP5U_js.stopAllPersistentAudio();
|
|
9697
9697
|
stopAnimationSound();
|
|
9698
9698
|
const exitHandler = exitModeHandlerRef.current;
|
|
9699
9699
|
if (exitHandler) {
|
|
@@ -9814,12 +9814,12 @@ function useCanvasImagePaste(input) {
|
|
|
9814
9814
|
);
|
|
9815
9815
|
}
|
|
9816
9816
|
function formatPatchFor(element, format) {
|
|
9817
|
-
const updated =
|
|
9817
|
+
const updated = chunk43TOUP5U_js.applyFormatToElement(element, format);
|
|
9818
9818
|
const updates = {};
|
|
9819
|
-
if ((0,
|
|
9819
|
+
if ((0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(updated)) {
|
|
9820
9820
|
updates.shapeStyle = updated.shapeStyle;
|
|
9821
9821
|
}
|
|
9822
|
-
if ((0,
|
|
9822
|
+
if ((0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(updated)) {
|
|
9823
9823
|
updates.textStyle = updated.textStyle;
|
|
9824
9824
|
}
|
|
9825
9825
|
return updates;
|
|
@@ -9837,7 +9837,7 @@ function useFormatPainterEditing(input) {
|
|
|
9837
9837
|
const prevFormatPainterRef = React17.useRef(false);
|
|
9838
9838
|
React17.useEffect(() => {
|
|
9839
9839
|
if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
|
|
9840
|
-
copiedFormatRef.current =
|
|
9840
|
+
copiedFormatRef.current = chunk43TOUP5U_js.copyFormatFromElement(selectedElement);
|
|
9841
9841
|
} else if (!formatPainterActive) {
|
|
9842
9842
|
copiedFormatRef.current = null;
|
|
9843
9843
|
}
|
|
@@ -10927,7 +10927,7 @@ function useKeyboardShortcutWiring(input) {
|
|
|
10927
10927
|
}
|
|
10928
10928
|
function stepSelectedFontSize(state, ops, direction) {
|
|
10929
10929
|
const selected = state.selectedElement;
|
|
10930
|
-
const currentPx = (selected && (0,
|
|
10930
|
+
const currentPx = (selected && (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(selected) ? selected.textStyle?.fontSize : void 0) ?? pptx.textFontSizePtToPx(18);
|
|
10931
10931
|
const nextPt = pptx.stepFontSizePt(pptx.textFontSizePxToPt(currentPx), direction);
|
|
10932
10932
|
ops.updateSelectedTextStyle({ fontSize: pptx.textFontSizePtToPx(nextPt) });
|
|
10933
10933
|
}
|
|
@@ -11478,7 +11478,7 @@ function useCollaborationWriteBack(input) {
|
|
|
11478
11478
|
getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
|
|
11479
11479
|
getSaveOptions: () => latest.current.getSaveOptions?.(),
|
|
11480
11480
|
getTemplateElements: () => latest.current.templateElementsBySlideId,
|
|
11481
|
-
mergeTemplateElements:
|
|
11481
|
+
mergeTemplateElements: chunk43TOUP5U_js.buildSaveSlides
|
|
11482
11482
|
}),
|
|
11483
11483
|
[latest]
|
|
11484
11484
|
);
|
|
@@ -12031,8 +12031,8 @@ function useTouchGestures(input) {
|
|
|
12031
12031
|
}
|
|
12032
12032
|
const recognizer = pptx.createTouchGestureRecognizer({
|
|
12033
12033
|
getScale: () => scaleRef.current,
|
|
12034
|
-
minScale:
|
|
12035
|
-
maxScale:
|
|
12034
|
+
minScale: chunk43TOUP5U_js.MIN_ZOOM_SCALE,
|
|
12035
|
+
maxScale: chunk43TOUP5U_js.MAX_ZOOM_SCALE,
|
|
12036
12036
|
callbacks: {
|
|
12037
12037
|
onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
|
|
12038
12038
|
onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
|
|
@@ -12156,7 +12156,7 @@ function buildCanvasProps(input) {
|
|
|
12156
12156
|
if (pptx.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
|
|
12157
12157
|
return;
|
|
12158
12158
|
}
|
|
12159
|
-
|
|
12159
|
+
chunk43TOUP5U_js.safeOpenUrl(url, target);
|
|
12160
12160
|
};
|
|
12161
12161
|
const handleActionClick = (elementId, action) => {
|
|
12162
12162
|
if (mode === "present") {
|
|
@@ -12171,9 +12171,9 @@ function buildCanvasProps(input) {
|
|
|
12171
12171
|
}
|
|
12172
12172
|
};
|
|
12173
12173
|
const handleHyperlinkClick = (url, target) => {
|
|
12174
|
-
if (
|
|
12174
|
+
if (chunk43TOUP5U_js.isPpactionUrl(url)) {
|
|
12175
12175
|
if (mode === "present") {
|
|
12176
|
-
const parsed =
|
|
12176
|
+
const parsed = chunk43TOUP5U_js.parsePpactionUrl(url);
|
|
12177
12177
|
if (parsed) {
|
|
12178
12178
|
presentation.handlePresentationAction({
|
|
12179
12179
|
action: parsed.action,
|
|
@@ -12280,6 +12280,31 @@ function buildCanvasProps(input) {
|
|
|
12280
12280
|
}
|
|
12281
12281
|
};
|
|
12282
12282
|
}
|
|
12283
|
+
|
|
12284
|
+
// src/viewer/hooks/createReviewCommentsHost.ts
|
|
12285
|
+
function createReviewCommentsHost(input) {
|
|
12286
|
+
const { state: s, activeSlideIndex, updateSlides, markDirty } = input;
|
|
12287
|
+
return {
|
|
12288
|
+
slides: () => s.slides,
|
|
12289
|
+
currentSlide: () => activeSlideIndex,
|
|
12290
|
+
goToSlide: (index) => s.setActiveSlideIndex(index),
|
|
12291
|
+
ensureCommentsOpen: () => {
|
|
12292
|
+
s.setSidebarPanelMode("comments");
|
|
12293
|
+
if (!s.isInspectorPaneOpen) {
|
|
12294
|
+
s.setIsInspectorPaneOpen(true);
|
|
12295
|
+
}
|
|
12296
|
+
},
|
|
12297
|
+
applyComments: (changes) => {
|
|
12298
|
+
updateSlides(
|
|
12299
|
+
(slides) => slides.map((slide, index) => {
|
|
12300
|
+
const change = changes.find((candidate) => candidate.slideIndex === index);
|
|
12301
|
+
return change ? { ...slide, comments: change.comments } : slide;
|
|
12302
|
+
})
|
|
12303
|
+
);
|
|
12304
|
+
markDirty();
|
|
12305
|
+
}
|
|
12306
|
+
};
|
|
12307
|
+
}
|
|
12283
12308
|
function scopeLayoutOptionsToActiveSlide(options, activeSlide) {
|
|
12284
12309
|
return pptx.scopeLayoutOptionsToSlide(options, activeSlide?.layoutPath);
|
|
12285
12310
|
}
|
|
@@ -12565,8 +12590,14 @@ function buildToolbarProps(input) {
|
|
|
12565
12590
|
},
|
|
12566
12591
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
12567
12592
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
12593
|
+
reviewComments: createReviewCommentsHost({
|
|
12594
|
+
state: s,
|
|
12595
|
+
activeSlideIndex,
|
|
12596
|
+
updateSlides: ops.updateSlides,
|
|
12597
|
+
markDirty: history.markDirty
|
|
12598
|
+
}),
|
|
12568
12599
|
formatPainterActive: s.formatPainterActive,
|
|
12569
|
-
canActivateFormatPainter:
|
|
12600
|
+
canActivateFormatPainter: chunk43TOUP5U_js.hasCopyableFormat(selectedElement),
|
|
12570
12601
|
onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
|
|
12571
12602
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
12572
12603
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -12889,7 +12920,7 @@ function useViewerBuildingBlocksCore(input) {
|
|
|
12889
12920
|
documentGridSpacing: state.viewProperties?.gridSpacing
|
|
12890
12921
|
});
|
|
12891
12922
|
const themeColorMap = React17.useMemo(
|
|
12892
|
-
() => state.theme?.colorScheme ? (0,
|
|
12923
|
+
() => state.theme?.colorScheme ? (0, chunk43TOUP5U_js.dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
|
|
12893
12924
|
[state.theme?.colorScheme]
|
|
12894
12925
|
);
|
|
12895
12926
|
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
|
|
@@ -13464,23 +13495,23 @@ function ColorChangedImage({
|
|
|
13464
13495
|
className,
|
|
13465
13496
|
alt
|
|
13466
13497
|
}) {
|
|
13467
|
-
const tolerance = tolerancePct ??
|
|
13468
|
-
const cacheKey =
|
|
13498
|
+
const tolerance = tolerancePct ?? chunk43TOUP5U_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
|
|
13499
|
+
const cacheKey = chunk43TOUP5U_js.buildCacheKey(
|
|
13469
13500
|
src,
|
|
13470
13501
|
clrChange.clrFrom,
|
|
13471
13502
|
clrChange.clrTo,
|
|
13472
13503
|
tolerance,
|
|
13473
13504
|
Boolean(clrChange.clrToTransparent)
|
|
13474
13505
|
);
|
|
13475
|
-
const cached =
|
|
13506
|
+
const cached = chunk43TOUP5U_js.getCachedResult(cacheKey);
|
|
13476
13507
|
const [processedSrc, setProcessedSrc] = React17.useState(cached ?? null);
|
|
13477
13508
|
React17.useEffect(() => {
|
|
13478
|
-
if (
|
|
13479
|
-
setProcessedSrc(
|
|
13509
|
+
if (chunk43TOUP5U_js.getCachedResult(cacheKey)) {
|
|
13510
|
+
setProcessedSrc(chunk43TOUP5U_js.getCachedResult(cacheKey) ?? null);
|
|
13480
13511
|
return;
|
|
13481
13512
|
}
|
|
13482
13513
|
let cancelled = false;
|
|
13483
|
-
|
|
13514
|
+
chunk43TOUP5U_js.applyColorChange(
|
|
13484
13515
|
src,
|
|
13485
13516
|
clrChange.clrFrom,
|
|
13486
13517
|
clrChange.clrTo,
|
|
@@ -13488,7 +13519,7 @@ function ColorChangedImage({
|
|
|
13488
13519
|
Boolean(clrChange.clrToTransparent)
|
|
13489
13520
|
).then((result) => {
|
|
13490
13521
|
if (!cancelled) {
|
|
13491
|
-
|
|
13522
|
+
chunk43TOUP5U_js.setCachedResult(cacheKey, result.dataUrl);
|
|
13492
13523
|
setProcessedSrc(result.dataUrl);
|
|
13493
13524
|
}
|
|
13494
13525
|
return void 0;
|
|
@@ -13580,7 +13611,7 @@ function TiledImageLayer({
|
|
|
13580
13611
|
cancelled = true;
|
|
13581
13612
|
};
|
|
13582
13613
|
}, [src]);
|
|
13583
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...
|
|
13614
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunk43TOUP5U_js.getImageTilingStyle(element, nativeSize), ...style } });
|
|
13584
13615
|
}
|
|
13585
13616
|
function renderImageEffectDefinitions(element, excludeDuotone = false) {
|
|
13586
13617
|
return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13649,7 +13680,7 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13649
13680
|
...filter ? { filter } : {},
|
|
13650
13681
|
...opacity !== void 0 ? { opacity } : {}
|
|
13651
13682
|
};
|
|
13652
|
-
if (
|
|
13683
|
+
if (chunk43TOUP5U_js.isImageTiled(el)) {
|
|
13653
13684
|
const tileSrc = imgSrc(el);
|
|
13654
13685
|
if (!tileSrc) {
|
|
13655
13686
|
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" });
|
|
@@ -13668,12 +13699,12 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13668
13699
|
] });
|
|
13669
13700
|
}
|
|
13670
13701
|
const colorWash = pptx.getImageColorWashStyle(
|
|
13671
|
-
(0,
|
|
13702
|
+
(0, chunk43TOUP5U_js.dist_exports.isImageLikeElement)(el) ? el.imageEffects?.colorWash : void 0
|
|
13672
13703
|
);
|
|
13673
13704
|
const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
|
|
13674
|
-
const duotoneColors =
|
|
13705
|
+
const duotoneColors = chunk43TOUP5U_js.getDuotoneColors(el);
|
|
13675
13706
|
const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
|
|
13676
|
-
const filterForImg = useDuotoneCanvas ?
|
|
13707
|
+
const filterForImg = useDuotoneCanvas ? chunk43TOUP5U_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
|
|
13677
13708
|
const canvasEffectStyles = {
|
|
13678
13709
|
...filterForImg ? { filter: filterForImg } : {},
|
|
13679
13710
|
...opacity !== void 0 ? { opacity } : {}
|
|
@@ -13749,10 +13780,10 @@ function SlideBackgroundImageLayer({
|
|
|
13749
13780
|
style: { zIndex: 0 },
|
|
13750
13781
|
children: renderImg(
|
|
13751
13782
|
backgroundElement,
|
|
13752
|
-
|
|
13753
|
-
|
|
13783
|
+
chunk43TOUP5U_js.getImageRenderStyle(backgroundElement),
|
|
13784
|
+
chunk43TOUP5U_js.getImageEffectsFilter(backgroundElement),
|
|
13754
13785
|
"",
|
|
13755
|
-
|
|
13786
|
+
chunk43TOUP5U_js.getImageEffectsOpacity(backgroundElement)
|
|
13756
13787
|
)
|
|
13757
13788
|
}
|
|
13758
13789
|
);
|
|
@@ -14023,7 +14054,7 @@ function ChartElementView({
|
|
|
14023
14054
|
pptx.getBarFacePicturePixelSampleVersion
|
|
14024
14055
|
);
|
|
14025
14056
|
const viewModel = React17.useMemo(() => {
|
|
14026
|
-
return canEdit ?
|
|
14057
|
+
return canEdit ? chunk43TOUP5U_js.buildReactChartViewModel(element) : null;
|
|
14027
14058
|
}, [canEdit, element, barFacePictureSampleVersion]);
|
|
14028
14059
|
React17.useEffect(pptx.ensureChartInteractionStyles, []);
|
|
14029
14060
|
React17.useEffect(() => {
|
|
@@ -14108,9 +14139,9 @@ function ChartElementView({
|
|
|
14108
14139
|
textStyle: animationState?.textStyle,
|
|
14109
14140
|
onSelect: chart3D.onSelect,
|
|
14110
14141
|
onDrag: chart3D.onDrag,
|
|
14111
|
-
children:
|
|
14142
|
+
children: chunk43TOUP5U_js.renderChartElement(renderedElement)
|
|
14112
14143
|
}
|
|
14113
|
-
) :
|
|
14144
|
+
) : chunk43TOUP5U_js.renderChartElement(renderedElement),
|
|
14114
14145
|
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) }),
|
|
14115
14146
|
titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14116
14147
|
"input",
|
|
@@ -14440,7 +14471,7 @@ function ResizeHandles({
|
|
|
14440
14471
|
"aria-label": t("pptx.selectionOverlay.resize", { handle }),
|
|
14441
14472
|
"data-pptx-handle-kind": "resize",
|
|
14442
14473
|
"data-pptx-compact": true,
|
|
14443
|
-
className:
|
|
14474
|
+
className: chunk43TOUP5U_js.cn(
|
|
14444
14475
|
"absolute z-10 group border-0 bg-transparent p-0",
|
|
14445
14476
|
RESIZE_DEFAULT_CLASSES,
|
|
14446
14477
|
posClass,
|
|
@@ -14466,7 +14497,7 @@ function ResizeHandles({
|
|
|
14466
14497
|
"div",
|
|
14467
14498
|
{
|
|
14468
14499
|
"data-pptx-handle-hit": true,
|
|
14469
|
-
className:
|
|
14500
|
+
className: chunk43TOUP5U_js.cn(
|
|
14470
14501
|
"absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
|
|
14471
14502
|
corner ? "max-md:-inset-1.5 max-md:[--pptx-handle-hit-inset:-6px]" : "max-md:-inset-2 max-md:[--pptx-handle-hit-inset:-8px]"
|
|
14472
14503
|
),
|
|
@@ -14487,7 +14518,7 @@ function ResizeHandles({
|
|
|
14487
14518
|
"aria-label": t("pptx.selectionOverlay.rotate"),
|
|
14488
14519
|
"data-pptx-handle-kind": "rotate",
|
|
14489
14520
|
"data-pptx-compact": true,
|
|
14490
|
-
className:
|
|
14521
|
+
className: chunk43TOUP5U_js.cn(
|
|
14491
14522
|
"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",
|
|
14492
14523
|
ROTATE_DEFAULT_CLASSES
|
|
14493
14524
|
),
|
|
@@ -14557,17 +14588,17 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14557
14588
|
animationState,
|
|
14558
14589
|
textStyleOverrideCss
|
|
14559
14590
|
}) {
|
|
14560
|
-
const shapeEl = (0,
|
|
14591
|
+
const shapeEl = (0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(el) ? el : void 0;
|
|
14561
14592
|
const viewWidth = Math.max(el.width, 0);
|
|
14562
14593
|
const viewHeight = Math.max(el.height, 0);
|
|
14563
14594
|
const svgWidth = Math.max(el.width, 1);
|
|
14564
14595
|
const svgHeight = Math.max(el.height, 1);
|
|
14565
14596
|
const ss = shapeEl?.shapeStyle;
|
|
14566
14597
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
14567
|
-
const strokeColor =
|
|
14568
|
-
const strokePaint =
|
|
14569
|
-
const dashType =
|
|
14570
|
-
const dashArray =
|
|
14598
|
+
const strokeColor = chunk43TOUP5U_js.normalizeHexColor(ss?.strokeColor, chunk43TOUP5U_js.DEFAULT_STROKE_COLOR);
|
|
14599
|
+
const strokePaint = chunk43TOUP5U_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
|
|
14600
|
+
const dashType = chunk43TOUP5U_js.normalizeStrokeDashType(ss?.strokeDash);
|
|
14601
|
+
const dashArray = chunk43TOUP5U_js.getSvgStrokeDasharray(
|
|
14571
14602
|
dashType,
|
|
14572
14603
|
Math.max(strokeWidth, 1),
|
|
14573
14604
|
ss?.customDashSegments
|
|
@@ -14578,14 +14609,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14578
14609
|
const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
14579
14610
|
const startMarkerId = `${markerSeed}-sel-start`;
|
|
14580
14611
|
const endMarkerId = `${markerSeed}-sel-end`;
|
|
14581
|
-
const compoundOffsets =
|
|
14582
|
-
const compoundWidths =
|
|
14612
|
+
const compoundOffsets = chunk43TOUP5U_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
14613
|
+
const compoundWidths = chunk43TOUP5U_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
14583
14614
|
const strokeCap = pptx.svgLineCap(ss?.lineCap);
|
|
14584
|
-
const textEl = (0,
|
|
14615
|
+
const textEl = (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el) ? el : void 0;
|
|
14585
14616
|
const connectorText = textEl?.text?.trim() ?? "";
|
|
14586
14617
|
const connectorTextSegments = textEl?.textSegments;
|
|
14587
14618
|
const connectorTextStyle = textEl?.textStyle;
|
|
14588
|
-
const pathGeometry = shapeEl ?
|
|
14619
|
+
const pathGeometry = shapeEl ? chunk43TOUP5U_js.getConnectorPathGeometry(shapeEl) : {
|
|
14589
14620
|
pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
|
|
14590
14621
|
startX: 0,
|
|
14591
14622
|
startY: 0,
|
|
@@ -14594,16 +14625,16 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14594
14625
|
};
|
|
14595
14626
|
const hitTargetWidth = Math.max(strokeWidth * 3, 14);
|
|
14596
14627
|
const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
|
|
14597
|
-
const lineShadow =
|
|
14598
|
-
const lineGlow =
|
|
14628
|
+
const lineShadow = chunk43TOUP5U_js.buildLineShadowCss(el);
|
|
14629
|
+
const lineGlow = chunk43TOUP5U_js.buildLineGlowFilter(el);
|
|
14599
14630
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14600
14631
|
"div",
|
|
14601
14632
|
{
|
|
14602
14633
|
"data-pptx-element": "true",
|
|
14603
14634
|
"data-element-id": el.id,
|
|
14604
|
-
role:
|
|
14605
|
-
"aria-label":
|
|
14606
|
-
"aria-roledescription":
|
|
14635
|
+
role: chunk43TOUP5U_js.getAriaRole(el, { actionable: false }),
|
|
14636
|
+
"aria-label": chunk43TOUP5U_js.getAriaLabel(el),
|
|
14637
|
+
"aria-roledescription": chunk43TOUP5U_js.getAriaRoleDescription(el),
|
|
14607
14638
|
"aria-selected": isSelected ? true : void 0,
|
|
14608
14639
|
className: "absolute",
|
|
14609
14640
|
style: {
|
|
@@ -14636,14 +14667,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14636
14667
|
style: { overflow: "visible", pointerEvents: "none" },
|
|
14637
14668
|
children: [
|
|
14638
14669
|
/* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
|
|
14639
|
-
|
|
14670
|
+
chunk43TOUP5U_js.renderConnectorMarker(
|
|
14640
14671
|
startMarkerId,
|
|
14641
14672
|
startArrow,
|
|
14642
14673
|
strokePaint,
|
|
14643
14674
|
ss?.connectorStartArrowWidth,
|
|
14644
14675
|
ss?.connectorStartArrowLength
|
|
14645
14676
|
),
|
|
14646
|
-
|
|
14677
|
+
chunk43TOUP5U_js.renderConnectorMarker(
|
|
14647
14678
|
endMarkerId,
|
|
14648
14679
|
endArrow,
|
|
14649
14680
|
strokePaint,
|
|
@@ -14849,14 +14880,14 @@ function getElementInteractionProps({
|
|
|
14849
14880
|
};
|
|
14850
14881
|
}
|
|
14851
14882
|
function renderDagDuotoneFilterForElement(el) {
|
|
14852
|
-
if (!
|
|
14883
|
+
if (!chunk43TOUP5U_js.hasDagDuotoneEffect(el)) {
|
|
14853
14884
|
return null;
|
|
14854
14885
|
}
|
|
14855
14886
|
const duotone = el.shapeStyle?.dagDuotone;
|
|
14856
14887
|
if (!duotone) {
|
|
14857
14888
|
return null;
|
|
14858
14889
|
}
|
|
14859
|
-
return
|
|
14890
|
+
return chunk43TOUP5U_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
|
|
14860
14891
|
}
|
|
14861
14892
|
function getContainerStyle({
|
|
14862
14893
|
el,
|
|
@@ -14869,7 +14900,7 @@ function getContainerStyle({
|
|
|
14869
14900
|
has3DExtrusion,
|
|
14870
14901
|
templateEditing
|
|
14871
14902
|
}) {
|
|
14872
|
-
const ss = (0,
|
|
14903
|
+
const ss = (0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
|
|
14873
14904
|
const isPicture = el.type === "picture" || el.type === "image";
|
|
14874
14905
|
const blurGrowVisible = Boolean(
|
|
14875
14906
|
ss?.blurGrow && typeof ss.blurRadius === "number" && ss.blurRadius > 0
|
|
@@ -14883,10 +14914,10 @@ function getContainerStyle({
|
|
|
14883
14914
|
top: isFullscreenMedia ? fs.top : el.y,
|
|
14884
14915
|
width: isFullscreenMedia ? fs.width : painted.width,
|
|
14885
14916
|
...heightStyle,
|
|
14886
|
-
transform: isFullscreenMedia ? fs.transform :
|
|
14917
|
+
transform: isFullscreenMedia ? fs.transform : chunk43TOUP5U_js.getElementTransform(el),
|
|
14887
14918
|
transformOrigin: "center",
|
|
14888
14919
|
overflow: overflowValue,
|
|
14889
|
-
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ?
|
|
14920
|
+
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunk43TOUP5U_js.getCropShapeClipPath(el) : void 0,
|
|
14890
14921
|
zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
|
|
14891
14922
|
visibility: animationState?.visible === false ? "hidden" : "visible",
|
|
14892
14923
|
animation: animationState?.cssAnimation,
|
|
@@ -14921,11 +14952,11 @@ function getContainerStyle({
|
|
|
14921
14952
|
};
|
|
14922
14953
|
}
|
|
14923
14954
|
function shapeParams(element) {
|
|
14924
|
-
const style = (0,
|
|
14955
|
+
const style = (0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
|
|
14925
14956
|
const strokeWidth = pptx.paintedStrokeWidth(style);
|
|
14926
|
-
const strokeColor =
|
|
14927
|
-
const fillColor =
|
|
14928
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
14957
|
+
const strokeColor = chunk43TOUP5U_js.normalizeHexColor(style?.strokeColor, chunk43TOUP5U_js.DEFAULT_STROKE_COLOR);
|
|
14958
|
+
const fillColor = chunk43TOUP5U_js.normalizeHexColor(style?.fillColor, chunk43TOUP5U_js.DEFAULT_FILL_COLOR);
|
|
14959
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk43TOUP5U_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
14929
14960
|
return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
|
|
14930
14961
|
}
|
|
14931
14962
|
var Extrusion3DOverlay = React17__default.default.memo(
|
|
@@ -15030,7 +15061,7 @@ function ShapeEffectOverlay({
|
|
|
15030
15061
|
const fillOverlayStyle = overlay ? {
|
|
15031
15062
|
position: "absolute",
|
|
15032
15063
|
inset: 0,
|
|
15033
|
-
...(0,
|
|
15064
|
+
...(0, chunk43TOUP5U_js.dist_exports.isImageLikeElement)(element) ? chunk43TOUP5U_js.getImageSurfaceMaskStyle(element) : {},
|
|
15034
15065
|
background: overlay.color,
|
|
15035
15066
|
mixBlendMode: overlay.blendMode,
|
|
15036
15067
|
pointerEvents: "none"
|
|
@@ -15234,10 +15265,10 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15234
15265
|
const backgroundAnimationState = pptx.getBackgroundAnimationState(el, presentationElementStates);
|
|
15235
15266
|
const effectPlacement = pptx.getShapeEffectLayerPlacement(el);
|
|
15236
15267
|
const visualAnimationState = backgroundAnimationState ?? animationState;
|
|
15237
|
-
const isTxt =
|
|
15238
|
-
const txtSE = (0,
|
|
15268
|
+
const isTxt = chunk43TOUP5U_js.isEditableTextElement(el) && allow.textEditable;
|
|
15269
|
+
const txtSE = (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el) ? el.textStyle : void 0;
|
|
15239
15270
|
const textStyleOverrideCss = pptx.buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
|
|
15240
|
-
const ss =
|
|
15271
|
+
const ss = chunk43TOUP5U_js.getShapeVisualStyle(
|
|
15241
15272
|
el,
|
|
15242
15273
|
hf,
|
|
15243
15274
|
fc,
|
|
@@ -15246,9 +15277,9 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15246
15277
|
visualAnimationState?.animatesFill,
|
|
15247
15278
|
visualAnimationState?.animatesStroke
|
|
15248
15279
|
);
|
|
15249
|
-
const ts =
|
|
15280
|
+
const ts = chunk43TOUP5U_js.getTextStyleForElement(el, chunk43TOUP5U_js.DEFAULT_TEXT_COLOR);
|
|
15250
15281
|
const isImg = el.type === "picture" || el.type === "image";
|
|
15251
|
-
const vs =
|
|
15282
|
+
const vs = chunk43TOUP5U_js.renderVectorShape(
|
|
15252
15283
|
el,
|
|
15253
15284
|
isImg ? false : hf,
|
|
15254
15285
|
fc,
|
|
@@ -15258,10 +15289,10 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15258
15289
|
visualAnimationState?.animatesStroke
|
|
15259
15290
|
);
|
|
15260
15291
|
const isModel3D = el.type === "model3d";
|
|
15261
|
-
const isConn =
|
|
15262
|
-
const shapeStyle3d = (0,
|
|
15292
|
+
const isConn = chunk43TOUP5U_js.isConnectorOrLineElement(el);
|
|
15293
|
+
const shapeStyle3d = (0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
|
|
15263
15294
|
const extrusionData = React17.useMemo(
|
|
15264
|
-
() =>
|
|
15295
|
+
() => chunk43TOUP5U_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
|
|
15265
15296
|
[shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
|
|
15266
15297
|
);
|
|
15267
15298
|
const actionAffordance = useActionAffordance(el, canInteract);
|
|
@@ -15351,7 +15382,7 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15351
15382
|
"aria-hidden": aria.hidden ? true : void 0,
|
|
15352
15383
|
"aria-selected": isSelected ? true : void 0,
|
|
15353
15384
|
tabIndex: isFocusable ? 0 : -1,
|
|
15354
|
-
className:
|
|
15385
|
+
className: chunk43TOUP5U_js.cn(
|
|
15355
15386
|
"absolute",
|
|
15356
15387
|
"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
|
|
15357
15388
|
cur,
|
|
@@ -15424,9 +15455,9 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15424
15455
|
txtSE,
|
|
15425
15456
|
txtS: ts,
|
|
15426
15457
|
vecShape: backgroundAnimationState && !isImg ? null : vs,
|
|
15427
|
-
imgStyle:
|
|
15428
|
-
imgFilter:
|
|
15429
|
-
imgOpacity:
|
|
15458
|
+
imgStyle: chunk43TOUP5U_js.getImageRenderStyle(el),
|
|
15459
|
+
imgFilter: chunk43TOUP5U_js.getImageEffectsFilter(el),
|
|
15460
|
+
imgOpacity: chunk43TOUP5U_js.getImageEffectsOpacity(el),
|
|
15430
15461
|
imgAlt: imageAltText,
|
|
15431
15462
|
isTxtEl: isTxt,
|
|
15432
15463
|
media: mediaDataUrls,
|
|
@@ -15563,10 +15594,10 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
|
|
|
15563
15594
|
}
|
|
15564
15595
|
function renderInk(el, options) {
|
|
15565
15596
|
const replay = options?.replay ?? false;
|
|
15566
|
-
const strokes =
|
|
15597
|
+
const strokes = chunk43TOUP5U_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
|
|
15567
15598
|
strokes.some((s) => s.circles || s.nibMarks);
|
|
15568
15599
|
const pressureSensitive = options?.pressureSensitive;
|
|
15569
|
-
const replayStyles = replay ?
|
|
15600
|
+
const replayStyles = replay ? chunk43TOUP5U_js.getInkReplayStyles(el, options?.replayConfig) : null;
|
|
15570
15601
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15571
15602
|
"svg",
|
|
15572
15603
|
{
|
|
@@ -15574,7 +15605,7 @@ function renderInk(el, options) {
|
|
|
15574
15605
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
15575
15606
|
preserveAspectRatio: "none",
|
|
15576
15607
|
children: [
|
|
15577
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
15608
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk43TOUP5U_js.INK_REPLAY_KEYFRAMES }),
|
|
15578
15609
|
strokes.map(
|
|
15579
15610
|
(s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
|
|
15580
15611
|
)
|
|
@@ -15585,7 +15616,7 @@ function renderInk(el, options) {
|
|
|
15585
15616
|
function renderGroup(children, parentGroupFill) {
|
|
15586
15617
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: pptx.filterRenderedElements(children).map((c, childIndex) => {
|
|
15587
15618
|
const { hf, fc, sw, sc } = shapeParams(c);
|
|
15588
|
-
const baseSs =
|
|
15619
|
+
const baseSs = chunk43TOUP5U_js.getShapeVisualStyle(c, hf, fc, sw, sc);
|
|
15589
15620
|
const inheritedFill = pptx.resolveGroupChildFill(c, parentGroupFill);
|
|
15590
15621
|
const ss = inheritedFill ? {
|
|
15591
15622
|
...baseSs,
|
|
@@ -15596,9 +15627,9 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15596
15627
|
backgroundPosition: inheritedFill.backgroundPosition
|
|
15597
15628
|
} : baseSs;
|
|
15598
15629
|
const isI = c.type === "picture" || c.type === "image";
|
|
15599
|
-
const vs =
|
|
15600
|
-
const ts =
|
|
15601
|
-
const isTxt =
|
|
15630
|
+
const vs = chunk43TOUP5U_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
|
|
15631
|
+
const ts = chunk43TOUP5U_js.getTextStyleForElement(c, chunk43TOUP5U_js.DEFAULT_TEXT_COLOR);
|
|
15632
|
+
const isTxt = chunk43TOUP5U_js.isEditableTextElement(c);
|
|
15602
15633
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15603
15634
|
"div",
|
|
15604
15635
|
{
|
|
@@ -15607,9 +15638,9 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15607
15638
|
style: {
|
|
15608
15639
|
left: c.x,
|
|
15609
15640
|
top: c.y,
|
|
15610
|
-
width: Math.max(c.width,
|
|
15611
|
-
height: Math.max(c.height,
|
|
15612
|
-
transform:
|
|
15641
|
+
width: Math.max(c.width, chunk43TOUP5U_js.MIN_ELEMENT_SIZE),
|
|
15642
|
+
height: Math.max(c.height, chunk43TOUP5U_js.MIN_ELEMENT_SIZE),
|
|
15643
|
+
transform: chunk43TOUP5U_js.getElementTransform(c),
|
|
15613
15644
|
transformOrigin: "center",
|
|
15614
15645
|
...ss,
|
|
15615
15646
|
...isI ? {
|
|
@@ -15634,8 +15665,8 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15634
15665
|
// A nested group: recurse, chaining the inherited fill so a
|
|
15635
15666
|
// `grpFill` shape under a fill-less sub-group still paints.
|
|
15636
15667
|
renderGroup(c.children, pptx.getGroupChildParentFill(c, parentGroupFill))
|
|
15637
|
-
) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style:
|
|
15638
|
-
|
|
15668
|
+
) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk43TOUP5U_js.getImageSurfaceStyle(c), children: [
|
|
15669
|
+
chunk43TOUP5U_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15639
15670
|
TiledImageLayer,
|
|
15640
15671
|
{
|
|
15641
15672
|
element: c,
|
|
@@ -15648,7 +15679,7 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15648
15679
|
src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
|
|
15649
15680
|
alt: i18n.translationsEn["pptx.ink.groupChildAlt"],
|
|
15650
15681
|
className: "pointer-events-none select-none",
|
|
15651
|
-
style:
|
|
15682
|
+
style: chunk43TOUP5U_js.getImageRenderStyle(c),
|
|
15652
15683
|
draggable: false
|
|
15653
15684
|
}
|
|
15654
15685
|
),
|
|
@@ -15660,7 +15691,7 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15660
15691
|
{
|
|
15661
15692
|
className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
|
|
15662
15693
|
style: ts,
|
|
15663
|
-
children:
|
|
15694
|
+
children: chunk43TOUP5U_js.renderTextSegments(c, chunk43TOUP5U_js.DEFAULT_TEXT_COLOR)
|
|
15664
15695
|
}
|
|
15665
15696
|
) : null
|
|
15666
15697
|
] })
|
|
@@ -15674,8 +15705,8 @@ function renderContentPart(el, options) {
|
|
|
15674
15705
|
if (el.inkStrokes && el.inkStrokes.length > 0) {
|
|
15675
15706
|
const replay = options?.replay ?? false;
|
|
15676
15707
|
const pressureSensitive = options?.pressureSensitive ?? true;
|
|
15677
|
-
const strokes =
|
|
15678
|
-
const replayStyles = replay ?
|
|
15708
|
+
const strokes = chunk43TOUP5U_js.buildContentPartStrokes(el);
|
|
15709
|
+
const replayStyles = replay ? chunk43TOUP5U_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
|
|
15679
15710
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15680
15711
|
"svg",
|
|
15681
15712
|
{
|
|
@@ -15683,7 +15714,7 @@ function renderContentPart(el, options) {
|
|
|
15683
15714
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
15684
15715
|
preserveAspectRatio: "none",
|
|
15685
15716
|
children: [
|
|
15686
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
15717
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk43TOUP5U_js.INK_REPLAY_KEYFRAMES }),
|
|
15687
15718
|
strokes.map(
|
|
15688
15719
|
(s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
|
|
15689
15720
|
)
|
|
@@ -15910,9 +15941,9 @@ function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
|
|
|
15910
15941
|
collaboration: connected,
|
|
15911
15942
|
model: pptx.createInlineListModelObserver(element),
|
|
15912
15943
|
activationSelection,
|
|
15913
|
-
children: seed && !connected ?
|
|
15944
|
+
children: seed && !connected ? chunk43TOUP5U_js.renderTextSegments(
|
|
15914
15945
|
element,
|
|
15915
|
-
|
|
15946
|
+
chunk43TOUP5U_js.DEFAULT_TEXT_COLOR,
|
|
15916
15947
|
void 0,
|
|
15917
15948
|
void 0,
|
|
15918
15949
|
void 0,
|
|
@@ -16082,7 +16113,7 @@ function InlineTextEditor({
|
|
|
16082
16113
|
seedRef.current = {
|
|
16083
16114
|
initialText,
|
|
16084
16115
|
hasRichSegments: Boolean(
|
|
16085
|
-
(0,
|
|
16116
|
+
(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(element) && element.textSegments && element.textSegments.length > 0
|
|
16086
16117
|
)
|
|
16087
16118
|
};
|
|
16088
16119
|
}
|
|
@@ -16148,8 +16179,8 @@ function InlineTextEditor({
|
|
|
16148
16179
|
pending.endOffset
|
|
16149
16180
|
);
|
|
16150
16181
|
});
|
|
16151
|
-
const warpStyle =
|
|
16152
|
-
const compensationTransform =
|
|
16182
|
+
const warpStyle = chunk43TOUP5U_js.getTextWarpStyle(textStyleRaw);
|
|
16183
|
+
const compensationTransform = chunk43TOUP5U_js.getTextCompensationTransform(element);
|
|
16153
16184
|
const warpTransform = warpStyle?.transform;
|
|
16154
16185
|
const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
|
|
16155
16186
|
const wrapperStyle = {
|
|
@@ -16160,7 +16191,7 @@ function InlineTextEditor({
|
|
|
16160
16191
|
transformOrigin: warpStyle?.transformOrigin || "center"
|
|
16161
16192
|
};
|
|
16162
16193
|
const nextInlineStyleValue = (property) => {
|
|
16163
|
-
if (!(0,
|
|
16194
|
+
if (!(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(element)) {
|
|
16164
16195
|
return true;
|
|
16165
16196
|
}
|
|
16166
16197
|
const result = pptx.getInlineEditorSelectionResult(element.textSegments);
|
|
@@ -16237,7 +16268,7 @@ function InlineTextEditor({
|
|
|
16237
16268
|
const text = e.clipboardData.getData("text/plain");
|
|
16238
16269
|
document.execCommand("insertText", false, text);
|
|
16239
16270
|
},
|
|
16240
|
-
children: list.seed ? list.children : seed.hasRichSegments ?
|
|
16271
|
+
children: list.seed ? list.children : seed.hasRichSegments ? chunk43TOUP5U_js.renderTextSegments(element, chunk43TOUP5U_js.DEFAULT_TEXT_COLOR) : seed.initialText
|
|
16241
16272
|
},
|
|
16242
16273
|
list.seed?.paragraphs[0].token ?? "plain"
|
|
16243
16274
|
);
|
|
@@ -17174,7 +17205,7 @@ function SmartArtRendererImpl({
|
|
|
17174
17205
|
if (!onUpdateElement || !pptx.shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
|
|
17175
17206
|
return;
|
|
17176
17207
|
}
|
|
17177
|
-
const updated = (0,
|
|
17208
|
+
const updated = (0, chunk43TOUP5U_js.dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text);
|
|
17178
17209
|
const box = { width: element.width, height: element.height };
|
|
17179
17210
|
const reflowed = pptx.rebuildDrawingShapesIfCleared(
|
|
17180
17211
|
updated,
|
|
@@ -17190,7 +17221,7 @@ function SmartArtRendererImpl({
|
|
|
17190
17221
|
if (!onUpdateElement) {
|
|
17191
17222
|
return;
|
|
17192
17223
|
}
|
|
17193
|
-
const next = (0,
|
|
17224
|
+
const next = (0, chunk43TOUP5U_js.dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, { fillColor: fill });
|
|
17194
17225
|
if (next !== smartArtData) {
|
|
17195
17226
|
const box = { width: element.width, height: element.height };
|
|
17196
17227
|
const reflowed = pptx.rebuildDrawingShapesIfCleared(
|
|
@@ -17384,7 +17415,7 @@ function groupIntoParagraphs(element, fieldContext) {
|
|
|
17384
17415
|
element,
|
|
17385
17416
|
fieldContext ? (seg) => {
|
|
17386
17417
|
if (seg.fieldType) {
|
|
17387
|
-
const substituted =
|
|
17418
|
+
const substituted = chunk43TOUP5U_js.substituteFieldText(
|
|
17388
17419
|
seg.text,
|
|
17389
17420
|
seg.fieldType,
|
|
17390
17421
|
fieldContext,
|
|
@@ -17419,13 +17450,13 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
|
|
|
17419
17450
|
if (s.strikethrough) {
|
|
17420
17451
|
decos.push("line-through");
|
|
17421
17452
|
}
|
|
17422
|
-
const fill = s.hyperlink ?
|
|
17453
|
+
const fill = s.hyperlink ? chunk43TOUP5U_js.normalizeHexColor(s.color || element.textStyle?.color, chunk43TOUP5U_js.HYPERLINK_COLOR) : chunk43TOUP5U_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
|
|
17423
17454
|
return {
|
|
17424
17455
|
fill,
|
|
17425
|
-
fontSize: s.fontSize ?? element.textStyle?.fontSize ??
|
|
17456
|
+
fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunk43TOUP5U_js.DEFAULT_TEXT_FONT_SIZE,
|
|
17426
17457
|
fontWeight: s.bold ? 700 : 400,
|
|
17427
17458
|
fontStyle: s.italic ? "italic" : void 0,
|
|
17428
|
-
fontFamily: s.fontFamily || element.textStyle?.fontFamily ? (0,
|
|
17459
|
+
fontFamily: s.fontFamily || element.textStyle?.fontFamily ? (0, chunk43TOUP5U_js.dist_exports.getSubstituteFontFamily)(s.fontFamily || element.textStyle?.fontFamily || "") : chunk43TOUP5U_js.DEFAULT_FONT_FAMILY,
|
|
17429
17460
|
textDecoration: decos.length > 0 ? decos.join(" ") : void 0
|
|
17430
17461
|
};
|
|
17431
17462
|
}
|
|
@@ -17433,8 +17464,8 @@ function resolveSegmentFont(segment, element) {
|
|
|
17433
17464
|
const s = segment.style || {};
|
|
17434
17465
|
const family = s.fontFamily || element.textStyle?.fontFamily;
|
|
17435
17466
|
return {
|
|
17436
|
-
fontFamily: family ? (0,
|
|
17437
|
-
fontSizePx: s.fontSize ?? element.textStyle?.fontSize ??
|
|
17467
|
+
fontFamily: family ? (0, chunk43TOUP5U_js.dist_exports.getSubstituteFontFamily)(family) : chunk43TOUP5U_js.DEFAULT_FONT_FAMILY,
|
|
17468
|
+
fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunk43TOUP5U_js.DEFAULT_TEXT_FONT_SIZE,
|
|
17438
17469
|
bold: s.bold ?? element.textStyle?.bold,
|
|
17439
17470
|
italic: s.italic ?? element.textStyle?.italic
|
|
17440
17471
|
};
|
|
@@ -17500,7 +17531,7 @@ function WarpedText({
|
|
|
17500
17531
|
fallbackColor,
|
|
17501
17532
|
fieldContext
|
|
17502
17533
|
}) {
|
|
17503
|
-
if (!(0,
|
|
17534
|
+
if (!(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(element)) {
|
|
17504
17535
|
return null;
|
|
17505
17536
|
}
|
|
17506
17537
|
const textEl = element;
|
|
@@ -17518,9 +17549,9 @@ function WarpedText({
|
|
|
17518
17549
|
const warpAdj2 = textEl.textStyle?.textWarpAdj2;
|
|
17519
17550
|
const align = textEl.textStyle?.align ?? "center";
|
|
17520
17551
|
const { startOffset, textAnchor } = getAlignmentProps(align);
|
|
17521
|
-
const baseFontSize = textEl.textStyle?.fontSize ??
|
|
17522
|
-
const baseFontFamily = textEl.textStyle?.fontFamily ? (0,
|
|
17523
|
-
const baseFill =
|
|
17552
|
+
const baseFontSize = textEl.textStyle?.fontSize ?? chunk43TOUP5U_js.DEFAULT_TEXT_FONT_SIZE;
|
|
17553
|
+
const baseFontFamily = textEl.textStyle?.fontFamily ? (0, chunk43TOUP5U_js.dist_exports.getSubstituteFontFamily)(textEl.textStyle.fontFamily) : chunk43TOUP5U_js.DEFAULT_FONT_FAMILY;
|
|
17554
|
+
const baseFill = chunk43TOUP5U_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
|
|
17524
17555
|
if (pptx.hasGlyphEnvelope(preset)) {
|
|
17525
17556
|
const perLine = pptx.buildGlyphEnvelopeBlock(
|
|
17526
17557
|
preset,
|
|
@@ -17620,7 +17651,7 @@ function WarpedText({
|
|
|
17620
17651
|
);
|
|
17621
17652
|
}
|
|
17622
17653
|
var GLYPH_BY_SHAPE = Object.fromEntries(
|
|
17623
|
-
|
|
17654
|
+
chunk43TOUP5U_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
|
|
17624
17655
|
);
|
|
17625
17656
|
GLYPH_BY_SHAPE["actionButtonForwardOrNext"] = GLYPH_BY_SHAPE["actionButtonForwardNext"];
|
|
17626
17657
|
GLYPH_BY_SHAPE["actionButtonBackOrPrevious"] = GLYPH_BY_SHAPE["actionButtonBackPrevious"];
|
|
@@ -17690,11 +17721,11 @@ function renderTextElementBody(options) {
|
|
|
17690
17721
|
const isLinkedTextBox = pptx.isLinkedTextBox(el);
|
|
17691
17722
|
const linkedSegments = pptx.getOverflowSegments(el, slideElements);
|
|
17692
17723
|
const useSvgWarp = pptx.shouldUseSvgWarp(
|
|
17693
|
-
(0,
|
|
17724
|
+
(0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el) ? el.textStyle?.textWarpPreset : void 0
|
|
17694
17725
|
);
|
|
17695
|
-
const scene3dStyle = (0,
|
|
17726
|
+
const scene3dStyle = (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(el) ? chunk43TOUP5U_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
|
|
17696
17727
|
const rotationTransform = pptx.getTextBodyRotationTransform(el);
|
|
17697
|
-
const composedTransform = [rotationTransform,
|
|
17728
|
+
const composedTransform = [rotationTransform, chunk43TOUP5U_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
|
|
17698
17729
|
const transformStyle = {
|
|
17699
17730
|
transform: composedTransform,
|
|
17700
17731
|
// A COM-measured homography (`scene3dStyle.transformOrigin === '0 0'`)
|
|
@@ -17724,18 +17755,18 @@ function renderTextElementBody(options) {
|
|
|
17724
17755
|
shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
17725
17756
|
"div",
|
|
17726
17757
|
{
|
|
17727
|
-
className:
|
|
17758
|
+
className: chunk43TOUP5U_js.cn(
|
|
17728
17759
|
"relative z-10 w-full h-full",
|
|
17729
17760
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
17730
17761
|
),
|
|
17731
|
-
style: { ...
|
|
17762
|
+
style: { ...chunk43TOUP5U_js.getTextLayoutStyle(el), ...transformStyle },
|
|
17732
17763
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17733
17764
|
WarpedText,
|
|
17734
17765
|
{
|
|
17735
17766
|
element: el,
|
|
17736
17767
|
width: el.width,
|
|
17737
17768
|
height: el.height,
|
|
17738
|
-
fallbackColor:
|
|
17769
|
+
fallbackColor: chunk43TOUP5U_js.DEFAULT_TEXT_COLOR,
|
|
17739
17770
|
findHighlights: findHl,
|
|
17740
17771
|
fieldContext
|
|
17741
17772
|
}
|
|
@@ -17744,19 +17775,19 @@ function renderTextElementBody(options) {
|
|
|
17744
17775
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
17745
17776
|
"div",
|
|
17746
17777
|
{
|
|
17747
|
-
className:
|
|
17778
|
+
className: chunk43TOUP5U_js.cn(
|
|
17748
17779
|
"relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
|
|
17749
17780
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
17750
17781
|
),
|
|
17751
17782
|
style: {
|
|
17752
|
-
...
|
|
17783
|
+
...chunk43TOUP5U_js.getTextLayoutStyle(el),
|
|
17753
17784
|
...txtS,
|
|
17754
|
-
...
|
|
17785
|
+
...chunk43TOUP5U_js.getTextWarpStyle(txtSE),
|
|
17755
17786
|
...transformStyle
|
|
17756
17787
|
},
|
|
17757
|
-
children:
|
|
17788
|
+
children: chunk43TOUP5U_js.renderTextSegments(
|
|
17758
17789
|
el,
|
|
17759
|
-
|
|
17790
|
+
chunk43TOUP5U_js.DEFAULT_TEXT_COLOR,
|
|
17760
17791
|
void 0,
|
|
17761
17792
|
findHl,
|
|
17762
17793
|
onHyperlinkClick,
|
|
@@ -18075,7 +18106,7 @@ function renderBody(options) {
|
|
|
18075
18106
|
);
|
|
18076
18107
|
}
|
|
18077
18108
|
if (isImg) {
|
|
18078
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style:
|
|
18109
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk43TOUP5U_js.getImageSurfaceStyle(el), children: [
|
|
18079
18110
|
renderImg(el, imgStyle, imgFilter, imgAlt, imgOpacity),
|
|
18080
18111
|
vecShape ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", children: vecShape }) : null
|
|
18081
18112
|
] });
|
|
@@ -18092,7 +18123,7 @@ function renderBody(options) {
|
|
|
18092
18123
|
textDirection: txtSE?.textDirection,
|
|
18093
18124
|
textStyle: txtS,
|
|
18094
18125
|
textStyleRaw: txtSE,
|
|
18095
|
-
layoutStyle:
|
|
18126
|
+
layoutStyle: chunk43TOUP5U_js.getTextLayoutStyle(el),
|
|
18096
18127
|
element: el,
|
|
18097
18128
|
onCommit,
|
|
18098
18129
|
onCancel,
|
|
@@ -18103,7 +18134,7 @@ function renderBody(options) {
|
|
|
18103
18134
|
] });
|
|
18104
18135
|
}
|
|
18105
18136
|
if (el.type === "table") {
|
|
18106
|
-
return
|
|
18137
|
+
return chunk43TOUP5U_js.renderTableElement(el, txtS, {
|
|
18107
18138
|
editable: isSel,
|
|
18108
18139
|
selectedCell: isSel ? tableSt : null,
|
|
18109
18140
|
onSelectCell: onCellSel,
|
|
@@ -18136,7 +18167,7 @@ function renderBody(options) {
|
|
|
18136
18167
|
);
|
|
18137
18168
|
}
|
|
18138
18169
|
if (el.type === "media") {
|
|
18139
|
-
return
|
|
18170
|
+
return chunk43TOUP5U_js.renderMediaElement(el, media, {
|
|
18140
18171
|
// Present mode autoplays every media element on the active slide,
|
|
18141
18172
|
// not only ones persisted with their own `autoPlay` flag (matching
|
|
18142
18173
|
// the other four bindings' unconditional `presenting`-gated
|
|
@@ -18159,7 +18190,7 @@ function renderBody(options) {
|
|
|
18159
18190
|
onPlayStateChange: handleMediaPlayStateChange
|
|
18160
18191
|
});
|
|
18161
18192
|
}
|
|
18162
|
-
if (doInk && (0,
|
|
18193
|
+
if (doInk && (0, chunk43TOUP5U_js.dist_exports.isInkElement)(el)) {
|
|
18163
18194
|
return renderInk(el, {
|
|
18164
18195
|
replay: isPresentationPassive,
|
|
18165
18196
|
pressureSensitive: true
|
|
@@ -18188,27 +18219,27 @@ function renderBody(options) {
|
|
|
18188
18219
|
}
|
|
18189
18220
|
return renderGroup(el.children, pptx.getGroupChildParentFill(el));
|
|
18190
18221
|
}
|
|
18191
|
-
if (
|
|
18192
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
18222
|
+
if (chunk43TOUP5U_js.shouldRenderFallbackLabel(el, isTxtEl)) {
|
|
18223
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk43TOUP5U_js.getElementLabel(el) });
|
|
18193
18224
|
}
|
|
18194
18225
|
return renderTextElementBody(options);
|
|
18195
18226
|
}
|
|
18196
18227
|
function defaultTextColorForFill(fillColor) {
|
|
18197
18228
|
const hex = String(fillColor ?? "").replace(/^#/u, "");
|
|
18198
18229
|
if (!/^[0-9a-f]{6}$/iu.test(hex)) {
|
|
18199
|
-
return
|
|
18230
|
+
return chunk43TOUP5U_js.DEFAULT_TEXT_COLOR;
|
|
18200
18231
|
}
|
|
18201
18232
|
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);
|
|
18202
18233
|
const luminance = channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
|
|
18203
|
-
return luminance > 0.179 ?
|
|
18234
|
+
return luminance > 0.179 ? chunk43TOUP5U_js.DEFAULT_TEXT_COLOR : "#ffffff";
|
|
18204
18235
|
}
|
|
18205
18236
|
function getStaticElementVisualState(element, parentGroupFill) {
|
|
18206
|
-
const style = (0,
|
|
18207
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
18208
|
-
const fill =
|
|
18237
|
+
const style = (0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
|
|
18238
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk43TOUP5U_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
18239
|
+
const fill = chunk43TOUP5U_js.normalizeHexColor(style?.fillColor, chunk43TOUP5U_js.DEFAULT_FILL_COLOR);
|
|
18209
18240
|
const strokeWidth = pptx.paintedStrokeWidth(style);
|
|
18210
|
-
const stroke =
|
|
18211
|
-
const baseVisualStyle =
|
|
18241
|
+
const stroke = chunk43TOUP5U_js.normalizeHexColor(style?.strokeColor, chunk43TOUP5U_js.DEFAULT_STROKE_COLOR);
|
|
18242
|
+
const baseVisualStyle = chunk43TOUP5U_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
|
|
18212
18243
|
const inheritedFill = pptx.resolveGroupChildFill(element, parentGroupFill);
|
|
18213
18244
|
const visualStyle = inheritedFill ? {
|
|
18214
18245
|
...baseVisualStyle,
|
|
@@ -18218,13 +18249,13 @@ function getStaticElementVisualState(element, parentGroupFill) {
|
|
|
18218
18249
|
backgroundSize: inheritedFill.backgroundSize,
|
|
18219
18250
|
backgroundPosition: inheritedFill.backgroundPosition
|
|
18220
18251
|
} : baseVisualStyle;
|
|
18221
|
-
const textStyle =
|
|
18252
|
+
const textStyle = chunk43TOUP5U_js.getTextStyleForElement(
|
|
18222
18253
|
element,
|
|
18223
|
-
element.type === "shape" && hasFill ? defaultTextColorForFill(fill) :
|
|
18254
|
+
element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunk43TOUP5U_js.DEFAULT_TEXT_COLOR
|
|
18224
18255
|
);
|
|
18225
18256
|
const isImage = element.type === "picture" || element.type === "image";
|
|
18226
|
-
const letsTextOverflow = (0,
|
|
18227
|
-
const shapeType = (0,
|
|
18257
|
+
const letsTextOverflow = (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
18258
|
+
const shapeType = (0, chunk43TOUP5U_js.dist_exports.hasShapeProperties)(element) ? element.shapeType : void 0;
|
|
18228
18259
|
const isCallout = pptx.isWedgeCalloutPresetShape(shapeType) || String(shapeType ?? "").toLowerCase().includes("callout");
|
|
18229
18260
|
return {
|
|
18230
18261
|
hasFill,
|
|
@@ -18245,7 +18276,7 @@ function getStaticElementInteractionState(element, hasActionHandler, exposeEleme
|
|
|
18245
18276
|
return { action, isActionable, contractRole };
|
|
18246
18277
|
}
|
|
18247
18278
|
function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
|
|
18248
|
-
const overflowClass = visual.isImage || element.type === "group" ||
|
|
18279
|
+
const overflowClass = visual.isImage || element.type === "group" || chunk43TOUP5U_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
|
|
18249
18280
|
const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
|
|
18250
18281
|
return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
|
|
18251
18282
|
}
|
|
@@ -18328,7 +18359,7 @@ function StaticElementRendererImpl({
|
|
|
18328
18359
|
top: positioned ? element.y : void 0,
|
|
18329
18360
|
width: positioned ? Math.max(element.width, 1) : "100%",
|
|
18330
18361
|
height: positioned ? Math.max(element.height, 1) : "100%",
|
|
18331
|
-
transform: positioned ?
|
|
18362
|
+
transform: positioned ? chunk43TOUP5U_js.getElementTransform(element) : void 0,
|
|
18332
18363
|
transformOrigin: "center",
|
|
18333
18364
|
zIndex,
|
|
18334
18365
|
...visualStyle,
|
|
@@ -18369,20 +18400,20 @@ function StaticElementRendererImpl({
|
|
|
18369
18400
|
isEditing: false,
|
|
18370
18401
|
editText: "",
|
|
18371
18402
|
spellCheck: false,
|
|
18372
|
-
txtSE: (0,
|
|
18403
|
+
txtSE: (0, chunk43TOUP5U_js.dist_exports.hasTextProperties)(element) ? element.textStyle : void 0,
|
|
18373
18404
|
txtS: textStyle,
|
|
18374
|
-
vecShape:
|
|
18405
|
+
vecShape: chunk43TOUP5U_js.renderVectorShape(
|
|
18375
18406
|
element,
|
|
18376
18407
|
isImage ? false : hasFill,
|
|
18377
18408
|
fill,
|
|
18378
18409
|
strokeWidth,
|
|
18379
18410
|
stroke
|
|
18380
18411
|
),
|
|
18381
|
-
imgStyle: imageAnimation ? { ...
|
|
18382
|
-
imgFilter:
|
|
18383
|
-
imgOpacity:
|
|
18412
|
+
imgStyle: imageAnimation ? { ...chunk43TOUP5U_js.getImageRenderStyle(element), animation: imageAnimation } : chunk43TOUP5U_js.getImageRenderStyle(element),
|
|
18413
|
+
imgFilter: chunk43TOUP5U_js.getImageEffectsFilter(element),
|
|
18414
|
+
imgOpacity: chunk43TOUP5U_js.getImageEffectsOpacity(element),
|
|
18384
18415
|
imgAlt: "",
|
|
18385
|
-
isTxtEl:
|
|
18416
|
+
isTxtEl: chunk43TOUP5U_js.isEditableTextElement(element),
|
|
18386
18417
|
media: mediaDataUrls,
|
|
18387
18418
|
tableSt: null,
|
|
18388
18419
|
isSel: false,
|
|
@@ -18428,7 +18459,7 @@ function SlideLayer({
|
|
|
18428
18459
|
style: {
|
|
18429
18460
|
width: safeWidth,
|
|
18430
18461
|
height: safeHeight,
|
|
18431
|
-
backgroundColor: slide.backgroundColor ?
|
|
18462
|
+
backgroundColor: slide.backgroundColor ? chunk43TOUP5U_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
|
|
18432
18463
|
backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
|
|
18433
18464
|
backgroundSize: slide.backgroundImage ? "cover" : void 0,
|
|
18434
18465
|
backgroundPosition: slide.backgroundImage ? "center" : void 0
|
|
@@ -18949,6 +18980,7 @@ exports.StaticElementRenderer = StaticElementRenderer;
|
|
|
18949
18980
|
exports.ViewerOptionsContext = ViewerOptionsContext;
|
|
18950
18981
|
exports.ViewerOptionsStoreContext = ViewerOptionsStoreContext;
|
|
18951
18982
|
exports.computeToolbarVisibility = computeToolbarVisibility;
|
|
18983
|
+
exports.createReviewCommentsHost = createReviewCommentsHost;
|
|
18952
18984
|
exports.detectTargetType = detectTargetType;
|
|
18953
18985
|
exports.imgSrc = imgSrc;
|
|
18954
18986
|
exports.isAudienceTab = isAudienceTab;
|