Skip to content

cupertino-files / KeynoteSlide

Class: KeynoteSlide ​

Defined in: src/keynote/document.ts:127

Constructors ​

Constructor ​

new KeynoteSlide(document, object, node, index, depth): KeynoteSlide

Defined in: src/keynote/document.ts:138

Parameters ​

document ​

KeynoteDocument

object ​

IwaObject

node ​

IwaObject

index ​

number

depth ​

number

Returns ​

KeynoteSlide

Properties ​

depth ​

readonly depth: number

Defined in: src/keynote/document.ts:136

Outline depth (1 = top level; >1 = indented under a parent).


document ​

readonly document: KeynoteDocument

Defined in: src/keynote/document.ts:128


index ​

readonly index: number

Defined in: src/keynote/document.ts:134

Presentation order, counting skipped slides.


node ​

readonly node: IwaObject

Defined in: src/keynote/document.ts:132

The KN.SlideNodeArchive that placed this slide in the tree.


object ​

readonly object: IwaObject

Defined in: src/keynote/document.ts:130

The KN.SlideArchive object.

Accessors ​

body ​

Get Signature ​

get body(): string | undefined

Defined in: src/keynote/document.ts:212

Body placeholder text, if present.

Returns ​

string | undefined

Set Signature ​

set body(text): void

Defined in: src/keynote/document.ts:216

Parameters ​
text ​

string

Returns ​

void


buildCount ​

Get Signature ​

get buildCount(): number

Defined in: src/keynote/document.ts:444

Number of animation builds on this slide.

Returns ​

number


id ​

Get Signature ​

get id(): bigint

Defined in: src/keynote/document.ts:152

Returns ​

bigint


isSkipped ​

Get Signature ​

get isSkipped(): boolean

Defined in: src/keynote/document.ts:161

Skipped slides are retained in the file but not shown when presenting.

Returns ​

boolean

Set Signature ​

set isSkipped(value): void

Defined in: src/keynote/document.ts:165

Parameters ​
value ​

boolean

Returns ​

void


masterId ​

Get Signature ​

get masterId(): bigint | undefined

Defined in: src/keynote/document.ts:175

The master (template) slide this one is based on, if any.

Returns ​

bigint | undefined


name ​

Get Signature ​

get name(): string | undefined

Defined in: src/keynote/document.ts:170

Master/layout slides carry a name; content slides normally do not.

Returns ​

string | undefined


notes ​

Get Signature ​

get notes(): string

Defined in: src/keynote/document.ts:188

Speaker-notes text ("" when the slide has no notes).

Returns ​

string

Set Signature ​

set notes(text): void

Defined in: src/keynote/document.ts:192

Parameters ​
text ​

string

Returns ​

void


title ​

Get Signature ​

get title(): string | undefined

Defined in: src/keynote/document.ts:203

Title placeholder text, if the slide has a title placeholder.

Returns ​

string | undefined

Set Signature ​

set title(text): void

Defined in: src/keynote/document.ts:207

Parameters ​
text ​

string

Returns ​

void

Methods ​

builds() ​

builds(): BuildModel[]

Defined in: src/keynote/document.ts:348

The slide's animations.

Empty for every deck in the corpus — see src/keynote/builds.ts for why that matters to how much this claims.

Returns ​

BuildModel[]


container() ​

container(): DrawableContainer

Defined in: src/keynote/document.ts:363

The slide's drawable list, for adding, removing and reordering.

Keynote keeps ownership and paint order in two lists, so both move together — a drawable added to only the first is owned but never drawn.

Returns ​

DrawableContainer


drawables() ​

drawables(): DrawableModel[]

Defined in: src/keynote/document.ts:373

All drawables owned by this slide, in z-order where available.

Returns ​

DrawableModel[]


notesStorage() ​

notesStorage(): TextStorage | undefined

Defined in: src/keynote/document.ts:180

Speaker-notes storage, when the slide has one.

Returns ​

TextStorage | undefined


placeholder() ​

placeholder(role): TextStorage | undefined

Defined in: src/keynote/document.ts:263

The text storage behind one placeholder role, if the slide has it.

Parameters ​

role ​

PlaceholderRole

Returns ​

TextStorage | undefined


placeholderKind() ​

placeholderKind(field): number | undefined

Defined in: src/keynote/document.ts:309

Placeholder kind (title/body/object/slide-number), when resolvable.

Parameters ​

field ​

number

Returns ​

number | undefined


placeholders() ​

placeholders(): object[]

Defined in: src/keynote/document.ts:232

The slide's placeholders, by role.

A placeholder is a box the theme puts on the slide for you to fill — title, body, the slide number, or a media well. It is a KN.PlaceholderArchive, which embeds a TSWP.ShapeInfoArchive as its super, so its text lives one level deeper than a plain shape's.

Only placeholders the slide owns are listed. A slide showing its master's title box has none of its own until something fills it, which is why a slide can present a title it does not carry.

Returns ​


removeBuild() ​

removeBuild(buildId): boolean

Defined in: src/keynote/document.ts:353

Take an animation off this slide.

Parameters ​

buildId ​

bigint

Returns ​

boolean


setPlaceholderText() ​

setPlaceholderText(field, role, text): void

Defined in: src/keynote/document.ts:276

Set a placeholder's text.

Only replaces text in a placeholder the slide already has. Creating one means synthesizing a shape with the theme's geometry and style for that role, which lives in the master — so a slide whose layout has no body box is told so rather than given an unstyled one floating at the origin.

Parameters ​

field ​

number

role ​

string

text ​

string

Returns ​

void


setTransition() ​

setTransition(update): void

Defined in: src/keynote/document.ts:418

Update the slide's transition. Only the given properties change. Setting effect: "none" disables the transition, which is how Keynote itself encodes "no transition".

The effect string is written verbatim, and only the app's own ids take: both measured families read back from Keynote-authored decks — apple:ca-push (CoreAnimation-class, with direction) and com.apple.iWork.Keynote.BLTFadeThruColor (bespoke, with its own parameter fields) — while a guessed apple:transition/dissolve did not survive the app. Reuse an id read from a deck that has the effect; no corpus fixture carries one to copy from.

Parameters ​

update ​

Partial<Omit<SlideTransition, "enabled">>

Returns ​

void


textStorages() ​

textStorages(): TextStorage[]

Defined in: src/keynote/document.ts:319

Every text storage owned by this slide, including placeholders.

Returns ​

TextStorage[]


transition() ​

transition(): SlideTransition | undefined

Defined in: src/keynote/document.ts:391

The slide's transition. effect === "none" means no transition.

Returns ​

SlideTransition | undefined

MIT licensed. Independently made — not by Apple in California. Not affiliated with or endorsed by Apple Inc.