MeshWeaver.Markdown.Export.Contract 3.0.0-rc2

This is a prerelease version of MeshWeaver.Markdown.Export.Contract.
dotnet add package MeshWeaver.Markdown.Export.Contract --version 3.0.0-rc2
                    
NuGet\Install-Package MeshWeaver.Markdown.Export.Contract -Version 3.0.0-rc2
                    
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="MeshWeaver.Markdown.Export.Contract" Version="3.0.0-rc2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MeshWeaver.Markdown.Export.Contract" Version="3.0.0-rc2" />
                    
Directory.Packages.props
<PackageReference Include="MeshWeaver.Markdown.Export.Contract" />
                    
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 MeshWeaver.Markdown.Export.Contract --version 3.0.0-rc2
                    
#r "nuget: MeshWeaver.Markdown.Export.Contract, 3.0.0-rc2"
                    
#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 MeshWeaver.Markdown.Export.Contract@3.0.0-rc2
                    
#: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=MeshWeaver.Markdown.Export.Contract&version=3.0.0-rc2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=MeshWeaver.Markdown.Export.Contract&version=3.0.0-rc2&prerelease
                    
Install as a Cake Tool

MeshWeaver.Markdown.Export.Contract

The wire contract for document export — the types a caller needs to request an export and read the result back. It carries no renderer: the document model, the DOCX writer, the print composers and the browser-driving PDF path all stay in MeshWeaver.Markdown.Export, along with the packages they need.

That split exists so a UI can drive an export without depending on the engine that performs it. MeshWeaver.Blazor references this assembly only, which keeps the ~6.5k-line renderer out of the Blazor layer's project graph.

Scope note: this removes the engine assembly, not the third-party packages. Blazor still resolves DocumentFormat.OpenXml (through MeshWeaver.ContentCollections → ClosedXML / DocSharp.Docx), HtmlAgilityPack (used directly by MarkdownHtmlRenderer) and Markdig (with MeshWeaver.Markdown). Those arrive by their own routes and are unaffected.

Contents:

Type Role
ExportDocumentRequest / ExportDocumentResponse The hub request and its start-acknowledgement (the response carries the Activity path, not the bytes).
DocumentExportOptions What the export dialog collects: format, fidelity, branding, cover, TOC, page-break rules.
ExportFormat, ExportFidelity The output format, and how faithfully it reproduces the browser's rendering.
RenderedDocument The produced file — name, mime type, bytes. Travels through ActivityLog.ReturnValue.
CorporateIdentity Content of a CorporateIdentity mesh node: the branding an export applies.
AddMarkdownExportTypes() Registers all of the above on a hub's ITypeRegistry.

ExportDocumentControl is deliberately not here — it lives in MeshWeaver.Layout with every other UiControl, because Layout is the control vocabulary that the server and all four renderers (Blazor, React, React Native, MAUI) agree on.

Consuming an export

The engine does not return bytes from the handler; it starts an Activity and acknowledges. Callers subscribe to that Activity and read ActivityLog.ReturnValue on the terminal snapshot:

hub.Observe(new ExportDocumentRequest(sourcePath, options), o => o.WithTarget(new Address(sourcePath)))
   .Take(1)
   .SelectMany(dispatch => cache.GetStream(dispatch.Message.ActivityPath, hub.JsonSerializerOptions)
       .Select(n => n.ContentAs<ActivityLog>(hub.JsonSerializerOptions))
       .Where(log => log is not null && log.Status != ActivityStatus.Running)
       .Take(1))
   .Subscribe(terminal => { /* terminal.ReturnValue → RenderedDocument */ });

Why a start-ack rather than the bytes: waiting for the render inside the handler would block the hub's action block while the script does cross-hub work. See AsynchronousCalls.md.

🚨 Scripts. The built-in .csx export templates compile at runtime against this assembly, so it is registered as a KernelScriptAssembly alongside the engine in AddMarkdownExport(). A new type here is visible to those templates; removing one breaks them with no compiler signal.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
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 MeshWeaver.Markdown.Export.Contract:

Package Downloads
MeshWeaver.Blazor

Package Description

MeshWeaver.Markdown.Export

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0-rc2 69 8/14/2026
3.0.0-rc1 72 8/13/2026