@flowgram.ai/document 0.2.16 → 0.2.17
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/esm/index.js.map +1 -1
- package/dist/index.d.mts +78 -0
- package/dist/index.d.ts +78 -0
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -57,6 +57,11 @@ declare namespace FlowVirtualTree {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
62
|
+
* SPDX-License-Identifier: MIT
|
|
63
|
+
*/
|
|
64
|
+
|
|
60
65
|
/**
|
|
61
66
|
* Render Tree 会只读模式,不具备操作 tree 结构元素
|
|
62
67
|
*/
|
|
@@ -106,6 +111,11 @@ declare class FlowRenderTree<T extends FlowNodeEntity> extends FlowVirtualTree<T
|
|
|
106
111
|
removeParent(): void;
|
|
107
112
|
}
|
|
108
113
|
|
|
114
|
+
/**
|
|
115
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
116
|
+
* SPDX-License-Identifier: MIT
|
|
117
|
+
*/
|
|
118
|
+
|
|
109
119
|
declare const FlowDocumentOptions: unique symbol;
|
|
110
120
|
/**
|
|
111
121
|
* 流程画布配置
|
|
@@ -171,6 +181,11 @@ declare const ConstantKeys: {
|
|
|
171
181
|
HOVER_AREA_WIDTH: string;
|
|
172
182
|
};
|
|
173
183
|
|
|
184
|
+
/**
|
|
185
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
186
|
+
* SPDX-License-Identifier: MIT
|
|
187
|
+
*/
|
|
188
|
+
|
|
174
189
|
declare const FlowDocumentContribution: unique symbol;
|
|
175
190
|
interface FlowDocumentContribution<T extends FlowDocument = FlowDocument> {
|
|
176
191
|
/**
|
|
@@ -185,6 +200,10 @@ interface FlowDocumentContribution<T extends FlowDocument = FlowDocument> {
|
|
|
185
200
|
loadDocument?(document: T): Promise<void>;
|
|
186
201
|
}
|
|
187
202
|
|
|
203
|
+
/**
|
|
204
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
205
|
+
* SPDX-License-Identifier: MIT
|
|
206
|
+
*/
|
|
188
207
|
declare const FlowDocumentConfigDefaultData: unique symbol;
|
|
189
208
|
/**
|
|
190
209
|
* 用于文档扩展配置
|
|
@@ -593,6 +612,11 @@ declare class FlowNodeTransitionData extends EntityData<FlowNodeTransitionSchema
|
|
|
593
612
|
get isNodeEnd(): boolean;
|
|
594
613
|
}
|
|
595
614
|
|
|
615
|
+
/**
|
|
616
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
617
|
+
* SPDX-License-Identifier: MIT
|
|
618
|
+
*/
|
|
619
|
+
|
|
596
620
|
interface FlowNodeEntityConfig extends EntityOpts {
|
|
597
621
|
document: FlowDocument;
|
|
598
622
|
flowNodeType: FlowNodeType;
|
|
@@ -786,6 +810,11 @@ declare class FlowDocumentTransformerEntity extends ConfigEntity<{
|
|
|
786
810
|
refresh(): void;
|
|
787
811
|
}
|
|
788
812
|
|
|
813
|
+
/**
|
|
814
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
815
|
+
* SPDX-License-Identifier: MIT
|
|
816
|
+
*/
|
|
817
|
+
|
|
789
818
|
interface FlowRendererStateEntityConfig extends EntityOpts {
|
|
790
819
|
}
|
|
791
820
|
interface FlowRendererState {
|
|
@@ -816,6 +845,11 @@ declare class FlowRendererStateEntity extends ConfigEntity<FlowRendererState, Fl
|
|
|
816
845
|
onNodeHoveredChange(fn: (hoveredNode: FlowNodeEntity | undefined) => void, debounceTime?: number): Disposable;
|
|
817
846
|
}
|
|
818
847
|
|
|
848
|
+
/**
|
|
849
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
850
|
+
* SPDX-License-Identifier: MIT
|
|
851
|
+
*/
|
|
852
|
+
|
|
819
853
|
declare enum FlowTransitionLineEnum {
|
|
820
854
|
STRAIGHT_LINE = 0,
|
|
821
855
|
DIVERGE_LINE = 1,
|
|
@@ -886,6 +920,11 @@ interface DragNodeProps {
|
|
|
886
920
|
node: FlowNodeEntity;
|
|
887
921
|
}
|
|
888
922
|
|
|
923
|
+
/**
|
|
924
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
925
|
+
* SPDX-License-Identifier: MIT
|
|
926
|
+
*/
|
|
927
|
+
|
|
889
928
|
declare enum FlowLayoutDefault {
|
|
890
929
|
VERTICAL_FIXED_LAYOUT = "vertical-fixed-layout",
|
|
891
930
|
HORIZONTAL_FIXED_LAYOUT = "horizontal-fixed-layout"
|
|
@@ -938,6 +977,11 @@ interface FlowLayout {
|
|
|
938
977
|
getDefaultNodeOrigin(): IPoint;
|
|
939
978
|
}
|
|
940
979
|
|
|
980
|
+
/**
|
|
981
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
982
|
+
* SPDX-License-Identifier: MIT
|
|
983
|
+
*/
|
|
984
|
+
|
|
941
985
|
/**
|
|
942
986
|
* 节点渲染相关配置信息,可扩展
|
|
943
987
|
*/
|
|
@@ -1162,6 +1206,11 @@ declare namespace FlowNodeRegistry {
|
|
|
1162
1206
|
function extend(registry: FlowNodeRegistry, extendRegistries: FlowNodeRegistry[]): FlowNodeRegistry;
|
|
1163
1207
|
}
|
|
1164
1208
|
|
|
1209
|
+
/**
|
|
1210
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
1211
|
+
* SPDX-License-Identifier: MIT
|
|
1212
|
+
*/
|
|
1213
|
+
|
|
1165
1214
|
type FlowNodeType = string | number;
|
|
1166
1215
|
/**
|
|
1167
1216
|
* Flow node json data
|
|
@@ -1211,6 +1260,11 @@ type AddNodeData = FlowNodeJSON & {
|
|
|
1211
1260
|
index?: number;
|
|
1212
1261
|
};
|
|
1213
1262
|
|
|
1263
|
+
/**
|
|
1264
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
1265
|
+
* SPDX-License-Identifier: MIT
|
|
1266
|
+
*/
|
|
1267
|
+
|
|
1214
1268
|
declare enum OperationType {
|
|
1215
1269
|
addFromNode = "addFromNode",
|
|
1216
1270
|
deleteFromNode = "deleteFromNode",
|
|
@@ -1457,10 +1511,19 @@ interface FlowOperationBaseService extends Disposable {
|
|
|
1457
1511
|
}
|
|
1458
1512
|
declare const FlowOperationBaseService: unique symbol;
|
|
1459
1513
|
|
|
1514
|
+
/**
|
|
1515
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
1516
|
+
* SPDX-License-Identifier: MIT
|
|
1517
|
+
*/
|
|
1460
1518
|
interface FlowGroupJSON {
|
|
1461
1519
|
nodeIDs: string[];
|
|
1462
1520
|
}
|
|
1463
1521
|
|
|
1522
|
+
/**
|
|
1523
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
1524
|
+
* SPDX-License-Identifier: MIT
|
|
1525
|
+
*/
|
|
1526
|
+
|
|
1464
1527
|
declare const FlowDocumentContainerModule: ContainerModule;
|
|
1465
1528
|
|
|
1466
1529
|
/**
|
|
@@ -1552,6 +1615,11 @@ declare class FlowOperationBaseServiceImpl implements FlowOperationBaseService {
|
|
|
1552
1615
|
protected doMoveNode(node: FlowNodeEntity, newParent: FlowNodeEntity, index: number): void;
|
|
1553
1616
|
}
|
|
1554
1617
|
|
|
1618
|
+
/**
|
|
1619
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
1620
|
+
* SPDX-License-Identifier: MIT
|
|
1621
|
+
*/
|
|
1622
|
+
|
|
1555
1623
|
/** 分组控制器 */
|
|
1556
1624
|
declare class FlowGroupController {
|
|
1557
1625
|
readonly groupNode: FlowNodeEntity;
|
|
@@ -1577,6 +1645,11 @@ declare class FlowGroupController {
|
|
|
1577
1645
|
static create(groupNode?: FlowNodeEntity): FlowGroupController | undefined;
|
|
1578
1646
|
}
|
|
1579
1647
|
|
|
1648
|
+
/**
|
|
1649
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
1650
|
+
* SPDX-License-Identifier: MIT
|
|
1651
|
+
*/
|
|
1652
|
+
|
|
1580
1653
|
declare class FlowGroupService {
|
|
1581
1654
|
readonly entityManager: EntityManager;
|
|
1582
1655
|
readonly operationService: FlowOperationBaseService;
|
|
@@ -1593,6 +1666,11 @@ declare class FlowGroupService {
|
|
|
1593
1666
|
static validate(nodes: FlowNodeEntity[]): boolean;
|
|
1594
1667
|
}
|
|
1595
1668
|
|
|
1669
|
+
/**
|
|
1670
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
1671
|
+
* SPDX-License-Identifier: MIT
|
|
1672
|
+
*/
|
|
1673
|
+
|
|
1596
1674
|
/**
|
|
1597
1675
|
*
|
|
1598
1676
|
* @param node 节点 entity
|
package/dist/index.d.ts
CHANGED
|
@@ -57,6 +57,11 @@ declare namespace FlowVirtualTree {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
/**
|
|
61
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
62
|
+
* SPDX-License-Identifier: MIT
|
|
63
|
+
*/
|
|
64
|
+
|
|
60
65
|
/**
|
|
61
66
|
* Render Tree 会只读模式,不具备操作 tree 结构元素
|
|
62
67
|
*/
|
|
@@ -106,6 +111,11 @@ declare class FlowRenderTree<T extends FlowNodeEntity> extends FlowVirtualTree<T
|
|
|
106
111
|
removeParent(): void;
|
|
107
112
|
}
|
|
108
113
|
|
|
114
|
+
/**
|
|
115
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
116
|
+
* SPDX-License-Identifier: MIT
|
|
117
|
+
*/
|
|
118
|
+
|
|
109
119
|
declare const FlowDocumentOptions: unique symbol;
|
|
110
120
|
/**
|
|
111
121
|
* 流程画布配置
|
|
@@ -171,6 +181,11 @@ declare const ConstantKeys: {
|
|
|
171
181
|
HOVER_AREA_WIDTH: string;
|
|
172
182
|
};
|
|
173
183
|
|
|
184
|
+
/**
|
|
185
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
186
|
+
* SPDX-License-Identifier: MIT
|
|
187
|
+
*/
|
|
188
|
+
|
|
174
189
|
declare const FlowDocumentContribution: unique symbol;
|
|
175
190
|
interface FlowDocumentContribution<T extends FlowDocument = FlowDocument> {
|
|
176
191
|
/**
|
|
@@ -185,6 +200,10 @@ interface FlowDocumentContribution<T extends FlowDocument = FlowDocument> {
|
|
|
185
200
|
loadDocument?(document: T): Promise<void>;
|
|
186
201
|
}
|
|
187
202
|
|
|
203
|
+
/**
|
|
204
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
205
|
+
* SPDX-License-Identifier: MIT
|
|
206
|
+
*/
|
|
188
207
|
declare const FlowDocumentConfigDefaultData: unique symbol;
|
|
189
208
|
/**
|
|
190
209
|
* 用于文档扩展配置
|
|
@@ -593,6 +612,11 @@ declare class FlowNodeTransitionData extends EntityData<FlowNodeTransitionSchema
|
|
|
593
612
|
get isNodeEnd(): boolean;
|
|
594
613
|
}
|
|
595
614
|
|
|
615
|
+
/**
|
|
616
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
617
|
+
* SPDX-License-Identifier: MIT
|
|
618
|
+
*/
|
|
619
|
+
|
|
596
620
|
interface FlowNodeEntityConfig extends EntityOpts {
|
|
597
621
|
document: FlowDocument;
|
|
598
622
|
flowNodeType: FlowNodeType;
|
|
@@ -786,6 +810,11 @@ declare class FlowDocumentTransformerEntity extends ConfigEntity<{
|
|
|
786
810
|
refresh(): void;
|
|
787
811
|
}
|
|
788
812
|
|
|
813
|
+
/**
|
|
814
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
815
|
+
* SPDX-License-Identifier: MIT
|
|
816
|
+
*/
|
|
817
|
+
|
|
789
818
|
interface FlowRendererStateEntityConfig extends EntityOpts {
|
|
790
819
|
}
|
|
791
820
|
interface FlowRendererState {
|
|
@@ -816,6 +845,11 @@ declare class FlowRendererStateEntity extends ConfigEntity<FlowRendererState, Fl
|
|
|
816
845
|
onNodeHoveredChange(fn: (hoveredNode: FlowNodeEntity | undefined) => void, debounceTime?: number): Disposable;
|
|
817
846
|
}
|
|
818
847
|
|
|
848
|
+
/**
|
|
849
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
850
|
+
* SPDX-License-Identifier: MIT
|
|
851
|
+
*/
|
|
852
|
+
|
|
819
853
|
declare enum FlowTransitionLineEnum {
|
|
820
854
|
STRAIGHT_LINE = 0,
|
|
821
855
|
DIVERGE_LINE = 1,
|
|
@@ -886,6 +920,11 @@ interface DragNodeProps {
|
|
|
886
920
|
node: FlowNodeEntity;
|
|
887
921
|
}
|
|
888
922
|
|
|
923
|
+
/**
|
|
924
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
925
|
+
* SPDX-License-Identifier: MIT
|
|
926
|
+
*/
|
|
927
|
+
|
|
889
928
|
declare enum FlowLayoutDefault {
|
|
890
929
|
VERTICAL_FIXED_LAYOUT = "vertical-fixed-layout",
|
|
891
930
|
HORIZONTAL_FIXED_LAYOUT = "horizontal-fixed-layout"
|
|
@@ -938,6 +977,11 @@ interface FlowLayout {
|
|
|
938
977
|
getDefaultNodeOrigin(): IPoint;
|
|
939
978
|
}
|
|
940
979
|
|
|
980
|
+
/**
|
|
981
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
982
|
+
* SPDX-License-Identifier: MIT
|
|
983
|
+
*/
|
|
984
|
+
|
|
941
985
|
/**
|
|
942
986
|
* 节点渲染相关配置信息,可扩展
|
|
943
987
|
*/
|
|
@@ -1162,6 +1206,11 @@ declare namespace FlowNodeRegistry {
|
|
|
1162
1206
|
function extend(registry: FlowNodeRegistry, extendRegistries: FlowNodeRegistry[]): FlowNodeRegistry;
|
|
1163
1207
|
}
|
|
1164
1208
|
|
|
1209
|
+
/**
|
|
1210
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
1211
|
+
* SPDX-License-Identifier: MIT
|
|
1212
|
+
*/
|
|
1213
|
+
|
|
1165
1214
|
type FlowNodeType = string | number;
|
|
1166
1215
|
/**
|
|
1167
1216
|
* Flow node json data
|
|
@@ -1211,6 +1260,11 @@ type AddNodeData = FlowNodeJSON & {
|
|
|
1211
1260
|
index?: number;
|
|
1212
1261
|
};
|
|
1213
1262
|
|
|
1263
|
+
/**
|
|
1264
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
1265
|
+
* SPDX-License-Identifier: MIT
|
|
1266
|
+
*/
|
|
1267
|
+
|
|
1214
1268
|
declare enum OperationType {
|
|
1215
1269
|
addFromNode = "addFromNode",
|
|
1216
1270
|
deleteFromNode = "deleteFromNode",
|
|
@@ -1457,10 +1511,19 @@ interface FlowOperationBaseService extends Disposable {
|
|
|
1457
1511
|
}
|
|
1458
1512
|
declare const FlowOperationBaseService: unique symbol;
|
|
1459
1513
|
|
|
1514
|
+
/**
|
|
1515
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
1516
|
+
* SPDX-License-Identifier: MIT
|
|
1517
|
+
*/
|
|
1460
1518
|
interface FlowGroupJSON {
|
|
1461
1519
|
nodeIDs: string[];
|
|
1462
1520
|
}
|
|
1463
1521
|
|
|
1522
|
+
/**
|
|
1523
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
1524
|
+
* SPDX-License-Identifier: MIT
|
|
1525
|
+
*/
|
|
1526
|
+
|
|
1464
1527
|
declare const FlowDocumentContainerModule: ContainerModule;
|
|
1465
1528
|
|
|
1466
1529
|
/**
|
|
@@ -1552,6 +1615,11 @@ declare class FlowOperationBaseServiceImpl implements FlowOperationBaseService {
|
|
|
1552
1615
|
protected doMoveNode(node: FlowNodeEntity, newParent: FlowNodeEntity, index: number): void;
|
|
1553
1616
|
}
|
|
1554
1617
|
|
|
1618
|
+
/**
|
|
1619
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
1620
|
+
* SPDX-License-Identifier: MIT
|
|
1621
|
+
*/
|
|
1622
|
+
|
|
1555
1623
|
/** 分组控制器 */
|
|
1556
1624
|
declare class FlowGroupController {
|
|
1557
1625
|
readonly groupNode: FlowNodeEntity;
|
|
@@ -1577,6 +1645,11 @@ declare class FlowGroupController {
|
|
|
1577
1645
|
static create(groupNode?: FlowNodeEntity): FlowGroupController | undefined;
|
|
1578
1646
|
}
|
|
1579
1647
|
|
|
1648
|
+
/**
|
|
1649
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
1650
|
+
* SPDX-License-Identifier: MIT
|
|
1651
|
+
*/
|
|
1652
|
+
|
|
1580
1653
|
declare class FlowGroupService {
|
|
1581
1654
|
readonly entityManager: EntityManager;
|
|
1582
1655
|
readonly operationService: FlowOperationBaseService;
|
|
@@ -1593,6 +1666,11 @@ declare class FlowGroupService {
|
|
|
1593
1666
|
static validate(nodes: FlowNodeEntity[]): boolean;
|
|
1594
1667
|
}
|
|
1595
1668
|
|
|
1669
|
+
/**
|
|
1670
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
1671
|
+
* SPDX-License-Identifier: MIT
|
|
1672
|
+
*/
|
|
1673
|
+
|
|
1596
1674
|
/**
|
|
1597
1675
|
*
|
|
1598
1676
|
* @param node 节点 entity
|