@aixa-transformation/pptx-viewer 2.0.30 → 2.0.31
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-7PC3BTGV.js → Model3DScene-7DX3ENQ6.js} +3 -3
- package/dist/{Model3DScene-OOLYRN3I.mjs → Model3DScene-BLJ7FKLP.mjs} +2 -2
- package/dist/{SurfaceChart3DScene-NKUQTDRP.js → SurfaceChart3DScene-63SAKPUY.js} +3 -3
- package/dist/{SurfaceChart3DScene-ZZYDRV5N.mjs → SurfaceChart3DScene-EQNT7LKA.mjs} +2 -2
- package/dist/{chunk-JJ5MVLCK.mjs → chunk-3IIMAKXR.mjs} +76 -20
- package/dist/{chunk-I5S57RYE.js → chunk-62Y7KDX7.js} +872 -835
- package/dist/{chunk-YVQPLQ3C.mjs → chunk-6SJP4DDM.mjs} +2 -2
- package/dist/{chunk-TYXOHBKR.mjs → chunk-FXXVW5YN.mjs} +15 -9
- package/dist/{chunk-XCLYIGHM.js → chunk-NG3CPWXD.js} +42 -42
- package/dist/{chunk-CKNLAQCV.mjs → chunk-RT4PSAEN.mjs} +45 -8
- package/dist/{chunk-OGINKMSL.js → chunk-UTBY3XQF.js} +490 -484
- package/dist/{chunk-N7OHVHBS.js → chunk-YOOFW6LR.js} +76 -20
- package/dist/{dist-72WLGYVZ.js → dist-DIPQCCIK.js} +568 -568
- package/dist/{dist-RTG3TU65.mjs → dist-YFPT5NJI.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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkNG3CPWXD_js = require('./chunk-NG3CPWXD.js');
|
|
4
|
+
require('./chunk-YOOFW6LR.js');
|
|
5
5
|
require('./chunk-QGM4M3NI.js');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -15,7 +15,7 @@ function Model3DScene({ modelUrl, interactive, width, height }) {
|
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
17
|
let disposed = false;
|
|
18
|
-
void
|
|
18
|
+
void chunkNG3CPWXD_js.mountModel3D(container, modelUrl, { width, height, interactive }).then((handle) => {
|
|
19
19
|
if (disposed) {
|
|
20
20
|
handle.dispose();
|
|
21
21
|
} else {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { mountModel3D } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { mountModel3D } from './chunk-6SJP4DDM.mjs';
|
|
2
|
+
import './chunk-3IIMAKXR.mjs';
|
|
3
3
|
import './chunk-6DZX6EAA.mjs';
|
|
4
4
|
import { useRef, useEffect } from 'react';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkNG3CPWXD_js = require('./chunk-NG3CPWXD.js');
|
|
4
|
+
require('./chunk-YOOFW6LR.js');
|
|
5
5
|
require('./chunk-QGM4M3NI.js');
|
|
6
6
|
var react = require('react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -26,7 +26,7 @@ function SurfaceChart3DScene({
|
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
let disposed = false;
|
|
29
|
-
void
|
|
29
|
+
void chunkNG3CPWXD_js.mountSurfaceChart3D(container, {
|
|
30
30
|
cols,
|
|
31
31
|
rows,
|
|
32
32
|
heightMap,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { mountSurfaceChart3D } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { mountSurfaceChart3D } from './chunk-6SJP4DDM.mjs';
|
|
2
|
+
import './chunk-3IIMAKXR.mjs';
|
|
3
3
|
import './chunk-6DZX6EAA.mjs';
|
|
4
4
|
import { useRef, useEffect } from 'react';
|
|
5
5
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -9506,11 +9506,12 @@ function colorWithOpacity(color2, opacity2) {
|
|
|
9506
9506
|
return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${clampUnitInterval(opacity2)})`;
|
|
9507
9507
|
}
|
|
9508
9508
|
function parseDrawingPercent(value) {
|
|
9509
|
-
const
|
|
9509
|
+
const raw = String(value ?? "").trim();
|
|
9510
|
+
const parsed = Number.parseFloat(raw);
|
|
9510
9511
|
if (!Number.isFinite(parsed)) {
|
|
9511
9512
|
return void 0;
|
|
9512
9513
|
}
|
|
9513
|
-
return clampUnitInterval(parsed / 1e5);
|
|
9514
|
+
return clampUnitInterval(raw.endsWith("%") ? parsed / 100 : parsed / 1e5);
|
|
9514
9515
|
}
|
|
9515
9516
|
function scrgbLinearToSrgb8(linear) {
|
|
9516
9517
|
const l = Math.min(1, Math.max(0, linear));
|
|
@@ -9589,11 +9590,12 @@ function hslToRgb(h, s, l) {
|
|
|
9589
9590
|
};
|
|
9590
9591
|
}
|
|
9591
9592
|
function parseDrawingFraction(value) {
|
|
9592
|
-
const
|
|
9593
|
+
const raw = String(value ?? "").trim();
|
|
9594
|
+
const parsed = Number.parseFloat(raw);
|
|
9593
9595
|
if (!Number.isFinite(parsed)) {
|
|
9594
9596
|
return void 0;
|
|
9595
9597
|
}
|
|
9596
|
-
return parsed / 1e5;
|
|
9598
|
+
return raw.endsWith("%") ? parsed / 100 : parsed / 1e5;
|
|
9597
9599
|
}
|
|
9598
9600
|
function parseDrawingHueDegrees(value) {
|
|
9599
9601
|
const parsed = Number.parseFloat(String(value ?? "").trim());
|
|
@@ -9650,9 +9652,9 @@ function applyDrawingColorTransforms(baseColor, colorNode) {
|
|
|
9650
9652
|
}
|
|
9651
9653
|
const tint = parseDrawingPercent(getVal("a:tint"));
|
|
9652
9654
|
if (tint !== void 0) {
|
|
9653
|
-
r
|
|
9654
|
-
g
|
|
9655
|
-
b
|
|
9655
|
+
r = 255 - (255 - r) * tint;
|
|
9656
|
+
g = 255 - (255 - g) * tint;
|
|
9657
|
+
b = 255 - (255 - b) * tint;
|
|
9656
9658
|
}
|
|
9657
9659
|
const hslKeys = [
|
|
9658
9660
|
"a:hue",
|
|
@@ -52466,6 +52468,12 @@ function applyImageColorEffects(blip, effects, parseColor, extractOpacity) {
|
|
|
52466
52468
|
}
|
|
52467
52469
|
}
|
|
52468
52470
|
var EMU_PER_PX7 = 9525;
|
|
52471
|
+
function isSyntheticBulletMarkerSegment(segment) {
|
|
52472
|
+
const markerText = String(segment.text ?? "").trim();
|
|
52473
|
+
return Boolean(
|
|
52474
|
+
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}")
|
|
52475
|
+
);
|
|
52476
|
+
}
|
|
52469
52477
|
function buildParagraphPropertiesXml(textStyle, paragraphAlign, bulletInfo, spacing, level) {
|
|
52470
52478
|
const paragraphProps = {};
|
|
52471
52479
|
if (typeof level === "number" && Number.isFinite(level) && level > 0) {
|
|
@@ -53420,6 +53428,14 @@ var PptxHandlerRuntime = class {
|
|
|
53420
53428
|
}
|
|
53421
53429
|
}
|
|
53422
53430
|
};
|
|
53431
|
+
function parseOoxmlFixedPercentage(value) {
|
|
53432
|
+
const raw = String(value ?? "").trim();
|
|
53433
|
+
if (!raw) {
|
|
53434
|
+
return void 0;
|
|
53435
|
+
}
|
|
53436
|
+
const parsed = raw.endsWith("%") ? Number.parseFloat(raw.slice(0, -1)) * 1e3 : Number.parseInt(raw, 10);
|
|
53437
|
+
return Number.isFinite(parsed) && parsed !== 0 ? Math.round(parsed) : void 0;
|
|
53438
|
+
}
|
|
53423
53439
|
var EMU_PER_PIXEL = 9525;
|
|
53424
53440
|
var BORDER_SIDES = [
|
|
53425
53441
|
"left",
|
|
@@ -53444,9 +53460,9 @@ function parseSolidFillStyle(solidFill2) {
|
|
|
53444
53460
|
return void 0;
|
|
53445
53461
|
}
|
|
53446
53462
|
const tintRaw = schemeClr["a:tint"];
|
|
53447
|
-
const tint = tintRaw ?
|
|
53463
|
+
const tint = tintRaw ? parseOoxmlFixedPercentage(tintRaw["@_val"]) : void 0;
|
|
53448
53464
|
const shadeRaw = schemeClr["a:shade"];
|
|
53449
|
-
const shade = shadeRaw ?
|
|
53465
|
+
const shade = shadeRaw ? parseOoxmlFixedPercentage(shadeRaw["@_val"]) : void 0;
|
|
53450
53466
|
return { schemeColor, tint, shade };
|
|
53451
53467
|
}
|
|
53452
53468
|
function parseBorderSide(side) {
|
|
@@ -53527,12 +53543,12 @@ function parseColorChoiceFill(node) {
|
|
|
53527
53543
|
}
|
|
53528
53544
|
const fill = { schemeColor: "", color: color2 };
|
|
53529
53545
|
const tintRaw = srgb?.["a:tint"];
|
|
53530
|
-
const tint = tintRaw ?
|
|
53546
|
+
const tint = tintRaw ? parseOoxmlFixedPercentage(tintRaw["@_val"]) : void 0;
|
|
53531
53547
|
if (tint !== void 0) {
|
|
53532
53548
|
fill.tint = tint;
|
|
53533
53549
|
}
|
|
53534
53550
|
const shadeRaw = srgb?.["a:shade"];
|
|
53535
|
-
const shade = shadeRaw ?
|
|
53551
|
+
const shade = shadeRaw ? parseOoxmlFixedPercentage(shadeRaw["@_val"]) : void 0;
|
|
53536
53552
|
if (shade !== void 0) {
|
|
53537
53553
|
fill.shade = shade;
|
|
53538
53554
|
}
|
|
@@ -53653,11 +53669,11 @@ function parseTableStyleSectionText(section) {
|
|
|
53653
53669
|
hasProps = true;
|
|
53654
53670
|
const tintNode = schemeClr["a:tint"];
|
|
53655
53671
|
if (tintNode) {
|
|
53656
|
-
result.fontTint =
|
|
53672
|
+
result.fontTint = parseOoxmlFixedPercentage(tintNode["@_val"]);
|
|
53657
53673
|
}
|
|
53658
53674
|
const shadeNode = schemeClr["a:shade"];
|
|
53659
53675
|
if (shadeNode) {
|
|
53660
|
-
result.fontShade =
|
|
53676
|
+
result.fontShade = parseOoxmlFixedPercentage(shadeNode["@_val"]);
|
|
53661
53677
|
}
|
|
53662
53678
|
}
|
|
53663
53679
|
} else {
|
|
@@ -56385,6 +56401,9 @@ var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
|
|
|
56385
56401
|
}
|
|
56386
56402
|
capturedParagraphMeta = true;
|
|
56387
56403
|
}
|
|
56404
|
+
if (isSyntheticBulletMarkerSegment(segment)) {
|
|
56405
|
+
return;
|
|
56406
|
+
}
|
|
56388
56407
|
if (segment.isLineBreak) {
|
|
56389
56408
|
const brNode = {};
|
|
56390
56409
|
if (segment.breakRunProperties && typeof segment.breakRunProperties === "object") {
|
|
@@ -62434,12 +62453,16 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime7 extends PptxHandlerRuntime
|
|
|
62434
62453
|
if (!xmlText2.trim()) {
|
|
62435
62454
|
continue;
|
|
62436
62455
|
}
|
|
62456
|
+
const isPresentationXml = path === "ppt/presentation.xml";
|
|
62457
|
+
const containsConvertibleUri = xmlText2.match(/https?:\/\/[^"'<>\s]+/gu)?.some((uri) => isTransitionalNamespaceUri(uri)) ?? false;
|
|
62458
|
+
if (!isPresentationXml && !containsConvertibleUri) {
|
|
62459
|
+
continue;
|
|
62460
|
+
}
|
|
62437
62461
|
try {
|
|
62438
62462
|
const parsed = parse(xmlText2);
|
|
62439
62463
|
if (typeof parsed !== "object" || parsed === null) {
|
|
62440
62464
|
continue;
|
|
62441
62465
|
}
|
|
62442
|
-
const isPresentationXml = path === "ppt/presentation.xml";
|
|
62443
62466
|
convertXmlToStrict(parsed, isPresentationXml);
|
|
62444
62467
|
this.zip.file(path, this.builder.build(parsed));
|
|
62445
62468
|
} catch {
|
|
@@ -63586,7 +63609,10 @@ var PptxHandlerRuntime30 = class _PptxHandlerRuntime9 extends PptxHandlerRuntime
|
|
|
63586
63609
|
}
|
|
63587
63610
|
const textValueForSave = this.getTextValueForSave(el.text, el.textSegments);
|
|
63588
63611
|
let textSegmentsForSave = el.textSegments;
|
|
63589
|
-
|
|
63612
|
+
const hasStructuredListMarkers = Boolean(
|
|
63613
|
+
el.textSegments?.some((segment) => segment.bulletInfo && !segment.bulletInfo.none)
|
|
63614
|
+
);
|
|
63615
|
+
if (typeof el.text === "string" && this.areTextSegmentsUniform(el.textSegments) && !hasStructuredListMarkers) {
|
|
63590
63616
|
textSegmentsForSave = void 0;
|
|
63591
63617
|
const existingTextSegments = this.extractTextSegmentsFromTxBodyForRewrite(
|
|
63592
63618
|
txBody,
|
|
@@ -65246,7 +65272,14 @@ var PptxHandlerRuntime40 = class _PptxHandlerRuntime16 extends PptxHandlerRuntim
|
|
|
65246
65272
|
if (el.type === "group") {
|
|
65247
65273
|
const grpXml = this.buildGroupShapeXml(el);
|
|
65248
65274
|
if (grpXml) {
|
|
65249
|
-
|
|
65275
|
+
if (this.isTemplateElementId(el.id)) {
|
|
65276
|
+
const templateSpTree = this.getTemplateSpTree(ctx.slide.id, el.id);
|
|
65277
|
+
if (templateSpTree) {
|
|
65278
|
+
el.rawXml = this.ensureTemplateShapeAttached(templateSpTree, el.type, grpXml);
|
|
65279
|
+
}
|
|
65280
|
+
} else {
|
|
65281
|
+
collectors.groups.push(grpXml);
|
|
65282
|
+
}
|
|
65250
65283
|
}
|
|
65251
65284
|
return;
|
|
65252
65285
|
}
|
|
@@ -67075,11 +67108,17 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime18 extends PptxHandlerRuntim
|
|
|
67075
67108
|
this.modernCommentAuthorsRelationshipId = modernPackage.authorRelationshipId;
|
|
67076
67109
|
this.applySlideMasterChanges(options?.slideMasters);
|
|
67077
67110
|
this.applySlideLayoutChanges(options?.slideLayouts);
|
|
67111
|
+
const dirtyLayoutPaths = new Set(options?.slideLayouts?.map((layout) => layout.path) ?? []);
|
|
67078
67112
|
for (const [layoutPath, layoutXmlObj] of this.layoutXmlMap.entries()) {
|
|
67079
|
-
|
|
67113
|
+
if (dirtyLayoutPaths.has(layoutPath)) {
|
|
67114
|
+
this.zip.file(layoutPath, this.builder.build(layoutXmlObj));
|
|
67115
|
+
}
|
|
67080
67116
|
}
|
|
67117
|
+
const dirtyMasterPaths = new Set(options?.slideMasters?.map((master) => master.path) ?? []);
|
|
67081
67118
|
for (const [masterPath, masterXmlObj] of this.masterXmlMap.entries()) {
|
|
67082
|
-
|
|
67119
|
+
if (dirtyMasterPaths.has(masterPath)) {
|
|
67120
|
+
this.zip.file(masterPath, this.builder.build(masterXmlObj));
|
|
67121
|
+
}
|
|
67083
67122
|
}
|
|
67084
67123
|
await this.persistThemeParts();
|
|
67085
67124
|
await this.applyEmbeddedFontPreservation(options?.embeddedFonts, options?.embeddedFontList);
|
|
@@ -67119,7 +67158,7 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime18 extends PptxHandlerRuntim
|
|
|
67119
67158
|
}
|
|
67120
67159
|
} : options?.presentationProperties;
|
|
67121
67160
|
await this.applyPresentationPropertiesPart(presentationProperties);
|
|
67122
|
-
await this.applyViewPropertiesPart(options?.viewProperties
|
|
67161
|
+
await this.applyViewPropertiesPart(options?.viewProperties);
|
|
67123
67162
|
await this.applyTableStylesPart(options?.tableStyles);
|
|
67124
67163
|
await this.documentPropertiesUpdater.updateOnSave(slides, {
|
|
67125
67164
|
coreProperties: options?.coreProperties,
|
|
@@ -74565,7 +74604,9 @@ var PptxHandlerRuntime84 = class _PptxHandlerRuntime35 extends PptxHandlerRuntim
|
|
|
74565
74604
|
const y = Math.round(parseInt(String(off["@_y"] || "0"), 10) / emuPerPx);
|
|
74566
74605
|
const width = Math.round(parseInt(String(ext["@_cx"] || "0"), 10) / emuPerPx);
|
|
74567
74606
|
const height = Math.round(parseInt(String(ext["@_cy"] || "0"), 10) / emuPerPx);
|
|
74568
|
-
|
|
74607
|
+
const preliminaryPrstGeom = this.xmlLookupService.getChildByLocalName(spPr, "prstGeom");
|
|
74608
|
+
const preliminaryShapeType = preliminaryPrstGeom ? String(preliminaryPrstGeom["@_prst"] || "rect") : "rect";
|
|
74609
|
+
if ((width <= 0 || height <= 0) && preliminaryShapeType !== "line") {
|
|
74569
74610
|
return null;
|
|
74570
74611
|
}
|
|
74571
74612
|
const rotation = xfrm?.["@_rot"] ? parseInt(String(xfrm["@_rot"]), 10) / 6e4 : void 0;
|
|
@@ -74601,6 +74642,14 @@ var PptxHandlerRuntime84 = class _PptxHandlerRuntime35 extends PptxHandlerRuntim
|
|
|
74601
74642
|
const strokeColor = this.parseColor(lnFill);
|
|
74602
74643
|
const strokeWidthRaw = lnNode ? parseInt(String(lnNode["@_w"] || ""), 10) : NaN;
|
|
74603
74644
|
const strokeWidth = Number.isFinite(strokeWidthRaw) && strokeWidthRaw > 0 ? strokeWidthRaw / 12700 : void 0;
|
|
74645
|
+
const prstDash = lnNode ? this.xmlLookupService.getChildByLocalName(lnNode, "prstDash") : void 0;
|
|
74646
|
+
const headEnd = lnNode ? this.xmlLookupService.getChildByLocalName(lnNode, "headEnd") : void 0;
|
|
74647
|
+
const tailEnd = lnNode ? this.xmlLookupService.getChildByLocalName(lnNode, "tailEnd") : void 0;
|
|
74648
|
+
const arrowType = (node) => {
|
|
74649
|
+
const value = node?.["@_type"];
|
|
74650
|
+
return value === "none" || value === "triangle" || value === "stealth" || value === "diamond" || value === "oval" || value === "arrow" ? value : void 0;
|
|
74651
|
+
};
|
|
74652
|
+
const arrowSize = (value) => value === "sm" || value === "med" || value === "lg" ? value : void 0;
|
|
74604
74653
|
const txBody = this.xmlLookupService.getChildByLocalName(sp, "txBody");
|
|
74605
74654
|
const textValues2 = [];
|
|
74606
74655
|
if (txBody) {
|
|
@@ -74640,6 +74689,13 @@ var PptxHandlerRuntime84 = class _PptxHandlerRuntime35 extends PptxHandlerRuntim
|
|
|
74640
74689
|
fillColor: fill.fillColor ?? void 0,
|
|
74641
74690
|
strokeColor: strokeColor ?? void 0,
|
|
74642
74691
|
strokeWidth,
|
|
74692
|
+
strokeDash: prstDash ? String(prstDash["@_val"] || "") || void 0 : void 0,
|
|
74693
|
+
startArrow: arrowType(headEnd),
|
|
74694
|
+
endArrow: arrowType(tailEnd),
|
|
74695
|
+
startArrowWidth: arrowSize(headEnd?.["@_w"]),
|
|
74696
|
+
startArrowLength: arrowSize(headEnd?.["@_len"]),
|
|
74697
|
+
endArrowWidth: arrowSize(tailEnd?.["@_w"]),
|
|
74698
|
+
endArrowLength: arrowSize(tailEnd?.["@_len"]),
|
|
74643
74699
|
text: structuredText,
|
|
74644
74700
|
textSegments,
|
|
74645
74701
|
fontSize,
|