feat(studio): Phase 3 — scene reorder + numeric duration + FIX/FLEXIBLE gating

Wires the scene-list operations users asked for into the existing timeline
(model-agnostic — works for any scene, layer- or block-based):

- SceneThumbnailBlock: now sortable (@dnd-kit useSortable) with a left-edge grip
  handle (listeners only on the handle so select/rename/resize still work); adds a
  numeric per-scene duration input (commit on blur/Enter, clamped 1–30s) next to
  the drag-resize; a `locked` prop makes it read-only.
- SceneThumbnailStrip: wraps the blocks in DndContext + SortableContext
  (horizontal, 6px pointer-activation so clicks/resize aren't hijacked) and calls
  the existing reorderScenes store action; gates add/browse + reorder/duplicate/
  delete/duration behind isFixedSceneMode(chooseMode).
- studio-store: isFixedSceneMode() helper (single source for FIX vs FLEXIBLE).
- i18n: reorderScene / durationLabel / secondsUnit in fa + en.

Verified with `npm run build` (rules-of-hooks clean). NOTE: a THEME PICKER and
FlexStory block-FIELD editing are deferred — the studio editor is Konva-layer-
centric, so both need a FlexStory-aware editing path (a follow-up), not this phase.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-23 14:18:00 +03:30
parent f8ea9af3b6
commit 8ddca5647b
5 changed files with 172 additions and 50 deletions
+4 -1
View File
@@ -1224,7 +1224,10 @@
"deleteScene": "Delete {name}",
"resizeSceneDuration": "Resize {name} duration",
"sceneNameLabel": "Scene name",
"doubleClickToRename": "Double-click to rename"
"doubleClickToRename": "Double-click to rename",
"reorderScene": "Reorder {name}",
"durationLabel": "Scene duration (seconds)",
"secondsUnit": "s"
},
"componentsStudioTimelineSceneThumbnailStrip": {
"browseScenes": "Browse scenes",
+4 -1
View File
@@ -1224,7 +1224,10 @@
"deleteScene": "حذف {name}",
"resizeSceneDuration": "تغییر مدت زمان {name}",
"sceneNameLabel": "نام صحنه",
"doubleClickToRename": "برای تغییر نام، دوبار کلیک کنید"
"doubleClickToRename": "برای تغییر نام، دوبار کلیک کنید",
"reorderScene": "جابه‌جایی {name}",
"durationLabel": "مدت صحنه (ثانیه)",
"secondsUnit": "ث"
},
"componentsStudioTimelineSceneThumbnailStrip": {
"browseScenes": "مرور صحنه‌ها",