v2.2.1 — Image Preview, PDF Viewer Fixes & Canvas Fit
Images now open from the sidebar, the PDF viewer no longer errors out or takes over the whole window, and canvases frame themselves on open.
🖼️ Images (#10)
- Double-clicking an image (png/jpg/gif/webp/svg…) in the sidebar explorer now opens it in a real tab — previously nothing happened. New image viewer loads the file as a data: URL (file:// is blocked in the Tauri/WebKitGTK webview, same path note images use); click the image to toggle fit-to-view vs. actual size.
📄 PDF (#11)
- Fixed the "API version does not match the Worker version" crash — pdfjs-dist is pinned to 5.4.394 with a matching bundled worker, so the library and worker versions always agree.
- PDFs now open as a normal tab in the editor area instead of an overlay drawn over the entire Noteriv UI (which made it unclear how to close it and whether the window's X would quit the app). Close it like any tab, or press Esc.
- The viewer follows your selected Noteriv theme instead of staying Catppuccin Mocha — it reads the active theme's CSS variables live.
- Windowed rendering: only pages near the viewport are painted to a canvas (the rest stay lightweight placeholders) and off-screen pages are freed, so long PDFs no longer render every page at full resolution at once. The whole page is framed to fit on open.
🗂️ Canvas (#9)
- Canvas now zooms-to-fit the whole board on open instead of the fixed 1:1 / top-left default that could leave nodes off-screen — runs once per opened file, after the viewport is actually measured.
📎 Other
- Bumped version to 2.2.1 across package.json, Cargo.toml, tauri.conf.json, and Cargo.lock