export function serializeEditorProject(project) {
    if (!project.name.trim())
        throw new Error("Editor project name is required.");
    return `${JSON.stringify(project, null, 2)}\n`;
}
export function parseEditorProject(text) {
    const parsed = JSON.parse(text);
    if (parsed.schema !== "a3d-editor-project")
        throw new Error("Unsupported editor project schema.");
    if (!Array.isArray(parsed.nodes))
        throw new Error("Editor project nodes must be an array.");
    return parsed;
}
//# sourceMappingURL=ProjectSerializer.js.map