ooxml-ui 1.46.0 → 1.48.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 +1 -1
- package/dist/chart/format-pane-axis.d.ts +0 -1
- package/dist/chart/format-pane-model.d.ts +0 -1
- package/dist/chart/format-pane-targets.d.ts +0 -1
- package/dist/chart/format-pane-types.d.ts +0 -1
- package/dist/chart/format-pane-view.d.ts +0 -1
- package/dist/{chunk-NH33G6LA.js → chunk-G5CALQUW.js} +43 -2
- package/dist/{chunk-HNSFEOSG.js → chunk-J3ROBM74.js} +1 -1
- package/dist/docx/backstage-options.d.ts +4 -0
- package/dist/docx/backstage-trust.d.ts +11 -0
- package/dist/docx/docx-webfonts.d.ts +23 -3
- package/dist/docx/element-api.d.ts +3 -1
- package/dist/docx/font-downloads.d.ts +8 -0
- package/dist/docx/locales/en.d.ts +6 -0
- package/dist/docx/locales/options.d.ts +6 -0
- package/dist/docx/locales/trust.d.ts +15 -0
- package/dist/docx/localization-strings.d.ts +6 -0
- package/dist/docx.js +154 -13
- package/dist/fonts/font-download-policy.d.ts +23 -0
- package/dist/fonts/webfonts.d.ts +34 -13
- package/dist/fonts/webfonts.d.ts.map +1 -1
- package/dist/form/color-input/live-color-input.d.ts +0 -1
- package/dist/form/range-control.d.ts +0 -1
- package/dist/index.js +2 -2
- package/dist/pptx/{chunk-Y5I2GPXN.cjs → chunk-2C2C27ML.cjs} +99 -2
- package/dist/pptx/{chunk-Z6HDGNW6.mjs → chunk-C4GZLKDW.mjs} +97 -3
- package/dist/pptx/{chunk-F2LOZTP3.mjs → chunk-JUEKQZSB.mjs} +1 -1
- package/dist/pptx/{chunk-XPTB4LSI.cjs → chunk-N5WPJIMK.cjs} +42 -42
- package/dist/pptx/dom/index.cjs +370 -370
- package/dist/pptx/dom/index.mjs +4 -4
- package/dist/pptx/index.cjs +3074 -3062
- package/dist/pptx/index.mjs +1 -1
- package/dist/pptx/render/deck-webfont-readiness.d.ts +11 -0
- package/dist/pptx/render/deck-webfont-readiness.d.ts.map +1 -1
- package/dist/pptx/render/index.d.ts +2 -0
- package/dist/pptx/render/index.d.ts.map +1 -1
- package/dist/pptx/render/inline-text-paragraph-marker.d.ts +3 -0
- package/dist/pptx/render/inline-text-paragraph-marker.d.ts.map +1 -0
- package/dist/pptx/render/inline-trailing-space.d.ts +14 -0
- package/dist/pptx/render/inline-trailing-space.d.ts.map +1 -0
- package/dist/pptx/render/morph-predicates.d.ts +5 -1
- package/dist/pptx/render/morph-predicates.d.ts.map +1 -1
- package/dist/pptx/{smartart-insert-preview-O4B3T6TS.cjs → smartart-insert-preview-3BLHZGCE.cjs} +3 -3
- package/dist/pptx/{smartart-insert-preview-Q6V3WY7W.mjs → smartart-insert-preview-WRSYENYB.mjs} +2 -2
- package/dist/render-cache.d.ts +0 -1
- package/dist/teams.js +1 -1
- package/dist/theme-bridge.d.ts +0 -1
- package/dist/theme.d.ts +0 -1
- package/dist/visio/controller.d.ts +6 -0
- package/dist/visio/locales/trust-center.d.ts +7 -0
- package/dist/visio/viewer-behaviour.d.ts +5 -0
- package/dist/visio/viewer-element.d.ts +5 -3
- package/dist/visio/viewer-options-categories.d.ts +6 -0
- package/dist/visio/viewer-options-trust.d.ts +10 -0
- package/dist/visio/viewer-options.d.ts +6 -0
- package/dist/visio/viewer-webfonts.d.ts +15 -3
- package/dist/visio.js +184 -16
- package/dist/xlsx/backstage/options-trust.d.ts +9 -0
- package/dist/xlsx/backstage/parts.d.ts +4 -0
- package/dist/xlsx/element-api.d.ts +9 -7
- package/dist/xlsx/font-downloads.d.ts +8 -0
- package/dist/xlsx/webfonts.d.ts +21 -1
- package/dist/xlsx.js +130 -20
- package/package.json +2 -2
- /package/dist/{chunk-6G6KERIZ.js → chunk-MUY444GW.js} +0 -0
package/dist/pptx/dom/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkN5WPJIMK_cjs = require('../chunk-N5WPJIMK.cjs');
|
|
4
|
+
var chunk2C2C27ML_cjs = require('../chunk-2C2C27ML.cjs');
|
|
5
5
|
var chunkLOUVYGWX_cjs = require('../chunk-LOUVYGWX.cjs');
|
|
6
6
|
require('../chunk-XOAXPD2W.cjs');
|
|
7
7
|
require('../chunk-W3X2UVYQ.cjs');
|
|
@@ -44,14 +44,14 @@ var pptx = require('ooxml-core/pptx');
|
|
|
44
44
|
|
|
45
45
|
// src/pptx/dom/activex-controls-overlay.ts
|
|
46
46
|
function buildActiveXControlsOverlay(doc, controls, canvasSize) {
|
|
47
|
-
const overlay =
|
|
47
|
+
const overlay = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-activex-overlay", {
|
|
48
48
|
position: "absolute",
|
|
49
49
|
inset: "0",
|
|
50
50
|
pointerEvents: "none",
|
|
51
51
|
zIndex: "40"
|
|
52
52
|
});
|
|
53
53
|
controls.forEach((control, index) => {
|
|
54
|
-
const view =
|
|
54
|
+
const view = chunk2C2C27ML_cjs.getActiveXControlOverlayView(control, canvasSize, index);
|
|
55
55
|
const style = {
|
|
56
56
|
position: "absolute",
|
|
57
57
|
left: `${view.left}px`,
|
|
@@ -60,7 +60,7 @@ function buildActiveXControlsOverlay(doc, controls, canvasSize) {
|
|
|
60
60
|
height: `${view.height}px`
|
|
61
61
|
};
|
|
62
62
|
if (view.className === "image" && view.imageUrl) {
|
|
63
|
-
const img =
|
|
63
|
+
const img = chunkN5WPJIMK_cjs.createEl(doc, "img", "pptxv-activex-overlay-image", style);
|
|
64
64
|
img.src = view.imageUrl;
|
|
65
65
|
img.alt = view.label;
|
|
66
66
|
img.setAttribute("draggable", "false");
|
|
@@ -68,7 +68,7 @@ function buildActiveXControlsOverlay(doc, controls, canvasSize) {
|
|
|
68
68
|
overlay.appendChild(img);
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
const badge =
|
|
71
|
+
const badge = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-activex-overlay-placeholder", style);
|
|
72
72
|
badge.title = `ActiveX control: ${view.label} (interactive controls are not supported in the viewer)`;
|
|
73
73
|
badge.textContent = view.label;
|
|
74
74
|
overlay.appendChild(badge);
|
|
@@ -81,25 +81,25 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
81
81
|
if (comments.length === 0) {
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
|
-
const overlay =
|
|
84
|
+
const overlay = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-comment-markers", {
|
|
85
85
|
position: "absolute",
|
|
86
86
|
inset: "0",
|
|
87
87
|
pointerEvents: "none",
|
|
88
88
|
zIndex: "45"
|
|
89
89
|
});
|
|
90
|
-
const markers =
|
|
90
|
+
const markers = chunk2C2C27ML_cjs.buildCommentMarkers(
|
|
91
91
|
comments,
|
|
92
92
|
canvasSize.width,
|
|
93
93
|
canvasSize.height,
|
|
94
94
|
t("pptx.comments.unknownAuthor")
|
|
95
95
|
);
|
|
96
96
|
for (const marker of markers) {
|
|
97
|
-
const dot =
|
|
97
|
+
const dot = chunkN5WPJIMK_cjs.createEl(doc, "button", "pptxv-comment-marker", {
|
|
98
98
|
position: "absolute",
|
|
99
|
-
left: `${marker.x -
|
|
100
|
-
top: `${marker.y -
|
|
101
|
-
width: `${
|
|
102
|
-
height: `${
|
|
99
|
+
left: `${marker.x - chunk2C2C27ML_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
100
|
+
top: `${marker.y - chunk2C2C27ML_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
101
|
+
width: `${chunk2C2C27ML_cjs.COMMENT_MARKER_SIZE}px`,
|
|
102
|
+
height: `${chunk2C2C27ML_cjs.COMMENT_MARKER_SIZE}px`,
|
|
103
103
|
display: "flex",
|
|
104
104
|
alignItems: "center",
|
|
105
105
|
justifyContent: "center",
|
|
@@ -166,7 +166,7 @@ function merge3dStyle(base, computed) {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
169
|
-
const frame =
|
|
169
|
+
const frame = chunk2C2C27ML_cjs.getFrameEffectStyle(el);
|
|
170
170
|
if (frame) {
|
|
171
171
|
return { ...frame };
|
|
172
172
|
}
|
|
@@ -218,11 +218,11 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
218
218
|
if (fx.overflowVisible) {
|
|
219
219
|
style["overflow"] = "visible";
|
|
220
220
|
}
|
|
221
|
-
merge3dStyle(style,
|
|
222
|
-
if (
|
|
221
|
+
merge3dStyle(style, chunk2C2C27ML_cjs.getComputed3dStyle(el));
|
|
222
|
+
if (chunk2C2C27ML_cjs.passesClicksThroughBox(el)) {
|
|
223
223
|
style["pointerEvents"] = "none";
|
|
224
224
|
}
|
|
225
|
-
const geometry =
|
|
225
|
+
const geometry = chunk2C2C27ML_cjs.resolveShapeGeometry(el);
|
|
226
226
|
switch (geometry.kind) {
|
|
227
227
|
case "bare":
|
|
228
228
|
style["backgroundColor"] = "transparent";
|
|
@@ -256,17 +256,17 @@ function getTextBlockStyle(el) {
|
|
|
256
256
|
if (!pptx.hasTextProperties(el)) {
|
|
257
257
|
return {};
|
|
258
258
|
}
|
|
259
|
-
const base =
|
|
259
|
+
const base = chunk2C2C27ML_cjs.buildTextBlockStyle(el, {
|
|
260
260
|
fallbackColor: chunkHTFYAGHG_cjs.DEFAULT_TEXT_COLOR,
|
|
261
261
|
bodyLayout: true,
|
|
262
262
|
pxLengths: true
|
|
263
263
|
});
|
|
264
|
-
const scene3d =
|
|
264
|
+
const scene3d = chunk2C2C27ML_cjs.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height });
|
|
265
265
|
if (!scene3d) {
|
|
266
266
|
return base;
|
|
267
267
|
}
|
|
268
268
|
const merged = { ...base, ...scene3d };
|
|
269
|
-
const transform =
|
|
269
|
+
const transform = chunkN5WPJIMK_cjs.composeTransforms(base.transform, scene3d.transform);
|
|
270
270
|
if (transform !== void 0) {
|
|
271
271
|
merged.transform = transform;
|
|
272
272
|
}
|
|
@@ -354,7 +354,7 @@ function renderSlideStage(options) {
|
|
|
354
354
|
const { document: doc, slide, canvasSize, mediaDataUrls, registry, t } = options;
|
|
355
355
|
const scale = options.scale ?? 1;
|
|
356
356
|
const interactive = options.interactive ?? false;
|
|
357
|
-
const stage =
|
|
357
|
+
const stage = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-stage", {
|
|
358
358
|
width: `${canvasSize.width}px`,
|
|
359
359
|
height: `${canvasSize.height}px`,
|
|
360
360
|
transform: `scale(${scale})`,
|
|
@@ -371,7 +371,7 @@ function renderSlideStage(options) {
|
|
|
371
371
|
"--pptxv-grid-size": `${options.gridSpacingPx ?? 10}px`,
|
|
372
372
|
// One device pixel in slide px: thin strokes stay visible on screen.
|
|
373
373
|
...chunkFI2ATACZ_cjs.deviceStrokeStageStyle(scale),
|
|
374
|
-
...
|
|
374
|
+
...chunk2C2C27ML_cjs.getSlideBackgroundStyle(slide, { widthPx: canvasSize.width, heightPx: canvasSize.height })
|
|
375
375
|
});
|
|
376
376
|
if (interactive || options.reading) {
|
|
377
377
|
stage.setAttribute("role", "region");
|
|
@@ -412,10 +412,10 @@ function renderSlideStage(options) {
|
|
|
412
412
|
chartPartSelection: options.chartPartSelection,
|
|
413
413
|
onChartPartSelect: options.onChartPartSelect,
|
|
414
414
|
selectedElementIds: options.selectedElementIds,
|
|
415
|
-
edgeBleeds:
|
|
415
|
+
edgeBleeds: chunk2C2C27ML_cjs.resolveStageEdgeBleeds(void 0, slide, options.selectedElementIds),
|
|
416
416
|
registry,
|
|
417
417
|
renderElement(element, zIndex) {
|
|
418
|
-
if (!
|
|
418
|
+
if (!chunk2C2C27ML_cjs.isElementRendered(element)) {
|
|
419
419
|
return null;
|
|
420
420
|
}
|
|
421
421
|
const node = registry.resolve(element.type)(element, zIndex, context);
|
|
@@ -427,10 +427,10 @@ function renderSlideStage(options) {
|
|
|
427
427
|
}
|
|
428
428
|
node.setAttribute("data-pptx-element", "true");
|
|
429
429
|
}
|
|
430
|
-
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" &&
|
|
431
|
-
const hitTargetStyle =
|
|
430
|
+
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" && chunk2C2C27ML_cjs.shouldRenderHitTarget(interactive, options.presenting ?? false)) {
|
|
431
|
+
const hitTargetStyle = chunk2C2C27ML_cjs.elementHitTargetStyle(element);
|
|
432
432
|
if (hitTargetStyle) {
|
|
433
|
-
const hitTarget =
|
|
433
|
+
const hitTarget = chunkN5WPJIMK_cjs.createEl(doc, "div", void 0, hitTargetStyle);
|
|
434
434
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
435
435
|
hitTarget.setAttribute("data-pptx-hit-target", "true");
|
|
436
436
|
node.appendChild(hitTarget);
|
|
@@ -448,12 +448,12 @@ function renderSlideStage(options) {
|
|
|
448
448
|
}
|
|
449
449
|
});
|
|
450
450
|
if (interactive || options.reading) {
|
|
451
|
-
|
|
451
|
+
chunk2C2C27ML_cjs.applyRenderedElementAccessibility(stage, slide.elements, {
|
|
452
452
|
presenting: options.presenting ?? false
|
|
453
453
|
});
|
|
454
454
|
}
|
|
455
455
|
if (interactive) {
|
|
456
|
-
|
|
456
|
+
chunk2C2C27ML_cjs.applyElementActionAffordances(
|
|
457
457
|
stage,
|
|
458
458
|
slide.elements.filter(
|
|
459
459
|
(element) => options.templateEditing || !chunk3CYWRMYZ_cjs.isTemplateElementId(element.id)
|
|
@@ -461,7 +461,7 @@ function renderSlideStage(options) {
|
|
|
461
461
|
{
|
|
462
462
|
canInteract: true,
|
|
463
463
|
presenting: options.presenting ?? false,
|
|
464
|
-
labels:
|
|
464
|
+
labels: chunk2C2C27ML_cjs.actionAffordanceLabels((key) => t(key))
|
|
465
465
|
}
|
|
466
466
|
);
|
|
467
467
|
}
|
|
@@ -568,7 +568,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
568
568
|
if (!rect) {
|
|
569
569
|
return;
|
|
570
570
|
}
|
|
571
|
-
const step2 =
|
|
571
|
+
const step2 = chunk2C2C27ML_cjs.advanceChartMarkDrag(activeMark, event.clientX, event.clientY, rect);
|
|
572
572
|
if (!step2) {
|
|
573
573
|
return;
|
|
574
574
|
}
|
|
@@ -627,7 +627,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
627
627
|
bubbles: true,
|
|
628
628
|
detail: {
|
|
629
629
|
elementId: element.id,
|
|
630
|
-
target:
|
|
630
|
+
target: chunk2C2C27ML_cjs.chartFormatTargetFromEvent(event, container, chart),
|
|
631
631
|
open
|
|
632
632
|
}
|
|
633
633
|
})
|
|
@@ -670,7 +670,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
670
670
|
seriesIndex: part.seriesIndex,
|
|
671
671
|
pointIndex: part.pointIndex
|
|
672
672
|
});
|
|
673
|
-
const startedMark =
|
|
673
|
+
const startedMark = chunk2C2C27ML_cjs.beginChartMarkDrag({
|
|
674
674
|
part,
|
|
675
675
|
geometry: markGeometry,
|
|
676
676
|
chartData: chart.chartData,
|
|
@@ -714,17 +714,17 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
714
714
|
// src/pptx/dom/elements/chart.ts
|
|
715
715
|
var renderChartElement = (element, zIndex, context) => {
|
|
716
716
|
const wrapper = renderChartSvgElement(element, zIndex, context);
|
|
717
|
-
const spec = wrapper ?
|
|
717
|
+
const spec = wrapper ? chunk2C2C27ML_cjs.resolveChartThreeViewSpec(element, chunkN5WPJIMK_cjs.rendering3DFlagsOf(context)) : null;
|
|
718
718
|
if (!wrapper || !spec) {
|
|
719
719
|
return wrapper;
|
|
720
720
|
}
|
|
721
|
-
const view =
|
|
721
|
+
const view = chunkN5WPJIMK_cjs.mountThreeViewInto(context.document, wrapper, {
|
|
722
722
|
spec,
|
|
723
|
-
interactive:
|
|
724
|
-
selectedPart:
|
|
723
|
+
interactive: chunkN5WPJIMK_cjs.isChart3DEditable(element, context),
|
|
724
|
+
selectedPart: chunkN5WPJIMK_cjs.selectedChartPartOf(element, context),
|
|
725
725
|
textStyle: context.presentationStates?.get(element.id)?.textStyle
|
|
726
726
|
});
|
|
727
|
-
|
|
727
|
+
chunkN5WPJIMK_cjs.wireChartThreeViewEvents(view, element, context, wrapper);
|
|
728
728
|
return wrapper;
|
|
729
729
|
};
|
|
730
730
|
var renderChartSvgElement = (element, zIndex, context) => {
|
|
@@ -732,16 +732,16 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
732
732
|
return null;
|
|
733
733
|
}
|
|
734
734
|
const doc = context.document;
|
|
735
|
-
const container =
|
|
735
|
+
const container = chunkN5WPJIMK_cjs.createEl(
|
|
736
736
|
doc,
|
|
737
737
|
"div",
|
|
738
738
|
"pptxv-element pptxv-chart",
|
|
739
739
|
// The chart area's outer shadow and glow sit on the frame, outside the chart.
|
|
740
|
-
{ ...
|
|
740
|
+
{ ...chunk2C2C27ML_cjs.getContainerStyle(element, zIndex), ...chunk2C2C27ML_cjs.getFrameEffectStyle(element) }
|
|
741
741
|
);
|
|
742
742
|
container.dataset.elementId = element.id;
|
|
743
743
|
const animationState = context.presentationStates?.get(element.id);
|
|
744
|
-
const chartData = element.chartData ?
|
|
744
|
+
const chartData = element.chartData ? chunk2C2C27ML_cjs.resolveRevealedChartData(element.chartData, animationState) : element.chartData;
|
|
745
745
|
if (!chartData || chartData.series.length === 0) {
|
|
746
746
|
container.appendChild(renderChartPlaceholder(doc, chartData?.chartType ?? "bar", context.t));
|
|
747
747
|
return container;
|
|
@@ -776,7 +776,7 @@ function resolveChartPalette2(chartData) {
|
|
|
776
776
|
return chunkHTFYAGHG_cjs.resolveChartPalette(chartData);
|
|
777
777
|
}
|
|
778
778
|
function renderChartPlaceholder(doc, chartType, t) {
|
|
779
|
-
const placeholder =
|
|
779
|
+
const placeholder = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-placeholder pptxv-chart-placeholder", {
|
|
780
780
|
display: "flex",
|
|
781
781
|
alignItems: "center",
|
|
782
782
|
justifyContent: "center",
|
|
@@ -788,7 +788,7 @@ function renderChartPlaceholder(doc, chartType, t) {
|
|
|
788
788
|
border: "1px dashed #cbd5e1",
|
|
789
789
|
boxSizing: "border-box"
|
|
790
790
|
});
|
|
791
|
-
placeholder.textContent =
|
|
791
|
+
placeholder.textContent = chunk2C2C27ML_cjs.chartPlaceholderLabel(chartType, (key, params) => t(key, params));
|
|
792
792
|
return placeholder;
|
|
793
793
|
}
|
|
794
794
|
|
|
@@ -807,19 +807,19 @@ function appendRunContent(doc, host, run) {
|
|
|
807
807
|
}
|
|
808
808
|
function appendTabLines(doc, host, lines) {
|
|
809
809
|
lines.forEach((line, li) => {
|
|
810
|
-
const lineHost =
|
|
810
|
+
const lineHost = chunkN5WPJIMK_cjs.createEl(doc, "span", void 0, {
|
|
811
811
|
display: "inline-block",
|
|
812
812
|
whiteSpace: "nowrap"
|
|
813
813
|
});
|
|
814
814
|
for (const piece of line.pieces) {
|
|
815
815
|
if (piece.leaderStyle) {
|
|
816
|
-
const leader =
|
|
816
|
+
const leader = chunkN5WPJIMK_cjs.createEl(doc, "span", void 0, piece.leaderStyle);
|
|
817
817
|
leader.setAttribute("aria-hidden", "true");
|
|
818
818
|
leader.textContent = piece.leaderText ?? "";
|
|
819
819
|
lineHost.appendChild(leader);
|
|
820
820
|
}
|
|
821
821
|
for (const word of piece.words ?? [piece]) {
|
|
822
|
-
const textSpan =
|
|
822
|
+
const textSpan = chunkN5WPJIMK_cjs.createEl(doc, "span", void 0, word.style);
|
|
823
823
|
textSpan.textContent = word.text;
|
|
824
824
|
lineHost.appendChild(textSpan);
|
|
825
825
|
}
|
|
@@ -833,7 +833,7 @@ function appendTabLines(doc, host, lines) {
|
|
|
833
833
|
function appendStyledPieces(doc, host, pieces) {
|
|
834
834
|
for (const piece of pieces) {
|
|
835
835
|
if (piece.style) {
|
|
836
|
-
const span =
|
|
836
|
+
const span = chunkN5WPJIMK_cjs.createEl(doc, "span", void 0, piece.style);
|
|
837
837
|
span.textContent = piece.text;
|
|
838
838
|
host.appendChild(span);
|
|
839
839
|
} else {
|
|
@@ -846,16 +846,16 @@ function appendStyledPieces(doc, host, pieces) {
|
|
|
846
846
|
var NEWLINE_RUN = "\n";
|
|
847
847
|
function createRunBaseNode(doc, run) {
|
|
848
848
|
if (run.equation) {
|
|
849
|
-
const host =
|
|
850
|
-
const math =
|
|
849
|
+
const host = chunkN5WPJIMK_cjs.createEl(doc, "span", "pptxv-inline-equation", run.style);
|
|
850
|
+
const math = chunkN5WPJIMK_cjs.createEl(doc, "span", "pptxv-equation-math", {
|
|
851
851
|
display: "inline-block",
|
|
852
852
|
verticalAlign: "middle",
|
|
853
853
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
854
854
|
});
|
|
855
|
-
math.innerHTML =
|
|
855
|
+
math.innerHTML = chunk2C2C27ML_cjs.runEquationMathMl(run.equation);
|
|
856
856
|
host.appendChild(math);
|
|
857
857
|
if (run.equation.number) {
|
|
858
|
-
const number =
|
|
858
|
+
const number = chunkN5WPJIMK_cjs.createEl(doc, "span", "pptxv-equation-number", {
|
|
859
859
|
whiteSpace: "nowrap",
|
|
860
860
|
marginInlineStart: "0.5em"
|
|
861
861
|
});
|
|
@@ -864,8 +864,8 @@ function createRunBaseNode(doc, run) {
|
|
|
864
864
|
}
|
|
865
865
|
return host;
|
|
866
866
|
}
|
|
867
|
-
if (run.hyperlink &&
|
|
868
|
-
const link =
|
|
867
|
+
if (run.hyperlink && chunk2C2C27ML_cjs.isRunHyperlinkClickable(run.hyperlink)) {
|
|
868
|
+
const link = chunkN5WPJIMK_cjs.createEl(doc, "a", "pptxv-link", run.style);
|
|
869
869
|
link.setAttribute("data-pptx-hyperlink", run.hyperlink.url);
|
|
870
870
|
link.setAttribute("role", "link");
|
|
871
871
|
link.tabIndex = 0;
|
|
@@ -881,13 +881,13 @@ function createRunBaseNode(doc, run) {
|
|
|
881
881
|
}
|
|
882
882
|
if (run.ruby) {
|
|
883
883
|
const ruby = doc.createElement("ruby");
|
|
884
|
-
|
|
884
|
+
chunkN5WPJIMK_cjs.applyStyleMap(ruby, run.style);
|
|
885
885
|
appendRunContent(doc, ruby, run);
|
|
886
886
|
const openParen = doc.createElement("rp");
|
|
887
887
|
openParen.textContent = "(";
|
|
888
888
|
ruby.appendChild(openParen);
|
|
889
889
|
const annotation = doc.createElement("rt");
|
|
890
|
-
|
|
890
|
+
chunkN5WPJIMK_cjs.applyStyleMap(annotation, run.ruby.style);
|
|
891
891
|
annotation.textContent = run.ruby.text;
|
|
892
892
|
ruby.appendChild(annotation);
|
|
893
893
|
const closeParen = doc.createElement("rp");
|
|
@@ -895,8 +895,8 @@ function createRunBaseNode(doc, run) {
|
|
|
895
895
|
ruby.appendChild(closeParen);
|
|
896
896
|
return ruby;
|
|
897
897
|
}
|
|
898
|
-
const span =
|
|
899
|
-
|
|
898
|
+
const span = chunkN5WPJIMK_cjs.createEl(doc, "span");
|
|
899
|
+
chunkN5WPJIMK_cjs.applyStyleMap(span, run.style);
|
|
900
900
|
appendRunContent(doc, span, run);
|
|
901
901
|
return span;
|
|
902
902
|
}
|
|
@@ -905,22 +905,22 @@ function createRunNode(doc, run) {
|
|
|
905
905
|
if (!run.reflection) {
|
|
906
906
|
return base;
|
|
907
907
|
}
|
|
908
|
-
const wrapper =
|
|
908
|
+
const wrapper = chunkN5WPJIMK_cjs.createEl(doc, "span", void 0, {
|
|
909
909
|
position: "relative",
|
|
910
910
|
display: "inline-block"
|
|
911
911
|
});
|
|
912
912
|
wrapper.appendChild(base);
|
|
913
|
-
const mirror =
|
|
913
|
+
const mirror = chunkN5WPJIMK_cjs.createEl(doc, "span", "pptxv-text-reflection", { ...run.reflection });
|
|
914
914
|
mirror.setAttribute("aria-hidden", "true");
|
|
915
|
-
const mirrorInner =
|
|
916
|
-
|
|
915
|
+
const mirrorInner = chunkN5WPJIMK_cjs.createEl(doc, "span");
|
|
916
|
+
chunkN5WPJIMK_cjs.applyStyleMap(mirrorInner, run.style);
|
|
917
917
|
appendRunContent(doc, mirrorInner, run);
|
|
918
918
|
mirror.appendChild(mirrorInner);
|
|
919
919
|
wrapper.appendChild(mirror);
|
|
920
920
|
return wrapper;
|
|
921
921
|
}
|
|
922
922
|
function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
923
|
-
const block =
|
|
923
|
+
const block = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-text", textStyle);
|
|
924
924
|
for (const para of paragraphs) {
|
|
925
925
|
const paraStyle = {
|
|
926
926
|
// This paragraph's own `text-align` / BiDi `direction` / kinsoku rules,
|
|
@@ -942,13 +942,13 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
942
942
|
if (para.strutFontSizePx !== void 0) {
|
|
943
943
|
paraStyle.fontSize = `${para.strutFontSizePx}px`;
|
|
944
944
|
}
|
|
945
|
-
const p =
|
|
945
|
+
const p = chunkN5WPJIMK_cjs.createEl(doc, "p", "pptxv-para", paraStyle);
|
|
946
946
|
if (para.textIndentPx !== void 0) {
|
|
947
947
|
p.style.textIndent = `${para.textIndentPx}px`;
|
|
948
948
|
}
|
|
949
949
|
const picture = para.bulletPicture;
|
|
950
950
|
if (picture?.src) {
|
|
951
|
-
const image =
|
|
951
|
+
const image = chunkN5WPJIMK_cjs.createEl(doc, "img", "pptxv-bullet-image", {
|
|
952
952
|
width: `${picture.sizePx}px`,
|
|
953
953
|
height: `${picture.sizePx}px`,
|
|
954
954
|
display: "inline-block",
|
|
@@ -961,15 +961,15 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
961
961
|
image.setAttribute("draggable", "false");
|
|
962
962
|
p.appendChild(image);
|
|
963
963
|
} else if (para.bulletMarker !== void 0) {
|
|
964
|
-
const bullet =
|
|
965
|
-
|
|
964
|
+
const bullet = chunkN5WPJIMK_cjs.createEl(doc, "span", "pptxv-bullet");
|
|
965
|
+
chunkN5WPJIMK_cjs.applyStyleMap(bullet, para.bulletStyle);
|
|
966
966
|
if (para.bulletPicture) {
|
|
967
967
|
bullet.setAttribute("aria-label", para.bulletPicture.accessibleLabel);
|
|
968
968
|
}
|
|
969
969
|
bullet.textContent = para.bulletMarker;
|
|
970
970
|
p.appendChild(bullet);
|
|
971
971
|
}
|
|
972
|
-
const spec = build ?
|
|
972
|
+
const spec = build ? chunk2C2C27ML_cjs.buildTextBuildSpec(
|
|
973
973
|
build.elementId,
|
|
974
974
|
paragraphs.indexOf(para),
|
|
975
975
|
para.runs.filter((run) => run.text !== NEWLINE_RUN).map((run) => ({ text: run.text, style: run.style })),
|
|
@@ -977,8 +977,8 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
977
977
|
) : void 0;
|
|
978
978
|
if (spec && spec.granularity !== "paragraph") {
|
|
979
979
|
for (const span of spec.spans ?? []) {
|
|
980
|
-
const node =
|
|
981
|
-
|
|
980
|
+
const node = chunkN5WPJIMK_cjs.createEl(doc, "span");
|
|
981
|
+
chunkN5WPJIMK_cjs.applyStyleMap(node, { ...span.style ?? {}, ...chunk2C2C27ML_cjs.textBuildSpanStyle(span) });
|
|
982
982
|
if (span.animId) {
|
|
983
983
|
node.setAttribute("data-anim-id", span.animId);
|
|
984
984
|
}
|
|
@@ -990,8 +990,8 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
990
990
|
}
|
|
991
991
|
let runHost = p;
|
|
992
992
|
if (spec) {
|
|
993
|
-
const wrapper =
|
|
994
|
-
|
|
993
|
+
const wrapper = chunkN5WPJIMK_cjs.createEl(doc, "span");
|
|
994
|
+
chunkN5WPJIMK_cjs.applyStyleMap(wrapper, chunk2C2C27ML_cjs.textBuildSpanStyle(spec));
|
|
995
995
|
if (spec.animId) {
|
|
996
996
|
wrapper.setAttribute("data-anim-id", spec.animId);
|
|
997
997
|
}
|
|
@@ -1028,7 +1028,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1028
1028
|
);
|
|
1029
1029
|
const w = Math.max(element.width, 1);
|
|
1030
1030
|
const h = Math.max(element.height, 1);
|
|
1031
|
-
const wrapper =
|
|
1031
|
+
const wrapper = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-element pptxv-connector", {
|
|
1032
1032
|
position: "absolute",
|
|
1033
1033
|
left: `${element.x}px`,
|
|
1034
1034
|
top: `${element.y}px`,
|
|
@@ -1056,14 +1056,14 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1056
1056
|
if (lineGlow) {
|
|
1057
1057
|
wrapper.style.filter = lineGlow;
|
|
1058
1058
|
}
|
|
1059
|
-
const svg =
|
|
1059
|
+
const svg = chunkN5WPJIMK_cjs.createSvgEl(doc, "svg", { width: w, height: h, viewBox: `0 0 ${w} ${h}` });
|
|
1060
1060
|
svg.setAttribute("style", "overflow:visible;display:block");
|
|
1061
1061
|
const seed = element.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
1062
|
-
const defs =
|
|
1062
|
+
const defs = chunkN5WPJIMK_cjs.createSvgEl(doc, "defs");
|
|
1063
1063
|
const lineShadow = chunkHTFYAGHG_cjs.getLineShadowParams(ss);
|
|
1064
1064
|
const shadowId = lineShadow ? `${seed}-line-shadow` : void 0;
|
|
1065
1065
|
if (lineShadow && shadowId) {
|
|
1066
|
-
const filter =
|
|
1066
|
+
const filter = chunkN5WPJIMK_cjs.createSvgEl(doc, "filter", {
|
|
1067
1067
|
id: shadowId,
|
|
1068
1068
|
x: "-50%",
|
|
1069
1069
|
y: "-50%",
|
|
@@ -1071,7 +1071,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1071
1071
|
height: "200%"
|
|
1072
1072
|
});
|
|
1073
1073
|
filter.appendChild(
|
|
1074
|
-
|
|
1074
|
+
chunkN5WPJIMK_cjs.createSvgEl(doc, "feDropShadow", {
|
|
1075
1075
|
dx: lineShadow.offsetX,
|
|
1076
1076
|
dy: lineShadow.offsetY,
|
|
1077
1077
|
stdDeviation: lineShadow.blur / 2,
|
|
@@ -1116,13 +1116,13 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1116
1116
|
const y1 = element.flipVertical ? rh : 0;
|
|
1117
1117
|
const x2 = element.flipHorizontal ? 0 : rw;
|
|
1118
1118
|
const y2 = element.flipVertical ? 0 : rh;
|
|
1119
|
-
const snapTransform =
|
|
1120
|
-
const hit =
|
|
1119
|
+
const snapTransform = chunk2C2C27ML_cjs.connectorSnapTransform(element, !usePath, offsets.length, strokeWidth);
|
|
1120
|
+
const hit = chunkN5WPJIMK_cjs.createSvgEl(doc, "path", {
|
|
1121
1121
|
class: "pptxv-connector-hit",
|
|
1122
1122
|
d: pathData ?? `M${x1},${y1} L${x2},${y2}`,
|
|
1123
1123
|
fill: "none",
|
|
1124
1124
|
stroke: "transparent",
|
|
1125
|
-
"stroke-width":
|
|
1125
|
+
"stroke-width": chunk2C2C27ML_cjs.connectorHitStrokeWidth(strokeWidth),
|
|
1126
1126
|
"stroke-linecap": "round",
|
|
1127
1127
|
"stroke-linejoin": "round"
|
|
1128
1128
|
});
|
|
@@ -1150,7 +1150,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1150
1150
|
};
|
|
1151
1151
|
let node;
|
|
1152
1152
|
if (paintD !== void 0) {
|
|
1153
|
-
node =
|
|
1153
|
+
node = chunkN5WPJIMK_cjs.createSvgEl(doc, "path", {
|
|
1154
1154
|
d: paintD,
|
|
1155
1155
|
fill: "none",
|
|
1156
1156
|
"stroke-linejoin": "round",
|
|
@@ -1160,7 +1160,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1160
1160
|
node.style.transform = `translate(0, ${offset}px)`;
|
|
1161
1161
|
}
|
|
1162
1162
|
} else {
|
|
1163
|
-
node =
|
|
1163
|
+
node = chunkN5WPJIMK_cjs.createSvgEl(doc, "line", {
|
|
1164
1164
|
x1,
|
|
1165
1165
|
y1: y1 + offset,
|
|
1166
1166
|
x2,
|
|
@@ -1183,7 +1183,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1183
1183
|
if (!pptx.hasTextProperties(element)) {
|
|
1184
1184
|
return;
|
|
1185
1185
|
}
|
|
1186
|
-
const paragraphs =
|
|
1186
|
+
const paragraphs = chunk2C2C27ML_cjs.buildParagraphs(element, context.fieldContext);
|
|
1187
1187
|
if (!paragraphs.some((paragraph) => paragraph.runs.length > 0)) {
|
|
1188
1188
|
return;
|
|
1189
1189
|
}
|
|
@@ -1204,7 +1204,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1204
1204
|
function buildMarker(context, id, arrow, strokeColor, size) {
|
|
1205
1205
|
const doc = context.document;
|
|
1206
1206
|
const shape = chunkHTFYAGHG_cjs.markerPath(arrow, size.width, size.length);
|
|
1207
|
-
const marker =
|
|
1207
|
+
const marker = chunkN5WPJIMK_cjs.createSvgEl(doc, "marker", {
|
|
1208
1208
|
id,
|
|
1209
1209
|
viewBox: "0 0 10 10",
|
|
1210
1210
|
refX: shape.refX,
|
|
@@ -1216,11 +1216,11 @@ function buildMarker(context, id, arrow, strokeColor, size) {
|
|
|
1216
1216
|
preserveAspectRatio: "none"
|
|
1217
1217
|
});
|
|
1218
1218
|
if (shape.shape === "circle") {
|
|
1219
|
-
marker.appendChild(
|
|
1219
|
+
marker.appendChild(chunkN5WPJIMK_cjs.createSvgEl(doc, "circle", { cx: 5, cy: 5, r: 4, fill: strokeColor }));
|
|
1220
1220
|
} else if (shape.strokeOnly) {
|
|
1221
|
-
marker.appendChild(
|
|
1221
|
+
marker.appendChild(chunkN5WPJIMK_cjs.createSvgEl(doc, "path", { d: shape.d, fill: "none", stroke: strokeColor }));
|
|
1222
1222
|
} else {
|
|
1223
|
-
marker.appendChild(
|
|
1223
|
+
marker.appendChild(chunkN5WPJIMK_cjs.createSvgEl(doc, "path", { d: shape.d, fill: strokeColor }));
|
|
1224
1224
|
}
|
|
1225
1225
|
return marker;
|
|
1226
1226
|
}
|
|
@@ -1259,13 +1259,13 @@ function stripAbuttingEdgeBleeds(root) {
|
|
|
1259
1259
|
// src/pptx/dom/elements/ink-stroke-svg.ts
|
|
1260
1260
|
function buildStrokeSvg(doc, view, replay) {
|
|
1261
1261
|
if (view.nibMarks) {
|
|
1262
|
-
const g =
|
|
1262
|
+
const g = chunkN5WPJIMK_cjs.createSvgEl(doc, "g", {
|
|
1263
1263
|
opacity: view.opacity,
|
|
1264
1264
|
...view.blendMode === "multiply" ? { style: "mix-blend-mode: multiply" } : {}
|
|
1265
1265
|
});
|
|
1266
1266
|
for (const m of view.nibMarks) {
|
|
1267
1267
|
g.appendChild(
|
|
1268
|
-
|
|
1268
|
+
chunkN5WPJIMK_cjs.createSvgEl(doc, "ellipse", {
|
|
1269
1269
|
cx: m.cx,
|
|
1270
1270
|
cy: m.cy,
|
|
1271
1271
|
rx: m.rPerp,
|
|
@@ -1278,16 +1278,16 @@ function buildStrokeSvg(doc, view, replay) {
|
|
|
1278
1278
|
return g;
|
|
1279
1279
|
}
|
|
1280
1280
|
if (view.circles) {
|
|
1281
|
-
const g =
|
|
1281
|
+
const g = chunkN5WPJIMK_cjs.createSvgEl(doc, "g", {
|
|
1282
1282
|
opacity: view.opacity,
|
|
1283
1283
|
...view.blendMode === "multiply" ? { style: "mix-blend-mode: multiply" } : {}
|
|
1284
1284
|
});
|
|
1285
1285
|
for (const c of view.circles) {
|
|
1286
|
-
g.appendChild(
|
|
1286
|
+
g.appendChild(chunkN5WPJIMK_cjs.createSvgEl(doc, "circle", { cx: c.cx, cy: c.cy, r: c.r, fill: view.color }));
|
|
1287
1287
|
}
|
|
1288
1288
|
return g;
|
|
1289
1289
|
}
|
|
1290
|
-
const path =
|
|
1290
|
+
const path = chunkN5WPJIMK_cjs.createSvgEl(doc, "path", {
|
|
1291
1291
|
d: view.d,
|
|
1292
1292
|
fill: "none",
|
|
1293
1293
|
stroke: view.color,
|
|
@@ -1315,24 +1315,24 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1315
1315
|
return null;
|
|
1316
1316
|
}
|
|
1317
1317
|
const doc = context.document;
|
|
1318
|
-
const el =
|
|
1318
|
+
const el = chunkN5WPJIMK_cjs.createEl(
|
|
1319
1319
|
doc,
|
|
1320
1320
|
"div",
|
|
1321
1321
|
"pptxv-element pptxv-contentpart",
|
|
1322
|
-
|
|
1322
|
+
chunk2C2C27ML_cjs.getContainerStyle(element, zIndex)
|
|
1323
1323
|
);
|
|
1324
1324
|
el.dataset.elementId = element.id;
|
|
1325
1325
|
const strokes = element.inkStrokes;
|
|
1326
1326
|
if (!strokes || strokes.length === 0) {
|
|
1327
1327
|
el.classList.add("pptxv-placeholder");
|
|
1328
|
-
const label =
|
|
1328
|
+
const label = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-placeholder-label");
|
|
1329
1329
|
label.textContent = context.t("pptx.ink.contentPartFallback");
|
|
1330
1330
|
el.appendChild(label);
|
|
1331
1331
|
return el;
|
|
1332
1332
|
}
|
|
1333
1333
|
const w = Math.max(element.width, 1);
|
|
1334
1334
|
const h = Math.max(element.height, 1);
|
|
1335
|
-
const svg =
|
|
1335
|
+
const svg = chunkN5WPJIMK_cjs.createSvgEl(doc, "svg", {
|
|
1336
1336
|
viewBox: `0 0 ${w} ${h}`,
|
|
1337
1337
|
preserveAspectRatio: "none"
|
|
1338
1338
|
});
|
|
@@ -1340,7 +1340,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1340
1340
|
svg.setAttribute("style", "width:100%;height:100%;pointer-events:none;display:block");
|
|
1341
1341
|
const replayStyles = context.presenting ? chunkNTXHQHCS_cjs.getContentPartReplayStyles(strokes) : [];
|
|
1342
1342
|
if (context.presenting) {
|
|
1343
|
-
const keyframes =
|
|
1343
|
+
const keyframes = chunkN5WPJIMK_cjs.createSvgEl(doc, "style");
|
|
1344
1344
|
keyframes.textContent = chunkNTXHQHCS_cjs.INK_REPLAY_KEYFRAMES;
|
|
1345
1345
|
svg.appendChild(keyframes);
|
|
1346
1346
|
}
|
|
@@ -1352,33 +1352,33 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1352
1352
|
return el;
|
|
1353
1353
|
};
|
|
1354
1354
|
function renderEquations(element, context) {
|
|
1355
|
-
if (!pptx.hasTextProperties(element) || !
|
|
1355
|
+
if (!pptx.hasTextProperties(element) || !chunk2C2C27ML_cjs.isEquationOnlyText(element.textSegments)) {
|
|
1356
1356
|
return null;
|
|
1357
1357
|
}
|
|
1358
1358
|
const equations = (element.textSegments ?? []).filter((segment) => segment.equationXml);
|
|
1359
1359
|
if (equations.length === 0) {
|
|
1360
1360
|
return null;
|
|
1361
1361
|
}
|
|
1362
|
-
const wrapper =
|
|
1362
|
+
const wrapper = chunkN5WPJIMK_cjs.createEl(context.document, "div", "pptxv-equations", chunk2C2C27ML_cjs.buildEquationBlockStyle(getTextBlockStyle(element)));
|
|
1363
1363
|
for (const segment of equations) {
|
|
1364
|
-
const mathml =
|
|
1364
|
+
const mathml = chunk2C2C27ML_cjs.convertOmmlToMathMl(segment.equationXml);
|
|
1365
1365
|
if (!mathml) {
|
|
1366
1366
|
continue;
|
|
1367
1367
|
}
|
|
1368
|
-
const row =
|
|
1368
|
+
const row = chunkN5WPJIMK_cjs.createEl(context.document, "span", "pptxv-equation", {
|
|
1369
1369
|
display: "flex",
|
|
1370
1370
|
alignItems: "center",
|
|
1371
1371
|
justifyContent: "center",
|
|
1372
1372
|
width: "100%"
|
|
1373
1373
|
});
|
|
1374
|
-
const math =
|
|
1374
|
+
const math = chunkN5WPJIMK_cjs.createEl(context.document, "span", "pptxv-equation-math", {
|
|
1375
1375
|
flex: 1,
|
|
1376
1376
|
textAlign: "center"
|
|
1377
1377
|
});
|
|
1378
|
-
math.innerHTML =
|
|
1378
|
+
math.innerHTML = chunk2C2C27ML_cjs.sanitizeMathMl(mathml);
|
|
1379
1379
|
row.appendChild(math);
|
|
1380
1380
|
if (segment.equationNumber) {
|
|
1381
|
-
const number =
|
|
1381
|
+
const number = chunkN5WPJIMK_cjs.createEl(context.document, "span", "pptxv-equation-number", {
|
|
1382
1382
|
whiteSpace: "nowrap"
|
|
1383
1383
|
});
|
|
1384
1384
|
number.textContent = `(${segment.equationNumber})`;
|
|
@@ -1393,7 +1393,7 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1393
1393
|
return null;
|
|
1394
1394
|
}
|
|
1395
1395
|
const fill = chunkHTFYAGHG_cjs.getComputedFillStyle(element)?.backgroundColor;
|
|
1396
|
-
const data =
|
|
1396
|
+
const data = chunk2C2C27ML_cjs.build3DExtrusionData(
|
|
1397
1397
|
element.shapeStyle?.shape3d,
|
|
1398
1398
|
element.shapeStyle?.scene3d,
|
|
1399
1399
|
fill,
|
|
@@ -1403,11 +1403,11 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1403
1403
|
if (!data.hasExtrusion || data.panels.length === 0) {
|
|
1404
1404
|
return null;
|
|
1405
1405
|
}
|
|
1406
|
-
const wrapper =
|
|
1406
|
+
const wrapper = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-extrusion-3d", toCss(data.wrapperStyle));
|
|
1407
1407
|
wrapper.setAttribute("aria-hidden", "true");
|
|
1408
1408
|
for (const panel of data.panels) {
|
|
1409
1409
|
wrapper.appendChild(
|
|
1410
|
-
|
|
1410
|
+
chunkN5WPJIMK_cjs.createEl(
|
|
1411
1411
|
doc,
|
|
1412
1412
|
"div",
|
|
1413
1413
|
`pptxv-extrusion-3d-panel pptxv-extrusion-3d-panel--${panel.side}`,
|
|
@@ -1417,7 +1417,7 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1417
1417
|
}
|
|
1418
1418
|
if (data.materialOverlay) {
|
|
1419
1419
|
wrapper.appendChild(
|
|
1420
|
-
|
|
1420
|
+
chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-extrusion-3d-material", {
|
|
1421
1421
|
position: "absolute",
|
|
1422
1422
|
inset: 0,
|
|
1423
1423
|
backgroundImage: data.materialOverlay,
|
|
@@ -1459,14 +1459,14 @@ function appendOwnReflection(doc, host, element, mediaDataUrls, suppressOwnRefle
|
|
|
1459
1459
|
if (!wrapperStyle) {
|
|
1460
1460
|
return;
|
|
1461
1461
|
}
|
|
1462
|
-
const layer =
|
|
1462
|
+
const layer = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-reflection", { ...wrapperStyle });
|
|
1463
1463
|
layer.setAttribute("aria-hidden", "true");
|
|
1464
1464
|
layer.appendChild(buildReflectionMirrorContent(doc, element, mediaDataUrls, void 0, true));
|
|
1465
1465
|
host.appendChild(layer);
|
|
1466
1466
|
}
|
|
1467
1467
|
function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFill, suppressOwnReflection = false) {
|
|
1468
1468
|
if (element.type === "group") {
|
|
1469
|
-
const wrap =
|
|
1469
|
+
const wrap = chunkN5WPJIMK_cjs.createEl(doc, "div", void 0, {
|
|
1470
1470
|
position: "relative",
|
|
1471
1471
|
width: "100%",
|
|
1472
1472
|
height: "100%",
|
|
@@ -1479,9 +1479,9 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1479
1479
|
if (groupFilterDefs) {
|
|
1480
1480
|
wrap.appendChild(groupFilterDefs);
|
|
1481
1481
|
}
|
|
1482
|
-
const childParentFill =
|
|
1482
|
+
const childParentFill = chunk2C2C27ML_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1483
1483
|
for (const child of element.children ?? []) {
|
|
1484
|
-
const childWrap =
|
|
1484
|
+
const childWrap = chunkN5WPJIMK_cjs.createEl(doc, "div", void 0, chunk2C2C27ML_cjs.getContainerStyle(child, 0));
|
|
1485
1485
|
childWrap.appendChild(
|
|
1486
1486
|
buildReflectionMirrorContent(doc, child, mediaDataUrls, childParentFill)
|
|
1487
1487
|
);
|
|
@@ -1490,12 +1490,12 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1490
1490
|
appendOwnReflection(doc, wrap, element, mediaDataUrls, suppressOwnReflection);
|
|
1491
1491
|
return wrap;
|
|
1492
1492
|
}
|
|
1493
|
-
const box =
|
|
1493
|
+
const box = chunkN5WPJIMK_cjs.createEl(doc, "div", void 0, {
|
|
1494
1494
|
width: "100%",
|
|
1495
1495
|
height: "100%",
|
|
1496
1496
|
...getShapeFillStrokeStyle(element)
|
|
1497
1497
|
});
|
|
1498
|
-
const inheritedFill =
|
|
1498
|
+
const inheritedFill = chunk2C2C27ML_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1499
1499
|
if (inheritedFill) {
|
|
1500
1500
|
applyInheritedFill(box, inheritedFill);
|
|
1501
1501
|
}
|
|
@@ -1520,12 +1520,12 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1520
1520
|
box.appendChild(gradientOutline);
|
|
1521
1521
|
}
|
|
1522
1522
|
if (pptx.isImageLikeElement(element)) {
|
|
1523
|
-
const src =
|
|
1523
|
+
const src = chunk2C2C27ML_cjs.getImageSrc(element, new Map(mediaDataUrls));
|
|
1524
1524
|
if (src) {
|
|
1525
|
-
const img =
|
|
1525
|
+
const img = chunkN5WPJIMK_cjs.createEl(doc, "img", void 0, {
|
|
1526
1526
|
width: "100%",
|
|
1527
1527
|
height: "100%",
|
|
1528
|
-
...
|
|
1528
|
+
...chunk2C2C27ML_cjs.getImageFitStyle(element)
|
|
1529
1529
|
});
|
|
1530
1530
|
img.setAttribute("src", src);
|
|
1531
1531
|
img.setAttribute("alt", "");
|
|
@@ -1535,7 +1535,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1535
1535
|
appendOwnReflection(doc, box, element, mediaDataUrls, suppressOwnReflection);
|
|
1536
1536
|
return box;
|
|
1537
1537
|
}
|
|
1538
|
-
const paragraphs =
|
|
1538
|
+
const paragraphs = chunk2C2C27ML_cjs.buildParagraphs(element);
|
|
1539
1539
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
1540
1540
|
if (hasText) {
|
|
1541
1541
|
box.appendChild(renderTextBlock(doc, paragraphs, getTextBlockStyle(element)));
|
|
@@ -1560,16 +1560,16 @@ function renderShapeFilterDefs(doc, element) {
|
|
|
1560
1560
|
if (effectDefs) {
|
|
1561
1561
|
markups.push(effectDefs.filterMarkup);
|
|
1562
1562
|
}
|
|
1563
|
-
const bevelLighting =
|
|
1563
|
+
const bevelLighting = chunk2C2C27ML_cjs.getBevelLightingSvgFilter(element);
|
|
1564
1564
|
if (bevelLighting) {
|
|
1565
1565
|
markups.push(bevelLighting.filterMarkup);
|
|
1566
1566
|
}
|
|
1567
1567
|
if (markups.length === 0) {
|
|
1568
1568
|
return null;
|
|
1569
1569
|
}
|
|
1570
|
-
const svg =
|
|
1570
|
+
const svg = chunkN5WPJIMK_cjs.createSvgEl(doc, "svg", { width: 0, height: 0, "aria-hidden": "true" });
|
|
1571
1571
|
svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden");
|
|
1572
|
-
const defs =
|
|
1572
|
+
const defs = chunkN5WPJIMK_cjs.createSvgEl(doc, "defs");
|
|
1573
1573
|
defs.innerHTML = markups.join("");
|
|
1574
1574
|
svg.appendChild(defs);
|
|
1575
1575
|
return svg;
|
|
@@ -1582,7 +1582,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1582
1582
|
if (!overlay) {
|
|
1583
1583
|
return null;
|
|
1584
1584
|
}
|
|
1585
|
-
const layer =
|
|
1585
|
+
const layer = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-fill-overlay", {
|
|
1586
1586
|
position: "absolute",
|
|
1587
1587
|
inset: 0,
|
|
1588
1588
|
background: overlay.color,
|
|
@@ -1597,23 +1597,23 @@ function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
|
1597
1597
|
if (!wrapperStyle) {
|
|
1598
1598
|
return null;
|
|
1599
1599
|
}
|
|
1600
|
-
const layer =
|
|
1600
|
+
const layer = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-reflection", { ...wrapperStyle });
|
|
1601
1601
|
layer.setAttribute("aria-hidden", "true");
|
|
1602
1602
|
layer.appendChild(buildReflectionMirrorContent(doc, element, mediaDataUrls, void 0, true));
|
|
1603
1603
|
return layer;
|
|
1604
1604
|
}
|
|
1605
1605
|
function renderHollowHitOutline(doc, element) {
|
|
1606
|
-
const hit =
|
|
1606
|
+
const hit = chunk2C2C27ML_cjs.buildHollowHitOutline(element);
|
|
1607
1607
|
if (!hit) {
|
|
1608
1608
|
return null;
|
|
1609
1609
|
}
|
|
1610
|
-
const svg =
|
|
1610
|
+
const svg = chunkN5WPJIMK_cjs.createSvgEl(doc, "svg", {
|
|
1611
1611
|
"aria-hidden": "true",
|
|
1612
1612
|
viewBox: chunkHTFYAGHG_cjs.strokeOutlineViewBox(element),
|
|
1613
1613
|
preserveAspectRatio: "none"
|
|
1614
1614
|
});
|
|
1615
1615
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
1616
|
-
const path =
|
|
1616
|
+
const path = chunkN5WPJIMK_cjs.createSvgEl(doc, "path", {
|
|
1617
1617
|
d: hit.d,
|
|
1618
1618
|
fill: hit.fill,
|
|
1619
1619
|
stroke: hit.stroke,
|
|
@@ -1622,18 +1622,18 @@ function renderHollowHitOutline(doc, element) {
|
|
|
1622
1622
|
path.setAttribute("style", `pointer-events:${hit.pointerEvents}`);
|
|
1623
1623
|
svg.appendChild(path);
|
|
1624
1624
|
if (hit.textCss) {
|
|
1625
|
-
const style =
|
|
1625
|
+
const style = chunkN5WPJIMK_cjs.createSvgEl(doc, "style", {});
|
|
1626
1626
|
style.textContent = hit.textCss;
|
|
1627
1627
|
svg.appendChild(style);
|
|
1628
1628
|
}
|
|
1629
1629
|
return svg;
|
|
1630
1630
|
}
|
|
1631
1631
|
function renderShapeFillLayer(doc, element) {
|
|
1632
|
-
const layer =
|
|
1632
|
+
const layer = chunk2C2C27ML_cjs.getSilhouetteFillLayer(element);
|
|
1633
1633
|
if (!layer) {
|
|
1634
1634
|
return null;
|
|
1635
1635
|
}
|
|
1636
|
-
const div =
|
|
1636
|
+
const div = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptx-vanilla-silhouette-fill", { ...layer.style });
|
|
1637
1637
|
div.setAttribute("aria-hidden", "true");
|
|
1638
1638
|
return div;
|
|
1639
1639
|
}
|
|
@@ -1642,7 +1642,7 @@ function renderShapeSubpathFillOverlay(doc, element) {
|
|
|
1642
1642
|
if (!overlay) {
|
|
1643
1643
|
return null;
|
|
1644
1644
|
}
|
|
1645
|
-
const svg =
|
|
1645
|
+
const svg = chunkN5WPJIMK_cjs.createSvgEl(doc, "svg", {
|
|
1646
1646
|
class: "pptx-vanilla-subpath-fill",
|
|
1647
1647
|
"aria-hidden": "true",
|
|
1648
1648
|
viewBox: `0 0 ${overlay.viewBoxWidth} ${overlay.viewBoxHeight}`,
|
|
@@ -1653,7 +1653,7 @@ function renderShapeSubpathFillOverlay(doc, element) {
|
|
|
1653
1653
|
svg.setAttribute("data-pptx-silhouette-fill", "");
|
|
1654
1654
|
}
|
|
1655
1655
|
for (const paint of overlay.paints) {
|
|
1656
|
-
const path =
|
|
1656
|
+
const path = chunkN5WPJIMK_cjs.createSvgEl(doc, "path", { d: paint.d, fill: paint.fill, stroke: "none" });
|
|
1657
1657
|
svg.appendChild(path);
|
|
1658
1658
|
}
|
|
1659
1659
|
return svg;
|
|
@@ -1663,7 +1663,7 @@ function renderStrokeOutline(doc, element) {
|
|
|
1663
1663
|
if (!outline) {
|
|
1664
1664
|
return null;
|
|
1665
1665
|
}
|
|
1666
|
-
const svg =
|
|
1666
|
+
const svg = chunkN5WPJIMK_cjs.createSvgEl(doc, "svg", {
|
|
1667
1667
|
class: "pptx-vanilla-gradient-outline",
|
|
1668
1668
|
"data-pptx-outline": "",
|
|
1669
1669
|
"aria-hidden": "true",
|
|
@@ -1672,15 +1672,15 @@ function renderStrokeOutline(doc, element) {
|
|
|
1672
1672
|
});
|
|
1673
1673
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
1674
1674
|
if (outline.paint) {
|
|
1675
|
-
const defs =
|
|
1675
|
+
const defs = chunkN5WPJIMK_cjs.createSvgEl(doc, "defs");
|
|
1676
1676
|
if (chunkHTFYAGHG_cjs.isPatternPaint(outline.paint)) {
|
|
1677
|
-
const pattern =
|
|
1677
|
+
const pattern = chunkN5WPJIMK_cjs.createSvgEl(doc, "pattern", {
|
|
1678
1678
|
id: outline.paint.id,
|
|
1679
1679
|
width: outline.paint.width,
|
|
1680
1680
|
height: outline.paint.height,
|
|
1681
1681
|
patternUnits: "userSpaceOnUse"
|
|
1682
1682
|
});
|
|
1683
|
-
const image =
|
|
1683
|
+
const image = chunkN5WPJIMK_cjs.createSvgEl(doc, "image", {
|
|
1684
1684
|
href: outline.paint.href,
|
|
1685
1685
|
width: outline.paint.width,
|
|
1686
1686
|
height: outline.paint.height
|
|
@@ -1693,7 +1693,7 @@ function renderStrokeOutline(doc, element) {
|
|
|
1693
1693
|
svg.appendChild(defs);
|
|
1694
1694
|
}
|
|
1695
1695
|
for (const strand of outline.strands) {
|
|
1696
|
-
const path =
|
|
1696
|
+
const path = chunkN5WPJIMK_cjs.createSvgEl(doc, "path", {
|
|
1697
1697
|
d: strand.d ?? outline.d,
|
|
1698
1698
|
fill: "none",
|
|
1699
1699
|
stroke: outline.stroke,
|
|
@@ -1714,7 +1714,7 @@ function renderStrokeOutline(doc, element) {
|
|
|
1714
1714
|
svg.appendChild(path);
|
|
1715
1715
|
}
|
|
1716
1716
|
if (outline.markers) {
|
|
1717
|
-
const defs =
|
|
1717
|
+
const defs = chunkN5WPJIMK_cjs.createSvgEl(doc, "defs");
|
|
1718
1718
|
defs.innerHTML = outline.markers.markup;
|
|
1719
1719
|
svg.prepend(defs);
|
|
1720
1720
|
const path = svg.querySelector(":scope > path");
|
|
@@ -1750,14 +1750,14 @@ function indexRenderedNodes(root) {
|
|
|
1750
1750
|
return byId;
|
|
1751
1751
|
}
|
|
1752
1752
|
function paintInheritedFill(node, element, parentGroupFill) {
|
|
1753
|
-
const inherited =
|
|
1753
|
+
const inherited = chunk2C2C27ML_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1754
1754
|
if (inherited) {
|
|
1755
1755
|
applyGroupChildFill(node, inherited);
|
|
1756
1756
|
}
|
|
1757
1757
|
if (element.type !== "group") {
|
|
1758
1758
|
return;
|
|
1759
1759
|
}
|
|
1760
|
-
const childFill =
|
|
1760
|
+
const childFill = chunk2C2C27ML_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1761
1761
|
if (!childFill) {
|
|
1762
1762
|
return;
|
|
1763
1763
|
}
|
|
@@ -1770,8 +1770,8 @@ function paintInheritedFill(node, element, parentGroupFill) {
|
|
|
1770
1770
|
}
|
|
1771
1771
|
}
|
|
1772
1772
|
var renderGroupElement = (element, zIndex, context) => {
|
|
1773
|
-
const el =
|
|
1774
|
-
...
|
|
1773
|
+
const el = chunkN5WPJIMK_cjs.createEl(context.document, "div", "pptxv-element pptxv-group", {
|
|
1774
|
+
...chunk2C2C27ML_cjs.getContainerStyle(element, zIndex),
|
|
1775
1775
|
// A group paints no fill/outline of its own, but `p:grpSpPr/a:effectLst`
|
|
1776
1776
|
// DOES carry a shadow/glow/soft-edge for the group's own composite
|
|
1777
1777
|
// raster (see shared `getComputedEffectStyle`), expressed as `filter` /
|
|
@@ -1788,7 +1788,7 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1788
1788
|
el.appendChild(reflection);
|
|
1789
1789
|
}
|
|
1790
1790
|
if (element.type === "group" && element.children?.length) {
|
|
1791
|
-
const parentGroupFill =
|
|
1791
|
+
const parentGroupFill = chunk2C2C27ML_cjs.getGroupChildParentFill(element);
|
|
1792
1792
|
element.children.forEach((child, index) => {
|
|
1793
1793
|
const childEl = context.renderElement(child, index);
|
|
1794
1794
|
if (childEl) {
|
|
@@ -1803,20 +1803,20 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1803
1803
|
// src/pptx/dom/elements/image.ts
|
|
1804
1804
|
var renderImageElement = (element, zIndex, context) => {
|
|
1805
1805
|
const doc = context.document;
|
|
1806
|
-
const geometry = element.type === "image" || element.type === "picture" ?
|
|
1806
|
+
const geometry = element.type === "image" || element.type === "picture" ? chunk2C2C27ML_cjs.resolveShapeGeometry(element) : void 0;
|
|
1807
1807
|
const geometryClipPath = geometry?.kind === "clipPath" ? geometry.clipPath : void 0;
|
|
1808
|
-
const cropShapeClipPath = element.type === "image" || element.type === "picture" ?
|
|
1809
|
-
const layers =
|
|
1810
|
-
overflow:
|
|
1808
|
+
const cropShapeClipPath = element.type === "image" || element.type === "picture" ? chunk2C2C27ML_cjs.getCropShapeClipPath(element.cropShape, element.width, element.height) : void 0;
|
|
1809
|
+
const layers = chunk2C2C27ML_cjs.getPictureFrameLayers(element, {
|
|
1810
|
+
overflow: chunk2C2C27ML_cjs.getImageOverflow(element),
|
|
1811
1811
|
borderRadius: geometry?.kind === "borderRadius" ? geometry.radius : void 0,
|
|
1812
1812
|
clipPath: geometryClipPath ?? cropShapeClipPath
|
|
1813
1813
|
});
|
|
1814
|
-
const el =
|
|
1815
|
-
...
|
|
1814
|
+
const el = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-element pptxv-image", {
|
|
1815
|
+
...chunk2C2C27ML_cjs.getContainerStyle(element, zIndex),
|
|
1816
1816
|
...layers.box
|
|
1817
1817
|
});
|
|
1818
1818
|
el.dataset.elementId = element.id;
|
|
1819
|
-
const surface = layers.surface ?
|
|
1819
|
+
const surface = layers.surface ? chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-image-surface", layers.surface) : el;
|
|
1820
1820
|
if (surface !== el) {
|
|
1821
1821
|
el.appendChild(surface);
|
|
1822
1822
|
const outline = renderStrokeOutline(doc, element);
|
|
@@ -1824,36 +1824,36 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1824
1824
|
el.appendChild(outline);
|
|
1825
1825
|
}
|
|
1826
1826
|
}
|
|
1827
|
-
const src =
|
|
1827
|
+
const src = chunk2C2C27ML_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
1828
1828
|
if (!src) {
|
|
1829
1829
|
return el;
|
|
1830
1830
|
}
|
|
1831
|
-
const fx =
|
|
1831
|
+
const fx = chunk2C2C27ML_cjs.getComputedImageStyle(element);
|
|
1832
1832
|
for (const f of fx.svgFilters) {
|
|
1833
|
-
const svg =
|
|
1833
|
+
const svg = chunkN5WPJIMK_cjs.createSvgEl(doc, "svg", { width: 0, height: 0, "aria-hidden": "true" });
|
|
1834
1834
|
svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden");
|
|
1835
|
-
const defs =
|
|
1836
|
-
const filter =
|
|
1837
|
-
|
|
1835
|
+
const defs = chunkN5WPJIMK_cjs.createSvgEl(doc, "defs");
|
|
1836
|
+
const filter = chunkN5WPJIMK_cjs.createSvgEl(doc, "filter");
|
|
1837
|
+
chunkN5WPJIMK_cjs.setSvgAttrs(filter, { id: f.id, "color-interpolation-filters": "sRGB" });
|
|
1838
1838
|
filter.innerHTML = f.markup;
|
|
1839
1839
|
defs.appendChild(filter);
|
|
1840
1840
|
svg.appendChild(defs);
|
|
1841
1841
|
surface.appendChild(svg);
|
|
1842
1842
|
}
|
|
1843
1843
|
const reflection = renderReflectionOverlay(doc, element, context.mediaDataUrls);
|
|
1844
|
-
const tiling =
|
|
1844
|
+
const tiling = chunk2C2C27ML_cjs.getImageTilingStyle(element, chunk2C2C27ML_cjs.getCachedNativeImageSize(src));
|
|
1845
1845
|
if (tiling) {
|
|
1846
|
-
const tile =
|
|
1846
|
+
const tile = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-image-tile", tiling);
|
|
1847
1847
|
if (fx.filter) {
|
|
1848
1848
|
tile.style.filter = fx.filter;
|
|
1849
1849
|
}
|
|
1850
1850
|
if (fx.opacity !== void 0) {
|
|
1851
1851
|
tile.style.opacity = String(fx.opacity);
|
|
1852
1852
|
}
|
|
1853
|
-
if (!
|
|
1854
|
-
void
|
|
1853
|
+
if (!chunk2C2C27ML_cjs.getCachedNativeImageSize(src)) {
|
|
1854
|
+
void chunk2C2C27ML_cjs.probeNativeImageSize(src).then((size) => {
|
|
1855
1855
|
if (size) {
|
|
1856
|
-
|
|
1856
|
+
chunkN5WPJIMK_cjs.applyStyleMap(tile, chunk2C2C27ML_cjs.getImageTilingStyle(element, size) ?? {});
|
|
1857
1857
|
}
|
|
1858
1858
|
return void 0;
|
|
1859
1859
|
});
|
|
@@ -1864,9 +1864,9 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1864
1864
|
}
|
|
1865
1865
|
return el;
|
|
1866
1866
|
}
|
|
1867
|
-
const fit =
|
|
1868
|
-
const fillCounterTransform =
|
|
1869
|
-
const img =
|
|
1867
|
+
const fit = chunk2C2C27ML_cjs.getImageFitStyle(element);
|
|
1868
|
+
const fillCounterTransform = chunk2C2C27ML_cjs.getImageFillCounterTransform(element, Boolean(fit.transform));
|
|
1869
|
+
const img = chunkN5WPJIMK_cjs.createEl(doc, "img", void 0, {
|
|
1870
1870
|
...fit,
|
|
1871
1871
|
display: "block",
|
|
1872
1872
|
...fillCounterTransform ? { transform: fillCounterTransform, transformOrigin: "center" } : {}
|
|
@@ -1884,17 +1884,17 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1884
1884
|
if (element.type === "image" || element.type === "picture") {
|
|
1885
1885
|
const clrChange = element.imageEffects?.clrChange;
|
|
1886
1886
|
if (clrChange) {
|
|
1887
|
-
void
|
|
1887
|
+
void chunk2C2C27ML_cjs.resolveColorChangedImageSource(src, clrChange).then((resolved) => {
|
|
1888
1888
|
if (img.src === src || img.getAttribute("src") === src) {
|
|
1889
1889
|
img.src = resolved;
|
|
1890
1890
|
}
|
|
1891
1891
|
return void 0;
|
|
1892
1892
|
});
|
|
1893
1893
|
}
|
|
1894
|
-
const wash =
|
|
1894
|
+
const wash = chunk2C2C27ML_cjs.getImageColorWashStyle(element.imageEffects?.colorWash);
|
|
1895
1895
|
if (wash) {
|
|
1896
1896
|
surface.appendChild(
|
|
1897
|
-
|
|
1897
|
+
chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-image-color-wash", {
|
|
1898
1898
|
position: "absolute",
|
|
1899
1899
|
inset: "0",
|
|
1900
1900
|
pointerEvents: "none",
|
|
@@ -1916,11 +1916,11 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1916
1916
|
return null;
|
|
1917
1917
|
}
|
|
1918
1918
|
const doc = context.document;
|
|
1919
|
-
const wrapper =
|
|
1919
|
+
const wrapper = chunkN5WPJIMK_cjs.createEl(
|
|
1920
1920
|
doc,
|
|
1921
1921
|
"div",
|
|
1922
1922
|
"pptxv-element pptxv-ink",
|
|
1923
|
-
|
|
1923
|
+
chunk2C2C27ML_cjs.getContainerStyle(element, zIndex)
|
|
1924
1924
|
);
|
|
1925
1925
|
wrapper.dataset.elementId = element.id;
|
|
1926
1926
|
const paths = element.inkPaths;
|
|
@@ -1929,7 +1929,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1929
1929
|
}
|
|
1930
1930
|
const w = Math.max(element.width, 1);
|
|
1931
1931
|
const h = Math.max(element.height, 1);
|
|
1932
|
-
const svg =
|
|
1932
|
+
const svg = chunkN5WPJIMK_cjs.createSvgEl(doc, "svg", {
|
|
1933
1933
|
viewBox: `0 0 ${w} ${h}`,
|
|
1934
1934
|
preserveAspectRatio: "none"
|
|
1935
1935
|
});
|
|
@@ -1937,11 +1937,11 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
1937
1937
|
svg.setAttribute("style", "width:100%;height:100%;pointer-events:none;display:block");
|
|
1938
1938
|
const replayStyles = context.presenting ? chunkNTXHQHCS_cjs.getInkReplayStyles(element) : [];
|
|
1939
1939
|
if (context.presenting) {
|
|
1940
|
-
const keyframes =
|
|
1940
|
+
const keyframes = chunkN5WPJIMK_cjs.createSvgEl(doc, "style");
|
|
1941
1941
|
keyframes.textContent = chunkNTXHQHCS_cjs.INK_REPLAY_KEYFRAMES;
|
|
1942
1942
|
svg.appendChild(keyframes);
|
|
1943
1943
|
}
|
|
1944
|
-
const views =
|
|
1944
|
+
const views = chunk2C2C27ML_cjs.buildInkGroupStrokes(element, { color: chunkHTFYAGHG_cjs.DEFAULT_STROKE_COLOR, width: 1 });
|
|
1945
1945
|
for (const [i, view] of views.entries()) {
|
|
1946
1946
|
svg.appendChild(buildStrokeSvg(doc, view, replayStyles[i]));
|
|
1947
1947
|
}
|
|
@@ -1964,7 +1964,7 @@ function mediaFullscreenResetStyle(baseStyle) {
|
|
|
1964
1964
|
};
|
|
1965
1965
|
}
|
|
1966
1966
|
function buildFullscreenStopButton(doc, label, onStop) {
|
|
1967
|
-
const button =
|
|
1967
|
+
const button = chunkN5WPJIMK_cjs.createEl(doc, "button", "pptxv-media-fullscreen-stop", {
|
|
1968
1968
|
position: "absolute",
|
|
1969
1969
|
bottom: "12px",
|
|
1970
1970
|
right: "12px",
|
|
@@ -1980,14 +1980,14 @@ function buildFullscreenStopButton(doc, label, onStop) {
|
|
|
1980
1980
|
button.type = "button";
|
|
1981
1981
|
button.setAttribute("aria-label", label);
|
|
1982
1982
|
button.addEventListener("click", onStop);
|
|
1983
|
-
const icon =
|
|
1983
|
+
const icon = chunkN5WPJIMK_cjs.createSvgEl(doc, "svg", {
|
|
1984
1984
|
width: 18,
|
|
1985
1985
|
height: 18,
|
|
1986
1986
|
viewBox: "0 0 24 24",
|
|
1987
1987
|
fill: "currentColor",
|
|
1988
1988
|
stroke: "none"
|
|
1989
1989
|
});
|
|
1990
|
-
icon.appendChild(
|
|
1990
|
+
icon.appendChild(chunkN5WPJIMK_cjs.createSvgEl(doc, "rect", { x: 6, y: 6, width: 12, height: 12, rx: 1 }));
|
|
1991
1991
|
button.appendChild(icon);
|
|
1992
1992
|
return button;
|
|
1993
1993
|
}
|
|
@@ -1995,12 +1995,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
1995
1995
|
let stopButton = null;
|
|
1996
1996
|
const update = (playing) => {
|
|
1997
1997
|
const input = { fullScreen: element.fullScreen, presenting: context.presenting, playing };
|
|
1998
|
-
const active =
|
|
1999
|
-
|
|
1998
|
+
const active = chunk2C2C27ML_cjs.isMediaFullscreenActive(input);
|
|
1999
|
+
chunkN5WPJIMK_cjs.applyStyleMap(
|
|
2000
2000
|
container,
|
|
2001
|
-
active ?
|
|
2001
|
+
active ? chunk2C2C27ML_cjs.MEDIA_FULLSCREEN_OVERLAY_STYLE : mediaFullscreenResetStyle(baseStyle)
|
|
2002
2002
|
);
|
|
2003
|
-
if (
|
|
2003
|
+
if (chunk2C2C27ML_cjs.shouldShowMediaFullscreenStopButton(input)) {
|
|
2004
2004
|
if (!stopButton) {
|
|
2005
2005
|
stopButton = buildFullscreenStopButton(
|
|
2006
2006
|
doc,
|
|
@@ -2025,12 +2025,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2025
2025
|
|
|
2026
2026
|
// src/pptx/dom/elements/media.ts
|
|
2027
2027
|
function applyMediaPresentingState(el, presenting, playback) {
|
|
2028
|
-
|
|
2028
|
+
chunk2C2C27ML_cjs.applyMediaPlaybackAttributes(el, playback);
|
|
2029
2029
|
if (presenting) {
|
|
2030
|
-
|
|
2031
|
-
|
|
2030
|
+
chunk2C2C27ML_cjs.startMediaAutoplay(el, { trimStartMs: playback.trimStartMs });
|
|
2031
|
+
chunk2C2C27ML_cjs.scheduleMediaTrimAndFade(el, {
|
|
2032
2032
|
...playback,
|
|
2033
|
-
volume:
|
|
2033
|
+
volume: chunk2C2C27ML_cjs.mediaPlaybackAttributes(playback).volume
|
|
2034
2034
|
});
|
|
2035
2035
|
} else if (!el.paused) {
|
|
2036
2036
|
el.pause();
|
|
@@ -2040,31 +2040,31 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2040
2040
|
if (element.type !== "media") {
|
|
2041
2041
|
return null;
|
|
2042
2042
|
}
|
|
2043
|
-
const surface =
|
|
2043
|
+
const surface = chunk2C2C27ML_cjs.mediaSurfaceOf({
|
|
2044
2044
|
interactive: context.interactive === true || context.reading === true,
|
|
2045
2045
|
presenting: context.presenting
|
|
2046
2046
|
});
|
|
2047
|
-
const showTransport =
|
|
2047
|
+
const showTransport = chunk2C2C27ML_cjs.mediaTransportVisible({
|
|
2048
2048
|
...surface,
|
|
2049
2049
|
canvasTransport: context.reading === true
|
|
2050
2050
|
});
|
|
2051
2051
|
const attachAuthoringBar = (host, media) => {
|
|
2052
|
-
if (
|
|
2053
|
-
|
|
2052
|
+
if (chunk2C2C27ML_cjs.mediaControlBarEnabled({ ...surface, reading: context.reading === true })) {
|
|
2053
|
+
chunk2C2C27ML_cjs.attachMediaControlBar(host, media, {
|
|
2054
2054
|
t: context.t,
|
|
2055
2055
|
selected: context.selectedElementIds?.has(element.id) === true
|
|
2056
2056
|
});
|
|
2057
2057
|
}
|
|
2058
2058
|
};
|
|
2059
2059
|
const doc = context.document;
|
|
2060
|
-
const baseStyle =
|
|
2061
|
-
const el =
|
|
2060
|
+
const baseStyle = chunk2C2C27ML_cjs.getContainerStyle(element, zIndex);
|
|
2061
|
+
const el = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-element pptxv-media", baseStyle);
|
|
2062
2062
|
el.dataset.elementId = element.id;
|
|
2063
2063
|
const mediaSrc = element.mediaData ?? (element.mediaPath ? context.mediaDataUrls.get(element.mediaPath) : void 0);
|
|
2064
|
-
const posterSrc =
|
|
2065
|
-
const onlineVideoEmbedUrl =
|
|
2064
|
+
const posterSrc = chunk2C2C27ML_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
2065
|
+
const onlineVideoEmbedUrl = chunk2C2C27ML_cjs.getOnlineVideoEmbed(element)?.embedUrl;
|
|
2066
2066
|
if (onlineVideoEmbedUrl && element.mediaType === "video") {
|
|
2067
|
-
const iframe =
|
|
2067
|
+
const iframe = chunkN5WPJIMK_cjs.createEl(doc, "iframe", "pptxv-media-video pptxv-media-iframe", {
|
|
2068
2068
|
width: "100%",
|
|
2069
2069
|
height: "100%",
|
|
2070
2070
|
border: "0",
|
|
@@ -2072,14 +2072,14 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2072
2072
|
});
|
|
2073
2073
|
iframe.src = onlineVideoEmbedUrl;
|
|
2074
2074
|
iframe.title = context.t("pptx.media.onlineVideoTitle");
|
|
2075
|
-
iframe.allow =
|
|
2076
|
-
iframe.sandbox.value =
|
|
2075
|
+
iframe.allow = chunk2C2C27ML_cjs.ONLINE_VIDEO_IFRAME_ALLOW;
|
|
2076
|
+
iframe.sandbox.value = chunk2C2C27ML_cjs.ONLINE_VIDEO_IFRAME_SANDBOX;
|
|
2077
2077
|
iframe.allowFullscreen = true;
|
|
2078
2078
|
el.appendChild(iframe);
|
|
2079
2079
|
return el;
|
|
2080
2080
|
}
|
|
2081
2081
|
if (mediaSrc && element.mediaType === "video") {
|
|
2082
|
-
const video =
|
|
2082
|
+
const video = chunkN5WPJIMK_cjs.createEl(doc, "video", "pptxv-media-video", {
|
|
2083
2083
|
width: "100%",
|
|
2084
2084
|
height: "100%",
|
|
2085
2085
|
objectFit: "contain",
|
|
@@ -2099,13 +2099,13 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2099
2099
|
return el;
|
|
2100
2100
|
}
|
|
2101
2101
|
if (mediaSrc && element.mediaType === "audio") {
|
|
2102
|
-
const audio =
|
|
2102
|
+
const audio = chunkN5WPJIMK_cjs.createEl(doc, "audio", "pptxv-media-audio", { width: "100%" });
|
|
2103
2103
|
audio.src = mediaSrc;
|
|
2104
2104
|
audio.controls = showTransport;
|
|
2105
2105
|
el.appendChild(audio);
|
|
2106
|
-
if (context.presenting &&
|
|
2106
|
+
if (context.presenting && chunk2C2C27ML_cjs.registerCrossSlideAudio(element, mediaSrc)) {
|
|
2107
2107
|
audio.muted = true;
|
|
2108
|
-
|
|
2108
|
+
chunk2C2C27ML_cjs.applyMediaPlaybackAttributes(audio, element);
|
|
2109
2109
|
return el;
|
|
2110
2110
|
}
|
|
2111
2111
|
applyMediaPresentingState(audio, context.presenting, element);
|
|
@@ -2113,14 +2113,14 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2113
2113
|
wireMediaFullscreenOverlay(doc, el, audio, element, context, baseStyle);
|
|
2114
2114
|
return el;
|
|
2115
2115
|
}
|
|
2116
|
-
const fallback =
|
|
2116
|
+
const fallback = chunk2C2C27ML_cjs.mediaFallbackVisual(surface, {
|
|
2117
2117
|
hasPoster: Boolean(posterSrc),
|
|
2118
2118
|
missing: element.mediaMissing === true
|
|
2119
2119
|
});
|
|
2120
|
-
const icon =
|
|
2121
|
-
const labelKey =
|
|
2120
|
+
const icon = chunk2C2C27ML_cjs.mediaFallbackIcon(fallback, element.mediaType);
|
|
2121
|
+
const labelKey = chunk2C2C27ML_cjs.mediaFallbackLabelKey(fallback, element.mediaType);
|
|
2122
2122
|
if (fallback.poster && posterSrc) {
|
|
2123
|
-
const img =
|
|
2123
|
+
const img = chunkN5WPJIMK_cjs.createEl(doc, "img", "pptxv-media-poster", {
|
|
2124
2124
|
width: "100%",
|
|
2125
2125
|
height: "100%",
|
|
2126
2126
|
objectFit: "contain",
|
|
@@ -2132,14 +2132,14 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2132
2132
|
img.setAttribute("draggable", "false");
|
|
2133
2133
|
el.appendChild(img);
|
|
2134
2134
|
if (fallback.badge !== "none") {
|
|
2135
|
-
const badge =
|
|
2135
|
+
const badge = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-media-badge");
|
|
2136
2136
|
if (fallback.badge === "missing") {
|
|
2137
2137
|
badge.classList.add("pptxv-media-badge-missing");
|
|
2138
2138
|
}
|
|
2139
|
-
badge.setAttribute(
|
|
2139
|
+
badge.setAttribute(chunk2C2C27ML_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.badge);
|
|
2140
2140
|
badge.appendChild(buildIcon(doc, icon));
|
|
2141
2141
|
if (labelKey !== void 0 && fallback.badge === "missing") {
|
|
2142
|
-
const text =
|
|
2142
|
+
const text = chunkN5WPJIMK_cjs.createEl(doc, "span");
|
|
2143
2143
|
text.textContent = context.t(labelKey);
|
|
2144
2144
|
badge.appendChild(text);
|
|
2145
2145
|
}
|
|
@@ -2149,12 +2149,12 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2149
2149
|
}
|
|
2150
2150
|
if (fallback.placeholder !== "none") {
|
|
2151
2151
|
el.classList.add("pptxv-placeholder", "pptxv-media-placeholder");
|
|
2152
|
-
el.setAttribute(
|
|
2152
|
+
el.setAttribute(chunk2C2C27ML_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.placeholder);
|
|
2153
2153
|
if (icon.length > 0) {
|
|
2154
2154
|
el.appendChild(buildIcon(doc, icon));
|
|
2155
2155
|
}
|
|
2156
2156
|
if (labelKey !== void 0) {
|
|
2157
|
-
const label =
|
|
2157
|
+
const label = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-placeholder-label");
|
|
2158
2158
|
label.textContent = context.t(labelKey);
|
|
2159
2159
|
el.appendChild(label);
|
|
2160
2160
|
}
|
|
@@ -2181,11 +2181,11 @@ var renderModel3dElement = (element, zIndex, context) => {
|
|
|
2181
2181
|
return null;
|
|
2182
2182
|
}
|
|
2183
2183
|
const doc = context.document;
|
|
2184
|
-
const el =
|
|
2184
|
+
const el = chunkN5WPJIMK_cjs.createEl(
|
|
2185
2185
|
doc,
|
|
2186
2186
|
"div",
|
|
2187
2187
|
"pptxv-element pptxv-model3d",
|
|
2188
|
-
|
|
2188
|
+
chunk2C2C27ML_cjs.getContainerStyle(element, zIndex)
|
|
2189
2189
|
);
|
|
2190
2190
|
el.dataset.elementId = element.id;
|
|
2191
2191
|
const label = context.t("pptx.model3d.label");
|
|
@@ -2198,7 +2198,7 @@ var renderModel3dElement = (element, zIndex, context) => {
|
|
|
2198
2198
|
return el;
|
|
2199
2199
|
};
|
|
2200
2200
|
function buildPoster(doc, src, alt) {
|
|
2201
|
-
const img =
|
|
2201
|
+
const img = chunkN5WPJIMK_cjs.createEl(doc, "img", "pptxv-model3d-poster", {
|
|
2202
2202
|
width: "100%",
|
|
2203
2203
|
height: "100%",
|
|
2204
2204
|
objectFit: "contain",
|
|
@@ -2212,7 +2212,7 @@ function buildPoster(doc, src, alt) {
|
|
|
2212
2212
|
return img;
|
|
2213
2213
|
}
|
|
2214
2214
|
function buildPlaceholder(doc, label) {
|
|
2215
|
-
const box =
|
|
2215
|
+
const box = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-model3d-placeholder", {
|
|
2216
2216
|
width: "100%",
|
|
2217
2217
|
height: "100%",
|
|
2218
2218
|
display: "flex",
|
|
@@ -2226,7 +2226,7 @@ function buildPlaceholder(doc, label) {
|
|
|
2226
2226
|
borderRadius: "4px",
|
|
2227
2227
|
boxSizing: "border-box"
|
|
2228
2228
|
});
|
|
2229
|
-
const icon =
|
|
2229
|
+
const icon = chunkN5WPJIMK_cjs.createSvgEl(doc, "svg", {
|
|
2230
2230
|
width: 24,
|
|
2231
2231
|
height: 24,
|
|
2232
2232
|
viewBox: "0 0 24 24",
|
|
@@ -2239,20 +2239,20 @@ function buildPlaceholder(doc, label) {
|
|
|
2239
2239
|
icon.setAttribute("class", "pptxv-model3d-icon");
|
|
2240
2240
|
icon.setAttribute("style", "margin-bottom:4px;color:#d1d5db");
|
|
2241
2241
|
icon.appendChild(
|
|
2242
|
-
|
|
2242
|
+
chunkN5WPJIMK_cjs.createSvgEl(doc, "path", {
|
|
2243
2243
|
d: "M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"
|
|
2244
2244
|
})
|
|
2245
2245
|
);
|
|
2246
|
-
icon.appendChild(
|
|
2247
|
-
icon.appendChild(
|
|
2246
|
+
icon.appendChild(chunkN5WPJIMK_cjs.createSvgEl(doc, "polyline", { points: "3.27 6.96 12 12.01 20.73 6.96" }));
|
|
2247
|
+
icon.appendChild(chunkN5WPJIMK_cjs.createSvgEl(doc, "line", { x1: 12, y1: 22.08, x2: 12, y2: 12 }));
|
|
2248
2248
|
box.appendChild(icon);
|
|
2249
|
-
const text =
|
|
2249
|
+
const text = chunkN5WPJIMK_cjs.createEl(doc, "span", "pptxv-model3d-label");
|
|
2250
2250
|
text.textContent = label;
|
|
2251
2251
|
box.appendChild(text);
|
|
2252
2252
|
return box;
|
|
2253
2253
|
}
|
|
2254
2254
|
function buildViewButton(doc, root, poster, element, context) {
|
|
2255
|
-
const button =
|
|
2255
|
+
const button = chunkN5WPJIMK_cjs.createEl(doc, "button", "pptxv-model3d-view", {
|
|
2256
2256
|
position: "absolute",
|
|
2257
2257
|
bottom: "4px",
|
|
2258
2258
|
right: "4px",
|
|
@@ -2287,7 +2287,7 @@ function buildViewButton(doc, root, poster, element, context) {
|
|
|
2287
2287
|
button.remove();
|
|
2288
2288
|
return;
|
|
2289
2289
|
}
|
|
2290
|
-
const sceneHost =
|
|
2290
|
+
const sceneHost = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-model3d-scene", {
|
|
2291
2291
|
position: "absolute",
|
|
2292
2292
|
inset: 0,
|
|
2293
2293
|
willChange: "transform"
|
|
@@ -2315,15 +2315,15 @@ function buildViewButton(doc, root, poster, element, context) {
|
|
|
2315
2315
|
|
|
2316
2316
|
// src/pptx/dom/elements/ole-icons.ts
|
|
2317
2317
|
function buildOleIcon(doc, type, color) {
|
|
2318
|
-
const svg =
|
|
2318
|
+
const svg = chunkN5WPJIMK_cjs.createSvgEl(doc, "svg", {
|
|
2319
2319
|
width: 36,
|
|
2320
2320
|
height: 36,
|
|
2321
2321
|
viewBox: "0 0 24 24",
|
|
2322
2322
|
fill: "none",
|
|
2323
2323
|
"aria-hidden": "true"
|
|
2324
2324
|
});
|
|
2325
|
-
for (const shape of
|
|
2326
|
-
const node =
|
|
2325
|
+
for (const shape of chunk2C2C27ML_cjs.getOleIconShapes(type)) {
|
|
2326
|
+
const node = chunkN5WPJIMK_cjs.createSvgEl(doc, shape.tag, shape.attrs);
|
|
2327
2327
|
if (shape.tag === "text") {
|
|
2328
2328
|
node.setAttribute("fill", color);
|
|
2329
2329
|
node.textContent = shape.text ?? "";
|
|
@@ -2341,21 +2341,21 @@ var renderOleElement = (element, zIndex, context) => {
|
|
|
2341
2341
|
return null;
|
|
2342
2342
|
}
|
|
2343
2343
|
const doc = context.document;
|
|
2344
|
-
const oleType =
|
|
2345
|
-
const typeColor =
|
|
2346
|
-
const typeLabel =
|
|
2347
|
-
const el =
|
|
2344
|
+
const oleType = chunk2C2C27ML_cjs.resolveOleType(element);
|
|
2345
|
+
const typeColor = chunk2C2C27ML_cjs.getOleTypeColor(oleType);
|
|
2346
|
+
const typeLabel = chunk2C2C27ML_cjs.getOleTypeLabel(oleType);
|
|
2347
|
+
const el = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-element pptxv-ole", chunk2C2C27ML_cjs.getContainerStyle(element, zIndex));
|
|
2348
2348
|
el.dataset.elementId = element.id;
|
|
2349
2349
|
el.setAttribute("role", "group");
|
|
2350
|
-
el.setAttribute("aria-label",
|
|
2350
|
+
el.setAttribute("aria-label", chunk2C2C27ML_cjs.getOleAriaLabel(element));
|
|
2351
2351
|
el.title = infoLines(element, typeLabel).join("\n");
|
|
2352
2352
|
if (element.previewImageData) {
|
|
2353
|
-
el.appendChild(buildPreview(doc, element, typeColor,
|
|
2353
|
+
el.appendChild(buildPreview(doc, element, typeColor, chunk2C2C27ML_cjs.getOleBadgeLabel(oleType)));
|
|
2354
2354
|
} else {
|
|
2355
2355
|
el.appendChild(buildPlaceholder2(doc, element, oleType, typeColor, typeLabel));
|
|
2356
2356
|
}
|
|
2357
|
-
const showActions =
|
|
2358
|
-
|
|
2357
|
+
const showActions = chunk2C2C27ML_cjs.oleActionsVisible(
|
|
2358
|
+
chunk2C2C27ML_cjs.mediaSurfaceOf({
|
|
2359
2359
|
interactive: context.interactive === true,
|
|
2360
2360
|
presenting: context.presenting
|
|
2361
2361
|
})
|
|
@@ -2389,7 +2389,7 @@ function infoLines(el, typeLabel) {
|
|
|
2389
2389
|
if (name) {
|
|
2390
2390
|
lines.push(name);
|
|
2391
2391
|
}
|
|
2392
|
-
const size =
|
|
2392
|
+
const size = chunk2C2C27ML_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2393
2393
|
if (size) {
|
|
2394
2394
|
lines.push(size);
|
|
2395
2395
|
}
|
|
@@ -2399,12 +2399,12 @@ function infoLines(el, typeLabel) {
|
|
|
2399
2399
|
return lines;
|
|
2400
2400
|
}
|
|
2401
2401
|
function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
2402
|
-
const preview =
|
|
2402
|
+
const preview = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-ole-preview", {
|
|
2403
2403
|
position: "relative",
|
|
2404
2404
|
width: "100%",
|
|
2405
2405
|
height: "100%"
|
|
2406
2406
|
});
|
|
2407
|
-
const img =
|
|
2407
|
+
const img = chunkN5WPJIMK_cjs.createEl(doc, "img", "pptxv-ole-img", {
|
|
2408
2408
|
width: "100%",
|
|
2409
2409
|
height: "100%",
|
|
2410
2410
|
objectFit: "contain",
|
|
@@ -2413,19 +2413,19 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2413
2413
|
display: "block"
|
|
2414
2414
|
});
|
|
2415
2415
|
img.src = el.previewImageData ?? "";
|
|
2416
|
-
img.alt =
|
|
2416
|
+
img.alt = chunk2C2C27ML_cjs.getOleAriaLabel(el);
|
|
2417
2417
|
img.draggable = false;
|
|
2418
2418
|
preview.appendChild(img);
|
|
2419
|
-
const badge =
|
|
2419
|
+
const badge = chunkN5WPJIMK_cjs.createSvgEl(doc, "svg", { width: 24, height: 24, viewBox: "0 0 24 24" });
|
|
2420
2420
|
badge.setAttribute("class", "pptxv-ole-badge");
|
|
2421
2421
|
badge.setAttribute(
|
|
2422
2422
|
"style",
|
|
2423
2423
|
"position:absolute;bottom:4px;right:4px;z-index:10;pointer-events:none"
|
|
2424
2424
|
);
|
|
2425
2425
|
badge.appendChild(
|
|
2426
|
-
|
|
2426
|
+
chunkN5WPJIMK_cjs.createSvgEl(doc, "rect", { x: 2, y: 2, width: 20, height: 20, rx: 3, fill: typeColor })
|
|
2427
2427
|
);
|
|
2428
|
-
const badgeText =
|
|
2428
|
+
const badgeText = chunkN5WPJIMK_cjs.createSvgEl(doc, "text", {
|
|
2429
2429
|
x: 12,
|
|
2430
2430
|
y: 16,
|
|
2431
2431
|
"text-anchor": "middle",
|
|
@@ -2439,8 +2439,8 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2439
2439
|
return preview;
|
|
2440
2440
|
}
|
|
2441
2441
|
function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
2442
|
-
const box =
|
|
2443
|
-
...
|
|
2442
|
+
const box = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-ole-placeholder", {
|
|
2443
|
+
...chunk2C2C27ML_cjs.getPlaceholderStyle(oleType),
|
|
2444
2444
|
width: "100%",
|
|
2445
2445
|
height: "100%",
|
|
2446
2446
|
display: "flex",
|
|
@@ -2451,7 +2451,7 @@ function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
|
2451
2451
|
boxSizing: "border-box"
|
|
2452
2452
|
});
|
|
2453
2453
|
box.appendChild(buildOleIcon(doc, oleType, typeColor));
|
|
2454
|
-
const name =
|
|
2454
|
+
const name = chunkN5WPJIMK_cjs.createEl(doc, "span", "pptxv-ole-name", {
|
|
2455
2455
|
marginTop: "8px",
|
|
2456
2456
|
fontSize: "12px",
|
|
2457
2457
|
fontWeight: 500,
|
|
@@ -2461,10 +2461,10 @@ function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
|
2461
2461
|
whiteSpace: "nowrap",
|
|
2462
2462
|
color: typeColor
|
|
2463
2463
|
});
|
|
2464
|
-
name.textContent =
|
|
2464
|
+
name.textContent = chunk2C2C27ML_cjs.getOleDisplayName(el);
|
|
2465
2465
|
box.appendChild(name);
|
|
2466
2466
|
if (el.fileName) {
|
|
2467
|
-
const sublabel =
|
|
2467
|
+
const sublabel = chunkN5WPJIMK_cjs.createEl(doc, "span", "pptxv-ole-sublabel", {
|
|
2468
2468
|
marginTop: "2px",
|
|
2469
2469
|
fontSize: "10px",
|
|
2470
2470
|
color: "rgba(0,0,0,0.45)",
|
|
@@ -2494,7 +2494,7 @@ var ACTION_STYLE = {
|
|
|
2494
2494
|
function buildActionBar(doc, el, typeLabel, context) {
|
|
2495
2495
|
const data = el.oleEmbeddedData ?? "";
|
|
2496
2496
|
const downloadName = el.oleEmbeddedFileName ?? el.fileName ?? typeLabel;
|
|
2497
|
-
const bar =
|
|
2497
|
+
const bar = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-ole-actions", {
|
|
2498
2498
|
position: "absolute",
|
|
2499
2499
|
left: 0,
|
|
2500
2500
|
right: 0,
|
|
@@ -2513,9 +2513,9 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2513
2513
|
for (const type of ["pointerdown", "mousedown", "click"]) {
|
|
2514
2514
|
bar.addEventListener(type, (event) => event.stopPropagation());
|
|
2515
2515
|
}
|
|
2516
|
-
const size =
|
|
2516
|
+
const size = chunk2C2C27ML_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2517
2517
|
if (size) {
|
|
2518
|
-
const meta =
|
|
2518
|
+
const meta = chunkN5WPJIMK_cjs.createEl(doc, "span", "pptxv-ole-meta", {
|
|
2519
2519
|
marginRight: "auto",
|
|
2520
2520
|
color: "rgba(0,0,0,0.55)",
|
|
2521
2521
|
overflow: "hidden",
|
|
@@ -2525,7 +2525,7 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2525
2525
|
meta.textContent = size;
|
|
2526
2526
|
bar.appendChild(meta);
|
|
2527
2527
|
}
|
|
2528
|
-
const download =
|
|
2528
|
+
const download = chunkN5WPJIMK_cjs.createEl(doc, "a", "pptxv-ole-action", ACTION_STYLE);
|
|
2529
2529
|
download.href = data;
|
|
2530
2530
|
download.download = downloadName;
|
|
2531
2531
|
const downloadTitle = context.t("pptx.ole.downloadName", { name: downloadName });
|
|
@@ -2533,14 +2533,14 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2533
2533
|
download.title = downloadTitle;
|
|
2534
2534
|
download.textContent = context.t("pptx.ole.download");
|
|
2535
2535
|
bar.appendChild(download);
|
|
2536
|
-
if (
|
|
2537
|
-
const open =
|
|
2536
|
+
if (chunk2C2C27ML_cjs.isBrowserOpenableMime(el.oleEmbeddedMimeType)) {
|
|
2537
|
+
const open = chunkN5WPJIMK_cjs.createEl(doc, "button", "pptxv-ole-action", ACTION_STYLE);
|
|
2538
2538
|
open.type = "button";
|
|
2539
2539
|
const openTitle = context.t("pptx.ole.openName", { name: downloadName });
|
|
2540
2540
|
open.setAttribute("aria-label", openTitle);
|
|
2541
2541
|
open.title = openTitle;
|
|
2542
2542
|
open.textContent = context.t("pptx.ole.open");
|
|
2543
|
-
open.addEventListener("click", () =>
|
|
2543
|
+
open.addEventListener("click", () => chunk2C2C27ML_cjs.openUrlInNewTab(data));
|
|
2544
2544
|
bar.appendChild(open);
|
|
2545
2545
|
}
|
|
2546
2546
|
return bar;
|
|
@@ -2548,15 +2548,15 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2548
2548
|
|
|
2549
2549
|
// src/pptx/dom/elements/placeholder.ts
|
|
2550
2550
|
var renderPlaceholderElement = (element, zIndex, context) => {
|
|
2551
|
-
const el =
|
|
2551
|
+
const el = chunkN5WPJIMK_cjs.createEl(
|
|
2552
2552
|
context.document,
|
|
2553
2553
|
"div",
|
|
2554
2554
|
"pptxv-element pptxv-placeholder",
|
|
2555
|
-
|
|
2555
|
+
chunk2C2C27ML_cjs.getContainerStyle(element, zIndex)
|
|
2556
2556
|
);
|
|
2557
2557
|
el.dataset.elementId = element.id;
|
|
2558
2558
|
el.dataset.elementType = element.type;
|
|
2559
|
-
const label =
|
|
2559
|
+
const label = chunkN5WPJIMK_cjs.createEl(context.document, "div", "pptxv-placeholder-label");
|
|
2560
2560
|
label.textContent = chunkUFJBHFSD_cjs.keyToLabel(element.type);
|
|
2561
2561
|
el.appendChild(label);
|
|
2562
2562
|
return el;
|
|
@@ -2568,7 +2568,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2568
2568
|
return null;
|
|
2569
2569
|
}
|
|
2570
2570
|
const doc = context.document;
|
|
2571
|
-
const summaryView =
|
|
2571
|
+
const summaryView = chunk2C2C27ML_cjs.buildSummaryZoomView(
|
|
2572
2572
|
element,
|
|
2573
2573
|
(index) => {
|
|
2574
2574
|
const slide = context.slides?.[index];
|
|
@@ -2584,19 +2584,19 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2584
2584
|
(key, params) => context.t(key, params)
|
|
2585
2585
|
);
|
|
2586
2586
|
if (summaryView) {
|
|
2587
|
-
const root =
|
|
2587
|
+
const root = chunkN5WPJIMK_cjs.createEl(
|
|
2588
2588
|
doc,
|
|
2589
2589
|
"div",
|
|
2590
2590
|
"pptxv-element pptxv-zoom pptxv-summary-zoom",
|
|
2591
|
-
|
|
2591
|
+
chunk2C2C27ML_cjs.getContainerStyle(element, zIndex)
|
|
2592
2592
|
);
|
|
2593
|
-
const content =
|
|
2593
|
+
const content = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-summary-zoom-content", summaryView.containerStyle);
|
|
2594
2594
|
root.dataset.elementId = element.id;
|
|
2595
2595
|
root.dataset.zoomType = "summary";
|
|
2596
2596
|
root.setAttribute("role", "group");
|
|
2597
2597
|
root.setAttribute("aria-label", summaryView.ariaLabel);
|
|
2598
2598
|
for (const tile2 of summaryView.tiles) {
|
|
2599
|
-
const tileElement =
|
|
2599
|
+
const tileElement = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-summary-zoom-tile", {
|
|
2600
2600
|
...tile2.style,
|
|
2601
2601
|
backgroundColor: tile2.backgroundColor,
|
|
2602
2602
|
overflow: "hidden",
|
|
@@ -2630,22 +2630,22 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2630
2630
|
});
|
|
2631
2631
|
}
|
|
2632
2632
|
if (tile2.imageSrc) {
|
|
2633
|
-
const image =
|
|
2633
|
+
const image = chunkN5WPJIMK_cjs.createEl(doc, "img");
|
|
2634
2634
|
image.src = tile2.imageSrc;
|
|
2635
2635
|
image.alt = tile2.ariaLabel;
|
|
2636
2636
|
image.setAttribute("draggable", "false");
|
|
2637
2637
|
image.style.cssText = "width:100%;height:100%;object-fit:contain";
|
|
2638
2638
|
tileElement.appendChild(image);
|
|
2639
2639
|
} else {
|
|
2640
|
-
const label =
|
|
2640
|
+
const label = chunkN5WPJIMK_cjs.createEl(doc, "div");
|
|
2641
2641
|
label.textContent = tile2.label;
|
|
2642
|
-
const slideLabel =
|
|
2642
|
+
const slideLabel = chunkN5WPJIMK_cjs.createEl(doc, "div");
|
|
2643
2643
|
slideLabel.textContent = tile2.slideLabel;
|
|
2644
2644
|
tileElement.append(label, slideLabel);
|
|
2645
2645
|
}
|
|
2646
2646
|
content.appendChild(tileElement);
|
|
2647
2647
|
}
|
|
2648
|
-
const badge2 =
|
|
2648
|
+
const badge2 = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-zoom-badge");
|
|
2649
2649
|
badge2.textContent = context.t("pptx.zoom.summaryZoom");
|
|
2650
2650
|
content.appendChild(badge2);
|
|
2651
2651
|
root.appendChild(content);
|
|
@@ -2655,7 +2655,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2655
2655
|
const target = element.targetSlideIndex ?? 0;
|
|
2656
2656
|
const targetSlide = context.slides?.[target];
|
|
2657
2657
|
const interactive = context.presenting && context.onZoomClick !== void 0;
|
|
2658
|
-
const el =
|
|
2658
|
+
const el = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-element pptxv-zoom", chunk2C2C27ML_cjs.getContainerStyle(element, zIndex));
|
|
2659
2659
|
el.dataset.elementId = element.id;
|
|
2660
2660
|
el.dataset.zoomType = zoomType;
|
|
2661
2661
|
el.dataset.zoomTarget = String(target);
|
|
@@ -2665,7 +2665,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2665
2665
|
el.tabIndex = 0;
|
|
2666
2666
|
el.style.cursor = "pointer";
|
|
2667
2667
|
const activate = () => {
|
|
2668
|
-
const zoomTarget =
|
|
2668
|
+
const zoomTarget = chunk2C2C27ML_cjs.resolveZoomNavigationTarget(element);
|
|
2669
2669
|
if (zoomTarget) {
|
|
2670
2670
|
context.onZoomClick?.(zoomTarget, context.currentSlideIndex ?? 0);
|
|
2671
2671
|
}
|
|
@@ -2690,7 +2690,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2690
2690
|
section: element.targetSectionId
|
|
2691
2691
|
}) : context.t("pptx.zoom.ariaLabel", { number: target + 1 })
|
|
2692
2692
|
);
|
|
2693
|
-
const tile =
|
|
2693
|
+
const tile = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-zoom-tile", {
|
|
2694
2694
|
position: "relative",
|
|
2695
2695
|
width: "100%",
|
|
2696
2696
|
height: "100%",
|
|
@@ -2699,7 +2699,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2699
2699
|
boxShadow: "0 2px 8px rgba(0, 0, 0, 0.15)"
|
|
2700
2700
|
});
|
|
2701
2701
|
if (element.imageData) {
|
|
2702
|
-
const img =
|
|
2702
|
+
const img = chunkN5WPJIMK_cjs.createEl(doc, "img", "pptxv-zoom-img", {
|
|
2703
2703
|
width: "100%",
|
|
2704
2704
|
height: "100%",
|
|
2705
2705
|
objectFit: "contain",
|
|
@@ -2722,7 +2722,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2722
2722
|
)
|
|
2723
2723
|
);
|
|
2724
2724
|
}
|
|
2725
|
-
const badge =
|
|
2725
|
+
const badge = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-zoom-badge", {
|
|
2726
2726
|
position: "absolute",
|
|
2727
2727
|
bottom: "4px",
|
|
2728
2728
|
right: "4px",
|
|
@@ -2740,7 +2740,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2740
2740
|
return el;
|
|
2741
2741
|
};
|
|
2742
2742
|
function buildThumbnail(doc, slideNumber, sectionText, backgroundColor, t) {
|
|
2743
|
-
const box =
|
|
2743
|
+
const box = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-zoom-thumbnail", {
|
|
2744
2744
|
width: "100%",
|
|
2745
2745
|
height: "100%",
|
|
2746
2746
|
display: "flex",
|
|
@@ -2751,7 +2751,7 @@ function buildThumbnail(doc, slideNumber, sectionText, backgroundColor, t) {
|
|
|
2751
2751
|
border: "1px solid rgba(0, 0, 0, 0.1)",
|
|
2752
2752
|
boxSizing: "border-box"
|
|
2753
2753
|
});
|
|
2754
|
-
const slideLabel =
|
|
2754
|
+
const slideLabel = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-zoom-slide-label", {
|
|
2755
2755
|
fontSize: "14px",
|
|
2756
2756
|
fontWeight: 600,
|
|
2757
2757
|
color: "rgba(0, 0, 0, 0.5)",
|
|
@@ -2760,7 +2760,7 @@ function buildThumbnail(doc, slideNumber, sectionText, backgroundColor, t) {
|
|
|
2760
2760
|
slideLabel.textContent = t("pptx.notes.slideN", { n: slideNumber });
|
|
2761
2761
|
box.appendChild(slideLabel);
|
|
2762
2762
|
if (sectionText) {
|
|
2763
|
-
const sectionLabel =
|
|
2763
|
+
const sectionLabel = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-zoom-section-label", {
|
|
2764
2764
|
fontSize: "10px",
|
|
2765
2765
|
color: "rgba(0, 0, 0, 0.4)"
|
|
2766
2766
|
});
|
|
@@ -2779,7 +2779,7 @@ function registerExtraRenderers(registry) {
|
|
|
2779
2779
|
|
|
2780
2780
|
// src/pptx/dom/elements/register-rich-media.ts
|
|
2781
2781
|
function registerRichMediaRenderers(registry) {
|
|
2782
|
-
registry.register("smartArt",
|
|
2782
|
+
registry.register("smartArt", chunkN5WPJIMK_cjs.renderSmartArtElement);
|
|
2783
2783
|
registry.register("media", renderMediaElement);
|
|
2784
2784
|
registry.register("ink", renderInkElement);
|
|
2785
2785
|
registry.register("ole", renderOleElement);
|
|
@@ -2815,10 +2815,10 @@ function enableTableResize(container, table, element, context) {
|
|
|
2815
2815
|
for (const handle of [...colHandles, ...rowHandles]) {
|
|
2816
2816
|
handle.remove();
|
|
2817
2817
|
}
|
|
2818
|
-
const crossings =
|
|
2818
|
+
const crossings = chunk2C2C27ML_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
2819
2819
|
const rowBounds = measureRowBoundaries(table);
|
|
2820
|
-
colHandles =
|
|
2821
|
-
const handle =
|
|
2820
|
+
colHandles = chunk2C2C27ML_cjs.computeColumnBoundaries(tableData.columnWidths).map((leftPct, i) => {
|
|
2821
|
+
const handle = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-table-resize-col", {
|
|
2822
2822
|
position: "absolute",
|
|
2823
2823
|
top: "0",
|
|
2824
2824
|
bottom: "0",
|
|
@@ -2827,14 +2827,14 @@ function enableTableResize(container, table, element, context) {
|
|
|
2827
2827
|
zIndex: "10",
|
|
2828
2828
|
pointerEvents: "none"
|
|
2829
2829
|
});
|
|
2830
|
-
const segments =
|
|
2830
|
+
const segments = chunk2C2C27ML_cjs.columnHandleSegments(
|
|
2831
2831
|
crossings.columns[i] ?? [],
|
|
2832
2832
|
rowBounds,
|
|
2833
2833
|
table.offsetHeight
|
|
2834
2834
|
);
|
|
2835
2835
|
for (const { top, height } of segments) {
|
|
2836
2836
|
handle.appendChild(
|
|
2837
|
-
|
|
2837
|
+
chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-table-resize-segment", {
|
|
2838
2838
|
position: "absolute",
|
|
2839
2839
|
left: "0",
|
|
2840
2840
|
right: "0",
|
|
@@ -2848,7 +2848,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
2848
2848
|
return handle;
|
|
2849
2849
|
});
|
|
2850
2850
|
rowHandles = rowBounds.map((topPx, i) => {
|
|
2851
|
-
const handle =
|
|
2851
|
+
const handle = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-table-resize-row", {
|
|
2852
2852
|
position: "absolute",
|
|
2853
2853
|
left: "0",
|
|
2854
2854
|
right: "0",
|
|
@@ -2857,10 +2857,10 @@ function enableTableResize(container, table, element, context) {
|
|
|
2857
2857
|
zIndex: "10",
|
|
2858
2858
|
pointerEvents: "none"
|
|
2859
2859
|
});
|
|
2860
|
-
const segments =
|
|
2860
|
+
const segments = chunk2C2C27ML_cjs.rowHandleSegments(crossings.rows[i] ?? [], tableData.columnWidths);
|
|
2861
2861
|
for (const { leftPct, widthPct } of segments) {
|
|
2862
2862
|
handle.appendChild(
|
|
2863
|
-
|
|
2863
|
+
chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-table-resize-segment", {
|
|
2864
2864
|
position: "absolute",
|
|
2865
2865
|
top: "0",
|
|
2866
2866
|
bottom: "0",
|
|
@@ -2901,14 +2901,14 @@ function enableTableResize(container, table, element, context) {
|
|
|
2901
2901
|
const deltaProp = (event.clientX - active.startPos) / (rect.width || 1);
|
|
2902
2902
|
context.onTableResizeColumns?.(
|
|
2903
2903
|
element,
|
|
2904
|
-
|
|
2904
|
+
chunk2C2C27ML_cjs.computeResizedColumnWidths(active.initialWidths, active.index, deltaProp)
|
|
2905
2905
|
);
|
|
2906
2906
|
} else if (event.clientY !== active.startPos && active.type === "row") {
|
|
2907
2907
|
const deltaY = event.clientY - active.startPos;
|
|
2908
2908
|
context.onTableResizeRow?.(
|
|
2909
2909
|
element,
|
|
2910
2910
|
active.index,
|
|
2911
|
-
|
|
2911
|
+
chunk2C2C27ML_cjs.computeResizedRowHeight(active.initialRowHeight ?? chunk2C2C27ML_cjs.DEFAULT_ROW_HEIGHT, deltaY)
|
|
2912
2912
|
);
|
|
2913
2913
|
}
|
|
2914
2914
|
drawHandles();
|
|
@@ -2917,13 +2917,13 @@ function enableTableResize(container, table, element, context) {
|
|
|
2917
2917
|
const rect = container.getBoundingClientRect();
|
|
2918
2918
|
const localX = event.clientX - rect.left;
|
|
2919
2919
|
const localY = event.clientY - rect.top;
|
|
2920
|
-
const scaleY =
|
|
2921
|
-
const crossings =
|
|
2920
|
+
const scaleY = chunk2C2C27ML_cjs.getTableResizeScale(rect.height, container.offsetHeight);
|
|
2921
|
+
const crossings = chunk2C2C27ML_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
2922
2922
|
const rowBounds = measureRowBoundaries(table);
|
|
2923
|
-
const colBoundaries =
|
|
2923
|
+
const colBoundaries = chunk2C2C27ML_cjs.computeColumnBoundaries(tableData.columnWidths);
|
|
2924
2924
|
for (let i = 0; i < colBoundaries.length; i++) {
|
|
2925
2925
|
const boundaryX = colBoundaries[i] / 100 * rect.width;
|
|
2926
|
-
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !
|
|
2926
|
+
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !chunk2C2C27ML_cjs.isColumnBoundaryMergedAt(crossings, i, rowBounds, localY / scaleY)) {
|
|
2927
2927
|
event.preventDefault();
|
|
2928
2928
|
event.stopPropagation();
|
|
2929
2929
|
doc.body.style.cursor = "col-resize";
|
|
@@ -2941,7 +2941,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
2941
2941
|
}
|
|
2942
2942
|
}
|
|
2943
2943
|
for (let i = 0; i < rowBounds.length; i++) {
|
|
2944
|
-
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !
|
|
2944
|
+
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !chunk2C2C27ML_cjs.isRowBoundaryMergedAt(crossings, i, tableData.columnWidths, localX / (rect.width || 1))) {
|
|
2945
2945
|
event.preventDefault();
|
|
2946
2946
|
event.stopPropagation();
|
|
2947
2947
|
const tr = table.querySelectorAll("tbody > tr")[i];
|
|
@@ -2952,7 +2952,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
2952
2952
|
index: i,
|
|
2953
2953
|
startPos: event.clientY,
|
|
2954
2954
|
handleEl: rowHandles[i] ?? container,
|
|
2955
|
-
initialRowHeight: tr?.offsetHeight ??
|
|
2955
|
+
initialRowHeight: tr?.offsetHeight ?? chunk2C2C27ML_cjs.DEFAULT_ROW_HEIGHT
|
|
2956
2956
|
};
|
|
2957
2957
|
win.addEventListener("mousemove", onMouseMove);
|
|
2958
2958
|
win.addEventListener("mouseup", onMouseUp);
|
|
@@ -2978,14 +2978,14 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
2978
2978
|
fontScheme: context.fontScheme,
|
|
2979
2979
|
formatScheme: context.formatScheme
|
|
2980
2980
|
};
|
|
2981
|
-
const container =
|
|
2981
|
+
const container = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-element pptxv-table", {
|
|
2982
2982
|
// The table style's drop shadow (Themed Style 1/2) sits on the clipping frame.
|
|
2983
|
-
...
|
|
2984
|
-
...
|
|
2983
|
+
...chunk2C2C27ML_cjs.tableFrameCss(tableData, styleContext),
|
|
2984
|
+
...chunk2C2C27ML_cjs.getContainerStyle(element, zIndex),
|
|
2985
2985
|
overflow: "hidden"
|
|
2986
2986
|
});
|
|
2987
2987
|
container.dataset.elementId = element.id;
|
|
2988
|
-
const table =
|
|
2988
|
+
const table = chunkN5WPJIMK_cjs.createEl(doc, "table", "pptxv-table-grid", {
|
|
2989
2989
|
width: "100%",
|
|
2990
2990
|
height: "100%",
|
|
2991
2991
|
borderCollapse: "collapse",
|
|
@@ -2994,7 +2994,7 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
2994
2994
|
// font stack; all five bindings declare the same shared default here.
|
|
2995
2995
|
fontFamily: chunkHTFYAGHG_cjs.DEFAULT_FONT_FAMILY,
|
|
2996
2996
|
// `a:tblPr@rtl`: mirrors the column order for right-to-left decks.
|
|
2997
|
-
...
|
|
2997
|
+
...chunk2C2C27ML_cjs.tableContainerCss(tableData)
|
|
2998
2998
|
});
|
|
2999
2999
|
appendColgroup(doc, table, tableData.columnWidths);
|
|
3000
3000
|
const tbody = doc.createElement("tbody");
|
|
@@ -3056,13 +3056,13 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3056
3056
|
if (cell.rowSpan && cell.rowSpan > 1) {
|
|
3057
3057
|
td.rowSpan = cell.rowSpan;
|
|
3058
3058
|
}
|
|
3059
|
-
const style =
|
|
3059
|
+
const style = chunk2C2C27ML_cjs.tableCellCss(
|
|
3060
3060
|
tableData,
|
|
3061
3061
|
cell,
|
|
3062
3062
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
3063
3063
|
styleContext
|
|
3064
3064
|
);
|
|
3065
|
-
const patternFill = cell.style ?
|
|
3065
|
+
const patternFill = cell.style ? chunk2C2C27ML_cjs.cellPatternFillCss(cell.style) : null;
|
|
3066
3066
|
if (patternFill) {
|
|
3067
3067
|
delete style["backgroundColor"];
|
|
3068
3068
|
delete style["background"];
|
|
@@ -3073,9 +3073,9 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3073
3073
|
style["backgroundColor"] = patternFill.backgroundColor;
|
|
3074
3074
|
}
|
|
3075
3075
|
}
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
const diagonals =
|
|
3076
|
+
chunkN5WPJIMK_cjs.applyStyleMap(td, CELL_BASE_STYLE);
|
|
3077
|
+
chunkN5WPJIMK_cjs.applyStyleMap(td, style);
|
|
3078
|
+
const diagonals = chunk2C2C27ML_cjs.getCellDiagonalBorders(
|
|
3079
3079
|
cell.style,
|
|
3080
3080
|
tableData,
|
|
3081
3081
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3088,17 +3088,17 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3088
3088
|
return td;
|
|
3089
3089
|
}
|
|
3090
3090
|
function diagonalLine(doc, x1, y1, x2, y2, stroke, width) {
|
|
3091
|
-
const line =
|
|
3091
|
+
const line = chunkN5WPJIMK_cjs.createSvgEl(doc, "line", { x1, y1, x2, y2, stroke, "stroke-width": width });
|
|
3092
3092
|
line.style.setProperty("stroke-width", chunkFI2ATACZ_cjs.screenStrokeWidth(width));
|
|
3093
3093
|
return line;
|
|
3094
3094
|
}
|
|
3095
3095
|
function renderDiagonalOverlay(doc, diagonals) {
|
|
3096
|
-
const svg =
|
|
3096
|
+
const svg = chunkN5WPJIMK_cjs.createSvgEl(doc, "svg", {
|
|
3097
3097
|
class: "pptxv-table-diag",
|
|
3098
3098
|
"aria-hidden": "true",
|
|
3099
3099
|
preserveAspectRatio: "none"
|
|
3100
3100
|
});
|
|
3101
|
-
|
|
3101
|
+
chunkN5WPJIMK_cjs.applyStyleMap(svg, {
|
|
3102
3102
|
position: "absolute",
|
|
3103
3103
|
inset: 0,
|
|
3104
3104
|
width: "100%",
|
|
@@ -3119,10 +3119,10 @@ function renderDiagonalOverlay(doc, diagonals) {
|
|
|
3119
3119
|
return svg;
|
|
3120
3120
|
}
|
|
3121
3121
|
function appendCellText(doc, td, cell, cellCss, defaultFontPt) {
|
|
3122
|
-
const blocks =
|
|
3122
|
+
const blocks = chunk2C2C27ML_cjs.cellParagraphBlocks(cell, { cellCss, defaultFontPt });
|
|
3123
3123
|
if (blocks) {
|
|
3124
3124
|
for (const block of blocks) {
|
|
3125
|
-
const div =
|
|
3125
|
+
const div = chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-table-para", { display: "block", ...block.css });
|
|
3126
3126
|
appendRuns(doc, div, block.runs, cellCss);
|
|
3127
3127
|
td.appendChild(div);
|
|
3128
3128
|
}
|
|
@@ -3131,7 +3131,7 @@ function appendCellText(doc, td, cell, cellCss, defaultFontPt) {
|
|
|
3131
3131
|
const richCell = cell;
|
|
3132
3132
|
const textRuns = richCell.textRuns && richCell.textRuns.length > 0 ? richCell.textRuns : null;
|
|
3133
3133
|
if (!textRuns) {
|
|
3134
|
-
const span =
|
|
3134
|
+
const span = chunkN5WPJIMK_cjs.createEl(doc, "span", "pptxv-table-text", { position: "relative" });
|
|
3135
3135
|
span.textContent = cell.text || " ";
|
|
3136
3136
|
td.appendChild(span);
|
|
3137
3137
|
return;
|
|
@@ -3139,7 +3139,7 @@ function appendCellText(doc, td, cell, cellCss, defaultFontPt) {
|
|
|
3139
3139
|
for (const run of textRuns) {
|
|
3140
3140
|
if (run.isParagraphBreak) {
|
|
3141
3141
|
td.appendChild(
|
|
3142
|
-
|
|
3142
|
+
chunkN5WPJIMK_cjs.createEl(doc, "div", "pptxv-table-para-break", { display: "block", height: 0 })
|
|
3143
3143
|
);
|
|
3144
3144
|
continue;
|
|
3145
3145
|
}
|
|
@@ -3152,9 +3152,9 @@ function appendRuns(doc, parent, runs, cellCss) {
|
|
|
3152
3152
|
parent.appendChild(doc.createElement("br"));
|
|
3153
3153
|
continue;
|
|
3154
3154
|
}
|
|
3155
|
-
const span =
|
|
3155
|
+
const span = chunkN5WPJIMK_cjs.createEl(doc, "span", "pptxv-table-run", {
|
|
3156
3156
|
position: "relative",
|
|
3157
|
-
...
|
|
3157
|
+
...chunk2C2C27ML_cjs.cellRunStyle(run, cellCss)
|
|
3158
3158
|
});
|
|
3159
3159
|
span.textContent = run.text;
|
|
3160
3160
|
parent.appendChild(span);
|
|
@@ -3168,8 +3168,8 @@ function registerTableChartRenderers(registry) {
|
|
|
3168
3168
|
}
|
|
3169
3169
|
|
|
3170
3170
|
// src/pptx/dom/glyph-outline-cache.ts
|
|
3171
|
-
var glyphOutlineFontCache = new
|
|
3172
|
-
var getGlyphOutline =
|
|
3171
|
+
var glyphOutlineFontCache = new chunk2C2C27ML_cjs.GlyphOutlineFontCache();
|
|
3172
|
+
var getGlyphOutline = chunk2C2C27ML_cjs.createGlyphOutlineLookup(glyphOutlineFontCache);
|
|
3173
3173
|
|
|
3174
3174
|
// src/pptx/dom/elements/text-warp.ts
|
|
3175
3175
|
function renderWarpedText(element, context) {
|
|
@@ -3181,16 +3181,16 @@ function renderWarpedText(element, context) {
|
|
|
3181
3181
|
if (!preset || preset === "textNoShape") {
|
|
3182
3182
|
return null;
|
|
3183
3183
|
}
|
|
3184
|
-
const paragraphs =
|
|
3184
|
+
const paragraphs = chunk2C2C27ML_cjs.groupIntoParagraphs(element);
|
|
3185
3185
|
if (paragraphs.length === 0) {
|
|
3186
3186
|
return null;
|
|
3187
3187
|
}
|
|
3188
|
-
if (!
|
|
3189
|
-
const transform =
|
|
3188
|
+
if (!chunk2C2C27ML_cjs.shouldUseSvgWarp(preset)) {
|
|
3189
|
+
const transform = chunk2C2C27ML_cjs.getWarpCssTransform(preset, style?.textWarpAdj, style?.textWarpAdj2);
|
|
3190
3190
|
if (!transform) {
|
|
3191
3191
|
return null;
|
|
3192
3192
|
}
|
|
3193
|
-
const text =
|
|
3193
|
+
const text = chunkN5WPJIMK_cjs.createEl(context.document, "div", "pptxv-wordart", {
|
|
3194
3194
|
width: "100%",
|
|
3195
3195
|
height: "100%",
|
|
3196
3196
|
display: "flex",
|
|
@@ -3208,14 +3208,14 @@ function renderWarpedText(element, context) {
|
|
|
3208
3208
|
if (style?.fontSize) {
|
|
3209
3209
|
text.style.fontSize = `${style.fontSize}px`;
|
|
3210
3210
|
}
|
|
3211
|
-
const fontWeight =
|
|
3211
|
+
const fontWeight = chunk2C2C27ML_cjs.fontWeightAttribute(style?.fontFamily, style?.bold);
|
|
3212
3212
|
if (fontWeight) {
|
|
3213
3213
|
text.style.fontWeight = fontWeight;
|
|
3214
3214
|
}
|
|
3215
3215
|
text.textContent = paragraphs.map((p) => p.segments.map((s) => s.text).join("")).join("\n");
|
|
3216
3216
|
return text;
|
|
3217
3217
|
}
|
|
3218
|
-
if (
|
|
3218
|
+
if (chunk2C2C27ML_cjs.hasGlyphEnvelope(preset)) {
|
|
3219
3219
|
return renderGlyphWarp(element, paragraphs, context);
|
|
3220
3220
|
}
|
|
3221
3221
|
return renderPathWarp(element, paragraphs, context);
|
|
@@ -3235,13 +3235,13 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3235
3235
|
const preset = style.textWarpPreset;
|
|
3236
3236
|
const width = Math.max(element.width, 1);
|
|
3237
3237
|
const height = Math.max(element.height, 1);
|
|
3238
|
-
const svg =
|
|
3238
|
+
const svg = chunkN5WPJIMK_cjs.createSvgEl(context.document, "svg", {
|
|
3239
3239
|
viewBox: `0 0 ${width} ${height}`,
|
|
3240
3240
|
"aria-hidden": "true"
|
|
3241
3241
|
});
|
|
3242
3242
|
svg.setAttribute("class", "pptxv-wordart");
|
|
3243
3243
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%;overflow:visible");
|
|
3244
|
-
const perLine =
|
|
3244
|
+
const perLine = chunk2C2C27ML_cjs.buildGlyphEnvelopeBlock(
|
|
3245
3245
|
preset,
|
|
3246
3246
|
paragraphs.map(
|
|
3247
3247
|
(paragraph) => paragraph.segments.map((seg, i) => ({
|
|
@@ -3262,7 +3262,7 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3262
3262
|
const segments = paragraph.segments;
|
|
3263
3263
|
const glyphs = perLine[lineIndex] ?? [];
|
|
3264
3264
|
glyphs.forEach((g, glyphIndex) => {
|
|
3265
|
-
const paint =
|
|
3265
|
+
const paint = chunk2C2C27ML_cjs.resolveWarpRunPaint(segments[g.segmentIndex], style);
|
|
3266
3266
|
const fill = paint.fill;
|
|
3267
3267
|
const textAttrs = {
|
|
3268
3268
|
fill,
|
|
@@ -3273,12 +3273,12 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3273
3273
|
"text-decoration": paint.textDecoration
|
|
3274
3274
|
};
|
|
3275
3275
|
if (g.outlinePath) {
|
|
3276
|
-
const path =
|
|
3276
|
+
const path = chunkN5WPJIMK_cjs.createSvgEl(context.document, "path", { d: g.outlinePath, fill });
|
|
3277
3277
|
svg.appendChild(path);
|
|
3278
3278
|
return;
|
|
3279
3279
|
}
|
|
3280
3280
|
if (!g.slices || g.slices.length <= 1) {
|
|
3281
|
-
const text =
|
|
3281
|
+
const text = chunkN5WPJIMK_cjs.createSvgEl(context.document, "text", {
|
|
3282
3282
|
x: g.x,
|
|
3283
3283
|
y: g.y,
|
|
3284
3284
|
transform: g.transform,
|
|
@@ -3288,17 +3288,17 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3288
3288
|
svg.appendChild(text);
|
|
3289
3289
|
return;
|
|
3290
3290
|
}
|
|
3291
|
-
const group =
|
|
3291
|
+
const group = chunkN5WPJIMK_cjs.createSvgEl(context.document, "g", {
|
|
3292
3292
|
"data-glyph-slices": g.slices.length
|
|
3293
3293
|
});
|
|
3294
3294
|
g.slices.forEach((slice, sliceIndex) => {
|
|
3295
3295
|
const clipId = `${element.id.replace(/[^a-zA-Z0-9_-]/gu, "_")}-warp-l${lineIndex}-g${glyphIndex}-s${sliceIndex}`;
|
|
3296
|
-
const clipPath =
|
|
3296
|
+
const clipPath = chunkN5WPJIMK_cjs.createSvgEl(context.document, "clipPath", {
|
|
3297
3297
|
id: clipId,
|
|
3298
3298
|
clipPathUnits: "userSpaceOnUse"
|
|
3299
3299
|
});
|
|
3300
3300
|
clipPath.appendChild(
|
|
3301
|
-
|
|
3301
|
+
chunkN5WPJIMK_cjs.createSvgEl(context.document, "rect", {
|
|
3302
3302
|
x: slice.clipX0,
|
|
3303
3303
|
y: -1e5,
|
|
3304
3304
|
width: slice.clipX1 - slice.clipX0,
|
|
@@ -3306,7 +3306,7 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3306
3306
|
})
|
|
3307
3307
|
);
|
|
3308
3308
|
group.appendChild(clipPath);
|
|
3309
|
-
const text =
|
|
3309
|
+
const text = chunkN5WPJIMK_cjs.createSvgEl(context.document, "text", {
|
|
3310
3310
|
x: g.x,
|
|
3311
3311
|
y: g.y,
|
|
3312
3312
|
transform: slice.transform,
|
|
@@ -3324,15 +3324,15 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3324
3324
|
function renderPathWarp(element, paragraphs, context) {
|
|
3325
3325
|
const style = element.textStyle;
|
|
3326
3326
|
const preset = style.textWarpPreset;
|
|
3327
|
-
const svg =
|
|
3327
|
+
const svg = chunkN5WPJIMK_cjs.createSvgEl(context.document, "svg", {
|
|
3328
3328
|
viewBox: `0 0 ${Math.max(element.width, 1)} ${Math.max(element.height, 1)}`,
|
|
3329
3329
|
preserveAspectRatio: "none",
|
|
3330
3330
|
"aria-hidden": "true"
|
|
3331
3331
|
});
|
|
3332
3332
|
svg.setAttribute("class", "pptxv-wordart");
|
|
3333
3333
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%;overflow:visible");
|
|
3334
|
-
const defs =
|
|
3335
|
-
const layouts =
|
|
3334
|
+
const defs = chunkN5WPJIMK_cjs.createSvgEl(context.document, "defs");
|
|
3335
|
+
const layouts = chunk2C2C27ML_cjs.warpParagraphLayouts(
|
|
3336
3336
|
preset,
|
|
3337
3337
|
element.width,
|
|
3338
3338
|
element.height,
|
|
@@ -3344,27 +3344,27 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3344
3344
|
paragraphs.forEach((paragraph, index) => {
|
|
3345
3345
|
const id = `${element.id.replace(/[^a-zA-Z0-9_-]/gu, "_")}-warp-${index}`;
|
|
3346
3346
|
defs.appendChild(
|
|
3347
|
-
|
|
3347
|
+
chunkN5WPJIMK_cjs.createSvgEl(context.document, "path", {
|
|
3348
3348
|
id,
|
|
3349
3349
|
d: layouts[index]?.d
|
|
3350
3350
|
})
|
|
3351
3351
|
);
|
|
3352
|
-
const text =
|
|
3352
|
+
const text = chunkN5WPJIMK_cjs.createSvgEl(context.document, "text", {
|
|
3353
3353
|
fill: style.color ?? "#000000",
|
|
3354
3354
|
"font-family": style.fontFamily ? pptx.getSubstituteFontFamily(style.fontFamily) : chunkHTFYAGHG_cjs.DEFAULT_FONT_FAMILY,
|
|
3355
3355
|
"font-size": style.fontSize ?? 18,
|
|
3356
|
-
"font-weight":
|
|
3357
|
-
"font-style":
|
|
3356
|
+
"font-weight": chunk2C2C27ML_cjs.fontWeightAttribute(style.fontFamily, style.bold),
|
|
3357
|
+
"font-style": chunk2C2C27ML_cjs.resolveFontItalic(style.fontFamily, style.italic) ? "italic" : void 0
|
|
3358
3358
|
});
|
|
3359
|
-
const textPath =
|
|
3359
|
+
const textPath = chunkN5WPJIMK_cjs.createSvgEl(context.document, "textPath", {
|
|
3360
3360
|
href: `#${id}`,
|
|
3361
3361
|
startOffset: "50%",
|
|
3362
3362
|
"text-anchor": "middle"
|
|
3363
3363
|
});
|
|
3364
3364
|
const fit = layouts[index]?.fitScale ?? 1;
|
|
3365
3365
|
for (const segment of paragraph.segments) {
|
|
3366
|
-
const paint =
|
|
3367
|
-
const tspan =
|
|
3366
|
+
const paint = chunk2C2C27ML_cjs.resolveWarpRunPaint(segment, style);
|
|
3367
|
+
const tspan = chunkN5WPJIMK_cjs.createSvgEl(context.document, "tspan", {
|
|
3368
3368
|
fill: paint.fill,
|
|
3369
3369
|
"font-family": paint.fontFamily,
|
|
3370
3370
|
"font-size": paint.fontSizePx * fit,
|
|
@@ -3384,9 +3384,9 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3384
3384
|
|
|
3385
3385
|
// src/pptx/dom/elements/text-shape.ts
|
|
3386
3386
|
var renderTextShapeElement = (element, zIndex, context) => {
|
|
3387
|
-
const container =
|
|
3387
|
+
const container = chunk2C2C27ML_cjs.getContainerStyle(element, zIndex);
|
|
3388
3388
|
const animState = context.presentationStates?.get(element.id);
|
|
3389
|
-
const background =
|
|
3389
|
+
const background = chunk2C2C27ML_cjs.getBackgroundAnimationState(element, context.presentationStates);
|
|
3390
3390
|
const visualState = background ?? animState;
|
|
3391
3391
|
const shape = getShapeFillStrokeStyle(
|
|
3392
3392
|
element,
|
|
@@ -3394,27 +3394,27 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3394
3394
|
visualState?.animatesStroke
|
|
3395
3395
|
);
|
|
3396
3396
|
const merged = { ...container, ...shape };
|
|
3397
|
-
const bleedPatch =
|
|
3397
|
+
const bleedPatch = chunk2C2C27ML_cjs.abuttingEdgeBleedStyle(element, context.edgeBleeds?.get(element.id), merged);
|
|
3398
3398
|
const beforeBleed = { ...merged };
|
|
3399
3399
|
Object.assign(merged, bleedPatch);
|
|
3400
|
-
const transform =
|
|
3400
|
+
const transform = chunkN5WPJIMK_cjs.composeTransforms(container["transform"], shape["transform"]);
|
|
3401
3401
|
if (transform !== void 0) {
|
|
3402
3402
|
merged["transform"] = transform;
|
|
3403
3403
|
}
|
|
3404
|
-
const layers =
|
|
3405
|
-
const el =
|
|
3404
|
+
const layers = chunk2C2C27ML_cjs.getBackgroundAnimationLayers(element, merged, background);
|
|
3405
|
+
const el = chunkN5WPJIMK_cjs.createEl(context.document, "div", "pptxv-element pptxv-shape", layers.box);
|
|
3406
3406
|
el.dataset.elementId = element.id;
|
|
3407
3407
|
markAbuttingEdgeBleed(el, bleedPatch, beforeBleed);
|
|
3408
|
-
const paint = layers.paint ?
|
|
3408
|
+
const paint = layers.paint ? chunkN5WPJIMK_cjs.createEl(context.document, "div", void 0, layers.paint) : el;
|
|
3409
3409
|
if (paint !== el) {
|
|
3410
3410
|
paint.dataset.animId = layers.targetId;
|
|
3411
3411
|
paint.dataset.pptxAnimationLayer = "background";
|
|
3412
3412
|
el.appendChild(paint);
|
|
3413
3413
|
}
|
|
3414
3414
|
if (context.interactive && !context.presenting) {
|
|
3415
|
-
const hitTargetStyle =
|
|
3415
|
+
const hitTargetStyle = chunk2C2C27ML_cjs.elementHitTargetStyle(element);
|
|
3416
3416
|
if (hitTargetStyle) {
|
|
3417
|
-
const hitTarget =
|
|
3417
|
+
const hitTarget = chunkN5WPJIMK_cjs.createEl(context.document, "div", void 0, hitTargetStyle);
|
|
3418
3418
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
3419
3419
|
hitTarget.setAttribute("data-pptx-hit-target", "true");
|
|
3420
3420
|
el.appendChild(hitTarget);
|
|
@@ -3459,8 +3459,8 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3459
3459
|
} else if (warped) {
|
|
3460
3460
|
el.appendChild(warped);
|
|
3461
3461
|
} else {
|
|
3462
|
-
const linkedSegments =
|
|
3463
|
-
const paragraphs =
|
|
3462
|
+
const linkedSegments = chunk2C2C27ML_cjs.getOverflowSegments(element, context.slide?.elements);
|
|
3463
|
+
const paragraphs = chunk2C2C27ML_cjs.buildParagraphs(element, context.fieldContext, linkedSegments);
|
|
3464
3464
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
3465
3465
|
if (hasText) {
|
|
3466
3466
|
el.appendChild(
|
|
@@ -3471,9 +3471,9 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3471
3471
|
);
|
|
3472
3472
|
} else {
|
|
3473
3473
|
const mode = context.interactive && !context.presenting ? "edit" : "present";
|
|
3474
|
-
const prompt =
|
|
3474
|
+
const prompt = chunk2C2C27ML_cjs.placeholderPromptDescriptor(element, mode);
|
|
3475
3475
|
if (prompt) {
|
|
3476
|
-
const hint =
|
|
3476
|
+
const hint = chunkN5WPJIMK_cjs.createEl(context.document, "div", "pptxv-placeholder-prompt", {
|
|
3477
3477
|
...getTextBlockStyle(element),
|
|
3478
3478
|
...prompt.style
|
|
3479
3479
|
});
|
|
@@ -3487,7 +3487,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3487
3487
|
|
|
3488
3488
|
// src/pptx/dom/elements/index.ts
|
|
3489
3489
|
function createDefaultRegistry() {
|
|
3490
|
-
const registry =
|
|
3490
|
+
const registry = chunkN5WPJIMK_cjs.createElementRendererRegistry();
|
|
3491
3491
|
registry.register("text", renderTextShapeElement);
|
|
3492
3492
|
registry.register("shape", renderTextShapeElement);
|
|
3493
3493
|
registry.register("image", renderImageElement);
|
|
@@ -3640,111 +3640,111 @@ async function resolveImageUrls(handler, slides) {
|
|
|
3640
3640
|
|
|
3641
3641
|
Object.defineProperty(exports, "SMARTART_SVG_STYLE", {
|
|
3642
3642
|
enumerable: true,
|
|
3643
|
-
get: function () { return
|
|
3643
|
+
get: function () { return chunkN5WPJIMK_cjs.SMARTART_SVG_STYLE; }
|
|
3644
3644
|
});
|
|
3645
3645
|
Object.defineProperty(exports, "appendSvgTextLines", {
|
|
3646
3646
|
enumerable: true,
|
|
3647
|
-
get: function () { return
|
|
3647
|
+
get: function () { return chunkN5WPJIMK_cjs.appendSvgTextLines; }
|
|
3648
3648
|
});
|
|
3649
3649
|
Object.defineProperty(exports, "applyStyleMap", {
|
|
3650
3650
|
enumerable: true,
|
|
3651
|
-
get: function () { return
|
|
3651
|
+
get: function () { return chunkN5WPJIMK_cjs.applyStyleMap; }
|
|
3652
3652
|
});
|
|
3653
3653
|
Object.defineProperty(exports, "applyThreeViewTextStyle", {
|
|
3654
3654
|
enumerable: true,
|
|
3655
|
-
get: function () { return
|
|
3655
|
+
get: function () { return chunkN5WPJIMK_cjs.applyThreeViewTextStyle; }
|
|
3656
3656
|
});
|
|
3657
3657
|
Object.defineProperty(exports, "buildSmartArtFallbackSvg", {
|
|
3658
3658
|
enumerable: true,
|
|
3659
|
-
get: function () { return
|
|
3659
|
+
get: function () { return chunkN5WPJIMK_cjs.buildSmartArtFallbackSvg; }
|
|
3660
3660
|
});
|
|
3661
3661
|
Object.defineProperty(exports, "buildSmartArtInsertPreview", {
|
|
3662
3662
|
enumerable: true,
|
|
3663
|
-
get: function () { return
|
|
3663
|
+
get: function () { return chunkN5WPJIMK_cjs.buildSmartArtInsertPreview; }
|
|
3664
3664
|
});
|
|
3665
3665
|
Object.defineProperty(exports, "buildSvgGradientDefs", {
|
|
3666
3666
|
enumerable: true,
|
|
3667
|
-
get: function () { return
|
|
3667
|
+
get: function () { return chunkN5WPJIMK_cjs.buildSvgGradientDefs; }
|
|
3668
3668
|
});
|
|
3669
3669
|
Object.defineProperty(exports, "collectThreeViews", {
|
|
3670
3670
|
enumerable: true,
|
|
3671
|
-
get: function () { return
|
|
3671
|
+
get: function () { return chunkN5WPJIMK_cjs.collectThreeViews; }
|
|
3672
3672
|
});
|
|
3673
3673
|
Object.defineProperty(exports, "composeTransforms", {
|
|
3674
3674
|
enumerable: true,
|
|
3675
|
-
get: function () { return
|
|
3675
|
+
get: function () { return chunkN5WPJIMK_cjs.composeTransforms; }
|
|
3676
3676
|
});
|
|
3677
3677
|
Object.defineProperty(exports, "createEl", {
|
|
3678
3678
|
enumerable: true,
|
|
3679
|
-
get: function () { return
|
|
3679
|
+
get: function () { return chunkN5WPJIMK_cjs.createEl; }
|
|
3680
3680
|
});
|
|
3681
3681
|
Object.defineProperty(exports, "createElementRendererRegistry", {
|
|
3682
3682
|
enumerable: true,
|
|
3683
|
-
get: function () { return
|
|
3683
|
+
get: function () { return chunkN5WPJIMK_cjs.createElementRendererRegistry; }
|
|
3684
3684
|
});
|
|
3685
3685
|
Object.defineProperty(exports, "createSvgEl", {
|
|
3686
3686
|
enumerable: true,
|
|
3687
|
-
get: function () { return
|
|
3687
|
+
get: function () { return chunkN5WPJIMK_cjs.createSvgEl; }
|
|
3688
3688
|
});
|
|
3689
3689
|
Object.defineProperty(exports, "enableSmartArtEditing", {
|
|
3690
3690
|
enumerable: true,
|
|
3691
|
-
get: function () { return
|
|
3691
|
+
get: function () { return chunkN5WPJIMK_cjs.enableSmartArtEditing; }
|
|
3692
3692
|
});
|
|
3693
3693
|
Object.defineProperty(exports, "isChart3DEditable", {
|
|
3694
3694
|
enumerable: true,
|
|
3695
|
-
get: function () { return
|
|
3695
|
+
get: function () { return chunkN5WPJIMK_cjs.isChart3DEditable; }
|
|
3696
3696
|
});
|
|
3697
3697
|
Object.defineProperty(exports, "mountThreeViewInto", {
|
|
3698
3698
|
enumerable: true,
|
|
3699
|
-
get: function () { return
|
|
3699
|
+
get: function () { return chunkN5WPJIMK_cjs.mountThreeViewInto; }
|
|
3700
3700
|
});
|
|
3701
3701
|
Object.defineProperty(exports, "renderSmartArt3DElement", {
|
|
3702
3702
|
enumerable: true,
|
|
3703
|
-
get: function () { return
|
|
3703
|
+
get: function () { return chunkN5WPJIMK_cjs.renderSmartArt3DElement; }
|
|
3704
3704
|
});
|
|
3705
3705
|
Object.defineProperty(exports, "renderSmartArtElement", {
|
|
3706
3706
|
enumerable: true,
|
|
3707
|
-
get: function () { return
|
|
3707
|
+
get: function () { return chunkN5WPJIMK_cjs.renderSmartArtElement; }
|
|
3708
3708
|
});
|
|
3709
3709
|
Object.defineProperty(exports, "renderSmartArtSvg", {
|
|
3710
3710
|
enumerable: true,
|
|
3711
|
-
get: function () { return
|
|
3711
|
+
get: function () { return chunkN5WPJIMK_cjs.renderSmartArtSvg; }
|
|
3712
3712
|
});
|
|
3713
3713
|
Object.defineProperty(exports, "rendering3DFlagsOf", {
|
|
3714
3714
|
enumerable: true,
|
|
3715
|
-
get: function () { return
|
|
3715
|
+
get: function () { return chunkN5WPJIMK_cjs.rendering3DFlagsOf; }
|
|
3716
3716
|
});
|
|
3717
3717
|
Object.defineProperty(exports, "selectedChartPartOf", {
|
|
3718
3718
|
enumerable: true,
|
|
3719
|
-
get: function () { return
|
|
3719
|
+
get: function () { return chunkN5WPJIMK_cjs.selectedChartPartOf; }
|
|
3720
3720
|
});
|
|
3721
3721
|
Object.defineProperty(exports, "setSvgAttrs", {
|
|
3722
3722
|
enumerable: true,
|
|
3723
|
-
get: function () { return
|
|
3723
|
+
get: function () { return chunkN5WPJIMK_cjs.setSvgAttrs; }
|
|
3724
3724
|
});
|
|
3725
3725
|
Object.defineProperty(exports, "takeReusableThreeView", {
|
|
3726
3726
|
enumerable: true,
|
|
3727
|
-
get: function () { return
|
|
3727
|
+
get: function () { return chunkN5WPJIMK_cjs.takeReusableThreeView; }
|
|
3728
3728
|
});
|
|
3729
3729
|
Object.defineProperty(exports, "wireChartThreeViewEvents", {
|
|
3730
3730
|
enumerable: true,
|
|
3731
|
-
get: function () { return
|
|
3731
|
+
get: function () { return chunkN5WPJIMK_cjs.wireChartThreeViewEvents; }
|
|
3732
3732
|
});
|
|
3733
3733
|
Object.defineProperty(exports, "withReusableThreeViews", {
|
|
3734
3734
|
enumerable: true,
|
|
3735
|
-
get: function () { return
|
|
3735
|
+
get: function () { return chunkN5WPJIMK_cjs.withReusableThreeViews; }
|
|
3736
3736
|
});
|
|
3737
3737
|
Object.defineProperty(exports, "buildEmbeddedFontStyles", {
|
|
3738
3738
|
enumerable: true,
|
|
3739
|
-
get: function () { return
|
|
3739
|
+
get: function () { return chunk2C2C27ML_cjs.buildEmbeddedFontStyles; }
|
|
3740
3740
|
});
|
|
3741
3741
|
Object.defineProperty(exports, "buildFieldSubstitutionContext", {
|
|
3742
3742
|
enumerable: true,
|
|
3743
|
-
get: function () { return
|
|
3743
|
+
get: function () { return chunk2C2C27ML_cjs.buildFieldSubstitutionContext; }
|
|
3744
3744
|
});
|
|
3745
3745
|
Object.defineProperty(exports, "releasePptxRenderCaches", {
|
|
3746
3746
|
enumerable: true,
|
|
3747
|
-
get: function () { return
|
|
3747
|
+
get: function () { return chunk2C2C27ML_cjs.releasePptxRenderCaches; }
|
|
3748
3748
|
});
|
|
3749
3749
|
Object.defineProperty(exports, "renderChartViewModelSvg", {
|
|
3750
3750
|
enumerable: true,
|