tiny.zen
Overview · API · Code relationships · Verification · Audit
Overview
Technical document compilation, static site rendering, and staged publication. Markdown parsing evaluates syntax depth limits and derives memory bounds upfront via explicit planning passes.
Clean site publication renders pages into an isolated staging directory, allowing validation checks to run before promoting changes. If rendering or validation fails, publication aborts and the prior live site remains untouched. Directory promotion swaps the staging path into place via a filesystem rename, which requires both directories to reside on the same filesystem device.
Definitions
Actions
Public operations.
renderAsciiDocument: Renders into active storage; output borrows it untilreset.buildSite: Publishes through staging; render and hook failures preserve prior output.loadTheme: Loads optional source theme files over a borrowed base theme.parseDiagram: Parses JSONL into active storage; reset after the borrowed document's last use.parseFootnotes: Parses into active storage; the set borrows it untilreset.parseFrontmatter: Parses into active storage; the result borrows it untilreset.parseQuiz: Parses into active storage; the quiz borrows it untilreset.renderCode: Appends escaped, optionally highlighted code-block HTML to caller-owned output.parseCodeInfo: Splits a code-fence info string into language and title without allocation.renderAsciiOwned: Returns an owned ASCII render of an existing diagram document.renderPage: Renders into active storage; returned HTML borrows it untilreset.renderMarkdown: Renders Markdown into an owned result; release it with the same allocator.inspectMarkdown: Fills activeHeadingStorage; the document borrows it untilreset.planMarkdownHeadings: Measures exact heading storage demand without allocating.renderAscii: Parses JSONL and returns an owned ASCII render.
Types and contracts
Public types and contracts.
MarkdownLinkReport: Caller-owned, fixed-capacity sink for rendered link records.CodeInfo: Borrowed language and title parsed from a code-fence info string.CodeOptions: Controls highlighting, numbering, titles, labels, and wrapping.DiagramDocument: Owned parsed diagram model; release it through itsdeinitmethod.MarkdownMode: Selects ordinary document HTML or slide-deck HTML.MarkdownOptions: Bounds Markdown features and optionally captures a source-local diagnostic.RenderedMarkdown: Owns the rendered HTML and the storage borrowed by its document view.RenderedMarkdownLink: One link or image the renderer emitted, located in its rendered source.ThemeError: Theme loading and template rendering failures.AsciiDiagramOptions: Requested ASCII dimensions, clamped to 24...200 columns and 8...80 rows.AsciiRenderCapacity: Checked one-region byte layout derived fromAsciiRenderLimits.AsciiRenderError: ASCII exhaustion, invalid scales, and capacity overflow.AsciiRenderExhaustion: Identifies the exhausted ASCII region or an already active output.AsciiRenderLimits: Bounds categories, stack totals, canvas bytes, and output bytes.AsciiRenderPlan: Exact, clamped ASCII demand for one document and option set.AsciiRenderStatus: Reports active, high-water, and rejected ASCII render demand.AsciiRenderStorage: Reusable caller-allocated storage for bounded ASCII rendering.AsciiRendered: Owns ASCII output and storage; release it withdeinitand the same allocator.BeforePublish: Optional check over complete staging output before publication.BuildOptions: Bounds and controls one source-tree to static-site publication.BuildResult: Counts published pages and assets, skipped drafts and slop, and transferred bytes.DiagramDocumentCapacity: Checked byte layout derived fromDiagramDocumentLimits.DiagramDocumentCapacityError: Reports arithmetic overflow while deriving diagram-document capacity.DiagramDocumentError: Diagram parsing failures, storage exhaustion, and host-size overflow.DiagramDocumentLimits: Bounds JSON line scratch and retained diagram-document bytes.DiagramDocumentPlan: Exact diagram-document demand measured before storage acquisition.DiagramDocumentStorageExhaustion: Identifies the diagram-document resource that rejected an input.DiagramDocumentStorageStatus: Reports active and high-water use of diagram-document storage.Document: Borrowed heading view held by activeHeadingStorage.FootnoteCapacity: Checked one-region byte layout derived fromFootnoteLimits.FootnoteCapacityError: Reports arithmetic overflow while deriving footnote capacity.FootnoteDefinition: One footnote definition with assigned display and reference counts.FootnoteError: Footnote exhaustion and checked-capacity failures.FootnoteLimits: Bounds definition count and copied continuation-text bytes.FootnotePlan: Exact footnote storage demand measured before allocation.FootnoteSet: Borrowed footnote set that assigns numbers in reference order.FootnoteStorage: Reusable caller-allocated storage for one parsed footnote set.FootnoteStorageExhaustion: Identifies exceeded footnote storage or an already active result.FootnoteStorageStatus: Reports active, high-water, and rejected footnote demand.FrontmatterCapacity: Checked one-region byte layout derived fromFrontmatterLimits.FrontmatterCapacityError: Reports arithmetic overflow while deriving frontmatter capacity.FrontmatterError: Frontmatter syntax, exhaustion, and checked-capacity failures.FrontmatterLimits: Bounds frontmatter pair count and joined continuation bytes.FrontmatterPlan: Exact frontmatter demand and common-field projection measured without allocation.FrontmatterStorage: Reusable caller-allocated storage for one parsed frontmatter block.FrontmatterStorageExhaustion: Identifies exceeded frontmatter storage or an already active result.FrontmatterStorageStatus: Reports phase, active use, and admitted frontmatter capacity.Heading: One copied heading with level, visible text, stable ID, and source offset.HeadingCapacity: Checked one-region byte layout derived fromHeadingLimits.HeadingCapacityError: Reports arithmetic overflow while deriving heading capacity.HeadingError: Heading exhaustion,InvalidHeadingAnchor,DuplicateHeadingAnchor, and overflow.HeadingLimits: Bounds heading count plus copied heading-text and identifier bytes.HeadingPlan: Exact heading storage demand measured without allocation.HeadingStorage: Reusable caller-allocated storage for one inspected Markdown document.HeadingStorageExhaustion: Identifies the exceeded heading region or an already active document.HeadingStorageStatus: Reports active, high-water, and rejected heading demand.LoadedTheme: Owns any theme file bytes loaded over a borrowed base; release withdeinit.Metadata: Borrowed page metadata with named accessors for standard fields.Page: Borrowed title, description, content, path, and metadata for one page.Pair: One borrowed frontmatter key and value.Parsed: Borrowed metadata plus the Markdown body after the frontmatter block.Quiz: Borrowed collection of parsed quiz questions.QuizCapacity: Checked one-region byte layout derived fromQuizLimits.QuizCapacityError: Reports arithmetic overflow while deriving quiz capacity.QuizError: Invalid quiz syntax, exhaustion, and checked-capacity failures.QuizLimits: Bounds question count, option count, and joined text bytes.QuizOption: One borrowed quiz answer option and whether it is correct.QuizPlan: Exact quiz storage demand measured before allocation.QuizQuestion: One borrowed quiz prompt, answer options, and explanation.QuizStorage: Reusable caller-allocated storage for one parsed quiz.QuizStorageExhaustion: Identifies exceeded quiz storage or an already active result.QuizStorageStatus: Reports active, high-water, and rejected quiz demand.SiteCatalog: Borrowed sorted catalog produced by sealedSiteCatalogStorage.SiteCatalogCapacity: Checked one-region layout derived fromSiteCatalogLimits.SiteCatalogCapacityError: Reports arithmetic overflow while deriving site catalog capacity.SiteCatalogDemand: Byte demand contributed by one site catalog entry.SiteCatalogDispatch: Selects the document editor or presentation workbench for an authored route.SiteCatalogEntry: One retained public page record in a sealed site catalog.SiteCatalogEntryInput: Borrowed values copied when appending one site catalog entry.SiteCatalogError: Site catalog exhaustion and checked-capacity failures.SiteCatalogLimits: Bounds retained page count and copied catalog text bytes.SiteCatalogPlan: Accumulates exact site catalog demand before storage acquisition.SiteCatalogStorage: Append-only storage whosesealresult borrows its sorted entries and text.SiteCatalogStorageExhaustion: Identifies exceeded catalog pages or text bytes.SiteCatalogStorageStatus: Reports retained catalog demand, rejection count, and seal state.SitePageCapacity: Checked page-buffer capacity derived fromSitePageLimits.SitePageCapacityError: Reports arithmetic overflow while deriving page-buffer capacity.SitePageError: Site page exhaustion and checked-capacity failures.SitePageLimits: Bounds the largest reusable Markdown page input buffer.SitePagePlan: Accumulates the largest admitted Markdown page size.SitePageStorage: Reusable caller-allocated buffer for one surveyed Markdown page.SitePageStorageExhaustion: Identifies an oversized page or an already active page buffer.SitePageStorageStatus: Reports active, high-water, and rejected page byte demand.SitePathCapacity: Checked path-buffer capacity derived fromSitePathLimits.SitePathCapacityError: Reports arithmetic overflow while deriving site path capacity.SitePathError: Site path exhaustion and checked-capacity failures.SitePathLimits: Bounds transformed target-path and public-URL bytes.SitePathPlan: Exact transformed site-path demand measured before storage acquisition.SitePathStorage: Reusable caller-allocated target-path and public-URL storage.SitePathStorageExhaustion: Identifies exceeded path storage or an already active path view.SitePathStorageStatus: Reports active, high-water, and rejected path byte demand.SlidesOptions: Controls slide CSS classes, ID prefix, badge, and browser runtime emission.Theme: Borrowed site title, language, layout, stylesheet, and include fragments.ThemeFiles: Selects bounded theme files relative to a site source root.ThemeInclude: Named raw HTML fragment available to a theme placeholder.ThemeRenderCapacity: Checked output-byte capacity derived fromThemeRenderLimits.ThemeRenderError: Invalid templates, exhaustion, and checked-capacity failures.ThemeRenderExhaustion: Identifies exceeded theme output or an already active result.ThemeRenderLimits: Bounds the rendered byte length of one themed page.ThemeRenderStatus: Reports active, high-water, and rejected theme output demand.ThemeRenderStorage: Reusable caller-allocated storage for one rendered themed page.Diagnostic: Fixed-capacity source-local detail for rendering and publication failures.DiagramDocumentStorage: Reusable caller-allocated storage for one parsed JSONL diagram.ThemeRenderPlan: Exact themed-page byte demand measured before storage acquisition.
Namespaces
Public namespaces.
html: HTML text and attribute escaping helpers.document: Bounded heading plans, storage, and borrowed document views.footnote: Bounded Markdown footnote planning and parsing.math: TeX-like expression parsing and MathML rendering.quiz: Bounded interactive and recall quiz parsing.diagram: Declarative diagrams, bounded JSONL documents, and ASCII rendering.slides: Slide-deck rendering and print support.theme: Page templates, source theme loading, and bounded page rendering.frontmatter: Bounded YAML-like page metadata planning and parsing.site: Atomic static-site publication and bounded site working storage.diagnostic: Fixed-capacity source-local failure detail.code: Code-fence metadata, syntax highlighting, and HTML rendering.markdown: Markdown inspection and owned HTML rendering.
Values and defaults
Public values and defaults.
default_footnote_capacity: Capacity derived fromdefault_footnote_limits.default_heading_capacity: General-purpose heading capacity derived fromdefault_heading_limits.default_quiz_capacity: Capacity derived fromdefault_quiz_limits.max_markdown_inline_delimiters: Maximum backtick runs in one inline fragment before rendering rejects it.max_markdown_inline_nesting: Maximum nested link/emphasis, label brackets, or target parentheses.authored_route_manifest_path: Hidden opt-in authored route manifest published inside a rendered site.authored_route_manifest_version: Schema version stored inauthored_route_manifest_path.default_footnote_limits: General-purpose limits for Markdown footnotes.default_heading_limits: General-purpose heading limits used byMarkdownOptions.default_quiz_limits: General-purpose limits for one quiz fence.default_site_catalog_limits: General-purpose site catalog limits.default_site_page_capacity: Capacity derived fromdefault_site_page_limits.default_site_page_limits: General-purpose per-page input limits.default_site_path_capacity: Capacity derived fromdefault_site_path_limits.default_site_path_limits: General-purpose site path limits.default_theme_render_capacity: Capacity derived fromdefault_theme_render_limits.default_theme_render_limits: General-purpose output limits for theme rendering.
Code relationships
Direct static dependencies extracted from parsed source by semantic graph analysis.
Uses: tiny.accy, tiny.bench, tiny.markdown, tiny.simd, tiny.sys, tiny.trace
Used by: tiny.accy, tiny.choir, tiny.glom, tiny.profiling, tiny.sql
Verification
No verification records are cataloged for this module in this build.
Audit
| Evidence | Value |
|---|---|
| Source | lib/zen/src/root.zig |
| Definitions | 60 of 185 documented |
| Members | 102 of 536 documented |
| Public names | 245 API, 1077 indexed |
| Version | 26.7.0 |
| Revision | daab053ee433 |