importProjectFromJSON only checked a few top-level fields before writing the project to storage, so a malformed .opencut.json could be saved and only fail later when the project is opened. Add a Zod schema that validates the full timeline shape (scenes -> tracks -> elements), settings, and timeline view state before saveProject, replacing the presence checks and the unchecked `as ExportedProjectJSON` cast. Zod is already a dependency, so no new deps. Extra/unknown fields are tolerated for forward compatibility; the raw parsed object is persisted so no element fields are dropped. |
||
|---|---|---|
| .. | ||
| desktop | ||
| web | ||