mirror of
https://github.com/storytold/designcraft.git
synced 2026-10-26 11:16:50 -06:00
- apps/designcraft/Cargo.toml: the macOS target keeps objc2 0.6 / objc2-app-kit 0.3 (IME) and adds fmv-macos-events =0.1.0, which uses the same objc2 and objc2-app-kit versions. - apps/designcraft/src/main.rs: the shared Arc<gpu::Startup>, catch_unwind and restart flow stay; the Apple-event handlers are installed before run_native (outside catch_unwind, held until the window ends), the app drains the inbox each frame, and documents that arrived are noted on the Startup. The open dialog keeps the INDD/INDT filter and ends with All files. The open-filter test checks both; the save-dialog test is added. - apps/designcraft/src/gpu.rs: Startup::opening records the documents the OS handed this run; a start again after a graphics failure (both finish and the first-frame watch) passes them as file arguments, since Finder doesn't send them twice. - apps/designcraft/src/apple_events.rs: poll returns the documents it handed the app, and queued() returns those still in the inbox when the window ends. - crates/engine/src/cmd/file.rs: file.open decides by content first (IDML by its mimetype entry, then a DesignCraft package or JSON), then an InDesign file by its signature or .indd/.indt extension, then a .idml or .designcraft extension for the reader's own error; anything else is "not a DesignCraft or IDML file". INDD stays in file.openBytes. Save commands add .designcraft as on file-open-os; the params docs describe all of it. - crates/engine/src/cmd/mod.rs: re-exports from both sides (is_document, with_document_extension and layout::chapter_numbering).