diff --git a/README.md b/README.md index b511352..cd38d54 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A .NET 11.0 wrapper around the Typst 0.15 rendering stack. The managed layer in `src/typstsharp` calls into the Rust `typst_core` crate via P/Invoke and exposes convenient helpers for C# consumers plus a simple CLI. -For the latest changes, see our [Release Notes](RELEASENOTES.md). +Install from [NuGet](https://www.nuget.org/packages/typstsharp). For the latest changes, see our [Release Notes](https://github.com/evolvedlight/typstsharp/blob/develop/RELEASENOTES.md) or [GitHub Releases](https://github.com/evolvedlight/typstsharp/releases). ## Using @@ -291,7 +291,7 @@ On Alpine / musl (`linux-musl-*`), musl's allocator reuses freed memory for late ## Supported Platforms & NuGet Packages -`typstsharp` ships as a small managed package that depends on per-architecture native runtime packages (similar to `SkiaSharp`): +[`typstsharp`](https://www.nuget.org/packages/typstsharp) ships as a small managed package that depends on per-architecture native runtime packages. - `typstsharp.runtime.win-x64` - `typstsharp.runtime.win-arm64` diff --git a/src/PackageMetadata.props b/src/PackageMetadata.props index d7b4b39..04cf728 100644 --- a/src/PackageMetadata.props +++ b/src/PackageMetadata.props @@ -3,7 +3,11 @@ 0.0.1-typst0.15.0 evolvedlight typst;typesetting;pdf;rust + https://github.com/evolvedlight/typstsharp https://github.com/evolvedlight/typstsharp MIT + true + true + true diff --git a/src/typstsharp/TypstCompiler.cs b/src/typstsharp/TypstCompiler.cs index 7284b1e..a305e83 100644 --- a/src/typstsharp/TypstCompiler.cs +++ b/src/typstsharp/TypstCompiler.cs @@ -712,6 +712,7 @@ public record TypstWarning(string Message); /// /// The output format (e.g., "pdf"). This parameter is currently not used by the underlying engine but is kept for future compatibility. /// The pixels per inch for the output. This parameter is currently not used by the underlying engine but is kept for future compatibility. + /// Optional PDF standard(s) to target (for example "v-1.7" or "a-2b"). /// A tuple containing a list of byte arrays for each page and a list of warnings. public (List pages, List warnings) CompileToPages(string format = "pdf", float ppi = 144.0f, IEnumerable? pdfStandards = null) { @@ -968,7 +969,7 @@ public PdfResult AsPdf() /// /// Represents the result of compiling a document to PDF format. -/// Supports implicit conversion to , , and . +/// Supports implicit conversion to byte[], , and . /// public sealed record PdfResult(byte[] Bytes, IReadOnlyList Warnings) { @@ -1138,7 +1139,7 @@ public Task SaveAsync(string path, int pageIndex = 0, CancellationToken cancella /// /// Represents the result of compiling a document to PNG format (one PNG image byte array per page). -/// Supports implicit conversion to (returning the primary page PNG bytes). +/// Supports implicit conversion to byte[] (returning the primary page PNG bytes). /// public sealed record PngResult(IReadOnlyList Pages, IReadOnlyList Warnings) : IReadOnlyList { @@ -1156,7 +1157,7 @@ public sealed record PngResult(IReadOnlyList Pages, IReadOnlyList new PageEnumerator(Pages); /// - /// Implicitly converts the to of the primary PNG page. + /// Implicitly converts the to byte[] of the primary PNG page. /// public static implicit operator byte[](PngResult result) => result.Pages.Count > 0 ? result.Pages[0] : []; diff --git a/src/typstsharp/typstsharp.csproj b/src/typstsharp/typstsharp.csproj index 0846aad..a33d476 100644 --- a/src/typstsharp/typstsharp.csproj +++ b/src/typstsharp/typstsharp.csproj @@ -11,6 +11,9 @@ typstsharp A .NET wrapper for the Typst typesetting system. README.md + true + $(NoWarn);CS1591 + embedded typstsharp.nuspec $(MSBuildThisFileDirectory) @@ -48,10 +51,15 @@ - + <_NuspecTags>$([System.String]::Copy('$(PackageTags)').Replace(';', ' ')) - id=$(PackageId);version=$(PackageVersion);configuration=$(Configuration);authors=$(Authors);description=$(Description);tags=$(_NuspecTags);repositoryUrl=$(RepositoryUrl);license=$(PackageLicenseExpression) + <_RepositoryCommit>$(RepositoryCommit) + <_RepositoryCommit Condition="'$(_RepositoryCommit)' == ''">$(SourceRevisionId) + <_RepositoryCommit Condition="'$(_RepositoryCommit)' == ''">$(GITHUB_SHA) + id=$(PackageId);version=$(PackageVersion);configuration=$(Configuration);authors=$(Authors);description=$(Description);tags=$(_NuspecTags);projectUrl=$(PackageProjectUrl);repositoryUrl=$(RepositoryUrl);repositoryCommit=$(_RepositoryCommit);license=$(PackageLicenseExpression) diff --git a/src/typstsharp/typstsharp.nuspec b/src/typstsharp/typstsharp.nuspec index 5a452dc..7bb96bd 100644 --- a/src/typstsharp/typstsharp.nuspec +++ b/src/typstsharp/typstsharp.nuspec @@ -5,10 +5,12 @@ $version$ $authors$ $license$ + $projectUrl$ README.md $description$ + $repositoryUrl$/releases/tag/$version$ $tags$ - + @@ -33,6 +35,8 @@ + +