feat(canvas): 自由画布 - 增强空白起点、外观设置与节点连接体验 (#356)

This commit is contained in:
vv-get-ti authored and GitHub committed 2026-08-31 06:49:43 +08:00
1 parent cc4aa736ff
commit 151e99f8d9
22 files changed
+925 -113

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
export type CanvasStarterMode = "guided" | "freeform";
export type CanvasEmptyStateKind = "none" | "guided" | "freeform" | "linked";
export function resolveCanvasEmptyStateKind({
nodeCount,
shortDramaEnabled,
isProjectLinked,
starterMode,
}: {
nodeCount: number;
shortDramaEnabled: boolean;
isProjectLinked: boolean;
starterMode?: CanvasStarterMode;
}): CanvasEmptyStateKind {
if (nodeCount > 0) return "none";
if (!shortDramaEnabled) return "freeform";
if (isProjectLinked) return "linked";
return starterMode === "freeform" ? "freeform" : "guided";
}