@digitalsee-ai/rcs 2.0.0-beta13 → 2.0.0-beta15
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.
- package/dist/components/digitalsee/workflow/Canvas/utils.d.ts +8 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNavigation.d.ts +1 -0
- package/dist/components/digitalsee/workflow/api/dip.types.d.ts +1 -1
- package/dist/components/digitalsee/workflow/utils/nodeHandleLayout.d.ts +21 -24
- package/dist/{index-DexSKLJx.mjs → index-BD4cwpgq.mjs} +12331 -12283
- package/dist/{index-CreWCJ6Q.mjs → index-DeLeSoGL.mjs} +2 -2
- package/dist/rcs.css +1 -1
- package/dist/rcs.es.js +1 -1
- package/dist/rcs.umd.js +64 -64
- package/package.json +1 -1
|
@@ -4,5 +4,12 @@ type GetHelperLinesResult = {
|
|
|
4
4
|
vertical?: number;
|
|
5
5
|
snapPosition: Partial<XYPosition>;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* 计算拖拽节点的对齐辅助线(在 onNodesChange 中调用)。
|
|
9
|
+
*
|
|
10
|
+
* 遍历所有其它节点,分别在 x 轴(x1/x2 即左右边缘)与 y 轴(y1/y2 即上下边缘)上
|
|
11
|
+
* 取与当前节点最接近的边缘组合:无论距离多远,参考线始终返回最接近的对齐位置;
|
|
12
|
+
* 仅当距离小于 snapDistance 时才同时返回吸附位置。
|
|
13
|
+
*/
|
|
14
|
+
export declare function getHelperLines(change: NodePositionChange, nodes: Node[], snapDistance?: number): GetHelperLinesResult;
|
|
8
15
|
export {};
|
package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useNavigation.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare const useNavigation: ({ categories, categoriesReady, initialCateg
|
|
|
15
15
|
categoryNodes: NodeTypeItem[];
|
|
16
16
|
currentCategory: CategoryItem;
|
|
17
17
|
isLoadingNodes: boolean;
|
|
18
|
+
isLoadingMore: boolean;
|
|
18
19
|
isRealTriggerMode: boolean;
|
|
19
20
|
isAIToolMode: boolean;
|
|
20
21
|
isBuiltinMCPMode: boolean;
|
|
@@ -518,7 +518,7 @@ export interface DipPortSchema {
|
|
|
518
518
|
/**
|
|
519
519
|
* 端口在节点边框上的渲染位置,对齐 ReactFlow `Position` 枚举字符串值。
|
|
520
520
|
*
|
|
521
|
-
*
|
|
521
|
+
* 缺省为 Left/Right;MCP Server 画布会再强制 Left→Top、Right→Bottom。
|
|
522
522
|
* 仅影响视觉布局,不参与连线协议匹配。
|
|
523
523
|
*/
|
|
524
524
|
position?: 'left' | 'top' | 'right' | 'bottom';
|
|
@@ -4,44 +4,42 @@ export interface NodeHandlePositions {
|
|
|
4
4
|
sources: Position[];
|
|
5
5
|
targets: Position[];
|
|
6
6
|
}
|
|
7
|
-
interface
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export interface NodeHandleLayoutOptions {
|
|
8
|
+
/** MCP Server 画布:强制 Left→Top、Right→Bottom。 */
|
|
9
|
+
isMcpServerCanvas?: boolean;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* 优先级:`DipPortSchema.position` > `ACTION_KEY_HANDLE_LAYOUT` > 缺省 Left/Right。
|
|
19
|
-
* 后续 `DipPortSchema.position` 全量铺开后即可删除本表。
|
|
12
|
+
* MCP Server 画布端口位置映射:Left → Top,Right → Bottom;Top/Bottom 保持不变。
|
|
13
|
+
*/
|
|
14
|
+
export declare function remapPositionForMcpCanvas(position: Position): Position;
|
|
15
|
+
/**
|
|
16
|
+
* 节点列表是否构成 MCP Server 画布(存在 MCP Server 触发节点)。
|
|
20
17
|
*/
|
|
21
|
-
export declare
|
|
18
|
+
export declare function detectIsMcpServerCanvas(nodes: Array<Pick<Node, 'type' | 'data'>>): boolean;
|
|
22
19
|
/**
|
|
23
20
|
* 给定一个 ReactFlow 节点,返回它所有 source / target handle 的 `Position`。
|
|
24
21
|
*
|
|
25
22
|
* 数据源优先级:
|
|
26
|
-
* 1. NodePackage 节点 → `DipPortSchema.position` >
|
|
23
|
+
* 1. NodePackage 节点 → `DipPortSchema.position` > 缺省 Left/Right
|
|
27
24
|
* 2. 经典节点 → `nodeTypeRegistry` 中的 legacy handles
|
|
28
25
|
* 3. 兜底:返回空数组
|
|
29
26
|
*
|
|
30
|
-
*
|
|
27
|
+
* 当 `isMcpServerCanvas` 为真时,再将 Left→Top、Right→Bottom。
|
|
28
|
+
* 该函数只读、不发起网络请求。
|
|
31
29
|
*/
|
|
32
|
-
export declare function getNodeHandlePositions(node: Node): NodeHandlePositions;
|
|
30
|
+
export declare function getNodeHandlePositions(node: Node, options?: NodeHandleLayoutOptions): NodeHandlePositions;
|
|
33
31
|
/**
|
|
34
32
|
* 节点是否参与垂直布局(子节点在父节点下方 / 上方)。
|
|
35
33
|
*
|
|
36
34
|
* 判定:节点的 source 或 target handle 中任一处于 Top/Bottom 即视为垂直。
|
|
37
35
|
*/
|
|
38
|
-
export declare function isVerticalLayoutNode(node: Node): boolean;
|
|
36
|
+
export declare function isVerticalLayoutNode(node: Node, options?: NodeHandleLayoutOptions): boolean;
|
|
39
37
|
/**
|
|
40
38
|
* 节点是否参与水平布局(子节点在父节点右侧 / 左侧)。
|
|
41
39
|
*
|
|
42
40
|
* 判定:节点的 source 或 target handle 中任一处于 Left/Right 即视为水平。
|
|
43
41
|
*/
|
|
44
|
-
export declare function isHorizontalLayoutNode(node: Node): boolean;
|
|
42
|
+
export declare function isHorizontalLayoutNode(node: Node, options?: NodeHandleLayoutOptions): boolean;
|
|
45
43
|
/**
|
|
46
44
|
* 按边的 target handle 位置判定布局方向。
|
|
47
45
|
*
|
|
@@ -50,12 +48,12 @@ export declare function isHorizontalLayoutNode(node: Node): boolean;
|
|
|
50
48
|
* - target handle 在 Left/Right → 'horizontal'
|
|
51
49
|
* - 缺省 → null(调用方自行决定 fallback)
|
|
52
50
|
*/
|
|
53
|
-
export declare function getEdgeLayoutDirection(edge: Pick<Edge, 'source' | 'target' | 'sourceHandle' | 'targetHandle'>, sourceNode?: Node | null, targetNode?: Node | null): LayoutDirection | null;
|
|
51
|
+
export declare function getEdgeLayoutDirection(edge: Pick<Edge, 'source' | 'target' | 'sourceHandle' | 'targetHandle'>, sourceNode?: Node | null, targetNode?: Node | null, options?: NodeHandleLayoutOptions): LayoutDirection | null;
|
|
54
52
|
/**
|
|
55
53
|
* 取边 source handle 在节点边框上的 `Position`(供连线风格 / 区间重叠判定使用)。
|
|
56
54
|
* 无 sourceHandle 时取第一个 source handle;找不到匹配时返回 undefined,调用方按水平处理。
|
|
57
55
|
*/
|
|
58
|
-
export declare function getEdgeSourcePosition(edge: Pick<Edge, 'sourceHandle'>, sourceNode: Node): Position | undefined;
|
|
56
|
+
export declare function getEdgeSourcePosition(edge: Pick<Edge, 'sourceHandle'>, sourceNode: Node, options?: NodeHandleLayoutOptions): Position | undefined;
|
|
59
57
|
/**
|
|
60
58
|
* 节点是否拥有 Top 输入 handle,用于区分主流程节点与垂直子节点。
|
|
61
59
|
*
|
|
@@ -63,21 +61,20 @@ export declare function getEdgeSourcePosition(edge: Pick<Edge, 'sourceHandle'>,
|
|
|
63
61
|
* Top 入桩(典型 AI 子节点升级后通过 Bottom 入桩连接到父节点 ai_* 桩,但若
|
|
64
62
|
* 仍保留 Top 形态即可识别为"子节点")。
|
|
65
63
|
*/
|
|
66
|
-
export declare function hasTopInputHandle(node: Node): boolean;
|
|
64
|
+
export declare function hasTopInputHandle(node: Node, options?: NodeHandleLayoutOptions): boolean;
|
|
67
65
|
/**
|
|
68
66
|
* 节点是否拥有 Top source handle。
|
|
69
67
|
*
|
|
70
68
|
* 旧版 `calculateNodePosition` 用 `n.type !== AI_SUB_NODE` 过滤主流程节点;
|
|
71
69
|
* 现在等价语义改为:节点 source 不在 Top(说明它不向上输出,不会作为垂直子节点)。
|
|
72
70
|
*/
|
|
73
|
-
export declare function hasTopSourceHandle(node: Node): boolean;
|
|
71
|
+
export declare function hasTopSourceHandle(node: Node, options?: NodeHandleLayoutOptions): boolean;
|
|
74
72
|
/**
|
|
75
73
|
* 节点是否属于某个父节点的垂直子布局(向上发送 → 自己即 child)。
|
|
76
74
|
*/
|
|
77
|
-
export declare function isVerticalLayoutChild(node: Node): boolean;
|
|
75
|
+
export declare function isVerticalLayoutChild(node: Node, options?: NodeHandleLayoutOptions): boolean;
|
|
78
76
|
/**
|
|
79
77
|
* 画布整体方向:按节点 source handle 的方向统计,少数服从多数。
|
|
80
|
-
*
|
|
78
|
+
* MCP Server 画布强制垂直;缺省(无法判定或平票)走水平。
|
|
81
79
|
*/
|
|
82
80
|
export declare function inferCanvasDirection(nodes: Node[]): LayoutDirection;
|
|
83
|
-
export {};
|