Reference

Schema reference

Every field of the Comic Strip Document, generated from the published JSON Schema.

The tables below are generated at build time from @toonstrip/schema’s schema.json (draft-07, additionalProperties: false throughout). Field names, types, and required-ness come from the schema; the one-line descriptions are maintained on this site.

Note

The TypeScript types are exported from @toonstrip/schema as ComicStripDocument, Panel, Body, Line, Emotion, CameraPreset, and BalloonKind. The JSON Schema is the authoritative machine-checkable version for non-TypeScript producers.

ComicStripDocument

FieldTypeRequiredDescription
version1yesDocument format version. Always 1 for now.
panelsPanel[]yesThe strip, in reading order.

CameraPreset

One of: "reaction", "establishing", "wide", "close-up", "over-shoulder", "medium"

BalloonKind

One of: "speech", "thought", "caption"

Emotion

FieldTypeRequiredDescription
anglenumberyesRadians around the wheel. 0 is HAPPY; each named emotion is π/4 further.
intensitynumberyes0 to 1. 0 is NEUTRAL regardless of angle.

Body

FieldTypeRequiredDescription
characterstringyesId of a character declared by a registered pack.
emotionEmotionyesPoint on the emotion wheel that picks the face.
pose"wave" | "point" | "shrug"noGesture that claims the torso independently of the face.
requestedbooleannoKeep the body on stage even when it has no line this panel. Defaults to true for bodies with a line.

Line

FieldTypeRequiredDescription
speakerstringyesA body's character id, or "caption" for the bodiless caption channel.
balloonBalloonKindyesBalloon shape. A caption speaker must use "caption".
textstringyesThe words. Wrapped by the renderer; keep it short.

Panel

FieldTypeRequiredDescription
backdropstringyesId of a backdrop declared by a registered pack. An unknown id is a load-time error.
roomTitlestringnoOptional banner text drawn in the panel's top-left, like a location caption.
darkbooleannoPaint the panel black and omit the figures. Balloons still draw.
cameraCameraPresetnoFraming preset. Defaults to "medium".
bodiesBody[]yesWho is on stage, left to right.
speakersLine[]yesBalloons, in draw order: the caption first, then each speaking body.