@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
|
@@ -8624,7 +8624,7 @@ var PptxPresentationSlidesReconciler = class {
|
|
|
8624
8624
|
if (typeof relationshipId2 === "string" && relationshipId2.length > 0) {
|
|
8625
8625
|
usedRIds.add(relationshipId2);
|
|
8626
8626
|
}
|
|
8627
|
-
if (relationshipType
|
|
8627
|
+
if (this.isSlideRelationshipType(relationshipType, input.slideRelationshipType) && typeof relationshipId2 === "string" && typeof relationshipTarget2 === "string") {
|
|
8628
8628
|
slideTargetByRid.set(relationshipId2, relationshipTarget2);
|
|
8629
8629
|
continue;
|
|
8630
8630
|
}
|
|
@@ -8839,6 +8839,13 @@ var PptxPresentationSlidesReconciler = class {
|
|
|
8839
8839
|
}
|
|
8840
8840
|
return [value];
|
|
8841
8841
|
}
|
|
8842
|
+
/** Match equivalent Strict and Transitional slide relationship URIs. */
|
|
8843
|
+
isSlideRelationshipType(value, expected) {
|
|
8844
|
+
if (typeof value !== "string") {
|
|
8845
|
+
return false;
|
|
8846
|
+
}
|
|
8847
|
+
return value === expected || value.endsWith("/relationships/slide");
|
|
8848
|
+
}
|
|
8842
8849
|
};
|
|
8843
8850
|
function isExternalTarget(target) {
|
|
8844
8851
|
const normalized = target.trim();
|
|
@@ -9506,11 +9513,12 @@ function colorWithOpacity(color2, opacity2) {
|
|
|
9506
9513
|
return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${clampUnitInterval(opacity2)})`;
|
|
9507
9514
|
}
|
|
9508
9515
|
function parseDrawingPercent(value) {
|
|
9509
|
-
const
|
|
9516
|
+
const raw = String(value ?? "").trim();
|
|
9517
|
+
const parsed = Number.parseFloat(raw);
|
|
9510
9518
|
if (!Number.isFinite(parsed)) {
|
|
9511
9519
|
return void 0;
|
|
9512
9520
|
}
|
|
9513
|
-
return clampUnitInterval(parsed / 1e5);
|
|
9521
|
+
return clampUnitInterval(raw.endsWith("%") ? parsed / 100 : parsed / 1e5);
|
|
9514
9522
|
}
|
|
9515
9523
|
function scrgbLinearToSrgb8(linear) {
|
|
9516
9524
|
const l = Math.min(1, Math.max(0, linear));
|
|
@@ -9589,11 +9597,12 @@ function hslToRgb(h, s, l) {
|
|
|
9589
9597
|
};
|
|
9590
9598
|
}
|
|
9591
9599
|
function parseDrawingFraction(value) {
|
|
9592
|
-
const
|
|
9600
|
+
const raw = String(value ?? "").trim();
|
|
9601
|
+
const parsed = Number.parseFloat(raw);
|
|
9593
9602
|
if (!Number.isFinite(parsed)) {
|
|
9594
9603
|
return void 0;
|
|
9595
9604
|
}
|
|
9596
|
-
return parsed / 1e5;
|
|
9605
|
+
return raw.endsWith("%") ? parsed / 100 : parsed / 1e5;
|
|
9597
9606
|
}
|
|
9598
9607
|
function parseDrawingHueDegrees(value) {
|
|
9599
9608
|
const parsed = Number.parseFloat(String(value ?? "").trim());
|
|
@@ -9650,9 +9659,9 @@ function applyDrawingColorTransforms(baseColor, colorNode) {
|
|
|
9650
9659
|
}
|
|
9651
9660
|
const tint = parseDrawingPercent(getVal("a:tint"));
|
|
9652
9661
|
if (tint !== void 0) {
|
|
9653
|
-
r
|
|
9654
|
-
g
|
|
9655
|
-
b
|
|
9662
|
+
r = 255 - (255 - r) * tint;
|
|
9663
|
+
g = 255 - (255 - g) * tint;
|
|
9664
|
+
b = 255 - (255 - b) * tint;
|
|
9656
9665
|
}
|
|
9657
9666
|
const hslKeys = [
|
|
9658
9667
|
"a:hue",
|
|
@@ -16379,8 +16388,16 @@ var PptxDocumentPropertiesUpdater = class {
|
|
|
16379
16388
|
const relationships = relsData["Relationships"];
|
|
16380
16389
|
if (relationships) {
|
|
16381
16390
|
const rels = Array.isArray(relationships["Relationship"]) ? relationships["Relationship"] : relationships["Relationship"] ? [relationships["Relationship"]] : [];
|
|
16382
|
-
const
|
|
16383
|
-
|
|
16391
|
+
const customRelationships = rels.filter(
|
|
16392
|
+
(relationship) => this.isCustomPropertiesRelationship(relationship)
|
|
16393
|
+
);
|
|
16394
|
+
if (customRelationships.length > 0) {
|
|
16395
|
+
const retained = customRelationships[0];
|
|
16396
|
+
relationships["Relationship"] = rels.filter(
|
|
16397
|
+
(relationship) => !this.isCustomPropertiesRelationship(relationship) || relationship === retained
|
|
16398
|
+
);
|
|
16399
|
+
this.context.zip.file("_rels/.rels", this.context.builder.build(relsData));
|
|
16400
|
+
} else {
|
|
16384
16401
|
let maxId = 0;
|
|
16385
16402
|
for (const rel of rels) {
|
|
16386
16403
|
const id = String(rel?.["@_Id"] || "");
|
|
@@ -16409,7 +16426,6 @@ var PptxDocumentPropertiesUpdater = class {
|
|
|
16409
16426
|
* orphan content-type entry referencing a deleted part.
|
|
16410
16427
|
*/
|
|
16411
16428
|
async removeCustomPropertiesPackagingArtifacts() {
|
|
16412
|
-
const customRelType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties";
|
|
16413
16429
|
const ctFile = this.context.zip.file("[Content_Types].xml");
|
|
16414
16430
|
if (ctFile) {
|
|
16415
16431
|
try {
|
|
@@ -16437,7 +16453,9 @@ var PptxDocumentPropertiesUpdater = class {
|
|
|
16437
16453
|
const relationships = relsData["Relationships"];
|
|
16438
16454
|
if (relationships) {
|
|
16439
16455
|
const rels = Array.isArray(relationships["Relationship"]) ? relationships["Relationship"] : relationships["Relationship"] ? [relationships["Relationship"]] : [];
|
|
16440
|
-
const filtered = rels.filter(
|
|
16456
|
+
const filtered = rels.filter(
|
|
16457
|
+
(relationship) => !this.isCustomPropertiesRelationship(relationship)
|
|
16458
|
+
);
|
|
16441
16459
|
if (filtered.length !== rels.length) {
|
|
16442
16460
|
relationships["Relationship"] = filtered;
|
|
16443
16461
|
this.context.zip.file("_rels/.rels", this.context.builder.build(relsData));
|
|
@@ -16447,6 +16465,11 @@ var PptxDocumentPropertiesUpdater = class {
|
|
|
16447
16465
|
}
|
|
16448
16466
|
}
|
|
16449
16467
|
}
|
|
16468
|
+
isCustomPropertiesRelationship(relationship) {
|
|
16469
|
+
const type = String(relationship?.["@_Type"] || "");
|
|
16470
|
+
const target = String(relationship?.["@_Target"] || "").replace(/\\/gu, "/").replace(/^\.\//u, "");
|
|
16471
|
+
return target === "docProps/custom.xml" || type.endsWith("/relationships/custom-properties") || type.endsWith("/relationships/customProperties");
|
|
16472
|
+
}
|
|
16450
16473
|
normalizeCustomPropertyType(type) {
|
|
16451
16474
|
const supportedTypes = /* @__PURE__ */ new Set([
|
|
16452
16475
|
"lpwstr",
|
|
@@ -31685,6 +31708,45 @@ function isEotFormat(data) {
|
|
|
31685
31708
|
const magic = readUint16LE(data, EOT_MAGIC_OFFSET);
|
|
31686
31709
|
return magic === EOT_MAGIC;
|
|
31687
31710
|
}
|
|
31711
|
+
function createEotFromSfnt(fontData, options) {
|
|
31712
|
+
const encodeName2 = (value) => {
|
|
31713
|
+
const bytes = new Uint8Array((value.length + 1) * 2);
|
|
31714
|
+
const view2 = new DataView(bytes.buffer);
|
|
31715
|
+
for (let i = 0; i < value.length; i++) {
|
|
31716
|
+
view2.setUint16(i * 2, value.charCodeAt(i), true);
|
|
31717
|
+
}
|
|
31718
|
+
return bytes;
|
|
31719
|
+
};
|
|
31720
|
+
const names = [
|
|
31721
|
+
encodeName2(options.familyName),
|
|
31722
|
+
encodeName2(options.styleName ?? ""),
|
|
31723
|
+
encodeName2(""),
|
|
31724
|
+
encodeName2(options.fullName ?? options.familyName)
|
|
31725
|
+
];
|
|
31726
|
+
const headerSize = 80 + names.reduce((sum, name) => sum + 4 + name.length, 0);
|
|
31727
|
+
const result = new Uint8Array(headerSize + fontData.length);
|
|
31728
|
+
const view = new DataView(result.buffer);
|
|
31729
|
+
view.setUint32(0, result.length, true);
|
|
31730
|
+
view.setUint32(4, fontData.length, true);
|
|
31731
|
+
view.setUint32(8, 131073, true);
|
|
31732
|
+
view.setUint32(12, 0, true);
|
|
31733
|
+
result[26] = 1;
|
|
31734
|
+
result[27] = options.italic ? 1 : 0;
|
|
31735
|
+
view.setUint32(28, options.weight ?? 400, true);
|
|
31736
|
+
view.setUint16(32, 0, true);
|
|
31737
|
+
view.setUint16(34, EOT_MAGIC, true);
|
|
31738
|
+
let offset = 80;
|
|
31739
|
+
for (const name of names) {
|
|
31740
|
+
view.setUint16(offset, 0, true);
|
|
31741
|
+
offset += 2;
|
|
31742
|
+
view.setUint16(offset, name.length, true);
|
|
31743
|
+
offset += 2;
|
|
31744
|
+
result.set(name, offset);
|
|
31745
|
+
offset += name.length;
|
|
31746
|
+
}
|
|
31747
|
+
result.set(fontData, offset);
|
|
31748
|
+
return result;
|
|
31749
|
+
}
|
|
31688
31750
|
function parseEotHeader(data) {
|
|
31689
31751
|
if (!isEotFormat(data)) {
|
|
31690
31752
|
return null;
|
|
@@ -31787,7 +31849,8 @@ function guidToKey(guid) {
|
|
|
31787
31849
|
}
|
|
31788
31850
|
const key = new Uint8Array(KEY_LENGTH);
|
|
31789
31851
|
for (let i = 0; i < KEY_LENGTH; i++) {
|
|
31790
|
-
|
|
31852
|
+
const sourceIndex = KEY_LENGTH - i - 1;
|
|
31853
|
+
key[i] = parseInt(stripped.substring(sourceIndex * 2, sourceIndex * 2 + 2), 16);
|
|
31791
31854
|
}
|
|
31792
31855
|
return key;
|
|
31793
31856
|
}
|
|
@@ -41639,9 +41702,13 @@ var NAMESPACE_PAIRS = [
|
|
|
41639
41702
|
"http://schemas.openxmlformats.org/officeDocument/2006/bibliography"
|
|
41640
41703
|
],
|
|
41641
41704
|
[
|
|
41642
|
-
"http://purl.oclc.org/ooxml/officeDocument/
|
|
41705
|
+
"http://purl.oclc.org/ooxml/officeDocument/customProperties",
|
|
41643
41706
|
"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties"
|
|
41644
41707
|
],
|
|
41708
|
+
[
|
|
41709
|
+
"http://purl.oclc.org/ooxml/officeDocument/relationships/customProperties",
|
|
41710
|
+
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties"
|
|
41711
|
+
],
|
|
41645
41712
|
[
|
|
41646
41713
|
"http://purl.oclc.org/ooxml/officeDocument/extended-properties",
|
|
41647
41714
|
"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"
|
|
@@ -52466,6 +52533,12 @@ function applyImageColorEffects(blip, effects, parseColor, extractOpacity) {
|
|
|
52466
52533
|
}
|
|
52467
52534
|
}
|
|
52468
52535
|
var EMU_PER_PX7 = 9525;
|
|
52536
|
+
function isSyntheticBulletMarkerSegment(segment) {
|
|
52537
|
+
const markerText = String(segment.text ?? "").trim();
|
|
52538
|
+
return Boolean(
|
|
52539
|
+
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}")
|
|
52540
|
+
);
|
|
52541
|
+
}
|
|
52469
52542
|
function buildParagraphPropertiesXml(textStyle, paragraphAlign, bulletInfo, spacing, level) {
|
|
52470
52543
|
const paragraphProps = {};
|
|
52471
52544
|
if (typeof level === "number" && Number.isFinite(level) && level > 0) {
|
|
@@ -53420,6 +53493,14 @@ var PptxHandlerRuntime = class {
|
|
|
53420
53493
|
}
|
|
53421
53494
|
}
|
|
53422
53495
|
};
|
|
53496
|
+
function parseOoxmlFixedPercentage(value) {
|
|
53497
|
+
const raw = String(value ?? "").trim();
|
|
53498
|
+
if (!raw) {
|
|
53499
|
+
return void 0;
|
|
53500
|
+
}
|
|
53501
|
+
const parsed = raw.endsWith("%") ? Number.parseFloat(raw.slice(0, -1)) * 1e3 : Number.parseInt(raw, 10);
|
|
53502
|
+
return Number.isFinite(parsed) && parsed !== 0 ? Math.round(parsed) : void 0;
|
|
53503
|
+
}
|
|
53423
53504
|
var EMU_PER_PIXEL = 9525;
|
|
53424
53505
|
var BORDER_SIDES = [
|
|
53425
53506
|
"left",
|
|
@@ -53444,9 +53525,9 @@ function parseSolidFillStyle(solidFill2) {
|
|
|
53444
53525
|
return void 0;
|
|
53445
53526
|
}
|
|
53446
53527
|
const tintRaw = schemeClr["a:tint"];
|
|
53447
|
-
const tint = tintRaw ?
|
|
53528
|
+
const tint = tintRaw ? parseOoxmlFixedPercentage(tintRaw["@_val"]) : void 0;
|
|
53448
53529
|
const shadeRaw = schemeClr["a:shade"];
|
|
53449
|
-
const shade = shadeRaw ?
|
|
53530
|
+
const shade = shadeRaw ? parseOoxmlFixedPercentage(shadeRaw["@_val"]) : void 0;
|
|
53450
53531
|
return { schemeColor, tint, shade };
|
|
53451
53532
|
}
|
|
53452
53533
|
function parseBorderSide(side) {
|
|
@@ -53527,12 +53608,12 @@ function parseColorChoiceFill(node) {
|
|
|
53527
53608
|
}
|
|
53528
53609
|
const fill = { schemeColor: "", color: color2 };
|
|
53529
53610
|
const tintRaw = srgb?.["a:tint"];
|
|
53530
|
-
const tint = tintRaw ?
|
|
53611
|
+
const tint = tintRaw ? parseOoxmlFixedPercentage(tintRaw["@_val"]) : void 0;
|
|
53531
53612
|
if (tint !== void 0) {
|
|
53532
53613
|
fill.tint = tint;
|
|
53533
53614
|
}
|
|
53534
53615
|
const shadeRaw = srgb?.["a:shade"];
|
|
53535
|
-
const shade = shadeRaw ?
|
|
53616
|
+
const shade = shadeRaw ? parseOoxmlFixedPercentage(shadeRaw["@_val"]) : void 0;
|
|
53536
53617
|
if (shade !== void 0) {
|
|
53537
53618
|
fill.shade = shade;
|
|
53538
53619
|
}
|
|
@@ -53653,11 +53734,11 @@ function parseTableStyleSectionText(section) {
|
|
|
53653
53734
|
hasProps = true;
|
|
53654
53735
|
const tintNode = schemeClr["a:tint"];
|
|
53655
53736
|
if (tintNode) {
|
|
53656
|
-
result.fontTint =
|
|
53737
|
+
result.fontTint = parseOoxmlFixedPercentage(tintNode["@_val"]);
|
|
53657
53738
|
}
|
|
53658
53739
|
const shadeNode = schemeClr["a:shade"];
|
|
53659
53740
|
if (shadeNode) {
|
|
53660
|
-
result.fontShade =
|
|
53741
|
+
result.fontShade = parseOoxmlFixedPercentage(shadeNode["@_val"]);
|
|
53661
53742
|
}
|
|
53662
53743
|
}
|
|
53663
53744
|
} else {
|
|
@@ -56385,6 +56466,9 @@ var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
|
|
|
56385
56466
|
}
|
|
56386
56467
|
capturedParagraphMeta = true;
|
|
56387
56468
|
}
|
|
56469
|
+
if (isSyntheticBulletMarkerSegment(segment)) {
|
|
56470
|
+
return;
|
|
56471
|
+
}
|
|
56388
56472
|
if (segment.isLineBreak) {
|
|
56389
56473
|
const brNode = {};
|
|
56390
56474
|
if (segment.breakRunProperties && typeof segment.breakRunProperties === "object") {
|
|
@@ -62266,6 +62350,13 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime7 extends PptxHandlerRuntime
|
|
|
62266
62350
|
};
|
|
62267
62351
|
for (const variant of variants) {
|
|
62268
62352
|
const fontData = variant.rawFontData;
|
|
62353
|
+
const isWebFont = variant.format === "woff" || variant.format === "woff2";
|
|
62354
|
+
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");
|
|
62355
|
+
if (!variant.originalRId && (isWebFont || !hasSfntSignature)) {
|
|
62356
|
+
throw new Error(
|
|
62357
|
+
`Cannot embed custom font "${variant.name}" in PowerPoint: use a valid .ttf or .otf font file, not WOFF/WOFF2 browser data.`
|
|
62358
|
+
);
|
|
62359
|
+
}
|
|
62269
62360
|
const hasOriginal = Boolean(variant.originalRId && variant.partPath);
|
|
62270
62361
|
const reuseObfuscation = hasOriginal && Boolean(variant.fontGuid);
|
|
62271
62362
|
const reuseVerbatim = hasOriginal && !variant.fontGuid && Boolean(variant.originalPartBytes);
|
|
@@ -62288,10 +62379,16 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime7 extends PptxHandlerRuntime
|
|
|
62288
62379
|
bytesToWrite = variant.originalPartBytes;
|
|
62289
62380
|
} else {
|
|
62290
62381
|
guid = variant.fontGuid ?? generateFontGuid();
|
|
62291
|
-
const
|
|
62382
|
+
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));
|
|
62383
|
+
const fileName = `font${Math.max(0, ...usedFontNumbers) + 1}.fntdata`;
|
|
62292
62384
|
fontPartPath = `ppt/fonts/${fileName}`;
|
|
62293
62385
|
relativeTarget4 = `fonts/${fileName}`;
|
|
62294
|
-
bytesToWrite =
|
|
62386
|
+
bytesToWrite = createEotFromSfnt(fontData, {
|
|
62387
|
+
familyName: variant.name,
|
|
62388
|
+
styleName: variant.bold ? variant.italic ? "Bold Italic" : "Bold" : variant.italic ? "Italic" : "Regular",
|
|
62389
|
+
weight: variant.bold ? 700 : 400,
|
|
62390
|
+
italic: variant.italic
|
|
62391
|
+
});
|
|
62295
62392
|
const existingRel = relationships.find(
|
|
62296
62393
|
(r) => String(r?.["@_Target"] || "") === relativeTarget4
|
|
62297
62394
|
);
|
|
@@ -62434,12 +62531,16 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime7 extends PptxHandlerRuntime
|
|
|
62434
62531
|
if (!xmlText2.trim()) {
|
|
62435
62532
|
continue;
|
|
62436
62533
|
}
|
|
62534
|
+
const isPresentationXml = path === "ppt/presentation.xml";
|
|
62535
|
+
const containsConvertibleUri = xmlText2.match(/https?:\/\/[^"'<>\s]+/gu)?.some((uri) => isTransitionalNamespaceUri(uri)) ?? false;
|
|
62536
|
+
if (!isPresentationXml && !containsConvertibleUri) {
|
|
62537
|
+
continue;
|
|
62538
|
+
}
|
|
62437
62539
|
try {
|
|
62438
62540
|
const parsed = parse(xmlText2);
|
|
62439
62541
|
if (typeof parsed !== "object" || parsed === null) {
|
|
62440
62542
|
continue;
|
|
62441
62543
|
}
|
|
62442
|
-
const isPresentationXml = path === "ppt/presentation.xml";
|
|
62443
62544
|
convertXmlToStrict(parsed, isPresentationXml);
|
|
62444
62545
|
this.zip.file(path, this.builder.build(parsed));
|
|
62445
62546
|
} catch {
|
|
@@ -63586,7 +63687,10 @@ var PptxHandlerRuntime30 = class _PptxHandlerRuntime9 extends PptxHandlerRuntime
|
|
|
63586
63687
|
}
|
|
63587
63688
|
const textValueForSave = this.getTextValueForSave(el.text, el.textSegments);
|
|
63588
63689
|
let textSegmentsForSave = el.textSegments;
|
|
63589
|
-
|
|
63690
|
+
const hasStructuredListMarkers = Boolean(
|
|
63691
|
+
el.textSegments?.some((segment) => segment.bulletInfo && !segment.bulletInfo.none)
|
|
63692
|
+
);
|
|
63693
|
+
if (typeof el.text === "string" && this.areTextSegmentsUniform(el.textSegments) && !hasStructuredListMarkers) {
|
|
63590
63694
|
textSegmentsForSave = void 0;
|
|
63591
63695
|
const existingTextSegments = this.extractTextSegmentsFromTxBodyForRewrite(
|
|
63592
63696
|
txBody,
|
|
@@ -65246,7 +65350,14 @@ var PptxHandlerRuntime40 = class _PptxHandlerRuntime16 extends PptxHandlerRuntim
|
|
|
65246
65350
|
if (el.type === "group") {
|
|
65247
65351
|
const grpXml = this.buildGroupShapeXml(el);
|
|
65248
65352
|
if (grpXml) {
|
|
65249
|
-
|
|
65353
|
+
if (this.isTemplateElementId(el.id)) {
|
|
65354
|
+
const templateSpTree = this.getTemplateSpTree(ctx.slide.id, el.id);
|
|
65355
|
+
if (templateSpTree) {
|
|
65356
|
+
el.rawXml = this.ensureTemplateShapeAttached(templateSpTree, el.type, grpXml);
|
|
65357
|
+
}
|
|
65358
|
+
} else {
|
|
65359
|
+
collectors.groups.push(grpXml);
|
|
65360
|
+
}
|
|
65250
65361
|
}
|
|
65251
65362
|
return;
|
|
65252
65363
|
}
|
|
@@ -67075,11 +67186,17 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime18 extends PptxHandlerRuntim
|
|
|
67075
67186
|
this.modernCommentAuthorsRelationshipId = modernPackage.authorRelationshipId;
|
|
67076
67187
|
this.applySlideMasterChanges(options?.slideMasters);
|
|
67077
67188
|
this.applySlideLayoutChanges(options?.slideLayouts);
|
|
67189
|
+
const dirtyLayoutPaths = new Set(options?.slideLayouts?.map((layout) => layout.path) ?? []);
|
|
67078
67190
|
for (const [layoutPath, layoutXmlObj] of this.layoutXmlMap.entries()) {
|
|
67079
|
-
|
|
67191
|
+
if (dirtyLayoutPaths.has(layoutPath)) {
|
|
67192
|
+
this.zip.file(layoutPath, this.builder.build(layoutXmlObj));
|
|
67193
|
+
}
|
|
67080
67194
|
}
|
|
67195
|
+
const dirtyMasterPaths = new Set(options?.slideMasters?.map((master) => master.path) ?? []);
|
|
67081
67196
|
for (const [masterPath, masterXmlObj] of this.masterXmlMap.entries()) {
|
|
67082
|
-
|
|
67197
|
+
if (dirtyMasterPaths.has(masterPath)) {
|
|
67198
|
+
this.zip.file(masterPath, this.builder.build(masterXmlObj));
|
|
67199
|
+
}
|
|
67083
67200
|
}
|
|
67084
67201
|
await this.persistThemeParts();
|
|
67085
67202
|
await this.applyEmbeddedFontPreservation(options?.embeddedFonts, options?.embeddedFontList);
|
|
@@ -67119,7 +67236,7 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime18 extends PptxHandlerRuntim
|
|
|
67119
67236
|
}
|
|
67120
67237
|
} : options?.presentationProperties;
|
|
67121
67238
|
await this.applyPresentationPropertiesPart(presentationProperties);
|
|
67122
|
-
await this.applyViewPropertiesPart(options?.viewProperties
|
|
67239
|
+
await this.applyViewPropertiesPart(options?.viewProperties);
|
|
67123
67240
|
await this.applyTableStylesPart(options?.tableStyles);
|
|
67124
67241
|
await this.documentPropertiesUpdater.updateOnSave(slides, {
|
|
67125
67242
|
coreProperties: options?.coreProperties,
|
|
@@ -74565,7 +74682,9 @@ var PptxHandlerRuntime84 = class _PptxHandlerRuntime35 extends PptxHandlerRuntim
|
|
|
74565
74682
|
const y = Math.round(parseInt(String(off["@_y"] || "0"), 10) / emuPerPx);
|
|
74566
74683
|
const width = Math.round(parseInt(String(ext["@_cx"] || "0"), 10) / emuPerPx);
|
|
74567
74684
|
const height = Math.round(parseInt(String(ext["@_cy"] || "0"), 10) / emuPerPx);
|
|
74568
|
-
|
|
74685
|
+
const preliminaryPrstGeom = this.xmlLookupService.getChildByLocalName(spPr, "prstGeom");
|
|
74686
|
+
const preliminaryShapeType = preliminaryPrstGeom ? String(preliminaryPrstGeom["@_prst"] || "rect") : "rect";
|
|
74687
|
+
if ((width <= 0 || height <= 0) && preliminaryShapeType !== "line") {
|
|
74569
74688
|
return null;
|
|
74570
74689
|
}
|
|
74571
74690
|
const rotation = xfrm?.["@_rot"] ? parseInt(String(xfrm["@_rot"]), 10) / 6e4 : void 0;
|
|
@@ -74601,6 +74720,14 @@ var PptxHandlerRuntime84 = class _PptxHandlerRuntime35 extends PptxHandlerRuntim
|
|
|
74601
74720
|
const strokeColor = this.parseColor(lnFill);
|
|
74602
74721
|
const strokeWidthRaw = lnNode ? parseInt(String(lnNode["@_w"] || ""), 10) : NaN;
|
|
74603
74722
|
const strokeWidth = Number.isFinite(strokeWidthRaw) && strokeWidthRaw > 0 ? strokeWidthRaw / 12700 : void 0;
|
|
74723
|
+
const prstDash = lnNode ? this.xmlLookupService.getChildByLocalName(lnNode, "prstDash") : void 0;
|
|
74724
|
+
const headEnd = lnNode ? this.xmlLookupService.getChildByLocalName(lnNode, "headEnd") : void 0;
|
|
74725
|
+
const tailEnd = lnNode ? this.xmlLookupService.getChildByLocalName(lnNode, "tailEnd") : void 0;
|
|
74726
|
+
const arrowType = (node) => {
|
|
74727
|
+
const value = node?.["@_type"];
|
|
74728
|
+
return value === "none" || value === "triangle" || value === "stealth" || value === "diamond" || value === "oval" || value === "arrow" ? value : void 0;
|
|
74729
|
+
};
|
|
74730
|
+
const arrowSize = (value) => value === "sm" || value === "med" || value === "lg" ? value : void 0;
|
|
74604
74731
|
const txBody = this.xmlLookupService.getChildByLocalName(sp, "txBody");
|
|
74605
74732
|
const textValues2 = [];
|
|
74606
74733
|
if (txBody) {
|
|
@@ -74640,6 +74767,13 @@ var PptxHandlerRuntime84 = class _PptxHandlerRuntime35 extends PptxHandlerRuntim
|
|
|
74640
74767
|
fillColor: fill.fillColor ?? void 0,
|
|
74641
74768
|
strokeColor: strokeColor ?? void 0,
|
|
74642
74769
|
strokeWidth,
|
|
74770
|
+
strokeDash: prstDash ? String(prstDash["@_val"] || "") || void 0 : void 0,
|
|
74771
|
+
startArrow: arrowType(headEnd),
|
|
74772
|
+
endArrow: arrowType(tailEnd),
|
|
74773
|
+
startArrowWidth: arrowSize(headEnd?.["@_w"]),
|
|
74774
|
+
startArrowLength: arrowSize(headEnd?.["@_len"]),
|
|
74775
|
+
endArrowWidth: arrowSize(tailEnd?.["@_w"]),
|
|
74776
|
+
endArrowLength: arrowSize(tailEnd?.["@_len"]),
|
|
74643
74777
|
text: structuredText,
|
|
74644
74778
|
textSegments,
|
|
74645
74779
|
fontSize,
|