documentatie

This commit is contained in:
2026-09-03 17:24:56 +02:00
parent e971dfe942
commit 42fcea9af8
14 changed files with 135 additions and 16 deletions
@@ -12,6 +12,7 @@ export class CmapTransferController {
});
}
/** Save pending changes, then create the requested readable Markdown export. */
async exportMarkdown(options) {
const map = this.getCurrentMap();
if (!map) throw new Error(this.translate("cmap-export-unavailable", "CMap export is unavailable."));
@@ -19,6 +20,7 @@ export class CmapTransferController {
return this.markdownExporter.export(map, options);
}
/** Save pending changes, then create the requested portable JSON bundle. */
async exportJson(depth) {
const map = this.getCurrentMap();
if (!map) throw new Error(this.translate("cmap-json-unavailable", "CMap JSON export is unavailable."));
@@ -26,6 +28,11 @@ export class CmapTransferController {
return this.jsonExporter.export(map, depth);
}
/**
* goal : Import a validated CMap bundle after presenting replacement conflicts.
* post : Page and CMap catalogues are refreshed and navigation opens the imported root CMap.
* result : The importer summary.
*/
async importFile(file) {
const bundle = await this.jsonImporter.read(file);
await this.saveBeforeTransfer();