The manga page model. Page is a book page in a fixed format (pocket, magazine, square, or a free-height strip; spread for a double page) that keeps its proportions and scales as one block: lines, gutters, bubbles and sound effects are sized in container units of the page. A page is made of Tier (bands, height share, slant of the cut below) holding Panel (width share, slant of the cut after it) or Column (tiers inside a cell); the code order is the reading order, and reading="rtl" lays panels out right to left. Gutters between tiers are wider than between panels. Panel options: bleed, frameless, overflow, ink, inset (laid over the previous panel), shape straight | tilted | jagged | cloud | memory. Twelve templates (template prop): three-tiers, big-plus-two, l-shape, diagonal, four-koma, spread, grid-six, splash, inset, columns, shock, flashback; Panel children fill a template in order. Place puts any element in a panel in percent from an anchor (x="72%" y="12%" anchor="top-right") and keeps it inside the panel; SpeechBubble pointAt aims its tail. PanelArt shows a picture framed by a focal point and zoom, toned with TonedImage. The same page can be given as data (page prop, PageData JSON, same structure as the JSX; see page-geometry.ts). Under 480px the page folds into a vertical strip. pageGeometry(data) and onGeometry give each panel's box in reading order (percent of the page) for panel-by-panel readers. PanelGrid, the first CSS-grid layout (cols, rows, colSpan, rowSpan, cut, padding), stays for existing code and becomes Page when given a page, template, format or Tier children. PanelCaption is the narration box (corner or free).
pnpm dlx shadcn@latest add "https://mangacn.romain-sonnet.fr/r/panel.json"