EnvelopeFlow.Templates 0.1.0-alpha.3.1

This is a prerelease version of EnvelopeFlow.Templates.
dotnet add package EnvelopeFlow.Templates --version 0.1.0-alpha.3.1
                    
NuGet\Install-Package EnvelopeFlow.Templates -Version 0.1.0-alpha.3.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EnvelopeFlow.Templates" Version="0.1.0-alpha.3.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EnvelopeFlow.Templates" Version="0.1.0-alpha.3.1" />
                    
Directory.Packages.props
<PackageReference Include="EnvelopeFlow.Templates" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EnvelopeFlow.Templates --version 0.1.0-alpha.3.1
                    
#r "nuget: EnvelopeFlow.Templates, 0.1.0-alpha.3.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EnvelopeFlow.Templates@0.1.0-alpha.3.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EnvelopeFlow.Templates&version=0.1.0-alpha.3.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=EnvelopeFlow.Templates&version=0.1.0-alpha.3.1&prerelease
                    
Install as a Cake Tool

EnvelopeFlow.Templates

Templates use literal {variable} substitution, never executable expressions. HTML values are encoded, titles reject line breaks, and the complete serialized result is checked against the caller's provider byte limit. Resolve an exact version with requested locale, parent locale and explicit default fallback. Code- and JSON-file-backed resolvers are examples; replace the resolver or renderer independently. Files are application-selected paths and never derived from recipient input. Attachments remain explicit email-transport inputs, never template file reads.

Source fields, layout content, recipient values and raw prepared payloads must be well-formed Unicode without NUL. Validation precedes parsing/caching, HTML encoding, publication freezing and hashing, so encoding cannot silently change accepted content. Valid surrogate pairs, literal replacement characters, tabs/line breaks and existing length limits remain supported; escaped NUL inside an already serialized JSON payload remains exact. Prepared context/publication digests require 64 ASCII hexadecimal characters; upper/lowercase are preserved exactly through replay and storage.

Optional ITemplateRegistry supports validated drafts, revision-CAS edits/archive, immutable publication manifests and explicit pointer selection/rollback. Exact-version resolution never consults that pointer. Idempotent publication receipts preserve the original result after a lost acknowledgment; layout name/version bytes remain immutable across publications in a scope. Memory is a development example; select the separate PostgreSQL package or a custom atomic adapter for durability.

TemplateComposition previews the same declarative content used at admission. Layouts use one [[body]] slot per matching text/HTML field and explicit versioned [[partial:alias]] references. Limits are eight graph levels, 64 layouts, 16 partials per layout, 128 visits per expansion and one MiB per publication. Missing/cyclic/wrong-channel dependencies and excessive expansion fail before rendering. Values are substituted after composition and HTML encoded. Preview is not HTML sanitization; complete provider-envelope validation requires the application callback.

Reference registries retain at most 128 drafts/publications and 512 publish receipts per full scope, within an eight-MiB document. Draft archive uses CAS; published artifacts/layouts/receipts remain retained and capacity fails explicitly. No cleanup job or HTTP/editor surface is supplied. The separate delivery integration freezes target bytes under stable preparation keys; live policy remains authoritative. Content and variables are private application data, redacted from record diagnostics.

Opt in per immutable MessageTemplate with Syntax = TemplateSyntax.Localized. SafeLocalizedTemplateRenderer supports {name}, {n, number, N2}, {when, date, short|long|iso}, {n, plural, =0 {Empty} one {One} other {Many}} and {kind, select, known {Known} other {Other}}. Branches require other; recipient values remain literal, and only selected branches render. Number input is an exactly representable bounded invariant decimal; excess precision refuses instead of rounding the branch operand. Number formats are G, N/F with 0–4 decimals, P/C with 0–2; currency requires a specific culture. Date input is ISO-8601, normalized to UTC before culture-specific formatting. Plurals pin Unicode CLDR 49 cardinal rules for en/de/es/it/fr/ru/uk/pl/ar/ja/zh/ko, retaining visible fraction operands and the fr/es/it million category. Other plural locales require a custom renderer. This is a declared safe subset: exponent/compact notation (CLDR e is zero), ordinals/ranges, ICU offsets, # replacement, arbitrary expressions and external access are excluded.

Localized syntax retains the same body/channel/header constraints and HTML value encoding. Validation visits every branch before publication; bounds are eight nested levels, 1,024 nodes per field, sixteen branches per token, 262,144 characters per field, 1,000 variables and one MiB aggregate input values. Rendering enforces a complete serialized provider byte limit, including multibyte text and HTML expansion. Default literal syntax omits the additive JSON field and retains existing bytes. Code/file resolution, immutable publication/layout composition and frozen delivery preparation retain the chosen syntax, exact version and resolved locale; a pointer update never rerenders queued work. The default composition preview selects the matching supplied renderer; custom renderers remain replaceable.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on EnvelopeFlow.Templates:

Package Downloads
EnvelopeFlow.Templates.Delivery

Recoverable frozen template rendering and stable delivery admission.

EnvelopeFlow.Templates.Stores.Postgres

Optional durable scoped template publication and frozen preparation stores.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-alpha.3.1 50 11/22/2026
0.1.0-alpha.2.1 75 11/9/2026