ooxml-ui 1.20.0 → 1.22.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 +18 -9
- package/dist/{chunk-4XPAPETH.js → chunk-DRBAJ5UO.js} +2 -1
- package/dist/{chunk-UB36NYDT.js → chunk-REJECZGV.js} +1 -1
- package/dist/docx/building-blocks-actions.d.ts +54 -0
- package/dist/docx/building-blocks-status.d.ts +34 -0
- package/dist/docx/building-blocks.d.ts +20 -4
- package/dist/docx/editor-core.d.ts +5 -0
- package/dist/docx/element-api.d.ts +12 -0
- package/dist/docx/index.d.ts +3 -1
- package/dist/docx/insert-controller.d.ts +2 -0
- package/dist/docx/locales/en-app.d.ts +1 -0
- package/dist/docx/locales/en.d.ts +1 -0
- package/dist/docx/localization-strings.d.ts +1 -0
- package/dist/docx/surface-navigation.d.ts +8 -0
- package/dist/docx.js +337 -11
- package/dist/index.js +2 -2
- package/dist/parse-worker.js +5 -1
- package/dist/pptx/{chunk-ABDWUQRQ.cjs → chunk-72NIN6QF.cjs} +275 -60
- package/dist/pptx/{chunk-F6P7VS5I.mjs → chunk-VGOIAVPA.mjs} +266 -61
- package/dist/pptx/dom/index.cjs +209 -209
- package/dist/pptx/dom/index.mjs +2 -2
- package/dist/pptx/index.cjs +2926 -2886
- package/dist/pptx/index.mjs +1 -1
- package/dist/pptx/render/collaboration-options.d.ts +11 -9
- package/dist/pptx/render/collaboration-options.d.ts.map +1 -1
- package/dist/pptx/render/collaboration-owned-session.d.ts +34 -0
- package/dist/pptx/render/collaboration-owned-session.d.ts.map +1 -0
- package/dist/pptx/render/collaboration-state.d.ts +47 -0
- package/dist/pptx/render/collaboration-state.d.ts.map +1 -0
- package/dist/pptx/render/collaboration-writeback.d.ts +28 -1
- package/dist/pptx/render/collaboration-writeback.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/morph-predicates.d.ts +7 -0
- package/dist/pptx/render/morph-predicates.d.ts.map +1 -1
- package/dist/pptx/render/viewer-props-manifest.d.ts.map +1 -1
- package/dist/pptx/types.d.ts +25 -2
- package/dist/pptx/types.d.ts.map +1 -1
- package/dist/pptx/web-components/office-aliases.d.ts +1 -1
- package/dist/teams.js +1 -1
- package/dist/visio/building-blocks-shapes.d.ts +9 -0
- package/dist/visio/building-blocks-toolbar.d.ts +87 -0
- package/dist/visio/building-blocks.d.ts +9 -32
- package/dist/visio/canvas-editing.d.ts +45 -0
- package/dist/visio/canvas-keys.d.ts +9 -0
- package/dist/visio/canvas-services.d.ts +18 -0
- package/dist/visio/collaboration-types.d.ts +2 -2
- package/dist/visio/controller.d.ts +31 -1
- package/dist/visio/diagram-tool.d.ts +11 -0
- package/dist/visio/index.d.ts +1 -1
- package/dist/visio/viewer-clipboard.d.ts +7 -1
- package/dist/visio/viewer-delete.d.ts +10 -0
- package/dist/visio/viewer-presence-overlay.d.ts +12 -0
- package/dist/visio/viewer-presence.d.ts +19 -0
- package/dist/visio/viewer-share-sync.d.ts +15 -10
- package/dist/visio/viewer-share.d.ts +9 -7
- package/dist/visio/viewer-stencil.d.ts +8 -0
- package/dist/visio/viewer-write-back.d.ts +32 -0
- package/dist/visio/worker-parser.d.ts +11 -1
- package/dist/visio.js +19930 -19210
- package/dist/xlsx/building-blocks.d.ts +34 -0
- package/dist/xlsx/editor-core.d.ts +8 -0
- package/dist/xlsx/element-api.d.ts +12 -1
- package/dist/xlsx/events.d.ts +12 -1
- package/dist/xlsx/grid/alert-route.d.ts +21 -0
- package/dist/xlsx/index.d.ts +2 -1
- package/dist/xlsx/surface-actions.d.ts +73 -0
- package/dist/xlsx.js +190 -23
- package/package.json +2 -2
package/dist/pptx/dom/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk72NIN6QF_cjs = require('../chunk-72NIN6QF.cjs');
|
|
4
4
|
require('../chunk-WSTWYZFM.cjs');
|
|
5
5
|
var chunk2JEQHIAL_cjs = require('../chunk-2JEQHIAL.cjs');
|
|
6
6
|
require('../chunk-IOR4KOGN.cjs');
|
|
@@ -96,7 +96,7 @@ function buildActiveXControlsOverlay(doc, controls, canvasSize) {
|
|
|
96
96
|
zIndex: "40"
|
|
97
97
|
});
|
|
98
98
|
controls.forEach((control, index) => {
|
|
99
|
-
const view =
|
|
99
|
+
const view = chunk72NIN6QF_cjs.getActiveXControlOverlayView(control, canvasSize, index);
|
|
100
100
|
const style = {
|
|
101
101
|
position: "absolute",
|
|
102
102
|
left: `${view.left}px`,
|
|
@@ -132,7 +132,7 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
132
132
|
pointerEvents: "none",
|
|
133
133
|
zIndex: "45"
|
|
134
134
|
});
|
|
135
|
-
const markers =
|
|
135
|
+
const markers = chunk72NIN6QF_cjs.buildCommentMarkers(
|
|
136
136
|
comments,
|
|
137
137
|
canvasSize.width,
|
|
138
138
|
canvasSize.height,
|
|
@@ -141,10 +141,10 @@ function appendCommentMarkers(doc, stage, comments, canvasSize, t, onMarkerClick
|
|
|
141
141
|
for (const marker of markers) {
|
|
142
142
|
const dot = createEl(doc, "button", "pptxv-comment-marker", {
|
|
143
143
|
position: "absolute",
|
|
144
|
-
left: `${marker.x -
|
|
145
|
-
top: `${marker.y -
|
|
146
|
-
width: `${
|
|
147
|
-
height: `${
|
|
144
|
+
left: `${marker.x - chunk72NIN6QF_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
145
|
+
top: `${marker.y - chunk72NIN6QF_cjs.COMMENT_MARKER_SIZE / 2}px`,
|
|
146
|
+
width: `${chunk72NIN6QF_cjs.COMMENT_MARKER_SIZE}px`,
|
|
147
|
+
height: `${chunk72NIN6QF_cjs.COMMENT_MARKER_SIZE}px`,
|
|
148
148
|
display: "flex",
|
|
149
149
|
alignItems: "center",
|
|
150
150
|
justifyContent: "center",
|
|
@@ -211,7 +211,7 @@ function merge3dStyle(base, computed) {
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
214
|
-
const frame =
|
|
214
|
+
const frame = chunk72NIN6QF_cjs.getFrameEffectStyle(el);
|
|
215
215
|
if (frame) {
|
|
216
216
|
return { ...frame };
|
|
217
217
|
}
|
|
@@ -227,7 +227,7 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
227
227
|
style[key] = value;
|
|
228
228
|
}
|
|
229
229
|
}
|
|
230
|
-
const stroke =
|
|
230
|
+
const stroke = chunk72NIN6QF_cjs.getComputedStrokeStyle(el);
|
|
231
231
|
if (stroke.borderWidth > 0) {
|
|
232
232
|
if (animatesStroke) {
|
|
233
233
|
style["borderWidth"] = stroke.cssBorderWidth;
|
|
@@ -246,7 +246,7 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
246
246
|
style["strokeMiterlimit"] = stroke.strokeMiterlimit;
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
const fx =
|
|
249
|
+
const fx = chunk72NIN6QF_cjs.getComputedEffectStyle(el);
|
|
250
250
|
if (fx.boxShadow) {
|
|
251
251
|
style["boxShadow"] = fx.boxShadow;
|
|
252
252
|
}
|
|
@@ -263,11 +263,11 @@ function getShapeFillStrokeStyle(el, animatesFill, animatesStroke) {
|
|
|
263
263
|
if (fx.overflowVisible) {
|
|
264
264
|
style["overflow"] = "visible";
|
|
265
265
|
}
|
|
266
|
-
merge3dStyle(style,
|
|
267
|
-
if (
|
|
266
|
+
merge3dStyle(style, chunk72NIN6QF_cjs.getComputed3dStyle(el));
|
|
267
|
+
if (chunk72NIN6QF_cjs.isHollowShapeElement(el)) {
|
|
268
268
|
style["pointerEvents"] = "none";
|
|
269
269
|
}
|
|
270
|
-
const geometry =
|
|
270
|
+
const geometry = chunk72NIN6QF_cjs.resolveShapeGeometry(el);
|
|
271
271
|
switch (geometry.kind) {
|
|
272
272
|
case "bare":
|
|
273
273
|
style["backgroundColor"] = "transparent";
|
|
@@ -301,12 +301,12 @@ function getTextBlockStyle(el) {
|
|
|
301
301
|
if (!pptx.hasTextProperties(el)) {
|
|
302
302
|
return {};
|
|
303
303
|
}
|
|
304
|
-
const base =
|
|
304
|
+
const base = chunk72NIN6QF_cjs.buildTextBlockStyle(el, {
|
|
305
305
|
fallbackColor: chunkG3UVZ5FO_cjs.DEFAULT_TEXT_COLOR,
|
|
306
306
|
bodyLayout: true,
|
|
307
307
|
pxLengths: true
|
|
308
308
|
});
|
|
309
|
-
const scene3d =
|
|
309
|
+
const scene3d = chunk72NIN6QF_cjs.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height });
|
|
310
310
|
if (!scene3d) {
|
|
311
311
|
return base;
|
|
312
312
|
}
|
|
@@ -445,7 +445,7 @@ function renderSlideStage(options) {
|
|
|
445
445
|
"--pptxv-grid-size": `${options.gridSpacingPx ?? 10}px`,
|
|
446
446
|
// One device pixel in slide px: thin strokes stay visible on screen.
|
|
447
447
|
...chunkW7CBPO77_cjs.deviceStrokeStageStyle(scale),
|
|
448
|
-
...
|
|
448
|
+
...chunk72NIN6QF_cjs.getSlideBackgroundStyle(slide, { widthPx: canvasSize.width, heightPx: canvasSize.height })
|
|
449
449
|
});
|
|
450
450
|
if (interactive || options.reading) {
|
|
451
451
|
stage.setAttribute("role", "region");
|
|
@@ -488,20 +488,20 @@ function renderSlideStage(options) {
|
|
|
488
488
|
selectedElementIds: options.selectedElementIds,
|
|
489
489
|
registry,
|
|
490
490
|
renderElement(element, zIndex) {
|
|
491
|
-
if (!
|
|
491
|
+
if (!chunk72NIN6QF_cjs.isElementRendered(element)) {
|
|
492
492
|
return null;
|
|
493
493
|
}
|
|
494
494
|
const node = registry.resolve(element.type)(element, zIndex, context);
|
|
495
495
|
if (node) renderedNodes?.push(node);
|
|
496
496
|
if (node && interactive && "setAttribute" in node) {
|
|
497
|
-
const templateLocked =
|
|
497
|
+
const templateLocked = chunk72NIN6QF_cjs.isTemplateElementId(element.id) && !options.templateEditing;
|
|
498
498
|
if (templateLocked) {
|
|
499
499
|
node.style.pointerEvents = "none";
|
|
500
500
|
}
|
|
501
501
|
node.setAttribute("data-pptx-element", "true");
|
|
502
502
|
}
|
|
503
|
-
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" &&
|
|
504
|
-
const hitTargetStyle =
|
|
503
|
+
if (node && element.type !== "text" && element.type !== "shape" && element.type !== "connector" && chunk72NIN6QF_cjs.shouldRenderHitTarget(interactive, options.presenting ?? false)) {
|
|
504
|
+
const hitTargetStyle = chunk72NIN6QF_cjs.elementHitTargetStyle(element);
|
|
505
505
|
if (hitTargetStyle) {
|
|
506
506
|
const hitTarget = createEl(doc, "div", void 0, hitTargetStyle);
|
|
507
507
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
@@ -521,20 +521,20 @@ function renderSlideStage(options) {
|
|
|
521
521
|
}
|
|
522
522
|
});
|
|
523
523
|
if (interactive || options.reading) {
|
|
524
|
-
|
|
524
|
+
chunk72NIN6QF_cjs.applyRenderedElementAccessibility(stage, slide.elements, {
|
|
525
525
|
presenting: options.presenting ?? false
|
|
526
526
|
});
|
|
527
527
|
}
|
|
528
528
|
if (interactive) {
|
|
529
|
-
|
|
529
|
+
chunk72NIN6QF_cjs.applyElementActionAffordances(
|
|
530
530
|
stage,
|
|
531
531
|
slide.elements.filter(
|
|
532
|
-
(element) => options.templateEditing || !
|
|
532
|
+
(element) => options.templateEditing || !chunk72NIN6QF_cjs.isTemplateElementId(element.id)
|
|
533
533
|
),
|
|
534
534
|
{
|
|
535
535
|
canInteract: true,
|
|
536
536
|
presenting: options.presenting ?? false,
|
|
537
|
-
labels:
|
|
537
|
+
labels: chunk72NIN6QF_cjs.actionAffordanceLabels((key) => t(key))
|
|
538
538
|
}
|
|
539
539
|
);
|
|
540
540
|
}
|
|
@@ -601,7 +601,7 @@ function createChartTitleEditor(container, onCommit) {
|
|
|
601
601
|
// src/pptx/dom/elements/chart-editable.ts
|
|
602
602
|
var CHART_FORMAT_REQUEST_EVENT = "pptx-chart-format-request";
|
|
603
603
|
function attachChartEditing(container, element, context, repaint) {
|
|
604
|
-
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !
|
|
604
|
+
if (element.type !== "chart" || !context.interactive || !context.onChartPointChange || !chunk72NIN6QF_cjs.canDrillDown(element)) {
|
|
605
605
|
return;
|
|
606
606
|
}
|
|
607
607
|
const chart = element;
|
|
@@ -641,7 +641,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
641
641
|
if (!rect) {
|
|
642
642
|
return;
|
|
643
643
|
}
|
|
644
|
-
const step2 =
|
|
644
|
+
const step2 = chunk72NIN6QF_cjs.advanceChartMarkDrag(activeMark, event.clientX, event.clientY, rect);
|
|
645
645
|
if (!step2) {
|
|
646
646
|
return;
|
|
647
647
|
}
|
|
@@ -700,7 +700,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
700
700
|
bubbles: true,
|
|
701
701
|
detail: {
|
|
702
702
|
elementId: element.id,
|
|
703
|
-
target:
|
|
703
|
+
target: chunk72NIN6QF_cjs.chartFormatTargetFromEvent(event, container, chart),
|
|
704
704
|
open
|
|
705
705
|
}
|
|
706
706
|
})
|
|
@@ -743,7 +743,7 @@ function attachChartEditing(container, element, context, repaint) {
|
|
|
743
743
|
seriesIndex: part.seriesIndex,
|
|
744
744
|
pointIndex: part.pointIndex
|
|
745
745
|
});
|
|
746
|
-
const startedMark =
|
|
746
|
+
const startedMark = chunk72NIN6QF_cjs.beginChartMarkDrag({
|
|
747
747
|
part,
|
|
748
748
|
geometry: markGeometry,
|
|
749
749
|
chartData: chart.chartData,
|
|
@@ -835,7 +835,7 @@ function mountThreeViewInto(doc, wrapper, options) {
|
|
|
835
835
|
return view;
|
|
836
836
|
}
|
|
837
837
|
function isChart3DEditable(element, context) {
|
|
838
|
-
return element.type === "chart" && Boolean(context.interactive) && Boolean(context.onChartPointChange) && Boolean(context.selectedElementIds?.has(element.id)) &&
|
|
838
|
+
return element.type === "chart" && Boolean(context.interactive) && Boolean(context.onChartPointChange) && Boolean(context.selectedElementIds?.has(element.id)) && chunk72NIN6QF_cjs.canDrillDown(element);
|
|
839
839
|
}
|
|
840
840
|
function selectedChartPartOf(element, context) {
|
|
841
841
|
return context.chartPartSelection?.elementId === element.id ? context.chartPartSelection.part : null;
|
|
@@ -877,13 +877,13 @@ function wireChartThreeViewEvents(view, element, context, badgeHost) {
|
|
|
877
877
|
const listeners = new AbortController();
|
|
878
878
|
chartViewListeners.set(view, listeners);
|
|
879
879
|
view.addEventListener(
|
|
880
|
-
|
|
881
|
-
(event) =>
|
|
880
|
+
chunk72NIN6QF_cjs.THREE_VIEW_EVENTS.select,
|
|
881
|
+
(event) => chunk72NIN6QF_cjs.applyChart3DSelect(bridge, event.detail.part),
|
|
882
882
|
{ signal: listeners.signal }
|
|
883
883
|
);
|
|
884
884
|
view.addEventListener(
|
|
885
|
-
|
|
886
|
-
(event) =>
|
|
885
|
+
chunk72NIN6QF_cjs.THREE_VIEW_EVENTS.drag,
|
|
886
|
+
(event) => chunk72NIN6QF_cjs.applyChart3DDrag(bridge, event.detail),
|
|
887
887
|
{ signal: listeners.signal }
|
|
888
888
|
);
|
|
889
889
|
}
|
|
@@ -897,7 +897,7 @@ function applyThreeViewTextStyle(el, style) {
|
|
|
897
897
|
// src/pptx/dom/elements/chart.ts
|
|
898
898
|
var renderChartElement = (element, zIndex, context) => {
|
|
899
899
|
const wrapper = renderChartSvgElement(element, zIndex, context);
|
|
900
|
-
const spec = wrapper ?
|
|
900
|
+
const spec = wrapper ? chunk72NIN6QF_cjs.resolveChartThreeViewSpec(element, rendering3DFlagsOf(context)) : null;
|
|
901
901
|
if (!wrapper || !spec) {
|
|
902
902
|
return wrapper;
|
|
903
903
|
}
|
|
@@ -920,11 +920,11 @@ var renderChartSvgElement = (element, zIndex, context) => {
|
|
|
920
920
|
"div",
|
|
921
921
|
"pptxv-element pptxv-chart",
|
|
922
922
|
// The chart area's outer shadow and glow sit on the frame, outside the chart.
|
|
923
|
-
{ ...
|
|
923
|
+
{ ...chunk72NIN6QF_cjs.getContainerStyle(element, zIndex), ...chunk72NIN6QF_cjs.getFrameEffectStyle(element) }
|
|
924
924
|
);
|
|
925
925
|
container.dataset.elementId = element.id;
|
|
926
926
|
const animationState = context.presentationStates?.get(element.id);
|
|
927
|
-
const chartData = element.chartData ?
|
|
927
|
+
const chartData = element.chartData ? chunk72NIN6QF_cjs.resolveRevealedChartData(element.chartData, animationState) : element.chartData;
|
|
928
928
|
if (!chartData || chartData.series.length === 0) {
|
|
929
929
|
container.appendChild(renderChartPlaceholder(doc, chartData?.chartType ?? "bar", context.t));
|
|
930
930
|
return container;
|
|
@@ -971,7 +971,7 @@ function renderChartPlaceholder(doc, chartType, t) {
|
|
|
971
971
|
border: "1px dashed #cbd5e1",
|
|
972
972
|
boxSizing: "border-box"
|
|
973
973
|
});
|
|
974
|
-
placeholder.textContent =
|
|
974
|
+
placeholder.textContent = chunk72NIN6QF_cjs.chartPlaceholderLabel(chartType, (key, params) => t(key, params));
|
|
975
975
|
return placeholder;
|
|
976
976
|
}
|
|
977
977
|
|
|
@@ -1035,7 +1035,7 @@ function createRunBaseNode(doc, run) {
|
|
|
1035
1035
|
verticalAlign: "middle",
|
|
1036
1036
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
1037
1037
|
});
|
|
1038
|
-
math.innerHTML =
|
|
1038
|
+
math.innerHTML = chunk72NIN6QF_cjs.runEquationMathMl(run.equation);
|
|
1039
1039
|
host.appendChild(math);
|
|
1040
1040
|
if (run.equation.number) {
|
|
1041
1041
|
const number = createEl(doc, "span", "pptxv-equation-number", {
|
|
@@ -1047,7 +1047,7 @@ function createRunBaseNode(doc, run) {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
return host;
|
|
1049
1049
|
}
|
|
1050
|
-
if (run.hyperlink &&
|
|
1050
|
+
if (run.hyperlink && chunk72NIN6QF_cjs.isRunHyperlinkClickable(run.hyperlink)) {
|
|
1051
1051
|
const link = createEl(doc, "a", "pptxv-link", run.style);
|
|
1052
1052
|
link.setAttribute("data-pptx-hyperlink", run.hyperlink.url);
|
|
1053
1053
|
link.setAttribute("role", "link");
|
|
@@ -1152,7 +1152,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1152
1152
|
bullet.textContent = para.bulletMarker;
|
|
1153
1153
|
p.appendChild(bullet);
|
|
1154
1154
|
}
|
|
1155
|
-
const spec = build ?
|
|
1155
|
+
const spec = build ? chunk72NIN6QF_cjs.buildTextBuildSpec(
|
|
1156
1156
|
build.elementId,
|
|
1157
1157
|
paragraphs.indexOf(para),
|
|
1158
1158
|
para.runs.filter((run) => run.text !== NEWLINE_RUN).map((run) => ({ text: run.text, style: run.style })),
|
|
@@ -1161,7 +1161,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1161
1161
|
if (spec && spec.granularity !== "paragraph") {
|
|
1162
1162
|
for (const span of spec.spans ?? []) {
|
|
1163
1163
|
const node = createEl(doc, "span");
|
|
1164
|
-
applyStyleMap(node, { ...span.style ?? {}, ...
|
|
1164
|
+
applyStyleMap(node, { ...span.style ?? {}, ...chunk72NIN6QF_cjs.textBuildSpanStyle(span) });
|
|
1165
1165
|
if (span.animId) {
|
|
1166
1166
|
node.setAttribute("data-anim-id", span.animId);
|
|
1167
1167
|
}
|
|
@@ -1174,7 +1174,7 @@ function renderTextBlock(doc, paragraphs, textStyle, build) {
|
|
|
1174
1174
|
let runHost = p;
|
|
1175
1175
|
if (spec) {
|
|
1176
1176
|
const wrapper = createEl(doc, "span");
|
|
1177
|
-
applyStyleMap(wrapper,
|
|
1177
|
+
applyStyleMap(wrapper, chunk72NIN6QF_cjs.textBuildSpanStyle(spec));
|
|
1178
1178
|
if (spec.animId) {
|
|
1179
1179
|
wrapper.setAttribute("data-anim-id", spec.animId);
|
|
1180
1180
|
}
|
|
@@ -1230,7 +1230,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1230
1230
|
if (element.hidden) {
|
|
1231
1231
|
wrapper.style.display = "none";
|
|
1232
1232
|
}
|
|
1233
|
-
const lineGlow =
|
|
1233
|
+
const lineGlow = chunk72NIN6QF_cjs.getLineGlowFilterCss(ss);
|
|
1234
1234
|
if (lineGlow) {
|
|
1235
1235
|
wrapper.style.filter = lineGlow;
|
|
1236
1236
|
}
|
|
@@ -1238,7 +1238,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1238
1238
|
svg.setAttribute("style", "overflow:visible;display:block");
|
|
1239
1239
|
const seed = element.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
|
|
1240
1240
|
const defs = createSvgEl(doc, "defs");
|
|
1241
|
-
const lineShadow =
|
|
1241
|
+
const lineShadow = chunk72NIN6QF_cjs.getLineShadowParams(ss);
|
|
1242
1242
|
const shadowId = lineShadow ? `${seed}-line-shadow` : void 0;
|
|
1243
1243
|
if (lineShadow && shadowId) {
|
|
1244
1244
|
const filter = createSvgEl(doc, "filter", {
|
|
@@ -1259,8 +1259,8 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1259
1259
|
);
|
|
1260
1260
|
defs.appendChild(filter);
|
|
1261
1261
|
}
|
|
1262
|
-
const startArrow =
|
|
1263
|
-
const endArrow =
|
|
1262
|
+
const startArrow = chunk72NIN6QF_cjs.normalizeArrow(ss?.connectorStartArrow);
|
|
1263
|
+
const endArrow = chunk72NIN6QF_cjs.normalizeArrow(ss?.connectorEndArrow);
|
|
1264
1264
|
const startMarkerId = startArrow ? `${seed}-start` : void 0;
|
|
1265
1265
|
const endMarkerId = endArrow ? `${seed}-end` : void 0;
|
|
1266
1266
|
if (startArrow && startMarkerId) {
|
|
@@ -1283,10 +1283,10 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1283
1283
|
svg.appendChild(defs);
|
|
1284
1284
|
}
|
|
1285
1285
|
const compound = ss?.compoundLine;
|
|
1286
|
-
const offsets =
|
|
1287
|
-
const widths =
|
|
1286
|
+
const offsets = chunk72NIN6QF_cjs.getCompoundLineOffsets(compound, strokeWidth);
|
|
1287
|
+
const widths = chunk72NIN6QF_cjs.getCompoundLineWidths(compound, strokeWidth);
|
|
1288
1288
|
const shapeType = pptx.hasShapeProperties(element) ? element.shapeType : void 0;
|
|
1289
|
-
const usePath =
|
|
1289
|
+
const usePath = chunk72NIN6QF_cjs.connectorNeedsPath(shapeType) && pptx.hasShapeProperties(element);
|
|
1290
1290
|
const pathData = usePath ? pptx.getConnectorPathGeometry(element).pathData : void 0;
|
|
1291
1291
|
const x1 = element.flipHorizontal ? w : 0;
|
|
1292
1292
|
const y1 = element.flipVertical ? h : 0;
|
|
@@ -1297,7 +1297,7 @@ var renderConnectorElement = (element, zIndex, context) => {
|
|
|
1297
1297
|
d: pathData ?? `M${x1},${y1} L${x2},${y2}`,
|
|
1298
1298
|
fill: "none",
|
|
1299
1299
|
stroke: "transparent",
|
|
1300
|
-
"stroke-width":
|
|
1300
|
+
"stroke-width": chunk72NIN6QF_cjs.connectorHitStrokeWidth(strokeWidth),
|
|
1301
1301
|
"stroke-linecap": "round",
|
|
1302
1302
|
"stroke-linejoin": "round"
|
|
1303
1303
|
});
|
|
@@ -1347,7 +1347,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1347
1347
|
if (!pptx.hasTextProperties(element)) {
|
|
1348
1348
|
return;
|
|
1349
1349
|
}
|
|
1350
|
-
const paragraphs =
|
|
1350
|
+
const paragraphs = chunk72NIN6QF_cjs.buildParagraphs(element, context.fieldContext);
|
|
1351
1351
|
if (!paragraphs.some((paragraph) => paragraph.runs.length > 0)) {
|
|
1352
1352
|
return;
|
|
1353
1353
|
}
|
|
@@ -1367,7 +1367,7 @@ function appendConnectorLabel(wrapper, element, context) {
|
|
|
1367
1367
|
}
|
|
1368
1368
|
function buildMarker(context, id, arrow, strokeColor, size) {
|
|
1369
1369
|
const doc = context.document;
|
|
1370
|
-
const shape =
|
|
1370
|
+
const shape = chunk72NIN6QF_cjs.markerPath(arrow, size.width, size.length);
|
|
1371
1371
|
const marker = createSvgEl(doc, "marker", {
|
|
1372
1372
|
id,
|
|
1373
1373
|
viewBox: "0 0 10 10",
|
|
@@ -1452,7 +1452,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1452
1452
|
doc,
|
|
1453
1453
|
"div",
|
|
1454
1454
|
"pptxv-element pptxv-contentpart",
|
|
1455
|
-
|
|
1455
|
+
chunk72NIN6QF_cjs.getContainerStyle(element, zIndex)
|
|
1456
1456
|
);
|
|
1457
1457
|
el.dataset.elementId = element.id;
|
|
1458
1458
|
const strokes = element.inkStrokes;
|
|
@@ -1485,7 +1485,7 @@ var renderContentPartElement = (element, zIndex, context) => {
|
|
|
1485
1485
|
return el;
|
|
1486
1486
|
};
|
|
1487
1487
|
function renderEquations(element, context) {
|
|
1488
|
-
if (!pptx.hasTextProperties(element) || !
|
|
1488
|
+
if (!pptx.hasTextProperties(element) || !chunk72NIN6QF_cjs.isEquationOnlyText(element.textSegments)) {
|
|
1489
1489
|
return null;
|
|
1490
1490
|
}
|
|
1491
1491
|
const equations = (element.textSegments ?? []).filter((segment) => segment.equationXml);
|
|
@@ -1499,7 +1499,7 @@ function renderEquations(element, context) {
|
|
|
1499
1499
|
fontFamily: "'Cambria Math', 'STIX Two Math', serif"
|
|
1500
1500
|
});
|
|
1501
1501
|
for (const segment of equations) {
|
|
1502
|
-
const mathml =
|
|
1502
|
+
const mathml = chunk72NIN6QF_cjs.convertOmmlToMathMl(segment.equationXml);
|
|
1503
1503
|
if (!mathml) {
|
|
1504
1504
|
continue;
|
|
1505
1505
|
}
|
|
@@ -1513,7 +1513,7 @@ function renderEquations(element, context) {
|
|
|
1513
1513
|
flex: 1,
|
|
1514
1514
|
textAlign: "center"
|
|
1515
1515
|
});
|
|
1516
|
-
math.innerHTML =
|
|
1516
|
+
math.innerHTML = chunk72NIN6QF_cjs.sanitizeMathMl(mathml);
|
|
1517
1517
|
row.appendChild(math);
|
|
1518
1518
|
if (segment.equationNumber) {
|
|
1519
1519
|
const number = createEl(context.document, "span", "pptxv-equation-number", {
|
|
@@ -1531,7 +1531,7 @@ function renderExtrusionOverlay(doc, element) {
|
|
|
1531
1531
|
return null;
|
|
1532
1532
|
}
|
|
1533
1533
|
const fill = chunkG3UVZ5FO_cjs.getComputedFillStyle(element)?.backgroundColor;
|
|
1534
|
-
const data =
|
|
1534
|
+
const data = chunk72NIN6QF_cjs.build3DExtrusionData(
|
|
1535
1535
|
element.shapeStyle?.shape3d,
|
|
1536
1536
|
element.shapeStyle?.scene3d,
|
|
1537
1537
|
fill,
|
|
@@ -1593,7 +1593,7 @@ function appendOwnReflection(doc, host, element, mediaDataUrls, suppressOwnRefle
|
|
|
1593
1593
|
if (suppressOwnReflection) {
|
|
1594
1594
|
return;
|
|
1595
1595
|
}
|
|
1596
|
-
const wrapperStyle =
|
|
1596
|
+
const wrapperStyle = chunk72NIN6QF_cjs.getComputedEffectStyle(element).reflection;
|
|
1597
1597
|
if (!wrapperStyle) {
|
|
1598
1598
|
return;
|
|
1599
1599
|
}
|
|
@@ -1617,9 +1617,9 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1617
1617
|
if (groupFilterDefs) {
|
|
1618
1618
|
wrap.appendChild(groupFilterDefs);
|
|
1619
1619
|
}
|
|
1620
|
-
const childParentFill =
|
|
1620
|
+
const childParentFill = chunk72NIN6QF_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1621
1621
|
for (const child of element.children ?? []) {
|
|
1622
|
-
const childWrap = createEl(doc, "div", void 0,
|
|
1622
|
+
const childWrap = createEl(doc, "div", void 0, chunk72NIN6QF_cjs.getContainerStyle(child, 0));
|
|
1623
1623
|
childWrap.appendChild(
|
|
1624
1624
|
buildReflectionMirrorContent(doc, child, mediaDataUrls, childParentFill)
|
|
1625
1625
|
);
|
|
@@ -1633,7 +1633,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1633
1633
|
height: "100%",
|
|
1634
1634
|
...getShapeFillStrokeStyle(element)
|
|
1635
1635
|
});
|
|
1636
|
-
const inheritedFill =
|
|
1636
|
+
const inheritedFill = chunk72NIN6QF_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1637
1637
|
if (inheritedFill) {
|
|
1638
1638
|
applyInheritedFill(box, inheritedFill);
|
|
1639
1639
|
}
|
|
@@ -1654,12 +1654,12 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1654
1654
|
box.appendChild(gradientOutline);
|
|
1655
1655
|
}
|
|
1656
1656
|
if (pptx.isImageLikeElement(element)) {
|
|
1657
|
-
const src =
|
|
1657
|
+
const src = chunk72NIN6QF_cjs.getImageSrc(element, new Map(mediaDataUrls));
|
|
1658
1658
|
if (src) {
|
|
1659
1659
|
const img = createEl(doc, "img", void 0, {
|
|
1660
1660
|
width: "100%",
|
|
1661
1661
|
height: "100%",
|
|
1662
|
-
...
|
|
1662
|
+
...chunk72NIN6QF_cjs.getImageFitStyle(element)
|
|
1663
1663
|
});
|
|
1664
1664
|
img.setAttribute("src", src);
|
|
1665
1665
|
img.setAttribute("alt", "");
|
|
@@ -1669,7 +1669,7 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1669
1669
|
appendOwnReflection(doc, box, element, mediaDataUrls, suppressOwnReflection);
|
|
1670
1670
|
return box;
|
|
1671
1671
|
}
|
|
1672
|
-
const paragraphs =
|
|
1672
|
+
const paragraphs = chunk72NIN6QF_cjs.buildParagraphs(element);
|
|
1673
1673
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
1674
1674
|
if (hasText) {
|
|
1675
1675
|
box.appendChild(renderTextBlock(doc, paragraphs, getTextBlockStyle(element)));
|
|
@@ -1681,20 +1681,20 @@ function buildReflectionMirrorContent(doc, element, mediaDataUrls, parentGroupFi
|
|
|
1681
1681
|
// src/pptx/dom/elements/shape-filter-defs.ts
|
|
1682
1682
|
var OUTLINE_SVG_STYLE = "position:absolute;inset:0;width:100%;height:100%;min-width:1px;min-height:1px;overflow:visible;pointer-events:none";
|
|
1683
1683
|
function renderShapeFilterDefs(doc, element) {
|
|
1684
|
-
const style =
|
|
1684
|
+
const style = chunk72NIN6QF_cjs.getEffectStyleSource(element);
|
|
1685
1685
|
if (!style) {
|
|
1686
1686
|
return null;
|
|
1687
1687
|
}
|
|
1688
1688
|
const markups = [];
|
|
1689
|
-
const duotone =
|
|
1689
|
+
const duotone = chunk72NIN6QF_cjs.getDuotoneSvgFilter(style, element.id);
|
|
1690
1690
|
if (duotone) {
|
|
1691
1691
|
markups.push(duotone.filterMarkup);
|
|
1692
1692
|
}
|
|
1693
|
-
const softEdge =
|
|
1693
|
+
const softEdge = chunk72NIN6QF_cjs.getSoftEdgeSvgFilter(style, element.id);
|
|
1694
1694
|
if (softEdge) {
|
|
1695
1695
|
markups.push(softEdge.filterMarkup);
|
|
1696
1696
|
}
|
|
1697
|
-
const bevelLighting =
|
|
1697
|
+
const bevelLighting = chunk72NIN6QF_cjs.getBevelLightingSvgFilter(element);
|
|
1698
1698
|
if (bevelLighting) {
|
|
1699
1699
|
markups.push(bevelLighting.filterMarkup);
|
|
1700
1700
|
}
|
|
@@ -1712,7 +1712,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1712
1712
|
if (!pptx.hasShapeProperties(element)) {
|
|
1713
1713
|
return null;
|
|
1714
1714
|
}
|
|
1715
|
-
const overlay =
|
|
1715
|
+
const overlay = chunk72NIN6QF_cjs.getComputedEffectStyle(element).fillOverlay;
|
|
1716
1716
|
if (!overlay) {
|
|
1717
1717
|
return null;
|
|
1718
1718
|
}
|
|
@@ -1727,7 +1727,7 @@ function renderShapeFillOverlay(doc, element) {
|
|
|
1727
1727
|
return layer;
|
|
1728
1728
|
}
|
|
1729
1729
|
function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
1730
|
-
const wrapperStyle =
|
|
1730
|
+
const wrapperStyle = chunk72NIN6QF_cjs.getComputedEffectStyle(element).reflection;
|
|
1731
1731
|
if (!wrapperStyle) {
|
|
1732
1732
|
return null;
|
|
1733
1733
|
}
|
|
@@ -1737,13 +1737,13 @@ function renderReflectionOverlay(doc, element, mediaDataUrls) {
|
|
|
1737
1737
|
return layer;
|
|
1738
1738
|
}
|
|
1739
1739
|
function renderHollowHitOutline(doc, element) {
|
|
1740
|
-
const hit =
|
|
1740
|
+
const hit = chunk72NIN6QF_cjs.buildHollowHitOutline(element);
|
|
1741
1741
|
if (!hit) {
|
|
1742
1742
|
return null;
|
|
1743
1743
|
}
|
|
1744
1744
|
const svg = createSvgEl(doc, "svg", {
|
|
1745
1745
|
"aria-hidden": "true",
|
|
1746
|
-
viewBox:
|
|
1746
|
+
viewBox: chunk72NIN6QF_cjs.strokeOutlineViewBox(element),
|
|
1747
1747
|
preserveAspectRatio: "none"
|
|
1748
1748
|
});
|
|
1749
1749
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
@@ -1776,20 +1776,20 @@ function renderShapeSubpathFillOverlay(doc, element) {
|
|
|
1776
1776
|
return svg;
|
|
1777
1777
|
}
|
|
1778
1778
|
function renderStrokeOutline(doc, element) {
|
|
1779
|
-
const outline =
|
|
1779
|
+
const outline = chunk72NIN6QF_cjs.buildStrokeOutline(element);
|
|
1780
1780
|
if (!outline) {
|
|
1781
1781
|
return null;
|
|
1782
1782
|
}
|
|
1783
1783
|
const svg = createSvgEl(doc, "svg", {
|
|
1784
1784
|
class: "pptx-vanilla-gradient-outline",
|
|
1785
1785
|
"aria-hidden": "true",
|
|
1786
|
-
viewBox:
|
|
1786
|
+
viewBox: chunk72NIN6QF_cjs.strokeOutlineViewBox(element),
|
|
1787
1787
|
preserveAspectRatio: "none"
|
|
1788
1788
|
});
|
|
1789
1789
|
svg.setAttribute("style", OUTLINE_SVG_STYLE);
|
|
1790
1790
|
if (outline.paint) {
|
|
1791
1791
|
const defs = createSvgEl(doc, "defs");
|
|
1792
|
-
if (
|
|
1792
|
+
if (chunk72NIN6QF_cjs.isPatternPaint(outline.paint)) {
|
|
1793
1793
|
const pattern = createSvgEl(doc, "pattern", {
|
|
1794
1794
|
id: outline.paint.id,
|
|
1795
1795
|
width: outline.paint.width,
|
|
@@ -1804,7 +1804,7 @@ function renderStrokeOutline(doc, element) {
|
|
|
1804
1804
|
pattern.appendChild(image);
|
|
1805
1805
|
defs.appendChild(pattern);
|
|
1806
1806
|
} else {
|
|
1807
|
-
defs.innerHTML =
|
|
1807
|
+
defs.innerHTML = chunk72NIN6QF_cjs.svgGradientMarkup(outline.paint);
|
|
1808
1808
|
}
|
|
1809
1809
|
svg.appendChild(defs);
|
|
1810
1810
|
}
|
|
@@ -1863,14 +1863,14 @@ function indexRenderedNodes(root) {
|
|
|
1863
1863
|
return byId;
|
|
1864
1864
|
}
|
|
1865
1865
|
function paintInheritedFill(node, element, parentGroupFill) {
|
|
1866
|
-
const inherited =
|
|
1866
|
+
const inherited = chunk72NIN6QF_cjs.resolveGroupChildFill(element, parentGroupFill);
|
|
1867
1867
|
if (inherited) {
|
|
1868
1868
|
applyGroupChildFill(node, inherited);
|
|
1869
1869
|
}
|
|
1870
1870
|
if (element.type !== "group") {
|
|
1871
1871
|
return;
|
|
1872
1872
|
}
|
|
1873
|
-
const childFill =
|
|
1873
|
+
const childFill = chunk72NIN6QF_cjs.getGroupChildParentFill(element, parentGroupFill);
|
|
1874
1874
|
if (!childFill) {
|
|
1875
1875
|
return;
|
|
1876
1876
|
}
|
|
@@ -1884,7 +1884,7 @@ function paintInheritedFill(node, element, parentGroupFill) {
|
|
|
1884
1884
|
}
|
|
1885
1885
|
var renderGroupElement = (element, zIndex, context) => {
|
|
1886
1886
|
const el = createEl(context.document, "div", "pptxv-element pptxv-group", {
|
|
1887
|
-
...
|
|
1887
|
+
...chunk72NIN6QF_cjs.getContainerStyle(element, zIndex),
|
|
1888
1888
|
// A group paints no fill/outline of its own, but `p:grpSpPr/a:effectLst`
|
|
1889
1889
|
// DOES carry a shadow/glow/soft-edge for the group's own composite
|
|
1890
1890
|
// raster (see shared `getComputedEffectStyle`), expressed as `filter` /
|
|
@@ -1901,7 +1901,7 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1901
1901
|
el.appendChild(reflection);
|
|
1902
1902
|
}
|
|
1903
1903
|
if (element.type === "group" && element.children?.length) {
|
|
1904
|
-
const parentGroupFill =
|
|
1904
|
+
const parentGroupFill = chunk72NIN6QF_cjs.getGroupChildParentFill(element);
|
|
1905
1905
|
element.children.forEach((child, index) => {
|
|
1906
1906
|
const childEl = context.renderElement(child, index);
|
|
1907
1907
|
if (childEl) {
|
|
@@ -1916,16 +1916,16 @@ var renderGroupElement = (element, zIndex, context) => {
|
|
|
1916
1916
|
// src/pptx/dom/elements/image.ts
|
|
1917
1917
|
var renderImageElement = (element, zIndex, context) => {
|
|
1918
1918
|
const doc = context.document;
|
|
1919
|
-
const geometry = element.type === "image" || element.type === "picture" ?
|
|
1919
|
+
const geometry = element.type === "image" || element.type === "picture" ? chunk72NIN6QF_cjs.resolveShapeGeometry(element) : void 0;
|
|
1920
1920
|
const geometryClipPath = geometry?.kind === "clipPath" ? geometry.clipPath : void 0;
|
|
1921
|
-
const cropShapeClipPath = element.type === "image" || element.type === "picture" ?
|
|
1922
|
-
const layers =
|
|
1923
|
-
overflow:
|
|
1921
|
+
const cropShapeClipPath = element.type === "image" || element.type === "picture" ? chunk72NIN6QF_cjs.getCropShapeClipPath(element.cropShape, element.width, element.height) : void 0;
|
|
1922
|
+
const layers = chunk72NIN6QF_cjs.getPictureFrameLayers(element, {
|
|
1923
|
+
overflow: chunk72NIN6QF_cjs.getImageOverflow(element),
|
|
1924
1924
|
borderRadius: geometry?.kind === "borderRadius" ? geometry.radius : void 0,
|
|
1925
1925
|
clipPath: geometryClipPath ?? cropShapeClipPath
|
|
1926
1926
|
});
|
|
1927
1927
|
const el = createEl(doc, "div", "pptxv-element pptxv-image", {
|
|
1928
|
-
...
|
|
1928
|
+
...chunk72NIN6QF_cjs.getContainerStyle(element, zIndex),
|
|
1929
1929
|
...layers.box
|
|
1930
1930
|
});
|
|
1931
1931
|
el.dataset.elementId = element.id;
|
|
@@ -1937,11 +1937,11 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1937
1937
|
el.appendChild(outline);
|
|
1938
1938
|
}
|
|
1939
1939
|
}
|
|
1940
|
-
const src =
|
|
1940
|
+
const src = chunk72NIN6QF_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
1941
1941
|
if (!src) {
|
|
1942
1942
|
return el;
|
|
1943
1943
|
}
|
|
1944
|
-
const fx =
|
|
1944
|
+
const fx = chunk72NIN6QF_cjs.getComputedImageStyle(element);
|
|
1945
1945
|
for (const f of fx.svgFilters) {
|
|
1946
1946
|
const svg = createSvgEl(doc, "svg", { width: 0, height: 0, "aria-hidden": "true" });
|
|
1947
1947
|
svg.setAttribute("style", "position:absolute;width:0;height:0;overflow:hidden");
|
|
@@ -1954,7 +1954,7 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1954
1954
|
surface.appendChild(svg);
|
|
1955
1955
|
}
|
|
1956
1956
|
const reflection = renderReflectionOverlay(doc, element, context.mediaDataUrls);
|
|
1957
|
-
const tiling =
|
|
1957
|
+
const tiling = chunk72NIN6QF_cjs.getImageTilingStyle(element, chunk72NIN6QF_cjs.getCachedNativeImageSize(src));
|
|
1958
1958
|
if (tiling) {
|
|
1959
1959
|
const tile = createEl(doc, "div", "pptxv-image-tile", tiling);
|
|
1960
1960
|
if (fx.filter) {
|
|
@@ -1963,10 +1963,10 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1963
1963
|
if (fx.opacity !== void 0) {
|
|
1964
1964
|
tile.style.opacity = String(fx.opacity);
|
|
1965
1965
|
}
|
|
1966
|
-
if (!
|
|
1967
|
-
void
|
|
1966
|
+
if (!chunk72NIN6QF_cjs.getCachedNativeImageSize(src)) {
|
|
1967
|
+
void chunk72NIN6QF_cjs.probeNativeImageSize(src).then((size) => {
|
|
1968
1968
|
if (size) {
|
|
1969
|
-
applyStyleMap(tile,
|
|
1969
|
+
applyStyleMap(tile, chunk72NIN6QF_cjs.getImageTilingStyle(element, size) ?? {});
|
|
1970
1970
|
}
|
|
1971
1971
|
return void 0;
|
|
1972
1972
|
});
|
|
@@ -1977,8 +1977,8 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1977
1977
|
}
|
|
1978
1978
|
return el;
|
|
1979
1979
|
}
|
|
1980
|
-
const fit =
|
|
1981
|
-
const fillCounterTransform =
|
|
1980
|
+
const fit = chunk72NIN6QF_cjs.getImageFitStyle(element);
|
|
1981
|
+
const fillCounterTransform = chunk72NIN6QF_cjs.getImageFillCounterTransform(element, Boolean(fit.transform));
|
|
1982
1982
|
const img = createEl(doc, "img", void 0, {
|
|
1983
1983
|
...fit,
|
|
1984
1984
|
display: "block",
|
|
@@ -1997,14 +1997,14 @@ var renderImageElement = (element, zIndex, context) => {
|
|
|
1997
1997
|
if (element.type === "image" || element.type === "picture") {
|
|
1998
1998
|
const clrChange = element.imageEffects?.clrChange;
|
|
1999
1999
|
if (clrChange) {
|
|
2000
|
-
void
|
|
2000
|
+
void chunk72NIN6QF_cjs.resolveColorChangedImageSource(src, clrChange).then((resolved) => {
|
|
2001
2001
|
if (img.src === src || img.getAttribute("src") === src) {
|
|
2002
2002
|
img.src = resolved;
|
|
2003
2003
|
}
|
|
2004
2004
|
return void 0;
|
|
2005
2005
|
});
|
|
2006
2006
|
}
|
|
2007
|
-
const wash =
|
|
2007
|
+
const wash = chunk72NIN6QF_cjs.getImageColorWashStyle(element.imageEffects?.colorWash);
|
|
2008
2008
|
if (wash) {
|
|
2009
2009
|
surface.appendChild(
|
|
2010
2010
|
createEl(doc, "div", "pptxv-image-color-wash", {
|
|
@@ -2033,7 +2033,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
2033
2033
|
doc,
|
|
2034
2034
|
"div",
|
|
2035
2035
|
"pptxv-element pptxv-ink",
|
|
2036
|
-
|
|
2036
|
+
chunk72NIN6QF_cjs.getContainerStyle(element, zIndex)
|
|
2037
2037
|
);
|
|
2038
2038
|
wrapper.dataset.elementId = element.id;
|
|
2039
2039
|
const paths = element.inkPaths;
|
|
@@ -2054,7 +2054,7 @@ var renderInkElement = (element, zIndex, context) => {
|
|
|
2054
2054
|
keyframes.textContent = chunkNTXHQHCS_cjs.INK_REPLAY_KEYFRAMES;
|
|
2055
2055
|
svg.appendChild(keyframes);
|
|
2056
2056
|
}
|
|
2057
|
-
const views =
|
|
2057
|
+
const views = chunk72NIN6QF_cjs.buildInkGroupStrokes(element, { color: chunkG3UVZ5FO_cjs.DEFAULT_STROKE_COLOR, width: 1 });
|
|
2058
2058
|
for (const [i, view] of views.entries()) {
|
|
2059
2059
|
svg.appendChild(buildStrokeSvg(doc, view, replayStyles[i]));
|
|
2060
2060
|
}
|
|
@@ -2108,12 +2108,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2108
2108
|
let stopButton = null;
|
|
2109
2109
|
const update = (playing) => {
|
|
2110
2110
|
const input = { fullScreen: element.fullScreen, presenting: context.presenting, playing };
|
|
2111
|
-
const active =
|
|
2111
|
+
const active = chunk72NIN6QF_cjs.isMediaFullscreenActive(input);
|
|
2112
2112
|
applyStyleMap(
|
|
2113
2113
|
container,
|
|
2114
|
-
active ?
|
|
2114
|
+
active ? chunk72NIN6QF_cjs.MEDIA_FULLSCREEN_OVERLAY_STYLE : mediaFullscreenResetStyle(baseStyle)
|
|
2115
2115
|
);
|
|
2116
|
-
if (
|
|
2116
|
+
if (chunk72NIN6QF_cjs.shouldShowMediaFullscreenStopButton(input)) {
|
|
2117
2117
|
if (!stopButton) {
|
|
2118
2118
|
stopButton = buildFullscreenStopButton(
|
|
2119
2119
|
doc,
|
|
@@ -2138,12 +2138,12 @@ function wireMediaFullscreenOverlay(doc, container, mediaNode, element, context,
|
|
|
2138
2138
|
|
|
2139
2139
|
// src/pptx/dom/elements/media.ts
|
|
2140
2140
|
function applyMediaPresentingState(el, presenting, playback) {
|
|
2141
|
-
|
|
2141
|
+
chunk72NIN6QF_cjs.applyMediaPlaybackAttributes(el, playback);
|
|
2142
2142
|
if (presenting) {
|
|
2143
|
-
|
|
2144
|
-
|
|
2143
|
+
chunk72NIN6QF_cjs.startMediaAutoplay(el, { trimStartMs: playback.trimStartMs });
|
|
2144
|
+
chunk72NIN6QF_cjs.scheduleMediaTrimAndFade(el, {
|
|
2145
2145
|
...playback,
|
|
2146
|
-
volume:
|
|
2146
|
+
volume: chunk72NIN6QF_cjs.mediaPlaybackAttributes(playback).volume
|
|
2147
2147
|
});
|
|
2148
2148
|
} else if (!el.paused) {
|
|
2149
2149
|
el.pause();
|
|
@@ -2153,18 +2153,18 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2153
2153
|
if (element.type !== "media") {
|
|
2154
2154
|
return null;
|
|
2155
2155
|
}
|
|
2156
|
-
const surface =
|
|
2156
|
+
const surface = chunk72NIN6QF_cjs.mediaSurfaceOf({
|
|
2157
2157
|
interactive: context.interactive === true || context.reading === true,
|
|
2158
2158
|
presenting: context.presenting
|
|
2159
2159
|
});
|
|
2160
|
-
const showTransport =
|
|
2160
|
+
const showTransport = chunk72NIN6QF_cjs.mediaTransportVisible({ ...surface, canvasTransport: true });
|
|
2161
2161
|
const doc = context.document;
|
|
2162
|
-
const baseStyle =
|
|
2162
|
+
const baseStyle = chunk72NIN6QF_cjs.getContainerStyle(element, zIndex);
|
|
2163
2163
|
const el = createEl(doc, "div", "pptxv-element pptxv-media", baseStyle);
|
|
2164
2164
|
el.dataset.elementId = element.id;
|
|
2165
2165
|
const mediaSrc = element.mediaData ?? (element.mediaPath ? context.mediaDataUrls.get(element.mediaPath) : void 0);
|
|
2166
|
-
const posterSrc =
|
|
2167
|
-
const onlineVideoEmbedUrl =
|
|
2166
|
+
const posterSrc = chunk72NIN6QF_cjs.getImageSrc(element, new Map(context.mediaDataUrls));
|
|
2167
|
+
const onlineVideoEmbedUrl = chunk72NIN6QF_cjs.getOnlineVideoEmbed(element)?.embedUrl;
|
|
2168
2168
|
if (onlineVideoEmbedUrl && element.mediaType === "video") {
|
|
2169
2169
|
const iframe = createEl(doc, "iframe", "pptxv-media-video pptxv-media-iframe", {
|
|
2170
2170
|
width: "100%",
|
|
@@ -2174,8 +2174,8 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2174
2174
|
});
|
|
2175
2175
|
iframe.src = onlineVideoEmbedUrl;
|
|
2176
2176
|
iframe.title = context.t("pptx.media.onlineVideoTitle");
|
|
2177
|
-
iframe.allow =
|
|
2178
|
-
iframe.sandbox.value =
|
|
2177
|
+
iframe.allow = chunk72NIN6QF_cjs.ONLINE_VIDEO_IFRAME_ALLOW;
|
|
2178
|
+
iframe.sandbox.value = chunk72NIN6QF_cjs.ONLINE_VIDEO_IFRAME_SANDBOX;
|
|
2179
2179
|
iframe.allowFullscreen = true;
|
|
2180
2180
|
el.appendChild(iframe);
|
|
2181
2181
|
return el;
|
|
@@ -2204,21 +2204,21 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2204
2204
|
audio.src = mediaSrc;
|
|
2205
2205
|
audio.controls = showTransport;
|
|
2206
2206
|
el.appendChild(audio);
|
|
2207
|
-
if (context.presenting &&
|
|
2207
|
+
if (context.presenting && chunk72NIN6QF_cjs.registerCrossSlideAudio(element, mediaSrc)) {
|
|
2208
2208
|
audio.muted = true;
|
|
2209
|
-
|
|
2209
|
+
chunk72NIN6QF_cjs.applyMediaPlaybackAttributes(audio, element);
|
|
2210
2210
|
return el;
|
|
2211
2211
|
}
|
|
2212
2212
|
applyMediaPresentingState(audio, context.presenting, element);
|
|
2213
2213
|
wireMediaFullscreenOverlay(doc, el, audio, element, context, baseStyle);
|
|
2214
2214
|
return el;
|
|
2215
2215
|
}
|
|
2216
|
-
const fallback =
|
|
2216
|
+
const fallback = chunk72NIN6QF_cjs.mediaFallbackVisual(surface, {
|
|
2217
2217
|
hasPoster: Boolean(posterSrc),
|
|
2218
2218
|
missing: element.mediaMissing === true
|
|
2219
2219
|
});
|
|
2220
|
-
const icon =
|
|
2221
|
-
const labelKey =
|
|
2220
|
+
const icon = chunk72NIN6QF_cjs.mediaFallbackIcon(fallback, element.mediaType);
|
|
2221
|
+
const labelKey = chunk72NIN6QF_cjs.mediaFallbackLabelKey(fallback, element.mediaType);
|
|
2222
2222
|
if (fallback.poster && posterSrc) {
|
|
2223
2223
|
const img = createEl(doc, "img", "pptxv-media-poster", {
|
|
2224
2224
|
width: "100%",
|
|
@@ -2236,7 +2236,7 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2236
2236
|
if (fallback.badge === "missing") {
|
|
2237
2237
|
badge.classList.add("pptxv-media-badge-missing");
|
|
2238
2238
|
}
|
|
2239
|
-
badge.setAttribute(
|
|
2239
|
+
badge.setAttribute(chunk72NIN6QF_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.badge);
|
|
2240
2240
|
badge.appendChild(buildIcon(doc, icon));
|
|
2241
2241
|
if (labelKey !== void 0 && fallback.badge === "missing") {
|
|
2242
2242
|
const text = createEl(doc, "span");
|
|
@@ -2249,7 +2249,7 @@ var renderMediaElement = (element, zIndex, context) => {
|
|
|
2249
2249
|
}
|
|
2250
2250
|
if (fallback.placeholder !== "none") {
|
|
2251
2251
|
el.classList.add("pptxv-placeholder", "pptxv-media-placeholder");
|
|
2252
|
-
el.setAttribute(
|
|
2252
|
+
el.setAttribute(chunk72NIN6QF_cjs.MEDIA_CHROME_ATTRIBUTE, fallback.placeholder);
|
|
2253
2253
|
if (icon.length > 0) {
|
|
2254
2254
|
el.appendChild(buildIcon(doc, icon));
|
|
2255
2255
|
}
|
|
@@ -2285,7 +2285,7 @@ var renderModel3dElement = (element, zIndex, context) => {
|
|
|
2285
2285
|
doc,
|
|
2286
2286
|
"div",
|
|
2287
2287
|
"pptxv-element pptxv-model3d",
|
|
2288
|
-
|
|
2288
|
+
chunk72NIN6QF_cjs.getContainerStyle(element, zIndex)
|
|
2289
2289
|
);
|
|
2290
2290
|
el.dataset.elementId = element.id;
|
|
2291
2291
|
const label = context.t("pptx.model3d.label");
|
|
@@ -2422,7 +2422,7 @@ function buildOleIcon(doc, type, color) {
|
|
|
2422
2422
|
fill: "none",
|
|
2423
2423
|
"aria-hidden": "true"
|
|
2424
2424
|
});
|
|
2425
|
-
for (const shape of
|
|
2425
|
+
for (const shape of chunk72NIN6QF_cjs.getOleIconShapes(type)) {
|
|
2426
2426
|
const node = createSvgEl(doc, shape.tag, shape.attrs);
|
|
2427
2427
|
if (shape.tag === "text") {
|
|
2428
2428
|
node.setAttribute("fill", color);
|
|
@@ -2441,21 +2441,21 @@ var renderOleElement = (element, zIndex, context) => {
|
|
|
2441
2441
|
return null;
|
|
2442
2442
|
}
|
|
2443
2443
|
const doc = context.document;
|
|
2444
|
-
const oleType =
|
|
2445
|
-
const typeColor =
|
|
2446
|
-
const typeLabel =
|
|
2447
|
-
const el = createEl(doc, "div", "pptxv-element pptxv-ole",
|
|
2444
|
+
const oleType = chunk72NIN6QF_cjs.resolveOleType(element);
|
|
2445
|
+
const typeColor = chunk72NIN6QF_cjs.getOleTypeColor(oleType);
|
|
2446
|
+
const typeLabel = chunk72NIN6QF_cjs.getOleTypeLabel(oleType);
|
|
2447
|
+
const el = createEl(doc, "div", "pptxv-element pptxv-ole", chunk72NIN6QF_cjs.getContainerStyle(element, zIndex));
|
|
2448
2448
|
el.dataset.elementId = element.id;
|
|
2449
2449
|
el.setAttribute("role", "group");
|
|
2450
|
-
el.setAttribute("aria-label",
|
|
2450
|
+
el.setAttribute("aria-label", chunk72NIN6QF_cjs.getOleAriaLabel(element));
|
|
2451
2451
|
el.title = infoLines(element, typeLabel).join("\n");
|
|
2452
2452
|
if (element.previewImageData) {
|
|
2453
|
-
el.appendChild(buildPreview(doc, element, typeColor,
|
|
2453
|
+
el.appendChild(buildPreview(doc, element, typeColor, chunk72NIN6QF_cjs.getOleBadgeLabel(oleType)));
|
|
2454
2454
|
} else {
|
|
2455
2455
|
el.appendChild(buildPlaceholder2(doc, element, oleType, typeColor, typeLabel));
|
|
2456
2456
|
}
|
|
2457
|
-
const showActions =
|
|
2458
|
-
|
|
2457
|
+
const showActions = chunk72NIN6QF_cjs.oleActionsVisible(
|
|
2458
|
+
chunk72NIN6QF_cjs.mediaSurfaceOf({
|
|
2459
2459
|
interactive: context.interactive === true,
|
|
2460
2460
|
presenting: context.presenting
|
|
2461
2461
|
})
|
|
@@ -2471,7 +2471,7 @@ function infoLines(el, typeLabel) {
|
|
|
2471
2471
|
if (name) {
|
|
2472
2472
|
lines.push(name);
|
|
2473
2473
|
}
|
|
2474
|
-
const size =
|
|
2474
|
+
const size = chunk72NIN6QF_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2475
2475
|
if (size) {
|
|
2476
2476
|
lines.push(size);
|
|
2477
2477
|
}
|
|
@@ -2495,7 +2495,7 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2495
2495
|
display: "block"
|
|
2496
2496
|
});
|
|
2497
2497
|
img.src = el.previewImageData ?? "";
|
|
2498
|
-
img.alt =
|
|
2498
|
+
img.alt = chunk72NIN6QF_cjs.getOleAriaLabel(el);
|
|
2499
2499
|
img.draggable = false;
|
|
2500
2500
|
preview.appendChild(img);
|
|
2501
2501
|
const badge = createSvgEl(doc, "svg", { width: 24, height: 24, viewBox: "0 0 24 24" });
|
|
@@ -2522,7 +2522,7 @@ function buildPreview(doc, el, typeColor, badgeLabel) {
|
|
|
2522
2522
|
}
|
|
2523
2523
|
function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
2524
2524
|
const box = createEl(doc, "div", "pptxv-ole-placeholder", {
|
|
2525
|
-
...
|
|
2525
|
+
...chunk72NIN6QF_cjs.getPlaceholderStyle(oleType),
|
|
2526
2526
|
width: "100%",
|
|
2527
2527
|
height: "100%",
|
|
2528
2528
|
display: "flex",
|
|
@@ -2543,7 +2543,7 @@ function buildPlaceholder2(doc, el, oleType, typeColor, typeLabel) {
|
|
|
2543
2543
|
whiteSpace: "nowrap",
|
|
2544
2544
|
color: typeColor
|
|
2545
2545
|
});
|
|
2546
|
-
name.textContent =
|
|
2546
|
+
name.textContent = chunk72NIN6QF_cjs.getOleDisplayName(el);
|
|
2547
2547
|
box.appendChild(name);
|
|
2548
2548
|
if (el.fileName) {
|
|
2549
2549
|
const sublabel = createEl(doc, "span", "pptxv-ole-sublabel", {
|
|
@@ -2595,7 +2595,7 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2595
2595
|
for (const type of ["pointerdown", "mousedown", "click"]) {
|
|
2596
2596
|
bar.addEventListener(type, (event) => event.stopPropagation());
|
|
2597
2597
|
}
|
|
2598
|
-
const size =
|
|
2598
|
+
const size = chunk72NIN6QF_cjs.formatBytes(el.oleEmbeddedByteSize);
|
|
2599
2599
|
if (size) {
|
|
2600
2600
|
const meta = createEl(doc, "span", "pptxv-ole-meta", {
|
|
2601
2601
|
marginRight: "auto",
|
|
@@ -2615,14 +2615,14 @@ function buildActionBar(doc, el, typeLabel, context) {
|
|
|
2615
2615
|
download.title = downloadTitle;
|
|
2616
2616
|
download.textContent = context.t("pptx.ole.download");
|
|
2617
2617
|
bar.appendChild(download);
|
|
2618
|
-
if (
|
|
2618
|
+
if (chunk72NIN6QF_cjs.isBrowserOpenableMime(el.oleEmbeddedMimeType)) {
|
|
2619
2619
|
const open = createEl(doc, "button", "pptxv-ole-action", ACTION_STYLE);
|
|
2620
2620
|
open.type = "button";
|
|
2621
2621
|
const openTitle = context.t("pptx.ole.openName", { name: downloadName });
|
|
2622
2622
|
open.setAttribute("aria-label", openTitle);
|
|
2623
2623
|
open.title = openTitle;
|
|
2624
2624
|
open.textContent = context.t("pptx.ole.open");
|
|
2625
|
-
open.addEventListener("click", () =>
|
|
2625
|
+
open.addEventListener("click", () => chunk72NIN6QF_cjs.openUrlInNewTab(data));
|
|
2626
2626
|
bar.appendChild(open);
|
|
2627
2627
|
}
|
|
2628
2628
|
return bar;
|
|
@@ -2634,7 +2634,7 @@ var renderPlaceholderElement = (element, zIndex, context) => {
|
|
|
2634
2634
|
context.document,
|
|
2635
2635
|
"div",
|
|
2636
2636
|
"pptxv-element pptxv-placeholder",
|
|
2637
|
-
|
|
2637
|
+
chunk72NIN6QF_cjs.getContainerStyle(element, zIndex)
|
|
2638
2638
|
);
|
|
2639
2639
|
el.dataset.elementId = element.id;
|
|
2640
2640
|
el.dataset.elementType = element.type;
|
|
@@ -2650,7 +2650,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2650
2650
|
return null;
|
|
2651
2651
|
}
|
|
2652
2652
|
const doc = context.document;
|
|
2653
|
-
const summaryView =
|
|
2653
|
+
const summaryView = chunk72NIN6QF_cjs.buildSummaryZoomView(
|
|
2654
2654
|
element,
|
|
2655
2655
|
(index) => {
|
|
2656
2656
|
const slide = context.slides?.[index];
|
|
@@ -2670,7 +2670,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2670
2670
|
doc,
|
|
2671
2671
|
"div",
|
|
2672
2672
|
"pptxv-element pptxv-zoom pptxv-summary-zoom",
|
|
2673
|
-
|
|
2673
|
+
chunk72NIN6QF_cjs.getContainerStyle(element, zIndex)
|
|
2674
2674
|
);
|
|
2675
2675
|
const content = createEl(doc, "div", "pptxv-summary-zoom-content", summaryView.containerStyle);
|
|
2676
2676
|
root.dataset.elementId = element.id;
|
|
@@ -2737,7 +2737,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2737
2737
|
const target = element.targetSlideIndex ?? 0;
|
|
2738
2738
|
const targetSlide = context.slides?.[target];
|
|
2739
2739
|
const interactive = context.presenting && context.onZoomClick !== void 0;
|
|
2740
|
-
const el = createEl(doc, "div", "pptxv-element pptxv-zoom",
|
|
2740
|
+
const el = createEl(doc, "div", "pptxv-element pptxv-zoom", chunk72NIN6QF_cjs.getContainerStyle(element, zIndex));
|
|
2741
2741
|
el.dataset.elementId = element.id;
|
|
2742
2742
|
el.dataset.zoomType = zoomType;
|
|
2743
2743
|
el.dataset.zoomTarget = String(target);
|
|
@@ -2747,7 +2747,7 @@ var renderZoomElement = (element, zIndex, context) => {
|
|
|
2747
2747
|
el.tabIndex = 0;
|
|
2748
2748
|
el.style.cursor = "pointer";
|
|
2749
2749
|
const activate = () => {
|
|
2750
|
-
const zoomTarget =
|
|
2750
|
+
const zoomTarget = chunk72NIN6QF_cjs.resolveZoomNavigationTarget(element);
|
|
2751
2751
|
if (zoomTarget) {
|
|
2752
2752
|
context.onZoomClick?.(zoomTarget, context.currentSlideIndex ?? 0);
|
|
2753
2753
|
}
|
|
@@ -2862,7 +2862,7 @@ function registerExtraRenderers(registry) {
|
|
|
2862
2862
|
// src/pptx/dom/elements/smartart-3d.ts
|
|
2863
2863
|
var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
2864
2864
|
const wrapper = renderSmartArtSvg(element, zIndex, context);
|
|
2865
|
-
const spec = wrapper ?
|
|
2865
|
+
const spec = wrapper ? chunk72NIN6QF_cjs.resolveSmartArtThreeViewSpec(element, context.smartArt3D) : null;
|
|
2866
2866
|
if (!wrapper || !spec) {
|
|
2867
2867
|
return wrapper;
|
|
2868
2868
|
}
|
|
@@ -2872,18 +2872,18 @@ var renderSmartArt3DElement = (element, zIndex, context) => {
|
|
|
2872
2872
|
textStyle: context.presentationStates?.get(element.id)?.textStyle
|
|
2873
2873
|
});
|
|
2874
2874
|
if (context.onSmartArtNodeTextChange && context.interactive && !context.presenting) {
|
|
2875
|
-
const layer = renderSmartArtSvg(
|
|
2875
|
+
const layer = renderSmartArtSvg(chunk72NIN6QF_cjs.elementInLocalFrame(element), 0, context);
|
|
2876
2876
|
if (layer) {
|
|
2877
2877
|
layer.classList.add("pptxv-smartart-3d-edit-layer");
|
|
2878
2878
|
layer.setAttribute("data-smartart-3d-edit-layer", "true");
|
|
2879
|
-
|
|
2879
|
+
chunk72NIN6QF_cjs.stripEditLayerMarkers(layer);
|
|
2880
2880
|
layer.setAttribute("aria-hidden", "true");
|
|
2881
2881
|
Object.assign(layer.style, { position: "absolute", inset: "0", zIndex: "1" });
|
|
2882
2882
|
for (const svg of layer.querySelectorAll("svg")) {
|
|
2883
2883
|
svg.style.opacity = "0";
|
|
2884
2884
|
}
|
|
2885
2885
|
wrapper.appendChild(layer);
|
|
2886
|
-
|
|
2886
|
+
chunk72NIN6QF_cjs.routeEditLayerPointerToNodes(layer);
|
|
2887
2887
|
}
|
|
2888
2888
|
}
|
|
2889
2889
|
return wrapper;
|
|
@@ -2896,7 +2896,7 @@ function nodeTarget(target) {
|
|
|
2896
2896
|
}
|
|
2897
2897
|
function enableSmartArtEditing(chrome, element, context) {
|
|
2898
2898
|
const data = element.smartArtData;
|
|
2899
|
-
if (!data || !context.onSmartArtNodeTextChange && !context.onSmartArtNodeFillChange || !
|
|
2899
|
+
if (!data || !context.onSmartArtNodeTextChange && !context.onSmartArtNodeFillChange || !chunk72NIN6QF_cjs.canDrillDown(element)) {
|
|
2900
2900
|
return;
|
|
2901
2901
|
}
|
|
2902
2902
|
let editor = null;
|
|
@@ -2918,8 +2918,8 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2918
2918
|
}
|
|
2919
2919
|
event.stopPropagation();
|
|
2920
2920
|
const textNode = target.querySelector("text");
|
|
2921
|
-
const textRect = textNode ?
|
|
2922
|
-
const rect = textRect && textRect.width > 0 ? textRect :
|
|
2921
|
+
const textRect = textNode ? chunk72NIN6QF_cjs.measureSvgViewportRect(textNode) : null;
|
|
2922
|
+
const rect = textRect && textRect.width > 0 ? textRect : chunk72NIN6QF_cjs.measureSvgViewportRect(target);
|
|
2923
2923
|
if (!rect) {
|
|
2924
2924
|
return;
|
|
2925
2925
|
}
|
|
@@ -2943,7 +2943,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2943
2943
|
textAlign: "center"
|
|
2944
2944
|
});
|
|
2945
2945
|
editor = input;
|
|
2946
|
-
input.value =
|
|
2946
|
+
input.value = chunk72NIN6QF_cjs.findSmartArtNodeText(data, nodeId) ?? "";
|
|
2947
2947
|
const commit = () => {
|
|
2948
2948
|
if (input !== editor) {
|
|
2949
2949
|
return;
|
|
@@ -2975,7 +2975,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2975
2975
|
}
|
|
2976
2976
|
cancelHide();
|
|
2977
2977
|
swatches?.remove();
|
|
2978
|
-
const rect =
|
|
2978
|
+
const rect = chunk72NIN6QF_cjs.measureSvgViewportRect(target);
|
|
2979
2979
|
if (!rect) {
|
|
2980
2980
|
return;
|
|
2981
2981
|
}
|
|
@@ -2994,7 +2994,7 @@ function enableSmartArtEditing(chrome, element, context) {
|
|
|
2994
2994
|
});
|
|
2995
2995
|
swatches.setAttribute("role", "group");
|
|
2996
2996
|
swatches.setAttribute("aria-label", context.t("pptx.smartArt.fillColor"));
|
|
2997
|
-
for (const color of
|
|
2997
|
+
for (const color of chunk72NIN6QF_cjs.resolvePalette(data).slice(0, 6)) {
|
|
2998
2998
|
const button = createEl(chrome.ownerDocument, "button", "", {
|
|
2999
2999
|
width: "18px",
|
|
3000
3000
|
height: "18px",
|
|
@@ -3093,7 +3093,7 @@ function buildSmartArtFallbackSvg(doc, layout, a11yNodes = [], nodeIds = []) {
|
|
|
3093
3093
|
svg.setAttribute("class", "pptxv-smartart-svg");
|
|
3094
3094
|
svg.setAttribute("style", SMARTART_SVG_STYLE);
|
|
3095
3095
|
for (const conn of layout.connectors) {
|
|
3096
|
-
const paint =
|
|
3096
|
+
const paint = chunk72NIN6QF_cjs.smartArtConnectorPaint(conn);
|
|
3097
3097
|
svg.appendChild(
|
|
3098
3098
|
createSvgEl(doc, "path", {
|
|
3099
3099
|
d: paint.d,
|
|
@@ -3152,7 +3152,7 @@ function buildFallbackNode(doc, node, shadowFilter, a11yLabel, nodeId) {
|
|
|
3152
3152
|
})
|
|
3153
3153
|
);
|
|
3154
3154
|
}
|
|
3155
|
-
const label =
|
|
3155
|
+
const label = chunk72NIN6QF_cjs.smartArtNodeLabel(node);
|
|
3156
3156
|
if (label.visible) {
|
|
3157
3157
|
appendSvgTextLines(doc, g, {
|
|
3158
3158
|
lines: label.lines,
|
|
@@ -3188,41 +3188,41 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3188
3188
|
doc,
|
|
3189
3189
|
"div",
|
|
3190
3190
|
"pptxv-element pptxv-smartart",
|
|
3191
|
-
|
|
3191
|
+
chunk72NIN6QF_cjs.getContainerStyle(element, zIndex)
|
|
3192
3192
|
);
|
|
3193
3193
|
wrapper.dataset.elementId = element.id;
|
|
3194
3194
|
wrapper.dataset.testid = `smartart-${data?.layout ?? "diagram"}`;
|
|
3195
|
-
const chrome = createEl(doc, "div", "pptxv-smartart-chrome",
|
|
3195
|
+
const chrome = createEl(doc, "div", "pptxv-smartart-chrome", chunk72NIN6QF_cjs.buildChromeStyle(data?.chrome));
|
|
3196
3196
|
chrome.style.position = "relative";
|
|
3197
3197
|
wrapper.appendChild(chrome);
|
|
3198
3198
|
if (data) {
|
|
3199
|
-
const a11y =
|
|
3199
|
+
const a11y = chunk72NIN6QF_cjs.buildSmartArtA11y(data);
|
|
3200
3200
|
chrome.setAttribute("role", "img");
|
|
3201
3201
|
chrome.setAttribute("aria-label", a11y.label);
|
|
3202
3202
|
}
|
|
3203
3203
|
const nodes = data?.nodes ?? [];
|
|
3204
3204
|
const drawingShapes = data?.drawingShapes ?? [];
|
|
3205
3205
|
const animationState = context.presentationStates?.get(element.id);
|
|
3206
|
-
const { nodes: revealedNodesFull } =
|
|
3206
|
+
const { nodes: revealedNodesFull } = chunk72NIN6QF_cjs.resolveRevealedSmartArtNodes(
|
|
3207
3207
|
nodes,
|
|
3208
3208
|
animationState,
|
|
3209
3209
|
data?.presLayoutVars
|
|
3210
3210
|
);
|
|
3211
3211
|
if (data && drawingShapes.length > 0) {
|
|
3212
|
-
const revealedShapes =
|
|
3212
|
+
const revealedShapes = chunk72NIN6QF_cjs.resolveRevealedDrawingShapes(drawingShapes, nodes, animationState);
|
|
3213
3213
|
chrome.appendChild(
|
|
3214
|
-
buildDrawingShapesSvg(doc, element.id, data,
|
|
3214
|
+
buildDrawingShapesSvg(doc, element.id, data, chunk72NIN6QF_cjs.buildSmartArtA11y(data).nodes, revealedShapes)
|
|
3215
3215
|
);
|
|
3216
3216
|
enableSmartArtEditing(chrome, element, context);
|
|
3217
3217
|
return wrapper;
|
|
3218
3218
|
}
|
|
3219
3219
|
if (data && nodes.length > 0) {
|
|
3220
3220
|
const revealedNodes = revealedNodesFull;
|
|
3221
|
-
const layout =
|
|
3221
|
+
const layout = chunk72NIN6QF_cjs.computeSmartArtElementLayout(
|
|
3222
3222
|
data,
|
|
3223
3223
|
revealedNodes,
|
|
3224
3224
|
{ width: element.width, height: element.height },
|
|
3225
|
-
|
|
3225
|
+
chunk72NIN6QF_cjs.resolvePalette(data),
|
|
3226
3226
|
data.style ?? "flat",
|
|
3227
3227
|
element.id
|
|
3228
3228
|
);
|
|
@@ -3230,8 +3230,8 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3230
3230
|
buildSmartArtFallbackSvg(
|
|
3231
3231
|
doc,
|
|
3232
3232
|
layout,
|
|
3233
|
-
|
|
3234
|
-
|
|
3233
|
+
chunk72NIN6QF_cjs.buildSmartArtA11y(data).nodes,
|
|
3234
|
+
chunk72NIN6QF_cjs.flattenNodes(revealedNodes).map((node) => node.id)
|
|
3235
3235
|
)
|
|
3236
3236
|
);
|
|
3237
3237
|
enableSmartArtEditing(chrome, element, context);
|
|
@@ -3254,17 +3254,17 @@ var renderSmartArtSvg = (element, zIndex, context) => {
|
|
|
3254
3254
|
function buildDrawingShapesSvg(doc, elementId, data, a11yNodes, revealedShapes) {
|
|
3255
3255
|
const allShapes = data.drawingShapes ?? [];
|
|
3256
3256
|
const style = data.style ?? "flat";
|
|
3257
|
-
const viewBox =
|
|
3258
|
-
const rendered =
|
|
3257
|
+
const viewBox = chunk72NIN6QF_cjs.computeDrawingViewBox(allShapes);
|
|
3258
|
+
const rendered = chunk72NIN6QF_cjs.projectDrawingShapes(
|
|
3259
3259
|
elementId,
|
|
3260
3260
|
revealedShapes,
|
|
3261
3261
|
viewBox,
|
|
3262
|
-
|
|
3262
|
+
chunk72NIN6QF_cjs.resolvePalette(data),
|
|
3263
3263
|
style
|
|
3264
3264
|
);
|
|
3265
|
-
const shadow =
|
|
3265
|
+
const shadow = chunk72NIN6QF_cjs.styleShadowFilter(style);
|
|
3266
3266
|
const labelsById = new Map(a11yNodes.map((node) => [node.id, node.label]));
|
|
3267
|
-
const nodeIds =
|
|
3267
|
+
const nodeIds = chunk72NIN6QF_cjs.resolveRevealedDrawingShapeNodeIds(allShapes, revealedShapes, data.nodes);
|
|
3268
3268
|
const svg = createSvgEl(doc, "svg", {
|
|
3269
3269
|
viewBox: `0 0 ${viewBox.width} ${viewBox.height}`,
|
|
3270
3270
|
preserveAspectRatio: "xMidYMid meet"
|
|
@@ -3399,9 +3399,9 @@ function enableTableResize(container, table, element, context) {
|
|
|
3399
3399
|
for (const handle of [...colHandles, ...rowHandles]) {
|
|
3400
3400
|
handle.remove();
|
|
3401
3401
|
}
|
|
3402
|
-
const crossings =
|
|
3402
|
+
const crossings = chunk72NIN6QF_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
3403
3403
|
const rowBounds = measureRowBoundaries(table);
|
|
3404
|
-
colHandles =
|
|
3404
|
+
colHandles = chunk72NIN6QF_cjs.computeColumnBoundaries(tableData.columnWidths).map((leftPct, i) => {
|
|
3405
3405
|
const handle = createEl(doc, "div", "pptxv-table-resize-col", {
|
|
3406
3406
|
position: "absolute",
|
|
3407
3407
|
top: "0",
|
|
@@ -3411,7 +3411,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3411
3411
|
zIndex: "10",
|
|
3412
3412
|
pointerEvents: "none"
|
|
3413
3413
|
});
|
|
3414
|
-
const segments =
|
|
3414
|
+
const segments = chunk72NIN6QF_cjs.columnHandleSegments(
|
|
3415
3415
|
crossings.columns[i] ?? [],
|
|
3416
3416
|
rowBounds,
|
|
3417
3417
|
table.offsetHeight
|
|
@@ -3441,7 +3441,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3441
3441
|
zIndex: "10",
|
|
3442
3442
|
pointerEvents: "none"
|
|
3443
3443
|
});
|
|
3444
|
-
const segments =
|
|
3444
|
+
const segments = chunk72NIN6QF_cjs.rowHandleSegments(crossings.rows[i] ?? [], tableData.columnWidths);
|
|
3445
3445
|
for (const { leftPct, widthPct } of segments) {
|
|
3446
3446
|
handle.appendChild(
|
|
3447
3447
|
createEl(doc, "div", "pptxv-table-resize-segment", {
|
|
@@ -3485,14 +3485,14 @@ function enableTableResize(container, table, element, context) {
|
|
|
3485
3485
|
const deltaProp = (event.clientX - active.startPos) / (rect.width || 1);
|
|
3486
3486
|
context.onTableResizeColumns?.(
|
|
3487
3487
|
element,
|
|
3488
|
-
|
|
3488
|
+
chunk72NIN6QF_cjs.computeResizedColumnWidths(active.initialWidths, active.index, deltaProp)
|
|
3489
3489
|
);
|
|
3490
3490
|
} else if (event.clientY !== active.startPos && active.type === "row") {
|
|
3491
3491
|
const deltaY = event.clientY - active.startPos;
|
|
3492
3492
|
context.onTableResizeRow?.(
|
|
3493
3493
|
element,
|
|
3494
3494
|
active.index,
|
|
3495
|
-
|
|
3495
|
+
chunk72NIN6QF_cjs.computeResizedRowHeight(active.initialRowHeight ?? chunk72NIN6QF_cjs.DEFAULT_ROW_HEIGHT, deltaY)
|
|
3496
3496
|
);
|
|
3497
3497
|
}
|
|
3498
3498
|
drawHandles();
|
|
@@ -3501,13 +3501,13 @@ function enableTableResize(container, table, element, context) {
|
|
|
3501
3501
|
const rect = container.getBoundingClientRect();
|
|
3502
3502
|
const localX = event.clientX - rect.left;
|
|
3503
3503
|
const localY = event.clientY - rect.top;
|
|
3504
|
-
const scaleY =
|
|
3505
|
-
const crossings =
|
|
3504
|
+
const scaleY = chunk72NIN6QF_cjs.getTableResizeScale(rect.height, container.offsetHeight);
|
|
3505
|
+
const crossings = chunk72NIN6QF_cjs.computeTableMergeCrossings(tableData.rows, tableData.columnWidths.length);
|
|
3506
3506
|
const rowBounds = measureRowBoundaries(table);
|
|
3507
|
-
const colBoundaries =
|
|
3507
|
+
const colBoundaries = chunk72NIN6QF_cjs.computeColumnBoundaries(tableData.columnWidths);
|
|
3508
3508
|
for (let i = 0; i < colBoundaries.length; i++) {
|
|
3509
3509
|
const boundaryX = colBoundaries[i] / 100 * rect.width;
|
|
3510
|
-
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !
|
|
3510
|
+
if (Math.abs(localX - boundaryX) <= HANDLE_ZONE && !chunk72NIN6QF_cjs.isColumnBoundaryMergedAt(crossings, i, rowBounds, localY / scaleY)) {
|
|
3511
3511
|
event.preventDefault();
|
|
3512
3512
|
event.stopPropagation();
|
|
3513
3513
|
doc.body.style.cursor = "col-resize";
|
|
@@ -3525,7 +3525,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3525
3525
|
}
|
|
3526
3526
|
}
|
|
3527
3527
|
for (let i = 0; i < rowBounds.length; i++) {
|
|
3528
|
-
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !
|
|
3528
|
+
if (Math.abs(localY - rowBounds[i] * scaleY) <= HANDLE_ZONE && !chunk72NIN6QF_cjs.isRowBoundaryMergedAt(crossings, i, tableData.columnWidths, localX / (rect.width || 1))) {
|
|
3529
3529
|
event.preventDefault();
|
|
3530
3530
|
event.stopPropagation();
|
|
3531
3531
|
const tr = table.querySelectorAll("tbody > tr")[i];
|
|
@@ -3536,7 +3536,7 @@ function enableTableResize(container, table, element, context) {
|
|
|
3536
3536
|
index: i,
|
|
3537
3537
|
startPos: event.clientY,
|
|
3538
3538
|
handleEl: rowHandles[i] ?? container,
|
|
3539
|
-
initialRowHeight: tr?.offsetHeight ??
|
|
3539
|
+
initialRowHeight: tr?.offsetHeight ?? chunk72NIN6QF_cjs.DEFAULT_ROW_HEIGHT
|
|
3540
3540
|
};
|
|
3541
3541
|
win.addEventListener("mousemove", onMouseMove);
|
|
3542
3542
|
win.addEventListener("mouseup", onMouseUp);
|
|
@@ -3557,7 +3557,7 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
3557
3557
|
}
|
|
3558
3558
|
const doc = context.document;
|
|
3559
3559
|
const container = createEl(doc, "div", "pptxv-element pptxv-table", {
|
|
3560
|
-
...
|
|
3560
|
+
...chunk72NIN6QF_cjs.getContainerStyle(element, zIndex),
|
|
3561
3561
|
overflow: "hidden"
|
|
3562
3562
|
});
|
|
3563
3563
|
container.dataset.elementId = element.id;
|
|
@@ -3570,7 +3570,7 @@ var renderTableElement = (element, zIndex, context) => {
|
|
|
3570
3570
|
// font stack; all five bindings declare the same shared default here.
|
|
3571
3571
|
fontFamily: chunkG3UVZ5FO_cjs.DEFAULT_FONT_FAMILY,
|
|
3572
3572
|
// `a:tblPr@rtl`: mirrors the column order for right-to-left decks.
|
|
3573
|
-
...
|
|
3573
|
+
...chunk72NIN6QF_cjs.tableContainerCss(tableData)
|
|
3574
3574
|
});
|
|
3575
3575
|
appendColgroup(doc, table, tableData.columnWidths);
|
|
3576
3576
|
const tbody = doc.createElement("tbody");
|
|
@@ -3632,13 +3632,13 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3632
3632
|
if (cell.rowSpan && cell.rowSpan > 1) {
|
|
3633
3633
|
td.rowSpan = cell.rowSpan;
|
|
3634
3634
|
}
|
|
3635
|
-
const style =
|
|
3635
|
+
const style = chunk72NIN6QF_cjs.tableCellCss(
|
|
3636
3636
|
tableData,
|
|
3637
3637
|
cell,
|
|
3638
3638
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
3639
3639
|
styleContext
|
|
3640
3640
|
);
|
|
3641
|
-
const patternFill = cell.style ?
|
|
3641
|
+
const patternFill = cell.style ? chunk72NIN6QF_cjs.cellPatternFillCss(cell.style) : null;
|
|
3642
3642
|
if (patternFill) {
|
|
3643
3643
|
delete style["backgroundColor"];
|
|
3644
3644
|
delete style["background"];
|
|
@@ -3651,7 +3651,7 @@ function renderCell(doc, tableData, cell, rowIndex, cellIndex, rowCount, columnC
|
|
|
3651
3651
|
}
|
|
3652
3652
|
applyStyleMap(td, CELL_BASE_STYLE);
|
|
3653
3653
|
applyStyleMap(td, style);
|
|
3654
|
-
const diagonals =
|
|
3654
|
+
const diagonals = chunk72NIN6QF_cjs.getCellDiagonalBorders(
|
|
3655
3655
|
cell.style,
|
|
3656
3656
|
tableData,
|
|
3657
3657
|
{ rowIndex, cellIndex, rowCount, columnCount },
|
|
@@ -3695,7 +3695,7 @@ function renderDiagonalOverlay(doc, diagonals) {
|
|
|
3695
3695
|
return svg;
|
|
3696
3696
|
}
|
|
3697
3697
|
function appendCellText(doc, td, cell, cellCss) {
|
|
3698
|
-
const blocks =
|
|
3698
|
+
const blocks = chunk72NIN6QF_cjs.cellParagraphBlocks(cell);
|
|
3699
3699
|
if (blocks) {
|
|
3700
3700
|
for (const block of blocks) {
|
|
3701
3701
|
const div = createEl(doc, "div", "pptxv-table-para", { display: "block", ...block.css });
|
|
@@ -3730,7 +3730,7 @@ function appendRuns(doc, parent, runs, cellCss) {
|
|
|
3730
3730
|
}
|
|
3731
3731
|
const span = createEl(doc, "span", "pptxv-table-run", {
|
|
3732
3732
|
position: "relative",
|
|
3733
|
-
...
|
|
3733
|
+
...chunk72NIN6QF_cjs.cellRunStyle(run, cellCss)
|
|
3734
3734
|
});
|
|
3735
3735
|
span.textContent = run.text;
|
|
3736
3736
|
parent.appendChild(span);
|
|
@@ -3744,8 +3744,8 @@ function registerTableChartRenderers(registry) {
|
|
|
3744
3744
|
}
|
|
3745
3745
|
|
|
3746
3746
|
// src/pptx/dom/glyph-outline-cache.ts
|
|
3747
|
-
var glyphOutlineFontCache = new
|
|
3748
|
-
var getGlyphOutline =
|
|
3747
|
+
var glyphOutlineFontCache = new chunk72NIN6QF_cjs.GlyphOutlineFontCache();
|
|
3748
|
+
var getGlyphOutline = chunk72NIN6QF_cjs.createGlyphOutlineLookup(glyphOutlineFontCache);
|
|
3749
3749
|
|
|
3750
3750
|
// src/pptx/dom/elements/text-warp.ts
|
|
3751
3751
|
function renderWarpedText(element, context) {
|
|
@@ -3757,12 +3757,12 @@ function renderWarpedText(element, context) {
|
|
|
3757
3757
|
if (!preset || preset === "textNoShape" || preset === "textPlain") {
|
|
3758
3758
|
return null;
|
|
3759
3759
|
}
|
|
3760
|
-
const paragraphs =
|
|
3760
|
+
const paragraphs = chunk72NIN6QF_cjs.groupIntoParagraphs(element);
|
|
3761
3761
|
if (paragraphs.length === 0) {
|
|
3762
3762
|
return null;
|
|
3763
3763
|
}
|
|
3764
|
-
if (!
|
|
3765
|
-
const transform =
|
|
3764
|
+
if (!chunk72NIN6QF_cjs.shouldUseSvgWarp(preset)) {
|
|
3765
|
+
const transform = chunk72NIN6QF_cjs.getWarpCssTransform(preset, style?.textWarpAdj, style?.textWarpAdj2);
|
|
3766
3766
|
if (!transform) {
|
|
3767
3767
|
return null;
|
|
3768
3768
|
}
|
|
@@ -3784,14 +3784,14 @@ function renderWarpedText(element, context) {
|
|
|
3784
3784
|
if (style?.fontSize) {
|
|
3785
3785
|
text.style.fontSize = `${style.fontSize}px`;
|
|
3786
3786
|
}
|
|
3787
|
-
const fontWeight =
|
|
3787
|
+
const fontWeight = chunk72NIN6QF_cjs.fontWeightAttribute(style?.fontFamily, style?.bold);
|
|
3788
3788
|
if (fontWeight) {
|
|
3789
3789
|
text.style.fontWeight = fontWeight;
|
|
3790
3790
|
}
|
|
3791
3791
|
text.textContent = paragraphs.map((p) => p.segments.map((s) => s.text).join("")).join("\n");
|
|
3792
3792
|
return text;
|
|
3793
3793
|
}
|
|
3794
|
-
if (
|
|
3794
|
+
if (chunk72NIN6QF_cjs.hasGlyphEnvelope(preset)) {
|
|
3795
3795
|
return renderGlyphWarp(element, paragraphs, context);
|
|
3796
3796
|
}
|
|
3797
3797
|
return renderPathWarp(element, paragraphs, context);
|
|
@@ -3817,7 +3817,7 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3817
3817
|
});
|
|
3818
3818
|
svg.setAttribute("class", "pptxv-wordart");
|
|
3819
3819
|
svg.setAttribute("style", "position:absolute;inset:0;width:100%;height:100%;overflow:visible");
|
|
3820
|
-
const perLine =
|
|
3820
|
+
const perLine = chunk72NIN6QF_cjs.buildGlyphEnvelopeBlock(
|
|
3821
3821
|
preset,
|
|
3822
3822
|
paragraphs.map(
|
|
3823
3823
|
(paragraph) => paragraph.segments.map((seg, i) => ({
|
|
@@ -3844,8 +3844,8 @@ function renderGlyphWarp(element, paragraphs, context) {
|
|
|
3844
3844
|
fill,
|
|
3845
3845
|
"font-family": renderedFamily ? pptx.getSubstituteFontFamily(renderedFamily) : chunkG3UVZ5FO_cjs.DEFAULT_FONT_FAMILY,
|
|
3846
3846
|
"font-size": s.fontSize ?? style.fontSize ?? 18,
|
|
3847
|
-
"font-weight":
|
|
3848
|
-
"font-style":
|
|
3847
|
+
"font-weight": chunk72NIN6QF_cjs.fontWeightAttribute(renderedFamily, s.bold ?? style.bold),
|
|
3848
|
+
"font-style": chunk72NIN6QF_cjs.resolveFontItalic(renderedFamily, s.italic ?? style.italic) ? "italic" : void 0
|
|
3849
3849
|
};
|
|
3850
3850
|
if (g.outlinePath) {
|
|
3851
3851
|
const path = createSvgEl(context.document, "path", { d: g.outlinePath, fill });
|
|
@@ -3912,7 +3912,7 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3912
3912
|
defs.appendChild(
|
|
3913
3913
|
createSvgEl(context.document, "path", {
|
|
3914
3914
|
id,
|
|
3915
|
-
d:
|
|
3915
|
+
d: chunk72NIN6QF_cjs.buildWarpPath(
|
|
3916
3916
|
preset,
|
|
3917
3917
|
element.width,
|
|
3918
3918
|
element.height,
|
|
@@ -3927,8 +3927,8 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3927
3927
|
fill: style.color ?? "#000000",
|
|
3928
3928
|
"font-family": style.fontFamily ? pptx.getSubstituteFontFamily(style.fontFamily) : chunkG3UVZ5FO_cjs.DEFAULT_FONT_FAMILY,
|
|
3929
3929
|
"font-size": style.fontSize ?? 18,
|
|
3930
|
-
"font-weight":
|
|
3931
|
-
"font-style":
|
|
3930
|
+
"font-weight": chunk72NIN6QF_cjs.fontWeightAttribute(style.fontFamily, style.bold),
|
|
3931
|
+
"font-style": chunk72NIN6QF_cjs.resolveFontItalic(style.fontFamily, style.italic) ? "italic" : void 0
|
|
3932
3932
|
});
|
|
3933
3933
|
const textPath = createSvgEl(context.document, "textPath", {
|
|
3934
3934
|
href: `#${id}`,
|
|
@@ -3945,9 +3945,9 @@ function renderPathWarp(element, paragraphs, context) {
|
|
|
3945
3945
|
|
|
3946
3946
|
// src/pptx/dom/elements/text-shape.ts
|
|
3947
3947
|
var renderTextShapeElement = (element, zIndex, context) => {
|
|
3948
|
-
const container =
|
|
3948
|
+
const container = chunk72NIN6QF_cjs.getContainerStyle(element, zIndex);
|
|
3949
3949
|
const animState = context.presentationStates?.get(element.id);
|
|
3950
|
-
const background =
|
|
3950
|
+
const background = chunk72NIN6QF_cjs.getBackgroundAnimationState(element, context.presentationStates);
|
|
3951
3951
|
const visualState = background ?? animState;
|
|
3952
3952
|
const shape = getShapeFillStrokeStyle(
|
|
3953
3953
|
element,
|
|
@@ -3959,7 +3959,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3959
3959
|
if (transform !== void 0) {
|
|
3960
3960
|
merged["transform"] = transform;
|
|
3961
3961
|
}
|
|
3962
|
-
const layers =
|
|
3962
|
+
const layers = chunk72NIN6QF_cjs.getBackgroundAnimationLayers(element, merged, background);
|
|
3963
3963
|
const el = createEl(context.document, "div", "pptxv-element pptxv-shape", layers.box);
|
|
3964
3964
|
el.dataset.elementId = element.id;
|
|
3965
3965
|
const paint = layers.paint ? createEl(context.document, "div", void 0, layers.paint) : el;
|
|
@@ -3969,7 +3969,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
3969
3969
|
el.appendChild(paint);
|
|
3970
3970
|
}
|
|
3971
3971
|
if (context.interactive && !context.presenting) {
|
|
3972
|
-
const hitTargetStyle =
|
|
3972
|
+
const hitTargetStyle = chunk72NIN6QF_cjs.elementHitTargetStyle(element);
|
|
3973
3973
|
if (hitTargetStyle) {
|
|
3974
3974
|
const hitTarget = createEl(context.document, "div", void 0, hitTargetStyle);
|
|
3975
3975
|
hitTarget.setAttribute("aria-hidden", "true");
|
|
@@ -4012,8 +4012,8 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
4012
4012
|
} else if (warped) {
|
|
4013
4013
|
el.appendChild(warped);
|
|
4014
4014
|
} else {
|
|
4015
|
-
const linkedSegments =
|
|
4016
|
-
const paragraphs =
|
|
4015
|
+
const linkedSegments = chunk72NIN6QF_cjs.getOverflowSegments(element, context.slide?.elements);
|
|
4016
|
+
const paragraphs = chunk72NIN6QF_cjs.buildParagraphs(element, context.fieldContext, linkedSegments);
|
|
4017
4017
|
const hasText = paragraphs.some((p) => p.runs.length > 0 || p.bulletMarker !== void 0);
|
|
4018
4018
|
if (hasText) {
|
|
4019
4019
|
el.appendChild(
|
|
@@ -4024,7 +4024,7 @@ var renderTextShapeElement = (element, zIndex, context) => {
|
|
|
4024
4024
|
);
|
|
4025
4025
|
} else {
|
|
4026
4026
|
const mode = context.interactive && !context.presenting ? "edit" : "present";
|
|
4027
|
-
const prompt =
|
|
4027
|
+
const prompt = chunk72NIN6QF_cjs.placeholderPromptDescriptor(element, mode);
|
|
4028
4028
|
if (prompt) {
|
|
4029
4029
|
const hint = createEl(context.document, "div", "pptxv-placeholder-prompt", {
|
|
4030
4030
|
...getTextBlockStyle(element),
|
|
@@ -4191,15 +4191,15 @@ async function resolveImageUrls(handler, slides) {
|
|
|
4191
4191
|
|
|
4192
4192
|
Object.defineProperty(exports, "buildEmbeddedFontStyles", {
|
|
4193
4193
|
enumerable: true,
|
|
4194
|
-
get: function () { return
|
|
4194
|
+
get: function () { return chunk72NIN6QF_cjs.buildEmbeddedFontStyles; }
|
|
4195
4195
|
});
|
|
4196
4196
|
Object.defineProperty(exports, "buildFieldSubstitutionContext", {
|
|
4197
4197
|
enumerable: true,
|
|
4198
|
-
get: function () { return
|
|
4198
|
+
get: function () { return chunk72NIN6QF_cjs.buildFieldSubstitutionContext; }
|
|
4199
4199
|
});
|
|
4200
4200
|
Object.defineProperty(exports, "releasePptxRenderCaches", {
|
|
4201
4201
|
enumerable: true,
|
|
4202
|
-
get: function () { return
|
|
4202
|
+
get: function () { return chunk72NIN6QF_cjs.releasePptxRenderCaches; }
|
|
4203
4203
|
});
|
|
4204
4204
|
Object.defineProperty(exports, "renderChartViewModelSvg", {
|
|
4205
4205
|
enumerable: true,
|