theseus/bundled-addons
Local Dev d625bd25a1 feat(pdf-editor): replace the document's own text, on its own baseline
Until now "editing" a PDF here meant laying things over it. You could put a
word on top of a word, but the document underneath never changed, and the
result read like a sticker because it was one. This adds the thing the word
Edit actually promises: click a line of the document's text, type different
words, and they land where the old ones were, in the old size and the old
colour.

The position and size come from pdf.js's text layer, which has already placed
a span over every run and carries that run's size in unscaled PDF points — so
the size is right whatever the zoom, which reading it off the rendered box
would not be. The colours come from the rendered page, because nothing in the
text API reports them: the background is the average of the most common colour
bucket in the run's box, since type is a minority of the pixels even when it
is dense, and the ink is whatever sits furthest from that background. On the
test fixture it recovers the marker's red exactly.

Two things that look like details and are not. The bucket only chooses WHICH
pixels are background; the colour itself is their average, because rebuilding
it from the bucket index rounds white down to #f8f8f8 and a not-quite-white
patch on a white page is a visible seam. And the cover reaches below the
baseline by a quarter of the font size, because pdf.js sizes its spans to the
em box: cut the cover to the span and every descender in the original line
survives as a little hook under the replacement.

A replacement is a cover plus text, so it is a mark like any other — movable,
resizable, undoable, and rendered on screen from the same numbers the writer
uses, which is what makes the preview trustworthy.

Said plainly in the dialog and again in the save summary: this hides the
original, it does not remove it. The old glyphs are still in the content
stream underneath. Redact is the tool that takes text away, and it says so
too.
2026-09-22 21:49:37 +02:00
..
aegis chore(theseus): 0.3.47 — plug-in category + panel-driven addon self-update, aegis 0.6.31 2026-09-14 02:30:51 +02:00
docx-editor chore(docx-editor): 0.2.0 2026-09-22 19:24:19 +02:00
notepad Theseus: add-on framework MVP + Notepad reference add-on 2026-08-31 13:51:08 +02:00
pdf-editor feat(pdf-editor): replace the document's own text, on its own baseline 2026-09-22 21:49:37 +02:00
screenshot feat(theseus): profile at %APPDATA%\Theseus, extensions under extensions\ 2026-09-21 01:55:25 +02:00
translate translate 0.1.1 → 0.1.2: fetch from the addon's Node side, not the panel 2026-09-21 03:34:14 +02:00
vpn vpn 0.1.2 → 0.1.3: subscription import + landing page mockup 2026-09-22 20:59:50 +02:00