ooxml-ui 1.12.0 → 1.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-N3BQ3IIJ.js → chunk-NLJVBHLG.js} +1 -1
- package/dist/docx.js +10 -3
- package/dist/index.js +2 -2
- package/dist/pptx/{chunk-GD2XJ32O.mjs → chunk-4EHNTVSN.mjs} +36 -1
- package/dist/pptx/{chunk-WP7PQCJ5.cjs → chunk-LMZK4UNY.cjs} +38 -0
- package/dist/pptx/dom/index.cjs +202 -202
- package/dist/pptx/dom/index.mjs +2 -2
- package/dist/pptx/index.cjs +2766 -2754
- package/dist/pptx/index.mjs +1 -1
- package/dist/pptx/render/editor-keymap-chords.d.ts +26 -0
- package/dist/pptx/render/editor-keymap-chords.d.ts.map +1 -1
- package/dist/pptx/render/editor-keymap.d.ts +2 -2
- package/dist/pptx/render/editor-keymap.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +1 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/outline-view-dismiss.d.ts +48 -0
- package/dist/pptx/render/outline-view-dismiss.d.ts.map +1 -0
- package/dist/teams.js +1 -1
- package/dist/xlsx.js +3 -3
- package/package.json +2 -2
- /package/dist/{chunk-B7NCMLSK.js → chunk-3H5NR32A.js} +0 -0
package/dist/pptx/dom/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkLMZK4UNY_cjs = require('../chunk-LMZK4UNY.cjs');
|
|
4
4
|
require('../chunk-WSTWYZFM.cjs');
|
|
5
5
|
var chunk2JEQHIAL_cjs = require('../chunk-2JEQHIAL.cjs');
|
|
6
6
|
require('../chunk-IOR4KOGN.cjs');
|
|
@@ -96,7 +96,7 @@ function buildActiveXControlsOverlay(doc, controls, canvasSize) {
|
|
|
96
96
|
zIndex: "40"
|
|
97
97
|
});
|
|
98
98
|
controls.forEach((control, index) => {
|
|
99
|
-
const view =
|
|
99
|
+
const view = chunkLMZK4UNY_cjs.getActiveXControlOverlayView(control, canvasSize, index);
|
|
100
100
|
const style = {
|
|
101
101
|
position: "absolute",
|
|
102
102
|
left: `${view.left}px`,
|
|
@@ -132,7 +132,7 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
132
132
|
pointerEvents: "none",
|
|
133
133
|
zIndex: "45"
|
|
134
134
|
});
|
|
135
|
-
const markers =
|
|
135
|
+
const markers = chunkLMZK4UNY_cjs.buildCommentMarkers(
|
|
136
136
|
comments,
|
|
137
137
|
canvasSize.width,
|
|
138
138
|
canvasSize.height,
|
|
@@ -141,10 +141,10 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
141
141
|
for (const marker of markers) {
|
|
142
142
|
const dot = createEl(doc, "button", "pptxv-comment-marker", {
|
|
143
143
|
position: "absolute",
|
|
144
|
-
left: `${marker.x -
|
|
145
|
-
top: `${marker.y -
|
|
146
|
-
width: `${
|
|
147
|
-
height: `${
|
|
144
|
+
left: `${marker.x - chunkLMZK4UNY_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
145
|
+
top: `${marker.y - chunkLMZK4UNY_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
146
|
+
width: `${chunkLMZK4UNY_cjs.COMMENT_MARKER_SIZE}px`,
|
|
147
|
+
height: `${chunkLMZK4UNY_cjs.COMMENT_MARKER_SIZE}px`,
|
|
148
148
|
display: "flex",
|
|
149
149
|
alignItems: "center",
|
|
150
150
|
justifyContent: "center",
|
|
@@ -212,7 +212,7 @@ function merge3dStyle(base, computed) {
|
|
|
212
212
|
}
|
|
213
213
|
function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
214
214
|
if (el.type === "group") {
|
|
215
|
-
const fx2 =
|
|
215
|
+
const fx2 = chunkLMZK4UNY_cjs.getComputedEffectStyle(el);
|
|
216
216
|
const groupStyle = {};
|
|
217
217
|
if (fx2.filter) {
|
|
218
218
|
groupStyle.filter = fx2.filter;
|
|
@@ -234,7 +234,7 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
234
234
|
style[key] = value;
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
-
const stroke =
|
|
237
|
+
const stroke = chunkLMZK4UNY_cjs.getComputedStrokeStyle(el);
|
|
238
238
|
if (stroke.borderWidth > 0) {
|
|
239
239
|
if (animatesStroke) {
|
|
240
240
|
style["borderWidth"] = stroke.cssBorderWidth;
|
|
@@ -253,7 +253,7 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
253
253
|
style["strokeMiterlimit"] = stroke.strokeMiterlimit;
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
const fx =
|
|
256
|
+
const fx = chunkLMZK4UNY_cjs.getComputedEffectStyle(el);
|
|
257
257
|
if (fx.boxShadow) {
|
|
258
258
|
style["boxShadow"] = fx.boxShadow;
|
|
259
259
|
}
|
|
@@ -270,11 +270,11 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
270
270
|
if (fx.overflowVisible) {
|
|
271
271
|
style["overflow"] = "visible";
|
|
272
272
|
}
|
|
273
|
-
merge3dStyle(style,
|
|
274
|
-
if (
|
|
273
|
+
merge3dStyle(style, chunkLMZK4UNY_cjs.getComputed3dStyle(el));
|
|
274
|
+
if (chunkLMZK4UNY_cjs.isHollowShapeElement(el)) {
|
|
275
275
|
style["pointerEvents"] = "none";
|
|
276
276
|
}
|
|
277
|
-
const geometry =
|
|
277
|
+
const geometry = chunkLMZK4UNY_cjs.resolveShapeGeometry(el);
|
|
278
278
|
switch (geometry.kind) {
|
|
279
279
|
case "bare":
|
|
280
280
|
style["backgroundColor"] = "transparent";
|
|
@@ -308,12 +308,12 @@ function getTextBlockStyle(el) {
|
|
|
308
308
|
if (!pptx.hasTextProperties(el)) {
|
|
309
309
|
return {};
|
|
310
310
|
}
|
|
311
|
-
const base =
|
|
311
|
+
const base = chunkLMZK4UNY_cjs.buildTextBlockStyle(el, {
|
|
312
312
|
fallbackColor: chunkVFPVEVF4_cjs.DEFAULT_TEXT_COLOR,
|
|
313
313
|
bodyLayout: true,
|
|
314
314
|
pxLengths: true
|
|
315
315
|
});
|
|
316
|
-
const scene3d =
|
|
316
|
+
const scene3d = chunkLMZK4UNY_cjs.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height });
|
|
317
317
|
if (!scene3d) {
|
|
318
318
|
return base;
|
|
319
319
|
}
|
|
@@ -418,7 +418,7 @@ function renderSlideStage(options) {
|
|
|
418
418
|
"--pptxv-grid-size": `${options.gridSpacingPx ?? 10}px`,
|
|
419
419
|
// One device pixel in slide px: thin strokes stay visible on screen.
|
|
420
420
|
...chunkC5OJXCCB_cjs.deviceStrokeStageStyle(scale),
|
|
421
|
-
...
|
|
421
|
+
...chunkLMZK4UNY_cjs.getSlideBackgroundStyle(slide, { widthPx: canvasSize.width, heightPx: canvasSize.height })
|
|
422
422
|
});
|
|
423
423
|
if (interactive || options.reading) {
|
|
424
424
|
stage.setAttribute("role", "region");
|
|
@@ -459,19 +459,19 @@ function renderSlideStage(options) {
|
|
|
459
459
|
selectedElementIds: options.selectedElementIds,
|
|
460
460
|
registry,
|
|
461
461
|
renderElement(element, zIndex) {
|
|
462
|
-
if (!
|
|
462
|
+
if (!chunkLMZK4UNY_cjs.isElementRendered(element)) {
|
|
463
463
|
return null;
|
|
464
464
|
}
|
|
465
465
|
const node = registry.resolve(element.type)(element, zIndex, context);
|
|
466
466
|
if (node && interactive && "setAttribute" in node) {
|
|
467
|
-
const templateLocked =
|
|
467
|
+
const templateLocked = chunkLMZK4UNY_cjs.isTemplateElementId(element.id) && !options.templateEditing;
|
|
468
468
|
if (templateLocked) {
|
|
469
469
|
node.style.pointerEvents = "none";
|
|
470
470
|
}
|
|
471
471
|
node.setAttribute("data-pptx-element", "true");
|
|
472
472
|
}
|
|
473
|
-
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" &&
|
|
474
|
-
const hitTargetStyle =
|
|
473
|
+
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" && chunkLMZK4UNY_cjs.shouldRenderHitTarget(interactive, options.presenting ?? false)) {
|
|
474
|
+
const hitTargetStyle = chunkLMZK4UNY_cjs.elementHitTargetStyle(element);
|
|
475
475
|
if (hitTargetStyle) {
|
|
476
476
|
const hitTarget = createEl(doc, "div", void 0, hitTargetStyle);
|
|
477
477
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
@@ -490,20 +490,20 @@ function renderSlideStage(options) {
|
|
|
490
490
|
}
|
|
491
491
|
});
|
|
492
492
|
if (interactive || options.reading) {
|
|
493
|
-
|
|
493
|
+
chunkLMZK4UNY_cjs.applyRenderedElementAccessibility(stage, slide.elements, {
|
|
494
494
|
presenting: options.presenting ?? false
|
|
495
495
|
});
|
|
496
496
|
}
|
|
497
497
|
if (interactive) {
|
|
498
|
-
|
|
498
|
+
chunkLMZK4UNY_cjs.applyElementActionAffordances(
|
|
499
499
|
stage,
|
|
500
500
|
slide.elements.filter(
|
|
501
|
-
(element) => options.templateEditing || !
|
|
501
|
+
(element) => options.templateEditing || !chunkLMZK4UNY_cjs.isTemplateElementId(element.id)
|
|
502
502
|
),
|
|
503
503
|
{
|
|
504
504
|
canInteract: true,
|
|
505
505
|
presenting: options.presenting ?? false,
|
|
506
|
-
labels:
|
|
506
|
+
labels: chunkLMZK4UNY_cjs.actionAffordanceLabels((key) => t(key))
|
|
507
507
|
}
|
|
508
508
|
);
|
|
509
509
|
}
|
|
@@ -559,7 +559,7 @@ function createChartTitleEditor(container, onCommit) {
|
|
|
559
559
|
|
|
560
560
|
// src/pptx/dom/elements/chart-editable.ts
|
|
561
561
|
function attachChartEditing(container, element, context, repaint) {
|
|
562
|
-
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !
|
|
562
|
+
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !chunkLMZK4UNY_cjs.canDrillDown(element)) {
|
|
563
563
|
return;
|
|
564
564
|
}
|
|
565
565
|
const chart = element;
|
|
@@ -599,7 +599,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
599
599
|
if (!rect) {
|
|
600
600
|
return;
|
|
601
601
|
}
|
|
602
|
-
const step2 =
|
|
602
|
+
const step2 = chunkLMZK4UNY_cjs.advanceChartMarkDrag(activeMark, event.clientX, event.clientY, rect);
|
|
603
603
|
if (!step2) {
|
|
604
604
|
return;
|
|
605
605
|
}
|
|
@@ -689,7 +689,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
689
689
|
seriesIndex: part.seriesIndex,
|
|
690
690
|
pointIndex: part.pointIndex
|
|
691
691
|
});
|
|
692
|
-
const startedMark =
|
|
692
|
+
const startedMark = chunkLMZK4UNY_cjs.beginChartMarkDrag({
|
|
693
693
|
part,
|
|
694
694
|
geometry: markGeometry,
|
|
695
695
|
chartData: chart.chartData,
|
|
@@ -781,7 +781,7 @@ function mountThreeViewInto(doc, wrapper, options) {
|
|
|
781
781
|
return view;
|
|
782
782
|
}
|
|
783
783
|
function isChart3DEditable(element, context) {
|
|
784
|
-
return element.type === "chart" && Boolean(context.interactive) && Boolean(context.onChartPointChange) && Boolean(context.selectedElementIds?.has(element.id)) &&
|
|
784
|
+
return element.type === "chart" && Boolean(context.interactive) && Boolean(context.onChartPointChange) && Boolean(context.selectedElementIds?.has(element.id)) && chunkLMZK4UNY_cjs.canDrillDown(element);
|
|
785
785
|
}
|
|
786
786
|
function selectedChartPartOf(element, context) {
|
|
787
787
|
return context.chartPartSelection?.elementId === element.id ? context.chartPartSelection.part : null;
|
|
@@ -823,13 +823,13 @@ function wireChartThreeViewEvents(view, element, context, badgeHost) {
|
|
|
823
823
|
const listeners = new AbortController();
|
|
824
824
|
chartViewListeners.set(view, listeners);
|
|
825
825
|
view.addEventListener(
|
|
826
|
-
|
|
827
|
-
(event) =>
|
|
826
|
+
chunkLMZK4UNY_cjs.THREE_VIEW_EVENTS.select,
|
|
827
|
+
(event) => chunkLMZK4UNY_cjs.applyChart3DSelect(bridge, event.detail.part),
|
|
828
828
|
{ signal: listeners.signal }
|
|
829
829
|
);
|
|
830
830
|
view.addEventListener(
|
|
831
|
-
|
|
832
|
-
(event) =>
|
|
831
|
+
chunkLMZK4UNY_cjs.THREE_VIEW_EVENTS.drag,
|
|
832
|
+
(event) => chunkLMZK4UNY_cjs.applyChart3DDrag(bridge, event.detail),
|
|
833
833
|
{ signal: listeners.signal }
|
|
834
834
|
);
|
|
835
835
|
}
|
|
@@ -843,7 +843,7 @@ function applyThreeViewTextStyle(el, style) {
|
|
|
843
843
|
// src/pptx/dom/elements/chart.ts
|
|
844
844
|
var renderChartElement = (element, zIndex, context) => {
|
|
845
845
|
const wrapper = renderChartSvgElement(element, zIndex, context);
|
|
846
|
-
const spec = wrapper ?
|
|
846
|
+
const spec = wrapper ? chunkLMZK4UNY_cjs.resolveChartThreeViewSpec(element, rendering3DFlagsOf(context)) : null;
|
|
847
847
|
if (!wrapper || !spec) {
|
|
848
848
|
return wrapper;
|
|
849
849
|
}
|
|
@@ -865,11 +865,11 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
865
865
|
doc,
|
|
866
866
|
"div",
|
|
867
867
|
"pptxv-element pptxv-chart",
|
|
868
|
-
|
|
868
|
+
chunkLMZK4UNY_cjs.getContainerStyle(element, zIndex)
|
|
869
869
|
);
|
|
870
870
|
container.dataset.elementId = element.id;
|
|
871
871
|
const animationState = context.presentationStates?.get(element.id);
|
|
872
|
-
const chartData = element.chartData ?
|
|
872
|
+
const chartData = element.chartData ? chunkLMZK4UNY_cjs.resolveRevealedChartData(element.chartData, animationState) : element.chartData;
|
|
873
873
|
if (!chartData || chartData.series.length === 0) {
|
|
874
874
|
container.appendChild(renderChartPlaceholder(doc, chartData?.chartType ?? "bar", context.t));
|
|
875
875
|
return container;
|
|
@@ -917,7 +917,7 @@ function renderChartPlaceholder(doc, chartType, t) {
|
|
|
917
917
|
border: "1px dashed #cbd5e1",
|
|
918
918
|
boxSizing: "border-box"
|
|
919
919
|
});
|
|
920
|
-
placeholder.textContent =
|
|
920
|
+
placeholder.textContent = chunkLMZK4UNY_cjs.chartPlaceholderLabel(chartType, (key, params) => t(key, params));
|
|
921
921
|
return placeholder;
|
|
922
922
|
}
|
|
923
923
|
|
|
@@ -981,7 +981,7 @@ function createRunBaseNode(doc, run) {
|
|
|
981
981
|
verticalAlign: "middle",
|
|
982
982
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
983
983
|
});
|
|
984
|
-
math.innerHTML =
|
|
984
|
+
math.innerHTML = chunkLMZK4UNY_cjs.runEquationMathMl(run.equation);
|
|
985
985
|
host.appendChild(math);
|
|
986
986
|
if (run.equation.number) {
|
|
987
987
|
const number = createEl(doc, "span", "pptxv-equation-number", {
|
|
@@ -993,7 +993,7 @@ function createRunBaseNode(doc, run) {
|
|
|
993
993
|
}
|
|
994
994
|
return host;
|
|
995
995
|
}
|
|
996
|
-
if (run.hyperlink &&
|
|
996
|
+
if (run.hyperlink && chunkLMZK4UNY_cjs.isRunHyperlinkClickable(run.hyperlink)) {
|
|
997
997
|
const link = createEl(doc, "a", "pptxv-link", run.style);
|
|
998
998
|
link.setAttribute("data-pptx-hyperlink", run.hyperlink.url);
|
|
999
999
|
link.setAttribute("role", "link");
|
|
@@ -1098,7 +1098,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1098
1098
|
bullet.textContent = para.bulletMarker;
|
|
1099
1099
|
p.appendChild(bullet);
|
|
1100
1100
|
}
|
|
1101
|
-
const spec = build ?
|
|
1101
|
+
const spec = build ? chunkLMZK4UNY_cjs.buildTextBuildSpec(
|
|
1102
1102
|
build.elementId,
|
|
1103
1103
|
paragraphs.indexOf(para),
|
|
1104
1104
|
para.runs.filter((run) => run.text !== NEWLINE_RUN).map((run) => ({ text: run.text, style: run.style })),
|
|
@@ -1107,7 +1107,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1107
1107
|
if (spec && spec.granularity !== "paragraph") {
|
|
1108
1108
|
for (const span of spec.spans ?? []) {
|
|
1109
1109
|
const node = createEl(doc, "span");
|
|
1110
|
-
applyStyleMap(node, { ...span.style ?? {}, ...
|
|
1110
|
+
applyStyleMap(node, { ...span.style ?? {}, ...chunkLMZK4UNY_cjs.textBuildSpanStyle(span) });
|
|
1111
1111
|
if (span.animId) {
|
|
1112
1112
|
node.setAttribute("data-anim-id", span.animId);
|
|
1113
1113
|
}
|
|
@@ -1120,7 +1120,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1120
1120
|
let runHost = p;
|
|
1121
1121
|
if (spec) {
|
|
1122
1122
|
const wrapper = createEl(doc, "span");
|
|
1123
|
-
applyStyleMap(wrapper,
|
|
1123
|
+
applyStyleMap(wrapper, chunkLMZK4UNY_cjs.textBuildSpanStyle(spec));
|
|
1124
1124
|
if (spec.animId) {
|
|
1125
1125
|
wrapper.setAttribute("data-anim-id", spec.animId);
|
|
1126
1126
|
}
|
|
@@ -1176,7 +1176,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1176
1176
|
if (element.hidden) {
|
|
1177
1177
|
wrapper.style.display = "none";
|
|
1178
1178
|
}
|
|
1179
|
-
const lineGlow =
|
|
1179
|
+
const lineGlow = chunkLMZK4UNY_cjs.getLineGlowFilterCss(ss);
|
|
1180
1180
|
if (lineGlow) {
|
|
1181
1181
|
wrapper.style.filter = lineGlow;
|
|
1182
1182
|
}
|
|
@@ -1184,7 +1184,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1184
1184
|
svg.setAttribute("style", "overflow:visible;display:block");
|
|
1185
1185
|
const seed = element.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
1186
1186
|
const defs = createSvgEl(doc, "defs");
|
|
1187
|
-
const lineShadow =
|
|
1187
|
+
const lineShadow = chunkLMZK4UNY_cjs.getLineShadowParams(ss);
|
|
1188
1188
|
const shadowId = lineShadow ? `${seed}-line-shadow` : void 0;
|
|
1189
1189
|
if (lineShadow && shadowId) {
|
|
1190
1190
|
const filter = createSvgEl(doc, "filter", {
|
|
@@ -1205,8 +1205,8 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1205
1205
|
);
|
|
1206
1206
|
defs.appendChild(filter);
|
|
1207
1207
|
}
|
|
1208
|
-
const startArrow =
|
|
1209
|
-
const endArrow =
|
|
1208
|
+
const startArrow = chunkLMZK4UNY_cjs.normalizeArrow(ss?.connectorStartArrow);
|
|
1209
|
+
const endArrow = chunkLMZK4UNY_cjs.normalizeArrow(ss?.connectorEndArrow);
|
|
1210
1210
|
const startMarkerId = startArrow ? `${seed}-start` : void 0;
|
|
1211
1211
|
const endMarkerId = endArrow ? `${seed}-end` : void 0;
|
|
1212
1212
|
if (startArrow && startMarkerId) {
|
|
@@ -1229,10 +1229,10 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1229
1229
|
svg.appendChild(defs);
|
|
1230
1230
|
}
|
|
1231
1231
|
const compound = ss?.compoundLine;
|
|
1232
|
-
const offsets =
|
|
1233
|
-
const widths =
|
|
1232
|
+
const offsets = chunkLMZK4UNY_cjs.getCompoundLineOffsets(compound, strokeWidth);
|
|
1233
|
+
const widths = chunkLMZK4UNY_cjs.getCompoundLineWidths(compound, strokeWidth);
|
|
1234
1234
|
const shapeType = pptx.hasShapeProperties(element) ? element.shapeType : void 0;
|
|
1235
|
-
const usePath =
|
|
1235
|
+
const usePath = chunkLMZK4UNY_cjs.connectorNeedsPath(shapeType) && pptx.hasShapeProperties(element);
|
|
1236
1236
|
const pathData = usePath ? pptx.getConnectorPathGeometry(element).pathData : void 0;
|
|
1237
1237
|
const x1 = element.flipHorizontal ? w : 0;
|
|
1238
1238
|
const y1 = element.flipVertical ? h : 0;
|
|
@@ -1243,7 +1243,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1243
1243
|
d: pathData ?? `M${x1},${y1} L${x2},${y2}`,
|
|
1244
1244
|
fill: "none",
|
|
1245
1245
|
stroke: "transparent",
|
|
1246
|
-
"stroke-width":
|
|
1246
|
+
"stroke-width": chunkLMZK4UNY_cjs.connectorHitStrokeWidth(strokeWidth),
|
|
1247
1247
|
"stroke-linecap": "round",
|
|
1248
1248
|
"stroke-linejoin": "round"
|
|
1249
1249
|
});
|
|
@@ -1293,7 +1293,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1293
1293
|
if (!pptx.hasTextProperties(element)) {
|
|
1294
1294
|
return;
|
|
1295
1295
|
}
|
|
1296
|
-
const paragraphs =
|
|
1296
|
+
const paragraphs = chunkLMZK4UNY_cjs.buildParagraphs(element, context.fieldContext);
|
|
1297
1297
|
if (!paragraphs.some((paragraph) => paragraph.runs.length > 0)) {
|
|
1298
1298
|
return;
|
|
1299
1299
|
}
|
|
@@ -1313,7 +1313,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1313
1313
|
}
|
|
1314
1314
|
function buildMarker(context, id, arrow, strokeColor, size) {
|
|
1315
1315
|
const doc = context.document;
|
|
1316
|
-
const shape =
|
|
1316
|
+
const shape = chunkLMZK4UNY_cjs.markerPath(arrow, size.width, size.length);
|
|
1317
1317
|
const marker = createSvgEl(doc, "marker", {
|
|
1318
1318
|
id,
|
|
1319
1319
|
viewBox: "0 0 10 10",
|
|
@@ -1397,7 +1397,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1397
1397
|
doc,
|
|
1398
1398
|
"div",
|
|
1399
1399
|
"pptxv-element pptxv-contentpart",
|
|
1400
|
-
|
|
1400
|
+
chunkLMZK4UNY_cjs.getContainerStyle(element, zIndex)
|
|
1401
1401
|
);
|
|
1402
1402
|
el.dataset.elementId = element.id;
|
|
1403
1403
|
const strokes = element.inkStrokes;
|
|
@@ -1430,7 +1430,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1430
1430
|
return el;
|
|
1431
1431
|
};
|
|
1432
1432
|
function renderEquations(element, context) {
|
|
1433
|
-
if (!pptx.hasTextProperties(element) || !
|
|
1433
|
+
if (!pptx.hasTextProperties(element) || !chunkLMZK4UNY_cjs.isEquationOnlyText(element.textSegments)) {
|
|
1434
1434
|
return null;
|
|
1435
1435
|
}
|
|
1436
1436
|
const equations = (element.textSegments ?? []).filter((segment) => segment.equationXml);
|
|
@@ -1444,7 +1444,7 @@ function renderEquations(element, context) {
|
|
|
1444
1444
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
1445
1445
|
});
|
|
1446
1446
|
for (const segment of equations) {
|
|
1447
|
-
const mathml =
|
|
1447
|
+
const mathml = chunkLMZK4UNY_cjs.convertOmmlToMathMl(segment.equationXml);
|
|
1448
1448
|
if (!mathml) {
|
|
1449
1449
|
continue;
|
|
1450
1450
|
}
|
|
@@ -1458,7 +1458,7 @@ function renderEquations(element, context) {
|
|
|
1458
1458
|
flex: 1,
|
|
1459
1459
|
textAlign: "center"
|
|
1460
1460
|
});
|
|
1461
|
-
math.innerHTML =
|
|
1461
|
+
math.innerHTML = chunkLMZK4UNY_cjs.sanitizeMathMl(mathml);
|
|
1462
1462
|
row.appendChild(math);
|
|
1463
1463
|
if (segment.equationNumber) {
|
|
1464
1464
|
const number = createEl(context.document, "span", "pptxv-equation-number", {
|
|
@@ -1476,7 +1476,7 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1476
1476
|
return null;
|
|
1477
1477
|
}
|
|
1478
1478
|
const fill = chunkVFPVEVF4_cjs.getComputedFillStyle(element)?.backgroundColor;
|
|
1479
|
-
const data =
|
|
1479
|
+
const data = chunkLMZK4UNY_cjs.build3DExtrusionData(
|
|
1480
1480
|
element.shapeStyle?.shape3d,
|
|
1481
1481
|
element.shapeStyle?.scene3d,
|
|
1482
1482
|
fill,
|
|
@@ -1538,7 +1538,7 @@ function appendOwnReflection(doc, host, element, mediaDataUrls, suppressOwnRefle
|
|
|
1538
1538
|
if (suppressOwnReflection) {
|
|
1539
1539
|
return;
|
|
1540
1540
|
}
|
|
1541
|
-
const wrapperStyle =
|
|
1541
|
+
const wrapperStyle = chunkLMZK4UNY_cjs.getComputedEffectStyle(element).reflection;
|
|
1542
1542
|
if (!wrapperStyle) {
|
|
1543
1543
|
return;
|
|
1544
1544
|
}
|
|
@@ -1562,9 +1562,9 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1562
1562
|
if (groupFilterDefs) {
|
|
1563
1563
|
wrap.appendChild(groupFilterDefs);
|
|
1564
1564
|
}
|
|
1565
|
-
const childParentFill =
|
|
1565
|
+
const childParentFill = chunkLMZK4UNY_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1566
1566
|
for (const child of element.children ?? []) {
|
|
1567
|
-
const childWrap = createEl(doc, "div", void 0,
|
|
1567
|
+
const childWrap = createEl(doc, "div", void 0, chunkLMZK4UNY_cjs.getContainerStyle(child, 0));
|
|
1568
1568
|
childWrap.appendChild(
|
|
1569
1569
|
buildReflectionMirrorContent(doc, child, mediaDataUrls, childParentFill)
|
|
1570
1570
|
);
|
|
@@ -1578,7 +1578,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1578
1578
|
height: "100%",
|
|
1579
1579
|
...getShapeFillStrokeStyle(element)
|
|
1580
1580
|
});
|
|
1581
|
-
const inheritedFill =
|
|
1581
|
+
const inheritedFill = chunkLMZK4UNY_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1582
1582
|
if (inheritedFill) {
|
|
1583
1583
|
applyInheritedFill(box, inheritedFill);
|
|
1584
1584
|
}
|
|
@@ -1599,12 +1599,12 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1599
1599
|
box.appendChild(gradientOutline);
|
|
1600
1600
|
}
|
|
1601
1601
|
if (pptx.isImageLikeElement(element)) {
|
|
1602
|
-
const src =
|
|
1602
|
+
const src = chunkLMZK4UNY_cjs.getImageSrc(element, new Map(mediaDataUrls));
|
|
1603
1603
|
if (src) {
|
|
1604
1604
|
const img = createEl(doc, "img", void 0, {
|
|
1605
1605
|
width: "100%",
|
|
1606
1606
|
height: "100%",
|
|
1607
|
-
...
|
|
1607
|
+
...chunkLMZK4UNY_cjs.getImageFitStyle(element)
|
|
1608
1608
|
});
|
|
1609
1609
|
img.setAttribute("src", src);
|
|
1610
1610
|
img.setAttribute("alt", "");
|
|
@@ -1614,7 +1614,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1614
1614
|
appendOwnReflection(doc, box, element, mediaDataUrls, suppressOwnReflection);
|
|
1615
1615
|
return box;
|
|
1616
1616
|
}
|
|
1617
|
-
const paragraphs =
|
|
1617
|
+
const paragraphs = chunkLMZK4UNY_cjs.buildParagraphs(element);
|
|
1618
1618
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
1619
1619
|
if (hasText) {
|
|
1620
1620
|
box.appendChild(renderTextBlock(doc, paragraphs, getTextBlockStyle(element)));
|
|
@@ -1626,20 +1626,20 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1626
1626
|
// src/pptx/dom/elements/shape-filter-defs.ts
|
|
1627
1627
|
var OUTLINE_SVG_STYLE = "position:absolute;inset:0;width:100%;height:100%;min-width:1px;min-height:1px;overflow:visible;pointer-events:none";
|
|
1628
1628
|
function renderShapeFilterDefs(doc, element) {
|
|
1629
|
-
const style =
|
|
1629
|
+
const style = chunkLMZK4UNY_cjs.getEffectStyleSource(element);
|
|
1630
1630
|
if (!style) {
|
|
1631
1631
|
return null;
|
|
1632
1632
|
}
|
|
1633
1633
|
const markups = [];
|
|
1634
|
-
const duotone =
|
|
1634
|
+
const duotone = chunkLMZK4UNY_cjs.getDuotoneSvgFilter(style, element.id);
|
|
1635
1635
|
if (duotone) {
|
|
1636
1636
|
markups.push(duotone.filterMarkup);
|
|
1637
1637
|
}
|
|
1638
|
-
const softEdge =
|
|
1638
|
+
const softEdge = chunkLMZK4UNY_cjs.getSoftEdgeSvgFilter(style, element.id);
|
|
1639
1639
|
if (softEdge) {
|
|
1640
1640
|
markups.push(softEdge.filterMarkup);
|
|
1641
1641
|
}
|
|
1642
|
-
const bevelLighting =
|
|
1642
|
+
const bevelLighting = chunkLMZK4UNY_cjs.getBevelLightingSvgFilter(element);
|
|
1643
1643
|
if (bevelLighting) {
|
|
1644
1644
|
markups.push(bevelLighting.filterMarkup);
|
|
1645
1645
|
}
|
|
@@ -1657,7 +1657,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1657
1657
|
if (!pptx.hasShapeProperties(element)) {
|
|
1658
1658
|
return null;
|
|
1659
1659
|
}
|
|
1660
|
-
const overlay =
|
|
1660
|
+
const overlay = chunkLMZK4UNY_cjs.getComputedEffectStyle(element).fillOverlay;
|
|
1661
1661
|
if (!overlay) {
|
|
1662
1662
|
return null;
|
|
1663
1663
|
}
|
|
@@ -1672,7 +1672,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1672
1672
|
return layer;
|
|
1673
1673
|
}
|
|
1674
1674
|
function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
1675
|
-
const wrapperStyle =
|
|
1675
|
+
const wrapperStyle = chunkLMZK4UNY_cjs.getComputedEffectStyle(element).reflection;
|
|
1676
1676
|
if (!wrapperStyle) {
|
|
1677
1677
|
return null;
|
|
1678
1678
|
}
|
|
@@ -1682,13 +1682,13 @@ function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
|
1682
1682
|
return layer;
|
|
1683
1683
|
}
|
|
1684
1684
|
function renderHollowHitOutline(doc, element) {
|
|
1685
|
-
const hit =
|
|
1685
|
+
const hit = chunkLMZK4UNY_cjs.buildHollowHitOutline(element);
|
|
1686
1686
|
if (!hit) {
|
|
1687
1687
|
return null;
|
|
1688
1688
|
}
|
|
1689
1689
|
const svg = createSvgEl(doc, "svg", {
|
|
1690
1690
|
"aria-hidden": "true",
|
|
1691
|
-
viewBox:
|
|
1691
|
+
viewBox: chunkLMZK4UNY_cjs.strokeOutlineViewBox(element),
|
|
1692
1692
|
preserveAspectRatio: "none"
|
|
1693
1693
|
});
|
|
1694
1694
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
@@ -1721,20 +1721,20 @@ function renderShapeSubpathFillOverlay(doc, element) {
|
|
|
1721
1721
|
return svg;
|
|
1722
1722
|
}
|
|
1723
1723
|
function renderStrokeOutline(doc, element) {
|
|
1724
|
-
const outline =
|
|
1724
|
+
const outline = chunkLMZK4UNY_cjs.buildStrokeOutline(element);
|
|
1725
1725
|
if (!outline) {
|
|
1726
1726
|
return null;
|
|
1727
1727
|
}
|
|
1728
1728
|
const svg = createSvgEl(doc, "svg", {
|
|
1729
1729
|
class: "pptx-vanilla-gradient-outline",
|
|
1730
1730
|
"aria-hidden": "true",
|
|
1731
|
-
viewBox:
|
|
1731
|
+
viewBox: chunkLMZK4UNY_cjs.strokeOutlineViewBox(element),
|
|
1732
1732
|
preserveAspectRatio: "none"
|
|
1733
1733
|
});
|
|
1734
1734
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
1735
1735
|
if (outline.paint) {
|
|
1736
1736
|
const defs = createSvgEl(doc, "defs");
|
|
1737
|
-
if (
|
|
1737
|
+
if (chunkLMZK4UNY_cjs.isPatternPaint(outline.paint)) {
|
|
1738
1738
|
const pattern = createSvgEl(doc, "pattern", {
|
|
1739
1739
|
id: outline.paint.id,
|
|
1740
1740
|
width: outline.paint.width,
|
|
@@ -1749,7 +1749,7 @@ function renderStrokeOutline(doc, element) {
|
|
|
1749
1749
|
pattern.appendChild(image);
|
|
1750
1750
|
defs.appendChild(pattern);
|
|
1751
1751
|
} else {
|
|
1752
|
-
defs.innerHTML =
|
|
1752
|
+
defs.innerHTML = chunkLMZK4UNY_cjs.svgGradientMarkup(outline.paint);
|
|
1753
1753
|
}
|
|
1754
1754
|
svg.appendChild(defs);
|
|
1755
1755
|
}
|
|
@@ -1800,14 +1800,14 @@ function indexRenderedNodes(root) {
|
|
|
1800
1800
|
return byId;
|
|
1801
1801
|
}
|
|
1802
1802
|
function paintInheritedFill(node, element, parentGroupFill) {
|
|
1803
|
-
const inherited =
|
|
1803
|
+
const inherited = chunkLMZK4UNY_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1804
1804
|
if (inherited) {
|
|
1805
1805
|
applyGroupChildFill(node, inherited);
|
|
1806
1806
|
}
|
|
1807
1807
|
if (element.type !== "group") {
|
|
1808
1808
|
return;
|
|
1809
1809
|
}
|
|
1810
|
-
const childFill =
|
|
1810
|
+
const childFill = chunkLMZK4UNY_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1811
1811
|
if (!childFill) {
|
|
1812
1812
|
return;
|
|
1813
1813
|
}
|
|
@@ -1821,7 +1821,7 @@ function paintInheritedFill(node, element, parentGroupFill) {
|
|
|
1821
1821
|
}
|
|
1822
1822
|
var renderGroupElement = (element, zIndex, context) => {
|
|
1823
1823
|
const el = createEl(context.document, "div", "pptxv-element pptxv-group", {
|
|
1824
|
-
...
|
|
1824
|
+
...chunkLMZK4UNY_cjs.getContainerStyle(element, zIndex),
|
|
1825
1825
|
// A group paints no fill/outline of its own, but `p:grpSpPr/a:effectLst`
|
|
1826
1826
|
// DOES carry a shadow/glow/soft-edge for the group's own composite
|
|
1827
1827
|
// raster (see shared `getComputedEffectStyle`), expressed as `filter` /
|
|
@@ -1838,7 +1838,7 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1838
1838
|
el.appendChild(reflection);
|
|
1839
1839
|
}
|
|
1840
1840
|
if (element.type === "group" && element.children?.length) {
|
|
1841
|
-
const parentGroupFill =
|
|
1841
|
+
const parentGroupFill = chunkLMZK4UNY_cjs.getGroupChildParentFill(element);
|
|
1842
1842
|
element.children.forEach((child, index) => {
|
|
1843
1843
|
const childEl = context.renderElement(child, index);
|
|
1844
1844
|
if (childEl) {
|
|
@@ -1853,16 +1853,16 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1853
1853
|
// src/pptx/dom/elements/image.ts
|
|
1854
1854
|
var renderImageElement = (element, zIndex, context) => {
|
|
1855
1855
|
const doc = context.document;
|
|
1856
|
-
const geometry = element.type === "image" || element.type === "picture" ?
|
|
1856
|
+
const geometry = element.type === "image" || element.type === "picture" ? chunkLMZK4UNY_cjs.resolveShapeGeometry(element) : void 0;
|
|
1857
1857
|
const geometryClipPath = geometry?.kind === "clipPath" ? geometry.clipPath : void 0;
|
|
1858
|
-
const cropShapeClipPath = element.type === "image" || element.type === "picture" ?
|
|
1859
|
-
const layers =
|
|
1860
|
-
overflow:
|
|
1858
|
+
const cropShapeClipPath = element.type === "image" || element.type === "picture" ? chunkLMZK4UNY_cjs.getCropShapeClipPath(element.cropShape, element.width, element.height) : void 0;
|
|
1859
|
+
const layers = chunkLMZK4UNY_cjs.getPictureFrameLayers(element, {
|
|
1860
|
+
overflow: chunkLMZK4UNY_cjs.getImageOverflow(element),
|
|
1861
1861
|
borderRadius: geometry?.kind === "borderRadius" ? geometry.radius : void 0,
|
|
1862
1862
|
clipPath: geometryClipPath ?? cropShapeClipPath
|
|
1863
1863
|
});
|
|
1864
1864
|
const el = createEl(doc, "div", "pptxv-element pptxv-image", {
|
|
1865
|
-
...
|
|
1865
|
+
...chunkLMZK4UNY_cjs.getContainerStyle(element, zIndex),
|
|
1866
1866
|
...layers.box
|
|
1867
1867
|
});
|
|
1868
1868
|
el.dataset.elementId = element.id;
|
|
@@ -1874,11 +1874,11 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1874
1874
|
el.appendChild(outline);
|
|
1875
1875
|
}
|
|
1876
1876
|
}
|
|
1877
|
-
const src =
|
|
1877
|
+
const src = chunkLMZK4UNY_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
1878
1878
|
if (!src) {
|
|
1879
1879
|
return el;
|
|
1880
1880
|
}
|
|
1881
|
-
const fx =
|
|
1881
|
+
const fx = chunkLMZK4UNY_cjs.getComputedImageStyle(element);
|
|
1882
1882
|
for (const f of fx.svgFilters) {
|
|
1883
1883
|
const svg = createSvgEl(doc, "svg", { width: 0, height: 0, "aria-hidden": "true" });
|
|
1884
1884
|
svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden");
|
|
@@ -1891,7 +1891,7 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1891
1891
|
surface.appendChild(svg);
|
|
1892
1892
|
}
|
|
1893
1893
|
const reflection = renderReflectionOverlay(doc, element, context.mediaDataUrls);
|
|
1894
|
-
const tiling =
|
|
1894
|
+
const tiling = chunkLMZK4UNY_cjs.getImageTilingStyle(element, chunkLMZK4UNY_cjs.getCachedNativeImageSize(src));
|
|
1895
1895
|
if (tiling) {
|
|
1896
1896
|
const tile = createEl(doc, "div", "pptxv-image-tile", tiling);
|
|
1897
1897
|
if (fx.filter) {
|
|
@@ -1900,10 +1900,10 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1900
1900
|
if (fx.opacity !== void 0) {
|
|
1901
1901
|
tile.style.opacity = String(fx.opacity);
|
|
1902
1902
|
}
|
|
1903
|
-
if (!
|
|
1904
|
-
void
|
|
1903
|
+
if (!chunkLMZK4UNY_cjs.getCachedNativeImageSize(src)) {
|
|
1904
|
+
void chunkLMZK4UNY_cjs.probeNativeImageSize(src).then((size) => {
|
|
1905
1905
|
if (size) {
|
|
1906
|
-
applyStyleMap(tile,
|
|
1906
|
+
applyStyleMap(tile, chunkLMZK4UNY_cjs.getImageTilingStyle(element, size) ?? {});
|
|
1907
1907
|
}
|
|
1908
1908
|
return void 0;
|
|
1909
1909
|
});
|
|
@@ -1914,8 +1914,8 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1914
1914
|
}
|
|
1915
1915
|
return el;
|
|
1916
1916
|
}
|
|
1917
|
-
const fit =
|
|
1918
|
-
const fillCounterTransform =
|
|
1917
|
+
const fit = chunkLMZK4UNY_cjs.getImageFitStyle(element);
|
|
1918
|
+
const fillCounterTransform = chunkLMZK4UNY_cjs.getImageFillCounterTransform(element, Boolean(fit.transform));
|
|
1919
1919
|
const img = createEl(doc, "img", void 0, {
|
|
1920
1920
|
...fit,
|
|
1921
1921
|
display: "block",
|
|
@@ -1934,14 +1934,14 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1934
1934
|
if (element.type === "image" || element.type === "picture") {
|
|
1935
1935
|
const clrChange = element.imageEffects?.clrChange;
|
|
1936
1936
|
if (clrChange) {
|
|
1937
|
-
void
|
|
1937
|
+
void chunkLMZK4UNY_cjs.resolveColorChangedImageSource(src, clrChange).then((resolved) => {
|
|
1938
1938
|
if (img.src === src || img.getAttribute("src") === src) {
|
|
1939
1939
|
img.src = resolved;
|
|
1940
1940
|
}
|
|
1941
1941
|
return void 0;
|
|
1942
1942
|
});
|
|
1943
1943
|
}
|
|
1944
|
-
const wash =
|
|
1944
|
+
const wash = chunkLMZK4UNY_cjs.getImageColorWashStyle(element.imageEffects?.colorWash);
|
|
1945
1945
|
if (wash) {
|
|
1946
1946
|
surface.appendChild(
|
|
1947
1947
|
createEl(doc, "div", "pptxv-image-color-wash", {
|
|
@@ -1970,7 +1970,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1970
1970
|
doc,
|
|
1971
1971
|
"div",
|
|
1972
1972
|
"pptxv-element pptxv-ink",
|
|
1973
|
-
|
|
1973
|
+
chunkLMZK4UNY_cjs.getContainerStyle(element, zIndex)
|
|
1974
1974
|
);
|
|
1975
1975
|
wrapper.dataset.elementId = element.id;
|
|
1976
1976
|
const paths = element.inkPaths;
|
|
@@ -1991,7 +1991,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1991
1991
|
keyframes.textContent = chunkNTXHQHCS_cjs.INK_REPLAY_KEYFRAMES;
|
|
1992
1992
|
svg.appendChild(keyframes);
|
|
1993
1993
|
}
|
|
1994
|
-
const views =
|
|
1994
|
+
const views = chunkLMZK4UNY_cjs.buildInkGroupStrokes(element, { color: chunkVFPVEVF4_cjs.DEFAULT_STROKE_COLOR, width: 1 });
|
|
1995
1995
|
for (const [i, view] of views.entries()) {
|
|
1996
1996
|
svg.appendChild(buildStrokeSvg(doc, view, replayStyles[i]));
|
|
1997
1997
|
}
|
|
@@ -2045,12 +2045,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2045
2045
|
let stopButton = null;
|
|
2046
2046
|
const update = (playing) => {
|
|
2047
2047
|
const input = { fullScreen: element.fullScreen, presenting: context.presenting, playing };
|
|
2048
|
-
const active =
|
|
2048
|
+
const active = chunkLMZK4UNY_cjs.isMediaFullscreenActive(input);
|
|
2049
2049
|
applyStyleMap(
|
|
2050
2050
|
container,
|
|
2051
|
-
active ?
|
|
2051
|
+
active ? chunkLMZK4UNY_cjs.MEDIA_FULLSCREEN_OVERLAY_STYLE : mediaFullscreenResetStyle(baseStyle)
|
|
2052
2052
|
);
|
|
2053
|
-
if (
|
|
2053
|
+
if (chunkLMZK4UNY_cjs.shouldShowMediaFullscreenStopButton(input)) {
|
|
2054
2054
|
if (!stopButton) {
|
|
2055
2055
|
stopButton = buildFullscreenStopButton(
|
|
2056
2056
|
doc,
|
|
@@ -2075,12 +2075,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2075
2075
|
|
|
2076
2076
|
// src/pptx/dom/elements/media.ts
|
|
2077
2077
|
function applyMediaPresentingState(el, presenting, playback) {
|
|
2078
|
-
|
|
2078
|
+
chunkLMZK4UNY_cjs.applyMediaPlaybackAttributes(el, playback);
|
|
2079
2079
|
if (presenting) {
|
|
2080
|
-
|
|
2081
|
-
|
|
2080
|
+
chunkLMZK4UNY_cjs.startMediaAutoplay(el, { trimStartMs: playback.trimStartMs });
|
|
2081
|
+
chunkLMZK4UNY_cjs.scheduleMediaTrimAndFade(el, {
|
|
2082
2082
|
...playback,
|
|
2083
|
-
volume:
|
|
2083
|
+
volume: chunkLMZK4UNY_cjs.mediaPlaybackAttributes(playback).volume
|
|
2084
2084
|
});
|
|
2085
2085
|
} else if (!el.paused) {
|
|
2086
2086
|
el.pause();
|
|
@@ -2090,18 +2090,18 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2090
2090
|
if (element.type !== "media") {
|
|
2091
2091
|
return null;
|
|
2092
2092
|
}
|
|
2093
|
-
const surface =
|
|
2093
|
+
const surface = chunkLMZK4UNY_cjs.mediaSurfaceOf({
|
|
2094
2094
|
interactive: context.interactive === true || context.reading === true,
|
|
2095
2095
|
presenting: context.presenting
|
|
2096
2096
|
});
|
|
2097
|
-
const showTransport =
|
|
2097
|
+
const showTransport = chunkLMZK4UNY_cjs.mediaTransportVisible({ ...surface, canvasTransport: true });
|
|
2098
2098
|
const doc = context.document;
|
|
2099
|
-
const baseStyle =
|
|
2099
|
+
const baseStyle = chunkLMZK4UNY_cjs.getContainerStyle(element, zIndex);
|
|
2100
2100
|
const el = createEl(doc, "div", "pptxv-element pptxv-media", baseStyle);
|
|
2101
2101
|
el.dataset.elementId = element.id;
|
|
2102
2102
|
const mediaSrc = element.mediaData ?? (element.mediaPath ? context.mediaDataUrls.get(element.mediaPath) : void 0);
|
|
2103
|
-
const posterSrc =
|
|
2104
|
-
const onlineVideoEmbedUrl =
|
|
2103
|
+
const posterSrc = chunkLMZK4UNY_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
2104
|
+
const onlineVideoEmbedUrl = chunkLMZK4UNY_cjs.getOnlineVideoEmbed(element)?.embedUrl;
|
|
2105
2105
|
if (onlineVideoEmbedUrl && element.mediaType === "video") {
|
|
2106
2106
|
const iframe = createEl(doc, "iframe", "pptxv-media-video pptxv-media-iframe", {
|
|
2107
2107
|
width: "100%",
|
|
@@ -2111,8 +2111,8 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2111
2111
|
});
|
|
2112
2112
|
iframe.src = onlineVideoEmbedUrl;
|
|
2113
2113
|
iframe.title = context.t("pptx.media.onlineVideoTitle");
|
|
2114
|
-
iframe.allow =
|
|
2115
|
-
iframe.sandbox.value =
|
|
2114
|
+
iframe.allow = chunkLMZK4UNY_cjs.ONLINE_VIDEO_IFRAME_ALLOW;
|
|
2115
|
+
iframe.sandbox.value = chunkLMZK4UNY_cjs.ONLINE_VIDEO_IFRAME_SANDBOX;
|
|
2116
2116
|
iframe.allowFullscreen = true;
|
|
2117
2117
|
el.appendChild(iframe);
|
|
2118
2118
|
return el;
|
|
@@ -2141,21 +2141,21 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2141
2141
|
audio.src = mediaSrc;
|
|
2142
2142
|
audio.controls = showTransport;
|
|
2143
2143
|
el.appendChild(audio);
|
|
2144
|
-
if (context.presenting &&
|
|
2144
|
+
if (context.presenting && chunkLMZK4UNY_cjs.registerCrossSlideAudio(element, mediaSrc)) {
|
|
2145
2145
|
audio.muted = true;
|
|
2146
|
-
|
|
2146
|
+
chunkLMZK4UNY_cjs.applyMediaPlaybackAttributes(audio, element);
|
|
2147
2147
|
return el;
|
|
2148
2148
|
}
|
|
2149
2149
|
applyMediaPresentingState(audio, context.presenting, element);
|
|
2150
2150
|
wireMediaFullscreenOverlay(doc, el, audio, element, context, baseStyle);
|
|
2151
2151
|
return el;
|
|
2152
2152
|
}
|
|
2153
|
-
const fallback =
|
|
2153
|
+
const fallback = chunkLMZK4UNY_cjs.mediaFallbackVisual(surface, {
|
|
2154
2154
|
hasPoster: Boolean(posterSrc),
|
|
2155
2155
|
missing: element.mediaMissing === true
|
|
2156
2156
|
});
|
|
2157
|
-
const icon =
|
|
2158
|
-
const labelKey =
|
|
2157
|
+
const icon = chunkLMZK4UNY_cjs.mediaFallbackIcon(fallback, element.mediaType);
|
|
2158
|
+
const labelKey = chunkLMZK4UNY_cjs.mediaFallbackLabelKey(fallback, element.mediaType);
|
|
2159
2159
|
if (fallback.poster && posterSrc) {
|
|
2160
2160
|
const img = createEl(doc, "img", "pptxv-media-poster", {
|
|
2161
2161
|
width: "100%",
|
|
@@ -2173,7 +2173,7 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2173
2173
|
if (fallback.badge === "missing") {
|
|
2174
2174
|
badge.classList.add("pptxv-media-badge-missing");
|
|
2175
2175
|
}
|
|
2176
|
-
badge.setAttribute(
|
|
2176
|
+
badge.setAttribute(chunkLMZK4UNY_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.badge);
|
|
2177
2177
|
badge.appendChild(buildIcon(doc, icon));
|
|
2178
2178
|
if (labelKey !== void 0 && fallback.badge === "missing") {
|
|
2179
2179
|
const text = createEl(doc, "span");
|
|
@@ -2186,7 +2186,7 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2186
2186
|
}
|
|
2187
2187
|
if (fallback.placeholder !== "none") {
|
|
2188
2188
|
el.classList.add("pptxv-placeholder", "pptxv-media-placeholder");
|
|
2189
|
-
el.setAttribute(
|
|
2189
|
+
el.setAttribute(chunkLMZK4UNY_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.placeholder);
|
|
2190
2190
|
if (icon.length > 0) {
|
|
2191
2191
|
el.appendChild(buildIcon(doc, icon));
|
|
2192
2192
|
}
|
|
@@ -2222,7 +2222,7 @@ var renderModel3dElement = (element, zIndex, context) => {
|
|
|
2222
2222
|
doc,
|
|
2223
2223
|
"div",
|
|
2224
2224
|
"pptxv-element pptxv-model3d",
|
|
2225
|
-
|
|
2225
|
+
chunkLMZK4UNY_cjs.getContainerStyle(element, zIndex)
|
|
2226
2226
|
);
|
|
2227
2227
|
el.dataset.elementId = element.id;
|
|
2228
2228
|
const label = context.t("pptx.model3d.label");
|
|
@@ -2359,7 +2359,7 @@ function buildOleIcon(doc, type, color) {
|
|
|
2359
2359
|
fill: "none",
|
|
2360
2360
|
"aria-hidden": "true"
|
|
2361
2361
|
});
|
|
2362
|
-
for (const shape of
|
|
2362
|
+
for (const shape of chunkLMZK4UNY_cjs.getOleIconShapes(type)) {
|
|
2363
2363
|
const node = createSvgEl(doc, shape.tag, shape.attrs);
|
|
2364
2364
|
if (shape.tag === "text") {
|
|
2365
2365
|
node.setAttribute("fill", color);
|
|
@@ -2378,21 +2378,21 @@ var renderOleElement = (element, zIndex, context) => {
|
|
|
2378
2378
|
return null;
|
|
2379
2379
|
}
|
|
2380
2380
|
const doc = context.document;
|
|
2381
|
-
const oleType =
|
|
2382
|
-
const typeColor =
|
|
2383
|
-
const typeLabel =
|
|
2384
|
-
const el = createEl(doc, "div", "pptxv-element pptxv-ole",
|
|
2381
|
+
const oleType = chunkLMZK4UNY_cjs.resolveOleType(element);
|
|
2382
|
+
const typeColor = chunkLMZK4UNY_cjs.getOleTypeColor(oleType);
|
|
2383
|
+
const typeLabel = chunkLMZK4UNY_cjs.getOleTypeLabel(oleType);
|
|
2384
|
+
const el = createEl(doc, "div", "pptxv-element pptxv-ole", chunkLMZK4UNY_cjs.getContainerStyle(element, zIndex));
|
|
2385
2385
|
el.dataset.elementId = element.id;
|
|
2386
2386
|
el.setAttribute("role", "group");
|
|
2387
|
-
el.setAttribute("aria-label",
|
|
2387
|
+
el.setAttribute("aria-label", chunkLMZK4UNY_cjs.getOleAriaLabel(element));
|
|
2388
2388
|
el.title = infoLines(element, typeLabel).join("\n");
|
|
2389
2389
|
if (element.previewImageData) {
|
|
2390
|
-
el.appendChild(buildPreview(doc, element, typeColor,
|
|
2390
|
+
el.appendChild(buildPreview(doc, element, typeColor, chunkLMZK4UNY_cjs.getOleBadgeLabel(oleType)));
|
|
2391
2391
|
} else {
|
|
2392
2392
|
el.appendChild(buildPlaceholder2(doc, element, oleType, typeColor, typeLabel));
|
|
2393
2393
|
}
|
|
2394
|
-
const showActions =
|
|
2395
|
-
|
|
2394
|
+
const showActions = chunkLMZK4UNY_cjs.oleActionsVisible(
|
|
2395
|
+
chunkLMZK4UNY_cjs.mediaSurfaceOf({
|
|
2396
2396
|
interactive: context.interactive === true,
|
|
2397
2397
|
presenting: context.presenting
|
|
2398
2398
|
})
|
|
@@ -2408,7 +2408,7 @@ function infoLines(el, typeLabel) {
|
|
|
2408
2408
|
if (name) {
|
|
2409
2409
|
lines.push(name);
|
|
2410
2410
|
}
|
|
2411
|
-
const size =
|
|
2411
|
+
const size = chunkLMZK4UNY_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2412
2412
|
if (size) {
|
|
2413
2413
|
lines.push(size);
|
|
2414
2414
|
}
|
|
@@ -2432,7 +2432,7 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2432
2432
|
display: "block"
|
|
2433
2433
|
});
|
|
2434
2434
|
img.src = el.previewImageData ?? "";
|
|
2435
|
-
img.alt =
|
|
2435
|
+
img.alt = chunkLMZK4UNY_cjs.getOleAriaLabel(el);
|
|
2436
2436
|
img.draggable = false;
|
|
2437
2437
|
preview.appendChild(img);
|
|
2438
2438
|
const badge = createSvgEl(doc, "svg", { width: 24, height: 24, viewBox: "0 0 24 24" });
|
|
@@ -2459,7 +2459,7 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2459
2459
|
}
|
|
2460
2460
|
function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
2461
2461
|
const box = createEl(doc, "div", "pptxv-ole-placeholder", {
|
|
2462
|
-
...
|
|
2462
|
+
...chunkLMZK4UNY_cjs.getPlaceholderStyle(oleType),
|
|
2463
2463
|
width: "100%",
|
|
2464
2464
|
height: "100%",
|
|
2465
2465
|
display: "flex",
|
|
@@ -2480,7 +2480,7 @@ function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
|
2480
2480
|
whiteSpace: "nowrap",
|
|
2481
2481
|
color: typeColor
|
|
2482
2482
|
});
|
|
2483
|
-
name.textContent =
|
|
2483
|
+
name.textContent = chunkLMZK4UNY_cjs.getOleDisplayName(el);
|
|
2484
2484
|
box.appendChild(name);
|
|
2485
2485
|
if (el.fileName) {
|
|
2486
2486
|
const sublabel = createEl(doc, "span", "pptxv-ole-sublabel", {
|
|
@@ -2532,7 +2532,7 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2532
2532
|
for (const type of ["pointerdown", "mousedown", "click"]) {
|
|
2533
2533
|
bar.addEventListener(type, (event) => event.stopPropagation());
|
|
2534
2534
|
}
|
|
2535
|
-
const size =
|
|
2535
|
+
const size = chunkLMZK4UNY_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2536
2536
|
if (size) {
|
|
2537
2537
|
const meta = createEl(doc, "span", "pptxv-ole-meta", {
|
|
2538
2538
|
marginRight: "auto",
|
|
@@ -2552,14 +2552,14 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2552
2552
|
download.title = downloadTitle;
|
|
2553
2553
|
download.textContent = context.t("pptx.ole.download");
|
|
2554
2554
|
bar.appendChild(download);
|
|
2555
|
-
if (
|
|
2555
|
+
if (chunkLMZK4UNY_cjs.isBrowserOpenableMime(el.oleEmbeddedMimeType)) {
|
|
2556
2556
|
const open = createEl(doc, "button", "pptxv-ole-action", ACTION_STYLE);
|
|
2557
2557
|
open.type = "button";
|
|
2558
2558
|
const openTitle = context.t("pptx.ole.openName", { name: downloadName });
|
|
2559
2559
|
open.setAttribute("aria-label", openTitle);
|
|
2560
2560
|
open.title = openTitle;
|
|
2561
2561
|
open.textContent = context.t("pptx.ole.open");
|
|
2562
|
-
open.addEventListener("click", () =>
|
|
2562
|
+
open.addEventListener("click", () => chunkLMZK4UNY_cjs.openUrlInNewTab(data));
|
|
2563
2563
|
bar.appendChild(open);
|
|
2564
2564
|
}
|
|
2565
2565
|
return bar;
|
|
@@ -2571,7 +2571,7 @@ var renderPlaceholderElement = (element, zIndex, context) => {
|
|
|
2571
2571
|
context.document,
|
|
2572
2572
|
"div",
|
|
2573
2573
|
"pptxv-element pptxv-placeholder",
|
|
2574
|
-
|
|
2574
|
+
chunkLMZK4UNY_cjs.getContainerStyle(element, zIndex)
|
|
2575
2575
|
);
|
|
2576
2576
|
el.dataset.elementId = element.id;
|
|
2577
2577
|
el.dataset.elementType = element.type;
|
|
@@ -2587,7 +2587,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2587
2587
|
return null;
|
|
2588
2588
|
}
|
|
2589
2589
|
const doc = context.document;
|
|
2590
|
-
const summaryView =
|
|
2590
|
+
const summaryView = chunkLMZK4UNY_cjs.buildSummaryZoomView(
|
|
2591
2591
|
element,
|
|
2592
2592
|
(index) => {
|
|
2593
2593
|
const slide = context.slides?.[index];
|
|
@@ -2607,7 +2607,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2607
2607
|
doc,
|
|
2608
2608
|
"div",
|
|
2609
2609
|
"pptxv-element pptxv-zoom pptxv-summary-zoom",
|
|
2610
|
-
|
|
2610
|
+
chunkLMZK4UNY_cjs.getContainerStyle(element, zIndex)
|
|
2611
2611
|
);
|
|
2612
2612
|
const content = createEl(doc, "div", "pptxv-summary-zoom-content", summaryView.containerStyle);
|
|
2613
2613
|
root.dataset.elementId = element.id;
|
|
@@ -2674,7 +2674,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2674
2674
|
const target = element.targetSlideIndex ?? 0;
|
|
2675
2675
|
const targetSlide = context.slides?.[target];
|
|
2676
2676
|
const interactive = context.presenting && context.onZoomClick !== void 0;
|
|
2677
|
-
const el = createEl(doc, "div", "pptxv-element pptxv-zoom",
|
|
2677
|
+
const el = createEl(doc, "div", "pptxv-element pptxv-zoom", chunkLMZK4UNY_cjs.getContainerStyle(element, zIndex));
|
|
2678
2678
|
el.dataset.elementId = element.id;
|
|
2679
2679
|
el.dataset.zoomType = zoomType;
|
|
2680
2680
|
el.dataset.zoomTarget = String(target);
|
|
@@ -2684,7 +2684,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2684
2684
|
el.tabIndex = 0;
|
|
2685
2685
|
el.style.cursor = "pointer";
|
|
2686
2686
|
const activate = () => {
|
|
2687
|
-
const zoomTarget =
|
|
2687
|
+
const zoomTarget = chunkLMZK4UNY_cjs.resolveZoomNavigationTarget(element);
|
|
2688
2688
|
if (zoomTarget) {
|
|
2689
2689
|
context.onZoomClick?.(zoomTarget, context.currentSlideIndex ?? 0);
|
|
2690
2690
|
}
|
|
@@ -2799,7 +2799,7 @@ function registerExtraRenderers(registry) {
|
|
|
2799
2799
|
// src/pptx/dom/elements/smartart-3d.ts
|
|
2800
2800
|
var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
2801
2801
|
const wrapper = renderSmartArtSvg(element, zIndex, context);
|
|
2802
|
-
const spec = wrapper ?
|
|
2802
|
+
const spec = wrapper ? chunkLMZK4UNY_cjs.resolveSmartArtThreeViewSpec(element, context.smartArt3D) : null;
|
|
2803
2803
|
if (!wrapper || !spec) {
|
|
2804
2804
|
return wrapper;
|
|
2805
2805
|
}
|
|
@@ -2809,18 +2809,18 @@ var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
|
2809
2809
|
textStyle: context.presentationStates?.get(element.id)?.textStyle
|
|
2810
2810
|
});
|
|
2811
2811
|
if (context.onSmartArtNodeTextChange && context.interactive && !context.presenting) {
|
|
2812
|
-
const layer = renderSmartArtSvg(
|
|
2812
|
+
const layer = renderSmartArtSvg(chunkLMZK4UNY_cjs.elementInLocalFrame(element), 0, context);
|
|
2813
2813
|
if (layer) {
|
|
2814
2814
|
layer.classList.add("pptxv-smartart-3d-edit-layer");
|
|
2815
2815
|
layer.setAttribute("data-smartart-3d-edit-layer", "true");
|
|
2816
|
-
|
|
2816
|
+
chunkLMZK4UNY_cjs.stripEditLayerMarkers(layer);
|
|
2817
2817
|
layer.setAttribute("aria-hidden", "true");
|
|
2818
2818
|
Object.assign(layer.style, { position: "absolute", inset: "0", zIndex: "1" });
|
|
2819
2819
|
for (const svg of layer.querySelectorAll("svg")) {
|
|
2820
2820
|
svg.style.opacity = "0";
|
|
2821
2821
|
}
|
|
2822
2822
|
wrapper.appendChild(layer);
|
|
2823
|
-
|
|
2823
|
+
chunkLMZK4UNY_cjs.routeEditLayerPointerToNodes(layer);
|
|
2824
2824
|
}
|
|
2825
2825
|
}
|
|
2826
2826
|
return wrapper;
|
|
@@ -2833,7 +2833,7 @@ function nodeTarget(target) {
|
|
|
2833
2833
|
}
|
|
2834
2834
|
function enableSmartArtEditing(chrome, element, context) {
|
|
2835
2835
|
const data = element.smartArtData;
|
|
2836
|
-
if (!data || !context.onSmartArtNodeTextChange && !context.onSmartArtNodeFillChange || !
|
|
2836
|
+
if (!data || !context.onSmartArtNodeTextChange && !context.onSmartArtNodeFillChange || !chunkLMZK4UNY_cjs.canDrillDown(element)) {
|
|
2837
2837
|
return;
|
|
2838
2838
|
}
|
|
2839
2839
|
let editor = null;
|
|
@@ -2855,8 +2855,8 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2855
2855
|
}
|
|
2856
2856
|
event.stopPropagation();
|
|
2857
2857
|
const textNode = target.querySelector("text");
|
|
2858
|
-
const textRect = textNode ?
|
|
2859
|
-
const rect = textRect && textRect.width > 0 ? textRect :
|
|
2858
|
+
const textRect = textNode ? chunkLMZK4UNY_cjs.measureSvgViewportRect(textNode) : null;
|
|
2859
|
+
const rect = textRect && textRect.width > 0 ? textRect : chunkLMZK4UNY_cjs.measureSvgViewportRect(target);
|
|
2860
2860
|
if (!rect) {
|
|
2861
2861
|
return;
|
|
2862
2862
|
}
|
|
@@ -2880,7 +2880,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2880
2880
|
textAlign: "center"
|
|
2881
2881
|
});
|
|
2882
2882
|
editor = input;
|
|
2883
|
-
input.value =
|
|
2883
|
+
input.value = chunkLMZK4UNY_cjs.findSmartArtNodeText(data, nodeId) ?? "";
|
|
2884
2884
|
const commit = () => {
|
|
2885
2885
|
if (input !== editor) {
|
|
2886
2886
|
return;
|
|
@@ -2912,7 +2912,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2912
2912
|
}
|
|
2913
2913
|
cancelHide();
|
|
2914
2914
|
swatches?.remove();
|
|
2915
|
-
const rect =
|
|
2915
|
+
const rect = chunkLMZK4UNY_cjs.measureSvgViewportRect(target);
|
|
2916
2916
|
if (!rect) {
|
|
2917
2917
|
return;
|
|
2918
2918
|
}
|
|
@@ -2931,7 +2931,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2931
2931
|
});
|
|
2932
2932
|
swatches.setAttribute("role", "group");
|
|
2933
2933
|
swatches.setAttribute("aria-label", context.t("pptx.smartArt.fillColor"));
|
|
2934
|
-
for (const color of
|
|
2934
|
+
for (const color of chunkLMZK4UNY_cjs.resolvePalette(data).slice(0, 6)) {
|
|
2935
2935
|
const button = createEl(chrome.ownerDocument, "button", "", {
|
|
2936
2936
|
width: "18px",
|
|
2937
2937
|
height: "18px",
|
|
@@ -3030,7 +3030,7 @@ function buildSmartArtFallbackSvg(doc, layout, a11yNodes = [], nodeIds = []) {
|
|
|
3030
3030
|
svg.setAttribute("class", "pptxv-smartart-svg");
|
|
3031
3031
|
svg.setAttribute("style", SMARTART_SVG_STYLE);
|
|
3032
3032
|
for (const conn of layout.connectors) {
|
|
3033
|
-
const paint =
|
|
3033
|
+
const paint = chunkLMZK4UNY_cjs.smartArtConnectorPaint(conn);
|
|
3034
3034
|
svg.appendChild(
|
|
3035
3035
|
createSvgEl(doc, "path", {
|
|
3036
3036
|
d: paint.d,
|
|
@@ -3089,7 +3089,7 @@ function buildFallbackNode(doc, node, shadowFilter, a11yLabel, nodeId) {
|
|
|
3089
3089
|
})
|
|
3090
3090
|
);
|
|
3091
3091
|
}
|
|
3092
|
-
const label =
|
|
3092
|
+
const label = chunkLMZK4UNY_cjs.smartArtNodeLabel(node);
|
|
3093
3093
|
if (label.visible) {
|
|
3094
3094
|
appendSvgTextLines(doc, g, {
|
|
3095
3095
|
lines: label.lines,
|
|
@@ -3125,41 +3125,41 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3125
3125
|
doc,
|
|
3126
3126
|
"div",
|
|
3127
3127
|
"pptxv-element pptxv-smartart",
|
|
3128
|
-
|
|
3128
|
+
chunkLMZK4UNY_cjs.getContainerStyle(element, zIndex)
|
|
3129
3129
|
);
|
|
3130
3130
|
wrapper.dataset.elementId = element.id;
|
|
3131
3131
|
wrapper.dataset.testid = `smartart-${data?.layout ?? "diagram"}`;
|
|
3132
|
-
const chrome = createEl(doc, "div", "pptxv-smartart-chrome",
|
|
3132
|
+
const chrome = createEl(doc, "div", "pptxv-smartart-chrome", chunkLMZK4UNY_cjs.buildChromeStyle(data?.chrome));
|
|
3133
3133
|
chrome.style.position = "relative";
|
|
3134
3134
|
wrapper.appendChild(chrome);
|
|
3135
3135
|
if (data) {
|
|
3136
|
-
const a11y =
|
|
3136
|
+
const a11y = chunkLMZK4UNY_cjs.buildSmartArtA11y(data);
|
|
3137
3137
|
chrome.setAttribute("role", "img");
|
|
3138
3138
|
chrome.setAttribute("aria-label", a11y.label);
|
|
3139
3139
|
}
|
|
3140
3140
|
const nodes = data?.nodes ?? [];
|
|
3141
3141
|
const drawingShapes = data?.drawingShapes ?? [];
|
|
3142
3142
|
const animationState = context.presentationStates?.get(element.id);
|
|
3143
|
-
const { nodes: revealedNodesFull } =
|
|
3143
|
+
const { nodes: revealedNodesFull } = chunkLMZK4UNY_cjs.resolveRevealedSmartArtNodes(
|
|
3144
3144
|
nodes,
|
|
3145
3145
|
animationState,
|
|
3146
3146
|
data?.presLayoutVars
|
|
3147
3147
|
);
|
|
3148
3148
|
if (data && drawingShapes.length > 0) {
|
|
3149
|
-
const revealedShapes =
|
|
3149
|
+
const revealedShapes = chunkLMZK4UNY_cjs.resolveRevealedDrawingShapes(drawingShapes, nodes, animationState);
|
|
3150
3150
|
chrome.appendChild(
|
|
3151
|
-
buildDrawingShapesSvg(doc, element.id, data,
|
|
3151
|
+
buildDrawingShapesSvg(doc, element.id, data, chunkLMZK4UNY_cjs.buildSmartArtA11y(data).nodes, revealedShapes)
|
|
3152
3152
|
);
|
|
3153
3153
|
enableSmartArtEditing(chrome, element, context);
|
|
3154
3154
|
return wrapper;
|
|
3155
3155
|
}
|
|
3156
3156
|
if (data && nodes.length > 0) {
|
|
3157
3157
|
const revealedNodes = revealedNodesFull;
|
|
3158
|
-
const layout =
|
|
3158
|
+
const layout = chunkLMZK4UNY_cjs.computeSmartArtElementLayout(
|
|
3159
3159
|
data,
|
|
3160
3160
|
revealedNodes,
|
|
3161
3161
|
{ width: element.width, height: element.height },
|
|
3162
|
-
|
|
3162
|
+
chunkLMZK4UNY_cjs.resolvePalette(data),
|
|
3163
3163
|
data.style ?? "flat",
|
|
3164
3164
|
element.id
|
|
3165
3165
|
);
|
|
@@ -3167,8 +3167,8 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3167
3167
|
buildSmartArtFallbackSvg(
|
|
3168
3168
|
doc,
|
|
3169
3169
|
layout,
|
|
3170
|
-
|
|
3171
|
-
|
|
3170
|
+
chunkLMZK4UNY_cjs.buildSmartArtA11y(data).nodes,
|
|
3171
|
+
chunkLMZK4UNY_cjs.flattenNodes(revealedNodes).map((node) => node.id)
|
|
3172
3172
|
)
|
|
3173
3173
|
);
|
|
3174
3174
|
enableSmartArtEditing(chrome, element, context);
|
|
@@ -3191,17 +3191,17 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3191
3191
|
function buildDrawingShapesSvg(doc, elementId, data, a11yNodes, revealedShapes) {
|
|
3192
3192
|
const allShapes = data.drawingShapes ?? [];
|
|
3193
3193
|
const style = data.style ?? "flat";
|
|
3194
|
-
const viewBox =
|
|
3195
|
-
const rendered =
|
|
3194
|
+
const viewBox = chunkLMZK4UNY_cjs.computeDrawingViewBox(allShapes);
|
|
3195
|
+
const rendered = chunkLMZK4UNY_cjs.projectDrawingShapes(
|
|
3196
3196
|
elementId,
|
|
3197
3197
|
revealedShapes,
|
|
3198
3198
|
viewBox,
|
|
3199
|
-
|
|
3199
|
+
chunkLMZK4UNY_cjs.resolvePalette(data),
|
|
3200
3200
|
style
|
|
3201
3201
|
);
|
|
3202
|
-
const shadow =
|
|
3202
|
+
const shadow = chunkLMZK4UNY_cjs.styleShadowFilter(style);
|
|
3203
3203
|
const labelsById = new Map(a11yNodes.map((node) => [node.id, node.label]));
|
|
3204
|
-
const nodeIds =
|
|
3204
|
+
const nodeIds = chunkLMZK4UNY_cjs.resolveRevealedDrawingShapeNodeIds(allShapes, revealedShapes, data.nodes);
|
|
3205
3205
|
const svg = createSvgEl(doc, "svg", {
|
|
3206
3206
|
viewBox: `0 0 ${viewBox.width} ${viewBox.height}`,
|
|
3207
3207
|
preserveAspectRatio: "xMidYMid meet"
|
|
@@ -3336,9 +3336,9 @@ function enableTableResize(container, table, element, context) {
|
|
|
3336
3336
|
for (const handle of [...colHandles, ...rowHandles]) {
|
|
3337
3337
|
handle.remove();
|
|
3338
3338
|
}
|
|
3339
|
-
const crossings =
|
|
3339
|
+
const crossings = chunkLMZK4UNY_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
3340
3340
|
const rowBounds = measureRowBoundaries(table);
|
|
3341
|
-
colHandles =
|
|
3341
|
+
colHandles = chunkLMZK4UNY_cjs.computeColumnBoundaries(tableData.columnWidths).map((leftPct, i) => {
|
|
3342
3342
|
const handle = createEl(doc, "div", "pptxv-table-resize-col", {
|
|
3343
3343
|
position: "absolute",
|
|
3344
3344
|
top: "0",
|
|
@@ -3348,7 +3348,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3348
3348
|
zIndex: "10",
|
|
3349
3349
|
pointerEvents: "none"
|
|
3350
3350
|
});
|
|
3351
|
-
const segments =
|
|
3351
|
+
const segments = chunkLMZK4UNY_cjs.columnHandleSegments(
|
|
3352
3352
|
crossings.columns[i] ?? [],
|
|
3353
3353
|
rowBounds,
|
|
3354
3354
|
table.offsetHeight
|
|
@@ -3378,7 +3378,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3378
3378
|
zIndex: "10",
|
|
3379
3379
|
pointerEvents: "none"
|
|
3380
3380
|
});
|
|
3381
|
-
const segments =
|
|
3381
|
+
const segments = chunkLMZK4UNY_cjs.rowHandleSegments(crossings.rows[i] ?? [], tableData.columnWidths);
|
|
3382
3382
|
for (const { leftPct, widthPct } of segments) {
|
|
3383
3383
|
handle.appendChild(
|
|
3384
3384
|
createEl(doc, "div", "pptxv-table-resize-segment", {
|
|
@@ -3422,14 +3422,14 @@ function enableTableResize(container, table, element, context) {
|
|
|
3422
3422
|
const deltaProp = (event.clientX - active.startPos) / (rect.width || 1);
|
|
3423
3423
|
context.onTableResizeColumns?.(
|
|
3424
3424
|
element,
|
|
3425
|
-
|
|
3425
|
+
chunkLMZK4UNY_cjs.computeResizedColumnWidths(active.initialWidths, active.index, deltaProp)
|
|
3426
3426
|
);
|
|
3427
3427
|
} else if (event.clientY !== active.startPos && active.type === "row") {
|
|
3428
3428
|
const deltaY = event.clientY - active.startPos;
|
|
3429
3429
|
context.onTableResizeRow?.(
|
|
3430
3430
|
element,
|
|
3431
3431
|
active.index,
|
|
3432
|
-
|
|
3432
|
+
chunkLMZK4UNY_cjs.computeResizedRowHeight(active.initialRowHeight ?? chunkLMZK4UNY_cjs.DEFAULT_ROW_HEIGHT, deltaY)
|
|
3433
3433
|
);
|
|
3434
3434
|
}
|
|
3435
3435
|
drawHandles();
|
|
@@ -3438,13 +3438,13 @@ function enableTableResize(container, table, element, context) {
|
|
|
3438
3438
|
const rect = container.getBoundingClientRect();
|
|
3439
3439
|
const localX = event.clientX - rect.left;
|
|
3440
3440
|
const localY = event.clientY - rect.top;
|
|
3441
|
-
const scaleY =
|
|
3442
|
-
const crossings =
|
|
3441
|
+
const scaleY = chunkLMZK4UNY_cjs.getTableResizeScale(rect.height, container.offsetHeight);
|
|
3442
|
+
const crossings = chunkLMZK4UNY_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
3443
3443
|
const rowBounds = measureRowBoundaries(table);
|
|
3444
|
-
const colBoundaries =
|
|
3444
|
+
const colBoundaries = chunkLMZK4UNY_cjs.computeColumnBoundaries(tableData.columnWidths);
|
|
3445
3445
|
for (let i = 0; i < colBoundaries.length; i++) {
|
|
3446
3446
|
const boundaryX = colBoundaries[i] / 100 * rect.width;
|
|
3447
|
-
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !
|
|
3447
|
+
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !chunkLMZK4UNY_cjs.isColumnBoundaryMergedAt(crossings, i, rowBounds, localY / scaleY)) {
|
|
3448
3448
|
event.preventDefault();
|
|
3449
3449
|
event.stopPropagation();
|
|
3450
3450
|
doc.body.style.cursor = "col-resize";
|
|
@@ -3462,7 +3462,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3462
3462
|
}
|
|
3463
3463
|
}
|
|
3464
3464
|
for (let i = 0; i < rowBounds.length; i++) {
|
|
3465
|
-
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !
|
|
3465
|
+
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !chunkLMZK4UNY_cjs.isRowBoundaryMergedAt(crossings, i, tableData.columnWidths, localX / (rect.width || 1))) {
|
|
3466
3466
|
event.preventDefault();
|
|
3467
3467
|
event.stopPropagation();
|
|
3468
3468
|
const tr = table.querySelectorAll("tbody > tr")[i];
|
|
@@ -3473,7 +3473,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3473
3473
|
index: i,
|
|
3474
3474
|
startPos: event.clientY,
|
|
3475
3475
|
handleEl: rowHandles[i] ?? container,
|
|
3476
|
-
initialRowHeight: tr?.offsetHeight ??
|
|
3476
|
+
initialRowHeight: tr?.offsetHeight ?? chunkLMZK4UNY_cjs.DEFAULT_ROW_HEIGHT
|
|
3477
3477
|
};
|
|
3478
3478
|
win.addEventListener("mousemove", onMouseMove);
|
|
3479
3479
|
win.addEventListener("mouseup", onMouseUp);
|
|
@@ -3494,7 +3494,7 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
3494
3494
|
}
|
|
3495
3495
|
const doc = context.document;
|
|
3496
3496
|
const container = createEl(doc, "div", "pptxv-element pptxv-table", {
|
|
3497
|
-
...
|
|
3497
|
+
...chunkLMZK4UNY_cjs.getContainerStyle(element, zIndex),
|
|
3498
3498
|
overflow: "hidden"
|
|
3499
3499
|
});
|
|
3500
3500
|
container.dataset.elementId = element.id;
|
|
@@ -3507,7 +3507,7 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
3507
3507
|
// font stack; all five bindings declare the same shared default here.
|
|
3508
3508
|
fontFamily: chunkVFPVEVF4_cjs.DEFAULT_FONT_FAMILY,
|
|
3509
3509
|
// `a:tblPr@rtl`: mirrors the column order for right-to-left decks.
|
|
3510
|
-
...
|
|
3510
|
+
...chunkLMZK4UNY_cjs.tableContainerCss(tableData)
|
|
3511
3511
|
});
|
|
3512
3512
|
appendColgroup(doc, table, tableData.columnWidths);
|
|
3513
3513
|
const tbody = doc.createElement("tbody");
|
|
@@ -3568,13 +3568,13 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3568
3568
|
if (cell.rowSpan && cell.rowSpan > 1) {
|
|
3569
3569
|
td.rowSpan = cell.rowSpan;
|
|
3570
3570
|
}
|
|
3571
|
-
const style =
|
|
3571
|
+
const style = chunkLMZK4UNY_cjs.tableCellCss(
|
|
3572
3572
|
tableData,
|
|
3573
3573
|
cell,
|
|
3574
3574
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
3575
3575
|
styleContext
|
|
3576
3576
|
);
|
|
3577
|
-
const patternFill = cell.style ?
|
|
3577
|
+
const patternFill = cell.style ? chunkLMZK4UNY_cjs.cellPatternFillCss(cell.style) : null;
|
|
3578
3578
|
if (patternFill) {
|
|
3579
3579
|
delete style["backgroundColor"];
|
|
3580
3580
|
delete style["background"];
|
|
@@ -3587,7 +3587,7 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3587
3587
|
}
|
|
3588
3588
|
applyStyleMap(td, CELL_BASE_STYLE);
|
|
3589
3589
|
applyStyleMap(td, style);
|
|
3590
|
-
const diagonals =
|
|
3590
|
+
const diagonals = chunkLMZK4UNY_cjs.getCellDiagonalBorders(
|
|
3591
3591
|
cell.style,
|
|
3592
3592
|
tableData,
|
|
3593
3593
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3631,7 +3631,7 @@ function renderDiagonalOverlay(doc, diagonals) {
|
|
|
3631
3631
|
return svg;
|
|
3632
3632
|
}
|
|
3633
3633
|
function appendCellText(doc, td, cell) {
|
|
3634
|
-
const blocks =
|
|
3634
|
+
const blocks = chunkLMZK4UNY_cjs.cellParagraphBlocks(cell);
|
|
3635
3635
|
if (blocks) {
|
|
3636
3636
|
for (const block of blocks) {
|
|
3637
3637
|
const div = createEl(doc, "div", "pptxv-table-para", { display: "block", ...block.css });
|
|
@@ -3666,7 +3666,7 @@ function appendRuns(doc, parent, runs) {
|
|
|
3666
3666
|
}
|
|
3667
3667
|
const span = createEl(doc, "span", "pptxv-table-run", {
|
|
3668
3668
|
position: "relative",
|
|
3669
|
-
...
|
|
3669
|
+
...chunkLMZK4UNY_cjs.cellRunStyle(run)
|
|
3670
3670
|
});
|
|
3671
3671
|
span.textContent = run.text;
|
|
3672
3672
|
parent.appendChild(span);
|
|
@@ -3680,8 +3680,8 @@ function registerTableChartRenderers(registry) {
|
|
|
3680
3680
|
}
|
|
3681
3681
|
|
|
3682
3682
|
// src/pptx/dom/glyph-outline-cache.ts
|
|
3683
|
-
var glyphOutlineFontCache = new
|
|
3684
|
-
var getGlyphOutline =
|
|
3683
|
+
var glyphOutlineFontCache = new chunkLMZK4UNY_cjs.GlyphOutlineFontCache();
|
|
3684
|
+
var getGlyphOutline = chunkLMZK4UNY_cjs.createGlyphOutlineLookup(glyphOutlineFontCache);
|
|
3685
3685
|
|
|
3686
3686
|
// src/pptx/dom/elements/text-warp.ts
|
|
3687
3687
|
function renderWarpedText(element, context) {
|
|
@@ -3693,12 +3693,12 @@ function renderWarpedText(element, context) {
|
|
|
3693
3693
|
if (!preset || preset === "textNoShape" || preset === "textPlain") {
|
|
3694
3694
|
return null;
|
|
3695
3695
|
}
|
|
3696
|
-
const paragraphs =
|
|
3696
|
+
const paragraphs = chunkLMZK4UNY_cjs.groupIntoParagraphs(element);
|
|
3697
3697
|
if (paragraphs.length === 0) {
|
|
3698
3698
|
return null;
|
|
3699
3699
|
}
|
|
3700
|
-
if (!
|
|
3701
|
-
const transform =
|
|
3700
|
+
if (!chunkLMZK4UNY_cjs.shouldUseSvgWarp(preset)) {
|
|
3701
|
+
const transform = chunkLMZK4UNY_cjs.getWarpCssTransform(preset, style?.textWarpAdj, style?.textWarpAdj2);
|
|
3702
3702
|
if (!transform) {
|
|
3703
3703
|
return null;
|
|
3704
3704
|
}
|
|
@@ -3726,7 +3726,7 @@ function renderWarpedText(element, context) {
|
|
|
3726
3726
|
text.textContent = paragraphs.map((p) => p.segments.map((s) => s.text).join("")).join("\n");
|
|
3727
3727
|
return text;
|
|
3728
3728
|
}
|
|
3729
|
-
if (
|
|
3729
|
+
if (chunkLMZK4UNY_cjs.hasGlyphEnvelope(preset)) {
|
|
3730
3730
|
return renderGlyphWarp(element, paragraphs, context);
|
|
3731
3731
|
}
|
|
3732
3732
|
return renderPathWarp(element, paragraphs, context);
|
|
@@ -3752,7 +3752,7 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3752
3752
|
});
|
|
3753
3753
|
svg.setAttribute("class", "pptxv-wordart");
|
|
3754
3754
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%;overflow:visible");
|
|
3755
|
-
const perLine =
|
|
3755
|
+
const perLine = chunkLMZK4UNY_cjs.buildGlyphEnvelopeBlock(
|
|
3756
3756
|
preset,
|
|
3757
3757
|
paragraphs.map(
|
|
3758
3758
|
(paragraph) => paragraph.segments.map((seg, i) => ({
|
|
@@ -3847,7 +3847,7 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3847
3847
|
defs.appendChild(
|
|
3848
3848
|
createSvgEl(context.document, "path", {
|
|
3849
3849
|
id,
|
|
3850
|
-
d:
|
|
3850
|
+
d: chunkLMZK4UNY_cjs.buildWarpPath(
|
|
3851
3851
|
preset,
|
|
3852
3852
|
element.width,
|
|
3853
3853
|
element.height,
|
|
@@ -3880,9 +3880,9 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3880
3880
|
|
|
3881
3881
|
// src/pptx/dom/elements/text-shape.ts
|
|
3882
3882
|
var renderTextShapeElement = (element, zIndex, context) => {
|
|
3883
|
-
const container =
|
|
3883
|
+
const container = chunkLMZK4UNY_cjs.getContainerStyle(element, zIndex);
|
|
3884
3884
|
const animState = context.presentationStates?.get(element.id);
|
|
3885
|
-
const background =
|
|
3885
|
+
const background = chunkLMZK4UNY_cjs.getBackgroundAnimationState(element, context.presentationStates);
|
|
3886
3886
|
const visualState = background ?? animState;
|
|
3887
3887
|
const shape = getShapeFillStrokeStyle(
|
|
3888
3888
|
element,
|
|
@@ -3894,7 +3894,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3894
3894
|
if (transform !== void 0) {
|
|
3895
3895
|
merged["transform"] = transform;
|
|
3896
3896
|
}
|
|
3897
|
-
const layers =
|
|
3897
|
+
const layers = chunkLMZK4UNY_cjs.getBackgroundAnimationLayers(element, merged, background);
|
|
3898
3898
|
const el = createEl(context.document, "div", "pptxv-element pptxv-shape", layers.box);
|
|
3899
3899
|
el.dataset.elementId = element.id;
|
|
3900
3900
|
const paint = layers.paint ? createEl(context.document, "div", void 0, layers.paint) : el;
|
|
@@ -3904,7 +3904,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3904
3904
|
el.appendChild(paint);
|
|
3905
3905
|
}
|
|
3906
3906
|
if (context.interactive && !context.presenting) {
|
|
3907
|
-
const hitTargetStyle =
|
|
3907
|
+
const hitTargetStyle = chunkLMZK4UNY_cjs.elementHitTargetStyle(element);
|
|
3908
3908
|
if (hitTargetStyle) {
|
|
3909
3909
|
const hitTarget = createEl(context.document, "div", void 0, hitTargetStyle);
|
|
3910
3910
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
@@ -3947,8 +3947,8 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3947
3947
|
} else if (warped) {
|
|
3948
3948
|
el.appendChild(warped);
|
|
3949
3949
|
} else {
|
|
3950
|
-
const linkedSegments =
|
|
3951
|
-
const paragraphs =
|
|
3950
|
+
const linkedSegments = chunkLMZK4UNY_cjs.getOverflowSegments(element, context.slide?.elements);
|
|
3951
|
+
const paragraphs = chunkLMZK4UNY_cjs.buildParagraphs(element, context.fieldContext, linkedSegments);
|
|
3952
3952
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
3953
3953
|
if (hasText) {
|
|
3954
3954
|
el.appendChild(
|
|
@@ -3959,7 +3959,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3959
3959
|
);
|
|
3960
3960
|
} else {
|
|
3961
3961
|
const mode = context.interactive && !context.presenting ? "edit" : "present";
|
|
3962
|
-
const prompt =
|
|
3962
|
+
const prompt = chunkLMZK4UNY_cjs.placeholderPromptDescriptor(element, mode);
|
|
3963
3963
|
if (prompt) {
|
|
3964
3964
|
const hint = createEl(context.document, "div", "pptxv-placeholder-prompt", {
|
|
3965
3965
|
...getTextBlockStyle(element),
|
|
@@ -4125,11 +4125,11 @@ async function resolveImageUrls(handler, slides) {
|
|
|
4125
4125
|
|
|
4126
4126
|
Object.defineProperty(exports, "buildEmbeddedFontStyles", {
|
|
4127
4127
|
enumerable: true,
|
|
4128
|
-
get: function () { return
|
|
4128
|
+
get: function () { return chunkLMZK4UNY_cjs.buildEmbeddedFontStyles; }
|
|
4129
4129
|
});
|
|
4130
4130
|
Object.defineProperty(exports, "buildFieldSubstitutionContext", {
|
|
4131
4131
|
enumerable: true,
|
|
4132
|
-
get: function () { return
|
|
4132
|
+
get: function () { return chunkLMZK4UNY_cjs.buildFieldSubstitutionContext; }
|
|
4133
4133
|
});
|
|
4134
4134
|
Object.defineProperty(exports, "renderChartViewModelSvg", {
|
|
4135
4135
|
enumerable: true,
|