Provide export functions
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3574470. -->
Reported by: [jurgenhaas](https://www.drupal.org/user/168924)
Related to !41
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>The modeler API provides export functions for recipes and archives. They are currently not available in the UI but should be. In addition, we also want an export as JSON or as SVG.</p>
<p>In addition, we want the modeler to be usable standalone to view the JSON format without having to have a Drupal backend available. That can then be used in the ECA Guide. For that, there should be an option to also include replay data in the export.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>There should be a single export icon in the toolbar. This should first check if there are unsaved changes and ask the user to save first or cancel.</p>
<p>The confirmation dialog for the export should then ask for the export format:</p>
<ul>
<li>Recipe: this should leverage the export from Modeler API</li>
<li>Archive: this should leverage the export from Modeler API</li>
<li>JSON: this one should further ask if available replay data should be exported as well, but only if replay data is available. In addition, it should include a list of required Drupal modules which can be derived from the provider property of all the contained nodes and conditions</li>
<li>SVG: this one should export as visible, i.e. respect annotation status and order indicators</li>
</ul>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
issue