feat: add alternate PDF operation - #218
Conversation
|
@Mithurn is attempting to deploy a commit to the Mithun Srinivas' projects Team on Vercel. A member of the Team first needs to authorize it. |
Interleave pages from two or more PDFs: A1, B1, A2, B2, and so on. An option reverses the second file for backs scanned last-page-first. When one file is shorter, leftover pages from the others are appended. Page order is planned by a pure function so it can be tested without building PDFs, and reading and copying share one monotonic progress bar.
Nothing imports it, and the extra non-component export disabled Fast Refresh for every consumer of Icon.jsx.
6ad2fc1 to
474c41c
Compare
|
Really well-rounded PR @Mithurn, thank you. The interleave plan handles two or more files and appends leftovers from the longer one, the reverse-second option covers duplex scans, and using copyPages keeps the pages as vectors so text stays selectable. Shipping unit tests plus an e2e spec and the zero-network proof is exactly the standard we love to see. Meets every criterion on #200 and all checks are green. Merging now. One tiny thing for next time, no action needed here: the Icon.jsx change also dropped the unused |
Closes #200
What changed
src/operations/alternate-pdf/, plus ashuffleglyph inIcon.jsx. No new dependencies.Acceptance criteria (from the issue)
Proof
9 unit tests and a Playwright e2e spec;
npm run buildandnpm run lintpass.Output page order. Green pages came from the first file, blue from the second, so the alternating colours show the interleave and 1-6 shows the reverse option correcting the backs.
Network tab on the production build: downloading the result makes zero requests.