Skip to content

cupertino-files / KeynoteSlide

Class: KeynoteSlide

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

Constructors

Constructor

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

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

Parameters

document

KeynoteDocument

object

IwaObject

node

IwaObject

index

number

depth

number

Returns

KeynoteSlide

Properties

depth

readonly depth: number

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

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


document

readonly document: KeynoteDocument

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


index

readonly index: number

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

Presentation order, counting skipped slides.


node

readonly node: IwaObject

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

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


object

readonly object: IwaObject

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

The KN.SlideArchive object.

Accessors

body

Get Signature

get body(): string | undefined

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

Body placeholder text, if present.

Returns

string | undefined

Set Signature

set body(text): void

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

Parameters
text

string

Returns

void


buildCount

Get Signature

get buildCount(): number

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

Number of animation builds on this slide.

Returns

number


id

Get Signature

get id(): bigint

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

Returns

bigint


isSkipped

Get Signature

get isSkipped(): boolean

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

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:162

Parameters
value

boolean

Returns

void


masterId

Get Signature

get masterId(): bigint | undefined

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

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:167

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:185

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

Returns

string

Set Signature

set notes(text): void

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

Parameters
text

string

Returns

void


title

Get Signature

get title(): string | undefined

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

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:204

Parameters
text

string

Returns

void

Methods

builds()

builds(): BuildModel[]

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

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:360

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:370

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

Returns

DrawableModel[]


notesStorage()

notesStorage(): TextStorage | undefined

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

Speaker-notes storage, when the slide has one.

Returns

TextStorage | undefined


placeholder()

placeholder(role): TextStorage | undefined

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

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:306

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

Parameters

field

number

Returns

number | undefined


placeholders()

placeholders(): object[]

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

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:350

Take an animation off this slide.

Parameters

buildId

bigint

Returns

boolean


setPlaceholderText()

setPlaceholderText(field, role, text): void

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

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:407

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

Parameters

update

Partial<Omit<SlideTransition, "enabled">>

Returns

void


textStorages()

textStorages(): TextStorage[]

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

Every text storage owned by this slide, including placeholders.

Returns

TextStorage[]


transition()

transition(): SlideTransition | undefined

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

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.