@flowgram.ai/free-layout-core 0.1.0-alpha.7 → 0.1.0-alpha.9
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-6DKK25L7.js +21 -0
- package/dist/esm/chunk-6DKK25L7.js.map +1 -0
- package/dist/esm/index.js +202 -90
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/typings/index.js +1 -1
- package/dist/esm/typings/workflow-line.js +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +196 -87
- 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 +6 -5
- 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-line.d.mts +1 -1
- package/dist/typings/workflow-line.d.ts +1 -1
- package/dist/typings/workflow-line.js +6 -5
- 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 +1 -1
- package/dist/typings/workflow-registry.d.ts +1 -1
- package/dist/{workflow-line-entity-DgCmDX1d.d.mts → workflow-line-entity-BcD7CpoN.d.mts} +63 -10
- package/dist/{workflow-line-entity-B8wC-OVt.d.ts → workflow-line-entity-CXh_ddVD.d.ts} +63 -10
- package/package.json +11 -11
- package/dist/esm/chunk-PT4ZVDZZ.js +0 -20
- package/dist/esm/chunk-PT4ZVDZZ.js.map +0 -1
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-BcD7CpoN.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-DOVla1mw.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-CXh_ddVD.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-DOVla1mw.js';
|
package/dist/typings/index.js
CHANGED
|
@@ -47,11 +47,12 @@ var LineType = /* @__PURE__ */ ((LineType2) => {
|
|
|
47
47
|
return LineType2;
|
|
48
48
|
})(LineType || {});
|
|
49
49
|
var LineColors = /* @__PURE__ */ ((LineColors2) => {
|
|
50
|
-
LineColors2["HIDDEN"] = "transparent";
|
|
51
|
-
LineColors2["DEFUALT"] = "
|
|
52
|
-
LineColors2["DRAWING"] = "#5DD6E3";
|
|
53
|
-
LineColors2["HOVER"] = "
|
|
54
|
-
LineColors2["
|
|
50
|
+
LineColors2["HIDDEN"] = "var(--g-line-color-hidden,transparent)";
|
|
51
|
+
LineColors2["DEFUALT"] = "var(--g-line-color-default,#4d53e8)";
|
|
52
|
+
LineColors2["DRAWING"] = "var(--g-line-color-drawing, #5DD6E3)";
|
|
53
|
+
LineColors2["HOVER"] = "var(--g-line-color-hover,#37d0ff)";
|
|
54
|
+
LineColors2["SELECTED"] = "var(--g-line-color-selected,#37d0ff)";
|
|
55
|
+
LineColors2["ERROR"] = "var(--g-line-color-error,red)";
|
|
55
56
|
return LineColors2;
|
|
56
57
|
})(LineColors || {});
|
|
57
58
|
|
|
@@ -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":["export * 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","import { 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","import 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}\n\nexport enum LineColors {\n HIDDEN = 'transparent', // 隐藏线条\n DEFUALT = '
|
|
1
|
+
{"version":3,"sources":["../../src/typings/index.ts","../../src/typings/workflow-json.ts","../../src/typings/workflow-line.ts","../../src/typings/workflow-operation.ts"],"sourcesContent":["export * 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","import { 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","import 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}\n\nexport enum LineColors {\n HIDDEN = 'var(--g-line-color-hidden,transparent)', // 隐藏线条\n DEFUALT = 'var(--g-line-color-default,#4d53e8)',\n DRAWING = 'var(--g-line-color-drawing, #5DD6E3)', // '#b5bbf8', // '#9197F1',\n HOVER = 'var(--g-line-color-hover,#37d0ff)',\n SELECTED = 'var(--g-line-color-selected,#37d0ff)',\n ERROR = 'var(--g-line-color-error,red)',\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","import { 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;;;ACSO,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;AAqBL,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;AANE,SAAAA;AAAA,GAAA;;;ACEL,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-
|
|
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-BcD7CpoN.mjs';
|
|
6
6
|
import '../workflow-sub-canvas-DOVla1mw.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-CXh_ddVD.js';
|
|
6
6
|
import '../workflow-sub-canvas-DOVla1mw.js';
|
|
7
7
|
import '@flowgram.ai/form-core';
|
|
8
8
|
import './workflow-edge.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '../workflow-sub-canvas-DOVla1mw.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-BcD7CpoN.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-DOVla1mw.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-CXh_ddVD.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-BcD7CpoN.mjs';
|
|
3
3
|
import '@flowgram.ai/core';
|
|
4
4
|
import '@flowgram.ai/document';
|
|
5
5
|
import '../workflow-sub-canvas-DOVla1mw.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-CXh_ddVD.js';
|
|
3
3
|
import '@flowgram.ai/core';
|
|
4
4
|
import '@flowgram.ai/document';
|
|
5
5
|
import '../workflow-sub-canvas-DOVla1mw.js';
|
|
@@ -30,11 +30,12 @@ var LineType = /* @__PURE__ */ ((LineType2) => {
|
|
|
30
30
|
return LineType2;
|
|
31
31
|
})(LineType || {});
|
|
32
32
|
var LineColors = /* @__PURE__ */ ((LineColors2) => {
|
|
33
|
-
LineColors2["HIDDEN"] = "transparent";
|
|
34
|
-
LineColors2["DEFUALT"] = "
|
|
35
|
-
LineColors2["DRAWING"] = "#5DD6E3";
|
|
36
|
-
LineColors2["HOVER"] = "
|
|
37
|
-
LineColors2["
|
|
33
|
+
LineColors2["HIDDEN"] = "var(--g-line-color-hidden,transparent)";
|
|
34
|
+
LineColors2["DEFUALT"] = "var(--g-line-color-default,#4d53e8)";
|
|
35
|
+
LineColors2["DRAWING"] = "var(--g-line-color-drawing, #5DD6E3)";
|
|
36
|
+
LineColors2["HOVER"] = "var(--g-line-color-hover,#37d0ff)";
|
|
37
|
+
LineColors2["SELECTED"] = "var(--g-line-color-selected,#37d0ff)";
|
|
38
|
+
LineColors2["ERROR"] = "var(--g-line-color-error,red)";
|
|
38
39
|
return LineColors2;
|
|
39
40
|
})(LineColors || {});
|
|
40
41
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-line.ts"],"sourcesContent":["import 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}\n\nexport enum LineColors {\n HIDDEN = 'transparent', // 隐藏线条\n DEFUALT = '
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-line.ts"],"sourcesContent":["import 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}\n\nexport enum LineColors {\n HIDDEN = 'var(--g-line-color-hidden,transparent)', // 隐藏线条\n DEFUALT = 'var(--g-line-color-default,#4d53e8)',\n DRAWING = 'var(--g-line-color-drawing, #5DD6E3)', // '#b5bbf8', // '#9197F1',\n HOVER = 'var(--g-line-color-hover,#37d0ff)',\n SELECTED = 'var(--g-line-color-selected,#37d0ff)',\n ERROR = 'var(--g-line-color-error,red)',\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;AAIO,IAAK,WAAL,kBAAKA,cAAL;AACL,EAAAA,oBAAA;AACA,EAAAA,oBAAA;AAFU,SAAAA;AAAA,GAAA;AAqBL,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;AANE,SAAAA;AAAA,GAAA;","names":["LineType","LineColors"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
2
|
import '@flowgram.ai/document';
|
|
3
3
|
import '../workflow-sub-canvas-DOVla1mw.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-BcD7CpoN.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-DOVla1mw.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-CXh_ddVD.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-DOVla1mw.mjs';
|
|
5
|
-
import { t as WorkflowNodeMeta } from '../workflow-line-entity-
|
|
5
|
+
import { t as WorkflowNodeMeta } from '../workflow-line-entity-BcD7CpoN.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-DOVla1mw.js';
|
|
5
|
-
import { t as WorkflowNodeMeta } from '../workflow-line-entity-
|
|
5
|
+
import { t as WorkflowNodeMeta } from '../workflow-line-entity-CXh_ddVD.js';
|
|
6
6
|
import '@flowgram.ai/utils';
|
|
7
7
|
import '@flowgram.ai/core';
|
|
8
8
|
import './workflow-edge.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _flowgram_ai_utils from '@flowgram.ai/utils';
|
|
2
|
-
import { IPoint, Rectangle, PositionSchema, Emitter, Event, DisposableCollection } from '@flowgram.ai/utils';
|
|
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, FlowDocument } from '@flowgram.ai/document';
|
|
4
|
+
import { FlowNodeMeta, FlowNodeJSON, FlowNodeEntity, FlowDocumentOptions, FlowLayout, FlowDocumentProvider, FlowDocument, AddNodeData } from '@flowgram.ai/document';
|
|
5
5
|
import { W as WorkflowNodeEntity, a as WorkflowSubCanvas } from './workflow-sub-canvas-DOVla1mw.mjs';
|
|
6
6
|
import { NodeEngineContext } from '@flowgram.ai/form-core';
|
|
7
7
|
import { WorkflowEdgeJSON } from './typings/workflow-edge.mjs';
|
|
@@ -107,11 +107,12 @@ interface LineColor {
|
|
|
107
107
|
error: string;
|
|
108
108
|
}
|
|
109
109
|
declare enum LineColors {
|
|
110
|
-
HIDDEN = "transparent",
|
|
111
|
-
DEFUALT = "
|
|
112
|
-
DRAWING = "#5DD6E3",
|
|
113
|
-
HOVER = "
|
|
114
|
-
|
|
110
|
+
HIDDEN = "var(--g-line-color-hidden,transparent)",
|
|
111
|
+
DEFUALT = "var(--g-line-color-default,#4d53e8)",
|
|
112
|
+
DRAWING = "var(--g-line-color-drawing, #5DD6E3)",
|
|
113
|
+
HOVER = "var(--g-line-color-hover,#37d0ff)",
|
|
114
|
+
SELECTED = "var(--g-line-color-selected,#37d0ff)",
|
|
115
|
+
ERROR = "var(--g-line-color-error,red)"
|
|
115
116
|
}
|
|
116
117
|
interface WorkflowLineRenderContribution {
|
|
117
118
|
entity: WorkflowLineEntity;
|
|
@@ -213,7 +214,9 @@ declare const WorkflowDocumentOptionsDefault: WorkflowDocumentOptions;
|
|
|
213
214
|
/**
|
|
214
215
|
* 可 Hover 的节点 类型
|
|
215
216
|
*/
|
|
216
|
-
type
|
|
217
|
+
type WorkflowEntityHoverable = WorkflowNodeEntity | WorkflowLineEntity | WorkflowPortEntity;
|
|
218
|
+
/** @deprecated */
|
|
219
|
+
type WorkfloEntityHoverable = WorkflowEntityHoverable;
|
|
217
220
|
/**
|
|
218
221
|
* hover 状态管理
|
|
219
222
|
*/
|
|
@@ -282,6 +285,50 @@ declare class WorkflowSelectService {
|
|
|
282
285
|
selectNodeAndFocus(node: WorkflowNodeEntity): void;
|
|
283
286
|
}
|
|
284
287
|
|
|
288
|
+
/**
|
|
289
|
+
* 自由画布布局
|
|
290
|
+
*/
|
|
291
|
+
declare class FreeLayout implements FlowLayout {
|
|
292
|
+
name: string;
|
|
293
|
+
playgroundConfig: PlaygroundConfigEntity;
|
|
294
|
+
protected documentProvider: FlowDocumentProvider;
|
|
295
|
+
get document(): FlowDocument;
|
|
296
|
+
/**
|
|
297
|
+
* 更新布局
|
|
298
|
+
*/
|
|
299
|
+
update(): void;
|
|
300
|
+
syncTransform(node: FlowNodeEntity): void;
|
|
301
|
+
/**
|
|
302
|
+
* 更新所有受影响的上下游节点
|
|
303
|
+
*/
|
|
304
|
+
updateAffectedTransform(node: FlowNodeEntity): void;
|
|
305
|
+
/**
|
|
306
|
+
* 获取节点的 padding 数据
|
|
307
|
+
* @param node
|
|
308
|
+
*/
|
|
309
|
+
getPadding(node: FlowNodeEntity): PaddingSchema;
|
|
310
|
+
/**
|
|
311
|
+
* 默认滚动到 fitview 区域
|
|
312
|
+
* @param contentSize
|
|
313
|
+
*/
|
|
314
|
+
getInitScroll(contentSize: SizeSchema): ScrollSchema;
|
|
315
|
+
/**
|
|
316
|
+
* 获取默认输入点
|
|
317
|
+
*/
|
|
318
|
+
getDefaultInputPoint(node: FlowNodeEntity): IPoint;
|
|
319
|
+
/**
|
|
320
|
+
* 获取默认输出点
|
|
321
|
+
*/
|
|
322
|
+
getDefaultOutputPoint(node: FlowNodeEntity): IPoint;
|
|
323
|
+
/**
|
|
324
|
+
* 水平中心点
|
|
325
|
+
*/
|
|
326
|
+
getDefaultNodeOrigin(): IPoint;
|
|
327
|
+
private getAllParents;
|
|
328
|
+
private getAllBlocks;
|
|
329
|
+
private fireChange;
|
|
330
|
+
}
|
|
331
|
+
|
|
285
332
|
declare const WorkflowDocumentProvider: unique symbol;
|
|
286
333
|
type WorkflowDocumentProvider = () => WorkflowDocument;
|
|
287
334
|
declare class WorkflowDocument extends FlowDocument {
|
|
@@ -290,7 +337,6 @@ declare class WorkflowDocument extends FlowDocument {
|
|
|
290
337
|
readonly onContentChange: _flowgram_ai_utils.Event<WorkflowContentChangeEvent>;
|
|
291
338
|
private _onReloadEmitter;
|
|
292
339
|
readonly onReload: _flowgram_ai_utils.Event<WorkflowDocument>;
|
|
293
|
-
private disposed;
|
|
294
340
|
/**
|
|
295
341
|
* 数据加载完成
|
|
296
342
|
*/
|
|
@@ -321,6 +367,13 @@ declare class WorkflowDocument extends FlowDocument {
|
|
|
321
367
|
* @param json
|
|
322
368
|
*/
|
|
323
369
|
createWorkflowNode(json: WorkflowNodeJSON, isClone?: boolean, parentId?: string): WorkflowNodeEntity;
|
|
370
|
+
/**
|
|
371
|
+
* 添加节点,如果节点已经存在则不会重复创建
|
|
372
|
+
* @param data
|
|
373
|
+
* @param addedNodes
|
|
374
|
+
*/
|
|
375
|
+
addNode(data: AddNodeData, addedNodes?: WorkflowNodeEntity[], ignoreCreateAndUpdateEvent?: boolean): WorkflowNodeEntity;
|
|
376
|
+
get layout(): FreeLayout;
|
|
324
377
|
/**
|
|
325
378
|
* 获取默认的 x y 坐标, 默认为当前画布可视区域中心
|
|
326
379
|
* @param type
|
|
@@ -665,4 +718,4 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
665
718
|
fireRender(): void;
|
|
666
719
|
}
|
|
667
720
|
|
|
668
|
-
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, PORT_SIZE as G, type WorkflowPortEntityOpts as H, type
|
|
721
|
+
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, PORT_SIZE as G, type WorkflowPortEntityOpts as H, type WorkflowEntityHoverable as I, type WorkfloEntityHoverable as J, WorkflowDocumentProvider as K, type LineEventProps as L, WorkflowDocumentOptionsDefault as M, type NodesDragEvent as N, type OnDragLineEnd as O, POINT_RADIUS as P, 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 };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _flowgram_ai_utils from '@flowgram.ai/utils';
|
|
2
|
-
import { IPoint, Rectangle, PositionSchema, Emitter, Event, DisposableCollection } from '@flowgram.ai/utils';
|
|
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, FlowDocument } from '@flowgram.ai/document';
|
|
4
|
+
import { FlowNodeMeta, FlowNodeJSON, FlowNodeEntity, FlowDocumentOptions, FlowLayout, FlowDocumentProvider, FlowDocument, AddNodeData } from '@flowgram.ai/document';
|
|
5
5
|
import { W as WorkflowNodeEntity, a as WorkflowSubCanvas } from './workflow-sub-canvas-DOVla1mw.js';
|
|
6
6
|
import { NodeEngineContext } from '@flowgram.ai/form-core';
|
|
7
7
|
import { WorkflowEdgeJSON } from './typings/workflow-edge.js';
|
|
@@ -107,11 +107,12 @@ interface LineColor {
|
|
|
107
107
|
error: string;
|
|
108
108
|
}
|
|
109
109
|
declare enum LineColors {
|
|
110
|
-
HIDDEN = "transparent",
|
|
111
|
-
DEFUALT = "
|
|
112
|
-
DRAWING = "#5DD6E3",
|
|
113
|
-
HOVER = "
|
|
114
|
-
|
|
110
|
+
HIDDEN = "var(--g-line-color-hidden,transparent)",
|
|
111
|
+
DEFUALT = "var(--g-line-color-default,#4d53e8)",
|
|
112
|
+
DRAWING = "var(--g-line-color-drawing, #5DD6E3)",
|
|
113
|
+
HOVER = "var(--g-line-color-hover,#37d0ff)",
|
|
114
|
+
SELECTED = "var(--g-line-color-selected,#37d0ff)",
|
|
115
|
+
ERROR = "var(--g-line-color-error,red)"
|
|
115
116
|
}
|
|
116
117
|
interface WorkflowLineRenderContribution {
|
|
117
118
|
entity: WorkflowLineEntity;
|
|
@@ -213,7 +214,9 @@ declare const WorkflowDocumentOptionsDefault: WorkflowDocumentOptions;
|
|
|
213
214
|
/**
|
|
214
215
|
* 可 Hover 的节点 类型
|
|
215
216
|
*/
|
|
216
|
-
type
|
|
217
|
+
type WorkflowEntityHoverable = WorkflowNodeEntity | WorkflowLineEntity | WorkflowPortEntity;
|
|
218
|
+
/** @deprecated */
|
|
219
|
+
type WorkfloEntityHoverable = WorkflowEntityHoverable;
|
|
217
220
|
/**
|
|
218
221
|
* hover 状态管理
|
|
219
222
|
*/
|
|
@@ -282,6 +285,50 @@ declare class WorkflowSelectService {
|
|
|
282
285
|
selectNodeAndFocus(node: WorkflowNodeEntity): void;
|
|
283
286
|
}
|
|
284
287
|
|
|
288
|
+
/**
|
|
289
|
+
* 自由画布布局
|
|
290
|
+
*/
|
|
291
|
+
declare class FreeLayout implements FlowLayout {
|
|
292
|
+
name: string;
|
|
293
|
+
playgroundConfig: PlaygroundConfigEntity;
|
|
294
|
+
protected documentProvider: FlowDocumentProvider;
|
|
295
|
+
get document(): FlowDocument;
|
|
296
|
+
/**
|
|
297
|
+
* 更新布局
|
|
298
|
+
*/
|
|
299
|
+
update(): void;
|
|
300
|
+
syncTransform(node: FlowNodeEntity): void;
|
|
301
|
+
/**
|
|
302
|
+
* 更新所有受影响的上下游节点
|
|
303
|
+
*/
|
|
304
|
+
updateAffectedTransform(node: FlowNodeEntity): void;
|
|
305
|
+
/**
|
|
306
|
+
* 获取节点的 padding 数据
|
|
307
|
+
* @param node
|
|
308
|
+
*/
|
|
309
|
+
getPadding(node: FlowNodeEntity): PaddingSchema;
|
|
310
|
+
/**
|
|
311
|
+
* 默认滚动到 fitview 区域
|
|
312
|
+
* @param contentSize
|
|
313
|
+
*/
|
|
314
|
+
getInitScroll(contentSize: SizeSchema): ScrollSchema;
|
|
315
|
+
/**
|
|
316
|
+
* 获取默认输入点
|
|
317
|
+
*/
|
|
318
|
+
getDefaultInputPoint(node: FlowNodeEntity): IPoint;
|
|
319
|
+
/**
|
|
320
|
+
* 获取默认输出点
|
|
321
|
+
*/
|
|
322
|
+
getDefaultOutputPoint(node: FlowNodeEntity): IPoint;
|
|
323
|
+
/**
|
|
324
|
+
* 水平中心点
|
|
325
|
+
*/
|
|
326
|
+
getDefaultNodeOrigin(): IPoint;
|
|
327
|
+
private getAllParents;
|
|
328
|
+
private getAllBlocks;
|
|
329
|
+
private fireChange;
|
|
330
|
+
}
|
|
331
|
+
|
|
285
332
|
declare const WorkflowDocumentProvider: unique symbol;
|
|
286
333
|
type WorkflowDocumentProvider = () => WorkflowDocument;
|
|
287
334
|
declare class WorkflowDocument extends FlowDocument {
|
|
@@ -290,7 +337,6 @@ declare class WorkflowDocument extends FlowDocument {
|
|
|
290
337
|
readonly onContentChange: _flowgram_ai_utils.Event<WorkflowContentChangeEvent>;
|
|
291
338
|
private _onReloadEmitter;
|
|
292
339
|
readonly onReload: _flowgram_ai_utils.Event<WorkflowDocument>;
|
|
293
|
-
private disposed;
|
|
294
340
|
/**
|
|
295
341
|
* 数据加载完成
|
|
296
342
|
*/
|
|
@@ -321,6 +367,13 @@ declare class WorkflowDocument extends FlowDocument {
|
|
|
321
367
|
* @param json
|
|
322
368
|
*/
|
|
323
369
|
createWorkflowNode(json: WorkflowNodeJSON, isClone?: boolean, parentId?: string): WorkflowNodeEntity;
|
|
370
|
+
/**
|
|
371
|
+
* 添加节点,如果节点已经存在则不会重复创建
|
|
372
|
+
* @param data
|
|
373
|
+
* @param addedNodes
|
|
374
|
+
*/
|
|
375
|
+
addNode(data: AddNodeData, addedNodes?: WorkflowNodeEntity[], ignoreCreateAndUpdateEvent?: boolean): WorkflowNodeEntity;
|
|
376
|
+
get layout(): FreeLayout;
|
|
324
377
|
/**
|
|
325
378
|
* 获取默认的 x y 坐标, 默认为当前画布可视区域中心
|
|
326
379
|
* @param type
|
|
@@ -665,4 +718,4 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
665
718
|
fireRender(): void;
|
|
666
719
|
}
|
|
667
720
|
|
|
668
|
-
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, PORT_SIZE as G, type WorkflowPortEntityOpts as H, type
|
|
721
|
+
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, PORT_SIZE as G, type WorkflowPortEntityOpts as H, type WorkflowEntityHoverable as I, type WorkfloEntityHoverable as J, WorkflowDocumentProvider as K, type LineEventProps as L, WorkflowDocumentOptionsDefault as M, type NodesDragEvent as N, type OnDragLineEnd as O, POINT_RADIUS as P, 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.9",
|
|
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/document": "0.1.0-alpha.
|
|
39
|
-
"@flowgram.ai/
|
|
40
|
-
"@flowgram.ai/
|
|
41
|
-
"@flowgram.ai/
|
|
42
|
-
"@flowgram.ai/
|
|
37
|
+
"@flowgram.ai/core": "0.1.0-alpha.9",
|
|
38
|
+
"@flowgram.ai/document": "0.1.0-alpha.9",
|
|
39
|
+
"@flowgram.ai/form-core": "0.1.0-alpha.9",
|
|
40
|
+
"@flowgram.ai/node": "0.1.0-alpha.9",
|
|
41
|
+
"@flowgram.ai/utils": "0.1.0-alpha.9",
|
|
42
|
+
"@flowgram.ai/reactive": "0.1.0-alpha.9"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@testing-library/react": "^12",
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
"tsup": "^8.0.1",
|
|
54
54
|
"typescript": "^5.0.4",
|
|
55
55
|
"vitest": "^0.34.6",
|
|
56
|
-
"@flowgram.ai/
|
|
57
|
-
"@flowgram.ai/
|
|
56
|
+
"@flowgram.ai/ts-config": "0.1.0-alpha.9",
|
|
57
|
+
"@flowgram.ai/eslint-config": "0.1.0-alpha.9"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"react": ">=
|
|
61
|
-
"react-dom": ">=
|
|
60
|
+
"react": ">=16.8",
|
|
61
|
+
"react-dom": ">=16.8"
|
|
62
62
|
},
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// src/typings/workflow-line.ts
|
|
2
|
-
var LineType = /* @__PURE__ */ ((LineType2) => {
|
|
3
|
-
LineType2[LineType2["BEZIER"] = 0] = "BEZIER";
|
|
4
|
-
LineType2[LineType2["LINE_CHART"] = 1] = "LINE_CHART";
|
|
5
|
-
return LineType2;
|
|
6
|
-
})(LineType || {});
|
|
7
|
-
var LineColors = /* @__PURE__ */ ((LineColors2) => {
|
|
8
|
-
LineColors2["HIDDEN"] = "transparent";
|
|
9
|
-
LineColors2["DEFUALT"] = "#4d53e8";
|
|
10
|
-
LineColors2["DRAWING"] = "#5DD6E3";
|
|
11
|
-
LineColors2["HOVER"] = "#37d0ff";
|
|
12
|
-
LineColors2["ERROR"] = "red";
|
|
13
|
-
return LineColors2;
|
|
14
|
-
})(LineColors || {});
|
|
15
|
-
|
|
16
|
-
export {
|
|
17
|
-
LineType,
|
|
18
|
-
LineColors
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=chunk-PT4ZVDZZ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/typings/workflow-line.ts"],"sourcesContent":["import 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}\n\nexport enum LineColors {\n HIDDEN = 'transparent', // 隐藏线条\n DEFUALT = '#4d53e8',\n DRAWING = '#5DD6E3', // '#b5bbf8', // '#9197F1',\n HOVER = '#37d0ff',\n ERROR = 'red',\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":";AAIO,IAAK,WAAL,kBAAKA,cAAL;AACL,EAAAA,oBAAA;AACA,EAAAA,oBAAA;AAFU,SAAAA;AAAA,GAAA;AAqBL,IAAK,aAAL,kBAAKC,gBAAL;AACL,EAAAA,YAAA,YAAS;AACT,EAAAA,YAAA,aAAU;AACV,EAAAA,YAAA,aAAU;AACV,EAAAA,YAAA,WAAQ;AACR,EAAAA,YAAA,WAAQ;AALE,SAAAA;AAAA,GAAA;","names":["LineType","LineColors"]}
|