cupertino-files / KeynoteSlide
Class: KeynoteSlide
Defined in: src/keynote/document.ts:147
Constructors
Constructor
new KeynoteSlide(
document,object,node,index,depth):KeynoteSlide
Defined in: src/keynote/document.ts:158
Parameters
document
object
node
index
number
depth
number
Returns
KeynoteSlide
Properties
depth
readonlydepth:number
Defined in: src/keynote/document.ts:156
Outline depth (1 = top level; >1 = indented under a parent).
document
readonlydocument:KeynoteDocument
Defined in: src/keynote/document.ts:148
index
readonlyindex:number
Defined in: src/keynote/document.ts:154
Presentation order, counting skipped slides.
node
readonlynode:IwaObject
Defined in: src/keynote/document.ts:152
The KN.SlideNodeArchive that placed this slide in the tree.
object
readonlyobject:IwaObject
Defined in: src/keynote/document.ts:150
The KN.SlideArchive object.
Accessors
body
Get Signature
get body():
string|undefined
Defined in: src/keynote/document.ts:308
Body placeholder text, if present.
Returns
string | undefined
Set Signature
set body(
text):void
Defined in: src/keynote/document.ts:312
Parameters
text
string
Returns
void
buildCount
Get Signature
get buildCount():
number
Defined in: src/keynote/document.ts:647
Number of animation builds on this slide.
Returns
number
id
Get Signature
get id():
bigint
Defined in: src/keynote/document.ts:172
Returns
bigint
isSkipped
Get Signature
get isSkipped():
boolean
Defined in: src/keynote/document.ts:181
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:185
Parameters
value
boolean
Returns
void
masterId
Get Signature
get masterId():
bigint|undefined
Defined in: src/keynote/document.ts:195
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:190
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:284
Presenter-notes text ("" when the slide has no notes).
Returns
string
Set Signature
set notes(
text):void
Defined in: src/keynote/document.ts:288
Parameters
text
string
Returns
void
title
Get Signature
get title():
string|undefined
Defined in: src/keynote/document.ts:299
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:303
Parameters
text
string
Returns
void
Methods
addBuild()
addBuild(
spec):BuildModel
Defined in: src/keynote/document.ts:536
Animate a drawable on this slide: an all-at-once build in the shape the app writes, played on click. Keynote plays a build written this way and keeps it field for field, reseeding the random number and minting new chunk uids on save.
Parameters
spec
NewBuild
Returns
Agent Tool
add_build
addTable()
addTable(
options?):TableModel
Defined in: src/keynote/document.ts:495
Put a table on the slide: the neutral table every app shares (the blank Numbers document's own, Apple-made), its parent the slide, in both of the slide's drawable lists like the corpus's slide tables. rows fits and fills it; name is made unique among the deck's tables; x and y place it, else it keeps the donor's position.
Parameters
options?
name?
string
rows?
readonly readonly string[][]
x?
number
y?
number
Returns
Agent Tool
add_table
addTextBox()
addTextBox(
text,placement?):DrawableModel
Defined in: src/keynote/document.ts:470
Put a text box on this slide, saying text, placed and sized by placement (points; the donor's size otherwise). The box is a deep copy of a text box the deck already carries — this slide's first, else any slide's or master's — so it has the theme's own style, its own storage and every field the app writes. Keynote draws a box added this way; its own differs in nothing but text, geometry and style.
Parameters
text
string
placement?
DrawablePlacement = {}
Returns
Agent Tool
add_text_box
background()
background():
Fill|undefined
Defined in: src/keynote/document.ts:217
The slide's background fill, read up the style chain: a slide with a background of its own carries a variation style whose parent is the master's; one without shares the master's style outright.
Returns
Fill | undefined
builds()
builds():
BuildModel[]
Defined in: src/keynote/document.ts:444
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
canvasComments()
canvasComments():
CanvasComment[]
Defined in: src/keynote/document.ts:452
The comments pinned to this slide's canvas.
Returns
CanvasComment[]
Agent Tool
list_comments
container()
container():
DrawableContainer
Defined in: src/keynote/document.ts:566
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
drawables()
drawables():
DrawableModel[]
Defined in: src/keynote/document.ts:576
All drawables owned by this slide, in z-order where available.
Returns
notesStorage()
notesStorage():
TextStorage|undefined
Defined in: src/keynote/document.ts:276
Presenter-notes storage, when the slide has one.
Returns
TextStorage | undefined
placeholder()
placeholder(
role):TextStorage|undefined
Defined in: src/keynote/document.ts:359
The text storage behind one placeholder role, if the slide has it.
Parameters
role
Returns
TextStorage | undefined
placeholderKind()
placeholderKind(
field):number|undefined
Defined in: src/keynote/document.ts:405
Placeholder kind (title/body/object/slide-number), when resolvable.
Parameters
field
number
Returns
number | undefined
placeholders()
placeholders():
object[]
Defined in: src/keynote/document.ts:328
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:457
Take an animation off this slide.
Parameters
buildId
bigint
Returns
boolean
setBackground()
setBackground(
fill):void
Defined in: src/keynote/document.ts:242
Set the slide's background, copying on write.
A per-slide background is a KN.SlideStyleArchive beside the master's in the stylesheet's component: unnamed, a variation whose parent is the master's style and whose stylesheet is the document's, override count 1, and the fill in its slide properties. Nothing lists it; the slide's own reference is its only referrer. A slide already carrying such a variation of its own has the fill replaced in place; one sharing its style with the master, or with other slides, gets a variation of its own.
Parameters
fill
Returns
void
Agent Tool
set_slide_background
setLayout()
setLayout(
master):void
Defined in: src/keynote/document.ts:208
Put this slide on another layout, as Format ▸ Slide Layout does: the title, body and slide-number placeholders become fresh copies of the new master's, the title and body text carries over, every other drawable the slide owns stays, the old placeholders go, and the slide takes the master's style and tag map. Measured on the app's own change in olekristensen-v26.0-mac-authored.key.
Parameters
master
string | bigint
Returns
void
Agent Tool
manage_slides
setPlaceholderText()
setPlaceholderText(
field,role,text):void
Defined in: src/keynote/document.ts:372
Set a placeholder's text.
Only replaces text in a placeholder the slide already has. Creating one means synthesising 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:621
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:415
Every text storage owned by this slide, including placeholders.
Returns
transition()
transition():
SlideTransition|undefined
Defined in: src/keynote/document.ts:594
The slide's transition. effect === "none" means no transition.
Returns
SlideTransition | undefined