refactor: export/import projects as ZIP files instead of JSON

Changed from single JSON file to ZIP archive format to avoid string
length limits when serializing large audio buffers.

New ZIP structure:
- project.json (metadata, track info, effects, automation)
- track_0.wav, track_1.wav, etc. (audio files in WAV format)

Benefits:
- No more RangeError: Invalid string length
- Smaller file sizes (WAV compression vs base64 JSON)
- Human-readable audio files in standard format
- Can extract and inspect individual tracks
- Easier to edit/debug project metadata

Added jszip dependency for ZIP file handling.
Changed file picker to accept .zip files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-19 10:30:20 +01:00
parent 543eb069d7
commit 7de75f7b2b
4 changed files with 185 additions and 35 deletions

View File

@@ -1143,7 +1143,7 @@ export function AudioEditor() {
// Create file input
const input = document.createElement('input');
input.type = 'file';
input.accept = '.json';
input.accept = '.zip';
input.onchange = async (e) => {
const file = (e.target as HTMLInputElement).files?.[0];