@shbernal/ts-pptx 4.1.0 → 5.0.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 +11 -11
- package/dist/anim-presets-Qbgh8uut.js +55 -0
- package/dist/anim-presets-Qbgh8uut.js.map +1 -0
- package/dist/{autopage-D4kyVp11.js → autopage-DqZ37VpL.js} +11 -12
- package/dist/autopage-DqZ37VpL.js.map +1 -0
- package/dist/{binary-string-CKVAYI3M.js → binary-string-Ba8VM3b9.js} +3 -4
- package/dist/binary-string-Ba8VM3b9.js.map +1 -0
- package/dist/{body-insets-kVHmjGc6.js → body-insets-BDHymJvz.js} +7 -9
- package/dist/body-insets-BDHymJvz.js.map +1 -0
- package/dist/browser.d.ts +24 -16
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +19 -19
- package/dist/browser.js.map +1 -1
- package/dist/{image-size-DwDbakcl.js → chart-metadata-CwiTTcJq.js} +576 -538
- package/dist/chart-metadata-CwiTTcJq.js.map +1 -0
- package/dist/{clip-DHDlnHUq.d.ts → clip-ISfCMtWA.d.ts} +6 -10
- package/dist/clip-ISfCMtWA.d.ts.map +1 -0
- package/dist/{notes-BcT571R4.js → comments-CKIZYRbZ.js} +517 -389
- package/dist/comments-CKIZYRbZ.js.map +1 -0
- package/dist/{diagnostics-DiMmBU8P.d.ts → diagnostics-MoA4MBq5.d.ts} +52 -50
- package/dist/diagnostics-MoA4MBq5.d.ts.map +1 -0
- package/dist/{embedded-fonts-CI_YGW2d.d.ts → embedded-fonts-U7HIIhPO.d.ts} +4 -6
- package/dist/embedded-fonts-U7HIIhPO.d.ts.map +1 -0
- package/dist/{entry-compose-6hF9aTmT.d.ts → entry-compose-CiakSt-f.d.ts} +53 -74
- package/dist/entry-compose-CiakSt-f.d.ts.map +1 -0
- package/dist/{errors-Da2nXCJm.js → entry-errors-JMthgJ2g.js} +41 -25
- package/dist/entry-errors-JMthgJ2g.js.map +1 -0
- package/dist/{table-cell-margins-PDshga8T.js → enums-BP9wsb9Q.js} +42 -45
- package/dist/enums-BP9wsb9Q.js.map +1 -0
- package/dist/{enums-DQRpVOLh.d.ts → enums-PcXr3o3J.d.ts} +11 -12
- package/dist/{enums-DQRpVOLh.d.ts.map → enums-PcXr3o3J.d.ts.map} +1 -1
- package/dist/families.d.ts +24 -26
- package/dist/families.d.ts.map +1 -1
- package/dist/families.js +3 -4
- package/dist/{fit-CcXbg__l.js → fit-Bpmzep6O.js} +60 -52
- package/dist/fit-Bpmzep6O.js.map +1 -0
- package/dist/{font-metrics-CBGmhLo0.d.ts → font-metrics-DTppw4t3.d.ts} +61 -37
- package/dist/font-metrics-DTppw4t3.d.ts.map +1 -0
- package/dist/{grid-9B2w5EaY.js → grid-DUIMxjfl.js} +23 -26
- package/dist/grid-DUIMxjfl.js.map +1 -0
- package/dist/{html-dom-DvJmuHt2.js → html-dom-LZCgntnJ.js} +42 -43
- package/dist/html-dom-LZCgntnJ.js.map +1 -0
- package/dist/html.d.ts +53 -9
- package/dist/html.d.ts.map +1 -1
- package/dist/html.js +12 -13
- package/dist/html.js.map +1 -1
- package/dist/index.d.ts +21 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -15
- package/dist/index.js.map +1 -1
- package/dist/inspect.d.ts +14 -16
- package/dist/inspect.d.ts.map +1 -1
- package/dist/inspect.js +18 -19
- package/dist/inspect.js.map +1 -1
- package/dist/{text-anchor-BgLPbwbL.js → lock-attrs-CSQnFDHP.js} +62 -12
- package/dist/lock-attrs-CSQnFDHP.js.map +1 -0
- package/dist/math.d.ts +2 -4
- package/dist/math.d.ts.map +1 -1
- package/dist/math.js +12 -13
- package/dist/math.js.map +1 -1
- package/dist/measure.d.ts +23 -12
- package/dist/measure.d.ts.map +1 -1
- package/dist/measure.js +3 -3
- package/dist/node.d.ts +21 -13
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +12 -12
- package/dist/node.js.map +1 -1
- package/dist/{options-internal-WqgMf720.js → options-internal-BWgmLPdx.js} +4 -5
- package/dist/options-internal-BWgmLPdx.js.map +1 -0
- package/dist/{package-KoEgVwII.d.ts → package-CANBWuSm.d.ts} +4 -12
- package/dist/package-CANBWuSm.d.ts.map +1 -0
- package/dist/{playbtn-CUqQdoDf.js → playbtn-BQZFJir9.js} +4 -5
- package/dist/playbtn-BQZFJir9.js.map +1 -0
- package/dist/{pres-BA9_lJbY.d.ts → pres-BkEkUAEM.d.ts} +383 -230
- package/dist/pres-BkEkUAEM.d.ts.map +1 -0
- package/dist/{presentation-Cyl74rq2.js → presentation-4Ggq0_Xa.js} +408 -288
- package/dist/presentation-4Ggq0_Xa.js.map +1 -0
- package/dist/{presentation-types-B3VQH4Bz.d.ts → presentation-types-BgnZR-0a.d.ts} +1104 -457
- package/dist/presentation-types-BgnZR-0a.d.ts.map +1 -0
- package/dist/read.d.ts +18 -13
- package/dist/read.d.ts.map +1 -1
- package/dist/read.js +4 -4
- package/dist/script.d.ts +116 -65
- package/dist/script.d.ts.map +1 -1
- package/dist/script.js +2697 -777
- package/dist/script.js.map +1 -1
- package/dist/{shapes-BcyFdZpp.js → shapes-CAPOjU0Q.js} +1556 -487
- package/dist/shapes-CAPOjU0Q.js.map +1 -0
- package/dist/{slide-BqPtyKmb.d.ts → slide-BmT4kMoO.d.ts} +94 -86
- package/dist/slide-BmT4kMoO.d.ts.map +1 -0
- package/dist/{slide-size-BalTjFuv.js → slide-size-SkScz1ig.js} +2 -3
- package/dist/{slide-size-BalTjFuv.js.map → slide-size-SkScz1ig.js.map} +1 -1
- package/dist/{table-dom-CVbvUfgh.js → table-dom-BYga4FYY.js} +3 -4
- package/dist/{table-dom-CVbvUfgh.js.map → table-dom-BYga4FYY.js.map} +1 -1
- package/dist/{text-BvFFMMFQ.js → text-Dz0ArGIp.js} +365 -318
- package/dist/text-Dz0ArGIp.js.map +1 -0
- package/dist/{transition-speed-kUEWDWTx.js → transition-speed-CNJ0fSpQ.js} +2 -3
- package/dist/{transition-speed-kUEWDWTx.js.map → transition-speed-CNJ0fSpQ.js.map} +1 -1
- package/dist/{units-internal-DFcUYjh3.js → units-internal-BR3a4cIi.js} +26 -29
- package/dist/units-internal-BR3a4cIi.js.map +1 -0
- package/dist/{zip-CYZ0F6BV.js → zip-7JTh61LX.js} +8 -10
- package/dist/zip-7JTh61LX.js.map +1 -0
- package/dist/{zip-CTll_dr0.d.ts → zip-uUjs9Cqx.d.ts} +4 -6
- package/dist/zip-uUjs9Cqx.d.ts.map +1 -0
- package/dist/zip.d.ts +3 -3
- package/dist/zip.js +3 -3
- package/dist/{zoom-BoNyOlPm.js → zoom-CSSeOwM8.js} +1153 -583
- package/dist/zoom-CSSeOwM8.js.map +1 -0
- package/package.json +20 -21
- package/skills/{ts-pptx-upstream → pptx-ts-upstream}/SKILL.md +27 -74
- package/dist/autopage-D4kyVp11.js.map +0 -1
- package/dist/binary-string-CKVAYI3M.js.map +0 -1
- package/dist/body-insets-kVHmjGc6.js.map +0 -1
- package/dist/clip-DHDlnHUq.d.ts.map +0 -1
- package/dist/diagnostics-DiMmBU8P.d.ts.map +0 -1
- package/dist/embedded-fonts-CI_YGW2d.d.ts.map +0 -1
- package/dist/entry-compose-6hF9aTmT.d.ts.map +0 -1
- package/dist/errors-Da2nXCJm.js.map +0 -1
- package/dist/fit-CcXbg__l.js.map +0 -1
- package/dist/font-metrics-CBGmhLo0.d.ts.map +0 -1
- package/dist/grid-9B2w5EaY.js.map +0 -1
- package/dist/html-dom-DvJmuHt2.js.map +0 -1
- package/dist/image-size-DwDbakcl.js.map +0 -1
- package/dist/notes-BcT571R4.js.map +0 -1
- package/dist/options-internal-WqgMf720.js.map +0 -1
- package/dist/package-KoEgVwII.d.ts.map +0 -1
- package/dist/playbtn-CUqQdoDf.js.map +0 -1
- package/dist/pres-BA9_lJbY.d.ts.map +0 -1
- package/dist/presentation-Cyl74rq2.js.map +0 -1
- package/dist/presentation-types-B3VQH4Bz.d.ts.map +0 -1
- package/dist/shapes-BcyFdZpp.js.map +0 -1
- package/dist/slide-BqPtyKmb.d.ts.map +0 -1
- package/dist/table-cell-margins-PDshga8T.js.map +0 -1
- package/dist/text-BvFFMMFQ.js.map +0 -1
- package/dist/text-anchor-BgLPbwbL.js.map +0 -1
- package/dist/units-internal-DFcUYjh3.js.map +0 -1
- package/dist/zip-CTll_dr0.d.ts.map +0 -1
- package/dist/zip-CYZ0F6BV.js.map +0 -1
- package/dist/zoom-BoNyOlPm.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { r as InvalidOptionError, u as warn } from "./entry-errors-JMthgJ2g.js";
|
|
2
|
+
// src/ooxml/emu.ts
|
|
3
3
|
/**
|
|
4
4
|
* The fixed ratios between English Metric Units, points and inches.
|
|
5
5
|
*
|
|
@@ -14,8 +14,7 @@ const EMU_PER_INCH = 914400;
|
|
|
14
14
|
const EMU_PER_POINT = 12700;
|
|
15
15
|
/** Points in one inch. */
|
|
16
16
|
const POINTS_PER_INCH = 72;
|
|
17
|
-
|
|
18
|
-
//#region src/units.ts
|
|
17
|
+
// src/units.ts
|
|
19
18
|
/**
|
|
20
19
|
* DrawingML angle unit. `ST_Angle` (`rot`, shadow `dir`, gradient `ang`, …) is measured in
|
|
21
20
|
* sixtieths-of-a-thousandth of a degree, i.e. 60000 units per degree. Multiply a value in
|
|
@@ -49,7 +48,7 @@ function ptToHundredths(pt) {
|
|
|
49
48
|
assertFiniteNumber(pt, "points");
|
|
50
49
|
return Math.round(pt * 100);
|
|
51
50
|
}
|
|
52
|
-
/** A bare number larger than this (in inches) is almost certainly a mistake
|
|
51
|
+
/** A bare number larger than this (in inches) is almost certainly a mistake, likely a raw EMU
|
|
53
52
|
* value passed where inches are expected. We interpret it as inches (the documented contract) but
|
|
54
53
|
* warn, pointing at the explicit `"<n>emu"` form. ~1000in is far beyond any real slide. */
|
|
55
54
|
const IMPLAUSIBLE_INCHES = 1e3;
|
|
@@ -83,7 +82,7 @@ function pixelsToEmu(pixels, dpi) {
|
|
|
83
82
|
* only `parseCoord` needs it, because every `'50%'` a caller writes comes through there; it is
|
|
84
83
|
* exported because a consumer computing its own geometry against a slide axis needs the same
|
|
85
84
|
* arithmetic, and it belongs with the rest of the conversion set beside it rather than hidden
|
|
86
|
-
* behind the one caller. Left exported deliberately rather than by oversight
|
|
85
|
+
* behind the one caller. Left exported deliberately rather than by oversight. This note is the
|
|
87
86
|
* difference between the two, as it is on {@link emuToPixels}.
|
|
88
87
|
* @param percent - percentage value (e.g. `50` for 50%)
|
|
89
88
|
* @param axisEmu - the axis length in EMU (slide width for x/w, height for y/h)
|
|
@@ -134,15 +133,15 @@ function emuToInches(emu) {
|
|
|
134
133
|
* EMU → points, the unit the write API states line widths, font sizes and text insets in.
|
|
135
134
|
*
|
|
136
135
|
* The one conversion, for the library as well as for a consumer: three private forms of
|
|
137
|
-
* `emu / EMU_PER_POINT` had grown around it
|
|
138
|
-
* the script mapper's `points`, and a dozen inline divisions
|
|
136
|
+
* `emu / EMU_PER_POINT` had grown around it (the read model's `null`-propagating `ptFromEmu`,
|
|
137
|
+
* the script mapper's `points`, and a dozen inline divisions) while this stayed published and
|
|
139
138
|
* uncalled.
|
|
140
139
|
*
|
|
141
140
|
* **The policy, and its one exception.** Every EMU→points conversion goes through here or through
|
|
142
141
|
* `ptFromEmu` in `src/read/api/coords.ts`, which is this with a `null` passed along. (Named rather
|
|
143
142
|
* than linked: it is internal, so a reference link to it resolves to nothing in the published
|
|
144
143
|
* reference.) The exception is
|
|
145
|
-
* `measure/*`
|
|
144
|
+
* `measure/*` (`fit.ts`, `paragraphs.ts`, `table-fit.ts`), where an inner box is computed as
|
|
146
145
|
* `(extent - inset - inset) / EMU_PER_POINT` and then guarded with `!(x > 0)`. That guard is
|
|
147
146
|
* written NaN-first on purpose: a box that cannot be measured is skipped, not reported. This
|
|
148
147
|
* function asserts a finite input and throws instead, which is the right answer for a caller
|
|
@@ -159,7 +158,7 @@ function emuToPoints(emu) {
|
|
|
159
158
|
* **Published for consumers, and used nowhere in `src/` on purpose.** Nothing inside the
|
|
160
159
|
* library thinks in pixels: it is the unit a caller placing library output on a canvas or in a
|
|
161
160
|
* `<img>` needs, and the DPI is theirs to choose. Left exported deliberately rather than by
|
|
162
|
-
* oversight
|
|
161
|
+
* oversight. This note is the difference between the two.
|
|
163
162
|
*/
|
|
164
163
|
function emuToPixels(emu, dpi) {
|
|
165
164
|
assertFiniteNumber(emu, "emu");
|
|
@@ -203,8 +202,26 @@ function assertPositiveFiniteNumber(value, name) {
|
|
|
203
202
|
assertFiniteNumber(value, name);
|
|
204
203
|
if (value <= 0) throw new InvalidOptionError("coord/not-positive", `${name} must be greater than 0`);
|
|
205
204
|
}
|
|
206
|
-
|
|
207
|
-
|
|
205
|
+
// src/ooxml/table-cell-margins.ts
|
|
206
|
+
/**
|
|
207
|
+
* A table cell's default text insets in EMU: the schema defaults of `a:tcPr/@marL`, `@marR`
|
|
208
|
+
* (91440, 0.1in) and `@marT`, `@marB` (45720, 0.05in) on `CT_TableCellProperties`.
|
|
209
|
+
*
|
|
210
|
+
* Unlike the body insets in `body-insets.ts` these are real XSD defaults, so they are transcribed
|
|
211
|
+
* from the schema rather than derived. A cell that states one side leaves the other three at these
|
|
212
|
+
* values, not at zero.
|
|
213
|
+
*
|
|
214
|
+
* A module of its own, importing nothing, because `constants-internal.ts` derives the write path's
|
|
215
|
+
* inch defaults from it and is reached by every entry. Taken from `body-insets.ts`, the record
|
|
216
|
+
* brought that module's other exports into the read entry with it.
|
|
217
|
+
*/
|
|
218
|
+
const TABLE_CELL_MARGIN_DEFAULTS_EMU = {
|
|
219
|
+
left: 91440,
|
|
220
|
+
right: 91440,
|
|
221
|
+
top: 45720,
|
|
222
|
+
bottom: 45720
|
|
223
|
+
};
|
|
224
|
+
// src/enums.ts
|
|
208
225
|
let TextAnchor = /* @__PURE__ */ function(TextAnchor) {
|
|
209
226
|
TextAnchor["b"] = "b";
|
|
210
227
|
TextAnchor["ctr"] = "ctr";
|
|
@@ -448,8 +465,8 @@ let AlignH = /* @__PURE__ */ function(AlignH) {
|
|
|
448
465
|
/**
|
|
449
466
|
* @deprecated The enum form of `VAlign`, which no option actually takes. Use the `VAlign`
|
|
450
467
|
* string union (`'top' | 'middle' | 'bottom'`) or, for a text body's own anchoring,
|
|
451
|
-
* {@link TextAnchor}. Unlike its sibling {@link AlignH}
|
|
452
|
-
* really is typed as
|
|
468
|
+
* {@link TextAnchor}. Unlike its sibling {@link AlignH} (which `TextPropsOptions.align`
|
|
469
|
+
* really is typed as), nothing in the library reads this, so it is a third spelling of a
|
|
453
470
|
* two-spelling fact. It will be removed in the next major.
|
|
454
471
|
*/
|
|
455
472
|
let AlignV = /* @__PURE__ */ function(AlignV) {
|
|
@@ -476,7 +493,7 @@ const EXTRA_SHAPE_PRESETS = [
|
|
|
476
493
|
];
|
|
477
494
|
/**
|
|
478
495
|
* Every shape geometry name pptx-ts can serialize without corrupting the
|
|
479
|
-
* package: the OOXML preset geometries (`ST_ShapeType
|
|
496
|
+
* package: the OOXML preset geometries (`ST_ShapeType`: `ShapeType` values
|
|
480
497
|
* plus the unexposed connectors above) and `custGeom` (freeform paths, emitted
|
|
481
498
|
* as `<a:custGeom>` rather than `<a:prstGeom>`). Used to reject bogus presets
|
|
482
499
|
* before they become an invalid `<a:prstGeom prst="...">` that triggers
|
|
@@ -486,7 +503,7 @@ const VALID_SHAPE_PRESETS = /* @__PURE__ */ new Set([...Object.values(ShapeType)
|
|
|
486
503
|
/**
|
|
487
504
|
* Narrow a public `CHART_NAME` to the internal `ChartType` enum. Because
|
|
488
505
|
* `CHART_NAME` is derived from `ChartType`, every `CHART_NAME` value is by
|
|
489
|
-
* construction a valid enum value, so this conversion is total and safe
|
|
506
|
+
* construction a valid enum value, so this conversion is total and safe. It is
|
|
490
507
|
* the single boundary cast that lets internal code compare against the enum
|
|
491
508
|
* (enum-to-enum) instead of enum-to-string.
|
|
492
509
|
*/
|
|
@@ -499,7 +516,7 @@ const CHART_TYPES = new Set(Object.values(ChartType));
|
|
|
499
516
|
* Is `name` a chart type this library emits?
|
|
500
517
|
*
|
|
501
518
|
* `CHART_NAME` constrains TypeScript callers, but `addChart` is reachable from plain JavaScript
|
|
502
|
-
* where nothing enforces the union
|
|
519
|
+
* where nothing enforces the union, and the two emitters partition the catalog between them by
|
|
503
520
|
* `switch`, so an off-catalog string has no arm in either and cannot produce a plot. Checked once
|
|
504
521
|
* at define time (`gen/define/chart.ts`) so the caller hears about it at the call that was wrong,
|
|
505
522
|
* rather than getting a chart-shaped hole in the deck.
|
|
@@ -526,8 +543,8 @@ const CHARTEX_TYPES = /* @__PURE__ */ new Set([
|
|
|
526
543
|
"regionMap"
|
|
527
544
|
]);
|
|
528
545
|
/**
|
|
529
|
-
* Is `type` a chartEx (cx:) chart? Accepts a `ChartType`/`CHART_NAME` string; anything else
|
|
530
|
-
* including a combo-chart `ChartMulti[]` array or `undefined`
|
|
546
|
+
* Is `type` a chartEx (cx:) chart? Accepts a `ChartType`/`CHART_NAME` string; anything else
|
|
547
|
+
* (including a combo-chart `ChartMulti[]` array or `undefined`) is not a chartEx type (combos are
|
|
531
548
|
* classic-only), so those return `false`.
|
|
532
549
|
*/
|
|
533
550
|
function isChartExType(type) {
|
|
@@ -554,7 +571,7 @@ let SlideObjectType = /* @__PURE__ */ function(SlideObjectType) {
|
|
|
554
571
|
/**
|
|
555
572
|
* Maps a friendly `ConnectorType` to its OOXML connector preset *family*. `straight`
|
|
556
573
|
* has a single fixed preset; `elbow` and `curved` select a member by bend count
|
|
557
|
-
* (`bentConnector{3,4,5}` / `curvedConnector{3,4,5}`)
|
|
574
|
+
* (`bentConnector{3,4,5}` / `curvedConnector{3,4,5}`); see `connectorPresetFor`.
|
|
558
575
|
*
|
|
559
576
|
* Not exported: `connectorPresetFor`, eleven lines below, is its only reader, and
|
|
560
577
|
* `docs/contributing/architecture.md` puts internal OOXML generators off the published surface unless
|
|
@@ -603,8 +620,9 @@ let BulletType = /* @__PURE__ */ function(BulletType) {
|
|
|
603
620
|
* Built-in PowerPoint table style IDs.
|
|
604
621
|
*
|
|
605
622
|
* Each value is the GUID that goes into `<a:tableStyleId>` inside `<a:tblPr>`.
|
|
606
|
-
* These 74 GUIDs are the complete set defined in [MS-OE376] §5.1.6.10
|
|
607
|
-
*
|
|
623
|
+
* These 74 GUIDs are the complete set defined in [MS-OE376] §5.1.6.10. PowerPoint
|
|
624
|
+
* resolves them from its own gallery; the deck also carries the definition of each one
|
|
625
|
+
* its tables use in `ppt/tableStyles.xml`, as PowerPoint writes it, for other readers.
|
|
608
626
|
*
|
|
609
627
|
* Only these enum members are supported. Raw GUID strings are not accepted;
|
|
610
628
|
* use `TableStyle` members exclusively.
|
|
@@ -689,27 +707,6 @@ let TableStyle = /* @__PURE__ */ function(TableStyle) {
|
|
|
689
707
|
TableStyle["DARK_STYLE_2_ACCENT_5_ACCENT_6"] = "{46F890A9-2807-4EBB-B81D-B2AA78EC7F39}";
|
|
690
708
|
return TableStyle;
|
|
691
709
|
}({});
|
|
692
|
-
|
|
693
|
-
//#region src/ooxml/table-cell-margins.ts
|
|
694
|
-
/**
|
|
695
|
-
* A table cell's default text insets in EMU: the schema defaults of `a:tcPr/@marL`, `@marR`
|
|
696
|
-
* (91440, 0.1in) and `@marT`, `@marB` (45720, 0.05in) on `CT_TableCellProperties`.
|
|
697
|
-
*
|
|
698
|
-
* Unlike the body insets in `body-insets.ts` these are real XSD defaults, so they are transcribed
|
|
699
|
-
* from the schema rather than derived. A cell that states one side leaves the other three at these
|
|
700
|
-
* values, not at zero.
|
|
701
|
-
*
|
|
702
|
-
* A module of its own, importing nothing, because `constants-internal.ts` derives the write path's
|
|
703
|
-
* inch defaults from it and is reached by every entry. Taken from `body-insets.ts`, the record
|
|
704
|
-
* brought that module's other exports into the read entry with it.
|
|
705
|
-
*/
|
|
706
|
-
const TABLE_CELL_MARGIN_DEFAULTS_EMU = {
|
|
707
|
-
left: 91440,
|
|
708
|
-
right: 91440,
|
|
709
|
-
top: 45720,
|
|
710
|
-
bottom: 45720
|
|
711
|
-
};
|
|
712
|
-
//#endregion
|
|
713
|
-
export { inchesToEmu as A, MIN_COORDINATE_EMU as C, emuToInches as D, coordToEmu as E, EMU_PER_INCH as F, EMU_PER_POINT as I, POINTS_PER_INCH as L, pixelsToEmu as M, pointsToEmu as N, emuToPixels as O, ptToHundredths as P, MAX_COORDINATE_EMU as S, STANDARD_LAYOUTS as T, isChartType as _, ChartType as a, FIXED_PCT_PER_PERCENT as b, SchemeColor as c, TableStyle as d, TextAnchor as f, isChartExType as g, connectorPresetFor as h, BulletType as i, percentToEmu as j, emuToPoints as k, ShapeType as l, asChartType as m, AlignH as n, OutputType as o, VALID_SHAPE_PRESETS as p, AlignV as r, PlaceholderType as s, TABLE_CELL_MARGIN_DEFAULTS_EMU as t, SlideObjectType as u, ANGLE_UNITS_PER_DEGREE as v, PERCENT_SCALE as w, HUNDREDTHS_PER_POINT as x, DEFAULT_PX_PER_INCH as y };
|
|
710
|
+
export { inchesToEmu as A, MIN_COORDINATE_EMU as C, emuToInches as D, coordToEmu as E, EMU_PER_INCH as F, EMU_PER_POINT as I, POINTS_PER_INCH as L, pixelsToEmu as M, pointsToEmu as N, emuToPixels as O, ptToHundredths as P, MAX_COORDINATE_EMU as S, STANDARD_LAYOUTS as T, TABLE_CELL_MARGIN_DEFAULTS_EMU as _, OutputType as a, FIXED_PCT_PER_PERCENT as b, ShapeType as c, TextAnchor as d, VALID_SHAPE_PRESETS as f, isChartType as g, isChartExType as h, ChartType as i, percentToEmu as j, emuToPoints as k, SlideObjectType as l, connectorPresetFor as m, AlignV as n, PlaceholderType as o, asChartType as p, BulletType as r, SchemeColor as s, AlignH as t, TableStyle as u, ANGLE_UNITS_PER_DEGREE as v, PERCENT_SCALE as w, HUNDREDTHS_PER_POINT as x, DEFAULT_PX_PER_INCH as y };
|
|
714
711
|
|
|
715
|
-
//# sourceMappingURL=
|
|
712
|
+
//# sourceMappingURL=enums-BP9wsb9Q.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums-BP9wsb9Q.js","names":[],"sources":["../src/ooxml/emu.ts","../src/units.ts","../src/ooxml/table-cell-margins.ts","../src/enums.ts"],"sourcesContent":["/**\n * The fixed ratios between English Metric Units, points and inches.\n *\n * `units.ts` publishes them, but it also holds the unit converters, which warn and throw, so it\n * imports `diagnostics.ts` and `errors.ts` at run time. A schema fact in `ooxml/` that only needs\n * a ratio (`body-insets.ts`) took both along with it. This module imports nothing, and `units.ts`\n * re-exports it, so the public names are unchanged.\n */\n\n/** EMU in one inch. */\nexport const EMU_PER_INCH = 914400\n/** EMU in one point. */\nexport const EMU_PER_POINT = 12700\n/** Points in one inch. */\nexport const POINTS_PER_INCH = 72\n","import { warn } from './diagnostics.js'\nimport { InvalidOptionError } from './errors.js'\nimport { EMU_PER_INCH, EMU_PER_POINT, POINTS_PER_INCH } from './ooxml/emu.js'\n/**\n * Public unit conversion helpers and standard PowerPoint slide-layout constants.\n */\n\n// Declared in `ooxml/emu.ts`, which imports nothing, so a schema fact can use them without this\n// module's run-time imports.\nexport { EMU_PER_INCH, EMU_PER_POINT, POINTS_PER_INCH }\n\n/**\n * DrawingML angle unit. `ST_Angle` (`rot`, shadow `dir`, gradient `ang`, …) is measured in\n * sixtieths-of-a-thousandth of a degree, i.e. 60000 units per degree. Multiply a value in\n * degrees by this to get the OOXML integer.\n */\nexport const ANGLE_UNITS_PER_DEGREE = 60000\n\n/**\n * DrawingML fixed-point percentage scale. `ST_Percentage` / `ST_PositiveFixedPercentage` and\n * related types (`<a:alpha>`, `<a:spcPct>`, shape adjustment guides, `<p:tav tm>`, …) encode\n * 100% as the integer 100000. Multiply a 0-1 fraction by this to get the OOXML value.\n */\nexport const PERCENT_SCALE = 100000\n\n/**\n * Scale for a percentage supplied as 0-100 (rather than a 0-1 fraction) into the same\n * fixed-point percentage integer as {@link PERCENT_SCALE} (1% = 1000 units, i.e. thousandths\n * of a percent). Use for inputs documented as percents: transparency/alpha, image crop insets,\n * gradient stops, bullet size, connector adjust, etc.\n */\nexport const FIXED_PCT_PER_PERCENT = PERCENT_SCALE / 100\n\n/**\n * DrawingML text measures font size (`sz`), character spacing (`spc`) and point line/paragraph\n * spacing (`<a:spcPts val>`) in hundredths of a point. Multiply a value in points by this to get\n * the OOXML integer.\n */\nexport const HUNDREDTHS_PER_POINT = 100\n\n/**\n * Convert a value in points to hundredths of a point (rounded), the integer unit DrawingML uses\n * for `sz`, `spc`, and `<a:spcPts val>`. See {@link HUNDREDTHS_PER_POINT}.\n */\nexport function ptToHundredths(pt: number): number {\n\tassertFiniteNumber(pt, 'points')\n\treturn Math.round(pt * HUNDREDTHS_PER_POINT)\n}\n\n/**\n * English Metric Units: the integer unit OOXML serializes geometry in (914400 per inch).\n *\n * Branded so a value that has already been resolved to EMU cannot be silently fed back into a\n * unit converter: {@link coordToEmu} only accepts a user `Coord`, so passing an `Emu` into it is\n * a compile-time error. This replaces the old runtime \"a number ≥ 100 must already be EMU\"\n * magnitude guess, which silently mis-rendered values near the threshold.\n */\nexport type Emu = number & { readonly __unit: 'emu' }\n\n/** A bare number larger than this (in inches) is almost certainly a mistake, likely a raw EMU\n * value passed where inches are expected. We interpret it as inches (the documented contract) but\n * warn, pointing at the explicit `\"<n>emu\"` form. ~1000in is far beyond any real slide. */\nconst IMPLAUSIBLE_INCHES = 1000\n\n/** Default pixel density for the `\"<n>px\"` coordinate unit: CSS reference pixels, also the\n * density pptx-ts assumes when reading an image header's pixel dimensions. */\nexport const DEFAULT_PX_PER_INCH = 96\n\n/**\n * The largest DrawingML coordinate, in EMU: the `maxInclusive` of `ST_Coordinate`, the type of\n * every shape offset and extent. The range is not symmetric; see {@link MIN_COORDINATE_EMU}.\n */\nexport const MAX_COORDINATE_EMU = 27273042316900\n\n/** The smallest DrawingML coordinate, in EMU: the `minInclusive` of `ST_Coordinate`. */\nexport const MIN_COORDINATE_EMU = -27273042329600\n\nexport type StandardLayoutName = 'LAYOUT_4x3' | 'LAYOUT_16x9' | 'LAYOUT_16x10' | 'LAYOUT_WIDE'\n\nexport interface StandardLayout {\n\t/** pptx-ts layout key used with `pptx.layout`. */\n\treadonly layout: StandardLayoutName\n\t/** PresentationML slide-size preset name, or `custom` for PowerPoint widescreen. */\n\treadonly name: string\n\t/** Slide width in inches. Inches is pptx-ts's default coordinate unit, so this is the value to use for `addText`/`addShape` math. */\n\treadonly widthIn: number\n\t/** Slide height in inches. */\n\treadonly heightIn: number\n\t/** Slide width in English Metric Units. */\n\treadonly widthEmu: number\n\t/** Slide height in English Metric Units. */\n\treadonly heightEmu: number\n}\n\nexport function inchesToEmu(inches: number): Emu {\n\tassertFiniteNumber(inches, 'inches')\n\treturn inCoordinateRange(Math.round(inches * EMU_PER_INCH), inches, 'inches')\n}\n\nexport function pointsToEmu(points: number): Emu {\n\tassertFiniteNumber(points, 'points')\n\treturn inCoordinateRange(Math.round(points * EMU_PER_POINT), points, 'points')\n}\n\nexport function pixelsToEmu(pixels: number, dpi: number): Emu {\n\tassertFiniteNumber(pixels, 'pixels')\n\tassertPositiveFiniteNumber(dpi, 'dpi')\n\treturn inchesToEmu(pixels / dpi)\n}\n\n/**\n * Resolve a percentage of an axis length to EMU.\n *\n * **Published for consumers, and reached from one place inside `src/` on purpose.** Internally\n * only `parseCoord` needs it, because every `'50%'` a caller writes comes through there; it is\n * exported because a consumer computing its own geometry against a slide axis needs the same\n * arithmetic, and it belongs with the rest of the conversion set beside it rather than hidden\n * behind the one caller. Left exported deliberately rather than by oversight. This note is the\n * difference between the two, as it is on {@link emuToPixels}.\n * @param percent - percentage value (e.g. `50` for 50%)\n * @param axisEmu - the axis length in EMU (slide width for x/w, height for y/h)\n */\nexport function percentToEmu(percent: number, axisEmu: number): Emu {\n\tassertFiniteNumber(percent, 'percent')\n\tassertFiniteNumber(axisEmu, 'axisEmu')\n\treturn inCoordinateRange(Math.round((percent / 100) * axisEmu), percent, 'percent')\n}\n\n/**\n * The single user-coordinate → EMU boundary. Convert each user-supplied coordinate exactly once.\n *\n * Accepts (see {@link Coord}):\n * - a bare `number` → **always inches** (the documented unit); no magnitude guessing\n * - `\"<n>%\"` → percentage of `axisEmu`\n * - `\"<n>in\"` / `\"<n>pt\"` / `\"<n>px\"` / `\"<n>emu\"` → explicit units (the escape hatch for non-inch\n * values). `px` is resolved at {@link DEFAULT_PX_PER_INCH} (96), for authoring against a known\n * web/source canvas size.\n *\n * Throws on non-finite or unparseable input rather than silently emitting a degenerate 0-size.\n * @param value - user coordinate\n * @param axisEmu - axis length in EMU, used only to resolve percentages\n */\nexport function coordToEmu(value: number | string, axisEmu: number): Emu {\n\tif (typeof value === 'number') {\n\t\tassertFiniteNumber(value, 'coordinate')\n\t\tif (Math.abs(value) > IMPLAUSIBLE_INCHES) {\n\t\t\twarn(\n\t\t\t\t'coord/bare-number-is-inches',\n\t\t\t\t`coordinate ${value} interpreted as ${value} inches. A bare number is always inches; ` +\n\t\t\t\t\t`if you meant EMU, pass it as a string like \"${Math.round(value)}emu\".`\n\t\t\t)\n\t\t}\n\t\treturn inchesToEmu(value)\n\t}\n\n\tconst match = /^\\s*(-?\\d*\\.?\\d+)\\s*(%|in|pt|px|emu)\\s*$/.exec(value)\n\tif (!match) {\n\t\tthrow new InvalidOptionError(\n\t\t\t'coord/invalid-format',\n\t\t\t`Invalid coordinate \"${value}\". Expected a number (inches) or a string like \"50%\", \"5in\", \"72pt\", \"96px\", or \"914400emu\".`\n\t\t)\n\t}\n\tconst n = Number(match[1])\n\tswitch (match[2]) {\n\t\tcase '%':\n\t\t\treturn percentToEmu(n, axisEmu)\n\t\tcase 'in':\n\t\t\treturn inchesToEmu(n)\n\t\tcase 'pt':\n\t\t\treturn pointsToEmu(n)\n\t\tcase 'px':\n\t\t\treturn pixelsToEmu(n, DEFAULT_PX_PER_INCH)\n\t\tdefault: // 'emu'\n\t\t\tassertFiniteNumber(n, 'coordinate')\n\t\t\treturn inCoordinateRange(Math.round(n), n, 'EMU')\n\t}\n}\n\nexport function emuToInches(emu: number): number {\n\tassertFiniteNumber(emu, 'emu')\n\treturn emu / EMU_PER_INCH\n}\n\n/**\n * EMU → points, the unit the write API states line widths, font sizes and text insets in.\n *\n * The one conversion, for the library as well as for a consumer: three private forms of\n * `emu / EMU_PER_POINT` had grown around it (the read model's `null`-propagating `ptFromEmu`,\n * the script mapper's `points`, and a dozen inline divisions) while this stayed published and\n * uncalled.\n *\n * **The policy, and its one exception.** Every EMU→points conversion goes through here or through\n * `ptFromEmu` in `src/read/api/coords.ts`, which is this with a `null` passed along. (Named rather\n * than linked: it is internal, so a reference link to it resolves to nothing in the published\n * reference.) The exception is\n * `measure/*` (`fit.ts`, `paragraphs.ts`, `table-fit.ts`), where an inner box is computed as\n * `(extent - inset - inset) / EMU_PER_POINT` and then guarded with `!(x > 0)`. That guard is\n * written NaN-first on purpose: a box that cannot be measured is skipped, not reported. This\n * function asserts a finite input and throws instead, which is the right answer for a caller\n * stating a value and the wrong one for a pass whose whole job is to degrade quietly. Those\n * sites keep the division; nothing else may.\n */\nexport function emuToPoints(emu: number): number {\n\tassertFiniteNumber(emu, 'emu')\n\treturn emu / EMU_PER_POINT\n}\n\n/**\n * EMU → whole pixels at a stated DPI.\n *\n * **Published for consumers, and used nowhere in `src/` on purpose.** Nothing inside the\n * library thinks in pixels: it is the unit a caller placing library output on a canvas or in a\n * `<img>` needs, and the DPI is theirs to choose. Left exported deliberately rather than by\n * oversight. This note is the difference between the two.\n */\nexport function emuToPixels(emu: number, dpi: number): number {\n\tassertFiniteNumber(emu, 'emu')\n\tassertPositiveFiniteNumber(dpi, 'dpi')\n\treturn Math.round(emuToInches(emu) * dpi)\n}\n\nfunction standardLayout(layout: StandardLayoutName, name: string, widthIn: number, heightIn: number): StandardLayout {\n\treturn Object.freeze({\n\t\tlayout,\n\t\tname,\n\t\twidthIn,\n\t\theightIn,\n\t\twidthEmu: inchesToEmu(widthIn),\n\t\theightEmu: inchesToEmu(heightIn),\n\t})\n}\n\nexport const STANDARD_LAYOUTS: Readonly<Record<StandardLayoutName, StandardLayout>> = Object.freeze({\n\tLAYOUT_4x3: standardLayout('LAYOUT_4x3', 'screen4x3', 10, 7.5),\n\tLAYOUT_16x9: standardLayout('LAYOUT_16x9', 'screen16x9', 10, 5.625),\n\tLAYOUT_16x10: standardLayout('LAYOUT_16x10', 'screen16x10', 10, 6.25),\n\tLAYOUT_WIDE: standardLayout('LAYOUT_WIDE', 'custom', 40 / 3, 7.5),\n})\n\n/**\n * `emu` as an `Emu`, or a `coord/out-of-range` throw when it falls outside `ST_Coordinate`.\n *\n * A finite input is not enough on its own. `1e16` inches is finite and converts to `9.144e+21`,\n * which serializes in exponent notation and is not an `xsd:long` at all; `4e7` inches converts to\n * a long, but one past the bound. Neither is a coordinate PowerPoint can hold.\n * @param emu - the converted value\n * @param value - the caller's value, for the message\n * @param unit - the unit `value` was stated in, for the message\n */\nfunction inCoordinateRange(emu: number, value: number, unit: string): Emu {\n\tif (emu < MIN_COORDINATE_EMU || emu > MAX_COORDINATE_EMU)\n\t\tthrow new InvalidOptionError(\n\t\t\t'coord/out-of-range',\n\t\t\t`${value} ${unit} is ${emu} EMU, outside the DrawingML coordinate range ${MIN_COORDINATE_EMU} to ${MAX_COORDINATE_EMU} EMU.`\n\t\t)\n\treturn emu as Emu\n}\n\nfunction assertFiniteNumber(value: number, name: string): void {\n\tif (!Number.isFinite(value)) throw new InvalidOptionError('coord/non-finite', `${name} must be a finite number`)\n}\n\nfunction assertPositiveFiniteNumber(value: number, name: string): void {\n\tassertFiniteNumber(value, name)\n\tif (value <= 0) throw new InvalidOptionError('coord/not-positive', `${name} must be greater than 0`)\n}\n","/**\n * A table cell's default text insets in EMU: the schema defaults of `a:tcPr/@marL`, `@marR`\n * (91440, 0.1in) and `@marT`, `@marB` (45720, 0.05in) on `CT_TableCellProperties`.\n *\n * Unlike the body insets in `body-insets.ts` these are real XSD defaults, so they are transcribed\n * from the schema rather than derived. A cell that states one side leaves the other three at these\n * values, not at zero.\n *\n * A module of its own, importing nothing, because `constants-internal.ts` derives the write path's\n * inch defaults from it and is reached by every entry. Taken from `body-insets.ts`, the record\n * brought that module's other exports into the read entry with it.\n */\nexport const TABLE_CELL_MARGIN_DEFAULTS_EMU = { left: 91440, right: 91440, top: 45720, bottom: 45720 } as const\n","/**\n * pptx-ts Enums\n * NOTE: `enum` wont work for objects, so use `Object.freeze`\n */\n\n/**\n * Output-type name accepted by the zip/write layer. Derived from the `OutputType`\n * enum (see below) so the two never drift: adding a member to the enum extends this\n * union automatically.\n */\nexport type ZIP_OUTPUT_TYPE = `${OutputType}`\nexport type WRITE_OUTPUT_TYPE = ZIP_OUTPUT_TYPE\n/**\n * Public chart-type name accepted by `addChart()`. Derived from the internal\n * `ChartType` enum (see below) so the two never drift: adding a member to the\n * enum extends this union automatically.\n */\nexport type CHART_NAME = `${ChartType}`\n/**\n * Public scheme-color name. Derived from the `SchemeColor` enum (see below) so the\n * two never drift.\n */\nexport type SCHEME_COLORS = `${SchemeColor}`\n\nexport enum TextAnchor {\n\tb = 'b',\n\tctr = 'ctr',\n\tt = 't',\n}\n\n// ENUM\nexport enum OutputType {\n\tarraybuffer = 'arraybuffer',\n\tbase64 = 'base64',\n\tbinarystring = 'binarystring',\n\tblob = 'blob',\n\tnodebuffer = 'nodebuffer',\n\tuint8array = 'uint8array',\n}\nexport enum ChartType {\n\tarea = 'area',\n\tbar = 'bar',\n\tbar3d = 'bar3D',\n\tbubble = 'bubble',\n\tbubble3d = 'bubble3D',\n\tdoughnut = 'doughnut',\n\tline = 'line',\n\tpie = 'pie',\n\tradar = 'radar',\n\tscatter = 'scatter',\n\tstock = 'stock',\n\tsurface = 'surface',\n\twaterfall = 'waterfall',\n\tfunnel = 'funnel',\n\ttreemap = 'treemap',\n\tsunburst = 'sunburst',\n\thistogram = 'histogram',\n\tpareto = 'pareto',\n\tboxWhisker = 'boxWhisker',\n\tregionMap = 'regionMap',\n}\nexport enum ShapeType {\n\taccentBorderCallout1 = 'accentBorderCallout1',\n\taccentBorderCallout2 = 'accentBorderCallout2',\n\taccentBorderCallout3 = 'accentBorderCallout3',\n\taccentCallout1 = 'accentCallout1',\n\taccentCallout2 = 'accentCallout2',\n\taccentCallout3 = 'accentCallout3',\n\tactionButtonBackPrevious = 'actionButtonBackPrevious',\n\tactionButtonBeginning = 'actionButtonBeginning',\n\tactionButtonBlank = 'actionButtonBlank',\n\tactionButtonDocument = 'actionButtonDocument',\n\tactionButtonEnd = 'actionButtonEnd',\n\tactionButtonForwardNext = 'actionButtonForwardNext',\n\tactionButtonHelp = 'actionButtonHelp',\n\tactionButtonHome = 'actionButtonHome',\n\tactionButtonInformation = 'actionButtonInformation',\n\tactionButtonMovie = 'actionButtonMovie',\n\tactionButtonReturn = 'actionButtonReturn',\n\tactionButtonSound = 'actionButtonSound',\n\tarc = 'arc',\n\tbentArrow = 'bentArrow',\n\tbentUpArrow = 'bentUpArrow',\n\tbevel = 'bevel',\n\tblockArc = 'blockArc',\n\tborderCallout1 = 'borderCallout1',\n\tborderCallout2 = 'borderCallout2',\n\tborderCallout3 = 'borderCallout3',\n\tbracePair = 'bracePair',\n\tbracketPair = 'bracketPair',\n\tcallout1 = 'callout1',\n\tcallout2 = 'callout2',\n\tcallout3 = 'callout3',\n\tcan = 'can',\n\tchartPlus = 'chartPlus',\n\tchartStar = 'chartStar',\n\tchartX = 'chartX',\n\tchevron = 'chevron',\n\tchord = 'chord',\n\tcircularArrow = 'circularArrow',\n\tcloud = 'cloud',\n\tcloudCallout = 'cloudCallout',\n\tcorner = 'corner',\n\tcornerTabs = 'cornerTabs',\n\tcube = 'cube',\n\tcurvedDownArrow = 'curvedDownArrow',\n\tcurvedLeftArrow = 'curvedLeftArrow',\n\tcurvedRightArrow = 'curvedRightArrow',\n\tcurvedUpArrow = 'curvedUpArrow',\n\tcustGeom = 'custGeom',\n\tdecagon = 'decagon',\n\tdiagStripe = 'diagStripe',\n\tdiamond = 'diamond',\n\tdodecagon = 'dodecagon',\n\tdonut = 'donut',\n\tdoubleWave = 'doubleWave',\n\tdownArrow = 'downArrow',\n\tdownArrowCallout = 'downArrowCallout',\n\tellipse = 'ellipse',\n\tellipseRibbon = 'ellipseRibbon',\n\tellipseRibbon2 = 'ellipseRibbon2',\n\tflowChartAlternateProcess = 'flowChartAlternateProcess',\n\tflowChartCollate = 'flowChartCollate',\n\tflowChartConnector = 'flowChartConnector',\n\tflowChartDecision = 'flowChartDecision',\n\tflowChartDelay = 'flowChartDelay',\n\tflowChartDisplay = 'flowChartDisplay',\n\tflowChartDocument = 'flowChartDocument',\n\tflowChartExtract = 'flowChartExtract',\n\tflowChartInputOutput = 'flowChartInputOutput',\n\tflowChartInternalStorage = 'flowChartInternalStorage',\n\tflowChartMagneticDisk = 'flowChartMagneticDisk',\n\tflowChartMagneticDrum = 'flowChartMagneticDrum',\n\tflowChartMagneticTape = 'flowChartMagneticTape',\n\tflowChartManualInput = 'flowChartManualInput',\n\tflowChartManualOperation = 'flowChartManualOperation',\n\tflowChartMerge = 'flowChartMerge',\n\tflowChartMultidocument = 'flowChartMultidocument',\n\tflowChartOfflineStorage = 'flowChartOfflineStorage',\n\tflowChartOffpageConnector = 'flowChartOffpageConnector',\n\tflowChartOnlineStorage = 'flowChartOnlineStorage',\n\tflowChartOr = 'flowChartOr',\n\tflowChartPredefinedProcess = 'flowChartPredefinedProcess',\n\tflowChartPreparation = 'flowChartPreparation',\n\tflowChartProcess = 'flowChartProcess',\n\tflowChartPunchedCard = 'flowChartPunchedCard',\n\tflowChartPunchedTape = 'flowChartPunchedTape',\n\tflowChartSort = 'flowChartSort',\n\tflowChartSummingJunction = 'flowChartSummingJunction',\n\tflowChartTerminator = 'flowChartTerminator',\n\tfoldedCorner = 'foldedCorner',\n\tframe = 'frame',\n\tfunnel = 'funnel',\n\tgear6 = 'gear6',\n\tgear9 = 'gear9',\n\thalfFrame = 'halfFrame',\n\theart = 'heart',\n\theptagon = 'heptagon',\n\thexagon = 'hexagon',\n\thomePlate = 'homePlate',\n\thorizontalScroll = 'horizontalScroll',\n\tirregularSeal1 = 'irregularSeal1',\n\tirregularSeal2 = 'irregularSeal2',\n\tleftArrow = 'leftArrow',\n\tleftArrowCallout = 'leftArrowCallout',\n\tleftBrace = 'leftBrace',\n\tleftBracket = 'leftBracket',\n\tleftCircularArrow = 'leftCircularArrow',\n\tleftRightArrow = 'leftRightArrow',\n\tleftRightArrowCallout = 'leftRightArrowCallout',\n\tleftRightCircularArrow = 'leftRightCircularArrow',\n\tleftRightRibbon = 'leftRightRibbon',\n\tleftRightUpArrow = 'leftRightUpArrow',\n\tleftUpArrow = 'leftUpArrow',\n\tlightningBolt = 'lightningBolt',\n\tline = 'line',\n\tlineInv = 'lineInv',\n\tmathDivide = 'mathDivide',\n\tmathEqual = 'mathEqual',\n\tmathMinus = 'mathMinus',\n\tmathMultiply = 'mathMultiply',\n\tmathNotEqual = 'mathNotEqual',\n\tmathPlus = 'mathPlus',\n\tmoon = 'moon',\n\tnoSmoking = 'noSmoking',\n\tnonIsoscelesTrapezoid = 'nonIsoscelesTrapezoid',\n\tnotchedRightArrow = 'notchedRightArrow',\n\toctagon = 'octagon',\n\tparallelogram = 'parallelogram',\n\tpentagon = 'pentagon',\n\tpie = 'pie',\n\tpieWedge = 'pieWedge',\n\tplaque = 'plaque',\n\tplaqueTabs = 'plaqueTabs',\n\tplus = 'plus',\n\tquadArrow = 'quadArrow',\n\tquadArrowCallout = 'quadArrowCallout',\n\trect = 'rect',\n\tribbon = 'ribbon',\n\tribbon2 = 'ribbon2',\n\trightArrow = 'rightArrow',\n\trightArrowCallout = 'rightArrowCallout',\n\trightBrace = 'rightBrace',\n\trightBracket = 'rightBracket',\n\tround1Rect = 'round1Rect',\n\tround2DiagRect = 'round2DiagRect',\n\tround2SameRect = 'round2SameRect',\n\troundRect = 'roundRect',\n\trtTriangle = 'rtTriangle',\n\tsmileyFace = 'smileyFace',\n\tsnip1Rect = 'snip1Rect',\n\tsnip2DiagRect = 'snip2DiagRect',\n\tsnip2SameRect = 'snip2SameRect',\n\tsnipRoundRect = 'snipRoundRect',\n\tsquareTabs = 'squareTabs',\n\tstar10 = 'star10',\n\tstar12 = 'star12',\n\tstar16 = 'star16',\n\tstar24 = 'star24',\n\tstar32 = 'star32',\n\tstar4 = 'star4',\n\tstar5 = 'star5',\n\tstar6 = 'star6',\n\tstar7 = 'star7',\n\tstar8 = 'star8',\n\tstripedRightArrow = 'stripedRightArrow',\n\tsun = 'sun',\n\tswooshArrow = 'swooshArrow',\n\tteardrop = 'teardrop',\n\ttrapezoid = 'trapezoid',\n\ttriangle = 'triangle',\n\tupArrow = 'upArrow',\n\tupArrowCallout = 'upArrowCallout',\n\tupDownArrow = 'upDownArrow',\n\tupDownArrowCallout = 'upDownArrowCallout',\n\tuturnArrow = 'uturnArrow',\n\tverticalScroll = 'verticalScroll',\n\twave = 'wave',\n\twedgeEllipseCallout = 'wedgeEllipseCallout',\n\twedgeRectCallout = 'wedgeRectCallout',\n\twedgeRoundRectCallout = 'wedgeRoundRectCallout',\n}\nexport enum SchemeColor {\n\ttext1 = 'tx1',\n\ttext2 = 'tx2',\n\tbackground1 = 'bg1',\n\tbackground2 = 'bg2',\n\taccent1 = 'accent1',\n\taccent2 = 'accent2',\n\taccent3 = 'accent3',\n\taccent4 = 'accent4',\n\taccent5 = 'accent5',\n\taccent6 = 'accent6',\n}\nexport enum AlignH {\n\tleft = 'left',\n\tcenter = 'center',\n\tright = 'right',\n\tjustify = 'justify',\n}\n/**\n * @deprecated The enum form of `VAlign`, which no option actually takes. Use the `VAlign`\n * string union (`'top' | 'middle' | 'bottom'`) or, for a text body's own anchoring,\n * {@link TextAnchor}. Unlike its sibling {@link AlignH} (which `TextPropsOptions.align`\n * really is typed as), nothing in the library reads this, so it is a third spelling of a\n * two-spelling fact. It will be removed in the next major.\n */\nexport enum AlignV {\n\ttop = 'top',\n\tmiddle = 'middle',\n\tbottom = 'bottom',\n}\n\n/**\n * Every shape geometry name `addShape` accepts: the friendly {@link ShapeType} names plus the\n * connector presets that enum does not surface.\n *\n * Derived from `ShapeType` rather than spelled out, for the reason `CHART_NAME`, `SCHEME_COLORS`,\n * `PLACEHOLDER_TYPE` and `CONNECTOR_PRESET_NAME` are each derived from their runtime source: the\n * two cannot drift. The hand-written union this replaced had all 179 members in enum order, and\n * the runtime `VALID_SHAPE_PRESETS` set was already built from `Object.values(ShapeType)`, so the\n * type and the set it is supposed to describe could disagree on exactly the half nothing checked.\n * The union this produces is character-for-character the one it replaces.\n */\nexport type SHAPE_NAME = `${ShapeType}` | CONNECTOR_PRESET_NAME\n\n/**\n * Valid ECMA-376 `ST_ShapeType` presets that are not surfaced with a friendly\n * `ShapeType` name. They are still legal geometries PowerPoint renders, so the\n * preset-validation set must accept them.\n */\nconst EXTRA_SHAPE_PRESETS = [\n\t'straightConnector1',\n\t'bentConnector2',\n\t'bentConnector3',\n\t'bentConnector4',\n\t'bentConnector5',\n\t'curvedConnector2',\n\t'curvedConnector3',\n\t'curvedConnector4',\n\t'curvedConnector5',\n] as const\n\n/**\n * Connector preset geometries (`straightConnector1` / `bentConnector{2-5}` /\n * `curvedConnector{2-5}`) that `addShape` can serialize but that are not surfaced\n * as friendly `ShapeType` names. Derived from `EXTRA_SHAPE_PRESETS` so the public\n * `SHAPE_NAME` union and the runtime `VALID_SHAPE_PRESETS` set share one source of\n * truth and cannot drift. Use `addConnector` for live, endpoint-bound connectors;\n * pass these to `addShape` for a static box-positioned connector geometry.\n */\nexport type CONNECTOR_PRESET_NAME = (typeof EXTRA_SHAPE_PRESETS)[number]\n\n/**\n * Every shape geometry name pptx-ts can serialize without corrupting the\n * package: the OOXML preset geometries (`ST_ShapeType`: `ShapeType` values\n * plus the unexposed connectors above) and `custGeom` (freeform paths, emitted\n * as `<a:custGeom>` rather than `<a:prstGeom>`). Used to reject bogus presets\n * before they become an invalid `<a:prstGeom prst=\"...\">` that triggers\n * PowerPoint's \"needs repair\" dialog and drops the shape.\n */\nexport const VALID_SHAPE_PRESETS: ReadonlySet<string> = new Set<string>([\n\t...Object.values(ShapeType),\n\t...EXTRA_SHAPE_PRESETS,\n])\n\n/**\n * Narrow a public `CHART_NAME` to the internal `ChartType` enum. Because\n * `CHART_NAME` is derived from `ChartType`, every `CHART_NAME` value is by\n * construction a valid enum value, so this conversion is total and safe. It is\n * the single boundary cast that lets internal code compare against the enum\n * (enum-to-enum) instead of enum-to-string.\n */\nexport function asChartType(name: CHART_NAME): ChartType {\n\treturn name as ChartType\n}\n\n/** Every {@link ChartType} value, for validating a caller-supplied `type` at the API boundary. */\nconst CHART_TYPES: ReadonlySet<string> = new Set<string>(Object.values(ChartType))\n\n/**\n * Is `name` a chart type this library emits?\n *\n * `CHART_NAME` constrains TypeScript callers, but `addChart` is reachable from plain JavaScript\n * where nothing enforces the union, and the two emitters partition the catalog between them by\n * `switch`, so an off-catalog string has no arm in either and cannot produce a plot. Checked once\n * at define time (`gen/define/chart.ts`) so the caller hears about it at the call that was wrong,\n * rather than getting a chart-shaped hole in the deck.\n */\nexport function isChartType(name: unknown): name is CHART_NAME {\n\treturn typeof name === 'string' && CHART_TYPES.has(name)\n}\n\n/**\n * The chartEx (`cx:` / Office 2016 chart-extension) chart types. Unlike the classic 2007 catalog\n * these do NOT emit a `<c:chartSpace>` chart part: they emit a separate `chartEx{N}.xml` part in\n * the `http://schemas.microsoft.com/office/drawing/2014/chartex` namespace, are referenced from\n * the slide through `<mc:AlternateContent>`, and render only in PowerPoint 2016+/Microsoft 365\n * (older Office, Google Slides, Keynote and LibreOffice show the `<mc:Fallback>` shape instead).\n * See `gen/chart/chartex-xml.ts`.\n */\nconst CHARTEX_TYPES: ReadonlySet<string> = new Set<string>([\n\tChartType.waterfall,\n\tChartType.funnel,\n\tChartType.treemap,\n\tChartType.sunburst,\n\tChartType.histogram,\n\tChartType.pareto,\n\tChartType.boxWhisker,\n\tChartType.regionMap,\n])\n\n/**\n * Is `type` a chartEx (cx:) chart? Accepts a `ChartType`/`CHART_NAME` string; anything else\n * (including a combo-chart `ChartMulti[]` array or `undefined`) is not a chartEx type (combos are\n * classic-only), so those return `false`.\n */\nexport function isChartExType(type: unknown): boolean {\n\treturn typeof type === 'string' && CHARTEX_TYPES.has(type)\n}\n\nexport enum SlideObjectType {\n\tchart = 'chart',\n\tconnector = 'connector',\n\tgroup = 'group',\n\thyperlink = 'hyperlink',\n\timage = 'image',\n\tmedia = 'media',\n\tmodel3d = 'model3d',\n\toleObject = 'oleObject',\n\tonline = 'online',\n\tplaceholder = 'placeholder',\n\ttable = 'table',\n\ttablecell = 'tablecell',\n\ttext = 'text',\n\tnotes = 'notes',\n\tzoom = 'zoom',\n}\n\n/**\n * Maps a friendly `ConnectorType` to its OOXML connector preset *family*. `straight`\n * has a single fixed preset; `elbow` and `curved` select a member by bend count\n * (`bentConnector{3,4,5}` / `curvedConnector{3,4,5}`); see `connectorPresetFor`.\n *\n * Not exported: `connectorPresetFor`, eleven lines below, is its only reader, and\n * `docs/contributing/architecture.md` puts internal OOXML generators off the published surface unless\n * deliberately exposed. Callers name a connector by its `ConnectorType`, or by the\n * {@link CONNECTOR_PRESET_NAME} the function returns.\n */\nconst CONNECTOR_PRESETS = {\n\tstraight: 'straightConnector1',\n\telbow: 'bentConnector',\n\tcurved: 'curvedConnector',\n} as const satisfies Record<'straight' | 'elbow' | 'curved', string>\n\n/**\n * Resolve the concrete connector preset geometry name for a `type` + bend count.\n * `straight` ignores `bends` (it has no adjustable jog). For `elbow` / `curved`, the\n * preset suffix is `bends + 2`, so `bends` of 1/2/3 maps to `…Connector3/4/5`, each\n * of which exposes exactly `bends` adjustable guides (`adj1…adjN`).\n * @param {'straight' | 'elbow' | 'curved'} type - friendly connector routing style\n * @param {number} bends - number of adjustable bends (1–3); ignored for `straight`\n * @return {CONNECTOR_PRESET_NAME} OOXML preset geometry name (e.g. `bentConnector4`)\n */\nexport function connectorPresetFor(type: 'straight' | 'elbow' | 'curved', bends: number): CONNECTOR_PRESET_NAME {\n\tif (type === 'straight') return CONNECTOR_PRESETS.straight\n\treturn `${CONNECTOR_PRESETS[type]}${bends + 2}` as CONNECTOR_PRESET_NAME\n}\nexport enum PlaceholderType {\n\ttitle = 'title',\n\tbody = 'body',\n\timage = 'pic',\n\tchart = 'chart',\n\ttable = 'tbl',\n\tmedia = 'media',\n}\n/**\n * Placeholder-type name. Derived from the `PlaceholderType` enum (above) so the two\n * never drift.\n */\nexport type PLACEHOLDER_TYPE = `${PlaceholderType}`\n\n/**\n * Bullet glyph presets. Only `DEFAULT` is currently wired through to output; the remaining entries are\n * reserved and not yet selectable via options.\n */\nexport enum BulletType {\n\tDEFAULT = '•',\n\tCHECK = '✓',\n\tSTAR = '★',\n\tTRIANGLE = '▶',\n}\n\n/**\n * Built-in PowerPoint table style IDs.\n *\n * Each value is the GUID that goes into `<a:tableStyleId>` inside `<a:tblPr>`.\n * These 74 GUIDs are the complete set defined in [MS-OE376] §5.1.6.10. PowerPoint\n * resolves them from its own gallery; the deck also carries the definition of each one\n * its tables use in `ppt/tableStyles.xml`, as PowerPoint writes it, for other readers.\n *\n * Only these enum members are supported. Raw GUID strings are not accepted;\n * use `TableStyle` members exclusively.\n */\nexport enum TableStyle {\n\t// ── No style ────────────────────────────────────────────────────────────\n\tNO_STYLE_NO_GRID = '{2D5ABB26-0587-4C30-8999-92F81FD0307C}',\n\tNO_STYLE_TABLE_GRID = '{5940675A-B579-460E-94D1-54222C63F5DA}',\n\n\t// ── Themed Style 1 ──────────────────────────────────────────────────────\n\tTHEMED_STYLE_1_ACCENT_1 = '{3C2FFA5D-87B4-456A-9821-1D502468CF0F}',\n\tTHEMED_STYLE_1_ACCENT_2 = '{284E427A-3D55-4303-BF80-6455036E1DE7}',\n\tTHEMED_STYLE_1_ACCENT_3 = '{69C7853C-536D-4A76-A0AE-DD22124D55A5}',\n\tTHEMED_STYLE_1_ACCENT_4 = '{775DCB02-9BB8-47FD-8907-85C794F793BA}',\n\tTHEMED_STYLE_1_ACCENT_5 = '{35758FB7-9AC5-4552-8A53-C91805E547FA}',\n\tTHEMED_STYLE_1_ACCENT_6 = '{08FB837D-C827-4EFA-A057-4D05807E0F7C}',\n\n\t// ── Themed Style 2 ──────────────────────────────────────────────────────\n\tTHEMED_STYLE_2_ACCENT_1 = '{D113A9D2-9D6B-4929-AA2D-F23B5EE8CBE7}',\n\tTHEMED_STYLE_2_ACCENT_2 = '{18603FDC-E32A-4AB5-989C-0864C3EAD2B8}',\n\tTHEMED_STYLE_2_ACCENT_3 = '{306799F8-075E-4A3A-A7F6-7FBC6576F1A4}',\n\tTHEMED_STYLE_2_ACCENT_4 = '{E269D01E-BC32-4049-B463-5C60D7B0CCD2}',\n\tTHEMED_STYLE_2_ACCENT_5 = '{327F97BB-C833-4FB7-BDE5-3F7075034690}',\n\tTHEMED_STYLE_2_ACCENT_6 = '{638B1855-1B75-4FBE-930C-398BA8C253C6}',\n\n\t// ── Light Style 1 ───────────────────────────────────────────────────────\n\tLIGHT_STYLE_1 = '{9D7B26C5-4107-4FEC-AEDC-1716B250A1EF}',\n\tLIGHT_STYLE_1_ACCENT_1 = '{3B4B98B0-60AC-42C2-AFA5-B58CD77FA1E5}',\n\tLIGHT_STYLE_1_ACCENT_2 = '{0E3FDE45-AF77-4B5C-9715-49D594BDF05E}',\n\tLIGHT_STYLE_1_ACCENT_3 = '{C083E6E3-FA7D-4D7B-A595-EF9225AFEA82}',\n\tLIGHT_STYLE_1_ACCENT_4 = '{D27102A9-8310-4765-A935-A1911B00CA55}',\n\tLIGHT_STYLE_1_ACCENT_5 = '{5FD0F851-EC5A-4D38-B0AD-8093EC10F338}',\n\tLIGHT_STYLE_1_ACCENT_6 = '{68D230F3-CF80-4859-8CE7-A43EE81993B5}',\n\n\t// ── Light Style 2 ───────────────────────────────────────────────────────\n\tLIGHT_STYLE_2 = '{7E9639D4-E3E2-4D34-9284-5A2195B3D0D7}',\n\tLIGHT_STYLE_2_ACCENT_1 = '{69012ECD-51FC-41F1-AA8D-1B2483CD663E}',\n\tLIGHT_STYLE_2_ACCENT_2 = '{72833802-FEF1-4C79-8D5D-14CF1EAF98D9}',\n\tLIGHT_STYLE_2_ACCENT_3 = '{F2DE63D5-997A-4646-A377-4702673A728D}',\n\tLIGHT_STYLE_2_ACCENT_4 = '{17292A2E-F333-43FB-9621-5CBBE7FDCDCB}',\n\tLIGHT_STYLE_2_ACCENT_5 = '{5A111915-BE36-4E01-A7E5-04B1672EAD32}',\n\tLIGHT_STYLE_2_ACCENT_6 = '{912C8C85-51F0-491E-9774-3900AFEF0FD7}',\n\n\t// ── Light Style 3 ───────────────────────────────────────────────────────\n\tLIGHT_STYLE_3 = '{616DA210-FB5B-4158-B5E0-FEB733F419BA}',\n\tLIGHT_STYLE_3_ACCENT_1 = '{BC89EF96-8CEA-46FF-86C4-4CE0E7609802}',\n\tLIGHT_STYLE_3_ACCENT_2 = '{5DA37D80-6434-44D0-A028-1B22A696006F}',\n\tLIGHT_STYLE_3_ACCENT_3 = '{8799B23B-EC83-4686-B30A-512413B5E67A}',\n\tLIGHT_STYLE_3_ACCENT_4 = '{ED083AE6-46FA-4A59-8FB0-9F97EB10719F}',\n\tLIGHT_STYLE_3_ACCENT_5 = '{BDBED569-4797-4DF1-A0F4-6AAB3CD982D8}',\n\tLIGHT_STYLE_3_ACCENT_6 = '{E8B1032C-EA38-4F05-BA0D-38AFFFC7BED3}',\n\n\t// ── Medium Style 1 ──────────────────────────────────────────────────────\n\tMEDIUM_STYLE_1 = '{793D81CF-94F2-401A-BA57-92F5A7B2D0C5}',\n\tMEDIUM_STYLE_1_ACCENT_1 = '{B301B821-A1FF-4177-AEE7-76D212191A09}',\n\tMEDIUM_STYLE_1_ACCENT_2 = '{9DCAF9ED-07DC-4A11-8D7F-57B35C25682E}',\n\tMEDIUM_STYLE_1_ACCENT_3 = '{1FECB4D8-DB02-4DC6-A0A2-4F2EBAE1DC90}',\n\tMEDIUM_STYLE_1_ACCENT_4 = '{1E171933-4619-4E11-9A3F-F7608DF75F80}',\n\tMEDIUM_STYLE_1_ACCENT_5 = '{FABFCF23-3B69-468F-B69F-88F6DE6A72F2}',\n\tMEDIUM_STYLE_1_ACCENT_6 = '{10A1B5D5-9B99-4C35-A422-299274C87663}',\n\n\t// ── Medium Style 2 ──────────────────────────────────────────────────────\n\tMEDIUM_STYLE_2 = '{073A0DAA-6AF3-43AB-8588-CEC1D06C72B9}',\n\tMEDIUM_STYLE_2_ACCENT_1 = '{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}',\n\tMEDIUM_STYLE_2_ACCENT_2 = '{21E4AEA4-8DFA-4A89-87EB-49C32662AFE0}',\n\tMEDIUM_STYLE_2_ACCENT_3 = '{F5AB1C69-6EDB-4FF4-983F-18BD219EF322}',\n\tMEDIUM_STYLE_2_ACCENT_4 = '{00A15C55-8517-42AA-B614-E9B94910E393}',\n\tMEDIUM_STYLE_2_ACCENT_5 = '{7DF18680-E054-41AD-8BC1-D1AEF772440D}',\n\tMEDIUM_STYLE_2_ACCENT_6 = '{93296810-A885-4BE3-A3E7-6D5BEEA58F35}',\n\n\t// ── Medium Style 3 ──────────────────────────────────────────────────────\n\tMEDIUM_STYLE_3 = '{8EC20E35-A176-4012-BC5E-935CFFF8708E}',\n\tMEDIUM_STYLE_3_ACCENT_1 = '{6E25E649-3F16-4E02-A733-19D2CDBF48F0}',\n\tMEDIUM_STYLE_3_ACCENT_2 = '{85BE263C-DBD7-4A20-BB59-AAB30ACAA65A}',\n\tMEDIUM_STYLE_3_ACCENT_3 = '{EB344D84-9AFB-497E-A393-DC336BA19D2E}',\n\tMEDIUM_STYLE_3_ACCENT_4 = '{EB9631B5-78F2-41C9-869B-9F39066F8104}',\n\tMEDIUM_STYLE_3_ACCENT_5 = '{74C1A8A3-306A-4EB7-A6B1-4F7E0EB9C5D6}',\n\tMEDIUM_STYLE_3_ACCENT_6 = '{2A488322-F2BA-4B5B-9748-0D474271808F}',\n\n\t// ── Medium Style 4 ──────────────────────────────────────────────────────\n\tMEDIUM_STYLE_4 = '{D7AC3CCA-C797-4891-BE02-D94E43425B78}',\n\tMEDIUM_STYLE_4_ACCENT_1 = '{69CF1AB2-1976-4502-BF36-3FF5EA218861}',\n\tMEDIUM_STYLE_4_ACCENT_2 = '{8A107856-5554-42FB-B03E-39F5DBC370BA}',\n\tMEDIUM_STYLE_4_ACCENT_3 = '{0505E3EF-67EA-436B-97B2-0124C06EBD24}',\n\tMEDIUM_STYLE_4_ACCENT_4 = '{C4B1156A-380E-4F78-BDF5-A606A8083BF9}',\n\tMEDIUM_STYLE_4_ACCENT_5 = '{22838BEF-8BB2-4498-84A7-C5851F593DF1}',\n\tMEDIUM_STYLE_4_ACCENT_6 = '{16D9F66E-5EB9-4882-86FB-DCBF35E3C3E4}',\n\n\t// ── Dark Style 1 ────────────────────────────────────────────────────────\n\tDARK_STYLE_1 = '{E8034E78-7F5D-4C2E-B375-FC64B27BC917}',\n\tDARK_STYLE_1_ACCENT_1 = '{125E5076-3810-47DD-B79F-674D7AD40C01}',\n\tDARK_STYLE_1_ACCENT_2 = '{37CE84F3-28C3-443E-9E96-99CF82512B78}',\n\tDARK_STYLE_1_ACCENT_3 = '{D03447BB-5D67-496B-8E87-E561075AD55C}',\n\tDARK_STYLE_1_ACCENT_4 = '{E929F9F4-4A8F-4326-A1B4-22849713DDAB}',\n\tDARK_STYLE_1_ACCENT_5 = '{8FD4443E-F989-4FC4-A0C8-D5A2AF1F390B}',\n\tDARK_STYLE_1_ACCENT_6 = '{AF606853-7671-496A-8E4F-DF71F8EC918B}',\n\n\t// ── Dark Style 2 ────────────────────────────────────────────────────────\n\tDARK_STYLE_2 = '{5202B0CA-FC54-4496-8BCA-5EF66A818D29}',\n\t/** Header uses Accent 2, body rows use Accent 1 */\n\tDARK_STYLE_2_ACCENT_1_ACCENT_2 = '{0660B408-B3CF-4A94-85FC-2B1E0A45F4A2}',\n\t/** Header uses Accent 4, body rows use Accent 3 */\n\tDARK_STYLE_2_ACCENT_3_ACCENT_4 = '{91EBBBCC-DAD2-459C-BE2E-F6DE35CF9A28}',\n\t/** Header uses Accent 6, body rows use Accent 5 */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A;CACA,WAAA,6BAAA;CACA,WAAA,6BAAA;CAGA,WAAA,kBAAA;CACA,WAAA,2BAAA;CACA,WAAA,2BAAA;CACA,WAAA,2BAAA;CACA,WAAA,2BAAA;CACA,WAAA,2BAAA;CACA,WAAA,2BAAA;CAGA,WAAA,kBAAA;;CAEA,WAAA,oCAAA;;CAEA,WAAA,oCAAA;;CAEA,WAAA,oCAAA;;AACD,EAAA,CAAA,CAAA"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/enums.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* pptx-ts Enums
|
|
4
3
|
* NOTE: `enum` wont work for objects, so use `Object.freeze`
|
|
@@ -258,8 +257,8 @@ declare enum AlignH {
|
|
|
258
257
|
/**
|
|
259
258
|
* @deprecated The enum form of `VAlign`, which no option actually takes. Use the `VAlign`
|
|
260
259
|
* string union (`'top' | 'middle' | 'bottom'`) or, for a text body's own anchoring,
|
|
261
|
-
* {@link TextAnchor}. Unlike its sibling {@link AlignH}
|
|
262
|
-
* really is typed as
|
|
260
|
+
* {@link TextAnchor}. Unlike its sibling {@link AlignH} (which `TextPropsOptions.align`
|
|
261
|
+
* really is typed as), nothing in the library reads this, so it is a third spelling of a
|
|
263
262
|
* two-spelling fact. It will be removed in the next major.
|
|
264
263
|
*/
|
|
265
264
|
declare enum AlignV {
|
|
@@ -296,7 +295,7 @@ declare const EXTRA_SHAPE_PRESETS: readonly ['straightConnector1', 'bentConnecto
|
|
|
296
295
|
type CONNECTOR_PRESET_NAME = (typeof EXTRA_SHAPE_PRESETS)[number];
|
|
297
296
|
/**
|
|
298
297
|
* Every shape geometry name pptx-ts can serialize without corrupting the
|
|
299
|
-
* package: the OOXML preset geometries (`ST_ShapeType
|
|
298
|
+
* package: the OOXML preset geometries (`ST_ShapeType`: `ShapeType` values
|
|
300
299
|
* plus the unexposed connectors above) and `custGeom` (freeform paths, emitted
|
|
301
300
|
* as `<a:custGeom>` rather than `<a:prstGeom>`). Used to reject bogus presets
|
|
302
301
|
* before they become an invalid `<a:prstGeom prst="...">` that triggers
|
|
@@ -306,7 +305,7 @@ declare const VALID_SHAPE_PRESETS: ReadonlySet<string>;
|
|
|
306
305
|
/**
|
|
307
306
|
* Narrow a public `CHART_NAME` to the internal `ChartType` enum. Because
|
|
308
307
|
* `CHART_NAME` is derived from `ChartType`, every `CHART_NAME` value is by
|
|
309
|
-
* construction a valid enum value, so this conversion is total and safe
|
|
308
|
+
* construction a valid enum value, so this conversion is total and safe. It is
|
|
310
309
|
* the single boundary cast that lets internal code compare against the enum
|
|
311
310
|
* (enum-to-enum) instead of enum-to-string.
|
|
312
311
|
*/
|
|
@@ -315,15 +314,15 @@ declare function asChartType(name: CHART_NAME): ChartType;
|
|
|
315
314
|
* Is `name` a chart type this library emits?
|
|
316
315
|
*
|
|
317
316
|
* `CHART_NAME` constrains TypeScript callers, but `addChart` is reachable from plain JavaScript
|
|
318
|
-
* where nothing enforces the union
|
|
317
|
+
* where nothing enforces the union, and the two emitters partition the catalog between them by
|
|
319
318
|
* `switch`, so an off-catalog string has no arm in either and cannot produce a plot. Checked once
|
|
320
319
|
* at define time (`gen/define/chart.ts`) so the caller hears about it at the call that was wrong,
|
|
321
320
|
* rather than getting a chart-shaped hole in the deck.
|
|
322
321
|
*/
|
|
323
322
|
declare function isChartType(name: unknown): name is CHART_NAME;
|
|
324
323
|
/**
|
|
325
|
-
* Is `type` a chartEx (cx:) chart? Accepts a `ChartType`/`CHART_NAME` string; anything else
|
|
326
|
-
* including a combo-chart `ChartMulti[]` array or `undefined`
|
|
324
|
+
* Is `type` a chartEx (cx:) chart? Accepts a `ChartType`/`CHART_NAME` string; anything else
|
|
325
|
+
* (including a combo-chart `ChartMulti[]` array or `undefined`) is not a chartEx type (combos are
|
|
327
326
|
* classic-only), so those return `false`.
|
|
328
327
|
*/
|
|
329
328
|
declare function isChartExType(type: unknown): boolean;
|
|
@@ -381,8 +380,9 @@ declare enum BulletType {
|
|
|
381
380
|
* Built-in PowerPoint table style IDs.
|
|
382
381
|
*
|
|
383
382
|
* Each value is the GUID that goes into `<a:tableStyleId>` inside `<a:tblPr>`.
|
|
384
|
-
* These 74 GUIDs are the complete set defined in [MS-OE376] §5.1.6.10
|
|
385
|
-
*
|
|
383
|
+
* These 74 GUIDs are the complete set defined in [MS-OE376] §5.1.6.10. PowerPoint
|
|
384
|
+
* resolves them from its own gallery; the deck also carries the definition of each one
|
|
385
|
+
* its tables use in `ppt/tableStyles.xml`, as PowerPoint writes it, for other readers.
|
|
386
386
|
*
|
|
387
387
|
* Only these enum members are supported. Raw GUID strings are not accepted;
|
|
388
388
|
* use `TableStyle` members exclusively.
|
|
@@ -466,6 +466,5 @@ declare enum TableStyle {
|
|
|
466
466
|
/** Header uses Accent 6, body rows use Accent 5 */
|
|
467
467
|
DARK_STYLE_2_ACCENT_5_ACCENT_6 = "{46F890A9-2807-4EBB-B81D-B2AA78EC7F39}"
|
|
468
468
|
}
|
|
469
|
-
//#endregion
|
|
470
469
|
export { isChartType as C, isChartExType as S, VALID_SHAPE_PRESETS as _, CONNECTOR_PRESET_NAME as a, asChartType as b, PLACEHOLDER_TYPE as c, SHAPE_NAME as d, SchemeColor as f, TextAnchor as g, TableStyle as h, CHART_NAME as i, PlaceholderType as l, SlideObjectType as m, AlignV as n, ChartType as o, ShapeType as p, BulletType as r, OutputType as s, AlignH as t, SCHEME_COLORS as u, WRITE_OUTPUT_TYPE as v, connectorPresetFor as x, ZIP_OUTPUT_TYPE as y };
|
|
471
|
-
//# sourceMappingURL=enums-
|
|
470
|
+
//# sourceMappingURL=enums-PcXr3o3J.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums-
|
|
1
|
+
{"version":3,"file":"enums-PcXr3o3J.d.ts","names":[],"sources":["../src/enums.ts"],"mappings":";;;;;;;;;KAUY,qBAAqB;KACrB,oBAAoB;;;;;;KAMpB,gBAAgB;;;;;KAKhB,mBAAmB;aAEnB;EACX;EACA;EACA;;aAIW;EACX;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;;;;;;;;;aASW;EACX;EACA;EACA;;;;;;;;;;;;;KAcW,gBAAgB,cAAc;;;;;;cAOpC;;;;;;;;;KAoBM,gCAAgC;;;;;;;;;cAU/B,qBAAqB;;;;;;;;iBAYlB,YAAY,MAAM,aAAa;;;;;;;;;;iBAgB/B,YAAY,gBAAgB,QAAQ;;;;;;iBA4BpC,cAAc;aAIlB;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;;;;;iBA4Be,mBAAmB,uCAAuC,gBAAgB;aAI9E;EACX;EACA;EACA;EACA;EACA;EACA;;;;;;KAMW,sBAAsB;;;;;aAMtB;EACX;EACA;EACA;EACA;;;;;;;;;;;;;aAcW;EAEX;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;;EAEA;;EAEA;;EAEA"}
|
package/dist/families.d.ts
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/**
|
|
2
|
+
* The construct families, as the `pptx-ts/families` subpath publishes them.
|
|
3
|
+
*
|
|
4
|
+
* What a caller hands to `createPresentation({ use: [...] })`. Each value is one family: the
|
|
5
|
+
* methods it adds to a slide, the child descriptors it recognises in a slide master or a group,
|
|
6
|
+
* the renderer that emits its XML, and the parts it puts in the package.
|
|
7
|
+
*
|
|
8
|
+
* Naming one here is what puts its code in your bundle, which is the whole point: a program that
|
|
9
|
+
* composes `charts` pays for charts, and a program that does not, does not.
|
|
10
|
+
*
|
|
11
|
+
* The core tier -- text, shapes, images, groups and speaker notes -- is composed for you. Those
|
|
12
|
+
* five are exported anyway, so a caller can be explicit; listing one changes nothing.
|
|
13
|
+
*
|
|
14
|
+
* @module
|
|
15
|
+
*/
|
|
16
|
+
import { a as renderImageObject, c as ConstructFamily, d as PartContributor, f as RenderContext, l as PresentationAuthorContext, o as renderTextObject, u as SlideBuilder } from "./entry-compose-CiakSt-f.js";
|
|
17
|
+
import { Dt as OptsChartData, Ft as CommentProps, It as MeasureTextOptions, Jt as TextMeasurement, L as ConnectorProps, Lt as NotesProps, Ut as TableLayoutResult, Xt as TextPropsOptions, Yt as TextProps, en as ImageProps, it as ChartOpts, rn as OleObjectProps, rt as ChartMulti, tn as MediaProps, un as ShapeProps, zt as OverflowBoxOptions } from "./pres-BkEkUAEM.js";
|
|
18
|
+
import { L as TableToSlidesProps, M as TableProps, N as TableRow, S as AnimationProps, c as SectionZoomProps, d as ZoomBaseProps, l as SlideZoomProps, m as Model3dProps, n as GroupChildProps, r as GroupProps, v as SlideMasterChartProps } from "./slide-BmT4kMoO.js";
|
|
19
|
+
import { T as PresSlideInternal } from "./font-metrics-DTppw4t3.js";
|
|
20
|
+
import { d as SHAPE_NAME, i as CHART_NAME } from "./enums-PcXr3o3J.js";
|
|
21
|
+
import { s as ExtractedSlide } from "./presentation-types-BgnZR-0a.js";
|
|
8
22
|
/**
|
|
9
23
|
* Render a `chart` slide object to its `<p:graphicFrame>` XML referencing the chart part.
|
|
10
24
|
*
|
|
@@ -14,8 +28,6 @@ import { s as ExtractedSlide } from "./presentation-types-B3VQH4Bz.js";
|
|
|
14
28
|
* `<mc:Fallback>` placeholder shape shown by every other consumer.
|
|
15
29
|
*/
|
|
16
30
|
declare function renderChartObject(ctx: RenderContext): string;
|
|
17
|
-
//#endregion
|
|
18
|
-
//#region src/gen/extract-charts.d.ts
|
|
19
31
|
/**
|
|
20
32
|
* Charts: the chart part XML plus its embedded workbook bytes. The chart part's own `.rels`
|
|
21
33
|
* (workbook reference) is rebuilt on injection.
|
|
@@ -27,26 +39,18 @@ declare function renderChartObject(ctx: RenderContext): string;
|
|
|
27
39
|
* the classic-or-chartEx choice for the package writer too.
|
|
28
40
|
*/
|
|
29
41
|
declare function chartsOf(slide: PresSlideInternal): ExtractedSlide['charts'];
|
|
30
|
-
//#endregion
|
|
31
|
-
//#region src/gen/slide/objects/table.d.ts
|
|
32
42
|
/**
|
|
33
43
|
* Render a `table` slide object to its `<p:graphicFrame>` XML (merge-grid, row/col spans, per-cell styling).
|
|
34
44
|
*/
|
|
35
45
|
declare function renderTableObject(ctx: RenderContext): string;
|
|
36
|
-
//#endregion
|
|
37
|
-
//#region src/gen/slide/objects/media.d.ts
|
|
38
46
|
/**
|
|
39
47
|
* Render a `media` (audio/video/online) slide object to its `<p:pic>` XML.
|
|
40
48
|
*/
|
|
41
49
|
declare function renderMediaObject(ctx: RenderContext): string;
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region src/gen/slide/objects/connector.d.ts
|
|
44
50
|
/**
|
|
45
51
|
* Render a `connector` slide object to its `<p:cxnSp>` XML (start/end shape bindings via shapeIds).
|
|
46
52
|
*/
|
|
47
53
|
declare function renderConnectorObject(ctx: RenderContext): string;
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region src/gen/slide/objects/ole.d.ts
|
|
50
54
|
/**
|
|
51
55
|
* Render an `oleObject` slide object to its `<p:graphicFrame>` XML.
|
|
52
56
|
*
|
|
@@ -55,29 +59,23 @@ declare function renderConnectorObject(ctx: RenderContext): string;
|
|
|
55
59
|
* PowerPoint renders by drawing the live embedded document); the `mc:Fallback` repeats it with a
|
|
56
60
|
* `<p:pic>` preview so every other consumer shows the cached picture.
|
|
57
61
|
*
|
|
58
|
-
* Note `mc:Choice Requires="v"` only *declares* the VML namespace
|
|
62
|
+
* Note `mc:Choice Requires="v"` only *declares* the VML namespace. Modern PowerPoint writes no
|
|
59
63
|
* `spid` and no `vmlDrawing` part, so neither is emitted here.
|
|
60
64
|
*/
|
|
61
65
|
declare function renderOleObject(ctx: RenderContext): string;
|
|
62
|
-
//#endregion
|
|
63
|
-
//#region src/gen/slide/objects/model3d.d.ts
|
|
64
66
|
/**
|
|
65
67
|
* Render a `model3d` slide object to its `<mc:AlternateContent>` XML. The `mc:Choice` carries the
|
|
66
68
|
* real `<p:graphicFrame>` (the `am3d:model3d` graphicData PowerPoint 2019+ renders live); the
|
|
67
69
|
* `mc:Fallback` carries the cached preview picture. See `gen/define/model3d.ts`.
|
|
68
70
|
*/
|
|
69
71
|
declare function renderModel3dObject(ctx: RenderContext): string;
|
|
70
|
-
//#endregion
|
|
71
|
-
//#region src/gen/slide/objects/zoom.d.ts
|
|
72
72
|
/**
|
|
73
73
|
* Render a `zoom` slide object to its `<mc:AlternateContent>` XML. The `mc:Choice` carries the real
|
|
74
74
|
* `<p:graphicFrame>` (Slide/Section/Summary Zoom in the 2016 zoom namespaces, read by PowerPoint
|
|
75
|
-
* 2016+); the `mc:Fallback` carries a hyperlinked picture
|
|
75
|
+
* 2016+); the `mc:Fallback` carries a hyperlinked picture (or, for a Summary Zoom, a group of them),
|
|
76
76
|
* so pre-2016 consumers still get a clickable navigation thumbnail. See `gen/define/zoom.ts`.
|
|
77
77
|
*/
|
|
78
78
|
declare function renderZoomObject(ctx: RenderContext): string;
|
|
79
|
-
//#endregion
|
|
80
|
-
//#region src/families.d.ts
|
|
81
79
|
/** Text boxes. Core: composed whether you ask for it or not. */
|
|
82
80
|
export declare const text: {
|
|
83
81
|
name: "text";
|
|
@@ -168,6 +166,7 @@ export declare const tables: {
|
|
|
168
166
|
renderers: {
|
|
169
167
|
table: typeof renderTableObject;
|
|
170
168
|
};
|
|
169
|
+
parts: PartContributor;
|
|
171
170
|
};
|
|
172
171
|
/**
|
|
173
172
|
* `tableToSlides`: reproducing a rendered HTML `<table>`. Needs a live DOM, so it belongs to a
|
|
@@ -255,6 +254,5 @@ export declare const measure: {
|
|
|
255
254
|
tableLayout(ctx: PresentationAuthorContext, rows: TableRow[], opts: TableProps): TableLayoutResult;
|
|
256
255
|
};
|
|
257
256
|
};
|
|
258
|
-
//#endregion
|
|
259
257
|
export type { ConstructFamily };
|
|
260
258
|
//# sourceMappingURL=families.d.ts.map
|
package/dist/families.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"families.d.ts","names":[],"sources":["../src/gen/slide/objects/chart.ts","../src/gen/extract-charts.ts","../src/gen/slide/objects/table.ts","../src/gen/slide/objects/media.ts","../src/gen/slide/objects/connector.ts","../src/gen/slide/objects/ole.ts","../src/gen/slide/objects/model3d.ts","../src/gen/slide/objects/zoom.ts","../src/families.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"families.d.ts","names":["_$__slide_js0.default","_$__families_shared_js0.PresentationAuthorContext"],"sources":["../src/gen/slide/objects/chart.ts","../src/gen/extract-charts.ts","../src/gen/slide/objects/table.ts","../src/gen/slide/objects/media.ts","../src/gen/slide/objects/connector.ts","../src/gen/slide/objects/ole.ts","../src/gen/slide/objects/model3d.ts","../src/gen/slide/objects/zoom.ts","../src/families.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0DgB,kBAAkB,KAAK;;;;;;;;;;;iBClCvB,SAAS,OAAO,oBAAoB;;;;iBC2LpC,kBAAkB,KAAK;;;;iBChMvB,kBAAkB,KAAK;;;;iBCHvB,sBAAsB,KAAK;;;;;;;;;;;;iBCU3B,gBAAgB,KAAK;;;;;;iBCyHrB,oBAAoB,KAAK;;;;;;;iBCtBzB,iBAAiB,KAAK;;qBCzFzB;;;I,eAAAA,c;;;;;;;;;;;;;;qBAEA;;;I,gBAAAA,c;;;;;;;;;;;;;qBAEA;;;I,gBAAAA,c;;;;;;;;;;qBAEA;;;I,gBAAAA,c;;;;;qBAEA;;;I,gBAAAA,c;;;;;qBAGA;;;I,gBAAAA,c;;;;;;;;;;;;;;;;qBAEA;;;I,gBAAAA,c;;;;;;;;;;;qBAKA;;;I,mBAAAC,2B;;;;qBAEA;;;I,gBAAAD,c;;;;;;;qBAEA;;;I,oBAAAA,c;;;;;;;qBAEA;;;I,oBAAAA,c;;;;;;;qBAEA;;;I,kBAAAA,c;;;;;;;qBAEA;;;I,oBAAAA,c;;;;;;;;;qBAEA;;;I,kBAAAA,c;;;;;qBAEA;;;I,oBAAAA,c;;;;qBAEA;;;I,iBAAAC,2B"}
|
package/dist/families.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as mediaFamily, c as commentsFamily, d as textFamily, f as shapeFamily, h as groupFamily, i as model3dFamily, l as chartFamily, m as imageFamily, n as tableFamily, o as measureFamily, p as notesFamily, r as oleFamily, s as connectorFamily, t as zoomFamily, u as animationsFamily } from "./zoom-
|
|
2
|
-
import { t as tableDomFamily } from "./table-dom-
|
|
3
|
-
|
|
1
|
+
import { a as mediaFamily, c as commentsFamily, d as textFamily, f as shapeFamily, h as groupFamily, i as model3dFamily, l as chartFamily, m as imageFamily, n as tableFamily, o as measureFamily, p as notesFamily, r as oleFamily, s as connectorFamily, t as zoomFamily, u as animationsFamily } from "./zoom-CSSeOwM8.js";
|
|
2
|
+
import { t as tableDomFamily } from "./table-dom-BYga4FYY.js";
|
|
3
|
+
// src/families.ts
|
|
4
4
|
/**
|
|
5
5
|
* The construct families, as the `pptx-ts/families` subpath publishes them.
|
|
6
6
|
*
|
|
@@ -51,7 +51,6 @@ const comments = commentsFamily;
|
|
|
51
51
|
const animations = animationsFamily;
|
|
52
52
|
/** `measureText`, `overflowsBox` and `tableLayout` on the presentation. */
|
|
53
53
|
const measure = measureFamily;
|
|
54
|
-
//#endregion
|
|
55
54
|
export { animations, charts, comments, connectors, domTables, groups, images, measure, media, models3d, notes, oleObjects, shapes, tables, text, zooms };
|
|
56
55
|
|
|
57
56
|
//# sourceMappingURL=families.js.map
|