ooxml-ui 1.6.2 → 1.7.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/README.md +1 -1
- package/custom-elements.json +53 -1
- package/dist/chrome/ruler.d.ts.map +1 -1
- package/dist/chrome/status-bar.d.ts.map +1 -1
- package/dist/chrome/tab-strip.d.ts +3 -1
- package/dist/chrome/tab-strip.d.ts.map +1 -1
- package/dist/chrome/task-pane.d.ts +27 -0
- package/dist/chrome/task-pane.d.ts.map +1 -0
- package/dist/chrome/title-bar.d.ts.map +1 -1
- package/dist/{chunk-QAIVGTQZ.js → chunk-6UPGM3X2.js} +1 -1
- package/dist/{chunk-QHAE6Y5B.js → chunk-SCWCZSTE.js} +71 -32
- package/dist/{chunk-Z7CS3UUK.js → chunk-VAR6O7II.js} +3 -2
- package/dist/controls.d.ts +3 -2
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +1 -1
- package/dist/docx.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/pptx/{chunk-E55NU4BF.mjs → chunk-RCTRRS6E.mjs} +28 -49
- package/dist/pptx/{chunk-BLAJIEXA.cjs → chunk-XGPLA2OY.cjs} +30 -48
- package/dist/pptx/dom/index.cjs +199 -199
- package/dist/pptx/dom/index.mjs +2 -2
- package/dist/pptx/index.cjs +2708 -2708
- package/dist/pptx/index.mjs +1 -1
- package/dist/pptx/render/editor-keymap-arrows.d.ts +0 -7
- package/dist/pptx/render/editor-keymap-arrows.d.ts.map +1 -1
- package/dist/pptx/render/element-interaction.d.ts +2 -6
- package/dist/pptx/render/element-interaction.d.ts.map +1 -1
- package/dist/teams.js +2 -2
- package/dist/visio/ribbon-action.d.ts +3 -1
- package/dist/visio/ribbon-router.d.ts +1 -1
- package/dist/visio/ribbon.d.ts +2 -2
- package/dist/visio/shapes-window.d.ts +2 -2
- package/dist/visio/status-bar.d.ts +7 -4
- package/dist/visio/styles/theme.d.ts +1 -1
- package/dist/visio/styles.d.ts +1 -1
- package/dist/visio/title-bar.d.ts +9 -0
- package/dist/visio/viewer-backstage.d.ts +2 -1
- package/dist/visio/viewer-canvas.d.ts +1 -1
- package/dist/visio/viewer-chrome.d.ts +12 -5
- package/dist/visio/viewer-commands.d.ts +3 -1
- package/dist/visio/viewer-element.d.ts +8 -0
- package/dist/visio/viewer-guides.d.ts +5 -2
- package/dist/visio/viewer-inline-text.d.ts +31 -0
- package/dist/visio/viewer-input.d.ts +5 -1
- package/dist/visio/viewer-layer-properties.d.ts +18 -0
- package/dist/visio/viewer-layout-commands.d.ts +3 -1
- package/dist/visio/viewer-options.d.ts +18 -4
- package/dist/visio.js +974 -708
- package/dist/xlsx.js +4 -4
- package/package.json +2 -2
- package/dist/visio/viewer-edit-controls.d.ts +0 -12
- package/dist/visio/viewer-geometry-controls.d.ts +0 -14
- package/dist/visio/viewer-layer-controls.d.ts +0 -5
package/dist/pptx/dom/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXGPLA2OY_cjs = require('../chunk-XGPLA2OY.cjs');
|
|
4
4
|
require('../chunk-WSTWYZFM.cjs');
|
|
5
5
|
var chunk2JEQHIAL_cjs = require('../chunk-2JEQHIAL.cjs');
|
|
6
6
|
require('../chunk-IOR4KOGN.cjs');
|
|
@@ -95,7 +95,7 @@ function buildActiveXControlsOverlay(doc, controls, canvasSize) {
|
|
|
95
95
|
zIndex: "40"
|
|
96
96
|
});
|
|
97
97
|
controls.forEach((control, index) => {
|
|
98
|
-
const view =
|
|
98
|
+
const view = chunkXGPLA2OY_cjs.getActiveXControlOverlayView(control, canvasSize, index);
|
|
99
99
|
const style = {
|
|
100
100
|
position: "absolute",
|
|
101
101
|
left: `${view.left}px`,
|
|
@@ -130,7 +130,7 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
130
130
|
pointerEvents: "none",
|
|
131
131
|
zIndex: "45"
|
|
132
132
|
});
|
|
133
|
-
const markers =
|
|
133
|
+
const markers = chunkXGPLA2OY_cjs.buildCommentMarkers(
|
|
134
134
|
comments,
|
|
135
135
|
canvasSize.width,
|
|
136
136
|
canvasSize.height,
|
|
@@ -139,10 +139,10 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
139
139
|
for (const marker of markers) {
|
|
140
140
|
const dot = createEl(doc, "button", "pptxv-comment-marker", {
|
|
141
141
|
position: "absolute",
|
|
142
|
-
left: `${marker.x -
|
|
143
|
-
top: `${marker.y -
|
|
144
|
-
width: `${
|
|
145
|
-
height: `${
|
|
142
|
+
left: `${marker.x - chunkXGPLA2OY_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
143
|
+
top: `${marker.y - chunkXGPLA2OY_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
144
|
+
width: `${chunkXGPLA2OY_cjs.COMMENT_MARKER_SIZE}px`,
|
|
145
|
+
height: `${chunkXGPLA2OY_cjs.COMMENT_MARKER_SIZE}px`,
|
|
146
146
|
display: "flex",
|
|
147
147
|
alignItems: "center",
|
|
148
148
|
justifyContent: "center",
|
|
@@ -210,7 +210,7 @@ function merge3dStyle(base, computed) {
|
|
|
210
210
|
}
|
|
211
211
|
function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
212
212
|
if (el.type === "group") {
|
|
213
|
-
const fx2 =
|
|
213
|
+
const fx2 = chunkXGPLA2OY_cjs.getComputedEffectStyle(el);
|
|
214
214
|
const groupStyle = {};
|
|
215
215
|
if (fx2.filter) {
|
|
216
216
|
groupStyle.filter = fx2.filter;
|
|
@@ -232,7 +232,7 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
232
232
|
style[key] = value;
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
const stroke =
|
|
235
|
+
const stroke = chunkXGPLA2OY_cjs.getComputedStrokeStyle(el);
|
|
236
236
|
if (stroke.borderWidth > 0) {
|
|
237
237
|
if (animatesStroke) {
|
|
238
238
|
style["borderWidth"] = stroke.cssBorderWidth;
|
|
@@ -251,7 +251,7 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
251
251
|
style["strokeMiterlimit"] = stroke.strokeMiterlimit;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
const fx =
|
|
254
|
+
const fx = chunkXGPLA2OY_cjs.getComputedEffectStyle(el);
|
|
255
255
|
if (fx.boxShadow) {
|
|
256
256
|
style["boxShadow"] = fx.boxShadow;
|
|
257
257
|
}
|
|
@@ -268,11 +268,11 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
268
268
|
if (fx.overflowVisible) {
|
|
269
269
|
style["overflow"] = "visible";
|
|
270
270
|
}
|
|
271
|
-
merge3dStyle(style,
|
|
272
|
-
if (
|
|
271
|
+
merge3dStyle(style, chunkXGPLA2OY_cjs.getComputed3dStyle(el));
|
|
272
|
+
if (chunkXGPLA2OY_cjs.isHollowShapeElement(el)) {
|
|
273
273
|
style["pointerEvents"] = "none";
|
|
274
274
|
}
|
|
275
|
-
const geometry =
|
|
275
|
+
const geometry = chunkXGPLA2OY_cjs.resolveShapeGeometry(el);
|
|
276
276
|
switch (geometry.kind) {
|
|
277
277
|
case "bare":
|
|
278
278
|
style["backgroundColor"] = "transparent";
|
|
@@ -306,12 +306,12 @@ function getTextBlockStyle(el) {
|
|
|
306
306
|
if (!pptx.hasTextProperties(el)) {
|
|
307
307
|
return {};
|
|
308
308
|
}
|
|
309
|
-
const base =
|
|
309
|
+
const base = chunkXGPLA2OY_cjs.buildTextBlockStyle(el, {
|
|
310
310
|
fallbackColor: chunkLCIXR7WE_cjs.DEFAULT_TEXT_COLOR,
|
|
311
311
|
bodyLayout: true,
|
|
312
312
|
pxLengths: true
|
|
313
313
|
});
|
|
314
|
-
const scene3d =
|
|
314
|
+
const scene3d = chunkXGPLA2OY_cjs.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height });
|
|
315
315
|
if (!scene3d) {
|
|
316
316
|
return base;
|
|
317
317
|
}
|
|
@@ -416,7 +416,7 @@ function renderSlideStage(options) {
|
|
|
416
416
|
"--pptxv-grid-size": `${options.gridSpacingPx ?? 10}px`,
|
|
417
417
|
// One device pixel in slide px: thin strokes stay visible on screen.
|
|
418
418
|
...chunkG2YUKLRX_cjs.deviceStrokeStageStyle(scale),
|
|
419
|
-
...
|
|
419
|
+
...chunkXGPLA2OY_cjs.getSlideBackgroundStyle(slide, { widthPx: canvasSize.width, heightPx: canvasSize.height })
|
|
420
420
|
});
|
|
421
421
|
if (interactive || options.reading) {
|
|
422
422
|
stage.setAttribute("role", "region");
|
|
@@ -457,19 +457,19 @@ function renderSlideStage(options) {
|
|
|
457
457
|
selectedElementIds: options.selectedElementIds,
|
|
458
458
|
registry,
|
|
459
459
|
renderElement(element, zIndex) {
|
|
460
|
-
if (!
|
|
460
|
+
if (!chunkXGPLA2OY_cjs.isElementRendered(element)) {
|
|
461
461
|
return null;
|
|
462
462
|
}
|
|
463
463
|
const node = registry.resolve(element.type)(element, zIndex, context);
|
|
464
464
|
if (node && interactive && "setAttribute" in node) {
|
|
465
|
-
const templateLocked =
|
|
465
|
+
const templateLocked = chunkXGPLA2OY_cjs.isTemplateElementId(element.id) && !options.templateEditing;
|
|
466
466
|
if (templateLocked) {
|
|
467
467
|
node.style.pointerEvents = "none";
|
|
468
468
|
}
|
|
469
469
|
node.setAttribute("data-pptx-element", "true");
|
|
470
470
|
}
|
|
471
|
-
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" &&
|
|
472
|
-
const hitTargetStyle =
|
|
471
|
+
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" && chunkXGPLA2OY_cjs.shouldRenderHitTarget(interactive, options.presenting ?? false)) {
|
|
472
|
+
const hitTargetStyle = chunkXGPLA2OY_cjs.elementHitTargetStyle(element);
|
|
473
473
|
if (hitTargetStyle) {
|
|
474
474
|
const hitTarget = createEl(doc, "div", void 0, hitTargetStyle);
|
|
475
475
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
@@ -488,20 +488,20 @@ function renderSlideStage(options) {
|
|
|
488
488
|
}
|
|
489
489
|
});
|
|
490
490
|
if (interactive || options.reading) {
|
|
491
|
-
|
|
491
|
+
chunkXGPLA2OY_cjs.applyRenderedElementAccessibility(stage, slide.elements, {
|
|
492
492
|
presenting: options.presenting ?? false
|
|
493
493
|
});
|
|
494
494
|
}
|
|
495
495
|
if (interactive) {
|
|
496
|
-
|
|
496
|
+
chunkXGPLA2OY_cjs.applyElementActionAffordances(
|
|
497
497
|
stage,
|
|
498
498
|
slide.elements.filter(
|
|
499
|
-
(element) => options.templateEditing || !
|
|
499
|
+
(element) => options.templateEditing || !chunkXGPLA2OY_cjs.isTemplateElementId(element.id)
|
|
500
500
|
),
|
|
501
501
|
{
|
|
502
502
|
canInteract: true,
|
|
503
503
|
presenting: options.presenting ?? false,
|
|
504
|
-
labels:
|
|
504
|
+
labels: chunkXGPLA2OY_cjs.actionAffordanceLabels((key) => t(key))
|
|
505
505
|
}
|
|
506
506
|
);
|
|
507
507
|
}
|
|
@@ -557,7 +557,7 @@ function createChartTitleEditor(container, onCommit) {
|
|
|
557
557
|
|
|
558
558
|
// src/pptx/dom/elements/chart-editable.ts
|
|
559
559
|
function attachChartEditing(container, element, context, repaint) {
|
|
560
|
-
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !
|
|
560
|
+
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !chunkXGPLA2OY_cjs.canDrillDown(element)) {
|
|
561
561
|
return;
|
|
562
562
|
}
|
|
563
563
|
const chart = element;
|
|
@@ -597,7 +597,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
597
597
|
if (!rect) {
|
|
598
598
|
return;
|
|
599
599
|
}
|
|
600
|
-
const step2 =
|
|
600
|
+
const step2 = chunkXGPLA2OY_cjs.advanceChartMarkDrag(activeMark, event.clientX, event.clientY, rect);
|
|
601
601
|
if (!step2) {
|
|
602
602
|
return;
|
|
603
603
|
}
|
|
@@ -687,7 +687,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
687
687
|
seriesIndex: part.seriesIndex,
|
|
688
688
|
pointIndex: part.pointIndex
|
|
689
689
|
});
|
|
690
|
-
const startedMark =
|
|
690
|
+
const startedMark = chunkXGPLA2OY_cjs.beginChartMarkDrag({
|
|
691
691
|
part,
|
|
692
692
|
geometry: markGeometry,
|
|
693
693
|
chartData: chart.chartData,
|
|
@@ -779,7 +779,7 @@ function mountThreeViewInto(doc, wrapper, options) {
|
|
|
779
779
|
return view;
|
|
780
780
|
}
|
|
781
781
|
function isChart3DEditable(element, context) {
|
|
782
|
-
return element.type === "chart" && Boolean(context.interactive) && Boolean(context.onChartPointChange) && Boolean(context.selectedElementIds?.has(element.id)) &&
|
|
782
|
+
return element.type === "chart" && Boolean(context.interactive) && Boolean(context.onChartPointChange) && Boolean(context.selectedElementIds?.has(element.id)) && chunkXGPLA2OY_cjs.canDrillDown(element);
|
|
783
783
|
}
|
|
784
784
|
function selectedChartPartOf(element, context) {
|
|
785
785
|
return context.chartPartSelection?.elementId === element.id ? context.chartPartSelection.part : null;
|
|
@@ -821,13 +821,13 @@ function wireChartThreeViewEvents(view, element, context, badgeHost) {
|
|
|
821
821
|
const listeners = new AbortController();
|
|
822
822
|
chartViewListeners.set(view, listeners);
|
|
823
823
|
view.addEventListener(
|
|
824
|
-
|
|
825
|
-
(event) =>
|
|
824
|
+
chunkXGPLA2OY_cjs.THREE_VIEW_EVENTS.select,
|
|
825
|
+
(event) => chunkXGPLA2OY_cjs.applyChart3DSelect(bridge, event.detail.part),
|
|
826
826
|
{ signal: listeners.signal }
|
|
827
827
|
);
|
|
828
828
|
view.addEventListener(
|
|
829
|
-
|
|
830
|
-
(event) =>
|
|
829
|
+
chunkXGPLA2OY_cjs.THREE_VIEW_EVENTS.drag,
|
|
830
|
+
(event) => chunkXGPLA2OY_cjs.applyChart3DDrag(bridge, event.detail),
|
|
831
831
|
{ signal: listeners.signal }
|
|
832
832
|
);
|
|
833
833
|
}
|
|
@@ -841,7 +841,7 @@ function applyThreeViewTextStyle(el, style) {
|
|
|
841
841
|
// src/pptx/dom/elements/chart.ts
|
|
842
842
|
var renderChartElement = (element, zIndex, context) => {
|
|
843
843
|
const wrapper = renderChartSvgElement(element, zIndex, context);
|
|
844
|
-
const spec = wrapper ?
|
|
844
|
+
const spec = wrapper ? chunkXGPLA2OY_cjs.resolveChartThreeViewSpec(element, rendering3DFlagsOf(context)) : null;
|
|
845
845
|
if (!wrapper || !spec) {
|
|
846
846
|
return wrapper;
|
|
847
847
|
}
|
|
@@ -863,11 +863,11 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
863
863
|
doc,
|
|
864
864
|
"div",
|
|
865
865
|
"pptxv-element pptxv-chart",
|
|
866
|
-
|
|
866
|
+
chunkXGPLA2OY_cjs.getContainerStyle(element, zIndex)
|
|
867
867
|
);
|
|
868
868
|
container.dataset.elementId = element.id;
|
|
869
869
|
const animationState = context.presentationStates?.get(element.id);
|
|
870
|
-
const chartData = element.chartData ?
|
|
870
|
+
const chartData = element.chartData ? chunkXGPLA2OY_cjs.resolveRevealedChartData(element.chartData, animationState) : element.chartData;
|
|
871
871
|
if (!chartData || chartData.series.length === 0) {
|
|
872
872
|
container.appendChild(renderChartPlaceholder(doc, chartData?.chartType ?? "bar", context.t));
|
|
873
873
|
return container;
|
|
@@ -915,7 +915,7 @@ function renderChartPlaceholder(doc, chartType, t) {
|
|
|
915
915
|
border: "1px dashed #cbd5e1",
|
|
916
916
|
boxSizing: "border-box"
|
|
917
917
|
});
|
|
918
|
-
placeholder.textContent =
|
|
918
|
+
placeholder.textContent = chunkXGPLA2OY_cjs.chartPlaceholderLabel(chartType, (key, params) => t(key, params));
|
|
919
919
|
return placeholder;
|
|
920
920
|
}
|
|
921
921
|
|
|
@@ -979,7 +979,7 @@ function createRunBaseNode(doc, run) {
|
|
|
979
979
|
verticalAlign: "middle",
|
|
980
980
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
981
981
|
});
|
|
982
|
-
math.innerHTML =
|
|
982
|
+
math.innerHTML = chunkXGPLA2OY_cjs.runEquationMathMl(run.equation);
|
|
983
983
|
host.appendChild(math);
|
|
984
984
|
if (run.equation.number) {
|
|
985
985
|
const number = createEl(doc, "span", "pptxv-equation-number", {
|
|
@@ -991,7 +991,7 @@ function createRunBaseNode(doc, run) {
|
|
|
991
991
|
}
|
|
992
992
|
return host;
|
|
993
993
|
}
|
|
994
|
-
if (run.hyperlink &&
|
|
994
|
+
if (run.hyperlink && chunkXGPLA2OY_cjs.isRunHyperlinkClickable(run.hyperlink)) {
|
|
995
995
|
const link = createEl(doc, "a", "pptxv-link", run.style);
|
|
996
996
|
link.setAttribute("data-pptx-hyperlink", run.hyperlink.url);
|
|
997
997
|
link.setAttribute("role", "link");
|
|
@@ -1095,7 +1095,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1095
1095
|
bullet.textContent = para.bulletMarker;
|
|
1096
1096
|
p.appendChild(bullet);
|
|
1097
1097
|
}
|
|
1098
|
-
const spec = build ?
|
|
1098
|
+
const spec = build ? chunkXGPLA2OY_cjs.buildTextBuildSpec(
|
|
1099
1099
|
build.elementId,
|
|
1100
1100
|
paragraphs.indexOf(para),
|
|
1101
1101
|
para.runs.filter((run) => run.text !== NEWLINE_RUN).map((run) => ({ text: run.text, style: run.style })),
|
|
@@ -1104,7 +1104,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1104
1104
|
if (spec && spec.granularity !== "paragraph") {
|
|
1105
1105
|
for (const span of spec.spans ?? []) {
|
|
1106
1106
|
const node = createEl(doc, "span");
|
|
1107
|
-
applyStyleMap(node, { ...span.style ?? {}, ...
|
|
1107
|
+
applyStyleMap(node, { ...span.style ?? {}, ...chunkXGPLA2OY_cjs.textBuildSpanStyle(span) });
|
|
1108
1108
|
if (span.animId) {
|
|
1109
1109
|
node.setAttribute("data-anim-id", span.animId);
|
|
1110
1110
|
}
|
|
@@ -1117,7 +1117,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1117
1117
|
let runHost = p;
|
|
1118
1118
|
if (spec) {
|
|
1119
1119
|
const wrapper = createEl(doc, "span");
|
|
1120
|
-
applyStyleMap(wrapper,
|
|
1120
|
+
applyStyleMap(wrapper, chunkXGPLA2OY_cjs.textBuildSpanStyle(spec));
|
|
1121
1121
|
if (spec.animId) {
|
|
1122
1122
|
wrapper.setAttribute("data-anim-id", spec.animId);
|
|
1123
1123
|
}
|
|
@@ -1173,7 +1173,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1173
1173
|
if (element.hidden) {
|
|
1174
1174
|
wrapper.style.display = "none";
|
|
1175
1175
|
}
|
|
1176
|
-
const lineGlow =
|
|
1176
|
+
const lineGlow = chunkXGPLA2OY_cjs.getLineGlowFilterCss(ss);
|
|
1177
1177
|
if (lineGlow) {
|
|
1178
1178
|
wrapper.style.filter = lineGlow;
|
|
1179
1179
|
}
|
|
@@ -1181,7 +1181,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1181
1181
|
svg.setAttribute("style", "overflow:visible;display:block");
|
|
1182
1182
|
const seed = element.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
1183
1183
|
const defs = createSvgEl(doc, "defs");
|
|
1184
|
-
const lineShadow =
|
|
1184
|
+
const lineShadow = chunkXGPLA2OY_cjs.getLineShadowParams(ss);
|
|
1185
1185
|
const shadowId = lineShadow ? `${seed}-line-shadow` : void 0;
|
|
1186
1186
|
if (lineShadow && shadowId) {
|
|
1187
1187
|
const filter = createSvgEl(doc, "filter", {
|
|
@@ -1202,8 +1202,8 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1202
1202
|
);
|
|
1203
1203
|
defs.appendChild(filter);
|
|
1204
1204
|
}
|
|
1205
|
-
const startArrow =
|
|
1206
|
-
const endArrow =
|
|
1205
|
+
const startArrow = chunkXGPLA2OY_cjs.normalizeArrow(ss?.connectorStartArrow);
|
|
1206
|
+
const endArrow = chunkXGPLA2OY_cjs.normalizeArrow(ss?.connectorEndArrow);
|
|
1207
1207
|
const startMarkerId = startArrow ? `${seed}-start` : void 0;
|
|
1208
1208
|
const endMarkerId = endArrow ? `${seed}-end` : void 0;
|
|
1209
1209
|
if (startArrow && startMarkerId) {
|
|
@@ -1226,10 +1226,10 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1226
1226
|
svg.appendChild(defs);
|
|
1227
1227
|
}
|
|
1228
1228
|
const compound = ss?.compoundLine;
|
|
1229
|
-
const offsets =
|
|
1230
|
-
const widths =
|
|
1229
|
+
const offsets = chunkXGPLA2OY_cjs.getCompoundLineOffsets(compound, strokeWidth);
|
|
1230
|
+
const widths = chunkXGPLA2OY_cjs.getCompoundLineWidths(compound, strokeWidth);
|
|
1231
1231
|
const shapeType = pptx.hasShapeProperties(element) ? element.shapeType : void 0;
|
|
1232
|
-
const usePath =
|
|
1232
|
+
const usePath = chunkXGPLA2OY_cjs.connectorNeedsPath(shapeType) && pptx.hasShapeProperties(element);
|
|
1233
1233
|
const pathData = usePath ? pptx.getConnectorPathGeometry(element).pathData : void 0;
|
|
1234
1234
|
const x1 = element.flipHorizontal ? w : 0;
|
|
1235
1235
|
const y1 = element.flipVertical ? h : 0;
|
|
@@ -1240,7 +1240,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1240
1240
|
d: pathData ?? `M${x1},${y1} L${x2},${y2}`,
|
|
1241
1241
|
fill: "none",
|
|
1242
1242
|
stroke: "transparent",
|
|
1243
|
-
"stroke-width":
|
|
1243
|
+
"stroke-width": chunkXGPLA2OY_cjs.connectorHitStrokeWidth(strokeWidth),
|
|
1244
1244
|
"stroke-linecap": "round",
|
|
1245
1245
|
"stroke-linejoin": "round"
|
|
1246
1246
|
});
|
|
@@ -1290,7 +1290,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1290
1290
|
if (!pptx.hasTextProperties(element)) {
|
|
1291
1291
|
return;
|
|
1292
1292
|
}
|
|
1293
|
-
const paragraphs =
|
|
1293
|
+
const paragraphs = chunkXGPLA2OY_cjs.buildParagraphs(element, context.fieldContext);
|
|
1294
1294
|
if (!paragraphs.some((paragraph) => paragraph.runs.length > 0)) {
|
|
1295
1295
|
return;
|
|
1296
1296
|
}
|
|
@@ -1310,7 +1310,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1310
1310
|
}
|
|
1311
1311
|
function buildMarker(context, id, arrow, strokeColor, size) {
|
|
1312
1312
|
const doc = context.document;
|
|
1313
|
-
const shape =
|
|
1313
|
+
const shape = chunkXGPLA2OY_cjs.markerPath(arrow, size.width, size.length);
|
|
1314
1314
|
const marker = createSvgEl(doc, "marker", {
|
|
1315
1315
|
id,
|
|
1316
1316
|
viewBox: "0 0 10 10",
|
|
@@ -1394,7 +1394,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1394
1394
|
doc,
|
|
1395
1395
|
"div",
|
|
1396
1396
|
"pptxv-element pptxv-contentpart",
|
|
1397
|
-
|
|
1397
|
+
chunkXGPLA2OY_cjs.getContainerStyle(element, zIndex)
|
|
1398
1398
|
);
|
|
1399
1399
|
el.dataset.elementId = element.id;
|
|
1400
1400
|
const strokes = element.inkStrokes;
|
|
@@ -1427,7 +1427,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1427
1427
|
return el;
|
|
1428
1428
|
};
|
|
1429
1429
|
function renderEquations(element, context) {
|
|
1430
|
-
if (!pptx.hasTextProperties(element) || !
|
|
1430
|
+
if (!pptx.hasTextProperties(element) || !chunkXGPLA2OY_cjs.isEquationOnlyText(element.textSegments)) {
|
|
1431
1431
|
return null;
|
|
1432
1432
|
}
|
|
1433
1433
|
const equations = (element.textSegments ?? []).filter((segment) => segment.equationXml);
|
|
@@ -1441,7 +1441,7 @@ function renderEquations(element, context) {
|
|
|
1441
1441
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
1442
1442
|
});
|
|
1443
1443
|
for (const segment of equations) {
|
|
1444
|
-
const mathml =
|
|
1444
|
+
const mathml = chunkXGPLA2OY_cjs.convertOmmlToMathMl(segment.equationXml);
|
|
1445
1445
|
if (!mathml) {
|
|
1446
1446
|
continue;
|
|
1447
1447
|
}
|
|
@@ -1455,7 +1455,7 @@ function renderEquations(element, context) {
|
|
|
1455
1455
|
flex: 1,
|
|
1456
1456
|
textAlign: "center"
|
|
1457
1457
|
});
|
|
1458
|
-
math.innerHTML =
|
|
1458
|
+
math.innerHTML = chunkXGPLA2OY_cjs.sanitizeMathMl(mathml);
|
|
1459
1459
|
row.appendChild(math);
|
|
1460
1460
|
if (segment.equationNumber) {
|
|
1461
1461
|
const number = createEl(context.document, "span", "pptxv-equation-number", {
|
|
@@ -1473,7 +1473,7 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1473
1473
|
return null;
|
|
1474
1474
|
}
|
|
1475
1475
|
const fill = chunkLCIXR7WE_cjs.getComputedFillStyle(element)?.backgroundColor;
|
|
1476
|
-
const data =
|
|
1476
|
+
const data = chunkXGPLA2OY_cjs.build3DExtrusionData(
|
|
1477
1477
|
element.shapeStyle?.shape3d,
|
|
1478
1478
|
element.shapeStyle?.scene3d,
|
|
1479
1479
|
fill,
|
|
@@ -1535,7 +1535,7 @@ function appendOwnReflection(doc, host, element, mediaDataUrls, suppressOwnRefle
|
|
|
1535
1535
|
if (suppressOwnReflection) {
|
|
1536
1536
|
return;
|
|
1537
1537
|
}
|
|
1538
|
-
const wrapperStyle =
|
|
1538
|
+
const wrapperStyle = chunkXGPLA2OY_cjs.getComputedEffectStyle(element).reflection;
|
|
1539
1539
|
if (!wrapperStyle) {
|
|
1540
1540
|
return;
|
|
1541
1541
|
}
|
|
@@ -1559,9 +1559,9 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1559
1559
|
if (groupFilterDefs) {
|
|
1560
1560
|
wrap.appendChild(groupFilterDefs);
|
|
1561
1561
|
}
|
|
1562
|
-
const childParentFill =
|
|
1562
|
+
const childParentFill = chunkXGPLA2OY_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1563
1563
|
for (const child of element.children ?? []) {
|
|
1564
|
-
const childWrap = createEl(doc, "div", void 0,
|
|
1564
|
+
const childWrap = createEl(doc, "div", void 0, chunkXGPLA2OY_cjs.getContainerStyle(child, 0));
|
|
1565
1565
|
childWrap.appendChild(
|
|
1566
1566
|
buildReflectionMirrorContent(doc, child, mediaDataUrls, childParentFill)
|
|
1567
1567
|
);
|
|
@@ -1575,7 +1575,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1575
1575
|
height: "100%",
|
|
1576
1576
|
...getShapeFillStrokeStyle(element)
|
|
1577
1577
|
});
|
|
1578
|
-
const inheritedFill =
|
|
1578
|
+
const inheritedFill = chunkXGPLA2OY_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1579
1579
|
if (inheritedFill) {
|
|
1580
1580
|
applyInheritedFill(box, inheritedFill);
|
|
1581
1581
|
}
|
|
@@ -1596,12 +1596,12 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1596
1596
|
box.appendChild(gradientOutline);
|
|
1597
1597
|
}
|
|
1598
1598
|
if (pptx.isImageLikeElement(element)) {
|
|
1599
|
-
const src =
|
|
1599
|
+
const src = chunkXGPLA2OY_cjs.getImageSrc(element, new Map(mediaDataUrls));
|
|
1600
1600
|
if (src) {
|
|
1601
1601
|
const img = createEl(doc, "img", void 0, {
|
|
1602
1602
|
width: "100%",
|
|
1603
1603
|
height: "100%",
|
|
1604
|
-
...
|
|
1604
|
+
...chunkXGPLA2OY_cjs.getImageFitStyle(element)
|
|
1605
1605
|
});
|
|
1606
1606
|
img.setAttribute("src", src);
|
|
1607
1607
|
img.setAttribute("alt", "");
|
|
@@ -1611,7 +1611,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1611
1611
|
appendOwnReflection(doc, box, element, mediaDataUrls, suppressOwnReflection);
|
|
1612
1612
|
return box;
|
|
1613
1613
|
}
|
|
1614
|
-
const paragraphs =
|
|
1614
|
+
const paragraphs = chunkXGPLA2OY_cjs.buildParagraphs(element);
|
|
1615
1615
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
1616
1616
|
if (hasText) {
|
|
1617
1617
|
box.appendChild(renderTextBlock(doc, paragraphs, getTextBlockStyle(element)));
|
|
@@ -1623,20 +1623,20 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1623
1623
|
// src/pptx/dom/elements/shape-filter-defs.ts
|
|
1624
1624
|
var OUTLINE_SVG_STYLE = "position:absolute;inset:0;width:100%;height:100%;min-width:1px;min-height:1px;overflow:visible;pointer-events:none";
|
|
1625
1625
|
function renderShapeFilterDefs(doc, element) {
|
|
1626
|
-
const style =
|
|
1626
|
+
const style = chunkXGPLA2OY_cjs.getEffectStyleSource(element);
|
|
1627
1627
|
if (!style) {
|
|
1628
1628
|
return null;
|
|
1629
1629
|
}
|
|
1630
1630
|
const markups = [];
|
|
1631
|
-
const duotone =
|
|
1631
|
+
const duotone = chunkXGPLA2OY_cjs.getDuotoneSvgFilter(style, element.id);
|
|
1632
1632
|
if (duotone) {
|
|
1633
1633
|
markups.push(duotone.filterMarkup);
|
|
1634
1634
|
}
|
|
1635
|
-
const softEdge =
|
|
1635
|
+
const softEdge = chunkXGPLA2OY_cjs.getSoftEdgeSvgFilter(style, element.id);
|
|
1636
1636
|
if (softEdge) {
|
|
1637
1637
|
markups.push(softEdge.filterMarkup);
|
|
1638
1638
|
}
|
|
1639
|
-
const bevelLighting =
|
|
1639
|
+
const bevelLighting = chunkXGPLA2OY_cjs.getBevelLightingSvgFilter(element);
|
|
1640
1640
|
if (bevelLighting) {
|
|
1641
1641
|
markups.push(bevelLighting.filterMarkup);
|
|
1642
1642
|
}
|
|
@@ -1654,7 +1654,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1654
1654
|
if (!pptx.hasShapeProperties(element)) {
|
|
1655
1655
|
return null;
|
|
1656
1656
|
}
|
|
1657
|
-
const overlay =
|
|
1657
|
+
const overlay = chunkXGPLA2OY_cjs.getComputedEffectStyle(element).fillOverlay;
|
|
1658
1658
|
if (!overlay) {
|
|
1659
1659
|
return null;
|
|
1660
1660
|
}
|
|
@@ -1669,7 +1669,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1669
1669
|
return layer;
|
|
1670
1670
|
}
|
|
1671
1671
|
function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
1672
|
-
const wrapperStyle =
|
|
1672
|
+
const wrapperStyle = chunkXGPLA2OY_cjs.getComputedEffectStyle(element).reflection;
|
|
1673
1673
|
if (!wrapperStyle) {
|
|
1674
1674
|
return null;
|
|
1675
1675
|
}
|
|
@@ -1679,13 +1679,13 @@ function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
|
1679
1679
|
return layer;
|
|
1680
1680
|
}
|
|
1681
1681
|
function renderHollowHitOutline(doc, element) {
|
|
1682
|
-
const hit =
|
|
1682
|
+
const hit = chunkXGPLA2OY_cjs.buildHollowHitOutline(element);
|
|
1683
1683
|
if (!hit) {
|
|
1684
1684
|
return null;
|
|
1685
1685
|
}
|
|
1686
1686
|
const svg = createSvgEl(doc, "svg", {
|
|
1687
1687
|
"aria-hidden": "true",
|
|
1688
|
-
viewBox:
|
|
1688
|
+
viewBox: chunkXGPLA2OY_cjs.strokeOutlineViewBox(element),
|
|
1689
1689
|
preserveAspectRatio: "none"
|
|
1690
1690
|
});
|
|
1691
1691
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
@@ -1718,20 +1718,20 @@ function renderShapeSubpathFillOverlay(doc, element) {
|
|
|
1718
1718
|
return svg;
|
|
1719
1719
|
}
|
|
1720
1720
|
function renderStrokeOutline(doc, element) {
|
|
1721
|
-
const outline =
|
|
1721
|
+
const outline = chunkXGPLA2OY_cjs.buildStrokeOutline(element);
|
|
1722
1722
|
if (!outline) {
|
|
1723
1723
|
return null;
|
|
1724
1724
|
}
|
|
1725
1725
|
const svg = createSvgEl(doc, "svg", {
|
|
1726
1726
|
class: "pptx-vanilla-gradient-outline",
|
|
1727
1727
|
"aria-hidden": "true",
|
|
1728
|
-
viewBox:
|
|
1728
|
+
viewBox: chunkXGPLA2OY_cjs.strokeOutlineViewBox(element),
|
|
1729
1729
|
preserveAspectRatio: "none"
|
|
1730
1730
|
});
|
|
1731
1731
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
1732
1732
|
if (outline.paint) {
|
|
1733
1733
|
const defs = createSvgEl(doc, "defs");
|
|
1734
|
-
if (
|
|
1734
|
+
if (chunkXGPLA2OY_cjs.isPatternPaint(outline.paint)) {
|
|
1735
1735
|
const pattern = createSvgEl(doc, "pattern", {
|
|
1736
1736
|
id: outline.paint.id,
|
|
1737
1737
|
width: outline.paint.width,
|
|
@@ -1746,7 +1746,7 @@ function renderStrokeOutline(doc, element) {
|
|
|
1746
1746
|
pattern.appendChild(image);
|
|
1747
1747
|
defs.appendChild(pattern);
|
|
1748
1748
|
} else {
|
|
1749
|
-
defs.innerHTML =
|
|
1749
|
+
defs.innerHTML = chunkXGPLA2OY_cjs.svgGradientMarkup(outline.paint);
|
|
1750
1750
|
}
|
|
1751
1751
|
svg.appendChild(defs);
|
|
1752
1752
|
}
|
|
@@ -1797,14 +1797,14 @@ function indexRenderedNodes(root) {
|
|
|
1797
1797
|
return byId;
|
|
1798
1798
|
}
|
|
1799
1799
|
function paintInheritedFill(node, element, parentGroupFill) {
|
|
1800
|
-
const inherited =
|
|
1800
|
+
const inherited = chunkXGPLA2OY_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1801
1801
|
if (inherited) {
|
|
1802
1802
|
applyGroupChildFill(node, inherited);
|
|
1803
1803
|
}
|
|
1804
1804
|
if (element.type !== "group") {
|
|
1805
1805
|
return;
|
|
1806
1806
|
}
|
|
1807
|
-
const childFill =
|
|
1807
|
+
const childFill = chunkXGPLA2OY_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1808
1808
|
if (!childFill) {
|
|
1809
1809
|
return;
|
|
1810
1810
|
}
|
|
@@ -1818,7 +1818,7 @@ function paintInheritedFill(node, element, parentGroupFill) {
|
|
|
1818
1818
|
}
|
|
1819
1819
|
var renderGroupElement = (element, zIndex, context) => {
|
|
1820
1820
|
const el = createEl(context.document, "div", "pptxv-element pptxv-group", {
|
|
1821
|
-
...
|
|
1821
|
+
...chunkXGPLA2OY_cjs.getContainerStyle(element, zIndex),
|
|
1822
1822
|
// A group paints no fill/outline of its own, but `p:grpSpPr/a:effectLst`
|
|
1823
1823
|
// DOES carry a shadow/glow/soft-edge for the group's own composite
|
|
1824
1824
|
// raster (see shared `getComputedEffectStyle`), expressed as `filter` /
|
|
@@ -1835,7 +1835,7 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1835
1835
|
el.appendChild(reflection);
|
|
1836
1836
|
}
|
|
1837
1837
|
if (element.type === "group" && element.children?.length) {
|
|
1838
|
-
const parentGroupFill =
|
|
1838
|
+
const parentGroupFill = chunkXGPLA2OY_cjs.getGroupChildParentFill(element);
|
|
1839
1839
|
element.children.forEach((child, index) => {
|
|
1840
1840
|
const childEl = context.renderElement(child, index);
|
|
1841
1841
|
if (childEl) {
|
|
@@ -1850,12 +1850,12 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1850
1850
|
// src/pptx/dom/elements/image.ts
|
|
1851
1851
|
var renderImageElement = (element, zIndex, context) => {
|
|
1852
1852
|
const doc = context.document;
|
|
1853
|
-
const geometry = element.type === "image" || element.type === "picture" ?
|
|
1853
|
+
const geometry = element.type === "image" || element.type === "picture" ? chunkXGPLA2OY_cjs.resolveShapeGeometry(element) : void 0;
|
|
1854
1854
|
const geometryClipPath = geometry?.kind === "clipPath" ? geometry.clipPath : void 0;
|
|
1855
|
-
const cropShapeClipPath = element.type === "image" || element.type === "picture" ?
|
|
1855
|
+
const cropShapeClipPath = element.type === "image" || element.type === "picture" ? chunkXGPLA2OY_cjs.getCropShapeClipPath(element.cropShape, element.width, element.height) : void 0;
|
|
1856
1856
|
const el = createEl(doc, "div", "pptxv-element pptxv-image", {
|
|
1857
|
-
...
|
|
1858
|
-
overflow:
|
|
1857
|
+
...chunkXGPLA2OY_cjs.getContainerStyle(element, zIndex),
|
|
1858
|
+
overflow: chunkXGPLA2OY_cjs.getImageOverflow(element),
|
|
1859
1859
|
// The picture's own shape geometry (prstGeom / custGeom) clips the frame,
|
|
1860
1860
|
// not the `<img>` - a pixel-space clip on the img would be scaled and
|
|
1861
1861
|
// shifted by the crop transform.
|
|
@@ -1863,11 +1863,11 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1863
1863
|
...geometryClipPath ? { clipPath: geometryClipPath } : cropShapeClipPath ? { clipPath: cropShapeClipPath } : {}
|
|
1864
1864
|
});
|
|
1865
1865
|
el.dataset.elementId = element.id;
|
|
1866
|
-
const src =
|
|
1866
|
+
const src = chunkXGPLA2OY_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
1867
1867
|
if (!src) {
|
|
1868
1868
|
return el;
|
|
1869
1869
|
}
|
|
1870
|
-
const fx =
|
|
1870
|
+
const fx = chunkXGPLA2OY_cjs.getComputedImageStyle(element);
|
|
1871
1871
|
for (const f of fx.svgFilters) {
|
|
1872
1872
|
const svg = createSvgEl(doc, "svg", { width: 0, height: 0, "aria-hidden": "true" });
|
|
1873
1873
|
svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden");
|
|
@@ -1880,7 +1880,7 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1880
1880
|
el.appendChild(svg);
|
|
1881
1881
|
}
|
|
1882
1882
|
const reflection = renderReflectionOverlay(doc, element, context.mediaDataUrls);
|
|
1883
|
-
const tiling =
|
|
1883
|
+
const tiling = chunkXGPLA2OY_cjs.getImageTilingStyle(element, chunkXGPLA2OY_cjs.getCachedNativeImageSize(src));
|
|
1884
1884
|
if (tiling) {
|
|
1885
1885
|
const tile = createEl(doc, "div", "pptxv-image-tile", tiling);
|
|
1886
1886
|
if (fx.filter) {
|
|
@@ -1889,10 +1889,10 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1889
1889
|
if (fx.opacity !== void 0) {
|
|
1890
1890
|
tile.style.opacity = String(fx.opacity);
|
|
1891
1891
|
}
|
|
1892
|
-
if (!
|
|
1893
|
-
void
|
|
1892
|
+
if (!chunkXGPLA2OY_cjs.getCachedNativeImageSize(src)) {
|
|
1893
|
+
void chunkXGPLA2OY_cjs.probeNativeImageSize(src).then((size) => {
|
|
1894
1894
|
if (size) {
|
|
1895
|
-
applyStyleMap(tile,
|
|
1895
|
+
applyStyleMap(tile, chunkXGPLA2OY_cjs.getImageTilingStyle(element, size) ?? {});
|
|
1896
1896
|
}
|
|
1897
1897
|
return void 0;
|
|
1898
1898
|
});
|
|
@@ -1903,8 +1903,8 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1903
1903
|
}
|
|
1904
1904
|
return el;
|
|
1905
1905
|
}
|
|
1906
|
-
const fit =
|
|
1907
|
-
const fillCounterTransform =
|
|
1906
|
+
const fit = chunkXGPLA2OY_cjs.getImageFitStyle(element);
|
|
1907
|
+
const fillCounterTransform = chunkXGPLA2OY_cjs.getImageFillCounterTransform(element, Boolean(fit.transform));
|
|
1908
1908
|
const img = createEl(doc, "img", void 0, {
|
|
1909
1909
|
...fit,
|
|
1910
1910
|
display: "block",
|
|
@@ -1922,14 +1922,14 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1922
1922
|
if (element.type === "image" || element.type === "picture") {
|
|
1923
1923
|
const clrChange = element.imageEffects?.clrChange;
|
|
1924
1924
|
if (clrChange) {
|
|
1925
|
-
void
|
|
1925
|
+
void chunkXGPLA2OY_cjs.resolveColorChangedImageSource(src, clrChange).then((resolved) => {
|
|
1926
1926
|
if (img.src === src || img.getAttribute("src") === src) {
|
|
1927
1927
|
img.src = resolved;
|
|
1928
1928
|
}
|
|
1929
1929
|
return void 0;
|
|
1930
1930
|
});
|
|
1931
1931
|
}
|
|
1932
|
-
const wash =
|
|
1932
|
+
const wash = chunkXGPLA2OY_cjs.getImageColorWashStyle(element.imageEffects?.colorWash);
|
|
1933
1933
|
if (wash) {
|
|
1934
1934
|
el.appendChild(
|
|
1935
1935
|
createEl(doc, "div", "pptxv-image-color-wash", {
|
|
@@ -1958,7 +1958,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1958
1958
|
doc,
|
|
1959
1959
|
"div",
|
|
1960
1960
|
"pptxv-element pptxv-ink",
|
|
1961
|
-
|
|
1961
|
+
chunkXGPLA2OY_cjs.getContainerStyle(element, zIndex)
|
|
1962
1962
|
);
|
|
1963
1963
|
wrapper.dataset.elementId = element.id;
|
|
1964
1964
|
const paths = element.inkPaths;
|
|
@@ -1979,7 +1979,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1979
1979
|
keyframes.textContent = chunkNTXHQHCS_cjs.INK_REPLAY_KEYFRAMES;
|
|
1980
1980
|
svg.appendChild(keyframes);
|
|
1981
1981
|
}
|
|
1982
|
-
const views =
|
|
1982
|
+
const views = chunkXGPLA2OY_cjs.buildInkGroupStrokes(element, { color: chunkLCIXR7WE_cjs.DEFAULT_STROKE_COLOR, width: 1 });
|
|
1983
1983
|
for (const [i, view] of views.entries()) {
|
|
1984
1984
|
svg.appendChild(buildStrokeSvg(doc, view, replayStyles[i]));
|
|
1985
1985
|
}
|
|
@@ -2033,12 +2033,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2033
2033
|
let stopButton = null;
|
|
2034
2034
|
const update = (playing) => {
|
|
2035
2035
|
const input = { fullScreen: element.fullScreen, presenting: context.presenting, playing };
|
|
2036
|
-
const active =
|
|
2036
|
+
const active = chunkXGPLA2OY_cjs.isMediaFullscreenActive(input);
|
|
2037
2037
|
applyStyleMap(
|
|
2038
2038
|
container,
|
|
2039
|
-
active ?
|
|
2039
|
+
active ? chunkXGPLA2OY_cjs.MEDIA_FULLSCREEN_OVERLAY_STYLE : mediaFullscreenResetStyle(baseStyle)
|
|
2040
2040
|
);
|
|
2041
|
-
if (
|
|
2041
|
+
if (chunkXGPLA2OY_cjs.shouldShowMediaFullscreenStopButton(input)) {
|
|
2042
2042
|
if (!stopButton) {
|
|
2043
2043
|
stopButton = buildFullscreenStopButton(
|
|
2044
2044
|
doc,
|
|
@@ -2063,12 +2063,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2063
2063
|
|
|
2064
2064
|
// src/pptx/dom/elements/media.ts
|
|
2065
2065
|
function applyMediaPresentingState(el, presenting, playback) {
|
|
2066
|
-
|
|
2066
|
+
chunkXGPLA2OY_cjs.applyMediaPlaybackAttributes(el, playback);
|
|
2067
2067
|
if (presenting) {
|
|
2068
|
-
|
|
2069
|
-
|
|
2068
|
+
chunkXGPLA2OY_cjs.startMediaAutoplay(el, { trimStartMs: playback.trimStartMs });
|
|
2069
|
+
chunkXGPLA2OY_cjs.scheduleMediaTrimAndFade(el, {
|
|
2070
2070
|
...playback,
|
|
2071
|
-
volume:
|
|
2071
|
+
volume: chunkXGPLA2OY_cjs.mediaPlaybackAttributes(playback).volume
|
|
2072
2072
|
});
|
|
2073
2073
|
} else if (!el.paused) {
|
|
2074
2074
|
el.pause();
|
|
@@ -2078,18 +2078,18 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2078
2078
|
if (element.type !== "media") {
|
|
2079
2079
|
return null;
|
|
2080
2080
|
}
|
|
2081
|
-
const surface =
|
|
2081
|
+
const surface = chunkXGPLA2OY_cjs.mediaSurfaceOf({
|
|
2082
2082
|
interactive: context.interactive === true || context.reading === true,
|
|
2083
2083
|
presenting: context.presenting
|
|
2084
2084
|
});
|
|
2085
|
-
const showTransport =
|
|
2085
|
+
const showTransport = chunkXGPLA2OY_cjs.mediaTransportVisible({ ...surface, canvasTransport: true });
|
|
2086
2086
|
const doc = context.document;
|
|
2087
|
-
const baseStyle =
|
|
2087
|
+
const baseStyle = chunkXGPLA2OY_cjs.getContainerStyle(element, zIndex);
|
|
2088
2088
|
const el = createEl(doc, "div", "pptxv-element pptxv-media", baseStyle);
|
|
2089
2089
|
el.dataset.elementId = element.id;
|
|
2090
2090
|
const mediaSrc = element.mediaData ?? (element.mediaPath ? context.mediaDataUrls.get(element.mediaPath) : void 0);
|
|
2091
|
-
const posterSrc =
|
|
2092
|
-
const onlineVideoEmbedUrl =
|
|
2091
|
+
const posterSrc = chunkXGPLA2OY_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
2092
|
+
const onlineVideoEmbedUrl = chunkXGPLA2OY_cjs.getOnlineVideoEmbed(element)?.embedUrl;
|
|
2093
2093
|
if (onlineVideoEmbedUrl && element.mediaType === "video") {
|
|
2094
2094
|
const iframe = createEl(doc, "iframe", "pptxv-media-video pptxv-media-iframe", {
|
|
2095
2095
|
width: "100%",
|
|
@@ -2099,8 +2099,8 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2099
2099
|
});
|
|
2100
2100
|
iframe.src = onlineVideoEmbedUrl;
|
|
2101
2101
|
iframe.title = context.t("pptx.media.onlineVideoTitle");
|
|
2102
|
-
iframe.allow =
|
|
2103
|
-
iframe.sandbox.value =
|
|
2102
|
+
iframe.allow = chunkXGPLA2OY_cjs.ONLINE_VIDEO_IFRAME_ALLOW;
|
|
2103
|
+
iframe.sandbox.value = chunkXGPLA2OY_cjs.ONLINE_VIDEO_IFRAME_SANDBOX;
|
|
2104
2104
|
iframe.allowFullscreen = true;
|
|
2105
2105
|
el.appendChild(iframe);
|
|
2106
2106
|
return el;
|
|
@@ -2129,21 +2129,21 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2129
2129
|
audio.src = mediaSrc;
|
|
2130
2130
|
audio.controls = showTransport;
|
|
2131
2131
|
el.appendChild(audio);
|
|
2132
|
-
if (context.presenting &&
|
|
2132
|
+
if (context.presenting && chunkXGPLA2OY_cjs.registerCrossSlideAudio(element, mediaSrc)) {
|
|
2133
2133
|
audio.muted = true;
|
|
2134
|
-
|
|
2134
|
+
chunkXGPLA2OY_cjs.applyMediaPlaybackAttributes(audio, element);
|
|
2135
2135
|
return el;
|
|
2136
2136
|
}
|
|
2137
2137
|
applyMediaPresentingState(audio, context.presenting, element);
|
|
2138
2138
|
wireMediaFullscreenOverlay(doc, el, audio, element, context, baseStyle);
|
|
2139
2139
|
return el;
|
|
2140
2140
|
}
|
|
2141
|
-
const fallback =
|
|
2141
|
+
const fallback = chunkXGPLA2OY_cjs.mediaFallbackVisual(surface, {
|
|
2142
2142
|
hasPoster: Boolean(posterSrc),
|
|
2143
2143
|
missing: element.mediaMissing === true
|
|
2144
2144
|
});
|
|
2145
|
-
const icon =
|
|
2146
|
-
const labelKey =
|
|
2145
|
+
const icon = chunkXGPLA2OY_cjs.mediaFallbackIcon(fallback, element.mediaType);
|
|
2146
|
+
const labelKey = chunkXGPLA2OY_cjs.mediaFallbackLabelKey(fallback, element.mediaType);
|
|
2147
2147
|
if (fallback.poster && posterSrc) {
|
|
2148
2148
|
const img = createEl(doc, "img", "pptxv-media-poster", {
|
|
2149
2149
|
width: "100%",
|
|
@@ -2160,7 +2160,7 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2160
2160
|
if (fallback.badge === "missing") {
|
|
2161
2161
|
badge.classList.add("pptxv-media-badge-missing");
|
|
2162
2162
|
}
|
|
2163
|
-
badge.setAttribute(
|
|
2163
|
+
badge.setAttribute(chunkXGPLA2OY_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.badge);
|
|
2164
2164
|
badge.appendChild(buildIcon(doc, icon));
|
|
2165
2165
|
if (labelKey !== void 0 && fallback.badge === "missing") {
|
|
2166
2166
|
const text = createEl(doc, "span");
|
|
@@ -2173,7 +2173,7 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2173
2173
|
}
|
|
2174
2174
|
if (fallback.placeholder !== "none") {
|
|
2175
2175
|
el.classList.add("pptxv-placeholder", "pptxv-media-placeholder");
|
|
2176
|
-
el.setAttribute(
|
|
2176
|
+
el.setAttribute(chunkXGPLA2OY_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.placeholder);
|
|
2177
2177
|
if (icon.length > 0) {
|
|
2178
2178
|
el.appendChild(buildIcon(doc, icon));
|
|
2179
2179
|
}
|
|
@@ -2209,7 +2209,7 @@ var renderModel3dElement = (element, zIndex, context) => {
|
|
|
2209
2209
|
doc,
|
|
2210
2210
|
"div",
|
|
2211
2211
|
"pptxv-element pptxv-model3d",
|
|
2212
|
-
|
|
2212
|
+
chunkXGPLA2OY_cjs.getContainerStyle(element, zIndex)
|
|
2213
2213
|
);
|
|
2214
2214
|
el.dataset.elementId = element.id;
|
|
2215
2215
|
const label = context.t("pptx.model3d.label");
|
|
@@ -2346,7 +2346,7 @@ function buildOleIcon(doc, type, color) {
|
|
|
2346
2346
|
fill: "none",
|
|
2347
2347
|
"aria-hidden": "true"
|
|
2348
2348
|
});
|
|
2349
|
-
for (const shape of
|
|
2349
|
+
for (const shape of chunkXGPLA2OY_cjs.getOleIconShapes(type)) {
|
|
2350
2350
|
const node = createSvgEl(doc, shape.tag, shape.attrs);
|
|
2351
2351
|
if (shape.tag === "text") {
|
|
2352
2352
|
node.setAttribute("fill", color);
|
|
@@ -2365,21 +2365,21 @@ var renderOleElement = (element, zIndex, context) => {
|
|
|
2365
2365
|
return null;
|
|
2366
2366
|
}
|
|
2367
2367
|
const doc = context.document;
|
|
2368
|
-
const oleType =
|
|
2369
|
-
const typeColor =
|
|
2370
|
-
const typeLabel =
|
|
2371
|
-
const el = createEl(doc, "div", "pptxv-element pptxv-ole",
|
|
2368
|
+
const oleType = chunkXGPLA2OY_cjs.resolveOleType(element);
|
|
2369
|
+
const typeColor = chunkXGPLA2OY_cjs.getOleTypeColor(oleType);
|
|
2370
|
+
const typeLabel = chunkXGPLA2OY_cjs.getOleTypeLabel(oleType);
|
|
2371
|
+
const el = createEl(doc, "div", "pptxv-element pptxv-ole", chunkXGPLA2OY_cjs.getContainerStyle(element, zIndex));
|
|
2372
2372
|
el.dataset.elementId = element.id;
|
|
2373
2373
|
el.setAttribute("role", "group");
|
|
2374
|
-
el.setAttribute("aria-label",
|
|
2374
|
+
el.setAttribute("aria-label", chunkXGPLA2OY_cjs.getOleAriaLabel(element));
|
|
2375
2375
|
el.title = infoLines(element, typeLabel).join("\n");
|
|
2376
2376
|
if (element.previewImageData) {
|
|
2377
|
-
el.appendChild(buildPreview(doc, element, typeColor,
|
|
2377
|
+
el.appendChild(buildPreview(doc, element, typeColor, chunkXGPLA2OY_cjs.getOleBadgeLabel(oleType)));
|
|
2378
2378
|
} else {
|
|
2379
2379
|
el.appendChild(buildPlaceholder2(doc, element, oleType, typeColor, typeLabel));
|
|
2380
2380
|
}
|
|
2381
|
-
const showActions =
|
|
2382
|
-
|
|
2381
|
+
const showActions = chunkXGPLA2OY_cjs.oleActionsVisible(
|
|
2382
|
+
chunkXGPLA2OY_cjs.mediaSurfaceOf({
|
|
2383
2383
|
interactive: context.interactive === true,
|
|
2384
2384
|
presenting: context.presenting
|
|
2385
2385
|
})
|
|
@@ -2395,7 +2395,7 @@ function infoLines(el, typeLabel) {
|
|
|
2395
2395
|
if (name) {
|
|
2396
2396
|
lines.push(name);
|
|
2397
2397
|
}
|
|
2398
|
-
const size =
|
|
2398
|
+
const size = chunkXGPLA2OY_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2399
2399
|
if (size) {
|
|
2400
2400
|
lines.push(size);
|
|
2401
2401
|
}
|
|
@@ -2419,7 +2419,7 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2419
2419
|
display: "block"
|
|
2420
2420
|
});
|
|
2421
2421
|
img.src = el.previewImageData ?? "";
|
|
2422
|
-
img.alt =
|
|
2422
|
+
img.alt = chunkXGPLA2OY_cjs.getOleAriaLabel(el);
|
|
2423
2423
|
img.draggable = false;
|
|
2424
2424
|
preview.appendChild(img);
|
|
2425
2425
|
const badge = createSvgEl(doc, "svg", { width: 24, height: 24, viewBox: "0 0 24 24" });
|
|
@@ -2446,7 +2446,7 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2446
2446
|
}
|
|
2447
2447
|
function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
2448
2448
|
const box = createEl(doc, "div", "pptxv-ole-placeholder", {
|
|
2449
|
-
...
|
|
2449
|
+
...chunkXGPLA2OY_cjs.getPlaceholderStyle(oleType),
|
|
2450
2450
|
width: "100%",
|
|
2451
2451
|
height: "100%",
|
|
2452
2452
|
display: "flex",
|
|
@@ -2467,7 +2467,7 @@ function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
|
2467
2467
|
whiteSpace: "nowrap",
|
|
2468
2468
|
color: typeColor
|
|
2469
2469
|
});
|
|
2470
|
-
name.textContent =
|
|
2470
|
+
name.textContent = chunkXGPLA2OY_cjs.getOleDisplayName(el);
|
|
2471
2471
|
box.appendChild(name);
|
|
2472
2472
|
if (el.fileName) {
|
|
2473
2473
|
const sublabel = createEl(doc, "span", "pptxv-ole-sublabel", {
|
|
@@ -2519,7 +2519,7 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2519
2519
|
for (const type of ["pointerdown", "mousedown", "click"]) {
|
|
2520
2520
|
bar.addEventListener(type, (event) => event.stopPropagation());
|
|
2521
2521
|
}
|
|
2522
|
-
const size =
|
|
2522
|
+
const size = chunkXGPLA2OY_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2523
2523
|
if (size) {
|
|
2524
2524
|
const meta = createEl(doc, "span", "pptxv-ole-meta", {
|
|
2525
2525
|
marginRight: "auto",
|
|
@@ -2539,14 +2539,14 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2539
2539
|
download.title = downloadTitle;
|
|
2540
2540
|
download.textContent = context.t("pptx.ole.download");
|
|
2541
2541
|
bar.appendChild(download);
|
|
2542
|
-
if (
|
|
2542
|
+
if (chunkXGPLA2OY_cjs.isBrowserOpenableMime(el.oleEmbeddedMimeType)) {
|
|
2543
2543
|
const open = createEl(doc, "button", "pptxv-ole-action", ACTION_STYLE);
|
|
2544
2544
|
open.type = "button";
|
|
2545
2545
|
const openTitle = context.t("pptx.ole.openName", { name: downloadName });
|
|
2546
2546
|
open.setAttribute("aria-label", openTitle);
|
|
2547
2547
|
open.title = openTitle;
|
|
2548
2548
|
open.textContent = context.t("pptx.ole.open");
|
|
2549
|
-
open.addEventListener("click", () =>
|
|
2549
|
+
open.addEventListener("click", () => chunkXGPLA2OY_cjs.openUrlInNewTab(data));
|
|
2550
2550
|
bar.appendChild(open);
|
|
2551
2551
|
}
|
|
2552
2552
|
return bar;
|
|
@@ -2558,7 +2558,7 @@ var renderPlaceholderElement = (element, zIndex, context) => {
|
|
|
2558
2558
|
context.document,
|
|
2559
2559
|
"div",
|
|
2560
2560
|
"pptxv-element pptxv-placeholder",
|
|
2561
|
-
|
|
2561
|
+
chunkXGPLA2OY_cjs.getContainerStyle(element, zIndex)
|
|
2562
2562
|
);
|
|
2563
2563
|
el.dataset.elementId = element.id;
|
|
2564
2564
|
el.dataset.elementType = element.type;
|
|
@@ -2574,7 +2574,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2574
2574
|
return null;
|
|
2575
2575
|
}
|
|
2576
2576
|
const doc = context.document;
|
|
2577
|
-
const summaryView =
|
|
2577
|
+
const summaryView = chunkXGPLA2OY_cjs.buildSummaryZoomView(
|
|
2578
2578
|
element,
|
|
2579
2579
|
(index) => {
|
|
2580
2580
|
const slide = context.slides?.[index];
|
|
@@ -2594,7 +2594,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2594
2594
|
doc,
|
|
2595
2595
|
"div",
|
|
2596
2596
|
"pptxv-element pptxv-zoom pptxv-summary-zoom",
|
|
2597
|
-
|
|
2597
|
+
chunkXGPLA2OY_cjs.getContainerStyle(element, zIndex)
|
|
2598
2598
|
);
|
|
2599
2599
|
const content = createEl(doc, "div", "pptxv-summary-zoom-content", summaryView.containerStyle);
|
|
2600
2600
|
root.dataset.elementId = element.id;
|
|
@@ -2660,7 +2660,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2660
2660
|
const target = element.targetSlideIndex ?? 0;
|
|
2661
2661
|
const targetSlide = context.slides?.[target];
|
|
2662
2662
|
const interactive = context.presenting && context.onZoomClick !== void 0;
|
|
2663
|
-
const el = createEl(doc, "div", "pptxv-element pptxv-zoom",
|
|
2663
|
+
const el = createEl(doc, "div", "pptxv-element pptxv-zoom", chunkXGPLA2OY_cjs.getContainerStyle(element, zIndex));
|
|
2664
2664
|
el.dataset.elementId = element.id;
|
|
2665
2665
|
el.dataset.zoomType = zoomType;
|
|
2666
2666
|
el.dataset.zoomTarget = String(target);
|
|
@@ -2670,7 +2670,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2670
2670
|
el.tabIndex = 0;
|
|
2671
2671
|
el.style.cursor = "pointer";
|
|
2672
2672
|
const activate = () => {
|
|
2673
|
-
const zoomTarget =
|
|
2673
|
+
const zoomTarget = chunkXGPLA2OY_cjs.resolveZoomNavigationTarget(element);
|
|
2674
2674
|
if (zoomTarget) {
|
|
2675
2675
|
context.onZoomClick?.(zoomTarget, context.currentSlideIndex ?? 0);
|
|
2676
2676
|
}
|
|
@@ -2785,7 +2785,7 @@ function registerExtraRenderers(registry) {
|
|
|
2785
2785
|
// src/pptx/dom/elements/smartart-3d.ts
|
|
2786
2786
|
var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
2787
2787
|
const wrapper = renderSmartArtSvg(element, zIndex, context);
|
|
2788
|
-
const spec = wrapper ?
|
|
2788
|
+
const spec = wrapper ? chunkXGPLA2OY_cjs.resolveSmartArtThreeViewSpec(element, context.smartArt3D) : null;
|
|
2789
2789
|
if (!wrapper || !spec) {
|
|
2790
2790
|
return wrapper;
|
|
2791
2791
|
}
|
|
@@ -2795,18 +2795,18 @@ var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
|
2795
2795
|
textStyle: context.presentationStates?.get(element.id)?.textStyle
|
|
2796
2796
|
});
|
|
2797
2797
|
if (context.onSmartArtNodeTextChange && context.interactive && !context.presenting) {
|
|
2798
|
-
const layer = renderSmartArtSvg(
|
|
2798
|
+
const layer = renderSmartArtSvg(chunkXGPLA2OY_cjs.elementInLocalFrame(element), 0, context);
|
|
2799
2799
|
if (layer) {
|
|
2800
2800
|
layer.classList.add("pptxv-smartart-3d-edit-layer");
|
|
2801
2801
|
layer.setAttribute("data-smartart-3d-edit-layer", "true");
|
|
2802
|
-
|
|
2802
|
+
chunkXGPLA2OY_cjs.stripEditLayerMarkers(layer);
|
|
2803
2803
|
layer.setAttribute("aria-hidden", "true");
|
|
2804
2804
|
Object.assign(layer.style, { position: "absolute", inset: "0", zIndex: "1" });
|
|
2805
2805
|
for (const svg of layer.querySelectorAll("svg")) {
|
|
2806
2806
|
svg.style.opacity = "0";
|
|
2807
2807
|
}
|
|
2808
2808
|
wrapper.appendChild(layer);
|
|
2809
|
-
|
|
2809
|
+
chunkXGPLA2OY_cjs.routeEditLayerPointerToNodes(layer);
|
|
2810
2810
|
}
|
|
2811
2811
|
}
|
|
2812
2812
|
return wrapper;
|
|
@@ -2819,7 +2819,7 @@ function nodeTarget(target) {
|
|
|
2819
2819
|
}
|
|
2820
2820
|
function enableSmartArtEditing(chrome, element, context) {
|
|
2821
2821
|
const data = element.smartArtData;
|
|
2822
|
-
if (!data || !context.onSmartArtNodeTextChange && !context.onSmartArtNodeFillChange || !
|
|
2822
|
+
if (!data || !context.onSmartArtNodeTextChange && !context.onSmartArtNodeFillChange || !chunkXGPLA2OY_cjs.canDrillDown(element)) {
|
|
2823
2823
|
return;
|
|
2824
2824
|
}
|
|
2825
2825
|
let editor = null;
|
|
@@ -2841,8 +2841,8 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2841
2841
|
}
|
|
2842
2842
|
event.stopPropagation();
|
|
2843
2843
|
const textNode = target.querySelector("text");
|
|
2844
|
-
const textRect = textNode ?
|
|
2845
|
-
const rect = textRect && textRect.width > 0 ? textRect :
|
|
2844
|
+
const textRect = textNode ? chunkXGPLA2OY_cjs.measureSvgViewportRect(textNode) : null;
|
|
2845
|
+
const rect = textRect && textRect.width > 0 ? textRect : chunkXGPLA2OY_cjs.measureSvgViewportRect(target);
|
|
2846
2846
|
if (!rect) {
|
|
2847
2847
|
return;
|
|
2848
2848
|
}
|
|
@@ -2866,7 +2866,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2866
2866
|
textAlign: "center"
|
|
2867
2867
|
});
|
|
2868
2868
|
editor = input;
|
|
2869
|
-
input.value =
|
|
2869
|
+
input.value = chunkXGPLA2OY_cjs.findSmartArtNodeText(data, nodeId) ?? "";
|
|
2870
2870
|
const commit = () => {
|
|
2871
2871
|
if (input !== editor) {
|
|
2872
2872
|
return;
|
|
@@ -2898,7 +2898,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2898
2898
|
}
|
|
2899
2899
|
cancelHide();
|
|
2900
2900
|
swatches?.remove();
|
|
2901
|
-
const rect =
|
|
2901
|
+
const rect = chunkXGPLA2OY_cjs.measureSvgViewportRect(target);
|
|
2902
2902
|
if (!rect) {
|
|
2903
2903
|
return;
|
|
2904
2904
|
}
|
|
@@ -2917,7 +2917,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2917
2917
|
});
|
|
2918
2918
|
swatches.setAttribute("role", "group");
|
|
2919
2919
|
swatches.setAttribute("aria-label", context.t("pptx.smartArt.fillColor"));
|
|
2920
|
-
for (const color of
|
|
2920
|
+
for (const color of chunkXGPLA2OY_cjs.resolvePalette(data).slice(0, 6)) {
|
|
2921
2921
|
const button = createEl(chrome.ownerDocument, "button", "", {
|
|
2922
2922
|
width: "18px",
|
|
2923
2923
|
height: "18px",
|
|
@@ -3016,7 +3016,7 @@ function buildSmartArtFallbackSvg(doc, layout, a11yNodes = [], nodeIds = []) {
|
|
|
3016
3016
|
svg.setAttribute("class", "pptxv-smartart-svg");
|
|
3017
3017
|
svg.setAttribute("style", SMARTART_SVG_STYLE);
|
|
3018
3018
|
for (const conn of layout.connectors) {
|
|
3019
|
-
const paint =
|
|
3019
|
+
const paint = chunkXGPLA2OY_cjs.smartArtConnectorPaint(conn);
|
|
3020
3020
|
svg.appendChild(
|
|
3021
3021
|
createSvgEl(doc, "path", {
|
|
3022
3022
|
d: paint.d,
|
|
@@ -3075,7 +3075,7 @@ function buildFallbackNode(doc, node, shadowFilter, a11yLabel, nodeId) {
|
|
|
3075
3075
|
})
|
|
3076
3076
|
);
|
|
3077
3077
|
}
|
|
3078
|
-
const label =
|
|
3078
|
+
const label = chunkXGPLA2OY_cjs.smartArtNodeLabel(node);
|
|
3079
3079
|
if (label.visible) {
|
|
3080
3080
|
appendSvgTextLines(doc, g, {
|
|
3081
3081
|
lines: label.lines,
|
|
@@ -3111,41 +3111,41 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3111
3111
|
doc,
|
|
3112
3112
|
"div",
|
|
3113
3113
|
"pptxv-element pptxv-smartart",
|
|
3114
|
-
|
|
3114
|
+
chunkXGPLA2OY_cjs.getContainerStyle(element, zIndex)
|
|
3115
3115
|
);
|
|
3116
3116
|
wrapper.dataset.elementId = element.id;
|
|
3117
3117
|
wrapper.dataset.testid = `smartart-${data?.layout ?? "diagram"}`;
|
|
3118
|
-
const chrome = createEl(doc, "div", "pptxv-smartart-chrome",
|
|
3118
|
+
const chrome = createEl(doc, "div", "pptxv-smartart-chrome", chunkXGPLA2OY_cjs.buildChromeStyle(data?.chrome));
|
|
3119
3119
|
chrome.style.position = "relative";
|
|
3120
3120
|
wrapper.appendChild(chrome);
|
|
3121
3121
|
if (data) {
|
|
3122
|
-
const a11y =
|
|
3122
|
+
const a11y = chunkXGPLA2OY_cjs.buildSmartArtA11y(data);
|
|
3123
3123
|
chrome.setAttribute("role", "img");
|
|
3124
3124
|
chrome.setAttribute("aria-label", a11y.label);
|
|
3125
3125
|
}
|
|
3126
3126
|
const nodes = data?.nodes ?? [];
|
|
3127
3127
|
const drawingShapes = data?.drawingShapes ?? [];
|
|
3128
3128
|
const animationState = context.presentationStates?.get(element.id);
|
|
3129
|
-
const { nodes: revealedNodesFull } =
|
|
3129
|
+
const { nodes: revealedNodesFull } = chunkXGPLA2OY_cjs.resolveRevealedSmartArtNodes(
|
|
3130
3130
|
nodes,
|
|
3131
3131
|
animationState,
|
|
3132
3132
|
data?.presLayoutVars
|
|
3133
3133
|
);
|
|
3134
3134
|
if (data && drawingShapes.length > 0) {
|
|
3135
|
-
const revealedShapes =
|
|
3135
|
+
const revealedShapes = chunkXGPLA2OY_cjs.resolveRevealedDrawingShapes(drawingShapes, nodes, animationState);
|
|
3136
3136
|
chrome.appendChild(
|
|
3137
|
-
buildDrawingShapesSvg(doc, element.id, data,
|
|
3137
|
+
buildDrawingShapesSvg(doc, element.id, data, chunkXGPLA2OY_cjs.buildSmartArtA11y(data).nodes, revealedShapes)
|
|
3138
3138
|
);
|
|
3139
3139
|
enableSmartArtEditing(chrome, element, context);
|
|
3140
3140
|
return wrapper;
|
|
3141
3141
|
}
|
|
3142
3142
|
if (data && nodes.length > 0) {
|
|
3143
3143
|
const revealedNodes = revealedNodesFull;
|
|
3144
|
-
const layout =
|
|
3144
|
+
const layout = chunkXGPLA2OY_cjs.computeSmartArtElementLayout(
|
|
3145
3145
|
data,
|
|
3146
3146
|
revealedNodes,
|
|
3147
3147
|
{ width: element.width, height: element.height },
|
|
3148
|
-
|
|
3148
|
+
chunkXGPLA2OY_cjs.resolvePalette(data),
|
|
3149
3149
|
data.style ?? "flat",
|
|
3150
3150
|
element.id
|
|
3151
3151
|
);
|
|
@@ -3153,8 +3153,8 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3153
3153
|
buildSmartArtFallbackSvg(
|
|
3154
3154
|
doc,
|
|
3155
3155
|
layout,
|
|
3156
|
-
|
|
3157
|
-
|
|
3156
|
+
chunkXGPLA2OY_cjs.buildSmartArtA11y(data).nodes,
|
|
3157
|
+
chunkXGPLA2OY_cjs.flattenNodes(revealedNodes).map((node) => node.id)
|
|
3158
3158
|
)
|
|
3159
3159
|
);
|
|
3160
3160
|
enableSmartArtEditing(chrome, element, context);
|
|
@@ -3177,17 +3177,17 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3177
3177
|
function buildDrawingShapesSvg(doc, elementId, data, a11yNodes, revealedShapes) {
|
|
3178
3178
|
const allShapes = data.drawingShapes ?? [];
|
|
3179
3179
|
const style = data.style ?? "flat";
|
|
3180
|
-
const viewBox =
|
|
3181
|
-
const rendered =
|
|
3180
|
+
const viewBox = chunkXGPLA2OY_cjs.computeDrawingViewBox(allShapes);
|
|
3181
|
+
const rendered = chunkXGPLA2OY_cjs.projectDrawingShapes(
|
|
3182
3182
|
elementId,
|
|
3183
3183
|
revealedShapes,
|
|
3184
3184
|
viewBox,
|
|
3185
|
-
|
|
3185
|
+
chunkXGPLA2OY_cjs.resolvePalette(data),
|
|
3186
3186
|
style
|
|
3187
3187
|
);
|
|
3188
|
-
const shadow =
|
|
3188
|
+
const shadow = chunkXGPLA2OY_cjs.styleShadowFilter(style);
|
|
3189
3189
|
const labelsById = new Map(a11yNodes.map((node) => [node.id, node.label]));
|
|
3190
|
-
const nodeIds =
|
|
3190
|
+
const nodeIds = chunkXGPLA2OY_cjs.resolveRevealedDrawingShapeNodeIds(allShapes, revealedShapes, data.nodes);
|
|
3191
3191
|
const svg = createSvgEl(doc, "svg", {
|
|
3192
3192
|
viewBox: `0 0 ${viewBox.width} ${viewBox.height}`,
|
|
3193
3193
|
preserveAspectRatio: "xMidYMid meet"
|
|
@@ -3322,9 +3322,9 @@ function enableTableResize(container, table, element, context) {
|
|
|
3322
3322
|
for (const handle of [...colHandles, ...rowHandles]) {
|
|
3323
3323
|
handle.remove();
|
|
3324
3324
|
}
|
|
3325
|
-
const crossings =
|
|
3325
|
+
const crossings = chunkXGPLA2OY_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
3326
3326
|
const rowBounds = measureRowBoundaries(table);
|
|
3327
|
-
colHandles =
|
|
3327
|
+
colHandles = chunkXGPLA2OY_cjs.computeColumnBoundaries(tableData.columnWidths).map((leftPct, i) => {
|
|
3328
3328
|
const handle = createEl(doc, "div", "pptxv-table-resize-col", {
|
|
3329
3329
|
position: "absolute",
|
|
3330
3330
|
top: "0",
|
|
@@ -3334,7 +3334,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3334
3334
|
zIndex: "10",
|
|
3335
3335
|
pointerEvents: "none"
|
|
3336
3336
|
});
|
|
3337
|
-
const segments =
|
|
3337
|
+
const segments = chunkXGPLA2OY_cjs.columnHandleSegments(
|
|
3338
3338
|
crossings.columns[i] ?? [],
|
|
3339
3339
|
rowBounds,
|
|
3340
3340
|
table.offsetHeight
|
|
@@ -3364,7 +3364,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3364
3364
|
zIndex: "10",
|
|
3365
3365
|
pointerEvents: "none"
|
|
3366
3366
|
});
|
|
3367
|
-
const segments =
|
|
3367
|
+
const segments = chunkXGPLA2OY_cjs.rowHandleSegments(crossings.rows[i] ?? [], tableData.columnWidths);
|
|
3368
3368
|
for (const { leftPct, widthPct } of segments) {
|
|
3369
3369
|
handle.appendChild(
|
|
3370
3370
|
createEl(doc, "div", "pptxv-table-resize-segment", {
|
|
@@ -3408,14 +3408,14 @@ function enableTableResize(container, table, element, context) {
|
|
|
3408
3408
|
const deltaProp = (event.clientX - active.startPos) / (rect.width || 1);
|
|
3409
3409
|
context.onTableResizeColumns?.(
|
|
3410
3410
|
element,
|
|
3411
|
-
|
|
3411
|
+
chunkXGPLA2OY_cjs.computeResizedColumnWidths(active.initialWidths, active.index, deltaProp)
|
|
3412
3412
|
);
|
|
3413
3413
|
} else if (event.clientY !== active.startPos && active.type === "row") {
|
|
3414
3414
|
const deltaY = event.clientY - active.startPos;
|
|
3415
3415
|
context.onTableResizeRow?.(
|
|
3416
3416
|
element,
|
|
3417
3417
|
active.index,
|
|
3418
|
-
|
|
3418
|
+
chunkXGPLA2OY_cjs.computeResizedRowHeight(active.initialRowHeight ?? chunkXGPLA2OY_cjs.DEFAULT_ROW_HEIGHT, deltaY)
|
|
3419
3419
|
);
|
|
3420
3420
|
}
|
|
3421
3421
|
drawHandles();
|
|
@@ -3424,13 +3424,13 @@ function enableTableResize(container, table, element, context) {
|
|
|
3424
3424
|
const rect = container.getBoundingClientRect();
|
|
3425
3425
|
const localX = event.clientX - rect.left;
|
|
3426
3426
|
const localY = event.clientY - rect.top;
|
|
3427
|
-
const scaleY =
|
|
3428
|
-
const crossings =
|
|
3427
|
+
const scaleY = chunkXGPLA2OY_cjs.getTableResizeScale(rect.height, container.offsetHeight);
|
|
3428
|
+
const crossings = chunkXGPLA2OY_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
3429
3429
|
const rowBounds = measureRowBoundaries(table);
|
|
3430
|
-
const colBoundaries =
|
|
3430
|
+
const colBoundaries = chunkXGPLA2OY_cjs.computeColumnBoundaries(tableData.columnWidths);
|
|
3431
3431
|
for (let i = 0; i < colBoundaries.length; i++) {
|
|
3432
3432
|
const boundaryX = colBoundaries[i] / 100 * rect.width;
|
|
3433
|
-
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !
|
|
3433
|
+
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !chunkXGPLA2OY_cjs.isColumnBoundaryMergedAt(crossings, i, rowBounds, localY / scaleY)) {
|
|
3434
3434
|
event.preventDefault();
|
|
3435
3435
|
event.stopPropagation();
|
|
3436
3436
|
doc.body.style.cursor = "col-resize";
|
|
@@ -3448,7 +3448,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3448
3448
|
}
|
|
3449
3449
|
}
|
|
3450
3450
|
for (let i = 0; i < rowBounds.length; i++) {
|
|
3451
|
-
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !
|
|
3451
|
+
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !chunkXGPLA2OY_cjs.isRowBoundaryMergedAt(crossings, i, tableData.columnWidths, localX / (rect.width || 1))) {
|
|
3452
3452
|
event.preventDefault();
|
|
3453
3453
|
event.stopPropagation();
|
|
3454
3454
|
const tr = table.querySelectorAll("tbody > tr")[i];
|
|
@@ -3459,7 +3459,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3459
3459
|
index: i,
|
|
3460
3460
|
startPos: event.clientY,
|
|
3461
3461
|
handleEl: rowHandles[i] ?? container,
|
|
3462
|
-
initialRowHeight: tr?.offsetHeight ??
|
|
3462
|
+
initialRowHeight: tr?.offsetHeight ?? chunkXGPLA2OY_cjs.DEFAULT_ROW_HEIGHT
|
|
3463
3463
|
};
|
|
3464
3464
|
win.addEventListener("mousemove", onMouseMove);
|
|
3465
3465
|
win.addEventListener("mouseup", onMouseUp);
|
|
@@ -3480,7 +3480,7 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
3480
3480
|
}
|
|
3481
3481
|
const doc = context.document;
|
|
3482
3482
|
const container = createEl(doc, "div", "pptxv-element pptxv-table", {
|
|
3483
|
-
...
|
|
3483
|
+
...chunkXGPLA2OY_cjs.getContainerStyle(element, zIndex),
|
|
3484
3484
|
overflow: "hidden"
|
|
3485
3485
|
});
|
|
3486
3486
|
container.dataset.elementId = element.id;
|
|
@@ -3493,7 +3493,7 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
3493
3493
|
// font stack; all five bindings declare the same shared default here.
|
|
3494
3494
|
fontFamily: chunkLCIXR7WE_cjs.DEFAULT_FONT_FAMILY,
|
|
3495
3495
|
// `a:tblPr@rtl`: mirrors the column order for right-to-left decks.
|
|
3496
|
-
...
|
|
3496
|
+
...chunkXGPLA2OY_cjs.tableContainerCss(tableData)
|
|
3497
3497
|
});
|
|
3498
3498
|
appendColgroup(doc, table, tableData.columnWidths);
|
|
3499
3499
|
const tbody = doc.createElement("tbody");
|
|
@@ -3554,13 +3554,13 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3554
3554
|
if (cell.rowSpan && cell.rowSpan > 1) {
|
|
3555
3555
|
td.rowSpan = cell.rowSpan;
|
|
3556
3556
|
}
|
|
3557
|
-
const style =
|
|
3557
|
+
const style = chunkXGPLA2OY_cjs.tableCellCss(
|
|
3558
3558
|
tableData,
|
|
3559
3559
|
cell,
|
|
3560
3560
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
3561
3561
|
styleContext
|
|
3562
3562
|
);
|
|
3563
|
-
const patternFill = cell.style ?
|
|
3563
|
+
const patternFill = cell.style ? chunkXGPLA2OY_cjs.cellPatternFillCss(cell.style) : null;
|
|
3564
3564
|
if (patternFill) {
|
|
3565
3565
|
delete style["backgroundColor"];
|
|
3566
3566
|
delete style["background"];
|
|
@@ -3573,7 +3573,7 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3573
3573
|
}
|
|
3574
3574
|
applyStyleMap(td, CELL_BASE_STYLE);
|
|
3575
3575
|
applyStyleMap(td, style);
|
|
3576
|
-
const diagonals =
|
|
3576
|
+
const diagonals = chunkXGPLA2OY_cjs.getCellDiagonalBorders(
|
|
3577
3577
|
cell.style,
|
|
3578
3578
|
tableData,
|
|
3579
3579
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3617,7 +3617,7 @@ function renderDiagonalOverlay(doc, diagonals) {
|
|
|
3617
3617
|
return svg;
|
|
3618
3618
|
}
|
|
3619
3619
|
function appendCellText(doc, td, cell) {
|
|
3620
|
-
const blocks =
|
|
3620
|
+
const blocks = chunkXGPLA2OY_cjs.cellParagraphBlocks(cell);
|
|
3621
3621
|
if (blocks) {
|
|
3622
3622
|
for (const block of blocks) {
|
|
3623
3623
|
const div = createEl(doc, "div", "pptxv-table-para", { display: "block", ...block.css });
|
|
@@ -3652,7 +3652,7 @@ function appendRuns(doc, parent, runs) {
|
|
|
3652
3652
|
}
|
|
3653
3653
|
const span = createEl(doc, "span", "pptxv-table-run", {
|
|
3654
3654
|
position: "relative",
|
|
3655
|
-
...
|
|
3655
|
+
...chunkXGPLA2OY_cjs.cellRunStyle(run)
|
|
3656
3656
|
});
|
|
3657
3657
|
span.textContent = run.text;
|
|
3658
3658
|
parent.appendChild(span);
|
|
@@ -3666,8 +3666,8 @@ function registerTableChartRenderers(registry) {
|
|
|
3666
3666
|
}
|
|
3667
3667
|
|
|
3668
3668
|
// src/pptx/dom/glyph-outline-cache.ts
|
|
3669
|
-
var glyphOutlineFontCache = new
|
|
3670
|
-
var getGlyphOutline =
|
|
3669
|
+
var glyphOutlineFontCache = new chunkXGPLA2OY_cjs.GlyphOutlineFontCache();
|
|
3670
|
+
var getGlyphOutline = chunkXGPLA2OY_cjs.createGlyphOutlineLookup(glyphOutlineFontCache);
|
|
3671
3671
|
|
|
3672
3672
|
// src/pptx/dom/elements/text-warp.ts
|
|
3673
3673
|
function renderWarpedText(element, context) {
|
|
@@ -3679,12 +3679,12 @@ function renderWarpedText(element, context) {
|
|
|
3679
3679
|
if (!preset || preset === "textNoShape" || preset === "textPlain") {
|
|
3680
3680
|
return null;
|
|
3681
3681
|
}
|
|
3682
|
-
const paragraphs =
|
|
3682
|
+
const paragraphs = chunkXGPLA2OY_cjs.groupIntoParagraphs(element);
|
|
3683
3683
|
if (paragraphs.length === 0) {
|
|
3684
3684
|
return null;
|
|
3685
3685
|
}
|
|
3686
|
-
if (!
|
|
3687
|
-
const transform =
|
|
3686
|
+
if (!chunkXGPLA2OY_cjs.shouldUseSvgWarp(preset)) {
|
|
3687
|
+
const transform = chunkXGPLA2OY_cjs.getWarpCssTransform(preset, style?.textWarpAdj, style?.textWarpAdj2);
|
|
3688
3688
|
if (!transform) {
|
|
3689
3689
|
return null;
|
|
3690
3690
|
}
|
|
@@ -3712,7 +3712,7 @@ function renderWarpedText(element, context) {
|
|
|
3712
3712
|
text.textContent = paragraphs.map((p) => p.segments.map((s) => s.text).join("")).join("\n");
|
|
3713
3713
|
return text;
|
|
3714
3714
|
}
|
|
3715
|
-
if (
|
|
3715
|
+
if (chunkXGPLA2OY_cjs.hasGlyphEnvelope(preset)) {
|
|
3716
3716
|
return renderGlyphWarp(element, paragraphs, context);
|
|
3717
3717
|
}
|
|
3718
3718
|
return renderPathWarp(element, paragraphs, context);
|
|
@@ -3738,7 +3738,7 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3738
3738
|
});
|
|
3739
3739
|
svg.setAttribute("class", "pptxv-wordart");
|
|
3740
3740
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%;overflow:visible");
|
|
3741
|
-
const perLine =
|
|
3741
|
+
const perLine = chunkXGPLA2OY_cjs.buildGlyphEnvelopeBlock(
|
|
3742
3742
|
preset,
|
|
3743
3743
|
paragraphs.map(
|
|
3744
3744
|
(paragraph) => paragraph.segments.map((seg, i) => ({
|
|
@@ -3833,7 +3833,7 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3833
3833
|
defs.appendChild(
|
|
3834
3834
|
createSvgEl(context.document, "path", {
|
|
3835
3835
|
id,
|
|
3836
|
-
d:
|
|
3836
|
+
d: chunkXGPLA2OY_cjs.buildWarpPath(
|
|
3837
3837
|
preset,
|
|
3838
3838
|
element.width,
|
|
3839
3839
|
element.height,
|
|
@@ -3866,7 +3866,7 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3866
3866
|
|
|
3867
3867
|
// src/pptx/dom/elements/text-shape.ts
|
|
3868
3868
|
var renderTextShapeElement = (element, zIndex, context) => {
|
|
3869
|
-
const container =
|
|
3869
|
+
const container = chunkXGPLA2OY_cjs.getContainerStyle(element, zIndex);
|
|
3870
3870
|
const animState = context.presentationStates?.get(element.id);
|
|
3871
3871
|
const shape = getShapeFillStrokeStyle(
|
|
3872
3872
|
element,
|
|
@@ -3881,7 +3881,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3881
3881
|
const el = createEl(context.document, "div", "pptxv-element pptxv-shape", merged);
|
|
3882
3882
|
el.dataset.elementId = element.id;
|
|
3883
3883
|
if (context.interactive && !context.presenting) {
|
|
3884
|
-
const hitTargetStyle =
|
|
3884
|
+
const hitTargetStyle = chunkXGPLA2OY_cjs.elementHitTargetStyle(element);
|
|
3885
3885
|
if (hitTargetStyle) {
|
|
3886
3886
|
const hitTarget = createEl(context.document, "div", void 0, hitTargetStyle);
|
|
3887
3887
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
@@ -3924,8 +3924,8 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3924
3924
|
} else if (warped) {
|
|
3925
3925
|
el.appendChild(warped);
|
|
3926
3926
|
} else {
|
|
3927
|
-
const linkedSegments =
|
|
3928
|
-
const paragraphs =
|
|
3927
|
+
const linkedSegments = chunkXGPLA2OY_cjs.getOverflowSegments(element, context.slide?.elements);
|
|
3928
|
+
const paragraphs = chunkXGPLA2OY_cjs.buildParagraphs(element, context.fieldContext, linkedSegments);
|
|
3929
3929
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
3930
3930
|
if (hasText) {
|
|
3931
3931
|
el.appendChild(
|
|
@@ -3936,7 +3936,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3936
3936
|
);
|
|
3937
3937
|
} else {
|
|
3938
3938
|
const mode = context.interactive && !context.presenting ? "edit" : "present";
|
|
3939
|
-
const prompt =
|
|
3939
|
+
const prompt = chunkXGPLA2OY_cjs.placeholderPromptDescriptor(element, mode);
|
|
3940
3940
|
if (prompt) {
|
|
3941
3941
|
const hint = createEl(context.document, "div", "pptxv-placeholder-prompt", {
|
|
3942
3942
|
...getTextBlockStyle(element),
|
|
@@ -4101,11 +4101,11 @@ async function resolveImageUrls(handler, slides) {
|
|
|
4101
4101
|
|
|
4102
4102
|
Object.defineProperty(exports, "buildEmbeddedFontStyles", {
|
|
4103
4103
|
enumerable: true,
|
|
4104
|
-
get: function () { return
|
|
4104
|
+
get: function () { return chunkXGPLA2OY_cjs.buildEmbeddedFontStyles; }
|
|
4105
4105
|
});
|
|
4106
4106
|
Object.defineProperty(exports, "buildFieldSubstitutionContext", {
|
|
4107
4107
|
enumerable: true,
|
|
4108
|
-
get: function () { return
|
|
4108
|
+
get: function () { return chunkXGPLA2OY_cjs.buildFieldSubstitutionContext; }
|
|
4109
4109
|
});
|
|
4110
4110
|
Object.defineProperty(exports, "renderChartViewModelSvg", {
|
|
4111
4111
|
enumerable: true,
|