feat: full studio build -- light theme, canvas thumbnails, i18n (fa/en)

This commit is contained in:
Soroush.Asadi
2026-05-24 17:37:21 +03:30
parent d962483359
commit c61f587767
295 changed files with 29797 additions and 265 deletions
+31
View File
@@ -0,0 +1,31 @@
import type { Scene } from "@/lib/studio-types";
export const STUDIO_HISTORY_LIMIT = 50;
export interface StudioHistorySnapshot {
scenes: Scene[];
activeSceneId: string;
selectedLayerId: string | null;
}
export function cloneScenes(scenes: Scene[]): Scene[] {
return scenes.map((scene) => ({
...scene,
layers: scene.layers.map((layer) => ({
...layer,
props: { ...layer.props },
})),
}));
}
export function captureHistorySnapshot(state: {
scenes: Scene[];
activeSceneId: string;
selectedLayerId: string | null;
}): StudioHistorySnapshot {
return {
scenes: cloneScenes(state.scenes),
activeSceneId: state.activeSceneId,
selectedLayerId: state.selectedLayerId,
};
}