Files
foliate-js/package.json
T
John O'Keefe ac699e71ee feat(rtff-pdb): RTF and PalmDOC plain-text support (v0.5.0)
rtf.js: a minimal single-pass RTF tokenizer extracting document text
with paragraph structure — groups, control words with signed params,
\\'hh Windows-1252 escapes, \\uN unicode with \\ucN fallback skipping,
known text destinations skipped whole (fonttbl/colortbl/stylesheet/
info/headers/pict/field/...), spec-required ignoring of unknown words.
Format runs are intentionally not converted; RTF is read as styled
text like .txt.

pdb.js: the TEXt/REAd PalmDOC container (PalmDOC, TealDoc) — the PDB
record reader and LZ77 decompressor are shared from mobi.js (both
exported; upstream already carried the TODO for this path). Records
decode as Windows-1252 and feed the plain-text pipeline (paragraph
split, line join, ~150KB sectioning, Part N TOC).

makeBook dispatch: content-based (TEXtREAd magic at offset 60;
'{\\rtf' magic), after MOBI and before the text branch.

Tests: node harness covering store + compressed PalmDOC, RTF paragraphs
/escapes/unicode/hex/destination-skipping, makeBook routing; txt/docx
regression suites pass.
2026-10-03 14:49:22 -04:00

51 lines
1.0 KiB
JSON

{
"name": "foliate-js",
"version": "0.5.0",
"description": "Render e-books in the browser",
"repository": {
"type": "git",
"url": "git+https://github.com/johnfactotum/foliate-js.git"
},
"bugs": {
"url": "https://github.com/johnfactotum/foliate-js/issues"
},
"homepage": "https://github.com/johnfactotum/foliate-js#readme",
"author": "John Factotum",
"license": "MIT",
"type": "module",
"exports": {
"./*.js": "./*.js"
},
"devDependencies": {
"@eslint/js": "^9.9.1",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-terser": "^0.4.4",
"@zip.js/zip.js": "^2.7.52",
"fflate": "^0.8.2",
"fs-extra": "^11.2.0",
"globals": "^15.9.0",
"pdfjs-dist": "^5.5.207",
"rollup": "^4.22.4"
},
"scripts": {
"build": "npx rollup -c"
},
"keywords": [
"ebook",
"reader",
"epub",
"cfi",
"mobi",
"azw",
"azw3",
"fb2",
"cbz",
"dictd",
"stardict",
"opds"
],
"dependencies": {
"mammoth": "^1.13.0"
}
}