@flowgram.ai/free-layout-core 0.1.0-alpha.10 → 0.1.0-alpha.11
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 +98 -39
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +98 -39
- 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/workflow-drag.d.mts +1 -1
- package/dist/typings/workflow-drag.d.ts +1 -1
- package/dist/typings/workflow-edge.d.mts +1 -0
- package/dist/typings/workflow-edge.d.ts +1 -0
- package/dist/typings/workflow-edge.js.map +1 -1
- package/dist/typings/workflow-json.d.mts +1 -1
- package/dist/typings/workflow-json.d.ts +1 -1
- package/dist/typings/workflow-line.d.mts +1 -1
- package/dist/typings/workflow-line.d.ts +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 +1 -1
- package/dist/typings/workflow-registry.d.ts +1 -1
- package/dist/{workflow-line-entity-CW8YIX-0.d.mts → workflow-line-entity-SJhFU8K_.d.mts} +46 -15
- package/dist/{workflow-line-entity-B2J3fUO1.d.ts → workflow-line-entity-Z4omkx2m.d.ts} +46 -15
- package/package.json +10 -10
package/dist/typings/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { v as LineColor, w as LineColors, L as LineEventProps, m as LinePosition, k as LineRenderType, u as LineType, z as NodesDragEndEvent, N as NodesDragEvent, y as NodesDragStartEvent, A as NodesDraggingEvent, O as OnDragLineEnd, s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, q as WorkflowJSON, l as WorkflowLineRenderContribution, x as WorkflowLineRenderContributionFactory, e as WorkflowNodeJSON, t as WorkflowNodeMeta, B as onDragLineEndParams } from '../workflow-line-entity-
|
|
1
|
+
export { v as LineColor, w as LineColors, L as LineEventProps, m as LinePosition, k as LineRenderType, u as LineType, z as NodesDragEndEvent, N as NodesDragEvent, y as NodesDragStartEvent, A as NodesDraggingEvent, O as OnDragLineEnd, s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, q as WorkflowJSON, l as WorkflowLineRenderContribution, x as WorkflowLineRenderContributionFactory, e as WorkflowNodeJSON, t as WorkflowNodeMeta, B as onDragLineEndParams } from '../workflow-line-entity-SJhFU8K_.mjs';
|
|
2
2
|
export { WorkflowEdgeJSON } from './workflow-edge.mjs';
|
|
3
3
|
export { WorkflowNodeFormMeta, WorkflowNodeRegistry, WorkflowNodeRenderProps } from './workflow-registry.mjs';
|
|
4
4
|
export { a as WorkflowSubCanvas } from '../workflow-sub-canvas-IQzlYvPD.mjs';
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { v as LineColor, w as LineColors, L as LineEventProps, m as LinePosition, k as LineRenderType, u as LineType, z as NodesDragEndEvent, N as NodesDragEvent, y as NodesDragStartEvent, A as NodesDraggingEvent, O as OnDragLineEnd, s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, q as WorkflowJSON, l as WorkflowLineRenderContribution, x as WorkflowLineRenderContributionFactory, e as WorkflowNodeJSON, t as WorkflowNodeMeta, B as onDragLineEndParams } from '../workflow-line-entity-
|
|
1
|
+
export { v as LineColor, w as LineColors, L as LineEventProps, m as LinePosition, k as LineRenderType, u as LineType, z as NodesDragEndEvent, N as NodesDragEvent, y as NodesDragStartEvent, A as NodesDraggingEvent, O as OnDragLineEnd, s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, q as WorkflowJSON, l as WorkflowLineRenderContribution, x as WorkflowLineRenderContributionFactory, e as WorkflowNodeJSON, t as WorkflowNodeMeta, B as onDragLineEndParams } from '../workflow-line-entity-Z4omkx2m.js';
|
|
2
2
|
export { WorkflowEdgeJSON } from './workflow-edge.js';
|
|
3
3
|
export { WorkflowNodeFormMeta, WorkflowNodeRegistry, WorkflowNodeRenderProps } from './workflow-registry.js';
|
|
4
4
|
export { a as WorkflowSubCanvas } from '../workflow-sub-canvas-IQzlYvPD.js';
|
|
@@ -2,7 +2,7 @@ import 'react';
|
|
|
2
2
|
import '@flowgram.ai/utils';
|
|
3
3
|
import '@flowgram.ai/document';
|
|
4
4
|
import '@flowgram.ai/core';
|
|
5
|
-
export { L as LineEventProps, z as NodesDragEndEvent, N as NodesDragEvent, y as NodesDragStartEvent, A as NodesDraggingEvent, O as OnDragLineEnd, B as onDragLineEndParams } from '../workflow-line-entity-
|
|
5
|
+
export { L as LineEventProps, z as NodesDragEndEvent, N as NodesDragEvent, y as NodesDragStartEvent, A as NodesDraggingEvent, O as OnDragLineEnd, B as onDragLineEndParams } from '../workflow-line-entity-SJhFU8K_.mjs';
|
|
6
6
|
import '../workflow-sub-canvas-IQzlYvPD.mjs';
|
|
7
7
|
import '@flowgram.ai/form-core';
|
|
8
8
|
import './workflow-edge.mjs';
|
|
@@ -2,7 +2,7 @@ import 'react';
|
|
|
2
2
|
import '@flowgram.ai/utils';
|
|
3
3
|
import '@flowgram.ai/document';
|
|
4
4
|
import '@flowgram.ai/core';
|
|
5
|
-
export { L as LineEventProps, z as NodesDragEndEvent, N as NodesDragEvent, y as NodesDragStartEvent, A as NodesDraggingEvent, O as OnDragLineEnd, B as onDragLineEndParams } from '../workflow-line-entity-
|
|
5
|
+
export { L as LineEventProps, z as NodesDragEndEvent, N as NodesDragEvent, y as NodesDragStartEvent, A as NodesDraggingEvent, O as OnDragLineEnd, B as onDragLineEndParams } from '../workflow-line-entity-Z4omkx2m.js';
|
|
6
6
|
import '../workflow-sub-canvas-IQzlYvPD.js';
|
|
7
7
|
import '@flowgram.ai/form-core';
|
|
8
8
|
import './workflow-edge.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-edge.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\n/**\n * 边数据\n */\nexport interface WorkflowEdgeJSON {\n sourceNodeID: string;\n targetNodeID: string;\n sourcePortID?: string | number;\n targetPortID?: string | number;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-edge.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\n/**\n * 边数据\n */\nexport interface WorkflowEdgeJSON {\n sourceNodeID: string;\n targetNodeID: string;\n sourcePortID?: string | number;\n targetPortID?: string | number;\n data?: any;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../workflow-sub-canvas-IQzlYvPD.mjs';
|
|
2
|
-
export { s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, q as WorkflowJSON } from '../workflow-line-entity-
|
|
2
|
+
export { s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, q as WorkflowJSON } from '../workflow-line-entity-SJhFU8K_.mjs';
|
|
3
3
|
import './workflow-edge.mjs';
|
|
4
4
|
import '@flowgram.ai/document';
|
|
5
5
|
import '@flowgram.ai/utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../workflow-sub-canvas-IQzlYvPD.js';
|
|
2
|
-
export { s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, q as WorkflowJSON } from '../workflow-line-entity-
|
|
2
|
+
export { s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, q as WorkflowJSON } from '../workflow-line-entity-Z4omkx2m.js';
|
|
3
3
|
import './workflow-edge.js';
|
|
4
4
|
import '@flowgram.ai/document';
|
|
5
5
|
import '@flowgram.ai/utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
|
-
export { v as LineColor, w as LineColors, m as LinePosition, k as LineRenderType, u as LineType, l as WorkflowLineRenderContribution, x as WorkflowLineRenderContributionFactory } from '../workflow-line-entity-
|
|
2
|
+
export { v as LineColor, w as LineColors, m as LinePosition, k as LineRenderType, u as LineType, l as WorkflowLineRenderContribution, x as WorkflowLineRenderContributionFactory } from '../workflow-line-entity-SJhFU8K_.mjs';
|
|
3
3
|
import '@flowgram.ai/core';
|
|
4
4
|
import '@flowgram.ai/document';
|
|
5
5
|
import '../workflow-sub-canvas-IQzlYvPD.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
|
-
export { v as LineColor, w as LineColors, m as LinePosition, k as LineRenderType, u as LineType, l as WorkflowLineRenderContribution, x as WorkflowLineRenderContributionFactory } from '../workflow-line-entity-
|
|
2
|
+
export { v as LineColor, w as LineColors, m as LinePosition, k as LineRenderType, u as LineType, l as WorkflowLineRenderContribution, x as WorkflowLineRenderContributionFactory } from '../workflow-line-entity-Z4omkx2m.js';
|
|
3
3
|
import '@flowgram.ai/core';
|
|
4
4
|
import '@flowgram.ai/document';
|
|
5
5
|
import '../workflow-sub-canvas-IQzlYvPD.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
2
|
import '@flowgram.ai/document';
|
|
3
3
|
import '../workflow-sub-canvas-IQzlYvPD.mjs';
|
|
4
|
-
export { e as WorkflowNodeJSON, t as WorkflowNodeMeta } from '../workflow-line-entity-
|
|
4
|
+
export { e as WorkflowNodeJSON, t as WorkflowNodeMeta } from '../workflow-line-entity-SJhFU8K_.mjs';
|
|
5
5
|
import './workflow-edge.mjs';
|
|
6
6
|
import '@flowgram.ai/core';
|
|
7
7
|
import '@flowgram.ai/form-core';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
2
|
import '@flowgram.ai/document';
|
|
3
3
|
import '../workflow-sub-canvas-IQzlYvPD.js';
|
|
4
|
-
export { e as WorkflowNodeJSON, t as WorkflowNodeMeta } from '../workflow-line-entity-
|
|
4
|
+
export { e as WorkflowNodeJSON, t as WorkflowNodeMeta } from '../workflow-line-entity-Z4omkx2m.js';
|
|
5
5
|
import './workflow-edge.js';
|
|
6
6
|
import '@flowgram.ai/core';
|
|
7
7
|
import '@flowgram.ai/form-core';
|
|
@@ -2,7 +2,7 @@ import { FormMeta } from '@flowgram.ai/node';
|
|
|
2
2
|
import { FormMetaOrFormMetaGenerator } from '@flowgram.ai/form-core';
|
|
3
3
|
import { FlowNodeRegistry } from '@flowgram.ai/document';
|
|
4
4
|
import { W as WorkflowNodeEntity } from '../workflow-sub-canvas-IQzlYvPD.mjs';
|
|
5
|
-
import { t as WorkflowNodeMeta } from '../workflow-line-entity-
|
|
5
|
+
import { t as WorkflowNodeMeta } from '../workflow-line-entity-SJhFU8K_.mjs';
|
|
6
6
|
import '@flowgram.ai/utils';
|
|
7
7
|
import '@flowgram.ai/core';
|
|
8
8
|
import './workflow-edge.mjs';
|
|
@@ -2,7 +2,7 @@ import { FormMeta } from '@flowgram.ai/node';
|
|
|
2
2
|
import { FormMetaOrFormMetaGenerator } from '@flowgram.ai/form-core';
|
|
3
3
|
import { FlowNodeRegistry } from '@flowgram.ai/document';
|
|
4
4
|
import { W as WorkflowNodeEntity } from '../workflow-sub-canvas-IQzlYvPD.js';
|
|
5
|
-
import { t as WorkflowNodeMeta } from '../workflow-line-entity-
|
|
5
|
+
import { t as WorkflowNodeMeta } from '../workflow-line-entity-Z4omkx2m.js';
|
|
6
6
|
import '@flowgram.ai/utils';
|
|
7
7
|
import '@flowgram.ai/core';
|
|
8
8
|
import './workflow-edge.js';
|
|
@@ -105,7 +105,7 @@ interface WorkflowContentChangeEvent {
|
|
|
105
105
|
*/
|
|
106
106
|
|
|
107
107
|
declare enum LineType {
|
|
108
|
-
BEZIER = 0
|
|
108
|
+
BEZIER = 0,// 贝塞尔曲线
|
|
109
109
|
LINE_CHART = 1
|
|
110
110
|
}
|
|
111
111
|
type LineRenderType = LineType | string;
|
|
@@ -123,9 +123,9 @@ interface LineColor {
|
|
|
123
123
|
flowing: string;
|
|
124
124
|
}
|
|
125
125
|
declare enum LineColors {
|
|
126
|
-
HIDDEN = "var(--g-workflow-line-color-hidden,transparent)"
|
|
126
|
+
HIDDEN = "var(--g-workflow-line-color-hidden,transparent)",// 隐藏线条
|
|
127
127
|
DEFUALT = "var(--g-workflow-line-color-default,#4d53e8)",
|
|
128
|
-
DRAWING = "var(--g-workflow-line-color-drawing, #5DD6E3)",
|
|
128
|
+
DRAWING = "var(--g-workflow-line-color-drawing, #5DD6E3)",// '#b5bbf8', // '#9197F1',
|
|
129
129
|
HOVER = "var(--g-workflow-line-color-hover,#37d0ff)",
|
|
130
130
|
SELECTED = "var(--g-workflow-line-color-selected,#37d0ff)",
|
|
131
131
|
ERROR = "var(--g-workflow-line-color-error,red)",
|
|
@@ -468,7 +468,7 @@ declare class WorkflowDocument extends FlowDocument {
|
|
|
468
468
|
/**
|
|
469
469
|
* 判断端口是否为错误态
|
|
470
470
|
*/
|
|
471
|
-
isErrorPort(port: WorkflowPortEntity): boolean;
|
|
471
|
+
isErrorPort(port: WorkflowPortEntity, defaultValue?: boolean): boolean;
|
|
472
472
|
/**
|
|
473
473
|
* 导出数据
|
|
474
474
|
*/
|
|
@@ -538,12 +538,12 @@ declare class WorkflowLinesManager {
|
|
|
538
538
|
isDrawing: boolean;
|
|
539
539
|
dispose(): void;
|
|
540
540
|
get disposed(): boolean;
|
|
541
|
-
isErrorLine(fromPort: WorkflowPortEntity, toPort?: WorkflowPortEntity): boolean;
|
|
542
|
-
isReverseLine(line: WorkflowLineEntity): boolean;
|
|
543
|
-
isHideArrowLine(line: WorkflowLineEntity): boolean;
|
|
544
|
-
isFlowingLine(line: WorkflowLineEntity): boolean;
|
|
545
|
-
isDisabledLine(line: WorkflowLineEntity): boolean;
|
|
546
|
-
isVerticalLine(line: WorkflowLineEntity): boolean;
|
|
541
|
+
isErrorLine(fromPort: WorkflowPortEntity, toPort?: WorkflowPortEntity, defaultValue?: boolean): boolean;
|
|
542
|
+
isReverseLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
543
|
+
isHideArrowLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
544
|
+
isFlowingLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
545
|
+
isDisabledLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
546
|
+
isVerticalLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
547
547
|
setLineRenderType(line: WorkflowLineEntity): LineRenderType | undefined;
|
|
548
548
|
setLineClassName(line: WorkflowLineEntity): string | undefined;
|
|
549
549
|
getLineColor(line: WorkflowLineEntity): string | undefined;
|
|
@@ -680,7 +680,16 @@ interface WorkflowLineEntityOpts extends EntityOpts, WorkflowLinePortInfo {
|
|
|
680
680
|
interface WorkflowLineInfo extends WorkflowLinePortInfo {
|
|
681
681
|
drawingTo?: IPoint;
|
|
682
682
|
isDefaultLine?: boolean;
|
|
683
|
-
|
|
683
|
+
}
|
|
684
|
+
interface WorkflowLineUIState {
|
|
685
|
+
hasError: boolean;
|
|
686
|
+
flowing: boolean;
|
|
687
|
+
disabled: boolean;
|
|
688
|
+
vertical: boolean;
|
|
689
|
+
reverse: boolean;
|
|
690
|
+
hideArrow: boolean;
|
|
691
|
+
highlightColor: string;
|
|
692
|
+
lockedColor: string;
|
|
684
693
|
}
|
|
685
694
|
/**
|
|
686
695
|
* 线条
|
|
@@ -696,8 +705,26 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
696
705
|
readonly linesManager: WorkflowLinesManager;
|
|
697
706
|
private _from;
|
|
698
707
|
private _to?;
|
|
699
|
-
private
|
|
700
|
-
private
|
|
708
|
+
private _lineData;
|
|
709
|
+
private _uiState;
|
|
710
|
+
/**
|
|
711
|
+
* 线条的 UI 状态
|
|
712
|
+
*/
|
|
713
|
+
get uiState(): WorkflowLineUIState;
|
|
714
|
+
/**
|
|
715
|
+
* 更新线条的 ui 状态
|
|
716
|
+
* @param newState
|
|
717
|
+
*/
|
|
718
|
+
updateUIState(newState: Partial<WorkflowLineUIState>): void;
|
|
719
|
+
/**
|
|
720
|
+
* 线条的扩展数据
|
|
721
|
+
*/
|
|
722
|
+
get lineData(): any;
|
|
723
|
+
/**
|
|
724
|
+
* 更新线条扩展数据
|
|
725
|
+
* @param data
|
|
726
|
+
*/
|
|
727
|
+
set lineData(data: any);
|
|
701
728
|
stackIndex: number;
|
|
702
729
|
/**
|
|
703
730
|
* 线条数据
|
|
@@ -721,10 +748,12 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
721
748
|
get inContainer(): boolean;
|
|
722
749
|
/**
|
|
723
750
|
* 获取是否 testrun processing
|
|
751
|
+
* @deprecated use `uiState.flowing` instead
|
|
724
752
|
*/
|
|
725
753
|
get processing(): boolean;
|
|
726
754
|
/**
|
|
727
755
|
* 设置 testrun processing 状态
|
|
756
|
+
* @deprecated use `uiState.flowing` instead
|
|
728
757
|
*/
|
|
729
758
|
set processing(status: boolean);
|
|
730
759
|
get hasError(): boolean;
|
|
@@ -742,7 +771,9 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
742
771
|
*/
|
|
743
772
|
get drawingTo(): IPoint | undefined;
|
|
744
773
|
get highlightColor(): string;
|
|
745
|
-
set highlightColor(
|
|
774
|
+
set highlightColor(highlightColor: string);
|
|
775
|
+
get lockedColor(): string;
|
|
776
|
+
set lockedColor(lockedColor: string);
|
|
746
777
|
/**
|
|
747
778
|
* 获取线条的边框位置大小
|
|
748
779
|
*/
|
|
@@ -787,4 +818,4 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
787
818
|
fireRender(): void;
|
|
788
819
|
}
|
|
789
820
|
|
|
790
|
-
export { type NodesDraggingEvent as A, type onDragLineEndParams as B, LINE_HOVER_DISTANCE as C, type WorkflowLinePortInfo as D, type WorkflowLineEntityOpts as E, type WorkflowLineInfo as F,
|
|
821
|
+
export { type NodesDraggingEvent as A, type onDragLineEndParams as B, LINE_HOVER_DISTANCE as C, type WorkflowLinePortInfo as D, type WorkflowLineEntityOpts as E, type WorkflowLineInfo as F, type WorkflowLineUIState as G, PORT_SIZE as H, type WorkflowPortEntityOpts as I, type WorkflowEntityHoverable as J, type HoverPosition as K, type LineEventProps as L, type WorkfloEntityHoverable as M, type NodesDragEvent as N, type OnDragLineEnd as O, POINT_RADIUS as P, WorkflowDocumentProvider as Q, WorkflowDocumentOptionsDefault as R, 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 WorkflowPorts as h, type WorkflowPortType as i, type WorkflowPort as j, type LineRenderType as k, type WorkflowLineRenderContribution as l, type LinePosition as m, getPortEntityId as n, WORKFLOW_LINE_ENTITY as o, domReactToBounds as p, type WorkflowJSON as q, WorkflowContentChangeType as r, type WorkflowContentChangeEvent as s, type WorkflowNodeMeta as t, LineType as u, type LineColor as v, LineColors as w, type WorkflowLineRenderContributionFactory as x, type NodesDragStartEvent as y, type NodesDragEndEvent as z };
|
|
@@ -105,7 +105,7 @@ interface WorkflowContentChangeEvent {
|
|
|
105
105
|
*/
|
|
106
106
|
|
|
107
107
|
declare enum LineType {
|
|
108
|
-
BEZIER = 0
|
|
108
|
+
BEZIER = 0,// 贝塞尔曲线
|
|
109
109
|
LINE_CHART = 1
|
|
110
110
|
}
|
|
111
111
|
type LineRenderType = LineType | string;
|
|
@@ -123,9 +123,9 @@ interface LineColor {
|
|
|
123
123
|
flowing: string;
|
|
124
124
|
}
|
|
125
125
|
declare enum LineColors {
|
|
126
|
-
HIDDEN = "var(--g-workflow-line-color-hidden,transparent)"
|
|
126
|
+
HIDDEN = "var(--g-workflow-line-color-hidden,transparent)",// 隐藏线条
|
|
127
127
|
DEFUALT = "var(--g-workflow-line-color-default,#4d53e8)",
|
|
128
|
-
DRAWING = "var(--g-workflow-line-color-drawing, #5DD6E3)",
|
|
128
|
+
DRAWING = "var(--g-workflow-line-color-drawing, #5DD6E3)",// '#b5bbf8', // '#9197F1',
|
|
129
129
|
HOVER = "var(--g-workflow-line-color-hover,#37d0ff)",
|
|
130
130
|
SELECTED = "var(--g-workflow-line-color-selected,#37d0ff)",
|
|
131
131
|
ERROR = "var(--g-workflow-line-color-error,red)",
|
|
@@ -468,7 +468,7 @@ declare class WorkflowDocument extends FlowDocument {
|
|
|
468
468
|
/**
|
|
469
469
|
* 判断端口是否为错误态
|
|
470
470
|
*/
|
|
471
|
-
isErrorPort(port: WorkflowPortEntity): boolean;
|
|
471
|
+
isErrorPort(port: WorkflowPortEntity, defaultValue?: boolean): boolean;
|
|
472
472
|
/**
|
|
473
473
|
* 导出数据
|
|
474
474
|
*/
|
|
@@ -538,12 +538,12 @@ declare class WorkflowLinesManager {
|
|
|
538
538
|
isDrawing: boolean;
|
|
539
539
|
dispose(): void;
|
|
540
540
|
get disposed(): boolean;
|
|
541
|
-
isErrorLine(fromPort: WorkflowPortEntity, toPort?: WorkflowPortEntity): boolean;
|
|
542
|
-
isReverseLine(line: WorkflowLineEntity): boolean;
|
|
543
|
-
isHideArrowLine(line: WorkflowLineEntity): boolean;
|
|
544
|
-
isFlowingLine(line: WorkflowLineEntity): boolean;
|
|
545
|
-
isDisabledLine(line: WorkflowLineEntity): boolean;
|
|
546
|
-
isVerticalLine(line: WorkflowLineEntity): boolean;
|
|
541
|
+
isErrorLine(fromPort: WorkflowPortEntity, toPort?: WorkflowPortEntity, defaultValue?: boolean): boolean;
|
|
542
|
+
isReverseLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
543
|
+
isHideArrowLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
544
|
+
isFlowingLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
545
|
+
isDisabledLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
546
|
+
isVerticalLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
|
|
547
547
|
setLineRenderType(line: WorkflowLineEntity): LineRenderType | undefined;
|
|
548
548
|
setLineClassName(line: WorkflowLineEntity): string | undefined;
|
|
549
549
|
getLineColor(line: WorkflowLineEntity): string | undefined;
|
|
@@ -680,7 +680,16 @@ interface WorkflowLineEntityOpts extends EntityOpts, WorkflowLinePortInfo {
|
|
|
680
680
|
interface WorkflowLineInfo extends WorkflowLinePortInfo {
|
|
681
681
|
drawingTo?: IPoint;
|
|
682
682
|
isDefaultLine?: boolean;
|
|
683
|
-
|
|
683
|
+
}
|
|
684
|
+
interface WorkflowLineUIState {
|
|
685
|
+
hasError: boolean;
|
|
686
|
+
flowing: boolean;
|
|
687
|
+
disabled: boolean;
|
|
688
|
+
vertical: boolean;
|
|
689
|
+
reverse: boolean;
|
|
690
|
+
hideArrow: boolean;
|
|
691
|
+
highlightColor: string;
|
|
692
|
+
lockedColor: string;
|
|
684
693
|
}
|
|
685
694
|
/**
|
|
686
695
|
* 线条
|
|
@@ -696,8 +705,26 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
696
705
|
readonly linesManager: WorkflowLinesManager;
|
|
697
706
|
private _from;
|
|
698
707
|
private _to?;
|
|
699
|
-
private
|
|
700
|
-
private
|
|
708
|
+
private _lineData;
|
|
709
|
+
private _uiState;
|
|
710
|
+
/**
|
|
711
|
+
* 线条的 UI 状态
|
|
712
|
+
*/
|
|
713
|
+
get uiState(): WorkflowLineUIState;
|
|
714
|
+
/**
|
|
715
|
+
* 更新线条的 ui 状态
|
|
716
|
+
* @param newState
|
|
717
|
+
*/
|
|
718
|
+
updateUIState(newState: Partial<WorkflowLineUIState>): void;
|
|
719
|
+
/**
|
|
720
|
+
* 线条的扩展数据
|
|
721
|
+
*/
|
|
722
|
+
get lineData(): any;
|
|
723
|
+
/**
|
|
724
|
+
* 更新线条扩展数据
|
|
725
|
+
* @param data
|
|
726
|
+
*/
|
|
727
|
+
set lineData(data: any);
|
|
701
728
|
stackIndex: number;
|
|
702
729
|
/**
|
|
703
730
|
* 线条数据
|
|
@@ -721,10 +748,12 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
721
748
|
get inContainer(): boolean;
|
|
722
749
|
/**
|
|
723
750
|
* 获取是否 testrun processing
|
|
751
|
+
* @deprecated use `uiState.flowing` instead
|
|
724
752
|
*/
|
|
725
753
|
get processing(): boolean;
|
|
726
754
|
/**
|
|
727
755
|
* 设置 testrun processing 状态
|
|
756
|
+
* @deprecated use `uiState.flowing` instead
|
|
728
757
|
*/
|
|
729
758
|
set processing(status: boolean);
|
|
730
759
|
get hasError(): boolean;
|
|
@@ -742,7 +771,9 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
742
771
|
*/
|
|
743
772
|
get drawingTo(): IPoint | undefined;
|
|
744
773
|
get highlightColor(): string;
|
|
745
|
-
set highlightColor(
|
|
774
|
+
set highlightColor(highlightColor: string);
|
|
775
|
+
get lockedColor(): string;
|
|
776
|
+
set lockedColor(lockedColor: string);
|
|
746
777
|
/**
|
|
747
778
|
* 获取线条的边框位置大小
|
|
748
779
|
*/
|
|
@@ -787,4 +818,4 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
787
818
|
fireRender(): void;
|
|
788
819
|
}
|
|
789
820
|
|
|
790
|
-
export { type NodesDraggingEvent as A, type onDragLineEndParams as B, LINE_HOVER_DISTANCE as C, type WorkflowLinePortInfo as D, type WorkflowLineEntityOpts as E, type WorkflowLineInfo as F,
|
|
821
|
+
export { type NodesDraggingEvent as A, type onDragLineEndParams as B, LINE_HOVER_DISTANCE as C, type WorkflowLinePortInfo as D, type WorkflowLineEntityOpts as E, type WorkflowLineInfo as F, type WorkflowLineUIState as G, PORT_SIZE as H, type WorkflowPortEntityOpts as I, type WorkflowEntityHoverable as J, type HoverPosition as K, type LineEventProps as L, type WorkfloEntityHoverable as M, type NodesDragEvent as N, type OnDragLineEnd as O, POINT_RADIUS as P, WorkflowDocumentProvider as Q, WorkflowDocumentOptionsDefault as R, 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 WorkflowPorts as h, type WorkflowPortType as i, type WorkflowPort as j, type LineRenderType as k, type WorkflowLineRenderContribution as l, type LinePosition as m, getPortEntityId as n, WORKFLOW_LINE_ENTITY as o, domReactToBounds as p, type WorkflowJSON as q, WorkflowContentChangeType as r, type WorkflowContentChangeEvent as s, type WorkflowNodeMeta as t, LineType as u, type LineColor as v, LineColors as w, type WorkflowLineRenderContributionFactory as x, type NodesDragStartEvent as y, type NodesDragEndEvent as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowgram.ai/free-layout-core",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.11",
|
|
4
4
|
"homepage": "https://flowgram.ai/",
|
|
5
5
|
"repository": "https://github.com/bytedance/flowgram.ai",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"reflect-metadata": "~0.2.2",
|
|
35
35
|
"lodash-es": "^4.17.21",
|
|
36
36
|
"nanoid": "^4.0.2",
|
|
37
|
-
"@flowgram.ai/core": "0.1.0-alpha.
|
|
38
|
-
"@flowgram.ai/
|
|
39
|
-
"@flowgram.ai/
|
|
40
|
-
"@flowgram.ai/
|
|
41
|
-
"@flowgram.ai/reactive": "0.1.0-alpha.
|
|
42
|
-
"@flowgram.ai/
|
|
37
|
+
"@flowgram.ai/core": "0.1.0-alpha.11",
|
|
38
|
+
"@flowgram.ai/form-core": "0.1.0-alpha.11",
|
|
39
|
+
"@flowgram.ai/document": "0.1.0-alpha.11",
|
|
40
|
+
"@flowgram.ai/node": "0.1.0-alpha.11",
|
|
41
|
+
"@flowgram.ai/reactive": "0.1.0-alpha.11",
|
|
42
|
+
"@flowgram.ai/utils": "0.1.0-alpha.11"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@testing-library/react": "^12",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"@vitest/coverage-v8": "^0.32.0",
|
|
52
52
|
"eslint": "^8.54.0",
|
|
53
53
|
"tsup": "^8.0.1",
|
|
54
|
-
"typescript": "^5.
|
|
54
|
+
"typescript": "^5.8.3",
|
|
55
55
|
"vitest": "^0.34.6",
|
|
56
|
-
"@flowgram.ai/
|
|
57
|
-
"@flowgram.ai/
|
|
56
|
+
"@flowgram.ai/ts-config": "0.1.0-alpha.11",
|
|
57
|
+
"@flowgram.ai/eslint-config": "0.1.0-alpha.11"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"react": ">=16.8",
|