saveProjectAsDocument

fun saveProjectAsDocument(app: AppModel, defaultName: String, onDone: (String?) -> Unit)

Saves the project the way uapmd-app does (MainWindow::handleSaveProject): ask the provider for a save handle, then hand it to the app model, which packs the project tree into a .uapmdz and writes it through the provider — a download, in a browser. Writing to a path cannot replace this: a saved project is a directory, so a single-file write would deliver only its manifest.

onDone receives null on success, or a message. A cancelled pick reports null and saves nothing.