feat(canvas): define copy schemas and plan hierarchical duplicates

This commit is contained in:
2026-11-08 14:37:23 +08:00
parent 5296c953b1
commit be94446f12
6 changed files with 193 additions and 3 deletions
+2 -1
View File
@@ -48,7 +48,8 @@ export function builtinComponents(): readonly ComponentDefinition[] {
id, dataVersion: 1, structure: 'node', validate: textData,
features: [movable(), resizable(), ...(id === 'frame' ? [] : [rotatable()]), editable()],
resourceFields: ['image', 'plain-image'].includes(id) ? ['assetId','asset'] : [],
})).concat([defineComponent({ id: 'connection', dataVersion: 1, structure: 'connection', validate: data => validJson(data), features: [editable(), connectionEditable()], resourceFields: [] })]);
copy: { references: [], omit: [['taskId'], ['runId'], ['progress'], ['runStatus']] },
})).concat([defineComponent({ id: 'connection', dataVersion: 1, structure: 'connection', validate: data => validJson(data), features: [editable(), connectionEditable()], resourceFields: [], copy: { references: [], omit: [] } })]);
}
export function connectionPathValid(path: Json): boolean {