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