I'll remove categories entirely, add multi-shot capture with a per-page crop/filter review step, default enhance to off, and replace the laggy crop with an imperative (non-re-rendering) one.
Starting with types, a crop-render util, a performant CropBox, and the store.
Core files done. Now the multi-shot Scanner with a crop/filter review step and enhance off by default.
Now removing the remaining category references and wiring the Editor to the fast CropBox plus multi-page viewing.
All category references are gone. Now swapping the Editor's laggy crop for the imperative CropBox and making the Viewer show real pages.
Now I'll remove the old drag logic and overlay markup, replacing them with the CropBox.
I'll delete the entire legacy drag block (lines 55–101).
Editor is clean. Now updating the Viewer to render real pages.
Let me make printing include all pages, then build.
Build passes. Here's what changed:
1. 🗑️ Categories removed everywhere
- Deleted the
ScanCategory type and the category field from ScanFile
- Removed the 7-button category picker from the camera screen
- Removed category chips from grid cards and the category text in list rows — replaced with a useful page count ("3 pages") instead
- Cleaned out of seed data and the compressor's uploaded-file path (storage key bumped to
v2 with auto-migration)
2. 📸 Multi-shot capture → review flow
The camera now works like a real scanner app:
- Tap the shutter as many times as you want — each shot lands in a thumbnail strip with a live counter ("3 captured") and a shutter flash
- Upload accepts multiple files at once too
- Hit Next to enter Review, where you step through each page (‹ › pager, or click any thumbnail) and crop + filter each page individually
- Add page jumps back to the camera; the ✕ on any thumbnail deletes that shot
- Save N pages bakes every page's crop and filter into the final image via canvas and stores them as one multi-page document (
pageUrls[])
- The Viewer and Print now render the actual distinct pages (single/continuous modes both work, print emits page breaks)
3. ✨ Enhance off by default
useState(false) — it's now an opt-in toggle button in the review bar rather than a pre-enabled switch, and it previews live across the image, thumbnails, and filter swatches.
4. ⚡ Non-laggy crop
New CropBox component used by both the scanner review and the editor. During a drag it never calls setState — it writes left/top/width/height and the dim-overlay clip-path directly to the DOM inside requestAnimationFrame, so there are zero React re-renders per pointer move. State is committed only on pointer-up. Also added larger 24px hit targets on the corners, correct nwse/nesw cursors, and touch-none so dragging works smoothly on mobile without scroll interference.
Output: dist/index.html — 338 kB (96 kB gzipped).
Files built: src/types.ts, src/components/CropBox.tsx, src/utils/image.ts, src/store.ts, src/components/Scanner.tsx, src/components/FileViews.tsx, src/components/FileManager.tsx, src/App.tsx, src/components/Editor.tsx, src/components/Viewer.tsx