Remap frame port references and commit import cycles atomically

This commit is contained in:
2026-11-08 18:09:39 +08:00
parent 1f89f9ebb5
commit 60fad39847
15 changed files with 209 additions and 48 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ 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'] : [],
copy: { references: [], omit: [['taskId'], ['runId'], ['progress'], ['runStatus']] },
copy: { references: id === 'frame' ? [{path:['ports','*','nodeId'],target:'element',external:'reject'}] : [], omit: [['taskId'], ['runId'], ['progress'], ['runStatus']] },
})).concat([defineComponent({ id: 'connection', dataVersion: 1, structure: 'connection', validate: data => validJson(data), features: [editable(), connectionEditable()], resourceFields: [], copy: { references: [], omit: [] } })]);
}