CopyChoreographer
Defined in: state.ts:342
Owns one island’s copy for one page view. Fed wire events; emits states.
Pure with respect to the DOM: it decides WHAT should be on screen and when, and never touches how. That is what lets the same choreography drive React, the iframe shell, and anything else without several copies of these rules.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CopyChoreographer(
options?):CopyChoreographer
Defined in: state.ts:382
Parameters
Section titled “Parameters”options?
Section titled “options?”ChoreographerOptions = {}
Returns
Section titled “Returns”CopyChoreographer
Methods
Section titled “Methods”backgroundReady()
Section titled “backgroundReady()”backgroundReady(
bgImage):void
Defined in: state.ts:816
Absence of this event means KEEP THE BAKED THEME WASH. It does not mean clear the art layer — the server omits it when there is no creative image.
The patch waits for the browser to DECODE the image first, so a new background never paints before its pixels exist. On failure the patch still lands; outside a browser it is immediate.
Parameters
Section titled “Parameters”bgImage
Section titled “bgImage”string
Returns
Section titled “Returns”void
checkDeadline()
Section titled “checkDeadline()”checkDeadline():
void
Defined in: state.ts:581
Apply a hold expiry whose time has already passed but whose timer has not run: a background tab throttles timers, and a page restored from the back/forward cache resumes with them overdue. Copy events call this first, so text arriving after the deadline is never shown in place of the fallback. Renderers call it when the page is shown again. Idempotent.
Returns
Section titled “Returns”void
copyChunk()
Section titled “copyChunk()”copyChunk(
field,text):void
Defined in: state.ts:706
A delta landed. While holding (and in view) the first text takes the canvas; on a live field it extends the text. Dropped for a final field.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
copyDone()
Section titled “copyDone()”copyDone(
field,text):void
Defined in: state.ts:733
A field closed. Its text completes what the field shows: it lands whole on a blank field and finishes a typed one. It never replaces different visible text — if it does not extend what was typed, the typed text stands (and development builds warn). For a final field this only marks it settled.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
copyStart()
Section titled “copyStart()”copyStart(
field,mode,source):void
Defined in: state.ts:686
A field opened: proof of life, and provenance. Restarts the hold budget once if it is running. Dropped for a final field.
Parameters
Section titled “Parameters”"generate" | "replay" | null
source
Section titled “source”"generated" | "cached" | "static"
Returns
Section titled “Returns”void
ctaReady()
Section titled “ctaReady()”ctaReady(
text,style,action?):void
Defined in: state.ts:850
Parameters
Section titled “Parameters”string
unknown
action?
Section titled “action?”string
Returns
Section titled “Returns”void
ctaStyleReady()
Section titled “ctaStyleReady()”ctaStyleReady(
style):void
Defined in: state.ts:845
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”void
dispose()
Section titled “dispose()”dispose():
void
Defined in: state.ts:961
Release timers. Safe to call twice.
Returns
Section titled “Returns”void
done()
Section titled “done()”done(
meta):void
Defined in: state.ts:904
Terminal, success.
Parameters
Section titled “Parameters”Record<string, unknown>
Returns
Section titled “Returns”void
failed()
Section titled “failed()”failed(
message):void
Defined in: state.ts:951
Terminal, failure. No failure blanks the canvas: copy that closed stays,
a blank field gets its fallback, and a field the stream was still writing
goes through the UnfinishedCopyPolicy.
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”void
getState()
Section titled “getState()”getState():
CreativeState
Defined in: state.ts:428
Returns
Section titled “Returns”keepFallback()
Section titled “keepFallback()”keepFallback(
field):void
Defined in: state.ts:772
The renderer will not show this field’s copy: it does not fit the slot its fallback reserved. The fallback lands instead and is final for the view; later copy for the field is dropped. Call it before the copy is painted (a renderer measures before the browser paints), never for text the visitor has seen.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
layoutReady()
Section titled “layoutReady()”layoutReady(
layout,manifest?):void
Defined in: state.ts:800
Parameters
Section titled “Parameters”layout
Section titled “layout”string
manifest?
Section titled “manifest?”unknown
Returns
Section titled “Returns”void
sequenceReady()
Section titled “sequenceReady()”sequenceReady(
frames,heroIndex,fps):void
Defined in: state.ts:835
Parameters
Section titled “Parameters”frames
Section titled “frames”string[]
heroIndex
Section titled “heroIndex”number
number
Returns
Section titled “Returns”void
slotInView()
Section titled “slotInView()”slotInView():
void
Defined in: state.ts:532
Call when the slot is in view (already in view at mount counts). Only
meaningful with holdStartsInView; otherwise the slot is in view from
the start and this is a no-op.
At that moment copy the stream already delivered takes the canvas — finished fields land whole, unfinished ones type from the buffer — and with nothing delivered the hold budget starts.
Returns
Section titled “Returns”void
streamOpened()
Section titled “streamOpened()”streamOpened():
void
Defined in: state.ts:486
Call when live copy is coming: when the stream request opens, or earlier when a renderer already knows it will (a stream waiting on a shared variant). Idempotent.
Arms the hold when there is fallback copy the visitor has not seen. Copy
the visitor can already see (initialIsOnScreen) or finished creative
(serverRendered) is final instead: nothing to hold, nothing to replace.
Returns
Section titled “Returns”void
subscribe()
Section titled “subscribe()”subscribe(
listener): () =>void
Defined in: state.ts:432
Parameters
Section titled “Parameters”listener
Section titled “listener”Listener
Returns
Section titled “Returns”() => void
themeReady()
Section titled “themeReady()”themeReady(
colors,sources):void
Defined in: state.ts:795
Parameters
Section titled “Parameters”colors
Section titled “colors”Record<string, string>
sources
Section titled “sources”Record<string, string>
Returns
Section titled “Returns”void
videoReady()
Section titled “videoReady()”videoReady(
videoUrl):void
Defined in: state.ts:840
Parameters
Section titled “Parameters”videoUrl
Section titled “videoUrl”string
Returns
Section titled “Returns”void