pptx-kit 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/{api-Irqm9KrN.js → api-grq54JcQ.js} +429 -157
- package/dist/api-grq54JcQ.js.map +1 -0
- package/dist/{index-vTW90gao.d.ts → index-CXoXNgJm.d.ts} +88 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/node.d.ts +2 -2
- package/dist/node.js +2 -2
- package/package.json +1 -1
- package/dist/api-Irqm9KrN.js.map +0 -1
|
@@ -824,7 +824,7 @@ const emptyContentTypes = () => ({
|
|
|
824
824
|
const REL_NS = NS.relationships;
|
|
825
825
|
const NAME_RELATIONSHIPS = qname("", "Relationships", REL_NS);
|
|
826
826
|
const NAME_RELATIONSHIP = qname("", "Relationship", REL_NS);
|
|
827
|
-
const ATTR_ID$
|
|
827
|
+
const ATTR_ID$14 = qname("", "Id", "");
|
|
828
828
|
const ATTR_TYPE$7 = qname("", "Type", "");
|
|
829
829
|
const ATTR_TARGET = qname("", "Target", "");
|
|
830
830
|
const ATTR_TARGET_MODE = qname("", "TargetMode", "");
|
|
@@ -862,7 +862,7 @@ const serializeRels = (rels) => {
|
|
|
862
862
|
const children = rels.items.map((r) => {
|
|
863
863
|
const attrs = [
|
|
864
864
|
{
|
|
865
|
-
name: ATTR_ID$
|
|
865
|
+
name: ATTR_ID$14,
|
|
866
866
|
value: r.id
|
|
867
867
|
},
|
|
868
868
|
{
|
|
@@ -1430,10 +1430,10 @@ const NAME_NOTES_MASTER_ID_LST = qname("p", "notesMasterIdLst", NS.pml);
|
|
|
1430
1430
|
const NAME_NOTES_MASTER_ID = qname("p", "notesMasterId", NS.pml);
|
|
1431
1431
|
const NAME_SLD_SZ = qname("p", "sldSz", NS.pml);
|
|
1432
1432
|
const NAME_NOTES_SZ = qname("p", "notesSz", NS.pml);
|
|
1433
|
-
const ATTR_ID$
|
|
1433
|
+
const ATTR_ID$13 = qname("", "id", "");
|
|
1434
1434
|
const ATTR_R_ID$3 = qname("r", "id", NS.officeDocRels);
|
|
1435
|
-
const ATTR_CX$
|
|
1436
|
-
const ATTR_CY$
|
|
1435
|
+
const ATTR_CX$9 = qname("", "cx", "");
|
|
1436
|
+
const ATTR_CY$9 = qname("", "cy", "");
|
|
1437
1437
|
const ATTR_TYPE$6 = qname("", "type", "");
|
|
1438
1438
|
const requireRId = (element, context) => {
|
|
1439
1439
|
const value = getAttrValue(element, ATTR_R_ID$3);
|
|
@@ -1443,8 +1443,8 @@ const requireRId = (element, context) => {
|
|
|
1443
1443
|
const readSize$1 = (parent, name) => {
|
|
1444
1444
|
const el = firstChildElement(parent, name);
|
|
1445
1445
|
if (el === null) return null;
|
|
1446
|
-
const cxRaw = getAttrValue(el, ATTR_CX$
|
|
1447
|
-
const cyRaw = getAttrValue(el, ATTR_CY$
|
|
1446
|
+
const cxRaw = getAttrValue(el, ATTR_CX$9);
|
|
1447
|
+
const cyRaw = getAttrValue(el, ATTR_CY$9);
|
|
1448
1448
|
if (cxRaw === null || cyRaw === null) throw new Error(`<${name.localName}>: missing cx/cy attribute`);
|
|
1449
1449
|
const type = getAttrValue(el, ATTR_TYPE$6);
|
|
1450
1450
|
return {
|
|
@@ -1462,7 +1462,7 @@ const readPresentationPart = (root) => {
|
|
|
1462
1462
|
const sldMasters = [];
|
|
1463
1463
|
const sldMasterLst = firstChildElement(root, NAME_SLD_MASTER_ID_LST$1);
|
|
1464
1464
|
if (sldMasterLst !== null) for (const item of allChildElements(sldMasterLst, NAME_SLD_MASTER_ID)) {
|
|
1465
|
-
const idRaw = getAttrValue(item, ATTR_ID$
|
|
1465
|
+
const idRaw = getAttrValue(item, ATTR_ID$13);
|
|
1466
1466
|
if (idRaw === null) throw new Error("<p:sldMasterId>: missing id attribute");
|
|
1467
1467
|
sldMasters.push({
|
|
1468
1468
|
id: Number.parseInt(idRaw, 10),
|
|
@@ -1472,7 +1472,7 @@ const readPresentationPart = (root) => {
|
|
|
1472
1472
|
const slides = [];
|
|
1473
1473
|
const sldLst = firstChildElement(root, NAME_SLD_ID_LST$2);
|
|
1474
1474
|
if (sldLst !== null) for (const item of allChildElements(sldLst, NAME_SLD_ID$2)) {
|
|
1475
|
-
const idRaw = getAttrValue(item, ATTR_ID$
|
|
1475
|
+
const idRaw = getAttrValue(item, ATTR_ID$13);
|
|
1476
1476
|
if (idRaw === null) throw new Error("<p:sldId>: missing id attribute");
|
|
1477
1477
|
slides.push({
|
|
1478
1478
|
id: Number.parseInt(idRaw, 10),
|
|
@@ -1542,7 +1542,7 @@ const NAME_BU_FONT = qname("a", "buFont", NS.dml);
|
|
|
1542
1542
|
const ATTR_CHAR = qname("", "char", "");
|
|
1543
1543
|
const ATTR_BU_TYPE = qname("", "type", "");
|
|
1544
1544
|
const ATTR_START_AT = qname("", "startAt", "");
|
|
1545
|
-
const ATTR_TYPEFACE$
|
|
1545
|
+
const ATTR_TYPEFACE$3 = qname("", "typeface", "");
|
|
1546
1546
|
const NAME_P$5 = qname("a", "p", NS.dml);
|
|
1547
1547
|
const NAME_R$4 = qname("a", "r", NS.dml);
|
|
1548
1548
|
const NAME_T$5 = qname("a", "t", NS.dml);
|
|
@@ -1773,7 +1773,7 @@ const applyBulletToParagraph = (paragraph, style) => {
|
|
|
1773
1773
|
if (!hasAttr(pPr, "marL")) pPr.attrs.push(attr(ATTR_MAR_L$1, String(marL)));
|
|
1774
1774
|
if (!hasAttr(pPr, "indent")) pPr.attrs.push(attr(ATTR_INDENT$1, String(indent)));
|
|
1775
1775
|
}
|
|
1776
|
-
if (normalizeBulletStyle(style).kind === "autoNum") pPr.children.push(elem(NAME_BU_FONT, { attrs: [attr(ATTR_TYPEFACE$
|
|
1776
|
+
if (normalizeBulletStyle(style).kind === "autoNum") pPr.children.push(elem(NAME_BU_FONT, { attrs: [attr(ATTR_TYPEFACE$3, "+mj-lt")] }));
|
|
1777
1777
|
pPr.children.push(buildBulletElement(style));
|
|
1778
1778
|
};
|
|
1779
1779
|
/**
|
|
@@ -1879,7 +1879,7 @@ const oneOf = (value, allowed, field) => {
|
|
|
1879
1879
|
//#region src/internal/drawingml/color.ts
|
|
1880
1880
|
const NAME_SRGB_CLR$4 = qname("a", "srgbClr", NS.dml);
|
|
1881
1881
|
const NAME_SCHEME_CLR$2 = qname("a", "schemeClr", NS.dml);
|
|
1882
|
-
const ATTR_VAL$
|
|
1882
|
+
const ATTR_VAL$9 = qname("", "val", "");
|
|
1883
1883
|
const SCHEME_TOKENS = new Set([
|
|
1884
1884
|
"bg1",
|
|
1885
1885
|
"tx1",
|
|
@@ -1949,14 +1949,14 @@ const parseSrgbHex = (value) => normalizeSrgbHex(value);
|
|
|
1949
1949
|
const buildColorElement = (value) => {
|
|
1950
1950
|
const parsed = parseColor(value);
|
|
1951
1951
|
if (parsed === null) throw new Error(`unrecognized color: ${value}`);
|
|
1952
|
-
return parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$4, { attrs: [attr(ATTR_VAL$
|
|
1952
|
+
return parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$4, { attrs: [attr(ATTR_VAL$9, parsed.hex)] }) : elem(NAME_SCHEME_CLR$2, { attrs: [attr(ATTR_VAL$9, parsed.token)] });
|
|
1953
1953
|
};
|
|
1954
1954
|
//#endregion
|
|
1955
1955
|
//#region src/internal/drawingml/text-format.ts
|
|
1956
1956
|
NS.dml;
|
|
1957
1957
|
const NAME_RPR$5 = qname("a", "rPr", NS.dml);
|
|
1958
1958
|
const NAME_LATIN = qname("a", "latin", NS.dml);
|
|
1959
|
-
NS.dml;
|
|
1959
|
+
const NAME_EA = qname("a", "ea", NS.dml);
|
|
1960
1960
|
NS.dml;
|
|
1961
1961
|
const NAME_SOLID_FILL$6 = qname("a", "solidFill", NS.dml);
|
|
1962
1962
|
const NAME_SRGB_CLR$3 = qname("a", "srgbClr", NS.dml);
|
|
@@ -1970,8 +1970,8 @@ const ATTR_SPC = qname("", "spc", "");
|
|
|
1970
1970
|
const ATTR_KERN = qname("", "kern", "");
|
|
1971
1971
|
const ATTR_BASELINE = qname("", "baseline", "");
|
|
1972
1972
|
const ATTR_CAP = qname("", "cap", "");
|
|
1973
|
-
const ATTR_TYPEFACE$
|
|
1974
|
-
const ATTR_VAL$
|
|
1973
|
+
const ATTR_TYPEFACE$2 = qname("", "typeface", "");
|
|
1974
|
+
const ATTR_VAL$8 = qname("", "val", "");
|
|
1975
1975
|
const NAME_HIGHLIGHT = qname("a", "highlight", NS.dml);
|
|
1976
1976
|
const RPR_CHILD_RANK = {
|
|
1977
1977
|
ln: 0,
|
|
@@ -2008,19 +2008,24 @@ const setSolidFill$1 = (rPr, value) => {
|
|
|
2008
2008
|
if (value === null) return;
|
|
2009
2009
|
const parsed = parseColor(value);
|
|
2010
2010
|
if (parsed === null) throw new Error(`unrecognized color: ${value}`);
|
|
2011
|
-
insertChildByRank(rPr, elem(NAME_SOLID_FILL$6, { children: [parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$3, { attrs: [attr(ATTR_VAL$
|
|
2011
|
+
insertChildByRank(rPr, elem(NAME_SOLID_FILL$6, { children: [parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$3, { attrs: [attr(ATTR_VAL$8, parsed.hex)] }) : elem(NAME_SCHEME_CLR$1, { attrs: [attr(ATTR_VAL$8, parsed.token)] })] }), rprChildRank);
|
|
2012
2012
|
};
|
|
2013
2013
|
const setLatin = (rPr, font) => {
|
|
2014
2014
|
rPr.children = rPr.children.filter((c) => !(c.kind === "element" && c.name.namespaceURI === NS.dml && c.name.localName === "latin"));
|
|
2015
2015
|
if (font === null) return;
|
|
2016
|
-
insertChildByRank(rPr, elem(NAME_LATIN, { attrs: [attr(ATTR_TYPEFACE$
|
|
2016
|
+
insertChildByRank(rPr, elem(NAME_LATIN, { attrs: [attr(ATTR_TYPEFACE$2, font)] }), rprChildRank);
|
|
2017
|
+
};
|
|
2018
|
+
const setEastAsian = (rPr, font) => {
|
|
2019
|
+
rPr.children = rPr.children.filter((c) => !(c.kind === "element" && c.name.namespaceURI === NS.dml && c.name.localName === "ea"));
|
|
2020
|
+
if (font === null) return;
|
|
2021
|
+
insertChildByRank(rPr, elem(NAME_EA, { attrs: [attr(ATTR_TYPEFACE$2, font)] }), rprChildRank);
|
|
2017
2022
|
};
|
|
2018
2023
|
const setHighlight = (rPr, value) => {
|
|
2019
2024
|
rPr.children = rPr.children.filter((c) => !(c.kind === "element" && c.name.namespaceURI === NS.dml && c.name.localName === "highlight"));
|
|
2020
2025
|
if (value === null) return;
|
|
2021
2026
|
const parsed = parseColor(value);
|
|
2022
2027
|
if (parsed === null) throw new Error(`unrecognized highlight color: ${value}`);
|
|
2023
|
-
insertChildByRank(rPr, elem(NAME_HIGHLIGHT, { children: [parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$3, { attrs: [attr(ATTR_VAL$
|
|
2028
|
+
insertChildByRank(rPr, elem(NAME_HIGHLIGHT, { children: [parsed.kind === "srgb" ? elem(NAME_SRGB_CLR$3, { attrs: [attr(ATTR_VAL$8, parsed.hex)] }) : elem(NAME_SCHEME_CLR$1, { attrs: [attr(ATTR_VAL$8, parsed.token)] })] }), rprChildRank);
|
|
2024
2029
|
};
|
|
2025
2030
|
/** Mutates `rPr` in place per `format`. */
|
|
2026
2031
|
const applyRunFormat = (rPr, format) => {
|
|
@@ -2051,6 +2056,7 @@ const applyRunFormat = (rPr, format) => {
|
|
|
2051
2056
|
if (format.cap !== void 0) attrs = setOrRemoveAttr(attrs, ATTR_CAP, format.cap);
|
|
2052
2057
|
rPr.attrs = attrs;
|
|
2053
2058
|
if (format.font !== void 0) setLatin(rPr, format.font);
|
|
2059
|
+
if (format.fontEastAsian !== void 0) setEastAsian(rPr, format.fontEastAsian);
|
|
2054
2060
|
if (format.color !== void 0) setSolidFill$1(rPr, format.color);
|
|
2055
2061
|
if (format.highlight !== void 0) setHighlight(rPr, format.highlight);
|
|
2056
2062
|
};
|
|
@@ -2253,7 +2259,7 @@ const ATTR_DIR$1 = qname("", "dir", "");
|
|
|
2253
2259
|
const ATTR_ALGN = qname("", "algn", "");
|
|
2254
2260
|
const ATTR_ROT_WITH_SHAPE = qname("", "rotWithShape", "");
|
|
2255
2261
|
const ATTR_RAD = qname("", "rad", "");
|
|
2256
|
-
const ATTR_VAL$
|
|
2262
|
+
const ATTR_VAL$7 = qname("", "val", "");
|
|
2257
2263
|
/**
|
|
2258
2264
|
* Computes the index inside `host.children` where an `<a:effectLst>`
|
|
2259
2265
|
* should be inserted to satisfy the spec's child ordering on
|
|
@@ -2275,7 +2281,7 @@ const colorWithAlpha = (color, opacity) => {
|
|
|
2275
2281
|
const base = buildColorElement(color);
|
|
2276
2282
|
if (opacity !== void 0 && opacity >= 0 && opacity < 1) {
|
|
2277
2283
|
const amt = Math.round(opacity * 1e5);
|
|
2278
|
-
base.children.push(elem(NAME_ALPHA, { attrs: [attr(ATTR_VAL$
|
|
2284
|
+
base.children.push(elem(NAME_ALPHA, { attrs: [attr(ATTR_VAL$7, String(amt))] }));
|
|
2279
2285
|
}
|
|
2280
2286
|
return base;
|
|
2281
2287
|
};
|
|
@@ -2391,7 +2397,7 @@ const clearStroke = (spPr) => {
|
|
|
2391
2397
|
spPr.children = spPr.children.filter((c) => !(c.kind === "element" && c.name.namespaceURI === NS.dml && c.name.localName === "ln"));
|
|
2392
2398
|
};
|
|
2393
2399
|
const NAME_PRST_DASH = qname("a", "prstDash", NS.dml);
|
|
2394
|
-
const ATTR_VAL$
|
|
2400
|
+
const ATTR_VAL$6 = qname("", "val", "");
|
|
2395
2401
|
/**
|
|
2396
2402
|
* Sets `<a:prstDash val="..."/>` inside the shape's `<a:ln>`. Creates
|
|
2397
2403
|
* `<a:ln>` if absent. Replacing the dash choice on subsequent calls.
|
|
@@ -2399,7 +2405,7 @@ const ATTR_VAL$5 = qname("", "val", "");
|
|
|
2399
2405
|
const setStrokeDash = (spPr, dash) => {
|
|
2400
2406
|
const ln = ensureLn(spPr);
|
|
2401
2407
|
ln.children = ln.children.filter((c) => !(c.kind === "element" && c.name.namespaceURI === NS.dml && c.name.localName === "prstDash"));
|
|
2402
|
-
insertLnChild(ln, elem(NAME_PRST_DASH, { attrs: [attr(ATTR_VAL$
|
|
2408
|
+
insertLnChild(ln, elem(NAME_PRST_DASH, { attrs: [attr(ATTR_VAL$6, dash)] }));
|
|
2403
2409
|
};
|
|
2404
2410
|
const ATTR_TYPE$5 = qname("", "type", "");
|
|
2405
2411
|
const ATTR_LEN = qname("", "len", "");
|
|
@@ -2455,10 +2461,10 @@ const setStrokeCompound = (spPr, cmpd) => {
|
|
|
2455
2461
|
* while letting any genuine programming error propagate.
|
|
2456
2462
|
*/
|
|
2457
2463
|
var GeomEvalError = class extends Error {};
|
|
2458
|
-
const ATTR_NAME$
|
|
2464
|
+
const ATTR_NAME$12 = qname("", "name", "");
|
|
2459
2465
|
const ATTR_FMLA = qname("", "fmla", "");
|
|
2460
|
-
const ATTR_X$
|
|
2461
|
-
const ATTR_Y$
|
|
2466
|
+
const ATTR_X$9 = qname("", "x", "");
|
|
2467
|
+
const ATTR_Y$9 = qname("", "y", "");
|
|
2462
2468
|
const ATTR_W$2 = qname("", "w", "");
|
|
2463
2469
|
const ATTR_H$1 = qname("", "h", "");
|
|
2464
2470
|
const ATTR_WR = qname("", "wR", "");
|
|
@@ -2582,15 +2588,15 @@ const dmlChildren = (parent, localName) => {
|
|
|
2582
2588
|
const evalGuideList = (parent, guides) => {
|
|
2583
2589
|
if (parent === null) return;
|
|
2584
2590
|
for (const c of dmlChildren(parent, "gd")) {
|
|
2585
|
-
const name = getAttrValue(c, ATTR_NAME$
|
|
2591
|
+
const name = getAttrValue(c, ATTR_NAME$12);
|
|
2586
2592
|
const fmla = getAttrValue(c, ATTR_FMLA);
|
|
2587
2593
|
if (name === null || fmla === null) continue;
|
|
2588
2594
|
guides.set(name, evalFormula(fmla, guides));
|
|
2589
2595
|
}
|
|
2590
2596
|
};
|
|
2591
2597
|
const resolvePt = (pt, guides) => ({
|
|
2592
|
-
x: resolveToken(getAttrValue(pt, ATTR_X$
|
|
2593
|
-
y: resolveToken(getAttrValue(pt, ATTR_Y$
|
|
2598
|
+
x: resolveToken(getAttrValue(pt, ATTR_X$9) ?? "0", guides),
|
|
2599
|
+
y: resolveToken(getAttrValue(pt, ATTR_Y$9) ?? "0", guides)
|
|
2594
2600
|
});
|
|
2595
2601
|
const parsePoint = (el, guides) => {
|
|
2596
2602
|
const pt = firstDmlChild(el, qname("a", "pt", NS.dml));
|
|
@@ -2755,15 +2761,15 @@ const getPictureEmbedRId = (picElement) => {
|
|
|
2755
2761
|
//#endregion
|
|
2756
2762
|
//#region src/internal/drawingml/geometry.ts
|
|
2757
2763
|
const NAME_SP_PR$7 = qname("p", "spPr", NS.pml);
|
|
2758
|
-
const NAME_GRP_SP_PR$
|
|
2759
|
-
const NAME_A_XFRM$
|
|
2764
|
+
const NAME_GRP_SP_PR$4 = qname("p", "grpSpPr", NS.pml);
|
|
2765
|
+
const NAME_A_XFRM$6 = qname("a", "xfrm", NS.dml);
|
|
2760
2766
|
const NAME_P_XFRM$2 = qname("p", "xfrm", NS.pml);
|
|
2761
|
-
const NAME_OFF$
|
|
2762
|
-
const NAME_EXT$
|
|
2763
|
-
const ATTR_X$
|
|
2764
|
-
const ATTR_Y$
|
|
2765
|
-
const ATTR_CX$
|
|
2766
|
-
const ATTR_CY$
|
|
2767
|
+
const NAME_OFF$8 = qname("a", "off", NS.dml);
|
|
2768
|
+
const NAME_EXT$8 = qname("a", "ext", NS.dml);
|
|
2769
|
+
const ATTR_X$8 = qname("", "x", "");
|
|
2770
|
+
const ATTR_Y$8 = qname("", "y", "");
|
|
2771
|
+
const ATTR_CX$8 = qname("", "cx", "");
|
|
2772
|
+
const ATTR_CY$8 = qname("", "cy", "");
|
|
2767
2773
|
const parseIntOr = (raw) => raw === null ? null : Number.isFinite(Number.parseInt(raw, 10)) ? Number.parseInt(raw, 10) : null;
|
|
2768
2774
|
const findTransform = (shape, kind) => {
|
|
2769
2775
|
switch (kind) {
|
|
@@ -2772,12 +2778,12 @@ const findTransform = (shape, kind) => {
|
|
|
2772
2778
|
case "connector": {
|
|
2773
2779
|
const spPr = firstChildElement(shape, NAME_SP_PR$7);
|
|
2774
2780
|
if (spPr === null) return null;
|
|
2775
|
-
return firstChildElement(spPr, NAME_A_XFRM$
|
|
2781
|
+
return firstChildElement(spPr, NAME_A_XFRM$6);
|
|
2776
2782
|
}
|
|
2777
2783
|
case "group": {
|
|
2778
|
-
const grpSpPr = firstChildElement(shape, NAME_GRP_SP_PR$
|
|
2784
|
+
const grpSpPr = firstChildElement(shape, NAME_GRP_SP_PR$4);
|
|
2779
2785
|
if (grpSpPr === null) return null;
|
|
2780
|
-
return firstChildElement(grpSpPr, NAME_A_XFRM$
|
|
2786
|
+
return firstChildElement(grpSpPr, NAME_A_XFRM$6);
|
|
2781
2787
|
}
|
|
2782
2788
|
case "graphicFrame": return firstChildElement(shape, NAME_P_XFRM$2);
|
|
2783
2789
|
}
|
|
@@ -2786,10 +2792,10 @@ const findTransform = (shape, kind) => {
|
|
|
2786
2792
|
const readPosition = (shape, kind) => {
|
|
2787
2793
|
const xfrm = findTransform(shape, kind);
|
|
2788
2794
|
if (xfrm === null) return null;
|
|
2789
|
-
const off = firstChildElement(xfrm, NAME_OFF$
|
|
2795
|
+
const off = firstChildElement(xfrm, NAME_OFF$8);
|
|
2790
2796
|
if (off === null) return null;
|
|
2791
|
-
const x = parseIntOr(getAttrValue(off, ATTR_X$
|
|
2792
|
-
const y = parseIntOr(getAttrValue(off, ATTR_Y$
|
|
2797
|
+
const x = parseIntOr(getAttrValue(off, ATTR_X$8));
|
|
2798
|
+
const y = parseIntOr(getAttrValue(off, ATTR_Y$8));
|
|
2793
2799
|
if (x === null || y === null) return null;
|
|
2794
2800
|
return {
|
|
2795
2801
|
x,
|
|
@@ -2800,10 +2806,10 @@ const readPosition = (shape, kind) => {
|
|
|
2800
2806
|
const readSize = (shape, kind) => {
|
|
2801
2807
|
const xfrm = findTransform(shape, kind);
|
|
2802
2808
|
if (xfrm === null) return null;
|
|
2803
|
-
const ext = firstChildElement(xfrm, NAME_EXT$
|
|
2809
|
+
const ext = firstChildElement(xfrm, NAME_EXT$8);
|
|
2804
2810
|
if (ext === null) return null;
|
|
2805
|
-
const w = parseIntOr(getAttrValue(ext, ATTR_CX$
|
|
2806
|
-
const h = parseIntOr(getAttrValue(ext, ATTR_CY$
|
|
2811
|
+
const w = parseIntOr(getAttrValue(ext, ATTR_CX$8));
|
|
2812
|
+
const h = parseIntOr(getAttrValue(ext, ATTR_CY$8));
|
|
2807
2813
|
if (w === null || h === null) return null;
|
|
2808
2814
|
return {
|
|
2809
2815
|
w,
|
|
@@ -2836,15 +2842,15 @@ const readFlip = (shape, kind) => {
|
|
|
2836
2842
|
//#endregion
|
|
2837
2843
|
//#region src/internal/drawingml/geometry-mutation.ts
|
|
2838
2844
|
const NAME_SP_PR$6 = qname("p", "spPr", NS.pml);
|
|
2839
|
-
const NAME_GRP_SP_PR$
|
|
2840
|
-
const NAME_A_XFRM$
|
|
2845
|
+
const NAME_GRP_SP_PR$3 = qname("p", "grpSpPr", NS.pml);
|
|
2846
|
+
const NAME_A_XFRM$5 = qname("a", "xfrm", NS.dml);
|
|
2841
2847
|
const NAME_P_XFRM$1 = qname("p", "xfrm", NS.pml);
|
|
2842
|
-
const NAME_OFF$
|
|
2843
|
-
const NAME_EXT$
|
|
2844
|
-
const ATTR_X$
|
|
2845
|
-
const ATTR_Y$
|
|
2846
|
-
const ATTR_CX$
|
|
2847
|
-
const ATTR_CY$
|
|
2848
|
+
const NAME_OFF$7 = qname("a", "off", NS.dml);
|
|
2849
|
+
const NAME_EXT$7 = qname("a", "ext", NS.dml);
|
|
2850
|
+
const ATTR_X$7 = qname("", "x", "");
|
|
2851
|
+
const ATTR_Y$7 = qname("", "y", "");
|
|
2852
|
+
const ATTR_CX$7 = qname("", "cx", "");
|
|
2853
|
+
const ATTR_CY$7 = qname("", "cy", "");
|
|
2848
2854
|
/**
|
|
2849
2855
|
* Ensures the shape has an `<a:xfrm>` (or `<p:xfrm>` for graphic frames)
|
|
2850
2856
|
* to write into, creating the host element and its parent if absent.
|
|
@@ -2860,15 +2866,15 @@ const ensureTransform = (shape, kind) => {
|
|
|
2860
2866
|
}
|
|
2861
2867
|
return xfrm;
|
|
2862
2868
|
}
|
|
2863
|
-
const hostName = kind === "group" ? NAME_GRP_SP_PR$
|
|
2869
|
+
const hostName = kind === "group" ? NAME_GRP_SP_PR$3 : NAME_SP_PR$6;
|
|
2864
2870
|
let host = firstChildElement(shape, hostName);
|
|
2865
2871
|
if (host === null) {
|
|
2866
2872
|
host = elem(hostName);
|
|
2867
2873
|
shape.children.push(host);
|
|
2868
2874
|
}
|
|
2869
|
-
let xfrm = firstChildElement(host, NAME_A_XFRM$
|
|
2875
|
+
let xfrm = firstChildElement(host, NAME_A_XFRM$5);
|
|
2870
2876
|
if (xfrm === null) {
|
|
2871
|
-
xfrm = elem(NAME_A_XFRM$
|
|
2877
|
+
xfrm = elem(NAME_A_XFRM$5);
|
|
2872
2878
|
host.children.unshift(xfrm);
|
|
2873
2879
|
}
|
|
2874
2880
|
return xfrm;
|
|
@@ -2876,24 +2882,24 @@ const ensureTransform = (shape, kind) => {
|
|
|
2876
2882
|
/** Sets the shape's `<a:off>` to `(x, y)` in EMU. */
|
|
2877
2883
|
const setPosition = (shape, kind, x, y) => {
|
|
2878
2884
|
const xfrm = ensureTransform(shape, kind);
|
|
2879
|
-
let off = firstChildElement(xfrm, NAME_OFF$
|
|
2885
|
+
let off = firstChildElement(xfrm, NAME_OFF$7);
|
|
2880
2886
|
if (off === null) {
|
|
2881
|
-
off = elem(NAME_OFF$
|
|
2887
|
+
off = elem(NAME_OFF$7);
|
|
2882
2888
|
xfrm.children.unshift(off);
|
|
2883
2889
|
}
|
|
2884
|
-
off.attrs = [attr(ATTR_X$
|
|
2890
|
+
off.attrs = [attr(ATTR_X$7, String(emuCoordinate(x, "setShapePosition: x"))), attr(ATTR_Y$7, String(emuCoordinate(y, "setShapePosition: y")))];
|
|
2885
2891
|
};
|
|
2886
2892
|
/** Sets the shape's `<a:ext>` to `(w, h)` in EMU. */
|
|
2887
2893
|
const setSize = (shape, kind, w, h) => {
|
|
2888
2894
|
const xfrm = ensureTransform(shape, kind);
|
|
2889
|
-
let ext = firstChildElement(xfrm, NAME_EXT$
|
|
2895
|
+
let ext = firstChildElement(xfrm, NAME_EXT$7);
|
|
2890
2896
|
if (ext === null) {
|
|
2891
|
-
ext = elem(NAME_EXT$
|
|
2897
|
+
ext = elem(NAME_EXT$7);
|
|
2892
2898
|
const offIdx = xfrm.children.findIndex((c) => c.kind === "element" && c.name.localName === "off" && c.name.namespaceURI === NS.dml);
|
|
2893
2899
|
if (offIdx >= 0) xfrm.children.splice(offIdx + 1, 0, ext);
|
|
2894
2900
|
else xfrm.children.push(ext);
|
|
2895
2901
|
}
|
|
2896
|
-
ext.attrs = [attr(ATTR_CX$
|
|
2902
|
+
ext.attrs = [attr(ATTR_CX$7, String(emuExtent(w, "setShapeSize: w"))), attr(ATTR_CY$7, String(emuExtent(h, "setShapeSize: h")))];
|
|
2897
2903
|
};
|
|
2898
2904
|
const ATTR_ROT = qname("", "rot", "");
|
|
2899
2905
|
const ATTR_FLIP_H$1 = qname("", "flipH", "");
|
|
@@ -2930,21 +2936,21 @@ const NAME_CSLD$4 = qname("p", "cSld", NS.pml);
|
|
|
2930
2936
|
const NAME_SP_TREE$3 = qname("p", "spTree", NS.pml);
|
|
2931
2937
|
const NAME_NV_SP_PR$4 = qname("p", "nvSpPr", NS.pml);
|
|
2932
2938
|
const NAME_NV_PIC_PR$1 = qname("p", "nvPicPr", NS.pml);
|
|
2933
|
-
const NAME_NV_GRP_SP_PR$
|
|
2939
|
+
const NAME_NV_GRP_SP_PR$3 = qname("p", "nvGrpSpPr", NS.pml);
|
|
2934
2940
|
const NAME_NV_GRAPHIC_FRAME_PR$2 = qname("p", "nvGraphicFramePr", NS.pml);
|
|
2935
2941
|
const NAME_NV_CXN_SP_PR$1 = qname("p", "nvCxnSpPr", NS.pml);
|
|
2936
|
-
const NAME_C_NV_PR$
|
|
2937
|
-
const NAME_NV_PR$
|
|
2942
|
+
const NAME_C_NV_PR$8 = qname("p", "cNvPr", NS.pml);
|
|
2943
|
+
const NAME_NV_PR$9 = qname("p", "nvPr", NS.pml);
|
|
2938
2944
|
const NAME_PH$2 = qname("p", "ph", NS.pml);
|
|
2939
2945
|
const NAME_TX_BODY$9 = qname("p", "txBody", NS.pml);
|
|
2940
|
-
const ATTR_ID$
|
|
2941
|
-
const ATTR_NAME$
|
|
2946
|
+
const ATTR_ID$12 = qname("", "id", "");
|
|
2947
|
+
const ATTR_NAME$11 = qname("", "name", "");
|
|
2942
2948
|
const ATTR_TYPE$4 = qname("", "type", "");
|
|
2943
2949
|
const ATTR_IDX$6 = qname("", "idx", "");
|
|
2944
2950
|
const NV_BY_KIND = {
|
|
2945
2951
|
shape: NAME_NV_SP_PR$4,
|
|
2946
2952
|
picture: NAME_NV_PIC_PR$1,
|
|
2947
|
-
group: NAME_NV_GRP_SP_PR$
|
|
2953
|
+
group: NAME_NV_GRP_SP_PR$3,
|
|
2948
2954
|
graphicFrame: NAME_NV_GRAPHIC_FRAME_PR$2,
|
|
2949
2955
|
connector: NAME_NV_CXN_SP_PR$1
|
|
2950
2956
|
};
|
|
@@ -2966,14 +2972,14 @@ const extractShape = (element, kind) => {
|
|
|
2966
2972
|
let placeholderType = null;
|
|
2967
2973
|
let placeholderIdx = null;
|
|
2968
2974
|
if (nvContainer !== null) {
|
|
2969
|
-
const cNvPr = firstChildElement(nvContainer, NAME_C_NV_PR$
|
|
2975
|
+
const cNvPr = firstChildElement(nvContainer, NAME_C_NV_PR$8);
|
|
2970
2976
|
if (cNvPr !== null) {
|
|
2971
|
-
const idRaw = getAttrValue(cNvPr, ATTR_ID$
|
|
2977
|
+
const idRaw = getAttrValue(cNvPr, ATTR_ID$12);
|
|
2972
2978
|
if (idRaw !== null) id = Number.parseInt(idRaw, 10);
|
|
2973
|
-
const nameRaw = getAttrValue(cNvPr, ATTR_NAME$
|
|
2979
|
+
const nameRaw = getAttrValue(cNvPr, ATTR_NAME$11);
|
|
2974
2980
|
if (nameRaw !== null) name = nameRaw;
|
|
2975
2981
|
}
|
|
2976
|
-
const nvPr = firstChildElement(nvContainer, NAME_NV_PR$
|
|
2982
|
+
const nvPr = firstChildElement(nvContainer, NAME_NV_PR$9);
|
|
2977
2983
|
if (nvPr !== null) {
|
|
2978
2984
|
const ph = firstChildElement(nvPr, NAME_PH$2);
|
|
2979
2985
|
if (ph !== null) {
|
|
@@ -3060,13 +3066,13 @@ const slideText = (slide, joiner = "\n") => slide.shapes.map((s) => s.text).filt
|
|
|
3060
3066
|
//#endregion
|
|
3061
3067
|
//#region src/internal/presentationml/slide-layout-part.ts
|
|
3062
3068
|
const NAME_CSLD$3 = qname("p", "cSld", NS.pml);
|
|
3063
|
-
const ATTR_NAME$
|
|
3069
|
+
const ATTR_NAME$10 = qname("", "name", "");
|
|
3064
3070
|
const ATTR_TYPE$3 = qname("", "type", "");
|
|
3065
3071
|
/** Parses a `<p:sldLayout>` root element. */
|
|
3066
3072
|
const readSlideLayoutPart = (root, options = {}) => {
|
|
3067
3073
|
const { shapes } = readShapeTreeFromCsldRoot(root, "sldLayout", options);
|
|
3068
3074
|
const cSld = firstChildElement(root, NAME_CSLD$3);
|
|
3069
|
-
const name = cSld !== null ? getAttrValue(cSld, ATTR_NAME$
|
|
3075
|
+
const name = cSld !== null ? getAttrValue(cSld, ATTR_NAME$10) : null;
|
|
3070
3076
|
const layoutType = getAttrValue(root, ATTR_TYPE$3);
|
|
3071
3077
|
return {
|
|
3072
3078
|
name: name ?? "",
|
|
@@ -3080,11 +3086,11 @@ const readSlideLayoutPart = (root, options = {}) => {
|
|
|
3080
3086
|
const NAME_SLD = qname("p", "sld", NS.pml);
|
|
3081
3087
|
const NAME_CSLD$2 = qname("p", "cSld", NS.pml);
|
|
3082
3088
|
const NAME_SP_TREE$2 = qname("p", "spTree", NS.pml);
|
|
3083
|
-
const NAME_NV_GRP_SP_PR$
|
|
3084
|
-
const NAME_C_NV_PR$
|
|
3085
|
-
const NAME_C_NV_GRP_SP_PR$
|
|
3086
|
-
const NAME_NV_PR$
|
|
3087
|
-
const NAME_GRP_SP_PR$
|
|
3089
|
+
const NAME_NV_GRP_SP_PR$2 = qname("p", "nvGrpSpPr", NS.pml);
|
|
3090
|
+
const NAME_C_NV_PR$7 = qname("p", "cNvPr", NS.pml);
|
|
3091
|
+
const NAME_C_NV_GRP_SP_PR$2 = qname("p", "cNvGrpSpPr", NS.pml);
|
|
3092
|
+
const NAME_NV_PR$8 = qname("p", "nvPr", NS.pml);
|
|
3093
|
+
const NAME_GRP_SP_PR$2 = qname("p", "grpSpPr", NS.pml);
|
|
3088
3094
|
const NAME_SP$3 = qname("p", "sp", NS.pml);
|
|
3089
3095
|
const NAME_NV_SP_PR$3 = qname("p", "nvSpPr", NS.pml);
|
|
3090
3096
|
const NAME_C_NV_SP_PR$3 = qname("p", "cNvSpPr", NS.pml);
|
|
@@ -3095,8 +3101,8 @@ const NAME_BODY_PR$4 = qname("a", "bodyPr", NS.dml);
|
|
|
3095
3101
|
const NAME_LST_STYLE$4 = qname("a", "lstStyle", NS.dml);
|
|
3096
3102
|
const NAME_P$4 = qname("a", "p", NS.dml);
|
|
3097
3103
|
const NAME_SP_LOCKS$1 = qname("a", "spLocks", NS.dml);
|
|
3098
|
-
const ATTR_ID$
|
|
3099
|
-
const ATTR_NAME$
|
|
3104
|
+
const ATTR_ID$11 = qname("", "id", "");
|
|
3105
|
+
const ATTR_NAME$9 = qname("", "name", "");
|
|
3100
3106
|
const ATTR_TYPE$2 = qname("", "type", "");
|
|
3101
3107
|
const ATTR_IDX$5 = qname("", "idx", "");
|
|
3102
3108
|
const ATTR_NO_GRP$2 = qname("", "noGrp", "");
|
|
@@ -3116,7 +3122,7 @@ const buildSlideFromLayout = (layoutSpTree) => {
|
|
|
3116
3122
|
if (child.name.namespaceURI !== NS.pml || child.name.localName !== "sp") continue;
|
|
3117
3123
|
const nvSpPr = firstChildElement(child, NAME_NV_SP_PR$3);
|
|
3118
3124
|
if (nvSpPr === null) continue;
|
|
3119
|
-
const nvPr = firstChildElement(nvSpPr, NAME_NV_PR$
|
|
3125
|
+
const nvPr = firstChildElement(nvSpPr, NAME_NV_PR$8);
|
|
3120
3126
|
if (nvPr === null) continue;
|
|
3121
3127
|
const ph = firstChildElement(nvPr, NAME_PH$1);
|
|
3122
3128
|
if (ph === null) continue;
|
|
@@ -3155,22 +3161,22 @@ const buildSlideFromLayout = (layoutSpTree) => {
|
|
|
3155
3161
|
epilog: []
|
|
3156
3162
|
};
|
|
3157
3163
|
};
|
|
3158
|
-
const buildNvGrpSpPr = (id) => elem(NAME_NV_GRP_SP_PR$
|
|
3159
|
-
elem(NAME_C_NV_PR$
|
|
3160
|
-
elem(NAME_C_NV_GRP_SP_PR$
|
|
3161
|
-
elem(NAME_NV_PR$
|
|
3164
|
+
const buildNvGrpSpPr = (id) => elem(NAME_NV_GRP_SP_PR$2, { children: [
|
|
3165
|
+
elem(NAME_C_NV_PR$7, { attrs: [attr(ATTR_ID$11, String(id)), attr(ATTR_NAME$9, "")] }),
|
|
3166
|
+
elem(NAME_C_NV_GRP_SP_PR$2),
|
|
3167
|
+
elem(NAME_NV_PR$8)
|
|
3162
3168
|
] });
|
|
3163
|
-
const buildGrpSpPr = () => elem(NAME_GRP_SP_PR$
|
|
3169
|
+
const buildGrpSpPr = () => elem(NAME_GRP_SP_PR$2);
|
|
3164
3170
|
const buildPlaceholderStub = (id, phType, phIdx) => {
|
|
3165
3171
|
const phAttrs = [];
|
|
3166
3172
|
if (phType !== null) phAttrs.push(attr(ATTR_TYPE$2, phType));
|
|
3167
3173
|
if (phIdx !== null) phAttrs.push(attr(ATTR_IDX$5, phIdx));
|
|
3168
|
-
const nvPr = elem(NAME_NV_PR$
|
|
3174
|
+
const nvPr = elem(NAME_NV_PR$8, { children: [elem(NAME_PH$1, { attrs: phAttrs })] });
|
|
3169
3175
|
const cNvSpPr = elem(NAME_C_NV_SP_PR$3, { children: [elem(NAME_SP_LOCKS$1, { attrs: [attr(ATTR_NO_GRP$2, "1")] })] });
|
|
3170
3176
|
const name = inferPlaceholderName(id, phType);
|
|
3171
3177
|
return elem(NAME_SP$3, { children: [
|
|
3172
3178
|
elem(NAME_NV_SP_PR$3, { children: [
|
|
3173
|
-
elem(NAME_C_NV_PR$
|
|
3179
|
+
elem(NAME_C_NV_PR$7, { attrs: [attr(ATTR_ID$11, String(id)), attr(ATTR_NAME$9, name)] }),
|
|
3174
3180
|
cNvSpPr,
|
|
3175
3181
|
nvPr
|
|
3176
3182
|
] }),
|
|
@@ -3206,14 +3212,14 @@ const inferPlaceholderName = (id, phType) => {
|
|
|
3206
3212
|
//#region src/internal/presentationml/text-box-builder.ts
|
|
3207
3213
|
const NAME_SP$2 = qname("p", "sp", NS.pml);
|
|
3208
3214
|
const NAME_NV_SP_PR$2 = qname("p", "nvSpPr", NS.pml);
|
|
3209
|
-
const NAME_C_NV_PR$
|
|
3215
|
+
const NAME_C_NV_PR$6 = qname("p", "cNvPr", NS.pml);
|
|
3210
3216
|
const NAME_C_NV_SP_PR$2 = qname("p", "cNvSpPr", NS.pml);
|
|
3211
|
-
const NAME_NV_PR$
|
|
3217
|
+
const NAME_NV_PR$7 = qname("p", "nvPr", NS.pml);
|
|
3212
3218
|
const NAME_SP_PR$4 = qname("p", "spPr", NS.pml);
|
|
3213
3219
|
const NAME_TX_BODY$7 = qname("p", "txBody", NS.pml);
|
|
3214
|
-
const NAME_A_XFRM$
|
|
3215
|
-
const NAME_OFF$
|
|
3216
|
-
const NAME_EXT$
|
|
3220
|
+
const NAME_A_XFRM$4 = qname("a", "xfrm", NS.dml);
|
|
3221
|
+
const NAME_OFF$6 = qname("a", "off", NS.dml);
|
|
3222
|
+
const NAME_EXT$6 = qname("a", "ext", NS.dml);
|
|
3217
3223
|
const NAME_PRST_GEOM$3 = qname("a", "prstGeom", NS.dml);
|
|
3218
3224
|
const NAME_AV_LST$3 = qname("a", "avLst", NS.dml);
|
|
3219
3225
|
const NAME_NO_FILL = qname("a", "noFill", NS.dml);
|
|
@@ -3223,13 +3229,13 @@ const NAME_P$3 = qname("a", "p", NS.dml);
|
|
|
3223
3229
|
const NAME_R$3 = qname("a", "r", NS.dml);
|
|
3224
3230
|
const NAME_RPR$3 = qname("a", "rPr", NS.dml);
|
|
3225
3231
|
const NAME_T$4 = qname("a", "t", NS.dml);
|
|
3226
|
-
const ATTR_ID$
|
|
3227
|
-
const ATTR_NAME$
|
|
3232
|
+
const ATTR_ID$10 = qname("", "id", "");
|
|
3233
|
+
const ATTR_NAME$8 = qname("", "name", "");
|
|
3228
3234
|
const ATTR_TX_BOX$1 = qname("", "txBox", "");
|
|
3229
|
-
const ATTR_X$
|
|
3230
|
-
const ATTR_Y$
|
|
3231
|
-
const ATTR_CX$
|
|
3232
|
-
const ATTR_CY$
|
|
3235
|
+
const ATTR_X$6 = qname("", "x", "");
|
|
3236
|
+
const ATTR_Y$6 = qname("", "y", "");
|
|
3237
|
+
const ATTR_CX$6 = qname("", "cx", "");
|
|
3238
|
+
const ATTR_CY$6 = qname("", "cy", "");
|
|
3233
3239
|
const ATTR_PRST$3 = qname("", "prst", "");
|
|
3234
3240
|
const ATTR_WRAP$1 = qname("", "wrap", "");
|
|
3235
3241
|
const ATTR_RTL_COL$1 = qname("", "rtlCol", "");
|
|
@@ -3244,12 +3250,12 @@ NS.xml;
|
|
|
3244
3250
|
const buildTextBox = (opts) => {
|
|
3245
3251
|
const name = opts.name ?? `TextBox ${opts.id}`;
|
|
3246
3252
|
const nvSpPr = elem(NAME_NV_SP_PR$2, { children: [
|
|
3247
|
-
elem(NAME_C_NV_PR$
|
|
3253
|
+
elem(NAME_C_NV_PR$6, { attrs: [attr(ATTR_ID$10, String(opts.id)), attr(ATTR_NAME$8, name)] }),
|
|
3248
3254
|
elem(NAME_C_NV_SP_PR$2, { attrs: [attr(ATTR_TX_BOX$1, "1")] }),
|
|
3249
|
-
elem(NAME_NV_PR$
|
|
3255
|
+
elem(NAME_NV_PR$7)
|
|
3250
3256
|
] });
|
|
3251
3257
|
const spPr = elem(NAME_SP_PR$4, { children: [
|
|
3252
|
-
elem(NAME_A_XFRM$
|
|
3258
|
+
elem(NAME_A_XFRM$4, { children: [elem(NAME_OFF$6, { attrs: [attr(ATTR_X$6, String(emuCoordinate(opts.x, "addSlideTextBox: x"))), attr(ATTR_Y$6, String(emuCoordinate(opts.y, "addSlideTextBox: y")))] }), elem(NAME_EXT$6, { attrs: [attr(ATTR_CX$6, String(emuExtent(opts.w, "addSlideTextBox: w"))), attr(ATTR_CY$6, String(emuExtent(opts.h, "addSlideTextBox: h")))] })] }),
|
|
3253
3259
|
elem(NAME_PRST_GEOM$3, {
|
|
3254
3260
|
attrs: [attr(ATTR_PRST$3, "rect")],
|
|
3255
3261
|
children: [elem(NAME_AV_LST$3)]
|
|
@@ -3274,14 +3280,14 @@ const buildTextBox = (opts) => {
|
|
|
3274
3280
|
//#region src/internal/presentationml/shape-builder.ts
|
|
3275
3281
|
const NAME_SP$1 = qname("p", "sp", NS.pml);
|
|
3276
3282
|
const NAME_NV_SP_PR$1 = qname("p", "nvSpPr", NS.pml);
|
|
3277
|
-
const NAME_C_NV_PR$
|
|
3283
|
+
const NAME_C_NV_PR$5 = qname("p", "cNvPr", NS.pml);
|
|
3278
3284
|
const NAME_C_NV_SP_PR$1 = qname("p", "cNvSpPr", NS.pml);
|
|
3279
|
-
const NAME_NV_PR$
|
|
3285
|
+
const NAME_NV_PR$6 = qname("p", "nvPr", NS.pml);
|
|
3280
3286
|
const NAME_SP_PR$3 = qname("p", "spPr", NS.pml);
|
|
3281
3287
|
const NAME_TX_BODY$6 = qname("p", "txBody", NS.pml);
|
|
3282
|
-
const NAME_A_XFRM$
|
|
3283
|
-
const NAME_OFF$
|
|
3284
|
-
const NAME_EXT$
|
|
3288
|
+
const NAME_A_XFRM$3 = qname("a", "xfrm", NS.dml);
|
|
3289
|
+
const NAME_OFF$5 = qname("a", "off", NS.dml);
|
|
3290
|
+
const NAME_EXT$5 = qname("a", "ext", NS.dml);
|
|
3285
3291
|
const NAME_PRST_GEOM$2 = qname("a", "prstGeom", NS.dml);
|
|
3286
3292
|
const NAME_AV_LST$2 = qname("a", "avLst", NS.dml);
|
|
3287
3293
|
const NAME_BODY_PR$2 = qname("a", "bodyPr", NS.dml);
|
|
@@ -3290,12 +3296,12 @@ const NAME_P$2 = qname("a", "p", NS.dml);
|
|
|
3290
3296
|
const NAME_R$2 = qname("a", "r", NS.dml);
|
|
3291
3297
|
const NAME_RPR$2 = qname("a", "rPr", NS.dml);
|
|
3292
3298
|
const NAME_T$3 = qname("a", "t", NS.dml);
|
|
3293
|
-
const ATTR_ID$
|
|
3294
|
-
const ATTR_NAME$
|
|
3295
|
-
const ATTR_X$
|
|
3296
|
-
const ATTR_Y$
|
|
3297
|
-
const ATTR_CX$
|
|
3298
|
-
const ATTR_CY$
|
|
3299
|
+
const ATTR_ID$9 = qname("", "id", "");
|
|
3300
|
+
const ATTR_NAME$7 = qname("", "name", "");
|
|
3301
|
+
const ATTR_X$5 = qname("", "x", "");
|
|
3302
|
+
const ATTR_Y$5 = qname("", "y", "");
|
|
3303
|
+
const ATTR_CX$5 = qname("", "cx", "");
|
|
3304
|
+
const ATTR_CY$5 = qname("", "cy", "");
|
|
3299
3305
|
const ATTR_PRST$2 = qname("", "prst", "");
|
|
3300
3306
|
const ATTR_WRAP = qname("", "wrap", "");
|
|
3301
3307
|
const ATTR_RTL_COL = qname("", "rtlCol", "");
|
|
@@ -3322,10 +3328,10 @@ const buildShape = (opts) => {
|
|
|
3322
3328
|
const name = opts.name ?? `${opts.preset} ${opts.id}`;
|
|
3323
3329
|
const anchor = opts.textAnchor ?? "ctr";
|
|
3324
3330
|
const children = [elem(NAME_NV_SP_PR$1, { children: [
|
|
3325
|
-
elem(NAME_C_NV_PR$
|
|
3331
|
+
elem(NAME_C_NV_PR$5, { attrs: [attr(ATTR_ID$9, String(opts.id)), attr(ATTR_NAME$7, name)] }),
|
|
3326
3332
|
elem(NAME_C_NV_SP_PR$1),
|
|
3327
|
-
elem(NAME_NV_PR$
|
|
3328
|
-
] }), elem(NAME_SP_PR$3, { children: [elem(NAME_A_XFRM$
|
|
3333
|
+
elem(NAME_NV_PR$6)
|
|
3334
|
+
] }), elem(NAME_SP_PR$3, { children: [elem(NAME_A_XFRM$3, { children: [elem(NAME_OFF$5, { attrs: [attr(ATTR_X$5, String(emuCoordinate(opts.x, "addSlideShape: x"))), attr(ATTR_Y$5, String(emuCoordinate(opts.y, "addSlideShape: y")))] }), elem(NAME_EXT$5, { attrs: [attr(ATTR_CX$5, String(emuExtent(opts.w, "addSlideShape: w"))), attr(ATTR_CY$5, String(emuExtent(opts.h, "addSlideShape: h")))] })] }), elem(NAME_PRST_GEOM$2, {
|
|
3329
3335
|
attrs: [attr(ATTR_PRST$2, opts.preset)],
|
|
3330
3336
|
children: [elem(NAME_AV_LST$2)]
|
|
3331
3337
|
})] })];
|
|
@@ -3337,13 +3343,13 @@ const buildShape = (opts) => {
|
|
|
3337
3343
|
//#region src/internal/presentationml/connector-builder.ts
|
|
3338
3344
|
const NAME_CXN_SP = qname("p", "cxnSp", NS.pml);
|
|
3339
3345
|
const NAME_NV_CXN_SP_PR = qname("p", "nvCxnSpPr", NS.pml);
|
|
3340
|
-
const NAME_C_NV_PR$
|
|
3346
|
+
const NAME_C_NV_PR$4 = qname("p", "cNvPr", NS.pml);
|
|
3341
3347
|
const NAME_C_NV_CXN_SP_PR = qname("p", "cNvCxnSpPr", NS.pml);
|
|
3342
|
-
const NAME_NV_PR$
|
|
3348
|
+
const NAME_NV_PR$5 = qname("p", "nvPr", NS.pml);
|
|
3343
3349
|
const NAME_SP_PR$2 = qname("p", "spPr", NS.pml);
|
|
3344
|
-
const NAME_A_XFRM$
|
|
3345
|
-
const NAME_OFF$
|
|
3346
|
-
const NAME_EXT$
|
|
3350
|
+
const NAME_A_XFRM$2 = qname("a", "xfrm", NS.dml);
|
|
3351
|
+
const NAME_OFF$4 = qname("a", "off", NS.dml);
|
|
3352
|
+
const NAME_EXT$4 = qname("a", "ext", NS.dml);
|
|
3347
3353
|
const NAME_PRST_GEOM$1 = qname("a", "prstGeom", NS.dml);
|
|
3348
3354
|
const NAME_AV_LST$1 = qname("a", "avLst", NS.dml);
|
|
3349
3355
|
const NAME_LN = qname("a", "ln", NS.dml);
|
|
@@ -3355,13 +3361,13 @@ const NAME_EFFECT_REF = qname("a", "effectRef", NS.dml);
|
|
|
3355
3361
|
const NAME_FONT_REF = qname("a", "fontRef", NS.dml);
|
|
3356
3362
|
const NAME_SCHEME_CLR = qname("a", "schemeClr", NS.dml);
|
|
3357
3363
|
const ATTR_IDX$4 = qname("", "idx", "");
|
|
3358
|
-
const ATTR_VAL$
|
|
3359
|
-
const ATTR_ID$
|
|
3360
|
-
const ATTR_NAME$
|
|
3361
|
-
const ATTR_X$
|
|
3362
|
-
const ATTR_Y$
|
|
3363
|
-
const ATTR_CX$
|
|
3364
|
-
const ATTR_CY$
|
|
3364
|
+
const ATTR_VAL$5 = qname("", "val", "");
|
|
3365
|
+
const ATTR_ID$8 = qname("", "id", "");
|
|
3366
|
+
const ATTR_NAME$6 = qname("", "name", "");
|
|
3367
|
+
const ATTR_X$4 = qname("", "x", "");
|
|
3368
|
+
const ATTR_Y$4 = qname("", "y", "");
|
|
3369
|
+
const ATTR_CX$4 = qname("", "cx", "");
|
|
3370
|
+
const ATTR_CY$4 = qname("", "cy", "");
|
|
3365
3371
|
const ATTR_PRST$1 = qname("", "prst", "");
|
|
3366
3372
|
const ATTR_W$1 = qname("", "w", "");
|
|
3367
3373
|
const ATTR_FLIP_H = qname("", "flipH", "");
|
|
@@ -3370,9 +3376,9 @@ const ATTR_FLIP_V = qname("", "flipV", "");
|
|
|
3370
3376
|
const buildConnector = (opts) => {
|
|
3371
3377
|
const name = opts.name ?? `Straight Connector ${opts.id}`;
|
|
3372
3378
|
const nvCxnSpPr = elem(NAME_NV_CXN_SP_PR, { children: [
|
|
3373
|
-
elem(NAME_C_NV_PR$
|
|
3379
|
+
elem(NAME_C_NV_PR$4, { attrs: [attr(ATTR_ID$8, String(opts.id)), attr(ATTR_NAME$6, name)] }),
|
|
3374
3380
|
elem(NAME_C_NV_CXN_SP_PR),
|
|
3375
|
-
elem(NAME_NV_PR$
|
|
3381
|
+
elem(NAME_NV_PR$5)
|
|
3376
3382
|
] });
|
|
3377
3383
|
const x = Math.min(opts.from.x, opts.to.x);
|
|
3378
3384
|
const y = Math.min(opts.from.y, opts.to.y);
|
|
@@ -3383,9 +3389,9 @@ const buildConnector = (opts) => {
|
|
|
3383
3389
|
const xfrmAttrs = [];
|
|
3384
3390
|
if (flipH) xfrmAttrs.push(attr(ATTR_FLIP_H, "1"));
|
|
3385
3391
|
if (flipV) xfrmAttrs.push(attr(ATTR_FLIP_V, "1"));
|
|
3386
|
-
const xfrm = elem(NAME_A_XFRM$
|
|
3392
|
+
const xfrm = elem(NAME_A_XFRM$2, {
|
|
3387
3393
|
attrs: xfrmAttrs,
|
|
3388
|
-
children: [elem(NAME_OFF$
|
|
3394
|
+
children: [elem(NAME_OFF$4, { attrs: [attr(ATTR_X$4, String(emuCoordinate(x, "addSlideLine: x"))), attr(ATTR_Y$4, String(emuCoordinate(y, "addSlideLine: y")))] }), elem(NAME_EXT$4, { attrs: [attr(ATTR_CX$4, String(emuExtent(cx, "addSlideLine: width"))), attr(ATTR_CY$4, String(emuExtent(cy, "addSlideLine: height")))] })]
|
|
3389
3395
|
});
|
|
3390
3396
|
const prstGeom = elem(NAME_PRST_GEOM$1, {
|
|
3391
3397
|
attrs: [attr(ATTR_PRST$1, "line")],
|
|
@@ -3404,7 +3410,7 @@ const buildConnector = (opts) => {
|
|
|
3404
3410
|
if (!hasExplicitLine) {
|
|
3405
3411
|
const styleRef = (name, idx, clr) => elem(name, {
|
|
3406
3412
|
attrs: [attr(ATTR_IDX$4, idx)],
|
|
3407
|
-
children: [elem(NAME_SCHEME_CLR, { attrs: [attr(ATTR_VAL$
|
|
3413
|
+
children: [elem(NAME_SCHEME_CLR, { attrs: [attr(ATTR_VAL$5, clr)] })]
|
|
3408
3414
|
});
|
|
3409
3415
|
children.push(elem(NAME_STYLE, { children: [
|
|
3410
3416
|
styleRef(NAME_LN_REF, "1", "accent1"),
|
|
@@ -3416,6 +3422,48 @@ const buildConnector = (opts) => {
|
|
|
3416
3422
|
return elem(NAME_CXN_SP, { children });
|
|
3417
3423
|
};
|
|
3418
3424
|
//#endregion
|
|
3425
|
+
//#region src/internal/presentationml/group-builder.ts
|
|
3426
|
+
const NAME_GRP_SP = qname("p", "grpSp", NS.pml);
|
|
3427
|
+
const NAME_NV_GRP_SP_PR$1 = qname("p", "nvGrpSpPr", NS.pml);
|
|
3428
|
+
const NAME_C_NV_PR$3 = qname("p", "cNvPr", NS.pml);
|
|
3429
|
+
const NAME_C_NV_GRP_SP_PR$1 = qname("p", "cNvGrpSpPr", NS.pml);
|
|
3430
|
+
const NAME_NV_PR$4 = qname("p", "nvPr", NS.pml);
|
|
3431
|
+
const NAME_GRP_SP_PR$1 = qname("p", "grpSpPr", NS.pml);
|
|
3432
|
+
const NAME_A_XFRM$1 = qname("a", "xfrm", NS.dml);
|
|
3433
|
+
const NAME_OFF$3 = qname("a", "off", NS.dml);
|
|
3434
|
+
const NAME_EXT$3 = qname("a", "ext", NS.dml);
|
|
3435
|
+
const NAME_CH_OFF = qname("a", "chOff", NS.dml);
|
|
3436
|
+
const NAME_CH_EXT = qname("a", "chExt", NS.dml);
|
|
3437
|
+
const ATTR_ID$7 = qname("", "id", "");
|
|
3438
|
+
const ATTR_NAME$5 = qname("", "name", "");
|
|
3439
|
+
const ATTR_X$3 = qname("", "x", "");
|
|
3440
|
+
const ATTR_Y$3 = qname("", "y", "");
|
|
3441
|
+
const ATTR_CX$3 = qname("", "cx", "");
|
|
3442
|
+
const ATTR_CY$3 = qname("", "cy", "");
|
|
3443
|
+
/** Returns a `<p:grpSp>` wrapping `opts.children` under one transform. */
|
|
3444
|
+
const buildGroup = (opts) => {
|
|
3445
|
+
const name = opts.name ?? `Group ${opts.id}`;
|
|
3446
|
+
const nvGrpSpPr = elem(NAME_NV_GRP_SP_PR$1, { children: [
|
|
3447
|
+
elem(NAME_C_NV_PR$3, { attrs: [attr(ATTR_ID$7, String(opts.id)), attr(ATTR_NAME$5, name)] }),
|
|
3448
|
+
elem(NAME_C_NV_GRP_SP_PR$1),
|
|
3449
|
+
elem(NAME_NV_PR$4)
|
|
3450
|
+
] });
|
|
3451
|
+
const x = emuCoordinate(opts.x, "groupShapes: x");
|
|
3452
|
+
const y = emuCoordinate(opts.y, "groupShapes: y");
|
|
3453
|
+
const cx = emuExtent(opts.w, "groupShapes: w");
|
|
3454
|
+
const cy = emuExtent(opts.h, "groupShapes: h");
|
|
3455
|
+
return elem(NAME_GRP_SP, { children: [
|
|
3456
|
+
nvGrpSpPr,
|
|
3457
|
+
elem(NAME_GRP_SP_PR$1, { children: [elem(NAME_A_XFRM$1, { children: [
|
|
3458
|
+
elem(NAME_OFF$3, { attrs: [attr(ATTR_X$3, String(x)), attr(ATTR_Y$3, String(y))] }),
|
|
3459
|
+
elem(NAME_EXT$3, { attrs: [attr(ATTR_CX$3, String(cx)), attr(ATTR_CY$3, String(cy))] }),
|
|
3460
|
+
elem(NAME_CH_OFF, { attrs: [attr(ATTR_X$3, String(x)), attr(ATTR_Y$3, String(y))] }),
|
|
3461
|
+
elem(NAME_CH_EXT, { attrs: [attr(ATTR_CX$3, String(cx)), attr(ATTR_CY$3, String(cy))] })
|
|
3462
|
+
] })] }),
|
|
3463
|
+
...opts.children
|
|
3464
|
+
] });
|
|
3465
|
+
};
|
|
3466
|
+
//#endregion
|
|
3419
3467
|
//#region src/internal/presentationml/picture-builder.ts
|
|
3420
3468
|
const NAME_PIC = qname("p", "pic", NS.pml);
|
|
3421
3469
|
const NAME_NV_PIC_PR = qname("p", "nvPicPr", NS.pml);
|
|
@@ -3434,7 +3482,7 @@ const NAME_PRST_GEOM = qname("a", "prstGeom", NS.dml);
|
|
|
3434
3482
|
const NAME_AV_LST = qname("a", "avLst", NS.dml);
|
|
3435
3483
|
const NAME_PIC_LOCKS = qname("a", "picLocks", NS.dml);
|
|
3436
3484
|
const ATTR_ID$6 = qname("", "id", "");
|
|
3437
|
-
const ATTR_NAME$
|
|
3485
|
+
const ATTR_NAME$4 = qname("", "name", "");
|
|
3438
3486
|
const ATTR_X$2 = qname("", "x", "");
|
|
3439
3487
|
const ATTR_Y$2 = qname("", "y", "");
|
|
3440
3488
|
const ATTR_CX$2 = qname("", "cx", "");
|
|
@@ -3448,7 +3496,7 @@ const buildPicture = (opts) => {
|
|
|
3448
3496
|
const cNvPicPr = elem(NAME_C_NV_PIC_PR, { children: [elem(NAME_PIC_LOCKS, { attrs: opts.lockAspect ?? true ? [attr(ATTR_NO_CHANGE_ASPECT$1, "1")] : [] })] });
|
|
3449
3497
|
return elem(NAME_PIC, { children: [
|
|
3450
3498
|
elem(NAME_NV_PIC_PR, { children: [
|
|
3451
|
-
elem(NAME_C_NV_PR$2, { attrs: [attr(ATTR_ID$6, String(opts.id)), attr(ATTR_NAME$
|
|
3499
|
+
elem(NAME_C_NV_PR$2, { attrs: [attr(ATTR_ID$6, String(opts.id)), attr(ATTR_NAME$4, name)] }),
|
|
3452
3500
|
cNvPicPr,
|
|
3453
3501
|
elem(NAME_NV_PR$3)
|
|
3454
3502
|
] }),
|
|
@@ -3493,14 +3541,14 @@ const NAME_SRGB_CLR$2 = qname("a", "srgbClr", NS.dml);
|
|
|
3493
3541
|
const NAME_T$2 = qname("a", "t", NS.dml);
|
|
3494
3542
|
const NAME_PPR = qname("a", "pPr", NS.dml);
|
|
3495
3543
|
const NAME_BU_NONE = qname("a", "buNone", NS.dml);
|
|
3496
|
-
const ATTR_VAL$
|
|
3544
|
+
const ATTR_VAL$4 = qname("", "val", "");
|
|
3497
3545
|
const ATTR_MAR_L = qname("", "marL", "");
|
|
3498
3546
|
const ATTR_MAR_R = qname("", "marR", "");
|
|
3499
3547
|
const ATTR_MAR_T = qname("", "marT", "");
|
|
3500
3548
|
const ATTR_MAR_B = qname("", "marB", "");
|
|
3501
3549
|
const ATTR_INDENT = qname("", "indent", "");
|
|
3502
3550
|
const ATTR_ID$5 = qname("", "id", "");
|
|
3503
|
-
const ATTR_NAME$
|
|
3551
|
+
const ATTR_NAME$3 = qname("", "name", "");
|
|
3504
3552
|
const ATTR_NO_GRP$1 = qname("", "noGrp", "");
|
|
3505
3553
|
const ATTR_X$1 = qname("", "x", "");
|
|
3506
3554
|
const ATTR_Y$1 = qname("", "y", "");
|
|
@@ -3515,7 +3563,7 @@ const ATTR_LANG$1 = qname("", "lang", "");
|
|
|
3515
3563
|
const buildCellRunProps = (textColorHex) => {
|
|
3516
3564
|
const langAttr = attr(ATTR_LANG$1, "en-US");
|
|
3517
3565
|
if (textColorHex === void 0) return elem(NAME_RPR$1, { attrs: [langAttr] });
|
|
3518
|
-
const solidFill = elem(NAME_SOLID_FILL$2, { children: [elem(NAME_SRGB_CLR$2, { attrs: [attr(ATTR_VAL$
|
|
3566
|
+
const solidFill = elem(NAME_SOLID_FILL$2, { children: [elem(NAME_SRGB_CLR$2, { attrs: [attr(ATTR_VAL$4, (textColorHex.startsWith("#") ? textColorHex.slice(1) : textColorHex).toUpperCase())] })] });
|
|
3519
3567
|
return elem(NAME_RPR$1, {
|
|
3520
3568
|
attrs: [langAttr],
|
|
3521
3569
|
children: [solidFill]
|
|
@@ -3575,7 +3623,7 @@ const buildTable = (opts) => {
|
|
|
3575
3623
|
if (rowHeights.length !== rows.length) throw new Error(`addSlideTable: rowHeights has ${rowHeights.length} entries; expected ${rows.length}`);
|
|
3576
3624
|
const name = opts.name ?? `Table ${opts.id}`;
|
|
3577
3625
|
const nvGraphicFramePr = elem(NAME_NV_GRAPHIC_FRAME_PR$1, { children: [
|
|
3578
|
-
elem(NAME_C_NV_PR$1, { attrs: [attr(ATTR_ID$5, String(opts.id)), attr(ATTR_NAME$
|
|
3626
|
+
elem(NAME_C_NV_PR$1, { attrs: [attr(ATTR_ID$5, String(opts.id)), attr(ATTR_NAME$3, name)] }),
|
|
3579
3627
|
elem(NAME_C_NV_GRAPHIC_FRAME_PR$1, { children: [elem(NAME_GRAPHIC_FRAME_LOCKS, { attrs: [attr(ATTR_NO_GRP$1, "1")] })] }),
|
|
3580
3628
|
elem(NAME_NV_PR$2)
|
|
3581
3629
|
] });
|
|
@@ -3624,7 +3672,7 @@ const NAME_RPR = qname("a", "rPr", NS.dml);
|
|
|
3624
3672
|
const NAME_T$1 = qname("a", "t", NS.dml);
|
|
3625
3673
|
const NAME_SP_LOCKS = qname("a", "spLocks", NS.dml);
|
|
3626
3674
|
const ATTR_ID$4 = qname("", "id", "");
|
|
3627
|
-
const ATTR_NAME$
|
|
3675
|
+
const ATTR_NAME$2 = qname("", "name", "");
|
|
3628
3676
|
const ATTR_NO_GRP = qname("", "noGrp", "");
|
|
3629
3677
|
const ATTR_NO_ROT = qname("", "noRot", "");
|
|
3630
3678
|
const ATTR_NO_CHANGE_ASPECT = qname("", "noChangeAspect", "");
|
|
@@ -3633,14 +3681,14 @@ const ATTR_IDX$3 = qname("", "idx", "");
|
|
|
3633
3681
|
const ATTR_LANG = qname("", "lang", "");
|
|
3634
3682
|
const buildRootGroup = () => {
|
|
3635
3683
|
return elem(NAME_NV_GRP_SP_PR, { children: [
|
|
3636
|
-
elem(NAME_C_NV_PR, { attrs: [attr(ATTR_ID$4, "1"), attr(ATTR_NAME$
|
|
3684
|
+
elem(NAME_C_NV_PR, { attrs: [attr(ATTR_ID$4, "1"), attr(ATTR_NAME$2, "")] }),
|
|
3637
3685
|
elem(NAME_C_NV_GRP_SP_PR),
|
|
3638
3686
|
elem(NAME_NV_PR$1)
|
|
3639
3687
|
] });
|
|
3640
3688
|
};
|
|
3641
3689
|
const buildSldImgPlaceholder = (id) => {
|
|
3642
3690
|
return elem(NAME_SP, { children: [elem(NAME_NV_SP_PR, { children: [
|
|
3643
|
-
elem(NAME_C_NV_PR, { attrs: [attr(ATTR_ID$4, String(id)), attr(ATTR_NAME$
|
|
3691
|
+
elem(NAME_C_NV_PR, { attrs: [attr(ATTR_ID$4, String(id)), attr(ATTR_NAME$2, `Slide Image Placeholder ${id - 1}`)] }),
|
|
3644
3692
|
elem(NAME_C_NV_SP_PR, { children: [elem(NAME_SP_LOCKS, { attrs: [
|
|
3645
3693
|
attr(ATTR_NO_GRP, "1"),
|
|
3646
3694
|
attr(ATTR_NO_ROT, "1"),
|
|
@@ -3657,7 +3705,7 @@ const buildNotesParagraphs = (notes) => {
|
|
|
3657
3705
|
};
|
|
3658
3706
|
const buildNotesBodyPlaceholder = (id, notes) => {
|
|
3659
3707
|
const nvSpPr = elem(NAME_NV_SP_PR, { children: [
|
|
3660
|
-
elem(NAME_C_NV_PR, { attrs: [attr(ATTR_ID$4, String(id)), attr(ATTR_NAME$
|
|
3708
|
+
elem(NAME_C_NV_PR, { attrs: [attr(ATTR_ID$4, String(id)), attr(ATTR_NAME$2, `Notes Placeholder ${id - 1}`)] }),
|
|
3661
3709
|
elem(NAME_C_NV_SP_PR, { children: [elem(NAME_SP_LOCKS, { attrs: [attr(ATTR_NO_GRP, "1")] })] }),
|
|
3662
3710
|
elem(NAME_NV_PR$1, { children: [elem(NAME_PH, { attrs: [attr(ATTR_TYPE$1, "body"), attr(ATTR_IDX$3, "1")] })] })
|
|
3663
3711
|
] });
|
|
@@ -3838,7 +3886,7 @@ const ATTR_CONCURRENT = qname("", "concurrent", "");
|
|
|
3838
3886
|
const ATTR_NEXT_AC = qname("", "nextAc", "");
|
|
3839
3887
|
const ATTR_SPID = qname("", "spid", "");
|
|
3840
3888
|
const ATTR_EVT = qname("", "evt", "");
|
|
3841
|
-
const ATTR_VAL$
|
|
3889
|
+
const ATTR_VAL$3 = qname("", "val", "");
|
|
3842
3890
|
const ATTR_CALCMODE = qname("", "calcmode", "");
|
|
3843
3891
|
const ATTR_VALUE_TYPE = qname("", "valueType", "");
|
|
3844
3892
|
const ATTR_ADDITIVE = qname("", "additive", "");
|
|
@@ -3882,7 +3930,7 @@ const buildSetVisibility = (spid, visible) => {
|
|
|
3882
3930
|
}),
|
|
3883
3931
|
tgt,
|
|
3884
3932
|
attrName
|
|
3885
|
-
] }), elem(NAME_TO, { children: [elem(NAME_STR_VAL, { attrs: [attr(ATTR_VAL$
|
|
3933
|
+
] }), elem(NAME_TO, { children: [elem(NAME_STR_VAL, { attrs: [attr(ATTR_VAL$3, visible ? "visible" : "hidden")] })] })] });
|
|
3886
3934
|
};
|
|
3887
3935
|
const buildOpacityAnim = (spid, durationMs, fadeIn) => {
|
|
3888
3936
|
const tgt = elem(NAME_TGT_EL, { children: [elem(NAME_SP_TGT, { attrs: [attr(ATTR_SPID, String(spid))] })] });
|
|
@@ -3907,10 +3955,10 @@ const buildOpacityAnim = (spid, durationMs, fadeIn) => {
|
|
|
3907
3955
|
const toVal = fadeIn ? "1" : "0";
|
|
3908
3956
|
const tavLst = elem(NAME_TAV_LST, { children: [elem(NAME_TAV, {
|
|
3909
3957
|
attrs: [attr(ATTR_TM, "0")],
|
|
3910
|
-
children: [elem(NAME_VAL$1, { children: [elem(NAME_FLT_VAL, { attrs: [attr(ATTR_VAL$
|
|
3958
|
+
children: [elem(NAME_VAL$1, { children: [elem(NAME_FLT_VAL, { attrs: [attr(ATTR_VAL$3, fromVal)] })] })]
|
|
3911
3959
|
}), elem(NAME_TAV, {
|
|
3912
3960
|
attrs: [attr(ATTR_TM, "100000")],
|
|
3913
|
-
children: [elem(NAME_VAL$1, { children: [elem(NAME_FLT_VAL, { attrs: [attr(ATTR_VAL$
|
|
3961
|
+
children: [elem(NAME_VAL$1, { children: [elem(NAME_FLT_VAL, { attrs: [attr(ATTR_VAL$3, toVal)] })] })]
|
|
3914
3962
|
})] });
|
|
3915
3963
|
return elem(NAME_ANIM, {
|
|
3916
3964
|
attrs: [attr(ATTR_CALCMODE, "lin"), attr(ATTR_VALUE_TYPE, "num")],
|
|
@@ -3992,7 +4040,7 @@ const NAME_CM = qname("p", "cm", NS.pml);
|
|
|
3992
4040
|
const NAME_POS = qname("p", "pos", NS.pml);
|
|
3993
4041
|
const NAME_TEXT = qname("p", "text", NS.pml);
|
|
3994
4042
|
const ATTR_ID$2 = qname("", "id", "");
|
|
3995
|
-
const ATTR_NAME = qname("", "name", "");
|
|
4043
|
+
const ATTR_NAME$1 = qname("", "name", "");
|
|
3996
4044
|
const ATTR_INITIALS = qname("", "initials", "");
|
|
3997
4045
|
const ATTR_LAST_IDX = qname("", "lastIdx", "");
|
|
3998
4046
|
const ATTR_CLR_IDX = qname("", "clrIdx", "");
|
|
@@ -4006,7 +4054,7 @@ const readCommentAuthorList = (root) => {
|
|
|
4006
4054
|
const authors = [];
|
|
4007
4055
|
for (const el of allChildElements(root, NAME_CM_AUTHOR)) {
|
|
4008
4056
|
const idRaw = getAttrValue(el, ATTR_ID$2);
|
|
4009
|
-
const nameVal = getAttrValue(el, ATTR_NAME);
|
|
4057
|
+
const nameVal = getAttrValue(el, ATTR_NAME$1);
|
|
4010
4058
|
const initialsVal = getAttrValue(el, ATTR_INITIALS);
|
|
4011
4059
|
const lastIdxRaw = getAttrValue(el, ATTR_LAST_IDX);
|
|
4012
4060
|
const clrIdxRaw = getAttrValue(el, ATTR_CLR_IDX);
|
|
@@ -4066,7 +4114,7 @@ const readCommentList = (root) => {
|
|
|
4066
4114
|
const commentAuthorElement = (a) => {
|
|
4067
4115
|
return elem(NAME_CM_AUTHOR, { attrs: [
|
|
4068
4116
|
attr(ATTR_ID$2, String(a.id)),
|
|
4069
|
-
attr(ATTR_NAME, a.name),
|
|
4117
|
+
attr(ATTR_NAME$1, a.name),
|
|
4070
4118
|
attr(ATTR_INITIALS, a.initials),
|
|
4071
4119
|
attr(ATTR_LAST_IDX, String(a.lastIdx)),
|
|
4072
4120
|
attr(ATTR_CLR_IDX, String(a.clrIdx ?? 0))
|
|
@@ -4224,6 +4272,23 @@ const NAME_THEME_ELEMENTS = qname("a", "themeElements", NS.dml);
|
|
|
4224
4272
|
const NAME_CLR_SCHEME = qname("a", "clrScheme", NS.dml);
|
|
4225
4273
|
const NAME_SRGB_CLR$1 = qname("a", "srgbClr", NS.dml);
|
|
4226
4274
|
const NAME_SYS_CLR = qname("a", "sysClr", NS.dml);
|
|
4275
|
+
const ATTR_VAL$2 = qname("", "val", "");
|
|
4276
|
+
const ATTR_NAME = qname("", "name", "");
|
|
4277
|
+
const ATTR_TYPEFACE$1 = qname("", "typeface", "");
|
|
4278
|
+
const CLR_SCHEME_SLOTS = [
|
|
4279
|
+
["dark1", "dk1"],
|
|
4280
|
+
["light1", "lt1"],
|
|
4281
|
+
["dark2", "dk2"],
|
|
4282
|
+
["light2", "lt2"],
|
|
4283
|
+
["accent1", "accent1"],
|
|
4284
|
+
["accent2", "accent2"],
|
|
4285
|
+
["accent3", "accent3"],
|
|
4286
|
+
["accent4", "accent4"],
|
|
4287
|
+
["accent5", "accent5"],
|
|
4288
|
+
["accent6", "accent6"],
|
|
4289
|
+
["hyperlink", "hlink"],
|
|
4290
|
+
["followedHyperlink", "folHlink"]
|
|
4291
|
+
];
|
|
4227
4292
|
const readSchemeSlot = (parent, local) => {
|
|
4228
4293
|
const slot = firstChildElement(parent, qname("a", local, NS.dml));
|
|
4229
4294
|
if (!slot) return "";
|
|
@@ -4250,6 +4315,13 @@ const readSchemeSlot = (parent, local) => {
|
|
|
4250
4315
|
*/
|
|
4251
4316
|
const getPresentationTheme = (pres) => themeFromPackage(pres[INTERNAL_PACKAGE]);
|
|
4252
4317
|
/**
|
|
4318
|
+
* Returns the package's first theme part (by part name, alphabetical),
|
|
4319
|
+
* matching the "first theme wins" v1 semantics documented on
|
|
4320
|
+
* {@link getPresentationTheme}. Shared by every theme reader/writer so
|
|
4321
|
+
* they agree on which theme a multi-master deck exposes.
|
|
4322
|
+
*/
|
|
4323
|
+
const firstThemePart = (pkg) => pkg.parts.filter((p) => p.contentType === THEME_CONTENT_TYPE).sort((a, b) => a.name.localeCompare(b.name))[0];
|
|
4324
|
+
/**
|
|
4253
4325
|
* Package-level theme reader behind {@link getPresentationTheme}. Exposed so
|
|
4254
4326
|
* helpers holding only a package handle (e.g. color baking off a `SlideData`)
|
|
4255
4327
|
* can read the theme without a `PresentationData`.
|
|
@@ -4257,7 +4329,7 @@ const getPresentationTheme = (pres) => themeFromPackage(pres[INTERNAL_PACKAGE]);
|
|
|
4257
4329
|
* @internal
|
|
4258
4330
|
*/
|
|
4259
4331
|
const themeFromPackage = (pkg) => {
|
|
4260
|
-
const themePart = pkg
|
|
4332
|
+
const themePart = firstThemePart(pkg);
|
|
4261
4333
|
if (!themePart) return null;
|
|
4262
4334
|
const root = parseXml(decode$1(themePart.data)).root;
|
|
4263
4335
|
const themeElements = firstChildElement(root, NAME_THEME_ELEMENTS);
|
|
@@ -4295,7 +4367,8 @@ const readTypeface = (parent, local) => {
|
|
|
4295
4367
|
* name); per-master font lookup will land if needed.
|
|
4296
4368
|
*/
|
|
4297
4369
|
const getPresentationFonts = (pres) => {
|
|
4298
|
-
const
|
|
4370
|
+
const pkg = pres[INTERNAL_PACKAGE];
|
|
4371
|
+
const themePart = firstThemePart(pkg);
|
|
4299
4372
|
if (!themePart) return null;
|
|
4300
4373
|
const root = parseXml(decode$1(themePart.data)).root;
|
|
4301
4374
|
const themeElements = firstChildElement(root, NAME_THEME_ELEMENTS);
|
|
@@ -4313,6 +4386,80 @@ const getPresentationFonts = (pres) => {
|
|
|
4313
4386
|
minorComplexScript: readTypeface(minorFont, "cs")
|
|
4314
4387
|
};
|
|
4315
4388
|
};
|
|
4389
|
+
/**
|
|
4390
|
+
* Overwrites the named slots of the package's first theme's color
|
|
4391
|
+
* scheme (`<a:clrScheme>`), leaving every other slot untouched. Slot
|
|
4392
|
+
* values are `#RRGGBB` (or 3-digit `#RGB`) strings; every branded
|
|
4393
|
+
* `srgbClr`/`sysClr` slot is normalized to a plain `<a:srgbClr>` on
|
|
4394
|
+
* write, since a theme slot is never a scheme-color reference.
|
|
4395
|
+
*
|
|
4396
|
+
* As with `getPresentationTheme`, multi-master decks are branded via
|
|
4397
|
+
* their first theme part only — call this once per theme part if a
|
|
4398
|
+
* deck's masters carry different themes.
|
|
4399
|
+
*
|
|
4400
|
+
* Throws if the presentation has no theme part, or if a provided color
|
|
4401
|
+
* isn't a valid `#RRGGBB` string.
|
|
4402
|
+
*/
|
|
4403
|
+
const setPresentationTheme = (pres, theme) => {
|
|
4404
|
+
const pkg = pres[INTERNAL_PACKAGE];
|
|
4405
|
+
const themePart = firstThemePart(pkg);
|
|
4406
|
+
if (!themePart) throw new Error("setPresentationTheme: presentation has no theme part");
|
|
4407
|
+
const doc = parseXml(decode$1(themePart.data));
|
|
4408
|
+
const themeElements = firstChildElement(doc.root, NAME_THEME_ELEMENTS);
|
|
4409
|
+
if (!themeElements) throw new Error("setPresentationTheme: theme part has no <a:themeElements>");
|
|
4410
|
+
const clrScheme = firstChildElement(themeElements, NAME_CLR_SCHEME);
|
|
4411
|
+
if (!clrScheme) throw new Error("setPresentationTheme: theme part has no <a:clrScheme>");
|
|
4412
|
+
if (theme.name !== void 0) {
|
|
4413
|
+
clrScheme.attrs = clrScheme.attrs.filter((a) => a.name.localName !== "name");
|
|
4414
|
+
clrScheme.attrs.push(attr(ATTR_NAME, theme.name));
|
|
4415
|
+
}
|
|
4416
|
+
for (const [field, local] of CLR_SCHEME_SLOTS) {
|
|
4417
|
+
const value = theme[field];
|
|
4418
|
+
if (value === void 0) continue;
|
|
4419
|
+
const hex = parseSrgbHex(value);
|
|
4420
|
+
if (hex === null) throw new Error(`setPresentationTheme: "${field}" must be a #RRGGBB or #RGB color, got ${JSON.stringify(value)}`);
|
|
4421
|
+
const slotName = qname("a", local, NS.dml);
|
|
4422
|
+
const idx = clrScheme.children.findIndex((c) => c.kind === "element" && c.name.namespaceURI === NS.dml && c.name.localName === local);
|
|
4423
|
+
if (idx < 0) throw new Error(`setPresentationTheme: clrScheme is missing <a:${local}>`);
|
|
4424
|
+
clrScheme.children[idx] = elem(slotName, { children: [elem(NAME_SRGB_CLR$1, { attrs: [attr(ATTR_VAL$2, hex)] })] });
|
|
4425
|
+
}
|
|
4426
|
+
themePart.data = encode$1(serializeXml(doc));
|
|
4427
|
+
};
|
|
4428
|
+
const setTypeface = (fontCollection, local, typeface) => {
|
|
4429
|
+
const el = firstChildElement(fontCollection, qname("a", local, NS.dml));
|
|
4430
|
+
if (!el) throw new Error(`setPresentationFonts: fontScheme is missing <a:${local}>`);
|
|
4431
|
+
el.attrs = el.attrs.filter((a) => a.name.localName !== "typeface");
|
|
4432
|
+
el.attrs.push(attr(ATTR_TYPEFACE$1, typeface));
|
|
4433
|
+
};
|
|
4434
|
+
/**
|
|
4435
|
+
* Overwrites the named typefaces of the package's first theme's font
|
|
4436
|
+
* scheme (major = headings, minor = body), leaving unset fields
|
|
4437
|
+
* untouched. As with `setPresentationTheme`, only the first theme part
|
|
4438
|
+
* is branded.
|
|
4439
|
+
*
|
|
4440
|
+
* Throws if the presentation has no theme part.
|
|
4441
|
+
*/
|
|
4442
|
+
const setPresentationFonts = (pres, fonts) => {
|
|
4443
|
+
const pkg = pres[INTERNAL_PACKAGE];
|
|
4444
|
+
const themePart = firstThemePart(pkg);
|
|
4445
|
+
if (!themePart) throw new Error("setPresentationFonts: presentation has no theme part");
|
|
4446
|
+
const doc = parseXml(decode$1(themePart.data));
|
|
4447
|
+
const themeElements = firstChildElement(doc.root, NAME_THEME_ELEMENTS);
|
|
4448
|
+
if (!themeElements) throw new Error("setPresentationFonts: theme part has no <a:themeElements>");
|
|
4449
|
+
const fontScheme = firstChildElement(themeElements, qname("a", "fontScheme", NS.dml));
|
|
4450
|
+
if (!fontScheme) throw new Error("setPresentationFonts: theme part has no <a:fontScheme>");
|
|
4451
|
+
const majorFont = firstChildElement(fontScheme, qname("a", "majorFont", NS.dml));
|
|
4452
|
+
if (!majorFont) throw new Error("setPresentationFonts: fontScheme has no <a:majorFont>");
|
|
4453
|
+
const minorFont = firstChildElement(fontScheme, qname("a", "minorFont", NS.dml));
|
|
4454
|
+
if (!minorFont) throw new Error("setPresentationFonts: fontScheme has no <a:minorFont>");
|
|
4455
|
+
if (fonts.majorLatin !== void 0) setTypeface(majorFont, "latin", fonts.majorLatin);
|
|
4456
|
+
if (fonts.majorEastAsian !== void 0) setTypeface(majorFont, "ea", fonts.majorEastAsian);
|
|
4457
|
+
if (fonts.majorComplexScript !== void 0) setTypeface(majorFont, "cs", fonts.majorComplexScript);
|
|
4458
|
+
if (fonts.minorLatin !== void 0) setTypeface(minorFont, "latin", fonts.minorLatin);
|
|
4459
|
+
if (fonts.minorEastAsian !== void 0) setTypeface(minorFont, "ea", fonts.minorEastAsian);
|
|
4460
|
+
if (fonts.minorComplexScript !== void 0) setTypeface(minorFont, "cs", fonts.minorComplexScript);
|
|
4461
|
+
themePart.data = encode$1(serializeXml(doc));
|
|
4462
|
+
};
|
|
4316
4463
|
//#endregion
|
|
4317
4464
|
//#region src/api/fn/comments.ts
|
|
4318
4465
|
const COMMENT_AUTHORS_PART_NAME = partName("/ppt/commentAuthors.xml");
|
|
@@ -7926,6 +8073,7 @@ const NAME_P_BODY_STYLE = qname("p", "bodyStyle", NS.pml);
|
|
|
7926
8073
|
const NAME_P_OTHER_STYLE = qname("p", "otherStyle", NS.pml);
|
|
7927
8074
|
const mergeRPrLayer = (base, layer) => {
|
|
7928
8075
|
if (base.font === void 0 && layer.font !== void 0) base.font = layer.font;
|
|
8076
|
+
if (base.fontEastAsian === void 0 && layer.fontEastAsian !== void 0) base.fontEastAsian = layer.fontEastAsian;
|
|
7929
8077
|
if (base.size === void 0 && layer.size !== void 0) base.size = layer.size;
|
|
7930
8078
|
if (base.color === void 0 && layer.color !== void 0) base.color = layer.color;
|
|
7931
8079
|
if (base.bold === void 0 && layer.bold !== void 0) base.bold = layer.bold;
|
|
@@ -8081,6 +8229,14 @@ const getShapeRunFormatEffective = (pres, shape, paragraphIndex, runIndex) => {
|
|
|
8081
8229
|
const fallback = phType === "title" || phType === "ctrTitle" ? fonts.majorLatin : fonts.minorLatin;
|
|
8082
8230
|
if (fallback) result.font = fallback;
|
|
8083
8231
|
}
|
|
8232
|
+
if (typeof result.fontEastAsian === "string" && result.fontEastAsian.startsWith("+")) {
|
|
8233
|
+
const resolved = resolveThemeToken(result.fontEastAsian);
|
|
8234
|
+
if (resolved) result.fontEastAsian = resolved;
|
|
8235
|
+
}
|
|
8236
|
+
if (result.fontEastAsian === void 0) {
|
|
8237
|
+
const fallback = phType === "title" || phType === "ctrTitle" ? fonts.majorEastAsian : fonts.minorEastAsian;
|
|
8238
|
+
if (fallback) result.fontEastAsian = fallback;
|
|
8239
|
+
}
|
|
8084
8240
|
}
|
|
8085
8241
|
return result;
|
|
8086
8242
|
};
|
|
@@ -12628,6 +12784,11 @@ const parseRPrLikeElement = (rPr, ctx) => {
|
|
|
12628
12784
|
const t = getAttrValue(latin, qname("", "typeface", ""));
|
|
12629
12785
|
if (t !== null) out.font = t;
|
|
12630
12786
|
}
|
|
12787
|
+
const ea = firstChildElement(rPr, qname("a", "ea", NS.dml));
|
|
12788
|
+
if (ea !== null) {
|
|
12789
|
+
const t = getAttrValue(ea, qname("", "typeface", ""));
|
|
12790
|
+
if (t !== null) out.fontEastAsian = t;
|
|
12791
|
+
}
|
|
12631
12792
|
return out;
|
|
12632
12793
|
};
|
|
12633
12794
|
/**
|
|
@@ -16521,9 +16682,120 @@ const mergePresentations = (targetPres, sourcePres, targetLayout) => {
|
|
|
16521
16682
|
return out;
|
|
16522
16683
|
};
|
|
16523
16684
|
//#endregion
|
|
16685
|
+
//#region src/api/fn/shape-grouping.ts
|
|
16686
|
+
/**
|
|
16687
|
+
* Groups two or more top-level shapes into a single `<p:grpSp>`,
|
|
16688
|
+
* returning the new group as a `SlideShapeData`. The group's
|
|
16689
|
+
* slide-space bounds are the union of its members' bounds; the members
|
|
16690
|
+
* keep their own relative position/size (nothing is rescaled). The
|
|
16691
|
+
* target slide is taken from the first shape — every shape must belong
|
|
16692
|
+
* to the same slide.
|
|
16693
|
+
*
|
|
16694
|
+
* Every shape must:
|
|
16695
|
+
* - belong to the same slide as the others,
|
|
16696
|
+
* - be a direct child of the slide's shape tree (not already nested
|
|
16697
|
+
* inside another group — ungroup first, then re-group),
|
|
16698
|
+
* - have an explicit `<a:xfrm>` (placeholders that inherit position
|
|
16699
|
+
* from the layout have none and can't be grouped),
|
|
16700
|
+
* - appear at most once in `shapes` (grouping the same shape twice
|
|
16701
|
+
* would duplicate its id).
|
|
16702
|
+
*
|
|
16703
|
+
* The group replaces its members at the position of the earliest one in
|
|
16704
|
+
* z-order, so grouping doesn't change how the selection stacks against
|
|
16705
|
+
* shapes that weren't part of it.
|
|
16706
|
+
*/
|
|
16707
|
+
const groupShapes = (shapes, opts = {}) => {
|
|
16708
|
+
if (shapes.length < 2) throw new Error("groupShapes: at least 2 shapes are required");
|
|
16709
|
+
const slide = shapes[0][SHAPE_SLIDE];
|
|
16710
|
+
const spTree = requireSpTree(slide);
|
|
16711
|
+
const elements = [];
|
|
16712
|
+
const seen = /* @__PURE__ */ new Set();
|
|
16713
|
+
let minX = Number.POSITIVE_INFINITY;
|
|
16714
|
+
let minY = Number.POSITIVE_INFINITY;
|
|
16715
|
+
let maxX = Number.NEGATIVE_INFINITY;
|
|
16716
|
+
let maxY = Number.NEGATIVE_INFINITY;
|
|
16717
|
+
for (const shape of shapes) {
|
|
16718
|
+
if (shape[SHAPE_SLIDE] !== slide) throw new Error("groupShapes: all shapes must belong to the same slide");
|
|
16719
|
+
const el = shape[SHAPE_ELEMENT];
|
|
16720
|
+
if (seen.has(el)) throw new Error(`groupShapes: shape "${shape[SHAPE_SNAPSHOT].name}" was passed twice`);
|
|
16721
|
+
seen.add(el);
|
|
16722
|
+
if (!spTree.children.includes(el)) throw new Error(`groupShapes: shape "${shape[SHAPE_SNAPSHOT].name}" is not a direct child of the slide (it may already be inside a group)`);
|
|
16723
|
+
const kind = shape[SHAPE_SNAPSHOT].kind;
|
|
16724
|
+
const pos = readPosition(el, kind);
|
|
16725
|
+
const size = readSize(el, kind);
|
|
16726
|
+
if (pos === null || size === null) throw new Error(`groupShapes: shape "${shape[SHAPE_SNAPSHOT].name}" has no explicit position/size (placeholders that inherit geometry from the layout can't be grouped)`);
|
|
16727
|
+
elements.push(el);
|
|
16728
|
+
minX = Math.min(minX, pos.x);
|
|
16729
|
+
minY = Math.min(minY, pos.y);
|
|
16730
|
+
maxX = Math.max(maxX, pos.x + size.w);
|
|
16731
|
+
maxY = Math.max(maxY, pos.y + size.h);
|
|
16732
|
+
}
|
|
16733
|
+
const grp = buildGroup({
|
|
16734
|
+
id: nextShapeId(slide),
|
|
16735
|
+
...opts.name !== void 0 ? { name: opts.name } : {},
|
|
16736
|
+
x: minX,
|
|
16737
|
+
y: minY,
|
|
16738
|
+
w: maxX - minX,
|
|
16739
|
+
h: maxY - minY,
|
|
16740
|
+
children: elements
|
|
16741
|
+
});
|
|
16742
|
+
const insertAt = Math.min(...elements.map((el) => spTree.children.indexOf(el)));
|
|
16743
|
+
spTree.children = spTree.children.filter((c) => c.kind !== "element" || !seen.has(c));
|
|
16744
|
+
spTree.children.splice(insertAt, 0, grp);
|
|
16745
|
+
commitSlideData(slide);
|
|
16746
|
+
rebuildShapesFromDocument(slide);
|
|
16747
|
+
const created = slide[SLIDE_SHAPES].find((s) => s[SHAPE_ELEMENT] === grp);
|
|
16748
|
+
if (!created) throw new Error("groupShapes: post-condition failed");
|
|
16749
|
+
return created;
|
|
16750
|
+
};
|
|
16751
|
+
/**
|
|
16752
|
+
* Reverses `groupShapes`: removes the `<p:grpSp>` and re-inserts its
|
|
16753
|
+
* immediate children as top-level shapes at the group's former position,
|
|
16754
|
+
* rescaling each child's own transform so it keeps its on-slide position
|
|
16755
|
+
* and size (matters when the group was moved/resized after creation, so
|
|
16756
|
+
* its `off`/`ext` diverged from its `chOff`/`chExt`). Returns the
|
|
16757
|
+
* children as fresh `SlideShapeData` handles, in their original order.
|
|
16758
|
+
*
|
|
16759
|
+
* Throws if `group` isn't a group shape, or its `<p:grpSpPr>` carries no
|
|
16760
|
+
* `<a:xfrm>` (malformed — every authored group has one).
|
|
16761
|
+
*/
|
|
16762
|
+
const ungroupShapes = (group) => {
|
|
16763
|
+
if (group[SHAPE_SNAPSHOT].kind !== "group") throw new Error("ungroupShapes: shape is not a group");
|
|
16764
|
+
const transform = getGroupTransform(group);
|
|
16765
|
+
if (!transform) throw new Error("ungroupShapes: group has no <a:xfrm> on <p:grpSpPr>");
|
|
16766
|
+
const { outer, inner } = transform;
|
|
16767
|
+
const scaleX = inner.w === 0 ? 1 : outer.w / inner.w;
|
|
16768
|
+
const scaleY = inner.h === 0 ? 1 : outer.h / inner.h;
|
|
16769
|
+
const slide = group[SHAPE_SLIDE];
|
|
16770
|
+
const spTree = requireSpTree(slide);
|
|
16771
|
+
const groupEl = group[SHAPE_ELEMENT];
|
|
16772
|
+
const idx = spTree.children.indexOf(groupEl);
|
|
16773
|
+
if (idx < 0) throw new Error("ungroupShapes: group is not attached to the slide");
|
|
16774
|
+
const childElements = readGroupChildren(groupEl).map((child) => {
|
|
16775
|
+
const pos = readPosition(child.element, child.kind);
|
|
16776
|
+
const size = readSize(child.element, child.kind);
|
|
16777
|
+
if (pos !== null && size !== null) {
|
|
16778
|
+
const newX = Math.round(outer.x + (pos.x - inner.x) * scaleX);
|
|
16779
|
+
const newY = Math.round(outer.y + (pos.y - inner.y) * scaleY);
|
|
16780
|
+
setPosition(child.element, child.kind, newX, newY);
|
|
16781
|
+
setSize(child.element, child.kind, Math.round(size.w * scaleX), Math.round(size.h * scaleY));
|
|
16782
|
+
}
|
|
16783
|
+
return child.element;
|
|
16784
|
+
});
|
|
16785
|
+
spTree.children.splice(idx, 1, ...childElements);
|
|
16786
|
+
commitSlideData(slide);
|
|
16787
|
+
rebuildShapesFromDocument(slide);
|
|
16788
|
+
const byElement = new Map(slide[SLIDE_SHAPES].map((s) => [s[SHAPE_ELEMENT], s]));
|
|
16789
|
+
return childElements.map((el) => {
|
|
16790
|
+
const found = byElement.get(el);
|
|
16791
|
+
if (!found) throw new Error("ungroupShapes: post-condition failed");
|
|
16792
|
+
return found;
|
|
16793
|
+
});
|
|
16794
|
+
};
|
|
16795
|
+
//#endregion
|
|
16524
16796
|
//#region src/api/index.ts
|
|
16525
|
-
const VERSION = "0.
|
|
16797
|
+
const VERSION = "0.10.0";
|
|
16526
16798
|
//#endregion
|
|
16527
|
-
export { addSlideLine as $, getTableDimensions as $a, getAllNotes as $i, getUnusedSlideMasters as $n, findChartsBySeriesName as $o, setParagraphLineSpacing as $r, getPresentationCommenters as $s, getShapeStrokeWidth as $t, getShapeAt as A, getPresentationSummary as Aa, hasShapeImage as Ai, getMaxShapeIdInPresentation as An, incrementRevision as Ao, setShapeStrokeJoin as Ar, setSlideBackground as As, setShapeTextFormat as At, getSlideXmlString as B, getTableCell as Ba, getSlideSize as Bi, getShapeKind as Bn, getSlideLayoutPlaceholders as Bo, getParagraphSpacing as Br, findCommentsBefore as Bs, getShapeGradientFill as Bt, findSlidesByText as C, getSlideTransition as Ca, getShapeImageCrop as Ci, translateShapes as Cn, getThumbnail as Co, setShapeRotation as Cr, getSlideLayoutBackgroundShapes as Cs, setShapeBullets as Ct, getPresentationText as D, getMediaParts as Da, getShapeImageLinkUrl as Di, getGroupChildren as Dn, getExtendedProperties as Do, setShapeStrokeCap as Dr, getSlideMasterBackgroundImageBytes as Ds, setShapeTextBodyRotationDeg as Dt, getPresentationShapeCountsBySlide as E, compactPackage as Ea, getShapeImageFormat as Ei, findShapesInRect as En, getCoreProperties as Eo, setShapeStrokeArrow as Er, getSlideMasterBackgroundGradientFill as Es, setShapeTextAutoFit as Et, getSlideLayoutCount as F, slidesUsingMediaPart as Fa, setShapeImageCrop as Fi, getShapeCenter as Fn, findSlideLayout as Fo, getParagraphBulletImageBytes as Fr, addSlideComment as Fs, getShapeEffect as Ft, replaceTextInPresentation as G, getTableCellMargins as Ga, clearSlideHyperlinks as Gi, getShapePreset as Gn, getUnusedSlideLayouts as Go, getShapeRunCount as Gr, getCommentAuthors as Gs, getShapeFillEffective as Gt, getSlidesByLayout as H, getTableCellAnchor as Ha, appendSlideNotes as Hi, getShapePlaceholderIdx as Hn, getSlideLayoutUsageCounts as Ho, getShapeParagraphCount as Hr, findCommentsByText as Hs, getShapeFill as Ht, getSlideOutline as I, validatePresentation as Ia, setShapeImageOpacity as Ii, getShapeCustomGeometry as In, findSlideLayoutByPartName as Io, getParagraphBulletStyle as Ir, clearAllSlideComments as Is, getShapeEffects as It, replaceTokensInPresentation as J, getTableCellSpan as Ja, findSlidesWithChartTrendlines as Ji, getShapeText as Jn, getShapeRunFormatEffective as Jo, getShapeRunText as Jr, getCommentSlide as Js, getShapeStrokeColor as Jt, replaceTextInSlide as K, getTableCellParagraphs as Ka, findSlidesByHyperlink as Ki, getShapeRotation as Kn, getParagraphPropertiesEffective as Ko, getShapeRunHyperlink as Kr, getCommentDate as Ks, getShapeStroke as Kt, getSlidePartName as L, clearTableCellFill as La, SLIDE_SIZE_16_10 as Li, getShapeDescription as Ln, findSlideLayoutByType as Lo, getParagraphIndent as Lr, clearSlideComments as Ls, getShapeEffectsEffective as Lt, getSlideCount as M, listPackageParts as Ma, isShapeImageGrayscale as Mi, getShapeAltTitle as Mn, setExtendedProperties as Mo, resolveDrawingColor as Mr, getShapeClickAction as Ms, setShapeTextWrap as Mt, getSlideIndex as N, readPackagePart as Na, setShapeImageBrightness as Ni, getShapeBounds as Nn, touchModified as No, getParagraphAlignment as Nr, setShapeClickAction as Ns, clearShapeEffects as Nt, getPresentationTextLength as O, getOrphanMediaPartNames as Oa, getShapeImageOpacity as Oi, getGroupTransform as On, getPresentationCreated as Oo, setShapeStrokeCompound as Or, getSlideMasterBackgroundPatternFill as Os, setShapeTextColumns as Ot, getSlideInfo as P, setMediaPartBytes as Pa, setShapeImageContrast as Pi, getShapeBoundsResolved as Pn, findLayoutsWithPlaceholderType as Po, getParagraphBullet as Pr, setShapeImage as Ps, findShapesByEffect as Pt, addSlideImage as Q, getTableColumnWidths as Qa, getAllImages as Qi, getSlideMasterUsageCounts as Qn, findChartByKind as Qo, setParagraphLevel as Qr, getPresentationCommentCountsBySlide as Qs, getShapeStrokeJoin as Qt, getSlideText as R, getPresentationTableCountsBySlide as Ra, SLIDE_SIZE_16_9 as Ri, getShapeFlip as Rn, getSlideLayoutName as Ro, getParagraphLevel as Rr, findCommentAuthorByName as Rs, setShapeGlow as Rt, findSlidesByNotes as S, clearSlideTransition as Sa, getShapeImageContrast as Si, setSlideLayout as Sn, setTableStyleId as So, setShapePosition as Sr, getSlideLayoutBackgroundPatternFill as Ss, setShapeAlignment as St, getOutlineText as T, _internalPackageOf as Ta, getShapeImageFillBytes as Ti, findShapesAtPoint as Tn, setThumbnail as To, setShapeStroke as Tr, getSlideMasterBackground as Ts, setShapeTextAnchor as Tt, isSlideHidden as U, getTableCellBorders as Ua, clearAllHyperlinks as Ui, getShapePlaceholderType as Un, getSlideLayoutUsageCountsByType as Uo, getShapeParagraphElements as Ur, findSlidesWithCommentsByAuthor as Us, getShapeFillColor as Ut, getSlides as V, getTableCellAlignment as Va, setSlideSize as Vi, getShapeName as Vn, getSlideLayoutType as Vo, getShapeHyperlinkTooltip as Vr, findCommentsByAuthor as Vs, getShapeGradientFillEffective as Vt, replaceTextInNotes as W, getTableCellFill as Wa, clearAllSlideNotes as Wi, getShapePosition as Wn, getSlideLayouts as Wo, getShapeRunClickAction as Wr, getCommentAuthor as Ws, getShapeFillColorResolved as Wt, setSlideHidden as X, getTableCellTextDirection as Xa, getAllComments as Xi, getSlideMasterPartName as Xn, setShapeRunFormat as Xo, setParagraphAlignment as Xr, getCommentsSortedByDate as Xs, getShapeStrokeCompound as Xt, searchSlides as Y, getTableCellText as Ya, getAllCharts as Yi, getSlideMasterCount as Yn, setShapeHyperlink as Yo, isParagraphBulletPicture as Yr, getCommentText as Ys, getShapeStrokeColorResolved as Yt, slideHasAnimations as Z, getTableCells as Za, getAllHyperlinks as Zi, getSlideMasterPartNames as Zn, addSlideChart as Zo, setParagraphBullet as Zr, getPresentationCommentCountsByAuthor as Zs, getShapeStrokeEffective as Zt, getSlideSections as _, getVisibleSlides as _a, findSlidesByLayoutType as _i, getShapesBounds as _n, setTableCellTextDirection as _o, setShapeGradientFill as _r, getSlideBackgroundPatternFill as _s, getShapeTextBodyRotationDeg as _t, addSlide as a, getPresentationNotesLength as aa, createPresentation as ac, setSlideBody as ai, findShapesByHyperlink as an, insertTableRow as ao, setShapeAltTitle as ar, getShapeChartKind as as, clearSlideShapes as at, findSlideByText as b, replaceHyperlink as ba, getShapeImageBrightness as bi, getSlidesWithEmptyPlaceholders as bn, setTableRowHeight as bo, setShapeNoStroke as br, getSlideLayoutBackgroundGradientFill as bs, getShapeTextMargins as bt, duplicateSlide as c, getSlideNotes as ca, cm as cc, clearSlideAnimations as ci, findShapesByPreset as cn, mergeTableCells as co, setShapeHidden as cr, getShapeChartSpec as cs, removeShape as ct, mergePresentations as d, getSlidesWithComments as da, mm as dc, setShapeAnimation as di, findSlidePlaceholder as dn, setTableCellAlignment as do, clearShapeStroke as dr, getEffectiveColorMap as ds, setShapeZIndex as dt, getAllTables as ea, getSlideCommentAuthors as ec, setParagraphSpacing as ei, findEmptyPlaceholders as en, getTableRowHeights as eo, isShapeHidden as er, findChartsWithDataLabels as es, addSlideShape as et, moveSlide as f, getSlidesWithHyperlinks as fa, pt as fc, findFlippedShapes as fi, findSlidePlaceholderByIdx as fn, setTableCellAnchor as fo, getShapePatternFill as fr, resolveDeckBodyTextColor as fs, appendShapeText as ft, swapSlides as g, getSlidesWithTables as ga, findSlidesByLayoutPartName as gi, getShapeXmlString as gn, setTableCellText as go, setShapeFlip as gr, getSlideBackgroundImageBytes as gs, getShapeTextAutoFitParams as gt, sortSlides as h, getSlidesWithOverlap as ha, findSlidesByLayoutName as hi, getShapeSlide as hn, setTableCellMargins as ho, setShapeFill as hr, getSlideBackgroundGradientFill as hs, getShapeTextAutoFit as ht, addSectionHeaderSlide as i, getPresentationHyperlinkCountsBySlide as ia, getPresentationTheme as ic, getSlideTitle as ii, findShapeInPresentation as in, insertTableColumn as io, renameShape as ir, getShapeChartCategories as is, bringShapeToFront as it, getSlideAt as j, getSlideMediaPartNames as ja, hasShapeText as ji, getShapeAdjustValues as jn, setCoreProperties as jo, getShapeRunFormat as jr, setSlideBackgroundImage as js, setShapeTextMargins as jt, getPresentationTextLengthsBySlide as k, getPackageSize as ka, getShapeImagePartName as ki, getMaxShapeId as kn, getPresentationModified as ko, setShapeStrokeDash as kr, getSlideMasterShapes as ks, setShapeTextDirection as kt, duplicateSlideAt as l, getSlideNotesLength as la, emu as lc, findShapesWithAnimation as li, findShapesByText as ln, removeTableColumn as lo, shapesOverlap as lr, getSlideCharts as ls, sendShapeBackward as lt, reverseSlides as m, getSlidesWithNotes as ma, findShapesOutsideCanvas as mi, getShapeIndex as mn, setTableCellFill as mo, getShapeStrokeDash as mr, getSlideBackground as ms, getShapeTextAnchor as mt, addBlankSlide as n, getEmptySlides as na, removeSlideComment as nc, setShapeRunText as ni, findShapeByName as nn, getTableStyleFlags as no, isShapeTextBox as nr, getPresentationChartCountsBySlide as ns, addSlideTextBox as nt, addSlideAt as o, getPresentationNotesLengthsBySlide as oa, loadPresentation as oc, setSlidePlaceholders as oi, findShapesByKind as on, isChartShape as oo, setShapeBounds as or, getShapeChartSeriesNames as os, copyShape as ot, removeSlide as p, getSlidesWithImages as pa, findOverlappingShapePairs as pi, findSlidePlaceholders as pn, setTableCellBorders as po, getShapeStrokeArrow as pr, clearSlideBackground as ps, getShapeBodyPrEffective as pt, replaceTextInSlideNotes as q, getTableCellPosition as qa, findSlidesWithChartKind as qi, getShapeSize as qn, getShapeHyperlink as qo, getShapeRunHyperlinkTooltip as qr, getCommentPosition as qs, getShapeStrokeCap as qt, addContentSlide as r, getHiddenSlides as ra, getPresentationFonts as rc, getSlideBody as ri, findShapeByText as rn, getTableStyleId as ro, pointInShape as rr, getPresentationChartKindCounts as rs, bringShapeForward as rt, addTitleSlide as s, getPresentationNotesText as sa, savePresentation as sc, setSlideTitle as si, findShapesByName as sn, isTableShape as so, setShapeDescription as sr, getShapeChartSeriesValues as ss, getShapeZIndex as st, VERSION as t, getDistinctHyperlinkUrls as ta, getSlideComments as tc, setShapeRunHyperlink as ti, findShapeById as tn, getTableSize as to, isShapePlaceholder as tr, findChartsWithTrendlines as ts, addSlideTable as tt, importSlide as u, getSlidesWithCharts as ua, inches as uc, getShapeAnimation as ui, findShapesWithHyperlinks as un, removeTableRow as uo, clearShapeFill as ur, setChartSpec as us, sendShapeToBack as ut, setSlideSections as v, hasSlideNotes as va, getPresentationImageCountsBySlide as vi, getSlideLayout as vn, setTableCellTextFormat as vo, setShapeImageFill as vr, getSlideColorMapOverride as vs, getShapeTextColumns as vt, getAllShapes as w, setSlideTransition as wa, getShapeImageDuotone as wi, centerShapeOnSlide as wn, removeThumbnail as wo, setShapeSize as wr, getSlideLayoutShapes as ws, setShapeText as wt, findSlideByTitle as x, setSlideNotes as xa, getShapeImageBytes as xi, replaceTokensInSlide as xn, setTableStyleFlags as xo, setShapePatternFill as xr, getSlideLayoutBackgroundImageBytes as xs, getShapeTextWrap as xt, findSlideByPartName as y, removeSlideNotes as ya, getShapeImageBiLevelThreshold as yi, getSlideShapes as yn, setTableColumnWidth as yo, setShapeNoFill as yr, getSlideLayoutBackground as ys, getShapeTextDirection as yt, getSlideTextLength as z, getSlideTables as za, SLIDE_SIZE_4_3 as zi, getShapeId as zn, getSlideLayoutPartName as zo, getParagraphLineSpacing as zr, findCommentsAfter as zs, setShapeShadow as zt };
|
|
16799
|
+
export { slideHasAnimations as $, getTableCells as $a, getAllHyperlinks as $i, getSlideMasterPartNames as $n, addSlideChart as $o, setParagraphBullet as $r, getPresentationCommentCountsByAuthor as $s, getShapeStrokeEffective as $t, getPresentationTextLength as A, getOrphanMediaPartNames as Aa, getShapeImageOpacity as Ai, getGroupTransform as An, getPresentationCreated as Ao, setShapeStrokeCompound as Ar, getSlideMasterBackgroundPatternFill as As, setShapeTextColumns as At, getSlideText as B, getPresentationTableCountsBySlide as Ba, SLIDE_SIZE_16_9 as Bi, getShapeFlip as Bn, getSlideLayoutName as Bo, getParagraphLevel as Br, findCommentAuthorByName as Bs, setShapeGlow as Bt, findSlideByTitle as C, setSlideNotes as Ca, getShapeImageBytes as Ci, replaceTokensInSlide as Cn, setTableStyleFlags as Co, setShapePatternFill as Cr, getSlideLayoutBackgroundImageBytes as Cs, getShapeTextWrap as Ct, getOutlineText as D, _internalPackageOf as Da, getShapeImageFillBytes as Di, findShapesAtPoint as Dn, setThumbnail as Do, setShapeStroke as Dr, getSlideMasterBackground as Ds, setShapeTextAnchor as Dt, getAllShapes as E, setSlideTransition as Ea, getShapeImageDuotone as Ei, centerShapeOnSlide as En, removeThumbnail as Eo, setShapeSize as Er, getSlideLayoutShapes as Es, setShapeText as Et, getSlideIndex as F, readPackagePart as Fa, setShapeImageBrightness as Fi, getShapeBounds as Fn, touchModified as Fo, getParagraphAlignment as Fr, setShapeClickAction as Fs, clearShapeEffects as Ft, isSlideHidden as G, getTableCellBorders as Ga, clearAllHyperlinks as Gi, getShapePlaceholderType as Gn, getSlideLayoutUsageCountsByType as Go, getShapeParagraphElements as Gr, findSlidesWithCommentsByAuthor as Gs, getShapeFillColor as Gt, getSlideXmlString as H, getTableCell as Ha, getSlideSize as Hi, getShapeKind as Hn, getSlideLayoutPlaceholders as Ho, getParagraphSpacing as Hr, findCommentsBefore as Hs, getShapeGradientFill as Ht, getSlideInfo as I, setMediaPartBytes as Ia, setShapeImageContrast as Ii, getShapeBoundsResolved as In, findLayoutsWithPlaceholderType as Io, getParagraphBullet as Ir, setShapeImage as Is, findShapesByEffect as It, replaceTextInSlide as J, getTableCellParagraphs as Ja, findSlidesByHyperlink as Ji, getShapeRotation as Jn, getParagraphPropertiesEffective as Jo, getShapeRunHyperlink as Jr, getCommentDate as Js, getShapeStroke as Jt, replaceTextInNotes as K, getTableCellFill as Ka, clearAllSlideNotes as Ki, getShapePosition as Kn, getSlideLayouts as Ko, getShapeRunClickAction as Kr, getCommentAuthor as Ks, getShapeFillColorResolved as Kt, getSlideLayoutCount as L, slidesUsingMediaPart as La, setShapeImageCrop as Li, getShapeCenter as Ln, findSlideLayout as Lo, getParagraphBulletImageBytes as Lr, addSlideComment as Ls, getShapeEffect as Lt, getShapeAt as M, getPresentationSummary as Ma, hasShapeImage as Mi, getMaxShapeIdInPresentation as Mn, incrementRevision as Mo, setShapeStrokeJoin as Mr, setSlideBackground as Ms, setShapeTextFormat as Mt, getSlideAt as N, getSlideMediaPartNames as Na, hasShapeText as Ni, getShapeAdjustValues as Nn, setCoreProperties as No, getShapeRunFormat as Nr, setSlideBackgroundImage as Ns, setShapeTextMargins as Nt, getPresentationShapeCountsBySlide as O, compactPackage as Oa, getShapeImageFormat as Oi, findShapesInRect as On, getCoreProperties as Oo, setShapeStrokeArrow as Or, getSlideMasterBackgroundGradientFill as Os, setShapeTextAutoFit as Ot, getSlideCount as P, listPackageParts as Pa, isShapeImageGrayscale as Pi, getShapeAltTitle as Pn, setExtendedProperties as Po, resolveDrawingColor as Pr, getShapeClickAction as Ps, setShapeTextWrap as Pt, setSlideHidden as Q, getTableCellTextDirection as Qa, getAllComments as Qi, getSlideMasterPartName as Qn, setShapeRunFormat as Qo, setParagraphAlignment as Qr, getCommentsSortedByDate as Qs, getShapeStrokeCompound as Qt, getSlideOutline as R, validatePresentation as Ra, setShapeImageOpacity as Ri, getShapeCustomGeometry as Rn, findSlideLayoutByPartName as Ro, getParagraphBulletStyle as Rr, clearAllSlideComments as Rs, getShapeEffects as Rt, findSlideByText as S, replaceHyperlink as Sa, getShapeImageBrightness as Si, getSlidesWithEmptyPlaceholders as Sn, setTableRowHeight as So, setShapeNoStroke as Sr, getSlideLayoutBackgroundGradientFill as Ss, getShapeTextMargins as St, findSlidesByText as T, getSlideTransition as Ta, getShapeImageCrop as Ti, translateShapes as Tn, getThumbnail as To, setShapeRotation as Tr, getSlideLayoutBackgroundShapes as Ts, setShapeBullets as Tt, getSlides as U, getTableCellAlignment as Ua, setSlideSize as Ui, getShapeName as Un, getSlideLayoutType as Uo, getShapeHyperlinkTooltip as Ur, findCommentsByAuthor as Us, getShapeGradientFillEffective as Ut, getSlideTextLength as V, getSlideTables as Va, SLIDE_SIZE_4_3 as Vi, getShapeId as Vn, getSlideLayoutPartName as Vo, getParagraphLineSpacing as Vr, findCommentsAfter as Vs, setShapeShadow as Vt, getSlidesByLayout as W, getTableCellAnchor as Wa, appendSlideNotes as Wi, getShapePlaceholderIdx as Wn, getSlideLayoutUsageCounts as Wo, getShapeParagraphCount as Wr, findCommentsByText as Ws, getShapeFill as Wt, replaceTokensInPresentation as X, getTableCellSpan as Xa, findSlidesWithChartTrendlines as Xi, getShapeText as Xn, getShapeRunFormatEffective as Xo, getShapeRunText as Xr, getCommentSlide as Xs, getShapeStrokeColor as Xt, replaceTextInSlideNotes as Y, getTableCellPosition as Ya, findSlidesWithChartKind as Yi, getShapeSize as Yn, getShapeHyperlink as Yo, getShapeRunHyperlinkTooltip as Yr, getCommentPosition as Ys, getShapeStrokeCap as Yt, searchSlides as Z, getTableCellText as Za, getAllCharts as Zi, getSlideMasterCount as Zn, setShapeHyperlink as Zo, isParagraphBulletPicture as Zr, getCommentText as Zs, getShapeStrokeColorResolved as Zt, sortSlides as _, getSlidesWithOverlap as _a, findSlidesByLayoutName as _i, getShapeSlide as _n, setTableCellMargins as _o, setShapeFill as _r, getSlideBackgroundGradientFill as _s, getShapeTextAutoFit as _t, addContentSlide as a, getHiddenSlides as aa, getPresentationFonts as ac, getSlideBody as ai, findShapeByText as an, getTableStyleId as ao, pointInShape as ar, getPresentationChartKindCounts as as, bringShapeForward as at, setSlideSections as b, hasSlideNotes as ba, getPresentationImageCountsBySlide as bi, getSlideLayout as bn, setTableCellTextFormat as bo, setShapeImageFill as br, getSlideColorMapOverride as bs, getShapeTextColumns as bt, addSlideAt as c, getPresentationNotesLengthsBySlide as ca, setPresentationTheme as cc, setSlidePlaceholders as ci, findShapesByKind as cn, isChartShape as co, setShapeBounds as cr, getShapeChartSeriesNames as cs, copyShape as ct, duplicateSlideAt as d, getSlideNotesLength as da, savePresentation as dc, findShapesWithAnimation as di, findShapesByText as dn, removeTableColumn as do, shapesOverlap as dr, getSlideCharts as ds, sendShapeBackward as dt, getAllImages as ea, getPresentationCommentCountsBySlide as ec, setParagraphLevel as ei, getShapeStrokeJoin as en, getTableColumnWidths as eo, getSlideMasterUsageCounts as er, findChartByKind as es, addSlideImage as et, importSlide as f, getSlidesWithCharts as fa, cm as fc, getShapeAnimation as fi, findShapesWithHyperlinks as fn, removeTableRow as fo, clearShapeFill as fr, setChartSpec as fs, sendShapeToBack as ft, reverseSlides as g, getSlidesWithNotes as ga, pt as gc, findShapesOutsideCanvas as gi, getShapeIndex as gn, setTableCellFill as go, getShapeStrokeDash as gr, getSlideBackground as gs, getShapeTextAnchor as gt, removeSlide as h, getSlidesWithImages as ha, mm as hc, findOverlappingShapePairs as hi, findSlidePlaceholders as hn, setTableCellBorders as ho, getShapeStrokeArrow as hr, clearSlideBackground as hs, getShapeBodyPrEffective as ht, addBlankSlide as i, getEmptySlides as ia, removeSlideComment as ic, setShapeRunText as ii, findShapeByName as in, getTableStyleFlags as io, isShapeTextBox as ir, getPresentationChartCountsBySlide as is, addSlideTextBox as it, getPresentationTextLengthsBySlide as j, getPackageSize as ja, getShapeImagePartName as ji, getMaxShapeId as jn, getPresentationModified as jo, setShapeStrokeDash as jr, getSlideMasterShapes as js, setShapeTextDirection as jt, getPresentationText as k, getMediaParts as ka, getShapeImageLinkUrl as ki, getGroupChildren as kn, getExtendedProperties as ko, setShapeStrokeCap as kr, getSlideMasterBackgroundImageBytes as ks, setShapeTextBodyRotationDeg as kt, addTitleSlide as l, getPresentationNotesText as la, createPresentation as lc, setSlideTitle as li, findShapesByName as ln, isTableShape as lo, setShapeDescription as lr, getShapeChartSeriesValues as ls, getShapeZIndex as lt, moveSlide as m, getSlidesWithHyperlinks as ma, inches as mc, findFlippedShapes as mi, findSlidePlaceholderByIdx as mn, setTableCellAnchor as mo, getShapePatternFill as mr, resolveDeckBodyTextColor as ms, appendShapeText as mt, groupShapes as n, getAllTables as na, getSlideCommentAuthors as nc, setParagraphSpacing as ni, findEmptyPlaceholders as nn, getTableRowHeights as no, isShapeHidden as nr, findChartsWithDataLabels as ns, addSlideShape as nt, addSectionHeaderSlide as o, getPresentationHyperlinkCountsBySlide as oa, getPresentationTheme as oc, getSlideTitle as oi, findShapeInPresentation as on, insertTableColumn as oo, renameShape as or, getShapeChartCategories as os, bringShapeToFront as ot, mergePresentations as p, getSlidesWithComments as pa, emu as pc, setShapeAnimation as pi, findSlidePlaceholder as pn, setTableCellAlignment as po, clearShapeStroke as pr, getEffectiveColorMap as ps, setShapeZIndex as pt, replaceTextInPresentation as q, getTableCellMargins as qa, clearSlideHyperlinks as qi, getShapePreset as qn, getUnusedSlideLayouts as qo, getShapeRunCount as qr, getCommentAuthors as qs, getShapeFillEffective as qt, ungroupShapes as r, getDistinctHyperlinkUrls as ra, getSlideComments as rc, setShapeRunHyperlink as ri, findShapeById as rn, getTableSize as ro, isShapePlaceholder as rr, findChartsWithTrendlines as rs, addSlideTable as rt, addSlide as s, getPresentationNotesLength as sa, setPresentationFonts as sc, setSlideBody as si, findShapesByHyperlink as sn, insertTableRow as so, setShapeAltTitle as sr, getShapeChartKind as ss, clearSlideShapes as st, VERSION as t, getAllNotes as ta, getPresentationCommenters as tc, setParagraphLineSpacing as ti, getShapeStrokeWidth as tn, getTableDimensions as to, getUnusedSlideMasters as tr, findChartsBySeriesName as ts, addSlideLine as tt, duplicateSlide as u, getSlideNotes as ua, loadPresentation as uc, clearSlideAnimations as ui, findShapesByPreset as un, mergeTableCells as uo, setShapeHidden as ur, getShapeChartSpec as us, removeShape as ut, swapSlides as v, getSlidesWithTables as va, findSlidesByLayoutPartName as vi, getShapeXmlString as vn, setTableCellText as vo, setShapeFlip as vr, getSlideBackgroundImageBytes as vs, getShapeTextAutoFitParams as vt, findSlidesByNotes as w, clearSlideTransition as wa, getShapeImageContrast as wi, setSlideLayout as wn, setTableStyleId as wo, setShapePosition as wr, getSlideLayoutBackgroundPatternFill as ws, setShapeAlignment as wt, findSlideByPartName as x, removeSlideNotes as xa, getShapeImageBiLevelThreshold as xi, getSlideShapes as xn, setTableColumnWidth as xo, setShapeNoFill as xr, getSlideLayoutBackground as xs, getShapeTextDirection as xt, getSlideSections as y, getVisibleSlides as ya, findSlidesByLayoutType as yi, getShapesBounds as yn, setTableCellTextDirection as yo, setShapeGradientFill as yr, getSlideBackgroundPatternFill as ys, getShapeTextBodyRotationDeg as yt, getSlidePartName as z, clearTableCellFill as za, SLIDE_SIZE_16_10 as zi, getShapeDescription as zn, findSlideLayoutByType as zo, getParagraphIndent as zr, clearSlideComments as zs, getShapeEffectsEffective as zt };
|
|
16528
16800
|
|
|
16529
|
-
//# sourceMappingURL=api-
|
|
16801
|
+
//# sourceMappingURL=api-grq54JcQ.js.map
|