@digitalsee-ai/rcs 2.0.0-beta7 → 2.0.0-beta9
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/Nodes/DeclaredNode.d.ts +4 -0
- package/dist/components/digitalsee/workflow/NodesConfig/components/FormFieldRenderer/fields/TextField/index.d.ts +2 -0
- package/dist/components/digitalsee/workflow/NodesConfig/context.d.ts +13 -0
- package/dist/components/digitalsee/workflow/NodesConfig/useClearVariableTargetOnFormMouseDown.d.ts +15 -0
- package/dist/components/digitalsee/workflow/NodesConfig/useVariableActiveTarget.d.ts +13 -0
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/hooks/useConnectableNodeSelector.d.ts +3 -3
- package/dist/components/digitalsee/workflow/store/panelSlice.d.ts +64 -0
- package/dist/components/digitalsee/workflow/types/NodeAddContext.d.ts +1 -1
- package/dist/components/dynamic-form/index.d.ts +0 -3
- package/dist/{index-trJRukGS.mjs → index-JIsi-COV.mjs} +22 -25
- package/dist/{index-Dy43iMlV.mjs → index-lzMv91zu.mjs} +38542 -39182
- package/dist/rcs.css +1 -1
- package/dist/rcs.es.js +53 -56
- package/dist/rcs.umd.js +76 -83
- package/package.json +1 -1
- package/dist/components/digitalsee/workflow/Panels/ModernNodeSelectorPanel/utils/filterEdgeInsertActions.d.ts +0 -62
- package/dist/components/dynamic-form/components/SelectWithExpression/index.d.ts +0 -25
- package/dist/components/dynamic-form/components/VariableInput/index.d.ts +0 -26
- package/dist/components/dynamic-form/components/VariableInput/utils.d.ts +0 -38
- package/dist/components/dynamic-form/components/VariableTextarea/index.d.ts +0 -10
package/package.json
CHANGED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { DipNodeSchema } from '../../../api/dip';
|
|
2
|
-
import { ActionItem, NodeFetchResult } from '../types';
|
|
3
|
-
import { PortConnectionEdge, PortConnectionNode } from '../../../utils/portConnectionValidator';
|
|
4
|
-
import { Edge, Node } from '@xyflow/react';
|
|
5
|
-
type SourceSchema = Pick<DipNodeSchema, 'outputs'>;
|
|
6
|
-
type TargetSchema = Pick<DipNodeSchema, 'inputs'>;
|
|
7
|
-
/** 边中插入候选动作执行双侧本地校验所需的稳定上下文。 */
|
|
8
|
-
export interface EdgeInsertActionFilterContext {
|
|
9
|
-
sourceNode: PortConnectionNode;
|
|
10
|
-
targetNode: PortConnectionNode;
|
|
11
|
-
sourceSchema: SourceSchema;
|
|
12
|
-
targetSchema: TargetSchema;
|
|
13
|
-
sourceHandle: string;
|
|
14
|
-
targetHandle: string;
|
|
15
|
-
edges?: readonly PortConnectionEdge[];
|
|
16
|
-
replacedEdgeId?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface EdgeInsertActionFilterStats {
|
|
19
|
-
contextReady: boolean;
|
|
20
|
-
serverActionCount: number;
|
|
21
|
-
compatibleActionCount: number;
|
|
22
|
-
filteredActionCount: number;
|
|
23
|
-
sourceCompatibleActionCount: number;
|
|
24
|
-
targetCompatibleActionCount: number;
|
|
25
|
-
missingActionSchemaCount: number;
|
|
26
|
-
}
|
|
27
|
-
export interface EdgeInsertActionFilterResult {
|
|
28
|
-
actions: ActionItem[];
|
|
29
|
-
stats: EdgeInsertActionFilterStats;
|
|
30
|
-
}
|
|
31
|
-
export interface EdgeInsertEndpointContext {
|
|
32
|
-
sourceId: string | number;
|
|
33
|
-
targetId: string | number;
|
|
34
|
-
sourceHandle: string;
|
|
35
|
-
targetHandle: string;
|
|
36
|
-
}
|
|
37
|
-
export type EdgeInsertActionFilterContextResolutionCode = 'READY' | 'SOURCE_NODE_NOT_FOUND' | 'TARGET_NODE_NOT_FOUND' | 'SOURCE_SCHEMA_NOT_READY' | 'TARGET_SCHEMA_NOT_READY';
|
|
38
|
-
export interface EdgeInsertActionFilterContextResolution {
|
|
39
|
-
code: EdgeInsertActionFilterContextResolutionCode;
|
|
40
|
-
context: EdgeInsertActionFilterContext | null;
|
|
41
|
-
}
|
|
42
|
-
export interface ResolveEdgeInsertActionFilterContextInput {
|
|
43
|
-
edgeContext: EdgeInsertEndpointContext;
|
|
44
|
-
nodes: readonly Node[];
|
|
45
|
-
edges: readonly Edge[];
|
|
46
|
-
replacedEdgeId?: string;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* 对边中插入动作执行 source→candidate 与 candidate→target 的本地求交。
|
|
50
|
-
*
|
|
51
|
-
* 后端明确禁止同时携带 source/target 端点,因此 target 侧使用动作响应中的完整
|
|
52
|
-
* NodeSchema 在前端二次过滤。
|
|
53
|
-
*/
|
|
54
|
-
export declare function filterEdgeInsertActions(actions: readonly ActionItem[], context: EdgeInsertActionFilterContext | null): EdgeInsertActionFilterResult;
|
|
55
|
-
/** 从当前 ReactFlow 快照解析候选过滤所需的原边两端。 */
|
|
56
|
-
export declare function resolveEdgeInsertActionFilterContext({ edgeContext, nodes, edges, replacedEdgeId, }: ResolveEdgeInsertActionFilterContextInput): EdgeInsertActionFilterContextResolution;
|
|
57
|
-
/** 对 connectable 连接器分页中的所有 matchedActions 执行双侧求交并汇总统计。 */
|
|
58
|
-
export declare function filterEdgeInsertNodePage(page: NodeFetchResult, context: EdgeInsertActionFilterContext | null): {
|
|
59
|
-
page: NodeFetchResult;
|
|
60
|
-
stats: EdgeInsertActionFilterStats;
|
|
61
|
-
};
|
|
62
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { SelectProps as AntSelectProps } from 'antd/es/select';
|
|
2
|
-
import type * as React from 'react';
|
|
3
|
-
export type SelectValueMode = 'select' | 'expression';
|
|
4
|
-
export interface SelectWithExpressionProps extends Omit<AntSelectProps, 'value' | 'onChange'> {
|
|
5
|
-
/** 当前值 */
|
|
6
|
-
value?: string | string[] | number | number[];
|
|
7
|
-
/** 值变化回调 */
|
|
8
|
-
onChange?: (value: string | string[] | number | number[] | undefined) => void;
|
|
9
|
-
/** 是否允许表达式模式 */
|
|
10
|
-
allowExpression?: boolean;
|
|
11
|
-
/** 初始值模式 */
|
|
12
|
-
defaultValueMode?: SelectValueMode;
|
|
13
|
-
/** 当前值模式(受控) */
|
|
14
|
-
valueMode?: SelectValueMode;
|
|
15
|
-
/** 值模式变化回调 */
|
|
16
|
-
onValueModeChange?: (mode: SelectValueMode) => void;
|
|
17
|
-
/** 变量验证函数 */
|
|
18
|
-
validateVariable?: (variable: string) => boolean | Promise<boolean>;
|
|
19
|
-
/** 表达式模式的占位符 */
|
|
20
|
-
expressionPlaceholder?: string;
|
|
21
|
-
/** 隐藏模式切换器 */
|
|
22
|
-
hideModeSwitch?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export declare const SelectWithExpression: React.FC<SelectWithExpressionProps>;
|
|
25
|
-
export default SelectWithExpression;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface VariableInputProps {
|
|
3
|
-
id?: string;
|
|
4
|
-
value?: string;
|
|
5
|
-
onChange?: (value: string) => void;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
readOnly?: boolean;
|
|
9
|
-
multiline?: boolean;
|
|
10
|
-
minRows?: number;
|
|
11
|
-
maxRows?: number;
|
|
12
|
-
className?: string;
|
|
13
|
-
style?: React.CSSProperties;
|
|
14
|
-
capturePattern?: RegExp;
|
|
15
|
-
onVariableClick?: (variable: string) => void;
|
|
16
|
-
validateVariable?: (variable: string) => boolean | Promise<boolean>;
|
|
17
|
-
renderVariableTag?: (variable: string, isValid: boolean) => React.ReactNode;
|
|
18
|
-
renderVariableTooltip?: (variable: string) => React.ReactNode;
|
|
19
|
-
showRemoveButton?: boolean;
|
|
20
|
-
/** 获得焦点时的回调 */
|
|
21
|
-
onFocus?: () => void;
|
|
22
|
-
/** 失去焦点时的回调 */
|
|
23
|
-
onBlur?: () => void;
|
|
24
|
-
}
|
|
25
|
-
export declare const VariableInput: React.FC<VariableInputProps>;
|
|
26
|
-
export { insertVariable } from './utils';
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export type ParagraphElement = {
|
|
2
|
-
type: 'paragraph';
|
|
3
|
-
children: CustomText[];
|
|
4
|
-
};
|
|
5
|
-
export type VariableTagElement = {
|
|
6
|
-
type: 'variable-tag';
|
|
7
|
-
value: string;
|
|
8
|
-
children: CustomText[];
|
|
9
|
-
};
|
|
10
|
-
export type CustomElement = ParagraphElement | VariableTagElement;
|
|
11
|
-
export type CustomText = {
|
|
12
|
-
text: string;
|
|
13
|
-
};
|
|
14
|
-
export type CustomDescendant = CustomElement | CustomText;
|
|
15
|
-
export declare const DEFAULT_CAPTURE_PATTERN: RegExp;
|
|
16
|
-
/**
|
|
17
|
-
* 将字符串解析为 Slate 文档
|
|
18
|
-
* @param text 输入字符串
|
|
19
|
-
* @param pattern 变量捕获正则
|
|
20
|
-
* @returns Slate 文档结构
|
|
21
|
-
*/
|
|
22
|
-
export declare function parseInitValue(text: string, pattern?: RegExp): CustomElement[];
|
|
23
|
-
/**
|
|
24
|
-
* 将 Slate 文档序列化为字符串
|
|
25
|
-
* @param nodes Slate 文档节点
|
|
26
|
-
* @returns 字符串
|
|
27
|
-
*/
|
|
28
|
-
export declare function serializeToString(nodes: CustomElement[]): string;
|
|
29
|
-
/**
|
|
30
|
-
* 在 Slate 编辑器中插入变量标签
|
|
31
|
-
* @param editor Slate 编辑器实例
|
|
32
|
-
* @param variable 变量值(包含 {{}})
|
|
33
|
-
*/
|
|
34
|
-
export declare function insertVariable(editor: any, variable: string): void;
|
|
35
|
-
/**
|
|
36
|
-
* 检查元素是否为变量标签
|
|
37
|
-
*/
|
|
38
|
-
export declare function isVariableTagElement(element: any): element is VariableTagElement;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { VariableInputProps } from '../VariableInput';
|
|
2
|
-
import type * as React from 'react';
|
|
3
|
-
export type VariableTextareaProps = Omit<VariableInputProps, 'multiline'> & {
|
|
4
|
-
rows?: number;
|
|
5
|
-
autoSize?: boolean | {
|
|
6
|
-
minRows?: number;
|
|
7
|
-
maxRows?: number;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export declare const VariableTextarea: React.FC<VariableTextareaProps>;
|