@shbernal/ts-pptx 3.5.0 → 3.7.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/README.md +8 -0
- package/dist/{autopage-BYlTzX-l.js → autopage-DkjYZUFD.js} +3 -3
- package/dist/{autopage-BYlTzX-l.js.map → autopage-DkjYZUFD.js.map} +1 -1
- package/dist/browser.d.ts +5 -5
- package/dist/browser.js +4 -4
- package/dist/browser.js.map +1 -1
- package/dist/{diagnostics-BDuR8UkG.d.ts → diagnostics-DfBdDHre.d.ts} +20 -5
- package/dist/diagnostics-DfBdDHre.d.ts.map +1 -0
- package/dist/{errors-CgnueTYL.d.ts → errors-PflMPWBn.d.ts} +2 -2
- package/dist/{errors-CgnueTYL.d.ts.map → errors-PflMPWBn.d.ts.map} +1 -1
- package/dist/{fit-TjpNbMru.js → fit-BKs0zxMI.js} +3 -3
- package/dist/{fit-TjpNbMru.js.map → fit-BKs0zxMI.js.map} +1 -1
- package/dist/{html-dom-yUSdCExA.js → html-dom-B0I0QSbU.js} +4 -4
- package/dist/{html-dom-yUSdCExA.js.map → html-dom-B0I0QSbU.js.map} +1 -1
- package/dist/html.d.ts +3 -3
- package/dist/html.js +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +3 -3
- package/dist/inspect.d.ts +1 -1
- package/dist/inspect.js +4 -5
- package/dist/inspect.js.map +1 -1
- package/dist/math.d.ts +1 -1
- package/dist/measure.d.ts +2 -2
- package/dist/measure.js +1 -1
- package/dist/{namespaces-CcKuzeuE.js → namespaces-BVnNu7sg.js} +74 -3
- package/dist/namespaces-BVnNu7sg.js.map +1 -0
- package/dist/node.d.ts +5 -5
- package/dist/node.js +3 -3
- package/dist/{notes-DNqAggXx.js → notes-CJFJaG6M.js} +310 -313
- package/dist/notes-CJFJaG6M.js.map +1 -0
- package/dist/{pres-Dybf7ZUl.d.ts → pres-BcBR3CSM.d.ts} +2 -2
- package/dist/{pres-Dybf7ZUl.d.ts.map → pres-BcBR3CSM.d.ts.map} +1 -1
- package/dist/{presentation-VfJ_FT7E.js → presentation-DrJtj3-C.js} +414 -515
- package/dist/presentation-DrJtj3-C.js.map +1 -0
- package/dist/{presentation-types-CpkTx9Xa.d.ts → presentation-types-CDjScsev.d.ts} +351 -274
- package/dist/presentation-types-CDjScsev.d.ts.map +1 -0
- package/dist/read.d.ts +31 -48
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +3 -3
- package/dist/script.d.ts +2 -2
- package/dist/script.d.ts.map +1 -1
- package/dist/script.js +18 -47
- package/dist/script.js.map +1 -1
- package/dist/{shapes-Kt51vry6.js → shapes-BemroU-z.js} +625 -265
- package/dist/shapes-BemroU-z.js.map +1 -0
- package/dist/{slide-B_aInw3N.d.ts → slide-ZqAdVvHV.d.ts} +1135 -1058
- package/dist/slide-ZqAdVvHV.d.ts.map +1 -0
- package/dist/{text-D04NUMvA.js → text-B8SLEaZx.js} +2089 -1418
- package/dist/text-B8SLEaZx.js.map +1 -0
- package/dist/units-1kRzYShk.js +231 -0
- package/dist/units-1kRzYShk.js.map +1 -0
- package/dist/units-internal-Dg95w_YD.js +753 -0
- package/dist/units-internal-Dg95w_YD.js.map +1 -0
- package/dist/zip.d.ts +1 -1
- package/package.json +2 -1
- package/dist/diagnostics-BDuR8UkG.d.ts.map +0 -1
- package/dist/diagnostics-CPVADSL1.js +0 -90
- package/dist/diagnostics-CPVADSL1.js.map +0 -1
- package/dist/namespaces-CcKuzeuE.js.map +0 -1
- package/dist/notes-DNqAggXx.js.map +0 -1
- package/dist/presentation-VfJ_FT7E.js.map +0 -1
- package/dist/presentation-types-CpkTx9Xa.d.ts.map +0 -1
- package/dist/shapes-Kt51vry6.js.map +0 -1
- package/dist/slide-B_aInw3N.d.ts.map +0 -1
- package/dist/text-D04NUMvA.js.map +0 -1
- package/dist/units-internal-DNvK2I6o.js +0 -896
- package/dist/units-internal-DNvK2I6o.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { S as warnOnce, a as FIXED_PCT_PER_PERCENT, i as EMU_PER_POINT, s as PERCENT_SCALE, t as ANGLE_UNITS_PER_DEGREE, v as ptToHundredths, x as warn } from "./units-1kRzYShk.js";
|
|
2
2
|
import { n as InvalidOptionError, o as UnsupportedFeatureError } from "./errors-Bvln0H-7.js";
|
|
3
|
-
import {
|
|
4
|
-
import { l as OFFICE_REL, n as PML_ROOT_NS, u as PACKAGE_REL_NS } from "./namespaces-
|
|
3
|
+
import { F as SLDNUMFLDID, G as SchemeColor, L as XML_DECL, O as DEF_TEXT_GLOW, P as REGEX_HEX_COLOR, S as DEF_FONT_COLOR, a as inch2Emu, c as opacityToAlpha, d as transparencyToAlpha, k as DEF_TEXT_SHADOW, l as ptsToEmuLenient, o as lineWidthToEmu, r as convertRotationDegrees } from "./units-internal-Dg95w_YD.js";
|
|
4
|
+
import { O as DEFAULT_COLOR_MAP, l as OFFICE_REL, n as PML_ROOT_NS, u as PACKAGE_REL_NS } from "./namespaces-BVnNu7sg.js";
|
|
5
5
|
//#region src/gen/utils.ts
|
|
6
6
|
/**
|
|
7
7
|
* ts-pptx: shared generator helpers.
|
|
@@ -72,6 +72,27 @@ function encodeXmlAttrValue(xml) {
|
|
|
72
72
|
return encodeXmlEntities(xml).replace(/\t/g, "	").replace(/\n/g, " ").replace(/\r/g, " ");
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
75
|
+
* Reverse {@link encodeXmlAttrValue}, so a stored attribute value reads back in the spelling its
|
|
76
|
+
* caller used. Entity replacement runs in the mirror order, with `&` last: encoded output only
|
|
77
|
+
* ever opens an entity with a `&` it wrote itself, so no earlier replacement can manufacture one.
|
|
78
|
+
*
|
|
79
|
+
* Full invertibility is not on offer and is not what a consumer needs — the encoder *strips* XML
|
|
80
|
+
* 1.0 illegal control characters, and no inverse brings those back. The guarantee is the round
|
|
81
|
+
* trip: `encodeXmlAttrValue(decodeXmlAttrValue(stored)) === stored` for every `stored` the encoder
|
|
82
|
+
* produced. It holds for a caller who authored `&` literally (decode yields `&`, which
|
|
83
|
+
* re-encodes to `&`, the stored value) and for one whose name carried a stripped control
|
|
84
|
+
* character (stripping is idempotent).
|
|
85
|
+
*
|
|
86
|
+
* That round trip is the whole point. A name read back off a stored object has to resolve when it
|
|
87
|
+
* is handed to a lookup that escapes before comparing — `groupObjects()` is the one that does —
|
|
88
|
+
* and the *stored* spelling would escape a second time and match nothing.
|
|
89
|
+
* @param {string} value - a stored attribute value, as written by `encodeXmlAttrValue`
|
|
90
|
+
* @returns {string} the spelling the caller passed
|
|
91
|
+
*/
|
|
92
|
+
function decodeXmlAttrValue(value) {
|
|
93
|
+
return value.replace(/	/g, " ").replace(/ /g, "\n").replace(/ /g, "\r").replace(/'/g, "'").replace(/"/g, "\"").replace(/>/g, ">").replace(/</g, "<").replace(/&/g, "&");
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
75
96
|
* Practical maximum length for a `p:cNvPr` object name. PowerPoint does not
|
|
76
97
|
* enforce a hard spec limit, but very long names are a strong signal of a bug
|
|
77
98
|
* and are unwieldy in the Selection Pane.
|
|
@@ -1273,207 +1294,16 @@ function genXmlNotesParagraphs(slide) {
|
|
|
1273
1294
|
}))])).join("");
|
|
1274
1295
|
}
|
|
1275
1296
|
/**
|
|
1276
|
-
*
|
|
1277
|
-
*
|
|
1297
|
+
* The `p:spTree` wrapper a notes master and a notes slide both open with: the group's own
|
|
1298
|
+
* non-visual properties and an identity `a:xfrm`, followed by that part's placeholders.
|
|
1299
|
+
*
|
|
1300
|
+
* The two parts differ only in which placeholders they carry — the master has six (header, date,
|
|
1301
|
+
* thumbnail, body, footer, slide number), a notes slide has three — so everything around the
|
|
1302
|
+
* `children` argument was written out twice, `chOff`/`chExt` and all.
|
|
1303
|
+
* @param children - the placeholder shapes, already serialized, in document order
|
|
1278
1304
|
*/
|
|
1279
|
-
function
|
|
1280
|
-
|
|
1281
|
-
x,
|
|
1282
|
-
y
|
|
1283
|
-
})), raw(voidEl("a:ext", {
|
|
1284
|
-
cx,
|
|
1285
|
-
cy
|
|
1286
|
-
}))]);
|
|
1287
|
-
const prstGeomRect = el("a:prstGeom", { prst: "rect" }, raw(voidEl("a:avLst")));
|
|
1288
|
-
const spLocks = (attrs) => el("p:cNvSpPr", null, raw(voidEl("a:spLocks", attrs)));
|
|
1289
|
-
const nvPr = (phAttrs) => el("p:nvPr", null, raw(voidEl("p:ph", phAttrs)));
|
|
1290
|
-
const bodyPr = (attrs) => voidEl("a:bodyPr", attrs);
|
|
1291
|
-
const lstStyleLvl1 = (algn) => el("a:lstStyle", null, raw(el("a:lvl1pPr", { algn }, raw(voidEl("a:defRPr", { sz: 1200 })))));
|
|
1292
|
-
const emptyPara = el("a:p", null, raw(voidEl("a:endParaRPr", { lang: "en-US" })));
|
|
1293
|
-
const header = el("p:sp", null, [
|
|
1294
|
-
raw(el("p:nvSpPr", null, [
|
|
1295
|
-
raw(voidEl("p:cNvPr", {
|
|
1296
|
-
id: 2,
|
|
1297
|
-
name: "Header Placeholder 1"
|
|
1298
|
-
})),
|
|
1299
|
-
raw(spLocks({ noGrp: 1 })),
|
|
1300
|
-
raw(nvPr({
|
|
1301
|
-
type: "hdr",
|
|
1302
|
-
sz: "quarter"
|
|
1303
|
-
}))
|
|
1304
|
-
])),
|
|
1305
|
-
raw(el("p:spPr", null, [raw(xfrmOffExt(0, 0, 2971800, 458788)), raw(prstGeomRect)])),
|
|
1306
|
-
raw(el("p:txBody", null, [
|
|
1307
|
-
raw(bodyPr({
|
|
1308
|
-
vert: "horz",
|
|
1309
|
-
lIns: 91440,
|
|
1310
|
-
tIns: 45720,
|
|
1311
|
-
rIns: 91440,
|
|
1312
|
-
bIns: 45720,
|
|
1313
|
-
rtlCol: 0
|
|
1314
|
-
})),
|
|
1315
|
-
raw(lstStyleLvl1("l")),
|
|
1316
|
-
raw(emptyPara)
|
|
1317
|
-
]))
|
|
1318
|
-
]);
|
|
1319
|
-
const date = el("p:sp", null, [
|
|
1320
|
-
raw(el("p:nvSpPr", null, [
|
|
1321
|
-
raw(voidEl("p:cNvPr", {
|
|
1322
|
-
id: 3,
|
|
1323
|
-
name: "Date Placeholder 2"
|
|
1324
|
-
})),
|
|
1325
|
-
raw(spLocks({ noGrp: 1 })),
|
|
1326
|
-
raw(nvPr({
|
|
1327
|
-
type: "dt",
|
|
1328
|
-
idx: 1
|
|
1329
|
-
}))
|
|
1330
|
-
])),
|
|
1331
|
-
raw(el("p:spPr", null, [raw(xfrmOffExt(3884613, 0, 2971800, 458788)), raw(prstGeomRect)])),
|
|
1332
|
-
raw(el("p:txBody", null, [
|
|
1333
|
-
raw(bodyPr({
|
|
1334
|
-
vert: "horz",
|
|
1335
|
-
lIns: 91440,
|
|
1336
|
-
tIns: 45720,
|
|
1337
|
-
rIns: 91440,
|
|
1338
|
-
bIns: 45720,
|
|
1339
|
-
rtlCol: 0
|
|
1340
|
-
})),
|
|
1341
|
-
raw(lstStyleLvl1("r")),
|
|
1342
|
-
raw(el("a:p", null, [raw(el("a:fld", {
|
|
1343
|
-
id: "{5282F153-3F37-0F45-9E97-73ACFA13230C}",
|
|
1344
|
-
type: "datetimeFigureOut"
|
|
1345
|
-
}, [raw(voidEl("a:rPr", { lang: "en-US" })), raw(el("a:t", null, "7/23/19"))])), raw(voidEl("a:endParaRPr", { lang: "en-US" }))]))
|
|
1346
|
-
]))
|
|
1347
|
-
]);
|
|
1348
|
-
const slideImg = el("p:sp", null, [
|
|
1349
|
-
raw(el("p:nvSpPr", null, [
|
|
1350
|
-
raw(voidEl("p:cNvPr", {
|
|
1351
|
-
id: 4,
|
|
1352
|
-
name: "Slide Image Placeholder 3"
|
|
1353
|
-
})),
|
|
1354
|
-
raw(spLocks({
|
|
1355
|
-
noGrp: 1,
|
|
1356
|
-
noRot: 1,
|
|
1357
|
-
noChangeAspect: 1
|
|
1358
|
-
})),
|
|
1359
|
-
raw(nvPr({
|
|
1360
|
-
type: "sldImg",
|
|
1361
|
-
idx: 2
|
|
1362
|
-
}))
|
|
1363
|
-
])),
|
|
1364
|
-
raw(el("p:spPr", null, [
|
|
1365
|
-
raw(xfrmOffExt(685800, 1143e3, 5486400, 3086100)),
|
|
1366
|
-
raw(prstGeomRect),
|
|
1367
|
-
raw(voidEl("a:noFill")),
|
|
1368
|
-
raw(el("a:ln", { w: 12700 }, raw(el("a:solidFill", null, raw(voidEl("a:prstClr", { val: "black" }))))))
|
|
1369
|
-
])),
|
|
1370
|
-
raw(el("p:txBody", null, [
|
|
1371
|
-
raw(bodyPr({
|
|
1372
|
-
vert: "horz",
|
|
1373
|
-
lIns: 91440,
|
|
1374
|
-
tIns: 45720,
|
|
1375
|
-
rIns: 91440,
|
|
1376
|
-
bIns: 45720,
|
|
1377
|
-
rtlCol: 0,
|
|
1378
|
-
anchor: "ctr"
|
|
1379
|
-
})),
|
|
1380
|
-
raw(voidEl("a:lstStyle")),
|
|
1381
|
-
raw(emptyPara)
|
|
1382
|
-
]))
|
|
1383
|
-
]);
|
|
1384
|
-
const notesPlaceholder = el("p:sp", null, [
|
|
1385
|
-
raw(el("p:nvSpPr", null, [
|
|
1386
|
-
raw(voidEl("p:cNvPr", {
|
|
1387
|
-
id: 5,
|
|
1388
|
-
name: "Notes Placeholder 4"
|
|
1389
|
-
})),
|
|
1390
|
-
raw(spLocks({ noGrp: 1 })),
|
|
1391
|
-
raw(nvPr({
|
|
1392
|
-
type: "body",
|
|
1393
|
-
sz: "quarter",
|
|
1394
|
-
idx: 3
|
|
1395
|
-
}))
|
|
1396
|
-
])),
|
|
1397
|
-
raw(el("p:spPr", null, [raw(xfrmOffExt(685800, 4400550, 5486400, 3600450)), raw(prstGeomRect)])),
|
|
1398
|
-
raw(el("p:txBody", null, [
|
|
1399
|
-
raw(bodyPr({
|
|
1400
|
-
vert: "horz",
|
|
1401
|
-
lIns: 91440,
|
|
1402
|
-
tIns: 45720,
|
|
1403
|
-
rIns: 91440,
|
|
1404
|
-
bIns: 45720,
|
|
1405
|
-
rtlCol: 0
|
|
1406
|
-
})),
|
|
1407
|
-
raw(voidEl("a:lstStyle")),
|
|
1408
|
-
raw([
|
|
1409
|
-
"Click to edit Master text styles",
|
|
1410
|
-
"Second level",
|
|
1411
|
-
"Third level",
|
|
1412
|
-
"Fourth level",
|
|
1413
|
-
"Fifth level"
|
|
1414
|
-
].map((text, lvl) => el("a:p", null, [raw(voidEl("a:pPr", { lvl })), raw(el("a:r", null, [raw(voidEl("a:rPr", { lang: "en-US" })), raw(el("a:t", null, text))]))])).join(""))
|
|
1415
|
-
]))
|
|
1416
|
-
]);
|
|
1417
|
-
const footer = el("p:sp", null, [
|
|
1418
|
-
raw(el("p:nvSpPr", null, [
|
|
1419
|
-
raw(voidEl("p:cNvPr", {
|
|
1420
|
-
id: 6,
|
|
1421
|
-
name: "Footer Placeholder 5"
|
|
1422
|
-
})),
|
|
1423
|
-
raw(spLocks({ noGrp: 1 })),
|
|
1424
|
-
raw(nvPr({
|
|
1425
|
-
type: "ftr",
|
|
1426
|
-
sz: "quarter",
|
|
1427
|
-
idx: 4
|
|
1428
|
-
}))
|
|
1429
|
-
])),
|
|
1430
|
-
raw(el("p:spPr", null, [raw(xfrmOffExt(0, 8685213, 2971800, 458787)), raw(prstGeomRect)])),
|
|
1431
|
-
raw(el("p:txBody", null, [
|
|
1432
|
-
raw(bodyPr({
|
|
1433
|
-
vert: "horz",
|
|
1434
|
-
lIns: 91440,
|
|
1435
|
-
tIns: 45720,
|
|
1436
|
-
rIns: 91440,
|
|
1437
|
-
bIns: 45720,
|
|
1438
|
-
rtlCol: 0,
|
|
1439
|
-
anchor: "b"
|
|
1440
|
-
})),
|
|
1441
|
-
raw(lstStyleLvl1("l")),
|
|
1442
|
-
raw(emptyPara)
|
|
1443
|
-
]))
|
|
1444
|
-
]);
|
|
1445
|
-
const slideNum = el("p:sp", null, [
|
|
1446
|
-
raw(el("p:nvSpPr", null, [
|
|
1447
|
-
raw(voidEl("p:cNvPr", {
|
|
1448
|
-
id: 7,
|
|
1449
|
-
name: "Slide Number Placeholder 6"
|
|
1450
|
-
})),
|
|
1451
|
-
raw(spLocks({ noGrp: 1 })),
|
|
1452
|
-
raw(nvPr({
|
|
1453
|
-
type: "sldNum",
|
|
1454
|
-
sz: "quarter",
|
|
1455
|
-
idx: 5
|
|
1456
|
-
}))
|
|
1457
|
-
])),
|
|
1458
|
-
raw(el("p:spPr", null, [raw(xfrmOffExt(3884613, 8685213, 2971800, 458787)), raw(prstGeomRect)])),
|
|
1459
|
-
raw(el("p:txBody", null, [
|
|
1460
|
-
raw(bodyPr({
|
|
1461
|
-
vert: "horz",
|
|
1462
|
-
lIns: 91440,
|
|
1463
|
-
tIns: 45720,
|
|
1464
|
-
rIns: 91440,
|
|
1465
|
-
bIns: 45720,
|
|
1466
|
-
rtlCol: 0,
|
|
1467
|
-
anchor: "b"
|
|
1468
|
-
})),
|
|
1469
|
-
raw(lstStyleLvl1("r")),
|
|
1470
|
-
raw(el("a:p", null, [raw(el("a:fld", {
|
|
1471
|
-
id: "{CE5E9CC1-C706-0F49-92D6-E571CC5EEA8F}",
|
|
1472
|
-
type: "slidenum"
|
|
1473
|
-
}, [raw(voidEl("a:rPr", { lang: "en-US" })), raw(el("a:t", null, "‹#›"))])), raw(voidEl("a:endParaRPr", { lang: "en-US" }))]))
|
|
1474
|
-
]))
|
|
1475
|
-
]);
|
|
1476
|
-
const spTree = el("p:spTree", null, [
|
|
1305
|
+
function notesSpTree(children) {
|
|
1306
|
+
return el("p:spTree", null, [
|
|
1477
1307
|
raw(el("p:nvGrpSpPr", null, [
|
|
1478
1308
|
raw(voidEl("p:cNvPr", {
|
|
1479
1309
|
id: 1,
|
|
@@ -1500,36 +1330,235 @@ function makeXmlNotesMaster() {
|
|
|
1500
1330
|
cy: 0
|
|
1501
1331
|
}))
|
|
1502
1332
|
])))),
|
|
1503
|
-
raw(
|
|
1504
|
-
raw(date),
|
|
1505
|
-
raw(slideImg),
|
|
1506
|
-
raw(notesPlaceholder),
|
|
1507
|
-
raw(footer),
|
|
1508
|
-
raw(slideNum)
|
|
1333
|
+
...children.map((child) => raw(child))
|
|
1509
1334
|
]);
|
|
1510
|
-
|
|
1335
|
+
}
|
|
1336
|
+
/**
|
|
1337
|
+
* PowerPoint's creation-id extension, on the `p:cSld` of both notes parts.
|
|
1338
|
+
*
|
|
1339
|
+
* The value is a fixed literal, and that is the point of naming it: it looks like data — a
|
|
1340
|
+
* per-deck identifier PowerPoint would vary — so left inline in two places, someone eventually
|
|
1341
|
+
* changes one of them. It is deliberately constant, which is what keeps the two notes parts
|
|
1342
|
+
* byte-identical across builds.
|
|
1343
|
+
*/
|
|
1344
|
+
const NOTES_CREATION_ID = 1024086991;
|
|
1345
|
+
/** The `p:extLst` carrying {@link NOTES_CREATION_ID}, identical on the notes master and notes slide. */
|
|
1346
|
+
function notesExtLst() {
|
|
1347
|
+
return el("p:extLst", null, raw(el("p:ext", { uri: "{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}" }, raw(voidEl("p14:creationId", {
|
|
1511
1348
|
"xmlns:p14": "http://schemas.microsoft.com/office/powerpoint/2010/main",
|
|
1512
|
-
val:
|
|
1349
|
+
val: NOTES_CREATION_ID
|
|
1513
1350
|
})))));
|
|
1351
|
+
}
|
|
1352
|
+
/**
|
|
1353
|
+
* Generate XML for Notes Master (notesMaster1.xml)
|
|
1354
|
+
* @returns {string} XML
|
|
1355
|
+
*/
|
|
1356
|
+
function makeXmlNotesMaster() {
|
|
1357
|
+
const xfrmOffExt = (x, y, cx, cy) => el("a:xfrm", null, [raw(voidEl("a:off", {
|
|
1358
|
+
x,
|
|
1359
|
+
y
|
|
1360
|
+
})), raw(voidEl("a:ext", {
|
|
1361
|
+
cx,
|
|
1362
|
+
cy
|
|
1363
|
+
}))]);
|
|
1364
|
+
const prstGeomRect = el("a:prstGeom", { prst: "rect" }, raw(voidEl("a:avLst")));
|
|
1365
|
+
const spLocks = (attrs) => el("p:cNvSpPr", null, raw(voidEl("a:spLocks", attrs)));
|
|
1366
|
+
const nvPr = (phAttrs) => el("p:nvPr", null, raw(voidEl("p:ph", phAttrs)));
|
|
1367
|
+
const bodyPr = (attrs) => voidEl("a:bodyPr", attrs);
|
|
1368
|
+
const lstStyleLvl1 = (algn) => el("a:lstStyle", null, raw(el("a:lvl1pPr", { algn }, raw(voidEl("a:defRPr", { sz: 1200 })))));
|
|
1369
|
+
const emptyPara = el("a:p", null, raw(voidEl("a:endParaRPr", { lang: "en-US" })));
|
|
1370
|
+
const spTree = notesSpTree([
|
|
1371
|
+
el("p:sp", null, [
|
|
1372
|
+
raw(el("p:nvSpPr", null, [
|
|
1373
|
+
raw(voidEl("p:cNvPr", {
|
|
1374
|
+
id: 2,
|
|
1375
|
+
name: "Header Placeholder 1"
|
|
1376
|
+
})),
|
|
1377
|
+
raw(spLocks({ noGrp: 1 })),
|
|
1378
|
+
raw(nvPr({
|
|
1379
|
+
type: "hdr",
|
|
1380
|
+
sz: "quarter"
|
|
1381
|
+
}))
|
|
1382
|
+
])),
|
|
1383
|
+
raw(el("p:spPr", null, [raw(xfrmOffExt(0, 0, 2971800, 458788)), raw(prstGeomRect)])),
|
|
1384
|
+
raw(el("p:txBody", null, [
|
|
1385
|
+
raw(bodyPr({
|
|
1386
|
+
vert: "horz",
|
|
1387
|
+
lIns: 91440,
|
|
1388
|
+
tIns: 45720,
|
|
1389
|
+
rIns: 91440,
|
|
1390
|
+
bIns: 45720,
|
|
1391
|
+
rtlCol: 0
|
|
1392
|
+
})),
|
|
1393
|
+
raw(lstStyleLvl1("l")),
|
|
1394
|
+
raw(emptyPara)
|
|
1395
|
+
]))
|
|
1396
|
+
]),
|
|
1397
|
+
el("p:sp", null, [
|
|
1398
|
+
raw(el("p:nvSpPr", null, [
|
|
1399
|
+
raw(voidEl("p:cNvPr", {
|
|
1400
|
+
id: 3,
|
|
1401
|
+
name: "Date Placeholder 2"
|
|
1402
|
+
})),
|
|
1403
|
+
raw(spLocks({ noGrp: 1 })),
|
|
1404
|
+
raw(nvPr({
|
|
1405
|
+
type: "dt",
|
|
1406
|
+
idx: 1
|
|
1407
|
+
}))
|
|
1408
|
+
])),
|
|
1409
|
+
raw(el("p:spPr", null, [raw(xfrmOffExt(3884613, 0, 2971800, 458788)), raw(prstGeomRect)])),
|
|
1410
|
+
raw(el("p:txBody", null, [
|
|
1411
|
+
raw(bodyPr({
|
|
1412
|
+
vert: "horz",
|
|
1413
|
+
lIns: 91440,
|
|
1414
|
+
tIns: 45720,
|
|
1415
|
+
rIns: 91440,
|
|
1416
|
+
bIns: 45720,
|
|
1417
|
+
rtlCol: 0
|
|
1418
|
+
})),
|
|
1419
|
+
raw(lstStyleLvl1("r")),
|
|
1420
|
+
raw(el("a:p", null, [raw(el("a:fld", {
|
|
1421
|
+
id: "{5282F153-3F37-0F45-9E97-73ACFA13230C}",
|
|
1422
|
+
type: "datetimeFigureOut"
|
|
1423
|
+
}, [raw(voidEl("a:rPr", { lang: "en-US" })), raw(el("a:t", null, "7/23/19"))])), raw(voidEl("a:endParaRPr", { lang: "en-US" }))]))
|
|
1424
|
+
]))
|
|
1425
|
+
]),
|
|
1426
|
+
el("p:sp", null, [
|
|
1427
|
+
raw(el("p:nvSpPr", null, [
|
|
1428
|
+
raw(voidEl("p:cNvPr", {
|
|
1429
|
+
id: 4,
|
|
1430
|
+
name: "Slide Image Placeholder 3"
|
|
1431
|
+
})),
|
|
1432
|
+
raw(spLocks({
|
|
1433
|
+
noGrp: 1,
|
|
1434
|
+
noRot: 1,
|
|
1435
|
+
noChangeAspect: 1
|
|
1436
|
+
})),
|
|
1437
|
+
raw(nvPr({
|
|
1438
|
+
type: "sldImg",
|
|
1439
|
+
idx: 2
|
|
1440
|
+
}))
|
|
1441
|
+
])),
|
|
1442
|
+
raw(el("p:spPr", null, [
|
|
1443
|
+
raw(xfrmOffExt(685800, 1143e3, 5486400, 3086100)),
|
|
1444
|
+
raw(prstGeomRect),
|
|
1445
|
+
raw(voidEl("a:noFill")),
|
|
1446
|
+
raw(el("a:ln", { w: 12700 }, raw(el("a:solidFill", null, raw(voidEl("a:prstClr", { val: "black" }))))))
|
|
1447
|
+
])),
|
|
1448
|
+
raw(el("p:txBody", null, [
|
|
1449
|
+
raw(bodyPr({
|
|
1450
|
+
vert: "horz",
|
|
1451
|
+
lIns: 91440,
|
|
1452
|
+
tIns: 45720,
|
|
1453
|
+
rIns: 91440,
|
|
1454
|
+
bIns: 45720,
|
|
1455
|
+
rtlCol: 0,
|
|
1456
|
+
anchor: "ctr"
|
|
1457
|
+
})),
|
|
1458
|
+
raw(voidEl("a:lstStyle")),
|
|
1459
|
+
raw(emptyPara)
|
|
1460
|
+
]))
|
|
1461
|
+
]),
|
|
1462
|
+
el("p:sp", null, [
|
|
1463
|
+
raw(el("p:nvSpPr", null, [
|
|
1464
|
+
raw(voidEl("p:cNvPr", {
|
|
1465
|
+
id: 5,
|
|
1466
|
+
name: "Notes Placeholder 4"
|
|
1467
|
+
})),
|
|
1468
|
+
raw(spLocks({ noGrp: 1 })),
|
|
1469
|
+
raw(nvPr({
|
|
1470
|
+
type: "body",
|
|
1471
|
+
sz: "quarter",
|
|
1472
|
+
idx: 3
|
|
1473
|
+
}))
|
|
1474
|
+
])),
|
|
1475
|
+
raw(el("p:spPr", null, [raw(xfrmOffExt(685800, 4400550, 5486400, 3600450)), raw(prstGeomRect)])),
|
|
1476
|
+
raw(el("p:txBody", null, [
|
|
1477
|
+
raw(bodyPr({
|
|
1478
|
+
vert: "horz",
|
|
1479
|
+
lIns: 91440,
|
|
1480
|
+
tIns: 45720,
|
|
1481
|
+
rIns: 91440,
|
|
1482
|
+
bIns: 45720,
|
|
1483
|
+
rtlCol: 0
|
|
1484
|
+
})),
|
|
1485
|
+
raw(voidEl("a:lstStyle")),
|
|
1486
|
+
raw([
|
|
1487
|
+
"Click to edit Master text styles",
|
|
1488
|
+
"Second level",
|
|
1489
|
+
"Third level",
|
|
1490
|
+
"Fourth level",
|
|
1491
|
+
"Fifth level"
|
|
1492
|
+
].map((text, lvl) => el("a:p", null, [raw(voidEl("a:pPr", { lvl })), raw(el("a:r", null, [raw(voidEl("a:rPr", { lang: "en-US" })), raw(el("a:t", null, text))]))])).join(""))
|
|
1493
|
+
]))
|
|
1494
|
+
]),
|
|
1495
|
+
el("p:sp", null, [
|
|
1496
|
+
raw(el("p:nvSpPr", null, [
|
|
1497
|
+
raw(voidEl("p:cNvPr", {
|
|
1498
|
+
id: 6,
|
|
1499
|
+
name: "Footer Placeholder 5"
|
|
1500
|
+
})),
|
|
1501
|
+
raw(spLocks({ noGrp: 1 })),
|
|
1502
|
+
raw(nvPr({
|
|
1503
|
+
type: "ftr",
|
|
1504
|
+
sz: "quarter",
|
|
1505
|
+
idx: 4
|
|
1506
|
+
}))
|
|
1507
|
+
])),
|
|
1508
|
+
raw(el("p:spPr", null, [raw(xfrmOffExt(0, 8685213, 2971800, 458787)), raw(prstGeomRect)])),
|
|
1509
|
+
raw(el("p:txBody", null, [
|
|
1510
|
+
raw(bodyPr({
|
|
1511
|
+
vert: "horz",
|
|
1512
|
+
lIns: 91440,
|
|
1513
|
+
tIns: 45720,
|
|
1514
|
+
rIns: 91440,
|
|
1515
|
+
bIns: 45720,
|
|
1516
|
+
rtlCol: 0,
|
|
1517
|
+
anchor: "b"
|
|
1518
|
+
})),
|
|
1519
|
+
raw(lstStyleLvl1("l")),
|
|
1520
|
+
raw(emptyPara)
|
|
1521
|
+
]))
|
|
1522
|
+
]),
|
|
1523
|
+
el("p:sp", null, [
|
|
1524
|
+
raw(el("p:nvSpPr", null, [
|
|
1525
|
+
raw(voidEl("p:cNvPr", {
|
|
1526
|
+
id: 7,
|
|
1527
|
+
name: "Slide Number Placeholder 6"
|
|
1528
|
+
})),
|
|
1529
|
+
raw(spLocks({ noGrp: 1 })),
|
|
1530
|
+
raw(nvPr({
|
|
1531
|
+
type: "sldNum",
|
|
1532
|
+
sz: "quarter",
|
|
1533
|
+
idx: 5
|
|
1534
|
+
}))
|
|
1535
|
+
])),
|
|
1536
|
+
raw(el("p:spPr", null, [raw(xfrmOffExt(3884613, 8685213, 2971800, 458787)), raw(prstGeomRect)])),
|
|
1537
|
+
raw(el("p:txBody", null, [
|
|
1538
|
+
raw(bodyPr({
|
|
1539
|
+
vert: "horz",
|
|
1540
|
+
lIns: 91440,
|
|
1541
|
+
tIns: 45720,
|
|
1542
|
+
rIns: 91440,
|
|
1543
|
+
bIns: 45720,
|
|
1544
|
+
rtlCol: 0,
|
|
1545
|
+
anchor: "b"
|
|
1546
|
+
})),
|
|
1547
|
+
raw(lstStyleLvl1("r")),
|
|
1548
|
+
raw(el("a:p", null, [raw(el("a:fld", {
|
|
1549
|
+
id: "{CE5E9CC1-C706-0F49-92D6-E571CC5EEA8F}",
|
|
1550
|
+
type: "slidenum"
|
|
1551
|
+
}, [raw(voidEl("a:rPr", { lang: "en-US" })), raw(el("a:t", null, "‹#›"))])), raw(voidEl("a:endParaRPr", { lang: "en-US" }))]))
|
|
1552
|
+
]))
|
|
1553
|
+
])
|
|
1554
|
+
]);
|
|
1555
|
+
const extLst = notesExtLst();
|
|
1514
1556
|
const cSld = el("p:cSld", null, [
|
|
1515
1557
|
raw(el("p:bg", null, raw(el("p:bgRef", { idx: 1001 }, raw(voidEl("a:schemeClr", { val: "bg1" })))))),
|
|
1516
1558
|
raw(spTree),
|
|
1517
1559
|
raw(extLst)
|
|
1518
1560
|
]);
|
|
1519
|
-
const clrMap = voidEl("p:clrMap",
|
|
1520
|
-
bg1: "lt1",
|
|
1521
|
-
tx1: "dk1",
|
|
1522
|
-
bg2: "lt2",
|
|
1523
|
-
tx2: "dk2",
|
|
1524
|
-
accent1: "accent1",
|
|
1525
|
-
accent2: "accent2",
|
|
1526
|
-
accent3: "accent3",
|
|
1527
|
-
accent4: "accent4",
|
|
1528
|
-
accent5: "accent5",
|
|
1529
|
-
accent6: "accent6",
|
|
1530
|
-
hlink: "hlink",
|
|
1531
|
-
folHlink: "folHlink"
|
|
1532
|
-
});
|
|
1561
|
+
const clrMap = voidEl("p:clrMap", DEFAULT_COLOR_MAP);
|
|
1533
1562
|
const notesStyleLevel = (n, marL) => el(`a:lvl${n}pPr`, {
|
|
1534
1563
|
marL,
|
|
1535
1564
|
algn: "l",
|
|
@@ -1588,95 +1617,63 @@ function makeXmlNotesSlide(slide) {
|
|
|
1588
1617
|
* @return {string} XML
|
|
1589
1618
|
*/
|
|
1590
1619
|
function makeXmlNotesSlideSkeleton(bodyParagraphsXml, slideNum) {
|
|
1591
|
-
const
|
|
1592
|
-
raw(
|
|
1593
|
-
id: 2,
|
|
1594
|
-
name: "Slide Image Placeholder 1"
|
|
1595
|
-
})),
|
|
1596
|
-
raw(el("p:cNvSpPr", null, raw(voidEl("a:spLocks", {
|
|
1597
|
-
noGrp: 1,
|
|
1598
|
-
noRot: 1,
|
|
1599
|
-
noChangeAspect: 1
|
|
1600
|
-
})))),
|
|
1601
|
-
raw(el("p:nvPr", null, raw(voidEl("p:ph", { type: "sldImg" }))))
|
|
1602
|
-
])), raw(voidEl("p:spPr"))]);
|
|
1603
|
-
const notesPh = el("p:sp", null, [
|
|
1604
|
-
raw(el("p:nvSpPr", null, [
|
|
1620
|
+
const spTree = notesSpTree([
|
|
1621
|
+
el("p:sp", null, [raw(el("p:nvSpPr", null, [
|
|
1605
1622
|
raw(voidEl("p:cNvPr", {
|
|
1606
|
-
id:
|
|
1607
|
-
name: "
|
|
1608
|
-
})),
|
|
1609
|
-
raw(el("p:cNvSpPr", null, raw(voidEl("a:spLocks", { noGrp: 1 })))),
|
|
1610
|
-
raw(el("p:nvPr", null, raw(voidEl("p:ph", {
|
|
1611
|
-
type: "body",
|
|
1612
|
-
idx: 1
|
|
1613
|
-
}))))
|
|
1614
|
-
])),
|
|
1615
|
-
raw(voidEl("p:spPr")),
|
|
1616
|
-
raw(el("p:txBody", null, [
|
|
1617
|
-
raw(voidEl("a:bodyPr")),
|
|
1618
|
-
raw(voidEl("a:lstStyle")),
|
|
1619
|
-
raw(bodyParagraphsXml)
|
|
1620
|
-
]))
|
|
1621
|
-
]);
|
|
1622
|
-
const slideNumPh = el("p:sp", null, [
|
|
1623
|
-
raw(el("p:nvSpPr", null, [
|
|
1624
|
-
raw(voidEl("p:cNvPr", {
|
|
1625
|
-
id: 4,
|
|
1626
|
-
name: "Slide Number Placeholder 3"
|
|
1627
|
-
})),
|
|
1628
|
-
raw(el("p:cNvSpPr", null, raw(voidEl("a:spLocks", { noGrp: 1 })))),
|
|
1629
|
-
raw(el("p:nvPr", null, raw(voidEl("p:ph", {
|
|
1630
|
-
type: "sldNum",
|
|
1631
|
-
sz: "quarter",
|
|
1632
|
-
idx: 10
|
|
1633
|
-
}))))
|
|
1634
|
-
])),
|
|
1635
|
-
raw(voidEl("p:spPr")),
|
|
1636
|
-
raw(el("p:txBody", null, [
|
|
1637
|
-
raw(voidEl("a:bodyPr")),
|
|
1638
|
-
raw(voidEl("a:lstStyle")),
|
|
1639
|
-
raw(el("a:p", null, [raw(el("a:fld", {
|
|
1640
|
-
id: SLDNUMFLDID,
|
|
1641
|
-
type: "slidenum"
|
|
1642
|
-
}, [raw(voidEl("a:rPr", { lang: "en-US" })), raw(el("a:t", null, slideNum))])), raw(voidEl("a:endParaRPr", { lang: "en-US" }))]))
|
|
1643
|
-
]))
|
|
1644
|
-
]);
|
|
1645
|
-
const spTree = el("p:spTree", null, [
|
|
1646
|
-
raw(el("p:nvGrpSpPr", null, [
|
|
1647
|
-
raw(voidEl("p:cNvPr", {
|
|
1648
|
-
id: 1,
|
|
1649
|
-
name: ""
|
|
1650
|
-
})),
|
|
1651
|
-
raw(voidEl("p:cNvGrpSpPr")),
|
|
1652
|
-
raw(voidEl("p:nvPr"))
|
|
1653
|
-
])),
|
|
1654
|
-
raw(el("p:grpSpPr", null, raw(el("a:xfrm", null, [
|
|
1655
|
-
raw(voidEl("a:off", {
|
|
1656
|
-
x: 0,
|
|
1657
|
-
y: 0
|
|
1658
|
-
})),
|
|
1659
|
-
raw(voidEl("a:ext", {
|
|
1660
|
-
cx: 0,
|
|
1661
|
-
cy: 0
|
|
1662
|
-
})),
|
|
1663
|
-
raw(voidEl("a:chOff", {
|
|
1664
|
-
x: 0,
|
|
1665
|
-
y: 0
|
|
1623
|
+
id: 2,
|
|
1624
|
+
name: "Slide Image Placeholder 1"
|
|
1666
1625
|
})),
|
|
1667
|
-
raw(voidEl("a:
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
raw(
|
|
1674
|
-
|
|
1626
|
+
raw(el("p:cNvSpPr", null, raw(voidEl("a:spLocks", {
|
|
1627
|
+
noGrp: 1,
|
|
1628
|
+
noRot: 1,
|
|
1629
|
+
noChangeAspect: 1
|
|
1630
|
+
})))),
|
|
1631
|
+
raw(el("p:nvPr", null, raw(voidEl("p:ph", { type: "sldImg" }))))
|
|
1632
|
+
])), raw(voidEl("p:spPr"))]),
|
|
1633
|
+
el("p:sp", null, [
|
|
1634
|
+
raw(el("p:nvSpPr", null, [
|
|
1635
|
+
raw(voidEl("p:cNvPr", {
|
|
1636
|
+
id: 3,
|
|
1637
|
+
name: "Notes Placeholder 2"
|
|
1638
|
+
})),
|
|
1639
|
+
raw(el("p:cNvSpPr", null, raw(voidEl("a:spLocks", { noGrp: 1 })))),
|
|
1640
|
+
raw(el("p:nvPr", null, raw(voidEl("p:ph", {
|
|
1641
|
+
type: "body",
|
|
1642
|
+
idx: 1
|
|
1643
|
+
}))))
|
|
1644
|
+
])),
|
|
1645
|
+
raw(voidEl("p:spPr")),
|
|
1646
|
+
raw(el("p:txBody", null, [
|
|
1647
|
+
raw(voidEl("a:bodyPr")),
|
|
1648
|
+
raw(voidEl("a:lstStyle")),
|
|
1649
|
+
raw(bodyParagraphsXml)
|
|
1650
|
+
]))
|
|
1651
|
+
]),
|
|
1652
|
+
el("p:sp", null, [
|
|
1653
|
+
raw(el("p:nvSpPr", null, [
|
|
1654
|
+
raw(voidEl("p:cNvPr", {
|
|
1655
|
+
id: 4,
|
|
1656
|
+
name: "Slide Number Placeholder 3"
|
|
1657
|
+
})),
|
|
1658
|
+
raw(el("p:cNvSpPr", null, raw(voidEl("a:spLocks", { noGrp: 1 })))),
|
|
1659
|
+
raw(el("p:nvPr", null, raw(voidEl("p:ph", {
|
|
1660
|
+
type: "sldNum",
|
|
1661
|
+
sz: "quarter",
|
|
1662
|
+
idx: 10
|
|
1663
|
+
}))))
|
|
1664
|
+
])),
|
|
1665
|
+
raw(voidEl("p:spPr")),
|
|
1666
|
+
raw(el("p:txBody", null, [
|
|
1667
|
+
raw(voidEl("a:bodyPr")),
|
|
1668
|
+
raw(voidEl("a:lstStyle")),
|
|
1669
|
+
raw(el("a:p", null, [raw(el("a:fld", {
|
|
1670
|
+
id: SLDNUMFLDID,
|
|
1671
|
+
type: "slidenum"
|
|
1672
|
+
}, [raw(voidEl("a:rPr", { lang: "en-US" })), raw(el("a:t", null, slideNum))])), raw(voidEl("a:endParaRPr", { lang: "en-US" }))]))
|
|
1673
|
+
]))
|
|
1674
|
+
])
|
|
1675
1675
|
]);
|
|
1676
|
-
const extLst =
|
|
1677
|
-
"xmlns:p14": "http://schemas.microsoft.com/office/powerpoint/2010/main",
|
|
1678
|
-
val: 1024086991
|
|
1679
|
-
})))));
|
|
1676
|
+
const extLst = notesExtLst();
|
|
1680
1677
|
const cSld = el("p:cSld", null, [raw(spTree), raw(extLst)]);
|
|
1681
1678
|
return XML_DECL + "\r\n" + el("p:notes", { ...PML_ROOT_NS }, [raw(cSld), raw(el("p:clrMapOvr", null, raw(voidEl("a:masterClrMapping"))))]);
|
|
1682
1679
|
}
|
|
@@ -1722,6 +1719,6 @@ function makeXmlNotesMasterRel() {
|
|
|
1722
1719
|
});
|
|
1723
1720
|
}
|
|
1724
1721
|
//#endregion
|
|
1725
|
-
export { getDuplicateObjectNames as A, createShadowEffectLst as C, voidEl as D, raw as E, validateObjectName as F, getUuid as M, isHyperlinkRel as N,
|
|
1722
|
+
export { getDuplicateObjectNames as A, createShadowEffectLst as C, voidEl as D, raw as E, validateObjectName as F, getUuid as M, isHyperlinkRel as N, decodeXmlAttrValue as O, mediaSlideKey as P, correctShadowOptions as S, el as T, flattenEmbeddedFaces as _, makeXmlNotesSlideRel as a, genXmlGradientFill as b, genXmlNormAutofit as c, renderTextParagraphsXml as d, clampFontSizeSz as f, FONT_REL_TYPE as g, FONT_DATA_EXTENSION as h, makeXmlNotesSlide as i, getNewRelId as j, encodeXmlAttrValue as k, genXmlParagraphProperties as l, FONT_DATA_CONTENT_TYPE as m, makeXmlNotesMaster as n, makeXmlNotesSlideSkeleton as o, EMBEDDED_FONT_SLOTS as p, makeXmlNotesMasterRel as r, externalHyperlinkRel as s, buildNotesSlideRels as t, groupRunsIntoLines as u, serializeEmbeddedFontLst as v, createColorElement as w, genXmlPatternFill as x, genXmlColorSelection as y };
|
|
1726
1723
|
|
|
1727
|
-
//# sourceMappingURL=notes-
|
|
1724
|
+
//# sourceMappingURL=notes-CJFJaG6M.js.map
|