ooxml-ui 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +161 -0
- package/dist/{chunk-XNCWB2X6.js → chunk-2WLRFPMW.js} +4 -0
- package/dist/{chunk-JAJFLFAV.js → chunk-56A2JK63.js} +1 -1
- package/dist/{chunk-AYXFLBSV.js → chunk-5OFAJDMQ.js} +6 -6
- package/dist/{chunk-7FNDOWTX.js → chunk-723JC3OC.js} +72 -5
- package/dist/{chunk-YK2DPYMU.js → chunk-IY7QJLQG.js} +1 -1
- package/dist/{chunk-BOX43CZD.js → chunk-M6GF5ED2.js} +2 -1
- package/dist/{chunk-Y2E22JVO.js → chunk-NYRRH2MD.js} +1 -1
- package/dist/{chunk-VUB44CAJ.js → chunk-TWQ45BFL.js} +1 -1
- package/dist/{chunk-YP5S7DTT.js → chunk-V6P6KZCO.js} +6 -5
- package/dist/controls.d.ts +4 -2
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +5 -5
- package/dist/docx/editor-chrome.d.ts +8 -1
- package/dist/docx/file-commands.d.ts +1 -1
- package/dist/docx/locales/en-app.d.ts +1 -0
- package/dist/docx/locales/en.d.ts +1 -0
- package/dist/docx/localization-strings.d.ts +1 -0
- package/dist/docx/ribbon-actions.d.ts +22 -0
- package/dist/docx/title-bar.d.ts +3 -5
- package/dist/docx.js +66 -46
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -9
- package/dist/pptx/{chart-3d-view-scene-6B5TOWB6.mjs → chart-3d-view-scene-OYJ4CDCO.mjs} +3 -4
- package/dist/pptx/{chart-3d-view-scene-MJ6YNT56.cjs → chart-3d-view-scene-SE2Y6QRE.cjs} +38 -39
- package/dist/pptx/{chunk-AWKKC3VW.mjs → chunk-CIVA3MLN.mjs} +1 -1
- package/dist/pptx/{chunk-ZK344LOB.cjs → chunk-FPE5PZMI.cjs} +303 -155
- package/dist/pptx/{chunk-YRHK45AB.cjs → chunk-IURZJAWP.cjs} +233 -127
- package/dist/pptx/{chunk-XIQMFSNG.cjs → chunk-KRMMJUCO.cjs} +83 -1
- package/dist/pptx/{chunk-YI5LH5NN.mjs → chunk-MWHGUEIJ.mjs} +162 -16
- package/dist/pptx/{chunk-XQVKQD5Z.mjs → chunk-STLXPKJJ.mjs} +230 -128
- package/dist/pptx/{chunk-YMTQLZ2I.mjs → chunk-TC7HCF5M.mjs} +76 -2
- package/dist/pptx/{chunk-STKGUT5S.cjs → chunk-WKLHJEPD.cjs} +13 -13
- package/dist/pptx/dom/element-styles.d.ts.map +1 -1
- package/dist/pptx/dom/elements/connector.d.ts.map +1 -1
- package/dist/pptx/dom/elements/shape-filter-defs.d.ts.map +1 -1
- package/dist/pptx/dom/elements/table.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +254 -254
- package/dist/pptx/dom/index.mjs +26 -26
- package/dist/pptx/dom/slide-stage.d.ts.map +1 -1
- package/dist/pptx/export/html2canvas-clone.cjs +2 -2
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/index.cjs +3041 -3001
- package/dist/pptx/index.mjs +4 -4
- package/dist/pptx/render/chart-3d-oblique-layout.d.ts.map +1 -1
- package/dist/pptx/render/chart-3d-persp-bars.d.ts.map +1 -1
- package/dist/pptx/render/chart-3d-persp-layout.d.ts.map +1 -1
- package/dist/pptx/render/chart-bar-cluster-geometry.d.ts +1 -1
- package/dist/pptx/render/chart-bar-cluster-geometry.d.ts.map +1 -1
- package/dist/pptx/render/chart-cartesian-area.d.ts.map +1 -1
- package/dist/pptx/render/chart-cartesian-bars.d.ts.map +1 -1
- package/dist/pptx/render/chart-cartesian-line-area.d.ts.map +1 -1
- package/dist/pptx/render/chart-cartesian-stacked-labels.d.ts +11 -7
- package/dist/pptx/render/chart-cartesian-stacked-labels.d.ts.map +1 -1
- package/dist/pptx/render/chart-combo-stock.cjs +3 -3
- package/dist/pptx/render/chart-combo-stock.mjs +1 -1
- package/dist/pptx/render/chart-data-label-anchor.d.ts +4 -1
- package/dist/pptx/render/chart-data-label-anchor.d.ts.map +1 -1
- package/dist/pptx/render/chart-horizontal-bars.d.ts.map +1 -1
- package/dist/pptx/render/chart-line-path.d.ts +9 -0
- package/dist/pptx/render/chart-line-path.d.ts.map +1 -1
- package/dist/pptx/render/chart-overlays.cjs +7 -7
- package/dist/pptx/render/chart-overlays.mjs +1 -1
- package/dist/pptx/render/chart-plot-clip.d.ts +37 -0
- package/dist/pptx/render/chart-plot-clip.d.ts.map +1 -0
- package/dist/pptx/render/chart-surface-treemap.cjs +4 -4
- package/dist/pptx/render/chart-surface-treemap.mjs +1 -1
- package/dist/pptx/render/chart-view-model-bars.d.ts +3 -2
- package/dist/pptx/render/chart-view-model-bars.d.ts.map +1 -1
- package/dist/pptx/render/chart-view-model.cjs +44 -44
- package/dist/pptx/render/chart-view-model.mjs +1 -1
- package/dist/pptx/render/chart-waterfall-map.cjs +6 -6
- package/dist/pptx/render/chart-waterfall-map.mjs +1 -1
- package/dist/pptx/render/device-pixel-stroke.d.ts +101 -0
- package/dist/pptx/render/device-pixel-stroke.d.ts.map +1 -0
- package/dist/pptx/render/export-clone.d.ts +4 -0
- package/dist/pptx/render/export-clone.d.ts.map +1 -1
- package/dist/pptx/render/foreign-object-svg-document.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +2 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/stroke-outline.d.ts +6 -0
- package/dist/pptx/render/stroke-outline.d.ts.map +1 -1
- package/dist/pptx/render/stroke-style.d.ts +8 -2
- package/dist/pptx/render/stroke-style.d.ts.map +1 -1
- package/dist/pptx/render/tab-row-actions.d.ts +40 -0
- package/dist/pptx/render/tab-row-actions.d.ts.map +1 -0
- package/dist/pptx/render/table-style-borders.d.ts.map +1 -1
- package/dist/pptx/render/table-style.d.ts.map +1 -1
- package/dist/pptx/web-components/index.d.ts.map +1 -1
- package/dist/pptx/web-components/office-token-bridge.d.ts +1 -1
- package/dist/pptx/web-components/office-token-bridge.d.ts.map +1 -1
- package/dist/pptx/web-components/ribbon-actions.d.ts +8 -0
- package/dist/pptx/web-components/ribbon-actions.d.ts.map +1 -0
- package/dist/presence.js +3 -3
- package/dist/ribbon/ribbon-actions.d.ts +119 -0
- package/dist/ribbon/ribbon-actions.d.ts.map +1 -0
- package/dist/smartart.js +3 -3
- package/dist/teams.js +7 -7
- package/dist/theme.js +2 -2
- package/dist/tokens.d.ts +4 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/visio.js +6 -6
- package/dist/xlsx/calc-preparation.d.ts +44 -0
- package/dist/xlsx/editor-core.d.ts +3 -0
- package/dist/xlsx/ribbon-actions.d.ts +5 -4
- package/dist/xlsx.js +131 -44
- package/package.json +2 -2
package/dist/pptx/dom/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkFPE5PZMI_cjs = require('../chunk-FPE5PZMI.cjs');
|
|
4
4
|
require('../chunk-WSTWYZFM.cjs');
|
|
5
5
|
var chunk2JEQHIAL_cjs = require('../chunk-2JEQHIAL.cjs');
|
|
6
6
|
require('../chunk-IOR4KOGN.cjs');
|
|
7
7
|
require('../chunk-X7FS7XHU.cjs');
|
|
8
8
|
require('../chunk-UEF4BFW4.cjs');
|
|
9
9
|
require('../chunk-52LKIMK3.cjs');
|
|
10
|
-
var
|
|
10
|
+
var chunkWKLHJEPD_cjs = require('../chunk-WKLHJEPD.cjs');
|
|
11
11
|
require('../chunk-XOAXPD2W.cjs');
|
|
12
12
|
require('../chunk-P27CIE4O.cjs');
|
|
13
13
|
require('../chunk-BSGCZ4JZ.cjs');
|
|
@@ -17,12 +17,12 @@ require('../chunk-ZJFN5POF.cjs');
|
|
|
17
17
|
require('../chunk-STXGHV25.cjs');
|
|
18
18
|
require('../chunk-WB25PCHQ.cjs');
|
|
19
19
|
require('../chunk-W3X2UVYQ.cjs');
|
|
20
|
-
var
|
|
20
|
+
var chunkIURZJAWP_cjs = require('../chunk-IURZJAWP.cjs');
|
|
21
21
|
var chunkFOE75Z6N_cjs = require('../chunk-FOE75Z6N.cjs');
|
|
22
22
|
var chunkNTXHQHCS_cjs = require('../chunk-NTXHQHCS.cjs');
|
|
23
23
|
require('../chunk-JJP5HOLA.cjs');
|
|
24
24
|
require('../chunk-QWF3PGUX.cjs');
|
|
25
|
-
var
|
|
25
|
+
var chunkKRMMJUCO_cjs = require('../chunk-KRMMJUCO.cjs');
|
|
26
26
|
require('../chunk-G4WRLFMJ.cjs');
|
|
27
27
|
require('../chunk-73IDQGYI.cjs');
|
|
28
28
|
require('../chunk-X4FNVH7J.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 = chunkFPE5PZMI_cjs.getActiveXControlOverlayView(control, canvasSize, index);
|
|
99
99
|
const style = {
|
|
100
100
|
position: "absolute",
|
|
101
101
|
left: `${view.left}px`,
|
|
@@ -130,7 +130,7 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
130
130
|
pointerEvents: "none",
|
|
131
131
|
zIndex: "45"
|
|
132
132
|
});
|
|
133
|
-
const markers =
|
|
133
|
+
const markers = chunkFPE5PZMI_cjs.buildCommentMarkers(
|
|
134
134
|
comments,
|
|
135
135
|
canvasSize.width,
|
|
136
136
|
canvasSize.height,
|
|
@@ -139,10 +139,10 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
139
139
|
for (const marker of markers) {
|
|
140
140
|
const dot = createEl(doc, "button", "pptxv-comment-marker", {
|
|
141
141
|
position: "absolute",
|
|
142
|
-
left: `${marker.x -
|
|
143
|
-
top: `${marker.y -
|
|
144
|
-
width: `${
|
|
145
|
-
height: `${
|
|
142
|
+
left: `${marker.x - chunkFPE5PZMI_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
143
|
+
top: `${marker.y - chunkFPE5PZMI_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
144
|
+
width: `${chunkFPE5PZMI_cjs.COMMENT_MARKER_SIZE}px`,
|
|
145
|
+
height: `${chunkFPE5PZMI_cjs.COMMENT_MARKER_SIZE}px`,
|
|
146
146
|
display: "flex",
|
|
147
147
|
alignItems: "center",
|
|
148
148
|
justifyContent: "center",
|
|
@@ -210,7 +210,7 @@ function merge3dStyle(base, computed) {
|
|
|
210
210
|
}
|
|
211
211
|
function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
212
212
|
if (el.type === "group") {
|
|
213
|
-
const fx2 =
|
|
213
|
+
const fx2 = chunkFPE5PZMI_cjs.getComputedEffectStyle(el);
|
|
214
214
|
const groupStyle = {};
|
|
215
215
|
if (fx2.filter) {
|
|
216
216
|
groupStyle.filter = fx2.filter;
|
|
@@ -226,16 +226,16 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
226
226
|
const ss = el.shapeStyle;
|
|
227
227
|
const style = {};
|
|
228
228
|
if (ss) {
|
|
229
|
-
const fill = animatesFill ? void 0 :
|
|
229
|
+
const fill = animatesFill ? void 0 : chunkIURZJAWP_cjs.getComputedFillStyle(el);
|
|
230
230
|
for (const [key, value] of Object.entries(fill ?? {})) {
|
|
231
231
|
if (value !== void 0) {
|
|
232
232
|
style[key] = value;
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
const stroke =
|
|
235
|
+
const stroke = chunkFPE5PZMI_cjs.getComputedStrokeStyle(el);
|
|
236
236
|
if (stroke.borderWidth > 0) {
|
|
237
237
|
if (animatesStroke) {
|
|
238
|
-
style["borderWidth"] =
|
|
238
|
+
style["borderWidth"] = stroke.cssBorderWidth;
|
|
239
239
|
style["borderStyle"] = stroke.borderStyle ?? "solid";
|
|
240
240
|
} else {
|
|
241
241
|
style["border"] = stroke.border ?? "";
|
|
@@ -251,7 +251,7 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
251
251
|
style["strokeMiterlimit"] = stroke.strokeMiterlimit;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
const fx =
|
|
254
|
+
const fx = chunkFPE5PZMI_cjs.getComputedEffectStyle(el);
|
|
255
255
|
if (fx.boxShadow) {
|
|
256
256
|
style["boxShadow"] = fx.boxShadow;
|
|
257
257
|
}
|
|
@@ -268,11 +268,11 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
268
268
|
if (fx.overflowVisible) {
|
|
269
269
|
style["overflow"] = "visible";
|
|
270
270
|
}
|
|
271
|
-
merge3dStyle(style,
|
|
272
|
-
if (
|
|
271
|
+
merge3dStyle(style, chunkFPE5PZMI_cjs.getComputed3dStyle(el));
|
|
272
|
+
if (chunkFPE5PZMI_cjs.isHollowShapeElement(el)) {
|
|
273
273
|
style["pointerEvents"] = "none";
|
|
274
274
|
}
|
|
275
|
-
const geometry =
|
|
275
|
+
const geometry = chunkFPE5PZMI_cjs.resolveShapeGeometry(el);
|
|
276
276
|
switch (geometry.kind) {
|
|
277
277
|
case "bare":
|
|
278
278
|
style["backgroundColor"] = "transparent";
|
|
@@ -292,7 +292,11 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
292
292
|
case "lineEdge":
|
|
293
293
|
style["backgroundColor"] = "transparent";
|
|
294
294
|
style["border"] = "none";
|
|
295
|
-
style["borderTop"] =
|
|
295
|
+
style["borderTop"] = chunkKRMMJUCO_cjs.screenBorder(
|
|
296
|
+
geometry.strokeWidth,
|
|
297
|
+
chunkIURZJAWP_cjs.getCssBorderDashStyle(el.shapeStyle?.strokeDash),
|
|
298
|
+
el.shapeStyle?.strokeColor ?? chunkIURZJAWP_cjs.DEFAULT_STROKE_COLOR
|
|
299
|
+
);
|
|
296
300
|
return style;
|
|
297
301
|
default:
|
|
298
302
|
return style;
|
|
@@ -302,12 +306,12 @@ function getTextBlockStyle(el) {
|
|
|
302
306
|
if (!pptx.hasTextProperties(el)) {
|
|
303
307
|
return {};
|
|
304
308
|
}
|
|
305
|
-
const base =
|
|
306
|
-
fallbackColor:
|
|
309
|
+
const base = chunkFPE5PZMI_cjs.buildTextBlockStyle(el, {
|
|
310
|
+
fallbackColor: chunkIURZJAWP_cjs.DEFAULT_TEXT_COLOR,
|
|
307
311
|
bodyLayout: true,
|
|
308
312
|
pxLengths: true
|
|
309
313
|
});
|
|
310
|
-
const scene3d =
|
|
314
|
+
const scene3d = chunkFPE5PZMI_cjs.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height });
|
|
311
315
|
if (!scene3d) {
|
|
312
316
|
return base;
|
|
313
317
|
}
|
|
@@ -410,7 +414,9 @@ function renderSlideStage(options) {
|
|
|
410
414
|
"--pptx-slide-w": `${canvasSize.width}px`,
|
|
411
415
|
"--pptx-slide-h": `${canvasSize.height}px`,
|
|
412
416
|
"--pptxv-grid-size": `${options.gridSpacingPx ?? 10}px`,
|
|
413
|
-
|
|
417
|
+
// One device pixel in slide px: thin strokes stay visible on screen.
|
|
418
|
+
...chunkKRMMJUCO_cjs.deviceStrokeStageStyle(scale),
|
|
419
|
+
...chunkFPE5PZMI_cjs.getSlideBackgroundStyle(slide, { widthPx: canvasSize.width, heightPx: canvasSize.height })
|
|
414
420
|
});
|
|
415
421
|
if (interactive || options.reading) {
|
|
416
422
|
stage.setAttribute("role", "region");
|
|
@@ -451,19 +457,19 @@ function renderSlideStage(options) {
|
|
|
451
457
|
selectedElementIds: options.selectedElementIds,
|
|
452
458
|
registry,
|
|
453
459
|
renderElement(element, zIndex) {
|
|
454
|
-
if (!
|
|
460
|
+
if (!chunkFPE5PZMI_cjs.isElementRendered(element)) {
|
|
455
461
|
return null;
|
|
456
462
|
}
|
|
457
463
|
const node = registry.resolve(element.type)(element, zIndex, context);
|
|
458
464
|
if (node && interactive && "setAttribute" in node) {
|
|
459
|
-
const templateLocked =
|
|
465
|
+
const templateLocked = chunkFPE5PZMI_cjs.isTemplateElementId(element.id) && !options.templateEditing;
|
|
460
466
|
if (templateLocked) {
|
|
461
467
|
node.style.pointerEvents = "none";
|
|
462
468
|
}
|
|
463
469
|
node.setAttribute("data-pptx-element", "true");
|
|
464
470
|
}
|
|
465
|
-
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" &&
|
|
466
|
-
const hitTargetStyle =
|
|
471
|
+
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" && chunkFPE5PZMI_cjs.shouldRenderHitTarget(interactive, options.presenting ?? false)) {
|
|
472
|
+
const hitTargetStyle = chunkFPE5PZMI_cjs.elementHitTargetStyle(element);
|
|
467
473
|
if (hitTargetStyle) {
|
|
468
474
|
const hitTarget = createEl(doc, "div", void 0, hitTargetStyle);
|
|
469
475
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
@@ -482,20 +488,20 @@ function renderSlideStage(options) {
|
|
|
482
488
|
}
|
|
483
489
|
});
|
|
484
490
|
if (interactive || options.reading) {
|
|
485
|
-
|
|
491
|
+
chunkFPE5PZMI_cjs.applyRenderedElementAccessibility(stage, slide.elements, {
|
|
486
492
|
presenting: options.presenting ?? false
|
|
487
493
|
});
|
|
488
494
|
}
|
|
489
495
|
if (interactive) {
|
|
490
|
-
|
|
496
|
+
chunkFPE5PZMI_cjs.applyElementActionAffordances(
|
|
491
497
|
stage,
|
|
492
498
|
slide.elements.filter(
|
|
493
|
-
(element) => options.templateEditing || !
|
|
499
|
+
(element) => options.templateEditing || !chunkFPE5PZMI_cjs.isTemplateElementId(element.id)
|
|
494
500
|
),
|
|
495
501
|
{
|
|
496
502
|
canInteract: true,
|
|
497
503
|
presenting: options.presenting ?? false,
|
|
498
|
-
labels:
|
|
504
|
+
labels: chunkFPE5PZMI_cjs.actionAffordanceLabels((key) => t(key))
|
|
499
505
|
}
|
|
500
506
|
);
|
|
501
507
|
}
|
|
@@ -551,7 +557,7 @@ function createChartTitleEditor(container, onCommit) {
|
|
|
551
557
|
|
|
552
558
|
// src/pptx/dom/elements/chart-editable.ts
|
|
553
559
|
function attachChartEditing(container, element, context, repaint) {
|
|
554
|
-
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !
|
|
560
|
+
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !chunkFPE5PZMI_cjs.canDrillDown(element)) {
|
|
555
561
|
return;
|
|
556
562
|
}
|
|
557
563
|
const chart = element;
|
|
@@ -561,13 +567,13 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
561
567
|
if (!context.selectedElementIds?.has(element.id)) {
|
|
562
568
|
return;
|
|
563
569
|
}
|
|
564
|
-
|
|
565
|
-
container.classList.add(
|
|
570
|
+
chunkWKLHJEPD_cjs.ensureChartInteractionStyles();
|
|
571
|
+
container.classList.add(chunkWKLHJEPD_cjs.CHART_INTERACTIVE_CLASS);
|
|
566
572
|
let active = null;
|
|
567
573
|
let activeMark = null;
|
|
568
574
|
let selected = context.chartPartSelection?.elementId === element.id ? context.chartPartSelection.part : null;
|
|
569
575
|
let badge = null;
|
|
570
|
-
|
|
576
|
+
chunkWKLHJEPD_cjs.applyChartPartHighlight(container, selected);
|
|
571
577
|
const showBadge = (text) => {
|
|
572
578
|
if (!badge) {
|
|
573
579
|
badge = container.ownerDocument.createElement("div");
|
|
@@ -591,26 +597,26 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
591
597
|
if (!rect) {
|
|
592
598
|
return;
|
|
593
599
|
}
|
|
594
|
-
const step2 =
|
|
600
|
+
const step2 = chunkFPE5PZMI_cjs.advanceChartMarkDrag(activeMark, event.clientX, event.clientY, rect);
|
|
595
601
|
if (!step2) {
|
|
596
602
|
return;
|
|
597
603
|
}
|
|
598
604
|
repaint(step2.chartData);
|
|
599
|
-
|
|
600
|
-
showBadge(
|
|
605
|
+
chunkWKLHJEPD_cjs.applyChartPartHighlight(container, selected);
|
|
606
|
+
showBadge(chunkIURZJAWP_cjs.formatAxisValue(step2.value));
|
|
601
607
|
return;
|
|
602
608
|
}
|
|
603
609
|
if (!active) {
|
|
604
610
|
return;
|
|
605
611
|
}
|
|
606
612
|
const height = container.querySelector("svg")?.getBoundingClientRect().height ?? 0;
|
|
607
|
-
const step =
|
|
613
|
+
const step = chunkWKLHJEPD_cjs.advanceChartValueDrag(active, event.clientY, height);
|
|
608
614
|
if (!step) {
|
|
609
615
|
return;
|
|
610
616
|
}
|
|
611
617
|
repaint(step.chartData);
|
|
612
|
-
|
|
613
|
-
showBadge(
|
|
618
|
+
chunkWKLHJEPD_cjs.applyChartPartHighlight(container, selected);
|
|
619
|
+
showBadge(chunkIURZJAWP_cjs.formatAxisValue(step.value));
|
|
614
620
|
};
|
|
615
621
|
const onUp = () => {
|
|
616
622
|
if (active || activeMark) {
|
|
@@ -636,12 +642,12 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
636
642
|
}
|
|
637
643
|
if ((finished?.moved || finishedMark?.moved) && chart.chartData) {
|
|
638
644
|
repaint(chart.chartData);
|
|
639
|
-
|
|
645
|
+
chunkWKLHJEPD_cjs.applyChartPartHighlight(container, selected);
|
|
640
646
|
}
|
|
641
647
|
}
|
|
642
648
|
const openTitleEditor = createChartTitleEditor(container, (value) => {
|
|
643
649
|
if (chart.chartData) {
|
|
644
|
-
context.onChartPointChange?.(element,
|
|
650
|
+
context.onChartPointChange?.(element, chunkWKLHJEPD_cjs.withChartTitle(chart.chartData, value));
|
|
645
651
|
}
|
|
646
652
|
});
|
|
647
653
|
container.addEventListener("dblclick", (event) => {
|
|
@@ -656,24 +662,24 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
656
662
|
}
|
|
657
663
|
return;
|
|
658
664
|
}
|
|
659
|
-
if (
|
|
665
|
+
if (chunkWKLHJEPD_cjs.findChartPartTarget(event.target)) {
|
|
660
666
|
event.stopPropagation();
|
|
661
667
|
}
|
|
662
668
|
});
|
|
663
669
|
container.addEventListener("pointerdown", (event) => {
|
|
664
|
-
const part =
|
|
670
|
+
const part = chunkWKLHJEPD_cjs.findChartPartTarget(event.target);
|
|
665
671
|
if (!part || !chart.chartData) {
|
|
666
672
|
return;
|
|
667
673
|
}
|
|
668
674
|
event.stopPropagation();
|
|
669
675
|
selected = part;
|
|
670
|
-
|
|
676
|
+
chunkWKLHJEPD_cjs.applyChartPartHighlight(container, selected);
|
|
671
677
|
context.onChartPartSelect?.(element, part);
|
|
672
|
-
const vm =
|
|
678
|
+
const vm = chunkIURZJAWP_cjs.buildChartViewModel(chart);
|
|
673
679
|
let captured = false;
|
|
674
|
-
const chartKind =
|
|
680
|
+
const chartKind = chunkIURZJAWP_cjs.resolveChartKind(chart.chartData.chartType ?? "bar");
|
|
675
681
|
if (part.pointIndex !== void 0 && chartKind !== "unsupported") {
|
|
676
|
-
const markGeometry =
|
|
682
|
+
const markGeometry = chunkWKLHJEPD_cjs.buildChartMarkDragGeometry({
|
|
677
683
|
kind: chartKind,
|
|
678
684
|
element: chart,
|
|
679
685
|
chartData: chart.chartData,
|
|
@@ -681,7 +687,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
681
687
|
seriesIndex: part.seriesIndex,
|
|
682
688
|
pointIndex: part.pointIndex
|
|
683
689
|
});
|
|
684
|
-
const startedMark =
|
|
690
|
+
const startedMark = chunkFPE5PZMI_cjs.beginChartMarkDrag({
|
|
685
691
|
part,
|
|
686
692
|
geometry: markGeometry,
|
|
687
693
|
chartData: chart.chartData,
|
|
@@ -696,7 +702,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
696
702
|
}
|
|
697
703
|
}
|
|
698
704
|
if (!captured) {
|
|
699
|
-
const started =
|
|
705
|
+
const started = chunkWKLHJEPD_cjs.beginChartValueDrag({
|
|
700
706
|
part,
|
|
701
707
|
viewModel: vm,
|
|
702
708
|
chartData: chart.chartData,
|
|
@@ -726,7 +732,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
726
732
|
var pool = null;
|
|
727
733
|
function collectThreeViews(root) {
|
|
728
734
|
const views = /* @__PURE__ */ new Map();
|
|
729
|
-
for (const view of root.querySelectorAll(
|
|
735
|
+
for (const view of root.querySelectorAll(chunkKRMMJUCO_cjs.THREE_VIEW_TAG)) {
|
|
730
736
|
if (view.spec && !views.has(view.spec)) {
|
|
731
737
|
views.set(view.spec, view);
|
|
732
738
|
}
|
|
@@ -762,8 +768,8 @@ function rendering3DFlagsOf(context) {
|
|
|
762
768
|
};
|
|
763
769
|
}
|
|
764
770
|
function mountThreeViewInto(doc, wrapper, options) {
|
|
765
|
-
|
|
766
|
-
const view = takeReusableThreeView(options.spec) ?? doc.createElement(
|
|
771
|
+
chunkKRMMJUCO_cjs.defineThreeViewElement(doc.defaultView?.customElements);
|
|
772
|
+
const view = takeReusableThreeView(options.spec) ?? doc.createElement(chunkKRMMJUCO_cjs.THREE_VIEW_TAG);
|
|
767
773
|
view.replaceChildren(...Array.from(wrapper.childNodes));
|
|
768
774
|
view.spec = options.spec;
|
|
769
775
|
view.interactive = options.interactive;
|
|
@@ -773,7 +779,7 @@ function mountThreeViewInto(doc, wrapper, options) {
|
|
|
773
779
|
return view;
|
|
774
780
|
}
|
|
775
781
|
function isChart3DEditable(element, context) {
|
|
776
|
-
return element.type === "chart" && Boolean(context.interactive) && Boolean(context.onChartPointChange) && Boolean(context.selectedElementIds?.has(element.id)) &&
|
|
782
|
+
return element.type === "chart" && Boolean(context.interactive) && Boolean(context.onChartPointChange) && Boolean(context.selectedElementIds?.has(element.id)) && chunkFPE5PZMI_cjs.canDrillDown(element);
|
|
777
783
|
}
|
|
778
784
|
function selectedChartPartOf(element, context) {
|
|
779
785
|
return context.chartPartSelection?.elementId === element.id ? context.chartPartSelection.part : null;
|
|
@@ -807,7 +813,7 @@ function wireChartThreeViewEvents(view, element, context, badgeHost) {
|
|
|
807
813
|
badge.className = "pptxv-chart-drag-badge";
|
|
808
814
|
badgeHost.appendChild(badge);
|
|
809
815
|
}
|
|
810
|
-
badge.textContent =
|
|
816
|
+
badge.textContent = chunkIURZJAWP_cjs.formatAxisValue(value);
|
|
811
817
|
},
|
|
812
818
|
commitChartData: (next) => context.onChartPointChange?.(element, next)
|
|
813
819
|
};
|
|
@@ -815,19 +821,19 @@ function wireChartThreeViewEvents(view, element, context, badgeHost) {
|
|
|
815
821
|
const listeners = new AbortController();
|
|
816
822
|
chartViewListeners.set(view, listeners);
|
|
817
823
|
view.addEventListener(
|
|
818
|
-
|
|
819
|
-
(event) =>
|
|
824
|
+
chunkFPE5PZMI_cjs.THREE_VIEW_EVENTS.select,
|
|
825
|
+
(event) => chunkFPE5PZMI_cjs.applyChart3DSelect(bridge, event.detail.part),
|
|
820
826
|
{ signal: listeners.signal }
|
|
821
827
|
);
|
|
822
828
|
view.addEventListener(
|
|
823
|
-
|
|
824
|
-
(event) =>
|
|
829
|
+
chunkFPE5PZMI_cjs.THREE_VIEW_EVENTS.drag,
|
|
830
|
+
(event) => chunkFPE5PZMI_cjs.applyChart3DDrag(bridge, event.detail),
|
|
825
831
|
{ signal: listeners.signal }
|
|
826
832
|
);
|
|
827
833
|
}
|
|
828
834
|
var chartViewListeners = /* @__PURE__ */ new WeakMap();
|
|
829
835
|
function applyThreeViewTextStyle(el, style) {
|
|
830
|
-
for (const view of el.querySelectorAll(
|
|
836
|
+
for (const view of el.querySelectorAll(chunkKRMMJUCO_cjs.THREE_VIEW_TAG)) {
|
|
831
837
|
view.textStyle = style;
|
|
832
838
|
}
|
|
833
839
|
}
|
|
@@ -835,7 +841,7 @@ function applyThreeViewTextStyle(el, style) {
|
|
|
835
841
|
// src/pptx/dom/elements/chart.ts
|
|
836
842
|
var renderChartElement = (element, zIndex, context) => {
|
|
837
843
|
const wrapper = renderChartSvgElement(element, zIndex, context);
|
|
838
|
-
const spec = wrapper ?
|
|
844
|
+
const spec = wrapper ? chunkFPE5PZMI_cjs.resolveChartThreeViewSpec(element, rendering3DFlagsOf(context)) : null;
|
|
839
845
|
if (!wrapper || !spec) {
|
|
840
846
|
return wrapper;
|
|
841
847
|
}
|
|
@@ -857,16 +863,16 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
857
863
|
doc,
|
|
858
864
|
"div",
|
|
859
865
|
"pptxv-element pptxv-chart",
|
|
860
|
-
|
|
866
|
+
chunkFPE5PZMI_cjs.getContainerStyle(element, zIndex)
|
|
861
867
|
);
|
|
862
868
|
container.dataset.elementId = element.id;
|
|
863
869
|
const animationState = context.presentationStates?.get(element.id);
|
|
864
|
-
const chartData = element.chartData ?
|
|
870
|
+
const chartData = element.chartData ? chunkFPE5PZMI_cjs.resolveRevealedChartData(element.chartData, animationState) : element.chartData;
|
|
865
871
|
if (!chartData || chartData.series.length === 0) {
|
|
866
872
|
container.appendChild(renderChartPlaceholder(doc, chartData?.chartType ?? "bar", context.t));
|
|
867
873
|
return container;
|
|
868
874
|
}
|
|
869
|
-
const kind =
|
|
875
|
+
const kind = chunkIURZJAWP_cjs.resolveChartKind(chartData.chartType ?? "bar");
|
|
870
876
|
if (kind === "unsupported") {
|
|
871
877
|
container.appendChild(renderChartPlaceholder(doc, chartData.chartType, context.t));
|
|
872
878
|
return container;
|
|
@@ -879,12 +885,12 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
879
885
|
};
|
|
880
886
|
container.querySelector("svg")?.remove();
|
|
881
887
|
container.appendChild(
|
|
882
|
-
|
|
888
|
+
chunkWKLHJEPD_cjs.renderChartViewModelSvg(doc, chunkIURZJAWP_cjs.buildChartViewModel(themedElement), preserveAspectRatio)
|
|
883
889
|
);
|
|
884
890
|
};
|
|
885
891
|
paint(chartData);
|
|
886
892
|
attachChartEditing(container, element, context, paint);
|
|
887
|
-
const unsubscribe =
|
|
893
|
+
const unsubscribe = chunkIURZJAWP_cjs.subscribeBarFacePicturePixelSamples(() => {
|
|
888
894
|
if (!container.isConnected) {
|
|
889
895
|
unsubscribe();
|
|
890
896
|
return;
|
|
@@ -894,7 +900,7 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
894
900
|
return container;
|
|
895
901
|
};
|
|
896
902
|
function resolveChartPalette2(chartData) {
|
|
897
|
-
return
|
|
903
|
+
return chunkIURZJAWP_cjs.resolveChartPalette(chartData);
|
|
898
904
|
}
|
|
899
905
|
function renderChartPlaceholder(doc, chartType, t) {
|
|
900
906
|
const placeholder = createEl(doc, "div", "pptxv-placeholder pptxv-chart-placeholder", {
|
|
@@ -909,7 +915,7 @@ function renderChartPlaceholder(doc, chartType, t) {
|
|
|
909
915
|
border: "1px dashed #cbd5e1",
|
|
910
916
|
boxSizing: "border-box"
|
|
911
917
|
});
|
|
912
|
-
placeholder.textContent =
|
|
918
|
+
placeholder.textContent = chunkFPE5PZMI_cjs.chartPlaceholderLabel(chartType, (key, params) => t(key, params));
|
|
913
919
|
return placeholder;
|
|
914
920
|
}
|
|
915
921
|
|
|
@@ -973,7 +979,7 @@ function createRunBaseNode(doc, run) {
|
|
|
973
979
|
verticalAlign: "middle",
|
|
974
980
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
975
981
|
});
|
|
976
|
-
math.innerHTML =
|
|
982
|
+
math.innerHTML = chunkFPE5PZMI_cjs.runEquationMathMl(run.equation);
|
|
977
983
|
host.appendChild(math);
|
|
978
984
|
if (run.equation.number) {
|
|
979
985
|
const number = createEl(doc, "span", "pptxv-equation-number", {
|
|
@@ -1085,7 +1091,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1085
1091
|
bullet.textContent = para.bulletMarker;
|
|
1086
1092
|
p.appendChild(bullet);
|
|
1087
1093
|
}
|
|
1088
|
-
const spec = build ?
|
|
1094
|
+
const spec = build ? chunkFPE5PZMI_cjs.buildTextBuildSpec(
|
|
1089
1095
|
build.elementId,
|
|
1090
1096
|
paragraphs.indexOf(para),
|
|
1091
1097
|
para.runs.filter((run) => run.text !== NEWLINE_RUN).map((run) => ({ text: run.text, style: run.style })),
|
|
@@ -1094,7 +1100,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1094
1100
|
if (spec && spec.granularity !== "paragraph") {
|
|
1095
1101
|
for (const span of spec.spans ?? []) {
|
|
1096
1102
|
const node = createEl(doc, "span");
|
|
1097
|
-
applyStyleMap(node, { ...span.style ?? {}, ...
|
|
1103
|
+
applyStyleMap(node, { ...span.style ?? {}, ...chunkFPE5PZMI_cjs.textBuildSpanStyle(span) });
|
|
1098
1104
|
if (span.animId) {
|
|
1099
1105
|
node.setAttribute("data-anim-id", span.animId);
|
|
1100
1106
|
}
|
|
@@ -1107,7 +1113,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1107
1113
|
let runHost = p;
|
|
1108
1114
|
if (spec) {
|
|
1109
1115
|
const wrapper = createEl(doc, "span");
|
|
1110
|
-
applyStyleMap(wrapper,
|
|
1116
|
+
applyStyleMap(wrapper, chunkFPE5PZMI_cjs.textBuildSpanStyle(spec));
|
|
1111
1117
|
if (spec.animId) {
|
|
1112
1118
|
wrapper.setAttribute("data-anim-id", spec.animId);
|
|
1113
1119
|
}
|
|
@@ -1134,9 +1140,9 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1134
1140
|
const doc = context.document;
|
|
1135
1141
|
const ss = pptx.hasShapeProperties(element) ? element.shapeStyle : void 0;
|
|
1136
1142
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
1137
|
-
const strokeColor = ss?.strokeColor ??
|
|
1143
|
+
const strokeColor = ss?.strokeColor ?? chunkIURZJAWP_cjs.DEFAULT_STROKE_COLOR;
|
|
1138
1144
|
const strokeOpacity = ss?.strokeOpacity ?? 1;
|
|
1139
|
-
const dashArray =
|
|
1145
|
+
const dashArray = chunkIURZJAWP_cjs.buildDashArray(ss?.strokeDash, strokeWidth, ss?.customDashSegments);
|
|
1140
1146
|
const w = Math.max(element.width, 1);
|
|
1141
1147
|
const h = Math.max(element.height, 1);
|
|
1142
1148
|
const wrapper = createEl(doc, "div", "pptxv-element pptxv-connector", {
|
|
@@ -1163,7 +1169,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1163
1169
|
if (element.hidden) {
|
|
1164
1170
|
wrapper.style.display = "none";
|
|
1165
1171
|
}
|
|
1166
|
-
const lineGlow =
|
|
1172
|
+
const lineGlow = chunkFPE5PZMI_cjs.getLineGlowFilterCss(ss);
|
|
1167
1173
|
if (lineGlow) {
|
|
1168
1174
|
wrapper.style.filter = lineGlow;
|
|
1169
1175
|
}
|
|
@@ -1171,7 +1177,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1171
1177
|
svg.setAttribute("style", "overflow:visible;display:block");
|
|
1172
1178
|
const seed = element.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
1173
1179
|
const defs = createSvgEl(doc, "defs");
|
|
1174
|
-
const lineShadow =
|
|
1180
|
+
const lineShadow = chunkFPE5PZMI_cjs.getLineShadowParams(ss);
|
|
1175
1181
|
const shadowId = lineShadow ? `${seed}-line-shadow` : void 0;
|
|
1176
1182
|
if (lineShadow && shadowId) {
|
|
1177
1183
|
const filter = createSvgEl(doc, "filter", {
|
|
@@ -1192,8 +1198,8 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1192
1198
|
);
|
|
1193
1199
|
defs.appendChild(filter);
|
|
1194
1200
|
}
|
|
1195
|
-
const startArrow =
|
|
1196
|
-
const endArrow =
|
|
1201
|
+
const startArrow = chunkFPE5PZMI_cjs.normalizeArrow(ss?.connectorStartArrow);
|
|
1202
|
+
const endArrow = chunkFPE5PZMI_cjs.normalizeArrow(ss?.connectorEndArrow);
|
|
1197
1203
|
const startMarkerId = startArrow ? `${seed}-start` : void 0;
|
|
1198
1204
|
const endMarkerId = endArrow ? `${seed}-end` : void 0;
|
|
1199
1205
|
if (startArrow && startMarkerId) {
|
|
@@ -1216,10 +1222,10 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1216
1222
|
svg.appendChild(defs);
|
|
1217
1223
|
}
|
|
1218
1224
|
const compound = ss?.compoundLine;
|
|
1219
|
-
const offsets =
|
|
1220
|
-
const widths =
|
|
1225
|
+
const offsets = chunkFPE5PZMI_cjs.getCompoundLineOffsets(compound, strokeWidth);
|
|
1226
|
+
const widths = chunkFPE5PZMI_cjs.getCompoundLineWidths(compound, strokeWidth);
|
|
1221
1227
|
const shapeType = pptx.hasShapeProperties(element) ? element.shapeType : void 0;
|
|
1222
|
-
const usePath =
|
|
1228
|
+
const usePath = chunkFPE5PZMI_cjs.connectorNeedsPath(shapeType) && pptx.hasShapeProperties(element);
|
|
1223
1229
|
const pathData = usePath ? pptx.getConnectorPathGeometry(element).pathData : void 0;
|
|
1224
1230
|
const x1 = element.flipHorizontal ? w : 0;
|
|
1225
1231
|
const y1 = element.flipVertical ? h : 0;
|
|
@@ -1230,17 +1236,18 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1230
1236
|
d: pathData ?? `M${x1},${y1} L${x2},${y2}`,
|
|
1231
1237
|
fill: "none",
|
|
1232
1238
|
stroke: "transparent",
|
|
1233
|
-
"stroke-width":
|
|
1239
|
+
"stroke-width": chunkFPE5PZMI_cjs.connectorHitStrokeWidth(strokeWidth),
|
|
1234
1240
|
"stroke-linecap": "round",
|
|
1235
1241
|
"stroke-linejoin": "round"
|
|
1236
1242
|
});
|
|
1237
1243
|
hit.style.pointerEvents = "stroke";
|
|
1238
1244
|
svg.appendChild(hit);
|
|
1239
1245
|
offsets.forEach((offset, idx) => {
|
|
1246
|
+
const strandWidth = Math.max(widths[idx] ?? strokeWidth, 1);
|
|
1240
1247
|
const stroke = {
|
|
1241
1248
|
// Inherit the wrapper's base stroke so a colour animation cascades.
|
|
1242
1249
|
stroke: "inherit",
|
|
1243
|
-
"stroke-width":
|
|
1250
|
+
"stroke-width": strandWidth,
|
|
1244
1251
|
"stroke-opacity": strokeOpacity,
|
|
1245
1252
|
"stroke-dasharray": dashArray,
|
|
1246
1253
|
"stroke-linecap": "round",
|
|
@@ -1268,6 +1275,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1268
1275
|
...stroke
|
|
1269
1276
|
});
|
|
1270
1277
|
}
|
|
1278
|
+
node.style.setProperty("stroke-width", chunkKRMMJUCO_cjs.screenStrokeWidth(strandWidth));
|
|
1271
1279
|
svg.appendChild(node);
|
|
1272
1280
|
});
|
|
1273
1281
|
wrapper.appendChild(svg);
|
|
@@ -1278,7 +1286,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1278
1286
|
if (!pptx.hasTextProperties(element)) {
|
|
1279
1287
|
return;
|
|
1280
1288
|
}
|
|
1281
|
-
const paragraphs =
|
|
1289
|
+
const paragraphs = chunkFPE5PZMI_cjs.buildParagraphs(element, context.fieldContext);
|
|
1282
1290
|
if (!paragraphs.some((paragraph) => paragraph.runs.length > 0)) {
|
|
1283
1291
|
return;
|
|
1284
1292
|
}
|
|
@@ -1298,7 +1306,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1298
1306
|
}
|
|
1299
1307
|
function buildMarker(context, id, arrow, strokeColor, size) {
|
|
1300
1308
|
const doc = context.document;
|
|
1301
|
-
const shape =
|
|
1309
|
+
const shape = chunkFPE5PZMI_cjs.markerPath(arrow, size.width, size.length);
|
|
1302
1310
|
const marker = createSvgEl(doc, "marker", {
|
|
1303
1311
|
id,
|
|
1304
1312
|
viewBox: "0 0 10 10",
|
|
@@ -1382,7 +1390,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1382
1390
|
doc,
|
|
1383
1391
|
"div",
|
|
1384
1392
|
"pptxv-element pptxv-contentpart",
|
|
1385
|
-
|
|
1393
|
+
chunkFPE5PZMI_cjs.getContainerStyle(element, zIndex)
|
|
1386
1394
|
);
|
|
1387
1395
|
el.dataset.elementId = element.id;
|
|
1388
1396
|
const strokes = element.inkStrokes;
|
|
@@ -1415,7 +1423,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1415
1423
|
return el;
|
|
1416
1424
|
};
|
|
1417
1425
|
function renderEquations(element, context) {
|
|
1418
|
-
if (!pptx.hasTextProperties(element) || !
|
|
1426
|
+
if (!pptx.hasTextProperties(element) || !chunkFPE5PZMI_cjs.isEquationOnlyText(element.textSegments)) {
|
|
1419
1427
|
return null;
|
|
1420
1428
|
}
|
|
1421
1429
|
const equations = (element.textSegments ?? []).filter((segment) => segment.equationXml);
|
|
@@ -1429,7 +1437,7 @@ function renderEquations(element, context) {
|
|
|
1429
1437
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
1430
1438
|
});
|
|
1431
1439
|
for (const segment of equations) {
|
|
1432
|
-
const mathml =
|
|
1440
|
+
const mathml = chunkFPE5PZMI_cjs.convertOmmlToMathMl(segment.equationXml);
|
|
1433
1441
|
if (!mathml) {
|
|
1434
1442
|
continue;
|
|
1435
1443
|
}
|
|
@@ -1443,7 +1451,7 @@ function renderEquations(element, context) {
|
|
|
1443
1451
|
flex: 1,
|
|
1444
1452
|
textAlign: "center"
|
|
1445
1453
|
});
|
|
1446
|
-
math.innerHTML =
|
|
1454
|
+
math.innerHTML = chunkFPE5PZMI_cjs.sanitizeMathMl(mathml);
|
|
1447
1455
|
row.appendChild(math);
|
|
1448
1456
|
if (segment.equationNumber) {
|
|
1449
1457
|
const number = createEl(context.document, "span", "pptxv-equation-number", {
|
|
@@ -1460,8 +1468,8 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1460
1468
|
if (!pptx.hasShapeProperties(element)) {
|
|
1461
1469
|
return null;
|
|
1462
1470
|
}
|
|
1463
|
-
const fill =
|
|
1464
|
-
const data =
|
|
1471
|
+
const fill = chunkIURZJAWP_cjs.getComputedFillStyle(element)?.backgroundColor;
|
|
1472
|
+
const data = chunkFPE5PZMI_cjs.build3DExtrusionData(
|
|
1465
1473
|
element.shapeStyle?.shape3d,
|
|
1466
1474
|
element.shapeStyle?.scene3d,
|
|
1467
1475
|
fill,
|
|
@@ -1523,7 +1531,7 @@ function appendOwnReflection(doc, host, element, mediaDataUrls, suppressOwnRefle
|
|
|
1523
1531
|
if (suppressOwnReflection) {
|
|
1524
1532
|
return;
|
|
1525
1533
|
}
|
|
1526
|
-
const wrapperStyle =
|
|
1534
|
+
const wrapperStyle = chunkFPE5PZMI_cjs.getComputedEffectStyle(element).reflection;
|
|
1527
1535
|
if (!wrapperStyle) {
|
|
1528
1536
|
return;
|
|
1529
1537
|
}
|
|
@@ -1547,9 +1555,9 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1547
1555
|
if (groupFilterDefs) {
|
|
1548
1556
|
wrap.appendChild(groupFilterDefs);
|
|
1549
1557
|
}
|
|
1550
|
-
const childParentFill =
|
|
1558
|
+
const childParentFill = chunkFPE5PZMI_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1551
1559
|
for (const child of element.children ?? []) {
|
|
1552
|
-
const childWrap = createEl(doc, "div", void 0,
|
|
1560
|
+
const childWrap = createEl(doc, "div", void 0, chunkFPE5PZMI_cjs.getContainerStyle(child, 0));
|
|
1553
1561
|
childWrap.appendChild(
|
|
1554
1562
|
buildReflectionMirrorContent(doc, child, mediaDataUrls, childParentFill)
|
|
1555
1563
|
);
|
|
@@ -1563,7 +1571,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1563
1571
|
height: "100%",
|
|
1564
1572
|
...getShapeFillStrokeStyle(element)
|
|
1565
1573
|
});
|
|
1566
|
-
const inheritedFill =
|
|
1574
|
+
const inheritedFill = chunkFPE5PZMI_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1567
1575
|
if (inheritedFill) {
|
|
1568
1576
|
applyInheritedFill(box, inheritedFill);
|
|
1569
1577
|
}
|
|
@@ -1584,12 +1592,12 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1584
1592
|
box.appendChild(gradientOutline);
|
|
1585
1593
|
}
|
|
1586
1594
|
if (pptx.isImageLikeElement(element)) {
|
|
1587
|
-
const src =
|
|
1595
|
+
const src = chunkFPE5PZMI_cjs.getImageSrc(element, new Map(mediaDataUrls));
|
|
1588
1596
|
if (src) {
|
|
1589
1597
|
const img = createEl(doc, "img", void 0, {
|
|
1590
1598
|
width: "100%",
|
|
1591
1599
|
height: "100%",
|
|
1592
|
-
...
|
|
1600
|
+
...chunkFPE5PZMI_cjs.getImageFitStyle(element)
|
|
1593
1601
|
});
|
|
1594
1602
|
img.setAttribute("src", src);
|
|
1595
1603
|
img.setAttribute("alt", "");
|
|
@@ -1599,7 +1607,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1599
1607
|
appendOwnReflection(doc, box, element, mediaDataUrls, suppressOwnReflection);
|
|
1600
1608
|
return box;
|
|
1601
1609
|
}
|
|
1602
|
-
const paragraphs =
|
|
1610
|
+
const paragraphs = chunkFPE5PZMI_cjs.buildParagraphs(element);
|
|
1603
1611
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
1604
1612
|
if (hasText) {
|
|
1605
1613
|
box.appendChild(renderTextBlock(doc, paragraphs, getTextBlockStyle(element)));
|
|
@@ -1611,20 +1619,20 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1611
1619
|
// src/pptx/dom/elements/shape-filter-defs.ts
|
|
1612
1620
|
var OUTLINE_SVG_STYLE = "position:absolute;inset:0;width:100%;height:100%;min-width:1px;min-height:1px;overflow:visible;pointer-events:none";
|
|
1613
1621
|
function renderShapeFilterDefs(doc, element) {
|
|
1614
|
-
const style =
|
|
1622
|
+
const style = chunkFPE5PZMI_cjs.getEffectStyleSource(element);
|
|
1615
1623
|
if (!style) {
|
|
1616
1624
|
return null;
|
|
1617
1625
|
}
|
|
1618
1626
|
const markups = [];
|
|
1619
|
-
const duotone =
|
|
1627
|
+
const duotone = chunkFPE5PZMI_cjs.getDuotoneSvgFilter(style, element.id);
|
|
1620
1628
|
if (duotone) {
|
|
1621
1629
|
markups.push(duotone.filterMarkup);
|
|
1622
1630
|
}
|
|
1623
|
-
const softEdge =
|
|
1631
|
+
const softEdge = chunkFPE5PZMI_cjs.getSoftEdgeSvgFilter(style, element.id);
|
|
1624
1632
|
if (softEdge) {
|
|
1625
1633
|
markups.push(softEdge.filterMarkup);
|
|
1626
1634
|
}
|
|
1627
|
-
const bevelLighting =
|
|
1635
|
+
const bevelLighting = chunkFPE5PZMI_cjs.getBevelLightingSvgFilter(element);
|
|
1628
1636
|
if (bevelLighting) {
|
|
1629
1637
|
markups.push(bevelLighting.filterMarkup);
|
|
1630
1638
|
}
|
|
@@ -1642,7 +1650,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1642
1650
|
if (!pptx.hasShapeProperties(element)) {
|
|
1643
1651
|
return null;
|
|
1644
1652
|
}
|
|
1645
|
-
const overlay =
|
|
1653
|
+
const overlay = chunkFPE5PZMI_cjs.getComputedEffectStyle(element).fillOverlay;
|
|
1646
1654
|
if (!overlay) {
|
|
1647
1655
|
return null;
|
|
1648
1656
|
}
|
|
@@ -1657,7 +1665,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1657
1665
|
return layer;
|
|
1658
1666
|
}
|
|
1659
1667
|
function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
1660
|
-
const wrapperStyle =
|
|
1668
|
+
const wrapperStyle = chunkFPE5PZMI_cjs.getComputedEffectStyle(element).reflection;
|
|
1661
1669
|
if (!wrapperStyle) {
|
|
1662
1670
|
return null;
|
|
1663
1671
|
}
|
|
@@ -1667,13 +1675,13 @@ function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
|
1667
1675
|
return layer;
|
|
1668
1676
|
}
|
|
1669
1677
|
function renderHollowHitOutline(doc, element) {
|
|
1670
|
-
const hit =
|
|
1678
|
+
const hit = chunkFPE5PZMI_cjs.buildHollowHitOutline(element);
|
|
1671
1679
|
if (!hit) {
|
|
1672
1680
|
return null;
|
|
1673
1681
|
}
|
|
1674
1682
|
const svg = createSvgEl(doc, "svg", {
|
|
1675
1683
|
"aria-hidden": "true",
|
|
1676
|
-
viewBox:
|
|
1684
|
+
viewBox: chunkFPE5PZMI_cjs.strokeOutlineViewBox(element),
|
|
1677
1685
|
preserveAspectRatio: "none"
|
|
1678
1686
|
});
|
|
1679
1687
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
@@ -1688,7 +1696,7 @@ function renderHollowHitOutline(doc, element) {
|
|
|
1688
1696
|
return svg;
|
|
1689
1697
|
}
|
|
1690
1698
|
function renderShapeSubpathFillOverlay(doc, element) {
|
|
1691
|
-
const overlay =
|
|
1699
|
+
const overlay = chunkIURZJAWP_cjs.buildSubpathFillOverlay(element);
|
|
1692
1700
|
if (!overlay) {
|
|
1693
1701
|
return null;
|
|
1694
1702
|
}
|
|
@@ -1706,20 +1714,20 @@ function renderShapeSubpathFillOverlay(doc, element) {
|
|
|
1706
1714
|
return svg;
|
|
1707
1715
|
}
|
|
1708
1716
|
function renderStrokeOutline(doc, element) {
|
|
1709
|
-
const outline =
|
|
1717
|
+
const outline = chunkFPE5PZMI_cjs.buildStrokeOutline(element);
|
|
1710
1718
|
if (!outline) {
|
|
1711
1719
|
return null;
|
|
1712
1720
|
}
|
|
1713
1721
|
const svg = createSvgEl(doc, "svg", {
|
|
1714
1722
|
class: "pptx-vanilla-gradient-outline",
|
|
1715
1723
|
"aria-hidden": "true",
|
|
1716
|
-
viewBox:
|
|
1724
|
+
viewBox: chunkFPE5PZMI_cjs.strokeOutlineViewBox(element),
|
|
1717
1725
|
preserveAspectRatio: "none"
|
|
1718
1726
|
});
|
|
1719
1727
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
1720
1728
|
if (outline.paint) {
|
|
1721
1729
|
const defs = createSvgEl(doc, "defs");
|
|
1722
|
-
if (
|
|
1730
|
+
if (chunkFPE5PZMI_cjs.isPatternPaint(outline.paint)) {
|
|
1723
1731
|
const pattern = createSvgEl(doc, "pattern", {
|
|
1724
1732
|
id: outline.paint.id,
|
|
1725
1733
|
width: outline.paint.width,
|
|
@@ -1734,7 +1742,7 @@ function renderStrokeOutline(doc, element) {
|
|
|
1734
1742
|
pattern.appendChild(image);
|
|
1735
1743
|
defs.appendChild(pattern);
|
|
1736
1744
|
} else {
|
|
1737
|
-
defs.innerHTML =
|
|
1745
|
+
defs.innerHTML = chunkFPE5PZMI_cjs.svgGradientMarkup(outline.paint);
|
|
1738
1746
|
}
|
|
1739
1747
|
svg.appendChild(defs);
|
|
1740
1748
|
}
|
|
@@ -1750,8 +1758,9 @@ function renderStrokeOutline(doc, element) {
|
|
|
1750
1758
|
if (outline.dashArray) {
|
|
1751
1759
|
path.setAttribute("stroke-dasharray", outline.dashArray);
|
|
1752
1760
|
}
|
|
1761
|
+
path.style.setProperty("stroke-width", strand.cssStrokeWidth);
|
|
1753
1762
|
if (strand.offset !== 0) {
|
|
1754
|
-
path.
|
|
1763
|
+
path.style.setProperty("transform", `translate(0, ${strand.offset}px)`);
|
|
1755
1764
|
}
|
|
1756
1765
|
svg.appendChild(path);
|
|
1757
1766
|
}
|
|
@@ -1784,14 +1793,14 @@ function indexRenderedNodes(root) {
|
|
|
1784
1793
|
return byId;
|
|
1785
1794
|
}
|
|
1786
1795
|
function paintInheritedFill(node, element, parentGroupFill) {
|
|
1787
|
-
const inherited =
|
|
1796
|
+
const inherited = chunkFPE5PZMI_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1788
1797
|
if (inherited) {
|
|
1789
1798
|
applyGroupChildFill(node, inherited);
|
|
1790
1799
|
}
|
|
1791
1800
|
if (element.type !== "group") {
|
|
1792
1801
|
return;
|
|
1793
1802
|
}
|
|
1794
|
-
const childFill =
|
|
1803
|
+
const childFill = chunkFPE5PZMI_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1795
1804
|
if (!childFill) {
|
|
1796
1805
|
return;
|
|
1797
1806
|
}
|
|
@@ -1805,7 +1814,7 @@ function paintInheritedFill(node, element, parentGroupFill) {
|
|
|
1805
1814
|
}
|
|
1806
1815
|
var renderGroupElement = (element, zIndex, context) => {
|
|
1807
1816
|
const el = createEl(context.document, "div", "pptxv-element pptxv-group", {
|
|
1808
|
-
...
|
|
1817
|
+
...chunkFPE5PZMI_cjs.getContainerStyle(element, zIndex),
|
|
1809
1818
|
// A group paints no fill/outline of its own, but `p:grpSpPr/a:effectLst`
|
|
1810
1819
|
// DOES carry a shadow/glow/soft-edge for the group's own composite
|
|
1811
1820
|
// raster (see shared `getComputedEffectStyle`), expressed as `filter` /
|
|
@@ -1822,7 +1831,7 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1822
1831
|
el.appendChild(reflection);
|
|
1823
1832
|
}
|
|
1824
1833
|
if (element.type === "group" && element.children?.length) {
|
|
1825
|
-
const parentGroupFill =
|
|
1834
|
+
const parentGroupFill = chunkFPE5PZMI_cjs.getGroupChildParentFill(element);
|
|
1826
1835
|
element.children.forEach((child, index) => {
|
|
1827
1836
|
const childEl = context.renderElement(child, index);
|
|
1828
1837
|
if (childEl) {
|
|
@@ -1837,12 +1846,12 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1837
1846
|
// src/pptx/dom/elements/image.ts
|
|
1838
1847
|
var renderImageElement = (element, zIndex, context) => {
|
|
1839
1848
|
const doc = context.document;
|
|
1840
|
-
const geometry = element.type === "image" || element.type === "picture" ?
|
|
1849
|
+
const geometry = element.type === "image" || element.type === "picture" ? chunkFPE5PZMI_cjs.resolveShapeGeometry(element) : void 0;
|
|
1841
1850
|
const geometryClipPath = geometry?.kind === "clipPath" ? geometry.clipPath : void 0;
|
|
1842
|
-
const cropShapeClipPath = element.type === "image" || element.type === "picture" ?
|
|
1851
|
+
const cropShapeClipPath = element.type === "image" || element.type === "picture" ? chunkFPE5PZMI_cjs.getCropShapeClipPath(element.cropShape, element.width, element.height) : void 0;
|
|
1843
1852
|
const el = createEl(doc, "div", "pptxv-element pptxv-image", {
|
|
1844
|
-
...
|
|
1845
|
-
overflow:
|
|
1853
|
+
...chunkFPE5PZMI_cjs.getContainerStyle(element, zIndex),
|
|
1854
|
+
overflow: chunkFPE5PZMI_cjs.getImageOverflow(element),
|
|
1846
1855
|
// The picture's own shape geometry (prstGeom / custGeom) clips the frame,
|
|
1847
1856
|
// not the `<img>` - a pixel-space clip on the img would be scaled and
|
|
1848
1857
|
// shifted by the crop transform.
|
|
@@ -1850,11 +1859,11 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1850
1859
|
...geometryClipPath ? { clipPath: geometryClipPath } : cropShapeClipPath ? { clipPath: cropShapeClipPath } : {}
|
|
1851
1860
|
});
|
|
1852
1861
|
el.dataset.elementId = element.id;
|
|
1853
|
-
const src =
|
|
1862
|
+
const src = chunkFPE5PZMI_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
1854
1863
|
if (!src) {
|
|
1855
1864
|
return el;
|
|
1856
1865
|
}
|
|
1857
|
-
const fx =
|
|
1866
|
+
const fx = chunkFPE5PZMI_cjs.getComputedImageStyle(element);
|
|
1858
1867
|
for (const f of fx.svgFilters) {
|
|
1859
1868
|
const svg = createSvgEl(doc, "svg", { width: 0, height: 0, "aria-hidden": "true" });
|
|
1860
1869
|
svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden");
|
|
@@ -1867,7 +1876,7 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1867
1876
|
el.appendChild(svg);
|
|
1868
1877
|
}
|
|
1869
1878
|
const reflection = renderReflectionOverlay(doc, element, context.mediaDataUrls);
|
|
1870
|
-
const tiling =
|
|
1879
|
+
const tiling = chunkFPE5PZMI_cjs.getImageTilingStyle(element, chunkFPE5PZMI_cjs.getCachedNativeImageSize(src));
|
|
1871
1880
|
if (tiling) {
|
|
1872
1881
|
const tile = createEl(doc, "div", "pptxv-image-tile", tiling);
|
|
1873
1882
|
if (fx.filter) {
|
|
@@ -1876,10 +1885,10 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1876
1885
|
if (fx.opacity !== void 0) {
|
|
1877
1886
|
tile.style.opacity = String(fx.opacity);
|
|
1878
1887
|
}
|
|
1879
|
-
if (!
|
|
1880
|
-
void
|
|
1888
|
+
if (!chunkFPE5PZMI_cjs.getCachedNativeImageSize(src)) {
|
|
1889
|
+
void chunkFPE5PZMI_cjs.probeNativeImageSize(src).then((size) => {
|
|
1881
1890
|
if (size) {
|
|
1882
|
-
applyStyleMap(tile,
|
|
1891
|
+
applyStyleMap(tile, chunkFPE5PZMI_cjs.getImageTilingStyle(element, size) ?? {});
|
|
1883
1892
|
}
|
|
1884
1893
|
return void 0;
|
|
1885
1894
|
});
|
|
@@ -1890,8 +1899,8 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1890
1899
|
}
|
|
1891
1900
|
return el;
|
|
1892
1901
|
}
|
|
1893
|
-
const fit =
|
|
1894
|
-
const fillCounterTransform =
|
|
1902
|
+
const fit = chunkFPE5PZMI_cjs.getImageFitStyle(element);
|
|
1903
|
+
const fillCounterTransform = chunkFPE5PZMI_cjs.getImageFillCounterTransform(element, Boolean(fit.transform));
|
|
1895
1904
|
const img = createEl(doc, "img", void 0, {
|
|
1896
1905
|
...fit,
|
|
1897
1906
|
display: "block",
|
|
@@ -1909,14 +1918,14 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1909
1918
|
if (element.type === "image" || element.type === "picture") {
|
|
1910
1919
|
const clrChange = element.imageEffects?.clrChange;
|
|
1911
1920
|
if (clrChange) {
|
|
1912
|
-
void
|
|
1921
|
+
void chunkFPE5PZMI_cjs.resolveColorChangedImageSource(src, clrChange).then((resolved) => {
|
|
1913
1922
|
if (img.src === src || img.getAttribute("src") === src) {
|
|
1914
1923
|
img.src = resolved;
|
|
1915
1924
|
}
|
|
1916
1925
|
return void 0;
|
|
1917
1926
|
});
|
|
1918
1927
|
}
|
|
1919
|
-
const wash =
|
|
1928
|
+
const wash = chunkFPE5PZMI_cjs.getImageColorWashStyle(element.imageEffects?.colorWash);
|
|
1920
1929
|
if (wash) {
|
|
1921
1930
|
el.appendChild(
|
|
1922
1931
|
createEl(doc, "div", "pptxv-image-color-wash", {
|
|
@@ -1945,7 +1954,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1945
1954
|
doc,
|
|
1946
1955
|
"div",
|
|
1947
1956
|
"pptxv-element pptxv-ink",
|
|
1948
|
-
|
|
1957
|
+
chunkFPE5PZMI_cjs.getContainerStyle(element, zIndex)
|
|
1949
1958
|
);
|
|
1950
1959
|
wrapper.dataset.elementId = element.id;
|
|
1951
1960
|
const paths = element.inkPaths;
|
|
@@ -1966,7 +1975,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1966
1975
|
keyframes.textContent = chunkNTXHQHCS_cjs.INK_REPLAY_KEYFRAMES;
|
|
1967
1976
|
svg.appendChild(keyframes);
|
|
1968
1977
|
}
|
|
1969
|
-
const views =
|
|
1978
|
+
const views = chunkFPE5PZMI_cjs.buildInkGroupStrokes(element, { color: chunkIURZJAWP_cjs.DEFAULT_STROKE_COLOR, width: 1 });
|
|
1970
1979
|
for (const [i, view] of views.entries()) {
|
|
1971
1980
|
svg.appendChild(buildStrokeSvg(doc, view, replayStyles[i]));
|
|
1972
1981
|
}
|
|
@@ -2020,12 +2029,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2020
2029
|
let stopButton = null;
|
|
2021
2030
|
const update = (playing) => {
|
|
2022
2031
|
const input = { fullScreen: element.fullScreen, presenting: context.presenting, playing };
|
|
2023
|
-
const active =
|
|
2032
|
+
const active = chunkFPE5PZMI_cjs.isMediaFullscreenActive(input);
|
|
2024
2033
|
applyStyleMap(
|
|
2025
2034
|
container,
|
|
2026
|
-
active ?
|
|
2035
|
+
active ? chunkFPE5PZMI_cjs.MEDIA_FULLSCREEN_OVERLAY_STYLE : mediaFullscreenResetStyle(baseStyle)
|
|
2027
2036
|
);
|
|
2028
|
-
if (
|
|
2037
|
+
if (chunkFPE5PZMI_cjs.shouldShowMediaFullscreenStopButton(input)) {
|
|
2029
2038
|
if (!stopButton) {
|
|
2030
2039
|
stopButton = buildFullscreenStopButton(
|
|
2031
2040
|
doc,
|
|
@@ -2050,12 +2059,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2050
2059
|
|
|
2051
2060
|
// src/pptx/dom/elements/media.ts
|
|
2052
2061
|
function applyMediaPresentingState(el, presenting, playback) {
|
|
2053
|
-
|
|
2062
|
+
chunkFPE5PZMI_cjs.applyMediaPlaybackAttributes(el, playback);
|
|
2054
2063
|
if (presenting) {
|
|
2055
|
-
|
|
2056
|
-
|
|
2064
|
+
chunkFPE5PZMI_cjs.startMediaAutoplay(el, { trimStartMs: playback.trimStartMs });
|
|
2065
|
+
chunkFPE5PZMI_cjs.scheduleMediaTrimAndFade(el, {
|
|
2057
2066
|
...playback,
|
|
2058
|
-
volume:
|
|
2067
|
+
volume: chunkFPE5PZMI_cjs.mediaPlaybackAttributes(playback).volume
|
|
2059
2068
|
});
|
|
2060
2069
|
} else if (!el.paused) {
|
|
2061
2070
|
el.pause();
|
|
@@ -2065,18 +2074,18 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2065
2074
|
if (element.type !== "media") {
|
|
2066
2075
|
return null;
|
|
2067
2076
|
}
|
|
2068
|
-
const surface =
|
|
2077
|
+
const surface = chunkFPE5PZMI_cjs.mediaSurfaceOf({
|
|
2069
2078
|
interactive: context.interactive === true || context.reading === true,
|
|
2070
2079
|
presenting: context.presenting
|
|
2071
2080
|
});
|
|
2072
|
-
const showTransport =
|
|
2081
|
+
const showTransport = chunkFPE5PZMI_cjs.mediaTransportVisible({ ...surface, canvasTransport: true });
|
|
2073
2082
|
const doc = context.document;
|
|
2074
|
-
const baseStyle =
|
|
2083
|
+
const baseStyle = chunkFPE5PZMI_cjs.getContainerStyle(element, zIndex);
|
|
2075
2084
|
const el = createEl(doc, "div", "pptxv-element pptxv-media", baseStyle);
|
|
2076
2085
|
el.dataset.elementId = element.id;
|
|
2077
2086
|
const mediaSrc = element.mediaData ?? (element.mediaPath ? context.mediaDataUrls.get(element.mediaPath) : void 0);
|
|
2078
|
-
const posterSrc =
|
|
2079
|
-
const onlineVideoEmbedUrl =
|
|
2087
|
+
const posterSrc = chunkFPE5PZMI_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
2088
|
+
const onlineVideoEmbedUrl = chunkFPE5PZMI_cjs.getOnlineVideoEmbed(element)?.embedUrl;
|
|
2080
2089
|
if (onlineVideoEmbedUrl && element.mediaType === "video") {
|
|
2081
2090
|
const iframe = createEl(doc, "iframe", "pptxv-media-video pptxv-media-iframe", {
|
|
2082
2091
|
width: "100%",
|
|
@@ -2086,8 +2095,8 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2086
2095
|
});
|
|
2087
2096
|
iframe.src = onlineVideoEmbedUrl;
|
|
2088
2097
|
iframe.title = context.t("pptx.media.onlineVideoTitle");
|
|
2089
|
-
iframe.allow =
|
|
2090
|
-
iframe.sandbox.value =
|
|
2098
|
+
iframe.allow = chunkFPE5PZMI_cjs.ONLINE_VIDEO_IFRAME_ALLOW;
|
|
2099
|
+
iframe.sandbox.value = chunkFPE5PZMI_cjs.ONLINE_VIDEO_IFRAME_SANDBOX;
|
|
2091
2100
|
iframe.allowFullscreen = true;
|
|
2092
2101
|
el.appendChild(iframe);
|
|
2093
2102
|
return el;
|
|
@@ -2116,21 +2125,21 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2116
2125
|
audio.src = mediaSrc;
|
|
2117
2126
|
audio.controls = showTransport;
|
|
2118
2127
|
el.appendChild(audio);
|
|
2119
|
-
if (context.presenting &&
|
|
2128
|
+
if (context.presenting && chunkFPE5PZMI_cjs.registerCrossSlideAudio(element, mediaSrc)) {
|
|
2120
2129
|
audio.muted = true;
|
|
2121
|
-
|
|
2130
|
+
chunkFPE5PZMI_cjs.applyMediaPlaybackAttributes(audio, element);
|
|
2122
2131
|
return el;
|
|
2123
2132
|
}
|
|
2124
2133
|
applyMediaPresentingState(audio, context.presenting, element);
|
|
2125
2134
|
wireMediaFullscreenOverlay(doc, el, audio, element, context, baseStyle);
|
|
2126
2135
|
return el;
|
|
2127
2136
|
}
|
|
2128
|
-
const fallback =
|
|
2137
|
+
const fallback = chunkFPE5PZMI_cjs.mediaFallbackVisual(surface, {
|
|
2129
2138
|
hasPoster: Boolean(posterSrc),
|
|
2130
2139
|
missing: element.mediaMissing === true
|
|
2131
2140
|
});
|
|
2132
|
-
const icon =
|
|
2133
|
-
const labelKey =
|
|
2141
|
+
const icon = chunkFPE5PZMI_cjs.mediaFallbackIcon(fallback, element.mediaType);
|
|
2142
|
+
const labelKey = chunkFPE5PZMI_cjs.mediaFallbackLabelKey(fallback, element.mediaType);
|
|
2134
2143
|
if (fallback.poster && posterSrc) {
|
|
2135
2144
|
const img = createEl(doc, "img", "pptxv-media-poster", {
|
|
2136
2145
|
width: "100%",
|
|
@@ -2147,7 +2156,7 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2147
2156
|
if (fallback.badge === "missing") {
|
|
2148
2157
|
badge.classList.add("pptxv-media-badge-missing");
|
|
2149
2158
|
}
|
|
2150
|
-
badge.setAttribute(
|
|
2159
|
+
badge.setAttribute(chunkFPE5PZMI_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.badge);
|
|
2151
2160
|
badge.appendChild(buildIcon(doc, icon));
|
|
2152
2161
|
if (labelKey !== void 0 && fallback.badge === "missing") {
|
|
2153
2162
|
const text = createEl(doc, "span");
|
|
@@ -2160,7 +2169,7 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2160
2169
|
}
|
|
2161
2170
|
if (fallback.placeholder !== "none") {
|
|
2162
2171
|
el.classList.add("pptxv-placeholder", "pptxv-media-placeholder");
|
|
2163
|
-
el.setAttribute(
|
|
2172
|
+
el.setAttribute(chunkFPE5PZMI_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.placeholder);
|
|
2164
2173
|
if (icon.length > 0) {
|
|
2165
2174
|
el.appendChild(buildIcon(doc, icon));
|
|
2166
2175
|
}
|
|
@@ -2196,7 +2205,7 @@ var renderModel3dElement = (element, zIndex, context) => {
|
|
|
2196
2205
|
doc,
|
|
2197
2206
|
"div",
|
|
2198
2207
|
"pptxv-element pptxv-model3d",
|
|
2199
|
-
|
|
2208
|
+
chunkFPE5PZMI_cjs.getContainerStyle(element, zIndex)
|
|
2200
2209
|
);
|
|
2201
2210
|
el.dataset.elementId = element.id;
|
|
2202
2211
|
const label = context.t("pptx.model3d.label");
|
|
@@ -2333,7 +2342,7 @@ function buildOleIcon(doc, type, color) {
|
|
|
2333
2342
|
fill: "none",
|
|
2334
2343
|
"aria-hidden": "true"
|
|
2335
2344
|
});
|
|
2336
|
-
for (const shape of
|
|
2345
|
+
for (const shape of chunkFPE5PZMI_cjs.getOleIconShapes(type)) {
|
|
2337
2346
|
const node = createSvgEl(doc, shape.tag, shape.attrs);
|
|
2338
2347
|
if (shape.tag === "text") {
|
|
2339
2348
|
node.setAttribute("fill", color);
|
|
@@ -2352,21 +2361,21 @@ var renderOleElement = (element, zIndex, context) => {
|
|
|
2352
2361
|
return null;
|
|
2353
2362
|
}
|
|
2354
2363
|
const doc = context.document;
|
|
2355
|
-
const oleType =
|
|
2356
|
-
const typeColor =
|
|
2357
|
-
const typeLabel =
|
|
2358
|
-
const el = createEl(doc, "div", "pptxv-element pptxv-ole",
|
|
2364
|
+
const oleType = chunkFPE5PZMI_cjs.resolveOleType(element);
|
|
2365
|
+
const typeColor = chunkFPE5PZMI_cjs.getOleTypeColor(oleType);
|
|
2366
|
+
const typeLabel = chunkFPE5PZMI_cjs.getOleTypeLabel(oleType);
|
|
2367
|
+
const el = createEl(doc, "div", "pptxv-element pptxv-ole", chunkFPE5PZMI_cjs.getContainerStyle(element, zIndex));
|
|
2359
2368
|
el.dataset.elementId = element.id;
|
|
2360
2369
|
el.setAttribute("role", "group");
|
|
2361
|
-
el.setAttribute("aria-label",
|
|
2370
|
+
el.setAttribute("aria-label", chunkFPE5PZMI_cjs.getOleAriaLabel(element));
|
|
2362
2371
|
el.title = infoLines(element, typeLabel).join("\n");
|
|
2363
2372
|
if (element.previewImageData) {
|
|
2364
|
-
el.appendChild(buildPreview(doc, element, typeColor,
|
|
2373
|
+
el.appendChild(buildPreview(doc, element, typeColor, chunkFPE5PZMI_cjs.getOleBadgeLabel(oleType)));
|
|
2365
2374
|
} else {
|
|
2366
2375
|
el.appendChild(buildPlaceholder2(doc, element, oleType, typeColor, typeLabel));
|
|
2367
2376
|
}
|
|
2368
|
-
const showActions =
|
|
2369
|
-
|
|
2377
|
+
const showActions = chunkFPE5PZMI_cjs.oleActionsVisible(
|
|
2378
|
+
chunkFPE5PZMI_cjs.mediaSurfaceOf({
|
|
2370
2379
|
interactive: context.interactive === true,
|
|
2371
2380
|
presenting: context.presenting
|
|
2372
2381
|
})
|
|
@@ -2382,7 +2391,7 @@ function infoLines(el, typeLabel) {
|
|
|
2382
2391
|
if (name) {
|
|
2383
2392
|
lines.push(name);
|
|
2384
2393
|
}
|
|
2385
|
-
const size =
|
|
2394
|
+
const size = chunkFPE5PZMI_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2386
2395
|
if (size) {
|
|
2387
2396
|
lines.push(size);
|
|
2388
2397
|
}
|
|
@@ -2406,7 +2415,7 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2406
2415
|
display: "block"
|
|
2407
2416
|
});
|
|
2408
2417
|
img.src = el.previewImageData ?? "";
|
|
2409
|
-
img.alt =
|
|
2418
|
+
img.alt = chunkFPE5PZMI_cjs.getOleAriaLabel(el);
|
|
2410
2419
|
img.draggable = false;
|
|
2411
2420
|
preview.appendChild(img);
|
|
2412
2421
|
const badge = createSvgEl(doc, "svg", { width: 24, height: 24, viewBox: "0 0 24 24" });
|
|
@@ -2433,7 +2442,7 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2433
2442
|
}
|
|
2434
2443
|
function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
2435
2444
|
const box = createEl(doc, "div", "pptxv-ole-placeholder", {
|
|
2436
|
-
...
|
|
2445
|
+
...chunkFPE5PZMI_cjs.getPlaceholderStyle(oleType),
|
|
2437
2446
|
width: "100%",
|
|
2438
2447
|
height: "100%",
|
|
2439
2448
|
display: "flex",
|
|
@@ -2454,7 +2463,7 @@ function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
|
2454
2463
|
whiteSpace: "nowrap",
|
|
2455
2464
|
color: typeColor
|
|
2456
2465
|
});
|
|
2457
|
-
name.textContent =
|
|
2466
|
+
name.textContent = chunkFPE5PZMI_cjs.getOleDisplayName(el);
|
|
2458
2467
|
box.appendChild(name);
|
|
2459
2468
|
if (el.fileName) {
|
|
2460
2469
|
const sublabel = createEl(doc, "span", "pptxv-ole-sublabel", {
|
|
@@ -2506,7 +2515,7 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2506
2515
|
for (const type of ["pointerdown", "mousedown", "click"]) {
|
|
2507
2516
|
bar.addEventListener(type, (event) => event.stopPropagation());
|
|
2508
2517
|
}
|
|
2509
|
-
const size =
|
|
2518
|
+
const size = chunkFPE5PZMI_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2510
2519
|
if (size) {
|
|
2511
2520
|
const meta = createEl(doc, "span", "pptxv-ole-meta", {
|
|
2512
2521
|
marginRight: "auto",
|
|
@@ -2526,14 +2535,14 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2526
2535
|
download.title = downloadTitle;
|
|
2527
2536
|
download.textContent = context.t("pptx.ole.download");
|
|
2528
2537
|
bar.appendChild(download);
|
|
2529
|
-
if (
|
|
2538
|
+
if (chunkFPE5PZMI_cjs.isBrowserOpenableMime(el.oleEmbeddedMimeType)) {
|
|
2530
2539
|
const open = createEl(doc, "button", "pptxv-ole-action", ACTION_STYLE);
|
|
2531
2540
|
open.type = "button";
|
|
2532
2541
|
const openTitle = context.t("pptx.ole.openName", { name: downloadName });
|
|
2533
2542
|
open.setAttribute("aria-label", openTitle);
|
|
2534
2543
|
open.title = openTitle;
|
|
2535
2544
|
open.textContent = context.t("pptx.ole.open");
|
|
2536
|
-
open.addEventListener("click", () =>
|
|
2545
|
+
open.addEventListener("click", () => chunkFPE5PZMI_cjs.openUrlInNewTab(data));
|
|
2537
2546
|
bar.appendChild(open);
|
|
2538
2547
|
}
|
|
2539
2548
|
return bar;
|
|
@@ -2545,7 +2554,7 @@ var renderPlaceholderElement = (element, zIndex, context) => {
|
|
|
2545
2554
|
context.document,
|
|
2546
2555
|
"div",
|
|
2547
2556
|
"pptxv-element pptxv-placeholder",
|
|
2548
|
-
|
|
2557
|
+
chunkFPE5PZMI_cjs.getContainerStyle(element, zIndex)
|
|
2549
2558
|
);
|
|
2550
2559
|
el.dataset.elementId = element.id;
|
|
2551
2560
|
el.dataset.elementType = element.type;
|
|
@@ -2561,7 +2570,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2561
2570
|
return null;
|
|
2562
2571
|
}
|
|
2563
2572
|
const doc = context.document;
|
|
2564
|
-
const summaryView =
|
|
2573
|
+
const summaryView = chunkFPE5PZMI_cjs.buildSummaryZoomView(
|
|
2565
2574
|
element,
|
|
2566
2575
|
(index) => {
|
|
2567
2576
|
const slide = context.slides?.[index];
|
|
@@ -2581,7 +2590,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2581
2590
|
doc,
|
|
2582
2591
|
"div",
|
|
2583
2592
|
"pptxv-element pptxv-zoom pptxv-summary-zoom",
|
|
2584
|
-
|
|
2593
|
+
chunkFPE5PZMI_cjs.getContainerStyle(element, zIndex)
|
|
2585
2594
|
);
|
|
2586
2595
|
const content = createEl(doc, "div", "pptxv-summary-zoom-content", summaryView.containerStyle);
|
|
2587
2596
|
root.dataset.elementId = element.id;
|
|
@@ -2647,7 +2656,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2647
2656
|
const target = element.targetSlideIndex ?? 0;
|
|
2648
2657
|
const targetSlide = context.slides?.[target];
|
|
2649
2658
|
const interactive = context.presenting && context.onZoomClick !== void 0;
|
|
2650
|
-
const el = createEl(doc, "div", "pptxv-element pptxv-zoom",
|
|
2659
|
+
const el = createEl(doc, "div", "pptxv-element pptxv-zoom", chunkFPE5PZMI_cjs.getContainerStyle(element, zIndex));
|
|
2651
2660
|
el.dataset.elementId = element.id;
|
|
2652
2661
|
el.dataset.zoomType = zoomType;
|
|
2653
2662
|
el.dataset.zoomTarget = String(target);
|
|
@@ -2657,7 +2666,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2657
2666
|
el.tabIndex = 0;
|
|
2658
2667
|
el.style.cursor = "pointer";
|
|
2659
2668
|
const activate = () => {
|
|
2660
|
-
const zoomTarget =
|
|
2669
|
+
const zoomTarget = chunkFPE5PZMI_cjs.resolveZoomNavigationTarget(element);
|
|
2661
2670
|
if (zoomTarget) {
|
|
2662
2671
|
context.onZoomClick?.(zoomTarget, context.currentSlideIndex ?? 0);
|
|
2663
2672
|
}
|
|
@@ -2772,7 +2781,7 @@ function registerExtraRenderers(registry) {
|
|
|
2772
2781
|
// src/pptx/dom/elements/smartart-3d.ts
|
|
2773
2782
|
var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
2774
2783
|
const wrapper = renderSmartArtSvg(element, zIndex, context);
|
|
2775
|
-
const spec = wrapper ?
|
|
2784
|
+
const spec = wrapper ? chunkFPE5PZMI_cjs.resolveSmartArtThreeViewSpec(element, context.smartArt3D) : null;
|
|
2776
2785
|
if (!wrapper || !spec) {
|
|
2777
2786
|
return wrapper;
|
|
2778
2787
|
}
|
|
@@ -2782,18 +2791,18 @@ var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
|
2782
2791
|
textStyle: context.presentationStates?.get(element.id)?.textStyle
|
|
2783
2792
|
});
|
|
2784
2793
|
if (context.onSmartArtNodeTextChange && context.interactive && !context.presenting) {
|
|
2785
|
-
const layer = renderSmartArtSvg(
|
|
2794
|
+
const layer = renderSmartArtSvg(chunkFPE5PZMI_cjs.elementInLocalFrame(element), 0, context);
|
|
2786
2795
|
if (layer) {
|
|
2787
2796
|
layer.classList.add("pptxv-smartart-3d-edit-layer");
|
|
2788
2797
|
layer.setAttribute("data-smartart-3d-edit-layer", "true");
|
|
2789
|
-
|
|
2798
|
+
chunkFPE5PZMI_cjs.stripEditLayerMarkers(layer);
|
|
2790
2799
|
layer.setAttribute("aria-hidden", "true");
|
|
2791
2800
|
Object.assign(layer.style, { position: "absolute", inset: "0", zIndex: "1" });
|
|
2792
2801
|
for (const svg of layer.querySelectorAll("svg")) {
|
|
2793
2802
|
svg.style.opacity = "0";
|
|
2794
2803
|
}
|
|
2795
2804
|
wrapper.appendChild(layer);
|
|
2796
|
-
|
|
2805
|
+
chunkFPE5PZMI_cjs.routeEditLayerPointerToNodes(layer);
|
|
2797
2806
|
}
|
|
2798
2807
|
}
|
|
2799
2808
|
return wrapper;
|
|
@@ -2806,7 +2815,7 @@ function nodeTarget(target) {
|
|
|
2806
2815
|
}
|
|
2807
2816
|
function enableSmartArtEditing(chrome, element, context) {
|
|
2808
2817
|
const data = element.smartArtData;
|
|
2809
|
-
if (!data || !context.onSmartArtNodeTextChange && !context.onSmartArtNodeFillChange || !
|
|
2818
|
+
if (!data || !context.onSmartArtNodeTextChange && !context.onSmartArtNodeFillChange || !chunkFPE5PZMI_cjs.canDrillDown(element)) {
|
|
2810
2819
|
return;
|
|
2811
2820
|
}
|
|
2812
2821
|
let editor = null;
|
|
@@ -2828,8 +2837,8 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2828
2837
|
}
|
|
2829
2838
|
event.stopPropagation();
|
|
2830
2839
|
const textNode = target.querySelector("text");
|
|
2831
|
-
const textRect = textNode ?
|
|
2832
|
-
const rect = textRect && textRect.width > 0 ? textRect :
|
|
2840
|
+
const textRect = textNode ? chunkFPE5PZMI_cjs.measureSvgViewportRect(textNode) : null;
|
|
2841
|
+
const rect = textRect && textRect.width > 0 ? textRect : chunkFPE5PZMI_cjs.measureSvgViewportRect(target);
|
|
2833
2842
|
if (!rect) {
|
|
2834
2843
|
return;
|
|
2835
2844
|
}
|
|
@@ -2853,7 +2862,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2853
2862
|
textAlign: "center"
|
|
2854
2863
|
});
|
|
2855
2864
|
editor = input;
|
|
2856
|
-
input.value =
|
|
2865
|
+
input.value = chunkFPE5PZMI_cjs.findSmartArtNodeText(data, nodeId) ?? "";
|
|
2857
2866
|
const commit = () => {
|
|
2858
2867
|
if (input !== editor) {
|
|
2859
2868
|
return;
|
|
@@ -2885,7 +2894,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2885
2894
|
}
|
|
2886
2895
|
cancelHide();
|
|
2887
2896
|
swatches?.remove();
|
|
2888
|
-
const rect =
|
|
2897
|
+
const rect = chunkFPE5PZMI_cjs.measureSvgViewportRect(target);
|
|
2889
2898
|
if (!rect) {
|
|
2890
2899
|
return;
|
|
2891
2900
|
}
|
|
@@ -2904,7 +2913,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2904
2913
|
});
|
|
2905
2914
|
swatches.setAttribute("role", "group");
|
|
2906
2915
|
swatches.setAttribute("aria-label", context.t("pptx.smartArt.fillColor"));
|
|
2907
|
-
for (const color of
|
|
2916
|
+
for (const color of chunkFPE5PZMI_cjs.resolvePalette(data).slice(0, 6)) {
|
|
2908
2917
|
const button = createEl(chrome.ownerDocument, "button", "", {
|
|
2909
2918
|
width: "18px",
|
|
2910
2919
|
height: "18px",
|
|
@@ -3003,7 +3012,7 @@ function buildSmartArtFallbackSvg(doc, layout, a11yNodes = [], nodeIds = []) {
|
|
|
3003
3012
|
svg.setAttribute("class", "pptxv-smartart-svg");
|
|
3004
3013
|
svg.setAttribute("style", SMARTART_SVG_STYLE);
|
|
3005
3014
|
for (const conn of layout.connectors) {
|
|
3006
|
-
const paint =
|
|
3015
|
+
const paint = chunkFPE5PZMI_cjs.smartArtConnectorPaint(conn);
|
|
3007
3016
|
svg.appendChild(
|
|
3008
3017
|
createSvgEl(doc, "path", {
|
|
3009
3018
|
d: paint.d,
|
|
@@ -3062,7 +3071,7 @@ function buildFallbackNode(doc, node, shadowFilter, a11yLabel, nodeId) {
|
|
|
3062
3071
|
})
|
|
3063
3072
|
);
|
|
3064
3073
|
}
|
|
3065
|
-
const label =
|
|
3074
|
+
const label = chunkFPE5PZMI_cjs.smartArtNodeLabel(node);
|
|
3066
3075
|
if (label.visible) {
|
|
3067
3076
|
appendSvgTextLines(doc, g, {
|
|
3068
3077
|
lines: label.lines,
|
|
@@ -3098,41 +3107,41 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3098
3107
|
doc,
|
|
3099
3108
|
"div",
|
|
3100
3109
|
"pptxv-element pptxv-smartart",
|
|
3101
|
-
|
|
3110
|
+
chunkFPE5PZMI_cjs.getContainerStyle(element, zIndex)
|
|
3102
3111
|
);
|
|
3103
3112
|
wrapper.dataset.elementId = element.id;
|
|
3104
3113
|
wrapper.dataset.testid = `smartart-${data?.layout ?? "diagram"}`;
|
|
3105
|
-
const chrome = createEl(doc, "div", "pptxv-smartart-chrome",
|
|
3114
|
+
const chrome = createEl(doc, "div", "pptxv-smartart-chrome", chunkFPE5PZMI_cjs.buildChromeStyle(data?.chrome));
|
|
3106
3115
|
chrome.style.position = "relative";
|
|
3107
3116
|
wrapper.appendChild(chrome);
|
|
3108
3117
|
if (data) {
|
|
3109
|
-
const a11y =
|
|
3118
|
+
const a11y = chunkFPE5PZMI_cjs.buildSmartArtA11y(data);
|
|
3110
3119
|
chrome.setAttribute("role", "img");
|
|
3111
3120
|
chrome.setAttribute("aria-label", a11y.label);
|
|
3112
3121
|
}
|
|
3113
3122
|
const nodes = data?.nodes ?? [];
|
|
3114
3123
|
const drawingShapes = data?.drawingShapes ?? [];
|
|
3115
3124
|
const animationState = context.presentationStates?.get(element.id);
|
|
3116
|
-
const { nodes: revealedNodesFull } =
|
|
3125
|
+
const { nodes: revealedNodesFull } = chunkFPE5PZMI_cjs.resolveRevealedSmartArtNodes(
|
|
3117
3126
|
nodes,
|
|
3118
3127
|
animationState,
|
|
3119
3128
|
data?.presLayoutVars
|
|
3120
3129
|
);
|
|
3121
3130
|
if (data && drawingShapes.length > 0) {
|
|
3122
|
-
const revealedShapes =
|
|
3131
|
+
const revealedShapes = chunkFPE5PZMI_cjs.resolveRevealedDrawingShapes(drawingShapes, nodes, animationState);
|
|
3123
3132
|
chrome.appendChild(
|
|
3124
|
-
buildDrawingShapesSvg(doc, element.id, data,
|
|
3133
|
+
buildDrawingShapesSvg(doc, element.id, data, chunkFPE5PZMI_cjs.buildSmartArtA11y(data).nodes, revealedShapes)
|
|
3125
3134
|
);
|
|
3126
3135
|
enableSmartArtEditing(chrome, element, context);
|
|
3127
3136
|
return wrapper;
|
|
3128
3137
|
}
|
|
3129
3138
|
if (data && nodes.length > 0) {
|
|
3130
3139
|
const revealedNodes = revealedNodesFull;
|
|
3131
|
-
const layout =
|
|
3140
|
+
const layout = chunkFPE5PZMI_cjs.computeSmartArtElementLayout(
|
|
3132
3141
|
data,
|
|
3133
3142
|
revealedNodes,
|
|
3134
3143
|
{ width: element.width, height: element.height },
|
|
3135
|
-
|
|
3144
|
+
chunkFPE5PZMI_cjs.resolvePalette(data),
|
|
3136
3145
|
data.style ?? "flat",
|
|
3137
3146
|
element.id
|
|
3138
3147
|
);
|
|
@@ -3140,8 +3149,8 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3140
3149
|
buildSmartArtFallbackSvg(
|
|
3141
3150
|
doc,
|
|
3142
3151
|
layout,
|
|
3143
|
-
|
|
3144
|
-
|
|
3152
|
+
chunkFPE5PZMI_cjs.buildSmartArtA11y(data).nodes,
|
|
3153
|
+
chunkFPE5PZMI_cjs.flattenNodes(revealedNodes).map((node) => node.id)
|
|
3145
3154
|
)
|
|
3146
3155
|
);
|
|
3147
3156
|
enableSmartArtEditing(chrome, element, context);
|
|
@@ -3164,17 +3173,17 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3164
3173
|
function buildDrawingShapesSvg(doc, elementId, data, a11yNodes, revealedShapes) {
|
|
3165
3174
|
const allShapes = data.drawingShapes ?? [];
|
|
3166
3175
|
const style = data.style ?? "flat";
|
|
3167
|
-
const viewBox =
|
|
3168
|
-
const rendered =
|
|
3176
|
+
const viewBox = chunkFPE5PZMI_cjs.computeDrawingViewBox(allShapes);
|
|
3177
|
+
const rendered = chunkFPE5PZMI_cjs.projectDrawingShapes(
|
|
3169
3178
|
elementId,
|
|
3170
3179
|
revealedShapes,
|
|
3171
3180
|
viewBox,
|
|
3172
|
-
|
|
3181
|
+
chunkFPE5PZMI_cjs.resolvePalette(data),
|
|
3173
3182
|
style
|
|
3174
3183
|
);
|
|
3175
|
-
const shadow =
|
|
3184
|
+
const shadow = chunkFPE5PZMI_cjs.styleShadowFilter(style);
|
|
3176
3185
|
const labelsById = new Map(a11yNodes.map((node) => [node.id, node.label]));
|
|
3177
|
-
const nodeIds =
|
|
3186
|
+
const nodeIds = chunkFPE5PZMI_cjs.resolveRevealedDrawingShapeNodeIds(allShapes, revealedShapes, data.nodes);
|
|
3178
3187
|
const svg = createSvgEl(doc, "svg", {
|
|
3179
3188
|
viewBox: `0 0 ${viewBox.width} ${viewBox.height}`,
|
|
3180
3189
|
preserveAspectRatio: "xMidYMid meet"
|
|
@@ -3309,7 +3318,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3309
3318
|
for (const handle of [...colHandles, ...rowHandles]) {
|
|
3310
3319
|
handle.remove();
|
|
3311
3320
|
}
|
|
3312
|
-
colHandles =
|
|
3321
|
+
colHandles = chunkFPE5PZMI_cjs.computeColumnBoundaries(tableData.columnWidths).map((leftPct) => {
|
|
3313
3322
|
const handle = createEl(doc, "div", "pptxv-table-resize-col", {
|
|
3314
3323
|
position: "absolute",
|
|
3315
3324
|
top: "0",
|
|
@@ -3365,14 +3374,14 @@ function enableTableResize(container, table, element, context) {
|
|
|
3365
3374
|
const deltaProp = (event.clientX - active.startPos) / (rect.width || 1);
|
|
3366
3375
|
context.onTableResizeColumns?.(
|
|
3367
3376
|
element,
|
|
3368
|
-
|
|
3377
|
+
chunkFPE5PZMI_cjs.computeResizedColumnWidths(active.initialWidths, active.index, deltaProp)
|
|
3369
3378
|
);
|
|
3370
3379
|
} else if (event.clientY !== active.startPos && active.type === "row") {
|
|
3371
3380
|
const deltaY = event.clientY - active.startPos;
|
|
3372
3381
|
context.onTableResizeRow?.(
|
|
3373
3382
|
element,
|
|
3374
3383
|
active.index,
|
|
3375
|
-
|
|
3384
|
+
chunkFPE5PZMI_cjs.computeResizedRowHeight(active.initialRowHeight ?? chunkFPE5PZMI_cjs.DEFAULT_ROW_HEIGHT, deltaY)
|
|
3376
3385
|
);
|
|
3377
3386
|
}
|
|
3378
3387
|
drawHandles();
|
|
@@ -3381,8 +3390,8 @@ function enableTableResize(container, table, element, context) {
|
|
|
3381
3390
|
const rect = container.getBoundingClientRect();
|
|
3382
3391
|
const localX = event.clientX - rect.left;
|
|
3383
3392
|
const localY = event.clientY - rect.top;
|
|
3384
|
-
const scaleY =
|
|
3385
|
-
const colBoundaries =
|
|
3393
|
+
const scaleY = chunkFPE5PZMI_cjs.getTableResizeScale(rect.height, container.offsetHeight);
|
|
3394
|
+
const colBoundaries = chunkFPE5PZMI_cjs.computeColumnBoundaries(tableData.columnWidths);
|
|
3386
3395
|
for (let i = 0; i < colBoundaries.length; i++) {
|
|
3387
3396
|
const boundaryX = colBoundaries[i] / 100 * rect.width;
|
|
3388
3397
|
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE) {
|
|
@@ -3415,7 +3424,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3415
3424
|
index: i,
|
|
3416
3425
|
startPos: event.clientY,
|
|
3417
3426
|
handleEl: rowHandles[i] ?? container,
|
|
3418
|
-
initialRowHeight: tr?.offsetHeight ??
|
|
3427
|
+
initialRowHeight: tr?.offsetHeight ?? chunkFPE5PZMI_cjs.DEFAULT_ROW_HEIGHT
|
|
3419
3428
|
};
|
|
3420
3429
|
win.addEventListener("mousemove", onMouseMove);
|
|
3421
3430
|
win.addEventListener("mouseup", onMouseUp);
|
|
@@ -3436,7 +3445,7 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
3436
3445
|
}
|
|
3437
3446
|
const doc = context.document;
|
|
3438
3447
|
const container = createEl(doc, "div", "pptxv-element pptxv-table", {
|
|
3439
|
-
...
|
|
3448
|
+
...chunkFPE5PZMI_cjs.getContainerStyle(element, zIndex),
|
|
3440
3449
|
overflow: "hidden"
|
|
3441
3450
|
});
|
|
3442
3451
|
container.dataset.elementId = element.id;
|
|
@@ -3447,9 +3456,9 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
3447
3456
|
tableLayout: "fixed",
|
|
3448
3457
|
// Load-bearing: an unstyled cell otherwise inherits the HOST chrome's
|
|
3449
3458
|
// font stack; all five bindings declare the same shared default here.
|
|
3450
|
-
fontFamily:
|
|
3459
|
+
fontFamily: chunkIURZJAWP_cjs.DEFAULT_FONT_FAMILY,
|
|
3451
3460
|
// `a:tblPr@rtl`: mirrors the column order for right-to-left decks.
|
|
3452
|
-
...
|
|
3461
|
+
...chunkFPE5PZMI_cjs.tableContainerCss(tableData)
|
|
3453
3462
|
});
|
|
3454
3463
|
appendColgroup(doc, table, tableData.columnWidths);
|
|
3455
3464
|
const tbody = doc.createElement("tbody");
|
|
@@ -3510,13 +3519,13 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3510
3519
|
if (cell.rowSpan && cell.rowSpan > 1) {
|
|
3511
3520
|
td.rowSpan = cell.rowSpan;
|
|
3512
3521
|
}
|
|
3513
|
-
const style =
|
|
3522
|
+
const style = chunkFPE5PZMI_cjs.tableCellCss(
|
|
3514
3523
|
tableData,
|
|
3515
3524
|
cell,
|
|
3516
3525
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
3517
3526
|
styleContext
|
|
3518
3527
|
);
|
|
3519
|
-
const patternFill = cell.style ?
|
|
3528
|
+
const patternFill = cell.style ? chunkFPE5PZMI_cjs.cellPatternFillCss(cell.style) : null;
|
|
3520
3529
|
if (patternFill) {
|
|
3521
3530
|
delete style["backgroundColor"];
|
|
3522
3531
|
delete style["background"];
|
|
@@ -3529,7 +3538,7 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3529
3538
|
}
|
|
3530
3539
|
applyStyleMap(td, CELL_BASE_STYLE);
|
|
3531
3540
|
applyStyleMap(td, style);
|
|
3532
|
-
const diagonals =
|
|
3541
|
+
const diagonals = chunkFPE5PZMI_cjs.getCellDiagonalBorders(
|
|
3533
3542
|
cell.style,
|
|
3534
3543
|
tableData,
|
|
3535
3544
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3541,6 +3550,11 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3541
3550
|
appendCellText(doc, td, cell);
|
|
3542
3551
|
return td;
|
|
3543
3552
|
}
|
|
3553
|
+
function diagonalLine(doc, x1, y1, x2, y2, stroke, width) {
|
|
3554
|
+
const line = createSvgEl(doc, "line", { x1, y1, x2, y2, stroke, "stroke-width": width });
|
|
3555
|
+
line.style.setProperty("stroke-width", chunkKRMMJUCO_cjs.screenStrokeWidth(width));
|
|
3556
|
+
return line;
|
|
3557
|
+
}
|
|
3544
3558
|
function renderDiagonalOverlay(doc, diagonals) {
|
|
3545
3559
|
const svg = createSvgEl(doc, "svg", {
|
|
3546
3560
|
class: "pptxv-table-diag",
|
|
@@ -3557,32 +3571,18 @@ function renderDiagonalOverlay(doc, diagonals) {
|
|
|
3557
3571
|
});
|
|
3558
3572
|
if (diagonals.diagDownColor && diagonals.diagDownWidth) {
|
|
3559
3573
|
svg.appendChild(
|
|
3560
|
-
|
|
3561
|
-
x1: 0,
|
|
3562
|
-
y1: 0,
|
|
3563
|
-
x2: "100%",
|
|
3564
|
-
y2: "100%",
|
|
3565
|
-
stroke: diagonals.diagDownColor,
|
|
3566
|
-
"stroke-width": diagonals.diagDownWidth
|
|
3567
|
-
})
|
|
3574
|
+
diagonalLine(doc, 0, 0, "100%", "100%", diagonals.diagDownColor, diagonals.diagDownWidth)
|
|
3568
3575
|
);
|
|
3569
3576
|
}
|
|
3570
3577
|
if (diagonals.diagUpColor && diagonals.diagUpWidth) {
|
|
3571
3578
|
svg.appendChild(
|
|
3572
|
-
|
|
3573
|
-
x1: 0,
|
|
3574
|
-
y1: "100%",
|
|
3575
|
-
x2: "100%",
|
|
3576
|
-
y2: 0,
|
|
3577
|
-
stroke: diagonals.diagUpColor,
|
|
3578
|
-
"stroke-width": diagonals.diagUpWidth
|
|
3579
|
-
})
|
|
3579
|
+
diagonalLine(doc, 0, "100%", "100%", 0, diagonals.diagUpColor, diagonals.diagUpWidth)
|
|
3580
3580
|
);
|
|
3581
3581
|
}
|
|
3582
3582
|
return svg;
|
|
3583
3583
|
}
|
|
3584
3584
|
function appendCellText(doc, td, cell) {
|
|
3585
|
-
const blocks =
|
|
3585
|
+
const blocks = chunkFPE5PZMI_cjs.cellParagraphBlocks(cell);
|
|
3586
3586
|
if (blocks) {
|
|
3587
3587
|
for (const block of blocks) {
|
|
3588
3588
|
const div = createEl(doc, "div", "pptxv-table-para", { display: "block", ...block.css });
|
|
@@ -3617,7 +3617,7 @@ function appendRuns(doc, parent, runs) {
|
|
|
3617
3617
|
}
|
|
3618
3618
|
const span = createEl(doc, "span", "pptxv-table-run", {
|
|
3619
3619
|
position: "relative",
|
|
3620
|
-
...
|
|
3620
|
+
...chunkFPE5PZMI_cjs.cellRunStyle(run)
|
|
3621
3621
|
});
|
|
3622
3622
|
span.textContent = run.text;
|
|
3623
3623
|
parent.appendChild(span);
|
|
@@ -3631,8 +3631,8 @@ function registerTableChartRenderers(registry) {
|
|
|
3631
3631
|
}
|
|
3632
3632
|
|
|
3633
3633
|
// src/pptx/dom/glyph-outline-cache.ts
|
|
3634
|
-
var glyphOutlineFontCache = new
|
|
3635
|
-
var getGlyphOutline =
|
|
3634
|
+
var glyphOutlineFontCache = new chunkFPE5PZMI_cjs.GlyphOutlineFontCache();
|
|
3635
|
+
var getGlyphOutline = chunkFPE5PZMI_cjs.createGlyphOutlineLookup(glyphOutlineFontCache);
|
|
3636
3636
|
|
|
3637
3637
|
// src/pptx/dom/elements/text-warp.ts
|
|
3638
3638
|
function renderWarpedText(element, context) {
|
|
@@ -3644,12 +3644,12 @@ function renderWarpedText(element, context) {
|
|
|
3644
3644
|
if (!preset || preset === "textNoShape" || preset === "textPlain") {
|
|
3645
3645
|
return null;
|
|
3646
3646
|
}
|
|
3647
|
-
const paragraphs =
|
|
3647
|
+
const paragraphs = chunkFPE5PZMI_cjs.groupIntoParagraphs(element);
|
|
3648
3648
|
if (paragraphs.length === 0) {
|
|
3649
3649
|
return null;
|
|
3650
3650
|
}
|
|
3651
|
-
if (!
|
|
3652
|
-
const transform =
|
|
3651
|
+
if (!chunkFPE5PZMI_cjs.shouldUseSvgWarp(preset)) {
|
|
3652
|
+
const transform = chunkFPE5PZMI_cjs.getWarpCssTransform(preset, style?.textWarpAdj, style?.textWarpAdj2);
|
|
3653
3653
|
if (!transform) {
|
|
3654
3654
|
return null;
|
|
3655
3655
|
}
|
|
@@ -3677,7 +3677,7 @@ function renderWarpedText(element, context) {
|
|
|
3677
3677
|
text.textContent = paragraphs.map((p) => p.segments.map((s) => s.text).join("")).join("\n");
|
|
3678
3678
|
return text;
|
|
3679
3679
|
}
|
|
3680
|
-
if (
|
|
3680
|
+
if (chunkFPE5PZMI_cjs.hasGlyphEnvelope(preset)) {
|
|
3681
3681
|
return renderGlyphWarp(element, paragraphs, context);
|
|
3682
3682
|
}
|
|
3683
3683
|
return renderPathWarp(element, paragraphs, context);
|
|
@@ -3686,7 +3686,7 @@ function segmentFont(segment, elementStyle) {
|
|
|
3686
3686
|
const s = segment.style ?? {};
|
|
3687
3687
|
const family = s.fontFamily || elementStyle.fontFamily;
|
|
3688
3688
|
return {
|
|
3689
|
-
fontFamily: family ? pptx.getSubstituteFontFamily(family) :
|
|
3689
|
+
fontFamily: family ? pptx.getSubstituteFontFamily(family) : chunkIURZJAWP_cjs.DEFAULT_FONT_FAMILY,
|
|
3690
3690
|
fontSizePx: s.fontSize ?? elementStyle.fontSize ?? 18,
|
|
3691
3691
|
bold: s.bold ?? elementStyle.bold,
|
|
3692
3692
|
italic: s.italic ?? elementStyle.italic
|
|
@@ -3703,7 +3703,7 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3703
3703
|
});
|
|
3704
3704
|
svg.setAttribute("class", "pptxv-wordart");
|
|
3705
3705
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%;overflow:visible");
|
|
3706
|
-
const perLine =
|
|
3706
|
+
const perLine = chunkFPE5PZMI_cjs.buildGlyphEnvelopeBlock(
|
|
3707
3707
|
preset,
|
|
3708
3708
|
paragraphs.map(
|
|
3709
3709
|
(paragraph) => paragraph.segments.map((seg, i) => ({
|
|
@@ -3728,7 +3728,7 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3728
3728
|
const renderedFamily = s.fontFamily || style.fontFamily;
|
|
3729
3729
|
const textAttrs = {
|
|
3730
3730
|
fill,
|
|
3731
|
-
"font-family": renderedFamily ? pptx.getSubstituteFontFamily(renderedFamily) :
|
|
3731
|
+
"font-family": renderedFamily ? pptx.getSubstituteFontFamily(renderedFamily) : chunkIURZJAWP_cjs.DEFAULT_FONT_FAMILY,
|
|
3732
3732
|
"font-size": s.fontSize ?? style.fontSize ?? 18,
|
|
3733
3733
|
"font-weight": s.bold ?? style.bold ? "bold" : void 0,
|
|
3734
3734
|
"font-style": s.italic ?? style.italic ? "italic" : void 0
|
|
@@ -3798,7 +3798,7 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3798
3798
|
defs.appendChild(
|
|
3799
3799
|
createSvgEl(context.document, "path", {
|
|
3800
3800
|
id,
|
|
3801
|
-
d:
|
|
3801
|
+
d: chunkFPE5PZMI_cjs.buildWarpPath(
|
|
3802
3802
|
preset,
|
|
3803
3803
|
element.width,
|
|
3804
3804
|
element.height,
|
|
@@ -3811,7 +3811,7 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3811
3811
|
);
|
|
3812
3812
|
const text = createSvgEl(context.document, "text", {
|
|
3813
3813
|
fill: style.color ?? "#000000",
|
|
3814
|
-
"font-family": style.fontFamily ? pptx.getSubstituteFontFamily(style.fontFamily) :
|
|
3814
|
+
"font-family": style.fontFamily ? pptx.getSubstituteFontFamily(style.fontFamily) : chunkIURZJAWP_cjs.DEFAULT_FONT_FAMILY,
|
|
3815
3815
|
"font-size": style.fontSize ?? 18,
|
|
3816
3816
|
"font-weight": style.bold ? "bold" : void 0,
|
|
3817
3817
|
"font-style": style.italic ? "italic" : void 0
|
|
@@ -3831,7 +3831,7 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3831
3831
|
|
|
3832
3832
|
// src/pptx/dom/elements/text-shape.ts
|
|
3833
3833
|
var renderTextShapeElement = (element, zIndex, context) => {
|
|
3834
|
-
const container =
|
|
3834
|
+
const container = chunkFPE5PZMI_cjs.getContainerStyle(element, zIndex);
|
|
3835
3835
|
const animState = context.presentationStates?.get(element.id);
|
|
3836
3836
|
const shape = getShapeFillStrokeStyle(
|
|
3837
3837
|
element,
|
|
@@ -3846,7 +3846,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3846
3846
|
const el = createEl(context.document, "div", "pptxv-element pptxv-shape", merged);
|
|
3847
3847
|
el.dataset.elementId = element.id;
|
|
3848
3848
|
if (context.interactive && !context.presenting) {
|
|
3849
|
-
const hitTargetStyle =
|
|
3849
|
+
const hitTargetStyle = chunkFPE5PZMI_cjs.elementHitTargetStyle(element);
|
|
3850
3850
|
if (hitTargetStyle) {
|
|
3851
3851
|
const hitTarget = createEl(context.document, "div", void 0, hitTargetStyle);
|
|
3852
3852
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
@@ -3889,8 +3889,8 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3889
3889
|
} else if (warped) {
|
|
3890
3890
|
el.appendChild(warped);
|
|
3891
3891
|
} else {
|
|
3892
|
-
const linkedSegments =
|
|
3893
|
-
const paragraphs =
|
|
3892
|
+
const linkedSegments = chunkFPE5PZMI_cjs.getOverflowSegments(element, context.slide?.elements);
|
|
3893
|
+
const paragraphs = chunkFPE5PZMI_cjs.buildParagraphs(element, context.fieldContext, linkedSegments);
|
|
3894
3894
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
3895
3895
|
if (hasText) {
|
|
3896
3896
|
el.appendChild(
|
|
@@ -3901,7 +3901,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3901
3901
|
);
|
|
3902
3902
|
} else {
|
|
3903
3903
|
const mode = context.interactive && !context.presenting ? "edit" : "present";
|
|
3904
|
-
const prompt =
|
|
3904
|
+
const prompt = chunkFPE5PZMI_cjs.placeholderPromptDescriptor(element, mode);
|
|
3905
3905
|
if (prompt) {
|
|
3906
3906
|
const hint = createEl(context.document, "div", "pptxv-placeholder-prompt", {
|
|
3907
3907
|
...getTextBlockStyle(element),
|
|
@@ -3965,8 +3965,8 @@ async function loadPresentation(buffer, options) {
|
|
|
3965
3965
|
digitalSignatureCount: parsed.digitalSignatureCount ?? 0,
|
|
3966
3966
|
isPasswordProtected: parsed.isPasswordProtected ?? false,
|
|
3967
3967
|
canvasSize: {
|
|
3968
|
-
width: parsed.width ??
|
|
3969
|
-
height: parsed.height ??
|
|
3968
|
+
width: parsed.width ?? chunkIURZJAWP_cjs.DEFAULT_CANVAS_WIDTH,
|
|
3969
|
+
height: parsed.height ?? chunkIURZJAWP_cjs.DEFAULT_CANVAS_HEIGHT
|
|
3970
3970
|
},
|
|
3971
3971
|
mediaDataUrls,
|
|
3972
3972
|
colorScheme: parsed.theme?.colorScheme,
|
|
@@ -4066,15 +4066,15 @@ async function resolveImageUrls(handler, slides) {
|
|
|
4066
4066
|
|
|
4067
4067
|
Object.defineProperty(exports, "buildEmbeddedFontStyles", {
|
|
4068
4068
|
enumerable: true,
|
|
4069
|
-
get: function () { return
|
|
4069
|
+
get: function () { return chunkFPE5PZMI_cjs.buildEmbeddedFontStyles; }
|
|
4070
4070
|
});
|
|
4071
4071
|
Object.defineProperty(exports, "buildFieldSubstitutionContext", {
|
|
4072
4072
|
enumerable: true,
|
|
4073
|
-
get: function () { return
|
|
4073
|
+
get: function () { return chunkFPE5PZMI_cjs.buildFieldSubstitutionContext; }
|
|
4074
4074
|
});
|
|
4075
4075
|
Object.defineProperty(exports, "renderChartViewModelSvg", {
|
|
4076
4076
|
enumerable: true,
|
|
4077
|
-
get: function () { return
|
|
4077
|
+
get: function () { return chunkWKLHJEPD_cjs.renderChartViewModelSvg; }
|
|
4078
4078
|
});
|
|
4079
4079
|
Object.defineProperty(exports, "createTranslator", {
|
|
4080
4080
|
enumerable: true,
|