h17-sspdf 1.0.0 → 1.0.1

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
@@ -20,6 +20,8 @@ Source JSON + Theme = PDF
20
20
  npm install h17-sspdf
21
21
  ```
22
22
 
23
+ Requires **Node.js 18 or newer**. The engine vendors a single self-contained UMD build of jsPDF (which bundles fflate, fast-png, iobuffer internally) plus Chart.js and chartjs-node-canvas. The only install-time dependency is [`canvas`](https://www.npmjs.com/package/canvas) (native C++ addon, used by the chart plugin) — no transitive dependency tree beyond that.
24
+
23
25
  ## The problem it solves
24
26
 
25
27
  Generating PDFs imperatively means tracking the cursor yourself. Every element you place shifts everything below it. Line wrapping, page breaks, font resets, all manual.
@@ -471,6 +473,7 @@ Claude Code skills for generating PDFs and themes are available in the `skills/`
471
473
  - Single-line `row` cells, no multi-line column pairs
472
474
  - `{{page}}` gives the current page number; `{{pages}}` (total page count) is not supported because keep-together rules make the final page count unpredictable until the last operation is laid out
473
475
  - Charts require the `canvas` npm package (native C++ addon) for server-side rendering; everything else is zero native dependencies
476
+ - A `jspdf.umd.js` build is vendored for client-side/browser use. It bundles all dependencies internally but requires wiring up your own entry point — `pdf-core.js` uses the Node build by default
474
477
 
475
478
  ---
476
479
 
@@ -480,7 +483,7 @@ Hugo Palma, 2026
480
483
 
481
484
  This project vendors the following MIT-licensed libraries:
482
485
 
483
- - [jsPDF](https://github.com/parallax/jsPDF) - PDF generation. Copyright (c) 2010-2025 James Hall, yWorks GmbH.
486
+ - [jsPDF](https://github.com/parallax/jsPDF) - PDF generation (UMD build, bundles fflate, fast-png, iobuffer internally). Copyright (c) 2010-2025 James Hall, yWorks GmbH.
484
487
  - [Chart.js](https://github.com/chartjs/Chart.js) - Chart rendering. Copyright (c) 2014-2024 Chart.js Contributors.
485
488
  - [chartjs-node-canvas](https://github.com/SeanSobey/ChartjsNodeCanvas) - Server-side Chart.js rendering. Copyright (c) 2018 Sean Sobey.
486
489
 
package/core/pdf-core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  const fs = require("fs");
2
- const { jsPDF } = require("../vendor/jspdf/jspdf.node");
2
+ const { jsPDF } = require("../vendor/jspdf/jspdf.umd.js");
3
3
  const { pxToMm, ptToMm, resolveLineHeightMm } = require("./units");
4
4
 
5
5
  // Style math helpers, shared between core rendering and height estimation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "h17-sspdf",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Declarative PDF engine - define layout once, feed it JSON, get consistent PDFs",
5
5
  "main": "index.js",
6
6
  "author": "Hugo Palma",
@@ -20,7 +20,9 @@
20
20
  "files": [
21
21
  "core",
22
22
  "fonts",
23
- "vendor",
23
+ "vendor/jspdf",
24
+ "vendor/chart.js",
25
+ "vendor/chartjs-node-canvas",
24
26
  "examples/themes",
25
27
  "examples/sources",
26
28
  "index.js",