Packages
Small packages around one pure-Dart core.
Start with two
Most apps need vyuh_document and vyuh_document_editor. Add another package when your code imports one of its names. All packages share one version (0.19.3) on pub.vyuh.tech; see Installation.
Layers
Arrows point from a package to what it depends on, and only point down. Inside vyuh_document the same holds: types.dart <- engine.dart <- layout.dart <- vyuh_document.dart.
| Layer | Packages | Flutter? |
|---|---|---|
| Core | vyuh_document | No |
| Elements | vyuh_document_extension_* (and vyuh_document_elements) | No |
| Formats | vyuh_document_codec_docx, _pdf, _html, vyuh_document_md_codec | No |
| Editor | vyuh_document_editor, vyuh_document_ui | Yes |
| Element editors | vyuh_document_extension_*_editor | Yes |
Entry packages
Element packages
Pure Dart. Each declares one element (package:<name>/element.dart) and its runtime commands and methods (package:<name>/<name>.dart). Add one to your pubspec.yaml when your code calls its commands.
The editor depends on table, list, checklist, code, block quote, image, divider, shape, text box, field and table of contents. KaTeX, Mermaid, Diagram and Citation are opt-in: they need their _editor package below.
Element editor packages
Flutter adapters for elements outside the starter set. Install the extension on the editor runtime (Diagrams and math).
Format packages
Pure-Dart codecs over the canonical model. PDF paints the pages the editor already laid out.
Standalone engines
| Package | What it is |
|---|---|
| A pure-Dart KaTeX parser and layout engine, usable without documents. | |
| A pure-Dart Mermaid parser and layout engine, usable without documents. |
They surface in documents through the KaTeX and Mermaid element packages.
Tooling
In this repository, vyuh_document_generator generates the JSON codecs of command families when you declare an element with its own commands: dart run vyuh_document_generator.
Which packages for which app
| You are building | Dependencies |
|---|---|
| A comment box or rich-text field | vyuh_document, vyuh_document_editor |
| A notes editor with tables and lists | + vyuh_document_elements |
| A document editor with pages, headers and fields | + vyuh_document_extension_field (and other families whose methods you call) |
| Word import and export | + vyuh_document_codec_docx |
| PDF export or print | + vyuh_document_codec_pdf |
| Markdown or HTML import | + vyuh_document_md_codec, vyuh_document_codec_html |
| Equations, Mermaid, drawings | + vyuh_document_extension_katex_editor, _mermaid_editor, _diagram_editor |
| A server, CLI or AI agent (no Flutter) | vyuh_document (+ vyuh_document_elements, codecs) |
Next
- Installation: registry token and
pubspec.yaml. - Tutorial: add these packages one step at a time.
- API reference: the public types of each package.