CopyChoreographer
Defined in: state.ts:181
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 three copies of these rules.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new CopyChoreographer(
options?):CopyChoreographer
Defined in: state.ts:243
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:626
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, and a client that cleared on absence would blank the hero on exactly the campaigns that never had a picture.
The patch waits for the browser to DECODE the image first: consumers render this state directly, and a backgroundImage that lands before pixels exist paints the already-flipped theme against the old (or blank) art — the contrast tear. On failure the patch still lands (the consumer’s own loading treatment owns that case); outside a browser it is immediate.
Parameters
Section titled “Parameters”bgImage
Section titled “bgImage”string
Returns
Section titled “Returns”void
copyChunk()
Section titled “copyChunk()”copyChunk(
field,text):void
Defined in: state.ts:553
A delta landed. Text on the wire is text we can show: the first chunk
takes the canvas away from the pending fallback, whatever the start
called itself. While the field shows restored fallback copy a reader can
see, deltas still buffer off-canvas — that text changes ONCE, composed,
at *-done, never delta by delta.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
copyDone()
Section titled “copyDone()”copyDone(
field,text):void
Defined in: state.ts:578
A field closed. text is authoritative — a client that missed chunks can
paint this alone, which is what makes chunk loss a cosmetic problem
instead of a correctness one.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
copyStart()
Section titled “copyStart()”copyStart(
field,mode,source):void
Defined in: state.ts:527
A field opened. Proof of life, and provenance — nothing more.
The canvas changes hands on the first CHUNK, not here: the delivery mode is recorded on the field but no longer consulted for hold release. All a start does while holding is RESTART the fallback budget, because the stream has just proven it is alive and the old budget was measuring a connection that had not connected yet.
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:663
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:658
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”void
dispose()
Section titled “dispose()”dispose():
void
Defined in: state.ts:826
Release timers. Safe to call twice.
Returns
Section titled “Returns”void
done()
Section titled “done()”done(
meta):void
Defined in: state.ts:677
Terminal. Anything still held paints now, once, composed — the last chance for the stream’s copy to land as a single deliberate change rather than being dropped because the budget happened to outlive the stream.
Parameters
Section titled “Parameters”Record<string, unknown>
Returns
Section titled “Returns”void
failed()
Section titled “failed()”failed(
message):void
Defined in: state.ts:767
The stream failed.
No failure blanks the canvas. A field that closed keeps its delivered
copy; a field the stream opened but never finished is repainted with its
WHOLE fallback and demoted to static; a still-blank field gets its
fallback back. The worst honest outcome is that the creative simply
stopped adapting, which looks like a normal page.
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”void
getState()
Section titled “getState()”getState():
CreativeState
Defined in: state.ts:275
Returns
Section titled “Returns”layoutReady()
Section titled “layoutReady()”layoutReady(
layout,manifest?):void
Defined in: state.ts:606
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:648
Parameters
Section titled “Parameters”frames
Section titled “frames”string[]
heroIndex
Section titled “heroIndex”number
number
Returns
Section titled “Returns”void
streamOpened()
Section titled “streamOpened()”streamOpened():
void
Defined in: state.ts:322
Call when the stream request has been opened.
Arms the hold if — and only if — there is fallback copy on the canvas that has NOT already been read. Copy that has been on screen since first paint stays put: it is not a placeholder, and hiding it would be the mid-read wipe this whole machine exists to prevent.
Returns
Section titled “Returns”void
subscribe()
Section titled “subscribe()”subscribe(
listener): () =>void
Defined in: state.ts:279
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:601
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:653
Parameters
Section titled “Parameters”videoUrl
Section titled “videoUrl”string
Returns
Section titled “Returns”void