@flowgram.ai/document 0.2.26 → 0.2.28
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/index.d.mts +38 -32
- package/dist/index.d.ts +38 -32
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -866,11 +866,11 @@ declare class FlowRendererStateEntity extends ConfigEntity<FlowRendererState, Fl
|
|
|
866
866
|
*/
|
|
867
867
|
|
|
868
868
|
declare enum FlowTransitionLineEnum {
|
|
869
|
-
STRAIGHT_LINE = 0
|
|
870
|
-
DIVERGE_LINE = 1
|
|
871
|
-
MERGE_LINE = 2
|
|
872
|
-
ROUNDED_LINE = 3
|
|
873
|
-
CUSTOM_LINE = 4
|
|
869
|
+
STRAIGHT_LINE = 0,// 直线
|
|
870
|
+
DIVERGE_LINE = 1,// 分支线 (一种 ROUNDED_LINE)
|
|
871
|
+
MERGE_LINE = 2,// 汇聚线 (一种 ROUNDED_LINE)
|
|
872
|
+
ROUNDED_LINE = 3,// 自定义圆角转弯线
|
|
873
|
+
CUSTOM_LINE = 4,// 自定义,用于处理循环节点等自定义线条
|
|
874
874
|
DRAGGING_LINE = 5
|
|
875
875
|
}
|
|
876
876
|
interface Vertex extends IPoint {
|
|
@@ -894,11 +894,11 @@ interface FlowTransitionLine {
|
|
|
894
894
|
lineId?: string;
|
|
895
895
|
}
|
|
896
896
|
declare enum FlowTransitionLabelEnum {
|
|
897
|
-
ADDER_LABEL = 0
|
|
898
|
-
TEXT_LABEL = 1
|
|
899
|
-
COLLAPSE_LABEL = 2
|
|
900
|
-
COLLAPSE_ADDER_LABEL = 3
|
|
901
|
-
CUSTOM_LABEL = 4
|
|
897
|
+
ADDER_LABEL = 0,// 添加按钮
|
|
898
|
+
TEXT_LABEL = 1,// 文本标签
|
|
899
|
+
COLLAPSE_LABEL = 2,// 复合节点收起的展开标签
|
|
900
|
+
COLLAPSE_ADDER_LABEL = 3,// 复合节点收起 + 加号复合标签
|
|
901
|
+
CUSTOM_LABEL = 4,// 自定义,用于处理循环节点等自定义标签
|
|
902
902
|
BRANCH_DRAGGING_LABEL = 5
|
|
903
903
|
}
|
|
904
904
|
interface FlowTransitionLabel {
|
|
@@ -941,7 +941,7 @@ interface DragNodeProps {
|
|
|
941
941
|
*/
|
|
942
942
|
|
|
943
943
|
declare enum FlowLayoutDefault {
|
|
944
|
-
VERTICAL_FIXED_LAYOUT = "vertical-fixed-layout"
|
|
944
|
+
VERTICAL_FIXED_LAYOUT = "vertical-fixed-layout",// 垂直固定布局
|
|
945
945
|
HORIZONTAL_FIXED_LAYOUT = "horizontal-fixed-layout"
|
|
946
946
|
}
|
|
947
947
|
declare namespace FlowLayoutDefault {
|
|
@@ -1066,7 +1066,13 @@ declare const DefaultSpacingKey: {
|
|
|
1066
1066
|
* 默认一些间隔参数
|
|
1067
1067
|
*/
|
|
1068
1068
|
declare const DEFAULT_SPACING: {
|
|
1069
|
-
[
|
|
1069
|
+
[DefaultSpacingKey.NODE_SPACING]: number;
|
|
1070
|
+
[DefaultSpacingKey.BRANCH_SPACING]: number;
|
|
1071
|
+
[DefaultSpacingKey.INLINE_BLOCKS_PADDING_BOTTOM]: number;
|
|
1072
|
+
[DefaultSpacingKey.COLLAPSED_SPACING]: number;
|
|
1073
|
+
[DefaultSpacingKey.ROUNDED_LINE_X_RADIUS]: number;
|
|
1074
|
+
[DefaultSpacingKey.ROUNDED_LINE_Y_RADIUS]: number;
|
|
1075
|
+
[DefaultSpacingKey.HOVER_AREA_WIDTH]: number;
|
|
1070
1076
|
NULL: number;
|
|
1071
1077
|
/**
|
|
1072
1078
|
* @deprecated use 'BRANCH_SPACING' instead
|
|
@@ -1241,29 +1247,29 @@ type FlowDocumentJSON = {
|
|
|
1241
1247
|
nodes: FlowNodeJSON[];
|
|
1242
1248
|
};
|
|
1243
1249
|
declare enum FlowNodeBaseType {
|
|
1244
|
-
START = "start"
|
|
1245
|
-
DEFAULT = "default"
|
|
1246
|
-
ROOT = "root"
|
|
1247
|
-
EMPTY = "empty"
|
|
1248
|
-
INLINE_BLOCKS = "inlineBlocks"
|
|
1249
|
-
BLOCK_ICON = "blockIcon"
|
|
1250
|
-
BLOCK = "block"
|
|
1251
|
-
BLOCK_ORDER_ICON = "blockOrderIcon"
|
|
1252
|
-
GROUP = "group"
|
|
1253
|
-
END = "end"
|
|
1254
|
-
BREAK = "break"
|
|
1255
|
-
CONDITION = "condition"
|
|
1256
|
-
SUB_CANVAS = "subCanvas"
|
|
1257
|
-
MULTI_INPUTS = "multiInputs"
|
|
1258
|
-
MULTI_OUTPUTS = "multiOutputs"
|
|
1259
|
-
INPUT = "input"
|
|
1260
|
-
OUTPUT = "output"
|
|
1261
|
-
SLOT = "slot"
|
|
1250
|
+
START = "start",// 开始节点
|
|
1251
|
+
DEFAULT = "default",// 默认节点类型
|
|
1252
|
+
ROOT = "root",// 根节点
|
|
1253
|
+
EMPTY = "empty",// 空节点,宽和高为 0
|
|
1254
|
+
INLINE_BLOCKS = "inlineBlocks",// 所有块合并为 InlineBlocks
|
|
1255
|
+
BLOCK_ICON = "blockIcon",// 图标节点,如条件分支的头部的 菱形图标
|
|
1256
|
+
BLOCK = "block",// 块节点
|
|
1257
|
+
BLOCK_ORDER_ICON = "blockOrderIcon",// 带顺序的图标节点,一般为 block 第一个分支节点
|
|
1258
|
+
GROUP = "group",// 分组节点
|
|
1259
|
+
END = "end",// 结束节点
|
|
1260
|
+
BREAK = "break",// 分支结束
|
|
1261
|
+
CONDITION = "condition",// 可以连接多条线的条件判断节点,目前只支持横向布局
|
|
1262
|
+
SUB_CANVAS = "subCanvas",// 自由布局子画布
|
|
1263
|
+
MULTI_INPUTS = "multiInputs",// 多输入
|
|
1264
|
+
MULTI_OUTPUTS = "multiOutputs",// 多输出
|
|
1265
|
+
INPUT = "input",// 输入节点
|
|
1266
|
+
OUTPUT = "output",// 输出节点
|
|
1267
|
+
SLOT = "slot",// 插槽节点
|
|
1262
1268
|
SLOT_BLOCK = "slotBlock"
|
|
1263
1269
|
}
|
|
1264
1270
|
declare enum FlowNodeSplitType {
|
|
1265
|
-
SIMPLE_SPLIT = "simpleSplit"
|
|
1266
|
-
DYNAMIC_SPLIT = "dynamicSplit"
|
|
1271
|
+
SIMPLE_SPLIT = "simpleSplit",// 无 BlockOrderIcon
|
|
1272
|
+
DYNAMIC_SPLIT = "dynamicSplit",// 动态分支
|
|
1267
1273
|
STATIC_SPLIT = "staticSplit"
|
|
1268
1274
|
}
|
|
1269
1275
|
declare enum FlowDocumentConfigEnum {
|
package/dist/index.d.ts
CHANGED
|
@@ -866,11 +866,11 @@ declare class FlowRendererStateEntity extends ConfigEntity<FlowRendererState, Fl
|
|
|
866
866
|
*/
|
|
867
867
|
|
|
868
868
|
declare enum FlowTransitionLineEnum {
|
|
869
|
-
STRAIGHT_LINE = 0
|
|
870
|
-
DIVERGE_LINE = 1
|
|
871
|
-
MERGE_LINE = 2
|
|
872
|
-
ROUNDED_LINE = 3
|
|
873
|
-
CUSTOM_LINE = 4
|
|
869
|
+
STRAIGHT_LINE = 0,// 直线
|
|
870
|
+
DIVERGE_LINE = 1,// 分支线 (一种 ROUNDED_LINE)
|
|
871
|
+
MERGE_LINE = 2,// 汇聚线 (一种 ROUNDED_LINE)
|
|
872
|
+
ROUNDED_LINE = 3,// 自定义圆角转弯线
|
|
873
|
+
CUSTOM_LINE = 4,// 自定义,用于处理循环节点等自定义线条
|
|
874
874
|
DRAGGING_LINE = 5
|
|
875
875
|
}
|
|
876
876
|
interface Vertex extends IPoint {
|
|
@@ -894,11 +894,11 @@ interface FlowTransitionLine {
|
|
|
894
894
|
lineId?: string;
|
|
895
895
|
}
|
|
896
896
|
declare enum FlowTransitionLabelEnum {
|
|
897
|
-
ADDER_LABEL = 0
|
|
898
|
-
TEXT_LABEL = 1
|
|
899
|
-
COLLAPSE_LABEL = 2
|
|
900
|
-
COLLAPSE_ADDER_LABEL = 3
|
|
901
|
-
CUSTOM_LABEL = 4
|
|
897
|
+
ADDER_LABEL = 0,// 添加按钮
|
|
898
|
+
TEXT_LABEL = 1,// 文本标签
|
|
899
|
+
COLLAPSE_LABEL = 2,// 复合节点收起的展开标签
|
|
900
|
+
COLLAPSE_ADDER_LABEL = 3,// 复合节点收起 + 加号复合标签
|
|
901
|
+
CUSTOM_LABEL = 4,// 自定义,用于处理循环节点等自定义标签
|
|
902
902
|
BRANCH_DRAGGING_LABEL = 5
|
|
903
903
|
}
|
|
904
904
|
interface FlowTransitionLabel {
|
|
@@ -941,7 +941,7 @@ interface DragNodeProps {
|
|
|
941
941
|
*/
|
|
942
942
|
|
|
943
943
|
declare enum FlowLayoutDefault {
|
|
944
|
-
VERTICAL_FIXED_LAYOUT = "vertical-fixed-layout"
|
|
944
|
+
VERTICAL_FIXED_LAYOUT = "vertical-fixed-layout",// 垂直固定布局
|
|
945
945
|
HORIZONTAL_FIXED_LAYOUT = "horizontal-fixed-layout"
|
|
946
946
|
}
|
|
947
947
|
declare namespace FlowLayoutDefault {
|
|
@@ -1066,7 +1066,13 @@ declare const DefaultSpacingKey: {
|
|
|
1066
1066
|
* 默认一些间隔参数
|
|
1067
1067
|
*/
|
|
1068
1068
|
declare const DEFAULT_SPACING: {
|
|
1069
|
-
[
|
|
1069
|
+
[DefaultSpacingKey.NODE_SPACING]: number;
|
|
1070
|
+
[DefaultSpacingKey.BRANCH_SPACING]: number;
|
|
1071
|
+
[DefaultSpacingKey.INLINE_BLOCKS_PADDING_BOTTOM]: number;
|
|
1072
|
+
[DefaultSpacingKey.COLLAPSED_SPACING]: number;
|
|
1073
|
+
[DefaultSpacingKey.ROUNDED_LINE_X_RADIUS]: number;
|
|
1074
|
+
[DefaultSpacingKey.ROUNDED_LINE_Y_RADIUS]: number;
|
|
1075
|
+
[DefaultSpacingKey.HOVER_AREA_WIDTH]: number;
|
|
1070
1076
|
NULL: number;
|
|
1071
1077
|
/**
|
|
1072
1078
|
* @deprecated use 'BRANCH_SPACING' instead
|
|
@@ -1241,29 +1247,29 @@ type FlowDocumentJSON = {
|
|
|
1241
1247
|
nodes: FlowNodeJSON[];
|
|
1242
1248
|
};
|
|
1243
1249
|
declare enum FlowNodeBaseType {
|
|
1244
|
-
START = "start"
|
|
1245
|
-
DEFAULT = "default"
|
|
1246
|
-
ROOT = "root"
|
|
1247
|
-
EMPTY = "empty"
|
|
1248
|
-
INLINE_BLOCKS = "inlineBlocks"
|
|
1249
|
-
BLOCK_ICON = "blockIcon"
|
|
1250
|
-
BLOCK = "block"
|
|
1251
|
-
BLOCK_ORDER_ICON = "blockOrderIcon"
|
|
1252
|
-
GROUP = "group"
|
|
1253
|
-
END = "end"
|
|
1254
|
-
BREAK = "break"
|
|
1255
|
-
CONDITION = "condition"
|
|
1256
|
-
SUB_CANVAS = "subCanvas"
|
|
1257
|
-
MULTI_INPUTS = "multiInputs"
|
|
1258
|
-
MULTI_OUTPUTS = "multiOutputs"
|
|
1259
|
-
INPUT = "input"
|
|
1260
|
-
OUTPUT = "output"
|
|
1261
|
-
SLOT = "slot"
|
|
1250
|
+
START = "start",// 开始节点
|
|
1251
|
+
DEFAULT = "default",// 默认节点类型
|
|
1252
|
+
ROOT = "root",// 根节点
|
|
1253
|
+
EMPTY = "empty",// 空节点,宽和高为 0
|
|
1254
|
+
INLINE_BLOCKS = "inlineBlocks",// 所有块合并为 InlineBlocks
|
|
1255
|
+
BLOCK_ICON = "blockIcon",// 图标节点,如条件分支的头部的 菱形图标
|
|
1256
|
+
BLOCK = "block",// 块节点
|
|
1257
|
+
BLOCK_ORDER_ICON = "blockOrderIcon",// 带顺序的图标节点,一般为 block 第一个分支节点
|
|
1258
|
+
GROUP = "group",// 分组节点
|
|
1259
|
+
END = "end",// 结束节点
|
|
1260
|
+
BREAK = "break",// 分支结束
|
|
1261
|
+
CONDITION = "condition",// 可以连接多条线的条件判断节点,目前只支持横向布局
|
|
1262
|
+
SUB_CANVAS = "subCanvas",// 自由布局子画布
|
|
1263
|
+
MULTI_INPUTS = "multiInputs",// 多输入
|
|
1264
|
+
MULTI_OUTPUTS = "multiOutputs",// 多输出
|
|
1265
|
+
INPUT = "input",// 输入节点
|
|
1266
|
+
OUTPUT = "output",// 输出节点
|
|
1267
|
+
SLOT = "slot",// 插槽节点
|
|
1262
1268
|
SLOT_BLOCK = "slotBlock"
|
|
1263
1269
|
}
|
|
1264
1270
|
declare enum FlowNodeSplitType {
|
|
1265
|
-
SIMPLE_SPLIT = "simpleSplit"
|
|
1266
|
-
DYNAMIC_SPLIT = "dynamicSplit"
|
|
1271
|
+
SIMPLE_SPLIT = "simpleSplit",// 无 BlockOrderIcon
|
|
1272
|
+
DYNAMIC_SPLIT = "dynamicSplit",// 动态分支
|
|
1267
1273
|
STATIC_SPLIT = "staticSplit"
|
|
1268
1274
|
}
|
|
1269
1275
|
declare enum FlowDocumentConfigEnum {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowgram.ai/document",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.28",
|
|
4
4
|
"description": "automation flow engine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"flow",
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
"lodash": "^4.17.21",
|
|
26
26
|
"nanoid": "^4.0.2",
|
|
27
27
|
"reflect-metadata": "~0.2.2",
|
|
28
|
-
"@flowgram.ai/core": "0.2.
|
|
29
|
-
"@flowgram.ai/utils": "0.2.
|
|
28
|
+
"@flowgram.ai/core": "0.2.28",
|
|
29
|
+
"@flowgram.ai/utils": "0.2.28"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/lodash": "^4.14.137",
|
|
33
33
|
"@vitest/coverage-v8": "^0.32.0",
|
|
34
34
|
"eslint": "^8.54.0",
|
|
35
35
|
"tsup": "^8.0.1",
|
|
36
|
-
"typescript": "^5.
|
|
36
|
+
"typescript": "^5.8.3",
|
|
37
37
|
"vitest": "^0.34.6",
|
|
38
|
-
"@flowgram.ai/eslint-config": "0.2.
|
|
39
|
-
"@flowgram.ai/ts-config": "0.2.
|
|
38
|
+
"@flowgram.ai/eslint-config": "0.2.28",
|
|
39
|
+
"@flowgram.ai/ts-config": "0.2.28"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
|
42
42
|
"access": "public",
|