@flowgram.ai/free-layout-core 0.2.15 → 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/{chunk-J5FVRRUV.js → chunk-242F2JCI.js} +1 -1
- package/dist/esm/chunk-242F2JCI.js.map +1 -0
- package/dist/esm/{chunk-BJKYSQMI.js → chunk-CTGO4RKX.js} +1 -1
- package/dist/esm/chunk-CTGO4RKX.js.map +1 -0
- package/dist/esm/{chunk-IYUZVBAO.js → chunk-IKQUOAWQ.js} +1 -1
- package/dist/esm/chunk-IKQUOAWQ.js.map +1 -0
- package/dist/esm/{chunk-LJH3TSLZ.js → chunk-O4WKIIW2.js} +1 -1
- package/dist/esm/chunk-O4WKIIW2.js.map +1 -0
- package/dist/esm/index.js +18 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/typings/index.js +4 -4
- package/dist/esm/typings/workflow-json.js +1 -1
- package/dist/esm/typings/workflow-line.js +1 -1
- package/dist/esm/typings/workflow-operation.js +1 -1
- package/dist/index.d.mts +81 -4
- package/dist/index.d.ts +81 -4
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/typings/index.d.mts +7 -2
- package/dist/typings/index.d.ts +7 -2
- package/dist/typings/index.js.map +1 -1
- package/dist/typings/workflow-drag.d.mts +2 -2
- package/dist/typings/workflow-drag.d.ts +2 -2
- package/dist/typings/workflow-drag.js.map +1 -1
- package/dist/typings/workflow-edge.d.mts +4 -0
- package/dist/typings/workflow-edge.d.ts +4 -0
- package/dist/typings/workflow-edge.js.map +1 -1
- package/dist/typings/workflow-json.d.mts +2 -2
- package/dist/typings/workflow-json.d.ts +2 -2
- package/dist/typings/workflow-json.js.map +1 -1
- package/dist/typings/workflow-line.d.mts +2 -2
- package/dist/typings/workflow-line.d.ts +2 -2
- package/dist/typings/workflow-line.js.map +1 -1
- package/dist/typings/workflow-node.d.mts +2 -2
- package/dist/typings/workflow-node.d.ts +2 -2
- package/dist/typings/workflow-node.js.map +1 -1
- package/dist/typings/workflow-operation.d.mts +5 -0
- package/dist/typings/workflow-operation.d.ts +5 -0
- package/dist/typings/workflow-operation.js.map +1 -1
- package/dist/typings/workflow-registry.d.mts +7 -2
- package/dist/typings/workflow-registry.d.ts +7 -2
- package/dist/typings/workflow-registry.js.map +1 -1
- package/dist/typings/workflow-sub-canvas.d.mts +1 -1
- package/dist/typings/workflow-sub-canvas.d.ts +1 -1
- package/dist/typings/workflow-sub-canvas.js.map +1 -1
- package/dist/{workflow-line-entity-B34FWw9W.d.mts → workflow-line-entity-BpFc2Mu3.d.mts} +58 -2
- package/dist/{workflow-line-entity-B4Mfa03B.d.ts → workflow-line-entity-D4-erSyq.d.ts} +58 -2
- package/dist/{workflow-sub-canvas-DOVla1mw.d.mts → workflow-sub-canvas-IQzlYvPD.d.mts} +10 -0
- package/dist/{workflow-sub-canvas-DOVla1mw.d.ts → workflow-sub-canvas-IQzlYvPD.d.ts} +10 -0
- package/package.json +9 -9
- package/dist/esm/chunk-BJKYSQMI.js.map +0 -1
- package/dist/esm/chunk-IYUZVBAO.js.map +0 -1
- package/dist/esm/chunk-J5FVRRUV.js.map +0 -1
- package/dist/esm/chunk-LJH3TSLZ.js.map +0 -1
package/dist/typings/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-BpFc2Mu3.mjs';
|
|
2
2
|
export { WorkflowEdgeJSON } from './workflow-edge.mjs';
|
|
3
3
|
export { WorkflowNodeFormMeta, WorkflowNodeRegistry, WorkflowNodeRenderProps } from './workflow-registry.mjs';
|
|
4
|
-
export { a as WorkflowSubCanvas } from '../workflow-sub-canvas-
|
|
4
|
+
export { a as WorkflowSubCanvas } from '../workflow-sub-canvas-IQzlYvPD.mjs';
|
|
5
5
|
export { NodePostionUpdateEvent, WorkflowOperationBaseService } from './workflow-operation.mjs';
|
|
6
6
|
import '@flowgram.ai/utils';
|
|
7
7
|
import '@flowgram.ai/core';
|
|
@@ -10,6 +10,11 @@ import '@flowgram.ai/form-core';
|
|
|
10
10
|
import 'react';
|
|
11
11
|
import '@flowgram.ai/node';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
15
|
+
* SPDX-License-Identifier: MIT
|
|
16
|
+
*/
|
|
17
|
+
|
|
13
18
|
declare const URLParams: unique symbol;
|
|
14
19
|
interface URLParams {
|
|
15
20
|
[key: string]: string;
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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-D4-erSyq.js';
|
|
2
2
|
export { WorkflowEdgeJSON } from './workflow-edge.js';
|
|
3
3
|
export { WorkflowNodeFormMeta, WorkflowNodeRegistry, WorkflowNodeRenderProps } from './workflow-registry.js';
|
|
4
|
-
export { a as WorkflowSubCanvas } from '../workflow-sub-canvas-
|
|
4
|
+
export { a as WorkflowSubCanvas } from '../workflow-sub-canvas-IQzlYvPD.js';
|
|
5
5
|
export { NodePostionUpdateEvent, WorkflowOperationBaseService } from './workflow-operation.js';
|
|
6
6
|
import '@flowgram.ai/utils';
|
|
7
7
|
import '@flowgram.ai/core';
|
|
@@ -10,6 +10,11 @@ import '@flowgram.ai/form-core';
|
|
|
10
10
|
import 'react';
|
|
11
11
|
import '@flowgram.ai/node';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
15
|
+
* SPDX-License-Identifier: MIT
|
|
16
|
+
*/
|
|
17
|
+
|
|
13
18
|
declare const URLParams: unique symbol;
|
|
14
19
|
interface URLParams {
|
|
15
20
|
[key: string]: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/index.ts","../../src/typings/workflow-json.ts","../../src/typings/workflow-line.ts","../../src/typings/workflow-operation.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/typings/index.ts","../../src/typings/workflow-json.ts","../../src/typings/workflow-line.ts","../../src/typings/workflow-operation.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nexport * from './workflow-json';\nexport * from './workflow-edge';\nexport * from './workflow-node';\nexport * from './workflow-registry';\nexport * from './workflow-line';\nexport * from './workflow-sub-canvas';\nexport * from './workflow-operation';\nexport * from './workflow-drag';\n\nexport const URLParams = Symbol('');\n\nexport interface URLParams {\n [key: string]: string;\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { type WorkflowLineEntity, type WorkflowNodeEntity } from '../entities';\nimport { type WorkflowNodeJSON } from './workflow-node';\nimport { type WorkflowEdgeJSON } from './workflow-edge';\n\nexport interface WorkflowJSON {\n nodes: WorkflowNodeJSON[];\n edges: WorkflowEdgeJSON[];\n}\n\nexport enum WorkflowContentChangeType {\n /**\n * 添加节点\n */\n ADD_NODE = 'ADD_NODE',\n /**\n * 删除节点\n */\n DELETE_NODE = 'DELETE_NODE',\n /**\n * 移动节点\n */\n MOVE_NODE = 'MOVE_NODE',\n /**\n * 节点数据更新 (表单引擎数据 或者 extInfo 数据)\n */\n NODE_DATA_CHANGE = 'NODE_DATA_CHANGE',\n /**\n * 添加线条\n */\n ADD_LINE = 'ADD_LINE',\n /**\n * 删除线条\n */\n DELETE_LINE = 'DELETE_LINE',\n /**\n * 节点Meta信息变更\n */\n META_CHANGE = 'META_CHANGE',\n}\n\nexport interface WorkflowContentChangeEvent {\n type: WorkflowContentChangeType;\n /**\n * 当前触发的元素的json数据,toJSON 需要主动触发\n */\n toJSON: () => any;\n /*\n * 当前的事件的 entity\n */\n entity: WorkflowNodeEntity | WorkflowLineEntity;\n}\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport type { Rectangle, IPoint } from '@flowgram.ai/utils';\n\nimport { type WorkflowLineEntity } from '../entities';\n\nexport enum LineType {\n BEZIER, // 贝塞尔曲线\n LINE_CHART, // 折叠线\n}\n\nexport type LineRenderType = LineType | string;\n\nexport interface LinePosition {\n from: IPoint;\n to: IPoint;\n}\n\nexport interface LineColor {\n hidden: string;\n default: string;\n drawing: string;\n hovered: string;\n selected: string;\n error: string;\n flowing: string;\n}\n\nexport enum LineColors {\n HIDDEN = 'var(--g-workflow-line-color-hidden,transparent)', // 隐藏线条\n DEFUALT = 'var(--g-workflow-line-color-default,#4d53e8)',\n DRAWING = 'var(--g-workflow-line-color-drawing, #5DD6E3)', // '#b5bbf8', // '#9197F1',\n HOVER = 'var(--g-workflow-line-color-hover,#37d0ff)',\n SELECTED = 'var(--g-workflow-line-color-selected,#37d0ff)',\n ERROR = 'var(--g-workflow-line-color-error,red)',\n FLOWING = 'var(--g-workflow-line-color-flowing,#4d53e8)', // 流动线条,默认使用主题色\n}\n\nexport interface WorkflowLineRenderContribution {\n entity: WorkflowLineEntity;\n path: string;\n bounds: Rectangle;\n update: (params: { fromPos: IPoint; toPos: IPoint }) => void;\n calcDistance: (pos: IPoint) => number;\n}\n\nexport type WorkflowLineRenderContributionFactory = (new (\n entity: WorkflowLineEntity\n) => WorkflowLineRenderContribution) & {\n type: LineRenderType;\n};\n","/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { IPoint, Event } from '@flowgram.ai/utils';\nimport {\n FlowNodeEntity,\n FlowNodeEntityOrId,\n FlowOperationBaseService,\n} from '@flowgram.ai/document';\n\nexport interface NodePostionUpdateEvent {\n node: FlowNodeEntity;\n oldPosition: IPoint;\n newPosition: IPoint;\n}\n\nexport interface WorkflowOperationBaseService extends FlowOperationBaseService {\n /**\n * 节点位置更新事件\n */\n readonly onNodePostionUpdate: Event<NodePostionUpdateEvent>;\n /**\n * 更新节点位置\n * @param nodeOrId\n * @param position\n * @returns\n */\n updateNodePosition(nodeOrId: FlowNodeEntityOrId, position: IPoint): void;\n}\n\nexport const WorkflowOperationBaseService = Symbol('WorkflowOperationBaseService');\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACcO,IAAK,4BAAL,kBAAKA,+BAAL;AAIL,EAAAA,2BAAA,cAAW;AAIX,EAAAA,2BAAA,iBAAc;AAId,EAAAA,2BAAA,eAAY;AAIZ,EAAAA,2BAAA,sBAAmB;AAInB,EAAAA,2BAAA,cAAW;AAIX,EAAAA,2BAAA,iBAAc;AAId,EAAAA,2BAAA,iBAAc;AA5BJ,SAAAA;AAAA,GAAA;;;ACLL,IAAK,WAAL,kBAAKC,cAAL;AACL,EAAAA,oBAAA;AACA,EAAAA,oBAAA;AAFU,SAAAA;AAAA,GAAA;AAsBL,IAAK,aAAL,kBAAKC,gBAAL;AACL,EAAAA,YAAA,YAAS;AACT,EAAAA,YAAA,aAAU;AACV,EAAAA,YAAA,aAAU;AACV,EAAAA,YAAA,WAAQ;AACR,EAAAA,YAAA,cAAW;AACX,EAAAA,YAAA,WAAQ;AACR,EAAAA,YAAA,aAAU;AAPA,SAAAA;AAAA,GAAA;;;ACCL,IAAM,+BAA+B,OAAO,8BAA8B;;;AHlB1E,IAAM,YAAY,OAAO,EAAE;","names":["WorkflowContentChangeType","LineType","LineColors"]}
|
|
@@ -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-
|
|
6
|
-
import '../workflow-sub-canvas-
|
|
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-BpFc2Mu3.mjs';
|
|
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-
|
|
6
|
-
import '../workflow-sub-canvas-
|
|
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-D4-erSyq.js';
|
|
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-drag.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-drag.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport type React from 'react';\n\nimport { type PositionSchema } from '@flowgram.ai/utils';\nimport { type FlowNodeEntity } from '@flowgram.ai/document';\nimport { PlaygroundDrag, type PlaygroundDragEvent } from '@flowgram.ai/core';\n\nimport { type WorkflowLineEntity, type WorkflowPortEntity } from '../entities';\n\nexport interface LineEventProps {\n type: 'onDrag' | 'onDragEnd';\n onDragNodeId?: string;\n event?: MouseEvent;\n}\n\ninterface INodesDragEvent {\n type: string;\n nodes: FlowNodeEntity[];\n startPositions: PositionSchema[];\n dragEvent: PlaygroundDragEvent;\n triggerEvent: MouseEvent | React.MouseEvent;\n dragger: PlaygroundDrag;\n}\n\nexport interface NodesDragStartEvent extends INodesDragEvent {\n type: 'onDragStart';\n}\n\nexport interface NodesDragEndEvent extends INodesDragEvent {\n type: 'onDragEnd';\n}\n\nexport interface NodesDraggingEvent extends INodesDragEvent {\n type: 'onDragging';\n positions: PositionSchema[];\n}\n\nexport type NodesDragEvent = NodesDragStartEvent | NodesDraggingEvent | NodesDragEndEvent;\n\nexport type onDragLineEndParams = {\n fromPort: WorkflowPortEntity;\n toPort?: WorkflowPortEntity;\n mousePos: PositionSchema;\n line?: WorkflowLineEntity;\n originLine?: WorkflowLineEntity;\n event: PlaygroundDragEvent;\n};\n\nexport type OnDragLineEnd = (params: onDragLineEndParams) => Promise<void>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-edge.ts"],"sourcesContent":["/**\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}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '../workflow-sub-canvas-
|
|
2
|
-
export { s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, q as WorkflowJSON } from '../workflow-line-entity-
|
|
1
|
+
import '../workflow-sub-canvas-IQzlYvPD.mjs';
|
|
2
|
+
export { s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, q as WorkflowJSON } from '../workflow-line-entity-BpFc2Mu3.mjs';
|
|
3
3
|
import './workflow-edge.mjs';
|
|
4
4
|
import '@flowgram.ai/document';
|
|
5
5
|
import '@flowgram.ai/utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import '../workflow-sub-canvas-
|
|
2
|
-
export { s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, q as WorkflowJSON } from '../workflow-line-entity-
|
|
1
|
+
import '../workflow-sub-canvas-IQzlYvPD.js';
|
|
2
|
+
export { s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, q as WorkflowJSON } from '../workflow-line-entity-D4-erSyq.js';
|
|
3
3
|
import './workflow-edge.js';
|
|
4
4
|
import '@flowgram.ai/document';
|
|
5
5
|
import '@flowgram.ai/utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-json.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-json.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { type WorkflowLineEntity, type WorkflowNodeEntity } from '../entities';\nimport { type WorkflowNodeJSON } from './workflow-node';\nimport { type WorkflowEdgeJSON } from './workflow-edge';\n\nexport interface WorkflowJSON {\n nodes: WorkflowNodeJSON[];\n edges: WorkflowEdgeJSON[];\n}\n\nexport enum WorkflowContentChangeType {\n /**\n * 添加节点\n */\n ADD_NODE = 'ADD_NODE',\n /**\n * 删除节点\n */\n DELETE_NODE = 'DELETE_NODE',\n /**\n * 移动节点\n */\n MOVE_NODE = 'MOVE_NODE',\n /**\n * 节点数据更新 (表单引擎数据 或者 extInfo 数据)\n */\n NODE_DATA_CHANGE = 'NODE_DATA_CHANGE',\n /**\n * 添加线条\n */\n ADD_LINE = 'ADD_LINE',\n /**\n * 删除线条\n */\n DELETE_LINE = 'DELETE_LINE',\n /**\n * 节点Meta信息变更\n */\n META_CHANGE = 'META_CHANGE',\n}\n\nexport interface WorkflowContentChangeEvent {\n type: WorkflowContentChangeType;\n /**\n * 当前触发的元素的json数据,toJSON 需要主动触发\n */\n toJSON: () => any;\n /*\n * 当前的事件的 entity\n */\n entity: WorkflowNodeEntity | WorkflowLineEntity;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAcO,IAAK,4BAAL,kBAAKA,+BAAL;AAIL,EAAAA,2BAAA,cAAW;AAIX,EAAAA,2BAAA,iBAAc;AAId,EAAAA,2BAAA,eAAY;AAIZ,EAAAA,2BAAA,sBAAmB;AAInB,EAAAA,2BAAA,cAAW;AAIX,EAAAA,2BAAA,iBAAc;AAId,EAAAA,2BAAA,iBAAc;AA5BJ,SAAAA;AAAA,GAAA;","names":["WorkflowContentChangeType"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
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-BpFc2Mu3.mjs';
|
|
3
3
|
import '@flowgram.ai/core';
|
|
4
4
|
import '@flowgram.ai/document';
|
|
5
|
-
import '../workflow-sub-canvas-
|
|
5
|
+
import '../workflow-sub-canvas-IQzlYvPD.mjs';
|
|
6
6
|
import '@flowgram.ai/form-core';
|
|
7
7
|
import './workflow-edge.mjs';
|
|
8
8
|
import 'react';
|
|
@@ -1,8 +1,8 @@
|
|
|
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-D4-erSyq.js';
|
|
3
3
|
import '@flowgram.ai/core';
|
|
4
4
|
import '@flowgram.ai/document';
|
|
5
|
-
import '../workflow-sub-canvas-
|
|
5
|
+
import '../workflow-sub-canvas-IQzlYvPD.js';
|
|
6
6
|
import '@flowgram.ai/form-core';
|
|
7
7
|
import './workflow-edge.js';
|
|
8
8
|
import 'react';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-line.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-line.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport type { Rectangle, IPoint } from '@flowgram.ai/utils';\n\nimport { type WorkflowLineEntity } from '../entities';\n\nexport enum LineType {\n BEZIER, // 贝塞尔曲线\n LINE_CHART, // 折叠线\n}\n\nexport type LineRenderType = LineType | string;\n\nexport interface LinePosition {\n from: IPoint;\n to: IPoint;\n}\n\nexport interface LineColor {\n hidden: string;\n default: string;\n drawing: string;\n hovered: string;\n selected: string;\n error: string;\n flowing: string;\n}\n\nexport enum LineColors {\n HIDDEN = 'var(--g-workflow-line-color-hidden,transparent)', // 隐藏线条\n DEFUALT = 'var(--g-workflow-line-color-default,#4d53e8)',\n DRAWING = 'var(--g-workflow-line-color-drawing, #5DD6E3)', // '#b5bbf8', // '#9197F1',\n HOVER = 'var(--g-workflow-line-color-hover,#37d0ff)',\n SELECTED = 'var(--g-workflow-line-color-selected,#37d0ff)',\n ERROR = 'var(--g-workflow-line-color-error,red)',\n FLOWING = 'var(--g-workflow-line-color-flowing,#4d53e8)', // 流动线条,默认使用主题色\n}\n\nexport interface WorkflowLineRenderContribution {\n entity: WorkflowLineEntity;\n path: string;\n bounds: Rectangle;\n update: (params: { fromPos: IPoint; toPos: IPoint }) => void;\n calcDistance: (pos: IPoint) => number;\n}\n\nexport type WorkflowLineRenderContributionFactory = (new (\n entity: WorkflowLineEntity\n) => WorkflowLineRenderContribution) & {\n type: LineRenderType;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASO,IAAK,WAAL,kBAAKA,cAAL;AACL,EAAAA,oBAAA;AACA,EAAAA,oBAAA;AAFU,SAAAA;AAAA,GAAA;AAsBL,IAAK,aAAL,kBAAKC,gBAAL;AACL,EAAAA,YAAA,YAAS;AACT,EAAAA,YAAA,aAAU;AACV,EAAAA,YAAA,aAAU;AACV,EAAAA,YAAA,WAAQ;AACR,EAAAA,YAAA,cAAW;AACX,EAAAA,YAAA,WAAQ;AACR,EAAAA,YAAA,aAAU;AAPA,SAAAA;AAAA,GAAA;","names":["LineType","LineColors"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
2
|
import '@flowgram.ai/document';
|
|
3
|
-
import '../workflow-sub-canvas-
|
|
4
|
-
export { e as WorkflowNodeJSON, t as WorkflowNodeMeta } from '../workflow-line-entity-
|
|
3
|
+
import '../workflow-sub-canvas-IQzlYvPD.mjs';
|
|
4
|
+
export { e as WorkflowNodeJSON, t as WorkflowNodeMeta } from '../workflow-line-entity-BpFc2Mu3.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
|
-
import '../workflow-sub-canvas-
|
|
4
|
-
export { e as WorkflowNodeJSON, t as WorkflowNodeMeta } from '../workflow-line-entity-
|
|
3
|
+
import '../workflow-sub-canvas-IQzlYvPD.js';
|
|
4
|
+
export { e as WorkflowNodeJSON, t as WorkflowNodeMeta } from '../workflow-line-entity-D4-erSyq.js';
|
|
5
5
|
import './workflow-edge.js';
|
|
6
6
|
import '@flowgram.ai/core';
|
|
7
7
|
import '@flowgram.ai/form-core';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-node.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-node.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport type { IPoint } from '@flowgram.ai/utils';\nimport type { FlowNodeJSON, FlowNodeMeta } from '@flowgram.ai/document';\n\nimport type { WorkflowNodeEntity, WorkflowPorts } from '../entities';\nimport type { WorkflowSubCanvas } from './workflow-sub-canvas';\nimport type { WorkflowEdgeJSON } from './workflow-edge';\n\n/**\n * 节点 meta 信息\n */\nexport interface WorkflowNodeMeta extends FlowNodeMeta {\n position?: IPoint;\n canvasPosition?: IPoint; // 子画布位置\n deleteDisable?: boolean; // 是否禁用删除\n copyDisable?: boolean; // 禁用复制\n inputDisable?: boolean; // 禁用输入点\n outputDisable?: boolean; // 禁用输出点\n defaultPorts?: WorkflowPorts; // 默认点位\n useDynamicPort?: boolean; // 使用动态点位,会计算 data-port-key\n subCanvas?: (node: WorkflowNodeEntity) => WorkflowSubCanvas | undefined;\n isContainer?: boolean; // 是否容器节点\n}\n\n/**\n * 节点数据\n */\nexport interface WorkflowNodeJSON extends FlowNodeJSON {\n id: string;\n type: string | number;\n /**\n * ui 数据\n */\n meta?: WorkflowNodeMeta;\n /**\n * 表单数据\n */\n\n data?: any;\n /**\n * 子节点\n */\n blocks?: WorkflowNodeJSON[];\n /**\n * 子节点间连线\n */\n edges?: WorkflowEdgeJSON[];\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { IPoint, Event } from '@flowgram.ai/utils';
|
|
2
2
|
import { FlowNodeEntity, FlowOperationBaseService, FlowNodeEntityOrId } from '@flowgram.ai/document';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
6
|
+
* SPDX-License-Identifier: MIT
|
|
7
|
+
*/
|
|
8
|
+
|
|
4
9
|
interface NodePostionUpdateEvent {
|
|
5
10
|
node: FlowNodeEntity;
|
|
6
11
|
oldPosition: IPoint;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { IPoint, Event } from '@flowgram.ai/utils';
|
|
2
2
|
import { FlowNodeEntity, FlowOperationBaseService, FlowNodeEntityOrId } from '@flowgram.ai/document';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
6
|
+
* SPDX-License-Identifier: MIT
|
|
7
|
+
*/
|
|
8
|
+
|
|
4
9
|
interface NodePostionUpdateEvent {
|
|
5
10
|
node: FlowNodeEntity;
|
|
6
11
|
oldPosition: IPoint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-operation.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-operation.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport { IPoint, Event } from '@flowgram.ai/utils';\nimport {\n FlowNodeEntity,\n FlowNodeEntityOrId,\n FlowOperationBaseService,\n} from '@flowgram.ai/document';\n\nexport interface NodePostionUpdateEvent {\n node: FlowNodeEntity;\n oldPosition: IPoint;\n newPosition: IPoint;\n}\n\nexport interface WorkflowOperationBaseService extends FlowOperationBaseService {\n /**\n * 节点位置更新事件\n */\n readonly onNodePostionUpdate: Event<NodePostionUpdateEvent>;\n /**\n * 更新节点位置\n * @param nodeOrId\n * @param position\n * @returns\n */\n updateNodePosition(nodeOrId: FlowNodeEntityOrId, position: IPoint): void;\n}\n\nexport const WorkflowOperationBaseService = Symbol('WorkflowOperationBaseService');\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgCO,IAAM,+BAA+B,OAAO,8BAA8B;","names":[]}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { FormMeta } from '@flowgram.ai/node';
|
|
2
2
|
import { FormMetaOrFormMetaGenerator } from '@flowgram.ai/form-core';
|
|
3
3
|
import { FlowNodeRegistry } from '@flowgram.ai/document';
|
|
4
|
-
import { W as WorkflowNodeEntity } from '../workflow-sub-canvas-
|
|
5
|
-
import { t as WorkflowNodeMeta } from '../workflow-line-entity-
|
|
4
|
+
import { W as WorkflowNodeEntity } from '../workflow-sub-canvas-IQzlYvPD.mjs';
|
|
5
|
+
import { t as WorkflowNodeMeta } from '../workflow-line-entity-BpFc2Mu3.mjs';
|
|
6
6
|
import '@flowgram.ai/utils';
|
|
7
7
|
import '@flowgram.ai/core';
|
|
8
8
|
import './workflow-edge.mjs';
|
|
9
9
|
import 'react';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
13
|
+
* SPDX-License-Identifier: MIT
|
|
14
|
+
*/
|
|
15
|
+
|
|
11
16
|
/**
|
|
12
17
|
* 节点表单引擎配置
|
|
13
18
|
*/
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import { FormMeta } from '@flowgram.ai/node';
|
|
2
2
|
import { FormMetaOrFormMetaGenerator } from '@flowgram.ai/form-core';
|
|
3
3
|
import { FlowNodeRegistry } from '@flowgram.ai/document';
|
|
4
|
-
import { W as WorkflowNodeEntity } from '../workflow-sub-canvas-
|
|
5
|
-
import { t as WorkflowNodeMeta } from '../workflow-line-entity-
|
|
4
|
+
import { W as WorkflowNodeEntity } from '../workflow-sub-canvas-IQzlYvPD.js';
|
|
5
|
+
import { t as WorkflowNodeMeta } from '../workflow-line-entity-D4-erSyq.js';
|
|
6
6
|
import '@flowgram.ai/utils';
|
|
7
7
|
import '@flowgram.ai/core';
|
|
8
8
|
import './workflow-edge.js';
|
|
9
9
|
import 'react';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
13
|
+
* SPDX-License-Identifier: MIT
|
|
14
|
+
*/
|
|
15
|
+
|
|
11
16
|
/**
|
|
12
17
|
* 节点表单引擎配置
|
|
13
18
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-registry.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-registry.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport type { FormMeta } from '@flowgram.ai/node';\nimport type { FormMetaOrFormMetaGenerator } from '@flowgram.ai/form-core';\nimport type { FlowNodeRegistry } from '@flowgram.ai/document';\n\nimport type { WorkflowNodeEntity } from '../entities';\nimport type { WorkflowNodeMeta } from './workflow-node';\n\n/**\n * 节点表单引擎配置\n */\nexport type WorkflowNodeFormMeta = FormMetaOrFormMetaGenerator | FormMeta;\n\n/**\n * 节点注册\n */\nexport interface WorkflowNodeRegistry extends FlowNodeRegistry<WorkflowNodeMeta> {\n formMeta?: WorkflowNodeFormMeta;\n}\n\nexport interface WorkflowNodeRenderProps {\n node: WorkflowNodeEntity;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as WorkflowSubCanvas } from '../workflow-sub-canvas-
|
|
1
|
+
export { a as WorkflowSubCanvas } from '../workflow-sub-canvas-IQzlYvPD.mjs';
|
|
2
2
|
import '@flowgram.ai/document';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { a as WorkflowSubCanvas } from '../workflow-sub-canvas-
|
|
1
|
+
export { a as WorkflowSubCanvas } from '../workflow-sub-canvas-IQzlYvPD.js';
|
|
2
2
|
import '@flowgram.ai/document';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-sub-canvas.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-sub-canvas.ts"],"sourcesContent":["/**\n * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates\n * SPDX-License-Identifier: MIT\n */\n\nimport type { WorkflowNodeEntity } from '../entities';\n\n/**\n * 子画布配置\n */\nexport type WorkflowSubCanvas = {\n isCanvas: boolean; // 是否画布节点\n parentNode: WorkflowNodeEntity; // 父节点\n canvasNode: WorkflowNodeEntity; // 画布节点\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import * as _flowgram_ai_utils from '@flowgram.ai/utils';
|
|
2
2
|
import { IPoint, Rectangle, PositionSchema, Emitter, Event, PaddingSchema, SizeSchema, ScrollSchema, DisposableCollection } from '@flowgram.ai/utils';
|
|
3
3
|
import { PlaygroundDragEvent, PlaygroundDrag, EntityManager, SelectionService, Playground, Entity, PlaygroundConfigEntity, PlaygroundContext, EntityOpts } from '@flowgram.ai/core';
|
|
4
|
-
import { FlowNodeMeta, FlowNodeJSON, FlowNodeEntity, FlowDocumentOptions, FlowLayout, FlowDocumentProvider, FlowDocument, AddNodeData } from '@flowgram.ai/document';
|
|
5
|
-
import { W as WorkflowNodeEntity, a as WorkflowSubCanvas } from './workflow-sub-canvas-
|
|
4
|
+
import { FlowNodeMeta, FlowNodeJSON, FlowNodeEntity, FlowDocumentOptions, FlowNodeType, FlowLayout, FlowDocumentProvider, FlowDocument, AddNodeData } from '@flowgram.ai/document';
|
|
5
|
+
import { W as WorkflowNodeEntity, a as WorkflowSubCanvas } from './workflow-sub-canvas-IQzlYvPD.mjs';
|
|
6
6
|
import { NodeEngineContext } from '@flowgram.ai/form-core';
|
|
7
7
|
import { WorkflowEdgeJSON } from './typings/workflow-edge.mjs';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
12
|
+
* SPDX-License-Identifier: MIT
|
|
13
|
+
*/
|
|
14
|
+
|
|
10
15
|
/**
|
|
11
16
|
* 节点 meta 信息
|
|
12
17
|
*/
|
|
@@ -46,6 +51,11 @@ interface WorkflowNodeJSON extends FlowNodeJSON {
|
|
|
46
51
|
edges?: WorkflowEdgeJSON[];
|
|
47
52
|
}
|
|
48
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
56
|
+
* SPDX-License-Identifier: MIT
|
|
57
|
+
*/
|
|
58
|
+
|
|
49
59
|
interface WorkflowJSON {
|
|
50
60
|
nodes: WorkflowNodeJSON[];
|
|
51
61
|
edges: WorkflowEdgeJSON[];
|
|
@@ -89,6 +99,11 @@ interface WorkflowContentChangeEvent {
|
|
|
89
99
|
entity: WorkflowNodeEntity | WorkflowLineEntity;
|
|
90
100
|
}
|
|
91
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
104
|
+
* SPDX-License-Identifier: MIT
|
|
105
|
+
*/
|
|
106
|
+
|
|
92
107
|
declare enum LineType {
|
|
93
108
|
BEZIER = 0,
|
|
94
109
|
LINE_CHART = 1
|
|
@@ -130,6 +145,11 @@ type WorkflowLineRenderContributionFactory = (new (entity: WorkflowLineEntity) =
|
|
|
130
145
|
type: LineRenderType;
|
|
131
146
|
};
|
|
132
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
150
|
+
* SPDX-License-Identifier: MIT
|
|
151
|
+
*/
|
|
152
|
+
|
|
133
153
|
interface LineEventProps {
|
|
134
154
|
type: 'onDrag' | 'onDragEnd';
|
|
135
155
|
onDragNodeId?: string;
|
|
@@ -164,6 +184,11 @@ type onDragLineEndParams = {
|
|
|
164
184
|
};
|
|
165
185
|
type OnDragLineEnd = (params: onDragLineEndParams) => Promise<void>;
|
|
166
186
|
|
|
187
|
+
/**
|
|
188
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
189
|
+
* SPDX-License-Identifier: MIT
|
|
190
|
+
*/
|
|
191
|
+
|
|
167
192
|
declare const WorkflowDocumentOptions: unique symbol;
|
|
168
193
|
/**
|
|
169
194
|
* 线条配置
|
|
@@ -210,6 +235,17 @@ interface WorkflowDocumentOptions extends FlowDocumentOptions {
|
|
|
210
235
|
* @param lines - 线条管理器
|
|
211
236
|
*/
|
|
212
237
|
canResetLine?: (fromPort: WorkflowPortEntity, oldToPort: WorkflowPortEntity, newToPort: WorkflowPortEntity, lines: WorkflowLinesManager) => boolean;
|
|
238
|
+
/**
|
|
239
|
+
* 是否允许拖入子画布 (loop or group)
|
|
240
|
+
* Whether to allow dragging into the sub-canvas (loop or group)
|
|
241
|
+
* @param params
|
|
242
|
+
*/
|
|
243
|
+
canDropToNode?: (params: {
|
|
244
|
+
dragNodeType?: FlowNodeType;
|
|
245
|
+
dragNode?: WorkflowNodeEntity;
|
|
246
|
+
dropNode?: WorkflowNodeEntity;
|
|
247
|
+
dropNodeType?: FlowNodeType;
|
|
248
|
+
}) => boolean;
|
|
213
249
|
}
|
|
214
250
|
declare const WorkflowDocumentOptionsDefault: WorkflowDocumentOptions;
|
|
215
251
|
|
|
@@ -262,6 +298,11 @@ declare class WorkflowHoverService {
|
|
|
262
298
|
get hoveredNode(): WorkfloEntityHoverable | undefined;
|
|
263
299
|
}
|
|
264
300
|
|
|
301
|
+
/**
|
|
302
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
303
|
+
* SPDX-License-Identifier: MIT
|
|
304
|
+
*/
|
|
305
|
+
|
|
265
306
|
declare class WorkflowSelectService {
|
|
266
307
|
protected selectionService: SelectionService;
|
|
267
308
|
protected playground: Playground;
|
|
@@ -294,6 +335,11 @@ declare class WorkflowSelectService {
|
|
|
294
335
|
selectNodeAndFocus(node: WorkflowNodeEntity): void;
|
|
295
336
|
}
|
|
296
337
|
|
|
338
|
+
/**
|
|
339
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
340
|
+
* SPDX-License-Identifier: MIT
|
|
341
|
+
*/
|
|
342
|
+
|
|
297
343
|
/**
|
|
298
344
|
* 自由画布布局
|
|
299
345
|
*/
|
|
@@ -521,6 +567,11 @@ declare class WorkflowLinesManager {
|
|
|
521
567
|
private getNodeIndex;
|
|
522
568
|
}
|
|
523
569
|
|
|
570
|
+
/**
|
|
571
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
572
|
+
* SPDX-License-Identifier: MIT
|
|
573
|
+
*/
|
|
574
|
+
|
|
524
575
|
type WorkflowPortType = 'input' | 'output';
|
|
525
576
|
declare const getPortEntityId: (node: WorkflowNodeEntity, portType: WorkflowPortType, portID?: string | number) => string;
|
|
526
577
|
declare const WORKFLOW_LINE_ENTITY = "WorkflowLineEntity";
|
|
@@ -605,6 +656,11 @@ declare class WorkflowPortEntity extends Entity<WorkflowPortEntityOpts> {
|
|
|
605
656
|
dispose(): void;
|
|
606
657
|
}
|
|
607
658
|
|
|
659
|
+
/**
|
|
660
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
661
|
+
* SPDX-License-Identifier: MIT
|
|
662
|
+
*/
|
|
663
|
+
|
|
608
664
|
declare const LINE_HOVER_DISTANCE = 8;
|
|
609
665
|
declare const POINT_RADIUS = 10;
|
|
610
666
|
interface WorkflowLinePortInfo {
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import * as _flowgram_ai_utils from '@flowgram.ai/utils';
|
|
2
2
|
import { IPoint, Rectangle, PositionSchema, Emitter, Event, PaddingSchema, SizeSchema, ScrollSchema, DisposableCollection } from '@flowgram.ai/utils';
|
|
3
3
|
import { PlaygroundDragEvent, PlaygroundDrag, EntityManager, SelectionService, Playground, Entity, PlaygroundConfigEntity, PlaygroundContext, EntityOpts } from '@flowgram.ai/core';
|
|
4
|
-
import { FlowNodeMeta, FlowNodeJSON, FlowNodeEntity, FlowDocumentOptions, FlowLayout, FlowDocumentProvider, FlowDocument, AddNodeData } from '@flowgram.ai/document';
|
|
5
|
-
import { W as WorkflowNodeEntity, a as WorkflowSubCanvas } from './workflow-sub-canvas-
|
|
4
|
+
import { FlowNodeMeta, FlowNodeJSON, FlowNodeEntity, FlowDocumentOptions, FlowNodeType, FlowLayout, FlowDocumentProvider, FlowDocument, AddNodeData } from '@flowgram.ai/document';
|
|
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
8
|
import React from 'react';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
12
|
+
* SPDX-License-Identifier: MIT
|
|
13
|
+
*/
|
|
14
|
+
|
|
10
15
|
/**
|
|
11
16
|
* 节点 meta 信息
|
|
12
17
|
*/
|
|
@@ -46,6 +51,11 @@ interface WorkflowNodeJSON extends FlowNodeJSON {
|
|
|
46
51
|
edges?: WorkflowEdgeJSON[];
|
|
47
52
|
}
|
|
48
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
56
|
+
* SPDX-License-Identifier: MIT
|
|
57
|
+
*/
|
|
58
|
+
|
|
49
59
|
interface WorkflowJSON {
|
|
50
60
|
nodes: WorkflowNodeJSON[];
|
|
51
61
|
edges: WorkflowEdgeJSON[];
|
|
@@ -89,6 +99,11 @@ interface WorkflowContentChangeEvent {
|
|
|
89
99
|
entity: WorkflowNodeEntity | WorkflowLineEntity;
|
|
90
100
|
}
|
|
91
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
104
|
+
* SPDX-License-Identifier: MIT
|
|
105
|
+
*/
|
|
106
|
+
|
|
92
107
|
declare enum LineType {
|
|
93
108
|
BEZIER = 0,
|
|
94
109
|
LINE_CHART = 1
|
|
@@ -130,6 +145,11 @@ type WorkflowLineRenderContributionFactory = (new (entity: WorkflowLineEntity) =
|
|
|
130
145
|
type: LineRenderType;
|
|
131
146
|
};
|
|
132
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
150
|
+
* SPDX-License-Identifier: MIT
|
|
151
|
+
*/
|
|
152
|
+
|
|
133
153
|
interface LineEventProps {
|
|
134
154
|
type: 'onDrag' | 'onDragEnd';
|
|
135
155
|
onDragNodeId?: string;
|
|
@@ -164,6 +184,11 @@ type onDragLineEndParams = {
|
|
|
164
184
|
};
|
|
165
185
|
type OnDragLineEnd = (params: onDragLineEndParams) => Promise<void>;
|
|
166
186
|
|
|
187
|
+
/**
|
|
188
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
189
|
+
* SPDX-License-Identifier: MIT
|
|
190
|
+
*/
|
|
191
|
+
|
|
167
192
|
declare const WorkflowDocumentOptions: unique symbol;
|
|
168
193
|
/**
|
|
169
194
|
* 线条配置
|
|
@@ -210,6 +235,17 @@ interface WorkflowDocumentOptions extends FlowDocumentOptions {
|
|
|
210
235
|
* @param lines - 线条管理器
|
|
211
236
|
*/
|
|
212
237
|
canResetLine?: (fromPort: WorkflowPortEntity, oldToPort: WorkflowPortEntity, newToPort: WorkflowPortEntity, lines: WorkflowLinesManager) => boolean;
|
|
238
|
+
/**
|
|
239
|
+
* 是否允许拖入子画布 (loop or group)
|
|
240
|
+
* Whether to allow dragging into the sub-canvas (loop or group)
|
|
241
|
+
* @param params
|
|
242
|
+
*/
|
|
243
|
+
canDropToNode?: (params: {
|
|
244
|
+
dragNodeType?: FlowNodeType;
|
|
245
|
+
dragNode?: WorkflowNodeEntity;
|
|
246
|
+
dropNode?: WorkflowNodeEntity;
|
|
247
|
+
dropNodeType?: FlowNodeType;
|
|
248
|
+
}) => boolean;
|
|
213
249
|
}
|
|
214
250
|
declare const WorkflowDocumentOptionsDefault: WorkflowDocumentOptions;
|
|
215
251
|
|
|
@@ -262,6 +298,11 @@ declare class WorkflowHoverService {
|
|
|
262
298
|
get hoveredNode(): WorkfloEntityHoverable | undefined;
|
|
263
299
|
}
|
|
264
300
|
|
|
301
|
+
/**
|
|
302
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
303
|
+
* SPDX-License-Identifier: MIT
|
|
304
|
+
*/
|
|
305
|
+
|
|
265
306
|
declare class WorkflowSelectService {
|
|
266
307
|
protected selectionService: SelectionService;
|
|
267
308
|
protected playground: Playground;
|
|
@@ -294,6 +335,11 @@ declare class WorkflowSelectService {
|
|
|
294
335
|
selectNodeAndFocus(node: WorkflowNodeEntity): void;
|
|
295
336
|
}
|
|
296
337
|
|
|
338
|
+
/**
|
|
339
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
340
|
+
* SPDX-License-Identifier: MIT
|
|
341
|
+
*/
|
|
342
|
+
|
|
297
343
|
/**
|
|
298
344
|
* 自由画布布局
|
|
299
345
|
*/
|
|
@@ -521,6 +567,11 @@ declare class WorkflowLinesManager {
|
|
|
521
567
|
private getNodeIndex;
|
|
522
568
|
}
|
|
523
569
|
|
|
570
|
+
/**
|
|
571
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
572
|
+
* SPDX-License-Identifier: MIT
|
|
573
|
+
*/
|
|
574
|
+
|
|
524
575
|
type WorkflowPortType = 'input' | 'output';
|
|
525
576
|
declare const getPortEntityId: (node: WorkflowNodeEntity, portType: WorkflowPortType, portID?: string | number) => string;
|
|
526
577
|
declare const WORKFLOW_LINE_ENTITY = "WorkflowLineEntity";
|
|
@@ -605,6 +656,11 @@ declare class WorkflowPortEntity extends Entity<WorkflowPortEntityOpts> {
|
|
|
605
656
|
dispose(): void;
|
|
606
657
|
}
|
|
607
658
|
|
|
659
|
+
/**
|
|
660
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
661
|
+
* SPDX-License-Identifier: MIT
|
|
662
|
+
*/
|
|
663
|
+
|
|
608
664
|
declare const LINE_HOVER_DISTANCE = 8;
|
|
609
665
|
declare const POINT_RADIUS = 10;
|
|
610
666
|
interface WorkflowLinePortInfo {
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { FlowNodeEntity } from '@flowgram.ai/document';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/
|
|
7
|
+
|
|
3
8
|
type WorkflowNodeEntity = FlowNodeEntity;
|
|
4
9
|
declare const WorkflowNodeEntity: typeof FlowNodeEntity;
|
|
5
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
13
|
+
* SPDX-License-Identifier: MIT
|
|
14
|
+
*/
|
|
15
|
+
|
|
6
16
|
/**
|
|
7
17
|
* 子画布配置
|
|
8
18
|
*/
|