turbo-html2pdf 0.8.2 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -195,16 +195,17 @@ fs.writeFileSync('out.pdf', pdf) // %PDF-1.7
195
195
  - Raster images (PNG/JPEG, alpha → SMask) with a sane max-size clamp.
196
196
  - Watermarks: out-of-the-box faded diagonal **DRAFT** text (word/colour/angle
197
197
  configurable) and background-image watermarks.
198
- - Optional, off-by-default capability gates: `endnotes`, `print-color` (CMYK).
199
- Planned: `xref`, `svg`, `pdf-a`, `pdf-ua` — see [`TODO/`](https://github.com/miaskiewicz/turbo-html2pdf/blob/main/TODO/).
198
+ - The Node package enables endnotes, internal cross-references, CMYK print colour,
199
+ PDF/A, PDF/UA, PDF append, AES-256 encryption and post-render stamping.
200
+ The separate `turbo-html2pdf-svg` package adds SVG image support.
200
201
  - Deterministic output; `Send + Sync`; no network / no system fonts.
201
202
 
202
203
  ## Status
203
204
 
204
- `v0.8.2` is the release version for npm, PyPI and crates.io; registry
205
+ `v0.8.4` is the release version for npm, PyPI and crates.io; registry
205
206
  verification follows the root `PUBLISHING.md`. The core engine is heavily tested (the `turbo-html2pdf-core`
206
207
  crate holds 100% line coverage with a cyclomatic-complexity ≤ 5 gate). Bindings:
207
- Node (napi) and WebAssembly. See [`docs/`](https://github.com/miaskiewicz/turbo-html2pdf/blob/main/docs/) for the full guide and
208
+ Node (N-API), WebAssembly and Python (PyO3), plus the Rust MCP server. See [`docs/`](https://github.com/miaskiewicz/turbo-html2pdf/blob/main/docs/) for the full guide and
208
209
  [`benches/competitive/`](https://github.com/miaskiewicz/turbo-html2pdf/blob/main/benches/competitive/) for the benchmark harness.
209
210
 
210
211
  ## License
package/index.d.ts CHANGED
@@ -225,6 +225,9 @@ export interface Program {
225
225
  hasFooter(): boolean;
226
226
  }
227
227
 
228
+ /** Version embedded in the compiled native engine (detects stale local addons). */
229
+ export function version(): string;
230
+
228
231
  /** Compile a template into a reusable {@link Program}. Throws `TurboPdfError`. */
229
232
  export function compile(templateHtml: string, opts?: CompileOptions): Program;
230
233
 
package/index.js CHANGED
@@ -144,6 +144,7 @@ const layoutBoxes = guard((html, css, width, height) =>
144
144
  const stamp = guard((pdf, opts) => native.stamp(pdf, opts));
145
145
 
146
146
  module.exports = {
147
+ version: native.version,
147
148
  compile,
148
149
  render,
149
150
  appendPdf,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "turbo-html2pdf",
3
- "version": "0.8.2",
3
+ "version": "0.8.4",
4
4
  "description": "Fast native HTML/CSS + Jinja templating to PDF for Node — no headless browser, no Chromium.",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
package/src/lib.rs CHANGED
@@ -41,6 +41,12 @@ use turbo_html2pdf_core::{
41
41
 
42
42
  use convert::{build_registry, diagnostics_to_js, JsDiagnostic, JsFont, JsImage, MapResolver};
43
43
 
44
+ /// Version of the compiled native engine, independent of JavaScript package metadata.
45
+ #[napi]
46
+ pub fn version() -> String {
47
+ env!("CARGO_PKG_VERSION").to_owned()
48
+ }
49
+
44
50
  /// Options for a single render pass. All fields are optional; omit what you do
45
51
  /// not need. `data` defaults to `null`, `css` to empty, `fonts`/`images` to empty.
46
52
  #[napi(object)]
Binary file
Binary file
Binary file
Binary file
Binary file