ooxml-ui 1.18.1 → 1.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pptx/{chunk-GTZI5TRN.mjs → chunk-AUCJIB3M.mjs} +115 -71
- package/dist/pptx/{chunk-2VEV6HFP.cjs → chunk-S2Y3VUNC.cjs} +115 -69
- package/dist/pptx/dom/elements/shape-filter-defs.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +215 -206
- package/dist/pptx/dom/index.mjs +13 -4
- package/dist/pptx/index.cjs +2870 -2862
- package/dist/pptx/index.mjs +1 -1
- package/dist/pptx/render/connector-markers.d.ts +3 -1
- package/dist/pptx/render/connector-markers.d.ts.map +1 -1
- package/dist/pptx/render/custom-path-markers.d.ts +11 -0
- package/dist/pptx/render/custom-path-markers.d.ts.map +1 -0
- package/dist/pptx/render/index.d.ts +1 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/shape-geometry-cascade.d.ts.map +1 -1
- package/dist/pptx/render/stroke-outline.d.ts +3 -0
- package/dist/pptx/render/stroke-outline.d.ts.map +1 -1
- package/dist/pptx/render/text-build-spans.d.ts +1 -0
- package/dist/pptx/render/text-build-spans.d.ts.map +1 -1
- package/package.json +11 -11
package/dist/pptx/dom/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkS2Y3VUNC_cjs = require('../chunk-S2Y3VUNC.cjs');
|
|
4
4
|
require('../chunk-WSTWYZFM.cjs');
|
|
5
5
|
var chunk2JEQHIAL_cjs = require('../chunk-2JEQHIAL.cjs');
|
|
6
6
|
require('../chunk-IOR4KOGN.cjs');
|
|
@@ -96,7 +96,7 @@ function buildActiveXControlsOverlay(doc, controls, canvasSize) {
|
|
|
96
96
|
zIndex: "40"
|
|
97
97
|
});
|
|
98
98
|
controls.forEach((control, index) => {
|
|
99
|
-
const view =
|
|
99
|
+
const view = chunkS2Y3VUNC_cjs.getActiveXControlOverlayView(control, canvasSize, index);
|
|
100
100
|
const style = {
|
|
101
101
|
position: "absolute",
|
|
102
102
|
left: `${view.left}px`,
|
|
@@ -132,7 +132,7 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
132
132
|
pointerEvents: "none",
|
|
133
133
|
zIndex: "45"
|
|
134
134
|
});
|
|
135
|
-
const markers =
|
|
135
|
+
const markers = chunkS2Y3VUNC_cjs.buildCommentMarkers(
|
|
136
136
|
comments,
|
|
137
137
|
canvasSize.width,
|
|
138
138
|
canvasSize.height,
|
|
@@ -141,10 +141,10 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
141
141
|
for (const marker of markers) {
|
|
142
142
|
const dot = createEl(doc, "button", "pptxv-comment-marker", {
|
|
143
143
|
position: "absolute",
|
|
144
|
-
left: `${marker.x -
|
|
145
|
-
top: `${marker.y -
|
|
146
|
-
width: `${
|
|
147
|
-
height: `${
|
|
144
|
+
left: `${marker.x - chunkS2Y3VUNC_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
145
|
+
top: `${marker.y - chunkS2Y3VUNC_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
146
|
+
width: `${chunkS2Y3VUNC_cjs.COMMENT_MARKER_SIZE}px`,
|
|
147
|
+
height: `${chunkS2Y3VUNC_cjs.COMMENT_MARKER_SIZE}px`,
|
|
148
148
|
display: "flex",
|
|
149
149
|
alignItems: "center",
|
|
150
150
|
justifyContent: "center",
|
|
@@ -211,7 +211,7 @@ function merge3dStyle(base, computed) {
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
214
|
-
const frame =
|
|
214
|
+
const frame = chunkS2Y3VUNC_cjs.getFrameEffectStyle(el);
|
|
215
215
|
if (frame) {
|
|
216
216
|
return { ...frame };
|
|
217
217
|
}
|
|
@@ -227,7 +227,7 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
227
227
|
style[key] = value;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
-
const stroke =
|
|
230
|
+
const stroke = chunkS2Y3VUNC_cjs.getComputedStrokeStyle(el);
|
|
231
231
|
if (stroke.borderWidth > 0) {
|
|
232
232
|
if (animatesStroke) {
|
|
233
233
|
style["borderWidth"] = stroke.cssBorderWidth;
|
|
@@ -246,7 +246,7 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
246
246
|
style["strokeMiterlimit"] = stroke.strokeMiterlimit;
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
const fx =
|
|
249
|
+
const fx = chunkS2Y3VUNC_cjs.getComputedEffectStyle(el);
|
|
250
250
|
if (fx.boxShadow) {
|
|
251
251
|
style["boxShadow"] = fx.boxShadow;
|
|
252
252
|
}
|
|
@@ -263,11 +263,11 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
263
263
|
if (fx.overflowVisible) {
|
|
264
264
|
style["overflow"] = "visible";
|
|
265
265
|
}
|
|
266
|
-
merge3dStyle(style,
|
|
267
|
-
if (
|
|
266
|
+
merge3dStyle(style, chunkS2Y3VUNC_cjs.getComputed3dStyle(el));
|
|
267
|
+
if (chunkS2Y3VUNC_cjs.isHollowShapeElement(el)) {
|
|
268
268
|
style["pointerEvents"] = "none";
|
|
269
269
|
}
|
|
270
|
-
const geometry =
|
|
270
|
+
const geometry = chunkS2Y3VUNC_cjs.resolveShapeGeometry(el);
|
|
271
271
|
switch (geometry.kind) {
|
|
272
272
|
case "bare":
|
|
273
273
|
style["backgroundColor"] = "transparent";
|
|
@@ -301,12 +301,12 @@ function getTextBlockStyle(el) {
|
|
|
301
301
|
if (!pptx.hasTextProperties(el)) {
|
|
302
302
|
return {};
|
|
303
303
|
}
|
|
304
|
-
const base =
|
|
304
|
+
const base = chunkS2Y3VUNC_cjs.buildTextBlockStyle(el, {
|
|
305
305
|
fallbackColor: chunkG3UVZ5FO_cjs.DEFAULT_TEXT_COLOR,
|
|
306
306
|
bodyLayout: true,
|
|
307
307
|
pxLengths: true
|
|
308
308
|
});
|
|
309
|
-
const scene3d =
|
|
309
|
+
const scene3d = chunkS2Y3VUNC_cjs.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height });
|
|
310
310
|
if (!scene3d) {
|
|
311
311
|
return base;
|
|
312
312
|
}
|
|
@@ -445,7 +445,7 @@ function renderSlideStage(options) {
|
|
|
445
445
|
"--pptxv-grid-size": `${options.gridSpacingPx ?? 10}px`,
|
|
446
446
|
// One device pixel in slide px: thin strokes stay visible on screen.
|
|
447
447
|
...chunkW7CBPO77_cjs.deviceStrokeStageStyle(scale),
|
|
448
|
-
...
|
|
448
|
+
...chunkS2Y3VUNC_cjs.getSlideBackgroundStyle(slide, { widthPx: canvasSize.width, heightPx: canvasSize.height })
|
|
449
449
|
});
|
|
450
450
|
if (interactive || options.reading) {
|
|
451
451
|
stage.setAttribute("role", "region");
|
|
@@ -488,20 +488,20 @@ function renderSlideStage(options) {
|
|
|
488
488
|
selectedElementIds: options.selectedElementIds,
|
|
489
489
|
registry,
|
|
490
490
|
renderElement(element, zIndex) {
|
|
491
|
-
if (!
|
|
491
|
+
if (!chunkS2Y3VUNC_cjs.isElementRendered(element)) {
|
|
492
492
|
return null;
|
|
493
493
|
}
|
|
494
494
|
const node = registry.resolve(element.type)(element, zIndex, context);
|
|
495
495
|
if (node) renderedNodes?.push(node);
|
|
496
496
|
if (node && interactive && "setAttribute" in node) {
|
|
497
|
-
const templateLocked =
|
|
497
|
+
const templateLocked = chunkS2Y3VUNC_cjs.isTemplateElementId(element.id) && !options.templateEditing;
|
|
498
498
|
if (templateLocked) {
|
|
499
499
|
node.style.pointerEvents = "none";
|
|
500
500
|
}
|
|
501
501
|
node.setAttribute("data-pptx-element", "true");
|
|
502
502
|
}
|
|
503
|
-
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" &&
|
|
504
|
-
const hitTargetStyle =
|
|
503
|
+
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" && chunkS2Y3VUNC_cjs.shouldRenderHitTarget(interactive, options.presenting ?? false)) {
|
|
504
|
+
const hitTargetStyle = chunkS2Y3VUNC_cjs.elementHitTargetStyle(element);
|
|
505
505
|
if (hitTargetStyle) {
|
|
506
506
|
const hitTarget = createEl(doc, "div", void 0, hitTargetStyle);
|
|
507
507
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
@@ -521,20 +521,20 @@ function renderSlideStage(options) {
|
|
|
521
521
|
}
|
|
522
522
|
});
|
|
523
523
|
if (interactive || options.reading) {
|
|
524
|
-
|
|
524
|
+
chunkS2Y3VUNC_cjs.applyRenderedElementAccessibility(stage, slide.elements, {
|
|
525
525
|
presenting: options.presenting ?? false
|
|
526
526
|
});
|
|
527
527
|
}
|
|
528
528
|
if (interactive) {
|
|
529
|
-
|
|
529
|
+
chunkS2Y3VUNC_cjs.applyElementActionAffordances(
|
|
530
530
|
stage,
|
|
531
531
|
slide.elements.filter(
|
|
532
|
-
(element) => options.templateEditing || !
|
|
532
|
+
(element) => options.templateEditing || !chunkS2Y3VUNC_cjs.isTemplateElementId(element.id)
|
|
533
533
|
),
|
|
534
534
|
{
|
|
535
535
|
canInteract: true,
|
|
536
536
|
presenting: options.presenting ?? false,
|
|
537
|
-
labels:
|
|
537
|
+
labels: chunkS2Y3VUNC_cjs.actionAffordanceLabels((key) => t(key))
|
|
538
538
|
}
|
|
539
539
|
);
|
|
540
540
|
}
|
|
@@ -601,7 +601,7 @@ function createChartTitleEditor(container, onCommit) {
|
|
|
601
601
|
// src/pptx/dom/elements/chart-editable.ts
|
|
602
602
|
var CHART_FORMAT_REQUEST_EVENT = "pptx-chart-format-request";
|
|
603
603
|
function attachChartEditing(container, element, context, repaint) {
|
|
604
|
-
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !
|
|
604
|
+
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !chunkS2Y3VUNC_cjs.canDrillDown(element)) {
|
|
605
605
|
return;
|
|
606
606
|
}
|
|
607
607
|
const chart = element;
|
|
@@ -641,7 +641,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
641
641
|
if (!rect) {
|
|
642
642
|
return;
|
|
643
643
|
}
|
|
644
|
-
const step2 =
|
|
644
|
+
const step2 = chunkS2Y3VUNC_cjs.advanceChartMarkDrag(activeMark, event.clientX, event.clientY, rect);
|
|
645
645
|
if (!step2) {
|
|
646
646
|
return;
|
|
647
647
|
}
|
|
@@ -700,7 +700,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
700
700
|
bubbles: true,
|
|
701
701
|
detail: {
|
|
702
702
|
elementId: element.id,
|
|
703
|
-
target:
|
|
703
|
+
target: chunkS2Y3VUNC_cjs.chartFormatTargetFromEvent(event, container, chart),
|
|
704
704
|
open
|
|
705
705
|
}
|
|
706
706
|
})
|
|
@@ -743,7 +743,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
743
743
|
seriesIndex: part.seriesIndex,
|
|
744
744
|
pointIndex: part.pointIndex
|
|
745
745
|
});
|
|
746
|
-
const startedMark =
|
|
746
|
+
const startedMark = chunkS2Y3VUNC_cjs.beginChartMarkDrag({
|
|
747
747
|
part,
|
|
748
748
|
geometry: markGeometry,
|
|
749
749
|
chartData: chart.chartData,
|
|
@@ -835,7 +835,7 @@ function mountThreeViewInto(doc, wrapper, options) {
|
|
|
835
835
|
return view;
|
|
836
836
|
}
|
|
837
837
|
function isChart3DEditable(element, context) {
|
|
838
|
-
return element.type === "chart" && Boolean(context.interactive) && Boolean(context.onChartPointChange) && Boolean(context.selectedElementIds?.has(element.id)) &&
|
|
838
|
+
return element.type === "chart" && Boolean(context.interactive) && Boolean(context.onChartPointChange) && Boolean(context.selectedElementIds?.has(element.id)) && chunkS2Y3VUNC_cjs.canDrillDown(element);
|
|
839
839
|
}
|
|
840
840
|
function selectedChartPartOf(element, context) {
|
|
841
841
|
return context.chartPartSelection?.elementId === element.id ? context.chartPartSelection.part : null;
|
|
@@ -877,13 +877,13 @@ function wireChartThreeViewEvents(view, element, context, badgeHost) {
|
|
|
877
877
|
const listeners = new AbortController();
|
|
878
878
|
chartViewListeners.set(view, listeners);
|
|
879
879
|
view.addEventListener(
|
|
880
|
-
|
|
881
|
-
(event) =>
|
|
880
|
+
chunkS2Y3VUNC_cjs.THREE_VIEW_EVENTS.select,
|
|
881
|
+
(event) => chunkS2Y3VUNC_cjs.applyChart3DSelect(bridge, event.detail.part),
|
|
882
882
|
{ signal: listeners.signal }
|
|
883
883
|
);
|
|
884
884
|
view.addEventListener(
|
|
885
|
-
|
|
886
|
-
(event) =>
|
|
885
|
+
chunkS2Y3VUNC_cjs.THREE_VIEW_EVENTS.drag,
|
|
886
|
+
(event) => chunkS2Y3VUNC_cjs.applyChart3DDrag(bridge, event.detail),
|
|
887
887
|
{ signal: listeners.signal }
|
|
888
888
|
);
|
|
889
889
|
}
|
|
@@ -897,7 +897,7 @@ function applyThreeViewTextStyle(el, style) {
|
|
|
897
897
|
// src/pptx/dom/elements/chart.ts
|
|
898
898
|
var renderChartElement = (element, zIndex, context) => {
|
|
899
899
|
const wrapper = renderChartSvgElement(element, zIndex, context);
|
|
900
|
-
const spec = wrapper ?
|
|
900
|
+
const spec = wrapper ? chunkS2Y3VUNC_cjs.resolveChartThreeViewSpec(element, rendering3DFlagsOf(context)) : null;
|
|
901
901
|
if (!wrapper || !spec) {
|
|
902
902
|
return wrapper;
|
|
903
903
|
}
|
|
@@ -920,11 +920,11 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
920
920
|
"div",
|
|
921
921
|
"pptxv-element pptxv-chart",
|
|
922
922
|
// The chart area's outer shadow and glow sit on the frame, outside the chart.
|
|
923
|
-
{ ...
|
|
923
|
+
{ ...chunkS2Y3VUNC_cjs.getContainerStyle(element, zIndex), ...chunkS2Y3VUNC_cjs.getFrameEffectStyle(element) }
|
|
924
924
|
);
|
|
925
925
|
container.dataset.elementId = element.id;
|
|
926
926
|
const animationState = context.presentationStates?.get(element.id);
|
|
927
|
-
const chartData = element.chartData ?
|
|
927
|
+
const chartData = element.chartData ? chunkS2Y3VUNC_cjs.resolveRevealedChartData(element.chartData, animationState) : element.chartData;
|
|
928
928
|
if (!chartData || chartData.series.length === 0) {
|
|
929
929
|
container.appendChild(renderChartPlaceholder(doc, chartData?.chartType ?? "bar", context.t));
|
|
930
930
|
return container;
|
|
@@ -971,7 +971,7 @@ function renderChartPlaceholder(doc, chartType, t) {
|
|
|
971
971
|
border: "1px dashed #cbd5e1",
|
|
972
972
|
boxSizing: "border-box"
|
|
973
973
|
});
|
|
974
|
-
placeholder.textContent =
|
|
974
|
+
placeholder.textContent = chunkS2Y3VUNC_cjs.chartPlaceholderLabel(chartType, (key, params) => t(key, params));
|
|
975
975
|
return placeholder;
|
|
976
976
|
}
|
|
977
977
|
|
|
@@ -1035,7 +1035,7 @@ function createRunBaseNode(doc, run) {
|
|
|
1035
1035
|
verticalAlign: "middle",
|
|
1036
1036
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
1037
1037
|
});
|
|
1038
|
-
math.innerHTML =
|
|
1038
|
+
math.innerHTML = chunkS2Y3VUNC_cjs.runEquationMathMl(run.equation);
|
|
1039
1039
|
host.appendChild(math);
|
|
1040
1040
|
if (run.equation.number) {
|
|
1041
1041
|
const number = createEl(doc, "span", "pptxv-equation-number", {
|
|
@@ -1047,7 +1047,7 @@ function createRunBaseNode(doc, run) {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
return host;
|
|
1049
1049
|
}
|
|
1050
|
-
if (run.hyperlink &&
|
|
1050
|
+
if (run.hyperlink && chunkS2Y3VUNC_cjs.isRunHyperlinkClickable(run.hyperlink)) {
|
|
1051
1051
|
const link = createEl(doc, "a", "pptxv-link", run.style);
|
|
1052
1052
|
link.setAttribute("data-pptx-hyperlink", run.hyperlink.url);
|
|
1053
1053
|
link.setAttribute("role", "link");
|
|
@@ -1152,7 +1152,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1152
1152
|
bullet.textContent = para.bulletMarker;
|
|
1153
1153
|
p.appendChild(bullet);
|
|
1154
1154
|
}
|
|
1155
|
-
const spec = build ?
|
|
1155
|
+
const spec = build ? chunkS2Y3VUNC_cjs.buildTextBuildSpec(
|
|
1156
1156
|
build.elementId,
|
|
1157
1157
|
paragraphs.indexOf(para),
|
|
1158
1158
|
para.runs.filter((run) => run.text !== NEWLINE_RUN).map((run) => ({ text: run.text, style: run.style })),
|
|
@@ -1161,7 +1161,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1161
1161
|
if (spec && spec.granularity !== "paragraph") {
|
|
1162
1162
|
for (const span of spec.spans ?? []) {
|
|
1163
1163
|
const node = createEl(doc, "span");
|
|
1164
|
-
applyStyleMap(node, { ...span.style ?? {}, ...
|
|
1164
|
+
applyStyleMap(node, { ...span.style ?? {}, ...chunkS2Y3VUNC_cjs.textBuildSpanStyle(span) });
|
|
1165
1165
|
if (span.animId) {
|
|
1166
1166
|
node.setAttribute("data-anim-id", span.animId);
|
|
1167
1167
|
}
|
|
@@ -1174,7 +1174,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1174
1174
|
let runHost = p;
|
|
1175
1175
|
if (spec) {
|
|
1176
1176
|
const wrapper = createEl(doc, "span");
|
|
1177
|
-
applyStyleMap(wrapper,
|
|
1177
|
+
applyStyleMap(wrapper, chunkS2Y3VUNC_cjs.textBuildSpanStyle(spec));
|
|
1178
1178
|
if (spec.animId) {
|
|
1179
1179
|
wrapper.setAttribute("data-anim-id", spec.animId);
|
|
1180
1180
|
}
|
|
@@ -1230,7 +1230,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1230
1230
|
if (element.hidden) {
|
|
1231
1231
|
wrapper.style.display = "none";
|
|
1232
1232
|
}
|
|
1233
|
-
const lineGlow =
|
|
1233
|
+
const lineGlow = chunkS2Y3VUNC_cjs.getLineGlowFilterCss(ss);
|
|
1234
1234
|
if (lineGlow) {
|
|
1235
1235
|
wrapper.style.filter = lineGlow;
|
|
1236
1236
|
}
|
|
@@ -1238,7 +1238,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1238
1238
|
svg.setAttribute("style", "overflow:visible;display:block");
|
|
1239
1239
|
const seed = element.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
1240
1240
|
const defs = createSvgEl(doc, "defs");
|
|
1241
|
-
const lineShadow =
|
|
1241
|
+
const lineShadow = chunkS2Y3VUNC_cjs.getLineShadowParams(ss);
|
|
1242
1242
|
const shadowId = lineShadow ? `${seed}-line-shadow` : void 0;
|
|
1243
1243
|
if (lineShadow && shadowId) {
|
|
1244
1244
|
const filter = createSvgEl(doc, "filter", {
|
|
@@ -1259,8 +1259,8 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1259
1259
|
);
|
|
1260
1260
|
defs.appendChild(filter);
|
|
1261
1261
|
}
|
|
1262
|
-
const startArrow =
|
|
1263
|
-
const endArrow =
|
|
1262
|
+
const startArrow = chunkS2Y3VUNC_cjs.normalizeArrow(ss?.connectorStartArrow);
|
|
1263
|
+
const endArrow = chunkS2Y3VUNC_cjs.normalizeArrow(ss?.connectorEndArrow);
|
|
1264
1264
|
const startMarkerId = startArrow ? `${seed}-start` : void 0;
|
|
1265
1265
|
const endMarkerId = endArrow ? `${seed}-end` : void 0;
|
|
1266
1266
|
if (startArrow && startMarkerId) {
|
|
@@ -1283,10 +1283,10 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1283
1283
|
svg.appendChild(defs);
|
|
1284
1284
|
}
|
|
1285
1285
|
const compound = ss?.compoundLine;
|
|
1286
|
-
const offsets =
|
|
1287
|
-
const widths =
|
|
1286
|
+
const offsets = chunkS2Y3VUNC_cjs.getCompoundLineOffsets(compound, strokeWidth);
|
|
1287
|
+
const widths = chunkS2Y3VUNC_cjs.getCompoundLineWidths(compound, strokeWidth);
|
|
1288
1288
|
const shapeType = pptx.hasShapeProperties(element) ? element.shapeType : void 0;
|
|
1289
|
-
const usePath =
|
|
1289
|
+
const usePath = chunkS2Y3VUNC_cjs.connectorNeedsPath(shapeType) && pptx.hasShapeProperties(element);
|
|
1290
1290
|
const pathData = usePath ? pptx.getConnectorPathGeometry(element).pathData : void 0;
|
|
1291
1291
|
const x1 = element.flipHorizontal ? w : 0;
|
|
1292
1292
|
const y1 = element.flipVertical ? h : 0;
|
|
@@ -1297,7 +1297,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1297
1297
|
d: pathData ?? `M${x1},${y1} L${x2},${y2}`,
|
|
1298
1298
|
fill: "none",
|
|
1299
1299
|
stroke: "transparent",
|
|
1300
|
-
"stroke-width":
|
|
1300
|
+
"stroke-width": chunkS2Y3VUNC_cjs.connectorHitStrokeWidth(strokeWidth),
|
|
1301
1301
|
"stroke-linecap": "round",
|
|
1302
1302
|
"stroke-linejoin": "round"
|
|
1303
1303
|
});
|
|
@@ -1347,7 +1347,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1347
1347
|
if (!pptx.hasTextProperties(element)) {
|
|
1348
1348
|
return;
|
|
1349
1349
|
}
|
|
1350
|
-
const paragraphs =
|
|
1350
|
+
const paragraphs = chunkS2Y3VUNC_cjs.buildParagraphs(element, context.fieldContext);
|
|
1351
1351
|
if (!paragraphs.some((paragraph) => paragraph.runs.length > 0)) {
|
|
1352
1352
|
return;
|
|
1353
1353
|
}
|
|
@@ -1367,16 +1367,17 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1367
1367
|
}
|
|
1368
1368
|
function buildMarker(context, id, arrow, strokeColor, size) {
|
|
1369
1369
|
const doc = context.document;
|
|
1370
|
-
const shape =
|
|
1370
|
+
const shape = chunkS2Y3VUNC_cjs.markerPath(arrow, size.width, size.length);
|
|
1371
1371
|
const marker = createSvgEl(doc, "marker", {
|
|
1372
1372
|
id,
|
|
1373
1373
|
viewBox: "0 0 10 10",
|
|
1374
|
-
refX:
|
|
1374
|
+
refX: shape.refX,
|
|
1375
1375
|
refY: 5,
|
|
1376
1376
|
markerWidth: shape.markerWidth,
|
|
1377
1377
|
markerHeight: shape.markerHeight,
|
|
1378
1378
|
orient: "auto-start-reverse",
|
|
1379
|
-
markerUnits: "strokeWidth"
|
|
1379
|
+
markerUnits: "strokeWidth",
|
|
1380
|
+
preserveAspectRatio: "none"
|
|
1380
1381
|
});
|
|
1381
1382
|
if (shape.shape === "circle") {
|
|
1382
1383
|
marker.appendChild(createSvgEl(doc, "circle", { cx: 5, cy: 5, r: 4, fill: strokeColor }));
|
|
@@ -1451,7 +1452,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1451
1452
|
doc,
|
|
1452
1453
|
"div",
|
|
1453
1454
|
"pptxv-element pptxv-contentpart",
|
|
1454
|
-
|
|
1455
|
+
chunkS2Y3VUNC_cjs.getContainerStyle(element, zIndex)
|
|
1455
1456
|
);
|
|
1456
1457
|
el.dataset.elementId = element.id;
|
|
1457
1458
|
const strokes = element.inkStrokes;
|
|
@@ -1484,7 +1485,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1484
1485
|
return el;
|
|
1485
1486
|
};
|
|
1486
1487
|
function renderEquations(element, context) {
|
|
1487
|
-
if (!pptx.hasTextProperties(element) || !
|
|
1488
|
+
if (!pptx.hasTextProperties(element) || !chunkS2Y3VUNC_cjs.isEquationOnlyText(element.textSegments)) {
|
|
1488
1489
|
return null;
|
|
1489
1490
|
}
|
|
1490
1491
|
const equations = (element.textSegments ?? []).filter((segment) => segment.equationXml);
|
|
@@ -1498,7 +1499,7 @@ function renderEquations(element, context) {
|
|
|
1498
1499
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
1499
1500
|
});
|
|
1500
1501
|
for (const segment of equations) {
|
|
1501
|
-
const mathml =
|
|
1502
|
+
const mathml = chunkS2Y3VUNC_cjs.convertOmmlToMathMl(segment.equationXml);
|
|
1502
1503
|
if (!mathml) {
|
|
1503
1504
|
continue;
|
|
1504
1505
|
}
|
|
@@ -1512,7 +1513,7 @@ function renderEquations(element, context) {
|
|
|
1512
1513
|
flex: 1,
|
|
1513
1514
|
textAlign: "center"
|
|
1514
1515
|
});
|
|
1515
|
-
math.innerHTML =
|
|
1516
|
+
math.innerHTML = chunkS2Y3VUNC_cjs.sanitizeMathMl(mathml);
|
|
1516
1517
|
row.appendChild(math);
|
|
1517
1518
|
if (segment.equationNumber) {
|
|
1518
1519
|
const number = createEl(context.document, "span", "pptxv-equation-number", {
|
|
@@ -1530,7 +1531,7 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1530
1531
|
return null;
|
|
1531
1532
|
}
|
|
1532
1533
|
const fill = chunkG3UVZ5FO_cjs.getComputedFillStyle(element)?.backgroundColor;
|
|
1533
|
-
const data =
|
|
1534
|
+
const data = chunkS2Y3VUNC_cjs.build3DExtrusionData(
|
|
1534
1535
|
element.shapeStyle?.shape3d,
|
|
1535
1536
|
element.shapeStyle?.scene3d,
|
|
1536
1537
|
fill,
|
|
@@ -1592,7 +1593,7 @@ function appendOwnReflection(doc, host, element, mediaDataUrls, suppressOwnRefle
|
|
|
1592
1593
|
if (suppressOwnReflection) {
|
|
1593
1594
|
return;
|
|
1594
1595
|
}
|
|
1595
|
-
const wrapperStyle =
|
|
1596
|
+
const wrapperStyle = chunkS2Y3VUNC_cjs.getComputedEffectStyle(element).reflection;
|
|
1596
1597
|
if (!wrapperStyle) {
|
|
1597
1598
|
return;
|
|
1598
1599
|
}
|
|
@@ -1616,9 +1617,9 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1616
1617
|
if (groupFilterDefs) {
|
|
1617
1618
|
wrap.appendChild(groupFilterDefs);
|
|
1618
1619
|
}
|
|
1619
|
-
const childParentFill =
|
|
1620
|
+
const childParentFill = chunkS2Y3VUNC_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1620
1621
|
for (const child of element.children ?? []) {
|
|
1621
|
-
const childWrap = createEl(doc, "div", void 0,
|
|
1622
|
+
const childWrap = createEl(doc, "div", void 0, chunkS2Y3VUNC_cjs.getContainerStyle(child, 0));
|
|
1622
1623
|
childWrap.appendChild(
|
|
1623
1624
|
buildReflectionMirrorContent(doc, child, mediaDataUrls, childParentFill)
|
|
1624
1625
|
);
|
|
@@ -1632,7 +1633,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1632
1633
|
height: "100%",
|
|
1633
1634
|
...getShapeFillStrokeStyle(element)
|
|
1634
1635
|
});
|
|
1635
|
-
const inheritedFill =
|
|
1636
|
+
const inheritedFill = chunkS2Y3VUNC_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1636
1637
|
if (inheritedFill) {
|
|
1637
1638
|
applyInheritedFill(box, inheritedFill);
|
|
1638
1639
|
}
|
|
@@ -1653,12 +1654,12 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1653
1654
|
box.appendChild(gradientOutline);
|
|
1654
1655
|
}
|
|
1655
1656
|
if (pptx.isImageLikeElement(element)) {
|
|
1656
|
-
const src =
|
|
1657
|
+
const src = chunkS2Y3VUNC_cjs.getImageSrc(element, new Map(mediaDataUrls));
|
|
1657
1658
|
if (src) {
|
|
1658
1659
|
const img = createEl(doc, "img", void 0, {
|
|
1659
1660
|
width: "100%",
|
|
1660
1661
|
height: "100%",
|
|
1661
|
-
...
|
|
1662
|
+
...chunkS2Y3VUNC_cjs.getImageFitStyle(element)
|
|
1662
1663
|
});
|
|
1663
1664
|
img.setAttribute("src", src);
|
|
1664
1665
|
img.setAttribute("alt", "");
|
|
@@ -1668,7 +1669,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1668
1669
|
appendOwnReflection(doc, box, element, mediaDataUrls, suppressOwnReflection);
|
|
1669
1670
|
return box;
|
|
1670
1671
|
}
|
|
1671
|
-
const paragraphs =
|
|
1672
|
+
const paragraphs = chunkS2Y3VUNC_cjs.buildParagraphs(element);
|
|
1672
1673
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
1673
1674
|
if (hasText) {
|
|
1674
1675
|
box.appendChild(renderTextBlock(doc, paragraphs, getTextBlockStyle(element)));
|
|
@@ -1680,20 +1681,20 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1680
1681
|
// src/pptx/dom/elements/shape-filter-defs.ts
|
|
1681
1682
|
var OUTLINE_SVG_STYLE = "position:absolute;inset:0;width:100%;height:100%;min-width:1px;min-height:1px;overflow:visible;pointer-events:none";
|
|
1682
1683
|
function renderShapeFilterDefs(doc, element) {
|
|
1683
|
-
const style =
|
|
1684
|
+
const style = chunkS2Y3VUNC_cjs.getEffectStyleSource(element);
|
|
1684
1685
|
if (!style) {
|
|
1685
1686
|
return null;
|
|
1686
1687
|
}
|
|
1687
1688
|
const markups = [];
|
|
1688
|
-
const duotone =
|
|
1689
|
+
const duotone = chunkS2Y3VUNC_cjs.getDuotoneSvgFilter(style, element.id);
|
|
1689
1690
|
if (duotone) {
|
|
1690
1691
|
markups.push(duotone.filterMarkup);
|
|
1691
1692
|
}
|
|
1692
|
-
const softEdge =
|
|
1693
|
+
const softEdge = chunkS2Y3VUNC_cjs.getSoftEdgeSvgFilter(style, element.id);
|
|
1693
1694
|
if (softEdge) {
|
|
1694
1695
|
markups.push(softEdge.filterMarkup);
|
|
1695
1696
|
}
|
|
1696
|
-
const bevelLighting =
|
|
1697
|
+
const bevelLighting = chunkS2Y3VUNC_cjs.getBevelLightingSvgFilter(element);
|
|
1697
1698
|
if (bevelLighting) {
|
|
1698
1699
|
markups.push(bevelLighting.filterMarkup);
|
|
1699
1700
|
}
|
|
@@ -1711,7 +1712,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1711
1712
|
if (!pptx.hasShapeProperties(element)) {
|
|
1712
1713
|
return null;
|
|
1713
1714
|
}
|
|
1714
|
-
const overlay =
|
|
1715
|
+
const overlay = chunkS2Y3VUNC_cjs.getComputedEffectStyle(element).fillOverlay;
|
|
1715
1716
|
if (!overlay) {
|
|
1716
1717
|
return null;
|
|
1717
1718
|
}
|
|
@@ -1726,7 +1727,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1726
1727
|
return layer;
|
|
1727
1728
|
}
|
|
1728
1729
|
function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
1729
|
-
const wrapperStyle =
|
|
1730
|
+
const wrapperStyle = chunkS2Y3VUNC_cjs.getComputedEffectStyle(element).reflection;
|
|
1730
1731
|
if (!wrapperStyle) {
|
|
1731
1732
|
return null;
|
|
1732
1733
|
}
|
|
@@ -1736,13 +1737,13 @@ function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
|
1736
1737
|
return layer;
|
|
1737
1738
|
}
|
|
1738
1739
|
function renderHollowHitOutline(doc, element) {
|
|
1739
|
-
const hit =
|
|
1740
|
+
const hit = chunkS2Y3VUNC_cjs.buildHollowHitOutline(element);
|
|
1740
1741
|
if (!hit) {
|
|
1741
1742
|
return null;
|
|
1742
1743
|
}
|
|
1743
1744
|
const svg = createSvgEl(doc, "svg", {
|
|
1744
1745
|
"aria-hidden": "true",
|
|
1745
|
-
viewBox:
|
|
1746
|
+
viewBox: chunkS2Y3VUNC_cjs.strokeOutlineViewBox(element),
|
|
1746
1747
|
preserveAspectRatio: "none"
|
|
1747
1748
|
});
|
|
1748
1749
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
@@ -1775,20 +1776,20 @@ function renderShapeSubpathFillOverlay(doc, element) {
|
|
|
1775
1776
|
return svg;
|
|
1776
1777
|
}
|
|
1777
1778
|
function renderStrokeOutline(doc, element) {
|
|
1778
|
-
const outline =
|
|
1779
|
+
const outline = chunkS2Y3VUNC_cjs.buildStrokeOutline(element);
|
|
1779
1780
|
if (!outline) {
|
|
1780
1781
|
return null;
|
|
1781
1782
|
}
|
|
1782
1783
|
const svg = createSvgEl(doc, "svg", {
|
|
1783
1784
|
class: "pptx-vanilla-gradient-outline",
|
|
1784
1785
|
"aria-hidden": "true",
|
|
1785
|
-
viewBox:
|
|
1786
|
+
viewBox: chunkS2Y3VUNC_cjs.strokeOutlineViewBox(element),
|
|
1786
1787
|
preserveAspectRatio: "none"
|
|
1787
1788
|
});
|
|
1788
1789
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
1789
1790
|
if (outline.paint) {
|
|
1790
1791
|
const defs = createSvgEl(doc, "defs");
|
|
1791
|
-
if (
|
|
1792
|
+
if (chunkS2Y3VUNC_cjs.isPatternPaint(outline.paint)) {
|
|
1792
1793
|
const pattern = createSvgEl(doc, "pattern", {
|
|
1793
1794
|
id: outline.paint.id,
|
|
1794
1795
|
width: outline.paint.width,
|
|
@@ -1803,7 +1804,7 @@ function renderStrokeOutline(doc, element) {
|
|
|
1803
1804
|
pattern.appendChild(image);
|
|
1804
1805
|
defs.appendChild(pattern);
|
|
1805
1806
|
} else {
|
|
1806
|
-
defs.innerHTML =
|
|
1807
|
+
defs.innerHTML = chunkS2Y3VUNC_cjs.svgGradientMarkup(outline.paint);
|
|
1807
1808
|
}
|
|
1808
1809
|
svg.appendChild(defs);
|
|
1809
1810
|
}
|
|
@@ -1825,6 +1826,14 @@ function renderStrokeOutline(doc, element) {
|
|
|
1825
1826
|
}
|
|
1826
1827
|
svg.appendChild(path);
|
|
1827
1828
|
}
|
|
1829
|
+
if (outline.markers) {
|
|
1830
|
+
const defs = createSvgEl(doc, "defs");
|
|
1831
|
+
defs.innerHTML = outline.markers.markup;
|
|
1832
|
+
svg.prepend(defs);
|
|
1833
|
+
const path = svg.querySelector(":scope > path");
|
|
1834
|
+
if (path && outline.markers.start) path.setAttribute("marker-start", outline.markers.start);
|
|
1835
|
+
if (path && outline.markers.end) path.setAttribute("marker-end", outline.markers.end);
|
|
1836
|
+
}
|
|
1828
1837
|
return svg;
|
|
1829
1838
|
}
|
|
1830
1839
|
|
|
@@ -1854,14 +1863,14 @@ function indexRenderedNodes(root) {
|
|
|
1854
1863
|
return byId;
|
|
1855
1864
|
}
|
|
1856
1865
|
function paintInheritedFill(node, element, parentGroupFill) {
|
|
1857
|
-
const inherited =
|
|
1866
|
+
const inherited = chunkS2Y3VUNC_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1858
1867
|
if (inherited) {
|
|
1859
1868
|
applyGroupChildFill(node, inherited);
|
|
1860
1869
|
}
|
|
1861
1870
|
if (element.type !== "group") {
|
|
1862
1871
|
return;
|
|
1863
1872
|
}
|
|
1864
|
-
const childFill =
|
|
1873
|
+
const childFill = chunkS2Y3VUNC_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1865
1874
|
if (!childFill) {
|
|
1866
1875
|
return;
|
|
1867
1876
|
}
|
|
@@ -1875,7 +1884,7 @@ function paintInheritedFill(node, element, parentGroupFill) {
|
|
|
1875
1884
|
}
|
|
1876
1885
|
var renderGroupElement = (element, zIndex, context) => {
|
|
1877
1886
|
const el = createEl(context.document, "div", "pptxv-element pptxv-group", {
|
|
1878
|
-
...
|
|
1887
|
+
...chunkS2Y3VUNC_cjs.getContainerStyle(element, zIndex),
|
|
1879
1888
|
// A group paints no fill/outline of its own, but `p:grpSpPr/a:effectLst`
|
|
1880
1889
|
// DOES carry a shadow/glow/soft-edge for the group's own composite
|
|
1881
1890
|
// raster (see shared `getComputedEffectStyle`), expressed as `filter` /
|
|
@@ -1892,7 +1901,7 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1892
1901
|
el.appendChild(reflection);
|
|
1893
1902
|
}
|
|
1894
1903
|
if (element.type === "group" && element.children?.length) {
|
|
1895
|
-
const parentGroupFill =
|
|
1904
|
+
const parentGroupFill = chunkS2Y3VUNC_cjs.getGroupChildParentFill(element);
|
|
1896
1905
|
element.children.forEach((child, index) => {
|
|
1897
1906
|
const childEl = context.renderElement(child, index);
|
|
1898
1907
|
if (childEl) {
|
|
@@ -1907,16 +1916,16 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1907
1916
|
// src/pptx/dom/elements/image.ts
|
|
1908
1917
|
var renderImageElement = (element, zIndex, context) => {
|
|
1909
1918
|
const doc = context.document;
|
|
1910
|
-
const geometry = element.type === "image" || element.type === "picture" ?
|
|
1919
|
+
const geometry = element.type === "image" || element.type === "picture" ? chunkS2Y3VUNC_cjs.resolveShapeGeometry(element) : void 0;
|
|
1911
1920
|
const geometryClipPath = geometry?.kind === "clipPath" ? geometry.clipPath : void 0;
|
|
1912
|
-
const cropShapeClipPath = element.type === "image" || element.type === "picture" ?
|
|
1913
|
-
const layers =
|
|
1914
|
-
overflow:
|
|
1921
|
+
const cropShapeClipPath = element.type === "image" || element.type === "picture" ? chunkS2Y3VUNC_cjs.getCropShapeClipPath(element.cropShape, element.width, element.height) : void 0;
|
|
1922
|
+
const layers = chunkS2Y3VUNC_cjs.getPictureFrameLayers(element, {
|
|
1923
|
+
overflow: chunkS2Y3VUNC_cjs.getImageOverflow(element),
|
|
1915
1924
|
borderRadius: geometry?.kind === "borderRadius" ? geometry.radius : void 0,
|
|
1916
1925
|
clipPath: geometryClipPath ?? cropShapeClipPath
|
|
1917
1926
|
});
|
|
1918
1927
|
const el = createEl(doc, "div", "pptxv-element pptxv-image", {
|
|
1919
|
-
...
|
|
1928
|
+
...chunkS2Y3VUNC_cjs.getContainerStyle(element, zIndex),
|
|
1920
1929
|
...layers.box
|
|
1921
1930
|
});
|
|
1922
1931
|
el.dataset.elementId = element.id;
|
|
@@ -1928,11 +1937,11 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1928
1937
|
el.appendChild(outline);
|
|
1929
1938
|
}
|
|
1930
1939
|
}
|
|
1931
|
-
const src =
|
|
1940
|
+
const src = chunkS2Y3VUNC_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
1932
1941
|
if (!src) {
|
|
1933
1942
|
return el;
|
|
1934
1943
|
}
|
|
1935
|
-
const fx =
|
|
1944
|
+
const fx = chunkS2Y3VUNC_cjs.getComputedImageStyle(element);
|
|
1936
1945
|
for (const f of fx.svgFilters) {
|
|
1937
1946
|
const svg = createSvgEl(doc, "svg", { width: 0, height: 0, "aria-hidden": "true" });
|
|
1938
1947
|
svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden");
|
|
@@ -1945,7 +1954,7 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1945
1954
|
surface.appendChild(svg);
|
|
1946
1955
|
}
|
|
1947
1956
|
const reflection = renderReflectionOverlay(doc, element, context.mediaDataUrls);
|
|
1948
|
-
const tiling =
|
|
1957
|
+
const tiling = chunkS2Y3VUNC_cjs.getImageTilingStyle(element, chunkS2Y3VUNC_cjs.getCachedNativeImageSize(src));
|
|
1949
1958
|
if (tiling) {
|
|
1950
1959
|
const tile = createEl(doc, "div", "pptxv-image-tile", tiling);
|
|
1951
1960
|
if (fx.filter) {
|
|
@@ -1954,10 +1963,10 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1954
1963
|
if (fx.opacity !== void 0) {
|
|
1955
1964
|
tile.style.opacity = String(fx.opacity);
|
|
1956
1965
|
}
|
|
1957
|
-
if (!
|
|
1958
|
-
void
|
|
1966
|
+
if (!chunkS2Y3VUNC_cjs.getCachedNativeImageSize(src)) {
|
|
1967
|
+
void chunkS2Y3VUNC_cjs.probeNativeImageSize(src).then((size) => {
|
|
1959
1968
|
if (size) {
|
|
1960
|
-
applyStyleMap(tile,
|
|
1969
|
+
applyStyleMap(tile, chunkS2Y3VUNC_cjs.getImageTilingStyle(element, size) ?? {});
|
|
1961
1970
|
}
|
|
1962
1971
|
return void 0;
|
|
1963
1972
|
});
|
|
@@ -1968,8 +1977,8 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1968
1977
|
}
|
|
1969
1978
|
return el;
|
|
1970
1979
|
}
|
|
1971
|
-
const fit =
|
|
1972
|
-
const fillCounterTransform =
|
|
1980
|
+
const fit = chunkS2Y3VUNC_cjs.getImageFitStyle(element);
|
|
1981
|
+
const fillCounterTransform = chunkS2Y3VUNC_cjs.getImageFillCounterTransform(element, Boolean(fit.transform));
|
|
1973
1982
|
const img = createEl(doc, "img", void 0, {
|
|
1974
1983
|
...fit,
|
|
1975
1984
|
display: "block",
|
|
@@ -1988,14 +1997,14 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1988
1997
|
if (element.type === "image" || element.type === "picture") {
|
|
1989
1998
|
const clrChange = element.imageEffects?.clrChange;
|
|
1990
1999
|
if (clrChange) {
|
|
1991
|
-
void
|
|
2000
|
+
void chunkS2Y3VUNC_cjs.resolveColorChangedImageSource(src, clrChange).then((resolved) => {
|
|
1992
2001
|
if (img.src === src || img.getAttribute("src") === src) {
|
|
1993
2002
|
img.src = resolved;
|
|
1994
2003
|
}
|
|
1995
2004
|
return void 0;
|
|
1996
2005
|
});
|
|
1997
2006
|
}
|
|
1998
|
-
const wash =
|
|
2007
|
+
const wash = chunkS2Y3VUNC_cjs.getImageColorWashStyle(element.imageEffects?.colorWash);
|
|
1999
2008
|
if (wash) {
|
|
2000
2009
|
surface.appendChild(
|
|
2001
2010
|
createEl(doc, "div", "pptxv-image-color-wash", {
|
|
@@ -2024,7 +2033,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
2024
2033
|
doc,
|
|
2025
2034
|
"div",
|
|
2026
2035
|
"pptxv-element pptxv-ink",
|
|
2027
|
-
|
|
2036
|
+
chunkS2Y3VUNC_cjs.getContainerStyle(element, zIndex)
|
|
2028
2037
|
);
|
|
2029
2038
|
wrapper.dataset.elementId = element.id;
|
|
2030
2039
|
const paths = element.inkPaths;
|
|
@@ -2045,7 +2054,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
2045
2054
|
keyframes.textContent = chunkNTXHQHCS_cjs.INK_REPLAY_KEYFRAMES;
|
|
2046
2055
|
svg.appendChild(keyframes);
|
|
2047
2056
|
}
|
|
2048
|
-
const views =
|
|
2057
|
+
const views = chunkS2Y3VUNC_cjs.buildInkGroupStrokes(element, { color: chunkG3UVZ5FO_cjs.DEFAULT_STROKE_COLOR, width: 1 });
|
|
2049
2058
|
for (const [i, view] of views.entries()) {
|
|
2050
2059
|
svg.appendChild(buildStrokeSvg(doc, view, replayStyles[i]));
|
|
2051
2060
|
}
|
|
@@ -2099,12 +2108,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2099
2108
|
let stopButton = null;
|
|
2100
2109
|
const update = (playing) => {
|
|
2101
2110
|
const input = { fullScreen: element.fullScreen, presenting: context.presenting, playing };
|
|
2102
|
-
const active =
|
|
2111
|
+
const active = chunkS2Y3VUNC_cjs.isMediaFullscreenActive(input);
|
|
2103
2112
|
applyStyleMap(
|
|
2104
2113
|
container,
|
|
2105
|
-
active ?
|
|
2114
|
+
active ? chunkS2Y3VUNC_cjs.MEDIA_FULLSCREEN_OVERLAY_STYLE : mediaFullscreenResetStyle(baseStyle)
|
|
2106
2115
|
);
|
|
2107
|
-
if (
|
|
2116
|
+
if (chunkS2Y3VUNC_cjs.shouldShowMediaFullscreenStopButton(input)) {
|
|
2108
2117
|
if (!stopButton) {
|
|
2109
2118
|
stopButton = buildFullscreenStopButton(
|
|
2110
2119
|
doc,
|
|
@@ -2129,12 +2138,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2129
2138
|
|
|
2130
2139
|
// src/pptx/dom/elements/media.ts
|
|
2131
2140
|
function applyMediaPresentingState(el, presenting, playback) {
|
|
2132
|
-
|
|
2141
|
+
chunkS2Y3VUNC_cjs.applyMediaPlaybackAttributes(el, playback);
|
|
2133
2142
|
if (presenting) {
|
|
2134
|
-
|
|
2135
|
-
|
|
2143
|
+
chunkS2Y3VUNC_cjs.startMediaAutoplay(el, { trimStartMs: playback.trimStartMs });
|
|
2144
|
+
chunkS2Y3VUNC_cjs.scheduleMediaTrimAndFade(el, {
|
|
2136
2145
|
...playback,
|
|
2137
|
-
volume:
|
|
2146
|
+
volume: chunkS2Y3VUNC_cjs.mediaPlaybackAttributes(playback).volume
|
|
2138
2147
|
});
|
|
2139
2148
|
} else if (!el.paused) {
|
|
2140
2149
|
el.pause();
|
|
@@ -2144,18 +2153,18 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2144
2153
|
if (element.type !== "media") {
|
|
2145
2154
|
return null;
|
|
2146
2155
|
}
|
|
2147
|
-
const surface =
|
|
2156
|
+
const surface = chunkS2Y3VUNC_cjs.mediaSurfaceOf({
|
|
2148
2157
|
interactive: context.interactive === true || context.reading === true,
|
|
2149
2158
|
presenting: context.presenting
|
|
2150
2159
|
});
|
|
2151
|
-
const showTransport =
|
|
2160
|
+
const showTransport = chunkS2Y3VUNC_cjs.mediaTransportVisible({ ...surface, canvasTransport: true });
|
|
2152
2161
|
const doc = context.document;
|
|
2153
|
-
const baseStyle =
|
|
2162
|
+
const baseStyle = chunkS2Y3VUNC_cjs.getContainerStyle(element, zIndex);
|
|
2154
2163
|
const el = createEl(doc, "div", "pptxv-element pptxv-media", baseStyle);
|
|
2155
2164
|
el.dataset.elementId = element.id;
|
|
2156
2165
|
const mediaSrc = element.mediaData ?? (element.mediaPath ? context.mediaDataUrls.get(element.mediaPath) : void 0);
|
|
2157
|
-
const posterSrc =
|
|
2158
|
-
const onlineVideoEmbedUrl =
|
|
2166
|
+
const posterSrc = chunkS2Y3VUNC_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
2167
|
+
const onlineVideoEmbedUrl = chunkS2Y3VUNC_cjs.getOnlineVideoEmbed(element)?.embedUrl;
|
|
2159
2168
|
if (onlineVideoEmbedUrl && element.mediaType === "video") {
|
|
2160
2169
|
const iframe = createEl(doc, "iframe", "pptxv-media-video pptxv-media-iframe", {
|
|
2161
2170
|
width: "100%",
|
|
@@ -2165,8 +2174,8 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2165
2174
|
});
|
|
2166
2175
|
iframe.src = onlineVideoEmbedUrl;
|
|
2167
2176
|
iframe.title = context.t("pptx.media.onlineVideoTitle");
|
|
2168
|
-
iframe.allow =
|
|
2169
|
-
iframe.sandbox.value =
|
|
2177
|
+
iframe.allow = chunkS2Y3VUNC_cjs.ONLINE_VIDEO_IFRAME_ALLOW;
|
|
2178
|
+
iframe.sandbox.value = chunkS2Y3VUNC_cjs.ONLINE_VIDEO_IFRAME_SANDBOX;
|
|
2170
2179
|
iframe.allowFullscreen = true;
|
|
2171
2180
|
el.appendChild(iframe);
|
|
2172
2181
|
return el;
|
|
@@ -2195,21 +2204,21 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2195
2204
|
audio.src = mediaSrc;
|
|
2196
2205
|
audio.controls = showTransport;
|
|
2197
2206
|
el.appendChild(audio);
|
|
2198
|
-
if (context.presenting &&
|
|
2207
|
+
if (context.presenting && chunkS2Y3VUNC_cjs.registerCrossSlideAudio(element, mediaSrc)) {
|
|
2199
2208
|
audio.muted = true;
|
|
2200
|
-
|
|
2209
|
+
chunkS2Y3VUNC_cjs.applyMediaPlaybackAttributes(audio, element);
|
|
2201
2210
|
return el;
|
|
2202
2211
|
}
|
|
2203
2212
|
applyMediaPresentingState(audio, context.presenting, element);
|
|
2204
2213
|
wireMediaFullscreenOverlay(doc, el, audio, element, context, baseStyle);
|
|
2205
2214
|
return el;
|
|
2206
2215
|
}
|
|
2207
|
-
const fallback =
|
|
2216
|
+
const fallback = chunkS2Y3VUNC_cjs.mediaFallbackVisual(surface, {
|
|
2208
2217
|
hasPoster: Boolean(posterSrc),
|
|
2209
2218
|
missing: element.mediaMissing === true
|
|
2210
2219
|
});
|
|
2211
|
-
const icon =
|
|
2212
|
-
const labelKey =
|
|
2220
|
+
const icon = chunkS2Y3VUNC_cjs.mediaFallbackIcon(fallback, element.mediaType);
|
|
2221
|
+
const labelKey = chunkS2Y3VUNC_cjs.mediaFallbackLabelKey(fallback, element.mediaType);
|
|
2213
2222
|
if (fallback.poster && posterSrc) {
|
|
2214
2223
|
const img = createEl(doc, "img", "pptxv-media-poster", {
|
|
2215
2224
|
width: "100%",
|
|
@@ -2227,7 +2236,7 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2227
2236
|
if (fallback.badge === "missing") {
|
|
2228
2237
|
badge.classList.add("pptxv-media-badge-missing");
|
|
2229
2238
|
}
|
|
2230
|
-
badge.setAttribute(
|
|
2239
|
+
badge.setAttribute(chunkS2Y3VUNC_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.badge);
|
|
2231
2240
|
badge.appendChild(buildIcon(doc, icon));
|
|
2232
2241
|
if (labelKey !== void 0 && fallback.badge === "missing") {
|
|
2233
2242
|
const text = createEl(doc, "span");
|
|
@@ -2240,7 +2249,7 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2240
2249
|
}
|
|
2241
2250
|
if (fallback.placeholder !== "none") {
|
|
2242
2251
|
el.classList.add("pptxv-placeholder", "pptxv-media-placeholder");
|
|
2243
|
-
el.setAttribute(
|
|
2252
|
+
el.setAttribute(chunkS2Y3VUNC_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.placeholder);
|
|
2244
2253
|
if (icon.length > 0) {
|
|
2245
2254
|
el.appendChild(buildIcon(doc, icon));
|
|
2246
2255
|
}
|
|
@@ -2276,7 +2285,7 @@ var renderModel3dElement = (element, zIndex, context) => {
|
|
|
2276
2285
|
doc,
|
|
2277
2286
|
"div",
|
|
2278
2287
|
"pptxv-element pptxv-model3d",
|
|
2279
|
-
|
|
2288
|
+
chunkS2Y3VUNC_cjs.getContainerStyle(element, zIndex)
|
|
2280
2289
|
);
|
|
2281
2290
|
el.dataset.elementId = element.id;
|
|
2282
2291
|
const label = context.t("pptx.model3d.label");
|
|
@@ -2413,7 +2422,7 @@ function buildOleIcon(doc, type, color) {
|
|
|
2413
2422
|
fill: "none",
|
|
2414
2423
|
"aria-hidden": "true"
|
|
2415
2424
|
});
|
|
2416
|
-
for (const shape of
|
|
2425
|
+
for (const shape of chunkS2Y3VUNC_cjs.getOleIconShapes(type)) {
|
|
2417
2426
|
const node = createSvgEl(doc, shape.tag, shape.attrs);
|
|
2418
2427
|
if (shape.tag === "text") {
|
|
2419
2428
|
node.setAttribute("fill", color);
|
|
@@ -2432,21 +2441,21 @@ var renderOleElement = (element, zIndex, context) => {
|
|
|
2432
2441
|
return null;
|
|
2433
2442
|
}
|
|
2434
2443
|
const doc = context.document;
|
|
2435
|
-
const oleType =
|
|
2436
|
-
const typeColor =
|
|
2437
|
-
const typeLabel =
|
|
2438
|
-
const el = createEl(doc, "div", "pptxv-element pptxv-ole",
|
|
2444
|
+
const oleType = chunkS2Y3VUNC_cjs.resolveOleType(element);
|
|
2445
|
+
const typeColor = chunkS2Y3VUNC_cjs.getOleTypeColor(oleType);
|
|
2446
|
+
const typeLabel = chunkS2Y3VUNC_cjs.getOleTypeLabel(oleType);
|
|
2447
|
+
const el = createEl(doc, "div", "pptxv-element pptxv-ole", chunkS2Y3VUNC_cjs.getContainerStyle(element, zIndex));
|
|
2439
2448
|
el.dataset.elementId = element.id;
|
|
2440
2449
|
el.setAttribute("role", "group");
|
|
2441
|
-
el.setAttribute("aria-label",
|
|
2450
|
+
el.setAttribute("aria-label", chunkS2Y3VUNC_cjs.getOleAriaLabel(element));
|
|
2442
2451
|
el.title = infoLines(element, typeLabel).join("\n");
|
|
2443
2452
|
if (element.previewImageData) {
|
|
2444
|
-
el.appendChild(buildPreview(doc, element, typeColor,
|
|
2453
|
+
el.appendChild(buildPreview(doc, element, typeColor, chunkS2Y3VUNC_cjs.getOleBadgeLabel(oleType)));
|
|
2445
2454
|
} else {
|
|
2446
2455
|
el.appendChild(buildPlaceholder2(doc, element, oleType, typeColor, typeLabel));
|
|
2447
2456
|
}
|
|
2448
|
-
const showActions =
|
|
2449
|
-
|
|
2457
|
+
const showActions = chunkS2Y3VUNC_cjs.oleActionsVisible(
|
|
2458
|
+
chunkS2Y3VUNC_cjs.mediaSurfaceOf({
|
|
2450
2459
|
interactive: context.interactive === true,
|
|
2451
2460
|
presenting: context.presenting
|
|
2452
2461
|
})
|
|
@@ -2462,7 +2471,7 @@ function infoLines(el, typeLabel) {
|
|
|
2462
2471
|
if (name) {
|
|
2463
2472
|
lines.push(name);
|
|
2464
2473
|
}
|
|
2465
|
-
const size =
|
|
2474
|
+
const size = chunkS2Y3VUNC_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2466
2475
|
if (size) {
|
|
2467
2476
|
lines.push(size);
|
|
2468
2477
|
}
|
|
@@ -2486,7 +2495,7 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2486
2495
|
display: "block"
|
|
2487
2496
|
});
|
|
2488
2497
|
img.src = el.previewImageData ?? "";
|
|
2489
|
-
img.alt =
|
|
2498
|
+
img.alt = chunkS2Y3VUNC_cjs.getOleAriaLabel(el);
|
|
2490
2499
|
img.draggable = false;
|
|
2491
2500
|
preview.appendChild(img);
|
|
2492
2501
|
const badge = createSvgEl(doc, "svg", { width: 24, height: 24, viewBox: "0 0 24 24" });
|
|
@@ -2513,7 +2522,7 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2513
2522
|
}
|
|
2514
2523
|
function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
2515
2524
|
const box = createEl(doc, "div", "pptxv-ole-placeholder", {
|
|
2516
|
-
...
|
|
2525
|
+
...chunkS2Y3VUNC_cjs.getPlaceholderStyle(oleType),
|
|
2517
2526
|
width: "100%",
|
|
2518
2527
|
height: "100%",
|
|
2519
2528
|
display: "flex",
|
|
@@ -2534,7 +2543,7 @@ function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
|
2534
2543
|
whiteSpace: "nowrap",
|
|
2535
2544
|
color: typeColor
|
|
2536
2545
|
});
|
|
2537
|
-
name.textContent =
|
|
2546
|
+
name.textContent = chunkS2Y3VUNC_cjs.getOleDisplayName(el);
|
|
2538
2547
|
box.appendChild(name);
|
|
2539
2548
|
if (el.fileName) {
|
|
2540
2549
|
const sublabel = createEl(doc, "span", "pptxv-ole-sublabel", {
|
|
@@ -2586,7 +2595,7 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2586
2595
|
for (const type of ["pointerdown", "mousedown", "click"]) {
|
|
2587
2596
|
bar.addEventListener(type, (event) => event.stopPropagation());
|
|
2588
2597
|
}
|
|
2589
|
-
const size =
|
|
2598
|
+
const size = chunkS2Y3VUNC_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2590
2599
|
if (size) {
|
|
2591
2600
|
const meta = createEl(doc, "span", "pptxv-ole-meta", {
|
|
2592
2601
|
marginRight: "auto",
|
|
@@ -2606,14 +2615,14 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2606
2615
|
download.title = downloadTitle;
|
|
2607
2616
|
download.textContent = context.t("pptx.ole.download");
|
|
2608
2617
|
bar.appendChild(download);
|
|
2609
|
-
if (
|
|
2618
|
+
if (chunkS2Y3VUNC_cjs.isBrowserOpenableMime(el.oleEmbeddedMimeType)) {
|
|
2610
2619
|
const open = createEl(doc, "button", "pptxv-ole-action", ACTION_STYLE);
|
|
2611
2620
|
open.type = "button";
|
|
2612
2621
|
const openTitle = context.t("pptx.ole.openName", { name: downloadName });
|
|
2613
2622
|
open.setAttribute("aria-label", openTitle);
|
|
2614
2623
|
open.title = openTitle;
|
|
2615
2624
|
open.textContent = context.t("pptx.ole.open");
|
|
2616
|
-
open.addEventListener("click", () =>
|
|
2625
|
+
open.addEventListener("click", () => chunkS2Y3VUNC_cjs.openUrlInNewTab(data));
|
|
2617
2626
|
bar.appendChild(open);
|
|
2618
2627
|
}
|
|
2619
2628
|
return bar;
|
|
@@ -2625,7 +2634,7 @@ var renderPlaceholderElement = (element, zIndex, context) => {
|
|
|
2625
2634
|
context.document,
|
|
2626
2635
|
"div",
|
|
2627
2636
|
"pptxv-element pptxv-placeholder",
|
|
2628
|
-
|
|
2637
|
+
chunkS2Y3VUNC_cjs.getContainerStyle(element, zIndex)
|
|
2629
2638
|
);
|
|
2630
2639
|
el.dataset.elementId = element.id;
|
|
2631
2640
|
el.dataset.elementType = element.type;
|
|
@@ -2641,7 +2650,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2641
2650
|
return null;
|
|
2642
2651
|
}
|
|
2643
2652
|
const doc = context.document;
|
|
2644
|
-
const summaryView =
|
|
2653
|
+
const summaryView = chunkS2Y3VUNC_cjs.buildSummaryZoomView(
|
|
2645
2654
|
element,
|
|
2646
2655
|
(index) => {
|
|
2647
2656
|
const slide = context.slides?.[index];
|
|
@@ -2661,7 +2670,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2661
2670
|
doc,
|
|
2662
2671
|
"div",
|
|
2663
2672
|
"pptxv-element pptxv-zoom pptxv-summary-zoom",
|
|
2664
|
-
|
|
2673
|
+
chunkS2Y3VUNC_cjs.getContainerStyle(element, zIndex)
|
|
2665
2674
|
);
|
|
2666
2675
|
const content = createEl(doc, "div", "pptxv-summary-zoom-content", summaryView.containerStyle);
|
|
2667
2676
|
root.dataset.elementId = element.id;
|
|
@@ -2728,7 +2737,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2728
2737
|
const target = element.targetSlideIndex ?? 0;
|
|
2729
2738
|
const targetSlide = context.slides?.[target];
|
|
2730
2739
|
const interactive = context.presenting && context.onZoomClick !== void 0;
|
|
2731
|
-
const el = createEl(doc, "div", "pptxv-element pptxv-zoom",
|
|
2740
|
+
const el = createEl(doc, "div", "pptxv-element pptxv-zoom", chunkS2Y3VUNC_cjs.getContainerStyle(element, zIndex));
|
|
2732
2741
|
el.dataset.elementId = element.id;
|
|
2733
2742
|
el.dataset.zoomType = zoomType;
|
|
2734
2743
|
el.dataset.zoomTarget = String(target);
|
|
@@ -2738,7 +2747,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2738
2747
|
el.tabIndex = 0;
|
|
2739
2748
|
el.style.cursor = "pointer";
|
|
2740
2749
|
const activate = () => {
|
|
2741
|
-
const zoomTarget =
|
|
2750
|
+
const zoomTarget = chunkS2Y3VUNC_cjs.resolveZoomNavigationTarget(element);
|
|
2742
2751
|
if (zoomTarget) {
|
|
2743
2752
|
context.onZoomClick?.(zoomTarget, context.currentSlideIndex ?? 0);
|
|
2744
2753
|
}
|
|
@@ -2853,7 +2862,7 @@ function registerExtraRenderers(registry) {
|
|
|
2853
2862
|
// src/pptx/dom/elements/smartart-3d.ts
|
|
2854
2863
|
var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
2855
2864
|
const wrapper = renderSmartArtSvg(element, zIndex, context);
|
|
2856
|
-
const spec = wrapper ?
|
|
2865
|
+
const spec = wrapper ? chunkS2Y3VUNC_cjs.resolveSmartArtThreeViewSpec(element, context.smartArt3D) : null;
|
|
2857
2866
|
if (!wrapper || !spec) {
|
|
2858
2867
|
return wrapper;
|
|
2859
2868
|
}
|
|
@@ -2863,18 +2872,18 @@ var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
|
2863
2872
|
textStyle: context.presentationStates?.get(element.id)?.textStyle
|
|
2864
2873
|
});
|
|
2865
2874
|
if (context.onSmartArtNodeTextChange && context.interactive && !context.presenting) {
|
|
2866
|
-
const layer = renderSmartArtSvg(
|
|
2875
|
+
const layer = renderSmartArtSvg(chunkS2Y3VUNC_cjs.elementInLocalFrame(element), 0, context);
|
|
2867
2876
|
if (layer) {
|
|
2868
2877
|
layer.classList.add("pptxv-smartart-3d-edit-layer");
|
|
2869
2878
|
layer.setAttribute("data-smartart-3d-edit-layer", "true");
|
|
2870
|
-
|
|
2879
|
+
chunkS2Y3VUNC_cjs.stripEditLayerMarkers(layer);
|
|
2871
2880
|
layer.setAttribute("aria-hidden", "true");
|
|
2872
2881
|
Object.assign(layer.style, { position: "absolute", inset: "0", zIndex: "1" });
|
|
2873
2882
|
for (const svg of layer.querySelectorAll("svg")) {
|
|
2874
2883
|
svg.style.opacity = "0";
|
|
2875
2884
|
}
|
|
2876
2885
|
wrapper.appendChild(layer);
|
|
2877
|
-
|
|
2886
|
+
chunkS2Y3VUNC_cjs.routeEditLayerPointerToNodes(layer);
|
|
2878
2887
|
}
|
|
2879
2888
|
}
|
|
2880
2889
|
return wrapper;
|
|
@@ -2887,7 +2896,7 @@ function nodeTarget(target) {
|
|
|
2887
2896
|
}
|
|
2888
2897
|
function enableSmartArtEditing(chrome, element, context) {
|
|
2889
2898
|
const data = element.smartArtData;
|
|
2890
|
-
if (!data || !context.onSmartArtNodeTextChange && !context.onSmartArtNodeFillChange || !
|
|
2899
|
+
if (!data || !context.onSmartArtNodeTextChange && !context.onSmartArtNodeFillChange || !chunkS2Y3VUNC_cjs.canDrillDown(element)) {
|
|
2891
2900
|
return;
|
|
2892
2901
|
}
|
|
2893
2902
|
let editor = null;
|
|
@@ -2909,8 +2918,8 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2909
2918
|
}
|
|
2910
2919
|
event.stopPropagation();
|
|
2911
2920
|
const textNode = target.querySelector("text");
|
|
2912
|
-
const textRect = textNode ?
|
|
2913
|
-
const rect = textRect && textRect.width > 0 ? textRect :
|
|
2921
|
+
const textRect = textNode ? chunkS2Y3VUNC_cjs.measureSvgViewportRect(textNode) : null;
|
|
2922
|
+
const rect = textRect && textRect.width > 0 ? textRect : chunkS2Y3VUNC_cjs.measureSvgViewportRect(target);
|
|
2914
2923
|
if (!rect) {
|
|
2915
2924
|
return;
|
|
2916
2925
|
}
|
|
@@ -2934,7 +2943,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2934
2943
|
textAlign: "center"
|
|
2935
2944
|
});
|
|
2936
2945
|
editor = input;
|
|
2937
|
-
input.value =
|
|
2946
|
+
input.value = chunkS2Y3VUNC_cjs.findSmartArtNodeText(data, nodeId) ?? "";
|
|
2938
2947
|
const commit = () => {
|
|
2939
2948
|
if (input !== editor) {
|
|
2940
2949
|
return;
|
|
@@ -2966,7 +2975,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2966
2975
|
}
|
|
2967
2976
|
cancelHide();
|
|
2968
2977
|
swatches?.remove();
|
|
2969
|
-
const rect =
|
|
2978
|
+
const rect = chunkS2Y3VUNC_cjs.measureSvgViewportRect(target);
|
|
2970
2979
|
if (!rect) {
|
|
2971
2980
|
return;
|
|
2972
2981
|
}
|
|
@@ -2985,7 +2994,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2985
2994
|
});
|
|
2986
2995
|
swatches.setAttribute("role", "group");
|
|
2987
2996
|
swatches.setAttribute("aria-label", context.t("pptx.smartArt.fillColor"));
|
|
2988
|
-
for (const color of
|
|
2997
|
+
for (const color of chunkS2Y3VUNC_cjs.resolvePalette(data).slice(0, 6)) {
|
|
2989
2998
|
const button = createEl(chrome.ownerDocument, "button", "", {
|
|
2990
2999
|
width: "18px",
|
|
2991
3000
|
height: "18px",
|
|
@@ -3084,7 +3093,7 @@ function buildSmartArtFallbackSvg(doc, layout, a11yNodes = [], nodeIds = []) {
|
|
|
3084
3093
|
svg.setAttribute("class", "pptxv-smartart-svg");
|
|
3085
3094
|
svg.setAttribute("style", SMARTART_SVG_STYLE);
|
|
3086
3095
|
for (const conn of layout.connectors) {
|
|
3087
|
-
const paint =
|
|
3096
|
+
const paint = chunkS2Y3VUNC_cjs.smartArtConnectorPaint(conn);
|
|
3088
3097
|
svg.appendChild(
|
|
3089
3098
|
createSvgEl(doc, "path", {
|
|
3090
3099
|
d: paint.d,
|
|
@@ -3143,7 +3152,7 @@ function buildFallbackNode(doc, node, shadowFilter, a11yLabel, nodeId) {
|
|
|
3143
3152
|
})
|
|
3144
3153
|
);
|
|
3145
3154
|
}
|
|
3146
|
-
const label =
|
|
3155
|
+
const label = chunkS2Y3VUNC_cjs.smartArtNodeLabel(node);
|
|
3147
3156
|
if (label.visible) {
|
|
3148
3157
|
appendSvgTextLines(doc, g, {
|
|
3149
3158
|
lines: label.lines,
|
|
@@ -3179,41 +3188,41 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3179
3188
|
doc,
|
|
3180
3189
|
"div",
|
|
3181
3190
|
"pptxv-element pptxv-smartart",
|
|
3182
|
-
|
|
3191
|
+
chunkS2Y3VUNC_cjs.getContainerStyle(element, zIndex)
|
|
3183
3192
|
);
|
|
3184
3193
|
wrapper.dataset.elementId = element.id;
|
|
3185
3194
|
wrapper.dataset.testid = `smartart-${data?.layout ?? "diagram"}`;
|
|
3186
|
-
const chrome = createEl(doc, "div", "pptxv-smartart-chrome",
|
|
3195
|
+
const chrome = createEl(doc, "div", "pptxv-smartart-chrome", chunkS2Y3VUNC_cjs.buildChromeStyle(data?.chrome));
|
|
3187
3196
|
chrome.style.position = "relative";
|
|
3188
3197
|
wrapper.appendChild(chrome);
|
|
3189
3198
|
if (data) {
|
|
3190
|
-
const a11y =
|
|
3199
|
+
const a11y = chunkS2Y3VUNC_cjs.buildSmartArtA11y(data);
|
|
3191
3200
|
chrome.setAttribute("role", "img");
|
|
3192
3201
|
chrome.setAttribute("aria-label", a11y.label);
|
|
3193
3202
|
}
|
|
3194
3203
|
const nodes = data?.nodes ?? [];
|
|
3195
3204
|
const drawingShapes = data?.drawingShapes ?? [];
|
|
3196
3205
|
const animationState = context.presentationStates?.get(element.id);
|
|
3197
|
-
const { nodes: revealedNodesFull } =
|
|
3206
|
+
const { nodes: revealedNodesFull } = chunkS2Y3VUNC_cjs.resolveRevealedSmartArtNodes(
|
|
3198
3207
|
nodes,
|
|
3199
3208
|
animationState,
|
|
3200
3209
|
data?.presLayoutVars
|
|
3201
3210
|
);
|
|
3202
3211
|
if (data && drawingShapes.length > 0) {
|
|
3203
|
-
const revealedShapes =
|
|
3212
|
+
const revealedShapes = chunkS2Y3VUNC_cjs.resolveRevealedDrawingShapes(drawingShapes, nodes, animationState);
|
|
3204
3213
|
chrome.appendChild(
|
|
3205
|
-
buildDrawingShapesSvg(doc, element.id, data,
|
|
3214
|
+
buildDrawingShapesSvg(doc, element.id, data, chunkS2Y3VUNC_cjs.buildSmartArtA11y(data).nodes, revealedShapes)
|
|
3206
3215
|
);
|
|
3207
3216
|
enableSmartArtEditing(chrome, element, context);
|
|
3208
3217
|
return wrapper;
|
|
3209
3218
|
}
|
|
3210
3219
|
if (data && nodes.length > 0) {
|
|
3211
3220
|
const revealedNodes = revealedNodesFull;
|
|
3212
|
-
const layout =
|
|
3221
|
+
const layout = chunkS2Y3VUNC_cjs.computeSmartArtElementLayout(
|
|
3213
3222
|
data,
|
|
3214
3223
|
revealedNodes,
|
|
3215
3224
|
{ width: element.width, height: element.height },
|
|
3216
|
-
|
|
3225
|
+
chunkS2Y3VUNC_cjs.resolvePalette(data),
|
|
3217
3226
|
data.style ?? "flat",
|
|
3218
3227
|
element.id
|
|
3219
3228
|
);
|
|
@@ -3221,8 +3230,8 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3221
3230
|
buildSmartArtFallbackSvg(
|
|
3222
3231
|
doc,
|
|
3223
3232
|
layout,
|
|
3224
|
-
|
|
3225
|
-
|
|
3233
|
+
chunkS2Y3VUNC_cjs.buildSmartArtA11y(data).nodes,
|
|
3234
|
+
chunkS2Y3VUNC_cjs.flattenNodes(revealedNodes).map((node) => node.id)
|
|
3226
3235
|
)
|
|
3227
3236
|
);
|
|
3228
3237
|
enableSmartArtEditing(chrome, element, context);
|
|
@@ -3245,17 +3254,17 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3245
3254
|
function buildDrawingShapesSvg(doc, elementId, data, a11yNodes, revealedShapes) {
|
|
3246
3255
|
const allShapes = data.drawingShapes ?? [];
|
|
3247
3256
|
const style = data.style ?? "flat";
|
|
3248
|
-
const viewBox =
|
|
3249
|
-
const rendered =
|
|
3257
|
+
const viewBox = chunkS2Y3VUNC_cjs.computeDrawingViewBox(allShapes);
|
|
3258
|
+
const rendered = chunkS2Y3VUNC_cjs.projectDrawingShapes(
|
|
3250
3259
|
elementId,
|
|
3251
3260
|
revealedShapes,
|
|
3252
3261
|
viewBox,
|
|
3253
|
-
|
|
3262
|
+
chunkS2Y3VUNC_cjs.resolvePalette(data),
|
|
3254
3263
|
style
|
|
3255
3264
|
);
|
|
3256
|
-
const shadow =
|
|
3265
|
+
const shadow = chunkS2Y3VUNC_cjs.styleShadowFilter(style);
|
|
3257
3266
|
const labelsById = new Map(a11yNodes.map((node) => [node.id, node.label]));
|
|
3258
|
-
const nodeIds =
|
|
3267
|
+
const nodeIds = chunkS2Y3VUNC_cjs.resolveRevealedDrawingShapeNodeIds(allShapes, revealedShapes, data.nodes);
|
|
3259
3268
|
const svg = createSvgEl(doc, "svg", {
|
|
3260
3269
|
viewBox: `0 0 ${viewBox.width} ${viewBox.height}`,
|
|
3261
3270
|
preserveAspectRatio: "xMidYMid meet"
|
|
@@ -3390,9 +3399,9 @@ function enableTableResize(container, table, element, context) {
|
|
|
3390
3399
|
for (const handle of [...colHandles, ...rowHandles]) {
|
|
3391
3400
|
handle.remove();
|
|
3392
3401
|
}
|
|
3393
|
-
const crossings =
|
|
3402
|
+
const crossings = chunkS2Y3VUNC_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
3394
3403
|
const rowBounds = measureRowBoundaries(table);
|
|
3395
|
-
colHandles =
|
|
3404
|
+
colHandles = chunkS2Y3VUNC_cjs.computeColumnBoundaries(tableData.columnWidths).map((leftPct, i) => {
|
|
3396
3405
|
const handle = createEl(doc, "div", "pptxv-table-resize-col", {
|
|
3397
3406
|
position: "absolute",
|
|
3398
3407
|
top: "0",
|
|
@@ -3402,7 +3411,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3402
3411
|
zIndex: "10",
|
|
3403
3412
|
pointerEvents: "none"
|
|
3404
3413
|
});
|
|
3405
|
-
const segments =
|
|
3414
|
+
const segments = chunkS2Y3VUNC_cjs.columnHandleSegments(
|
|
3406
3415
|
crossings.columns[i] ?? [],
|
|
3407
3416
|
rowBounds,
|
|
3408
3417
|
table.offsetHeight
|
|
@@ -3432,7 +3441,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3432
3441
|
zIndex: "10",
|
|
3433
3442
|
pointerEvents: "none"
|
|
3434
3443
|
});
|
|
3435
|
-
const segments =
|
|
3444
|
+
const segments = chunkS2Y3VUNC_cjs.rowHandleSegments(crossings.rows[i] ?? [], tableData.columnWidths);
|
|
3436
3445
|
for (const { leftPct, widthPct } of segments) {
|
|
3437
3446
|
handle.appendChild(
|
|
3438
3447
|
createEl(doc, "div", "pptxv-table-resize-segment", {
|
|
@@ -3476,14 +3485,14 @@ function enableTableResize(container, table, element, context) {
|
|
|
3476
3485
|
const deltaProp = (event.clientX - active.startPos) / (rect.width || 1);
|
|
3477
3486
|
context.onTableResizeColumns?.(
|
|
3478
3487
|
element,
|
|
3479
|
-
|
|
3488
|
+
chunkS2Y3VUNC_cjs.computeResizedColumnWidths(active.initialWidths, active.index, deltaProp)
|
|
3480
3489
|
);
|
|
3481
3490
|
} else if (event.clientY !== active.startPos && active.type === "row") {
|
|
3482
3491
|
const deltaY = event.clientY - active.startPos;
|
|
3483
3492
|
context.onTableResizeRow?.(
|
|
3484
3493
|
element,
|
|
3485
3494
|
active.index,
|
|
3486
|
-
|
|
3495
|
+
chunkS2Y3VUNC_cjs.computeResizedRowHeight(active.initialRowHeight ?? chunkS2Y3VUNC_cjs.DEFAULT_ROW_HEIGHT, deltaY)
|
|
3487
3496
|
);
|
|
3488
3497
|
}
|
|
3489
3498
|
drawHandles();
|
|
@@ -3492,13 +3501,13 @@ function enableTableResize(container, table, element, context) {
|
|
|
3492
3501
|
const rect = container.getBoundingClientRect();
|
|
3493
3502
|
const localX = event.clientX - rect.left;
|
|
3494
3503
|
const localY = event.clientY - rect.top;
|
|
3495
|
-
const scaleY =
|
|
3496
|
-
const crossings =
|
|
3504
|
+
const scaleY = chunkS2Y3VUNC_cjs.getTableResizeScale(rect.height, container.offsetHeight);
|
|
3505
|
+
const crossings = chunkS2Y3VUNC_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
3497
3506
|
const rowBounds = measureRowBoundaries(table);
|
|
3498
|
-
const colBoundaries =
|
|
3507
|
+
const colBoundaries = chunkS2Y3VUNC_cjs.computeColumnBoundaries(tableData.columnWidths);
|
|
3499
3508
|
for (let i = 0; i < colBoundaries.length; i++) {
|
|
3500
3509
|
const boundaryX = colBoundaries[i] / 100 * rect.width;
|
|
3501
|
-
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !
|
|
3510
|
+
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !chunkS2Y3VUNC_cjs.isColumnBoundaryMergedAt(crossings, i, rowBounds, localY / scaleY)) {
|
|
3502
3511
|
event.preventDefault();
|
|
3503
3512
|
event.stopPropagation();
|
|
3504
3513
|
doc.body.style.cursor = "col-resize";
|
|
@@ -3516,7 +3525,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3516
3525
|
}
|
|
3517
3526
|
}
|
|
3518
3527
|
for (let i = 0; i < rowBounds.length; i++) {
|
|
3519
|
-
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !
|
|
3528
|
+
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !chunkS2Y3VUNC_cjs.isRowBoundaryMergedAt(crossings, i, tableData.columnWidths, localX / (rect.width || 1))) {
|
|
3520
3529
|
event.preventDefault();
|
|
3521
3530
|
event.stopPropagation();
|
|
3522
3531
|
const tr = table.querySelectorAll("tbody > tr")[i];
|
|
@@ -3527,7 +3536,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3527
3536
|
index: i,
|
|
3528
3537
|
startPos: event.clientY,
|
|
3529
3538
|
handleEl: rowHandles[i] ?? container,
|
|
3530
|
-
initialRowHeight: tr?.offsetHeight ??
|
|
3539
|
+
initialRowHeight: tr?.offsetHeight ?? chunkS2Y3VUNC_cjs.DEFAULT_ROW_HEIGHT
|
|
3531
3540
|
};
|
|
3532
3541
|
win.addEventListener("mousemove", onMouseMove);
|
|
3533
3542
|
win.addEventListener("mouseup", onMouseUp);
|
|
@@ -3548,7 +3557,7 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
3548
3557
|
}
|
|
3549
3558
|
const doc = context.document;
|
|
3550
3559
|
const container = createEl(doc, "div", "pptxv-element pptxv-table", {
|
|
3551
|
-
...
|
|
3560
|
+
...chunkS2Y3VUNC_cjs.getContainerStyle(element, zIndex),
|
|
3552
3561
|
overflow: "hidden"
|
|
3553
3562
|
});
|
|
3554
3563
|
container.dataset.elementId = element.id;
|
|
@@ -3561,7 +3570,7 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
3561
3570
|
// font stack; all five bindings declare the same shared default here.
|
|
3562
3571
|
fontFamily: chunkG3UVZ5FO_cjs.DEFAULT_FONT_FAMILY,
|
|
3563
3572
|
// `a:tblPr@rtl`: mirrors the column order for right-to-left decks.
|
|
3564
|
-
...
|
|
3573
|
+
...chunkS2Y3VUNC_cjs.tableContainerCss(tableData)
|
|
3565
3574
|
});
|
|
3566
3575
|
appendColgroup(doc, table, tableData.columnWidths);
|
|
3567
3576
|
const tbody = doc.createElement("tbody");
|
|
@@ -3623,13 +3632,13 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3623
3632
|
if (cell.rowSpan && cell.rowSpan > 1) {
|
|
3624
3633
|
td.rowSpan = cell.rowSpan;
|
|
3625
3634
|
}
|
|
3626
|
-
const style =
|
|
3635
|
+
const style = chunkS2Y3VUNC_cjs.tableCellCss(
|
|
3627
3636
|
tableData,
|
|
3628
3637
|
cell,
|
|
3629
3638
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
3630
3639
|
styleContext
|
|
3631
3640
|
);
|
|
3632
|
-
const patternFill = cell.style ?
|
|
3641
|
+
const patternFill = cell.style ? chunkS2Y3VUNC_cjs.cellPatternFillCss(cell.style) : null;
|
|
3633
3642
|
if (patternFill) {
|
|
3634
3643
|
delete style["backgroundColor"];
|
|
3635
3644
|
delete style["background"];
|
|
@@ -3642,7 +3651,7 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3642
3651
|
}
|
|
3643
3652
|
applyStyleMap(td, CELL_BASE_STYLE);
|
|
3644
3653
|
applyStyleMap(td, style);
|
|
3645
|
-
const diagonals =
|
|
3654
|
+
const diagonals = chunkS2Y3VUNC_cjs.getCellDiagonalBorders(
|
|
3646
3655
|
cell.style,
|
|
3647
3656
|
tableData,
|
|
3648
3657
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3686,7 +3695,7 @@ function renderDiagonalOverlay(doc, diagonals) {
|
|
|
3686
3695
|
return svg;
|
|
3687
3696
|
}
|
|
3688
3697
|
function appendCellText(doc, td, cell) {
|
|
3689
|
-
const blocks =
|
|
3698
|
+
const blocks = chunkS2Y3VUNC_cjs.cellParagraphBlocks(cell);
|
|
3690
3699
|
if (blocks) {
|
|
3691
3700
|
for (const block of blocks) {
|
|
3692
3701
|
const div = createEl(doc, "div", "pptxv-table-para", { display: "block", ...block.css });
|
|
@@ -3721,7 +3730,7 @@ function appendRuns(doc, parent, runs) {
|
|
|
3721
3730
|
}
|
|
3722
3731
|
const span = createEl(doc, "span", "pptxv-table-run", {
|
|
3723
3732
|
position: "relative",
|
|
3724
|
-
...
|
|
3733
|
+
...chunkS2Y3VUNC_cjs.cellRunStyle(run)
|
|
3725
3734
|
});
|
|
3726
3735
|
span.textContent = run.text;
|
|
3727
3736
|
parent.appendChild(span);
|
|
@@ -3735,8 +3744,8 @@ function registerTableChartRenderers(registry) {
|
|
|
3735
3744
|
}
|
|
3736
3745
|
|
|
3737
3746
|
// src/pptx/dom/glyph-outline-cache.ts
|
|
3738
|
-
var glyphOutlineFontCache = new
|
|
3739
|
-
var getGlyphOutline =
|
|
3747
|
+
var glyphOutlineFontCache = new chunkS2Y3VUNC_cjs.GlyphOutlineFontCache();
|
|
3748
|
+
var getGlyphOutline = chunkS2Y3VUNC_cjs.createGlyphOutlineLookup(glyphOutlineFontCache);
|
|
3740
3749
|
|
|
3741
3750
|
// src/pptx/dom/elements/text-warp.ts
|
|
3742
3751
|
function renderWarpedText(element, context) {
|
|
@@ -3748,12 +3757,12 @@ function renderWarpedText(element, context) {
|
|
|
3748
3757
|
if (!preset || preset === "textNoShape" || preset === "textPlain") {
|
|
3749
3758
|
return null;
|
|
3750
3759
|
}
|
|
3751
|
-
const paragraphs =
|
|
3760
|
+
const paragraphs = chunkS2Y3VUNC_cjs.groupIntoParagraphs(element);
|
|
3752
3761
|
if (paragraphs.length === 0) {
|
|
3753
3762
|
return null;
|
|
3754
3763
|
}
|
|
3755
|
-
if (!
|
|
3756
|
-
const transform =
|
|
3764
|
+
if (!chunkS2Y3VUNC_cjs.shouldUseSvgWarp(preset)) {
|
|
3765
|
+
const transform = chunkS2Y3VUNC_cjs.getWarpCssTransform(preset, style?.textWarpAdj, style?.textWarpAdj2);
|
|
3757
3766
|
if (!transform) {
|
|
3758
3767
|
return null;
|
|
3759
3768
|
}
|
|
@@ -3781,7 +3790,7 @@ function renderWarpedText(element, context) {
|
|
|
3781
3790
|
text.textContent = paragraphs.map((p) => p.segments.map((s) => s.text).join("")).join("\n");
|
|
3782
3791
|
return text;
|
|
3783
3792
|
}
|
|
3784
|
-
if (
|
|
3793
|
+
if (chunkS2Y3VUNC_cjs.hasGlyphEnvelope(preset)) {
|
|
3785
3794
|
return renderGlyphWarp(element, paragraphs, context);
|
|
3786
3795
|
}
|
|
3787
3796
|
return renderPathWarp(element, paragraphs, context);
|
|
@@ -3807,7 +3816,7 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3807
3816
|
});
|
|
3808
3817
|
svg.setAttribute("class", "pptxv-wordart");
|
|
3809
3818
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%;overflow:visible");
|
|
3810
|
-
const perLine =
|
|
3819
|
+
const perLine = chunkS2Y3VUNC_cjs.buildGlyphEnvelopeBlock(
|
|
3811
3820
|
preset,
|
|
3812
3821
|
paragraphs.map(
|
|
3813
3822
|
(paragraph) => paragraph.segments.map((seg, i) => ({
|
|
@@ -3902,7 +3911,7 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3902
3911
|
defs.appendChild(
|
|
3903
3912
|
createSvgEl(context.document, "path", {
|
|
3904
3913
|
id,
|
|
3905
|
-
d:
|
|
3914
|
+
d: chunkS2Y3VUNC_cjs.buildWarpPath(
|
|
3906
3915
|
preset,
|
|
3907
3916
|
element.width,
|
|
3908
3917
|
element.height,
|
|
@@ -3935,9 +3944,9 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3935
3944
|
|
|
3936
3945
|
// src/pptx/dom/elements/text-shape.ts
|
|
3937
3946
|
var renderTextShapeElement = (element, zIndex, context) => {
|
|
3938
|
-
const container =
|
|
3947
|
+
const container = chunkS2Y3VUNC_cjs.getContainerStyle(element, zIndex);
|
|
3939
3948
|
const animState = context.presentationStates?.get(element.id);
|
|
3940
|
-
const background =
|
|
3949
|
+
const background = chunkS2Y3VUNC_cjs.getBackgroundAnimationState(element, context.presentationStates);
|
|
3941
3950
|
const visualState = background ?? animState;
|
|
3942
3951
|
const shape = getShapeFillStrokeStyle(
|
|
3943
3952
|
element,
|
|
@@ -3949,7 +3958,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3949
3958
|
if (transform !== void 0) {
|
|
3950
3959
|
merged["transform"] = transform;
|
|
3951
3960
|
}
|
|
3952
|
-
const layers =
|
|
3961
|
+
const layers = chunkS2Y3VUNC_cjs.getBackgroundAnimationLayers(element, merged, background);
|
|
3953
3962
|
const el = createEl(context.document, "div", "pptxv-element pptxv-shape", layers.box);
|
|
3954
3963
|
el.dataset.elementId = element.id;
|
|
3955
3964
|
const paint = layers.paint ? createEl(context.document, "div", void 0, layers.paint) : el;
|
|
@@ -3959,7 +3968,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3959
3968
|
el.appendChild(paint);
|
|
3960
3969
|
}
|
|
3961
3970
|
if (context.interactive && !context.presenting) {
|
|
3962
|
-
const hitTargetStyle =
|
|
3971
|
+
const hitTargetStyle = chunkS2Y3VUNC_cjs.elementHitTargetStyle(element);
|
|
3963
3972
|
if (hitTargetStyle) {
|
|
3964
3973
|
const hitTarget = createEl(context.document, "div", void 0, hitTargetStyle);
|
|
3965
3974
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
@@ -4002,8 +4011,8 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
4002
4011
|
} else if (warped) {
|
|
4003
4012
|
el.appendChild(warped);
|
|
4004
4013
|
} else {
|
|
4005
|
-
const linkedSegments =
|
|
4006
|
-
const paragraphs =
|
|
4014
|
+
const linkedSegments = chunkS2Y3VUNC_cjs.getOverflowSegments(element, context.slide?.elements);
|
|
4015
|
+
const paragraphs = chunkS2Y3VUNC_cjs.buildParagraphs(element, context.fieldContext, linkedSegments);
|
|
4007
4016
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
4008
4017
|
if (hasText) {
|
|
4009
4018
|
el.appendChild(
|
|
@@ -4014,7 +4023,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
4014
4023
|
);
|
|
4015
4024
|
} else {
|
|
4016
4025
|
const mode = context.interactive && !context.presenting ? "edit" : "present";
|
|
4017
|
-
const prompt =
|
|
4026
|
+
const prompt = chunkS2Y3VUNC_cjs.placeholderPromptDescriptor(element, mode);
|
|
4018
4027
|
if (prompt) {
|
|
4019
4028
|
const hint = createEl(context.document, "div", "pptxv-placeholder-prompt", {
|
|
4020
4029
|
...getTextBlockStyle(element),
|
|
@@ -4181,15 +4190,15 @@ async function resolveImageUrls(handler, slides) {
|
|
|
4181
4190
|
|
|
4182
4191
|
Object.defineProperty(exports, "buildEmbeddedFontStyles", {
|
|
4183
4192
|
enumerable: true,
|
|
4184
|
-
get: function () { return
|
|
4193
|
+
get: function () { return chunkS2Y3VUNC_cjs.buildEmbeddedFontStyles; }
|
|
4185
4194
|
});
|
|
4186
4195
|
Object.defineProperty(exports, "buildFieldSubstitutionContext", {
|
|
4187
4196
|
enumerable: true,
|
|
4188
|
-
get: function () { return
|
|
4197
|
+
get: function () { return chunkS2Y3VUNC_cjs.buildFieldSubstitutionContext; }
|
|
4189
4198
|
});
|
|
4190
4199
|
Object.defineProperty(exports, "releasePptxRenderCaches", {
|
|
4191
4200
|
enumerable: true,
|
|
4192
|
-
get: function () { return
|
|
4201
|
+
get: function () { return chunkS2Y3VUNC_cjs.releasePptxRenderCaches; }
|
|
4193
4202
|
});
|
|
4194
4203
|
Object.defineProperty(exports, "renderChartViewModelSvg", {
|
|
4195
4204
|
enumerable: true,
|