@flowgram.ai/free-layout-core 0.1.0-alpha.12 → 0.1.0-alpha.14
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/{chunk-CTGO4RKX.js → chunk-5BT3ZR4D.js} +2 -1
- package/dist/esm/chunk-5BT3ZR4D.js.map +1 -0
- package/dist/esm/{chunk-242F2JCI.js → chunk-U2XMPOSL.js} +2 -1
- package/dist/esm/{chunk-242F2JCI.js.map → chunk-U2XMPOSL.js.map} +1 -1
- package/dist/esm/index.js +254 -155
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/typings/index.js +2 -2
- package/dist/esm/typings/workflow-json.js +1 -1
- package/dist/esm/typings/workflow-line.js +1 -1
- package/dist/index.d.mts +26 -34
- package/dist/index.d.ts +26 -34
- package/dist/index.js +236 -135
- package/dist/index.js.map +1 -1
- package/dist/typings/index.d.mts +1 -1
- package/dist/typings/index.d.ts +1 -1
- package/dist/typings/index.js +2 -0
- package/dist/typings/index.js.map +1 -1
- package/dist/typings/workflow-drag.d.mts +1 -1
- package/dist/typings/workflow-drag.d.ts +1 -1
- package/dist/typings/workflow-json.d.mts +1 -1
- package/dist/typings/workflow-json.d.ts +1 -1
- package/dist/typings/workflow-json.js +1 -0
- package/dist/typings/workflow-json.js.map +1 -1
- package/dist/typings/workflow-line.d.mts +1 -1
- package/dist/typings/workflow-line.d.ts +1 -1
- package/dist/typings/workflow-line.js +1 -0
- package/dist/typings/workflow-line.js.map +1 -1
- package/dist/typings/workflow-node.d.mts +1 -1
- package/dist/typings/workflow-node.d.ts +1 -1
- package/dist/typings/workflow-registry.d.mts +2 -1
- package/dist/typings/workflow-registry.d.ts +2 -1
- package/dist/typings/workflow-registry.js.map +1 -1
- package/dist/{workflow-line-entity-LhmV98jq.d.ts → workflow-line-entity-BmPrinpL.d.ts} +152 -45
- package/dist/{workflow-line-entity-Iq1OHmuK.d.mts → workflow-line-entity-Dn8glLaW.d.mts} +152 -45
- package/package.json +9 -9
- package/dist/esm/chunk-CTGO4RKX.js.map +0 -1
|
@@ -5,7 +5,7 @@ import { FlowNodeMeta, FlowNodeJSON, FlowNodeEntity, FlowDocumentOptions, FlowNo
|
|
|
5
5
|
import { W as WorkflowNodeEntity, a as WorkflowSubCanvas } from './workflow-sub-canvas-IQzlYvPD.js';
|
|
6
6
|
import { NodeEngineContext } from '@flowgram.ai/form-core';
|
|
7
7
|
import { WorkflowEdgeJSON } from './typings/workflow-edge.js';
|
|
8
|
-
import React from 'react';
|
|
8
|
+
import React$1 from 'react';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
@@ -85,6 +85,10 @@ declare enum WorkflowContentChangeType {
|
|
|
85
85
|
* 删除线条
|
|
86
86
|
*/
|
|
87
87
|
DELETE_LINE = "DELETE_LINE",
|
|
88
|
+
/**
|
|
89
|
+
* 线条数据修改
|
|
90
|
+
*/
|
|
91
|
+
LINE_DATA_CHANGE = "LINE_DATA_CHANGE",
|
|
88
92
|
/**
|
|
89
93
|
* 节点Meta信息变更
|
|
90
94
|
*/
|
|
@@ -96,6 +100,10 @@ interface WorkflowContentChangeEvent {
|
|
|
96
100
|
* 当前触发的元素的json数据,toJSON 需要主动触发
|
|
97
101
|
*/
|
|
98
102
|
toJSON: () => any;
|
|
103
|
+
/**
|
|
104
|
+
* oldValue
|
|
105
|
+
*/
|
|
106
|
+
oldValue?: any;
|
|
99
107
|
entity: WorkflowNodeEntity | WorkflowLineEntity;
|
|
100
108
|
}
|
|
101
109
|
|
|
@@ -106,12 +114,19 @@ interface WorkflowContentChangeEvent {
|
|
|
106
114
|
|
|
107
115
|
declare enum LineType {
|
|
108
116
|
BEZIER = 0,// 贝塞尔曲线
|
|
109
|
-
LINE_CHART = 1
|
|
117
|
+
LINE_CHART = 1,// 折叠线
|
|
118
|
+
STRAIGHT = 2
|
|
110
119
|
}
|
|
111
120
|
type LineRenderType = LineType | string;
|
|
121
|
+
type LinePointLocation = 'left' | 'top' | 'right' | 'bottom';
|
|
122
|
+
interface LinePoint {
|
|
123
|
+
x: number;
|
|
124
|
+
y: number;
|
|
125
|
+
location: LinePointLocation;
|
|
126
|
+
}
|
|
112
127
|
interface LinePosition {
|
|
113
|
-
from:
|
|
114
|
-
to:
|
|
128
|
+
from: LinePoint;
|
|
129
|
+
to: LinePoint;
|
|
115
130
|
}
|
|
116
131
|
interface LineColor {
|
|
117
132
|
hidden: string;
|
|
@@ -131,13 +146,20 @@ declare enum LineColors {
|
|
|
131
146
|
ERROR = "var(--g-workflow-line-color-error,red)",
|
|
132
147
|
FLOWING = "var(--g-workflow-line-color-flowing,#4d53e8)"
|
|
133
148
|
}
|
|
149
|
+
interface LineCenterPoint {
|
|
150
|
+
x: number;
|
|
151
|
+
y: number;
|
|
152
|
+
labelX: number;
|
|
153
|
+
labelY: number;
|
|
154
|
+
}
|
|
134
155
|
interface WorkflowLineRenderContribution {
|
|
135
156
|
entity: WorkflowLineEntity;
|
|
136
157
|
path: string;
|
|
158
|
+
center?: LineCenterPoint;
|
|
137
159
|
bounds: Rectangle;
|
|
138
160
|
update: (params: {
|
|
139
|
-
fromPos:
|
|
140
|
-
toPos:
|
|
161
|
+
fromPos: LinePoint;
|
|
162
|
+
toPos: LinePoint;
|
|
141
163
|
}) => void;
|
|
142
164
|
calcDistance: (pos: IPoint) => number;
|
|
143
165
|
}
|
|
@@ -160,7 +182,7 @@ interface INodesDragEvent {
|
|
|
160
182
|
nodes: FlowNodeEntity[];
|
|
161
183
|
startPositions: PositionSchema[];
|
|
162
184
|
dragEvent: PlaygroundDragEvent;
|
|
163
|
-
triggerEvent: MouseEvent | React.MouseEvent;
|
|
185
|
+
triggerEvent: MouseEvent | React$1.MouseEvent;
|
|
164
186
|
dragger: PlaygroundDrag;
|
|
165
187
|
}
|
|
166
188
|
interface NodesDragStartEvent extends INodesDragEvent {
|
|
@@ -214,8 +236,6 @@ interface WorkflowDocumentOptions extends FlowDocumentOptions {
|
|
|
214
236
|
isFlowingLine?: (line: WorkflowLineEntity) => boolean;
|
|
215
237
|
/** 是否禁用线条 */
|
|
216
238
|
isDisabledLine?: (line: WorkflowLineEntity) => boolean;
|
|
217
|
-
/** 是否竖向线条 */
|
|
218
|
-
isVerticalLine?: (line: WorkflowLineEntity) => boolean;
|
|
219
239
|
/** 拖拽线条结束 */
|
|
220
240
|
onDragLineEnd?: (params: onDragLineEndParams) => Promise<void>;
|
|
221
241
|
/** 获取线条渲染器 */
|
|
@@ -227,7 +247,7 @@ interface WorkflowDocumentOptions extends FlowDocumentOptions {
|
|
|
227
247
|
/** 能否删除节点 */
|
|
228
248
|
canDeleteNode?: (node: WorkflowNodeEntity, silent?: boolean) => boolean;
|
|
229
249
|
/** 能否删除线条 */
|
|
230
|
-
canDeleteLine?: (line: WorkflowLineEntity, newLineInfo?: Required<WorkflowLinePortInfo
|
|
250
|
+
canDeleteLine?: (line: WorkflowLineEntity, newLineInfo?: Required<Omit<WorkflowLinePortInfo, 'data'>>, silent?: boolean) => boolean;
|
|
231
251
|
/**
|
|
232
252
|
* @param fromPort - 开始点
|
|
233
253
|
* @param oldToPort - 旧的连接点
|
|
@@ -404,6 +424,11 @@ declare class WorkflowDocument extends FlowDocument {
|
|
|
404
424
|
nodeEngineContext: NodeEngineContext;
|
|
405
425
|
selectServices: WorkflowSelectService;
|
|
406
426
|
get loading(): boolean;
|
|
427
|
+
/**
|
|
428
|
+
* use `ctx.tools.fitView()` instead
|
|
429
|
+
* @deprecated
|
|
430
|
+
* @param easing
|
|
431
|
+
*/
|
|
407
432
|
fitView(easing?: boolean): Promise<void>;
|
|
408
433
|
init(): void;
|
|
409
434
|
load(): Promise<void>;
|
|
@@ -475,7 +500,10 @@ declare class WorkflowDocument extends FlowDocument {
|
|
|
475
500
|
toJSON(): WorkflowJSON;
|
|
476
501
|
dispose(): void;
|
|
477
502
|
/**
|
|
478
|
-
*
|
|
503
|
+
* 批量添加节点
|
|
504
|
+
* @deprecated use 'batchAddFromJSON' instead
|
|
505
|
+
* @param json
|
|
506
|
+
* @param options
|
|
479
507
|
*/
|
|
480
508
|
renderJSON(json: WorkflowJSON, options?: {
|
|
481
509
|
parent?: WorkflowNodeEntity;
|
|
@@ -484,6 +512,16 @@ declare class WorkflowDocument extends FlowDocument {
|
|
|
484
512
|
nodes: WorkflowNodeEntity[];
|
|
485
513
|
edges: WorkflowLineEntity[];
|
|
486
514
|
};
|
|
515
|
+
/**
|
|
516
|
+
* 批量添加节点
|
|
517
|
+
*/
|
|
518
|
+
batchAddFromJSON(json: WorkflowJSON, options?: {
|
|
519
|
+
parent?: WorkflowNodeEntity;
|
|
520
|
+
isClone?: boolean;
|
|
521
|
+
}): {
|
|
522
|
+
nodes: WorkflowNodeEntity[];
|
|
523
|
+
edges: WorkflowLineEntity[];
|
|
524
|
+
};
|
|
487
525
|
private getNodeSubCanvas;
|
|
488
526
|
private getNodeChildren;
|
|
489
527
|
private toLineJSON;
|
|
@@ -518,11 +556,12 @@ declare class WorkflowLinesManager {
|
|
|
518
556
|
get lineColor(): LineColor;
|
|
519
557
|
switchLineType(newType?: LineRenderType): LineRenderType;
|
|
520
558
|
getAllLines(): WorkflowLineEntity[];
|
|
521
|
-
hasLine(portInfo: WorkflowLinePortInfo): boolean;
|
|
522
|
-
getLine(portInfo: WorkflowLinePortInfo): WorkflowLineEntity | undefined;
|
|
523
|
-
|
|
559
|
+
hasLine(portInfo: Omit<WorkflowLinePortInfo, 'data'>): boolean;
|
|
560
|
+
getLine(portInfo: Omit<WorkflowLinePortInfo, 'data'>): WorkflowLineEntity | undefined;
|
|
561
|
+
getLineById(id: string): WorkflowLineEntity | undefined;
|
|
562
|
+
replaceLine(oldPortInfo: Omit<WorkflowLinePortInfo, 'data'>, newPortInfo: Omit<WorkflowLinePortInfo, 'data'>): WorkflowLineEntity;
|
|
524
563
|
createLine(options: {
|
|
525
|
-
drawingTo?:
|
|
564
|
+
drawingTo?: LinePoint;
|
|
526
565
|
key?: string;
|
|
527
566
|
} & WorkflowLinePortInfo): WorkflowLineEntity | undefined;
|
|
528
567
|
/**
|
|
@@ -543,14 +582,13 @@ declare class WorkflowLinesManager {
|
|
|
543
582
|
isHideArrowLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
544
583
|
isFlowingLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
545
584
|
isDisabledLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
546
|
-
isVerticalLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
547
585
|
setLineRenderType(line: WorkflowLineEntity): LineRenderType | undefined;
|
|
548
586
|
setLineClassName(line: WorkflowLineEntity): string | undefined;
|
|
549
587
|
getLineColor(line: WorkflowLineEntity): string | undefined;
|
|
550
588
|
canAddLine(fromPort: WorkflowPortEntity, toPort: WorkflowPortEntity, silent?: boolean): boolean;
|
|
551
589
|
toJSON(): WorkflowEdgeJSON[];
|
|
552
590
|
getPortById(portId: string): WorkflowPortEntity | undefined;
|
|
553
|
-
canRemove(line: WorkflowLineEntity, newLineInfo?: Required<WorkflowLinePortInfo
|
|
591
|
+
canRemove(line: WorkflowLineEntity, newLineInfo?: Required<Omit<WorkflowLinePortInfo, 'data'>>, silent?: boolean): boolean;
|
|
554
592
|
canReset(fromPort: WorkflowPortEntity, oldToPort: WorkflowPortEntity, newToPort: WorkflowPortEntity): boolean;
|
|
555
593
|
/**
|
|
556
594
|
* 根据鼠标位置找到 port
|
|
@@ -586,6 +624,25 @@ interface WorkflowPort {
|
|
|
586
624
|
* 没有代表 默认连接点,默认 input 类型 为最左边中心,output 类型为最右边中心
|
|
587
625
|
*/
|
|
588
626
|
portID?: string | number;
|
|
627
|
+
/**
|
|
628
|
+
* 输入或者输出点
|
|
629
|
+
*/
|
|
630
|
+
type: WorkflowPortType;
|
|
631
|
+
/**
|
|
632
|
+
* 端口位置
|
|
633
|
+
*/
|
|
634
|
+
location?: LinePointLocation;
|
|
635
|
+
/**
|
|
636
|
+
* 端口热区大小
|
|
637
|
+
*/
|
|
638
|
+
size?: {
|
|
639
|
+
width: number;
|
|
640
|
+
height: number;
|
|
641
|
+
};
|
|
642
|
+
/**
|
|
643
|
+
* 相对于 position 的偏移
|
|
644
|
+
*/
|
|
645
|
+
offset?: IPoint;
|
|
589
646
|
/**
|
|
590
647
|
* 禁用端口
|
|
591
648
|
*/
|
|
@@ -594,10 +651,6 @@ interface WorkflowPort {
|
|
|
594
651
|
* 将点位渲染到该父节点上
|
|
595
652
|
*/
|
|
596
653
|
targetElement?: HTMLElement;
|
|
597
|
-
/**
|
|
598
|
-
* 输入或者输出点
|
|
599
|
-
*/
|
|
600
|
-
type: WorkflowPortType;
|
|
601
654
|
}
|
|
602
655
|
type WorkflowPorts = WorkflowPort[];
|
|
603
656
|
interface WorkflowPortEntityOpts extends EntityOpts, WorkflowPort {
|
|
@@ -612,25 +665,27 @@ interface WorkflowPortEntityOpts extends EntityOpts, WorkflowPort {
|
|
|
612
665
|
declare class WorkflowPortEntity extends Entity<WorkflowPortEntityOpts> {
|
|
613
666
|
static type: string;
|
|
614
667
|
readonly node: WorkflowNodeEntity;
|
|
615
|
-
targetElement?: HTMLElement;
|
|
616
668
|
readonly portID: string | number;
|
|
617
|
-
readonly
|
|
669
|
+
readonly portType: WorkflowPortType;
|
|
670
|
+
private _disabled?;
|
|
618
671
|
private _hasError;
|
|
672
|
+
private _location?;
|
|
673
|
+
private _size?;
|
|
674
|
+
private _offset?;
|
|
619
675
|
protected readonly _onErrorChangedEmitter: Emitter<void>;
|
|
620
676
|
onErrorChanged: _flowgram_ai_utils.Event<void>;
|
|
621
|
-
|
|
622
|
-
* port 类型
|
|
623
|
-
*/
|
|
624
|
-
portType: WorkflowPortType;
|
|
677
|
+
targetElement?: HTMLElement;
|
|
625
678
|
static getPortEntityId(node: WorkflowNodeEntity, portType: WorkflowPortType, portID?: string | number): string;
|
|
679
|
+
get position(): LinePointLocation | undefined;
|
|
626
680
|
constructor(opts: WorkflowPortEntityOpts);
|
|
627
681
|
get hasError(): boolean;
|
|
628
682
|
set hasError(hasError: boolean);
|
|
629
683
|
validate(): void;
|
|
630
684
|
isErrorPort(): boolean;
|
|
631
|
-
get
|
|
685
|
+
get location(): LinePointLocation;
|
|
686
|
+
get point(): LinePoint;
|
|
632
687
|
/**
|
|
633
|
-
*
|
|
688
|
+
* 端口热区
|
|
634
689
|
*/
|
|
635
690
|
get bounds(): Rectangle;
|
|
636
691
|
isHovered(x: number, y: number): boolean;
|
|
@@ -656,14 +711,10 @@ declare class WorkflowPortEntity extends Entity<WorkflowPortEntityOpts> {
|
|
|
656
711
|
* 当前点位上连接的线条(包含 isDrawing === true 的线条)
|
|
657
712
|
*/
|
|
658
713
|
get allLines(): WorkflowLineEntity[];
|
|
714
|
+
update(data: Exclude<WorkflowPort, 'portID' | 'type'>): void;
|
|
659
715
|
dispose(): void;
|
|
660
716
|
}
|
|
661
717
|
|
|
662
|
-
/**
|
|
663
|
-
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
664
|
-
* SPDX-License-Identifier: MIT
|
|
665
|
-
*/
|
|
666
|
-
|
|
667
718
|
declare const LINE_HOVER_DISTANCE = 8;
|
|
668
719
|
declare const POINT_RADIUS = 10;
|
|
669
720
|
interface WorkflowLinePortInfo {
|
|
@@ -671,25 +722,74 @@ interface WorkflowLinePortInfo {
|
|
|
671
722
|
to?: string;
|
|
672
723
|
fromPort?: string | number;
|
|
673
724
|
toPort?: string | number;
|
|
725
|
+
data?: any;
|
|
674
726
|
}
|
|
675
727
|
interface WorkflowLineEntityOpts extends EntityOpts, WorkflowLinePortInfo {
|
|
676
728
|
document: WorkflowDocument;
|
|
677
729
|
linesManager: WorkflowLinesManager;
|
|
678
|
-
drawingTo?:
|
|
730
|
+
drawingTo?: LinePoint;
|
|
679
731
|
}
|
|
680
732
|
interface WorkflowLineInfo extends WorkflowLinePortInfo {
|
|
681
|
-
drawingTo?:
|
|
682
|
-
isDefaultLine?: boolean;
|
|
733
|
+
drawingTo?: LinePoint;
|
|
683
734
|
}
|
|
684
735
|
interface WorkflowLineUIState {
|
|
736
|
+
/**
|
|
737
|
+
* 是否出错
|
|
738
|
+
*/
|
|
685
739
|
hasError: boolean;
|
|
740
|
+
/**
|
|
741
|
+
* 流动
|
|
742
|
+
*/
|
|
686
743
|
flowing: boolean;
|
|
744
|
+
/**
|
|
745
|
+
* 禁用
|
|
746
|
+
*/
|
|
687
747
|
disabled: boolean;
|
|
688
|
-
|
|
748
|
+
/**
|
|
749
|
+
* 箭头反转
|
|
750
|
+
*/
|
|
689
751
|
reverse: boolean;
|
|
752
|
+
/**
|
|
753
|
+
* 隐藏箭头
|
|
754
|
+
*/
|
|
690
755
|
hideArrow: boolean;
|
|
756
|
+
/**
|
|
757
|
+
* 线条宽度
|
|
758
|
+
* @default 2
|
|
759
|
+
*/
|
|
760
|
+
strokeWidth?: number;
|
|
761
|
+
/**
|
|
762
|
+
* 选中后的线条宽度
|
|
763
|
+
* @default 3
|
|
764
|
+
*/
|
|
765
|
+
strokeWidthSelected?: number;
|
|
766
|
+
/**
|
|
767
|
+
* 收缩
|
|
768
|
+
* @default 10
|
|
769
|
+
*/
|
|
770
|
+
shrink: number;
|
|
771
|
+
/**
|
|
772
|
+
* @deprecated use `lockedColor` instead
|
|
773
|
+
*/
|
|
691
774
|
highlightColor: string;
|
|
775
|
+
/**
|
|
776
|
+
* 曲率
|
|
777
|
+
* only for Bezier,
|
|
778
|
+
* @default 0.25
|
|
779
|
+
*/
|
|
780
|
+
curvature: number;
|
|
781
|
+
/**
|
|
782
|
+
* Line locked color
|
|
783
|
+
*/
|
|
692
784
|
lockedColor: string;
|
|
785
|
+
/**
|
|
786
|
+
* React className
|
|
787
|
+
*/
|
|
788
|
+
className?: string;
|
|
789
|
+
/**
|
|
790
|
+
* React style
|
|
791
|
+
*/
|
|
792
|
+
style?: React.CSSProperties;
|
|
693
793
|
}
|
|
694
794
|
/**
|
|
695
795
|
* 线条
|
|
@@ -701,8 +801,13 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
701
801
|
* @param info
|
|
702
802
|
*/
|
|
703
803
|
static portInfoToLineId(info: WorkflowLinePortInfo): string;
|
|
804
|
+
private _onLineDataChangeEmitter;
|
|
704
805
|
readonly document: WorkflowDocument;
|
|
705
806
|
readonly linesManager: WorkflowLinesManager;
|
|
807
|
+
readonly onLineDataChange: _flowgram_ai_utils.Event<{
|
|
808
|
+
oldValue: any;
|
|
809
|
+
newValue: any;
|
|
810
|
+
}>;
|
|
706
811
|
private _from;
|
|
707
812
|
private _to?;
|
|
708
813
|
private _lineData;
|
|
@@ -724,7 +829,7 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
724
829
|
* 更新线条扩展数据
|
|
725
830
|
* @param data
|
|
726
831
|
*/
|
|
727
|
-
set lineData(
|
|
832
|
+
set lineData(newValue: any);
|
|
728
833
|
stackIndex: number;
|
|
729
834
|
/**
|
|
730
835
|
* 线条数据
|
|
@@ -748,12 +853,12 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
748
853
|
get inContainer(): boolean;
|
|
749
854
|
/**
|
|
750
855
|
* 获取是否 testrun processing
|
|
751
|
-
* @deprecated use `
|
|
856
|
+
* @deprecated use `flowing` instead
|
|
752
857
|
*/
|
|
753
858
|
get processing(): boolean;
|
|
754
859
|
/**
|
|
755
860
|
* 设置 testrun processing 状态
|
|
756
|
-
* @deprecated use `
|
|
861
|
+
* @deprecated use `flowing` instead
|
|
757
862
|
*/
|
|
758
863
|
set processing(status: boolean);
|
|
759
864
|
get hasError(): boolean;
|
|
@@ -765,11 +870,11 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
765
870
|
/**
|
|
766
871
|
* 设置线条画线时的目标位置
|
|
767
872
|
*/
|
|
768
|
-
set drawingTo(pos:
|
|
873
|
+
set drawingTo(pos: LinePoint | undefined);
|
|
769
874
|
/**
|
|
770
875
|
* 获取线条正在画线的位置
|
|
771
876
|
*/
|
|
772
|
-
get drawingTo():
|
|
877
|
+
get drawingTo(): LinePoint | undefined;
|
|
773
878
|
get highlightColor(): string;
|
|
774
879
|
set highlightColor(highlightColor: string);
|
|
775
880
|
get lockedColor(): string;
|
|
@@ -778,6 +883,7 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
778
883
|
* 获取线条的边框位置大小
|
|
779
884
|
*/
|
|
780
885
|
get bounds(): Rectangle;
|
|
886
|
+
get center(): LineCenterPoint;
|
|
781
887
|
/**
|
|
782
888
|
* 获取点和线最接近的距离
|
|
783
889
|
*/
|
|
@@ -794,6 +900,7 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
794
900
|
get hideArrow(): boolean;
|
|
795
901
|
/** 是否流动 */
|
|
796
902
|
get flowing(): boolean;
|
|
903
|
+
set flowing(flowing: boolean);
|
|
797
904
|
/** 是否禁用 */
|
|
798
905
|
get disabled(): boolean;
|
|
799
906
|
/** 是否竖向 */
|
|
@@ -801,7 +908,7 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
801
908
|
/** 获取线条渲染器类型 */
|
|
802
909
|
get renderType(): LineRenderType | undefined;
|
|
803
910
|
/** 获取线条样式 */
|
|
804
|
-
get className(): string
|
|
911
|
+
get className(): string;
|
|
805
912
|
get color(): string | undefined;
|
|
806
913
|
/**
|
|
807
914
|
* 初始化线条
|
|
@@ -822,4 +929,4 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
822
929
|
fireRender(): void;
|
|
823
930
|
}
|
|
824
931
|
|
|
825
|
-
export { type
|
|
932
|
+
export { type WorkflowLineRenderContributionFactory as A, type NodesDragStartEvent as B, type NodesDragEndEvent as C, type NodesDraggingEvent as D, type onDragLineEndParams as E, LINE_HOVER_DISTANCE as F, type WorkflowLinePortInfo as G, type WorkflowLineEntityOpts as H, type WorkflowLineInfo as I, type WorkflowLineUIState as J, PORT_SIZE as K, type LineEventProps as L, type WorkflowPortEntityOpts as M, type NodesDragEvent as N, type OnDragLineEnd as O, POINT_RADIUS as P, type WorkflowEntityHoverable as Q, type HoverPosition as R, type WorkfloEntityHoverable as S, WorkflowDocumentProvider as T, WorkflowDocumentOptionsDefault as U, WorkflowHoverService as W, WorkflowDocument as a, WorkflowLinesManager as b, WorkflowSelectService as c, WorkflowDocumentOptions as d, type WorkflowNodeJSON as e, WorkflowPortEntity as f, WorkflowLineEntity as g, type WorkflowJSON as h, type LineCenterPoint as i, type WorkflowPorts as j, type WorkflowPortType as k, type LinePoint as l, type WorkflowPort as m, type LineRenderType as n, type WorkflowLineRenderContribution as o, type LinePosition as p, getPortEntityId as q, WORKFLOW_LINE_ENTITY as r, domReactToBounds as s, WorkflowContentChangeType as t, type WorkflowContentChangeEvent as u, type WorkflowNodeMeta as v, LineType as w, type LinePointLocation as x, type LineColor as y, LineColors as z };
|