Commit Graph
15 Commits
Author SHA1 Message Date
adminandClaude Sonnet 4.6 45aa3b4426 feat: add Markdown (.md) support via marked
- Add markedjs/marked as a submodule
- Install marked npm package for runtime rendering
- Add MDRenderer that parses .md/.markdown files with marked and renders into doc-page
- Register md/markdown extensions in EXT_MAP

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 08:24:11 +02:00
adminandClaude Sonnet 4.6 3becdd8db3 fix: align page number input vertically with adjacent text, update submodules
- Set input height to 21px and offset top by 2px to align '1' visually with '/1'
- Update JSDoc submodule (build scripts, doc/text conversion improvements)
- Update pdf.js submodule (annotation layer, presentation mode fixes)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 08:17:08 +02:00
admin 7c79c2f167 fix: set page number input height to 17px to match text line height, eliminating alignment gap 2026-06-24 23:52:13 +02:00
admin d2cf489401 fix: remove box from page number input, use underline to fix alignment perception 2026-06-24 23:47:43 +02:00
admin be85e57b35 fix: replace page number group with unified pill widget to fix alignment 2026-06-24 23:40:55 +02:00
admin 326b1ca866 fix: reduce page number input height to 16px to align with adjacent text 2026-06-24 23:22:30 +02:00
admin bd1b3346e4 fix: align page number input with adjacent text 2026-06-24 23:13:30 +02:00
admin b3b95959c9 fix: align page number input with adjacent text via line-height:1 2026-06-24 22:59:57 +02:00
admin 85faec976b fix: align page number input vertically with adjacent text 2026-06-24 22:54:05 +02:00
admin 948c6c0c79 refactor: rename PreviewJS to ReaderJS across all files and repo 2026-06-24 18:44:20 +02:00
adminandClaude Sonnet 4.6 013ebe15e9 feat: add DOC/RTF renderers, GitHub Pages CI/CD, README and MIT license
- Replace mammoth.js .doc handler with JSDoc (Alpaq92/JSDoc submodule)
- Fix RTF.js rendering via jQuery append instead of appendChild
- Use import.meta.env.BASE_URL for asset paths to support /PreviewJS/ base
- Add GitHub Actions: deploy.yml (push-triggered Pages deploy) and
  update-submodules.yml (monthly cron with release creation)
- Add .gitignore, README.md with Credits, MIT LICENSE

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 18:27:23 +02:00
adminandClaude Sonnet 4.6 d04d355a5e fix: replace WebODF CDN with jszip-based ODF parser; better .doc error
ODF: webodf npm package is an empty stub with no webodf.js, and there is
no working CDN for it. Replace with a pure-JS ODF->HTML converter using
jszip: reads content.xml from the ODF ZIP, walks text:/table:/draw:
namespace elements, extracts embedded images as blob URLs. Covers ODT,
ODS, ODP and ODF.

DOC: catch the JSZip "not a ZIP" error thrown by mammoth on binary OLE
.doc files and surface a human-readable message asking to re-save as
.docx instead of showing a raw stack trace.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 17:35:09 +02:00
adminandClaude Sonnet 4.6 c31827b623 fix: load rtf.js bundles as static scripts instead of broken npm import
The rtf.js npm package index.js uses ESM imports without .js extensions
(broken on Node ESM) and its UMD bundles require jQuery — not importable
via Vite's module pipeline.

Fix: copy EMFJS/WMFJS/RTFJS bundle min files to public/rtfjs/, load them
sequentially via dynamic <script> injection (jQuery from CDN, then the
three bundles in dependency order). Scripts are cached so they only load
once per session. Removes rtf.js from Vite optimizeDeps.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 17:30:51 +02:00
adminandClaude Sonnet 4.6 b9b3223bd4 fix: constrain drop zone width and add .doc support
- Drop zone now uses min(90%, 620px) instead of 100% width
- viewerContainer uses align-items:center so dropzone is vertically centred
- docContainer overrides with align-self:flex-start so pages stack from top
- EXT_MAP maps .doc -> docx renderer (mammoth handles legacy Word best-effort)
- Accept attribute and format tags updated to include .doc

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 17:25:22 +02:00
adminandClaude Sonnet 4.6 1fc48723e3 feat: universal document viewer with PDF.js-like UI
Supports PDF, ODT/ODS/ODP (WebODF), RTF (rtf.js), and DOCX (mammoth)
in a PDF.js-inspired dark-theme viewer with print support.

Submodules:
- submodules/pdf.js  → mozilla/pdf.js
- submodules/JSDoc   → Alpaq92/JSDoc
- submodules/docx    → dolanmiu/docx
- submodules/WebODF  → webodf/WebODF
- submodules/rtf.js  → tbluemel/rtf.js

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 17:18:22 +02:00