@zilijonas/foliark 0.1.1 → 0.1.3

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
@@ -5,7 +5,7 @@
5
5
  <p align="center"><b>A PDF engine in Rust and WebAssembly for the browser. Extract, search, render, edit, redact and sanitize PDFs on the user's device. The document never leaves it.</b></p>
6
6
 
7
7
  ```sh
8
- npm install @zilijonas/foliark@0.1.1 --save-exact
8
+ npm install @zilijonas/foliark@0.1.3 --save-exact
9
9
  ```
10
10
 
11
11
  ESM only, no runtime dependencies, typed. Runs in a worker, fetches only its own `.wasm` and worker script, and refuses what it cannot do safely with a typed `FoliarkError` instead of degrading quietly.
@@ -126,6 +126,6 @@ Chromium on desktop (macOS arm64) is supported and has budgets. WebKit is suppor
126
126
 
127
127
  [AGPL-3.0-only](https://github.com/zilijonas/foliark/blob/main/LICENSE), the same licence family as the AGPL option PyMuPDF is offered under. If the AGPL does not fit your use, separate commercial licensing is available: see `COMMERCIAL-LICENSING.md` in the package. This is not legal advice. Details are in `LICENSING.md`.
128
128
 
129
- Foliark is free software, so the complete corresponding source of version 0.1.1 (Rust engine, vendored hayro fork and patches, build scripts) is tag `v0.1.1` of https://github.com/zilijonas/foliark. Build steps are in `docs/development.md` there (`scripts/build-wasm.sh`, `pnpm build:sdk`, `tests/package-consumers/pack.sh`). The package contains `dist/`, `wasm/` (5.8 MB raw, 2.2 MB gzip), `cmaps/`, `LICENSE`, `LICENSING.md`, `COMMERCIAL-LICENSING.md`, `LICENSE_FOXIT`, `NOTICE`, `THIRD_PARTY_NOTICES.md` and `SUPPORT_MATRIX.md`.
129
+ Foliark is free software, so the complete corresponding source of version 0.1.3 (Rust engine, vendored hayro fork and patches, build scripts) is tag `v0.1.3` of https://github.com/zilijonas/foliark. Build steps are in `docs/development.md` there (`scripts/build-wasm.sh`, `pnpm build:sdk`, `tests/package-consumers/pack.sh`). The package contains `dist/`, `wasm/` (5.8 MB raw, 2.2 MB gzip), `cmaps/`, `LICENSE`, `LICENSING.md`, `COMMERCIAL-LICENSING.md`, `LICENSE_FOXIT`, `NOTICE`, `THIRD_PARTY_NOTICES.md` and `SUPPORT_MATRIX.md`.
130
130
 
131
131
  PyMuPDF and MuPDF are products of Artifex Software, Inc. Foliark is independent of them and not affiliated with Artifex.
package/SUPPORT_MATRIX.md CHANGED
@@ -31,11 +31,11 @@ Host requirements, each tested in the browser specs: static files only, `applica
31
31
  |---|---|---|---|---|
32
32
  | Open | supported | 35 manifest fixtures: 25 open and round-trip, 8 refused, `docs/evidence/native-roundtrip.md` | `MALFORMED_PDF`, `REPAIRED_PDF` (unless `allowRepaired`), `DECODE_FAILED`, `LIMIT_EXCEEDED`, `PASSWORD_REQUIRED`, `PASSWORD_INCORRECT`, `ENCRYPTION_UNSUPPORTED` | files unlike the synthetic corpus |
33
33
  | Encrypted input | supported: RC4-40/128, AES-128/256 with the password; output is never encrypted | `native-roundtrip.md`, `strict-native.md` (4 encrypted fixtures) | `PASSWORD_*`, `ENCRYPTION_UNSUPPORTED` for unknown handlers | encrypted raster fidelity (5 fixtures judged by `objects.py` only) |
34
- | Extract text | supported | HDDN parity: 21 fixtures against PyMuPDF 1.26.5, equal text, offsets, keys, worst box deviation 0.211 pt (spec allows 0.75), `docs/integration/hddn-adapter.md` | none beyond open | CID fonts without ToUnicode, vertical and RTL text |
34
+ | Extract text | supported | HDDN parity: 21 fixtures against PyMuPDF 1.26.5, equal text, offsets, keys, worst box deviation 0.211 pt (spec allows 0.75), `docs/integration/hddn-adapter.md` | none beyond open | CID fonts without ToUnicode and without a Unicode cmap in the embedded program (an empty or partial ToUnicode falls back to that cmap, `generated/quartz-type0-empty-tounicode.pdf`), vertical and RTL text |
35
35
  | Search, hit test, select | supported on the multi-column Unicode fixture (diacritic folding, column drag stays on its line) | `hddn-adapter.md` (NEW-67) | `INVALID_ARGUMENT` | regex and hyphenation-aware search are absent by design (spec 16); not wired into HDDN's UI |
36
36
  | Render | supported with warnings | `native-roundtrip.md` (0 channel values off by more than 2/255 between input and output renders); reduced vs exact decode max diff 1 (`docs/performance/comparison.md`) | warnings `FONT_SUBSTITUTED`, `IMAGE_DECODE_FAILED`, `ANNOTATION_APPEARANCE_MISSING`, `CMAP_MISSING` (page is `complete:false`); `LIMIT_EXCEEDED` over `maxRenderPixels` | pixel accuracy against a second renderer on real documents (PyMuPDF differs by mean 0.02 to 3.1 levels on the scan fixtures) |
37
37
  | Predefined CMaps (legacy CJK encodings) | supported (pack in the package) | `cmaps/` 63 Adobe files; fixture `generated/cjk-predefined-cmaps.pdf`: extract equals PyMuPDF, render has no `CMAP_MISSING`, redaction + native export judged by `objects.py`/PyMuPDF (`crates/foliark-engine/tests/cmaps.rs`), packed-package browser specs in 3 engines (`tests/browser/cmaps.spec.ts`) | `ASSET_LOAD_FAILED` at `open` for a missing or corrupt pack file; `CMAP_MISSING` for a name outside the predefined set; the pack must be served or copied by the caller (`docs/deployment.md`) | text redaction/edit on mixed-length encodings (RKSJ, EUC, UTF16): `FONT_UNSUPPORTED`; CJK glyphs of a non-embedded font are drawn missing |
38
- | Paragraph edit | supported for horizontal, unrotated, left-to-right text in a registered or reusable font | `docs/adr/0003`, `0004`, `0005`; acceptance scenario E over 80 cases; HDDN adapter NEW-68 | `EDIT_NO_FONT`, `EDIT_NO_FIT`, `EDIT_NO_STYLE`, `EDIT_UNSUPPORTED_SCRIPT` (non-BMP, RTL), `EDIT_ROTATED_TEXT`, `FONT_UNSUPPORTED`, `STALE_REVISION` | CFF/Type1 embedded faces, RTL, CJK, vertical, auto-fit (spec 16) |
38
+ | Paragraph edit | supported for horizontal, unrotated, left-to-right text in a registered or reusable font | `docs/adr/0003`, `0004`, `0005`, `0011`, `0012`; acceptance scenario E over 80 cases; HDDN adapter NEW-68 | `EDIT_NO_FONT`, `EDIT_NO_FIT`, `EDIT_NO_STYLE`, `EDIT_UNSUPPORTED_SCRIPT` (non-BMP, RTL), `EDIT_ROTATED_TEXT`, `FONT_UNSUPPORTED`, `STALE_REVISION` | CFF/Type1 embedded faces, RTL, CJK, vertical, auto-fit (spec 16) |
39
39
  | Native export (sanitized rewrite) | supported | `strict-native.md`: 39 fixtures, 31 supported + 8 refused, 0 skipped, independent oracles, negative controls caught; acceptance 80 cases x 6 scenarios | `FORM_APPEARANCE_MISSING`, `XFA_UNSUPPORTED`, `OPTIONAL_CONTENT_UNSUPPORTED`, `SIGNED_INPUT` (policy `refuse`), `REDACT_*`, `STALE_PLAN`, `PLAN_CONSUMED` | what sections 3 and 4 list |
40
40
  | Raster export (image-only, redactions burned in) | supported; needs `policy.raster.acknowledgeLosses` | acceptance: 143 SAFE + 17 refused raster results; `comparison.md` (30 pages, 10 regions, 0 words in the regions) | `CONSENT_REQUIRED`, `RENDER_INCOMPLETE {pages}` (3 acceptance cases, annotation-comment pinned by NEW-56) | encrypted raster fidelity; edge pixels touching a region are checked with a 0.26 pt inset |
41
41
  | Cancellation | supported before an operation starts; results of aborted operations are atomic | acceptance: 27 attempts, finals byte-equal to a clean run | `CANCELLED` | abort while an operation runs through the packed SDK (only 3 pre-aborted attempts ended `CANCELLED`) |
@@ -55,7 +55,7 @@ Native export is: edits, flatten, redact, sanitize, rewrite, verify (spec 5). "S
55
55
  | Vectors | supported: filled paths and clip outlines are cut precisely by region subtraction (nonzero and even-odd, holes, curves, any transform, nested clips); strokes are expanded (width, caps, joins, miters, dashes, non-uniform transforms), cut the same way and written as filled outlines in the stroking colour; a cut stroke needing an inherited or pattern stroking colour, `CA` != `ca`, or alpha under 1 in a `B` is refused | `strict-native.md` (shared-vector, mixed-regions); spec 5.4; ADR 0009 | `VECTOR_CUT_APPROXIMATED` (cut curves become 0.01 pt polylines; a cut stroke loses its dash, cap and join structure and viewers draw a cut hairline at its nominal width); `REDACT_VECTOR_UNSUPPORTED {feature, pages}`. Work caps: 250,000 vertices per group, 100,000 dashes, 131,072 pt coordinates |
56
56
  | Form XObjects | supported: occurrences needing change are cloned, shared ones are never edited in place | form-reuse-matrices, form-both-places, shared-stream-pages | none |
57
57
  | Soft-mask groups | refused | acceptance case smask-group-text | `INVALID_ARGUMENT {feature: redactionSoftMaskGroup}` (spec 5.3 plans support; raster export works) |
58
- | Fonts touched by removal | TrueType glyphs emptied, ToUnicode rebuilt; **CFF and Type1 programs are kept** | `strict-native.md` (font-payload-secret); spec 5.6 | `FONT_GLYPH_INVENTORY_RETAINED`, names in `report.kept.fontsWithGlyphInventory`. Whether a retained CFF/Type1 inventory leaks removed glyph shapes is not proven |
58
+ | Fonts touched by removal | TrueType glyphs emptied, ToUnicode rebuilt; a program several fonts share (Word's WinAnsi TrueType plus Identity-H twin) keeps every glyph any of them still draws; **CFF and Type1 programs are kept** | `strict-native.md` (font-payload-secret, word-twins-shared-program); fidelity GLYPHS; spec 5.6 | `FONT_GLYPH_INVENTORY_RETAINED`, names in `report.kept.fontsWithGlyphInventory`. Whether a retained CFF/Type1 inventory leaks removed glyph shapes is not proven |
59
59
  | Hidden text: OCG-off, invisible, white-on-white, clipped out, covered | supported when under a region (default policy keeps invisible text elsewhere) | acceptance cases ocg-off-in-form, invisible-tr3, white-and-covered, clipped-text | occlusion-aware detection outside regions is absent (spec 16) |
60
60
  | Unused fonts, Forms, images reachable from Resources | removed from every Resources dictionary | `docs/adr/0007-unused-resources.md`; acceptance unused-xobject, unused-font | `SanitizedItem unusedResources` |
61
61
  | Verification | in-engine strict reparse plus zero re-extracted clusters in each region | spec 5.7; acceptance negative controls 109/109 caught | `REDACT_VERIFY_FAILED` (a bug guard; no fixture triggers it). It is not a privacy certificate |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zilijonas/foliark",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Rust/WebAssembly PDF SDK for the browser: extract text, render, edit, redact and sanitize PDFs offline. A PyMuPDF alternative. AGPL-3.0.",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",
Binary file