M1: save a copy as .fig

Save as now offers .figcraft and .fig as separate file types. A .fig
destination, chosen in the dialog or passed to file.saveAs and file.save,
writes the existing experimental .fig export of the document that is shown
and reports how much was left out. The file's own path, unsaved changes,
versions, branches and undo history are not touched, and a shown earlier
version stays shown while the copy is written or a Save as choice is
pending.

Plain Save no longer writes over a file whose saved path ends in .fig;
earlier builds could write native data under that name. It asks for a
destination instead.
This commit is contained in:
Skyfuller1303
2026-10-16 02:03:46 +02:00
parent 4ee413acde
commit d4394e87cc
12 changed files with 835 additions and 20 deletions
+7
View File
@@ -60,6 +60,13 @@ export limit, not a native document nesting limit.
### Export to `.fig` (experimental)
File ▸ Save as offers `.figcraft` and `.fig` as separate file types in the system dialog. A `.fig`
destination writes the same experimental export copy of the document that is shown (`file.save` and
`file.saveAs` with a path ending in `.fig` do the same) and reports what was left out. The file's own
path, its unsaved changes, versions, branches and undo history are not touched, and a shown earlier
version stays shown. Other apps may not open every exported `.fig` file. A plain Save never writes over
a file whose saved path ends in `.fig`; it asks for a destination instead.
`file.export {format: "fig"}` (or a `path` ending in `.fig`), File ▸ Export… ▸ .fig (experimental),
`figcraft-cli export <file> -o <out>.fig` (and `convert`) and MCP's `export {format: "fig"}` write
the whole document. The writer (`crates/format/src/fig/export.rs`) works from the same public format