pptx-react-viewer 1.25.0 → 1.25.1
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/CHANGELOG.md +2 -0
- package/dist/{Model3DScene-GGNUAOGD.mjs → Model3DScene-2QZ7CADN.mjs} +2 -2
- package/dist/Model3DScene-2QZ7CADN.mjs.br +0 -0
- package/dist/Model3DScene-2QZ7CADN.mjs.gz +0 -0
- package/dist/{Model3DScene-G434BPF4.js → Model3DScene-AWSM6CYB.js} +3 -3
- package/dist/Model3DScene-AWSM6CYB.js.br +0 -0
- package/dist/Model3DScene-AWSM6CYB.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-JU737NN5.mjs → SurfaceChart3DScene-IW4WGZHH.mjs} +2 -2
- package/dist/SurfaceChart3DScene-IW4WGZHH.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-IW4WGZHH.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-UFFJ3P6T.js → SurfaceChart3DScene-PJ36HRGC.js} +3 -3
- package/dist/SurfaceChart3DScene-PJ36HRGC.js.br +0 -0
- package/dist/SurfaceChart3DScene-PJ36HRGC.js.gz +0 -0
- package/dist/{chunk-EM77GISR.js → chunk-ASN2DZSP.js} +808 -808
- package/dist/chunk-ASN2DZSP.js.br +0 -0
- package/dist/chunk-ASN2DZSP.js.gz +0 -0
- package/dist/{chunk-KV3EOLP3.js → chunk-CYZLRYJV.js} +66 -8
- package/dist/chunk-CYZLRYJV.js.br +0 -0
- package/dist/{chunk-KV3EOLP3.js.gz → chunk-CYZLRYJV.js.gz} +0 -0
- package/dist/{chunk-LDZQNYWL.mjs → chunk-M7JHZV3P.mjs} +66 -8
- package/dist/chunk-M7JHZV3P.mjs.br +0 -0
- package/dist/{chunk-LDZQNYWL.mjs.gz → chunk-M7JHZV3P.mjs.gz} +0 -0
- package/dist/{chunk-VKOVFVDJ.js → chunk-NIWO2WYI.js} +34 -34
- package/dist/chunk-NIWO2WYI.js.br +0 -0
- package/dist/chunk-NIWO2WYI.js.gz +0 -0
- package/dist/{chunk-IHHK6WEQ.js → chunk-NT5FIWWU.js} +464 -464
- package/dist/chunk-NT5FIWWU.js.br +0 -0
- package/dist/chunk-NT5FIWWU.js.gz +0 -0
- package/dist/{chunk-QOBKJKLT.mjs → chunk-PMGLZ7N4.mjs} +1 -1
- package/dist/chunk-PMGLZ7N4.mjs.br +0 -0
- package/dist/chunk-PMGLZ7N4.mjs.gz +0 -0
- package/dist/{chunk-VDALVGDT.mjs → chunk-QTIJWFJX.mjs} +4 -4
- package/dist/chunk-QTIJWFJX.mjs.br +0 -0
- package/dist/chunk-QTIJWFJX.mjs.gz +0 -0
- package/dist/{chunk-NKSIDFYP.mjs → chunk-RVKPHAK5.mjs} +6 -6
- package/dist/chunk-RVKPHAK5.mjs.br +0 -0
- package/dist/chunk-RVKPHAK5.mjs.gz +0 -0
- package/dist/{dist-XF3QJAEF.js → dist-AFRACFHO.js} +562 -562
- package/dist/dist-AFRACFHO.js.br +0 -0
- package/dist/dist-AFRACFHO.js.gz +0 -0
- package/dist/{dist-A3OATMOE.mjs → dist-RHAXXX2R.mjs} +1 -1
- package/dist/dist-RHAXXX2R.mjs.br +0 -0
- package/dist/dist-RHAXXX2R.mjs.gz +0 -0
- package/dist/hooks-unstable.js +78 -78
- package/dist/hooks-unstable.js.br +0 -0
- package/dist/hooks-unstable.js.gz +0 -0
- package/dist/hooks-unstable.mjs +3 -3
- package/dist/hooks-unstable.mjs.br +0 -0
- package/dist/hooks-unstable.mjs.gz +0 -0
- package/dist/index.js +33 -33
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/viewer/index.js +20 -20
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +4 -4
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/Model3DScene-G434BPF4.js.br +0 -0
- package/dist/Model3DScene-G434BPF4.js.gz +0 -0
- package/dist/Model3DScene-GGNUAOGD.mjs.br +0 -0
- package/dist/Model3DScene-GGNUAOGD.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-JU737NN5.mjs.br +0 -0
- package/dist/SurfaceChart3DScene-JU737NN5.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-UFFJ3P6T.js.br +0 -0
- package/dist/SurfaceChart3DScene-UFFJ3P6T.js.gz +0 -0
- package/dist/chunk-EM77GISR.js.br +0 -0
- package/dist/chunk-EM77GISR.js.gz +0 -0
- package/dist/chunk-IHHK6WEQ.js.br +0 -0
- package/dist/chunk-IHHK6WEQ.js.gz +0 -0
- package/dist/chunk-KV3EOLP3.js.br +0 -0
- package/dist/chunk-LDZQNYWL.mjs.br +0 -0
- package/dist/chunk-NKSIDFYP.mjs.br +0 -0
- package/dist/chunk-NKSIDFYP.mjs.gz +0 -0
- package/dist/chunk-QOBKJKLT.mjs.br +0 -0
- package/dist/chunk-QOBKJKLT.mjs.gz +0 -0
- package/dist/chunk-VDALVGDT.mjs.br +0 -0
- package/dist/chunk-VDALVGDT.mjs.gz +0 -0
- package/dist/chunk-VKOVFVDJ.js.br +0 -0
- package/dist/chunk-VKOVFVDJ.js.gz +0 -0
- package/dist/dist-A3OATMOE.mjs.br +0 -0
- package/dist/dist-A3OATMOE.mjs.gz +0 -0
- package/dist/dist-XF3QJAEF.js.br +0 -0
- package/dist/dist-XF3QJAEF.js.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -66881,6 +66881,8 @@ var PptxHandlerRuntime56 = class extends PptxHandlerRuntime55 {
|
|
|
66881
66881
|
const existing = merged[key];
|
|
66882
66882
|
if (value && typeof value === "object" && !Array.isArray(value) && existing && typeof existing === "object" && !Array.isArray(existing)) {
|
|
66883
66883
|
merged[key] = this.mergeXmlObjects(existing, value, depth + 1);
|
|
66884
|
+
} else if (value === "" && existing !== void 0 && existing !== "" && typeof existing === "object") {
|
|
66885
|
+
merged[key] = existing;
|
|
66884
66886
|
} else {
|
|
66885
66887
|
merged[key] = value;
|
|
66886
66888
|
}
|
|
@@ -69641,32 +69643,56 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
|
|
|
69641
69643
|
}
|
|
69642
69644
|
const grpSpPr = group["p:grpSpPr"];
|
|
69643
69645
|
const xfrm = grpSpPr?.["a:xfrm"];
|
|
69646
|
+
const EMU_PX = _PptxHandlerRuntime30.EMU_PER_PX;
|
|
69644
69647
|
let parentX = 0, parentY = 0, parentW = 0, parentH = 0;
|
|
69645
69648
|
let chX = 0, chY = 0, chW = 0, chH = 0;
|
|
69646
69649
|
if (xfrm) {
|
|
69647
69650
|
const off = xfrm["a:off"];
|
|
69648
69651
|
if (off) {
|
|
69649
|
-
parentX =
|
|
69650
|
-
parentY =
|
|
69652
|
+
parentX = parseEmuInt2(off["@_x"]) / EMU_PX;
|
|
69653
|
+
parentY = parseEmuInt2(off["@_y"]) / EMU_PX;
|
|
69651
69654
|
}
|
|
69652
69655
|
const ext = xfrm["a:ext"];
|
|
69653
69656
|
if (ext) {
|
|
69654
|
-
parentW =
|
|
69655
|
-
parentH =
|
|
69657
|
+
parentW = parseEmuInt2(ext["@_cx"]) / EMU_PX;
|
|
69658
|
+
parentH = parseEmuInt2(ext["@_cy"]) / EMU_PX;
|
|
69656
69659
|
}
|
|
69657
69660
|
const chOff = xfrm["a:chOff"];
|
|
69658
69661
|
if (chOff) {
|
|
69659
|
-
chX =
|
|
69660
|
-
chY =
|
|
69662
|
+
chX = parseEmuInt2(chOff["@_x"]) / EMU_PX;
|
|
69663
|
+
chY = parseEmuInt2(chOff["@_y"]) / EMU_PX;
|
|
69661
69664
|
}
|
|
69662
69665
|
const chExt = xfrm["a:chExt"];
|
|
69663
69666
|
if (chExt) {
|
|
69664
|
-
chW =
|
|
69665
|
-
chH =
|
|
69667
|
+
chW = parseEmuInt2(chExt["@_cx"]) / EMU_PX;
|
|
69668
|
+
chH = parseEmuInt2(chExt["@_cy"]) / EMU_PX;
|
|
69666
69669
|
}
|
|
69667
69670
|
}
|
|
69668
69671
|
const scaleX = chW > 0 ? parentW / chW : 1;
|
|
69669
69672
|
const scaleY = chH > 0 ? parentH / chH : 1;
|
|
69673
|
+
const rawChildXfrm = (childNode) => {
|
|
69674
|
+
if (!childNode) {
|
|
69675
|
+
return void 0;
|
|
69676
|
+
}
|
|
69677
|
+
const childXfrm = childNode["p:spPr"]?.["a:xfrm"] ?? childNode["p:xfrm"];
|
|
69678
|
+
return childXfrm;
|
|
69679
|
+
};
|
|
69680
|
+
const applyRawChildGeometry = (el, childNode) => {
|
|
69681
|
+
const childXfrm = rawChildXfrm(childNode);
|
|
69682
|
+
if (!childXfrm) {
|
|
69683
|
+
return;
|
|
69684
|
+
}
|
|
69685
|
+
const off = childXfrm["a:off"];
|
|
69686
|
+
const ext = childXfrm["a:ext"];
|
|
69687
|
+
if (off) {
|
|
69688
|
+
el.x = parseEmuInt2(off["@_x"]) / EMU_PX;
|
|
69689
|
+
el.y = parseEmuInt2(off["@_y"]) / EMU_PX;
|
|
69690
|
+
}
|
|
69691
|
+
if (ext) {
|
|
69692
|
+
el.width = parseEmuInt2(ext["@_cx"]) / EMU_PX;
|
|
69693
|
+
el.height = parseEmuInt2(ext["@_cy"]) / EMU_PX;
|
|
69694
|
+
}
|
|
69695
|
+
};
|
|
69670
69696
|
const transformElement = (el) => {
|
|
69671
69697
|
const relativeX = el.x - chX;
|
|
69672
69698
|
const relativeY = el.y - chY;
|
|
@@ -69724,6 +69750,8 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
|
|
|
69724
69750
|
`${baseId}-`
|
|
69725
69751
|
);
|
|
69726
69752
|
if (element) {
|
|
69753
|
+
const childNode = this.ensureArray(group[entry.tag])[entry.indexInType];
|
|
69754
|
+
applyRawChildGeometry(element, childNode);
|
|
69727
69755
|
transformElement(element);
|
|
69728
69756
|
elements2.push(element);
|
|
69729
69757
|
}
|
|
@@ -71218,6 +71246,21 @@ var PptxHandlerRuntime74 = class extends PptxHandlerRuntime73 {
|
|
|
71218
71246
|
element.id = `master-${element.id}`;
|
|
71219
71247
|
elements2.push(element);
|
|
71220
71248
|
}
|
|
71249
|
+
} else if (entry.tag === "p:grpSp") {
|
|
71250
|
+
const groups = this.ensureArray(spTree["p:grpSp"]);
|
|
71251
|
+
const group = groups[entry.indexInType];
|
|
71252
|
+
if (!group) {
|
|
71253
|
+
continue;
|
|
71254
|
+
}
|
|
71255
|
+
const element = await this.parseGroupShapeAsGroup(
|
|
71256
|
+
group,
|
|
71257
|
+
`master-group-${masterToken}-${entry.indexInType}`,
|
|
71258
|
+
masterPath
|
|
71259
|
+
);
|
|
71260
|
+
if (element) {
|
|
71261
|
+
element.id = `master-${element.id}`;
|
|
71262
|
+
elements2.push(element);
|
|
71263
|
+
}
|
|
71221
71264
|
}
|
|
71222
71265
|
}
|
|
71223
71266
|
this.masterCache.set(masterPath, elements2);
|
|
@@ -71425,6 +71468,21 @@ var PptxHandlerRuntime76 = class extends PptxHandlerRuntime75 {
|
|
|
71425
71468
|
element.id = `layout-${element.id}`;
|
|
71426
71469
|
elements2.push(element);
|
|
71427
71470
|
}
|
|
71471
|
+
} else if (entry.tag === "p:grpSp") {
|
|
71472
|
+
const groups = this.ensureArray(spTree["p:grpSp"]);
|
|
71473
|
+
const group = groups[entry.indexInType];
|
|
71474
|
+
if (!group) {
|
|
71475
|
+
continue;
|
|
71476
|
+
}
|
|
71477
|
+
const element = await this.parseGroupShapeAsGroup(
|
|
71478
|
+
group,
|
|
71479
|
+
`layout-group-${layoutToken}-${entry.indexInType}`,
|
|
71480
|
+
layoutPath
|
|
71481
|
+
);
|
|
71482
|
+
if (element) {
|
|
71483
|
+
element.id = `layout-${element.id}`;
|
|
71484
|
+
elements2.push(element);
|
|
71485
|
+
}
|
|
71428
71486
|
}
|
|
71429
71487
|
}
|
|
71430
71488
|
const layoutShowMasterSp = xmlAttr(
|
|
Binary file
|
|
Binary file
|
|
@@ -66875,6 +66875,8 @@ var PptxHandlerRuntime56 = class extends PptxHandlerRuntime55 {
|
|
|
66875
66875
|
const existing = merged[key];
|
|
66876
66876
|
if (value && typeof value === "object" && !Array.isArray(value) && existing && typeof existing === "object" && !Array.isArray(existing)) {
|
|
66877
66877
|
merged[key] = this.mergeXmlObjects(existing, value, depth + 1);
|
|
66878
|
+
} else if (value === "" && existing !== void 0 && existing !== "" && typeof existing === "object") {
|
|
66879
|
+
merged[key] = existing;
|
|
66878
66880
|
} else {
|
|
66879
66881
|
merged[key] = value;
|
|
66880
66882
|
}
|
|
@@ -69635,32 +69637,56 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
|
|
|
69635
69637
|
}
|
|
69636
69638
|
const grpSpPr = group["p:grpSpPr"];
|
|
69637
69639
|
const xfrm = grpSpPr?.["a:xfrm"];
|
|
69640
|
+
const EMU_PX = _PptxHandlerRuntime30.EMU_PER_PX;
|
|
69638
69641
|
let parentX = 0, parentY = 0, parentW = 0, parentH = 0;
|
|
69639
69642
|
let chX = 0, chY = 0, chW = 0, chH = 0;
|
|
69640
69643
|
if (xfrm) {
|
|
69641
69644
|
const off = xfrm["a:off"];
|
|
69642
69645
|
if (off) {
|
|
69643
|
-
parentX =
|
|
69644
|
-
parentY =
|
|
69646
|
+
parentX = parseEmuInt2(off["@_x"]) / EMU_PX;
|
|
69647
|
+
parentY = parseEmuInt2(off["@_y"]) / EMU_PX;
|
|
69645
69648
|
}
|
|
69646
69649
|
const ext = xfrm["a:ext"];
|
|
69647
69650
|
if (ext) {
|
|
69648
|
-
parentW =
|
|
69649
|
-
parentH =
|
|
69651
|
+
parentW = parseEmuInt2(ext["@_cx"]) / EMU_PX;
|
|
69652
|
+
parentH = parseEmuInt2(ext["@_cy"]) / EMU_PX;
|
|
69650
69653
|
}
|
|
69651
69654
|
const chOff = xfrm["a:chOff"];
|
|
69652
69655
|
if (chOff) {
|
|
69653
|
-
chX =
|
|
69654
|
-
chY =
|
|
69656
|
+
chX = parseEmuInt2(chOff["@_x"]) / EMU_PX;
|
|
69657
|
+
chY = parseEmuInt2(chOff["@_y"]) / EMU_PX;
|
|
69655
69658
|
}
|
|
69656
69659
|
const chExt = xfrm["a:chExt"];
|
|
69657
69660
|
if (chExt) {
|
|
69658
|
-
chW =
|
|
69659
|
-
chH =
|
|
69661
|
+
chW = parseEmuInt2(chExt["@_cx"]) / EMU_PX;
|
|
69662
|
+
chH = parseEmuInt2(chExt["@_cy"]) / EMU_PX;
|
|
69660
69663
|
}
|
|
69661
69664
|
}
|
|
69662
69665
|
const scaleX = chW > 0 ? parentW / chW : 1;
|
|
69663
69666
|
const scaleY = chH > 0 ? parentH / chH : 1;
|
|
69667
|
+
const rawChildXfrm = (childNode) => {
|
|
69668
|
+
if (!childNode) {
|
|
69669
|
+
return void 0;
|
|
69670
|
+
}
|
|
69671
|
+
const childXfrm = childNode["p:spPr"]?.["a:xfrm"] ?? childNode["p:xfrm"];
|
|
69672
|
+
return childXfrm;
|
|
69673
|
+
};
|
|
69674
|
+
const applyRawChildGeometry = (el, childNode) => {
|
|
69675
|
+
const childXfrm = rawChildXfrm(childNode);
|
|
69676
|
+
if (!childXfrm) {
|
|
69677
|
+
return;
|
|
69678
|
+
}
|
|
69679
|
+
const off = childXfrm["a:off"];
|
|
69680
|
+
const ext = childXfrm["a:ext"];
|
|
69681
|
+
if (off) {
|
|
69682
|
+
el.x = parseEmuInt2(off["@_x"]) / EMU_PX;
|
|
69683
|
+
el.y = parseEmuInt2(off["@_y"]) / EMU_PX;
|
|
69684
|
+
}
|
|
69685
|
+
if (ext) {
|
|
69686
|
+
el.width = parseEmuInt2(ext["@_cx"]) / EMU_PX;
|
|
69687
|
+
el.height = parseEmuInt2(ext["@_cy"]) / EMU_PX;
|
|
69688
|
+
}
|
|
69689
|
+
};
|
|
69664
69690
|
const transformElement = (el) => {
|
|
69665
69691
|
const relativeX = el.x - chX;
|
|
69666
69692
|
const relativeY = el.y - chY;
|
|
@@ -69718,6 +69744,8 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
|
|
|
69718
69744
|
`${baseId}-`
|
|
69719
69745
|
);
|
|
69720
69746
|
if (element) {
|
|
69747
|
+
const childNode = this.ensureArray(group[entry.tag])[entry.indexInType];
|
|
69748
|
+
applyRawChildGeometry(element, childNode);
|
|
69721
69749
|
transformElement(element);
|
|
69722
69750
|
elements2.push(element);
|
|
69723
69751
|
}
|
|
@@ -71212,6 +71240,21 @@ var PptxHandlerRuntime74 = class extends PptxHandlerRuntime73 {
|
|
|
71212
71240
|
element.id = `master-${element.id}`;
|
|
71213
71241
|
elements2.push(element);
|
|
71214
71242
|
}
|
|
71243
|
+
} else if (entry.tag === "p:grpSp") {
|
|
71244
|
+
const groups = this.ensureArray(spTree["p:grpSp"]);
|
|
71245
|
+
const group = groups[entry.indexInType];
|
|
71246
|
+
if (!group) {
|
|
71247
|
+
continue;
|
|
71248
|
+
}
|
|
71249
|
+
const element = await this.parseGroupShapeAsGroup(
|
|
71250
|
+
group,
|
|
71251
|
+
`master-group-${masterToken}-${entry.indexInType}`,
|
|
71252
|
+
masterPath
|
|
71253
|
+
);
|
|
71254
|
+
if (element) {
|
|
71255
|
+
element.id = `master-${element.id}`;
|
|
71256
|
+
elements2.push(element);
|
|
71257
|
+
}
|
|
71215
71258
|
}
|
|
71216
71259
|
}
|
|
71217
71260
|
this.masterCache.set(masterPath, elements2);
|
|
@@ -71419,6 +71462,21 @@ var PptxHandlerRuntime76 = class extends PptxHandlerRuntime75 {
|
|
|
71419
71462
|
element.id = `layout-${element.id}`;
|
|
71420
71463
|
elements2.push(element);
|
|
71421
71464
|
}
|
|
71465
|
+
} else if (entry.tag === "p:grpSp") {
|
|
71466
|
+
const groups = this.ensureArray(spTree["p:grpSp"]);
|
|
71467
|
+
const group = groups[entry.indexInType];
|
|
71468
|
+
if (!group) {
|
|
71469
|
+
continue;
|
|
71470
|
+
}
|
|
71471
|
+
const element = await this.parseGroupShapeAsGroup(
|
|
71472
|
+
group,
|
|
71473
|
+
`layout-group-${layoutToken}-${entry.indexInType}`,
|
|
71474
|
+
layoutPath
|
|
71475
|
+
);
|
|
71476
|
+
if (element) {
|
|
71477
|
+
element.id = `layout-${element.id}`;
|
|
71478
|
+
elements2.push(element);
|
|
71479
|
+
}
|
|
71422
71480
|
}
|
|
71423
71481
|
}
|
|
71424
71482
|
const layoutShowMasterSp = xmlAttr(
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkCYZLRYJV_js = require('./chunk-CYZLRYJV.js');
|
|
4
4
|
var DOMPurify = require('dompurify');
|
|
5
5
|
|
|
6
6
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -307,7 +307,7 @@ function buildInitialGuides(presentationGuides, firstSlideGuides) {
|
|
|
307
307
|
guides.push({
|
|
308
308
|
id: g.id,
|
|
309
309
|
axis: g.orientation === "horz" ? "h" : "v",
|
|
310
|
-
position:
|
|
310
|
+
position: chunkCYZLRYJV_js.guideEmuToPx(g.positionEmu)
|
|
311
311
|
});
|
|
312
312
|
}
|
|
313
313
|
}
|
|
@@ -316,7 +316,7 @@ function buildInitialGuides(presentationGuides, firstSlideGuides) {
|
|
|
316
316
|
guides.push({
|
|
317
317
|
id: g.id,
|
|
318
318
|
axis: g.orientation === "horz" ? "h" : "v",
|
|
319
|
-
position:
|
|
319
|
+
position: chunkCYZLRYJV_js.guideEmuToPx(g.positionEmu)
|
|
320
320
|
});
|
|
321
321
|
}
|
|
322
322
|
}
|
|
@@ -329,23 +329,23 @@ function getResolvedShapeClipPathFor(shapeType, width, height, adjustments) {
|
|
|
329
329
|
return void 0;
|
|
330
330
|
}
|
|
331
331
|
if (!Number.isFinite(width) || !Number.isFinite(height) || width <= 0 || height <= 0) {
|
|
332
|
-
return
|
|
332
|
+
return chunkCYZLRYJV_js.getShapeClipPath(shapeType);
|
|
333
333
|
}
|
|
334
334
|
if (adjustments && Object.keys(adjustments).length > 0) {
|
|
335
|
-
const adjusted =
|
|
335
|
+
const adjusted = chunkCYZLRYJV_js.getAdjustmentAwareShapeClipPath(shapeType, width, height, adjustments);
|
|
336
336
|
if (adjusted !== void 0) {
|
|
337
337
|
return adjusted;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
const fromPreset =
|
|
340
|
+
const fromPreset = chunkCYZLRYJV_js.getShapeClipPathFromPreset(shapeType, width, height, adjustments);
|
|
341
341
|
if (fromPreset !== void 0) {
|
|
342
342
|
return fromPreset;
|
|
343
343
|
}
|
|
344
|
-
const cloud =
|
|
344
|
+
const cloud = chunkCYZLRYJV_js.getCloudPathForRendering(shapeType, width, height);
|
|
345
345
|
if (cloud !== void 0) {
|
|
346
346
|
return cloud;
|
|
347
347
|
}
|
|
348
|
-
return
|
|
348
|
+
return chunkCYZLRYJV_js.getShapeClipPath(shapeType);
|
|
349
349
|
}
|
|
350
350
|
function getResolvedShapeClipPath(element, width, height) {
|
|
351
351
|
const shapeType = element.shapeType;
|
|
@@ -1060,7 +1060,7 @@ var DEFAULT_SCHEME_COLOR_MAP = {
|
|
|
1060
1060
|
phclr: "#4472C4"
|
|
1061
1061
|
};
|
|
1062
1062
|
function applyDrawingColorTransforms2(baseColor, colorNode) {
|
|
1063
|
-
return
|
|
1063
|
+
return chunkCYZLRYJV_js.applyDrawingColorTransforms(baseColor, colorNode);
|
|
1064
1064
|
}
|
|
1065
1065
|
function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
1066
1066
|
if (!colorNode) {
|
|
@@ -1112,7 +1112,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
1112
1112
|
const h = hueRaw / 6e4;
|
|
1113
1113
|
const s = clampUnitInterval(satRaw / 1e5);
|
|
1114
1114
|
const l = clampUnitInterval(lumRaw / 1e5);
|
|
1115
|
-
const rgb =
|
|
1115
|
+
const rgb = chunkCYZLRYJV_js.hslToRgb(h, s, l);
|
|
1116
1116
|
const toHex = (value) => Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
|
|
1117
1117
|
const base = `#${toHex(rgb.r)}${toHex(rgb.g)}${toHex(rgb.b)}`;
|
|
1118
1118
|
return applyDrawingColorTransforms2(base, hslNode);
|
|
@@ -1122,7 +1122,7 @@ function parseDrawingColorChoice(colorNode, schemeColorOverrides) {
|
|
|
1122
1122
|
const preset = String(
|
|
1123
1123
|
colorNode["a:prstClr"]?.["@_val"] || ""
|
|
1124
1124
|
).toLowerCase();
|
|
1125
|
-
const mapped =
|
|
1125
|
+
const mapped = chunkCYZLRYJV_js.PRESET_COLOR_MAP[preset];
|
|
1126
1126
|
if (!mapped) {
|
|
1127
1127
|
return void 0;
|
|
1128
1128
|
}
|
|
@@ -1477,7 +1477,7 @@ function hexToRgbUnit2(hex) {
|
|
|
1477
1477
|
};
|
|
1478
1478
|
}
|
|
1479
1479
|
function getEffects(element) {
|
|
1480
|
-
if (!
|
|
1480
|
+
if (!chunkCYZLRYJV_js.isImageLikeElement(element)) {
|
|
1481
1481
|
return void 0;
|
|
1482
1482
|
}
|
|
1483
1483
|
return element.imageEffects;
|
|
@@ -1666,7 +1666,7 @@ function buildDuotoneFilterMarkup(color1, color2) {
|
|
|
1666
1666
|
const c2 = hexToRgbUnit2(color2);
|
|
1667
1667
|
return `<feColorMatrix type="matrix" values="${GRAYSCALE_LUMINANCE_MATRIX}"/><feComponentTransfer><feFuncR type="linear" slope="${c2.r - c1.r}" intercept="${c1.r}"/><feFuncG type="linear" slope="${c2.g - c1.g}" intercept="${c1.g}"/><feFuncB type="linear" slope="${c2.b - c1.b}" intercept="${c1.b}"/></feComponentTransfer>`;
|
|
1668
1668
|
}
|
|
1669
|
-
function getDuotoneImageFilter(element, elementId =
|
|
1669
|
+
function getDuotoneImageFilter(element, elementId = chunkCYZLRYJV_js.isImageLikeElement(element) ? element.id : "") {
|
|
1670
1670
|
const effects = getEffects(element);
|
|
1671
1671
|
if (!effects?.duotone) {
|
|
1672
1672
|
return void 0;
|
|
@@ -1768,7 +1768,7 @@ function buildImageAlphaFilterMarkup(effects) {
|
|
|
1768
1768
|
}
|
|
1769
1769
|
return parts.length > 0 ? parts.join("") : void 0;
|
|
1770
1770
|
}
|
|
1771
|
-
function getImageAlphaFilter(element, elementId =
|
|
1771
|
+
function getImageAlphaFilter(element, elementId = chunkCYZLRYJV_js.isImageLikeElement(element) ? element.id : "") {
|
|
1772
1772
|
const effects = getEffects(element);
|
|
1773
1773
|
if (!effects || !hasAdvancedImageAlphaEffects(element)) {
|
|
1774
1774
|
return void 0;
|
|
@@ -1858,7 +1858,7 @@ function buildArtisticFilterMarkup(effectName, radius) {
|
|
|
1858
1858
|
return void 0;
|
|
1859
1859
|
}
|
|
1860
1860
|
}
|
|
1861
|
-
function getArtisticImageFilter(element, elementId =
|
|
1861
|
+
function getArtisticImageFilter(element, elementId = chunkCYZLRYJV_js.isImageLikeElement(element) ? element.id : "") {
|
|
1862
1862
|
const effects = getEffects(element);
|
|
1863
1863
|
if (!effects?.artisticEffect || !needsSvgArtisticFilter(effects.artisticEffect)) {
|
|
1864
1864
|
return void 0;
|
|
@@ -2817,7 +2817,7 @@ function convertChildren(node) {
|
|
|
2817
2817
|
if (key.startsWith("@_")) {
|
|
2818
2818
|
continue;
|
|
2819
2819
|
}
|
|
2820
|
-
const tag =
|
|
2820
|
+
const tag = chunkCYZLRYJV_js.stripXmlOrderSuffix(key);
|
|
2821
2821
|
if (tag === "m:oMathPara") {
|
|
2822
2822
|
continue;
|
|
2823
2823
|
}
|
|
@@ -2889,7 +2889,7 @@ function findOmathRoots(node) {
|
|
|
2889
2889
|
}
|
|
2890
2890
|
}
|
|
2891
2891
|
const contentTags = /* @__PURE__ */ new Set(["m:r", "m:f", "m:rad", "m:sSup", "m:sSub", "m:box"]);
|
|
2892
|
-
if (Object.keys(node).some((key) => contentTags.has(
|
|
2892
|
+
if (Object.keys(node).some((key) => contentTags.has(chunkCYZLRYJV_js.stripXmlOrderSuffix(key)))) {
|
|
2893
2893
|
return [node];
|
|
2894
2894
|
}
|
|
2895
2895
|
return [];
|
|
@@ -3099,7 +3099,7 @@ function mergeSiblings(nodes) {
|
|
|
3099
3099
|
}
|
|
3100
3100
|
const ordered = {};
|
|
3101
3101
|
for (const [position, [key, value]] of entries.entries()) {
|
|
3102
|
-
ordered[(counts.get(key) ?? 0) > 1 ?
|
|
3102
|
+
ordered[(counts.get(key) ?? 0) > 1 ? chunkCYZLRYJV_js.orderedXmlKey(key, position) : key] = value;
|
|
3103
3103
|
}
|
|
3104
3104
|
return ordered;
|
|
3105
3105
|
}
|
|
@@ -3503,7 +3503,7 @@ function ommlChildrenToLatex(node) {
|
|
|
3503
3503
|
if (key.startsWith("@_")) {
|
|
3504
3504
|
continue;
|
|
3505
3505
|
}
|
|
3506
|
-
const tag =
|
|
3506
|
+
const tag = chunkCYZLRYJV_js.stripXmlOrderSuffix(key);
|
|
3507
3507
|
const items = ensureArr(node[key]);
|
|
3508
3508
|
for (const item of items) {
|
|
3509
3509
|
const result = ommlElementToLatex(tag, item);
|
|
@@ -12112,7 +12112,7 @@ function rotateDelta(dx, dy, rotationDeg) {
|
|
|
12112
12112
|
}
|
|
12113
12113
|
function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
|
|
12114
12114
|
const scale = zoom || 1;
|
|
12115
|
-
const minSize = opts.minSize ??
|
|
12115
|
+
const minSize = opts.minSize ?? chunkCYZLRYJV_js.MIN_ELEMENT_SIZE;
|
|
12116
12116
|
const rotation = rotationOf(box);
|
|
12117
12117
|
const local = rotateDelta(dxScreen / scale, dyScreen / scale, rotation);
|
|
12118
12118
|
const dx = local.x;
|
|
@@ -12139,7 +12139,7 @@ function applyResize(box, handle, dxScreen, dyScreen, zoom, opts = {}) {
|
|
|
12139
12139
|
}
|
|
12140
12140
|
return { x: newX, y: newY, width: newW, height: newH, rotation };
|
|
12141
12141
|
}
|
|
12142
|
-
function snapBoxToGrid(box, handle, gridSpacingPx, minSize =
|
|
12142
|
+
function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkCYZLRYJV_js.MIN_ELEMENT_SIZE) {
|
|
12143
12143
|
if (handle === null || gridSpacingPx <= 0) {
|
|
12144
12144
|
return box;
|
|
12145
12145
|
}
|
|
@@ -12169,7 +12169,7 @@ function snapBoxToGrid(box, handle, gridSpacingPx, minSize = chunkKV3EOLP3_js.MI
|
|
|
12169
12169
|
}
|
|
12170
12170
|
return { x, y, width, height };
|
|
12171
12171
|
}
|
|
12172
|
-
function computeMarqueeHitIds(marquee, elements, minSize =
|
|
12172
|
+
function computeMarqueeHitIds(marquee, elements, minSize = chunkCYZLRYJV_js.MIN_ELEMENT_SIZE) {
|
|
12173
12173
|
const minX = Math.min(marquee.startX, marquee.currentX);
|
|
12174
12174
|
const minY = Math.min(marquee.startY, marquee.currentY);
|
|
12175
12175
|
const maxX = Math.max(marquee.startX, marquee.currentX);
|
|
@@ -13724,7 +13724,7 @@ var THEME_COLOR_LABELS = {
|
|
|
13724
13724
|
};
|
|
13725
13725
|
function buildThemeColorGrid(colorScheme) {
|
|
13726
13726
|
return THEME_COLOR_TINT_ROWS.map(
|
|
13727
|
-
(row) =>
|
|
13727
|
+
(row) => chunkCYZLRYJV_js.THEME_COLOR_SCHEME_KEYS.map((key) => ({
|
|
13728
13728
|
hex: row.transform(colorScheme[key]),
|
|
13729
13729
|
schemeKey: key,
|
|
13730
13730
|
rowLabel: row.label,
|
|
@@ -14200,7 +14200,7 @@ function svgLineCap(lineCap) {
|
|
|
14200
14200
|
}
|
|
14201
14201
|
function copyFormatFromElement(element) {
|
|
14202
14202
|
const result = {};
|
|
14203
|
-
if (
|
|
14203
|
+
if (chunkCYZLRYJV_js.hasShapeProperties(element) && element.shapeStyle) {
|
|
14204
14204
|
const s = element.shapeStyle;
|
|
14205
14205
|
result.shapeStyle = {
|
|
14206
14206
|
fillColor: s.fillColor,
|
|
@@ -14229,7 +14229,7 @@ function copyFormatFromElement(element) {
|
|
|
14229
14229
|
softEdgeRadius: s.softEdgeRadius
|
|
14230
14230
|
};
|
|
14231
14231
|
}
|
|
14232
|
-
if (
|
|
14232
|
+
if (chunkCYZLRYJV_js.hasTextProperties(element) && element.textStyle) {
|
|
14233
14233
|
const t = element.textStyle;
|
|
14234
14234
|
result.textStyle = {
|
|
14235
14235
|
fontFamily: t.fontFamily,
|
|
@@ -14260,7 +14260,7 @@ function definedEntries(obj) {
|
|
|
14260
14260
|
}
|
|
14261
14261
|
function applyFormatToElement(element, format) {
|
|
14262
14262
|
let updated = { ...element };
|
|
14263
|
-
if (format.shapeStyle &&
|
|
14263
|
+
if (format.shapeStyle && chunkCYZLRYJV_js.hasShapeProperties(updated)) {
|
|
14264
14264
|
updated = {
|
|
14265
14265
|
...updated,
|
|
14266
14266
|
shapeStyle: {
|
|
@@ -14269,7 +14269,7 @@ function applyFormatToElement(element, format) {
|
|
|
14269
14269
|
}
|
|
14270
14270
|
};
|
|
14271
14271
|
}
|
|
14272
|
-
if (format.textStyle &&
|
|
14272
|
+
if (format.textStyle && chunkCYZLRYJV_js.hasTextProperties(updated)) {
|
|
14273
14273
|
updated = {
|
|
14274
14274
|
...updated,
|
|
14275
14275
|
textStyle: {
|
|
@@ -14284,7 +14284,7 @@ function hasCopyableFormat(element) {
|
|
|
14284
14284
|
if (!element) {
|
|
14285
14285
|
return false;
|
|
14286
14286
|
}
|
|
14287
|
-
return
|
|
14287
|
+
return chunkCYZLRYJV_js.hasShapeProperties(element) || chunkCYZLRYJV_js.hasTextProperties(element);
|
|
14288
14288
|
}
|
|
14289
14289
|
function copySegmentMetadata(from, to) {
|
|
14290
14290
|
if (from.equationXml !== void 0) {
|
|
@@ -14421,7 +14421,7 @@ function getRoundRectRadiusPx(element) {
|
|
|
14421
14421
|
return Math.min(Math.max(element.width, 1), Math.max(element.height, 1)) * 0.5 * normalizedAdjustment;
|
|
14422
14422
|
}
|
|
14423
14423
|
function getShapeAdjustmentHandleDescriptor(element) {
|
|
14424
|
-
if (!
|
|
14424
|
+
if (!chunkCYZLRYJV_js.hasShapeProperties(element)) {
|
|
14425
14425
|
return null;
|
|
14426
14426
|
}
|
|
14427
14427
|
const normalizedShapeType = String(element.shapeType || "").toLowerCase();
|
|
@@ -15413,7 +15413,7 @@ function createSyncGate(onOpen, graceMs = INITIAL_SYNC_GRACE_MS) {
|
|
|
15413
15413
|
var POSITION_THRESHOLD = 2;
|
|
15414
15414
|
var SIZE_THRESHOLD = 2;
|
|
15415
15415
|
function getElementText(element) {
|
|
15416
|
-
if (!
|
|
15416
|
+
if (!chunkCYZLRYJV_js.hasTextProperties(element)) {
|
|
15417
15417
|
return "";
|
|
15418
15418
|
}
|
|
15419
15419
|
if (element.textSegments && element.textSegments.length > 0) {
|
|
@@ -18987,7 +18987,7 @@ function getAriaRole(element) {
|
|
|
18987
18987
|
case "model3d":
|
|
18988
18988
|
return "img";
|
|
18989
18989
|
case "shape": {
|
|
18990
|
-
if (
|
|
18990
|
+
if (chunkCYZLRYJV_js.hasTextProperties(element) && element.text) {
|
|
18991
18991
|
return "group";
|
|
18992
18992
|
}
|
|
18993
18993
|
return "img";
|
|
@@ -19000,7 +19000,7 @@ function getAriaLabel(element) {
|
|
|
19000
19000
|
if ((element.type === "image" || element.type === "picture") && "altText" in element && typeof element.altText === "string" && element.altText.trim()) {
|
|
19001
19001
|
return element.altText.trim();
|
|
19002
19002
|
}
|
|
19003
|
-
if (
|
|
19003
|
+
if (chunkCYZLRYJV_js.hasTextProperties(element) && element.text) {
|
|
19004
19004
|
const text = element.text.trim();
|
|
19005
19005
|
if (text) {
|
|
19006
19006
|
return text.length > 120 ? `${text.slice(0, 117)}...` : text;
|
|
@@ -19407,7 +19407,7 @@ var DEFAULT_CHART_POSITION = { x: 120, y: 120, width: 480, height: 320 };
|
|
|
19407
19407
|
var DEFAULT_CATEGORIES = ["Category 1", "Category 2", "Category 3"];
|
|
19408
19408
|
var DEFAULT_SERIES_VALUES = [4, 3, 5];
|
|
19409
19409
|
function createDefaultChartElement(chartType = DEFAULT_INSERT_CHART_TYPE, position) {
|
|
19410
|
-
return
|
|
19410
|
+
return chunkCYZLRYJV_js.createChartElement(
|
|
19411
19411
|
chartType,
|
|
19412
19412
|
{
|
|
19413
19413
|
categories: [...DEFAULT_CATEGORIES],
|
|
@@ -20427,7 +20427,7 @@ function computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight,
|
|
|
20427
20427
|
};
|
|
20428
20428
|
}
|
|
20429
20429
|
function collectFontsFromElement(element, fonts) {
|
|
20430
|
-
if (
|
|
20430
|
+
if (chunkCYZLRYJV_js.hasTextProperties(element)) {
|
|
20431
20431
|
if (element.textStyle?.fontFamily) {
|
|
20432
20432
|
fonts.add(element.textStyle.fontFamily);
|
|
20433
20433
|
}
|
|
Binary file
|
|
Binary file
|