Skip to content

builder: v0.1.0

Choose a tag to compare

@github-actions github-actions released this 02 Dec 09:55
aefc9c1

0.1.0 (2026-12-02)

First preview of the template builder: generate Templify templates (.docx and .odt) from C# or from a JSON definition, instead of editing them by hand in Word or LibreOffice.

Preview, experimental. The whole API is marked [Experimental("TPLB001")]; opt in with <NoWarn>$(NoWarn);TPLB001</NoWarn>. Breaking changes are allowed in 0.x. Requires TriasDev.Templify 1.11.0.

Packages

  • TriasDev.Templify.Builder: the builder, with the typed path source generator included.
  • TriasDev.Templify.Builder.Testing: a verification kit for your CI (TemplateVerifier.VerifyAll: builds every language and format, validates, checks the data contract and samples, schema and determinism).

What you can build

  • Text and styles: a style sheet with units, colours, fonts, named paragraph and character styles, paragraph options, spacers, rules and boxes, per-side borders and padding.
  • Template logic: placeholders with value formats, block and inline conditionals (If/ElseIf/Else, Switch with a mandatory Default, path-to-path comparisons), paragraph, list and table-row loops with loop metadata.
  • Layout: static tables (column widths, table styles, borders, shading, spans, header rows), row loops and conditional rows, two-level bullet lists, images (logo slot, fit to box), page setup, headers and footers, page numbers, table of contents, font embedding, and a raw XML escape hatch.
  • Data: a data contract (path manifest, hash, JSON, witness data), typed data paths from C# types (DataAs<T>() and the source generator), indexed path segments (items[0]).
  • Localisation: text catalogs; a missing translation fails the build.
  • Identity and uploads: a template stamp, and TemplateInspector.Check for edited copies uploaded back.
  • JSON definitions for agents and hosts: import and export with a byte-identical round trip, a JSON Schema, a vocabulary description, outline and pointer reads, JSON Patch with a check, and preview with witness data.

DOCX and ODT output is deterministic per runtime and OS, and LibreOffice round trips are part of the test suite.

Known limitations

Follow-ups before a stable release are tracked in #261. The most important are input limits for Check, Preview and Patch on untrusted input (#302), a single error model (#303) and the evolution of the stored JSON format (#312). Do not treat stored JSON definitions as a stable format yet.

Full history: #316.