Skip to main content
The ParsedLesson type represents a fully parsed lesson with narration, visualizations, and scene animations.

ParsedLesson

title
string
required
Lesson title
steps
readonly LessonStep[]
required
Sequence of lesson steps (one per H1 section)
diagnostics
readonly LessonDiagnostic[]
required
Parser warnings and errors

LessonStep

A single section of a lesson.
id
string
required
Unique step identifier
title
string
required
Step title from markdown H1
narration
readonly NarrationBlock[]
required
Narration paragraphs with embedded triggers
blocks
ReadonlyMap<string, VisualizationState>
required
Named visualization blocks defined in this step
scenes
readonly SceneState[]
required
Computed scene states for playback

NarrationBlock

text
string
required
Plain text narration for TTS
triggers
readonly Trigger[]
required
Scene control triggers embedded in narration

Trigger

wordIndex
number
required
Zero-based word index in narration block
text
string
required
Original trigger syntax from markdown
action
TriggerVerb
required
Parsed trigger action. See TriggerVerb for variants.

TriggerVerb

Discriminated union of scene control actions. See Visualization for details on animation effects.

AnimationOverride

Discriminated union for animation configuration.

SceneState

Represents the computed state of a single animation frame.
slots
readonly VisualizationState[]
required
Active visualizations in this scene
transition
TransitionKind
required
Scene transition effect
enterEffects
readonly SlotEnterEffect[]
required
Enter animations for appearing slots
exitEffects
readonly SlotEnterEffect[]
required
Exit animations for disappearing slots
epoch
number
required
Scene epoch (incremented on clear)
focus
string
required
Currently focused region (empty string if none)
flow
string
required
Active flow animation target
pulse
string
required
Pulsing element target
trace
string
required
Traced path target
transformFrom
readonly { readonly to: string; readonly from: string }[]
required
Active transform mappings
annotations
readonly SceneAnnotation[]
required
Scene annotations
zoom
{ readonly scale: number; readonly target: string }
required
Zoom state
pan
string
required
Pan target
draw
string
required
Drawing animation target

LessonDiagnostic

severity
'warning' | 'error'
required
Diagnostic level
message
string
required
Human-readable diagnostic message
location
DiagnosticLocation
required
Source location in lesson markdown

Build docs developers (and LLMs) love