facett-manual/src/embedded.rs
//! **Compiled-in manual content** — the facett Manual, baked into the binary.
//!
//! Everything here is `include_str!` / `include_bytes!` of files under
//! `facett-manual/embedded/`, so the manual ships **inside the binary** with **no
//! runtime disk dependency**: opening the pane never touches the filesystem, and it
//! works on a completely airgapped box.
//!
//! The manual is carried in **both** rendering forms so the pane can present either:
//!
//! - [`MARKDOWN_DOCS`] — the Markdown sources (the *Markdown* variant), and
//! - [`SVG_PAGES`] + [`TYPESET_TOC`] — a prebuilt **typeset vector book**, one SVG
//! per page (the default *Typeset (SVG)* variant, rendered by facett-docview's
//! pure-Rust resvg pipeline).
//!
//! There is no live Typst compiler in-tree; the typeset pages are **prebuilt SVG**
//! embedded here (see the crate docs). Both forms describe the same manual.
/// The embedded **Markdown** sources as `(file_name, body)` pairs — the exact shape
/// [`crate::ManualPane::from_files`] consumes. Baked in with `include_str!`.
pub const MARKDOWN_DOCS: &[(&str, &str)] = &[
("manual-for-idiots.md", include_str!("../embedded/manual-for-idiots.md")),
("manual-pane-guide.md", include_str!("../embedded/manual-pane-guide.md")),
("manual-variants-design.md", include_str!("../embedded/manual-variants-design.md")),
];
/// The embedded **typeset book** — one prebuilt vector SVG per page, in reading
/// order. Baked in with `include_bytes!`; rendered by facett-docview (resvg).
pub const SVG_PAGES: &[&[u8]] = &[
include_bytes!("../embedded/page-01.svg"),
include_bytes!("../embedded/page-02.svg"),
include_bytes!("../embedded/page-03.svg"),
];
/// The typeset book's table of contents: `(chapter title, 0-based page index)`.
pub const TYPESET_TOC: &[(&str, usize)] = &[
("Welcome", 0),
("Reading the manual", 1),
("Why two variants", 2),
];