pptx-react-viewer 4.65.0 → 4.66.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 +53 -0
- package/dist/{AiChatPanel-7AFFNYEN.js → AiChatPanel-DL7EBR2V.js} +19 -19
- package/dist/AiChatPanel-DL7EBR2V.js.br +0 -0
- package/dist/AiChatPanel-DL7EBR2V.js.gz +0 -0
- package/dist/{AiChatPanel-7U7IJRNY.mjs → AiChatPanel-JKWJQX4N.mjs} +1 -1
- package/dist/AiChatPanel-JKWJQX4N.mjs.br +0 -0
- package/dist/AiChatPanel-JKWJQX4N.mjs.gz +0 -0
- package/dist/ai.js +2 -2
- package/dist/ai.js.br +2 -1
- package/dist/ai.js.gz +0 -0
- package/dist/ai.mjs +1 -1
- package/dist/ai.mjs.br +0 -0
- package/dist/ai.mjs.gz +0 -0
- package/dist/{chunk-5DBKW7F3.js → chunk-73S5EOD3.js} +67 -735
- package/dist/chunk-73S5EOD3.js.br +0 -0
- package/dist/chunk-73S5EOD3.js.gz +0 -0
- package/dist/{chunk-5ZW3GP6C.mjs → chunk-A4K2TM2K.mjs} +68 -737
- package/dist/chunk-A4K2TM2K.mjs.br +0 -0
- package/dist/chunk-A4K2TM2K.mjs.gz +0 -0
- package/dist/{chunk-VMX3IDQB.mjs → chunk-DORVZDQT.mjs} +6 -5
- package/dist/chunk-DORVZDQT.mjs.br +0 -0
- package/dist/chunk-DORVZDQT.mjs.gz +0 -0
- package/dist/{chunk-LUKGXRHZ.js → chunk-QLXYEA54.js} +562 -561
- package/dist/chunk-QLXYEA54.js.br +0 -0
- package/dist/chunk-QLXYEA54.js.gz +0 -0
- package/dist/{chunk-WAIX4VJ2.mjs → chunk-SLFVXZHA.mjs} +1 -1
- package/dist/chunk-SLFVXZHA.mjs.br +0 -0
- package/dist/chunk-SLFVXZHA.mjs.gz +0 -0
- package/dist/{chunk-PNDORR6S.js → chunk-UC57KUGO.js} +1 -1
- package/dist/chunk-UC57KUGO.js.br +0 -0
- package/dist/chunk-UC57KUGO.js.gz +0 -0
- package/dist/{chunk-VGU5S37T.js → chunk-YQ67KAQR.js} +318 -329
- package/dist/chunk-YQ67KAQR.js.br +0 -0
- package/dist/chunk-YQ67KAQR.js.gz +0 -0
- package/dist/{chunk-G5JGUSBL.mjs → chunk-ZRU67AVX.mjs} +122 -133
- package/dist/chunk-ZRU67AVX.mjs.br +0 -0
- package/dist/chunk-ZRU67AVX.mjs.gz +0 -0
- package/dist/index.js +27 -27
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.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 +21 -21
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +3 -3
- package/dist/AiChatPanel-7AFFNYEN.js.br +0 -0
- package/dist/AiChatPanel-7AFFNYEN.js.gz +0 -0
- package/dist/AiChatPanel-7U7IJRNY.mjs.br +0 -0
- package/dist/AiChatPanel-7U7IJRNY.mjs.gz +0 -0
- package/dist/chunk-5DBKW7F3.js.br +0 -0
- package/dist/chunk-5DBKW7F3.js.gz +0 -0
- package/dist/chunk-5ZW3GP6C.mjs.br +0 -0
- package/dist/chunk-5ZW3GP6C.mjs.gz +0 -0
- package/dist/chunk-G5JGUSBL.mjs.br +0 -0
- package/dist/chunk-G5JGUSBL.mjs.gz +0 -0
- package/dist/chunk-LUKGXRHZ.js.br +0 -0
- package/dist/chunk-LUKGXRHZ.js.gz +0 -0
- package/dist/chunk-PNDORR6S.js.br +0 -0
- package/dist/chunk-PNDORR6S.js.gz +0 -0
- package/dist/chunk-VGU5S37T.js.br +0 -0
- package/dist/chunk-VGU5S37T.js.gz +0 -0
- package/dist/chunk-VMX3IDQB.mjs.br +0 -0
- package/dist/chunk-VMX3IDQB.mjs.gz +0 -0
- package/dist/chunk-WAIX4VJ2.mjs.br +0 -0
- package/dist/chunk-WAIX4VJ2.mjs.gz +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk73S5EOD3_js = require('./chunk-73S5EOD3.js');
|
|
4
4
|
var pptx = require('ooxml-ui/pptx');
|
|
5
5
|
var React17 = require('react');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -604,9 +604,9 @@ function differsOnlyInMasterSet(previous, next) {
|
|
|
604
604
|
}
|
|
605
605
|
function recordExplicitSlideUpdate(history, previous, before, label) {
|
|
606
606
|
if (previous && serializeHistoryDocument(previous) !== serializeHistoryDocument(before)) {
|
|
607
|
-
history.record(
|
|
607
|
+
history.record(chunk73S5EOD3_js.cloneHistorySnapshot(previous), previous.actionLabel);
|
|
608
608
|
}
|
|
609
|
-
history.record({ ...
|
|
609
|
+
history.record({ ...chunk73S5EOD3_js.cloneHistorySnapshot(before), actionLabel: label }, label);
|
|
610
610
|
}
|
|
611
611
|
var POLL_INTERVAL_MS = 16;
|
|
612
612
|
function usePointerReleaseWakeup(hasActivePointerInteraction) {
|
|
@@ -688,8 +688,8 @@ function useEditorHistory(input) {
|
|
|
688
688
|
width: canvasSize.width,
|
|
689
689
|
height: canvasSize.height,
|
|
690
690
|
activeSlideIndex,
|
|
691
|
-
slides: slides.map(
|
|
692
|
-
templateElementsBySlideId:
|
|
691
|
+
slides: slides.map(chunk73S5EOD3_js.cloneSlide),
|
|
692
|
+
templateElementsBySlideId: chunk73S5EOD3_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
|
|
693
693
|
...recordedTheme ? { theme: recordedTheme } : {},
|
|
694
694
|
...actionLabel ? { actionLabel } : {}
|
|
695
695
|
};
|
|
@@ -703,9 +703,9 @@ function useEditorHistory(input) {
|
|
|
703
703
|
width: snapshot.width,
|
|
704
704
|
height: snapshot.height
|
|
705
705
|
});
|
|
706
|
-
setSlides(snapshot.slides.map(
|
|
706
|
+
setSlides(snapshot.slides.map(chunk73S5EOD3_js.cloneSlide));
|
|
707
707
|
setTemplateElementsBySlideId(
|
|
708
|
-
|
|
708
|
+
chunk73S5EOD3_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
|
|
709
709
|
);
|
|
710
710
|
setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
|
|
711
711
|
setSelectedElementIds([]);
|
|
@@ -771,8 +771,8 @@ function useEditorHistory(input) {
|
|
|
771
771
|
return;
|
|
772
772
|
}
|
|
773
773
|
isApplyingHistoryRef.current = true;
|
|
774
|
-
const nextSnapshot =
|
|
775
|
-
lastHistorySnapshotRef.current =
|
|
774
|
+
const nextSnapshot = chunk73S5EOD3_js.cloneHistorySnapshot(result.snapshot);
|
|
775
|
+
lastHistorySnapshotRef.current = chunk73S5EOD3_js.cloneHistorySnapshot(nextSnapshot);
|
|
776
776
|
lastHistorySerializedRef.current = serializeHistoryDocument(nextSnapshot);
|
|
777
777
|
applyHistorySnapshot(nextSnapshot);
|
|
778
778
|
restoreTheme(currentSnapshot, nextSnapshot);
|
|
@@ -796,8 +796,8 @@ function useEditorHistory(input) {
|
|
|
796
796
|
return;
|
|
797
797
|
}
|
|
798
798
|
isApplyingHistoryRef.current = true;
|
|
799
|
-
const targetSnapshot =
|
|
800
|
-
lastHistorySnapshotRef.current =
|
|
799
|
+
const targetSnapshot = chunk73S5EOD3_js.cloneHistorySnapshot(result.snapshot);
|
|
800
|
+
lastHistorySnapshotRef.current = chunk73S5EOD3_js.cloneHistorySnapshot(targetSnapshot);
|
|
801
801
|
lastHistorySerializedRef.current = serializeHistoryDocument(targetSnapshot);
|
|
802
802
|
applyHistorySnapshot(targetSnapshot);
|
|
803
803
|
restoreTheme(currentSnapshot, targetSnapshot);
|
|
@@ -815,7 +815,7 @@ function useEditorHistory(input) {
|
|
|
815
815
|
(initialSnapshot) => {
|
|
816
816
|
history.clear();
|
|
817
817
|
if (initialSnapshot) {
|
|
818
|
-
const clonedInitial =
|
|
818
|
+
const clonedInitial = chunk73S5EOD3_js.cloneHistorySnapshot(initialSnapshot);
|
|
819
819
|
lastHistorySnapshotRef.current = clonedInitial;
|
|
820
820
|
lastHistorySerializedRef.current = serializeHistoryDocument(clonedInitial);
|
|
821
821
|
} else {
|
|
@@ -889,16 +889,16 @@ function useEditorHistory(input) {
|
|
|
889
889
|
slides
|
|
890
890
|
]);
|
|
891
891
|
const commitSlides = (nextSlides, label, beforeSlides = slides, nextSlideMasters) => {
|
|
892
|
-
const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(
|
|
892
|
+
const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(chunk73S5EOD3_js.cloneSlide) };
|
|
893
893
|
const { theme: beforeTheme, ...unthemed } = before;
|
|
894
894
|
const afterTheme = nextSlideMasters ? pptx.historyTheme(theme, nextSlideMasters) : beforeTheme;
|
|
895
895
|
const after = {
|
|
896
896
|
...unthemed,
|
|
897
|
-
slides: nextSlides.map(
|
|
897
|
+
slides: nextSlides.map(chunk73S5EOD3_js.cloneSlide),
|
|
898
898
|
...afterTheme ? { theme: afterTheme } : {}
|
|
899
899
|
};
|
|
900
900
|
recordExplicitSlideUpdate(history, lastHistorySnapshotRef.current, before, label);
|
|
901
|
-
lastHistorySnapshotRef.current =
|
|
901
|
+
lastHistorySnapshotRef.current = chunk73S5EOD3_js.cloneHistorySnapshot(after);
|
|
902
902
|
lastHistorySerializedRef.current = serializeHistoryDocument(after);
|
|
903
903
|
isApplyingHistoryRef.current = false;
|
|
904
904
|
setSlides(nextSlides);
|
|
@@ -1092,22 +1092,22 @@ function useZoomViewport({
|
|
|
1092
1092
|
selectedElements.forEach((element) => {
|
|
1093
1093
|
minX = Math.min(minX, element.x);
|
|
1094
1094
|
minY = Math.min(minY, element.y);
|
|
1095
|
-
maxX = Math.max(maxX, element.x + Math.max(element.width,
|
|
1096
|
-
maxY = Math.max(maxY, element.y + Math.max(element.height,
|
|
1095
|
+
maxX = Math.max(maxX, element.x + Math.max(element.width, chunk73S5EOD3_js.MIN_ELEMENT_SIZE));
|
|
1096
|
+
maxY = Math.max(maxY, element.y + Math.max(element.height, chunk73S5EOD3_js.MIN_ELEMENT_SIZE));
|
|
1097
1097
|
});
|
|
1098
1098
|
if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
|
|
1099
1099
|
return;
|
|
1100
1100
|
}
|
|
1101
1101
|
const selectionBounds = { minX, minY, maxX, maxY };
|
|
1102
|
-
const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX,
|
|
1103
|
-
const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY,
|
|
1102
|
+
const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk73S5EOD3_js.MIN_ELEMENT_SIZE);
|
|
1103
|
+
const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk73S5EOD3_js.MIN_ELEMENT_SIZE);
|
|
1104
1104
|
const availableWidth = Math.max(
|
|
1105
|
-
effectiveEditorDimensions.width -
|
|
1106
|
-
|
|
1105
|
+
effectiveEditorDimensions.width - chunk73S5EOD3_js.ZOOM_TO_SELECTION_PADDING,
|
|
1106
|
+
chunk73S5EOD3_js.MIN_ELEMENT_SIZE
|
|
1107
1107
|
);
|
|
1108
1108
|
const availableHeight = Math.max(
|
|
1109
|
-
effectiveEditorDimensions.height -
|
|
1110
|
-
|
|
1109
|
+
effectiveEditorDimensions.height - chunk73S5EOD3_js.ZOOM_TO_SELECTION_PADDING,
|
|
1110
|
+
chunk73S5EOD3_js.MIN_ELEMENT_SIZE
|
|
1111
1111
|
);
|
|
1112
1112
|
const targetEditorScale = Math.min(
|
|
1113
1113
|
availableWidth / boundsWidth,
|
|
@@ -4026,8 +4026,8 @@ function useViewerCoreState(_input) {
|
|
|
4026
4026
|
const { slides, setSlides, slidesRef } = useSlideState();
|
|
4027
4027
|
const [templateElementsBySlideId, setTemplateElementsBySlideId] = React17.useState({});
|
|
4028
4028
|
const [canvasSize, setCanvasSize] = React17.useState({
|
|
4029
|
-
width:
|
|
4030
|
-
height:
|
|
4029
|
+
width: chunk73S5EOD3_js.DEFAULT_CANVAS_WIDTH,
|
|
4030
|
+
height: chunk73S5EOD3_js.DEFAULT_CANVAS_HEIGHT
|
|
4031
4031
|
});
|
|
4032
4032
|
const [slideSizeEmu, setSlideSizeEmu] = React17.useState();
|
|
4033
4033
|
const [activeSlideIndex, setActiveSlideIndex] = React17.useState(0);
|
|
@@ -4419,7 +4419,7 @@ function useLoadContent({
|
|
|
4419
4419
|
initialSlideRef.current = initialSlide;
|
|
4420
4420
|
const limitsRef = React17.useRef(limits);
|
|
4421
4421
|
limitsRef.current = limits;
|
|
4422
|
-
const { t } =
|
|
4422
|
+
const { t } = chunk73S5EOD3_js.useTranslation();
|
|
4423
4423
|
const translateRef = React17.useRef(t);
|
|
4424
4424
|
translateRef.current = t;
|
|
4425
4425
|
const originalBufferRef = React17.useRef(null);
|
|
@@ -4519,12 +4519,12 @@ function useLoadContent({
|
|
|
4519
4519
|
}
|
|
4520
4520
|
resources.commit();
|
|
4521
4521
|
handlerRef.current = handler;
|
|
4522
|
-
const partition =
|
|
4522
|
+
const partition = chunk73S5EOD3_js.partitionTemplateElements(nextSlides);
|
|
4523
4523
|
setSlides(partition.slides);
|
|
4524
4524
|
setTemplateElementsBySlideId(partition.templateElementsBySlideId);
|
|
4525
4525
|
setCanvasSize({
|
|
4526
|
-
width: parsed.width ??
|
|
4527
|
-
height: parsed.height ??
|
|
4526
|
+
width: parsed.width ?? chunk73S5EOD3_js.DEFAULT_CANVAS_WIDTH,
|
|
4527
|
+
height: parsed.height ?? chunk73S5EOD3_js.DEFAULT_CANVAS_HEIGHT
|
|
4528
4528
|
});
|
|
4529
4529
|
setSlideSizeEmu(
|
|
4530
4530
|
typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
|
|
@@ -4940,7 +4940,7 @@ function useElementOperations(input) {
|
|
|
4940
4940
|
);
|
|
4941
4941
|
return;
|
|
4942
4942
|
}
|
|
4943
|
-
if (
|
|
4943
|
+
if (chunk73S5EOD3_js.isTemplateElementId(elementId)) {
|
|
4944
4944
|
const slideId = activeSlide?.id;
|
|
4945
4945
|
if (slideId) {
|
|
4946
4946
|
setTemplateElementsBySlideId((prev) => ({
|
|
@@ -5227,8 +5227,8 @@ function createCanvasGestures(getInput, frames = animationFrames) {
|
|
|
5227
5227
|
}
|
|
5228
5228
|
function paintResize(resize, transform) {
|
|
5229
5229
|
const { x, y } = transform;
|
|
5230
|
-
const width = Math.max(transform.width,
|
|
5231
|
-
const height = Math.max(transform.height,
|
|
5230
|
+
const width = Math.max(transform.width, chunk73S5EOD3_js.MIN_ELEMENT_SIZE);
|
|
5231
|
+
const height = Math.max(transform.height, chunk73S5EOD3_js.MIN_ELEMENT_SIZE);
|
|
5232
5232
|
resize.lastX = x;
|
|
5233
5233
|
resize.lastY = y;
|
|
5234
5234
|
resize.lastWidth = transform.width;
|
|
@@ -5285,7 +5285,7 @@ function createCanvasGestures(getInput, frames = animationFrames) {
|
|
|
5285
5285
|
getGridSize: () => getInput().gridSpacingPx,
|
|
5286
5286
|
getSnapToShape: () => getInput().snapToShape,
|
|
5287
5287
|
getGuides: () => getInput().guides.map(({ axis, position }) => ({ axis, position })),
|
|
5288
|
-
getMinSize: () =>
|
|
5288
|
+
getMinSize: () => chunk73S5EOD3_js.MIN_ELEMENT_SIZE,
|
|
5289
5289
|
getSnapExcludeIds: () => armed?.kind === "move" ? Object.keys(armed.drag.startPositionsById) : [],
|
|
5290
5290
|
getStageOrigin: () => {
|
|
5291
5291
|
const rect = getInput().canvasStageRef.current?.getBoundingClientRect();
|
|
@@ -5366,7 +5366,7 @@ function commitMove(input, drag) {
|
|
|
5366
5366
|
const start = drag.startPositionsById[el.id];
|
|
5367
5367
|
return start ? { ...el, x: start.x + dx, y: start.y + dy } : el;
|
|
5368
5368
|
});
|
|
5369
|
-
return
|
|
5369
|
+
return chunk73S5EOD3_js.applyReroutedConnectors(moved, chunk73S5EOD3_js.rerouteConnectorsForMovedElements(moved, movedIds));
|
|
5370
5370
|
};
|
|
5371
5371
|
if (input.editTemplateMode) {
|
|
5372
5372
|
const slideId = input.activeSlide?.id;
|
|
@@ -5397,8 +5397,8 @@ function commitResize(input, resize) {
|
|
|
5397
5397
|
if (i !== input.activeSlideIndex) {
|
|
5398
5398
|
return s;
|
|
5399
5399
|
}
|
|
5400
|
-
const rerouted =
|
|
5401
|
-
return rerouted.length === 0 ? s : { ...s, elements:
|
|
5400
|
+
const rerouted = chunk73S5EOD3_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
|
|
5401
|
+
return rerouted.length === 0 ? s : { ...s, elements: chunk73S5EOD3_js.applyReroutedConnectors(s.elements, rerouted) };
|
|
5402
5402
|
})
|
|
5403
5403
|
);
|
|
5404
5404
|
}
|
|
@@ -6233,7 +6233,7 @@ function createStructuredElementHandlers(deps) {
|
|
|
6233
6233
|
return;
|
|
6234
6234
|
}
|
|
6235
6235
|
const resolved = resolveHyperlinkEditResult(data);
|
|
6236
|
-
if (resolved.url && !
|
|
6236
|
+
if (resolved.url && !chunk73S5EOD3_js.isUrlSafe(resolved.url)) {
|
|
6237
6237
|
return;
|
|
6238
6238
|
}
|
|
6239
6239
|
const actionClick = {
|
|
@@ -6279,7 +6279,7 @@ function createStructuredElementHandlers(deps) {
|
|
|
6279
6279
|
if (!activeSlide) {
|
|
6280
6280
|
return;
|
|
6281
6281
|
}
|
|
6282
|
-
const preset =
|
|
6282
|
+
const preset = chunk73S5EOD3_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
|
|
6283
6283
|
if (!preset) {
|
|
6284
6284
|
return;
|
|
6285
6285
|
}
|
|
@@ -6366,7 +6366,7 @@ function useInsertElements(input) {
|
|
|
6366
6366
|
width: 300,
|
|
6367
6367
|
height: 60,
|
|
6368
6368
|
text: "",
|
|
6369
|
-
textStyle: { fontSize:
|
|
6369
|
+
textStyle: { fontSize: chunk73S5EOD3_js.DEFAULT_TEXT_FONT_SIZE }
|
|
6370
6370
|
});
|
|
6371
6371
|
};
|
|
6372
6372
|
const handleAddShape = () => {
|
|
@@ -6388,7 +6388,7 @@ function useInsertElements(input) {
|
|
|
6388
6388
|
}
|
|
6389
6389
|
});
|
|
6390
6390
|
};
|
|
6391
|
-
const handleAddTable = (rows =
|
|
6391
|
+
const handleAddTable = (rows = chunk73S5EOD3_js.DEFAULT_TABLE_ROWS, columns = chunk73S5EOD3_js.DEFAULT_TABLE_COLUMNS) => {
|
|
6392
6392
|
if (!activeSlide) {
|
|
6393
6393
|
return;
|
|
6394
6394
|
}
|
|
@@ -6562,7 +6562,7 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
6562
6562
|
history
|
|
6563
6563
|
} = input;
|
|
6564
6564
|
const updateElementsOwning = (elementId, updater) => {
|
|
6565
|
-
if (editTemplateMode && !
|
|
6565
|
+
if (editTemplateMode && !chunk73S5EOD3_js.isTemplateElementId(elementId)) {
|
|
6566
6566
|
ops.updateSlides(
|
|
6567
6567
|
(prev) => prev.map(
|
|
6568
6568
|
(slide, index) => index === activeSlideIndex ? { ...slide, elements: updater(slide.elements) } : slide
|
|
@@ -6596,9 +6596,9 @@ function useGroupAlignLayerHandlers(input) {
|
|
|
6596
6596
|
return;
|
|
6597
6597
|
}
|
|
6598
6598
|
const group = selectedElement;
|
|
6599
|
-
const intoTemplate =
|
|
6599
|
+
const intoTemplate = chunk73S5EOD3_js.isTemplateElementId(group.id);
|
|
6600
6600
|
const childIds = group.children.map(
|
|
6601
|
-
(child) => intoTemplate ?
|
|
6601
|
+
(child) => intoTemplate ? chunk73S5EOD3_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
|
|
6602
6602
|
);
|
|
6603
6603
|
const { elements, childIds: usedIds } = pptx.ungroupElements(
|
|
6604
6604
|
ops.activeElements,
|
|
@@ -7034,7 +7034,7 @@ function createTableMergeHandlers(input) {
|
|
|
7034
7034
|
if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
|
|
7035
7035
|
return;
|
|
7036
7036
|
}
|
|
7037
|
-
const newTableData =
|
|
7037
|
+
const newTableData = chunk73S5EOD3_js.mergeCells(
|
|
7038
7038
|
[
|
|
7039
7039
|
{ row: rowIndex, col: columnIndex },
|
|
7040
7040
|
{ row: rowIndex, col: nextColIdx }
|
|
@@ -7042,7 +7042,7 @@ function createTableMergeHandlers(input) {
|
|
|
7042
7042
|
td
|
|
7043
7043
|
);
|
|
7044
7044
|
const updates = { tableData: newTableData };
|
|
7045
|
-
const newRawXml =
|
|
7045
|
+
const newRawXml = chunk73S5EOD3_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
|
|
7046
7046
|
if (newRawXml) {
|
|
7047
7047
|
updates.rawXml = newRawXml;
|
|
7048
7048
|
}
|
|
@@ -7068,7 +7068,7 @@ function createTableMergeHandlers(input) {
|
|
|
7068
7068
|
if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
|
|
7069
7069
|
return;
|
|
7070
7070
|
}
|
|
7071
|
-
const newTableData =
|
|
7071
|
+
const newTableData = chunk73S5EOD3_js.mergeCells(
|
|
7072
7072
|
[
|
|
7073
7073
|
{ row: rowIndex, col: columnIndex },
|
|
7074
7074
|
{ row: targetNextRowIdx, col: columnIndex }
|
|
@@ -7076,7 +7076,7 @@ function createTableMergeHandlers(input) {
|
|
|
7076
7076
|
td
|
|
7077
7077
|
);
|
|
7078
7078
|
const updates = { tableData: newTableData };
|
|
7079
|
-
const newRawXml =
|
|
7079
|
+
const newRawXml = chunk73S5EOD3_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
|
|
7080
7080
|
if (newRawXml) {
|
|
7081
7081
|
updates.rawXml = newRawXml;
|
|
7082
7082
|
}
|
|
@@ -7091,9 +7091,9 @@ function createTableMergeHandlers(input) {
|
|
|
7091
7091
|
return;
|
|
7092
7092
|
}
|
|
7093
7093
|
const td = selectedElement.tableData;
|
|
7094
|
-
const newTableData =
|
|
7094
|
+
const newTableData = chunk73S5EOD3_js.mergeCells(ts.selectedCells, td);
|
|
7095
7095
|
const updates = { tableData: newTableData };
|
|
7096
|
-
const newRawXml =
|
|
7096
|
+
const newRawXml = chunk73S5EOD3_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
|
|
7097
7097
|
if (newRawXml) {
|
|
7098
7098
|
updates.rawXml = newRawXml;
|
|
7099
7099
|
}
|
|
@@ -7110,9 +7110,9 @@ function createTableMergeHandlers(input) {
|
|
|
7110
7110
|
}
|
|
7111
7111
|
const { rowIndex, columnIndex } = ts;
|
|
7112
7112
|
const td = selectedElement.tableData;
|
|
7113
|
-
const newTableData =
|
|
7113
|
+
const newTableData = chunk73S5EOD3_js.splitCell(rowIndex, columnIndex, td);
|
|
7114
7114
|
const updates = { tableData: newTableData };
|
|
7115
|
-
const newRawXml =
|
|
7115
|
+
const newRawXml = chunk73S5EOD3_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
|
|
7116
7116
|
if (newRawXml) {
|
|
7117
7117
|
updates.rawXml = newRawXml;
|
|
7118
7118
|
}
|
|
@@ -7147,7 +7147,7 @@ function createTableStructHandlers(input) {
|
|
|
7147
7147
|
updates.tableData = pptx.setCellText(el, rowIndex, colIndex, text).tableData;
|
|
7148
7148
|
}
|
|
7149
7149
|
if (el.rawXml) {
|
|
7150
|
-
const newRawXml =
|
|
7150
|
+
const newRawXml = chunk73S5EOD3_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
|
|
7151
7151
|
if (newRawXml) {
|
|
7152
7152
|
updates.rawXml = newRawXml;
|
|
7153
7153
|
}
|
|
@@ -7171,7 +7171,7 @@ function createTableStructHandlers(input) {
|
|
|
7171
7171
|
const { rowIndex, columnIndex: colIndex } = ts;
|
|
7172
7172
|
const updates = {};
|
|
7173
7173
|
if (selectedElement.rawXml) {
|
|
7174
|
-
const newRawXml =
|
|
7174
|
+
const newRawXml = chunk73S5EOD3_js.updateCellTextStyleInRawXml(
|
|
7175
7175
|
selectedElement,
|
|
7176
7176
|
rowIndex,
|
|
7177
7177
|
colIndex,
|
|
@@ -7349,7 +7349,7 @@ function useExportSaveAs(input) {
|
|
|
7349
7349
|
const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
|
|
7350
7350
|
const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
|
|
7351
7351
|
const data = {
|
|
7352
|
-
slides:
|
|
7352
|
+
slides: chunk73S5EOD3_js.buildSaveSlides(slides, templateElementsBySlideId),
|
|
7353
7353
|
width: canvasSize.width,
|
|
7354
7354
|
height: canvasSize.height,
|
|
7355
7355
|
widthEmu: slideSize.widthEmu,
|
|
@@ -7512,7 +7512,7 @@ async function captureSlidesAsPngDataUrls(slideStageRef, slideIndices, setActive
|
|
|
7512
7512
|
}
|
|
7513
7513
|
function tilesToPdfPage(tilesResult) {
|
|
7514
7514
|
return tilesResult.tiles.map((tile) => ({
|
|
7515
|
-
image:
|
|
7515
|
+
image: chunk73S5EOD3_js.canvasToJpegData(tile.canvas),
|
|
7516
7516
|
placement: pptx.placeTileOnPage(
|
|
7517
7517
|
tile,
|
|
7518
7518
|
tilesResult.fullWidth,
|
|
@@ -7545,7 +7545,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
|
|
|
7545
7545
|
if (pages.length === 0) {
|
|
7546
7546
|
throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
|
|
7547
7547
|
}
|
|
7548
|
-
const pdfBlobUrl =
|
|
7548
|
+
const pdfBlobUrl = chunk73S5EOD3_js.buildPdfFromTiledImageData(pages);
|
|
7549
7549
|
pptx.downloadDataUrl(pdfBlobUrl, filename);
|
|
7550
7550
|
}
|
|
7551
7551
|
async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
|
|
@@ -7575,7 +7575,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
|
|
|
7575
7575
|
if (pages.length === 0) {
|
|
7576
7576
|
throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
|
|
7577
7577
|
}
|
|
7578
|
-
const pdfDataUrl =
|
|
7578
|
+
const pdfDataUrl = chunk73S5EOD3_js.buildNotesPdf(pages);
|
|
7579
7579
|
pptx.downloadDataUrl(pdfDataUrl, filename);
|
|
7580
7580
|
}
|
|
7581
7581
|
async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
|
|
@@ -8153,13 +8153,13 @@ function usePrintHandlers(input) {
|
|
|
8153
8153
|
const { slides, activeSlideIndex, canvasStageRef, setActiveSlideIndex, canvasSize } = input;
|
|
8154
8154
|
const handoutMaster = input.handoutMaster ?? input.pptxData?.handoutMaster;
|
|
8155
8155
|
const [isPrintDialogOpen, setIsPrintDialogOpen] = React17.useState(false);
|
|
8156
|
-
const { t } =
|
|
8156
|
+
const { t } = chunk73S5EOD3_js.useTranslation();
|
|
8157
8157
|
const viewerOptions = useViewerOptionsContext();
|
|
8158
8158
|
const printRasterScale = (viewerOptions.advanced.printHighQuality ? 4 : 3) * pptx.resolveImageResolutionScale(viewerOptions);
|
|
8159
8159
|
const handlePrint = () => {
|
|
8160
8160
|
setIsPrintDialogOpen(true);
|
|
8161
8161
|
};
|
|
8162
|
-
const deckSlides = () => input.templateElementsBySlideId ?
|
|
8162
|
+
const deckSlides = () => input.templateElementsBySlideId ? chunk73S5EOD3_js.buildSaveSlides(slides, input.templateElementsBySlideId) : slides;
|
|
8163
8163
|
const plan = (settings, deck) => pptx.planPrintJob(settings, {
|
|
8164
8164
|
slides: deck,
|
|
8165
8165
|
activeSlideIndex,
|
|
@@ -8574,7 +8574,7 @@ function usePropertyHandlers(input) {
|
|
|
8574
8574
|
width: canvasSize.width,
|
|
8575
8575
|
height: canvasSize.height
|
|
8576
8576
|
};
|
|
8577
|
-
setCompareResult(
|
|
8577
|
+
setCompareResult(chunk73S5EOD3_js.comparePresentation(cur, other));
|
|
8578
8578
|
setIsComparePanelOpen(true);
|
|
8579
8579
|
} catch (err) {
|
|
8580
8580
|
console.warn("Compare failed:", err);
|
|
@@ -8627,7 +8627,7 @@ function usePropertyHandlers(input) {
|
|
|
8627
8627
|
};
|
|
8628
8628
|
}
|
|
8629
8629
|
function useDialogCustomShows(input) {
|
|
8630
|
-
const { t } =
|
|
8630
|
+
const { t } = chunk73S5EOD3_js.useTranslation();
|
|
8631
8631
|
const {
|
|
8632
8632
|
activeSlide,
|
|
8633
8633
|
customShows,
|
|
@@ -8952,7 +8952,7 @@ function useViewerDialogs(input) {
|
|
|
8952
8952
|
};
|
|
8953
8953
|
}
|
|
8954
8954
|
function computeGridSpacingPx(documentGridSpacing) {
|
|
8955
|
-
return pptx.computeGridSpacingPx(documentGridSpacing,
|
|
8955
|
+
return pptx.computeGridSpacingPx(documentGridSpacing, chunk73S5EOD3_js.GRID_SIZE);
|
|
8956
8956
|
}
|
|
8957
8957
|
function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
|
|
8958
8958
|
const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
|
|
@@ -8961,7 +8961,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
|
|
|
8961
8961
|
}
|
|
8962
8962
|
function computeSlideSectionGroups(slides, sections) {
|
|
8963
8963
|
return pptx.groupSlidesBySection(sections, slides).map((group) => ({
|
|
8964
|
-
id: group.section?.id ?? (sections.length > 0 ?
|
|
8964
|
+
id: group.section?.id ?? (sections.length > 0 ? chunk73S5EOD3_js.UNGROUPED_SECTION_ID : chunk73S5EOD3_js.DEFAULT_SECTION_GROUP_ID),
|
|
8965
8965
|
label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
|
|
8966
8966
|
slideIndexes: group.slideIndexes,
|
|
8967
8967
|
...group.section?.color !== void 0 ? { color: group.section.color } : {},
|
|
@@ -8980,7 +8980,7 @@ function computeMasterPseudoSlide(mode, activeLayout, activeMaster) {
|
|
|
8980
8980
|
});
|
|
8981
8981
|
}
|
|
8982
8982
|
function useDerivedSlideState(input) {
|
|
8983
|
-
const { t } =
|
|
8983
|
+
const { t } = chunk73S5EOD3_js.useTranslation();
|
|
8984
8984
|
const {
|
|
8985
8985
|
slides,
|
|
8986
8986
|
sections,
|
|
@@ -9006,10 +9006,10 @@ function useDerivedSlideState(input) {
|
|
|
9006
9006
|
);
|
|
9007
9007
|
const slideSectionGroups = React17.useMemo(
|
|
9008
9008
|
() => computeSlideSectionGroups(slides, sections).map((group) => {
|
|
9009
|
-
if (group.id ===
|
|
9009
|
+
if (group.id === chunk73S5EOD3_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
|
|
9010
9010
|
return { ...group, label: t("pptx.slides.ungroupedSlides") };
|
|
9011
9011
|
}
|
|
9012
|
-
if (group.id ===
|
|
9012
|
+
if (group.id === chunk73S5EOD3_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
|
|
9013
9013
|
return { ...group, label: t("pptx.sections.slides") };
|
|
9014
9014
|
}
|
|
9015
9015
|
return group;
|
|
@@ -9116,7 +9116,7 @@ function useAnnotationHandlers(input) {
|
|
|
9116
9116
|
if (nextMode === "present") {
|
|
9117
9117
|
presentation.enterPresentMode();
|
|
9118
9118
|
} else if (mode === "present" && annotations.hasAnyAnnotations) {
|
|
9119
|
-
|
|
9119
|
+
chunk73S5EOD3_js.stopAllPersistentAudio();
|
|
9120
9120
|
if (promptKeepInkAnnotations) {
|
|
9121
9121
|
pendingModeAfterAnnotationsRef.current = nextMode;
|
|
9122
9122
|
setShowKeepAnnotationsDialog(true);
|
|
@@ -9126,7 +9126,7 @@ function useAnnotationHandlers(input) {
|
|
|
9126
9126
|
}
|
|
9127
9127
|
} else {
|
|
9128
9128
|
if (mode === "present") {
|
|
9129
|
-
|
|
9129
|
+
chunk73S5EOD3_js.stopAllPersistentAudio();
|
|
9130
9130
|
}
|
|
9131
9131
|
setMode(nextMode);
|
|
9132
9132
|
}
|
|
@@ -9294,7 +9294,7 @@ function useSerialize(input) {
|
|
|
9294
9294
|
guides: pptxGuides.length > 0 ? pptxGuides : void 0
|
|
9295
9295
|
};
|
|
9296
9296
|
});
|
|
9297
|
-
const slidesToSave =
|
|
9297
|
+
const slidesToSave = chunk73S5EOD3_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
|
|
9298
9298
|
const saveOptions = pptx.buildDeckSaveOptions({
|
|
9299
9299
|
// Without this the Slide Size card edited a viewer-only pixel value and
|
|
9300
9300
|
// the saved `p:sldSz` never moved: passing `slideSize` is the only way a
|
|
@@ -9439,7 +9439,7 @@ function usePresentationSetup(input) {
|
|
|
9439
9439
|
return;
|
|
9440
9440
|
}
|
|
9441
9441
|
if (mode === "present" && nextMode !== "present") {
|
|
9442
|
-
|
|
9442
|
+
chunk73S5EOD3_js.stopAllPersistentAudio();
|
|
9443
9443
|
stopAnimationSound();
|
|
9444
9444
|
const exitHandler = exitModeHandlerRef.current;
|
|
9445
9445
|
if (exitHandler) {
|
|
@@ -9560,7 +9560,7 @@ function useCanvasImagePaste(input) {
|
|
|
9560
9560
|
);
|
|
9561
9561
|
}
|
|
9562
9562
|
function formatPatchFor(element, format) {
|
|
9563
|
-
const updated =
|
|
9563
|
+
const updated = chunk73S5EOD3_js.applyFormatToElement(element, format);
|
|
9564
9564
|
const updates = {};
|
|
9565
9565
|
if (pptx$1.hasShapeProperties(updated)) {
|
|
9566
9566
|
updates.shapeStyle = updated.shapeStyle;
|
|
@@ -9583,7 +9583,7 @@ function useFormatPainterEditing(input) {
|
|
|
9583
9583
|
const prevFormatPainterRef = React17.useRef(false);
|
|
9584
9584
|
React17.useEffect(() => {
|
|
9585
9585
|
if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
|
|
9586
|
-
copiedFormatRef.current =
|
|
9586
|
+
copiedFormatRef.current = chunk73S5EOD3_js.copyFormatFromElement(selectedElement);
|
|
9587
9587
|
} else if (!formatPainterActive) {
|
|
9588
9588
|
copiedFormatRef.current = null;
|
|
9589
9589
|
}
|
|
@@ -10121,24 +10121,6 @@ var SYMBOL_FONT_FAMILIES = [
|
|
|
10121
10121
|
"Webdings"
|
|
10122
10122
|
];
|
|
10123
10123
|
var FONT_NAME_UNSAFE_CHARS = /["\\\n\r;}<>]/u;
|
|
10124
|
-
var FONT_FORMAT_ALLOWED = /* @__PURE__ */ new Set([
|
|
10125
|
-
"truetype",
|
|
10126
|
-
"opentype",
|
|
10127
|
-
"woff",
|
|
10128
|
-
"woff2",
|
|
10129
|
-
"svg",
|
|
10130
|
-
"embedded-opentype"
|
|
10131
|
-
]);
|
|
10132
|
-
var FONT_DATA_URL_PATTERN = /^data:font\/[a-z0-9+.-]+(?:;charset=[a-z0-9-]+)?;base64,[A-Za-z0-9+/=]+$/iu;
|
|
10133
|
-
function isFontDataUrlSafe(url) {
|
|
10134
|
-
if (typeof url !== "string" || url.length === 0) {
|
|
10135
|
-
return false;
|
|
10136
|
-
}
|
|
10137
|
-
if (url.startsWith("blob:")) {
|
|
10138
|
-
return true;
|
|
10139
|
-
}
|
|
10140
|
-
return FONT_DATA_URL_PATTERN.test(url);
|
|
10141
|
-
}
|
|
10142
10124
|
function useFontInjection({
|
|
10143
10125
|
embeddedFonts,
|
|
10144
10126
|
slides,
|
|
@@ -10149,39 +10131,9 @@ function useFontInjection({
|
|
|
10149
10131
|
if (!embeddedFonts.length) {
|
|
10150
10132
|
return;
|
|
10151
10133
|
}
|
|
10152
|
-
const
|
|
10153
|
-
|
|
10154
|
-
|
|
10155
|
-
if (typeof font.name !== "string" || font.name.length === 0 || FONT_NAME_UNSAFE_CHARS.test(font.name)) {
|
|
10156
|
-
return [];
|
|
10157
|
-
}
|
|
10158
|
-
if (!isFontDataUrlSafe(font.dataUrl)) {
|
|
10159
|
-
return [];
|
|
10160
|
-
}
|
|
10161
|
-
const fontFormat = font.format ?? "truetype";
|
|
10162
|
-
if (!FONT_FORMAT_ALLOWED.has(fontFormat)) {
|
|
10163
|
-
return [];
|
|
10164
|
-
}
|
|
10165
|
-
const fontWeight = String(pptx.resolveFontWeight(font.name, font.bold));
|
|
10166
|
-
const fontStyleCss = pptx.resolveFontItalic(font.name, font.italic) ? "italic" : "normal";
|
|
10167
|
-
return [
|
|
10168
|
-
`@font-face {
|
|
10169
|
-
font-family: "${font.name}";
|
|
10170
|
-
src: url("${font.dataUrl}") format("${fontFormat}");
|
|
10171
|
-
font-weight: ${fontWeight};
|
|
10172
|
-
font-style: ${fontStyleCss};
|
|
10173
|
-
font-display: swap;
|
|
10174
|
-
}`
|
|
10175
|
-
];
|
|
10176
|
-
}).join("\n");
|
|
10177
|
-
styleEl.textContent = cssRules;
|
|
10178
|
-
document.head.appendChild(styleEl);
|
|
10179
|
-
return () => {
|
|
10180
|
-
const existing = document.getElementById(EMBEDDED_FONTS_STYLE_ID);
|
|
10181
|
-
if (existing) {
|
|
10182
|
-
document.head.removeChild(existing);
|
|
10183
|
-
}
|
|
10184
|
-
};
|
|
10134
|
+
const sheet = pptx.createEmbeddedFontsSheet(document, EMBEDDED_FONTS_STYLE_ID);
|
|
10135
|
+
sheet.set(embeddedFonts);
|
|
10136
|
+
return () => sheet.dispose();
|
|
10185
10137
|
}, [embeddedFonts]);
|
|
10186
10138
|
const referencedFamilies = React17.useMemo(() => pptx.collectReferencedFontFamilies(slides), [slides]);
|
|
10187
10139
|
React17.useEffect(() => {
|
|
@@ -11220,7 +11172,7 @@ function useCollaborationWriteBack(input) {
|
|
|
11220
11172
|
getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
|
|
11221
11173
|
getSaveOptions: () => latest.current.getSaveOptions?.(),
|
|
11222
11174
|
getTemplateElements: () => latest.current.templateElementsBySlideId,
|
|
11223
|
-
mergeTemplateElements:
|
|
11175
|
+
mergeTemplateElements: chunk73S5EOD3_js.buildSaveSlides,
|
|
11224
11176
|
onWriteBackStatus: () => latest.current.onWriteBackStatus?.(
|
|
11225
11177
|
pptx.writeBackReport(latest.current.config, created.getState())
|
|
11226
11178
|
)
|
|
@@ -11777,8 +11729,8 @@ function useTouchGestures(input) {
|
|
|
11777
11729
|
}
|
|
11778
11730
|
const recognizer = pptx.createTouchGestureRecognizer({
|
|
11779
11731
|
getScale: () => scaleRef.current,
|
|
11780
|
-
minScale:
|
|
11781
|
-
maxScale:
|
|
11732
|
+
minScale: chunk73S5EOD3_js.MIN_ZOOM_SCALE,
|
|
11733
|
+
maxScale: chunk73S5EOD3_js.MAX_ZOOM_SCALE,
|
|
11782
11734
|
callbacks: {
|
|
11783
11735
|
onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
|
|
11784
11736
|
onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
|
|
@@ -11914,9 +11866,9 @@ function buildCanvasProps(input) {
|
|
|
11914
11866
|
}
|
|
11915
11867
|
};
|
|
11916
11868
|
const handleHyperlinkClick = (url, target) => {
|
|
11917
|
-
if (
|
|
11869
|
+
if (chunk73S5EOD3_js.isPpactionUrl(url)) {
|
|
11918
11870
|
if (mode === "present") {
|
|
11919
|
-
const parsed =
|
|
11871
|
+
const parsed = chunk73S5EOD3_js.parsePpactionUrl(url);
|
|
11920
11872
|
if (parsed) {
|
|
11921
11873
|
presentation.handlePresentationAction({
|
|
11922
11874
|
action: parsed.action,
|
|
@@ -12408,7 +12360,7 @@ function buildToolbarProps(input) {
|
|
|
12408
12360
|
markDirty: history.markDirty
|
|
12409
12361
|
}),
|
|
12410
12362
|
formatPainterActive: s.formatPainterActive,
|
|
12411
|
-
canActivateFormatPainter:
|
|
12363
|
+
canActivateFormatPainter: chunk73S5EOD3_js.hasCopyableFormat(selectedElement),
|
|
12412
12364
|
onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
|
|
12413
12365
|
isSelectionPaneOpen: s.isSelectionPaneOpen,
|
|
12414
12366
|
onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
|
|
@@ -13133,7 +13085,7 @@ function useViewerBuildingBlocks(input) {
|
|
|
13133
13085
|
} = input;
|
|
13134
13086
|
const collaborationConfig = pptx.resolveCollaborationConfig(input.collaboration);
|
|
13135
13087
|
const [collaborationReadOnly, setCollaborationReadOnly] = React17.useState(Boolean(collaborationConfig));
|
|
13136
|
-
const { t } =
|
|
13088
|
+
const { t } = chunk73S5EOD3_js.useTranslation();
|
|
13137
13089
|
const [content, setContent] = React17.useState(incomingContent ?? null);
|
|
13138
13090
|
const [loadOrigin, setLoadOrigin] = React17.useState("bootstrap");
|
|
13139
13091
|
React17.useEffect(() => {
|
|
@@ -13335,23 +13287,23 @@ function ColorChangedImage({
|
|
|
13335
13287
|
className,
|
|
13336
13288
|
alt
|
|
13337
13289
|
}) {
|
|
13338
|
-
const tolerance = tolerancePct ??
|
|
13339
|
-
const cacheKey =
|
|
13290
|
+
const tolerance = tolerancePct ?? chunk73S5EOD3_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
|
|
13291
|
+
const cacheKey = chunk73S5EOD3_js.buildCacheKey(
|
|
13340
13292
|
src,
|
|
13341
13293
|
clrChange.clrFrom,
|
|
13342
13294
|
clrChange.clrTo,
|
|
13343
13295
|
tolerance,
|
|
13344
13296
|
Boolean(clrChange.clrToTransparent)
|
|
13345
13297
|
);
|
|
13346
|
-
const cached =
|
|
13298
|
+
const cached = chunk73S5EOD3_js.getCachedResult(cacheKey);
|
|
13347
13299
|
const [processedSrc, setProcessedSrc] = React17.useState(cached ?? null);
|
|
13348
13300
|
React17.useEffect(() => {
|
|
13349
|
-
if (
|
|
13350
|
-
setProcessedSrc(
|
|
13301
|
+
if (chunk73S5EOD3_js.getCachedResult(cacheKey)) {
|
|
13302
|
+
setProcessedSrc(chunk73S5EOD3_js.getCachedResult(cacheKey) ?? null);
|
|
13351
13303
|
return;
|
|
13352
13304
|
}
|
|
13353
13305
|
let cancelled = false;
|
|
13354
|
-
|
|
13306
|
+
chunk73S5EOD3_js.applyColorChange(
|
|
13355
13307
|
src,
|
|
13356
13308
|
clrChange.clrFrom,
|
|
13357
13309
|
clrChange.clrTo,
|
|
@@ -13359,7 +13311,7 @@ function ColorChangedImage({
|
|
|
13359
13311
|
Boolean(clrChange.clrToTransparent)
|
|
13360
13312
|
).then((result) => {
|
|
13361
13313
|
if (!cancelled) {
|
|
13362
|
-
|
|
13314
|
+
chunk73S5EOD3_js.setCachedResult(cacheKey, result.dataUrl);
|
|
13363
13315
|
setProcessedSrc(result.dataUrl);
|
|
13364
13316
|
}
|
|
13365
13317
|
return void 0;
|
|
@@ -13451,7 +13403,7 @@ function TiledImageLayer({
|
|
|
13451
13403
|
cancelled = true;
|
|
13452
13404
|
};
|
|
13453
13405
|
}, [src]);
|
|
13454
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...
|
|
13406
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunk73S5EOD3_js.getImageTilingStyle(element, nativeSize), ...style } });
|
|
13455
13407
|
}
|
|
13456
13408
|
function renderImageEffectDefinitions(element, excludeDuotone = false) {
|
|
13457
13409
|
return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -13520,7 +13472,7 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13520
13472
|
...filter ? { filter } : {},
|
|
13521
13473
|
...opacity !== void 0 ? { opacity } : {}
|
|
13522
13474
|
};
|
|
13523
|
-
if (
|
|
13475
|
+
if (chunk73S5EOD3_js.isImageTiled(el)) {
|
|
13524
13476
|
const tileSrc = imgSrc(el);
|
|
13525
13477
|
if (!tileSrc) {
|
|
13526
13478
|
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" });
|
|
@@ -13542,9 +13494,9 @@ function renderImg(el, style, filter, alt, opacity) {
|
|
|
13542
13494
|
pptx$1.isImageLikeElement(el) ? el.imageEffects?.colorWash : void 0
|
|
13543
13495
|
);
|
|
13544
13496
|
const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
|
|
13545
|
-
const duotoneColors =
|
|
13497
|
+
const duotoneColors = chunk73S5EOD3_js.getDuotoneColors(el);
|
|
13546
13498
|
const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
|
|
13547
|
-
const filterForImg = useDuotoneCanvas ?
|
|
13499
|
+
const filterForImg = useDuotoneCanvas ? chunk73S5EOD3_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
|
|
13548
13500
|
const canvasEffectStyles = {
|
|
13549
13501
|
...filterForImg ? { filter: filterForImg } : {},
|
|
13550
13502
|
...opacity !== void 0 ? { opacity } : {}
|
|
@@ -13620,10 +13572,10 @@ function SlideBackgroundImageLayer({
|
|
|
13620
13572
|
style: { zIndex: 0 },
|
|
13621
13573
|
children: renderImg(
|
|
13622
13574
|
backgroundElement,
|
|
13623
|
-
|
|
13624
|
-
|
|
13575
|
+
chunk73S5EOD3_js.getImageRenderStyle(backgroundElement),
|
|
13576
|
+
chunk73S5EOD3_js.getImageEffectsFilter(backgroundElement),
|
|
13625
13577
|
"",
|
|
13626
|
-
|
|
13578
|
+
chunk73S5EOD3_js.getImageEffectsOpacity(backgroundElement)
|
|
13627
13579
|
)
|
|
13628
13580
|
}
|
|
13629
13581
|
);
|
|
@@ -13894,7 +13846,7 @@ function ChartElementView({
|
|
|
13894
13846
|
onUpdateElement,
|
|
13895
13847
|
animationState
|
|
13896
13848
|
}) {
|
|
13897
|
-
const { t } =
|
|
13849
|
+
const { t } = chunk73S5EOD3_js.useTranslation();
|
|
13898
13850
|
const wrapperRef = React17.useRef(null);
|
|
13899
13851
|
const { selection, setSelection } = useChartPartSelection();
|
|
13900
13852
|
const [titleDraft, setTitleDraft] = React17.useState(null);
|
|
@@ -13909,7 +13861,7 @@ function ChartElementView({
|
|
|
13909
13861
|
pptx.getBarFacePicturePixelSampleVersion
|
|
13910
13862
|
);
|
|
13911
13863
|
const viewModel = React17.useMemo(() => {
|
|
13912
|
-
return canEdit ?
|
|
13864
|
+
return canEdit ? chunk73S5EOD3_js.buildReactChartViewModel(element) : null;
|
|
13913
13865
|
}, [canEdit, element, barFacePictureSampleVersion]);
|
|
13914
13866
|
React17.useEffect(pptx.ensureChartInteractionStyles, []);
|
|
13915
13867
|
React17.useEffect(() => {
|
|
@@ -14014,9 +13966,9 @@ function ChartElementView({
|
|
|
14014
13966
|
textStyle: animationState?.textStyle,
|
|
14015
13967
|
onSelect: chart3D.onSelect,
|
|
14016
13968
|
onDrag: chart3D.onDrag,
|
|
14017
|
-
children:
|
|
13969
|
+
children: chunk73S5EOD3_js.renderChartElement(renderedElement, (key) => t(key))
|
|
14018
13970
|
}
|
|
14019
|
-
) :
|
|
13971
|
+
) : chunk73S5EOD3_js.renderChartElement(renderedElement, (key) => t(key)),
|
|
14020
13972
|
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) }),
|
|
14021
13973
|
titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
14022
13974
|
"input",
|
|
@@ -14044,7 +13996,7 @@ function ChartElementView({
|
|
|
14044
13996
|
);
|
|
14045
13997
|
}
|
|
14046
13998
|
function useActionAffordance(element, canInteract) {
|
|
14047
|
-
const { t } =
|
|
13999
|
+
const { t } = chunk73S5EOD3_js.useTranslation();
|
|
14048
14000
|
pptx.ensureActionAffordanceStyles();
|
|
14049
14001
|
return React17.useMemo(
|
|
14050
14002
|
() => pptx.resolveElementActionAffordance(element, {
|
|
@@ -14322,7 +14274,7 @@ function ResizeHandles({
|
|
|
14322
14274
|
nonRotationTransform,
|
|
14323
14275
|
onRotate
|
|
14324
14276
|
}) {
|
|
14325
|
-
const { t } =
|
|
14277
|
+
const { t } = chunk73S5EOD3_js.useTranslation();
|
|
14326
14278
|
const rotateRef = useRotateHandlePlacement(elementId, Boolean(onRotate));
|
|
14327
14279
|
const peStyle = forcePointerEvents ? { ...HANDLE_TOUCH_ACTION, pointerEvents: "auto" } : HANDLE_TOUCH_ACTION;
|
|
14328
14280
|
const resizeStyle = { ...HANDLE_TOUCH_ACTION, pointerEvents: "none" };
|
|
@@ -14355,7 +14307,7 @@ function ResizeHandles({
|
|
|
14355
14307
|
"aria-label": t("pptx.selectionOverlay.resize", { handle }),
|
|
14356
14308
|
"data-pptx-handle-kind": "resize",
|
|
14357
14309
|
"data-pptx-compact": true,
|
|
14358
|
-
className:
|
|
14310
|
+
className: chunk73S5EOD3_js.cn(
|
|
14359
14311
|
"absolute z-10 group border-0 bg-transparent p-0",
|
|
14360
14312
|
RESIZE_DEFAULT_CLASSES,
|
|
14361
14313
|
posClass,
|
|
@@ -14381,7 +14333,7 @@ function ResizeHandles({
|
|
|
14381
14333
|
"div",
|
|
14382
14334
|
{
|
|
14383
14335
|
"data-pptx-handle-hit": true,
|
|
14384
|
-
className:
|
|
14336
|
+
className: chunk73S5EOD3_js.cn(
|
|
14385
14337
|
"absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
|
|
14386
14338
|
corner ? "max-md:-inset-1.5 max-md:[--pptx-handle-hit-inset:-6px]" : "max-md:-inset-2 max-md:[--pptx-handle-hit-inset:-8px]"
|
|
14387
14339
|
),
|
|
@@ -14402,7 +14354,7 @@ function ResizeHandles({
|
|
|
14402
14354
|
"aria-label": t("pptx.selectionOverlay.rotate"),
|
|
14403
14355
|
"data-pptx-handle-kind": "rotate",
|
|
14404
14356
|
"data-pptx-compact": true,
|
|
14405
|
-
className:
|
|
14357
|
+
className: chunk73S5EOD3_js.cn(
|
|
14406
14358
|
"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",
|
|
14407
14359
|
ROTATE_DEFAULT_CLASSES
|
|
14408
14360
|
),
|
|
@@ -14479,13 +14431,14 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
|
|
|
14479
14431
|
const svgHeight = Math.max(el.height, 1);
|
|
14480
14432
|
const ss = shapeEl?.shapeStyle;
|
|
14481
14433
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
14482
|
-
const strokeColor =
|
|
14483
|
-
const strokePaint =
|
|
14484
|
-
const dashType =
|
|
14485
|
-
const dashArray =
|
|
14434
|
+
const strokeColor = chunk73S5EOD3_js.normalizeHexColor(ss?.strokeColor, chunk73S5EOD3_js.DEFAULT_STROKE_COLOR);
|
|
14435
|
+
const strokePaint = chunk73S5EOD3_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
|
|
14436
|
+
const dashType = chunk73S5EOD3_js.normalizeStrokeDashType(ss?.strokeDash);
|
|
14437
|
+
const dashArray = chunk73S5EOD3_js.getSvgStrokeDasharray(
|
|
14486
14438
|
dashType,
|
|
14487
14439
|
Math.max(strokeWidth, 1),
|
|
14488
|
-
ss?.customDashSegments
|
|
14440
|
+
ss?.customDashSegments,
|
|
14441
|
+
ss?.lineCap
|
|
14489
14442
|
);
|
|
14490
14443
|
const startArrow = ss?.connectorStartArrow;
|
|
14491
14444
|
const endArrow = ss?.connectorEndArrow;
|
|
@@ -14493,14 +14446,14 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
|
|
|
14493
14446
|
const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
14494
14447
|
const startMarkerId = `${markerSeed}-sel-start`;
|
|
14495
14448
|
const endMarkerId = `${markerSeed}-sel-end`;
|
|
14496
|
-
const compoundOffsets =
|
|
14497
|
-
const compoundWidths =
|
|
14498
|
-
const strokeCap = pptx.svgLineCap(ss?.lineCap);
|
|
14449
|
+
const compoundOffsets = chunk73S5EOD3_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
14450
|
+
const compoundWidths = chunk73S5EOD3_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
14451
|
+
const strokeCap = pptx.svgLineCap(ss?.lineCap, dashArray !== void 0);
|
|
14499
14452
|
const textEl = pptx$1.hasTextProperties(el) ? el : void 0;
|
|
14500
14453
|
const connectorText = textEl?.text?.trim() ?? "";
|
|
14501
14454
|
const connectorTextSegments = textEl?.textSegments;
|
|
14502
14455
|
const connectorTextStyle = textEl?.textStyle;
|
|
14503
|
-
const pathGeometry = shapeEl ?
|
|
14456
|
+
const pathGeometry = shapeEl ? chunk73S5EOD3_js.getConnectorPathGeometry(shapeEl) : {
|
|
14504
14457
|
pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
|
|
14505
14458
|
startX: 0,
|
|
14506
14459
|
startY: 0,
|
|
@@ -14515,16 +14468,16 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
|
|
|
14515
14468
|
strokeWidth
|
|
14516
14469
|
);
|
|
14517
14470
|
const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
|
|
14518
|
-
const lineShadow =
|
|
14519
|
-
const lineGlow =
|
|
14471
|
+
const lineShadow = chunk73S5EOD3_js.buildLineShadowCss(el);
|
|
14472
|
+
const lineGlow = chunk73S5EOD3_js.buildLineGlowFilter(el);
|
|
14520
14473
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
14521
14474
|
"div",
|
|
14522
14475
|
{
|
|
14523
14476
|
"data-pptx-element": "true",
|
|
14524
14477
|
"data-element-id": el.id,
|
|
14525
|
-
role:
|
|
14526
|
-
"aria-label":
|
|
14527
|
-
"aria-roledescription":
|
|
14478
|
+
role: chunk73S5EOD3_js.getAriaRole(el, { actionable: false }),
|
|
14479
|
+
"aria-label": chunk73S5EOD3_js.getAriaLabel(el),
|
|
14480
|
+
"aria-roledescription": chunk73S5EOD3_js.getAriaRoleDescription(el),
|
|
14528
14481
|
"aria-selected": isSelected ? true : void 0,
|
|
14529
14482
|
className: "absolute",
|
|
14530
14483
|
style: {
|
|
@@ -14557,14 +14510,14 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
|
|
|
14557
14510
|
style: { overflow: "visible", pointerEvents: "none" },
|
|
14558
14511
|
children: [
|
|
14559
14512
|
/* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
|
|
14560
|
-
|
|
14513
|
+
chunk73S5EOD3_js.renderConnectorMarker(
|
|
14561
14514
|
startMarkerId,
|
|
14562
14515
|
startArrow,
|
|
14563
14516
|
strokePaint,
|
|
14564
14517
|
ss?.connectorStartArrowWidth,
|
|
14565
14518
|
ss?.connectorStartArrowLength
|
|
14566
14519
|
),
|
|
14567
|
-
|
|
14520
|
+
chunk73S5EOD3_js.renderConnectorMarker(
|
|
14568
14521
|
endMarkerId,
|
|
14569
14522
|
endArrow,
|
|
14570
14523
|
strokePaint,
|
|
@@ -14774,14 +14727,14 @@ function getElementInteractionProps({
|
|
|
14774
14727
|
};
|
|
14775
14728
|
}
|
|
14776
14729
|
function renderDagDuotoneFilterForElement(el) {
|
|
14777
|
-
if (!
|
|
14730
|
+
if (!chunk73S5EOD3_js.hasDagDuotoneEffect(el)) {
|
|
14778
14731
|
return null;
|
|
14779
14732
|
}
|
|
14780
14733
|
const duotone = el.shapeStyle?.dagDuotone;
|
|
14781
14734
|
if (!duotone) {
|
|
14782
14735
|
return null;
|
|
14783
14736
|
}
|
|
14784
|
-
return
|
|
14737
|
+
return chunk73S5EOD3_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
|
|
14785
14738
|
}
|
|
14786
14739
|
function getContainerStyle({
|
|
14787
14740
|
el,
|
|
@@ -14809,10 +14762,10 @@ function getContainerStyle({
|
|
|
14809
14762
|
top: isFullscreenMedia ? fs.top : el.y,
|
|
14810
14763
|
width: isFullscreenMedia ? fs.width : painted.width,
|
|
14811
14764
|
...heightStyle,
|
|
14812
|
-
transform: isFullscreenMedia ? fs.transform :
|
|
14765
|
+
transform: isFullscreenMedia ? fs.transform : chunk73S5EOD3_js.getElementTransform(el),
|
|
14813
14766
|
transformOrigin: "center",
|
|
14814
14767
|
overflow: overflowValue,
|
|
14815
|
-
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ?
|
|
14768
|
+
clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunk73S5EOD3_js.getCropShapeClipPath(el) : void 0,
|
|
14816
14769
|
zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
|
|
14817
14770
|
visibility: animationState?.visible === false ? "hidden" : "visible",
|
|
14818
14771
|
animation: animationState?.cssAnimation,
|
|
@@ -14857,9 +14810,9 @@ function getContainerStyle({
|
|
|
14857
14810
|
function shapeParams(element) {
|
|
14858
14811
|
const style = pptx$1.hasShapeProperties(element) ? element.shapeStyle : void 0;
|
|
14859
14812
|
const strokeWidth = pptx.paintedStrokeWidth(style);
|
|
14860
|
-
const strokeColor =
|
|
14861
|
-
const fillColor =
|
|
14862
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
14813
|
+
const strokeColor = chunk73S5EOD3_js.normalizeHexColor(style?.strokeColor, chunk73S5EOD3_js.DEFAULT_STROKE_COLOR);
|
|
14814
|
+
const fillColor = chunk73S5EOD3_js.normalizeHexColor(style?.fillColor, chunk73S5EOD3_js.DEFAULT_FILL_COLOR);
|
|
14815
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk73S5EOD3_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
14863
14816
|
return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
|
|
14864
14817
|
}
|
|
14865
14818
|
var Extrusion3DOverlayMemo = /* @__PURE__ */ React17__default.default.memo(
|
|
@@ -14931,7 +14884,17 @@ function renderOutlinePaint(paint) {
|
|
|
14931
14884
|
);
|
|
14932
14885
|
}
|
|
14933
14886
|
if (paint.kind === "rectPath") {
|
|
14934
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14887
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14888
|
+
"pattern",
|
|
14889
|
+
{
|
|
14890
|
+
id: paint.id,
|
|
14891
|
+
patternUnits: "objectBoundingBox",
|
|
14892
|
+
patternContentUnits: "objectBoundingBox",
|
|
14893
|
+
width: 1,
|
|
14894
|
+
height: 1,
|
|
14895
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("image", { href: paint.href, x: 0, y: 0, width: 1, height: 1, preserveAspectRatio: "none" })
|
|
14896
|
+
}
|
|
14897
|
+
);
|
|
14935
14898
|
}
|
|
14936
14899
|
const stops = paint.stops.map((stop, idx) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
14937
14900
|
"stop",
|
|
@@ -14956,27 +14919,38 @@ function ShapeEffectOverlay({
|
|
|
14956
14919
|
const fx = pptx.getComputedEffectStyle(element);
|
|
14957
14920
|
const overlay = fx.fillOverlay;
|
|
14958
14921
|
const reflection = suppressReflection ? void 0 : fx.reflection;
|
|
14959
|
-
const softEdge = pptx.
|
|
14922
|
+
const softEdge = pptx.getShapeEffectFilterDefs(element);
|
|
14960
14923
|
const bevelLightingFilter = pptx.getBevelLightingSvgFilter(element);
|
|
14961
14924
|
const strokeOutline = pptx.buildStrokeOutline(element);
|
|
14962
14925
|
const hollowHit = pptx.buildHollowHitOutline(element);
|
|
14963
|
-
const
|
|
14964
|
-
|
|
14926
|
+
const fillLayer = pptx.getSilhouetteFillLayer(element);
|
|
14927
|
+
const overlayFill = pptx.buildSubpathFillOverlay(element);
|
|
14928
|
+
const subpathFill = overlayFill?.silhouette && (chunk73S5EOD3_js.rendersCustomVectorPath(element) || chunk73S5EOD3_js.rendersWedgeCalloutVector(element)) ? void 0 : overlayFill;
|
|
14929
|
+
if (!overlay && !softEdge && !bevelLightingFilter && !strokeOutline && !hollowHit && !subpathFill && !fillLayer && !reflection) {
|
|
14965
14930
|
return null;
|
|
14966
14931
|
}
|
|
14967
14932
|
const fillOverlayStyle = overlay ? {
|
|
14968
14933
|
position: "absolute",
|
|
14969
14934
|
inset: 0,
|
|
14970
|
-
...pptx$1.isImageLikeElement(element) ?
|
|
14935
|
+
...pptx$1.isImageLikeElement(element) ? chunk73S5EOD3_js.getImageSurfaceMaskStyle(element) : {},
|
|
14971
14936
|
background: overlay.color,
|
|
14972
14937
|
mixBlendMode: overlay.blendMode,
|
|
14973
14938
|
pointerEvents: "none"
|
|
14974
14939
|
} : void 0;
|
|
14975
14940
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
14941
|
+
fillLayer ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
14942
|
+
"div",
|
|
14943
|
+
{
|
|
14944
|
+
className: "pptx-react-silhouette-fill",
|
|
14945
|
+
"aria-hidden": "true",
|
|
14946
|
+
style: fillLayer.style
|
|
14947
|
+
}
|
|
14948
|
+
) : null,
|
|
14976
14949
|
subpathFill ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
14977
14950
|
"svg",
|
|
14978
14951
|
{
|
|
14979
14952
|
className: "pptx-react-subpath-fill",
|
|
14953
|
+
"data-pptx-silhouette-fill": subpathFill.silhouette ? "" : void 0,
|
|
14980
14954
|
"aria-hidden": "true",
|
|
14981
14955
|
viewBox: `0 0 ${subpathFill.viewBoxWidth} ${subpathFill.viewBoxHeight}`,
|
|
14982
14956
|
preserveAspectRatio: "none",
|
|
@@ -15072,6 +15046,7 @@ function ShapeEffectOverlay({
|
|
|
15072
15046
|
]
|
|
15073
15047
|
}
|
|
15074
15048
|
) : null,
|
|
15049
|
+
hollowHit?.textCss ? /* @__PURE__ */ jsxRuntime.jsx("style", { children: hollowHit.textCss }) : null,
|
|
15075
15050
|
hollowHit ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15076
15051
|
"svg",
|
|
15077
15052
|
{
|
|
@@ -15092,10 +15067,10 @@ function ShapeEffectOverlay({
|
|
|
15092
15067
|
"path",
|
|
15093
15068
|
{
|
|
15094
15069
|
d: hollowHit.d,
|
|
15095
|
-
fill:
|
|
15096
|
-
stroke:
|
|
15070
|
+
fill: hollowHit.fill,
|
|
15071
|
+
stroke: hollowHit.stroke,
|
|
15097
15072
|
strokeWidth: hollowHit.strokeWidth,
|
|
15098
|
-
style: { pointerEvents:
|
|
15073
|
+
style: { pointerEvents: hollowHit.pointerEvents }
|
|
15099
15074
|
}
|
|
15100
15075
|
)
|
|
15101
15076
|
}
|
|
@@ -15176,10 +15151,10 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
|
|
|
15176
15151
|
const backgroundAnimationState = pptx.getBackgroundAnimationState(el, presentationElementStates);
|
|
15177
15152
|
const effectPlacement = pptx.getShapeEffectLayerPlacement(el);
|
|
15178
15153
|
const visualAnimationState = backgroundAnimationState ?? animationState;
|
|
15179
|
-
const isTxt =
|
|
15154
|
+
const isTxt = chunk73S5EOD3_js.isEditableTextElement(el) && allow.textEditable;
|
|
15180
15155
|
const txtSE = pptx$1.hasTextProperties(el) ? el.textStyle : void 0;
|
|
15181
15156
|
const textStyleOverrideCss = pptx.buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
|
|
15182
|
-
const ss =
|
|
15157
|
+
const ss = chunk73S5EOD3_js.getShapeVisualStyle(
|
|
15183
15158
|
el,
|
|
15184
15159
|
hf,
|
|
15185
15160
|
fc,
|
|
@@ -15188,9 +15163,9 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
|
|
|
15188
15163
|
visualAnimationState?.animatesFill,
|
|
15189
15164
|
visualAnimationState?.animatesStroke
|
|
15190
15165
|
);
|
|
15191
|
-
const ts =
|
|
15166
|
+
const ts = chunk73S5EOD3_js.getTextStyleForElement(el, chunk73S5EOD3_js.DEFAULT_TEXT_COLOR);
|
|
15192
15167
|
const isImg = el.type === "picture" || el.type === "image";
|
|
15193
|
-
const vs =
|
|
15168
|
+
const vs = chunk73S5EOD3_js.renderVectorShape(
|
|
15194
15169
|
el,
|
|
15195
15170
|
isImg ? false : hf,
|
|
15196
15171
|
fc,
|
|
@@ -15200,10 +15175,10 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
|
|
|
15200
15175
|
visualAnimationState?.animatesStroke
|
|
15201
15176
|
);
|
|
15202
15177
|
const isModel3D = el.type === "model3d";
|
|
15203
|
-
const isConn =
|
|
15178
|
+
const isConn = chunk73S5EOD3_js.isConnectorOrLineElement(el);
|
|
15204
15179
|
const shapeStyle3d = pptx$1.hasShapeProperties(el) ? el.shapeStyle : void 0;
|
|
15205
15180
|
const extrusionData = React17.useMemo(
|
|
15206
|
-
() =>
|
|
15181
|
+
() => chunk73S5EOD3_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
|
|
15207
15182
|
[shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
|
|
15208
15183
|
);
|
|
15209
15184
|
const actionAffordance = useActionAffordance(el, canInteract);
|
|
@@ -15294,7 +15269,7 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
|
|
|
15294
15269
|
"aria-hidden": aria.hidden ? true : void 0,
|
|
15295
15270
|
"aria-selected": isSelected ? true : void 0,
|
|
15296
15271
|
tabIndex: isFocusable ? 0 : -1,
|
|
15297
|
-
className:
|
|
15272
|
+
className: chunk73S5EOD3_js.cn(
|
|
15298
15273
|
"absolute",
|
|
15299
15274
|
"focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
|
|
15300
15275
|
cur,
|
|
@@ -15312,7 +15287,7 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
|
|
|
15312
15287
|
// outline only, so its interior must not swallow clicks meant for what it
|
|
15313
15288
|
// is drawn over. ShapeEffectOverlay paints a transparent
|
|
15314
15289
|
// pointer-events:stroke band that opts the outline back in.
|
|
15315
|
-
pptx.
|
|
15290
|
+
pptx.passesClicksThroughBox(el) ? "pointer-events-none" : "",
|
|
15316
15291
|
isFullscreenMedia ? "pointer-events-auto" : "",
|
|
15317
15292
|
selB,
|
|
15318
15293
|
// Shared class the tooltip's `:hover` rule keys off (see
|
|
@@ -15321,6 +15296,13 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
|
|
|
15321
15296
|
actionAffordance.showLinkTooltip && pptx.LINK_TOOLTIP_HOST_CLASS
|
|
15322
15297
|
),
|
|
15323
15298
|
style: {
|
|
15299
|
+
// The table style's drop shadow (Themed Style 1/2) sits on the clipping frame.
|
|
15300
|
+
...el.type === "table" ? pptx.tableFrameCss(el.tableData, {
|
|
15301
|
+
tableStyleMap: tableStyleContext?.tableStyleMap,
|
|
15302
|
+
colorScheme: tableStyleContext?.theme?.colorScheme,
|
|
15303
|
+
fontScheme: tableStyleContext?.theme?.fontScheme,
|
|
15304
|
+
formatScheme: tableStyleContext?.theme?.formatScheme
|
|
15305
|
+
}) : {},
|
|
15324
15306
|
...containerStyle,
|
|
15325
15307
|
...isSelected ? selectionOutlineStyle(selClr) : {}
|
|
15326
15308
|
},
|
|
@@ -15367,9 +15349,9 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
|
|
|
15367
15349
|
txtSE,
|
|
15368
15350
|
txtS: ts,
|
|
15369
15351
|
vecShape: backgroundAnimationState && !isImg ? null : vs,
|
|
15370
|
-
imgStyle:
|
|
15371
|
-
imgFilter:
|
|
15372
|
-
imgOpacity:
|
|
15352
|
+
imgStyle: chunk73S5EOD3_js.getImageRenderStyle(el),
|
|
15353
|
+
imgFilter: chunk73S5EOD3_js.getImageEffectsFilter(el),
|
|
15354
|
+
imgOpacity: chunk73S5EOD3_js.getImageEffectsOpacity(el),
|
|
15373
15355
|
imgAlt: imageAltText,
|
|
15374
15356
|
isTxtEl: isTxt,
|
|
15375
15357
|
media: mediaDataUrls,
|
|
@@ -15506,10 +15488,10 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
|
|
|
15506
15488
|
}
|
|
15507
15489
|
function renderInk(el, options) {
|
|
15508
15490
|
const replay = options?.replay ?? false;
|
|
15509
|
-
const strokes =
|
|
15491
|
+
const strokes = chunk73S5EOD3_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
|
|
15510
15492
|
strokes.some((s) => s.circles || s.nibMarks);
|
|
15511
15493
|
const pressureSensitive = options?.pressureSensitive;
|
|
15512
|
-
const replayStyles = replay ?
|
|
15494
|
+
const replayStyles = replay ? chunk73S5EOD3_js.getInkReplayStyles(el, options?.replayConfig) : null;
|
|
15513
15495
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15514
15496
|
"svg",
|
|
15515
15497
|
{
|
|
@@ -15517,7 +15499,7 @@ function renderInk(el, options) {
|
|
|
15517
15499
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
15518
15500
|
preserveAspectRatio: "none",
|
|
15519
15501
|
children: [
|
|
15520
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
15502
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk73S5EOD3_js.INK_REPLAY_KEYFRAMES }),
|
|
15521
15503
|
strokes.map(
|
|
15522
15504
|
(s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
|
|
15523
15505
|
)
|
|
@@ -15528,7 +15510,7 @@ function renderInk(el, options) {
|
|
|
15528
15510
|
function renderGroup(children, parentGroupFill) {
|
|
15529
15511
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: pptx.filterRenderedElements(children).map((c, childIndex) => {
|
|
15530
15512
|
const { hf, fc, sw, sc } = shapeParams(c);
|
|
15531
|
-
const baseSs =
|
|
15513
|
+
const baseSs = chunk73S5EOD3_js.getShapeVisualStyle(c, hf, fc, sw, sc);
|
|
15532
15514
|
const inheritedFill = pptx.resolveGroupChildFill(c, parentGroupFill);
|
|
15533
15515
|
const ss = inheritedFill ? {
|
|
15534
15516
|
...baseSs,
|
|
@@ -15539,9 +15521,9 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15539
15521
|
backgroundPosition: inheritedFill.backgroundPosition
|
|
15540
15522
|
} : baseSs;
|
|
15541
15523
|
const isI = c.type === "picture" || c.type === "image";
|
|
15542
|
-
const vs =
|
|
15543
|
-
const ts =
|
|
15544
|
-
const isTxt =
|
|
15524
|
+
const vs = chunk73S5EOD3_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
|
|
15525
|
+
const ts = chunk73S5EOD3_js.getTextStyleForElement(c, chunk73S5EOD3_js.DEFAULT_TEXT_COLOR);
|
|
15526
|
+
const isTxt = chunk73S5EOD3_js.isEditableTextElement(c);
|
|
15545
15527
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15546
15528
|
"div",
|
|
15547
15529
|
{
|
|
@@ -15550,9 +15532,9 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15550
15532
|
style: {
|
|
15551
15533
|
left: c.x,
|
|
15552
15534
|
top: c.y,
|
|
15553
|
-
width: Math.max(c.width,
|
|
15554
|
-
height: Math.max(c.height,
|
|
15555
|
-
transform:
|
|
15535
|
+
width: Math.max(c.width, chunk73S5EOD3_js.MIN_ELEMENT_SIZE),
|
|
15536
|
+
height: Math.max(c.height, chunk73S5EOD3_js.MIN_ELEMENT_SIZE),
|
|
15537
|
+
transform: chunk73S5EOD3_js.getElementTransform(c),
|
|
15556
15538
|
transformOrigin: "center",
|
|
15557
15539
|
...ss,
|
|
15558
15540
|
...isI ? {
|
|
@@ -15577,8 +15559,8 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15577
15559
|
// A nested group: recurse, chaining the inherited fill so a
|
|
15578
15560
|
// `grpFill` shape under a fill-less sub-group still paints.
|
|
15579
15561
|
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
|
-
|
|
15562
|
+
) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk73S5EOD3_js.getImageSurfaceStyle(c), children: [
|
|
15563
|
+
chunk73S5EOD3_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
15582
15564
|
TiledImageLayer,
|
|
15583
15565
|
{
|
|
15584
15566
|
element: c,
|
|
@@ -15591,7 +15573,7 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15591
15573
|
src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
|
|
15592
15574
|
alt: i18n.translationsEn["pptx.ink.groupChildAlt"],
|
|
15593
15575
|
className: "pointer-events-none select-none",
|
|
15594
|
-
style:
|
|
15576
|
+
style: chunk73S5EOD3_js.getImageRenderStyle(c),
|
|
15595
15577
|
draggable: false
|
|
15596
15578
|
}
|
|
15597
15579
|
),
|
|
@@ -15603,7 +15585,7 @@ function renderGroup(children, parentGroupFill) {
|
|
|
15603
15585
|
{
|
|
15604
15586
|
className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
|
|
15605
15587
|
style: ts,
|
|
15606
|
-
children:
|
|
15588
|
+
children: chunk73S5EOD3_js.renderTextSegments(c, chunk73S5EOD3_js.DEFAULT_TEXT_COLOR)
|
|
15607
15589
|
}
|
|
15608
15590
|
) : null
|
|
15609
15591
|
] })
|
|
@@ -15617,8 +15599,8 @@ function renderContentPart(el, options) {
|
|
|
15617
15599
|
if (el.inkStrokes && el.inkStrokes.length > 0) {
|
|
15618
15600
|
const replay = options?.replay ?? false;
|
|
15619
15601
|
const pressureSensitive = options?.pressureSensitive ?? true;
|
|
15620
|
-
const strokes =
|
|
15621
|
-
const replayStyles = replay ?
|
|
15602
|
+
const strokes = chunk73S5EOD3_js.buildContentPartStrokes(el);
|
|
15603
|
+
const replayStyles = replay ? chunk73S5EOD3_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
|
|
15622
15604
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15623
15605
|
"svg",
|
|
15624
15606
|
{
|
|
@@ -15626,7 +15608,7 @@ function renderContentPart(el, options) {
|
|
|
15626
15608
|
viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
|
|
15627
15609
|
preserveAspectRatio: "none",
|
|
15628
15610
|
children: [
|
|
15629
|
-
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children:
|
|
15611
|
+
replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk73S5EOD3_js.INK_REPLAY_KEYFRAMES }),
|
|
15630
15612
|
strokes.map(
|
|
15631
15613
|
(s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
|
|
15632
15614
|
)
|
|
@@ -15853,9 +15835,9 @@ function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
|
|
|
15853
15835
|
collaboration: connected,
|
|
15854
15836
|
model: pptx.createInlineListModelObserver(element),
|
|
15855
15837
|
activationSelection,
|
|
15856
|
-
children: seed && !connected ?
|
|
15838
|
+
children: seed && !connected ? chunk73S5EOD3_js.renderTextSegments(
|
|
15857
15839
|
element,
|
|
15858
|
-
|
|
15840
|
+
chunk73S5EOD3_js.DEFAULT_TEXT_COLOR,
|
|
15859
15841
|
void 0,
|
|
15860
15842
|
void 0,
|
|
15861
15843
|
void 0,
|
|
@@ -16091,8 +16073,8 @@ function InlineTextEditor({
|
|
|
16091
16073
|
pending.endOffset
|
|
16092
16074
|
);
|
|
16093
16075
|
});
|
|
16094
|
-
const warpStyle =
|
|
16095
|
-
const compensationTransform =
|
|
16076
|
+
const warpStyle = chunk73S5EOD3_js.getTextWarpStyle(textStyleRaw);
|
|
16077
|
+
const compensationTransform = chunk73S5EOD3_js.getTextCompensationTransform(element);
|
|
16096
16078
|
const warpTransform = warpStyle?.transform;
|
|
16097
16079
|
const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
|
|
16098
16080
|
const wrapperStyle = {
|
|
@@ -16100,7 +16082,7 @@ function InlineTextEditor({
|
|
|
16100
16082
|
...textStyle,
|
|
16101
16083
|
...warpStyle,
|
|
16102
16084
|
transform: mergedTransform,
|
|
16103
|
-
transformOrigin: warpStyle?.transformOrigin || (compensationTransform ?
|
|
16085
|
+
transformOrigin: warpStyle?.transformOrigin || (compensationTransform ? chunk73S5EOD3_js.getTextCompensationOrigin(element) : "center")
|
|
16104
16086
|
};
|
|
16105
16087
|
const nextInlineStyleValue = (property) => {
|
|
16106
16088
|
if (!pptx$1.hasTextProperties(element)) {
|
|
@@ -16175,7 +16157,7 @@ function InlineTextEditor({
|
|
|
16175
16157
|
const text = e.clipboardData.getData("text/plain");
|
|
16176
16158
|
document.execCommand("insertText", false, text);
|
|
16177
16159
|
},
|
|
16178
|
-
children: list.seed ? list.children : seed.hasRichSegments ?
|
|
16160
|
+
children: list.seed ? list.children : seed.hasRichSegments ? chunk73S5EOD3_js.renderTextSegments(element, chunk73S5EOD3_js.DEFAULT_TEXT_COLOR) : seed.initialText
|
|
16179
16161
|
},
|
|
16180
16162
|
list.seed?.paragraphs[0].token ?? "plain"
|
|
16181
16163
|
);
|
|
@@ -16340,7 +16322,7 @@ function OleActionFooter({
|
|
|
16340
16322
|
info,
|
|
16341
16323
|
showActions
|
|
16342
16324
|
}) {
|
|
16343
|
-
const { t } =
|
|
16325
|
+
const { t } = chunk73S5EOD3_js.useTranslation();
|
|
16344
16326
|
if (!showActions || !info.canDownload || !el.oleEmbeddedData) {
|
|
16345
16327
|
return null;
|
|
16346
16328
|
}
|
|
@@ -16449,7 +16431,7 @@ function SmartArtInlineNodeEditor({
|
|
|
16449
16431
|
onCommit,
|
|
16450
16432
|
onCancel
|
|
16451
16433
|
}) {
|
|
16452
|
-
const { t } =
|
|
16434
|
+
const { t } = chunk73S5EOD3_js.useTranslation();
|
|
16453
16435
|
const ref = React17__default.default.useRef(null);
|
|
16454
16436
|
const [value, setValue] = React17__default.default.useState(initialText);
|
|
16455
16437
|
const settled = React17__default.default.useRef(false);
|
|
@@ -17077,7 +17059,7 @@ function SmartArtRendererImpl({
|
|
|
17077
17059
|
onUpdateElement,
|
|
17078
17060
|
animationState
|
|
17079
17061
|
}) {
|
|
17080
|
-
const { t } =
|
|
17062
|
+
const { t } = chunk73S5EOD3_js.useTranslation();
|
|
17081
17063
|
if (element.type !== "smartArt" || !element.smartArtData) {
|
|
17082
17064
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17083
17065
|
"div",
|
|
@@ -17323,7 +17305,7 @@ function groupIntoParagraphs(element, fieldContext) {
|
|
|
17323
17305
|
element,
|
|
17324
17306
|
fieldContext ? (seg) => {
|
|
17325
17307
|
if (seg.fieldType) {
|
|
17326
|
-
const substituted =
|
|
17308
|
+
const substituted = chunk73S5EOD3_js.substituteFieldText(
|
|
17327
17309
|
seg.text,
|
|
17328
17310
|
seg.fieldType,
|
|
17329
17311
|
fieldContext,
|
|
@@ -17350,30 +17332,27 @@ function getAlignmentProps(align) {
|
|
|
17350
17332
|
}
|
|
17351
17333
|
}
|
|
17352
17334
|
function getSegmentTspanProps(segment, element, fallbackColor) {
|
|
17353
|
-
const
|
|
17354
|
-
|
|
17355
|
-
|
|
17356
|
-
|
|
17357
|
-
|
|
17358
|
-
|
|
17359
|
-
decos.push("line-through");
|
|
17360
|
-
}
|
|
17361
|
-
const fill = s.hyperlink ? chunk5DBKW7F3_js.normalizeHexColor(s.color || element.textStyle?.color, chunk5DBKW7F3_js.HYPERLINK_COLOR) : chunk5DBKW7F3_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
|
|
17335
|
+
const paint = pptx.resolveWarpRunPaint(
|
|
17336
|
+
segment,
|
|
17337
|
+
element.textStyle,
|
|
17338
|
+
fallbackColor,
|
|
17339
|
+
chunk73S5EOD3_js.DEFAULT_TEXT_FONT_SIZE
|
|
17340
|
+
);
|
|
17362
17341
|
return {
|
|
17363
|
-
fill,
|
|
17364
|
-
fontSize:
|
|
17365
|
-
fontWeight:
|
|
17366
|
-
fontStyle:
|
|
17367
|
-
fontFamily:
|
|
17368
|
-
textDecoration:
|
|
17342
|
+
fill: paint.fill,
|
|
17343
|
+
fontSize: paint.fontSizePx,
|
|
17344
|
+
fontWeight: paint.fontWeight ?? "normal",
|
|
17345
|
+
fontStyle: paint.fontStyle ?? "normal",
|
|
17346
|
+
fontFamily: paint.fontFamily,
|
|
17347
|
+
textDecoration: paint.textDecoration
|
|
17369
17348
|
};
|
|
17370
17349
|
}
|
|
17371
17350
|
function resolveSegmentFont(segment, element) {
|
|
17372
17351
|
const s = segment.style || {};
|
|
17373
17352
|
const family = s.fontFamily || element.textStyle?.fontFamily;
|
|
17374
17353
|
return {
|
|
17375
|
-
fontFamily: family ? pptx$1.getSubstituteFontFamily(family) :
|
|
17376
|
-
fontSizePx: s.fontSize ?? element.textStyle?.fontSize ??
|
|
17354
|
+
fontFamily: family ? pptx$1.getSubstituteFontFamily(family) : chunk73S5EOD3_js.DEFAULT_FONT_FAMILY,
|
|
17355
|
+
fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunk73S5EOD3_js.DEFAULT_TEXT_FONT_SIZE,
|
|
17377
17356
|
bold: s.bold ?? element.textStyle?.bold,
|
|
17378
17357
|
italic: s.italic ?? element.textStyle?.italic
|
|
17379
17358
|
};
|
|
@@ -17462,9 +17441,9 @@ function WarpedText({
|
|
|
17462
17441
|
const warpAdj2 = textEl.textStyle?.textWarpAdj2;
|
|
17463
17442
|
const align = textEl.textStyle?.align ?? "center";
|
|
17464
17443
|
const { startOffset, textAnchor } = getAlignmentProps(align);
|
|
17465
|
-
const baseFontSize = textEl.textStyle?.fontSize ??
|
|
17466
|
-
const baseFontFamily = textEl.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(textEl.textStyle.fontFamily) :
|
|
17467
|
-
const baseFill =
|
|
17444
|
+
const baseFontSize = textEl.textStyle?.fontSize ?? chunk73S5EOD3_js.DEFAULT_TEXT_FONT_SIZE;
|
|
17445
|
+
const baseFontFamily = textEl.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(textEl.textStyle.fontFamily) : chunk73S5EOD3_js.DEFAULT_FONT_FAMILY;
|
|
17446
|
+
const baseFill = chunk73S5EOD3_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
|
|
17468
17447
|
if (pptx.hasGlyphEnvelope(preset)) {
|
|
17469
17448
|
const perLine = pptx.buildGlyphEnvelopeBlock(
|
|
17470
17449
|
preset,
|
|
@@ -17564,60 +17543,66 @@ function WarpedText({
|
|
|
17564
17543
|
}
|
|
17565
17544
|
);
|
|
17566
17545
|
}
|
|
17567
|
-
|
|
17568
|
-
|
|
17569
|
-
|
|
17570
|
-
chunk5DBKW7F3_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
|
|
17571
|
-
);
|
|
17572
|
-
glyphs["actionButtonForwardOrNext"] = glyphs["actionButtonForwardNext"];
|
|
17573
|
-
glyphs["actionButtonBackOrPrevious"] = glyphs["actionButtonBackPrevious"];
|
|
17574
|
-
return glyphs;
|
|
17575
|
-
}
|
|
17576
|
-
function isActionButtonShape(shapeType) {
|
|
17577
|
-
return Boolean(shapeType && shapeType in GLYPH_BY_SHAPE);
|
|
17578
|
-
}
|
|
17579
|
-
function getActionButtonGlyphPath(shapeType) {
|
|
17580
|
-
if (!shapeType) {
|
|
17581
|
-
return void 0;
|
|
17546
|
+
function renderEquationBox(el, interactive) {
|
|
17547
|
+
if (!pptx$1.hasTextProperties(el) || !pptx.isEquationOnlyText(el.textSegments)) {
|
|
17548
|
+
return null;
|
|
17582
17549
|
}
|
|
17583
|
-
const
|
|
17584
|
-
|
|
17585
|
-
|
|
17586
|
-
|
|
17587
|
-
|
|
17588
|
-
|
|
17589
|
-
|
|
17590
|
-
|
|
17591
|
-
|
|
17592
|
-
|
|
17550
|
+
const equations = (el.textSegments ?? []).flatMap((segment, index) => {
|
|
17551
|
+
const mathml = segment.equationXml ? pptx.convertOmmlToMathMl(segment.equationXml) : "";
|
|
17552
|
+
if (!mathml) {
|
|
17553
|
+
return [];
|
|
17554
|
+
}
|
|
17555
|
+
const math = /* @__PURE__ */ jsxRuntime.jsx(
|
|
17556
|
+
"span",
|
|
17557
|
+
{
|
|
17558
|
+
style: {
|
|
17559
|
+
display: "inline-block",
|
|
17560
|
+
verticalAlign: "middle",
|
|
17561
|
+
fontFamily: pptx.EQUATION_FONT_FAMILY
|
|
17562
|
+
},
|
|
17563
|
+
dangerouslySetInnerHTML: { __html: pptx.sanitizeMathMl(mathml) }
|
|
17564
|
+
}
|
|
17565
|
+
);
|
|
17566
|
+
if (!segment.equationNumber) {
|
|
17567
|
+
return [/* @__PURE__ */ jsxRuntime.jsx(React17__default.default.Fragment, { children: math }, `${el.id}-eq-${index}`)];
|
|
17568
|
+
}
|
|
17569
|
+
const label = `(${segment.equationNumber})`;
|
|
17570
|
+
return [
|
|
17571
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
17572
|
+
"span",
|
|
17573
|
+
{
|
|
17574
|
+
style: {
|
|
17575
|
+
display: "flex",
|
|
17576
|
+
justifyContent: "space-between",
|
|
17577
|
+
alignItems: "center",
|
|
17578
|
+
width: "100%"
|
|
17579
|
+
},
|
|
17580
|
+
children: [
|
|
17581
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { visibility: "hidden", whiteSpace: "nowrap" }, children: label }),
|
|
17582
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { flex: 1, textAlign: "center" }, children: math }),
|
|
17583
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { whiteSpace: "nowrap", fontFamily: pptx.EQUATION_FONT_FAMILY }, children: label })
|
|
17584
|
+
]
|
|
17585
|
+
},
|
|
17586
|
+
`${el.id}-eq-${index}`
|
|
17587
|
+
)
|
|
17588
|
+
];
|
|
17589
|
+
});
|
|
17590
|
+
if (equations.length === 0) {
|
|
17593
17591
|
return null;
|
|
17594
17592
|
}
|
|
17595
|
-
const
|
|
17593
|
+
const style = pptx.buildEquationBlockStyle(
|
|
17594
|
+
pptx.buildTextBlockStyle(el, {
|
|
17595
|
+
fallbackColor: chunk73S5EOD3_js.DEFAULT_TEXT_COLOR,
|
|
17596
|
+
bodyLayout: true,
|
|
17597
|
+
pxLengths: true
|
|
17598
|
+
})
|
|
17599
|
+
);
|
|
17596
17600
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17597
|
-
"
|
|
17601
|
+
"div",
|
|
17598
17602
|
{
|
|
17599
|
-
|
|
17600
|
-
|
|
17601
|
-
|
|
17602
|
-
preserveAspectRatio: "xMidYMid meet",
|
|
17603
|
-
style: {
|
|
17604
|
-
position: "absolute",
|
|
17605
|
-
inset: 0,
|
|
17606
|
-
pointerEvents: "none",
|
|
17607
|
-
padding: "20%"
|
|
17608
|
-
},
|
|
17609
|
-
"aria-hidden": "true",
|
|
17610
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17611
|
-
"path",
|
|
17612
|
-
{
|
|
17613
|
-
d: path,
|
|
17614
|
-
fill: "none",
|
|
17615
|
-
stroke,
|
|
17616
|
-
strokeWidth: 2,
|
|
17617
|
-
strokeLinecap: "round",
|
|
17618
|
-
strokeLinejoin: "round"
|
|
17619
|
-
}
|
|
17620
|
-
)
|
|
17603
|
+
className: chunk73S5EOD3_js.cn("relative z-10 w-full h-full", interactive ? "" : "pointer-events-none"),
|
|
17604
|
+
style,
|
|
17605
|
+
children: equations
|
|
17621
17606
|
}
|
|
17622
17607
|
);
|
|
17623
17608
|
}
|
|
@@ -17641,7 +17626,7 @@ function renderTextElementBody(options) {
|
|
|
17641
17626
|
const useSvgWarp = pptx.shouldUseSvgWarp(
|
|
17642
17627
|
pptx$1.hasTextProperties(el) ? el.textStyle?.textWarpPreset : void 0
|
|
17643
17628
|
);
|
|
17644
|
-
const scene3dStyle = pptx$1.hasTextProperties(el) ?
|
|
17629
|
+
const scene3dStyle = pptx$1.hasTextProperties(el) ? chunk73S5EOD3_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
|
|
17645
17630
|
const rotationTransform = pptx.getTextBodyRotationTransform(el);
|
|
17646
17631
|
const compensation = pptx.getTextCompensationStyle(el);
|
|
17647
17632
|
const composedTransform = [rotationTransform, compensation?.transform, scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
|
|
@@ -17665,27 +17650,27 @@ function renderTextElementBody(options) {
|
|
|
17665
17650
|
...scene3dStyle?.transformStyle ? { transformStyle: scene3dStyle.transformStyle } : {},
|
|
17666
17651
|
...isLinkedTextBox ? { overflow: "hidden" } : {}
|
|
17667
17652
|
};
|
|
17668
|
-
const shapeType = "shapeType" in el ? el.shapeType : void 0;
|
|
17669
17653
|
const placeholderPrompt = pptx.placeholderPromptDescriptor(el, placeholderPromptMode);
|
|
17670
17654
|
const shouldRenderText = isTxtEl || placeholderPrompt !== null;
|
|
17655
|
+
const equationBox = shouldRenderText ? renderEquationBox(el, Boolean(onHyperlinkClick)) : null;
|
|
17671
17656
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17672
17657
|
vecShape,
|
|
17673
|
-
|
|
17674
|
-
shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
17658
|
+
equationBox,
|
|
17659
|
+
shouldRenderText && !equationBox && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
17675
17660
|
"div",
|
|
17676
17661
|
{
|
|
17677
|
-
className:
|
|
17662
|
+
className: chunk73S5EOD3_js.cn(
|
|
17678
17663
|
"relative z-10 w-full h-full",
|
|
17679
17664
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
17680
17665
|
),
|
|
17681
|
-
style: { ...
|
|
17666
|
+
style: { ...chunk73S5EOD3_js.getTextLayoutStyle(el), ...transformStyle },
|
|
17682
17667
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17683
17668
|
WarpedText,
|
|
17684
17669
|
{
|
|
17685
17670
|
element: el,
|
|
17686
17671
|
width: el.width,
|
|
17687
17672
|
height: el.height,
|
|
17688
|
-
fallbackColor:
|
|
17673
|
+
fallbackColor: chunk73S5EOD3_js.DEFAULT_TEXT_COLOR,
|
|
17689
17674
|
findHighlights: findHl,
|
|
17690
17675
|
fieldContext
|
|
17691
17676
|
}
|
|
@@ -17694,19 +17679,19 @@ function renderTextElementBody(options) {
|
|
|
17694
17679
|
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
17695
17680
|
"div",
|
|
17696
17681
|
{
|
|
17697
|
-
className:
|
|
17682
|
+
className: chunk73S5EOD3_js.cn(
|
|
17698
17683
|
"relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
|
|
17699
17684
|
onHyperlinkClick ? "" : "pointer-events-none"
|
|
17700
17685
|
),
|
|
17701
17686
|
style: {
|
|
17702
|
-
...
|
|
17687
|
+
...chunk73S5EOD3_js.getTextLayoutStyle(el),
|
|
17703
17688
|
...txtS,
|
|
17704
|
-
...
|
|
17689
|
+
...chunk73S5EOD3_js.getTextWarpStyle(txtSE),
|
|
17705
17690
|
...transformStyle
|
|
17706
17691
|
},
|
|
17707
|
-
children:
|
|
17692
|
+
children: chunk73S5EOD3_js.renderTextSegments(
|
|
17708
17693
|
el,
|
|
17709
|
-
|
|
17694
|
+
chunk73S5EOD3_js.DEFAULT_TEXT_COLOR,
|
|
17710
17695
|
void 0,
|
|
17711
17696
|
findHl,
|
|
17712
17697
|
onHyperlinkClick,
|
|
@@ -17727,7 +17712,7 @@ function ZoomElementRenderer({
|
|
|
17727
17712
|
onZoomClick,
|
|
17728
17713
|
sourceSlideIndex
|
|
17729
17714
|
}) {
|
|
17730
|
-
const { t } =
|
|
17715
|
+
const { t } = chunk73S5EOD3_js.useTranslation();
|
|
17731
17716
|
const summaryView = pptx.buildSummaryZoomView(
|
|
17732
17717
|
element,
|
|
17733
17718
|
(index) => {
|
|
@@ -18025,7 +18010,7 @@ function renderBody(options) {
|
|
|
18025
18010
|
);
|
|
18026
18011
|
}
|
|
18027
18012
|
if (isImg) {
|
|
18028
|
-
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: chunk73S5EOD3_js.getImageSurfaceStyle(el), children: [
|
|
18029
18014
|
renderImg(el, imgStyle, imgFilter, imgAlt, imgOpacity),
|
|
18030
18015
|
vecShape ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", children: vecShape }) : null
|
|
18031
18016
|
] });
|
|
@@ -18042,7 +18027,7 @@ function renderBody(options) {
|
|
|
18042
18027
|
textDirection: txtSE?.textDirection,
|
|
18043
18028
|
textStyle: txtS,
|
|
18044
18029
|
textStyleRaw: txtSE,
|
|
18045
|
-
layoutStyle:
|
|
18030
|
+
layoutStyle: chunk73S5EOD3_js.getTextLayoutStyle(el),
|
|
18046
18031
|
element: el,
|
|
18047
18032
|
onCommit,
|
|
18048
18033
|
onCancel,
|
|
@@ -18053,7 +18038,7 @@ function renderBody(options) {
|
|
|
18053
18038
|
] });
|
|
18054
18039
|
}
|
|
18055
18040
|
if (el.type === "table") {
|
|
18056
|
-
return
|
|
18041
|
+
return chunk73S5EOD3_js.renderTableElement(el, txtS, {
|
|
18057
18042
|
editable: isSel,
|
|
18058
18043
|
selectedCell: isSel ? tableSt : null,
|
|
18059
18044
|
onSelectCell: onCellSel,
|
|
@@ -18086,7 +18071,7 @@ function renderBody(options) {
|
|
|
18086
18071
|
);
|
|
18087
18072
|
}
|
|
18088
18073
|
if (el.type === "media") {
|
|
18089
|
-
return
|
|
18074
|
+
return chunk73S5EOD3_js.renderMediaElement(el, media, {
|
|
18090
18075
|
// Present mode autoplays every media element on the active slide,
|
|
18091
18076
|
// not only ones persisted with their own `autoPlay` flag (matching
|
|
18092
18077
|
// the other four bindings' unconditional `presenting`-gated
|
|
@@ -18100,13 +18085,17 @@ function renderBody(options) {
|
|
|
18100
18085
|
// does. The rule is shared so the five bindings cannot drift on it.
|
|
18101
18086
|
showTransport: pptx.mediaTransportVisible({
|
|
18102
18087
|
presenting: isPresentationPassive === true,
|
|
18103
|
-
preview: isStaticSurface === true
|
|
18104
|
-
canvasTransport: true
|
|
18088
|
+
preview: isStaticSurface === true
|
|
18105
18089
|
}),
|
|
18106
18090
|
// ...and never the play badge / placeholder box either: a still is
|
|
18107
18091
|
// slide content, and the transition overlay paints one (issue #147).
|
|
18108
18092
|
preview: isStaticSurface === true,
|
|
18109
|
-
onPlayStateChange: handleMediaPlayStateChange
|
|
18093
|
+
onPlayStateChange: handleMediaPlayStateChange,
|
|
18094
|
+
// PowerPoint's Normal view: a control bar while selected or hovered.
|
|
18095
|
+
...pptx.mediaControlBarEnabled({
|
|
18096
|
+
presenting: isPresentationPassive === true,
|
|
18097
|
+
preview: isStaticSurface === true
|
|
18098
|
+
}) ? { controlBar: { selected: isSel === true } } : {}
|
|
18110
18099
|
});
|
|
18111
18100
|
}
|
|
18112
18101
|
if (doInk && pptx$1.isInkElement(el)) {
|
|
@@ -18138,27 +18127,27 @@ function renderBody(options) {
|
|
|
18138
18127
|
}
|
|
18139
18128
|
return renderGroup(el.children, pptx.getGroupChildParentFill(el));
|
|
18140
18129
|
}
|
|
18141
|
-
if (
|
|
18142
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children:
|
|
18130
|
+
if (chunk73S5EOD3_js.shouldRenderFallbackLabel(el, isTxtEl)) {
|
|
18131
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk73S5EOD3_js.getElementLabel(el) });
|
|
18143
18132
|
}
|
|
18144
18133
|
return renderTextElementBody(options);
|
|
18145
18134
|
}
|
|
18146
18135
|
function defaultTextColorForFill(fillColor) {
|
|
18147
18136
|
const hex = String(fillColor ?? "").replace(/^#/u, "");
|
|
18148
18137
|
if (!/^[0-9a-f]{6}$/iu.test(hex)) {
|
|
18149
|
-
return
|
|
18138
|
+
return chunk73S5EOD3_js.DEFAULT_TEXT_COLOR;
|
|
18150
18139
|
}
|
|
18151
18140
|
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);
|
|
18152
18141
|
const luminance = channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
|
|
18153
|
-
return luminance > 0.179 ?
|
|
18142
|
+
return luminance > 0.179 ? chunk73S5EOD3_js.DEFAULT_TEXT_COLOR : "#ffffff";
|
|
18154
18143
|
}
|
|
18155
18144
|
function getStaticElementVisualState(element, parentGroupFill) {
|
|
18156
18145
|
const style = pptx$1.hasShapeProperties(element) ? element.shapeStyle : void 0;
|
|
18157
|
-
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(
|
|
18158
|
-
const fill =
|
|
18146
|
+
const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk73S5EOD3_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
|
|
18147
|
+
const fill = chunk73S5EOD3_js.normalizeHexColor(style?.fillColor, chunk73S5EOD3_js.DEFAULT_FILL_COLOR);
|
|
18159
18148
|
const strokeWidth = pptx.paintedStrokeWidth(style);
|
|
18160
|
-
const stroke =
|
|
18161
|
-
const baseVisualStyle =
|
|
18149
|
+
const stroke = chunk73S5EOD3_js.normalizeHexColor(style?.strokeColor, chunk73S5EOD3_js.DEFAULT_STROKE_COLOR);
|
|
18150
|
+
const baseVisualStyle = chunk73S5EOD3_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
|
|
18162
18151
|
const inheritedFill = pptx.resolveGroupChildFill(element, parentGroupFill);
|
|
18163
18152
|
const visualStyle = inheritedFill ? {
|
|
18164
18153
|
...baseVisualStyle,
|
|
@@ -18168,9 +18157,9 @@ function getStaticElementVisualState(element, parentGroupFill) {
|
|
|
18168
18157
|
backgroundSize: inheritedFill.backgroundSize,
|
|
18169
18158
|
backgroundPosition: inheritedFill.backgroundPosition
|
|
18170
18159
|
} : baseVisualStyle;
|
|
18171
|
-
const textStyle =
|
|
18160
|
+
const textStyle = chunk73S5EOD3_js.getTextStyleForElement(
|
|
18172
18161
|
element,
|
|
18173
|
-
element.type === "shape" && hasFill ? defaultTextColorForFill(fill) :
|
|
18162
|
+
element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunk73S5EOD3_js.DEFAULT_TEXT_COLOR
|
|
18174
18163
|
);
|
|
18175
18164
|
const isImage = element.type === "picture" || element.type === "image";
|
|
18176
18165
|
const letsTextOverflow = pptx$1.hasTextProperties(element) && Boolean(element.text?.trim());
|
|
@@ -18195,7 +18184,7 @@ function getStaticElementInteractionState(element, hasActionHandler, exposeEleme
|
|
|
18195
18184
|
return { action, isActionable, contractRole };
|
|
18196
18185
|
}
|
|
18197
18186
|
function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
|
|
18198
|
-
const overflowClass = visual.isImage || visual.strokeWidth > 0 || element.type === "group" ||
|
|
18187
|
+
const overflowClass = visual.isImage || visual.strokeWidth > 0 || element.type === "group" || chunk73S5EOD3_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
|
|
18199
18188
|
const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
|
|
18200
18189
|
return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
|
|
18201
18190
|
}
|
|
@@ -18278,7 +18267,7 @@ function StaticElementRendererImpl({
|
|
|
18278
18267
|
top: positioned ? element.y : void 0,
|
|
18279
18268
|
width: positioned ? Math.max(element.width, 1) : "100%",
|
|
18280
18269
|
height: positioned ? Math.max(element.height, 1) : "100%",
|
|
18281
|
-
transform: positioned ?
|
|
18270
|
+
transform: positioned ? chunk73S5EOD3_js.getElementTransform(element) : void 0,
|
|
18282
18271
|
transformOrigin: "center",
|
|
18283
18272
|
zIndex,
|
|
18284
18273
|
...visualStyle,
|
|
@@ -18321,18 +18310,18 @@ function StaticElementRendererImpl({
|
|
|
18321
18310
|
spellCheck: false,
|
|
18322
18311
|
txtSE: pptx$1.hasTextProperties(element) ? element.textStyle : void 0,
|
|
18323
18312
|
txtS: textStyle,
|
|
18324
|
-
vecShape:
|
|
18313
|
+
vecShape: chunk73S5EOD3_js.renderVectorShape(
|
|
18325
18314
|
element,
|
|
18326
18315
|
isImage ? false : hasFill,
|
|
18327
18316
|
fill,
|
|
18328
18317
|
strokeWidth,
|
|
18329
18318
|
stroke
|
|
18330
18319
|
),
|
|
18331
|
-
imgStyle: imageAnimation ? { ...
|
|
18332
|
-
imgFilter:
|
|
18333
|
-
imgOpacity:
|
|
18320
|
+
imgStyle: imageAnimation ? { ...chunk73S5EOD3_js.getImageRenderStyle(element), animation: imageAnimation } : chunk73S5EOD3_js.getImageRenderStyle(element),
|
|
18321
|
+
imgFilter: chunk73S5EOD3_js.getImageEffectsFilter(element),
|
|
18322
|
+
imgOpacity: chunk73S5EOD3_js.getImageEffectsOpacity(element),
|
|
18334
18323
|
imgAlt: "",
|
|
18335
|
-
isTxtEl:
|
|
18324
|
+
isTxtEl: chunk73S5EOD3_js.isEditableTextElement(element),
|
|
18336
18325
|
media: mediaDataUrls,
|
|
18337
18326
|
tableSt: null,
|
|
18338
18327
|
isSel: false,
|
|
@@ -18380,7 +18369,7 @@ function SlideLayer({
|
|
|
18380
18369
|
style: {
|
|
18381
18370
|
width: safeWidth,
|
|
18382
18371
|
height: safeHeight,
|
|
18383
|
-
backgroundColor: slide.backgroundColor ?
|
|
18372
|
+
backgroundColor: slide.backgroundColor ? chunk73S5EOD3_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
|
|
18384
18373
|
backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
|
|
18385
18374
|
backgroundSize: slide.backgroundImage ? "cover" : void 0,
|
|
18386
18375
|
backgroundPosition: slide.backgroundImage ? "center" : void 0
|