# Typsty v0.1.0 - API Reference

## Modules

- Documents
  - [Typsty](Typsty.md): Render [Typst](https://typst.app) documents to PDF, PNG and SVG, with Elixir data passed
to the template as Typst values, in its `assigns` dictionary.
  - [Typsty.Component](Typsty.Component.md): Reusable parts of documents, such as tables, letterheads, headers and footers, written as
Typst functions that documents import.
  - [Typsty.Pool](Typsty.Pool.md): A pool of worker processes that render documents outside of the BEAM.
  - [Typsty.Template](Typsty.Template.md): A Typst template with the assigns to render it with.

- Data
  - [Typsty.Encoder](Typsty.Encoder.md): Converts structs into data that can be passed to a template.

- Errors
  - [Typsty.Diagnostic](Typsty.Diagnostic.md): An error or warning reported by Typst.
  - [Typsty.RenderError](Typsty.RenderError.md): Rendering a document failed.
  - [Typsty.SyntaxError](Typsty.SyntaxError.md): A template has invalid Typst syntax, or a component breaks the rules for components (see
`Typsty.Component`). Raised when a module with a `~TYPST` sigil or a `.typ` template is
compiled (or a component, with the `.typ` files in its folder), so that the problem fails
the build instead of a render, and when `mix format` formats one with `Typsty.Formatter`.

- Tooling
  - [Typsty.Formatter](Typsty.Formatter.md): A `mix format` [plugin](https://hexdocs.pm/mix/Mix.Tasks.Format.html#module-plugins) that
formats `~TYPST` sigils and `.typ` files with
[typstyle](https://github.com/typstyle-rs/typstyle).
  - [Typsty.Telemetry](Typsty.Telemetry.md): Telemetry events for rendering documents.

## Mix Tasks

- Tooling
  - [mix typsty.packages.get](Mix.Tasks.Typsty.Packages.Get.md): Downloads [Typst packages](https://typst.app/universe) into your project, so that
templates can import them.

