@aixa-transformation/pptx-viewer 2.0.30 → 2.0.33
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/dist/{Model3DScene-OOLYRN3I.mjs → Model3DScene-ID7GWMBL.mjs} +2 -2
- package/dist/{Model3DScene-7PC3BTGV.js → Model3DScene-VY5BMIHC.js} +3 -3
- package/dist/{SurfaceChart3DScene-ZZYDRV5N.mjs → SurfaceChart3DScene-PXXYX7KR.mjs} +2 -2
- package/dist/{SurfaceChart3DScene-NKUQTDRP.js → SurfaceChart3DScene-Y3VNQD4J.js} +3 -3
- package/dist/{chunk-CKNLAQCV.mjs → chunk-2T6XNJAO.mjs} +64 -9
- package/dist/{chunk-TYXOHBKR.mjs → chunk-F3IAKCR3.mjs} +15 -9
- package/dist/{chunk-I5S57RYE.js → chunk-GGWYNMDL.js} +891 -836
- package/dist/{chunk-YVQPLQ3C.mjs → chunk-HBJEBWBB.mjs} +2 -2
- package/dist/{chunk-OGINKMSL.js → chunk-PCEK6YYB.js} +490 -484
- package/dist/{chunk-JJ5MVLCK.mjs → chunk-QKRGKIBL.mjs} +163 -29
- package/dist/{chunk-XCLYIGHM.js → chunk-SOIGDRND.js} +42 -42
- package/dist/{chunk-N7OHVHBS.js → chunk-WGHMMJOJ.js} +163 -29
- package/dist/{dist-72WLGYVZ.js → dist-PWO55B3G.js} +568 -568
- package/dist/{dist-RTG3TU65.mjs → dist-VBLYGLKY.mjs} +1 -1
- package/dist/index.js +34 -34
- package/dist/index.mjs +4 -4
- package/dist/internals.js +78 -78
- package/dist/internals.mjs +3 -3
- package/dist/presentation.js +2 -2
- package/dist/presentation.mjs +1 -1
- package/dist/viewer/index.js +20 -20
- package/dist/viewer/index.mjs +4 -4
- package/package.json +1 -1
|
@@ -8630,7 +8630,7 @@ var PptxPresentationSlidesReconciler = class {
|
|
|
8630
8630
|
if (typeof relationshipId2 === "string" && relationshipId2.length > 0) {
|
|
8631
8631
|
usedRIds.add(relationshipId2);
|
|
8632
8632
|
}
|
|
8633
|
-
if (relationshipType
|
|
8633
|
+
if (this.isSlideRelationshipType(relationshipType, input.slideRelationshipType) && typeof relationshipId2 === "string" && typeof relationshipTarget2 === "string") {
|
|
8634
8634
|
slideTargetByRid.set(relationshipId2, relationshipTarget2);
|
|
8635
8635
|
continue;
|
|
8636
8636
|
}
|
|
@@ -8845,6 +8845,13 @@ var PptxPresentationSlidesReconciler = class {
|
|
|
8845
8845
|
}
|
|
8846
8846
|
return [value];
|
|
8847
8847
|
}
|
|
8848
|
+
/** Match equivalent Strict and Transitional slide relationship URIs. */
|
|
8849
|
+
isSlideRelationshipType(value, expected) {
|
|
8850
|
+
if (typeof value !== "string") {
|
|
8851
|
+
return false;
|
|
8852
|
+
}
|
|
8853
|
+
return value === expected || value.endsWith("/relationships/slide");
|
|
8854
|
+
}
|
|
8848
8855
|
};
|
|
8849
8856
|
function isExternalTarget(target) {
|
|
8850
8857
|
const normalized = target.trim();
|
|
@@ -9512,11 +9519,12 @@ function colorWithOpacity(color2, opacity2) {
|
|
|
9512
9519
|
return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${clampUnitInterval(opacity2)})`;
|
|
9513
9520
|
}
|
|
9514
9521
|
function parseDrawingPercent(value) {
|
|
9515
|
-
const
|
|
9522
|
+
const raw = String(value ?? "").trim();
|
|
9523
|
+
const parsed = Number.parseFloat(raw);
|
|
9516
9524
|
if (!Number.isFinite(parsed)) {
|
|
9517
9525
|
return void 0;
|
|
9518
9526
|
}
|
|
9519
|
-
return clampUnitInterval(parsed / 1e5);
|
|
9527
|
+
return clampUnitInterval(raw.endsWith("%") ? parsed / 100 : parsed / 1e5);
|
|
9520
9528
|
}
|
|
9521
9529
|
function scrgbLinearToSrgb8(linear) {
|
|
9522
9530
|
const l = Math.min(1, Math.max(0, linear));
|
|
@@ -9595,11 +9603,12 @@ function hslToRgb(h, s, l) {
|
|
|
9595
9603
|
};
|
|
9596
9604
|
}
|
|
9597
9605
|
function parseDrawingFraction(value) {
|
|
9598
|
-
const
|
|
9606
|
+
const raw = String(value ?? "").trim();
|
|
9607
|
+
const parsed = Number.parseFloat(raw);
|
|
9599
9608
|
if (!Number.isFinite(parsed)) {
|
|
9600
9609
|
return void 0;
|
|
9601
9610
|
}
|
|
9602
|
-
return parsed / 1e5;
|
|
9611
|
+
return raw.endsWith("%") ? parsed / 100 : parsed / 1e5;
|
|
9603
9612
|
}
|
|
9604
9613
|
function parseDrawingHueDegrees(value) {
|
|
9605
9614
|
const parsed = Number.parseFloat(String(value ?? "").trim());
|
|
@@ -9656,9 +9665,9 @@ function applyDrawingColorTransforms(baseColor, colorNode) {
|
|
|
9656
9665
|
}
|
|
9657
9666
|
const tint = parseDrawingPercent(getVal("a:tint"));
|
|
9658
9667
|
if (tint !== void 0) {
|
|
9659
|
-
r
|
|
9660
|
-
g
|
|
9661
|
-
b
|
|
9668
|
+
r = 255 - (255 - r) * tint;
|
|
9669
|
+
g = 255 - (255 - g) * tint;
|
|
9670
|
+
b = 255 - (255 - b) * tint;
|
|
9662
9671
|
}
|
|
9663
9672
|
const hslKeys = [
|
|
9664
9673
|
"a:hue",
|
|
@@ -16385,8 +16394,16 @@ var PptxDocumentPropertiesUpdater = class {
|
|
|
16385
16394
|
const relationships = relsData["Relationships"];
|
|
16386
16395
|
if (relationships) {
|
|
16387
16396
|
const rels = Array.isArray(relationships["Relationship"]) ? relationships["Relationship"] : relationships["Relationship"] ? [relationships["Relationship"]] : [];
|
|
16388
|
-
const
|
|
16389
|
-
|
|
16397
|
+
const customRelationships = rels.filter(
|
|
16398
|
+
(relationship) => this.isCustomPropertiesRelationship(relationship)
|
|
16399
|
+
);
|
|
16400
|
+
if (customRelationships.length > 0) {
|
|
16401
|
+
const retained = customRelationships[0];
|
|
16402
|
+
relationships["Relationship"] = rels.filter(
|
|
16403
|
+
(relationship) => !this.isCustomPropertiesRelationship(relationship) || relationship === retained
|
|
16404
|
+
);
|
|
16405
|
+
this.context.zip.file("_rels/.rels", this.context.builder.build(relsData));
|
|
16406
|
+
} else {
|
|
16390
16407
|
let maxId = 0;
|
|
16391
16408
|
for (const rel of rels) {
|
|
16392
16409
|
const id = String(rel?.["@_Id"] || "");
|
|
@@ -16415,7 +16432,6 @@ var PptxDocumentPropertiesUpdater = class {
|
|
|
16415
16432
|
* orphan content-type entry referencing a deleted part.
|
|
16416
16433
|
*/
|
|
16417
16434
|
async removeCustomPropertiesPackagingArtifacts() {
|
|
16418
|
-
const customRelType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties";
|
|
16419
16435
|
const ctFile = this.context.zip.file("[Content_Types].xml");
|
|
16420
16436
|
if (ctFile) {
|
|
16421
16437
|
try {
|
|
@@ -16443,7 +16459,9 @@ var PptxDocumentPropertiesUpdater = class {
|
|
|
16443
16459
|
const relationships = relsData["Relationships"];
|
|
16444
16460
|
if (relationships) {
|
|
16445
16461
|
const rels = Array.isArray(relationships["Relationship"]) ? relationships["Relationship"] : relationships["Relationship"] ? [relationships["Relationship"]] : [];
|
|
16446
|
-
const filtered = rels.filter(
|
|
16462
|
+
const filtered = rels.filter(
|
|
16463
|
+
(relationship) => !this.isCustomPropertiesRelationship(relationship)
|
|
16464
|
+
);
|
|
16447
16465
|
if (filtered.length !== rels.length) {
|
|
16448
16466
|
relationships["Relationship"] = filtered;
|
|
16449
16467
|
this.context.zip.file("_rels/.rels", this.context.builder.build(relsData));
|
|
@@ -16453,6 +16471,11 @@ var PptxDocumentPropertiesUpdater = class {
|
|
|
16453
16471
|
}
|
|
16454
16472
|
}
|
|
16455
16473
|
}
|
|
16474
|
+
isCustomPropertiesRelationship(relationship) {
|
|
16475
|
+
const type = String(relationship?.["@_Type"] || "");
|
|
16476
|
+
const target = String(relationship?.["@_Target"] || "").replace(/\\/gu, "/").replace(/^\.\//u, "");
|
|
16477
|
+
return target === "docProps/custom.xml" || type.endsWith("/relationships/custom-properties") || type.endsWith("/relationships/customProperties");
|
|
16478
|
+
}
|
|
16456
16479
|
normalizeCustomPropertyType(type) {
|
|
16457
16480
|
const supportedTypes = /* @__PURE__ */ new Set([
|
|
16458
16481
|
"lpwstr",
|
|
@@ -31691,6 +31714,45 @@ function isEotFormat(data) {
|
|
|
31691
31714
|
const magic = readUint16LE(data, EOT_MAGIC_OFFSET);
|
|
31692
31715
|
return magic === EOT_MAGIC;
|
|
31693
31716
|
}
|
|
31717
|
+
function createEotFromSfnt(fontData, options) {
|
|
31718
|
+
const encodeName2 = (value) => {
|
|
31719
|
+
const bytes = new Uint8Array((value.length + 1) * 2);
|
|
31720
|
+
const view2 = new DataView(bytes.buffer);
|
|
31721
|
+
for (let i = 0; i < value.length; i++) {
|
|
31722
|
+
view2.setUint16(i * 2, value.charCodeAt(i), true);
|
|
31723
|
+
}
|
|
31724
|
+
return bytes;
|
|
31725
|
+
};
|
|
31726
|
+
const names = [
|
|
31727
|
+
encodeName2(options.familyName),
|
|
31728
|
+
encodeName2(options.styleName ?? ""),
|
|
31729
|
+
encodeName2(""),
|
|
31730
|
+
encodeName2(options.fullName ?? options.familyName)
|
|
31731
|
+
];
|
|
31732
|
+
const headerSize = 80 + names.reduce((sum, name) => sum + 4 + name.length, 0);
|
|
31733
|
+
const result = new Uint8Array(headerSize + fontData.length);
|
|
31734
|
+
const view = new DataView(result.buffer);
|
|
31735
|
+
view.setUint32(0, result.length, true);
|
|
31736
|
+
view.setUint32(4, fontData.length, true);
|
|
31737
|
+
view.setUint32(8, 131073, true);
|
|
31738
|
+
view.setUint32(12, 0, true);
|
|
31739
|
+
result[26] = 1;
|
|
31740
|
+
result[27] = options.italic ? 1 : 0;
|
|
31741
|
+
view.setUint32(28, options.weight ?? 400, true);
|
|
31742
|
+
view.setUint16(32, 0, true);
|
|
31743
|
+
view.setUint16(34, EOT_MAGIC, true);
|
|
31744
|
+
let offset = 80;
|
|
31745
|
+
for (const name of names) {
|
|
31746
|
+
view.setUint16(offset, 0, true);
|
|
31747
|
+
offset += 2;
|
|
31748
|
+
view.setUint16(offset, name.length, true);
|
|
31749
|
+
offset += 2;
|
|
31750
|
+
result.set(name, offset);
|
|
31751
|
+
offset += name.length;
|
|
31752
|
+
}
|
|
31753
|
+
result.set(fontData, offset);
|
|
31754
|
+
return result;
|
|
31755
|
+
}
|
|
31694
31756
|
function parseEotHeader(data) {
|
|
31695
31757
|
if (!isEotFormat(data)) {
|
|
31696
31758
|
return null;
|
|
@@ -31793,7 +31855,8 @@ function guidToKey(guid) {
|
|
|
31793
31855
|
}
|
|
31794
31856
|
const key = new Uint8Array(KEY_LENGTH);
|
|
31795
31857
|
for (let i = 0; i < KEY_LENGTH; i++) {
|
|
31796
|
-
|
|
31858
|
+
const sourceIndex = KEY_LENGTH - i - 1;
|
|
31859
|
+
key[i] = parseInt(stripped.substring(sourceIndex * 2, sourceIndex * 2 + 2), 16);
|
|
31797
31860
|
}
|
|
31798
31861
|
return key;
|
|
31799
31862
|
}
|
|
@@ -41645,9 +41708,13 @@ var NAMESPACE_PAIRS = [
|
|
|
41645
41708
|
"http://schemas.openxmlformats.org/officeDocument/2006/bibliography"
|
|
41646
41709
|
],
|
|
41647
41710
|
[
|
|
41648
|
-
"http://purl.oclc.org/ooxml/officeDocument/
|
|
41711
|
+
"http://purl.oclc.org/ooxml/officeDocument/customProperties",
|
|
41649
41712
|
"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties"
|
|
41650
41713
|
],
|
|
41714
|
+
[
|
|
41715
|
+
"http://purl.oclc.org/ooxml/officeDocument/relationships/customProperties",
|
|
41716
|
+
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties"
|
|
41717
|
+
],
|
|
41651
41718
|
[
|
|
41652
41719
|
"http://purl.oclc.org/ooxml/officeDocument/extended-properties",
|
|
41653
41720
|
"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"
|
|
@@ -52472,6 +52539,12 @@ function applyImageColorEffects(blip, effects, parseColor, extractOpacity) {
|
|
|
52472
52539
|
}
|
|
52473
52540
|
}
|
|
52474
52541
|
var EMU_PER_PX7 = 9525;
|
|
52542
|
+
function isSyntheticBulletMarkerSegment(segment) {
|
|
52543
|
+
const markerText = String(segment.text ?? "").trim();
|
|
52544
|
+
return Boolean(
|
|
52545
|
+
segment.bulletInfo && (segment.bulletInfo.char && markerText === segment.bulletInfo.char || segment.bulletInfo.autoNumType && /^\S+[.)]$/u.test(markerText) || (segment.bulletInfo.imageDataUrl || segment.bulletInfo.imageRelId) && markerText === "\u{1F4CE}")
|
|
52546
|
+
);
|
|
52547
|
+
}
|
|
52475
52548
|
function buildParagraphPropertiesXml(textStyle, paragraphAlign, bulletInfo, spacing, level) {
|
|
52476
52549
|
const paragraphProps = {};
|
|
52477
52550
|
if (typeof level === "number" && Number.isFinite(level) && level > 0) {
|
|
@@ -53426,6 +53499,14 @@ var PptxHandlerRuntime = class {
|
|
|
53426
53499
|
}
|
|
53427
53500
|
}
|
|
53428
53501
|
};
|
|
53502
|
+
function parseOoxmlFixedPercentage(value) {
|
|
53503
|
+
const raw = String(value ?? "").trim();
|
|
53504
|
+
if (!raw) {
|
|
53505
|
+
return void 0;
|
|
53506
|
+
}
|
|
53507
|
+
const parsed = raw.endsWith("%") ? Number.parseFloat(raw.slice(0, -1)) * 1e3 : Number.parseInt(raw, 10);
|
|
53508
|
+
return Number.isFinite(parsed) && parsed !== 0 ? Math.round(parsed) : void 0;
|
|
53509
|
+
}
|
|
53429
53510
|
var EMU_PER_PIXEL = 9525;
|
|
53430
53511
|
var BORDER_SIDES = [
|
|
53431
53512
|
"left",
|
|
@@ -53450,9 +53531,9 @@ function parseSolidFillStyle(solidFill2) {
|
|
|
53450
53531
|
return void 0;
|
|
53451
53532
|
}
|
|
53452
53533
|
const tintRaw = schemeClr["a:tint"];
|
|
53453
|
-
const tint = tintRaw ?
|
|
53534
|
+
const tint = tintRaw ? parseOoxmlFixedPercentage(tintRaw["@_val"]) : void 0;
|
|
53454
53535
|
const shadeRaw = schemeClr["a:shade"];
|
|
53455
|
-
const shade = shadeRaw ?
|
|
53536
|
+
const shade = shadeRaw ? parseOoxmlFixedPercentage(shadeRaw["@_val"]) : void 0;
|
|
53456
53537
|
return { schemeColor, tint, shade };
|
|
53457
53538
|
}
|
|
53458
53539
|
function parseBorderSide(side) {
|
|
@@ -53533,12 +53614,12 @@ function parseColorChoiceFill(node) {
|
|
|
53533
53614
|
}
|
|
53534
53615
|
const fill = { schemeColor: "", color: color2 };
|
|
53535
53616
|
const tintRaw = srgb?.["a:tint"];
|
|
53536
|
-
const tint = tintRaw ?
|
|
53617
|
+
const tint = tintRaw ? parseOoxmlFixedPercentage(tintRaw["@_val"]) : void 0;
|
|
53537
53618
|
if (tint !== void 0) {
|
|
53538
53619
|
fill.tint = tint;
|
|
53539
53620
|
}
|
|
53540
53621
|
const shadeRaw = srgb?.["a:shade"];
|
|
53541
|
-
const shade = shadeRaw ?
|
|
53622
|
+
const shade = shadeRaw ? parseOoxmlFixedPercentage(shadeRaw["@_val"]) : void 0;
|
|
53542
53623
|
if (shade !== void 0) {
|
|
53543
53624
|
fill.shade = shade;
|
|
53544
53625
|
}
|
|
@@ -53659,11 +53740,11 @@ function parseTableStyleSectionText(section) {
|
|
|
53659
53740
|
hasProps = true;
|
|
53660
53741
|
const tintNode = schemeClr["a:tint"];
|
|
53661
53742
|
if (tintNode) {
|
|
53662
|
-
result.fontTint =
|
|
53743
|
+
result.fontTint = parseOoxmlFixedPercentage(tintNode["@_val"]);
|
|
53663
53744
|
}
|
|
53664
53745
|
const shadeNode = schemeClr["a:shade"];
|
|
53665
53746
|
if (shadeNode) {
|
|
53666
|
-
result.fontShade =
|
|
53747
|
+
result.fontShade = parseOoxmlFixedPercentage(shadeNode["@_val"]);
|
|
53667
53748
|
}
|
|
53668
53749
|
}
|
|
53669
53750
|
} else {
|
|
@@ -56391,6 +56472,9 @@ var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
|
|
|
56391
56472
|
}
|
|
56392
56473
|
capturedParagraphMeta = true;
|
|
56393
56474
|
}
|
|
56475
|
+
if (isSyntheticBulletMarkerSegment(segment)) {
|
|
56476
|
+
return;
|
|
56477
|
+
}
|
|
56394
56478
|
if (segment.isLineBreak) {
|
|
56395
56479
|
const brNode = {};
|
|
56396
56480
|
if (segment.breakRunProperties && typeof segment.breakRunProperties === "object") {
|
|
@@ -62272,6 +62356,13 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime7 extends PptxHandlerRuntime
|
|
|
62272
62356
|
};
|
|
62273
62357
|
for (const variant of variants) {
|
|
62274
62358
|
const fontData = variant.rawFontData;
|
|
62359
|
+
const isWebFont = variant.format === "woff" || variant.format === "woff2";
|
|
62360
|
+
const hasSfntSignature = fontData.length >= 4 && (fontData[0] === 0 && fontData[1] === 1 && fontData[2] === 0 && fontData[3] === 0 || String.fromCharCode(fontData[0], fontData[1], fontData[2], fontData[3]) === "OTTO" || String.fromCharCode(fontData[0], fontData[1], fontData[2], fontData[3]) === "true" || String.fromCharCode(fontData[0], fontData[1], fontData[2], fontData[3]) === "ttcf");
|
|
62361
|
+
if (!variant.originalRId && (isWebFont || !hasSfntSignature)) {
|
|
62362
|
+
throw new Error(
|
|
62363
|
+
`Cannot embed custom font "${variant.name}" in PowerPoint: use a valid .ttf or .otf font file, not WOFF/WOFF2 browser data.`
|
|
62364
|
+
);
|
|
62365
|
+
}
|
|
62275
62366
|
const hasOriginal = Boolean(variant.originalRId && variant.partPath);
|
|
62276
62367
|
const reuseObfuscation = hasOriginal && Boolean(variant.fontGuid);
|
|
62277
62368
|
const reuseVerbatim = hasOriginal && !variant.fontGuid && Boolean(variant.originalPartBytes);
|
|
@@ -62294,10 +62385,16 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime7 extends PptxHandlerRuntime
|
|
|
62294
62385
|
bytesToWrite = variant.originalPartBytes;
|
|
62295
62386
|
} else {
|
|
62296
62387
|
guid = variant.fontGuid ?? generateFontGuid();
|
|
62297
|
-
const
|
|
62388
|
+
const usedFontNumbers = relationships.map((relationship) => /fonts\/font(?<number>\d+)\.fntdata$/iu.exec(String(relationship?.["@_Target"] || ""))?.groups?.number).map((number) => Number(number)).filter((number) => Number.isFinite(number));
|
|
62389
|
+
const fileName = `font${Math.max(0, ...usedFontNumbers) + 1}.fntdata`;
|
|
62298
62390
|
fontPartPath = `ppt/fonts/${fileName}`;
|
|
62299
62391
|
relativeTarget4 = `fonts/${fileName}`;
|
|
62300
|
-
bytesToWrite =
|
|
62392
|
+
bytesToWrite = createEotFromSfnt(fontData, {
|
|
62393
|
+
familyName: variant.name,
|
|
62394
|
+
styleName: variant.bold ? variant.italic ? "Bold Italic" : "Bold" : variant.italic ? "Italic" : "Regular",
|
|
62395
|
+
weight: variant.bold ? 700 : 400,
|
|
62396
|
+
italic: variant.italic
|
|
62397
|
+
});
|
|
62301
62398
|
const existingRel = relationships.find(
|
|
62302
62399
|
(r) => String(r?.["@_Target"] || "") === relativeTarget4
|
|
62303
62400
|
);
|
|
@@ -62440,12 +62537,16 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime7 extends PptxHandlerRuntime
|
|
|
62440
62537
|
if (!xmlText2.trim()) {
|
|
62441
62538
|
continue;
|
|
62442
62539
|
}
|
|
62540
|
+
const isPresentationXml = path === "ppt/presentation.xml";
|
|
62541
|
+
const containsConvertibleUri = xmlText2.match(/https?:\/\/[^"'<>\s]+/gu)?.some((uri) => isTransitionalNamespaceUri(uri)) ?? false;
|
|
62542
|
+
if (!isPresentationXml && !containsConvertibleUri) {
|
|
62543
|
+
continue;
|
|
62544
|
+
}
|
|
62443
62545
|
try {
|
|
62444
62546
|
const parsed = parse(xmlText2);
|
|
62445
62547
|
if (typeof parsed !== "object" || parsed === null) {
|
|
62446
62548
|
continue;
|
|
62447
62549
|
}
|
|
62448
|
-
const isPresentationXml = path === "ppt/presentation.xml";
|
|
62449
62550
|
convertXmlToStrict(parsed, isPresentationXml);
|
|
62450
62551
|
this.zip.file(path, this.builder.build(parsed));
|
|
62451
62552
|
} catch {
|
|
@@ -63592,7 +63693,10 @@ var PptxHandlerRuntime30 = class _PptxHandlerRuntime9 extends PptxHandlerRuntime
|
|
|
63592
63693
|
}
|
|
63593
63694
|
const textValueForSave = this.getTextValueForSave(el.text, el.textSegments);
|
|
63594
63695
|
let textSegmentsForSave = el.textSegments;
|
|
63595
|
-
|
|
63696
|
+
const hasStructuredListMarkers = Boolean(
|
|
63697
|
+
el.textSegments?.some((segment) => segment.bulletInfo && !segment.bulletInfo.none)
|
|
63698
|
+
);
|
|
63699
|
+
if (typeof el.text === "string" && this.areTextSegmentsUniform(el.textSegments) && !hasStructuredListMarkers) {
|
|
63596
63700
|
textSegmentsForSave = void 0;
|
|
63597
63701
|
const existingTextSegments = this.extractTextSegmentsFromTxBodyForRewrite(
|
|
63598
63702
|
txBody,
|
|
@@ -65252,7 +65356,14 @@ var PptxHandlerRuntime40 = class _PptxHandlerRuntime16 extends PptxHandlerRuntim
|
|
|
65252
65356
|
if (el.type === "group") {
|
|
65253
65357
|
const grpXml = this.buildGroupShapeXml(el);
|
|
65254
65358
|
if (grpXml) {
|
|
65255
|
-
|
|
65359
|
+
if (this.isTemplateElementId(el.id)) {
|
|
65360
|
+
const templateSpTree = this.getTemplateSpTree(ctx.slide.id, el.id);
|
|
65361
|
+
if (templateSpTree) {
|
|
65362
|
+
el.rawXml = this.ensureTemplateShapeAttached(templateSpTree, el.type, grpXml);
|
|
65363
|
+
}
|
|
65364
|
+
} else {
|
|
65365
|
+
collectors.groups.push(grpXml);
|
|
65366
|
+
}
|
|
65256
65367
|
}
|
|
65257
65368
|
return;
|
|
65258
65369
|
}
|
|
@@ -67081,11 +67192,17 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime18 extends PptxHandlerRuntim
|
|
|
67081
67192
|
this.modernCommentAuthorsRelationshipId = modernPackage.authorRelationshipId;
|
|
67082
67193
|
this.applySlideMasterChanges(options?.slideMasters);
|
|
67083
67194
|
this.applySlideLayoutChanges(options?.slideLayouts);
|
|
67195
|
+
const dirtyLayoutPaths = new Set(options?.slideLayouts?.map((layout) => layout.path) ?? []);
|
|
67084
67196
|
for (const [layoutPath, layoutXmlObj] of this.layoutXmlMap.entries()) {
|
|
67085
|
-
|
|
67197
|
+
if (dirtyLayoutPaths.has(layoutPath)) {
|
|
67198
|
+
this.zip.file(layoutPath, this.builder.build(layoutXmlObj));
|
|
67199
|
+
}
|
|
67086
67200
|
}
|
|
67201
|
+
const dirtyMasterPaths = new Set(options?.slideMasters?.map((master) => master.path) ?? []);
|
|
67087
67202
|
for (const [masterPath, masterXmlObj] of this.masterXmlMap.entries()) {
|
|
67088
|
-
|
|
67203
|
+
if (dirtyMasterPaths.has(masterPath)) {
|
|
67204
|
+
this.zip.file(masterPath, this.builder.build(masterXmlObj));
|
|
67205
|
+
}
|
|
67089
67206
|
}
|
|
67090
67207
|
await this.persistThemeParts();
|
|
67091
67208
|
await this.applyEmbeddedFontPreservation(options?.embeddedFonts, options?.embeddedFontList);
|
|
@@ -67125,7 +67242,7 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime18 extends PptxHandlerRuntim
|
|
|
67125
67242
|
}
|
|
67126
67243
|
} : options?.presentationProperties;
|
|
67127
67244
|
await this.applyPresentationPropertiesPart(presentationProperties);
|
|
67128
|
-
await this.applyViewPropertiesPart(options?.viewProperties
|
|
67245
|
+
await this.applyViewPropertiesPart(options?.viewProperties);
|
|
67129
67246
|
await this.applyTableStylesPart(options?.tableStyles);
|
|
67130
67247
|
await this.documentPropertiesUpdater.updateOnSave(slides, {
|
|
67131
67248
|
coreProperties: options?.coreProperties,
|
|
@@ -74571,7 +74688,9 @@ var PptxHandlerRuntime84 = class _PptxHandlerRuntime35 extends PptxHandlerRuntim
|
|
|
74571
74688
|
const y = Math.round(parseInt(String(off["@_y"] || "0"), 10) / emuPerPx);
|
|
74572
74689
|
const width = Math.round(parseInt(String(ext["@_cx"] || "0"), 10) / emuPerPx);
|
|
74573
74690
|
const height = Math.round(parseInt(String(ext["@_cy"] || "0"), 10) / emuPerPx);
|
|
74574
|
-
|
|
74691
|
+
const preliminaryPrstGeom = this.xmlLookupService.getChildByLocalName(spPr, "prstGeom");
|
|
74692
|
+
const preliminaryShapeType = preliminaryPrstGeom ? String(preliminaryPrstGeom["@_prst"] || "rect") : "rect";
|
|
74693
|
+
if ((width <= 0 || height <= 0) && preliminaryShapeType !== "line") {
|
|
74575
74694
|
return null;
|
|
74576
74695
|
}
|
|
74577
74696
|
const rotation = xfrm?.["@_rot"] ? parseInt(String(xfrm["@_rot"]), 10) / 6e4 : void 0;
|
|
@@ -74607,6 +74726,14 @@ var PptxHandlerRuntime84 = class _PptxHandlerRuntime35 extends PptxHandlerRuntim
|
|
|
74607
74726
|
const strokeColor = this.parseColor(lnFill);
|
|
74608
74727
|
const strokeWidthRaw = lnNode ? parseInt(String(lnNode["@_w"] || ""), 10) : NaN;
|
|
74609
74728
|
const strokeWidth = Number.isFinite(strokeWidthRaw) && strokeWidthRaw > 0 ? strokeWidthRaw / 12700 : void 0;
|
|
74729
|
+
const prstDash = lnNode ? this.xmlLookupService.getChildByLocalName(lnNode, "prstDash") : void 0;
|
|
74730
|
+
const headEnd = lnNode ? this.xmlLookupService.getChildByLocalName(lnNode, "headEnd") : void 0;
|
|
74731
|
+
const tailEnd = lnNode ? this.xmlLookupService.getChildByLocalName(lnNode, "tailEnd") : void 0;
|
|
74732
|
+
const arrowType = (node) => {
|
|
74733
|
+
const value = node?.["@_type"];
|
|
74734
|
+
return value === "none" || value === "triangle" || value === "stealth" || value === "diamond" || value === "oval" || value === "arrow" ? value : void 0;
|
|
74735
|
+
};
|
|
74736
|
+
const arrowSize = (value) => value === "sm" || value === "med" || value === "lg" ? value : void 0;
|
|
74610
74737
|
const txBody = this.xmlLookupService.getChildByLocalName(sp, "txBody");
|
|
74611
74738
|
const textValues2 = [];
|
|
74612
74739
|
if (txBody) {
|
|
@@ -74646,6 +74773,13 @@ var PptxHandlerRuntime84 = class _PptxHandlerRuntime35 extends PptxHandlerRuntim
|
|
|
74646
74773
|
fillColor: fill.fillColor ?? void 0,
|
|
74647
74774
|
strokeColor: strokeColor ?? void 0,
|
|
74648
74775
|
strokeWidth,
|
|
74776
|
+
strokeDash: prstDash ? String(prstDash["@_val"] || "") || void 0 : void 0,
|
|
74777
|
+
startArrow: arrowType(headEnd),
|
|
74778
|
+
endArrow: arrowType(tailEnd),
|
|
74779
|
+
startArrowWidth: arrowSize(headEnd?.["@_w"]),
|
|
74780
|
+
startArrowLength: arrowSize(headEnd?.["@_len"]),
|
|
74781
|
+
endArrowWidth: arrowSize(tailEnd?.["@_w"]),
|
|
74782
|
+
endArrowLength: arrowSize(tailEnd?.["@_len"]),
|
|
74649
74783
|
text: structuredText,
|
|
74650
74784
|
textSegments,
|
|
74651
74785
|
fontSize,
|