Commit graph

22 commits

Author SHA1 Message Date
Danila Poyarkov 5e209eca1c Fix trackpad pinch-to-zoom on Safari macOS 2026-03-01 22:07:47 +03:00
Danila Poyarkov 13a95bf517 Release v0.2.1 2026-03-01 21:25:52 +03:00
Danila Poyarkov 6e4332a6ba Release v0.2.0 2026-03-01 18:27:12 +03:00
Danila Poyarkov 326f5d194d Preload system fonts on app startup
Cache font list in Rust via OnceLock, fire preload request from
main.ts so the font list is ready before user opens the picker.
2026-03-01 02:57:58 +03:00
Danila Poyarkov 5ccae709a0 Add system font enumeration via font-kit
Rust: list_system_fonts and load_system_font Tauri commands using
font-kit crate for cross-platform system font access.

TS: font shim detects Tauri runtime and uses invoke() for font
listing/loading instead of queryLocalFonts (unavailable in WKWebView).
2026-03-01 02:56:12 +03:00
Danila Poyarkov f7d1d59dc1 Rename Cargo crate to open_pencil, binary to OpenPencil
Fixes macOS Dock showing 'open-pencil-app' instead of 'OpenPencil'.
2026-03-01 02:42:12 +03:00
Danila Poyarkov faf7ba6387 Fix app name in macOS Dock: open-pencil-app → OpenPencil 2026-03-01 02:39:32 +03:00
Danila Poyarkov 88765bd078 Use pencil loader icon as Tauri app icon 2026-03-01 01:37:01 +03:00
Danila Poyarkov 7ff16f70e0 Fix app identifier to net.dannote.open-pencil, add CLI/headless plan to PLAN.md 2026-02-28 23:51:22 +03:00
Danila Poyarkov 66043081af Format Rust code with rustfmt 2026-02-28 16:24:31 +03:00
Danila Poyarkov edf6da6738 Build .fig ZIP in Rust instead of fflate
fflate's zipSync produces ZIP files that Figma rejects. Move the entire
fig-kiwi container + Zstd compression + ZIP packaging into a single
Rust command (build_fig_file). Zstd now includes content size via
set_pledged_src_size. Web fallback still uses fflate/deflate.
2026-02-28 16:16:49 +03:00
Danila Poyarkov 5aae8d01fc Include content size in Zstd frame header
Figma requires the Zstd content size to be present in the frame header.
Use zstd::Encoder with include_contentsize(true) instead of encode_all.
2026-02-28 16:03:58 +03:00
Danila Poyarkov 495e419e79 Zstd compression via Tauri Rust command, deflate fallback for browser
- Added zstd crate to Rust deps and zstd_compress Tauri command
- Export uses native Zstd in Tauri, deflate in browser (our reader
  handles both)
- Removed zstd-wasm dependency (decompress-only, didn't work)
2026-02-28 14:56:06 +03:00
Danila Poyarkov 197323162f Fix .fig export: Zstd compression, IS_TAURI constant, fs permissions
- Replace deflate with Zstd compression via zstd-wasm for .fig export
  (Figma expects Zstd, not zlib deflate)
- Extract IS_TAURI constant from repeated window check
- Fix Tauri fs permissions: use allow-write-file / allow-read-file
  with glob scope instead of bare allow-write / allow-read
2026-02-28 14:48:22 +03:00
Danila Poyarkov 8d3d3444ad Tauri native dialog for Save/Open with fs plugin 2026-02-28 13:54:21 +03:00
Danila Poyarkov 9d6a78fd7c Add Quit and About to Windows/Linux menus
On macOS these live in the app submenu. On Windows/Linux:
- File → Quit (at bottom, with separator)
- Help → About OpenPencil (at bottom, with separator)
2026-02-28 13:00:23 +03:00
Danila Poyarkov 2ab99ac4fe Windows build support: conditional macOS app menu, devtools feature
- Gate OpenPencil app submenu (About/Services/Hide/Quit) behind
  #[cfg(target_os = "macos")] — Windows/Linux don't have it
- Enable tauri "devtools" feature in Cargo.toml (required for
  open_devtools/close_devtools on non-macOS)
2026-02-28 12:58:34 +03:00
Danila Poyarkov 159ee6b7c9 Fix production build type errors 2026-02-28 11:37:02 +03:00
Danila Poyarkov 2f33165f1d Add Developer Tools menu item (⌘⌥I) 2026-02-28 10:21:35 +03:00
Danila Poyarkov c9fd34bd48 Wire menu events to frontend
Rust emits 'menu-event' with item ID to webview.
useMenu() composable listens and dispatches actions.
Extract openFileDialog() to use-menu.ts (shared with use-keyboard).
2026-02-28 10:20:00 +03:00
Danila Poyarkov bf45ac0f65 Native macOS menu bar
- OpenPencil: About, Services, Hide, Quit
- File: New, Open, Save, Save As, Export, Close
- Edit: Undo, Redo, Cut, Copy, Paste, Paste in Place,
  Select All, Duplicate, Delete
- View: Zoom In/Out/Fit/100%, Toggle Rulers/Grid/UI, Fullscreen
- Object: Group, Ungroup, Frame Selection, Bring to Front,
  Send to Back, Flip H/V
- Window: Minimize, Maximize, Close
- Help: Keyboard Shortcuts

All with standard macOS accelerators.
2026-02-28 10:00:37 +03:00
Danila Poyarkov 23f00189e8 Rename src-tauri → desktop, symlink for CLI compat 2026-02-28 08:10:09 +03:00