Add lasso selection and pasted images

Select tool (S): lasso picks ink strokes and images that lie entirely
inside the loop, a tap picks one object. Move, uniform resize, nudge,
delete, recolour, copy/cut/paste/duplicate, each one undo step. Holding
the pen's barrel button lassoes with any tool (Settings > Pen & touch).
Copying also writes a PNG of the selection to the system clipboard.

Images come in by paste, drop, the Insert image button or the page menu.
They are capped at 2400 px, stored as PNG/JPEG by content hash in a new
IndexedDB store, drawn between the markdown and the ink, and written to
the PDF both visibly and as papure/assets + per-page images.json.

Dark pages now invert each layer except images, so images keep their
colours; the inverted ink layer is screen-blended so highlighted text
stays bright.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UcbKnqfprs8hMkTVsYx1dh
This commit is contained in:
agent 2026-09-29 21:05:02 +00:00
parent 894291df7f
commit 84b9d4469f
26 changed files with 1274 additions and 39 deletions

View file

@ -107,6 +107,10 @@
<div><div class="name">Swipe to add pages</div><div class="desc">A quick one-finger flick toward a free side of the active page offers to add a page there.</div></div>
<input type="checkbox" class="toggle" bind:checked={s.flingToAdd} onchange={save} />
</div>
<div class="row">
<div><div class="name">Pen button selects</div><div class="desc">Hold the button on the side of the pen and draw a loop to select, whatever tool is active.</div></div>
<input type="checkbox" class="toggle" bind:checked={s.penButtonSelect} onchange={save} />
</div>
<h3>Palm rejection</h3>
<div class="row">
<div><div class="name">Pen session lockout</div><div class="desc">Ignore touches while the pen is writing, and finger ink for 5 seconds after it was used.</div></div>