Typst Documents
Compile Typst source text into PDF or SVG documents, with FlowLike-backed assets and Typst Universe package resolution
About
Flow-Like Typst Nodes
WASM node package for compiling Typst documents inside FlowLike workflows. The package compiles Typst source text into PDF/SVG artifacts, resolves relative imports/assets from a FlowLike source folder, and returns structured compile metadata.
Nodes
Implemented in this package:
Node | Purpose |
|---|---|
| Compile Typst source text into PDF and write the PDF to an output
. |
| Read a
file from FlowLike storage and compile it into PDF. |
| Compile Typst source text into SVG and write the SVG to an output
. |
| Compile Typst source text without exporting, returning success, page count, and warnings. |
Primary pins:
Pin | Type | Use |
|---|---|---|
|
| Main Typst source text compiled as
by the source/validate nodes. |
|
| Main
file used by
. |
|
| Folder used as the root for relative imports and assets referenced by
. |
|
| PDF/SVG file to write. Compile nodes always write to this path. |
|
| Enables
Typst Universe package downloads through FlowLike host HTTP. Defaults to
; displayed as
. |
When source_folder is omitted for Typst File to PDF, relative files resolve
from the parent folder of source_file.
When source_folder points to:
reportsthen source text can reference files below that folder with relative Typst paths:
#import "templates/styles.typ": *#image("images/logo.png")#let csv = read("data/table.csv")#bibliography("refs.bib")Typst Universe imports work when allow_universe_packages is enabled and the
workflow grants outbound HTTP:
#import "@preview/conchord:0.4.0": smart-chordPackage files are fetched from https://packages.typst.org, decompressed in
memory for the current node run, and resolved separately from relative project
files.
Typst Package Choices
The implementation uses current Typst Rust crates instead of shelling out to the Typst CLI:
Crate | Role |
|---|---|
| Core compiler and document model. |
| In-memory source/file resolver around Typst. |
| Embedded default fonts for sandboxed compilation. |
| PDF export. |
| SVG export. |
Typst Universe @preview/... packages are resolved through FlowLike host HTTP,
not the native Typst package cache. This keeps the WASM node aligned with
FlowLike permissions and avoids depending on a local filesystem cache.
Provided Nodes
14 nodes included in this package.
Document / Typst
Reads a Typst source FlowPath, compiles it into PDF, and writes the PDF to storage
Reads a Typst source FlowPath, compiles it once, and writes both PDF and SVG outputs
Reads a Typst source FlowPath, compiles it into SVG, and writes it to storage
Compiles Typst source text into PDF and writes it to storage
Compiles Typst source text once and writes both PDF and SVG outputs
Compiles Typst source text into SVG and writes it to storage
Reads a Typst template file, applies JSON data, and writes a PDF to storage
Reads a Typst template file, applies JSON data once, and writes both PDF and SVG outputs
Reads a Typst template file, applies JSON data, and writes an SVG to storage
Compiles Typst template source with JSON data into PDF and writes it to storage
Compiles Typst template source with JSON data once and writes both PDF and SVG outputs
Compiles Typst template source with JSON data into SVG and writes it to storage
Reads a Typst source FlowPath, compiles it without export, and returns diagnostics metadata
Compiles Typst source text without export and returns diagnostics metadata