pptx-react-viewer 4.29.0 → 4.30.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 +60 -0
- package/README.md +37 -36
- package/dist/{AiChatPanel-6EIOUV7J.mjs → AiChatPanel-42FL4CPM.mjs} +1 -1
- package/dist/AiChatPanel-42FL4CPM.mjs.br +0 -0
- package/dist/AiChatPanel-42FL4CPM.mjs.gz +0 -0
- package/dist/{AiChatPanel-AK6X4NJD.js → AiChatPanel-6VWCT6NE.js} +9 -9
- package/dist/AiChatPanel-6VWCT6NE.js.br +0 -0
- package/dist/AiChatPanel-6VWCT6NE.js.gz +0 -0
- package/dist/{chunk-6YOFWVII.mjs → chunk-GXMGJ5A3.mjs} +7 -12
- package/dist/chunk-GXMGJ5A3.mjs.br +0 -0
- package/dist/chunk-GXMGJ5A3.mjs.gz +0 -0
- package/dist/{chunk-EW45F35P.mjs → chunk-KRXS36RB.mjs} +5 -11
- package/dist/chunk-KRXS36RB.mjs.br +0 -0
- package/dist/chunk-KRXS36RB.mjs.gz +0 -0
- package/dist/{chunk-K3EGXT6W.js → chunk-MFGD7XVJ.js} +248 -254
- package/dist/chunk-MFGD7XVJ.js.br +0 -0
- package/dist/chunk-MFGD7XVJ.js.gz +0 -0
- package/dist/{chunk-CTL42ZRR.js → chunk-RHNJ4IU2.js} +31 -40
- package/dist/chunk-RHNJ4IU2.js.br +0 -0
- package/dist/chunk-RHNJ4IU2.js.gz +0 -0
- package/dist/{chunk-7JMO6R6B.js → chunk-XKV2QDAO.js} +387 -392
- package/dist/chunk-XKV2QDAO.js.br +0 -0
- package/dist/chunk-XKV2QDAO.js.gz +0 -0
- package/dist/{chunk-VI575UU6.mjs → chunk-ZIBAN7RL.mjs} +32 -41
- package/dist/chunk-ZIBAN7RL.mjs.br +0 -0
- package/dist/chunk-ZIBAN7RL.mjs.gz +0 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +24 -24
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.js +81 -81
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +2 -2
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.d.ts +5 -0
- package/dist/viewer/index.js +19 -19
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +3 -3
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +3 -3
- package/dist/AiChatPanel-6EIOUV7J.mjs.br +0 -0
- package/dist/AiChatPanel-6EIOUV7J.mjs.gz +0 -0
- package/dist/AiChatPanel-AK6X4NJD.js.br +0 -0
- package/dist/AiChatPanel-AK6X4NJD.js.gz +0 -0
- package/dist/chunk-6YOFWVII.mjs.br +0 -0
- package/dist/chunk-6YOFWVII.mjs.gz +0 -0
- package/dist/chunk-7JMO6R6B.js.br +0 -0
- package/dist/chunk-7JMO6R6B.js.gz +0 -0
- package/dist/chunk-CTL42ZRR.js.br +0 -0
- package/dist/chunk-CTL42ZRR.js.gz +0 -0
- package/dist/chunk-EW45F35P.mjs.br +0 -0
- package/dist/chunk-EW45F35P.mjs.gz +0 -0
- package/dist/chunk-K3EGXT6W.js.br +0 -0
- package/dist/chunk-K3EGXT6W.js.gz +0 -0
- package/dist/chunk-VI575UU6.mjs.br +0 -0
- package/dist/chunk-VI575UU6.mjs.gz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkRHNJ4IU2_js = require('./chunk-RHNJ4IU2.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(chunkRHNJ4IU2_js.cloneHistorySnapshot(previous));
|
|
688
688
|
}
|
|
689
|
-
past.push({ ...
|
|
689
|
+
past.push({ ...chunkRHNJ4IU2_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(chunkRHNJ4IU2_js.cloneSlide),
|
|
779
|
+
templateElementsBySlideId: chunkRHNJ4IU2_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(chunkRHNJ4IU2_js.cloneSlide));
|
|
793
793
|
setTemplateElementsBySlideId(
|
|
794
|
-
|
|
794
|
+
chunkRHNJ4IU2_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 = chunkRHNJ4IU2_js.cloneHistorySnapshot(previousSnapshot);
|
|
834
|
+
lastHistorySnapshotRef.current = chunkRHNJ4IU2_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 = chunkRHNJ4IU2_js.cloneHistorySnapshot(nextSnapshot);
|
|
856
|
+
lastHistorySnapshotRef.current = chunkRHNJ4IU2_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 = chunkRHNJ4IU2_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(chunkRHNJ4IU2_js.cloneSlide) };
|
|
957
|
+
const after = { ...before, slides: nextSlides.map(chunkRHNJ4IU2_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 = chunkRHNJ4IU2_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, chunkRHNJ4IU2_js.MIN_ELEMENT_SIZE));
|
|
1147
|
+
maxY = Math.max(maxY, element.y + Math.max(element.height, chunkRHNJ4IU2_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, chunkRHNJ4IU2_js.MIN_ELEMENT_SIZE);
|
|
1154
|
+
const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkRHNJ4IU2_js.MIN_ELEMENT_SIZE);
|
|
1155
1155
|
const availableWidth = Math.max(
|
|
1156
|
-
effectiveEditorDimensions.width -
|
|
1157
|
-
|
|
1156
|
+
effectiveEditorDimensions.width - chunkRHNJ4IU2_js.ZOOM_TO_SELECTION_PADDING,
|
|
1157
|
+
chunkRHNJ4IU2_js.MIN_ELEMENT_SIZE
|
|
1158
1158
|
);
|
|
1159
1159
|
const availableHeight = Math.max(
|
|
1160
|
-
effectiveEditorDimensions.height -
|
|
1161
|
-
|
|
1160
|
+
effectiveEditorDimensions.height - chunkRHNJ4IU2_js.ZOOM_TO_SELECTION_PADDING,
|
|
1161
|
+
chunkRHNJ4IU2_js.MIN_ELEMENT_SIZE
|
|
1162
1162
|
);
|
|
1163
1163
|
const targetEditorScale = Math.min(
|
|
1164
1164
|
availableWidth / boundsWidth,
|
|
@@ -4097,8 +4097,8 @@ function useViewerCoreState(_input) {
|
|
|
4097
4097
|
const { slides, setSlides, slidesRef } = useSlideState();
|
|
4098
4098
|
const [templateElementsBySlideId, setTemplateElementsBySlideId] = React17.useState({});
|
|
4099
4099
|
const [canvasSize, setCanvasSize] = React17.useState({
|
|
4100
|
-
width:
|
|
4101
|
-
height:
|
|
4100
|
+
width: chunkRHNJ4IU2_js.DEFAULT_CANVAS_WIDTH,
|
|
4101
|
+
height: chunkRHNJ4IU2_js.DEFAULT_CANVAS_HEIGHT
|
|
4102
4102
|
});
|
|
4103
4103
|
const [slideSizeEmu, setSlideSizeEmu] = React17.useState();
|
|
4104
4104
|
const [activeSlideIndex, setActiveSlideIndex] = React17.useState(0);
|
|
@@ -4474,7 +4474,7 @@ function useLoadContent({
|
|
|
4474
4474
|
}
|
|
4475
4475
|
let cancelled = false;
|
|
4476
4476
|
const token = ++renderTokenRef.current;
|
|
4477
|
-
const handler = new
|
|
4477
|
+
const handler = new chunkRHNJ4IU2_js.dist_exports.PptxHandler();
|
|
4478
4478
|
const resources = pptx.createPresentationLoadResources(handler);
|
|
4479
4479
|
const loadBlobUrls = resources.blobUrls;
|
|
4480
4480
|
(async () => {
|
|
@@ -4559,12 +4559,12 @@ function useLoadContent({
|
|
|
4559
4559
|
}
|
|
4560
4560
|
resources.commit();
|
|
4561
4561
|
handlerRef.current = handler;
|
|
4562
|
-
const partition =
|
|
4562
|
+
const partition = chunkRHNJ4IU2_js.partitionTemplateElements(nextSlides);
|
|
4563
4563
|
setSlides(partition.slides);
|
|
4564
4564
|
setTemplateElementsBySlideId(partition.templateElementsBySlideId);
|
|
4565
4565
|
setCanvasSize({
|
|
4566
|
-
width: parsed.width ??
|
|
4567
|
-
height: parsed.height ??
|
|
4566
|
+
width: parsed.width ?? chunkRHNJ4IU2_js.DEFAULT_CANVAS_WIDTH,
|
|
4567
|
+
height: parsed.height ?? chunkRHNJ4IU2_js.DEFAULT_CANVAS_HEIGHT
|
|
4568
4568
|
});
|
|
4569
4569
|
setSlideSizeEmu(
|
|
4570
4570
|
typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
|
|
@@ -4627,7 +4627,7 @@ function useLoadContent({
|
|
|
4627
4627
|
onContentApplied?.();
|
|
4628
4628
|
} catch (err) {
|
|
4629
4629
|
if (!cancelled && token === renderTokenRef.current) {
|
|
4630
|
-
if (err instanceof
|
|
4630
|
+
if (err instanceof chunkRHNJ4IU2_js.dist_exports.EncryptedFileError) {
|
|
4631
4631
|
setIsEncrypted(true);
|
|
4632
4632
|
} else {
|
|
4633
4633
|
console.error("[pptx] Failed to load presentation content:", err);
|
|
@@ -4752,7 +4752,7 @@ function useTextElementOperations(input) {
|
|
|
4752
4752
|
updateSelectedElement
|
|
4753
4753
|
} = input;
|
|
4754
4754
|
const liveTextSegments = React17.useCallback(() => {
|
|
4755
|
-
if (!selectedElement || !(0,
|
|
4755
|
+
if (!selectedElement || !(0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
4756
4756
|
return void 0;
|
|
4757
4757
|
}
|
|
4758
4758
|
if (selectedElement.id !== inlineEditingElementId) {
|
|
@@ -4770,7 +4770,7 @@ function useTextElementOperations(input) {
|
|
|
4770
4770
|
}, [selectedElement, inlineEditingElementId, inlineEditingText, inlineEditingSnapshotRef]);
|
|
4771
4771
|
const updateSelectedTextStyle = React17.useCallback(
|
|
4772
4772
|
(updates) => {
|
|
4773
|
-
if (!selectedElement || !(0,
|
|
4773
|
+
if (!selectedElement || !(0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
4774
4774
|
return;
|
|
4775
4775
|
}
|
|
4776
4776
|
const isLiveEditing = selectedElement.id === inlineEditingElementId;
|
|
@@ -4848,7 +4848,7 @@ function useTextElementOperations(input) {
|
|
|
4848
4848
|
);
|
|
4849
4849
|
const toggleSelectedBullets = React17.useCallback(
|
|
4850
4850
|
(kind) => {
|
|
4851
|
-
if (!selectedElement || !(0,
|
|
4851
|
+
if (!selectedElement || !(0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
4852
4852
|
return;
|
|
4853
4853
|
}
|
|
4854
4854
|
const currentSegments = liveTextSegments();
|
|
@@ -4899,7 +4899,7 @@ function useTextElementOperations(input) {
|
|
|
4899
4899
|
);
|
|
4900
4900
|
const updateSelectedTextCase = React17.useCallback(
|
|
4901
4901
|
(mode) => {
|
|
4902
|
-
if (!selectedElement || !(0,
|
|
4902
|
+
if (!selectedElement || !(0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(selectedElement)) {
|
|
4903
4903
|
return;
|
|
4904
4904
|
}
|
|
4905
4905
|
const isLiveEditing = selectedElement.id === inlineEditingElementId;
|
|
@@ -5015,7 +5015,7 @@ function useElementOperations(input) {
|
|
|
5015
5015
|
);
|
|
5016
5016
|
return;
|
|
5017
5017
|
}
|
|
5018
|
-
if (
|
|
5018
|
+
if (chunkRHNJ4IU2_js.isTemplateElementId(elementId)) {
|
|
5019
5019
|
const slideId = activeSlide?.id;
|
|
5020
5020
|
if (slideId) {
|
|
5021
5021
|
setTemplateElementsBySlideId((prev) => ({
|
|
@@ -5051,7 +5051,7 @@ function useElementOperations(input) {
|
|
|
5051
5051
|
);
|
|
5052
5052
|
const updateSelectedShapeStyle = React17.useCallback(
|
|
5053
5053
|
(updates) => {
|
|
5054
|
-
if (!selectedElement || !(0,
|
|
5054
|
+
if (!selectedElement || !(0, chunkRHNJ4IU2_js.dist_exports.hasShapeProperties)(selectedElement)) {
|
|
5055
5055
|
return;
|
|
5056
5056
|
}
|
|
5057
5057
|
updateSelectedElement({
|
|
@@ -5255,15 +5255,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
|
|
|
5255
5255
|
// src/viewer/hooks/pointer-move-handlers.ts
|
|
5256
5256
|
function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
|
|
5257
5257
|
const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
|
|
5258
|
-
let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize:
|
|
5258
|
+
let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkRHNJ4IU2_js.MIN_ELEMENT_SIZE });
|
|
5259
5259
|
if (lockAspect) {
|
|
5260
|
-
resized = pptx.lockResizeAspect(resized, startBox, handle,
|
|
5260
|
+
resized = pptx.lockResizeAspect(resized, startBox, handle, chunkRHNJ4IU2_js.MIN_ELEMENT_SIZE);
|
|
5261
5261
|
}
|
|
5262
5262
|
const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
|
|
5263
5263
|
if (!snapToGrid) {
|
|
5264
5264
|
return box;
|
|
5265
5265
|
}
|
|
5266
|
-
return pptx.snapBoxToGrid(box, handle, gridSpacingPx,
|
|
5266
|
+
return pptx.snapBoxToGrid(box, handle, gridSpacingPx, chunkRHNJ4IU2_js.MIN_ELEMENT_SIZE);
|
|
5267
5267
|
}
|
|
5268
5268
|
function resolveLiveTarget(input) {
|
|
5269
5269
|
const { livePatcher, editTemplateMode, activeSlide } = input;
|
|
@@ -5376,7 +5376,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
|
|
|
5376
5376
|
width: el.width,
|
|
5377
5377
|
height: el.height
|
|
5378
5378
|
}));
|
|
5379
|
-
const snapResult =
|
|
5379
|
+
const snapResult = chunkRHNJ4IU2_js.computeSnapToShape(
|
|
5380
5380
|
targetX,
|
|
5381
5381
|
targetY,
|
|
5382
5382
|
primaryEl.width,
|
|
@@ -5450,8 +5450,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
|
|
|
5450
5450
|
rs.lastY = geo.y;
|
|
5451
5451
|
rs.lastWidth = geo.width;
|
|
5452
5452
|
rs.lastHeight = geo.height;
|
|
5453
|
-
const width = Math.max(geo.width,
|
|
5454
|
-
const height = Math.max(geo.height,
|
|
5453
|
+
const width = Math.max(geo.width, chunkRHNJ4IU2_js.MIN_ELEMENT_SIZE);
|
|
5454
|
+
const height = Math.max(geo.height, chunkRHNJ4IU2_js.MIN_ELEMENT_SIZE);
|
|
5455
5455
|
if (rs.domEl) {
|
|
5456
5456
|
rs.domEl.style.left = `${geo.x}px`;
|
|
5457
5457
|
rs.domEl.style.top = `${geo.y}px`;
|
|
@@ -5544,13 +5544,13 @@ function processPointerUp(input) {
|
|
|
5544
5544
|
if (i !== activeSlideIndex) {
|
|
5545
5545
|
return s;
|
|
5546
5546
|
}
|
|
5547
|
-
const rerouted =
|
|
5547
|
+
const rerouted = chunkRHNJ4IU2_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
|
|
5548
5548
|
if (rerouted.length === 0) {
|
|
5549
5549
|
return s;
|
|
5550
5550
|
}
|
|
5551
5551
|
return {
|
|
5552
5552
|
...s,
|
|
5553
|
-
elements:
|
|
5553
|
+
elements: chunkRHNJ4IU2_js.applyReroutedConnectors(s.elements, rerouted)
|
|
5554
5554
|
};
|
|
5555
5555
|
})
|
|
5556
5556
|
);
|
|
@@ -5602,8 +5602,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
|
|
|
5602
5602
|
}
|
|
5603
5603
|
return { ...el, x: start.x + dx, y: start.y + dy };
|
|
5604
5604
|
});
|
|
5605
|
-
const rerouted =
|
|
5606
|
-
return
|
|
5605
|
+
const rerouted = chunkRHNJ4IU2_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
|
|
5606
|
+
return chunkRHNJ4IU2_js.applyReroutedConnectors(movedElements, rerouted);
|
|
5607
5607
|
};
|
|
5608
5608
|
if (editTemplateMode) {
|
|
5609
5609
|
const slideId = activeSlide?.id;
|
|
@@ -5791,7 +5791,7 @@ function useCanvasInteractions(input) {
|
|
|
5791
5791
|
return;
|
|
5792
5792
|
}
|
|
5793
5793
|
const el = elementLookup.get(editId);
|
|
5794
|
-
if (el && (0,
|
|
5794
|
+
if (el && (0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(el)) {
|
|
5795
5795
|
const reader = inlineEditingReaderRef?.current;
|
|
5796
5796
|
const read = reader?.elementId === editId ? reader.read() : void 0;
|
|
5797
5797
|
if (read?.kind === "unsupported") {
|
|
@@ -5838,7 +5838,7 @@ function useCanvasInteractions(input) {
|
|
|
5838
5838
|
wasEditable.current = canEdit;
|
|
5839
5839
|
}, [canEdit]);
|
|
5840
5840
|
const openEquationEditorForElement = (el) => {
|
|
5841
|
-
if (!(0,
|
|
5841
|
+
if (!(0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(el)) {
|
|
5842
5842
|
return false;
|
|
5843
5843
|
}
|
|
5844
5844
|
const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
|
|
@@ -5871,7 +5871,7 @@ function useCanvasInteractions(input) {
|
|
|
5871
5871
|
justInteractedRef.current = false;
|
|
5872
5872
|
} else {
|
|
5873
5873
|
const el = elementLookup.get(elementId);
|
|
5874
|
-
if (el && (0,
|
|
5874
|
+
if (el && (0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
|
|
5875
5875
|
if (!openEquationEditorForElement(el)) {
|
|
5876
5876
|
pptx.setPendingCaretPoint(e);
|
|
5877
5877
|
setInlineEditingElementId(elementId);
|
|
@@ -5897,7 +5897,7 @@ function useCanvasInteractions(input) {
|
|
|
5897
5897
|
if (openEquationEditorForElement(el)) {
|
|
5898
5898
|
return;
|
|
5899
5899
|
}
|
|
5900
|
-
if ((0,
|
|
5900
|
+
if ((0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
|
|
5901
5901
|
setInlineEditingElementId(elementId);
|
|
5902
5902
|
setInlineEditingText(el.text ?? "");
|
|
5903
5903
|
}
|
|
@@ -6362,7 +6362,7 @@ function createStructuredElementHandlers(deps) {
|
|
|
6362
6362
|
return;
|
|
6363
6363
|
}
|
|
6364
6364
|
const resolved = resolveHyperlinkEditResult(data);
|
|
6365
|
-
if (resolved.url && !
|
|
6365
|
+
if (resolved.url && !chunkRHNJ4IU2_js.isUrlSafe(resolved.url)) {
|
|
6366
6366
|
return;
|
|
6367
6367
|
}
|
|
6368
6368
|
const actionClick = {
|
|
@@ -6408,11 +6408,11 @@ function createStructuredElementHandlers(deps) {
|
|
|
6408
6408
|
if (!activeSlide) {
|
|
6409
6409
|
return;
|
|
6410
6410
|
}
|
|
6411
|
-
const preset =
|
|
6411
|
+
const preset = chunkRHNJ4IU2_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
|
|
6412
6412
|
if (!preset) {
|
|
6413
6413
|
return;
|
|
6414
6414
|
}
|
|
6415
|
-
const defaultPptxAction = (0,
|
|
6415
|
+
const defaultPptxAction = (0, chunkRHNJ4IU2_js.dist_exports.elementActionToPptxAction)({
|
|
6416
6416
|
trigger: "click",
|
|
6417
6417
|
type: preset.defaultAction
|
|
6418
6418
|
});
|
|
@@ -6495,7 +6495,7 @@ function useInsertElements(input) {
|
|
|
6495
6495
|
width: 300,
|
|
6496
6496
|
height: 60,
|
|
6497
6497
|
text: "",
|
|
6498
|
-
textStyle: { fontSize:
|
|
6498
|
+
textStyle: { fontSize: chunkRHNJ4IU2_js.DEFAULT_TEXT_FONT_SIZE }
|
|
6499
6499
|
});
|
|
6500
6500
|
};
|
|
6501
6501
|
const handleAddShape = () => {
|
|
@@ -6522,7 +6522,7 @@ function useInsertElements(input) {
|
|
|
6522
6522
|
return;
|
|
6523
6523
|
}
|
|
6524
6524
|
addElement({
|
|
6525
|
-
...pptx.newTableElement(
|
|
6525
|
+
...pptx.newTableElement(chunkRHNJ4IU2_js.DEFAULT_TABLE_ROWS, chunkRHNJ4IU2_js.DEFAULT_TABLE_COLUMNS, 100, 200),
|
|
6526
6526
|
id: pptx.generateElementId()
|
|
6527
6527
|
});
|
|
6528
6528
|
};
|
|
@@ -6691,7 +6691,7 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
6691
6691
|
history
|
|
6692
6692
|
} = input;
|
|
6693
6693
|
const updateElementsOwning = (elementId, updater) => {
|
|
6694
|
-
if (editTemplateMode && !
|
|
6694
|
+
if (editTemplateMode && !chunkRHNJ4IU2_js.isTemplateElementId(elementId)) {
|
|
6695
6695
|
ops.updateSlides(
|
|
6696
6696
|
(prev) => prev.map(
|
|
6697
6697
|
(slide, index) => index === activeSlideIndex ? { ...slide, elements: updater(slide.elements) } : slide
|
|
@@ -6725,9 +6725,9 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
6725
6725
|
return;
|
|
6726
6726
|
}
|
|
6727
6727
|
const group = selectedElement;
|
|
6728
|
-
const intoTemplate =
|
|
6728
|
+
const intoTemplate = chunkRHNJ4IU2_js.isTemplateElementId(group.id);
|
|
6729
6729
|
const childIds = group.children.map(
|
|
6730
|
-
(child) => intoTemplate ?
|
|
6730
|
+
(child) => intoTemplate ? chunkRHNJ4IU2_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
|
|
6731
6731
|
);
|
|
6732
6732
|
const { elements, childIds: usedIds } = pptx.ungroupElements(
|
|
6733
6733
|
ops.activeElements,
|
|
@@ -7050,7 +7050,7 @@ function useSlideManagement(input) {
|
|
|
7050
7050
|
if (!src) {
|
|
7051
7051
|
continue;
|
|
7052
7052
|
}
|
|
7053
|
-
const clone = { ...(0,
|
|
7053
|
+
const clone = { ...(0, chunkRHNJ4IU2_js.dist_exports.duplicateSlide)(src, next.length + 1), id: pptx.makeSlideId() };
|
|
7054
7054
|
next.splice(i + offset + 1, 0, clone);
|
|
7055
7055
|
offset++;
|
|
7056
7056
|
}
|
|
@@ -7153,7 +7153,7 @@ function createTableMergeHandlers(input) {
|
|
|
7153
7153
|
if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
|
|
7154
7154
|
return;
|
|
7155
7155
|
}
|
|
7156
|
-
const newTableData =
|
|
7156
|
+
const newTableData = chunkRHNJ4IU2_js.mergeCells(
|
|
7157
7157
|
[
|
|
7158
7158
|
{ row: rowIndex, col: columnIndex },
|
|
7159
7159
|
{ row: rowIndex, col: nextColIdx }
|
|
@@ -7161,7 +7161,7 @@ function createTableMergeHandlers(input) {
|
|
|
7161
7161
|
td
|
|
7162
7162
|
);
|
|
7163
7163
|
const updates = { tableData: newTableData };
|
|
7164
|
-
const newRawXml = (0,
|
|
7164
|
+
const newRawXml = (0, chunkRHNJ4IU2_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
|
|
7165
7165
|
if (newRawXml) {
|
|
7166
7166
|
updates.rawXml = newRawXml;
|
|
7167
7167
|
}
|
|
@@ -7187,7 +7187,7 @@ function createTableMergeHandlers(input) {
|
|
|
7187
7187
|
if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
|
|
7188
7188
|
return;
|
|
7189
7189
|
}
|
|
7190
|
-
const newTableData =
|
|
7190
|
+
const newTableData = chunkRHNJ4IU2_js.mergeCells(
|
|
7191
7191
|
[
|
|
7192
7192
|
{ row: rowIndex, col: columnIndex },
|
|
7193
7193
|
{ row: targetNextRowIdx, col: columnIndex }
|
|
@@ -7195,7 +7195,7 @@ function createTableMergeHandlers(input) {
|
|
|
7195
7195
|
td
|
|
7196
7196
|
);
|
|
7197
7197
|
const updates = { tableData: newTableData };
|
|
7198
|
-
const newRawXml = (0,
|
|
7198
|
+
const newRawXml = (0, chunkRHNJ4IU2_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
|
|
7199
7199
|
if (newRawXml) {
|
|
7200
7200
|
updates.rawXml = newRawXml;
|
|
7201
7201
|
}
|
|
@@ -7210,9 +7210,9 @@ function createTableMergeHandlers(input) {
|
|
|
7210
7210
|
return;
|
|
7211
7211
|
}
|
|
7212
7212
|
const td = selectedElement.tableData;
|
|
7213
|
-
const newTableData =
|
|
7213
|
+
const newTableData = chunkRHNJ4IU2_js.mergeCells(ts.selectedCells, td);
|
|
7214
7214
|
const updates = { tableData: newTableData };
|
|
7215
|
-
const newRawXml = (0,
|
|
7215
|
+
const newRawXml = (0, chunkRHNJ4IU2_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
|
|
7216
7216
|
if (newRawXml) {
|
|
7217
7217
|
updates.rawXml = newRawXml;
|
|
7218
7218
|
}
|
|
@@ -7229,9 +7229,9 @@ function createTableMergeHandlers(input) {
|
|
|
7229
7229
|
}
|
|
7230
7230
|
const { rowIndex, columnIndex } = ts;
|
|
7231
7231
|
const td = selectedElement.tableData;
|
|
7232
|
-
const newTableData =
|
|
7232
|
+
const newTableData = chunkRHNJ4IU2_js.splitCell(rowIndex, columnIndex, td);
|
|
7233
7233
|
const updates = { tableData: newTableData };
|
|
7234
|
-
const newRawXml = (0,
|
|
7234
|
+
const newRawXml = (0, chunkRHNJ4IU2_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
|
|
7235
7235
|
if (newRawXml) {
|
|
7236
7236
|
updates.rawXml = newRawXml;
|
|
7237
7237
|
}
|
|
@@ -7266,7 +7266,7 @@ function createTableStructHandlers(input) {
|
|
|
7266
7266
|
updates.tableData = pptx.setCellText(el, rowIndex, colIndex, text).tableData;
|
|
7267
7267
|
}
|
|
7268
7268
|
if (el.rawXml) {
|
|
7269
|
-
const newRawXml = (0,
|
|
7269
|
+
const newRawXml = (0, chunkRHNJ4IU2_js.dist_exports.updateCellTextInRawXml)(el, rowIndex, colIndex, text);
|
|
7270
7270
|
if (newRawXml) {
|
|
7271
7271
|
updates.rawXml = newRawXml;
|
|
7272
7272
|
}
|
|
@@ -7290,7 +7290,7 @@ function createTableStructHandlers(input) {
|
|
|
7290
7290
|
const { rowIndex, columnIndex: colIndex } = ts;
|
|
7291
7291
|
const updates = {};
|
|
7292
7292
|
if (selectedElement.rawXml) {
|
|
7293
|
-
const newRawXml = (0,
|
|
7293
|
+
const newRawXml = (0, chunkRHNJ4IU2_js.dist_exports.updateCellTextStyleInRawXml)(
|
|
7294
7294
|
selectedElement,
|
|
7295
7295
|
rowIndex,
|
|
7296
7296
|
colIndex,
|
|
@@ -7307,15 +7307,9 @@ function createTableStructHandlers(input) {
|
|
|
7307
7307
|
}
|
|
7308
7308
|
return {
|
|
7309
7309
|
...row,
|
|
7310
|
-
cells: row.cells.map(
|
|
7311
|
-
|
|
7312
|
-
|
|
7313
|
-
}
|
|
7314
|
-
return {
|
|
7315
|
-
...cell,
|
|
7316
|
-
style: { ...cell.style, ...styleUpdates }
|
|
7317
|
-
};
|
|
7318
|
-
})
|
|
7310
|
+
cells: row.cells.map(
|
|
7311
|
+
(cell, ci) => ci === colIndex ? pptx.withCellStyle(cell, styleUpdates) : cell
|
|
7312
|
+
)
|
|
7319
7313
|
};
|
|
7320
7314
|
});
|
|
7321
7315
|
updates.tableData = { ...selectedElement.tableData, rows: newRows };
|
|
@@ -7463,7 +7457,7 @@ function useExportSaveAs(input) {
|
|
|
7463
7457
|
const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
|
|
7464
7458
|
const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
|
|
7465
7459
|
const data = {
|
|
7466
|
-
slides:
|
|
7460
|
+
slides: chunkRHNJ4IU2_js.buildSaveSlides(slides, templateElementsBySlideId),
|
|
7467
7461
|
width: canvasSize.width,
|
|
7468
7462
|
height: canvasSize.height,
|
|
7469
7463
|
widthEmu: slideSize.widthEmu,
|
|
@@ -7621,7 +7615,7 @@ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActi
|
|
|
7621
7615
|
}
|
|
7622
7616
|
function tilesToPdfPage(tilesResult) {
|
|
7623
7617
|
return tilesResult.tiles.map((tile) => ({
|
|
7624
|
-
image:
|
|
7618
|
+
image: chunkRHNJ4IU2_js.canvasToJpegData(tile.canvas),
|
|
7625
7619
|
placement: pptx.placeTileOnPage(
|
|
7626
7620
|
tile,
|
|
7627
7621
|
tilesResult.fullWidth,
|
|
@@ -7654,7 +7648,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
|
|
|
7654
7648
|
if (pages.length === 0) {
|
|
7655
7649
|
throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
|
|
7656
7650
|
}
|
|
7657
|
-
const pdfBlobUrl =
|
|
7651
|
+
const pdfBlobUrl = chunkRHNJ4IU2_js.buildPdfFromTiledImageData(pages);
|
|
7658
7652
|
pptx.downloadDataUrl(pdfBlobUrl, filename);
|
|
7659
7653
|
}
|
|
7660
7654
|
async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
|
|
@@ -7684,7 +7678,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
|
|
|
7684
7678
|
if (pages.length === 0) {
|
|
7685
7679
|
throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
|
|
7686
7680
|
}
|
|
7687
|
-
const pdfDataUrl =
|
|
7681
|
+
const pdfDataUrl = chunkRHNJ4IU2_js.buildNotesPdf(pages);
|
|
7688
7682
|
pptx.downloadDataUrl(pdfDataUrl, filename);
|
|
7689
7683
|
}
|
|
7690
7684
|
async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
|
|
@@ -7879,7 +7873,7 @@ function exportAllSlidesToSvg(data, options = {}) {
|
|
|
7879
7873
|
continue;
|
|
7880
7874
|
}
|
|
7881
7875
|
onProgress?.(processedCount, data.slides.length);
|
|
7882
|
-
let svg =
|
|
7876
|
+
let svg = chunkRHNJ4IU2_js.dist_exports.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
|
|
7883
7877
|
if (embedFonts && fontFaces?.length) {
|
|
7884
7878
|
svg = injectFontFaces(svg, fontFaces);
|
|
7885
7879
|
}
|
|
@@ -8468,10 +8462,10 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
|
|
|
8468
8462
|
return;
|
|
8469
8463
|
}
|
|
8470
8464
|
await handler.applyTheme(colorScheme, fontScheme, name);
|
|
8471
|
-
const previousMap = theme?.colorScheme ? (0,
|
|
8465
|
+
const previousMap = theme?.colorScheme ? (0, chunkRHNJ4IU2_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
|
|
8472
8466
|
bumpHistory();
|
|
8473
8467
|
setSlides(
|
|
8474
|
-
(slides) => (0,
|
|
8468
|
+
(slides) => (0, chunkRHNJ4IU2_js.dist_exports.applyThemeToData)(
|
|
8475
8469
|
{ slides, theme, themeColorMap: previousMap },
|
|
8476
8470
|
colorScheme,
|
|
8477
8471
|
fontScheme,
|
|
@@ -8482,8 +8476,8 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
|
|
|
8482
8476
|
(prev) => Object.fromEntries(
|
|
8483
8477
|
Object.entries(prev).map(([id, elements]) => [
|
|
8484
8478
|
id,
|
|
8485
|
-
(0,
|
|
8486
|
-
(0,
|
|
8479
|
+
(0, chunkRHNJ4IU2_js.dist_exports.reResolveElementFonts)(
|
|
8480
|
+
(0, chunkRHNJ4IU2_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme),
|
|
8487
8481
|
theme?.fontScheme,
|
|
8488
8482
|
fontScheme
|
|
8489
8483
|
)
|
|
@@ -8541,13 +8535,13 @@ function useThemeHandlers(input) {
|
|
|
8541
8535
|
return;
|
|
8542
8536
|
}
|
|
8543
8537
|
await handler.updateThemeColorScheme(colorScheme);
|
|
8544
|
-
const previousMap = theme?.colorScheme ? (0,
|
|
8545
|
-
setSlides((prev) => (0,
|
|
8538
|
+
const previousMap = theme?.colorScheme ? (0, chunkRHNJ4IU2_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
|
|
8539
|
+
setSlides((prev) => (0, chunkRHNJ4IU2_js.dist_exports.reResolveSlideColors)(prev, previousMap, colorScheme));
|
|
8546
8540
|
if (Object.keys(templateElementsBySlideId).length > 0) {
|
|
8547
8541
|
setTemplateElementsBySlideId((prev) => {
|
|
8548
8542
|
const next = {};
|
|
8549
8543
|
for (const [slideId, elements] of Object.entries(prev)) {
|
|
8550
|
-
next[slideId] = (0,
|
|
8544
|
+
next[slideId] = (0, chunkRHNJ4IU2_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme);
|
|
8551
8545
|
}
|
|
8552
8546
|
return next;
|
|
8553
8547
|
});
|
|
@@ -8658,7 +8652,7 @@ function useThemeSwitching(input) {
|
|
|
8658
8652
|
}
|
|
8659
8653
|
try {
|
|
8660
8654
|
await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
|
|
8661
|
-
const newData = (0,
|
|
8655
|
+
const newData = (0, chunkRHNJ4IU2_js.dist_exports.applyThemeToData)(data, preset.colorScheme, preset.fontScheme, preset.name);
|
|
8662
8656
|
onDataChange(newData);
|
|
8663
8657
|
onThemeChanged?.(preset);
|
|
8664
8658
|
} catch (error) {
|
|
@@ -8675,7 +8669,7 @@ function useThemeSwitching(input) {
|
|
|
8675
8669
|
}
|
|
8676
8670
|
try {
|
|
8677
8671
|
await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
|
|
8678
|
-
const newData = (0,
|
|
8672
|
+
const newData = (0, chunkRHNJ4IU2_js.dist_exports.applyThemeToData)(data, colorScheme, fontScheme, themeName);
|
|
8679
8673
|
onDataChange(newData);
|
|
8680
8674
|
} catch (error) {
|
|
8681
8675
|
console.error("Failed to switch to custom theme:", error);
|
|
@@ -8687,12 +8681,12 @@ function useThemeSwitching(input) {
|
|
|
8687
8681
|
if (!data?.theme?.colorScheme) {
|
|
8688
8682
|
return void 0;
|
|
8689
8683
|
}
|
|
8690
|
-
return
|
|
8691
|
-
(p) => (0,
|
|
8684
|
+
return chunkRHNJ4IU2_js.dist_exports.THEME_PRESETS.find(
|
|
8685
|
+
(p) => (0, chunkRHNJ4IU2_js.dist_exports.themeColorSchemesEqual)(data.theme?.colorScheme, p.colorScheme)
|
|
8692
8686
|
);
|
|
8693
8687
|
}, [data?.theme?.colorScheme]);
|
|
8694
8688
|
return {
|
|
8695
|
-
presets:
|
|
8689
|
+
presets: chunkRHNJ4IU2_js.dist_exports.THEME_PRESETS,
|
|
8696
8690
|
switchToPreset,
|
|
8697
8691
|
switchToCustom,
|
|
8698
8692
|
currentPreset
|
|
@@ -8769,7 +8763,7 @@ function usePropertyHandlers(input) {
|
|
|
8769
8763
|
}
|
|
8770
8764
|
try {
|
|
8771
8765
|
const ab = await file.arrayBuffer();
|
|
8772
|
-
const h = new
|
|
8766
|
+
const h = new chunkRHNJ4IU2_js.dist_exports.PptxHandler();
|
|
8773
8767
|
const other = await h.load(ab);
|
|
8774
8768
|
if (!other) {
|
|
8775
8769
|
return;
|
|
@@ -8779,7 +8773,7 @@ function usePropertyHandlers(input) {
|
|
|
8779
8773
|
width: canvasSize.width,
|
|
8780
8774
|
height: canvasSize.height
|
|
8781
8775
|
};
|
|
8782
|
-
setCompareResult(
|
|
8776
|
+
setCompareResult(chunkRHNJ4IU2_js.comparePresentation(cur, other));
|
|
8783
8777
|
setIsComparePanelOpen(true);
|
|
8784
8778
|
} catch (err) {
|
|
8785
8779
|
console.warn("Compare failed:", err);
|
|
@@ -9132,7 +9126,7 @@ function useViewerDialogs(input) {
|
|
|
9132
9126
|
};
|
|
9133
9127
|
}
|
|
9134
9128
|
function computeGridSpacingPx(documentGridSpacing) {
|
|
9135
|
-
return pptx.computeGridSpacingPx(documentGridSpacing,
|
|
9129
|
+
return pptx.computeGridSpacingPx(documentGridSpacing, chunkRHNJ4IU2_js.GRID_SIZE);
|
|
9136
9130
|
}
|
|
9137
9131
|
function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
|
|
9138
9132
|
const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
|
|
@@ -9141,7 +9135,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
|
|
|
9141
9135
|
}
|
|
9142
9136
|
function computeSlideSectionGroups(slides, sections) {
|
|
9143
9137
|
return pptx.groupSlidesBySection(sections, slides).map((group) => ({
|
|
9144
|
-
id: group.section?.id ?? (sections.length > 0 ?
|
|
9138
|
+
id: group.section?.id ?? (sections.length > 0 ? chunkRHNJ4IU2_js.UNGROUPED_SECTION_ID : chunkRHNJ4IU2_js.DEFAULT_SECTION_GROUP_ID),
|
|
9145
9139
|
label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
|
|
9146
9140
|
slideIndexes: group.slideIndexes,
|
|
9147
9141
|
...group.section?.color !== void 0 ? { color: group.section.color } : {},
|
|
@@ -9186,10 +9180,10 @@ function useDerivedSlideState(input) {
|
|
|
9186
9180
|
);
|
|
9187
9181
|
const slideSectionGroups = React17.useMemo(
|
|
9188
9182
|
() => computeSlideSectionGroups(slides, sections).map((group) => {
|
|
9189
|
-
if (group.id ===
|
|
9183
|
+
if (group.id === chunkRHNJ4IU2_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
|
|
9190
9184
|
return { ...group, label: t("pptx.slides.ungroupedSlides") };
|
|
9191
9185
|
}
|
|
9192
|
-
if (group.id ===
|
|
9186
|
+
if (group.id === chunkRHNJ4IU2_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
|
|
9193
9187
|
return { ...group, label: t("pptx.sections.slides") };
|
|
9194
9188
|
}
|
|
9195
9189
|
return group;
|
|
@@ -9296,7 +9290,7 @@ function useAnnotationHandlers(input) {
|
|
|
9296
9290
|
if (nextMode === "present") {
|
|
9297
9291
|
presentation.enterPresentMode();
|
|
9298
9292
|
} else if (mode === "present" && annotations.hasAnyAnnotations) {
|
|
9299
|
-
|
|
9293
|
+
chunkRHNJ4IU2_js.stopAllPersistentAudio();
|
|
9300
9294
|
if (promptKeepInkAnnotations) {
|
|
9301
9295
|
pendingModeAfterAnnotationsRef.current = nextMode;
|
|
9302
9296
|
setShowKeepAnnotationsDialog(true);
|
|
@@ -9306,7 +9300,7 @@ function useAnnotationHandlers(input) {
|
|
|
9306
9300
|
}
|
|
9307
9301
|
} else {
|
|
9308
9302
|
if (mode === "present") {
|
|
9309
|
-
|
|
9303
|
+
chunkRHNJ4IU2_js.stopAllPersistentAudio();
|
|
9310
9304
|
}
|
|
9311
9305
|
setMode(nextMode);
|
|
9312
9306
|
}
|
|
@@ -9377,7 +9371,7 @@ function overlayPendingInlineEdit(document2, elementId, text, snapshot, transfor
|
|
|
9377
9371
|
(slide) => !elementId ? slide : {
|
|
9378
9372
|
...slide,
|
|
9379
9373
|
elements: slide.elements.map(
|
|
9380
|
-
(element) => element.id === elementId && (0,
|
|
9374
|
+
(element) => element.id === elementId && (0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(element) ? {
|
|
9381
9375
|
...element,
|
|
9382
9376
|
text,
|
|
9383
9377
|
textSegments: pptx.remapTextToSegments(
|
|
@@ -9463,14 +9457,14 @@ function useSerialize(input) {
|
|
|
9463
9457
|
const pptxGuides = guides.map((g) => ({
|
|
9464
9458
|
id: g.id,
|
|
9465
9459
|
orientation: g.axis === "h" ? "horz" : "vert",
|
|
9466
|
-
positionEmu: (0,
|
|
9460
|
+
positionEmu: (0, chunkRHNJ4IU2_js.dist_exports.guidePxToEmu)(g.position)
|
|
9467
9461
|
}));
|
|
9468
9462
|
return {
|
|
9469
9463
|
...slide,
|
|
9470
9464
|
guides: pptxGuides.length > 0 ? pptxGuides : void 0
|
|
9471
9465
|
};
|
|
9472
9466
|
});
|
|
9473
|
-
const slidesToSave =
|
|
9467
|
+
const slidesToSave = chunkRHNJ4IU2_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
|
|
9474
9468
|
const saveOptions = pptx.buildDeckSaveOptions({
|
|
9475
9469
|
// Without this the Slide Size card edited a viewer-only pixel value and
|
|
9476
9470
|
// the saved `p:sldSz` never moved: passing `slideSize` is the only way a
|
|
@@ -9651,7 +9645,7 @@ function usePresentationSetup(input) {
|
|
|
9651
9645
|
return;
|
|
9652
9646
|
}
|
|
9653
9647
|
if (mode === "present" && nextMode !== "present") {
|
|
9654
|
-
|
|
9648
|
+
chunkRHNJ4IU2_js.stopAllPersistentAudio();
|
|
9655
9649
|
stopAnimationSound();
|
|
9656
9650
|
const exitHandler = exitModeHandlerRef.current;
|
|
9657
9651
|
if (exitHandler) {
|
|
@@ -9772,12 +9766,12 @@ function useCanvasImagePaste(input) {
|
|
|
9772
9766
|
);
|
|
9773
9767
|
}
|
|
9774
9768
|
function formatPatchFor(element, format) {
|
|
9775
|
-
const updated =
|
|
9769
|
+
const updated = chunkRHNJ4IU2_js.applyFormatToElement(element, format);
|
|
9776
9770
|
const updates = {};
|
|
9777
|
-
if ((0,
|
|
9771
|
+
if ((0, chunkRHNJ4IU2_js.dist_exports.hasShapeProperties)(updated)) {
|
|
9778
9772
|
updates.shapeStyle = updated.shapeStyle;
|
|
9779
9773
|
}
|
|
9780
|
-
if ((0,
|
|
9774
|
+
if ((0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(updated)) {
|
|
9781
9775
|
updates.textStyle = updated.textStyle;
|
|
9782
9776
|
}
|
|
9783
9777
|
return updates;
|
|
@@ -9795,7 +9789,7 @@ function useFormatPainterEditing(input) {
|
|
|
9795
9789
|
const prevFormatPainterRef = React17.useRef(false);
|
|
9796
9790
|
React17.useEffect(() => {
|
|
9797
9791
|
if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
|
|
9798
|
-
copiedFormatRef.current =
|
|
9792
|
+
copiedFormatRef.current = chunkRHNJ4IU2_js.copyFormatFromElement(selectedElement);
|
|
9799
9793
|
} else if (!formatPainterActive) {
|
|
9800
9794
|
copiedFormatRef.current = null;
|
|
9801
9795
|
}
|
|
@@ -10884,7 +10878,7 @@ function useKeyboardShortcutWiring(input) {
|
|
|
10884
10878
|
}
|
|
10885
10879
|
function stepSelectedFontSize(state, ops, direction) {
|
|
10886
10880
|
const selected = state.selectedElement;
|
|
10887
|
-
const currentPx = (selected && (0,
|
|
10881
|
+
const currentPx = (selected && (0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(selected) ? selected.textStyle?.fontSize : void 0) ?? pptx.textFontSizePtToPx(18);
|
|
10888
10882
|
const nextPt = pptx.stepFontSizePt(pptx.textFontSizePxToPt(currentPx), direction);
|
|
10889
10883
|
ops.updateSelectedTextStyle({ fontSize: pptx.textFontSizePtToPx(nextPt) });
|
|
10890
10884
|
}
|
|
@@ -11435,7 +11429,7 @@ function useCollaborationWriteBack(input) {
|
|
|
11435
11429
|
getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
|
|
11436
11430
|
getSaveOptions: () => latest.current.getSaveOptions?.(),
|
|
11437
11431
|
getTemplateElements: () => latest.current.templateElementsBySlideId,
|
|
11438
|
-
mergeTemplateElements:
|
|
11432
|
+
mergeTemplateElements: chunkRHNJ4IU2_js.buildSaveSlides
|
|
11439
11433
|
}),
|
|
11440
11434
|
[latest]
|
|
11441
11435
|
);
|
|
@@ -11988,8 +11982,8 @@ function useTouchGestures(input) {
|
|
|
11988
11982
|
}
|
|
11989
11983
|
const recognizer = pptx.createTouchGestureRecognizer({
|
|
11990
11984
|
getScale: () => scaleRef.current,
|
|
11991
|
-
minScale:
|
|
11992
|
-
maxScale:
|
|
11985
|
+
minScale: chunkRHNJ4IU2_js.MIN_ZOOM_SCALE,
|
|
11986
|
+
maxScale: chunkRHNJ4IU2_js.MAX_ZOOM_SCALE,
|
|
11993
11987
|
callbacks: {
|
|
11994
11988
|
onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
|
|
11995
11989
|
onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
|
|
@@ -12112,7 +12106,7 @@ function buildCanvasProps(input) {
|
|
|
12112
12106
|
if (pptx.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
|
|
12113
12107
|
return;
|
|
12114
12108
|
}
|
|
12115
|
-
|
|
12109
|
+
chunkRHNJ4IU2_js.safeOpenUrl(url, target);
|
|
12116
12110
|
};
|
|
12117
12111
|
const handleActionClick = (elementId, action) => {
|
|
12118
12112
|
if (mode === "present") {
|
|
@@ -12127,9 +12121,9 @@ function buildCanvasProps(input) {
|
|
|
12127
12121
|
}
|
|
12128
12122
|
};
|
|
12129
12123
|
const handleHyperlinkClick = (url, target) => {
|
|
12130
|
-
if (
|
|
12124
|
+
if (chunkRHNJ4IU2_js.isPpactionUrl(url)) {
|
|
12131
12125
|
if (mode === "present") {
|
|
12132
|
-
const parsed =
|
|
12126
|
+
const parsed = chunkRHNJ4IU2_js.parsePpactionUrl(url);
|
|
12133
12127
|
if (parsed) {
|
|
12134
12128
|
presentation.handlePresentationAction({
|
|
12135
12129
|
action: parsed.action,
|
|
@@ -12522,7 +12516,7 @@ function buildToolbarProps(input) {
|
|
|
12522
12516
|
isCommentsPanelOpen: s.isInspectorPaneOpen,
|
|
12523
12517
|
slideCommentCount: activeSlide?.comments?.length ?? 0,
|
|
12524
12518
|
formatPainterActive: s.formatPainterActive,
|
|
12525
|
-
canActivateFormatPainter:
|
|
12519
|
+
canActivateFormatPainter: chunkRHNJ4IU2_js.hasCopyableFormat(selectedElement),
|
|
12526
12520
|
onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
|
|
12527
12521
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
12528
12522
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -12843,7 +12837,7 @@ function useViewerBuildingBlocksCore(input) {
|
|
|
12843
12837
|
documentGridSpacing: state.viewProperties?.gridSpacing
|
|
12844
12838
|
});
|
|
12845
12839
|
const themeColorMap = React17.useMemo(
|
|
12846
|
-
() => state.theme?.colorScheme ? (0,
|
|
12840
|
+
() => state.theme?.colorScheme ? (0, chunkRHNJ4IU2_js.dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
|
|
12847
12841
|
[state.theme?.colorScheme]
|
|
12848
12842
|
);
|
|
12849
12843
|
const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
|
|
@@ -13418,23 +13412,23 @@ function ColorChangedImage({
|
|
|
13418
13412
|
className,
|
|
13419
13413
|
alt
|
|
13420
13414
|
}) {
|
|
13421
|
-
const tolerance = tolerancePct ??
|
|
13422
|
-
const cacheKey =
|
|
13415
|
+
const tolerance = tolerancePct ?? chunkRHNJ4IU2_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
|
|
13416
|
+
const cacheKey = chunkRHNJ4IU2_js.buildCacheKey(
|
|
13423
13417
|
src,
|
|
13424
13418
|
clrChange.clrFrom,
|
|
13425
13419
|
clrChange.clrTo,
|
|
13426
13420
|
tolerance,
|
|
13427
13421
|
Boolean(clrChange.clrToTransparent)
|
|
13428
13422
|
);
|
|
13429
|
-
const cached =
|
|
13423
|
+
const cached = chunkRHNJ4IU2_js.getCachedResult(cacheKey);
|
|
13430
13424
|
const [processedSrc, setProcessedSrc] = React17.useState(cached ?? null);
|
|
13431
13425
|
React17.useEffect(() => {
|
|
13432
|
-
if (
|
|
13433
|
-
setProcessedSrc(
|
|
13426
|
+
if (chunkRHNJ4IU2_js.getCachedResult(cacheKey)) {
|
|
13427
|
+
setProcessedSrc(chunkRHNJ4IU2_js.getCachedResult(cacheKey) ?? null);
|
|
13434
13428
|
return;
|
|
13435
13429
|
}
|
|
13436
13430
|
let cancelled = false;
|
|
13437
|
-
|
|
13431
|
+
chunkRHNJ4IU2_js.applyColorChange(
|
|
13438
13432
|
src,
|
|
13439
13433
|
clrChange.clrFrom,
|
|
13440
13434
|
clrChange.clrTo,
|
|
@@ -13442,7 +13436,7 @@ function ColorChangedImage({
|
|
|
13442
13436
|
Boolean(clrChange.clrToTransparent)
|
|
13443
13437
|
).then((result) => {
|
|
13444
13438
|
if (!cancelled) {
|
|
13445
|
-
|
|
13439
|
+
chunkRHNJ4IU2_js.setCachedResult(cacheKey, result.dataUrl);
|
|
13446
13440
|
setProcessedSrc(result.dataUrl);
|
|
13447
13441
|
}
|
|
13448
13442
|
return void 0;
|
|
@@ -13534,7 +13528,7 @@ function TiledImageLayer({
|
|
|
13534
13528
|
cancelled = true;
|
|
13535
13529
|
};
|
|
13536
13530
|
}, [src]);
|
|
13537
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...
|
|
13531
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunkRHNJ4IU2_js.getImageTilingStyle(element, nativeSize), ...style } });
|
|
13538
13532
|
}
|
|
13539
13533
|
function renderImageEffectDefinitions(element, excludeDuotone = false) {
|
|
13540
13534
|
return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13603,7 +13597,7 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13603
13597
|
...filter ? { filter } : {},
|
|
13604
13598
|
...opacity !== void 0 ? { opacity } : {}
|
|
13605
13599
|
};
|
|
13606
|
-
if (
|
|
13600
|
+
if (chunkRHNJ4IU2_js.isImageTiled(el)) {
|
|
13607
13601
|
const tileSrc = imgSrc(el);
|
|
13608
13602
|
if (!tileSrc) {
|
|
13609
13603
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-gray-500 bg-gray-100", children: "Image" });
|
|
@@ -13622,12 +13616,12 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13622
13616
|
] });
|
|
13623
13617
|
}
|
|
13624
13618
|
const colorWash = pptx.getImageColorWashStyle(
|
|
13625
|
-
(0,
|
|
13619
|
+
(0, chunkRHNJ4IU2_js.dist_exports.isImageLikeElement)(el) ? el.imageEffects?.colorWash : void 0
|
|
13626
13620
|
);
|
|
13627
13621
|
const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
|
|
13628
|
-
const duotoneColors =
|
|
13622
|
+
const duotoneColors = chunkRHNJ4IU2_js.getDuotoneColors(el);
|
|
13629
13623
|
const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
|
|
13630
|
-
const filterForImg = useDuotoneCanvas ?
|
|
13624
|
+
const filterForImg = useDuotoneCanvas ? chunkRHNJ4IU2_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
|
|
13631
13625
|
const canvasEffectStyles = {
|
|
13632
13626
|
...filterForImg ? { filter: filterForImg } : {},
|
|
13633
13627
|
...opacity !== void 0 ? { opacity } : {}
|
|
@@ -13703,10 +13697,10 @@ function SlideBackgroundImageLayer({
|
|
|
13703
13697
|
style: { zIndex: 0 },
|
|
13704
13698
|
children: renderImg(
|
|
13705
13699
|
backgroundElement,
|
|
13706
|
-
|
|
13707
|
-
|
|
13700
|
+
chunkRHNJ4IU2_js.getImageRenderStyle(backgroundElement),
|
|
13701
|
+
chunkRHNJ4IU2_js.getImageEffectsFilter(backgroundElement),
|
|
13708
13702
|
"",
|
|
13709
|
-
|
|
13703
|
+
chunkRHNJ4IU2_js.getImageEffectsOpacity(backgroundElement)
|
|
13710
13704
|
)
|
|
13711
13705
|
}
|
|
13712
13706
|
);
|
|
@@ -13977,7 +13971,7 @@ function ChartElementView({
|
|
|
13977
13971
|
pptx.getBarFacePicturePixelSampleVersion
|
|
13978
13972
|
);
|
|
13979
13973
|
const viewModel = React17.useMemo(() => {
|
|
13980
|
-
return canEdit ?
|
|
13974
|
+
return canEdit ? chunkRHNJ4IU2_js.buildReactChartViewModel(element) : null;
|
|
13981
13975
|
}, [canEdit, element, barFacePictureSampleVersion]);
|
|
13982
13976
|
React17.useEffect(pptx.ensureChartInteractionStyles, []);
|
|
13983
13977
|
React17.useEffect(() => {
|
|
@@ -14062,9 +14056,9 @@ function ChartElementView({
|
|
|
14062
14056
|
textStyle: animationState?.textStyle,
|
|
14063
14057
|
onSelect: chart3D.onSelect,
|
|
14064
14058
|
onDrag: chart3D.onDrag,
|
|
14065
|
-
children:
|
|
14059
|
+
children: chunkRHNJ4IU2_js.renderChartElement(renderedElement)
|
|
14066
14060
|
}
|
|
14067
|
-
) :
|
|
14061
|
+
) : chunkRHNJ4IU2_js.renderChartElement(renderedElement),
|
|
14068
14062
|
dragValue !== null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1 right-1 z-10 rounded bg-primary/90 px-1.5 py-0.5 text-[10px] font-medium text-white pointer-events-none", children: pptx.formatAxisValue(dragValue) }),
|
|
14069
14063
|
titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14070
14064
|
"input",
|
|
@@ -14394,7 +14388,7 @@ function ResizeHandles({
|
|
|
14394
14388
|
"aria-label": t("pptx.selectionOverlay.resize", { handle }),
|
|
14395
14389
|
"data-pptx-handle-kind": "resize",
|
|
14396
14390
|
"data-pptx-compact": true,
|
|
14397
|
-
className:
|
|
14391
|
+
className: chunkRHNJ4IU2_js.cn(
|
|
14398
14392
|
"absolute z-10 group border-0 bg-transparent p-0",
|
|
14399
14393
|
RESIZE_DEFAULT_CLASSES,
|
|
14400
14394
|
posClass,
|
|
@@ -14420,7 +14414,7 @@ function ResizeHandles({
|
|
|
14420
14414
|
"div",
|
|
14421
14415
|
{
|
|
14422
14416
|
"data-pptx-handle-hit": true,
|
|
14423
|
-
className:
|
|
14417
|
+
className: chunkRHNJ4IU2_js.cn(
|
|
14424
14418
|
"absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
|
|
14425
14419
|
corner ? "max-md:-inset-1.5 max-md:[--pptx-handle-hit-inset:-6px]" : "max-md:-inset-2 max-md:[--pptx-handle-hit-inset:-8px]"
|
|
14426
14420
|
),
|
|
@@ -14441,7 +14435,7 @@ function ResizeHandles({
|
|
|
14441
14435
|
"aria-label": t("pptx.selectionOverlay.rotate"),
|
|
14442
14436
|
"data-pptx-handle-kind": "rotate",
|
|
14443
14437
|
"data-pptx-compact": true,
|
|
14444
|
-
className:
|
|
14438
|
+
className: chunkRHNJ4IU2_js.cn(
|
|
14445
14439
|
"absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 z-20 border-0 bg-transparent p-0 cursor-grab active:cursor-grabbing",
|
|
14446
14440
|
ROTATE_DEFAULT_CLASSES
|
|
14447
14441
|
),
|
|
@@ -14511,17 +14505,17 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14511
14505
|
animationState,
|
|
14512
14506
|
textStyleOverrideCss
|
|
14513
14507
|
}) {
|
|
14514
|
-
const shapeEl = (0,
|
|
14508
|
+
const shapeEl = (0, chunkRHNJ4IU2_js.dist_exports.hasShapeProperties)(el) ? el : void 0;
|
|
14515
14509
|
const viewWidth = Math.max(el.width, 0);
|
|
14516
14510
|
const viewHeight = Math.max(el.height, 0);
|
|
14517
14511
|
const svgWidth = Math.max(el.width, 1);
|
|
14518
14512
|
const svgHeight = Math.max(el.height, 1);
|
|
14519
14513
|
const ss = shapeEl?.shapeStyle;
|
|
14520
14514
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
14521
|
-
const strokeColor =
|
|
14522
|
-
const strokePaint =
|
|
14523
|
-
const dashType =
|
|
14524
|
-
const dashArray =
|
|
14515
|
+
const strokeColor = chunkRHNJ4IU2_js.normalizeHexColor(ss?.strokeColor, chunkRHNJ4IU2_js.DEFAULT_STROKE_COLOR);
|
|
14516
|
+
const strokePaint = chunkRHNJ4IU2_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
|
|
14517
|
+
const dashType = chunkRHNJ4IU2_js.normalizeStrokeDashType(ss?.strokeDash);
|
|
14518
|
+
const dashArray = chunkRHNJ4IU2_js.getSvgStrokeDasharray(
|
|
14525
14519
|
dashType,
|
|
14526
14520
|
Math.max(strokeWidth, 1),
|
|
14527
14521
|
ss?.customDashSegments
|
|
@@ -14532,14 +14526,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14532
14526
|
const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
14533
14527
|
const startMarkerId = `${markerSeed}-sel-start`;
|
|
14534
14528
|
const endMarkerId = `${markerSeed}-sel-end`;
|
|
14535
|
-
const compoundOffsets =
|
|
14536
|
-
const compoundWidths =
|
|
14529
|
+
const compoundOffsets = chunkRHNJ4IU2_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
14530
|
+
const compoundWidths = chunkRHNJ4IU2_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
14537
14531
|
const strokeCap = pptx.svgLineCap(ss?.lineCap);
|
|
14538
|
-
const textEl = (0,
|
|
14532
|
+
const textEl = (0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(el) ? el : void 0;
|
|
14539
14533
|
const connectorText = textEl?.text?.trim() ?? "";
|
|
14540
14534
|
const connectorTextSegments = textEl?.textSegments;
|
|
14541
14535
|
const connectorTextStyle = textEl?.textStyle;
|
|
14542
|
-
const pathGeometry = shapeEl ?
|
|
14536
|
+
const pathGeometry = shapeEl ? chunkRHNJ4IU2_js.getConnectorPathGeometry(shapeEl) : {
|
|
14543
14537
|
pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
|
|
14544
14538
|
startX: 0,
|
|
14545
14539
|
startY: 0,
|
|
@@ -14548,16 +14542,16 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14548
14542
|
};
|
|
14549
14543
|
const hitTargetWidth = Math.max(strokeWidth * 3, 14);
|
|
14550
14544
|
const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
|
|
14551
|
-
const lineShadow =
|
|
14552
|
-
const lineGlow =
|
|
14545
|
+
const lineShadow = chunkRHNJ4IU2_js.buildLineShadowCss(el);
|
|
14546
|
+
const lineGlow = chunkRHNJ4IU2_js.buildLineGlowFilter(el);
|
|
14553
14547
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14554
14548
|
"div",
|
|
14555
14549
|
{
|
|
14556
14550
|
"data-pptx-element": "true",
|
|
14557
14551
|
"data-element-id": el.id,
|
|
14558
|
-
role:
|
|
14559
|
-
"aria-label":
|
|
14560
|
-
"aria-roledescription":
|
|
14552
|
+
role: chunkRHNJ4IU2_js.getAriaRole(el, { actionable: false }),
|
|
14553
|
+
"aria-label": chunkRHNJ4IU2_js.getAriaLabel(el),
|
|
14554
|
+
"aria-roledescription": chunkRHNJ4IU2_js.getAriaRoleDescription(el),
|
|
14561
14555
|
"aria-selected": isSelected ? true : void 0,
|
|
14562
14556
|
className: "absolute",
|
|
14563
14557
|
style: {
|
|
@@ -14590,14 +14584,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
|
|
|
14590
14584
|
style: { overflow: "visible", pointerEvents: "none" },
|
|
14591
14585
|
children: [
|
|
14592
14586
|
/* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
|
|
14593
|
-
|
|
14587
|
+
chunkRHNJ4IU2_js.renderConnectorMarker(
|
|
14594
14588
|
startMarkerId,
|
|
14595
14589
|
startArrow,
|
|
14596
14590
|
strokePaint,
|
|
14597
14591
|
ss?.connectorStartArrowWidth,
|
|
14598
14592
|
ss?.connectorStartArrowLength
|
|
14599
14593
|
),
|
|
14600
|
-
|
|
14594
|
+
chunkRHNJ4IU2_js.renderConnectorMarker(
|
|
14601
14595
|
endMarkerId,
|
|
14602
14596
|
endArrow,
|
|
14603
14597
|
strokePaint,
|
|
@@ -14801,14 +14795,14 @@ function getElementInteractionProps({
|
|
|
14801
14795
|
};
|
|
14802
14796
|
}
|
|
14803
14797
|
function renderDagDuotoneFilterForElement(el) {
|
|
14804
|
-
if (!
|
|
14798
|
+
if (!chunkRHNJ4IU2_js.hasDagDuotoneEffect(el)) {
|
|
14805
14799
|
return null;
|
|
14806
14800
|
}
|
|
14807
14801
|
const duotone = el.shapeStyle?.dagDuotone;
|
|
14808
14802
|
if (!duotone) {
|
|
14809
14803
|
return null;
|
|
14810
14804
|
}
|
|
14811
|
-
return
|
|
14805
|
+
return chunkRHNJ4IU2_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
|
|
14812
14806
|
}
|
|
14813
14807
|
function getContainerStyle({
|
|
14814
14808
|
el,
|
|
@@ -14821,7 +14815,7 @@ function getContainerStyle({
|
|
|
14821
14815
|
has3DExtrusion,
|
|
14822
14816
|
templateEditing
|
|
14823
14817
|
}) {
|
|
14824
|
-
const ss = (0,
|
|
14818
|
+
const ss = (0, chunkRHNJ4IU2_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
|
|
14825
14819
|
const isPicture = el.type === "picture" || el.type === "image";
|
|
14826
14820
|
const blurGrowVisible = Boolean(
|
|
14827
14821
|
ss?.blurGrow && typeof ss.blurRadius === "number" && ss.blurRadius > 0
|
|
@@ -14835,10 +14829,10 @@ function getContainerStyle({
|
|
|
14835
14829
|
top: isFullscreenMedia ? fs.top : el.y,
|
|
14836
14830
|
width: isFullscreenMedia ? fs.width : painted.width,
|
|
14837
14831
|
...heightStyle,
|
|
14838
|
-
transform: isFullscreenMedia ? fs.transform :
|
|
14832
|
+
transform: isFullscreenMedia ? fs.transform : chunkRHNJ4IU2_js.getElementTransform(el),
|
|
14839
14833
|
transformOrigin: "center",
|
|
14840
14834
|
overflow: overflowValue,
|
|
14841
|
-
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ?
|
|
14835
|
+
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunkRHNJ4IU2_js.getCropShapeClipPath(el) : void 0,
|
|
14842
14836
|
zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
|
|
14843
14837
|
visibility: animationState?.visible === false ? "hidden" : "visible",
|
|
14844
14838
|
animation: animationState?.cssAnimation,
|
|
@@ -14870,11 +14864,11 @@ function getContainerStyle({
|
|
|
14870
14864
|
};
|
|
14871
14865
|
}
|
|
14872
14866
|
function shapeParams(element) {
|
|
14873
|
-
const style = (0,
|
|
14867
|
+
const style = (0, chunkRHNJ4IU2_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
|
|
14874
14868
|
const strokeWidth = pptx.paintedStrokeWidth(style);
|
|
14875
|
-
const strokeColor =
|
|
14876
|
-
const fillColor =
|
|
14877
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
14869
|
+
const strokeColor = chunkRHNJ4IU2_js.normalizeHexColor(style?.strokeColor, chunkRHNJ4IU2_js.DEFAULT_STROKE_COLOR);
|
|
14870
|
+
const fillColor = chunkRHNJ4IU2_js.normalizeHexColor(style?.fillColor, chunkRHNJ4IU2_js.DEFAULT_FILL_COLOR);
|
|
14871
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkRHNJ4IU2_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
14878
14872
|
return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
|
|
14879
14873
|
}
|
|
14880
14874
|
var Extrusion3DOverlay = React17__default.default.memo(
|
|
@@ -14979,7 +14973,7 @@ function ShapeEffectOverlay({
|
|
|
14979
14973
|
const fillOverlayStyle = overlay ? {
|
|
14980
14974
|
position: "absolute",
|
|
14981
14975
|
inset: 0,
|
|
14982
|
-
...(0,
|
|
14976
|
+
...(0, chunkRHNJ4IU2_js.dist_exports.isImageLikeElement)(element) ? chunkRHNJ4IU2_js.getImageSurfaceMaskStyle(element) : {},
|
|
14983
14977
|
background: overlay.color,
|
|
14984
14978
|
mixBlendMode: overlay.blendMode,
|
|
14985
14979
|
pointerEvents: "none"
|
|
@@ -15178,10 +15172,10 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15178
15172
|
const allow = pptx.resolveElementInteractivity(el);
|
|
15179
15173
|
const backgroundAnimationState = presentationElementStates?.get(`${el.id}::pptx-bg`);
|
|
15180
15174
|
const visualAnimationState = backgroundAnimationState ?? animationState;
|
|
15181
|
-
const isTxt =
|
|
15182
|
-
const txtSE = (0,
|
|
15175
|
+
const isTxt = chunkRHNJ4IU2_js.isEditableTextElement(el) && allow.textEditable;
|
|
15176
|
+
const txtSE = (0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(el) ? el.textStyle : void 0;
|
|
15183
15177
|
const textStyleOverrideCss = pptx.buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
|
|
15184
|
-
const ss =
|
|
15178
|
+
const ss = chunkRHNJ4IU2_js.getShapeVisualStyle(
|
|
15185
15179
|
el,
|
|
15186
15180
|
hf,
|
|
15187
15181
|
fc,
|
|
@@ -15190,9 +15184,9 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15190
15184
|
visualAnimationState?.animatesFill,
|
|
15191
15185
|
visualAnimationState?.animatesStroke
|
|
15192
15186
|
);
|
|
15193
|
-
const ts =
|
|
15187
|
+
const ts = chunkRHNJ4IU2_js.getTextStyleForElement(el, chunkRHNJ4IU2_js.DEFAULT_TEXT_COLOR);
|
|
15194
15188
|
const isImg = el.type === "picture" || el.type === "image";
|
|
15195
|
-
const vs =
|
|
15189
|
+
const vs = chunkRHNJ4IU2_js.renderVectorShape(
|
|
15196
15190
|
el,
|
|
15197
15191
|
isImg ? false : hf,
|
|
15198
15192
|
fc,
|
|
@@ -15202,10 +15196,10 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15202
15196
|
visualAnimationState?.animatesStroke
|
|
15203
15197
|
);
|
|
15204
15198
|
const isModel3D = el.type === "model3d";
|
|
15205
|
-
const isConn =
|
|
15206
|
-
const shapeStyle3d = (0,
|
|
15199
|
+
const isConn = chunkRHNJ4IU2_js.isConnectorOrLineElement(el);
|
|
15200
|
+
const shapeStyle3d = (0, chunkRHNJ4IU2_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
|
|
15207
15201
|
const extrusionData = React17.useMemo(
|
|
15208
|
-
() =>
|
|
15202
|
+
() => chunkRHNJ4IU2_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
|
|
15209
15203
|
[shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
|
|
15210
15204
|
);
|
|
15211
15205
|
const actionAffordance = useActionAffordance(el, canInteract);
|
|
@@ -15294,7 +15288,7 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15294
15288
|
"aria-hidden": aria.hidden ? true : void 0,
|
|
15295
15289
|
"aria-selected": isSelected ? true : void 0,
|
|
15296
15290
|
tabIndex: isFocusable ? 0 : -1,
|
|
15297
|
-
className:
|
|
15291
|
+
className: chunkRHNJ4IU2_js.cn(
|
|
15298
15292
|
"absolute",
|
|
15299
15293
|
"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
|
|
15300
15294
|
cur,
|
|
@@ -15382,9 +15376,9 @@ var ElementRenderer = React17__default.default.memo(
|
|
|
15382
15376
|
txtSE,
|
|
15383
15377
|
txtS: ts,
|
|
15384
15378
|
vecShape: backgroundAnimationState && !isImg ? null : vs,
|
|
15385
|
-
imgStyle:
|
|
15386
|
-
imgFilter:
|
|
15387
|
-
imgOpacity:
|
|
15379
|
+
imgStyle: chunkRHNJ4IU2_js.getImageRenderStyle(el),
|
|
15380
|
+
imgFilter: chunkRHNJ4IU2_js.getImageEffectsFilter(el),
|
|
15381
|
+
imgOpacity: chunkRHNJ4IU2_js.getImageEffectsOpacity(el),
|
|
15388
15382
|
imgAlt: imageAltText,
|
|
15389
15383
|
isTxtEl: isTxt,
|
|
15390
15384
|
media: mediaDataUrls,
|
|
@@ -15506,10 +15500,10 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
|
|
|
15506
15500
|
}
|
|
15507
15501
|
function renderInk(el, options) {
|
|
15508
15502
|
const replay = options?.replay ?? false;
|
|
15509
|
-
const strokes =
|
|
15503
|
+
const strokes = chunkRHNJ4IU2_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
|
|
15510
15504
|
strokes.some((s) => s.circles || s.nibMarks);
|
|
15511
15505
|
const pressureSensitive = options?.pressureSensitive;
|
|
15512
|
-
const replayStyles = replay ?
|
|
15506
|
+
const replayStyles = replay ? chunkRHNJ4IU2_js.getInkReplayStyles(el, options?.replayConfig) : null;
|
|
15513
15507
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15514
15508
|
"svg",
|
|
15515
15509
|
{
|
|
@@ -15517,7 +15511,7 @@ function renderInk(el, options) {
|
|
|
15517
15511
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
15518
15512
|
preserveAspectRatio: "none",
|
|
15519
15513
|
children: [
|
|
15520
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
15514
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkRHNJ4IU2_js.INK_REPLAY_KEYFRAMES }),
|
|
15521
15515
|
strokes.map(
|
|
15522
15516
|
(s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
|
|
15523
15517
|
)
|
|
@@ -15528,7 +15522,7 @@ function renderInk(el, options) {
|
|
|
15528
15522
|
function renderGroup(children, parentGroupFill) {
|
|
15529
15523
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: pptx.filterRenderedElements(children).map((c, childIndex) => {
|
|
15530
15524
|
const { hf, fc, sw, sc } = shapeParams(c);
|
|
15531
|
-
const baseSs =
|
|
15525
|
+
const baseSs = chunkRHNJ4IU2_js.getShapeVisualStyle(c, hf, fc, sw, sc);
|
|
15532
15526
|
const inheritedFill = pptx.resolveGroupChildFill(c, parentGroupFill);
|
|
15533
15527
|
const ss = inheritedFill ? {
|
|
15534
15528
|
...baseSs,
|
|
@@ -15539,9 +15533,9 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15539
15533
|
backgroundPosition: inheritedFill.backgroundPosition
|
|
15540
15534
|
} : baseSs;
|
|
15541
15535
|
const isI = c.type === "picture" || c.type === "image";
|
|
15542
|
-
const vs =
|
|
15543
|
-
const ts =
|
|
15544
|
-
const isTxt =
|
|
15536
|
+
const vs = chunkRHNJ4IU2_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
|
|
15537
|
+
const ts = chunkRHNJ4IU2_js.getTextStyleForElement(c, chunkRHNJ4IU2_js.DEFAULT_TEXT_COLOR);
|
|
15538
|
+
const isTxt = chunkRHNJ4IU2_js.isEditableTextElement(c);
|
|
15545
15539
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15546
15540
|
"div",
|
|
15547
15541
|
{
|
|
@@ -15550,9 +15544,9 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15550
15544
|
style: {
|
|
15551
15545
|
left: c.x,
|
|
15552
15546
|
top: c.y,
|
|
15553
|
-
width: Math.max(c.width,
|
|
15554
|
-
height: Math.max(c.height,
|
|
15555
|
-
transform:
|
|
15547
|
+
width: Math.max(c.width, chunkRHNJ4IU2_js.MIN_ELEMENT_SIZE),
|
|
15548
|
+
height: Math.max(c.height, chunkRHNJ4IU2_js.MIN_ELEMENT_SIZE),
|
|
15549
|
+
transform: chunkRHNJ4IU2_js.getElementTransform(c),
|
|
15556
15550
|
transformOrigin: "center",
|
|
15557
15551
|
...ss,
|
|
15558
15552
|
...isI ? {
|
|
@@ -15577,8 +15571,8 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15577
15571
|
// A nested group: recurse, chaining the inherited fill so a
|
|
15578
15572
|
// `grpFill` shape under a fill-less sub-group still paints.
|
|
15579
15573
|
renderGroup(c.children, pptx.getGroupChildParentFill(c, parentGroupFill))
|
|
15580
|
-
) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style:
|
|
15581
|
-
|
|
15574
|
+
) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunkRHNJ4IU2_js.getImageSurfaceStyle(c), children: [
|
|
15575
|
+
chunkRHNJ4IU2_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15582
15576
|
TiledImageLayer,
|
|
15583
15577
|
{
|
|
15584
15578
|
element: c,
|
|
@@ -15591,7 +15585,7 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15591
15585
|
src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
|
|
15592
15586
|
alt: i18n.translationsEn["pptx.ink.groupChildAlt"],
|
|
15593
15587
|
className: "pointer-events-none select-none",
|
|
15594
|
-
style:
|
|
15588
|
+
style: chunkRHNJ4IU2_js.getImageRenderStyle(c),
|
|
15595
15589
|
draggable: false
|
|
15596
15590
|
}
|
|
15597
15591
|
),
|
|
@@ -15603,7 +15597,7 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15603
15597
|
{
|
|
15604
15598
|
className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
|
|
15605
15599
|
style: ts,
|
|
15606
|
-
children:
|
|
15600
|
+
children: chunkRHNJ4IU2_js.renderTextSegments(c, chunkRHNJ4IU2_js.DEFAULT_TEXT_COLOR)
|
|
15607
15601
|
}
|
|
15608
15602
|
) : null
|
|
15609
15603
|
] })
|
|
@@ -15617,8 +15611,8 @@ function renderContentPart(el, options) {
|
|
|
15617
15611
|
if (el.inkStrokes && el.inkStrokes.length > 0) {
|
|
15618
15612
|
const replay = options?.replay ?? false;
|
|
15619
15613
|
const pressureSensitive = options?.pressureSensitive ?? true;
|
|
15620
|
-
const strokes =
|
|
15621
|
-
const replayStyles = replay ?
|
|
15614
|
+
const strokes = chunkRHNJ4IU2_js.buildContentPartStrokes(el);
|
|
15615
|
+
const replayStyles = replay ? chunkRHNJ4IU2_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
|
|
15622
15616
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15623
15617
|
"svg",
|
|
15624
15618
|
{
|
|
@@ -15626,7 +15620,7 @@ function renderContentPart(el, options) {
|
|
|
15626
15620
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
15627
15621
|
preserveAspectRatio: "none",
|
|
15628
15622
|
children: [
|
|
15629
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
15623
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkRHNJ4IU2_js.INK_REPLAY_KEYFRAMES }),
|
|
15630
15624
|
strokes.map(
|
|
15631
15625
|
(s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
|
|
15632
15626
|
)
|
|
@@ -15853,9 +15847,9 @@ function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
|
|
|
15853
15847
|
collaboration: connected,
|
|
15854
15848
|
model: pptx.createInlineListModelObserver(element),
|
|
15855
15849
|
activationSelection,
|
|
15856
|
-
children: seed && !connected ?
|
|
15850
|
+
children: seed && !connected ? chunkRHNJ4IU2_js.renderTextSegments(
|
|
15857
15851
|
element,
|
|
15858
|
-
|
|
15852
|
+
chunkRHNJ4IU2_js.DEFAULT_TEXT_COLOR,
|
|
15859
15853
|
void 0,
|
|
15860
15854
|
void 0,
|
|
15861
15855
|
void 0,
|
|
@@ -16025,7 +16019,7 @@ function InlineTextEditor({
|
|
|
16025
16019
|
seedRef.current = {
|
|
16026
16020
|
initialText,
|
|
16027
16021
|
hasRichSegments: Boolean(
|
|
16028
|
-
(0,
|
|
16022
|
+
(0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(element) && element.textSegments && element.textSegments.length > 0
|
|
16029
16023
|
)
|
|
16030
16024
|
};
|
|
16031
16025
|
}
|
|
@@ -16091,8 +16085,8 @@ function InlineTextEditor({
|
|
|
16091
16085
|
pending.endOffset
|
|
16092
16086
|
);
|
|
16093
16087
|
});
|
|
16094
|
-
const warpStyle =
|
|
16095
|
-
const compensationTransform =
|
|
16088
|
+
const warpStyle = chunkRHNJ4IU2_js.getTextWarpStyle(textStyleRaw);
|
|
16089
|
+
const compensationTransform = chunkRHNJ4IU2_js.getTextCompensationTransform(element);
|
|
16096
16090
|
const warpTransform = warpStyle?.transform;
|
|
16097
16091
|
const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
|
|
16098
16092
|
const wrapperStyle = {
|
|
@@ -16103,7 +16097,7 @@ function InlineTextEditor({
|
|
|
16103
16097
|
transformOrigin: warpStyle?.transformOrigin || "center"
|
|
16104
16098
|
};
|
|
16105
16099
|
const nextInlineStyleValue = (property) => {
|
|
16106
|
-
if (!(0,
|
|
16100
|
+
if (!(0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(element)) {
|
|
16107
16101
|
return true;
|
|
16108
16102
|
}
|
|
16109
16103
|
const result = pptx.getInlineEditorSelectionResult(element.textSegments);
|
|
@@ -16179,7 +16173,7 @@ function InlineTextEditor({
|
|
|
16179
16173
|
const text = e.clipboardData.getData("text/plain");
|
|
16180
16174
|
document.execCommand("insertText", false, text);
|
|
16181
16175
|
},
|
|
16182
|
-
children: list.seed ? list.children : seed.hasRichSegments ?
|
|
16176
|
+
children: list.seed ? list.children : seed.hasRichSegments ? chunkRHNJ4IU2_js.renderTextSegments(element, chunkRHNJ4IU2_js.DEFAULT_TEXT_COLOR) : seed.initialText
|
|
16183
16177
|
},
|
|
16184
16178
|
list.seed?.paragraphs[0].token ?? "plain"
|
|
16185
16179
|
);
|
|
@@ -17116,7 +17110,7 @@ function SmartArtRendererImpl({
|
|
|
17116
17110
|
if (!onUpdateElement || !pptx.shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
|
|
17117
17111
|
return;
|
|
17118
17112
|
}
|
|
17119
|
-
const updated = (0,
|
|
17113
|
+
const updated = (0, chunkRHNJ4IU2_js.dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text);
|
|
17120
17114
|
const box = { width: element.width, height: element.height };
|
|
17121
17115
|
const reflowed = pptx.rebuildDrawingShapesIfCleared(
|
|
17122
17116
|
updated,
|
|
@@ -17132,7 +17126,7 @@ function SmartArtRendererImpl({
|
|
|
17132
17126
|
if (!onUpdateElement) {
|
|
17133
17127
|
return;
|
|
17134
17128
|
}
|
|
17135
|
-
const next = (0,
|
|
17129
|
+
const next = (0, chunkRHNJ4IU2_js.dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, { fillColor: fill });
|
|
17136
17130
|
if (next !== smartArtData) {
|
|
17137
17131
|
const box = { width: element.width, height: element.height };
|
|
17138
17132
|
const reflowed = pptx.rebuildDrawingShapesIfCleared(
|
|
@@ -17326,7 +17320,7 @@ function groupIntoParagraphs(element, fieldContext) {
|
|
|
17326
17320
|
element,
|
|
17327
17321
|
fieldContext ? (seg) => {
|
|
17328
17322
|
if (seg.fieldType) {
|
|
17329
|
-
const substituted =
|
|
17323
|
+
const substituted = chunkRHNJ4IU2_js.substituteFieldText(
|
|
17330
17324
|
seg.text,
|
|
17331
17325
|
seg.fieldType,
|
|
17332
17326
|
fieldContext,
|
|
@@ -17361,13 +17355,13 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
|
|
|
17361
17355
|
if (s.strikethrough) {
|
|
17362
17356
|
decos.push("line-through");
|
|
17363
17357
|
}
|
|
17364
|
-
const fill = s.hyperlink ?
|
|
17358
|
+
const fill = s.hyperlink ? chunkRHNJ4IU2_js.normalizeHexColor(s.color || element.textStyle?.color, chunkRHNJ4IU2_js.HYPERLINK_COLOR) : chunkRHNJ4IU2_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
|
|
17365
17359
|
return {
|
|
17366
17360
|
fill,
|
|
17367
|
-
fontSize: s.fontSize ?? element.textStyle?.fontSize ??
|
|
17361
|
+
fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunkRHNJ4IU2_js.DEFAULT_TEXT_FONT_SIZE,
|
|
17368
17362
|
fontWeight: s.bold ? 700 : 400,
|
|
17369
17363
|
fontStyle: s.italic ? "italic" : void 0,
|
|
17370
|
-
fontFamily: s.fontFamily || element.textStyle?.fontFamily ? (0,
|
|
17364
|
+
fontFamily: s.fontFamily || element.textStyle?.fontFamily ? (0, chunkRHNJ4IU2_js.dist_exports.getSubstituteFontFamily)(s.fontFamily || element.textStyle?.fontFamily || "") : chunkRHNJ4IU2_js.DEFAULT_FONT_FAMILY,
|
|
17371
17365
|
textDecoration: decos.length > 0 ? decos.join(" ") : void 0
|
|
17372
17366
|
};
|
|
17373
17367
|
}
|
|
@@ -17375,8 +17369,8 @@ function resolveSegmentFont(segment, element) {
|
|
|
17375
17369
|
const s = segment.style || {};
|
|
17376
17370
|
const family = s.fontFamily || element.textStyle?.fontFamily;
|
|
17377
17371
|
return {
|
|
17378
|
-
fontFamily: family ? (0,
|
|
17379
|
-
fontSizePx: s.fontSize ?? element.textStyle?.fontSize ??
|
|
17372
|
+
fontFamily: family ? (0, chunkRHNJ4IU2_js.dist_exports.getSubstituteFontFamily)(family) : chunkRHNJ4IU2_js.DEFAULT_FONT_FAMILY,
|
|
17373
|
+
fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunkRHNJ4IU2_js.DEFAULT_TEXT_FONT_SIZE,
|
|
17380
17374
|
bold: s.bold ?? element.textStyle?.bold,
|
|
17381
17375
|
italic: s.italic ?? element.textStyle?.italic
|
|
17382
17376
|
};
|
|
@@ -17442,7 +17436,7 @@ function WarpedText({
|
|
|
17442
17436
|
fallbackColor,
|
|
17443
17437
|
fieldContext
|
|
17444
17438
|
}) {
|
|
17445
|
-
if (!(0,
|
|
17439
|
+
if (!(0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(element)) {
|
|
17446
17440
|
return null;
|
|
17447
17441
|
}
|
|
17448
17442
|
const textEl = element;
|
|
@@ -17460,9 +17454,9 @@ function WarpedText({
|
|
|
17460
17454
|
const warpAdj2 = textEl.textStyle?.textWarpAdj2;
|
|
17461
17455
|
const align = textEl.textStyle?.align ?? "center";
|
|
17462
17456
|
const { startOffset, textAnchor } = getAlignmentProps(align);
|
|
17463
|
-
const baseFontSize = textEl.textStyle?.fontSize ??
|
|
17464
|
-
const baseFontFamily = textEl.textStyle?.fontFamily ? (0,
|
|
17465
|
-
const baseFill =
|
|
17457
|
+
const baseFontSize = textEl.textStyle?.fontSize ?? chunkRHNJ4IU2_js.DEFAULT_TEXT_FONT_SIZE;
|
|
17458
|
+
const baseFontFamily = textEl.textStyle?.fontFamily ? (0, chunkRHNJ4IU2_js.dist_exports.getSubstituteFontFamily)(textEl.textStyle.fontFamily) : chunkRHNJ4IU2_js.DEFAULT_FONT_FAMILY;
|
|
17459
|
+
const baseFill = chunkRHNJ4IU2_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
|
|
17466
17460
|
if (pptx.hasGlyphEnvelope(preset)) {
|
|
17467
17461
|
const perLine = pptx.buildGlyphEnvelopeBlock(
|
|
17468
17462
|
preset,
|
|
@@ -17562,7 +17556,7 @@ function WarpedText({
|
|
|
17562
17556
|
);
|
|
17563
17557
|
}
|
|
17564
17558
|
var GLYPH_BY_SHAPE = Object.fromEntries(
|
|
17565
|
-
|
|
17559
|
+
chunkRHNJ4IU2_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
|
|
17566
17560
|
);
|
|
17567
17561
|
GLYPH_BY_SHAPE["actionButtonForwardOrNext"] = GLYPH_BY_SHAPE["actionButtonForwardNext"];
|
|
17568
17562
|
GLYPH_BY_SHAPE["actionButtonBackOrPrevious"] = GLYPH_BY_SHAPE["actionButtonBackPrevious"];
|
|
@@ -17632,11 +17626,11 @@ function renderTextElementBody(options) {
|
|
|
17632
17626
|
const isLinkedTextBox = pptx.isLinkedTextBox(el);
|
|
17633
17627
|
const linkedSegments = pptx.getOverflowSegments(el, slideElements);
|
|
17634
17628
|
const useSvgWarp = pptx.shouldUseSvgWarp(
|
|
17635
|
-
(0,
|
|
17629
|
+
(0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(el) ? el.textStyle?.textWarpPreset : void 0
|
|
17636
17630
|
);
|
|
17637
|
-
const scene3dStyle = (0,
|
|
17631
|
+
const scene3dStyle = (0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(el) ? chunkRHNJ4IU2_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
|
|
17638
17632
|
const rotationTransform = pptx.getTextBodyRotationTransform(el);
|
|
17639
|
-
const composedTransform = [rotationTransform,
|
|
17633
|
+
const composedTransform = [rotationTransform, chunkRHNJ4IU2_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
|
|
17640
17634
|
const transformStyle = {
|
|
17641
17635
|
transform: composedTransform,
|
|
17642
17636
|
// A COM-measured homography (`scene3dStyle.transformOrigin === '0 0'`)
|
|
@@ -17666,18 +17660,18 @@ function renderTextElementBody(options) {
|
|
|
17666
17660
|
shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
17667
17661
|
"div",
|
|
17668
17662
|
{
|
|
17669
|
-
className:
|
|
17663
|
+
className: chunkRHNJ4IU2_js.cn(
|
|
17670
17664
|
"relative z-10 w-full h-full",
|
|
17671
17665
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
17672
17666
|
),
|
|
17673
|
-
style: { ...
|
|
17667
|
+
style: { ...chunkRHNJ4IU2_js.getTextLayoutStyle(el), ...transformStyle },
|
|
17674
17668
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17675
17669
|
WarpedText,
|
|
17676
17670
|
{
|
|
17677
17671
|
element: el,
|
|
17678
17672
|
width: el.width,
|
|
17679
17673
|
height: el.height,
|
|
17680
|
-
fallbackColor:
|
|
17674
|
+
fallbackColor: chunkRHNJ4IU2_js.DEFAULT_TEXT_COLOR,
|
|
17681
17675
|
findHighlights: findHl,
|
|
17682
17676
|
fieldContext
|
|
17683
17677
|
}
|
|
@@ -17686,19 +17680,19 @@ function renderTextElementBody(options) {
|
|
|
17686
17680
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
17687
17681
|
"div",
|
|
17688
17682
|
{
|
|
17689
|
-
className:
|
|
17683
|
+
className: chunkRHNJ4IU2_js.cn(
|
|
17690
17684
|
"relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
|
|
17691
17685
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
17692
17686
|
),
|
|
17693
17687
|
style: {
|
|
17694
|
-
...
|
|
17688
|
+
...chunkRHNJ4IU2_js.getTextLayoutStyle(el),
|
|
17695
17689
|
...txtS,
|
|
17696
|
-
...
|
|
17690
|
+
...chunkRHNJ4IU2_js.getTextWarpStyle(txtSE),
|
|
17697
17691
|
...transformStyle
|
|
17698
17692
|
},
|
|
17699
|
-
children:
|
|
17693
|
+
children: chunkRHNJ4IU2_js.renderTextSegments(
|
|
17700
17694
|
el,
|
|
17701
|
-
|
|
17695
|
+
chunkRHNJ4IU2_js.DEFAULT_TEXT_COLOR,
|
|
17702
17696
|
void 0,
|
|
17703
17697
|
findHl,
|
|
17704
17698
|
onHyperlinkClick,
|
|
@@ -18016,7 +18010,7 @@ function renderBody(options) {
|
|
|
18016
18010
|
);
|
|
18017
18011
|
}
|
|
18018
18012
|
if (isImg) {
|
|
18019
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style:
|
|
18013
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunkRHNJ4IU2_js.getImageSurfaceStyle(el), children: [
|
|
18020
18014
|
renderImg(el, imgStyle, imgFilter, imgAlt, imgOpacity),
|
|
18021
18015
|
vecShape ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", children: vecShape }) : null
|
|
18022
18016
|
] });
|
|
@@ -18033,7 +18027,7 @@ function renderBody(options) {
|
|
|
18033
18027
|
textDirection: txtSE?.textDirection,
|
|
18034
18028
|
textStyle: txtS,
|
|
18035
18029
|
textStyleRaw: txtSE,
|
|
18036
|
-
layoutStyle:
|
|
18030
|
+
layoutStyle: chunkRHNJ4IU2_js.getTextLayoutStyle(el),
|
|
18037
18031
|
element: el,
|
|
18038
18032
|
onCommit,
|
|
18039
18033
|
onCancel,
|
|
@@ -18044,7 +18038,7 @@ function renderBody(options) {
|
|
|
18044
18038
|
] });
|
|
18045
18039
|
}
|
|
18046
18040
|
if (el.type === "table") {
|
|
18047
|
-
return
|
|
18041
|
+
return chunkRHNJ4IU2_js.renderTableElement(el, txtS, {
|
|
18048
18042
|
editable: isSel,
|
|
18049
18043
|
selectedCell: isSel ? tableSt : null,
|
|
18050
18044
|
onSelectCell: onCellSel,
|
|
@@ -18077,7 +18071,7 @@ function renderBody(options) {
|
|
|
18077
18071
|
);
|
|
18078
18072
|
}
|
|
18079
18073
|
if (el.type === "media") {
|
|
18080
|
-
return
|
|
18074
|
+
return chunkRHNJ4IU2_js.renderMediaElement(el, media, {
|
|
18081
18075
|
// Present mode autoplays every media element on the active slide,
|
|
18082
18076
|
// not only ones persisted with their own `autoPlay` flag (matching
|
|
18083
18077
|
// the other four bindings' unconditional `presenting`-gated
|
|
@@ -18100,7 +18094,7 @@ function renderBody(options) {
|
|
|
18100
18094
|
onPlayStateChange: handleMediaPlayStateChange
|
|
18101
18095
|
});
|
|
18102
18096
|
}
|
|
18103
|
-
if (doInk && (0,
|
|
18097
|
+
if (doInk && (0, chunkRHNJ4IU2_js.dist_exports.isInkElement)(el)) {
|
|
18104
18098
|
return renderInk(el, {
|
|
18105
18099
|
replay: isPresentationPassive,
|
|
18106
18100
|
pressureSensitive: true
|
|
@@ -18129,27 +18123,27 @@ function renderBody(options) {
|
|
|
18129
18123
|
}
|
|
18130
18124
|
return renderGroup(el.children, pptx.getGroupChildParentFill(el));
|
|
18131
18125
|
}
|
|
18132
|
-
if (
|
|
18133
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
18126
|
+
if (chunkRHNJ4IU2_js.shouldRenderFallbackLabel(el, isTxtEl)) {
|
|
18127
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkRHNJ4IU2_js.getElementLabel(el) });
|
|
18134
18128
|
}
|
|
18135
18129
|
return renderTextElementBody(options);
|
|
18136
18130
|
}
|
|
18137
18131
|
function defaultTextColorForFill(fillColor) {
|
|
18138
18132
|
const hex = String(fillColor ?? "").replace(/^#/u, "");
|
|
18139
18133
|
if (!/^[0-9a-f]{6}$/iu.test(hex)) {
|
|
18140
|
-
return
|
|
18134
|
+
return chunkRHNJ4IU2_js.DEFAULT_TEXT_COLOR;
|
|
18141
18135
|
}
|
|
18142
18136
|
const channels = [0, 2, 4].map((offset) => Number.parseInt(hex.slice(offset, offset + 2), 16) / 255).map((channel) => channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4);
|
|
18143
18137
|
const luminance = channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
|
|
18144
|
-
return luminance > 0.179 ?
|
|
18138
|
+
return luminance > 0.179 ? chunkRHNJ4IU2_js.DEFAULT_TEXT_COLOR : "#ffffff";
|
|
18145
18139
|
}
|
|
18146
18140
|
function getStaticElementVisualState(element, parentGroupFill) {
|
|
18147
|
-
const style = (0,
|
|
18148
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
18149
|
-
const fill =
|
|
18141
|
+
const style = (0, chunkRHNJ4IU2_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
|
|
18142
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkRHNJ4IU2_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
18143
|
+
const fill = chunkRHNJ4IU2_js.normalizeHexColor(style?.fillColor, chunkRHNJ4IU2_js.DEFAULT_FILL_COLOR);
|
|
18150
18144
|
const strokeWidth = pptx.paintedStrokeWidth(style);
|
|
18151
|
-
const stroke =
|
|
18152
|
-
const baseVisualStyle =
|
|
18145
|
+
const stroke = chunkRHNJ4IU2_js.normalizeHexColor(style?.strokeColor, chunkRHNJ4IU2_js.DEFAULT_STROKE_COLOR);
|
|
18146
|
+
const baseVisualStyle = chunkRHNJ4IU2_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
|
|
18153
18147
|
const inheritedFill = pptx.resolveGroupChildFill(element, parentGroupFill);
|
|
18154
18148
|
const visualStyle = inheritedFill ? {
|
|
18155
18149
|
...baseVisualStyle,
|
|
@@ -18159,13 +18153,13 @@ function getStaticElementVisualState(element, parentGroupFill) {
|
|
|
18159
18153
|
backgroundSize: inheritedFill.backgroundSize,
|
|
18160
18154
|
backgroundPosition: inheritedFill.backgroundPosition
|
|
18161
18155
|
} : baseVisualStyle;
|
|
18162
|
-
const textStyle =
|
|
18156
|
+
const textStyle = chunkRHNJ4IU2_js.getTextStyleForElement(
|
|
18163
18157
|
element,
|
|
18164
|
-
element.type === "shape" && hasFill ? defaultTextColorForFill(fill) :
|
|
18158
|
+
element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunkRHNJ4IU2_js.DEFAULT_TEXT_COLOR
|
|
18165
18159
|
);
|
|
18166
18160
|
const isImage = element.type === "picture" || element.type === "image";
|
|
18167
|
-
const letsTextOverflow = (0,
|
|
18168
|
-
const shapeType = (0,
|
|
18161
|
+
const letsTextOverflow = (0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
|
|
18162
|
+
const shapeType = (0, chunkRHNJ4IU2_js.dist_exports.hasShapeProperties)(element) ? element.shapeType : void 0;
|
|
18169
18163
|
const isCallout = pptx.isWedgeCalloutPresetShape(shapeType) || String(shapeType ?? "").toLowerCase().includes("callout");
|
|
18170
18164
|
return {
|
|
18171
18165
|
hasFill,
|
|
@@ -18186,7 +18180,7 @@ function getStaticElementInteractionState(element, hasActionHandler, exposeEleme
|
|
|
18186
18180
|
return { action, isActionable, contractRole };
|
|
18187
18181
|
}
|
|
18188
18182
|
function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
|
|
18189
|
-
const overflowClass = visual.isImage || element.type === "group" ||
|
|
18183
|
+
const overflowClass = visual.isImage || element.type === "group" || chunkRHNJ4IU2_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
|
|
18190
18184
|
const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
|
|
18191
18185
|
return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
|
|
18192
18186
|
}
|
|
@@ -18269,7 +18263,7 @@ function StaticElementRendererImpl({
|
|
|
18269
18263
|
top: positioned ? element.y : void 0,
|
|
18270
18264
|
width: positioned ? Math.max(element.width, 1) : "100%",
|
|
18271
18265
|
height: positioned ? Math.max(element.height, 1) : "100%",
|
|
18272
|
-
transform: positioned ?
|
|
18266
|
+
transform: positioned ? chunkRHNJ4IU2_js.getElementTransform(element) : void 0,
|
|
18273
18267
|
transformOrigin: "center",
|
|
18274
18268
|
zIndex,
|
|
18275
18269
|
...visualStyle,
|
|
@@ -18310,20 +18304,20 @@ function StaticElementRendererImpl({
|
|
|
18310
18304
|
isEditing: false,
|
|
18311
18305
|
editText: "",
|
|
18312
18306
|
spellCheck: false,
|
|
18313
|
-
txtSE: (0,
|
|
18307
|
+
txtSE: (0, chunkRHNJ4IU2_js.dist_exports.hasTextProperties)(element) ? element.textStyle : void 0,
|
|
18314
18308
|
txtS: textStyle,
|
|
18315
|
-
vecShape:
|
|
18309
|
+
vecShape: chunkRHNJ4IU2_js.renderVectorShape(
|
|
18316
18310
|
element,
|
|
18317
18311
|
isImage ? false : hasFill,
|
|
18318
18312
|
fill,
|
|
18319
18313
|
strokeWidth,
|
|
18320
18314
|
stroke
|
|
18321
18315
|
),
|
|
18322
|
-
imgStyle: imageAnimation ? { ...
|
|
18323
|
-
imgFilter:
|
|
18324
|
-
imgOpacity:
|
|
18316
|
+
imgStyle: imageAnimation ? { ...chunkRHNJ4IU2_js.getImageRenderStyle(element), animation: imageAnimation } : chunkRHNJ4IU2_js.getImageRenderStyle(element),
|
|
18317
|
+
imgFilter: chunkRHNJ4IU2_js.getImageEffectsFilter(element),
|
|
18318
|
+
imgOpacity: chunkRHNJ4IU2_js.getImageEffectsOpacity(element),
|
|
18325
18319
|
imgAlt: "",
|
|
18326
|
-
isTxtEl:
|
|
18320
|
+
isTxtEl: chunkRHNJ4IU2_js.isEditableTextElement(element),
|
|
18327
18321
|
media: mediaDataUrls,
|
|
18328
18322
|
tableSt: null,
|
|
18329
18323
|
isSel: false,
|
|
@@ -18368,7 +18362,7 @@ function SlideLayer({
|
|
|
18368
18362
|
style: {
|
|
18369
18363
|
width: safeWidth,
|
|
18370
18364
|
height: safeHeight,
|
|
18371
|
-
backgroundColor: slide.backgroundColor ?
|
|
18365
|
+
backgroundColor: slide.backgroundColor ? chunkRHNJ4IU2_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
|
|
18372
18366
|
backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
|
|
18373
18367
|
backgroundSize: slide.backgroundImage ? "cover" : void 0,
|
|
18374
18368
|
backgroundPosition: slide.backgroundImage ? "center" : void 0
|