ooxml-ui 1.23.0 → 1.23.1
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/pptx/{chunk-WX77UUR5.cjs → chunk-6DQCBVYA.cjs} +174 -9
- package/dist/pptx/{chunk-TK5LA3Z6.mjs → chunk-M43GZY6N.mjs} +172 -10
- package/dist/pptx/dom/index.cjs +209 -209
- package/dist/pptx/dom/index.mjs +2 -2
- package/dist/pptx/index.cjs +2919 -2907
- package/dist/pptx/index.mjs +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/viewport-size.d.ts +85 -0
- package/dist/pptx/render/viewport-size.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/pptx/dom/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk6DQCBVYA_cjs = require('../chunk-6DQCBVYA.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 = chunk6DQCBVYA_cjs.getActiveXControlOverlayView(control, canvasSize, index);
|
|
99
99
|
const style = {
|
|
100
100
|
position: "absolute",
|
|
101
101
|
left: `${view.left}px`,
|
|
@@ -131,7 +131,7 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
131
131
|
pointerEvents: "none",
|
|
132
132
|
zIndex: "45"
|
|
133
133
|
});
|
|
134
|
-
const markers =
|
|
134
|
+
const markers = chunk6DQCBVYA_cjs.buildCommentMarkers(
|
|
135
135
|
comments,
|
|
136
136
|
canvasSize.width,
|
|
137
137
|
canvasSize.height,
|
|
@@ -140,10 +140,10 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
140
140
|
for (const marker of markers) {
|
|
141
141
|
const dot = createEl(doc, "button", "pptxv-comment-marker", {
|
|
142
142
|
position: "absolute",
|
|
143
|
-
left: `${marker.x -
|
|
144
|
-
top: `${marker.y -
|
|
145
|
-
width: `${
|
|
146
|
-
height: `${
|
|
143
|
+
left: `${marker.x - chunk6DQCBVYA_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
144
|
+
top: `${marker.y - chunk6DQCBVYA_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
145
|
+
width: `${chunk6DQCBVYA_cjs.COMMENT_MARKER_SIZE}px`,
|
|
146
|
+
height: `${chunk6DQCBVYA_cjs.COMMENT_MARKER_SIZE}px`,
|
|
147
147
|
display: "flex",
|
|
148
148
|
alignItems: "center",
|
|
149
149
|
justifyContent: "center",
|
|
@@ -210,7 +210,7 @@ function merge3dStyle(base, computed) {
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
213
|
-
const frame =
|
|
213
|
+
const frame = chunk6DQCBVYA_cjs.getFrameEffectStyle(el);
|
|
214
214
|
if (frame) {
|
|
215
215
|
return { ...frame };
|
|
216
216
|
}
|
|
@@ -226,7 +226,7 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
226
226
|
style[key] = value;
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
const stroke =
|
|
229
|
+
const stroke = chunk6DQCBVYA_cjs.getComputedStrokeStyle(el);
|
|
230
230
|
if (stroke.borderWidth > 0) {
|
|
231
231
|
if (animatesStroke) {
|
|
232
232
|
style["borderWidth"] = stroke.cssBorderWidth;
|
|
@@ -245,7 +245,7 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
245
245
|
style["strokeMiterlimit"] = stroke.strokeMiterlimit;
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
|
-
const fx =
|
|
248
|
+
const fx = chunk6DQCBVYA_cjs.getComputedEffectStyle(el);
|
|
249
249
|
if (fx.boxShadow) {
|
|
250
250
|
style["boxShadow"] = fx.boxShadow;
|
|
251
251
|
}
|
|
@@ -262,11 +262,11 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
262
262
|
if (fx.overflowVisible) {
|
|
263
263
|
style["overflow"] = "visible";
|
|
264
264
|
}
|
|
265
|
-
merge3dStyle(style,
|
|
266
|
-
if (
|
|
265
|
+
merge3dStyle(style, chunk6DQCBVYA_cjs.getComputed3dStyle(el));
|
|
266
|
+
if (chunk6DQCBVYA_cjs.isHollowShapeElement(el)) {
|
|
267
267
|
style["pointerEvents"] = "none";
|
|
268
268
|
}
|
|
269
|
-
const geometry =
|
|
269
|
+
const geometry = chunk6DQCBVYA_cjs.resolveShapeGeometry(el);
|
|
270
270
|
switch (geometry.kind) {
|
|
271
271
|
case "bare":
|
|
272
272
|
style["backgroundColor"] = "transparent";
|
|
@@ -300,12 +300,12 @@ function getTextBlockStyle(el) {
|
|
|
300
300
|
if (!pptx.hasTextProperties(el)) {
|
|
301
301
|
return {};
|
|
302
302
|
}
|
|
303
|
-
const base =
|
|
303
|
+
const base = chunk6DQCBVYA_cjs.buildTextBlockStyle(el, {
|
|
304
304
|
fallbackColor: chunkG3UVZ5FO_cjs.DEFAULT_TEXT_COLOR,
|
|
305
305
|
bodyLayout: true,
|
|
306
306
|
pxLengths: true
|
|
307
307
|
});
|
|
308
|
-
const scene3d =
|
|
308
|
+
const scene3d = chunk6DQCBVYA_cjs.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height });
|
|
309
309
|
if (!scene3d) {
|
|
310
310
|
return base;
|
|
311
311
|
}
|
|
@@ -444,7 +444,7 @@ function renderSlideStage(options) {
|
|
|
444
444
|
"--pptxv-grid-size": `${options.gridSpacingPx ?? 10}px`,
|
|
445
445
|
// One device pixel in slide px: thin strokes stay visible on screen.
|
|
446
446
|
...chunkZO43VVWQ_cjs.deviceStrokeStageStyle(scale),
|
|
447
|
-
...
|
|
447
|
+
...chunk6DQCBVYA_cjs.getSlideBackgroundStyle(slide, { widthPx: canvasSize.width, heightPx: canvasSize.height })
|
|
448
448
|
});
|
|
449
449
|
if (interactive || options.reading) {
|
|
450
450
|
stage.setAttribute("role", "region");
|
|
@@ -487,20 +487,20 @@ function renderSlideStage(options) {
|
|
|
487
487
|
selectedElementIds: options.selectedElementIds,
|
|
488
488
|
registry,
|
|
489
489
|
renderElement(element, zIndex) {
|
|
490
|
-
if (!
|
|
490
|
+
if (!chunk6DQCBVYA_cjs.isElementRendered(element)) {
|
|
491
491
|
return null;
|
|
492
492
|
}
|
|
493
493
|
const node = registry.resolve(element.type)(element, zIndex, context);
|
|
494
494
|
if (node) renderedNodes?.push(node);
|
|
495
495
|
if (node && interactive && "setAttribute" in node) {
|
|
496
|
-
const templateLocked =
|
|
496
|
+
const templateLocked = chunk6DQCBVYA_cjs.isTemplateElementId(element.id) && !options.templateEditing;
|
|
497
497
|
if (templateLocked) {
|
|
498
498
|
node.style.pointerEvents = "none";
|
|
499
499
|
}
|
|
500
500
|
node.setAttribute("data-pptx-element", "true");
|
|
501
501
|
}
|
|
502
|
-
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" &&
|
|
503
|
-
const hitTargetStyle =
|
|
502
|
+
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" && chunk6DQCBVYA_cjs.shouldRenderHitTarget(interactive, options.presenting ?? false)) {
|
|
503
|
+
const hitTargetStyle = chunk6DQCBVYA_cjs.elementHitTargetStyle(element);
|
|
504
504
|
if (hitTargetStyle) {
|
|
505
505
|
const hitTarget = createEl(doc, "div", void 0, hitTargetStyle);
|
|
506
506
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
@@ -520,20 +520,20 @@ function renderSlideStage(options) {
|
|
|
520
520
|
}
|
|
521
521
|
});
|
|
522
522
|
if (interactive || options.reading) {
|
|
523
|
-
|
|
523
|
+
chunk6DQCBVYA_cjs.applyRenderedElementAccessibility(stage, slide.elements, {
|
|
524
524
|
presenting: options.presenting ?? false
|
|
525
525
|
});
|
|
526
526
|
}
|
|
527
527
|
if (interactive) {
|
|
528
|
-
|
|
528
|
+
chunk6DQCBVYA_cjs.applyElementActionAffordances(
|
|
529
529
|
stage,
|
|
530
530
|
slide.elements.filter(
|
|
531
|
-
(element) => options.templateEditing || !
|
|
531
|
+
(element) => options.templateEditing || !chunk6DQCBVYA_cjs.isTemplateElementId(element.id)
|
|
532
532
|
),
|
|
533
533
|
{
|
|
534
534
|
canInteract: true,
|
|
535
535
|
presenting: options.presenting ?? false,
|
|
536
|
-
labels:
|
|
536
|
+
labels: chunk6DQCBVYA_cjs.actionAffordanceLabels((key) => t(key))
|
|
537
537
|
}
|
|
538
538
|
);
|
|
539
539
|
}
|
|
@@ -600,7 +600,7 @@ function createChartTitleEditor(container, onCommit) {
|
|
|
600
600
|
// src/pptx/dom/elements/chart-editable.ts
|
|
601
601
|
var CHART_FORMAT_REQUEST_EVENT = "pptx-chart-format-request";
|
|
602
602
|
function attachChartEditing(container, element, context, repaint) {
|
|
603
|
-
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !
|
|
603
|
+
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !chunk6DQCBVYA_cjs.canDrillDown(element)) {
|
|
604
604
|
return;
|
|
605
605
|
}
|
|
606
606
|
const chart = element;
|
|
@@ -640,7 +640,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
640
640
|
if (!rect) {
|
|
641
641
|
return;
|
|
642
642
|
}
|
|
643
|
-
const step2 =
|
|
643
|
+
const step2 = chunk6DQCBVYA_cjs.advanceChartMarkDrag(activeMark, event.clientX, event.clientY, rect);
|
|
644
644
|
if (!step2) {
|
|
645
645
|
return;
|
|
646
646
|
}
|
|
@@ -699,7 +699,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
699
699
|
bubbles: true,
|
|
700
700
|
detail: {
|
|
701
701
|
elementId: element.id,
|
|
702
|
-
target:
|
|
702
|
+
target: chunk6DQCBVYA_cjs.chartFormatTargetFromEvent(event, container, chart),
|
|
703
703
|
open
|
|
704
704
|
}
|
|
705
705
|
})
|
|
@@ -742,7 +742,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
742
742
|
seriesIndex: part.seriesIndex,
|
|
743
743
|
pointIndex: part.pointIndex
|
|
744
744
|
});
|
|
745
|
-
const startedMark =
|
|
745
|
+
const startedMark = chunk6DQCBVYA_cjs.beginChartMarkDrag({
|
|
746
746
|
part,
|
|
747
747
|
geometry: markGeometry,
|
|
748
748
|
chartData: chart.chartData,
|
|
@@ -834,7 +834,7 @@ function mountThreeViewInto(doc, wrapper, options) {
|
|
|
834
834
|
return view;
|
|
835
835
|
}
|
|
836
836
|
function isChart3DEditable(element, context) {
|
|
837
|
-
return element.type === "chart" && Boolean(context.interactive) && Boolean(context.onChartPointChange) && Boolean(context.selectedElementIds?.has(element.id)) &&
|
|
837
|
+
return element.type === "chart" && Boolean(context.interactive) && Boolean(context.onChartPointChange) && Boolean(context.selectedElementIds?.has(element.id)) && chunk6DQCBVYA_cjs.canDrillDown(element);
|
|
838
838
|
}
|
|
839
839
|
function selectedChartPartOf(element, context) {
|
|
840
840
|
return context.chartPartSelection?.elementId === element.id ? context.chartPartSelection.part : null;
|
|
@@ -876,13 +876,13 @@ function wireChartThreeViewEvents(view, element, context, badgeHost) {
|
|
|
876
876
|
const listeners = new AbortController();
|
|
877
877
|
chartViewListeners.set(view, listeners);
|
|
878
878
|
view.addEventListener(
|
|
879
|
-
|
|
880
|
-
(event) =>
|
|
879
|
+
chunk6DQCBVYA_cjs.THREE_VIEW_EVENTS.select,
|
|
880
|
+
(event) => chunk6DQCBVYA_cjs.applyChart3DSelect(bridge, event.detail.part),
|
|
881
881
|
{ signal: listeners.signal }
|
|
882
882
|
);
|
|
883
883
|
view.addEventListener(
|
|
884
|
-
|
|
885
|
-
(event) =>
|
|
884
|
+
chunk6DQCBVYA_cjs.THREE_VIEW_EVENTS.drag,
|
|
885
|
+
(event) => chunk6DQCBVYA_cjs.applyChart3DDrag(bridge, event.detail),
|
|
886
886
|
{ signal: listeners.signal }
|
|
887
887
|
);
|
|
888
888
|
}
|
|
@@ -896,7 +896,7 @@ function applyThreeViewTextStyle(el, style) {
|
|
|
896
896
|
// src/pptx/dom/elements/chart.ts
|
|
897
897
|
var renderChartElement = (element, zIndex, context) => {
|
|
898
898
|
const wrapper = renderChartSvgElement(element, zIndex, context);
|
|
899
|
-
const spec = wrapper ?
|
|
899
|
+
const spec = wrapper ? chunk6DQCBVYA_cjs.resolveChartThreeViewSpec(element, rendering3DFlagsOf(context)) : null;
|
|
900
900
|
if (!wrapper || !spec) {
|
|
901
901
|
return wrapper;
|
|
902
902
|
}
|
|
@@ -919,11 +919,11 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
919
919
|
"div",
|
|
920
920
|
"pptxv-element pptxv-chart",
|
|
921
921
|
// The chart area's outer shadow and glow sit on the frame, outside the chart.
|
|
922
|
-
{ ...
|
|
922
|
+
{ ...chunk6DQCBVYA_cjs.getContainerStyle(element, zIndex), ...chunk6DQCBVYA_cjs.getFrameEffectStyle(element) }
|
|
923
923
|
);
|
|
924
924
|
container.dataset.elementId = element.id;
|
|
925
925
|
const animationState = context.presentationStates?.get(element.id);
|
|
926
|
-
const chartData = element.chartData ?
|
|
926
|
+
const chartData = element.chartData ? chunk6DQCBVYA_cjs.resolveRevealedChartData(element.chartData, animationState) : element.chartData;
|
|
927
927
|
if (!chartData || chartData.series.length === 0) {
|
|
928
928
|
container.appendChild(renderChartPlaceholder(doc, chartData?.chartType ?? "bar", context.t));
|
|
929
929
|
return container;
|
|
@@ -970,7 +970,7 @@ function renderChartPlaceholder(doc, chartType, t) {
|
|
|
970
970
|
border: "1px dashed #cbd5e1",
|
|
971
971
|
boxSizing: "border-box"
|
|
972
972
|
});
|
|
973
|
-
placeholder.textContent =
|
|
973
|
+
placeholder.textContent = chunk6DQCBVYA_cjs.chartPlaceholderLabel(chartType, (key, params) => t(key, params));
|
|
974
974
|
return placeholder;
|
|
975
975
|
}
|
|
976
976
|
|
|
@@ -1034,7 +1034,7 @@ function createRunBaseNode(doc, run) {
|
|
|
1034
1034
|
verticalAlign: "middle",
|
|
1035
1035
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
1036
1036
|
});
|
|
1037
|
-
math.innerHTML =
|
|
1037
|
+
math.innerHTML = chunk6DQCBVYA_cjs.runEquationMathMl(run.equation);
|
|
1038
1038
|
host.appendChild(math);
|
|
1039
1039
|
if (run.equation.number) {
|
|
1040
1040
|
const number = createEl(doc, "span", "pptxv-equation-number", {
|
|
@@ -1046,7 +1046,7 @@ function createRunBaseNode(doc, run) {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
return host;
|
|
1048
1048
|
}
|
|
1049
|
-
if (run.hyperlink &&
|
|
1049
|
+
if (run.hyperlink && chunk6DQCBVYA_cjs.isRunHyperlinkClickable(run.hyperlink)) {
|
|
1050
1050
|
const link = createEl(doc, "a", "pptxv-link", run.style);
|
|
1051
1051
|
link.setAttribute("data-pptx-hyperlink", run.hyperlink.url);
|
|
1052
1052
|
link.setAttribute("role", "link");
|
|
@@ -1151,7 +1151,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1151
1151
|
bullet.textContent = para.bulletMarker;
|
|
1152
1152
|
p.appendChild(bullet);
|
|
1153
1153
|
}
|
|
1154
|
-
const spec = build ?
|
|
1154
|
+
const spec = build ? chunk6DQCBVYA_cjs.buildTextBuildSpec(
|
|
1155
1155
|
build.elementId,
|
|
1156
1156
|
paragraphs.indexOf(para),
|
|
1157
1157
|
para.runs.filter((run) => run.text !== NEWLINE_RUN).map((run) => ({ text: run.text, style: run.style })),
|
|
@@ -1160,7 +1160,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1160
1160
|
if (spec && spec.granularity !== "paragraph") {
|
|
1161
1161
|
for (const span of spec.spans ?? []) {
|
|
1162
1162
|
const node = createEl(doc, "span");
|
|
1163
|
-
applyStyleMap(node, { ...span.style ?? {}, ...
|
|
1163
|
+
applyStyleMap(node, { ...span.style ?? {}, ...chunk6DQCBVYA_cjs.textBuildSpanStyle(span) });
|
|
1164
1164
|
if (span.animId) {
|
|
1165
1165
|
node.setAttribute("data-anim-id", span.animId);
|
|
1166
1166
|
}
|
|
@@ -1173,7 +1173,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1173
1173
|
let runHost = p;
|
|
1174
1174
|
if (spec) {
|
|
1175
1175
|
const wrapper = createEl(doc, "span");
|
|
1176
|
-
applyStyleMap(wrapper,
|
|
1176
|
+
applyStyleMap(wrapper, chunk6DQCBVYA_cjs.textBuildSpanStyle(spec));
|
|
1177
1177
|
if (spec.animId) {
|
|
1178
1178
|
wrapper.setAttribute("data-anim-id", spec.animId);
|
|
1179
1179
|
}
|
|
@@ -1229,7 +1229,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1229
1229
|
if (element.hidden) {
|
|
1230
1230
|
wrapper.style.display = "none";
|
|
1231
1231
|
}
|
|
1232
|
-
const lineGlow =
|
|
1232
|
+
const lineGlow = chunk6DQCBVYA_cjs.getLineGlowFilterCss(ss);
|
|
1233
1233
|
if (lineGlow) {
|
|
1234
1234
|
wrapper.style.filter = lineGlow;
|
|
1235
1235
|
}
|
|
@@ -1237,7 +1237,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1237
1237
|
svg.setAttribute("style", "overflow:visible;display:block");
|
|
1238
1238
|
const seed = element.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
1239
1239
|
const defs = createSvgEl(doc, "defs");
|
|
1240
|
-
const lineShadow =
|
|
1240
|
+
const lineShadow = chunk6DQCBVYA_cjs.getLineShadowParams(ss);
|
|
1241
1241
|
const shadowId = lineShadow ? `${seed}-line-shadow` : void 0;
|
|
1242
1242
|
if (lineShadow && shadowId) {
|
|
1243
1243
|
const filter = createSvgEl(doc, "filter", {
|
|
@@ -1258,8 +1258,8 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1258
1258
|
);
|
|
1259
1259
|
defs.appendChild(filter);
|
|
1260
1260
|
}
|
|
1261
|
-
const startArrow =
|
|
1262
|
-
const endArrow =
|
|
1261
|
+
const startArrow = chunk6DQCBVYA_cjs.normalizeArrow(ss?.connectorStartArrow);
|
|
1262
|
+
const endArrow = chunk6DQCBVYA_cjs.normalizeArrow(ss?.connectorEndArrow);
|
|
1263
1263
|
const startMarkerId = startArrow ? `${seed}-start` : void 0;
|
|
1264
1264
|
const endMarkerId = endArrow ? `${seed}-end` : void 0;
|
|
1265
1265
|
if (startArrow && startMarkerId) {
|
|
@@ -1282,10 +1282,10 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1282
1282
|
svg.appendChild(defs);
|
|
1283
1283
|
}
|
|
1284
1284
|
const compound = ss?.compoundLine;
|
|
1285
|
-
const offsets =
|
|
1286
|
-
const widths =
|
|
1285
|
+
const offsets = chunk6DQCBVYA_cjs.getCompoundLineOffsets(compound, strokeWidth);
|
|
1286
|
+
const widths = chunk6DQCBVYA_cjs.getCompoundLineWidths(compound, strokeWidth);
|
|
1287
1287
|
const shapeType = pptx.hasShapeProperties(element) ? element.shapeType : void 0;
|
|
1288
|
-
const usePath =
|
|
1288
|
+
const usePath = chunk6DQCBVYA_cjs.connectorNeedsPath(shapeType) && pptx.hasShapeProperties(element);
|
|
1289
1289
|
const pathData = usePath ? pptx.getConnectorPathGeometry(element).pathData : void 0;
|
|
1290
1290
|
const x1 = element.flipHorizontal ? w : 0;
|
|
1291
1291
|
const y1 = element.flipVertical ? h : 0;
|
|
@@ -1296,7 +1296,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1296
1296
|
d: pathData ?? `M${x1},${y1} L${x2},${y2}`,
|
|
1297
1297
|
fill: "none",
|
|
1298
1298
|
stroke: "transparent",
|
|
1299
|
-
"stroke-width":
|
|
1299
|
+
"stroke-width": chunk6DQCBVYA_cjs.connectorHitStrokeWidth(strokeWidth),
|
|
1300
1300
|
"stroke-linecap": "round",
|
|
1301
1301
|
"stroke-linejoin": "round"
|
|
1302
1302
|
});
|
|
@@ -1346,7 +1346,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1346
1346
|
if (!pptx.hasTextProperties(element)) {
|
|
1347
1347
|
return;
|
|
1348
1348
|
}
|
|
1349
|
-
const paragraphs =
|
|
1349
|
+
const paragraphs = chunk6DQCBVYA_cjs.buildParagraphs(element, context.fieldContext);
|
|
1350
1350
|
if (!paragraphs.some((paragraph) => paragraph.runs.length > 0)) {
|
|
1351
1351
|
return;
|
|
1352
1352
|
}
|
|
@@ -1366,7 +1366,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1366
1366
|
}
|
|
1367
1367
|
function buildMarker(context, id, arrow, strokeColor, size) {
|
|
1368
1368
|
const doc = context.document;
|
|
1369
|
-
const shape =
|
|
1369
|
+
const shape = chunk6DQCBVYA_cjs.markerPath(arrow, size.width, size.length);
|
|
1370
1370
|
const marker = createSvgEl(doc, "marker", {
|
|
1371
1371
|
id,
|
|
1372
1372
|
viewBox: "0 0 10 10",
|
|
@@ -1451,7 +1451,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1451
1451
|
doc,
|
|
1452
1452
|
"div",
|
|
1453
1453
|
"pptxv-element pptxv-contentpart",
|
|
1454
|
-
|
|
1454
|
+
chunk6DQCBVYA_cjs.getContainerStyle(element, zIndex)
|
|
1455
1455
|
);
|
|
1456
1456
|
el.dataset.elementId = element.id;
|
|
1457
1457
|
const strokes = element.inkStrokes;
|
|
@@ -1484,7 +1484,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1484
1484
|
return el;
|
|
1485
1485
|
};
|
|
1486
1486
|
function renderEquations(element, context) {
|
|
1487
|
-
if (!pptx.hasTextProperties(element) || !
|
|
1487
|
+
if (!pptx.hasTextProperties(element) || !chunk6DQCBVYA_cjs.isEquationOnlyText(element.textSegments)) {
|
|
1488
1488
|
return null;
|
|
1489
1489
|
}
|
|
1490
1490
|
const equations = (element.textSegments ?? []).filter((segment) => segment.equationXml);
|
|
@@ -1498,7 +1498,7 @@ function renderEquations(element, context) {
|
|
|
1498
1498
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
1499
1499
|
});
|
|
1500
1500
|
for (const segment of equations) {
|
|
1501
|
-
const mathml =
|
|
1501
|
+
const mathml = chunk6DQCBVYA_cjs.convertOmmlToMathMl(segment.equationXml);
|
|
1502
1502
|
if (!mathml) {
|
|
1503
1503
|
continue;
|
|
1504
1504
|
}
|
|
@@ -1512,7 +1512,7 @@ function renderEquations(element, context) {
|
|
|
1512
1512
|
flex: 1,
|
|
1513
1513
|
textAlign: "center"
|
|
1514
1514
|
});
|
|
1515
|
-
math.innerHTML =
|
|
1515
|
+
math.innerHTML = chunk6DQCBVYA_cjs.sanitizeMathMl(mathml);
|
|
1516
1516
|
row.appendChild(math);
|
|
1517
1517
|
if (segment.equationNumber) {
|
|
1518
1518
|
const number = createEl(context.document, "span", "pptxv-equation-number", {
|
|
@@ -1530,7 +1530,7 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1530
1530
|
return null;
|
|
1531
1531
|
}
|
|
1532
1532
|
const fill = chunkG3UVZ5FO_cjs.getComputedFillStyle(element)?.backgroundColor;
|
|
1533
|
-
const data =
|
|
1533
|
+
const data = chunk6DQCBVYA_cjs.build3DExtrusionData(
|
|
1534
1534
|
element.shapeStyle?.shape3d,
|
|
1535
1535
|
element.shapeStyle?.scene3d,
|
|
1536
1536
|
fill,
|
|
@@ -1592,7 +1592,7 @@ function appendOwnReflection(doc, host, element, mediaDataUrls, suppressOwnRefle
|
|
|
1592
1592
|
if (suppressOwnReflection) {
|
|
1593
1593
|
return;
|
|
1594
1594
|
}
|
|
1595
|
-
const wrapperStyle =
|
|
1595
|
+
const wrapperStyle = chunk6DQCBVYA_cjs.getComputedEffectStyle(element).reflection;
|
|
1596
1596
|
if (!wrapperStyle) {
|
|
1597
1597
|
return;
|
|
1598
1598
|
}
|
|
@@ -1616,9 +1616,9 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1616
1616
|
if (groupFilterDefs) {
|
|
1617
1617
|
wrap.appendChild(groupFilterDefs);
|
|
1618
1618
|
}
|
|
1619
|
-
const childParentFill =
|
|
1619
|
+
const childParentFill = chunk6DQCBVYA_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1620
1620
|
for (const child of element.children ?? []) {
|
|
1621
|
-
const childWrap = createEl(doc, "div", void 0,
|
|
1621
|
+
const childWrap = createEl(doc, "div", void 0, chunk6DQCBVYA_cjs.getContainerStyle(child, 0));
|
|
1622
1622
|
childWrap.appendChild(
|
|
1623
1623
|
buildReflectionMirrorContent(doc, child, mediaDataUrls, childParentFill)
|
|
1624
1624
|
);
|
|
@@ -1632,7 +1632,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1632
1632
|
height: "100%",
|
|
1633
1633
|
...getShapeFillStrokeStyle(element)
|
|
1634
1634
|
});
|
|
1635
|
-
const inheritedFill =
|
|
1635
|
+
const inheritedFill = chunk6DQCBVYA_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1636
1636
|
if (inheritedFill) {
|
|
1637
1637
|
applyInheritedFill(box, inheritedFill);
|
|
1638
1638
|
}
|
|
@@ -1653,12 +1653,12 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1653
1653
|
box.appendChild(gradientOutline);
|
|
1654
1654
|
}
|
|
1655
1655
|
if (pptx.isImageLikeElement(element)) {
|
|
1656
|
-
const src =
|
|
1656
|
+
const src = chunk6DQCBVYA_cjs.getImageSrc(element, new Map(mediaDataUrls));
|
|
1657
1657
|
if (src) {
|
|
1658
1658
|
const img = createEl(doc, "img", void 0, {
|
|
1659
1659
|
width: "100%",
|
|
1660
1660
|
height: "100%",
|
|
1661
|
-
...
|
|
1661
|
+
...chunk6DQCBVYA_cjs.getImageFitStyle(element)
|
|
1662
1662
|
});
|
|
1663
1663
|
img.setAttribute("src", src);
|
|
1664
1664
|
img.setAttribute("alt", "");
|
|
@@ -1668,7 +1668,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1668
1668
|
appendOwnReflection(doc, box, element, mediaDataUrls, suppressOwnReflection);
|
|
1669
1669
|
return box;
|
|
1670
1670
|
}
|
|
1671
|
-
const paragraphs =
|
|
1671
|
+
const paragraphs = chunk6DQCBVYA_cjs.buildParagraphs(element);
|
|
1672
1672
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
1673
1673
|
if (hasText) {
|
|
1674
1674
|
box.appendChild(renderTextBlock(doc, paragraphs, getTextBlockStyle(element)));
|
|
@@ -1680,20 +1680,20 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1680
1680
|
// src/pptx/dom/elements/shape-filter-defs.ts
|
|
1681
1681
|
var OUTLINE_SVG_STYLE = "position:absolute;inset:0;width:100%;height:100%;min-width:1px;min-height:1px;overflow:visible;pointer-events:none";
|
|
1682
1682
|
function renderShapeFilterDefs(doc, element) {
|
|
1683
|
-
const style =
|
|
1683
|
+
const style = chunk6DQCBVYA_cjs.getEffectStyleSource(element);
|
|
1684
1684
|
if (!style) {
|
|
1685
1685
|
return null;
|
|
1686
1686
|
}
|
|
1687
1687
|
const markups = [];
|
|
1688
|
-
const duotone =
|
|
1688
|
+
const duotone = chunk6DQCBVYA_cjs.getDuotoneSvgFilter(style, element.id);
|
|
1689
1689
|
if (duotone) {
|
|
1690
1690
|
markups.push(duotone.filterMarkup);
|
|
1691
1691
|
}
|
|
1692
|
-
const softEdge =
|
|
1692
|
+
const softEdge = chunk6DQCBVYA_cjs.getSoftEdgeSvgFilter(style, element.id);
|
|
1693
1693
|
if (softEdge) {
|
|
1694
1694
|
markups.push(softEdge.filterMarkup);
|
|
1695
1695
|
}
|
|
1696
|
-
const bevelLighting =
|
|
1696
|
+
const bevelLighting = chunk6DQCBVYA_cjs.getBevelLightingSvgFilter(element);
|
|
1697
1697
|
if (bevelLighting) {
|
|
1698
1698
|
markups.push(bevelLighting.filterMarkup);
|
|
1699
1699
|
}
|
|
@@ -1711,7 +1711,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1711
1711
|
if (!pptx.hasShapeProperties(element)) {
|
|
1712
1712
|
return null;
|
|
1713
1713
|
}
|
|
1714
|
-
const overlay =
|
|
1714
|
+
const overlay = chunk6DQCBVYA_cjs.getComputedEffectStyle(element).fillOverlay;
|
|
1715
1715
|
if (!overlay) {
|
|
1716
1716
|
return null;
|
|
1717
1717
|
}
|
|
@@ -1726,7 +1726,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1726
1726
|
return layer;
|
|
1727
1727
|
}
|
|
1728
1728
|
function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
1729
|
-
const wrapperStyle =
|
|
1729
|
+
const wrapperStyle = chunk6DQCBVYA_cjs.getComputedEffectStyle(element).reflection;
|
|
1730
1730
|
if (!wrapperStyle) {
|
|
1731
1731
|
return null;
|
|
1732
1732
|
}
|
|
@@ -1736,13 +1736,13 @@ function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
|
1736
1736
|
return layer;
|
|
1737
1737
|
}
|
|
1738
1738
|
function renderHollowHitOutline(doc, element) {
|
|
1739
|
-
const hit =
|
|
1739
|
+
const hit = chunk6DQCBVYA_cjs.buildHollowHitOutline(element);
|
|
1740
1740
|
if (!hit) {
|
|
1741
1741
|
return null;
|
|
1742
1742
|
}
|
|
1743
1743
|
const svg = createSvgEl(doc, "svg", {
|
|
1744
1744
|
"aria-hidden": "true",
|
|
1745
|
-
viewBox:
|
|
1745
|
+
viewBox: chunk6DQCBVYA_cjs.strokeOutlineViewBox(element),
|
|
1746
1746
|
preserveAspectRatio: "none"
|
|
1747
1747
|
});
|
|
1748
1748
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
@@ -1775,20 +1775,20 @@ function renderShapeSubpathFillOverlay(doc, element) {
|
|
|
1775
1775
|
return svg;
|
|
1776
1776
|
}
|
|
1777
1777
|
function renderStrokeOutline(doc, element) {
|
|
1778
|
-
const outline =
|
|
1778
|
+
const outline = chunk6DQCBVYA_cjs.buildStrokeOutline(element);
|
|
1779
1779
|
if (!outline) {
|
|
1780
1780
|
return null;
|
|
1781
1781
|
}
|
|
1782
1782
|
const svg = createSvgEl(doc, "svg", {
|
|
1783
1783
|
class: "pptx-vanilla-gradient-outline",
|
|
1784
1784
|
"aria-hidden": "true",
|
|
1785
|
-
viewBox:
|
|
1785
|
+
viewBox: chunk6DQCBVYA_cjs.strokeOutlineViewBox(element),
|
|
1786
1786
|
preserveAspectRatio: "none"
|
|
1787
1787
|
});
|
|
1788
1788
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
1789
1789
|
if (outline.paint) {
|
|
1790
1790
|
const defs = createSvgEl(doc, "defs");
|
|
1791
|
-
if (
|
|
1791
|
+
if (chunk6DQCBVYA_cjs.isPatternPaint(outline.paint)) {
|
|
1792
1792
|
const pattern = createSvgEl(doc, "pattern", {
|
|
1793
1793
|
id: outline.paint.id,
|
|
1794
1794
|
width: outline.paint.width,
|
|
@@ -1803,7 +1803,7 @@ function renderStrokeOutline(doc, element) {
|
|
|
1803
1803
|
pattern.appendChild(image);
|
|
1804
1804
|
defs.appendChild(pattern);
|
|
1805
1805
|
} else {
|
|
1806
|
-
defs.innerHTML =
|
|
1806
|
+
defs.innerHTML = chunk6DQCBVYA_cjs.svgGradientMarkup(outline.paint);
|
|
1807
1807
|
}
|
|
1808
1808
|
svg.appendChild(defs);
|
|
1809
1809
|
}
|
|
@@ -1862,14 +1862,14 @@ function indexRenderedNodes(root) {
|
|
|
1862
1862
|
return byId;
|
|
1863
1863
|
}
|
|
1864
1864
|
function paintInheritedFill(node, element, parentGroupFill) {
|
|
1865
|
-
const inherited =
|
|
1865
|
+
const inherited = chunk6DQCBVYA_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1866
1866
|
if (inherited) {
|
|
1867
1867
|
applyGroupChildFill(node, inherited);
|
|
1868
1868
|
}
|
|
1869
1869
|
if (element.type !== "group") {
|
|
1870
1870
|
return;
|
|
1871
1871
|
}
|
|
1872
|
-
const childFill =
|
|
1872
|
+
const childFill = chunk6DQCBVYA_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1873
1873
|
if (!childFill) {
|
|
1874
1874
|
return;
|
|
1875
1875
|
}
|
|
@@ -1883,7 +1883,7 @@ function paintInheritedFill(node, element, parentGroupFill) {
|
|
|
1883
1883
|
}
|
|
1884
1884
|
var renderGroupElement = (element, zIndex, context) => {
|
|
1885
1885
|
const el = createEl(context.document, "div", "pptxv-element pptxv-group", {
|
|
1886
|
-
...
|
|
1886
|
+
...chunk6DQCBVYA_cjs.getContainerStyle(element, zIndex),
|
|
1887
1887
|
// A group paints no fill/outline of its own, but `p:grpSpPr/a:effectLst`
|
|
1888
1888
|
// DOES carry a shadow/glow/soft-edge for the group's own composite
|
|
1889
1889
|
// raster (see shared `getComputedEffectStyle`), expressed as `filter` /
|
|
@@ -1900,7 +1900,7 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1900
1900
|
el.appendChild(reflection);
|
|
1901
1901
|
}
|
|
1902
1902
|
if (element.type === "group" && element.children?.length) {
|
|
1903
|
-
const parentGroupFill =
|
|
1903
|
+
const parentGroupFill = chunk6DQCBVYA_cjs.getGroupChildParentFill(element);
|
|
1904
1904
|
element.children.forEach((child, index) => {
|
|
1905
1905
|
const childEl = context.renderElement(child, index);
|
|
1906
1906
|
if (childEl) {
|
|
@@ -1915,16 +1915,16 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1915
1915
|
// src/pptx/dom/elements/image.ts
|
|
1916
1916
|
var renderImageElement = (element, zIndex, context) => {
|
|
1917
1917
|
const doc = context.document;
|
|
1918
|
-
const geometry = element.type === "image" || element.type === "picture" ?
|
|
1918
|
+
const geometry = element.type === "image" || element.type === "picture" ? chunk6DQCBVYA_cjs.resolveShapeGeometry(element) : void 0;
|
|
1919
1919
|
const geometryClipPath = geometry?.kind === "clipPath" ? geometry.clipPath : void 0;
|
|
1920
|
-
const cropShapeClipPath = element.type === "image" || element.type === "picture" ?
|
|
1921
|
-
const layers =
|
|
1922
|
-
overflow:
|
|
1920
|
+
const cropShapeClipPath = element.type === "image" || element.type === "picture" ? chunk6DQCBVYA_cjs.getCropShapeClipPath(element.cropShape, element.width, element.height) : void 0;
|
|
1921
|
+
const layers = chunk6DQCBVYA_cjs.getPictureFrameLayers(element, {
|
|
1922
|
+
overflow: chunk6DQCBVYA_cjs.getImageOverflow(element),
|
|
1923
1923
|
borderRadius: geometry?.kind === "borderRadius" ? geometry.radius : void 0,
|
|
1924
1924
|
clipPath: geometryClipPath ?? cropShapeClipPath
|
|
1925
1925
|
});
|
|
1926
1926
|
const el = createEl(doc, "div", "pptxv-element pptxv-image", {
|
|
1927
|
-
...
|
|
1927
|
+
...chunk6DQCBVYA_cjs.getContainerStyle(element, zIndex),
|
|
1928
1928
|
...layers.box
|
|
1929
1929
|
});
|
|
1930
1930
|
el.dataset.elementId = element.id;
|
|
@@ -1936,11 +1936,11 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1936
1936
|
el.appendChild(outline);
|
|
1937
1937
|
}
|
|
1938
1938
|
}
|
|
1939
|
-
const src =
|
|
1939
|
+
const src = chunk6DQCBVYA_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
1940
1940
|
if (!src) {
|
|
1941
1941
|
return el;
|
|
1942
1942
|
}
|
|
1943
|
-
const fx =
|
|
1943
|
+
const fx = chunk6DQCBVYA_cjs.getComputedImageStyle(element);
|
|
1944
1944
|
for (const f of fx.svgFilters) {
|
|
1945
1945
|
const svg = createSvgEl(doc, "svg", { width: 0, height: 0, "aria-hidden": "true" });
|
|
1946
1946
|
svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden");
|
|
@@ -1953,7 +1953,7 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1953
1953
|
surface.appendChild(svg);
|
|
1954
1954
|
}
|
|
1955
1955
|
const reflection = renderReflectionOverlay(doc, element, context.mediaDataUrls);
|
|
1956
|
-
const tiling =
|
|
1956
|
+
const tiling = chunk6DQCBVYA_cjs.getImageTilingStyle(element, chunk6DQCBVYA_cjs.getCachedNativeImageSize(src));
|
|
1957
1957
|
if (tiling) {
|
|
1958
1958
|
const tile = createEl(doc, "div", "pptxv-image-tile", tiling);
|
|
1959
1959
|
if (fx.filter) {
|
|
@@ -1962,10 +1962,10 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1962
1962
|
if (fx.opacity !== void 0) {
|
|
1963
1963
|
tile.style.opacity = String(fx.opacity);
|
|
1964
1964
|
}
|
|
1965
|
-
if (!
|
|
1966
|
-
void
|
|
1965
|
+
if (!chunk6DQCBVYA_cjs.getCachedNativeImageSize(src)) {
|
|
1966
|
+
void chunk6DQCBVYA_cjs.probeNativeImageSize(src).then((size) => {
|
|
1967
1967
|
if (size) {
|
|
1968
|
-
applyStyleMap(tile,
|
|
1968
|
+
applyStyleMap(tile, chunk6DQCBVYA_cjs.getImageTilingStyle(element, size) ?? {});
|
|
1969
1969
|
}
|
|
1970
1970
|
return void 0;
|
|
1971
1971
|
});
|
|
@@ -1976,8 +1976,8 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1976
1976
|
}
|
|
1977
1977
|
return el;
|
|
1978
1978
|
}
|
|
1979
|
-
const fit =
|
|
1980
|
-
const fillCounterTransform =
|
|
1979
|
+
const fit = chunk6DQCBVYA_cjs.getImageFitStyle(element);
|
|
1980
|
+
const fillCounterTransform = chunk6DQCBVYA_cjs.getImageFillCounterTransform(element, Boolean(fit.transform));
|
|
1981
1981
|
const img = createEl(doc, "img", void 0, {
|
|
1982
1982
|
...fit,
|
|
1983
1983
|
display: "block",
|
|
@@ -1996,14 +1996,14 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1996
1996
|
if (element.type === "image" || element.type === "picture") {
|
|
1997
1997
|
const clrChange = element.imageEffects?.clrChange;
|
|
1998
1998
|
if (clrChange) {
|
|
1999
|
-
void
|
|
1999
|
+
void chunk6DQCBVYA_cjs.resolveColorChangedImageSource(src, clrChange).then((resolved) => {
|
|
2000
2000
|
if (img.src === src || img.getAttribute("src") === src) {
|
|
2001
2001
|
img.src = resolved;
|
|
2002
2002
|
}
|
|
2003
2003
|
return void 0;
|
|
2004
2004
|
});
|
|
2005
2005
|
}
|
|
2006
|
-
const wash =
|
|
2006
|
+
const wash = chunk6DQCBVYA_cjs.getImageColorWashStyle(element.imageEffects?.colorWash);
|
|
2007
2007
|
if (wash) {
|
|
2008
2008
|
surface.appendChild(
|
|
2009
2009
|
createEl(doc, "div", "pptxv-image-color-wash", {
|
|
@@ -2032,7 +2032,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
2032
2032
|
doc,
|
|
2033
2033
|
"div",
|
|
2034
2034
|
"pptxv-element pptxv-ink",
|
|
2035
|
-
|
|
2035
|
+
chunk6DQCBVYA_cjs.getContainerStyle(element, zIndex)
|
|
2036
2036
|
);
|
|
2037
2037
|
wrapper.dataset.elementId = element.id;
|
|
2038
2038
|
const paths = element.inkPaths;
|
|
@@ -2053,7 +2053,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
2053
2053
|
keyframes.textContent = chunkNTXHQHCS_cjs.INK_REPLAY_KEYFRAMES;
|
|
2054
2054
|
svg.appendChild(keyframes);
|
|
2055
2055
|
}
|
|
2056
|
-
const views =
|
|
2056
|
+
const views = chunk6DQCBVYA_cjs.buildInkGroupStrokes(element, { color: chunkG3UVZ5FO_cjs.DEFAULT_STROKE_COLOR, width: 1 });
|
|
2057
2057
|
for (const [i, view] of views.entries()) {
|
|
2058
2058
|
svg.appendChild(buildStrokeSvg(doc, view, replayStyles[i]));
|
|
2059
2059
|
}
|
|
@@ -2107,12 +2107,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2107
2107
|
let stopButton = null;
|
|
2108
2108
|
const update = (playing) => {
|
|
2109
2109
|
const input = { fullScreen: element.fullScreen, presenting: context.presenting, playing };
|
|
2110
|
-
const active =
|
|
2110
|
+
const active = chunk6DQCBVYA_cjs.isMediaFullscreenActive(input);
|
|
2111
2111
|
applyStyleMap(
|
|
2112
2112
|
container,
|
|
2113
|
-
active ?
|
|
2113
|
+
active ? chunk6DQCBVYA_cjs.MEDIA_FULLSCREEN_OVERLAY_STYLE : mediaFullscreenResetStyle(baseStyle)
|
|
2114
2114
|
);
|
|
2115
|
-
if (
|
|
2115
|
+
if (chunk6DQCBVYA_cjs.shouldShowMediaFullscreenStopButton(input)) {
|
|
2116
2116
|
if (!stopButton) {
|
|
2117
2117
|
stopButton = buildFullscreenStopButton(
|
|
2118
2118
|
doc,
|
|
@@ -2137,12 +2137,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2137
2137
|
|
|
2138
2138
|
// src/pptx/dom/elements/media.ts
|
|
2139
2139
|
function applyMediaPresentingState(el, presenting, playback) {
|
|
2140
|
-
|
|
2140
|
+
chunk6DQCBVYA_cjs.applyMediaPlaybackAttributes(el, playback);
|
|
2141
2141
|
if (presenting) {
|
|
2142
|
-
|
|
2143
|
-
|
|
2142
|
+
chunk6DQCBVYA_cjs.startMediaAutoplay(el, { trimStartMs: playback.trimStartMs });
|
|
2143
|
+
chunk6DQCBVYA_cjs.scheduleMediaTrimAndFade(el, {
|
|
2144
2144
|
...playback,
|
|
2145
|
-
volume:
|
|
2145
|
+
volume: chunk6DQCBVYA_cjs.mediaPlaybackAttributes(playback).volume
|
|
2146
2146
|
});
|
|
2147
2147
|
} else if (!el.paused) {
|
|
2148
2148
|
el.pause();
|
|
@@ -2152,18 +2152,18 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2152
2152
|
if (element.type !== "media") {
|
|
2153
2153
|
return null;
|
|
2154
2154
|
}
|
|
2155
|
-
const surface =
|
|
2155
|
+
const surface = chunk6DQCBVYA_cjs.mediaSurfaceOf({
|
|
2156
2156
|
interactive: context.interactive === true || context.reading === true,
|
|
2157
2157
|
presenting: context.presenting
|
|
2158
2158
|
});
|
|
2159
|
-
const showTransport =
|
|
2159
|
+
const showTransport = chunk6DQCBVYA_cjs.mediaTransportVisible({ ...surface, canvasTransport: true });
|
|
2160
2160
|
const doc = context.document;
|
|
2161
|
-
const baseStyle =
|
|
2161
|
+
const baseStyle = chunk6DQCBVYA_cjs.getContainerStyle(element, zIndex);
|
|
2162
2162
|
const el = createEl(doc, "div", "pptxv-element pptxv-media", baseStyle);
|
|
2163
2163
|
el.dataset.elementId = element.id;
|
|
2164
2164
|
const mediaSrc = element.mediaData ?? (element.mediaPath ? context.mediaDataUrls.get(element.mediaPath) : void 0);
|
|
2165
|
-
const posterSrc =
|
|
2166
|
-
const onlineVideoEmbedUrl =
|
|
2165
|
+
const posterSrc = chunk6DQCBVYA_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
2166
|
+
const onlineVideoEmbedUrl = chunk6DQCBVYA_cjs.getOnlineVideoEmbed(element)?.embedUrl;
|
|
2167
2167
|
if (onlineVideoEmbedUrl && element.mediaType === "video") {
|
|
2168
2168
|
const iframe = createEl(doc, "iframe", "pptxv-media-video pptxv-media-iframe", {
|
|
2169
2169
|
width: "100%",
|
|
@@ -2173,8 +2173,8 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2173
2173
|
});
|
|
2174
2174
|
iframe.src = onlineVideoEmbedUrl;
|
|
2175
2175
|
iframe.title = context.t("pptx.media.onlineVideoTitle");
|
|
2176
|
-
iframe.allow =
|
|
2177
|
-
iframe.sandbox.value =
|
|
2176
|
+
iframe.allow = chunk6DQCBVYA_cjs.ONLINE_VIDEO_IFRAME_ALLOW;
|
|
2177
|
+
iframe.sandbox.value = chunk6DQCBVYA_cjs.ONLINE_VIDEO_IFRAME_SANDBOX;
|
|
2178
2178
|
iframe.allowFullscreen = true;
|
|
2179
2179
|
el.appendChild(iframe);
|
|
2180
2180
|
return el;
|
|
@@ -2203,21 +2203,21 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2203
2203
|
audio.src = mediaSrc;
|
|
2204
2204
|
audio.controls = showTransport;
|
|
2205
2205
|
el.appendChild(audio);
|
|
2206
|
-
if (context.presenting &&
|
|
2206
|
+
if (context.presenting && chunk6DQCBVYA_cjs.registerCrossSlideAudio(element, mediaSrc)) {
|
|
2207
2207
|
audio.muted = true;
|
|
2208
|
-
|
|
2208
|
+
chunk6DQCBVYA_cjs.applyMediaPlaybackAttributes(audio, element);
|
|
2209
2209
|
return el;
|
|
2210
2210
|
}
|
|
2211
2211
|
applyMediaPresentingState(audio, context.presenting, element);
|
|
2212
2212
|
wireMediaFullscreenOverlay(doc, el, audio, element, context, baseStyle);
|
|
2213
2213
|
return el;
|
|
2214
2214
|
}
|
|
2215
|
-
const fallback =
|
|
2215
|
+
const fallback = chunk6DQCBVYA_cjs.mediaFallbackVisual(surface, {
|
|
2216
2216
|
hasPoster: Boolean(posterSrc),
|
|
2217
2217
|
missing: element.mediaMissing === true
|
|
2218
2218
|
});
|
|
2219
|
-
const icon =
|
|
2220
|
-
const labelKey =
|
|
2219
|
+
const icon = chunk6DQCBVYA_cjs.mediaFallbackIcon(fallback, element.mediaType);
|
|
2220
|
+
const labelKey = chunk6DQCBVYA_cjs.mediaFallbackLabelKey(fallback, element.mediaType);
|
|
2221
2221
|
if (fallback.poster && posterSrc) {
|
|
2222
2222
|
const img = createEl(doc, "img", "pptxv-media-poster", {
|
|
2223
2223
|
width: "100%",
|
|
@@ -2235,7 +2235,7 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2235
2235
|
if (fallback.badge === "missing") {
|
|
2236
2236
|
badge.classList.add("pptxv-media-badge-missing");
|
|
2237
2237
|
}
|
|
2238
|
-
badge.setAttribute(
|
|
2238
|
+
badge.setAttribute(chunk6DQCBVYA_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.badge);
|
|
2239
2239
|
badge.appendChild(buildIcon(doc, icon));
|
|
2240
2240
|
if (labelKey !== void 0 && fallback.badge === "missing") {
|
|
2241
2241
|
const text = createEl(doc, "span");
|
|
@@ -2248,7 +2248,7 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2248
2248
|
}
|
|
2249
2249
|
if (fallback.placeholder !== "none") {
|
|
2250
2250
|
el.classList.add("pptxv-placeholder", "pptxv-media-placeholder");
|
|
2251
|
-
el.setAttribute(
|
|
2251
|
+
el.setAttribute(chunk6DQCBVYA_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.placeholder);
|
|
2252
2252
|
if (icon.length > 0) {
|
|
2253
2253
|
el.appendChild(buildIcon(doc, icon));
|
|
2254
2254
|
}
|
|
@@ -2284,7 +2284,7 @@ var renderModel3dElement = (element, zIndex, context) => {
|
|
|
2284
2284
|
doc,
|
|
2285
2285
|
"div",
|
|
2286
2286
|
"pptxv-element pptxv-model3d",
|
|
2287
|
-
|
|
2287
|
+
chunk6DQCBVYA_cjs.getContainerStyle(element, zIndex)
|
|
2288
2288
|
);
|
|
2289
2289
|
el.dataset.elementId = element.id;
|
|
2290
2290
|
const label = context.t("pptx.model3d.label");
|
|
@@ -2421,7 +2421,7 @@ function buildOleIcon(doc, type, color) {
|
|
|
2421
2421
|
fill: "none",
|
|
2422
2422
|
"aria-hidden": "true"
|
|
2423
2423
|
});
|
|
2424
|
-
for (const shape of
|
|
2424
|
+
for (const shape of chunk6DQCBVYA_cjs.getOleIconShapes(type)) {
|
|
2425
2425
|
const node = createSvgEl(doc, shape.tag, shape.attrs);
|
|
2426
2426
|
if (shape.tag === "text") {
|
|
2427
2427
|
node.setAttribute("fill", color);
|
|
@@ -2440,21 +2440,21 @@ var renderOleElement = (element, zIndex, context) => {
|
|
|
2440
2440
|
return null;
|
|
2441
2441
|
}
|
|
2442
2442
|
const doc = context.document;
|
|
2443
|
-
const oleType =
|
|
2444
|
-
const typeColor =
|
|
2445
|
-
const typeLabel =
|
|
2446
|
-
const el = createEl(doc, "div", "pptxv-element pptxv-ole",
|
|
2443
|
+
const oleType = chunk6DQCBVYA_cjs.resolveOleType(element);
|
|
2444
|
+
const typeColor = chunk6DQCBVYA_cjs.getOleTypeColor(oleType);
|
|
2445
|
+
const typeLabel = chunk6DQCBVYA_cjs.getOleTypeLabel(oleType);
|
|
2446
|
+
const el = createEl(doc, "div", "pptxv-element pptxv-ole", chunk6DQCBVYA_cjs.getContainerStyle(element, zIndex));
|
|
2447
2447
|
el.dataset.elementId = element.id;
|
|
2448
2448
|
el.setAttribute("role", "group");
|
|
2449
|
-
el.setAttribute("aria-label",
|
|
2449
|
+
el.setAttribute("aria-label", chunk6DQCBVYA_cjs.getOleAriaLabel(element));
|
|
2450
2450
|
el.title = infoLines(element, typeLabel).join("\n");
|
|
2451
2451
|
if (element.previewImageData) {
|
|
2452
|
-
el.appendChild(buildPreview(doc, element, typeColor,
|
|
2452
|
+
el.appendChild(buildPreview(doc, element, typeColor, chunk6DQCBVYA_cjs.getOleBadgeLabel(oleType)));
|
|
2453
2453
|
} else {
|
|
2454
2454
|
el.appendChild(buildPlaceholder2(doc, element, oleType, typeColor, typeLabel));
|
|
2455
2455
|
}
|
|
2456
|
-
const showActions =
|
|
2457
|
-
|
|
2456
|
+
const showActions = chunk6DQCBVYA_cjs.oleActionsVisible(
|
|
2457
|
+
chunk6DQCBVYA_cjs.mediaSurfaceOf({
|
|
2458
2458
|
interactive: context.interactive === true,
|
|
2459
2459
|
presenting: context.presenting
|
|
2460
2460
|
})
|
|
@@ -2470,7 +2470,7 @@ function infoLines(el, typeLabel) {
|
|
|
2470
2470
|
if (name) {
|
|
2471
2471
|
lines.push(name);
|
|
2472
2472
|
}
|
|
2473
|
-
const size =
|
|
2473
|
+
const size = chunk6DQCBVYA_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2474
2474
|
if (size) {
|
|
2475
2475
|
lines.push(size);
|
|
2476
2476
|
}
|
|
@@ -2494,7 +2494,7 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2494
2494
|
display: "block"
|
|
2495
2495
|
});
|
|
2496
2496
|
img.src = el.previewImageData ?? "";
|
|
2497
|
-
img.alt =
|
|
2497
|
+
img.alt = chunk6DQCBVYA_cjs.getOleAriaLabel(el);
|
|
2498
2498
|
img.draggable = false;
|
|
2499
2499
|
preview.appendChild(img);
|
|
2500
2500
|
const badge = createSvgEl(doc, "svg", { width: 24, height: 24, viewBox: "0 0 24 24" });
|
|
@@ -2521,7 +2521,7 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2521
2521
|
}
|
|
2522
2522
|
function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
2523
2523
|
const box = createEl(doc, "div", "pptxv-ole-placeholder", {
|
|
2524
|
-
...
|
|
2524
|
+
...chunk6DQCBVYA_cjs.getPlaceholderStyle(oleType),
|
|
2525
2525
|
width: "100%",
|
|
2526
2526
|
height: "100%",
|
|
2527
2527
|
display: "flex",
|
|
@@ -2542,7 +2542,7 @@ function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
|
2542
2542
|
whiteSpace: "nowrap",
|
|
2543
2543
|
color: typeColor
|
|
2544
2544
|
});
|
|
2545
|
-
name.textContent =
|
|
2545
|
+
name.textContent = chunk6DQCBVYA_cjs.getOleDisplayName(el);
|
|
2546
2546
|
box.appendChild(name);
|
|
2547
2547
|
if (el.fileName) {
|
|
2548
2548
|
const sublabel = createEl(doc, "span", "pptxv-ole-sublabel", {
|
|
@@ -2594,7 +2594,7 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2594
2594
|
for (const type of ["pointerdown", "mousedown", "click"]) {
|
|
2595
2595
|
bar.addEventListener(type, (event) => event.stopPropagation());
|
|
2596
2596
|
}
|
|
2597
|
-
const size =
|
|
2597
|
+
const size = chunk6DQCBVYA_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2598
2598
|
if (size) {
|
|
2599
2599
|
const meta = createEl(doc, "span", "pptxv-ole-meta", {
|
|
2600
2600
|
marginRight: "auto",
|
|
@@ -2614,14 +2614,14 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2614
2614
|
download.title = downloadTitle;
|
|
2615
2615
|
download.textContent = context.t("pptx.ole.download");
|
|
2616
2616
|
bar.appendChild(download);
|
|
2617
|
-
if (
|
|
2617
|
+
if (chunk6DQCBVYA_cjs.isBrowserOpenableMime(el.oleEmbeddedMimeType)) {
|
|
2618
2618
|
const open = createEl(doc, "button", "pptxv-ole-action", ACTION_STYLE);
|
|
2619
2619
|
open.type = "button";
|
|
2620
2620
|
const openTitle = context.t("pptx.ole.openName", { name: downloadName });
|
|
2621
2621
|
open.setAttribute("aria-label", openTitle);
|
|
2622
2622
|
open.title = openTitle;
|
|
2623
2623
|
open.textContent = context.t("pptx.ole.open");
|
|
2624
|
-
open.addEventListener("click", () =>
|
|
2624
|
+
open.addEventListener("click", () => chunk6DQCBVYA_cjs.openUrlInNewTab(data));
|
|
2625
2625
|
bar.appendChild(open);
|
|
2626
2626
|
}
|
|
2627
2627
|
return bar;
|
|
@@ -2633,7 +2633,7 @@ var renderPlaceholderElement = (element, zIndex, context) => {
|
|
|
2633
2633
|
context.document,
|
|
2634
2634
|
"div",
|
|
2635
2635
|
"pptxv-element pptxv-placeholder",
|
|
2636
|
-
|
|
2636
|
+
chunk6DQCBVYA_cjs.getContainerStyle(element, zIndex)
|
|
2637
2637
|
);
|
|
2638
2638
|
el.dataset.elementId = element.id;
|
|
2639
2639
|
el.dataset.elementType = element.type;
|
|
@@ -2649,7 +2649,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2649
2649
|
return null;
|
|
2650
2650
|
}
|
|
2651
2651
|
const doc = context.document;
|
|
2652
|
-
const summaryView =
|
|
2652
|
+
const summaryView = chunk6DQCBVYA_cjs.buildSummaryZoomView(
|
|
2653
2653
|
element,
|
|
2654
2654
|
(index) => {
|
|
2655
2655
|
const slide = context.slides?.[index];
|
|
@@ -2669,7 +2669,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2669
2669
|
doc,
|
|
2670
2670
|
"div",
|
|
2671
2671
|
"pptxv-element pptxv-zoom pptxv-summary-zoom",
|
|
2672
|
-
|
|
2672
|
+
chunk6DQCBVYA_cjs.getContainerStyle(element, zIndex)
|
|
2673
2673
|
);
|
|
2674
2674
|
const content = createEl(doc, "div", "pptxv-summary-zoom-content", summaryView.containerStyle);
|
|
2675
2675
|
root.dataset.elementId = element.id;
|
|
@@ -2736,7 +2736,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2736
2736
|
const target = element.targetSlideIndex ?? 0;
|
|
2737
2737
|
const targetSlide = context.slides?.[target];
|
|
2738
2738
|
const interactive = context.presenting && context.onZoomClick !== void 0;
|
|
2739
|
-
const el = createEl(doc, "div", "pptxv-element pptxv-zoom",
|
|
2739
|
+
const el = createEl(doc, "div", "pptxv-element pptxv-zoom", chunk6DQCBVYA_cjs.getContainerStyle(element, zIndex));
|
|
2740
2740
|
el.dataset.elementId = element.id;
|
|
2741
2741
|
el.dataset.zoomType = zoomType;
|
|
2742
2742
|
el.dataset.zoomTarget = String(target);
|
|
@@ -2746,7 +2746,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2746
2746
|
el.tabIndex = 0;
|
|
2747
2747
|
el.style.cursor = "pointer";
|
|
2748
2748
|
const activate = () => {
|
|
2749
|
-
const zoomTarget =
|
|
2749
|
+
const zoomTarget = chunk6DQCBVYA_cjs.resolveZoomNavigationTarget(element);
|
|
2750
2750
|
if (zoomTarget) {
|
|
2751
2751
|
context.onZoomClick?.(zoomTarget, context.currentSlideIndex ?? 0);
|
|
2752
2752
|
}
|
|
@@ -2861,7 +2861,7 @@ function registerExtraRenderers(registry) {
|
|
|
2861
2861
|
// src/pptx/dom/elements/smartart-3d.ts
|
|
2862
2862
|
var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
2863
2863
|
const wrapper = renderSmartArtSvg(element, zIndex, context);
|
|
2864
|
-
const spec = wrapper ?
|
|
2864
|
+
const spec = wrapper ? chunk6DQCBVYA_cjs.resolveSmartArtThreeViewSpec(element, context.smartArt3D) : null;
|
|
2865
2865
|
if (!wrapper || !spec) {
|
|
2866
2866
|
return wrapper;
|
|
2867
2867
|
}
|
|
@@ -2871,18 +2871,18 @@ var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
|
2871
2871
|
textStyle: context.presentationStates?.get(element.id)?.textStyle
|
|
2872
2872
|
});
|
|
2873
2873
|
if (context.onSmartArtNodeTextChange && context.interactive && !context.presenting) {
|
|
2874
|
-
const layer = renderSmartArtSvg(
|
|
2874
|
+
const layer = renderSmartArtSvg(chunk6DQCBVYA_cjs.elementInLocalFrame(element), 0, context);
|
|
2875
2875
|
if (layer) {
|
|
2876
2876
|
layer.classList.add("pptxv-smartart-3d-edit-layer");
|
|
2877
2877
|
layer.setAttribute("data-smartart-3d-edit-layer", "true");
|
|
2878
|
-
|
|
2878
|
+
chunk6DQCBVYA_cjs.stripEditLayerMarkers(layer);
|
|
2879
2879
|
layer.setAttribute("aria-hidden", "true");
|
|
2880
2880
|
Object.assign(layer.style, { position: "absolute", inset: "0", zIndex: "1" });
|
|
2881
2881
|
for (const svg of layer.querySelectorAll("svg")) {
|
|
2882
2882
|
svg.style.opacity = "0";
|
|
2883
2883
|
}
|
|
2884
2884
|
wrapper.appendChild(layer);
|
|
2885
|
-
|
|
2885
|
+
chunk6DQCBVYA_cjs.routeEditLayerPointerToNodes(layer);
|
|
2886
2886
|
}
|
|
2887
2887
|
}
|
|
2888
2888
|
return wrapper;
|
|
@@ -2895,7 +2895,7 @@ function nodeTarget(target) {
|
|
|
2895
2895
|
}
|
|
2896
2896
|
function enableSmartArtEditing(chrome, element, context) {
|
|
2897
2897
|
const data = element.smartArtData;
|
|
2898
|
-
if (!data || !context.onSmartArtNodeTextChange && !context.onSmartArtNodeFillChange || !
|
|
2898
|
+
if (!data || !context.onSmartArtNodeTextChange && !context.onSmartArtNodeFillChange || !chunk6DQCBVYA_cjs.canDrillDown(element)) {
|
|
2899
2899
|
return;
|
|
2900
2900
|
}
|
|
2901
2901
|
let editor = null;
|
|
@@ -2917,8 +2917,8 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2917
2917
|
}
|
|
2918
2918
|
event.stopPropagation();
|
|
2919
2919
|
const textNode = target.querySelector("text");
|
|
2920
|
-
const textRect = textNode ?
|
|
2921
|
-
const rect = textRect && textRect.width > 0 ? textRect :
|
|
2920
|
+
const textRect = textNode ? chunk6DQCBVYA_cjs.measureSvgViewportRect(textNode) : null;
|
|
2921
|
+
const rect = textRect && textRect.width > 0 ? textRect : chunk6DQCBVYA_cjs.measureSvgViewportRect(target);
|
|
2922
2922
|
if (!rect) {
|
|
2923
2923
|
return;
|
|
2924
2924
|
}
|
|
@@ -2942,7 +2942,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2942
2942
|
textAlign: "center"
|
|
2943
2943
|
});
|
|
2944
2944
|
editor = input;
|
|
2945
|
-
input.value =
|
|
2945
|
+
input.value = chunk6DQCBVYA_cjs.findSmartArtNodeText(data, nodeId) ?? "";
|
|
2946
2946
|
const commit = () => {
|
|
2947
2947
|
if (input !== editor) {
|
|
2948
2948
|
return;
|
|
@@ -2974,7 +2974,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2974
2974
|
}
|
|
2975
2975
|
cancelHide();
|
|
2976
2976
|
swatches?.remove();
|
|
2977
|
-
const rect =
|
|
2977
|
+
const rect = chunk6DQCBVYA_cjs.measureSvgViewportRect(target);
|
|
2978
2978
|
if (!rect) {
|
|
2979
2979
|
return;
|
|
2980
2980
|
}
|
|
@@ -2993,7 +2993,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2993
2993
|
});
|
|
2994
2994
|
swatches.setAttribute("role", "group");
|
|
2995
2995
|
swatches.setAttribute("aria-label", context.t("pptx.smartArt.fillColor"));
|
|
2996
|
-
for (const color of
|
|
2996
|
+
for (const color of chunk6DQCBVYA_cjs.resolvePalette(data).slice(0, 6)) {
|
|
2997
2997
|
const button = createEl(chrome.ownerDocument, "button", "", {
|
|
2998
2998
|
width: "18px",
|
|
2999
2999
|
height: "18px",
|
|
@@ -3092,7 +3092,7 @@ function buildSmartArtFallbackSvg(doc, layout, a11yNodes = [], nodeIds = []) {
|
|
|
3092
3092
|
svg.setAttribute("class", "pptxv-smartart-svg");
|
|
3093
3093
|
svg.setAttribute("style", SMARTART_SVG_STYLE);
|
|
3094
3094
|
for (const conn of layout.connectors) {
|
|
3095
|
-
const paint =
|
|
3095
|
+
const paint = chunk6DQCBVYA_cjs.smartArtConnectorPaint(conn);
|
|
3096
3096
|
svg.appendChild(
|
|
3097
3097
|
createSvgEl(doc, "path", {
|
|
3098
3098
|
d: paint.d,
|
|
@@ -3151,7 +3151,7 @@ function buildFallbackNode(doc, node, shadowFilter, a11yLabel, nodeId) {
|
|
|
3151
3151
|
})
|
|
3152
3152
|
);
|
|
3153
3153
|
}
|
|
3154
|
-
const label =
|
|
3154
|
+
const label = chunk6DQCBVYA_cjs.smartArtNodeLabel(node);
|
|
3155
3155
|
if (label.visible) {
|
|
3156
3156
|
appendSvgTextLines(doc, g, {
|
|
3157
3157
|
lines: label.lines,
|
|
@@ -3187,41 +3187,41 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3187
3187
|
doc,
|
|
3188
3188
|
"div",
|
|
3189
3189
|
"pptxv-element pptxv-smartart",
|
|
3190
|
-
|
|
3190
|
+
chunk6DQCBVYA_cjs.getContainerStyle(element, zIndex)
|
|
3191
3191
|
);
|
|
3192
3192
|
wrapper.dataset.elementId = element.id;
|
|
3193
3193
|
wrapper.dataset.testid = `smartart-${data?.layout ?? "diagram"}`;
|
|
3194
|
-
const chrome = createEl(doc, "div", "pptxv-smartart-chrome",
|
|
3194
|
+
const chrome = createEl(doc, "div", "pptxv-smartart-chrome", chunk6DQCBVYA_cjs.buildChromeStyle(data?.chrome));
|
|
3195
3195
|
chrome.style.position = "relative";
|
|
3196
3196
|
wrapper.appendChild(chrome);
|
|
3197
3197
|
if (data) {
|
|
3198
|
-
const a11y =
|
|
3198
|
+
const a11y = chunk6DQCBVYA_cjs.buildSmartArtA11y(data);
|
|
3199
3199
|
chrome.setAttribute("role", "img");
|
|
3200
3200
|
chrome.setAttribute("aria-label", a11y.label);
|
|
3201
3201
|
}
|
|
3202
3202
|
const nodes = data?.nodes ?? [];
|
|
3203
3203
|
const drawingShapes = data?.drawingShapes ?? [];
|
|
3204
3204
|
const animationState = context.presentationStates?.get(element.id);
|
|
3205
|
-
const { nodes: revealedNodesFull } =
|
|
3205
|
+
const { nodes: revealedNodesFull } = chunk6DQCBVYA_cjs.resolveRevealedSmartArtNodes(
|
|
3206
3206
|
nodes,
|
|
3207
3207
|
animationState,
|
|
3208
3208
|
data?.presLayoutVars
|
|
3209
3209
|
);
|
|
3210
3210
|
if (data && drawingShapes.length > 0) {
|
|
3211
|
-
const revealedShapes =
|
|
3211
|
+
const revealedShapes = chunk6DQCBVYA_cjs.resolveRevealedDrawingShapes(drawingShapes, nodes, animationState);
|
|
3212
3212
|
chrome.appendChild(
|
|
3213
|
-
buildDrawingShapesSvg(doc, element.id, data,
|
|
3213
|
+
buildDrawingShapesSvg(doc, element.id, data, chunk6DQCBVYA_cjs.buildSmartArtA11y(data).nodes, revealedShapes)
|
|
3214
3214
|
);
|
|
3215
3215
|
enableSmartArtEditing(chrome, element, context);
|
|
3216
3216
|
return wrapper;
|
|
3217
3217
|
}
|
|
3218
3218
|
if (data && nodes.length > 0) {
|
|
3219
3219
|
const revealedNodes = revealedNodesFull;
|
|
3220
|
-
const layout =
|
|
3220
|
+
const layout = chunk6DQCBVYA_cjs.computeSmartArtElementLayout(
|
|
3221
3221
|
data,
|
|
3222
3222
|
revealedNodes,
|
|
3223
3223
|
{ width: element.width, height: element.height },
|
|
3224
|
-
|
|
3224
|
+
chunk6DQCBVYA_cjs.resolvePalette(data),
|
|
3225
3225
|
data.style ?? "flat",
|
|
3226
3226
|
element.id
|
|
3227
3227
|
);
|
|
@@ -3229,8 +3229,8 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3229
3229
|
buildSmartArtFallbackSvg(
|
|
3230
3230
|
doc,
|
|
3231
3231
|
layout,
|
|
3232
|
-
|
|
3233
|
-
|
|
3232
|
+
chunk6DQCBVYA_cjs.buildSmartArtA11y(data).nodes,
|
|
3233
|
+
chunk6DQCBVYA_cjs.flattenNodes(revealedNodes).map((node) => node.id)
|
|
3234
3234
|
)
|
|
3235
3235
|
);
|
|
3236
3236
|
enableSmartArtEditing(chrome, element, context);
|
|
@@ -3253,17 +3253,17 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3253
3253
|
function buildDrawingShapesSvg(doc, elementId, data, a11yNodes, revealedShapes) {
|
|
3254
3254
|
const allShapes = data.drawingShapes ?? [];
|
|
3255
3255
|
const style = data.style ?? "flat";
|
|
3256
|
-
const viewBox =
|
|
3257
|
-
const rendered =
|
|
3256
|
+
const viewBox = chunk6DQCBVYA_cjs.computeDrawingViewBox(allShapes);
|
|
3257
|
+
const rendered = chunk6DQCBVYA_cjs.projectDrawingShapes(
|
|
3258
3258
|
elementId,
|
|
3259
3259
|
revealedShapes,
|
|
3260
3260
|
viewBox,
|
|
3261
|
-
|
|
3261
|
+
chunk6DQCBVYA_cjs.resolvePalette(data),
|
|
3262
3262
|
style
|
|
3263
3263
|
);
|
|
3264
|
-
const shadow =
|
|
3264
|
+
const shadow = chunk6DQCBVYA_cjs.styleShadowFilter(style);
|
|
3265
3265
|
const labelsById = new Map(a11yNodes.map((node) => [node.id, node.label]));
|
|
3266
|
-
const nodeIds =
|
|
3266
|
+
const nodeIds = chunk6DQCBVYA_cjs.resolveRevealedDrawingShapeNodeIds(allShapes, revealedShapes, data.nodes);
|
|
3267
3267
|
const svg = createSvgEl(doc, "svg", {
|
|
3268
3268
|
viewBox: `0 0 ${viewBox.width} ${viewBox.height}`,
|
|
3269
3269
|
preserveAspectRatio: "xMidYMid meet"
|
|
@@ -3398,9 +3398,9 @@ function enableTableResize(container, table, element, context) {
|
|
|
3398
3398
|
for (const handle of [...colHandles, ...rowHandles]) {
|
|
3399
3399
|
handle.remove();
|
|
3400
3400
|
}
|
|
3401
|
-
const crossings =
|
|
3401
|
+
const crossings = chunk6DQCBVYA_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
3402
3402
|
const rowBounds = measureRowBoundaries(table);
|
|
3403
|
-
colHandles =
|
|
3403
|
+
colHandles = chunk6DQCBVYA_cjs.computeColumnBoundaries(tableData.columnWidths).map((leftPct, i) => {
|
|
3404
3404
|
const handle = createEl(doc, "div", "pptxv-table-resize-col", {
|
|
3405
3405
|
position: "absolute",
|
|
3406
3406
|
top: "0",
|
|
@@ -3410,7 +3410,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3410
3410
|
zIndex: "10",
|
|
3411
3411
|
pointerEvents: "none"
|
|
3412
3412
|
});
|
|
3413
|
-
const segments =
|
|
3413
|
+
const segments = chunk6DQCBVYA_cjs.columnHandleSegments(
|
|
3414
3414
|
crossings.columns[i] ?? [],
|
|
3415
3415
|
rowBounds,
|
|
3416
3416
|
table.offsetHeight
|
|
@@ -3440,7 +3440,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3440
3440
|
zIndex: "10",
|
|
3441
3441
|
pointerEvents: "none"
|
|
3442
3442
|
});
|
|
3443
|
-
const segments =
|
|
3443
|
+
const segments = chunk6DQCBVYA_cjs.rowHandleSegments(crossings.rows[i] ?? [], tableData.columnWidths);
|
|
3444
3444
|
for (const { leftPct, widthPct } of segments) {
|
|
3445
3445
|
handle.appendChild(
|
|
3446
3446
|
createEl(doc, "div", "pptxv-table-resize-segment", {
|
|
@@ -3484,14 +3484,14 @@ function enableTableResize(container, table, element, context) {
|
|
|
3484
3484
|
const deltaProp = (event.clientX - active.startPos) / (rect.width || 1);
|
|
3485
3485
|
context.onTableResizeColumns?.(
|
|
3486
3486
|
element,
|
|
3487
|
-
|
|
3487
|
+
chunk6DQCBVYA_cjs.computeResizedColumnWidths(active.initialWidths, active.index, deltaProp)
|
|
3488
3488
|
);
|
|
3489
3489
|
} else if (event.clientY !== active.startPos && active.type === "row") {
|
|
3490
3490
|
const deltaY = event.clientY - active.startPos;
|
|
3491
3491
|
context.onTableResizeRow?.(
|
|
3492
3492
|
element,
|
|
3493
3493
|
active.index,
|
|
3494
|
-
|
|
3494
|
+
chunk6DQCBVYA_cjs.computeResizedRowHeight(active.initialRowHeight ?? chunk6DQCBVYA_cjs.DEFAULT_ROW_HEIGHT, deltaY)
|
|
3495
3495
|
);
|
|
3496
3496
|
}
|
|
3497
3497
|
drawHandles();
|
|
@@ -3500,13 +3500,13 @@ function enableTableResize(container, table, element, context) {
|
|
|
3500
3500
|
const rect = container.getBoundingClientRect();
|
|
3501
3501
|
const localX = event.clientX - rect.left;
|
|
3502
3502
|
const localY = event.clientY - rect.top;
|
|
3503
|
-
const scaleY =
|
|
3504
|
-
const crossings =
|
|
3503
|
+
const scaleY = chunk6DQCBVYA_cjs.getTableResizeScale(rect.height, container.offsetHeight);
|
|
3504
|
+
const crossings = chunk6DQCBVYA_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
3505
3505
|
const rowBounds = measureRowBoundaries(table);
|
|
3506
|
-
const colBoundaries =
|
|
3506
|
+
const colBoundaries = chunk6DQCBVYA_cjs.computeColumnBoundaries(tableData.columnWidths);
|
|
3507
3507
|
for (let i = 0; i < colBoundaries.length; i++) {
|
|
3508
3508
|
const boundaryX = colBoundaries[i] / 100 * rect.width;
|
|
3509
|
-
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !
|
|
3509
|
+
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !chunk6DQCBVYA_cjs.isColumnBoundaryMergedAt(crossings, i, rowBounds, localY / scaleY)) {
|
|
3510
3510
|
event.preventDefault();
|
|
3511
3511
|
event.stopPropagation();
|
|
3512
3512
|
doc.body.style.cursor = "col-resize";
|
|
@@ -3524,7 +3524,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3524
3524
|
}
|
|
3525
3525
|
}
|
|
3526
3526
|
for (let i = 0; i < rowBounds.length; i++) {
|
|
3527
|
-
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !
|
|
3527
|
+
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !chunk6DQCBVYA_cjs.isRowBoundaryMergedAt(crossings, i, tableData.columnWidths, localX / (rect.width || 1))) {
|
|
3528
3528
|
event.preventDefault();
|
|
3529
3529
|
event.stopPropagation();
|
|
3530
3530
|
const tr = table.querySelectorAll("tbody > tr")[i];
|
|
@@ -3535,7 +3535,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3535
3535
|
index: i,
|
|
3536
3536
|
startPos: event.clientY,
|
|
3537
3537
|
handleEl: rowHandles[i] ?? container,
|
|
3538
|
-
initialRowHeight: tr?.offsetHeight ??
|
|
3538
|
+
initialRowHeight: tr?.offsetHeight ?? chunk6DQCBVYA_cjs.DEFAULT_ROW_HEIGHT
|
|
3539
3539
|
};
|
|
3540
3540
|
win.addEventListener("mousemove", onMouseMove);
|
|
3541
3541
|
win.addEventListener("mouseup", onMouseUp);
|
|
@@ -3556,7 +3556,7 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
3556
3556
|
}
|
|
3557
3557
|
const doc = context.document;
|
|
3558
3558
|
const container = createEl(doc, "div", "pptxv-element pptxv-table", {
|
|
3559
|
-
...
|
|
3559
|
+
...chunk6DQCBVYA_cjs.getContainerStyle(element, zIndex),
|
|
3560
3560
|
overflow: "hidden"
|
|
3561
3561
|
});
|
|
3562
3562
|
container.dataset.elementId = element.id;
|
|
@@ -3569,7 +3569,7 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
3569
3569
|
// font stack; all five bindings declare the same shared default here.
|
|
3570
3570
|
fontFamily: chunkG3UVZ5FO_cjs.DEFAULT_FONT_FAMILY,
|
|
3571
3571
|
// `a:tblPr@rtl`: mirrors the column order for right-to-left decks.
|
|
3572
|
-
...
|
|
3572
|
+
...chunk6DQCBVYA_cjs.tableContainerCss(tableData)
|
|
3573
3573
|
});
|
|
3574
3574
|
appendColgroup(doc, table, tableData.columnWidths);
|
|
3575
3575
|
const tbody = doc.createElement("tbody");
|
|
@@ -3631,13 +3631,13 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3631
3631
|
if (cell.rowSpan && cell.rowSpan > 1) {
|
|
3632
3632
|
td.rowSpan = cell.rowSpan;
|
|
3633
3633
|
}
|
|
3634
|
-
const style =
|
|
3634
|
+
const style = chunk6DQCBVYA_cjs.tableCellCss(
|
|
3635
3635
|
tableData,
|
|
3636
3636
|
cell,
|
|
3637
3637
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
3638
3638
|
styleContext
|
|
3639
3639
|
);
|
|
3640
|
-
const patternFill = cell.style ?
|
|
3640
|
+
const patternFill = cell.style ? chunk6DQCBVYA_cjs.cellPatternFillCss(cell.style) : null;
|
|
3641
3641
|
if (patternFill) {
|
|
3642
3642
|
delete style["backgroundColor"];
|
|
3643
3643
|
delete style["background"];
|
|
@@ -3650,7 +3650,7 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3650
3650
|
}
|
|
3651
3651
|
applyStyleMap(td, CELL_BASE_STYLE);
|
|
3652
3652
|
applyStyleMap(td, style);
|
|
3653
|
-
const diagonals =
|
|
3653
|
+
const diagonals = chunk6DQCBVYA_cjs.getCellDiagonalBorders(
|
|
3654
3654
|
cell.style,
|
|
3655
3655
|
tableData,
|
|
3656
3656
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3694,7 +3694,7 @@ function renderDiagonalOverlay(doc, diagonals) {
|
|
|
3694
3694
|
return svg;
|
|
3695
3695
|
}
|
|
3696
3696
|
function appendCellText(doc, td, cell, cellCss) {
|
|
3697
|
-
const blocks =
|
|
3697
|
+
const blocks = chunk6DQCBVYA_cjs.cellParagraphBlocks(cell);
|
|
3698
3698
|
if (blocks) {
|
|
3699
3699
|
for (const block of blocks) {
|
|
3700
3700
|
const div = createEl(doc, "div", "pptxv-table-para", { display: "block", ...block.css });
|
|
@@ -3729,7 +3729,7 @@ function appendRuns(doc, parent, runs, cellCss) {
|
|
|
3729
3729
|
}
|
|
3730
3730
|
const span = createEl(doc, "span", "pptxv-table-run", {
|
|
3731
3731
|
position: "relative",
|
|
3732
|
-
...
|
|
3732
|
+
...chunk6DQCBVYA_cjs.cellRunStyle(run, cellCss)
|
|
3733
3733
|
});
|
|
3734
3734
|
span.textContent = run.text;
|
|
3735
3735
|
parent.appendChild(span);
|
|
@@ -3743,8 +3743,8 @@ function registerTableChartRenderers(registry) {
|
|
|
3743
3743
|
}
|
|
3744
3744
|
|
|
3745
3745
|
// src/pptx/dom/glyph-outline-cache.ts
|
|
3746
|
-
var glyphOutlineFontCache = new
|
|
3747
|
-
var getGlyphOutline =
|
|
3746
|
+
var glyphOutlineFontCache = new chunk6DQCBVYA_cjs.GlyphOutlineFontCache();
|
|
3747
|
+
var getGlyphOutline = chunk6DQCBVYA_cjs.createGlyphOutlineLookup(glyphOutlineFontCache);
|
|
3748
3748
|
|
|
3749
3749
|
// src/pptx/dom/elements/text-warp.ts
|
|
3750
3750
|
function renderWarpedText(element, context) {
|
|
@@ -3756,12 +3756,12 @@ function renderWarpedText(element, context) {
|
|
|
3756
3756
|
if (!preset || preset === "textNoShape" || preset === "textPlain") {
|
|
3757
3757
|
return null;
|
|
3758
3758
|
}
|
|
3759
|
-
const paragraphs =
|
|
3759
|
+
const paragraphs = chunk6DQCBVYA_cjs.groupIntoParagraphs(element);
|
|
3760
3760
|
if (paragraphs.length === 0) {
|
|
3761
3761
|
return null;
|
|
3762
3762
|
}
|
|
3763
|
-
if (!
|
|
3764
|
-
const transform =
|
|
3763
|
+
if (!chunk6DQCBVYA_cjs.shouldUseSvgWarp(preset)) {
|
|
3764
|
+
const transform = chunk6DQCBVYA_cjs.getWarpCssTransform(preset, style?.textWarpAdj, style?.textWarpAdj2);
|
|
3765
3765
|
if (!transform) {
|
|
3766
3766
|
return null;
|
|
3767
3767
|
}
|
|
@@ -3783,14 +3783,14 @@ function renderWarpedText(element, context) {
|
|
|
3783
3783
|
if (style?.fontSize) {
|
|
3784
3784
|
text.style.fontSize = `${style.fontSize}px`;
|
|
3785
3785
|
}
|
|
3786
|
-
const fontWeight =
|
|
3786
|
+
const fontWeight = chunk6DQCBVYA_cjs.fontWeightAttribute(style?.fontFamily, style?.bold);
|
|
3787
3787
|
if (fontWeight) {
|
|
3788
3788
|
text.style.fontWeight = fontWeight;
|
|
3789
3789
|
}
|
|
3790
3790
|
text.textContent = paragraphs.map((p) => p.segments.map((s) => s.text).join("")).join("\n");
|
|
3791
3791
|
return text;
|
|
3792
3792
|
}
|
|
3793
|
-
if (
|
|
3793
|
+
if (chunk6DQCBVYA_cjs.hasGlyphEnvelope(preset)) {
|
|
3794
3794
|
return renderGlyphWarp(element, paragraphs, context);
|
|
3795
3795
|
}
|
|
3796
3796
|
return renderPathWarp(element, paragraphs, context);
|
|
@@ -3816,7 +3816,7 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3816
3816
|
});
|
|
3817
3817
|
svg.setAttribute("class", "pptxv-wordart");
|
|
3818
3818
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%;overflow:visible");
|
|
3819
|
-
const perLine =
|
|
3819
|
+
const perLine = chunk6DQCBVYA_cjs.buildGlyphEnvelopeBlock(
|
|
3820
3820
|
preset,
|
|
3821
3821
|
paragraphs.map(
|
|
3822
3822
|
(paragraph) => paragraph.segments.map((seg, i) => ({
|
|
@@ -3843,8 +3843,8 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3843
3843
|
fill,
|
|
3844
3844
|
"font-family": renderedFamily ? pptx.getSubstituteFontFamily(renderedFamily) : chunkG3UVZ5FO_cjs.DEFAULT_FONT_FAMILY,
|
|
3845
3845
|
"font-size": s.fontSize ?? style.fontSize ?? 18,
|
|
3846
|
-
"font-weight":
|
|
3847
|
-
"font-style":
|
|
3846
|
+
"font-weight": chunk6DQCBVYA_cjs.fontWeightAttribute(renderedFamily, s.bold ?? style.bold),
|
|
3847
|
+
"font-style": chunk6DQCBVYA_cjs.resolveFontItalic(renderedFamily, s.italic ?? style.italic) ? "italic" : void 0
|
|
3848
3848
|
};
|
|
3849
3849
|
if (g.outlinePath) {
|
|
3850
3850
|
const path = createSvgEl(context.document, "path", { d: g.outlinePath, fill });
|
|
@@ -3911,7 +3911,7 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3911
3911
|
defs.appendChild(
|
|
3912
3912
|
createSvgEl(context.document, "path", {
|
|
3913
3913
|
id,
|
|
3914
|
-
d:
|
|
3914
|
+
d: chunk6DQCBVYA_cjs.buildWarpPath(
|
|
3915
3915
|
preset,
|
|
3916
3916
|
element.width,
|
|
3917
3917
|
element.height,
|
|
@@ -3926,8 +3926,8 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3926
3926
|
fill: style.color ?? "#000000",
|
|
3927
3927
|
"font-family": style.fontFamily ? pptx.getSubstituteFontFamily(style.fontFamily) : chunkG3UVZ5FO_cjs.DEFAULT_FONT_FAMILY,
|
|
3928
3928
|
"font-size": style.fontSize ?? 18,
|
|
3929
|
-
"font-weight":
|
|
3930
|
-
"font-style":
|
|
3929
|
+
"font-weight": chunk6DQCBVYA_cjs.fontWeightAttribute(style.fontFamily, style.bold),
|
|
3930
|
+
"font-style": chunk6DQCBVYA_cjs.resolveFontItalic(style.fontFamily, style.italic) ? "italic" : void 0
|
|
3931
3931
|
});
|
|
3932
3932
|
const textPath = createSvgEl(context.document, "textPath", {
|
|
3933
3933
|
href: `#${id}`,
|
|
@@ -3944,9 +3944,9 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3944
3944
|
|
|
3945
3945
|
// src/pptx/dom/elements/text-shape.ts
|
|
3946
3946
|
var renderTextShapeElement = (element, zIndex, context) => {
|
|
3947
|
-
const container =
|
|
3947
|
+
const container = chunk6DQCBVYA_cjs.getContainerStyle(element, zIndex);
|
|
3948
3948
|
const animState = context.presentationStates?.get(element.id);
|
|
3949
|
-
const background =
|
|
3949
|
+
const background = chunk6DQCBVYA_cjs.getBackgroundAnimationState(element, context.presentationStates);
|
|
3950
3950
|
const visualState = background ?? animState;
|
|
3951
3951
|
const shape = getShapeFillStrokeStyle(
|
|
3952
3952
|
element,
|
|
@@ -3958,7 +3958,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3958
3958
|
if (transform !== void 0) {
|
|
3959
3959
|
merged["transform"] = transform;
|
|
3960
3960
|
}
|
|
3961
|
-
const layers =
|
|
3961
|
+
const layers = chunk6DQCBVYA_cjs.getBackgroundAnimationLayers(element, merged, background);
|
|
3962
3962
|
const el = createEl(context.document, "div", "pptxv-element pptxv-shape", layers.box);
|
|
3963
3963
|
el.dataset.elementId = element.id;
|
|
3964
3964
|
const paint = layers.paint ? createEl(context.document, "div", void 0, layers.paint) : el;
|
|
@@ -3968,7 +3968,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3968
3968
|
el.appendChild(paint);
|
|
3969
3969
|
}
|
|
3970
3970
|
if (context.interactive && !context.presenting) {
|
|
3971
|
-
const hitTargetStyle =
|
|
3971
|
+
const hitTargetStyle = chunk6DQCBVYA_cjs.elementHitTargetStyle(element);
|
|
3972
3972
|
if (hitTargetStyle) {
|
|
3973
3973
|
const hitTarget = createEl(context.document, "div", void 0, hitTargetStyle);
|
|
3974
3974
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
@@ -4011,8 +4011,8 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
4011
4011
|
} else if (warped) {
|
|
4012
4012
|
el.appendChild(warped);
|
|
4013
4013
|
} else {
|
|
4014
|
-
const linkedSegments =
|
|
4015
|
-
const paragraphs =
|
|
4014
|
+
const linkedSegments = chunk6DQCBVYA_cjs.getOverflowSegments(element, context.slide?.elements);
|
|
4015
|
+
const paragraphs = chunk6DQCBVYA_cjs.buildParagraphs(element, context.fieldContext, linkedSegments);
|
|
4016
4016
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
4017
4017
|
if (hasText) {
|
|
4018
4018
|
el.appendChild(
|
|
@@ -4023,7 +4023,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
4023
4023
|
);
|
|
4024
4024
|
} else {
|
|
4025
4025
|
const mode = context.interactive && !context.presenting ? "edit" : "present";
|
|
4026
|
-
const prompt =
|
|
4026
|
+
const prompt = chunk6DQCBVYA_cjs.placeholderPromptDescriptor(element, mode);
|
|
4027
4027
|
if (prompt) {
|
|
4028
4028
|
const hint = createEl(context.document, "div", "pptxv-placeholder-prompt", {
|
|
4029
4029
|
...getTextBlockStyle(element),
|
|
@@ -4190,15 +4190,15 @@ async function resolveImageUrls(handler, slides) {
|
|
|
4190
4190
|
|
|
4191
4191
|
Object.defineProperty(exports, "buildEmbeddedFontStyles", {
|
|
4192
4192
|
enumerable: true,
|
|
4193
|
-
get: function () { return
|
|
4193
|
+
get: function () { return chunk6DQCBVYA_cjs.buildEmbeddedFontStyles; }
|
|
4194
4194
|
});
|
|
4195
4195
|
Object.defineProperty(exports, "buildFieldSubstitutionContext", {
|
|
4196
4196
|
enumerable: true,
|
|
4197
|
-
get: function () { return
|
|
4197
|
+
get: function () { return chunk6DQCBVYA_cjs.buildFieldSubstitutionContext; }
|
|
4198
4198
|
});
|
|
4199
4199
|
Object.defineProperty(exports, "releasePptxRenderCaches", {
|
|
4200
4200
|
enumerable: true,
|
|
4201
|
-
get: function () { return
|
|
4201
|
+
get: function () { return chunk6DQCBVYA_cjs.releasePptxRenderCaches; }
|
|
4202
4202
|
});
|
|
4203
4203
|
Object.defineProperty(exports, "renderChartViewModelSvg", {
|
|
4204
4204
|
enumerable: true,
|