feat(editor): DnD сцен в список, порядок списка и правки импорта

Можно перетащить изображения/видео в колонку сцен: создаются новые сцены
с превью и названием из файла, с полноэкранным прогрессом и отчётом о
пропущенных файлах.

Добавлен ручной порядок сцен в списке (sceneListOrder) с сохранением в
проект; перетаскивание карточек отделено от импорта файлов. Во время
сортировки снова работает скролл колесом.

Исправлен залипающий disabled у «+ Новая сцена» после создания сцены.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-07-12 10:32:50 +08:00
parent b7e6ff6915
commit 35a6e979eb
18 changed files with 789 additions and 73 deletions
+7 -1
View File
@@ -3,6 +3,7 @@ import {
getSideStoryComponentNodeIds,
listSideStoryStarts,
} from './sceneGraphLineage';
import { reconcileSceneListOrder } from './sceneListOrder';
import type {
ExportedStorylineRef,
GraphNodeId,
@@ -248,6 +249,7 @@ export function buildPartialExportProject(
updatedAt: new Date().toISOString(),
},
scenes,
sceneListOrder: reconcileSceneListOrder(scenes, source.sceneListOrder),
sceneGraphNodes,
sceneGraphEdges,
currentSceneId: null,
@@ -491,7 +493,11 @@ export function mergeStorylinesIntoProject(
};
const outgoing = recomputeOutgoing(merged.sceneGraphNodes, merged.sceneGraphEdges);
merged = { ...merged, scenes: applyConnectionSets(merged.scenes, outgoing) };
merged = {
...merged,
scenes: applyConnectionSets(merged.scenes, outgoing),
sceneListOrder: reconcileSceneListOrder(scenes, target.sceneListOrder),
};
return {
project: merged,