Screenplays: a publication form set to industry standards
A book can now be a screenplay. page.cavu.book gains `form` (prose | screenplay; absent is prose, so existing records are untouched), and a script's body is a flat run of the new page.cavu.blocks.screenplay element — scene heading, action, character, parenthetical, dialogue, lyric, transition, centered — inside the same chapter pages prose uses, one page per act. That keeps TOC anchors, the reading route, highlights, KOReader positions and the studio block editor on the one path they already have. DESIGN.md records why this stretches the "silent hole" tolerance, and why Leaflet's html block (a fixed-height iframe) was rejected as the storage. - Studio: a Form picker on the new-book wizard; a screenplay takes a Fountain file (lib/publisher/fountain.ts — title page prefills title and author, `#` sections become acts, notes/synopses/boneyard left out with a warning). The manage page accepts Fountain for releases and replacements and shows only page size and act breaks, since the rest of a script's setting is convention. The block editor switches an element's type. - Reader and preview: Courier Prime, the standard indents as ch values that squeeze in proportion on narrow columns, scene numbers in the margins, cue kept with its speech across paginated columns. - EPUB: the same elements, one XHTML element per block so the KOReader outline still maps. - PDF: the US Letter script page exactly (A4 if chosen) — laid out on a 60-character, 54-line grid by the pure lib/screenplayLayout.ts: title page, `N.` page numbers, scene numbers in both margins, (MORE)/(CONT'D) across page breaks, no orphaned scene headings or page-opening transitions. Shared font/destination helpers move to pdfFonts.ts. - Records are validated against the screenplay schema at assembly. - vitest (reader only) covers the Fountain parser and the page layout. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>