pi-better-show reference
The full contract behind the README: every block kind, the core, server, element, and React APIs, and the details of the show_doc extension. Find the section you need and skip the rest.
pi-better-show is one block vocabulary, with one parser, one text fallback, and one answer encoding shared by every host that draws it. The pi extension is one such host; a GUI or a chat bridge can be another.
pi-better-show core: isomorphic, no DOM, no node APIs; depends on `yaml` onlypi-better-show/elements browser: framework-free custom elements, one per block kind (no yaml, no node APIs)pi-better-show/react thin React wrappers over the elements (React is an optional peer)pi-better-show/server node: Mermaid to SVG and to Unicode text (beautiful-mermaid)pi-better-show/extension the pi extension: `show_doc`, a loopback page server, edit mode, event-bus contract v2| Entry | What it does | Section |
|---|---|---|
pi-better-show |
Parses Markdown into blocks, writes them as text, encodes and validates answers. | Blocks, Core API |
pi-better-show/server |
Draws Mermaid as SVG or as Unicode text. | Server API |
pi-better-show/elements |
Draws each block as a custom element and fires pbs-answer. |
Elements |
pi-better-show/react |
Wraps the elements for React. | React |
pi-better-show/extension |
The show_doc tool, the page server, edit mode, and the event bus. |
The pi extension |
The package ships TypeScript source, with no build step. Source uses erasable syntax only, so it loads under node’s type stripping and in bun and bundler pipelines. Design: docs/specs/2026-11-07-better-show/spec.md.