multi-outputs.ts 633 B

12345678910111213141516171819202122
  1. import { FlowNodeBaseType, type FlowNodeRegistry, FlowNodeSplitType } from '@flowgram.ai/document';
  2. import { BlockRegistry } from './block';
  3. /**
  4. * 多输出节点
  5. * - multiOutputs:
  6. * - blockIcon
  7. * - inlineBlocks
  8. * - output or multiOutputs
  9. * - output or multiOutputs
  10. */
  11. export const MultiOuputsRegistry: FlowNodeRegistry = {
  12. type: FlowNodeBaseType.MULTI_OUTPUTS,
  13. extend: FlowNodeSplitType.SIMPLE_SPLIT,
  14. getLines: (transition, layout) => {
  15. if (transition.entity.parent?.flowNodeType === FlowNodeBaseType.INLINE_BLOCKS) {
  16. return BlockRegistry.getLines!(transition, layout);
  17. }
  18. return [];
  19. },
  20. };