@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,11 +1,10 @@
|
|
|
1
|
-
import { d as SHAPE_NAME, h as TableStyle, i as CHART_NAME, m as SlideObjectType } from "./enums-
|
|
2
|
-
import { $ as
|
|
3
|
-
//#region src/types/table.d.ts
|
|
1
|
+
import { d as SHAPE_NAME, h as TableStyle, i as CHART_NAME, m as SlideObjectType } from "./enums-PcXr3o3J.js";
|
|
2
|
+
import { $t as ImageBaseProps, A as PositionProps, At as ObjectLockProps, C as HexColor, Dn as TEXT_AUTONUM_SCHEMES, Dt as OptsChartData, E as Margin, Ft as CommentProps, H as HyperlinkProps, I as BorderProps, Kt as TextFitShrinkProps, L as ConnectorProps, Lt as NotesProps, Nt as PlaceholderOption, On as TRANSITION_TYPES, Pt as PlaceholderProps, S as HAlign, U as ShadowProps, Wt as TextBaseProps, Xt as TextPropsOptions, Yt as TextProps, _ as DataOrPathProps, bn as LightRigDirection, en as ImageProps, g as Coord, h as Color, it as ChartOpts, jt as ObjectNameProps, k as PlaceholderPositionProps, kn as TextHorzOverflowType, kt as CommonObjectDescriptor, mn as BevelPresetType, p as BackgroundOption, rn as OleObjectProps, rt as ChartMulti, tn as MediaProps, un as ShapeProps, v as DataOrPathRequiredProps, wn as PresetMaterialType, xn as LightRigType, z as FillOption } from "./pres-BkEkUAEM.js";
|
|
4
3
|
/**
|
|
5
4
|
* A `<table>` element, from whatever DOM implementation the caller has.
|
|
6
5
|
*
|
|
7
6
|
* Deliberately *not* `lib.dom`'s `Element`. `lib.dom`'s types are built for a browser, and a
|
|
8
|
-
* non-browser DOM's element type
|
|
7
|
+
* non-browser DOM's element type (happy-dom's, jsdom's) declares its own members and does
|
|
9
8
|
* not satisfy them, so demanding `Element` would reject from TypeScript exactly the
|
|
10
9
|
* implementations `pptx-ts/html` exists to accept. Requiring the three members the conversion
|
|
11
10
|
* actually calls keeps a mistyped argument an error while letting every real DOM through.
|
|
@@ -105,12 +104,12 @@ interface TableToSlidesProps extends Omit<TableProps, 'autoPage' | 'colW' | 'aut
|
|
|
105
104
|
slideMargin?: Margin;
|
|
106
105
|
}
|
|
107
106
|
/**
|
|
108
|
-
* A table cell's corner-to-corner rules (`a:tcPr/a:lnTlToBr` / `a:lnBlToTr`)
|
|
107
|
+
* A table cell's corner-to-corner rules (`a:tcPr/a:lnTlToBr` / `a:lnBlToTr`), the
|
|
109
108
|
* "Diagonal Down Border" / "Diagonal Up Border" of PowerPoint's border gallery.
|
|
110
109
|
*
|
|
111
110
|
* Deliberately its own object rather than two more entries on {@link TableCellProps.border}'s
|
|
112
111
|
* tuple: widening that tuple to six would break every existing caller for a construct almost
|
|
113
|
-
* no deck uses, and the two diagonals are not edges
|
|
112
|
+
* no deck uses, and the two diagonals are not edges: they do not participate in the
|
|
114
113
|
* perimeter, and they are not inherited by a merged region's covered cells.
|
|
115
114
|
*
|
|
116
115
|
* @example diagonal: { tlToBr: { type:'solid', color:'C00000', width:1 } } // strike a cell out
|
|
@@ -126,8 +125,8 @@ interface TableCellDiagonals {
|
|
|
126
125
|
* A cell's 3-D bevel (`a:tcPr/a:cell3D`).
|
|
127
126
|
*
|
|
128
127
|
* A minimal surface over `CT_Cell3D`, which is a required `a:bevel` plus an optional
|
|
129
|
-
* `a:lightRig`. PowerPoint's table UI exposes no control for it
|
|
130
|
-
* theme's table style or through another producer
|
|
128
|
+
* `a:lightRig`. PowerPoint's table UI exposes no control for it (it reaches a deck through a
|
|
129
|
+
* theme's table style or through another producer), so this exists to author and reproduce
|
|
131
130
|
* one, not as a general 3-D model.
|
|
132
131
|
*/
|
|
133
132
|
interface TableCell3DProps {
|
|
@@ -172,6 +171,10 @@ interface TableCellProps extends TextBaseProps {
|
|
|
172
171
|
* the text, below zero lowers it. On a cell it applies to every run that states none.
|
|
173
172
|
*/
|
|
174
173
|
baseline?: NonNullable<TextPropsOptions['baseline']>;
|
|
174
|
+
/** Character spacing in points, as {@link TextPropsOptions.charSpacing}. On a cell it applies to every run that states none. */
|
|
175
|
+
charSpacing?: NonNullable<TextPropsOptions['charSpacing']>;
|
|
176
|
+
/** Kerning threshold in points, as {@link TextPropsOptions.kerning}. On a cell it applies to every run that states none. */
|
|
177
|
+
kerning?: NonNullable<TextPropsOptions['kerning']>;
|
|
175
178
|
/**
|
|
176
179
|
* Text shadow (`a:rPr/a:effectLst`), as {@link TextPropsOptions.shadow} takes it on a run. A cell
|
|
177
180
|
* has no shape effect of its own, so on a cell this is the shadow of every run that states none.
|
|
@@ -200,7 +203,7 @@ interface TableCellProps extends TextBaseProps {
|
|
|
200
203
|
* - a single `BorderProps` is broadcast to all four sides
|
|
201
204
|
* - an array is read in **TRBL** order (`[top, right, bottom, left]`)
|
|
202
205
|
*
|
|
203
|
-
* Overrides the table-level {@link TableProps.border} default entirely
|
|
206
|
+
* Overrides the table-level {@link TableProps.border} default entirely; the two do not
|
|
204
207
|
* merge per side. A `null` entry is a hole: that edge is left out of `a:tcPr` and keeps
|
|
205
208
|
* inheriting from the table style, while `{ type: 'none' }` writes an explicit no-line
|
|
206
209
|
* that overrides it. For the two corner-to-corner rules see {@link diagonal}; for the
|
|
@@ -208,11 +211,11 @@ interface TableCellProps extends TextBaseProps {
|
|
|
208
211
|
*/
|
|
209
212
|
border?: BorderProps | [BorderProps | null, BorderProps | null, BorderProps | null, BorderProps | null];
|
|
210
213
|
/**
|
|
211
|
-
* The cell's corner-to-corner rules
|
|
214
|
+
* The cell's corner-to-corner rules: PowerPoint's "Diagonal Down/Up Border".
|
|
212
215
|
*
|
|
213
216
|
* Kept off {@link border}'s tuple on purpose: see {@link TableCellDiagonals}. A diagonal
|
|
214
217
|
* on a merged cell is one stroke across the whole region, so only the span origin carries
|
|
215
|
-
* it
|
|
218
|
+
* it. The covered cells inherit the origin's *edges* but never its diagonals.
|
|
216
219
|
* @example diagonal: { tlToBr: { type:'solid', color:'C00000' } } // strike the cell out
|
|
217
220
|
*/
|
|
218
221
|
diagonal?: TableCellDiagonals;
|
|
@@ -225,7 +228,7 @@ interface TableCellProps extends TextBaseProps {
|
|
|
225
228
|
* left-aligned text in a wide cell, `anchorCtr: true` centres the ragged-right column of
|
|
226
229
|
* lines as a unit while keeping their left edges flush with each other.
|
|
227
230
|
*
|
|
228
|
-
* `false` is the schema default, so it emits nothing
|
|
231
|
+
* `false` is the schema default, so it emits nothing, the same reasoning as
|
|
229
232
|
* `horzOverflow: 'clip'`.
|
|
230
233
|
* @default false
|
|
231
234
|
*/
|
|
@@ -241,9 +244,9 @@ interface TableCellProps extends TextBaseProps {
|
|
|
241
244
|
*/
|
|
242
245
|
colspan?: number;
|
|
243
246
|
/**
|
|
244
|
-
* Cell fill
|
|
247
|
+
* Cell fill: a solid color, or a picture that fills the cell (`a:blipFill` in
|
|
245
248
|
* the cell's `a:tcPr`, stretched to the cell box). A picture fill embeds the
|
|
246
|
-
* image as slide media; identical sources are embedded once. Raster only
|
|
249
|
+
* image as slide media; identical sources are embedded once. Raster only:
|
|
247
250
|
* an SVG source warns and is ignored, matching shape fills. A bare {@link Color} is
|
|
248
251
|
* shorthand for a solid fill ({@link FillOption}).
|
|
249
252
|
* @example 'FF0000' // hex color (red), shorthand for { color:'FF0000' }
|
|
@@ -262,13 +265,13 @@ interface TableCellProps extends TextBaseProps {
|
|
|
262
265
|
* This is **not** a text-wrap switch, despite the name. Lines always wrap to the column
|
|
263
266
|
* width; only an individual character too wide to fit on a line by itself is affected, so
|
|
264
267
|
* it matters for oversized display type, wide CJK/emoji glyphs, and icon fonts in a narrow
|
|
265
|
-
* column. PowerPoint has no per-cell no-wrap at all
|
|
268
|
+
* column. PowerPoint has no per-cell no-wrap at all: `wrap="none"` on a cell's `a:bodyPr`
|
|
266
269
|
* is discarded on the next save (probe:
|
|
267
270
|
* `test/read/fixtures/authoring/probe-table-cell-wrap.ps1`).
|
|
268
271
|
* `'clip'` is written as asked but is the schema default, so PowerPoint drops the
|
|
269
|
-
* attribute again the first time it saves the deck
|
|
272
|
+
* attribute again the first time it saves the deck. The visible result is the same
|
|
270
273
|
* either way, and leaving this unset emits nothing at all.
|
|
271
|
-
* @default (unset
|
|
274
|
+
* @default (unset; PowerPoint clips)
|
|
272
275
|
* @example 'overflow' // a 60pt glyph in a 0.5in column draws whole instead of being cut
|
|
273
276
|
*/
|
|
274
277
|
horzOverflow?: TextHorzOverflowType;
|
|
@@ -285,11 +288,11 @@ interface TableCellProps extends TextBaseProps {
|
|
|
285
288
|
/**
|
|
286
289
|
* Shrink cell text to fit when it would overflow the cell's fixed height.
|
|
287
290
|
* - `'shrink'` measures the wrapped text and bakes a **reduced literal font size**
|
|
288
|
-
* onto the cell's runs so the text fits
|
|
291
|
+
* onto the cell's runs so the text fits. PowerPoint does not support text
|
|
289
292
|
* autofit (`normAutofit`) inside table cells, so there is no font-scale flag to
|
|
290
293
|
* set; the size itself is lowered, which both PowerPoint and LibreOffice render
|
|
291
294
|
* identically with no edit/resize.
|
|
292
|
-
* - Requires the cell font registered via {@link
|
|
295
|
+
* - Requires the cell font registered via {@link PptxTs.registerFontMetrics}. With no
|
|
293
296
|
* metrics registered at all it is a silent no-op (the cell keeps its authored size); once
|
|
294
297
|
* any face is registered, an unregistered face is estimated and warns once per write.
|
|
295
298
|
* - Only triggers when the cell's row has a **fixed** height that the text exceeds.
|
|
@@ -302,16 +305,18 @@ interface TableCellProps extends TextBaseProps {
|
|
|
302
305
|
*/
|
|
303
306
|
fit?: 'none' | 'shrink' | 'resize' | TextFitShrinkProps;
|
|
304
307
|
}
|
|
305
|
-
interface TableProps extends
|
|
308
|
+
interface TableProps extends PlaceholderPositionProps, TextBaseProps, ObjectNameProps {
|
|
306
309
|
/**
|
|
307
310
|
* Name of a table/content placeholder defined on the slide layout/master to bind this table to.
|
|
308
311
|
* - when it matches a layout/master placeholder, the table's `<p:graphicFrame>` emits that
|
|
309
312
|
* placeholder's `<p:ph>` (idx/type) so PowerPoint treats the table as filling the placeholder
|
|
310
313
|
* (e.g. a "Title and Content" content placeholder)
|
|
311
314
|
* - the table also inherits the placeholder's position/size for any of x/y/w/h left unset
|
|
315
|
+
* - a {@link PlaceholderBinding} states the `p:ph` to write, with or without such a placeholder
|
|
312
316
|
* @example 'body' // bind to the layout placeholder named 'body'
|
|
317
|
+
* @example { idx: 1 } // fill placeholder 1 of a layout this deck does not define
|
|
313
318
|
*/
|
|
314
|
-
placeholder?:
|
|
319
|
+
placeholder?: PlaceholderOption;
|
|
315
320
|
/**
|
|
316
321
|
* Whether to enable auto-paging
|
|
317
322
|
* - auto-paging creates new slides as content overflows a slide
|
|
@@ -359,7 +364,7 @@ interface TableProps extends PositionProps, TextBaseProps, ObjectNameProps {
|
|
|
359
364
|
*
|
|
360
365
|
* Steers the default table width, `fitColumns: 'shrink'`, and every page the auto-pager
|
|
361
366
|
* creates. It was declared on {@link TableToSlidesProps} only, while the pager read it on
|
|
362
|
-
* both paths
|
|
367
|
+
* both paths, so from `addTable` it worked at run time and the type rejected it, and the
|
|
363
368
|
* table definer ignored it either way, which made "does my table respect `slideMargin`"
|
|
364
369
|
* depend on whether `autoPage` was on.
|
|
365
370
|
*/
|
|
@@ -373,15 +378,15 @@ interface TableProps extends PositionProps, TextBaseProps, ObjectNameProps {
|
|
|
373
378
|
*/
|
|
374
379
|
autoPagePlaceholder?: boolean;
|
|
375
380
|
/**
|
|
376
|
-
* Default border for **every cell** in the table
|
|
381
|
+
* Default border for **every cell** in the table, not the table's outer perimeter.
|
|
377
382
|
*
|
|
378
383
|
* A single `BorderProps` is broadcast to all four sides of each cell; an array is read
|
|
379
384
|
* in TRBL order and applied to each cell's own four sides. So
|
|
380
385
|
* `border: [{type:'solid'}, {type:'none'}, {type:'solid'}, {type:'none'}]` gives *every*
|
|
381
|
-
* cell a top and bottom rule
|
|
386
|
+
* cell a top and bottom rule: a full set of horizontal grid lines, not a rule at the
|
|
382
387
|
* top and bottom of the table. A cell's own `options.border` overrides this entirely.
|
|
383
388
|
*
|
|
384
|
-
* A `null` entry is a hole
|
|
389
|
+
* A `null` entry is a hole (that edge inherits from the table style), where
|
|
385
390
|
* `{ type: 'none' }` writes an explicit no-line that overrides it. Authoring nothing at
|
|
386
391
|
* all depends on {@link tableStyle}: a styled table leaves every edge absent so the style
|
|
387
392
|
* paints its grid, and a table with no style takes four no-fill sides, which is what keeps
|
|
@@ -395,7 +400,7 @@ interface TableProps extends PositionProps, TextBaseProps, ObjectNameProps {
|
|
|
395
400
|
*/
|
|
396
401
|
border?: BorderProps | [BorderProps | null, BorderProps | null, BorderProps | null, BorderProps | null];
|
|
397
402
|
/**
|
|
398
|
-
* Border for the table's outer perimeter only
|
|
403
|
+
* Border for the table's outer perimeter only: the top edge of the first row, the
|
|
399
404
|
* bottom edge of the last row, the left edge of the first column and the right edge of
|
|
400
405
|
* the last column.
|
|
401
406
|
*
|
|
@@ -406,7 +411,7 @@ interface TableProps extends PositionProps, TextBaseProps, ObjectNameProps {
|
|
|
406
411
|
* own `options.border`) already put there.
|
|
407
412
|
*
|
|
408
413
|
* Applied **after** every other border source, so it wins on the sides it touches and
|
|
409
|
-
* leaves the interior alone
|
|
414
|
+
* leaves the interior alone. The "outline the table, no interior grid" case is
|
|
410
415
|
* `outerBorder` with no `border` at all. Merged cells are handled: a span's covered cells
|
|
411
416
|
* inherit the origin's borders, so a colspan straddling the last column still gets the
|
|
412
417
|
* right-hand rule.
|
|
@@ -491,7 +496,7 @@ interface TableProps extends PositionProps, TextBaseProps, ObjectNameProps {
|
|
|
491
496
|
/**
|
|
492
497
|
* Lay the table out right-to-left.
|
|
493
498
|
* Emits `rtl="1"` on `<a:tblPr>`, which mirrors the column order so the first
|
|
494
|
-
* column renders on the right
|
|
499
|
+
* column renders on the right, the correct layout for RTL scripts (Arabic, Hebrew).
|
|
495
500
|
* This controls only the table/column direction; per-cell text direction is set
|
|
496
501
|
* with each cell's `rtlMode` option.
|
|
497
502
|
* @default false
|
|
@@ -507,7 +512,7 @@ interface TableProps extends PositionProps, TextBaseProps, ObjectNameProps {
|
|
|
507
512
|
*
|
|
508
513
|
* **Only a built-in GUID renders.** PowerPoint resolves `<a:tableStyleId>` against
|
|
509
514
|
* its own table-style gallery and never reads a style definition out of the package,
|
|
510
|
-
* so a GUID it does not recognise leaves the table with PowerPoint's no-style look
|
|
515
|
+
* so a GUID it does not recognise leaves the table with PowerPoint's no-style look:
|
|
511
516
|
* a black hairline grid. For brand colours use direct formatting instead:
|
|
512
517
|
* `headerRow`, `columns[i]`, the table-level {@link border} / {@link fill}, or per-cell
|
|
513
518
|
* options. See `docs/tables.md` → "Apply a built-in table style".
|
|
@@ -521,7 +526,7 @@ interface TableProps extends PositionProps, TextBaseProps, ObjectNameProps {
|
|
|
521
526
|
* This is how a header is styled distinctly from the body: each property is merged
|
|
522
527
|
* onto every cell of row 0 (`fill`, `color`, `bold`, `align`, `border`, etc.).
|
|
523
528
|
*
|
|
524
|
-
* Precedence (highest wins), matching how PowerPoint resolves styling
|
|
529
|
+
* Precedence (highest wins), matching how PowerPoint resolves styling, where direct cell
|
|
525
530
|
* formatting overrides a table-style region:
|
|
526
531
|
* 1. explicit per-cell `options` on a row-0 cell
|
|
527
532
|
* 2. this `headerRow`
|
|
@@ -537,13 +542,13 @@ interface TableProps extends PositionProps, TextBaseProps, ObjectNameProps {
|
|
|
537
542
|
* Per-column default cell styling, applied as direct per-cell formatting.
|
|
538
543
|
*
|
|
539
544
|
* `columns[i]` is merged onto every cell that starts in column `i` (`fill`, `color`,
|
|
540
|
-
* `bold`, `align`, `valign`, `border`, `margin`, …), so a wide **colored** matrix
|
|
541
|
-
* per-column fills, maturity-gradient headers
|
|
545
|
+
* `bold`, `align`, `valign`, `border`, `margin`, …), so a wide **colored** matrix
|
|
546
|
+
* (per-column fills, maturity-gradient headers) does not require hand-writing a fill
|
|
542
547
|
* onto every cell. Entries may be sparse (`columns[2]` alone styles only column 2);
|
|
543
548
|
* an `undefined`/omitted entry leaves that column untouched. The whole option is
|
|
544
549
|
* optional and degrades cleanly to today's text-on-white when not given.
|
|
545
550
|
*
|
|
546
|
-
* Precedence (highest wins), matching how PowerPoint resolves styling
|
|
551
|
+
* Precedence (highest wins), matching how PowerPoint resolves styling, where direct cell
|
|
547
552
|
* formatting overrides a table-style region:
|
|
548
553
|
* 1. explicit per-cell `options`
|
|
549
554
|
* 2. `headerRow` (row 0 only)
|
|
@@ -571,7 +576,7 @@ interface TableProps extends PositionProps, TextBaseProps, ObjectNameProps {
|
|
|
571
576
|
*/
|
|
572
577
|
columns?: TableCellProps[];
|
|
573
578
|
/**
|
|
574
|
-
* Default cell background
|
|
579
|
+
* Default cell background, **stamped onto every cell**, not painted behind the table.
|
|
575
580
|
*
|
|
576
581
|
* Each cell that does not set its own `options.fill` (or take one from `headerRow` /
|
|
577
582
|
* `columns[i]`) gets this as its own `a:tcPr` fill. A picture fill is embedded once and
|
|
@@ -579,8 +584,8 @@ interface TableProps extends PositionProps, TextBaseProps, ObjectNameProps {
|
|
|
579
584
|
*
|
|
580
585
|
* Visually this is usually what you want, but it is not what a source deck contains, and
|
|
581
586
|
* it has one real consequence: because every cell ends up explicitly filled, a cell that
|
|
582
|
-
* later gets its own fill has nothing to fall back to. For a genuine table background
|
|
583
|
-
* one `a:tblPr` fill that cells sit on top of
|
|
587
|
+
* later gets its own fill has nothing to fall back to. For a genuine table background
|
|
588
|
+
* (one `a:tblPr` fill that cells sit on top of), use {@link tableFill}. A bare
|
|
584
589
|
* {@link Color} is shorthand for a solid fill ({@link FillOption}).
|
|
585
590
|
* @example 'FF0000' // hex color (red), shorthand for { color:'FF0000' }
|
|
586
591
|
* @example { color:'FF0000' } // hex color (red)
|
|
@@ -590,18 +595,18 @@ interface TableProps extends PositionProps, TextBaseProps, ObjectNameProps {
|
|
|
590
595
|
*/
|
|
591
596
|
fill?: FillOption;
|
|
592
597
|
/**
|
|
593
|
-
* The table's own background (`a:tblPr` fill)
|
|
598
|
+
* The table's own background (`a:tblPr` fill): one fill behind the whole table that
|
|
594
599
|
* every cell sits on top of.
|
|
595
600
|
*
|
|
596
601
|
* The counterpart to {@link fill}, and the difference is where the paint lands rather
|
|
597
602
|
* than how it looks: `fill` copies a colour onto every cell, while this writes a single
|
|
598
|
-
* fill on the table itself. That matters when a cell is meant to be transparent
|
|
603
|
+
* fill on the table itself. That matters when a cell is meant to be transparent: with
|
|
599
604
|
* `tableFill`, an unfilled cell shows the table background through; with `fill` there is
|
|
600
605
|
* no such thing as an unfilled cell. It is also what a deck read back from PowerPoint
|
|
601
606
|
* actually carries, so a replica reproduces the source's structure rather than an
|
|
602
607
|
* equivalent-looking flattening of it.
|
|
603
608
|
*
|
|
604
|
-
* Takes the same {@link FillOption} a cell does
|
|
609
|
+
* Takes the same {@link FillOption} a cell does: solid, gradient, pattern or picture,
|
|
605
610
|
* or a bare {@link Color} as shorthand for a solid fill.
|
|
606
611
|
* @example 'F2F2F2' // shorthand for { color:'F2F2F2' }
|
|
607
612
|
* @example { color:'F2F2F2' } // a light background behind the whole table
|
|
@@ -622,7 +627,7 @@ interface TableProps extends PositionProps, TextBaseProps, ObjectNameProps {
|
|
|
622
627
|
* value and anything that does not read as a finite number are not heights, so they do
|
|
623
628
|
* not pin: the row is sized from the table's `h` instead, or grows to fit if there is
|
|
624
629
|
* none, and a `table/invalid-row-height` diagnostic says so. A *missing* array slot, or
|
|
625
|
-
* `null` in it, is different and is silent
|
|
630
|
+
* `null` in it, is different and is silent; that is how an auto-height row is spelled.
|
|
626
631
|
*
|
|
627
632
|
* The reading is shared by everything that answers a question about row height: the
|
|
628
633
|
* emitted `<a:tr h>`, the export-time measured-fit pass, the auto-pager, and
|
|
@@ -643,7 +648,7 @@ interface TableCell {
|
|
|
643
648
|
/**
|
|
644
649
|
* Cell content: a plain string, or an array of `TableCell` runs for mixed formatting.
|
|
645
650
|
* (A `number` is still coerced to a string at runtime for plain-JS callers, but is no
|
|
646
|
-
* longer part of the type
|
|
651
|
+
* longer part of the type; pass `String(n)` from TypeScript.)
|
|
647
652
|
*/
|
|
648
653
|
text?: string | TableCell[];
|
|
649
654
|
options?: TableCellProps;
|
|
@@ -672,8 +677,8 @@ interface TableRowSlide {
|
|
|
672
677
|
/**
|
|
673
678
|
* The column grid (inches) the pager measured this page against, one entry per grid column.
|
|
674
679
|
*
|
|
675
|
-
* The pager resolves `colW`
|
|
676
|
-
* when the caller gave none
|
|
680
|
+
* The pager resolves `colW` (normalizing a short array, and distributing the usable width
|
|
681
|
+
* when the caller gave none), and the emitted table has to use the same grid, or the widths
|
|
677
682
|
* the text was wrapped to are not the widths it is drawn in. This carried it by writing
|
|
678
683
|
* back onto the options bag it was handed, which made a reused bag change the next call's
|
|
679
684
|
* output; it rides out here instead.
|
|
@@ -681,8 +686,6 @@ interface TableRowSlide {
|
|
|
681
686
|
colW?: number[];
|
|
682
687
|
}
|
|
683
688
|
type TableRow = TableCell[];
|
|
684
|
-
//#endregion
|
|
685
|
-
//#region src/types/animation.d.ts
|
|
686
689
|
/**
|
|
687
690
|
* Base ECMA-376 slide-transition type (`p:transition`'s single type child). Each
|
|
688
691
|
* maps to a `<p:TYPE/>` element; type-specific variants (e.g. direction) go in
|
|
@@ -715,8 +718,8 @@ interface TransitionProps {
|
|
|
715
718
|
sound?: TransitionSoundProps;
|
|
716
719
|
}
|
|
717
720
|
/**
|
|
718
|
-
* A transition sound (`p:sndAc`). Either a **start sound**
|
|
719
|
-
* when the transition runs
|
|
721
|
+
* A transition sound (`p:sndAc`). Either a **start sound** (an embedded WAV played
|
|
722
|
+
* when the transition runs, `p:stSnd` → `p:snd`, optionally looped) or the
|
|
720
723
|
* **stop-previous** form (`p:endSnd`) that silences a still-playing transition
|
|
721
724
|
* sound. Built-in PowerPoint sounds embed identically to a custom file, so there is
|
|
722
725
|
* no separate built-in path: supply the WAV bytes via `data` or `path`.
|
|
@@ -769,11 +772,16 @@ interface AnimationProps {
|
|
|
769
772
|
/** Effect duration in milliseconds; preset-specific default when omitted. */
|
|
770
773
|
durationMs?: number;
|
|
771
774
|
}
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
+
/**
|
|
776
|
+
* The slide number placeholder: one paragraph holding one slide-number field.
|
|
777
|
+
*
|
|
778
|
+
* Takes the `TextBaseProps` that format that field, its paragraph and its text body. `bullet`,
|
|
779
|
+
* `breakLine`, `softBreakBefore` and `tabStops` are left out: they shape a paragraph's list
|
|
780
|
+
* marker, its breaks between runs and its tab characters, and the field has none of them.
|
|
781
|
+
*/
|
|
782
|
+
interface SlideNumberProps extends PositionProps, Omit<TextBaseProps, 'bullet' | 'breakLine' | 'softBreakBefore' | 'tabStops'> {
|
|
775
783
|
/**
|
|
776
|
-
* margin (inches)
|
|
784
|
+
* margin (inches): text-frame internal margin; a value `>= 1` warns as a likely legacy points value
|
|
777
785
|
*/
|
|
778
786
|
margin?: Margin;
|
|
779
787
|
}
|
|
@@ -793,7 +801,7 @@ interface SlideMasterChartProps {
|
|
|
793
801
|
* One object on a slide master, as a key-tagged descriptor.
|
|
794
802
|
*
|
|
795
803
|
* The six descriptors it shares with a group child are {@link CommonObjectDescriptor}; the two
|
|
796
|
-
* below are the master's own
|
|
804
|
+
* below are the master's own: a chart, which a group cannot hold, and a placeholder, which is
|
|
797
805
|
* the whole point of a master.
|
|
798
806
|
*/
|
|
799
807
|
type SlideMasterObject = CommonObjectDescriptor | {
|
|
@@ -810,7 +818,7 @@ type SlideMasterObject = CommonObjectDescriptor | {
|
|
|
810
818
|
};
|
|
811
819
|
/**
|
|
812
820
|
* Bullet configuration for one slide-master text-style level (`a:buChar`/`a:buAutoNum`/`a:buNone`).
|
|
813
|
-
* A focused subset of the run-level bullet model
|
|
821
|
+
* A focused subset of the run-level bullet model: picture bullets and per-glyph sizing are not
|
|
814
822
|
* supported in master defaults (those require slide rels). Set `bullet: false` to suppress the
|
|
815
823
|
* level's bullet entirely.
|
|
816
824
|
*/
|
|
@@ -836,7 +844,7 @@ interface MasterTextStyleLevel {
|
|
|
836
844
|
fontSize?: number;
|
|
837
845
|
/** Font face (`a:defRPr/a:latin@typeface`). Unset keeps the theme font (`+mn-lt`/`+mj-lt`). */
|
|
838
846
|
fontFace?: string;
|
|
839
|
-
/** Text color
|
|
847
|
+
/** Text color, hex (`'C00000'`) or theme slot (`'tx1'`), emitted as `a:defRPr/a:solidFill`. */
|
|
840
848
|
color?: Color;
|
|
841
849
|
/** Bold text (`a:defRPr@b`). */
|
|
842
850
|
bold?: boolean;
|
|
@@ -848,7 +856,11 @@ interface MasterTextStyleLevel {
|
|
|
848
856
|
marginLeft?: number;
|
|
849
857
|
/** First-line indent in inches (`a:lvlNpPr@indent`); negative produces a hanging bullet. */
|
|
850
858
|
indent?: number;
|
|
851
|
-
/**
|
|
859
|
+
/**
|
|
860
|
+
* Bullet config: `false` emits `a:buNone`; `true` gives the level a bullet, its own glyph where
|
|
861
|
+
* the level default has one and `•` where it has none (the title); an object configures a
|
|
862
|
+
* char/number bullet. Unset keeps the level default.
|
|
863
|
+
*/
|
|
852
864
|
bullet?: boolean | MasterBulletProps;
|
|
853
865
|
}
|
|
854
866
|
/**
|
|
@@ -881,8 +893,6 @@ interface SlideMasterProps {
|
|
|
881
893
|
*/
|
|
882
894
|
textStyles?: MasterTextStyleProps;
|
|
883
895
|
}
|
|
884
|
-
//#endregion
|
|
885
|
-
//#region src/types/model3d.d.ts
|
|
886
896
|
/** A point or direction in the model's 3D scene, in metres. */
|
|
887
897
|
interface Model3dPoint {
|
|
888
898
|
x: number;
|
|
@@ -893,7 +903,7 @@ interface Model3dPoint {
|
|
|
893
903
|
* Camera override for `addModel3d()`, mapping onto `am3d:camera`.
|
|
894
904
|
*
|
|
895
905
|
* The defaults are what PowerPoint itself wrote for a 2×2×2 cube, and they are correct for any
|
|
896
|
-
* model whose bounding box is roughly cubic **once `meterPerModelUnit` is right
|
|
906
|
+
* model whose bounding box is roughly cubic **once `meterPerModelUnit` is right**. The camera is
|
|
897
907
|
* expressed in metres, so the scale is what actually decides framing.
|
|
898
908
|
*
|
|
899
909
|
* PowerPoint's own rule, measured against three models: it normalizes the model's largest
|
|
@@ -938,7 +948,7 @@ interface Model3dCameraProps {
|
|
|
938
948
|
*/
|
|
939
949
|
interface Model3dBaseProps extends PositionProps, ObjectNameProps {
|
|
940
950
|
/**
|
|
941
|
-
* Picture of the model shown wherever the live 3D view is unavailable
|
|
951
|
+
* Picture of the model shown wherever the live 3D view is unavailable: a raster image `path`
|
|
942
952
|
* (Node/local) or base64 `data:` URI.
|
|
943
953
|
* - the library cannot render a 3D scene, so when this is omitted a neutral gray placeholder is
|
|
944
954
|
* embedded; PowerPoint 2019+ draws the live model on screen, in exports and in print, but older
|
|
@@ -956,13 +966,13 @@ interface Model3dBaseProps extends PositionProps, ObjectNameProps {
|
|
|
956
966
|
*/
|
|
957
967
|
camera?: Model3dCameraProps;
|
|
958
968
|
/**
|
|
959
|
-
* Metres per model unit (`am3d:trans/am3d:meterPerModelUnit`)
|
|
969
|
+
* Metres per model unit (`am3d:trans/am3d:meterPerModelUnit`): the scale that decides how
|
|
960
970
|
* large the model is in the scene the {@link camera} looks at.
|
|
961
971
|
*
|
|
962
972
|
* This is the single override most models need. PowerPoint sets it to `1 / maxExtent`, where
|
|
963
973
|
* `maxExtent` is the model's largest bounding-box dimension in model units, which normalizes
|
|
964
|
-
* every model to 1 metre across. pptx-ts does not parse the `.glb`, so it cannot measure that
|
|
965
|
-
*
|
|
974
|
+
* every model to 1 metre across. pptx-ts does not parse the `.glb`, so it cannot measure that;
|
|
975
|
+
* it defaults to `0.5`, correct for a model 2 units across. A model 100 units across left at
|
|
966
976
|
* the default is a 50-metre object with the camera 2.26 metres from its centre, i.e. the
|
|
967
977
|
* viewer is inside it.
|
|
968
978
|
* - range: greater than 0
|
|
@@ -971,7 +981,7 @@ interface Model3dBaseProps extends PositionProps, ObjectNameProps {
|
|
|
971
981
|
*/
|
|
972
982
|
meterPerModelUnit?: number;
|
|
973
983
|
/**
|
|
974
|
-
* Alt text (`p:cNvPr@descr`)
|
|
984
|
+
* Alt text (`p:cNvPr@descr`): what a screen reader announces for the model.
|
|
975
985
|
*/
|
|
976
986
|
altText?: string;
|
|
977
987
|
}
|
|
@@ -983,14 +993,12 @@ interface Model3dBaseProps extends PositionProps, ObjectNameProps {
|
|
|
983
993
|
* intrinsic aspect ratio, and the library never opens the payload.
|
|
984
994
|
*/
|
|
985
995
|
type Model3dProps = Model3dBaseProps & DataOrPathRequiredProps;
|
|
986
|
-
//#endregion
|
|
987
|
-
//#region src/types/zoom.d.ts
|
|
988
996
|
/** Options shared by all three zoom kinds. */
|
|
989
997
|
interface ZoomBaseProps extends PositionProps {
|
|
990
998
|
/** Object name (PowerPoint selection-pane label). Auto-named (e.g. `Slide Zoom 3`) when omitted. */
|
|
991
999
|
objectName?: string;
|
|
992
1000
|
/**
|
|
993
|
-
* Ship a caller-supplied thumbnail instead of the gray placeholder
|
|
1001
|
+
* Ship a caller-supplied thumbnail instead of the gray placeholder: a raster image `path`
|
|
994
1002
|
* (Node/local) or base64 `data:` URI. Shown as-authored (not auto-refreshed by PowerPoint).
|
|
995
1003
|
*/
|
|
996
1004
|
coverImage?: {
|
|
@@ -1010,7 +1018,7 @@ interface ZoomBaseProps extends PositionProps {
|
|
|
1010
1018
|
* A zoom is a `p:graphicFrame`, so these land on its `a:graphicFrameLocks` and the flags that
|
|
1011
1019
|
* apply are the graphic-frame ones (`noGrp`, `noDrilldown`, `noSelect`, `noChangeAspect`,
|
|
1012
1020
|
* `noMove`, `noResize`); a picture-only flag warns and is dropped, as everywhere else. The
|
|
1013
|
-
* `mc:Fallback` picture keeps its own fixed lock set
|
|
1021
|
+
* `mc:Fallback` picture keeps its own fixed lock set. It is what pre-2016 consumers draw, and
|
|
1014
1022
|
* folding a graphic-frame flag set onto a `a:picLocks` element would warn about every flag the
|
|
1015
1023
|
* two element types do not share.
|
|
1016
1024
|
*
|
|
@@ -1022,7 +1030,7 @@ interface ZoomBaseProps extends PositionProps {
|
|
|
1022
1030
|
}
|
|
1023
1031
|
/** Slide Zoom: a tile that zooms to a single target slide. */
|
|
1024
1032
|
interface SlideZoomProps extends ZoomBaseProps {
|
|
1025
|
-
/** Target slide
|
|
1033
|
+
/** Target slide: a `Slide` returned by `addSlide()`, or its 1-based slide number. */
|
|
1026
1034
|
target: Slide | number;
|
|
1027
1035
|
}
|
|
1028
1036
|
/** Section Zoom: a tile that zooms to the start of a named section. */
|
|
@@ -1035,8 +1043,6 @@ interface SectionZoomProps extends ZoomBaseProps {
|
|
|
1035
1043
|
* The section containing the host slide is excluded (a summary does not link to itself).
|
|
1036
1044
|
*/
|
|
1037
1045
|
type SummaryZoomProps = ZoomBaseProps;
|
|
1038
|
-
//#endregion
|
|
1039
|
-
//#region src/types/slide.d.ts
|
|
1040
1046
|
/**
|
|
1041
1047
|
* A child object that can be placed inside a group via `slide.addGroup()`.
|
|
1042
1048
|
*
|
|
@@ -1057,7 +1063,7 @@ type GroupChildProps = CommonObjectDescriptor | {
|
|
|
1057
1063
|
* Options for `slide.addGroup()`.
|
|
1058
1064
|
*
|
|
1059
1065
|
* The group keeps an identity child coordinate space (`chOff/chExt == off/ext`) at every depth:
|
|
1060
|
-
* children
|
|
1066
|
+
* children, including nested groups, keep their slide-absolute `x/y/w/h`. A consequence worth
|
|
1061
1067
|
* knowing: a group's own frame never moves or scales its children, it only places the selection
|
|
1062
1068
|
* handle and the rotate pivot.
|
|
1063
1069
|
*
|
|
@@ -1073,7 +1079,7 @@ interface GroupProps extends PositionProps, ObjectNameProps {
|
|
|
1073
1079
|
/** Flip the group vertically */
|
|
1074
1080
|
flipV?: boolean;
|
|
1075
1081
|
}
|
|
1076
|
-
interface ObjectOptions extends ImageBaseProps,
|
|
1082
|
+
interface ObjectOptions extends ImageBaseProps, Omit<ShapeProps, keyof PositionProps>, TableCellProps, TextPropsOptions {
|
|
1077
1083
|
cx?: Coord;
|
|
1078
1084
|
cy?: Coord;
|
|
1079
1085
|
margin?: Margin;
|
|
@@ -1101,7 +1107,7 @@ interface SlideLayout {
|
|
|
1101
1107
|
}
|
|
1102
1108
|
/**
|
|
1103
1109
|
* One authored object on a slide, as {@link Slide.objects} reports it: what it is and how it is
|
|
1104
|
-
* addressed, not how it is drawn. It is a snapshot taken when the getter ran, not a live handle
|
|
1110
|
+
* addressed, not how it is drawn. It is a snapshot taken when the getter ran, not a live handle:
|
|
1105
1111
|
* nothing on it writes back, and a later `addShape`/`groupObjects` leaves it describing the slide
|
|
1106
1112
|
* as it was.
|
|
1107
1113
|
*
|
|
@@ -1109,11 +1115,11 @@ interface SlideLayout {
|
|
|
1109
1115
|
* whose descriptors nobody kept, and the only durable handle on them is the `objectName` each one
|
|
1110
1116
|
* was authored with; without a way to enumerate those, a consumer that wants to act on what is
|
|
1111
1117
|
* already there has to either make every renderer surrender its internals or keep a parallel
|
|
1112
|
-
* ledger of what it added
|
|
1118
|
+
* ledger of what it added, and a ledger is wrong the moment a renderer adds an object it did not
|
|
1113
1119
|
* announce.
|
|
1114
1120
|
*/
|
|
1115
1121
|
interface SlideObjectInfo {
|
|
1116
|
-
/** What kind of object this is
|
|
1122
|
+
/** What kind of object this is: the same value the object was authored as. */
|
|
1117
1123
|
readonly type: SlideObjectType;
|
|
1118
1124
|
/**
|
|
1119
1125
|
* Selection Pane name, in the spelling the caller passed to `objectName`, so it can be handed
|
|
@@ -1121,7 +1127,7 @@ interface SlideObjectInfo {
|
|
|
1121
1127
|
*
|
|
1122
1128
|
* Always a string: an object authored without a name still gets the generated `Shape 3` /
|
|
1123
1129
|
* `Text 1` / `Group 2` identity PowerPoint shows in the Selection Pane, and that name addresses
|
|
1124
|
-
* it just as well. The two are indistinguishable here on purpose
|
|
1130
|
+
* it just as well. The two are indistinguishable here on purpose: nothing downstream of
|
|
1125
1131
|
* authoring records which is which, and a consumer that cares can tell them apart by the
|
|
1126
1132
|
* naming convention it chose for its own objects.
|
|
1127
1133
|
*/
|
|
@@ -1130,7 +1136,7 @@ interface SlideObjectInfo {
|
|
|
1130
1136
|
readonly isPlaceholder: boolean;
|
|
1131
1137
|
/**
|
|
1132
1138
|
* Whether `groupObjects()` would accept this object on kind alone. It cannot speak for the
|
|
1133
|
-
* *selection*
|
|
1139
|
+
* *selection* (an unresolved, duplicated or ambiguous name still throws), so it answers "is
|
|
1134
1140
|
* this object groupable", never "will this call succeed".
|
|
1135
1141
|
*/
|
|
1136
1142
|
readonly canGroup: boolean;
|
|
@@ -1148,7 +1154,7 @@ interface SlideObjectInfo {
|
|
|
1148
1154
|
* `exactOptionalPropertyTypes`: `SlideBuilder` implements them as accessor pairs, so the property
|
|
1149
1155
|
* is *always* present on a real slide and its getter answers `undefined` when nothing is set.
|
|
1150
1156
|
* There is no absent state for the declaration to describe. Writing one is also how the setters
|
|
1151
|
-
* are cleared
|
|
1157
|
+
* are cleared (`slide.transition = undefined` removes the `p:transition`), and an interface that
|
|
1152
1158
|
* could not express the value its own setter takes would be describing a different type.
|
|
1153
1159
|
*/
|
|
1154
1160
|
interface Slide {
|
|
@@ -1159,7 +1165,7 @@ interface Slide {
|
|
|
1159
1165
|
addConnector: (options: ConnectorProps) => Slide;
|
|
1160
1166
|
addImage: (options: ImageProps) => Slide;
|
|
1161
1167
|
addMedia: (options: MediaProps) => Slide;
|
|
1162
|
-
/** Embed a 3D model (Insert ▸ 3D Models)
|
|
1168
|
+
/** Embed a 3D model (Insert ▸ 3D Models): a `.glb` PowerPoint 2019+ renders live. */
|
|
1163
1169
|
addModel3d: (options: Model3dProps) => Slide;
|
|
1164
1170
|
/** Embed an OLE object (Insert ▸ Object) whose bytes travel inside the `.pptx`. */
|
|
1165
1171
|
addOleObject: (options: OleObjectProps) => Slide;
|
|
@@ -1174,22 +1180,22 @@ interface Slide {
|
|
|
1174
1180
|
/** Group objects already on this slide, addressed by their `objectName`, into a single group. */
|
|
1175
1181
|
groupObjects: (objectNames: string[], options?: GroupProps) => Slide;
|
|
1176
1182
|
/**
|
|
1177
|
-
* Add a Slide Zoom
|
|
1183
|
+
* Add a Slide Zoom: a clickable tile that zooms to a single target slide (Insert ▸ Zoom).
|
|
1178
1184
|
* @example slide.addSlideZoom({ target: intro, x: 1, y: 1, w: 3, h: 1.7 })
|
|
1179
1185
|
*/
|
|
1180
1186
|
addSlideZoom: (options: SlideZoomProps) => Slide;
|
|
1181
1187
|
/**
|
|
1182
|
-
* Add a Section Zoom
|
|
1188
|
+
* Add a Section Zoom: a clickable tile that zooms to the start of a named section.
|
|
1183
1189
|
* @example slide.addSectionZoom({ sectionTitle: 'Results', x: 1, y: 1, w: 3, h: 1.7 })
|
|
1184
1190
|
*/
|
|
1185
1191
|
addSectionZoom: (options: SectionZoomProps) => Slide;
|
|
1186
1192
|
/**
|
|
1187
|
-
* Add a Summary Zoom
|
|
1193
|
+
* Add a Summary Zoom: a grid of tiles, one per section (excluding this slide's own section).
|
|
1188
1194
|
* @example slide.addSummaryZoom({ x: 0.5, y: 1.5, w: 11, h: 4.5 })
|
|
1189
1195
|
*/
|
|
1190
1196
|
addSummaryZoom: (options: SummaryZoomProps) => Slide;
|
|
1191
1197
|
/**
|
|
1192
|
-
* The objects authored on this slide so far, bottom-to-top in z-order
|
|
1198
|
+
* The objects authored on this slide so far, bottom-to-top in z-order: the read-back half of
|
|
1193
1199
|
* `groupObjects()`, which addresses those same objects by name but until now gave no way to
|
|
1194
1200
|
* learn the names.
|
|
1195
1201
|
*
|
|
@@ -1236,7 +1242,10 @@ interface Slide {
|
|
|
1236
1242
|
*/
|
|
1237
1243
|
background?: BackgroundOption | undefined;
|
|
1238
1244
|
/**
|
|
1239
|
-
* Default text color (hex format)
|
|
1245
|
+
* Default text color (hex format): the color of `addText` and table text that states none
|
|
1246
|
+
* itself, on its shape or on its table. Read when the slide is written, so it reaches text
|
|
1247
|
+
* added before it was set. Placeholder text and hyperlinks keep inheriting their colors, and a
|
|
1248
|
+
* table with a hyperlink in it states no default color at all.
|
|
1240
1249
|
* @example 'FF3399'
|
|
1241
1250
|
* @default '000000' (DEF_FONT_COLOR)
|
|
1242
1251
|
*/
|
|
@@ -1256,6 +1265,5 @@ interface AddSlideProps {
|
|
|
1256
1265
|
masterTitle?: string;
|
|
1257
1266
|
sectionTitle?: string;
|
|
1258
1267
|
}
|
|
1259
|
-
//#endregion
|
|
1260
1268
|
export { TableCellDiagonals as A, AnimationTrigger as C, TransitionType as D, TransitionSoundProps as E, TableToSlidesDocument as F, TableToSlidesElement as I, TableToSlidesProps as L, TableProps as M, TableRow as N, TableCell as O, TableRowSlide as P, AnimationProps as S, TransitionProps as T, MasterTextStyleProps as _, Slide as a, SlideMasterProps as b, SectionZoomProps as c, ZoomBaseProps as d, Model3dCameraProps as f, MasterTextStyleLevel as g, MasterBulletProps as h, ObjectOptions as i, TableCellProps as j, TableCell3DProps as k, SlideZoomProps as l, Model3dProps as m, GroupChildProps as n, SlideLayout as o, Model3dPoint as p, GroupProps as r, SlideObjectInfo as s, AddSlideProps as t, SummaryZoomProps as u, SlideMasterChartProps as v, PresetEffect as w, SlideNumberProps as x, SlideMasterObject as y };
|
|
1261
|
-
//# sourceMappingURL=slide-
|
|
1269
|
+
//# sourceMappingURL=slide-BmT4kMoO.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slide-BmT4kMoO.d.ts","names":[],"sources":["../src/types/table.ts","../src/types/animation.ts","../src/types/master.ts","../src/types/model3d.ts","../src/types/zoom.ts","../src/types/slide.ts"],"mappings":";;;;;;;;;;;UA4BiB;EAChB,eAAe;EACf,gBAAgB;EAChB,mBAAmB;;;;;;UAOH;EAChB,iBAAiB,sBAAsB;;;;;;UAOvB,2BAA2B,KAAK;;;;;;;EAOhD;IAAa,OAAO;IAAiB,SAAS;;;;;EAI9C;IAAa,WAAW;IAAY,SAAS;;;;;EAI7C;IAAa,MAAM;IAAY,SAAS;;;;;E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;;EAE3C,WAAW,UAAU,mBAAmB,UAAU,eAAe;;EAEjE,eAAe,uBAAuB,UAAU,eAAe;;;;;EAK/D,eAAe,SAAS,mBAAmB;;;;;EAK3C,iBAAiB,SAAS,qBAAqB;;;;;EAK/C,iBAAiB,SAAS,qBAAqB;;;;;;;;;;;;WAatC,kBAAkB;;;;;;;;;;;WAYlB,oBAAoB;;;;;EAM7B,aAAa;;;;;;WAOJ;;;;WAIA;;;;;;;;;EAUT,aAAa;;;;;;;;;EASb,QAAQ;;;;;EAKR;;;;EAIA,cAAc;;UAEE;;EAEhB;EACA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/ooxml/slide-size.ts
|
|
2
2
|
/**
|
|
3
3
|
* The slide size a presentation has when `presentation.xml` declares none.
|
|
4
4
|
*
|
|
@@ -82,7 +82,6 @@ function presentationFormatLabel(widthEmu, heightEmu) {
|
|
|
82
82
|
function slideSizeType(widthEmu, heightEmu) {
|
|
83
83
|
return standardSlideSize(widthEmu, heightEmu)?.type;
|
|
84
84
|
}
|
|
85
|
-
//#endregion
|
|
86
85
|
export { presentationFormatLabel as n, slideSizeType as r, ABSENT_SLIDE_SIZE_EMU as t };
|
|
87
86
|
|
|
88
|
-
//# sourceMappingURL=slide-size-
|
|
87
|
+
//# sourceMappingURL=slide-size-SkScz1ig.js.map
|