@flowgram.ai/free-layout-core 0.1.22 → 0.1.24
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 +12 -128
- 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 +12 -128
- 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-drag.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-DIyrK9yz.d.ts → workflow-line-entity-B8wC-OVt.d.ts} +7 -11
- package/dist/{workflow-line-entity-BCAgoA18.d.mts → workflow-line-entity-DgCmDX1d.d.mts} +7 -11
- package/package.json +9 -9
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-DgCmDX1d.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-B8wC-OVt.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';
|
|
@@ -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-DgCmDX1d.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-B8wC-OVt.js';
|
|
6
6
|
import '../workflow-sub-canvas-DOVla1mw.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":["import 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
|
|
1
|
+
{"version":3,"sources":["../../src/typings/workflow-drag.ts"],"sourcesContent":["import 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,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-DgCmDX1d.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-B8wC-OVt.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-DgCmDX1d.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-B8wC-OVt.js';
|
|
3
3
|
import '@flowgram.ai/core';
|
|
4
4
|
import '@flowgram.ai/document';
|
|
5
5
|
import '../workflow-sub-canvas-DOVla1mw.js';
|
|
@@ -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-DgCmDX1d.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-B8wC-OVt.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-DgCmDX1d.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-B8wC-OVt.js';
|
|
6
6
|
import '@flowgram.ai/utils';
|
|
7
7
|
import '@flowgram.ai/core';
|
|
8
8
|
import './workflow-edge.js';
|
|
@@ -136,7 +136,6 @@ interface INodesDragEvent {
|
|
|
136
136
|
type: string;
|
|
137
137
|
nodes: FlowNodeEntity[];
|
|
138
138
|
startPositions: PositionSchema[];
|
|
139
|
-
altKey: boolean;
|
|
140
139
|
dragEvent: PlaygroundDragEvent;
|
|
141
140
|
triggerEvent: MouseEvent | React.MouseEvent;
|
|
142
141
|
dragger: PlaygroundDrag;
|
|
@@ -367,19 +366,16 @@ declare class WorkflowDocument extends FlowDocument {
|
|
|
367
366
|
*/
|
|
368
367
|
toJSON(): WorkflowJSON;
|
|
369
368
|
dispose(): void;
|
|
370
|
-
private getEdgeID;
|
|
371
|
-
/**
|
|
372
|
-
* 拍平树形json结构,将结构信息提取到map
|
|
373
|
-
*/
|
|
374
|
-
private flatJSON;
|
|
375
|
-
/**
|
|
376
|
-
* 对JSON进行分层
|
|
377
|
-
*/
|
|
378
|
-
private nestJSON;
|
|
379
369
|
/**
|
|
380
370
|
* 逐层创建节点和线条
|
|
381
371
|
*/
|
|
382
|
-
|
|
372
|
+
renderJSON(json: WorkflowJSON, options?: {
|
|
373
|
+
parent?: WorkflowNodeEntity;
|
|
374
|
+
isClone?: boolean;
|
|
375
|
+
}): {
|
|
376
|
+
nodes: WorkflowNodeEntity[];
|
|
377
|
+
edges: WorkflowLineEntity[];
|
|
378
|
+
};
|
|
383
379
|
private getNodeSubCanvas;
|
|
384
380
|
private getNodeChildren;
|
|
385
381
|
private toLineJSON;
|
|
@@ -136,7 +136,6 @@ interface INodesDragEvent {
|
|
|
136
136
|
type: string;
|
|
137
137
|
nodes: FlowNodeEntity[];
|
|
138
138
|
startPositions: PositionSchema[];
|
|
139
|
-
altKey: boolean;
|
|
140
139
|
dragEvent: PlaygroundDragEvent;
|
|
141
140
|
triggerEvent: MouseEvent | React.MouseEvent;
|
|
142
141
|
dragger: PlaygroundDrag;
|
|
@@ -367,19 +366,16 @@ declare class WorkflowDocument extends FlowDocument {
|
|
|
367
366
|
*/
|
|
368
367
|
toJSON(): WorkflowJSON;
|
|
369
368
|
dispose(): void;
|
|
370
|
-
private getEdgeID;
|
|
371
|
-
/**
|
|
372
|
-
* 拍平树形json结构,将结构信息提取到map
|
|
373
|
-
*/
|
|
374
|
-
private flatJSON;
|
|
375
|
-
/**
|
|
376
|
-
* 对JSON进行分层
|
|
377
|
-
*/
|
|
378
|
-
private nestJSON;
|
|
379
369
|
/**
|
|
380
370
|
* 逐层创建节点和线条
|
|
381
371
|
*/
|
|
382
|
-
|
|
372
|
+
renderJSON(json: WorkflowJSON, options?: {
|
|
373
|
+
parent?: WorkflowNodeEntity;
|
|
374
|
+
isClone?: boolean;
|
|
375
|
+
}): {
|
|
376
|
+
nodes: WorkflowNodeEntity[];
|
|
377
|
+
edges: WorkflowLineEntity[];
|
|
378
|
+
};
|
|
383
379
|
private getNodeSubCanvas;
|
|
384
380
|
private getNodeChildren;
|
|
385
381
|
private toLineJSON;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowgram.ai/free-layout-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.24",
|
|
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.
|
|
38
|
-
"@flowgram.ai/document": "0.1.
|
|
39
|
-
"@flowgram.ai/form-core": "0.1.
|
|
40
|
-
"@flowgram.ai/node": "0.1.
|
|
41
|
-
"@flowgram.ai/reactive": "0.1.
|
|
42
|
-
"@flowgram.ai/utils": "0.1.
|
|
37
|
+
"@flowgram.ai/core": "0.1.24",
|
|
38
|
+
"@flowgram.ai/document": "0.1.24",
|
|
39
|
+
"@flowgram.ai/form-core": "0.1.24",
|
|
40
|
+
"@flowgram.ai/node": "0.1.24",
|
|
41
|
+
"@flowgram.ai/reactive": "0.1.24",
|
|
42
|
+
"@flowgram.ai/utils": "0.1.24"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@testing-library/react": "^12",
|
|
@@ -53,8 +53,8 @@
|
|
|
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/eslint-config": "0.1.24",
|
|
57
|
+
"@flowgram.ai/ts-config": "0.1.24"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"react": ">=17",
|