ooxml-ui 1.5.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +59 -0
- package/dist/{chunk-FN3MBKHE.js → chunk-L7JV5FVE.js} +1 -1
- package/dist/{chunk-CXOK5QWQ.js → chunk-OGNNNTKI.js} +1 -1
- package/dist/{chunk-6YEWVS7I.js → chunk-PXIYHFZ5.js} +1 -1
- package/dist/{chunk-YNGNCKBE.js → chunk-QAIVGTQZ.js} +3 -3
- package/dist/{chunk-J2WUY2Q4.js → chunk-QHAE6Y5B.js} +156 -8
- package/dist/{chunk-V5P7RPMN.js → chunk-Z7CS3UUK.js} +5 -4
- package/dist/controls.d.ts +4 -2
- package/dist/controls.d.ts.map +1 -1
- package/dist/controls.js +3 -3
- package/dist/docx.js +4 -4
- package/dist/export/pdf-pages.d.ts +29 -0
- package/dist/form/symbol-picker.d.ts +45 -0
- package/dist/form/symbol-picker.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/pptx/{chart-3d-view-scene-SE2Y6QRE.cjs → chart-3d-view-scene-55WDENSO.cjs} +38 -38
- package/dist/pptx/{chart-3d-view-scene-OYJ4CDCO.mjs → chart-3d-view-scene-ERX2GRCD.mjs} +2 -2
- package/dist/pptx/{chunk-CIVA3MLN.mjs → chunk-AWQRQUPL.mjs} +2 -1
- package/dist/pptx/{chunk-O2TZQM65.cjs → chunk-BLAJIEXA.cjs} +271 -155
- package/dist/pptx/{chunk-LQLOD3HL.mjs → chunk-E55NU4BF.mjs} +121 -8
- package/dist/pptx/{chunk-7DMJEYQJ.cjs → chunk-G2YUKLRX.cjs} +1 -1
- package/dist/pptx/{chunk-IURZJAWP.cjs → chunk-LCIXR7WE.cjs} +55 -0
- package/dist/pptx/{chunk-WKLHJEPD.cjs → chunk-RPRC2EG5.cjs} +14 -13
- package/dist/pptx/{chunk-STLXPKJJ.mjs → chunk-SVN6OBG4.mjs} +55 -0
- package/dist/pptx/{chunk-LHNTMJSK.mjs → chunk-TKATCPOK.mjs} +1 -1
- package/dist/pptx/dom/elements/text-block.d.ts.map +1 -1
- package/dist/pptx/dom/index.cjs +252 -248
- package/dist/pptx/dom/index.mjs +12 -8
- package/dist/pptx/export/html2canvas-clone.cjs +2 -2
- package/dist/pptx/export/html2canvas-clone.mjs +1 -1
- package/dist/pptx/index.cjs +3032 -3020
- package/dist/pptx/index.mjs +4 -4
- 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-gradient-defs.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-surface-treemap.cjs +4 -4
- package/dist/pptx/render/chart-surface-treemap.mjs +1 -1
- package/dist/pptx/render/chart-view-model-dom-helpers.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/element-action-affordance.d.ts +1 -1
- package/dist/pptx/render/element-action-affordance.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +1 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/presentation-action.d.ts.map +1 -1
- package/dist/pptx/render/text-run-meta.d.ts +2 -0
- package/dist/pptx/render/text-run-meta.d.ts.map +1 -1
- package/dist/pptx/render/viewer-hyperlinks.d.ts +34 -0
- package/dist/pptx/render/viewer-hyperlinks.d.ts.map +1 -0
- package/dist/presence.js +2 -2
- package/dist/ribbon/gallery.d.ts.map +1 -1
- package/dist/smartart/smartart.d.ts +1 -1
- package/dist/smartart.js +2 -2
- package/dist/teams/app-rail.d.ts +1 -1
- package/dist/teams/avatar.d.ts +1 -1
- package/dist/teams/call-controls.d.ts +1 -1
- package/dist/teams/call-grid.d.ts +1 -1
- package/dist/teams/channel-list.d.ts +1 -1
- package/dist/teams/chat-composer.d.ts +1 -1
- package/dist/teams/chat-list.d.ts +1 -1
- package/dist/teams/prejoin.d.ts +1 -1
- package/dist/teams.js +4 -4
- package/dist/visio/controller.d.ts +11 -0
- package/dist/visio/format-shape-dialog.d.ts +21 -0
- package/dist/visio/page-setup-action.d.ts +29 -0
- package/dist/visio/page-setup-dialog-form.d.ts +32 -0
- package/dist/visio/presentation-keys.d.ts +41 -0
- package/dist/visio/render-effects.d.ts +10 -0
- package/dist/visio/render-shadow.d.ts +7 -0
- package/dist/visio/ribbon-action.d.ts +97 -4
- package/dist/visio/ribbon-change-shape.d.ts +11 -0
- package/dist/visio/ribbon-diagram-parts.d.ts +14 -0
- package/dist/visio/ribbon-layout.d.ts +11 -0
- package/dist/visio/ribbon-other-tabs.d.ts +2 -5
- package/dist/visio/ribbon-page-setup.d.ts +12 -0
- package/dist/visio/ribbon-parts.d.ts +1 -0
- package/dist/visio/ribbon-review.d.ts +4 -0
- package/dist/visio/ribbon-router.d.ts +29 -1
- package/dist/visio/ribbon-shape-styles.d.ts +17 -0
- package/dist/visio/ribbon-themes.d.ts +17 -0
- package/dist/visio/ribbon-view.d.ts +1 -1
- package/dist/visio/shapes-sections.d.ts +12 -0
- package/dist/visio/shapes-window.d.ts +3 -31
- package/dist/visio/stencil-catalog.d.ts +47 -0
- package/dist/visio/styles.d.ts +1 -1
- package/dist/visio/text-run-style.d.ts +9 -0
- package/dist/visio/viewer-backstage.d.ts +7 -0
- package/dist/visio/viewer-change-shape.d.ts +16 -0
- package/dist/visio/viewer-chrome.d.ts +1 -1
- package/dist/visio/viewer-commands.d.ts +6 -0
- package/dist/visio/viewer-comment-threads.d.ts +17 -0
- package/dist/visio/viewer-comments.d.ts +25 -0
- package/dist/visio/viewer-connection-points.d.ts +31 -0
- package/dist/visio/viewer-connector-routes.d.ts +24 -0
- package/dist/visio/viewer-connector-tool.d.ts +42 -0
- package/dist/visio/viewer-data-import.d.ts +31 -0
- package/dist/visio/viewer-data-links.d.ts +25 -0
- package/dist/visio/viewer-data-sources.d.ts +23 -0
- package/dist/visio/viewer-data-window.d.ts +17 -0
- package/dist/visio/viewer-data.d.ts +28 -0
- package/dist/visio/viewer-diagram-parts.d.ts +17 -0
- package/dist/visio/viewer-dialog.d.ts +31 -0
- package/dist/visio/viewer-draw-tool.d.ts +12 -4
- package/dist/visio/viewer-drawing-gesture.d.ts +6 -4
- package/dist/visio/viewer-edit-controls.d.ts +1 -1
- package/dist/visio/viewer-element.d.ts +5 -0
- package/dist/visio/viewer-explorer.d.ts +17 -0
- package/dist/visio/viewer-export.d.ts +17 -0
- package/dist/visio/viewer-format-painter.d.ts +20 -0
- package/dist/visio/viewer-format-shape.d.ts +16 -0
- package/dist/visio/viewer-grouping.d.ts +13 -0
- package/dist/visio/viewer-guides.d.ts +27 -0
- package/dist/visio/viewer-insert-dialog.d.ts +41 -0
- package/dist/visio/viewer-insert.d.ts +25 -0
- package/dist/visio/viewer-issues.d.ts +29 -0
- package/dist/visio/viewer-layer-assign.d.ts +17 -0
- package/dist/visio/viewer-layout-commands.d.ts +41 -0
- package/dist/visio/viewer-layout.d.ts +24 -0
- package/dist/visio/viewer-page-breaks.d.ts +6 -0
- package/dist/visio/viewer-page-setup-dialog.d.ts +20 -0
- package/dist/visio/viewer-page-setup.d.ts +23 -0
- package/dist/visio/viewer-paste-special.d.ts +18 -0
- package/dist/visio/viewer-pointer-gestures.d.ts +5 -0
- package/dist/visio/viewer-presentation.d.ts +29 -0
- package/dist/visio/viewer-review.d.ts +23 -0
- package/dist/visio/viewer-select-type.d.ts +16 -0
- package/dist/visio/viewer-shape-data.d.ts +16 -0
- package/dist/visio/viewer-shape-report.d.ts +26 -0
- package/dist/visio/viewer-shape-styles.d.ts +9 -0
- package/dist/visio/viewer-shape-target.d.ts +7 -0
- package/dist/visio/viewer-stencil.d.ts +1 -1
- package/dist/visio/viewer-subprocess.d.ts +22 -0
- package/dist/visio/viewer-text-block.d.ts +23 -0
- package/dist/visio/viewer-text-dialog.d.ts +24 -0
- package/dist/visio/viewer-text-features.d.ts +24 -0
- package/dist/visio/viewer-text-insert.d.ts +28 -0
- package/dist/visio/viewer-themes.d.ts +16 -0
- package/dist/visio.js +14634 -6446
- package/dist/xlsx.js +7 -7
- 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 chunkBLAJIEXA_cjs = require('../chunk-BLAJIEXA.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 chunkRPRC2EG5_cjs = require('../chunk-RPRC2EG5.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 chunkLCIXR7WE_cjs = require('../chunk-LCIXR7WE.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 chunkG2YUKLRX_cjs = require('../chunk-G2YUKLRX.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 = chunkBLAJIEXA_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 = chunkBLAJIEXA_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 - chunkBLAJIEXA_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
143
|
+
top: `${marker.y - chunkBLAJIEXA_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
144
|
+
width: `${chunkBLAJIEXA_cjs.COMMENT_MARKER_SIZE}px`,
|
|
145
|
+
height: `${chunkBLAJIEXA_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 = chunkBLAJIEXA_cjs.getComputedEffectStyle(el);
|
|
214
214
|
const groupStyle = {};
|
|
215
215
|
if (fx2.filter) {
|
|
216
216
|
groupStyle.filter = fx2.filter;
|
|
@@ -226,13 +226,13 @@ 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 : chunkLCIXR7WE_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 = chunkBLAJIEXA_cjs.getComputedStrokeStyle(el);
|
|
236
236
|
if (stroke.borderWidth > 0) {
|
|
237
237
|
if (animatesStroke) {
|
|
238
238
|
style["borderWidth"] = stroke.cssBorderWidth;
|
|
@@ -251,7 +251,7 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
251
251
|
style["strokeMiterlimit"] = stroke.strokeMiterlimit;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
const fx =
|
|
254
|
+
const fx = chunkBLAJIEXA_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, chunkBLAJIEXA_cjs.getComputed3dStyle(el));
|
|
272
|
+
if (chunkBLAJIEXA_cjs.isHollowShapeElement(el)) {
|
|
273
273
|
style["pointerEvents"] = "none";
|
|
274
274
|
}
|
|
275
|
-
const geometry =
|
|
275
|
+
const geometry = chunkBLAJIEXA_cjs.resolveShapeGeometry(el);
|
|
276
276
|
switch (geometry.kind) {
|
|
277
277
|
case "bare":
|
|
278
278
|
style["backgroundColor"] = "transparent";
|
|
@@ -292,10 +292,10 @@ 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"] = chunkG2YUKLRX_cjs.screenBorder(
|
|
296
296
|
geometry.strokeWidth,
|
|
297
|
-
|
|
298
|
-
el.shapeStyle?.strokeColor ??
|
|
297
|
+
chunkLCIXR7WE_cjs.getCssBorderDashStyle(el.shapeStyle?.strokeDash),
|
|
298
|
+
el.shapeStyle?.strokeColor ?? chunkLCIXR7WE_cjs.DEFAULT_STROKE_COLOR
|
|
299
299
|
);
|
|
300
300
|
return style;
|
|
301
301
|
default:
|
|
@@ -306,12 +306,12 @@ function getTextBlockStyle(el) {
|
|
|
306
306
|
if (!pptx.hasTextProperties(el)) {
|
|
307
307
|
return {};
|
|
308
308
|
}
|
|
309
|
-
const base =
|
|
310
|
-
fallbackColor:
|
|
309
|
+
const base = chunkBLAJIEXA_cjs.buildTextBlockStyle(el, {
|
|
310
|
+
fallbackColor: chunkLCIXR7WE_cjs.DEFAULT_TEXT_COLOR,
|
|
311
311
|
bodyLayout: true,
|
|
312
312
|
pxLengths: true
|
|
313
313
|
});
|
|
314
|
-
const scene3d =
|
|
314
|
+
const scene3d = chunkBLAJIEXA_cjs.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height });
|
|
315
315
|
if (!scene3d) {
|
|
316
316
|
return base;
|
|
317
317
|
}
|
|
@@ -415,8 +415,8 @@ function renderSlideStage(options) {
|
|
|
415
415
|
"--pptx-slide-h": `${canvasSize.height}px`,
|
|
416
416
|
"--pptxv-grid-size": `${options.gridSpacingPx ?? 10}px`,
|
|
417
417
|
// One device pixel in slide px: thin strokes stay visible on screen.
|
|
418
|
-
...
|
|
419
|
-
...
|
|
418
|
+
...chunkG2YUKLRX_cjs.deviceStrokeStageStyle(scale),
|
|
419
|
+
...chunkBLAJIEXA_cjs.getSlideBackgroundStyle(slide, { widthPx: canvasSize.width, heightPx: canvasSize.height })
|
|
420
420
|
});
|
|
421
421
|
if (interactive || options.reading) {
|
|
422
422
|
stage.setAttribute("role", "region");
|
|
@@ -457,19 +457,19 @@ function renderSlideStage(options) {
|
|
|
457
457
|
selectedElementIds: options.selectedElementIds,
|
|
458
458
|
registry,
|
|
459
459
|
renderElement(element, zIndex) {
|
|
460
|
-
if (!
|
|
460
|
+
if (!chunkBLAJIEXA_cjs.isElementRendered(element)) {
|
|
461
461
|
return null;
|
|
462
462
|
}
|
|
463
463
|
const node = registry.resolve(element.type)(element, zIndex, context);
|
|
464
464
|
if (node && interactive && "setAttribute" in node) {
|
|
465
|
-
const templateLocked =
|
|
465
|
+
const templateLocked = chunkBLAJIEXA_cjs.isTemplateElementId(element.id) && !options.templateEditing;
|
|
466
466
|
if (templateLocked) {
|
|
467
467
|
node.style.pointerEvents = "none";
|
|
468
468
|
}
|
|
469
469
|
node.setAttribute("data-pptx-element", "true");
|
|
470
470
|
}
|
|
471
|
-
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" &&
|
|
472
|
-
const hitTargetStyle =
|
|
471
|
+
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" && chunkBLAJIEXA_cjs.shouldRenderHitTarget(interactive, options.presenting ?? false)) {
|
|
472
|
+
const hitTargetStyle = chunkBLAJIEXA_cjs.elementHitTargetStyle(element);
|
|
473
473
|
if (hitTargetStyle) {
|
|
474
474
|
const hitTarget = createEl(doc, "div", void 0, hitTargetStyle);
|
|
475
475
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
@@ -488,20 +488,20 @@ function renderSlideStage(options) {
|
|
|
488
488
|
}
|
|
489
489
|
});
|
|
490
490
|
if (interactive || options.reading) {
|
|
491
|
-
|
|
491
|
+
chunkBLAJIEXA_cjs.applyRenderedElementAccessibility(stage, slide.elements, {
|
|
492
492
|
presenting: options.presenting ?? false
|
|
493
493
|
});
|
|
494
494
|
}
|
|
495
495
|
if (interactive) {
|
|
496
|
-
|
|
496
|
+
chunkBLAJIEXA_cjs.applyElementActionAffordances(
|
|
497
497
|
stage,
|
|
498
498
|
slide.elements.filter(
|
|
499
|
-
(element) => options.templateEditing || !
|
|
499
|
+
(element) => options.templateEditing || !chunkBLAJIEXA_cjs.isTemplateElementId(element.id)
|
|
500
500
|
),
|
|
501
501
|
{
|
|
502
502
|
canInteract: true,
|
|
503
503
|
presenting: options.presenting ?? false,
|
|
504
|
-
labels:
|
|
504
|
+
labels: chunkBLAJIEXA_cjs.actionAffordanceLabels((key) => t(key))
|
|
505
505
|
}
|
|
506
506
|
);
|
|
507
507
|
}
|
|
@@ -557,7 +557,7 @@ function createChartTitleEditor(container, onCommit) {
|
|
|
557
557
|
|
|
558
558
|
// src/pptx/dom/elements/chart-editable.ts
|
|
559
559
|
function attachChartEditing(container, element, context, repaint) {
|
|
560
|
-
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !
|
|
560
|
+
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !chunkBLAJIEXA_cjs.canDrillDown(element)) {
|
|
561
561
|
return;
|
|
562
562
|
}
|
|
563
563
|
const chart = element;
|
|
@@ -567,13 +567,13 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
567
567
|
if (!context.selectedElementIds?.has(element.id)) {
|
|
568
568
|
return;
|
|
569
569
|
}
|
|
570
|
-
|
|
571
|
-
container.classList.add(
|
|
570
|
+
chunkRPRC2EG5_cjs.ensureChartInteractionStyles();
|
|
571
|
+
container.classList.add(chunkRPRC2EG5_cjs.CHART_INTERACTIVE_CLASS);
|
|
572
572
|
let active = null;
|
|
573
573
|
let activeMark = null;
|
|
574
574
|
let selected = context.chartPartSelection?.elementId === element.id ? context.chartPartSelection.part : null;
|
|
575
575
|
let badge = null;
|
|
576
|
-
|
|
576
|
+
chunkRPRC2EG5_cjs.applyChartPartHighlight(container, selected);
|
|
577
577
|
const showBadge = (text) => {
|
|
578
578
|
if (!badge) {
|
|
579
579
|
badge = container.ownerDocument.createElement("div");
|
|
@@ -597,26 +597,26 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
597
597
|
if (!rect) {
|
|
598
598
|
return;
|
|
599
599
|
}
|
|
600
|
-
const step2 =
|
|
600
|
+
const step2 = chunkBLAJIEXA_cjs.advanceChartMarkDrag(activeMark, event.clientX, event.clientY, rect);
|
|
601
601
|
if (!step2) {
|
|
602
602
|
return;
|
|
603
603
|
}
|
|
604
604
|
repaint(step2.chartData);
|
|
605
|
-
|
|
606
|
-
showBadge(
|
|
605
|
+
chunkRPRC2EG5_cjs.applyChartPartHighlight(container, selected);
|
|
606
|
+
showBadge(chunkLCIXR7WE_cjs.formatAxisValue(step2.value));
|
|
607
607
|
return;
|
|
608
608
|
}
|
|
609
609
|
if (!active) {
|
|
610
610
|
return;
|
|
611
611
|
}
|
|
612
612
|
const height = container.querySelector("svg")?.getBoundingClientRect().height ?? 0;
|
|
613
|
-
const step =
|
|
613
|
+
const step = chunkRPRC2EG5_cjs.advanceChartValueDrag(active, event.clientY, height);
|
|
614
614
|
if (!step) {
|
|
615
615
|
return;
|
|
616
616
|
}
|
|
617
617
|
repaint(step.chartData);
|
|
618
|
-
|
|
619
|
-
showBadge(
|
|
618
|
+
chunkRPRC2EG5_cjs.applyChartPartHighlight(container, selected);
|
|
619
|
+
showBadge(chunkLCIXR7WE_cjs.formatAxisValue(step.value));
|
|
620
620
|
};
|
|
621
621
|
const onUp = () => {
|
|
622
622
|
if (active || activeMark) {
|
|
@@ -642,12 +642,12 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
642
642
|
}
|
|
643
643
|
if ((finished?.moved || finishedMark?.moved) && chart.chartData) {
|
|
644
644
|
repaint(chart.chartData);
|
|
645
|
-
|
|
645
|
+
chunkRPRC2EG5_cjs.applyChartPartHighlight(container, selected);
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
648
|
const openTitleEditor = createChartTitleEditor(container, (value) => {
|
|
649
649
|
if (chart.chartData) {
|
|
650
|
-
context.onChartPointChange?.(element,
|
|
650
|
+
context.onChartPointChange?.(element, chunkRPRC2EG5_cjs.withChartTitle(chart.chartData, value));
|
|
651
651
|
}
|
|
652
652
|
});
|
|
653
653
|
container.addEventListener("dblclick", (event) => {
|
|
@@ -662,24 +662,24 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
662
662
|
}
|
|
663
663
|
return;
|
|
664
664
|
}
|
|
665
|
-
if (
|
|
665
|
+
if (chunkRPRC2EG5_cjs.findChartPartTarget(event.target)) {
|
|
666
666
|
event.stopPropagation();
|
|
667
667
|
}
|
|
668
668
|
});
|
|
669
669
|
container.addEventListener("pointerdown", (event) => {
|
|
670
|
-
const part =
|
|
670
|
+
const part = chunkRPRC2EG5_cjs.findChartPartTarget(event.target);
|
|
671
671
|
if (!part || !chart.chartData) {
|
|
672
672
|
return;
|
|
673
673
|
}
|
|
674
674
|
event.stopPropagation();
|
|
675
675
|
selected = part;
|
|
676
|
-
|
|
676
|
+
chunkRPRC2EG5_cjs.applyChartPartHighlight(container, selected);
|
|
677
677
|
context.onChartPartSelect?.(element, part);
|
|
678
|
-
const vm =
|
|
678
|
+
const vm = chunkLCIXR7WE_cjs.buildChartViewModel(chart);
|
|
679
679
|
let captured = false;
|
|
680
|
-
const chartKind =
|
|
680
|
+
const chartKind = chunkLCIXR7WE_cjs.resolveChartKind(chart.chartData.chartType ?? "bar");
|
|
681
681
|
if (part.pointIndex !== void 0 && chartKind !== "unsupported") {
|
|
682
|
-
const markGeometry =
|
|
682
|
+
const markGeometry = chunkRPRC2EG5_cjs.buildChartMarkDragGeometry({
|
|
683
683
|
kind: chartKind,
|
|
684
684
|
element: chart,
|
|
685
685
|
chartData: chart.chartData,
|
|
@@ -687,7 +687,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
687
687
|
seriesIndex: part.seriesIndex,
|
|
688
688
|
pointIndex: part.pointIndex
|
|
689
689
|
});
|
|
690
|
-
const startedMark =
|
|
690
|
+
const startedMark = chunkBLAJIEXA_cjs.beginChartMarkDrag({
|
|
691
691
|
part,
|
|
692
692
|
geometry: markGeometry,
|
|
693
693
|
chartData: chart.chartData,
|
|
@@ -702,7 +702,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
704
|
if (!captured) {
|
|
705
|
-
const started =
|
|
705
|
+
const started = chunkRPRC2EG5_cjs.beginChartValueDrag({
|
|
706
706
|
part,
|
|
707
707
|
viewModel: vm,
|
|
708
708
|
chartData: chart.chartData,
|
|
@@ -732,7 +732,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
732
732
|
var pool = null;
|
|
733
733
|
function collectThreeViews(root) {
|
|
734
734
|
const views = /* @__PURE__ */ new Map();
|
|
735
|
-
for (const view of root.querySelectorAll(
|
|
735
|
+
for (const view of root.querySelectorAll(chunkG2YUKLRX_cjs.THREE_VIEW_TAG)) {
|
|
736
736
|
if (view.spec && !views.has(view.spec)) {
|
|
737
737
|
views.set(view.spec, view);
|
|
738
738
|
}
|
|
@@ -768,8 +768,8 @@ function rendering3DFlagsOf(context) {
|
|
|
768
768
|
};
|
|
769
769
|
}
|
|
770
770
|
function mountThreeViewInto(doc, wrapper, options) {
|
|
771
|
-
|
|
772
|
-
const view = takeReusableThreeView(options.spec) ?? doc.createElement(
|
|
771
|
+
chunkG2YUKLRX_cjs.defineThreeViewElement(doc.defaultView?.customElements);
|
|
772
|
+
const view = takeReusableThreeView(options.spec) ?? doc.createElement(chunkG2YUKLRX_cjs.THREE_VIEW_TAG);
|
|
773
773
|
view.replaceChildren(...Array.from(wrapper.childNodes));
|
|
774
774
|
view.spec = options.spec;
|
|
775
775
|
view.interactive = options.interactive;
|
|
@@ -779,7 +779,7 @@ function mountThreeViewInto(doc, wrapper, options) {
|
|
|
779
779
|
return view;
|
|
780
780
|
}
|
|
781
781
|
function isChart3DEditable(element, context) {
|
|
782
|
-
return element.type === "chart" && Boolean(context.interactive) && Boolean(context.onChartPointChange) && Boolean(context.selectedElementIds?.has(element.id)) &&
|
|
782
|
+
return element.type === "chart" && Boolean(context.interactive) && Boolean(context.onChartPointChange) && Boolean(context.selectedElementIds?.has(element.id)) && chunkBLAJIEXA_cjs.canDrillDown(element);
|
|
783
783
|
}
|
|
784
784
|
function selectedChartPartOf(element, context) {
|
|
785
785
|
return context.chartPartSelection?.elementId === element.id ? context.chartPartSelection.part : null;
|
|
@@ -813,7 +813,7 @@ function wireChartThreeViewEvents(view, element, context, badgeHost) {
|
|
|
813
813
|
badge.className = "pptxv-chart-drag-badge";
|
|
814
814
|
badgeHost.appendChild(badge);
|
|
815
815
|
}
|
|
816
|
-
badge.textContent =
|
|
816
|
+
badge.textContent = chunkLCIXR7WE_cjs.formatAxisValue(value);
|
|
817
817
|
},
|
|
818
818
|
commitChartData: (next) => context.onChartPointChange?.(element, next)
|
|
819
819
|
};
|
|
@@ -821,19 +821,19 @@ function wireChartThreeViewEvents(view, element, context, badgeHost) {
|
|
|
821
821
|
const listeners = new AbortController();
|
|
822
822
|
chartViewListeners.set(view, listeners);
|
|
823
823
|
view.addEventListener(
|
|
824
|
-
|
|
825
|
-
(event) =>
|
|
824
|
+
chunkBLAJIEXA_cjs.THREE_VIEW_EVENTS.select,
|
|
825
|
+
(event) => chunkBLAJIEXA_cjs.applyChart3DSelect(bridge, event.detail.part),
|
|
826
826
|
{ signal: listeners.signal }
|
|
827
827
|
);
|
|
828
828
|
view.addEventListener(
|
|
829
|
-
|
|
830
|
-
(event) =>
|
|
829
|
+
chunkBLAJIEXA_cjs.THREE_VIEW_EVENTS.drag,
|
|
830
|
+
(event) => chunkBLAJIEXA_cjs.applyChart3DDrag(bridge, event.detail),
|
|
831
831
|
{ signal: listeners.signal }
|
|
832
832
|
);
|
|
833
833
|
}
|
|
834
834
|
var chartViewListeners = /* @__PURE__ */ new WeakMap();
|
|
835
835
|
function applyThreeViewTextStyle(el, style) {
|
|
836
|
-
for (const view of el.querySelectorAll(
|
|
836
|
+
for (const view of el.querySelectorAll(chunkG2YUKLRX_cjs.THREE_VIEW_TAG)) {
|
|
837
837
|
view.textStyle = style;
|
|
838
838
|
}
|
|
839
839
|
}
|
|
@@ -841,7 +841,7 @@ function applyThreeViewTextStyle(el, style) {
|
|
|
841
841
|
// src/pptx/dom/elements/chart.ts
|
|
842
842
|
var renderChartElement = (element, zIndex, context) => {
|
|
843
843
|
const wrapper = renderChartSvgElement(element, zIndex, context);
|
|
844
|
-
const spec = wrapper ?
|
|
844
|
+
const spec = wrapper ? chunkBLAJIEXA_cjs.resolveChartThreeViewSpec(element, rendering3DFlagsOf(context)) : null;
|
|
845
845
|
if (!wrapper || !spec) {
|
|
846
846
|
return wrapper;
|
|
847
847
|
}
|
|
@@ -863,16 +863,16 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
863
863
|
doc,
|
|
864
864
|
"div",
|
|
865
865
|
"pptxv-element pptxv-chart",
|
|
866
|
-
|
|
866
|
+
chunkBLAJIEXA_cjs.getContainerStyle(element, zIndex)
|
|
867
867
|
);
|
|
868
868
|
container.dataset.elementId = element.id;
|
|
869
869
|
const animationState = context.presentationStates?.get(element.id);
|
|
870
|
-
const chartData = element.chartData ?
|
|
870
|
+
const chartData = element.chartData ? chunkBLAJIEXA_cjs.resolveRevealedChartData(element.chartData, animationState) : element.chartData;
|
|
871
871
|
if (!chartData || chartData.series.length === 0) {
|
|
872
872
|
container.appendChild(renderChartPlaceholder(doc, chartData?.chartType ?? "bar", context.t));
|
|
873
873
|
return container;
|
|
874
874
|
}
|
|
875
|
-
const kind =
|
|
875
|
+
const kind = chunkLCIXR7WE_cjs.resolveChartKind(chartData.chartType ?? "bar");
|
|
876
876
|
if (kind === "unsupported") {
|
|
877
877
|
container.appendChild(renderChartPlaceholder(doc, chartData.chartType, context.t));
|
|
878
878
|
return container;
|
|
@@ -885,12 +885,12 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
885
885
|
};
|
|
886
886
|
container.querySelector("svg")?.remove();
|
|
887
887
|
container.appendChild(
|
|
888
|
-
|
|
888
|
+
chunkRPRC2EG5_cjs.renderChartViewModelSvg(doc, chunkLCIXR7WE_cjs.buildChartViewModel(themedElement), preserveAspectRatio)
|
|
889
889
|
);
|
|
890
890
|
};
|
|
891
891
|
paint(chartData);
|
|
892
892
|
attachChartEditing(container, element, context, paint);
|
|
893
|
-
const unsubscribe =
|
|
893
|
+
const unsubscribe = chunkLCIXR7WE_cjs.subscribeBarFacePicturePixelSamples(() => {
|
|
894
894
|
if (!container.isConnected) {
|
|
895
895
|
unsubscribe();
|
|
896
896
|
return;
|
|
@@ -900,7 +900,7 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
900
900
|
return container;
|
|
901
901
|
};
|
|
902
902
|
function resolveChartPalette2(chartData) {
|
|
903
|
-
return
|
|
903
|
+
return chunkLCIXR7WE_cjs.resolveChartPalette(chartData);
|
|
904
904
|
}
|
|
905
905
|
function renderChartPlaceholder(doc, chartType, t) {
|
|
906
906
|
const placeholder = createEl(doc, "div", "pptxv-placeholder pptxv-chart-placeholder", {
|
|
@@ -915,7 +915,7 @@ function renderChartPlaceholder(doc, chartType, t) {
|
|
|
915
915
|
border: "1px dashed #cbd5e1",
|
|
916
916
|
boxSizing: "border-box"
|
|
917
917
|
});
|
|
918
|
-
placeholder.textContent =
|
|
918
|
+
placeholder.textContent = chunkBLAJIEXA_cjs.chartPlaceholderLabel(chartType, (key, params) => t(key, params));
|
|
919
919
|
return placeholder;
|
|
920
920
|
}
|
|
921
921
|
|
|
@@ -979,7 +979,7 @@ function createRunBaseNode(doc, run) {
|
|
|
979
979
|
verticalAlign: "middle",
|
|
980
980
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
981
981
|
});
|
|
982
|
-
math.innerHTML =
|
|
982
|
+
math.innerHTML = chunkBLAJIEXA_cjs.runEquationMathMl(run.equation);
|
|
983
983
|
host.appendChild(math);
|
|
984
984
|
if (run.equation.number) {
|
|
985
985
|
const number = createEl(doc, "span", "pptxv-equation-number", {
|
|
@@ -991,9 +991,13 @@ function createRunBaseNode(doc, run) {
|
|
|
991
991
|
}
|
|
992
992
|
return host;
|
|
993
993
|
}
|
|
994
|
-
if (run.hyperlink
|
|
994
|
+
if (run.hyperlink && chunkBLAJIEXA_cjs.isRunHyperlinkClickable(run.hyperlink)) {
|
|
995
995
|
const link = createEl(doc, "a", "pptxv-link", run.style);
|
|
996
|
-
link.setAttribute("
|
|
996
|
+
link.setAttribute("data-pptx-hyperlink", run.hyperlink.url);
|
|
997
|
+
link.setAttribute("role", "link");
|
|
998
|
+
link.tabIndex = 0;
|
|
999
|
+
link.style.cursor = "pointer";
|
|
1000
|
+
if (run.hyperlink.href) link.setAttribute("href", run.hyperlink.href);
|
|
997
1001
|
link.setAttribute("target", run.hyperlink.target ?? "_blank");
|
|
998
1002
|
link.setAttribute("rel", run.hyperlink.rel ?? "noopener noreferrer");
|
|
999
1003
|
if (run.hyperlink.tooltip) {
|
|
@@ -1091,7 +1095,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1091
1095
|
bullet.textContent = para.bulletMarker;
|
|
1092
1096
|
p.appendChild(bullet);
|
|
1093
1097
|
}
|
|
1094
|
-
const spec = build ?
|
|
1098
|
+
const spec = build ? chunkBLAJIEXA_cjs.buildTextBuildSpec(
|
|
1095
1099
|
build.elementId,
|
|
1096
1100
|
paragraphs.indexOf(para),
|
|
1097
1101
|
para.runs.filter((run) => run.text !== NEWLINE_RUN).map((run) => ({ text: run.text, style: run.style })),
|
|
@@ -1100,7 +1104,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1100
1104
|
if (spec && spec.granularity !== "paragraph") {
|
|
1101
1105
|
for (const span of spec.spans ?? []) {
|
|
1102
1106
|
const node = createEl(doc, "span");
|
|
1103
|
-
applyStyleMap(node, { ...span.style ?? {}, ...
|
|
1107
|
+
applyStyleMap(node, { ...span.style ?? {}, ...chunkBLAJIEXA_cjs.textBuildSpanStyle(span) });
|
|
1104
1108
|
if (span.animId) {
|
|
1105
1109
|
node.setAttribute("data-anim-id", span.animId);
|
|
1106
1110
|
}
|
|
@@ -1113,7 +1117,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1113
1117
|
let runHost = p;
|
|
1114
1118
|
if (spec) {
|
|
1115
1119
|
const wrapper = createEl(doc, "span");
|
|
1116
|
-
applyStyleMap(wrapper,
|
|
1120
|
+
applyStyleMap(wrapper, chunkBLAJIEXA_cjs.textBuildSpanStyle(spec));
|
|
1117
1121
|
if (spec.animId) {
|
|
1118
1122
|
wrapper.setAttribute("data-anim-id", spec.animId);
|
|
1119
1123
|
}
|
|
@@ -1140,9 +1144,9 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1140
1144
|
const doc = context.document;
|
|
1141
1145
|
const ss = pptx.hasShapeProperties(element) ? element.shapeStyle : void 0;
|
|
1142
1146
|
const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
|
|
1143
|
-
const strokeColor = ss?.strokeColor ??
|
|
1147
|
+
const strokeColor = ss?.strokeColor ?? chunkLCIXR7WE_cjs.DEFAULT_STROKE_COLOR;
|
|
1144
1148
|
const strokeOpacity = ss?.strokeOpacity ?? 1;
|
|
1145
|
-
const dashArray =
|
|
1149
|
+
const dashArray = chunkLCIXR7WE_cjs.buildDashArray(ss?.strokeDash, strokeWidth, ss?.customDashSegments);
|
|
1146
1150
|
const w = Math.max(element.width, 1);
|
|
1147
1151
|
const h = Math.max(element.height, 1);
|
|
1148
1152
|
const wrapper = createEl(doc, "div", "pptxv-element pptxv-connector", {
|
|
@@ -1169,7 +1173,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1169
1173
|
if (element.hidden) {
|
|
1170
1174
|
wrapper.style.display = "none";
|
|
1171
1175
|
}
|
|
1172
|
-
const lineGlow =
|
|
1176
|
+
const lineGlow = chunkBLAJIEXA_cjs.getLineGlowFilterCss(ss);
|
|
1173
1177
|
if (lineGlow) {
|
|
1174
1178
|
wrapper.style.filter = lineGlow;
|
|
1175
1179
|
}
|
|
@@ -1177,7 +1181,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1177
1181
|
svg.setAttribute("style", "overflow:visible;display:block");
|
|
1178
1182
|
const seed = element.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
1179
1183
|
const defs = createSvgEl(doc, "defs");
|
|
1180
|
-
const lineShadow =
|
|
1184
|
+
const lineShadow = chunkBLAJIEXA_cjs.getLineShadowParams(ss);
|
|
1181
1185
|
const shadowId = lineShadow ? `${seed}-line-shadow` : void 0;
|
|
1182
1186
|
if (lineShadow && shadowId) {
|
|
1183
1187
|
const filter = createSvgEl(doc, "filter", {
|
|
@@ -1198,8 +1202,8 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1198
1202
|
);
|
|
1199
1203
|
defs.appendChild(filter);
|
|
1200
1204
|
}
|
|
1201
|
-
const startArrow =
|
|
1202
|
-
const endArrow =
|
|
1205
|
+
const startArrow = chunkBLAJIEXA_cjs.normalizeArrow(ss?.connectorStartArrow);
|
|
1206
|
+
const endArrow = chunkBLAJIEXA_cjs.normalizeArrow(ss?.connectorEndArrow);
|
|
1203
1207
|
const startMarkerId = startArrow ? `${seed}-start` : void 0;
|
|
1204
1208
|
const endMarkerId = endArrow ? `${seed}-end` : void 0;
|
|
1205
1209
|
if (startArrow && startMarkerId) {
|
|
@@ -1222,10 +1226,10 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1222
1226
|
svg.appendChild(defs);
|
|
1223
1227
|
}
|
|
1224
1228
|
const compound = ss?.compoundLine;
|
|
1225
|
-
const offsets =
|
|
1226
|
-
const widths =
|
|
1229
|
+
const offsets = chunkBLAJIEXA_cjs.getCompoundLineOffsets(compound, strokeWidth);
|
|
1230
|
+
const widths = chunkBLAJIEXA_cjs.getCompoundLineWidths(compound, strokeWidth);
|
|
1227
1231
|
const shapeType = pptx.hasShapeProperties(element) ? element.shapeType : void 0;
|
|
1228
|
-
const usePath =
|
|
1232
|
+
const usePath = chunkBLAJIEXA_cjs.connectorNeedsPath(shapeType) && pptx.hasShapeProperties(element);
|
|
1229
1233
|
const pathData = usePath ? pptx.getConnectorPathGeometry(element).pathData : void 0;
|
|
1230
1234
|
const x1 = element.flipHorizontal ? w : 0;
|
|
1231
1235
|
const y1 = element.flipVertical ? h : 0;
|
|
@@ -1236,7 +1240,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1236
1240
|
d: pathData ?? `M${x1},${y1} L${x2},${y2}`,
|
|
1237
1241
|
fill: "none",
|
|
1238
1242
|
stroke: "transparent",
|
|
1239
|
-
"stroke-width":
|
|
1243
|
+
"stroke-width": chunkBLAJIEXA_cjs.connectorHitStrokeWidth(strokeWidth),
|
|
1240
1244
|
"stroke-linecap": "round",
|
|
1241
1245
|
"stroke-linejoin": "round"
|
|
1242
1246
|
});
|
|
@@ -1275,7 +1279,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1275
1279
|
...stroke
|
|
1276
1280
|
});
|
|
1277
1281
|
}
|
|
1278
|
-
node.style.setProperty("stroke-width",
|
|
1282
|
+
node.style.setProperty("stroke-width", chunkG2YUKLRX_cjs.screenStrokeWidth(strandWidth));
|
|
1279
1283
|
svg.appendChild(node);
|
|
1280
1284
|
});
|
|
1281
1285
|
wrapper.appendChild(svg);
|
|
@@ -1286,7 +1290,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1286
1290
|
if (!pptx.hasTextProperties(element)) {
|
|
1287
1291
|
return;
|
|
1288
1292
|
}
|
|
1289
|
-
const paragraphs =
|
|
1293
|
+
const paragraphs = chunkBLAJIEXA_cjs.buildParagraphs(element, context.fieldContext);
|
|
1290
1294
|
if (!paragraphs.some((paragraph) => paragraph.runs.length > 0)) {
|
|
1291
1295
|
return;
|
|
1292
1296
|
}
|
|
@@ -1306,7 +1310,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1306
1310
|
}
|
|
1307
1311
|
function buildMarker(context, id, arrow, strokeColor, size) {
|
|
1308
1312
|
const doc = context.document;
|
|
1309
|
-
const shape =
|
|
1313
|
+
const shape = chunkBLAJIEXA_cjs.markerPath(arrow, size.width, size.length);
|
|
1310
1314
|
const marker = createSvgEl(doc, "marker", {
|
|
1311
1315
|
id,
|
|
1312
1316
|
viewBox: "0 0 10 10",
|
|
@@ -1390,7 +1394,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1390
1394
|
doc,
|
|
1391
1395
|
"div",
|
|
1392
1396
|
"pptxv-element pptxv-contentpart",
|
|
1393
|
-
|
|
1397
|
+
chunkBLAJIEXA_cjs.getContainerStyle(element, zIndex)
|
|
1394
1398
|
);
|
|
1395
1399
|
el.dataset.elementId = element.id;
|
|
1396
1400
|
const strokes = element.inkStrokes;
|
|
@@ -1423,7 +1427,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1423
1427
|
return el;
|
|
1424
1428
|
};
|
|
1425
1429
|
function renderEquations(element, context) {
|
|
1426
|
-
if (!pptx.hasTextProperties(element) || !
|
|
1430
|
+
if (!pptx.hasTextProperties(element) || !chunkBLAJIEXA_cjs.isEquationOnlyText(element.textSegments)) {
|
|
1427
1431
|
return null;
|
|
1428
1432
|
}
|
|
1429
1433
|
const equations = (element.textSegments ?? []).filter((segment) => segment.equationXml);
|
|
@@ -1437,7 +1441,7 @@ function renderEquations(element, context) {
|
|
|
1437
1441
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
1438
1442
|
});
|
|
1439
1443
|
for (const segment of equations) {
|
|
1440
|
-
const mathml =
|
|
1444
|
+
const mathml = chunkBLAJIEXA_cjs.convertOmmlToMathMl(segment.equationXml);
|
|
1441
1445
|
if (!mathml) {
|
|
1442
1446
|
continue;
|
|
1443
1447
|
}
|
|
@@ -1451,7 +1455,7 @@ function renderEquations(element, context) {
|
|
|
1451
1455
|
flex: 1,
|
|
1452
1456
|
textAlign: "center"
|
|
1453
1457
|
});
|
|
1454
|
-
math.innerHTML =
|
|
1458
|
+
math.innerHTML = chunkBLAJIEXA_cjs.sanitizeMathMl(mathml);
|
|
1455
1459
|
row.appendChild(math);
|
|
1456
1460
|
if (segment.equationNumber) {
|
|
1457
1461
|
const number = createEl(context.document, "span", "pptxv-equation-number", {
|
|
@@ -1468,8 +1472,8 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1468
1472
|
if (!pptx.hasShapeProperties(element)) {
|
|
1469
1473
|
return null;
|
|
1470
1474
|
}
|
|
1471
|
-
const fill =
|
|
1472
|
-
const data =
|
|
1475
|
+
const fill = chunkLCIXR7WE_cjs.getComputedFillStyle(element)?.backgroundColor;
|
|
1476
|
+
const data = chunkBLAJIEXA_cjs.build3DExtrusionData(
|
|
1473
1477
|
element.shapeStyle?.shape3d,
|
|
1474
1478
|
element.shapeStyle?.scene3d,
|
|
1475
1479
|
fill,
|
|
@@ -1531,7 +1535,7 @@ function appendOwnReflection(doc, host, element, mediaDataUrls, suppressOwnRefle
|
|
|
1531
1535
|
if (suppressOwnReflection) {
|
|
1532
1536
|
return;
|
|
1533
1537
|
}
|
|
1534
|
-
const wrapperStyle =
|
|
1538
|
+
const wrapperStyle = chunkBLAJIEXA_cjs.getComputedEffectStyle(element).reflection;
|
|
1535
1539
|
if (!wrapperStyle) {
|
|
1536
1540
|
return;
|
|
1537
1541
|
}
|
|
@@ -1555,9 +1559,9 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1555
1559
|
if (groupFilterDefs) {
|
|
1556
1560
|
wrap.appendChild(groupFilterDefs);
|
|
1557
1561
|
}
|
|
1558
|
-
const childParentFill =
|
|
1562
|
+
const childParentFill = chunkBLAJIEXA_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1559
1563
|
for (const child of element.children ?? []) {
|
|
1560
|
-
const childWrap = createEl(doc, "div", void 0,
|
|
1564
|
+
const childWrap = createEl(doc, "div", void 0, chunkBLAJIEXA_cjs.getContainerStyle(child, 0));
|
|
1561
1565
|
childWrap.appendChild(
|
|
1562
1566
|
buildReflectionMirrorContent(doc, child, mediaDataUrls, childParentFill)
|
|
1563
1567
|
);
|
|
@@ -1571,7 +1575,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1571
1575
|
height: "100%",
|
|
1572
1576
|
...getShapeFillStrokeStyle(element)
|
|
1573
1577
|
});
|
|
1574
|
-
const inheritedFill =
|
|
1578
|
+
const inheritedFill = chunkBLAJIEXA_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1575
1579
|
if (inheritedFill) {
|
|
1576
1580
|
applyInheritedFill(box, inheritedFill);
|
|
1577
1581
|
}
|
|
@@ -1592,12 +1596,12 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1592
1596
|
box.appendChild(gradientOutline);
|
|
1593
1597
|
}
|
|
1594
1598
|
if (pptx.isImageLikeElement(element)) {
|
|
1595
|
-
const src =
|
|
1599
|
+
const src = chunkBLAJIEXA_cjs.getImageSrc(element, new Map(mediaDataUrls));
|
|
1596
1600
|
if (src) {
|
|
1597
1601
|
const img = createEl(doc, "img", void 0, {
|
|
1598
1602
|
width: "100%",
|
|
1599
1603
|
height: "100%",
|
|
1600
|
-
...
|
|
1604
|
+
...chunkBLAJIEXA_cjs.getImageFitStyle(element)
|
|
1601
1605
|
});
|
|
1602
1606
|
img.setAttribute("src", src);
|
|
1603
1607
|
img.setAttribute("alt", "");
|
|
@@ -1607,7 +1611,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1607
1611
|
appendOwnReflection(doc, box, element, mediaDataUrls, suppressOwnReflection);
|
|
1608
1612
|
return box;
|
|
1609
1613
|
}
|
|
1610
|
-
const paragraphs =
|
|
1614
|
+
const paragraphs = chunkBLAJIEXA_cjs.buildParagraphs(element);
|
|
1611
1615
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
1612
1616
|
if (hasText) {
|
|
1613
1617
|
box.appendChild(renderTextBlock(doc, paragraphs, getTextBlockStyle(element)));
|
|
@@ -1619,20 +1623,20 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1619
1623
|
// src/pptx/dom/elements/shape-filter-defs.ts
|
|
1620
1624
|
var OUTLINE_SVG_STYLE = "position:absolute;inset:0;width:100%;height:100%;min-width:1px;min-height:1px;overflow:visible;pointer-events:none";
|
|
1621
1625
|
function renderShapeFilterDefs(doc, element) {
|
|
1622
|
-
const style =
|
|
1626
|
+
const style = chunkBLAJIEXA_cjs.getEffectStyleSource(element);
|
|
1623
1627
|
if (!style) {
|
|
1624
1628
|
return null;
|
|
1625
1629
|
}
|
|
1626
1630
|
const markups = [];
|
|
1627
|
-
const duotone =
|
|
1631
|
+
const duotone = chunkBLAJIEXA_cjs.getDuotoneSvgFilter(style, element.id);
|
|
1628
1632
|
if (duotone) {
|
|
1629
1633
|
markups.push(duotone.filterMarkup);
|
|
1630
1634
|
}
|
|
1631
|
-
const softEdge =
|
|
1635
|
+
const softEdge = chunkBLAJIEXA_cjs.getSoftEdgeSvgFilter(style, element.id);
|
|
1632
1636
|
if (softEdge) {
|
|
1633
1637
|
markups.push(softEdge.filterMarkup);
|
|
1634
1638
|
}
|
|
1635
|
-
const bevelLighting =
|
|
1639
|
+
const bevelLighting = chunkBLAJIEXA_cjs.getBevelLightingSvgFilter(element);
|
|
1636
1640
|
if (bevelLighting) {
|
|
1637
1641
|
markups.push(bevelLighting.filterMarkup);
|
|
1638
1642
|
}
|
|
@@ -1650,7 +1654,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1650
1654
|
if (!pptx.hasShapeProperties(element)) {
|
|
1651
1655
|
return null;
|
|
1652
1656
|
}
|
|
1653
|
-
const overlay =
|
|
1657
|
+
const overlay = chunkBLAJIEXA_cjs.getComputedEffectStyle(element).fillOverlay;
|
|
1654
1658
|
if (!overlay) {
|
|
1655
1659
|
return null;
|
|
1656
1660
|
}
|
|
@@ -1665,7 +1669,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1665
1669
|
return layer;
|
|
1666
1670
|
}
|
|
1667
1671
|
function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
1668
|
-
const wrapperStyle =
|
|
1672
|
+
const wrapperStyle = chunkBLAJIEXA_cjs.getComputedEffectStyle(element).reflection;
|
|
1669
1673
|
if (!wrapperStyle) {
|
|
1670
1674
|
return null;
|
|
1671
1675
|
}
|
|
@@ -1675,13 +1679,13 @@ function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
|
1675
1679
|
return layer;
|
|
1676
1680
|
}
|
|
1677
1681
|
function renderHollowHitOutline(doc, element) {
|
|
1678
|
-
const hit =
|
|
1682
|
+
const hit = chunkBLAJIEXA_cjs.buildHollowHitOutline(element);
|
|
1679
1683
|
if (!hit) {
|
|
1680
1684
|
return null;
|
|
1681
1685
|
}
|
|
1682
1686
|
const svg = createSvgEl(doc, "svg", {
|
|
1683
1687
|
"aria-hidden": "true",
|
|
1684
|
-
viewBox:
|
|
1688
|
+
viewBox: chunkBLAJIEXA_cjs.strokeOutlineViewBox(element),
|
|
1685
1689
|
preserveAspectRatio: "none"
|
|
1686
1690
|
});
|
|
1687
1691
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
@@ -1696,7 +1700,7 @@ function renderHollowHitOutline(doc, element) {
|
|
|
1696
1700
|
return svg;
|
|
1697
1701
|
}
|
|
1698
1702
|
function renderShapeSubpathFillOverlay(doc, element) {
|
|
1699
|
-
const overlay =
|
|
1703
|
+
const overlay = chunkLCIXR7WE_cjs.buildSubpathFillOverlay(element);
|
|
1700
1704
|
if (!overlay) {
|
|
1701
1705
|
return null;
|
|
1702
1706
|
}
|
|
@@ -1714,20 +1718,20 @@ function renderShapeSubpathFillOverlay(doc, element) {
|
|
|
1714
1718
|
return svg;
|
|
1715
1719
|
}
|
|
1716
1720
|
function renderStrokeOutline(doc, element) {
|
|
1717
|
-
const outline =
|
|
1721
|
+
const outline = chunkBLAJIEXA_cjs.buildStrokeOutline(element);
|
|
1718
1722
|
if (!outline) {
|
|
1719
1723
|
return null;
|
|
1720
1724
|
}
|
|
1721
1725
|
const svg = createSvgEl(doc, "svg", {
|
|
1722
1726
|
class: "pptx-vanilla-gradient-outline",
|
|
1723
1727
|
"aria-hidden": "true",
|
|
1724
|
-
viewBox:
|
|
1728
|
+
viewBox: chunkBLAJIEXA_cjs.strokeOutlineViewBox(element),
|
|
1725
1729
|
preserveAspectRatio: "none"
|
|
1726
1730
|
});
|
|
1727
1731
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
1728
1732
|
if (outline.paint) {
|
|
1729
1733
|
const defs = createSvgEl(doc, "defs");
|
|
1730
|
-
if (
|
|
1734
|
+
if (chunkBLAJIEXA_cjs.isPatternPaint(outline.paint)) {
|
|
1731
1735
|
const pattern = createSvgEl(doc, "pattern", {
|
|
1732
1736
|
id: outline.paint.id,
|
|
1733
1737
|
width: outline.paint.width,
|
|
@@ -1742,7 +1746,7 @@ function renderStrokeOutline(doc, element) {
|
|
|
1742
1746
|
pattern.appendChild(image);
|
|
1743
1747
|
defs.appendChild(pattern);
|
|
1744
1748
|
} else {
|
|
1745
|
-
defs.innerHTML =
|
|
1749
|
+
defs.innerHTML = chunkBLAJIEXA_cjs.svgGradientMarkup(outline.paint);
|
|
1746
1750
|
}
|
|
1747
1751
|
svg.appendChild(defs);
|
|
1748
1752
|
}
|
|
@@ -1793,14 +1797,14 @@ function indexRenderedNodes(root) {
|
|
|
1793
1797
|
return byId;
|
|
1794
1798
|
}
|
|
1795
1799
|
function paintInheritedFill(node, element, parentGroupFill) {
|
|
1796
|
-
const inherited =
|
|
1800
|
+
const inherited = chunkBLAJIEXA_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1797
1801
|
if (inherited) {
|
|
1798
1802
|
applyGroupChildFill(node, inherited);
|
|
1799
1803
|
}
|
|
1800
1804
|
if (element.type !== "group") {
|
|
1801
1805
|
return;
|
|
1802
1806
|
}
|
|
1803
|
-
const childFill =
|
|
1807
|
+
const childFill = chunkBLAJIEXA_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1804
1808
|
if (!childFill) {
|
|
1805
1809
|
return;
|
|
1806
1810
|
}
|
|
@@ -1814,7 +1818,7 @@ function paintInheritedFill(node, element, parentGroupFill) {
|
|
|
1814
1818
|
}
|
|
1815
1819
|
var renderGroupElement = (element, zIndex, context) => {
|
|
1816
1820
|
const el = createEl(context.document, "div", "pptxv-element pptxv-group", {
|
|
1817
|
-
...
|
|
1821
|
+
...chunkBLAJIEXA_cjs.getContainerStyle(element, zIndex),
|
|
1818
1822
|
// A group paints no fill/outline of its own, but `p:grpSpPr/a:effectLst`
|
|
1819
1823
|
// DOES carry a shadow/glow/soft-edge for the group's own composite
|
|
1820
1824
|
// raster (see shared `getComputedEffectStyle`), expressed as `filter` /
|
|
@@ -1831,7 +1835,7 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1831
1835
|
el.appendChild(reflection);
|
|
1832
1836
|
}
|
|
1833
1837
|
if (element.type === "group" && element.children?.length) {
|
|
1834
|
-
const parentGroupFill =
|
|
1838
|
+
const parentGroupFill = chunkBLAJIEXA_cjs.getGroupChildParentFill(element);
|
|
1835
1839
|
element.children.forEach((child, index) => {
|
|
1836
1840
|
const childEl = context.renderElement(child, index);
|
|
1837
1841
|
if (childEl) {
|
|
@@ -1846,12 +1850,12 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1846
1850
|
// src/pptx/dom/elements/image.ts
|
|
1847
1851
|
var renderImageElement = (element, zIndex, context) => {
|
|
1848
1852
|
const doc = context.document;
|
|
1849
|
-
const geometry = element.type === "image" || element.type === "picture" ?
|
|
1853
|
+
const geometry = element.type === "image" || element.type === "picture" ? chunkBLAJIEXA_cjs.resolveShapeGeometry(element) : void 0;
|
|
1850
1854
|
const geometryClipPath = geometry?.kind === "clipPath" ? geometry.clipPath : void 0;
|
|
1851
|
-
const cropShapeClipPath = element.type === "image" || element.type === "picture" ?
|
|
1855
|
+
const cropShapeClipPath = element.type === "image" || element.type === "picture" ? chunkBLAJIEXA_cjs.getCropShapeClipPath(element.cropShape, element.width, element.height) : void 0;
|
|
1852
1856
|
const el = createEl(doc, "div", "pptxv-element pptxv-image", {
|
|
1853
|
-
...
|
|
1854
|
-
overflow:
|
|
1857
|
+
...chunkBLAJIEXA_cjs.getContainerStyle(element, zIndex),
|
|
1858
|
+
overflow: chunkBLAJIEXA_cjs.getImageOverflow(element),
|
|
1855
1859
|
// The picture's own shape geometry (prstGeom / custGeom) clips the frame,
|
|
1856
1860
|
// not the `<img>` - a pixel-space clip on the img would be scaled and
|
|
1857
1861
|
// shifted by the crop transform.
|
|
@@ -1859,11 +1863,11 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1859
1863
|
...geometryClipPath ? { clipPath: geometryClipPath } : cropShapeClipPath ? { clipPath: cropShapeClipPath } : {}
|
|
1860
1864
|
});
|
|
1861
1865
|
el.dataset.elementId = element.id;
|
|
1862
|
-
const src =
|
|
1866
|
+
const src = chunkBLAJIEXA_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
1863
1867
|
if (!src) {
|
|
1864
1868
|
return el;
|
|
1865
1869
|
}
|
|
1866
|
-
const fx =
|
|
1870
|
+
const fx = chunkBLAJIEXA_cjs.getComputedImageStyle(element);
|
|
1867
1871
|
for (const f of fx.svgFilters) {
|
|
1868
1872
|
const svg = createSvgEl(doc, "svg", { width: 0, height: 0, "aria-hidden": "true" });
|
|
1869
1873
|
svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden");
|
|
@@ -1876,7 +1880,7 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1876
1880
|
el.appendChild(svg);
|
|
1877
1881
|
}
|
|
1878
1882
|
const reflection = renderReflectionOverlay(doc, element, context.mediaDataUrls);
|
|
1879
|
-
const tiling =
|
|
1883
|
+
const tiling = chunkBLAJIEXA_cjs.getImageTilingStyle(element, chunkBLAJIEXA_cjs.getCachedNativeImageSize(src));
|
|
1880
1884
|
if (tiling) {
|
|
1881
1885
|
const tile = createEl(doc, "div", "pptxv-image-tile", tiling);
|
|
1882
1886
|
if (fx.filter) {
|
|
@@ -1885,10 +1889,10 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1885
1889
|
if (fx.opacity !== void 0) {
|
|
1886
1890
|
tile.style.opacity = String(fx.opacity);
|
|
1887
1891
|
}
|
|
1888
|
-
if (!
|
|
1889
|
-
void
|
|
1892
|
+
if (!chunkBLAJIEXA_cjs.getCachedNativeImageSize(src)) {
|
|
1893
|
+
void chunkBLAJIEXA_cjs.probeNativeImageSize(src).then((size) => {
|
|
1890
1894
|
if (size) {
|
|
1891
|
-
applyStyleMap(tile,
|
|
1895
|
+
applyStyleMap(tile, chunkBLAJIEXA_cjs.getImageTilingStyle(element, size) ?? {});
|
|
1892
1896
|
}
|
|
1893
1897
|
return void 0;
|
|
1894
1898
|
});
|
|
@@ -1899,8 +1903,8 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1899
1903
|
}
|
|
1900
1904
|
return el;
|
|
1901
1905
|
}
|
|
1902
|
-
const fit =
|
|
1903
|
-
const fillCounterTransform =
|
|
1906
|
+
const fit = chunkBLAJIEXA_cjs.getImageFitStyle(element);
|
|
1907
|
+
const fillCounterTransform = chunkBLAJIEXA_cjs.getImageFillCounterTransform(element, Boolean(fit.transform));
|
|
1904
1908
|
const img = createEl(doc, "img", void 0, {
|
|
1905
1909
|
...fit,
|
|
1906
1910
|
display: "block",
|
|
@@ -1918,14 +1922,14 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1918
1922
|
if (element.type === "image" || element.type === "picture") {
|
|
1919
1923
|
const clrChange = element.imageEffects?.clrChange;
|
|
1920
1924
|
if (clrChange) {
|
|
1921
|
-
void
|
|
1925
|
+
void chunkBLAJIEXA_cjs.resolveColorChangedImageSource(src, clrChange).then((resolved) => {
|
|
1922
1926
|
if (img.src === src || img.getAttribute("src") === src) {
|
|
1923
1927
|
img.src = resolved;
|
|
1924
1928
|
}
|
|
1925
1929
|
return void 0;
|
|
1926
1930
|
});
|
|
1927
1931
|
}
|
|
1928
|
-
const wash =
|
|
1932
|
+
const wash = chunkBLAJIEXA_cjs.getImageColorWashStyle(element.imageEffects?.colorWash);
|
|
1929
1933
|
if (wash) {
|
|
1930
1934
|
el.appendChild(
|
|
1931
1935
|
createEl(doc, "div", "pptxv-image-color-wash", {
|
|
@@ -1954,7 +1958,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1954
1958
|
doc,
|
|
1955
1959
|
"div",
|
|
1956
1960
|
"pptxv-element pptxv-ink",
|
|
1957
|
-
|
|
1961
|
+
chunkBLAJIEXA_cjs.getContainerStyle(element, zIndex)
|
|
1958
1962
|
);
|
|
1959
1963
|
wrapper.dataset.elementId = element.id;
|
|
1960
1964
|
const paths = element.inkPaths;
|
|
@@ -1975,7 +1979,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1975
1979
|
keyframes.textContent = chunkNTXHQHCS_cjs.INK_REPLAY_KEYFRAMES;
|
|
1976
1980
|
svg.appendChild(keyframes);
|
|
1977
1981
|
}
|
|
1978
|
-
const views =
|
|
1982
|
+
const views = chunkBLAJIEXA_cjs.buildInkGroupStrokes(element, { color: chunkLCIXR7WE_cjs.DEFAULT_STROKE_COLOR, width: 1 });
|
|
1979
1983
|
for (const [i, view] of views.entries()) {
|
|
1980
1984
|
svg.appendChild(buildStrokeSvg(doc, view, replayStyles[i]));
|
|
1981
1985
|
}
|
|
@@ -2029,12 +2033,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2029
2033
|
let stopButton = null;
|
|
2030
2034
|
const update = (playing) => {
|
|
2031
2035
|
const input = { fullScreen: element.fullScreen, presenting: context.presenting, playing };
|
|
2032
|
-
const active =
|
|
2036
|
+
const active = chunkBLAJIEXA_cjs.isMediaFullscreenActive(input);
|
|
2033
2037
|
applyStyleMap(
|
|
2034
2038
|
container,
|
|
2035
|
-
active ?
|
|
2039
|
+
active ? chunkBLAJIEXA_cjs.MEDIA_FULLSCREEN_OVERLAY_STYLE : mediaFullscreenResetStyle(baseStyle)
|
|
2036
2040
|
);
|
|
2037
|
-
if (
|
|
2041
|
+
if (chunkBLAJIEXA_cjs.shouldShowMediaFullscreenStopButton(input)) {
|
|
2038
2042
|
if (!stopButton) {
|
|
2039
2043
|
stopButton = buildFullscreenStopButton(
|
|
2040
2044
|
doc,
|
|
@@ -2059,12 +2063,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2059
2063
|
|
|
2060
2064
|
// src/pptx/dom/elements/media.ts
|
|
2061
2065
|
function applyMediaPresentingState(el, presenting, playback) {
|
|
2062
|
-
|
|
2066
|
+
chunkBLAJIEXA_cjs.applyMediaPlaybackAttributes(el, playback);
|
|
2063
2067
|
if (presenting) {
|
|
2064
|
-
|
|
2065
|
-
|
|
2068
|
+
chunkBLAJIEXA_cjs.startMediaAutoplay(el, { trimStartMs: playback.trimStartMs });
|
|
2069
|
+
chunkBLAJIEXA_cjs.scheduleMediaTrimAndFade(el, {
|
|
2066
2070
|
...playback,
|
|
2067
|
-
volume:
|
|
2071
|
+
volume: chunkBLAJIEXA_cjs.mediaPlaybackAttributes(playback).volume
|
|
2068
2072
|
});
|
|
2069
2073
|
} else if (!el.paused) {
|
|
2070
2074
|
el.pause();
|
|
@@ -2074,18 +2078,18 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2074
2078
|
if (element.type !== "media") {
|
|
2075
2079
|
return null;
|
|
2076
2080
|
}
|
|
2077
|
-
const surface =
|
|
2081
|
+
const surface = chunkBLAJIEXA_cjs.mediaSurfaceOf({
|
|
2078
2082
|
interactive: context.interactive === true || context.reading === true,
|
|
2079
2083
|
presenting: context.presenting
|
|
2080
2084
|
});
|
|
2081
|
-
const showTransport =
|
|
2085
|
+
const showTransport = chunkBLAJIEXA_cjs.mediaTransportVisible({ ...surface, canvasTransport: true });
|
|
2082
2086
|
const doc = context.document;
|
|
2083
|
-
const baseStyle =
|
|
2087
|
+
const baseStyle = chunkBLAJIEXA_cjs.getContainerStyle(element, zIndex);
|
|
2084
2088
|
const el = createEl(doc, "div", "pptxv-element pptxv-media", baseStyle);
|
|
2085
2089
|
el.dataset.elementId = element.id;
|
|
2086
2090
|
const mediaSrc = element.mediaData ?? (element.mediaPath ? context.mediaDataUrls.get(element.mediaPath) : void 0);
|
|
2087
|
-
const posterSrc =
|
|
2088
|
-
const onlineVideoEmbedUrl =
|
|
2091
|
+
const posterSrc = chunkBLAJIEXA_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
2092
|
+
const onlineVideoEmbedUrl = chunkBLAJIEXA_cjs.getOnlineVideoEmbed(element)?.embedUrl;
|
|
2089
2093
|
if (onlineVideoEmbedUrl && element.mediaType === "video") {
|
|
2090
2094
|
const iframe = createEl(doc, "iframe", "pptxv-media-video pptxv-media-iframe", {
|
|
2091
2095
|
width: "100%",
|
|
@@ -2095,8 +2099,8 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2095
2099
|
});
|
|
2096
2100
|
iframe.src = onlineVideoEmbedUrl;
|
|
2097
2101
|
iframe.title = context.t("pptx.media.onlineVideoTitle");
|
|
2098
|
-
iframe.allow =
|
|
2099
|
-
iframe.sandbox.value =
|
|
2102
|
+
iframe.allow = chunkBLAJIEXA_cjs.ONLINE_VIDEO_IFRAME_ALLOW;
|
|
2103
|
+
iframe.sandbox.value = chunkBLAJIEXA_cjs.ONLINE_VIDEO_IFRAME_SANDBOX;
|
|
2100
2104
|
iframe.allowFullscreen = true;
|
|
2101
2105
|
el.appendChild(iframe);
|
|
2102
2106
|
return el;
|
|
@@ -2125,21 +2129,21 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2125
2129
|
audio.src = mediaSrc;
|
|
2126
2130
|
audio.controls = showTransport;
|
|
2127
2131
|
el.appendChild(audio);
|
|
2128
|
-
if (context.presenting &&
|
|
2132
|
+
if (context.presenting && chunkBLAJIEXA_cjs.registerCrossSlideAudio(element, mediaSrc)) {
|
|
2129
2133
|
audio.muted = true;
|
|
2130
|
-
|
|
2134
|
+
chunkBLAJIEXA_cjs.applyMediaPlaybackAttributes(audio, element);
|
|
2131
2135
|
return el;
|
|
2132
2136
|
}
|
|
2133
2137
|
applyMediaPresentingState(audio, context.presenting, element);
|
|
2134
2138
|
wireMediaFullscreenOverlay(doc, el, audio, element, context, baseStyle);
|
|
2135
2139
|
return el;
|
|
2136
2140
|
}
|
|
2137
|
-
const fallback =
|
|
2141
|
+
const fallback = chunkBLAJIEXA_cjs.mediaFallbackVisual(surface, {
|
|
2138
2142
|
hasPoster: Boolean(posterSrc),
|
|
2139
2143
|
missing: element.mediaMissing === true
|
|
2140
2144
|
});
|
|
2141
|
-
const icon =
|
|
2142
|
-
const labelKey =
|
|
2145
|
+
const icon = chunkBLAJIEXA_cjs.mediaFallbackIcon(fallback, element.mediaType);
|
|
2146
|
+
const labelKey = chunkBLAJIEXA_cjs.mediaFallbackLabelKey(fallback, element.mediaType);
|
|
2143
2147
|
if (fallback.poster && posterSrc) {
|
|
2144
2148
|
const img = createEl(doc, "img", "pptxv-media-poster", {
|
|
2145
2149
|
width: "100%",
|
|
@@ -2156,7 +2160,7 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2156
2160
|
if (fallback.badge === "missing") {
|
|
2157
2161
|
badge.classList.add("pptxv-media-badge-missing");
|
|
2158
2162
|
}
|
|
2159
|
-
badge.setAttribute(
|
|
2163
|
+
badge.setAttribute(chunkBLAJIEXA_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.badge);
|
|
2160
2164
|
badge.appendChild(buildIcon(doc, icon));
|
|
2161
2165
|
if (labelKey !== void 0 && fallback.badge === "missing") {
|
|
2162
2166
|
const text = createEl(doc, "span");
|
|
@@ -2169,7 +2173,7 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2169
2173
|
}
|
|
2170
2174
|
if (fallback.placeholder !== "none") {
|
|
2171
2175
|
el.classList.add("pptxv-placeholder", "pptxv-media-placeholder");
|
|
2172
|
-
el.setAttribute(
|
|
2176
|
+
el.setAttribute(chunkBLAJIEXA_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.placeholder);
|
|
2173
2177
|
if (icon.length > 0) {
|
|
2174
2178
|
el.appendChild(buildIcon(doc, icon));
|
|
2175
2179
|
}
|
|
@@ -2205,7 +2209,7 @@ var renderModel3dElement = (element, zIndex, context) => {
|
|
|
2205
2209
|
doc,
|
|
2206
2210
|
"div",
|
|
2207
2211
|
"pptxv-element pptxv-model3d",
|
|
2208
|
-
|
|
2212
|
+
chunkBLAJIEXA_cjs.getContainerStyle(element, zIndex)
|
|
2209
2213
|
);
|
|
2210
2214
|
el.dataset.elementId = element.id;
|
|
2211
2215
|
const label = context.t("pptx.model3d.label");
|
|
@@ -2342,7 +2346,7 @@ function buildOleIcon(doc, type, color) {
|
|
|
2342
2346
|
fill: "none",
|
|
2343
2347
|
"aria-hidden": "true"
|
|
2344
2348
|
});
|
|
2345
|
-
for (const shape of
|
|
2349
|
+
for (const shape of chunkBLAJIEXA_cjs.getOleIconShapes(type)) {
|
|
2346
2350
|
const node = createSvgEl(doc, shape.tag, shape.attrs);
|
|
2347
2351
|
if (shape.tag === "text") {
|
|
2348
2352
|
node.setAttribute("fill", color);
|
|
@@ -2361,21 +2365,21 @@ var renderOleElement = (element, zIndex, context) => {
|
|
|
2361
2365
|
return null;
|
|
2362
2366
|
}
|
|
2363
2367
|
const doc = context.document;
|
|
2364
|
-
const oleType =
|
|
2365
|
-
const typeColor =
|
|
2366
|
-
const typeLabel =
|
|
2367
|
-
const el = createEl(doc, "div", "pptxv-element pptxv-ole",
|
|
2368
|
+
const oleType = chunkBLAJIEXA_cjs.resolveOleType(element);
|
|
2369
|
+
const typeColor = chunkBLAJIEXA_cjs.getOleTypeColor(oleType);
|
|
2370
|
+
const typeLabel = chunkBLAJIEXA_cjs.getOleTypeLabel(oleType);
|
|
2371
|
+
const el = createEl(doc, "div", "pptxv-element pptxv-ole", chunkBLAJIEXA_cjs.getContainerStyle(element, zIndex));
|
|
2368
2372
|
el.dataset.elementId = element.id;
|
|
2369
2373
|
el.setAttribute("role", "group");
|
|
2370
|
-
el.setAttribute("aria-label",
|
|
2374
|
+
el.setAttribute("aria-label", chunkBLAJIEXA_cjs.getOleAriaLabel(element));
|
|
2371
2375
|
el.title = infoLines(element, typeLabel).join("\n");
|
|
2372
2376
|
if (element.previewImageData) {
|
|
2373
|
-
el.appendChild(buildPreview(doc, element, typeColor,
|
|
2377
|
+
el.appendChild(buildPreview(doc, element, typeColor, chunkBLAJIEXA_cjs.getOleBadgeLabel(oleType)));
|
|
2374
2378
|
} else {
|
|
2375
2379
|
el.appendChild(buildPlaceholder2(doc, element, oleType, typeColor, typeLabel));
|
|
2376
2380
|
}
|
|
2377
|
-
const showActions =
|
|
2378
|
-
|
|
2381
|
+
const showActions = chunkBLAJIEXA_cjs.oleActionsVisible(
|
|
2382
|
+
chunkBLAJIEXA_cjs.mediaSurfaceOf({
|
|
2379
2383
|
interactive: context.interactive === true,
|
|
2380
2384
|
presenting: context.presenting
|
|
2381
2385
|
})
|
|
@@ -2391,7 +2395,7 @@ function infoLines(el, typeLabel) {
|
|
|
2391
2395
|
if (name) {
|
|
2392
2396
|
lines.push(name);
|
|
2393
2397
|
}
|
|
2394
|
-
const size =
|
|
2398
|
+
const size = chunkBLAJIEXA_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2395
2399
|
if (size) {
|
|
2396
2400
|
lines.push(size);
|
|
2397
2401
|
}
|
|
@@ -2415,7 +2419,7 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2415
2419
|
display: "block"
|
|
2416
2420
|
});
|
|
2417
2421
|
img.src = el.previewImageData ?? "";
|
|
2418
|
-
img.alt =
|
|
2422
|
+
img.alt = chunkBLAJIEXA_cjs.getOleAriaLabel(el);
|
|
2419
2423
|
img.draggable = false;
|
|
2420
2424
|
preview.appendChild(img);
|
|
2421
2425
|
const badge = createSvgEl(doc, "svg", { width: 24, height: 24, viewBox: "0 0 24 24" });
|
|
@@ -2442,7 +2446,7 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2442
2446
|
}
|
|
2443
2447
|
function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
2444
2448
|
const box = createEl(doc, "div", "pptxv-ole-placeholder", {
|
|
2445
|
-
...
|
|
2449
|
+
...chunkBLAJIEXA_cjs.getPlaceholderStyle(oleType),
|
|
2446
2450
|
width: "100%",
|
|
2447
2451
|
height: "100%",
|
|
2448
2452
|
display: "flex",
|
|
@@ -2463,7 +2467,7 @@ function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
|
2463
2467
|
whiteSpace: "nowrap",
|
|
2464
2468
|
color: typeColor
|
|
2465
2469
|
});
|
|
2466
|
-
name.textContent =
|
|
2470
|
+
name.textContent = chunkBLAJIEXA_cjs.getOleDisplayName(el);
|
|
2467
2471
|
box.appendChild(name);
|
|
2468
2472
|
if (el.fileName) {
|
|
2469
2473
|
const sublabel = createEl(doc, "span", "pptxv-ole-sublabel", {
|
|
@@ -2515,7 +2519,7 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2515
2519
|
for (const type of ["pointerdown", "mousedown", "click"]) {
|
|
2516
2520
|
bar.addEventListener(type, (event) => event.stopPropagation());
|
|
2517
2521
|
}
|
|
2518
|
-
const size =
|
|
2522
|
+
const size = chunkBLAJIEXA_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2519
2523
|
if (size) {
|
|
2520
2524
|
const meta = createEl(doc, "span", "pptxv-ole-meta", {
|
|
2521
2525
|
marginRight: "auto",
|
|
@@ -2535,14 +2539,14 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2535
2539
|
download.title = downloadTitle;
|
|
2536
2540
|
download.textContent = context.t("pptx.ole.download");
|
|
2537
2541
|
bar.appendChild(download);
|
|
2538
|
-
if (
|
|
2542
|
+
if (chunkBLAJIEXA_cjs.isBrowserOpenableMime(el.oleEmbeddedMimeType)) {
|
|
2539
2543
|
const open = createEl(doc, "button", "pptxv-ole-action", ACTION_STYLE);
|
|
2540
2544
|
open.type = "button";
|
|
2541
2545
|
const openTitle = context.t("pptx.ole.openName", { name: downloadName });
|
|
2542
2546
|
open.setAttribute("aria-label", openTitle);
|
|
2543
2547
|
open.title = openTitle;
|
|
2544
2548
|
open.textContent = context.t("pptx.ole.open");
|
|
2545
|
-
open.addEventListener("click", () =>
|
|
2549
|
+
open.addEventListener("click", () => chunkBLAJIEXA_cjs.openUrlInNewTab(data));
|
|
2546
2550
|
bar.appendChild(open);
|
|
2547
2551
|
}
|
|
2548
2552
|
return bar;
|
|
@@ -2554,7 +2558,7 @@ var renderPlaceholderElement = (element, zIndex, context) => {
|
|
|
2554
2558
|
context.document,
|
|
2555
2559
|
"div",
|
|
2556
2560
|
"pptxv-element pptxv-placeholder",
|
|
2557
|
-
|
|
2561
|
+
chunkBLAJIEXA_cjs.getContainerStyle(element, zIndex)
|
|
2558
2562
|
);
|
|
2559
2563
|
el.dataset.elementId = element.id;
|
|
2560
2564
|
el.dataset.elementType = element.type;
|
|
@@ -2570,7 +2574,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2570
2574
|
return null;
|
|
2571
2575
|
}
|
|
2572
2576
|
const doc = context.document;
|
|
2573
|
-
const summaryView =
|
|
2577
|
+
const summaryView = chunkBLAJIEXA_cjs.buildSummaryZoomView(
|
|
2574
2578
|
element,
|
|
2575
2579
|
(index) => {
|
|
2576
2580
|
const slide = context.slides?.[index];
|
|
@@ -2590,7 +2594,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2590
2594
|
doc,
|
|
2591
2595
|
"div",
|
|
2592
2596
|
"pptxv-element pptxv-zoom pptxv-summary-zoom",
|
|
2593
|
-
|
|
2597
|
+
chunkBLAJIEXA_cjs.getContainerStyle(element, zIndex)
|
|
2594
2598
|
);
|
|
2595
2599
|
const content = createEl(doc, "div", "pptxv-summary-zoom-content", summaryView.containerStyle);
|
|
2596
2600
|
root.dataset.elementId = element.id;
|
|
@@ -2656,7 +2660,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2656
2660
|
const target = element.targetSlideIndex ?? 0;
|
|
2657
2661
|
const targetSlide = context.slides?.[target];
|
|
2658
2662
|
const interactive = context.presenting && context.onZoomClick !== void 0;
|
|
2659
|
-
const el = createEl(doc, "div", "pptxv-element pptxv-zoom",
|
|
2663
|
+
const el = createEl(doc, "div", "pptxv-element pptxv-zoom", chunkBLAJIEXA_cjs.getContainerStyle(element, zIndex));
|
|
2660
2664
|
el.dataset.elementId = element.id;
|
|
2661
2665
|
el.dataset.zoomType = zoomType;
|
|
2662
2666
|
el.dataset.zoomTarget = String(target);
|
|
@@ -2666,7 +2670,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2666
2670
|
el.tabIndex = 0;
|
|
2667
2671
|
el.style.cursor = "pointer";
|
|
2668
2672
|
const activate = () => {
|
|
2669
|
-
const zoomTarget =
|
|
2673
|
+
const zoomTarget = chunkBLAJIEXA_cjs.resolveZoomNavigationTarget(element);
|
|
2670
2674
|
if (zoomTarget) {
|
|
2671
2675
|
context.onZoomClick?.(zoomTarget, context.currentSlideIndex ?? 0);
|
|
2672
2676
|
}
|
|
@@ -2781,7 +2785,7 @@ function registerExtraRenderers(registry) {
|
|
|
2781
2785
|
// src/pptx/dom/elements/smartart-3d.ts
|
|
2782
2786
|
var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
2783
2787
|
const wrapper = renderSmartArtSvg(element, zIndex, context);
|
|
2784
|
-
const spec = wrapper ?
|
|
2788
|
+
const spec = wrapper ? chunkBLAJIEXA_cjs.resolveSmartArtThreeViewSpec(element, context.smartArt3D) : null;
|
|
2785
2789
|
if (!wrapper || !spec) {
|
|
2786
2790
|
return wrapper;
|
|
2787
2791
|
}
|
|
@@ -2791,18 +2795,18 @@ var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
|
2791
2795
|
textStyle: context.presentationStates?.get(element.id)?.textStyle
|
|
2792
2796
|
});
|
|
2793
2797
|
if (context.onSmartArtNodeTextChange && context.interactive && !context.presenting) {
|
|
2794
|
-
const layer = renderSmartArtSvg(
|
|
2798
|
+
const layer = renderSmartArtSvg(chunkBLAJIEXA_cjs.elementInLocalFrame(element), 0, context);
|
|
2795
2799
|
if (layer) {
|
|
2796
2800
|
layer.classList.add("pptxv-smartart-3d-edit-layer");
|
|
2797
2801
|
layer.setAttribute("data-smartart-3d-edit-layer", "true");
|
|
2798
|
-
|
|
2802
|
+
chunkBLAJIEXA_cjs.stripEditLayerMarkers(layer);
|
|
2799
2803
|
layer.setAttribute("aria-hidden", "true");
|
|
2800
2804
|
Object.assign(layer.style, { position: "absolute", inset: "0", zIndex: "1" });
|
|
2801
2805
|
for (const svg of layer.querySelectorAll("svg")) {
|
|
2802
2806
|
svg.style.opacity = "0";
|
|
2803
2807
|
}
|
|
2804
2808
|
wrapper.appendChild(layer);
|
|
2805
|
-
|
|
2809
|
+
chunkBLAJIEXA_cjs.routeEditLayerPointerToNodes(layer);
|
|
2806
2810
|
}
|
|
2807
2811
|
}
|
|
2808
2812
|
return wrapper;
|
|
@@ -2815,7 +2819,7 @@ function nodeTarget(target) {
|
|
|
2815
2819
|
}
|
|
2816
2820
|
function enableSmartArtEditing(chrome, element, context) {
|
|
2817
2821
|
const data = element.smartArtData;
|
|
2818
|
-
if (!data || !context.onSmartArtNodeTextChange && !context.onSmartArtNodeFillChange || !
|
|
2822
|
+
if (!data || !context.onSmartArtNodeTextChange && !context.onSmartArtNodeFillChange || !chunkBLAJIEXA_cjs.canDrillDown(element)) {
|
|
2819
2823
|
return;
|
|
2820
2824
|
}
|
|
2821
2825
|
let editor = null;
|
|
@@ -2837,8 +2841,8 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2837
2841
|
}
|
|
2838
2842
|
event.stopPropagation();
|
|
2839
2843
|
const textNode = target.querySelector("text");
|
|
2840
|
-
const textRect = textNode ?
|
|
2841
|
-
const rect = textRect && textRect.width > 0 ? textRect :
|
|
2844
|
+
const textRect = textNode ? chunkBLAJIEXA_cjs.measureSvgViewportRect(textNode) : null;
|
|
2845
|
+
const rect = textRect && textRect.width > 0 ? textRect : chunkBLAJIEXA_cjs.measureSvgViewportRect(target);
|
|
2842
2846
|
if (!rect) {
|
|
2843
2847
|
return;
|
|
2844
2848
|
}
|
|
@@ -2862,7 +2866,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2862
2866
|
textAlign: "center"
|
|
2863
2867
|
});
|
|
2864
2868
|
editor = input;
|
|
2865
|
-
input.value =
|
|
2869
|
+
input.value = chunkBLAJIEXA_cjs.findSmartArtNodeText(data, nodeId) ?? "";
|
|
2866
2870
|
const commit = () => {
|
|
2867
2871
|
if (input !== editor) {
|
|
2868
2872
|
return;
|
|
@@ -2894,7 +2898,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2894
2898
|
}
|
|
2895
2899
|
cancelHide();
|
|
2896
2900
|
swatches?.remove();
|
|
2897
|
-
const rect =
|
|
2901
|
+
const rect = chunkBLAJIEXA_cjs.measureSvgViewportRect(target);
|
|
2898
2902
|
if (!rect) {
|
|
2899
2903
|
return;
|
|
2900
2904
|
}
|
|
@@ -2913,7 +2917,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2913
2917
|
});
|
|
2914
2918
|
swatches.setAttribute("role", "group");
|
|
2915
2919
|
swatches.setAttribute("aria-label", context.t("pptx.smartArt.fillColor"));
|
|
2916
|
-
for (const color of
|
|
2920
|
+
for (const color of chunkBLAJIEXA_cjs.resolvePalette(data).slice(0, 6)) {
|
|
2917
2921
|
const button = createEl(chrome.ownerDocument, "button", "", {
|
|
2918
2922
|
width: "18px",
|
|
2919
2923
|
height: "18px",
|
|
@@ -3012,7 +3016,7 @@ function buildSmartArtFallbackSvg(doc, layout, a11yNodes = [], nodeIds = []) {
|
|
|
3012
3016
|
svg.setAttribute("class", "pptxv-smartart-svg");
|
|
3013
3017
|
svg.setAttribute("style", SMARTART_SVG_STYLE);
|
|
3014
3018
|
for (const conn of layout.connectors) {
|
|
3015
|
-
const paint =
|
|
3019
|
+
const paint = chunkBLAJIEXA_cjs.smartArtConnectorPaint(conn);
|
|
3016
3020
|
svg.appendChild(
|
|
3017
3021
|
createSvgEl(doc, "path", {
|
|
3018
3022
|
d: paint.d,
|
|
@@ -3071,7 +3075,7 @@ function buildFallbackNode(doc, node, shadowFilter, a11yLabel, nodeId) {
|
|
|
3071
3075
|
})
|
|
3072
3076
|
);
|
|
3073
3077
|
}
|
|
3074
|
-
const label =
|
|
3078
|
+
const label = chunkBLAJIEXA_cjs.smartArtNodeLabel(node);
|
|
3075
3079
|
if (label.visible) {
|
|
3076
3080
|
appendSvgTextLines(doc, g, {
|
|
3077
3081
|
lines: label.lines,
|
|
@@ -3107,41 +3111,41 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3107
3111
|
doc,
|
|
3108
3112
|
"div",
|
|
3109
3113
|
"pptxv-element pptxv-smartart",
|
|
3110
|
-
|
|
3114
|
+
chunkBLAJIEXA_cjs.getContainerStyle(element, zIndex)
|
|
3111
3115
|
);
|
|
3112
3116
|
wrapper.dataset.elementId = element.id;
|
|
3113
3117
|
wrapper.dataset.testid = `smartart-${data?.layout ?? "diagram"}`;
|
|
3114
|
-
const chrome = createEl(doc, "div", "pptxv-smartart-chrome",
|
|
3118
|
+
const chrome = createEl(doc, "div", "pptxv-smartart-chrome", chunkBLAJIEXA_cjs.buildChromeStyle(data?.chrome));
|
|
3115
3119
|
chrome.style.position = "relative";
|
|
3116
3120
|
wrapper.appendChild(chrome);
|
|
3117
3121
|
if (data) {
|
|
3118
|
-
const a11y =
|
|
3122
|
+
const a11y = chunkBLAJIEXA_cjs.buildSmartArtA11y(data);
|
|
3119
3123
|
chrome.setAttribute("role", "img");
|
|
3120
3124
|
chrome.setAttribute("aria-label", a11y.label);
|
|
3121
3125
|
}
|
|
3122
3126
|
const nodes = data?.nodes ?? [];
|
|
3123
3127
|
const drawingShapes = data?.drawingShapes ?? [];
|
|
3124
3128
|
const animationState = context.presentationStates?.get(element.id);
|
|
3125
|
-
const { nodes: revealedNodesFull } =
|
|
3129
|
+
const { nodes: revealedNodesFull } = chunkBLAJIEXA_cjs.resolveRevealedSmartArtNodes(
|
|
3126
3130
|
nodes,
|
|
3127
3131
|
animationState,
|
|
3128
3132
|
data?.presLayoutVars
|
|
3129
3133
|
);
|
|
3130
3134
|
if (data && drawingShapes.length > 0) {
|
|
3131
|
-
const revealedShapes =
|
|
3135
|
+
const revealedShapes = chunkBLAJIEXA_cjs.resolveRevealedDrawingShapes(drawingShapes, nodes, animationState);
|
|
3132
3136
|
chrome.appendChild(
|
|
3133
|
-
buildDrawingShapesSvg(doc, element.id, data,
|
|
3137
|
+
buildDrawingShapesSvg(doc, element.id, data, chunkBLAJIEXA_cjs.buildSmartArtA11y(data).nodes, revealedShapes)
|
|
3134
3138
|
);
|
|
3135
3139
|
enableSmartArtEditing(chrome, element, context);
|
|
3136
3140
|
return wrapper;
|
|
3137
3141
|
}
|
|
3138
3142
|
if (data && nodes.length > 0) {
|
|
3139
3143
|
const revealedNodes = revealedNodesFull;
|
|
3140
|
-
const layout =
|
|
3144
|
+
const layout = chunkBLAJIEXA_cjs.computeSmartArtElementLayout(
|
|
3141
3145
|
data,
|
|
3142
3146
|
revealedNodes,
|
|
3143
3147
|
{ width: element.width, height: element.height },
|
|
3144
|
-
|
|
3148
|
+
chunkBLAJIEXA_cjs.resolvePalette(data),
|
|
3145
3149
|
data.style ?? "flat",
|
|
3146
3150
|
element.id
|
|
3147
3151
|
);
|
|
@@ -3149,8 +3153,8 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3149
3153
|
buildSmartArtFallbackSvg(
|
|
3150
3154
|
doc,
|
|
3151
3155
|
layout,
|
|
3152
|
-
|
|
3153
|
-
|
|
3156
|
+
chunkBLAJIEXA_cjs.buildSmartArtA11y(data).nodes,
|
|
3157
|
+
chunkBLAJIEXA_cjs.flattenNodes(revealedNodes).map((node) => node.id)
|
|
3154
3158
|
)
|
|
3155
3159
|
);
|
|
3156
3160
|
enableSmartArtEditing(chrome, element, context);
|
|
@@ -3173,17 +3177,17 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3173
3177
|
function buildDrawingShapesSvg(doc, elementId, data, a11yNodes, revealedShapes) {
|
|
3174
3178
|
const allShapes = data.drawingShapes ?? [];
|
|
3175
3179
|
const style = data.style ?? "flat";
|
|
3176
|
-
const viewBox =
|
|
3177
|
-
const rendered =
|
|
3180
|
+
const viewBox = chunkBLAJIEXA_cjs.computeDrawingViewBox(allShapes);
|
|
3181
|
+
const rendered = chunkBLAJIEXA_cjs.projectDrawingShapes(
|
|
3178
3182
|
elementId,
|
|
3179
3183
|
revealedShapes,
|
|
3180
3184
|
viewBox,
|
|
3181
|
-
|
|
3185
|
+
chunkBLAJIEXA_cjs.resolvePalette(data),
|
|
3182
3186
|
style
|
|
3183
3187
|
);
|
|
3184
|
-
const shadow =
|
|
3188
|
+
const shadow = chunkBLAJIEXA_cjs.styleShadowFilter(style);
|
|
3185
3189
|
const labelsById = new Map(a11yNodes.map((node) => [node.id, node.label]));
|
|
3186
|
-
const nodeIds =
|
|
3190
|
+
const nodeIds = chunkBLAJIEXA_cjs.resolveRevealedDrawingShapeNodeIds(allShapes, revealedShapes, data.nodes);
|
|
3187
3191
|
const svg = createSvgEl(doc, "svg", {
|
|
3188
3192
|
viewBox: `0 0 ${viewBox.width} ${viewBox.height}`,
|
|
3189
3193
|
preserveAspectRatio: "xMidYMid meet"
|
|
@@ -3318,9 +3322,9 @@ function enableTableResize(container, table, element, context) {
|
|
|
3318
3322
|
for (const handle of [...colHandles, ...rowHandles]) {
|
|
3319
3323
|
handle.remove();
|
|
3320
3324
|
}
|
|
3321
|
-
const crossings =
|
|
3325
|
+
const crossings = chunkBLAJIEXA_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
3322
3326
|
const rowBounds = measureRowBoundaries(table);
|
|
3323
|
-
colHandles =
|
|
3327
|
+
colHandles = chunkBLAJIEXA_cjs.computeColumnBoundaries(tableData.columnWidths).map((leftPct, i) => {
|
|
3324
3328
|
const handle = createEl(doc, "div", "pptxv-table-resize-col", {
|
|
3325
3329
|
position: "absolute",
|
|
3326
3330
|
top: "0",
|
|
@@ -3330,7 +3334,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3330
3334
|
zIndex: "10",
|
|
3331
3335
|
pointerEvents: "none"
|
|
3332
3336
|
});
|
|
3333
|
-
const segments =
|
|
3337
|
+
const segments = chunkBLAJIEXA_cjs.columnHandleSegments(
|
|
3334
3338
|
crossings.columns[i] ?? [],
|
|
3335
3339
|
rowBounds,
|
|
3336
3340
|
table.offsetHeight
|
|
@@ -3360,7 +3364,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3360
3364
|
zIndex: "10",
|
|
3361
3365
|
pointerEvents: "none"
|
|
3362
3366
|
});
|
|
3363
|
-
const segments =
|
|
3367
|
+
const segments = chunkBLAJIEXA_cjs.rowHandleSegments(crossings.rows[i] ?? [], tableData.columnWidths);
|
|
3364
3368
|
for (const { leftPct, widthPct } of segments) {
|
|
3365
3369
|
handle.appendChild(
|
|
3366
3370
|
createEl(doc, "div", "pptxv-table-resize-segment", {
|
|
@@ -3404,14 +3408,14 @@ function enableTableResize(container, table, element, context) {
|
|
|
3404
3408
|
const deltaProp = (event.clientX - active.startPos) / (rect.width || 1);
|
|
3405
3409
|
context.onTableResizeColumns?.(
|
|
3406
3410
|
element,
|
|
3407
|
-
|
|
3411
|
+
chunkBLAJIEXA_cjs.computeResizedColumnWidths(active.initialWidths, active.index, deltaProp)
|
|
3408
3412
|
);
|
|
3409
3413
|
} else if (event.clientY !== active.startPos && active.type === "row") {
|
|
3410
3414
|
const deltaY = event.clientY - active.startPos;
|
|
3411
3415
|
context.onTableResizeRow?.(
|
|
3412
3416
|
element,
|
|
3413
3417
|
active.index,
|
|
3414
|
-
|
|
3418
|
+
chunkBLAJIEXA_cjs.computeResizedRowHeight(active.initialRowHeight ?? chunkBLAJIEXA_cjs.DEFAULT_ROW_HEIGHT, deltaY)
|
|
3415
3419
|
);
|
|
3416
3420
|
}
|
|
3417
3421
|
drawHandles();
|
|
@@ -3420,13 +3424,13 @@ function enableTableResize(container, table, element, context) {
|
|
|
3420
3424
|
const rect = container.getBoundingClientRect();
|
|
3421
3425
|
const localX = event.clientX - rect.left;
|
|
3422
3426
|
const localY = event.clientY - rect.top;
|
|
3423
|
-
const scaleY =
|
|
3424
|
-
const crossings =
|
|
3427
|
+
const scaleY = chunkBLAJIEXA_cjs.getTableResizeScale(rect.height, container.offsetHeight);
|
|
3428
|
+
const crossings = chunkBLAJIEXA_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
3425
3429
|
const rowBounds = measureRowBoundaries(table);
|
|
3426
|
-
const colBoundaries =
|
|
3430
|
+
const colBoundaries = chunkBLAJIEXA_cjs.computeColumnBoundaries(tableData.columnWidths);
|
|
3427
3431
|
for (let i = 0; i < colBoundaries.length; i++) {
|
|
3428
3432
|
const boundaryX = colBoundaries[i] / 100 * rect.width;
|
|
3429
|
-
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !
|
|
3433
|
+
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !chunkBLAJIEXA_cjs.isColumnBoundaryMergedAt(crossings, i, rowBounds, localY / scaleY)) {
|
|
3430
3434
|
event.preventDefault();
|
|
3431
3435
|
event.stopPropagation();
|
|
3432
3436
|
doc.body.style.cursor = "col-resize";
|
|
@@ -3444,7 +3448,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3444
3448
|
}
|
|
3445
3449
|
}
|
|
3446
3450
|
for (let i = 0; i < rowBounds.length; i++) {
|
|
3447
|
-
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !
|
|
3451
|
+
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !chunkBLAJIEXA_cjs.isRowBoundaryMergedAt(crossings, i, tableData.columnWidths, localX / (rect.width || 1))) {
|
|
3448
3452
|
event.preventDefault();
|
|
3449
3453
|
event.stopPropagation();
|
|
3450
3454
|
const tr = table.querySelectorAll("tbody > tr")[i];
|
|
@@ -3455,7 +3459,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3455
3459
|
index: i,
|
|
3456
3460
|
startPos: event.clientY,
|
|
3457
3461
|
handleEl: rowHandles[i] ?? container,
|
|
3458
|
-
initialRowHeight: tr?.offsetHeight ??
|
|
3462
|
+
initialRowHeight: tr?.offsetHeight ?? chunkBLAJIEXA_cjs.DEFAULT_ROW_HEIGHT
|
|
3459
3463
|
};
|
|
3460
3464
|
win.addEventListener("mousemove", onMouseMove);
|
|
3461
3465
|
win.addEventListener("mouseup", onMouseUp);
|
|
@@ -3476,7 +3480,7 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
3476
3480
|
}
|
|
3477
3481
|
const doc = context.document;
|
|
3478
3482
|
const container = createEl(doc, "div", "pptxv-element pptxv-table", {
|
|
3479
|
-
...
|
|
3483
|
+
...chunkBLAJIEXA_cjs.getContainerStyle(element, zIndex),
|
|
3480
3484
|
overflow: "hidden"
|
|
3481
3485
|
});
|
|
3482
3486
|
container.dataset.elementId = element.id;
|
|
@@ -3487,9 +3491,9 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
3487
3491
|
tableLayout: "fixed",
|
|
3488
3492
|
// Load-bearing: an unstyled cell otherwise inherits the HOST chrome's
|
|
3489
3493
|
// font stack; all five bindings declare the same shared default here.
|
|
3490
|
-
fontFamily:
|
|
3494
|
+
fontFamily: chunkLCIXR7WE_cjs.DEFAULT_FONT_FAMILY,
|
|
3491
3495
|
// `a:tblPr@rtl`: mirrors the column order for right-to-left decks.
|
|
3492
|
-
...
|
|
3496
|
+
...chunkBLAJIEXA_cjs.tableContainerCss(tableData)
|
|
3493
3497
|
});
|
|
3494
3498
|
appendColgroup(doc, table, tableData.columnWidths);
|
|
3495
3499
|
const tbody = doc.createElement("tbody");
|
|
@@ -3550,13 +3554,13 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3550
3554
|
if (cell.rowSpan && cell.rowSpan > 1) {
|
|
3551
3555
|
td.rowSpan = cell.rowSpan;
|
|
3552
3556
|
}
|
|
3553
|
-
const style =
|
|
3557
|
+
const style = chunkBLAJIEXA_cjs.tableCellCss(
|
|
3554
3558
|
tableData,
|
|
3555
3559
|
cell,
|
|
3556
3560
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
3557
3561
|
styleContext
|
|
3558
3562
|
);
|
|
3559
|
-
const patternFill = cell.style ?
|
|
3563
|
+
const patternFill = cell.style ? chunkBLAJIEXA_cjs.cellPatternFillCss(cell.style) : null;
|
|
3560
3564
|
if (patternFill) {
|
|
3561
3565
|
delete style["backgroundColor"];
|
|
3562
3566
|
delete style["background"];
|
|
@@ -3569,7 +3573,7 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3569
3573
|
}
|
|
3570
3574
|
applyStyleMap(td, CELL_BASE_STYLE);
|
|
3571
3575
|
applyStyleMap(td, style);
|
|
3572
|
-
const diagonals =
|
|
3576
|
+
const diagonals = chunkBLAJIEXA_cjs.getCellDiagonalBorders(
|
|
3573
3577
|
cell.style,
|
|
3574
3578
|
tableData,
|
|
3575
3579
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3583,7 +3587,7 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3583
3587
|
}
|
|
3584
3588
|
function diagonalLine(doc, x1, y1, x2, y2, stroke, width) {
|
|
3585
3589
|
const line = createSvgEl(doc, "line", { x1, y1, x2, y2, stroke, "stroke-width": width });
|
|
3586
|
-
line.style.setProperty("stroke-width",
|
|
3590
|
+
line.style.setProperty("stroke-width", chunkG2YUKLRX_cjs.screenStrokeWidth(width));
|
|
3587
3591
|
return line;
|
|
3588
3592
|
}
|
|
3589
3593
|
function renderDiagonalOverlay(doc, diagonals) {
|
|
@@ -3613,7 +3617,7 @@ function renderDiagonalOverlay(doc, diagonals) {
|
|
|
3613
3617
|
return svg;
|
|
3614
3618
|
}
|
|
3615
3619
|
function appendCellText(doc, td, cell) {
|
|
3616
|
-
const blocks =
|
|
3620
|
+
const blocks = chunkBLAJIEXA_cjs.cellParagraphBlocks(cell);
|
|
3617
3621
|
if (blocks) {
|
|
3618
3622
|
for (const block of blocks) {
|
|
3619
3623
|
const div = createEl(doc, "div", "pptxv-table-para", { display: "block", ...block.css });
|
|
@@ -3648,7 +3652,7 @@ function appendRuns(doc, parent, runs) {
|
|
|
3648
3652
|
}
|
|
3649
3653
|
const span = createEl(doc, "span", "pptxv-table-run", {
|
|
3650
3654
|
position: "relative",
|
|
3651
|
-
...
|
|
3655
|
+
...chunkBLAJIEXA_cjs.cellRunStyle(run)
|
|
3652
3656
|
});
|
|
3653
3657
|
span.textContent = run.text;
|
|
3654
3658
|
parent.appendChild(span);
|
|
@@ -3662,8 +3666,8 @@ function registerTableChartRenderers(registry) {
|
|
|
3662
3666
|
}
|
|
3663
3667
|
|
|
3664
3668
|
// src/pptx/dom/glyph-outline-cache.ts
|
|
3665
|
-
var glyphOutlineFontCache = new
|
|
3666
|
-
var getGlyphOutline =
|
|
3669
|
+
var glyphOutlineFontCache = new chunkBLAJIEXA_cjs.GlyphOutlineFontCache();
|
|
3670
|
+
var getGlyphOutline = chunkBLAJIEXA_cjs.createGlyphOutlineLookup(glyphOutlineFontCache);
|
|
3667
3671
|
|
|
3668
3672
|
// src/pptx/dom/elements/text-warp.ts
|
|
3669
3673
|
function renderWarpedText(element, context) {
|
|
@@ -3675,12 +3679,12 @@ function renderWarpedText(element, context) {
|
|
|
3675
3679
|
if (!preset || preset === "textNoShape" || preset === "textPlain") {
|
|
3676
3680
|
return null;
|
|
3677
3681
|
}
|
|
3678
|
-
const paragraphs =
|
|
3682
|
+
const paragraphs = chunkBLAJIEXA_cjs.groupIntoParagraphs(element);
|
|
3679
3683
|
if (paragraphs.length === 0) {
|
|
3680
3684
|
return null;
|
|
3681
3685
|
}
|
|
3682
|
-
if (!
|
|
3683
|
-
const transform =
|
|
3686
|
+
if (!chunkBLAJIEXA_cjs.shouldUseSvgWarp(preset)) {
|
|
3687
|
+
const transform = chunkBLAJIEXA_cjs.getWarpCssTransform(preset, style?.textWarpAdj, style?.textWarpAdj2);
|
|
3684
3688
|
if (!transform) {
|
|
3685
3689
|
return null;
|
|
3686
3690
|
}
|
|
@@ -3708,7 +3712,7 @@ function renderWarpedText(element, context) {
|
|
|
3708
3712
|
text.textContent = paragraphs.map((p) => p.segments.map((s) => s.text).join("")).join("\n");
|
|
3709
3713
|
return text;
|
|
3710
3714
|
}
|
|
3711
|
-
if (
|
|
3715
|
+
if (chunkBLAJIEXA_cjs.hasGlyphEnvelope(preset)) {
|
|
3712
3716
|
return renderGlyphWarp(element, paragraphs, context);
|
|
3713
3717
|
}
|
|
3714
3718
|
return renderPathWarp(element, paragraphs, context);
|
|
@@ -3717,7 +3721,7 @@ function segmentFont(segment, elementStyle) {
|
|
|
3717
3721
|
const s = segment.style ?? {};
|
|
3718
3722
|
const family = s.fontFamily || elementStyle.fontFamily;
|
|
3719
3723
|
return {
|
|
3720
|
-
fontFamily: family ? pptx.getSubstituteFontFamily(family) :
|
|
3724
|
+
fontFamily: family ? pptx.getSubstituteFontFamily(family) : chunkLCIXR7WE_cjs.DEFAULT_FONT_FAMILY,
|
|
3721
3725
|
fontSizePx: s.fontSize ?? elementStyle.fontSize ?? 18,
|
|
3722
3726
|
bold: s.bold ?? elementStyle.bold,
|
|
3723
3727
|
italic: s.italic ?? elementStyle.italic
|
|
@@ -3734,7 +3738,7 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3734
3738
|
});
|
|
3735
3739
|
svg.setAttribute("class", "pptxv-wordart");
|
|
3736
3740
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%;overflow:visible");
|
|
3737
|
-
const perLine =
|
|
3741
|
+
const perLine = chunkBLAJIEXA_cjs.buildGlyphEnvelopeBlock(
|
|
3738
3742
|
preset,
|
|
3739
3743
|
paragraphs.map(
|
|
3740
3744
|
(paragraph) => paragraph.segments.map((seg, i) => ({
|
|
@@ -3759,7 +3763,7 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3759
3763
|
const renderedFamily = s.fontFamily || style.fontFamily;
|
|
3760
3764
|
const textAttrs = {
|
|
3761
3765
|
fill,
|
|
3762
|
-
"font-family": renderedFamily ? pptx.getSubstituteFontFamily(renderedFamily) :
|
|
3766
|
+
"font-family": renderedFamily ? pptx.getSubstituteFontFamily(renderedFamily) : chunkLCIXR7WE_cjs.DEFAULT_FONT_FAMILY,
|
|
3763
3767
|
"font-size": s.fontSize ?? style.fontSize ?? 18,
|
|
3764
3768
|
"font-weight": s.bold ?? style.bold ? "bold" : void 0,
|
|
3765
3769
|
"font-style": s.italic ?? style.italic ? "italic" : void 0
|
|
@@ -3829,7 +3833,7 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3829
3833
|
defs.appendChild(
|
|
3830
3834
|
createSvgEl(context.document, "path", {
|
|
3831
3835
|
id,
|
|
3832
|
-
d:
|
|
3836
|
+
d: chunkBLAJIEXA_cjs.buildWarpPath(
|
|
3833
3837
|
preset,
|
|
3834
3838
|
element.width,
|
|
3835
3839
|
element.height,
|
|
@@ -3842,7 +3846,7 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3842
3846
|
);
|
|
3843
3847
|
const text = createSvgEl(context.document, "text", {
|
|
3844
3848
|
fill: style.color ?? "#000000",
|
|
3845
|
-
"font-family": style.fontFamily ? pptx.getSubstituteFontFamily(style.fontFamily) :
|
|
3849
|
+
"font-family": style.fontFamily ? pptx.getSubstituteFontFamily(style.fontFamily) : chunkLCIXR7WE_cjs.DEFAULT_FONT_FAMILY,
|
|
3846
3850
|
"font-size": style.fontSize ?? 18,
|
|
3847
3851
|
"font-weight": style.bold ? "bold" : void 0,
|
|
3848
3852
|
"font-style": style.italic ? "italic" : void 0
|
|
@@ -3862,7 +3866,7 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3862
3866
|
|
|
3863
3867
|
// src/pptx/dom/elements/text-shape.ts
|
|
3864
3868
|
var renderTextShapeElement = (element, zIndex, context) => {
|
|
3865
|
-
const container =
|
|
3869
|
+
const container = chunkBLAJIEXA_cjs.getContainerStyle(element, zIndex);
|
|
3866
3870
|
const animState = context.presentationStates?.get(element.id);
|
|
3867
3871
|
const shape = getShapeFillStrokeStyle(
|
|
3868
3872
|
element,
|
|
@@ -3877,7 +3881,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3877
3881
|
const el = createEl(context.document, "div", "pptxv-element pptxv-shape", merged);
|
|
3878
3882
|
el.dataset.elementId = element.id;
|
|
3879
3883
|
if (context.interactive && !context.presenting) {
|
|
3880
|
-
const hitTargetStyle =
|
|
3884
|
+
const hitTargetStyle = chunkBLAJIEXA_cjs.elementHitTargetStyle(element);
|
|
3881
3885
|
if (hitTargetStyle) {
|
|
3882
3886
|
const hitTarget = createEl(context.document, "div", void 0, hitTargetStyle);
|
|
3883
3887
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
@@ -3920,8 +3924,8 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3920
3924
|
} else if (warped) {
|
|
3921
3925
|
el.appendChild(warped);
|
|
3922
3926
|
} else {
|
|
3923
|
-
const linkedSegments =
|
|
3924
|
-
const paragraphs =
|
|
3927
|
+
const linkedSegments = chunkBLAJIEXA_cjs.getOverflowSegments(element, context.slide?.elements);
|
|
3928
|
+
const paragraphs = chunkBLAJIEXA_cjs.buildParagraphs(element, context.fieldContext, linkedSegments);
|
|
3925
3929
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
3926
3930
|
if (hasText) {
|
|
3927
3931
|
el.appendChild(
|
|
@@ -3932,7 +3936,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3932
3936
|
);
|
|
3933
3937
|
} else {
|
|
3934
3938
|
const mode = context.interactive && !context.presenting ? "edit" : "present";
|
|
3935
|
-
const prompt =
|
|
3939
|
+
const prompt = chunkBLAJIEXA_cjs.placeholderPromptDescriptor(element, mode);
|
|
3936
3940
|
if (prompt) {
|
|
3937
3941
|
const hint = createEl(context.document, "div", "pptxv-placeholder-prompt", {
|
|
3938
3942
|
...getTextBlockStyle(element),
|
|
@@ -3996,8 +4000,8 @@ async function loadPresentation(buffer, options) {
|
|
|
3996
4000
|
digitalSignatureCount: parsed.digitalSignatureCount ?? 0,
|
|
3997
4001
|
isPasswordProtected: parsed.isPasswordProtected ?? false,
|
|
3998
4002
|
canvasSize: {
|
|
3999
|
-
width: parsed.width ??
|
|
4000
|
-
height: parsed.height ??
|
|
4003
|
+
width: parsed.width ?? chunkLCIXR7WE_cjs.DEFAULT_CANVAS_WIDTH,
|
|
4004
|
+
height: parsed.height ?? chunkLCIXR7WE_cjs.DEFAULT_CANVAS_HEIGHT
|
|
4001
4005
|
},
|
|
4002
4006
|
mediaDataUrls,
|
|
4003
4007
|
colorScheme: parsed.theme?.colorScheme,
|
|
@@ -4097,15 +4101,15 @@ async function resolveImageUrls(handler, slides) {
|
|
|
4097
4101
|
|
|
4098
4102
|
Object.defineProperty(exports, "buildEmbeddedFontStyles", {
|
|
4099
4103
|
enumerable: true,
|
|
4100
|
-
get: function () { return
|
|
4104
|
+
get: function () { return chunkBLAJIEXA_cjs.buildEmbeddedFontStyles; }
|
|
4101
4105
|
});
|
|
4102
4106
|
Object.defineProperty(exports, "buildFieldSubstitutionContext", {
|
|
4103
4107
|
enumerable: true,
|
|
4104
|
-
get: function () { return
|
|
4108
|
+
get: function () { return chunkBLAJIEXA_cjs.buildFieldSubstitutionContext; }
|
|
4105
4109
|
});
|
|
4106
4110
|
Object.defineProperty(exports, "renderChartViewModelSvg", {
|
|
4107
4111
|
enumerable: true,
|
|
4108
|
-
get: function () { return
|
|
4112
|
+
get: function () { return chunkRPRC2EG5_cjs.renderChartViewModelSvg; }
|
|
4109
4113
|
});
|
|
4110
4114
|
Object.defineProperty(exports, "createTranslator", {
|
|
4111
4115
|
enumerable: true,
|