@agentscope-ai/flow 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,10 @@ interface IProps extends NodeProps<IWorkFlowNode> {
10
10
  disableAction?: boolean;
11
11
  className?: string;
12
12
  hasFailBranch?: boolean;
13
+ slots?: {
14
+ label?: React.ReactNode;
15
+ afterLabel?: React.ReactNode;
16
+ };
13
17
  }
14
18
  export declare const NodeStatusIcon: React.MemoExoticComponent<({ status }: {
15
19
  status: IWorkFlowStatus;
@@ -64,6 +64,7 @@ export var NodeStatusIcon = /*#__PURE__*/memo(function (_ref) {
64
64
  });
65
65
  });
66
66
  function BaseNode(props) {
67
+ var _props$slots, _props$slots2;
67
68
  var containerRef = useRef(null);
68
69
  var taskStore = useStore(function (store) {
69
70
  return store.taskStore;
@@ -174,12 +175,12 @@ function BaseNode(props) {
174
175
  className: "flex gap-[8px] items-center flex-1"
175
176
  }, /*#__PURE__*/React.createElement(FlowIcon, {
176
177
  nodeType: props.type
177
- }), /*#__PURE__*/React.createElement(Typography.Text, {
178
+ }), !!((_props$slots = props.slots) !== null && _props$slots !== void 0 && _props$slots.label) ? props.slots.label : /*#__PURE__*/React.createElement(Typography.Text, {
178
179
  ellipsis: {
179
180
  tooltip: true
180
181
  },
181
182
  className: "spark-flow-node-label flex-1 w-1"
182
- }, props.data.label)), !!nodeResult && showResults ? /*#__PURE__*/React.createElement(NodeStatusIcon, {
183
+ }, props.data.label), !!((_props$slots2 = props.slots) !== null && _props$slots2 !== void 0 && _props$slots2.afterLabel) && props.slots.afterLabel), !!nodeResult && showResults ? /*#__PURE__*/React.createElement(NodeStatusIcon, {
183
184
  status: nodeResult.nodeStatus
184
185
  }) : props.disableAction ? null : /*#__PURE__*/React.createElement("div", {
185
186
  onClick: function onClick(e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentscope-ai/flow",
3
- "version": "0.0.11",
3
+ "version": "0.0.13",
4
4
  "description": "A powerful and flexible flow canvas rendering engine designed for AI applications. Provides comprehensive workflow visualization and interaction capabilities for platforms like Bailian and AgentScope, enabling seamless creation and management of complex AI agent workflows with an intuitive drag-and-drop interface.",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",