@flowgram.ai/free-layout-core 1.0.9 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +125 -49
- 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 +124 -43
- 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-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-operation.d.mts +1 -1
- package/dist/typings/workflow-operation.d.ts +1 -1
- package/dist/typings/workflow-registry.d.mts +1 -1
- package/dist/typings/workflow-registry.d.ts +1 -1
- package/dist/typings/workflow-sub-canvas.d.mts +1 -1
- package/dist/typings/workflow-sub-canvas.d.ts +1 -1
- package/dist/{workflow-node-entity-C_A53MW2.d.ts → workflow-node-entity-03Q7Fvv6.d.ts} +10 -1
- package/dist/{workflow-node-entity-BpXZTWZe.d.mts → workflow-node-entity-C6bFzfXc.d.mts} +10 -1
- package/package.json +9 -9
package/dist/typings/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { L as LineCenterPoint,
|
|
1
|
+
export { L as LineCenterPoint, y as LineColor, z as LineColors, g as LineEventProps, x as LinePoint, w as LinePointLocation, m as LinePosition, k as LineRenderType, v as LineType, D as NodesDragEndEvent, N as NodesDragEvent, C as NodesDragStartEvent, E as NodesDraggingEvent, O as OnDragLineEnd, t as WorkflowContentChangeEvent, s as WorkflowContentChangeType, W as WorkflowJSON, l as WorkflowLineRenderContribution, A as WorkflowLineRenderContributionFactory, h as WorkflowNodeJSON, u as WorkflowNodeMeta, B as WorkflowSubCanvas, F as onDragLineEndParams } from '../workflow-node-entity-C6bFzfXc.mjs';
|
|
2
2
|
export { WorkflowEdgeJSON } from './workflow-edge.mjs';
|
|
3
3
|
export { WorkflowNodeFormMeta, WorkflowNodeRegistry, WorkflowNodeRenderProps } from './workflow-registry.mjs';
|
|
4
4
|
export { NodePostionUpdateEvent, WorkflowOperationBaseService } from './workflow-operation.mjs';
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { L as LineCenterPoint,
|
|
1
|
+
export { L as LineCenterPoint, y as LineColor, z as LineColors, g as LineEventProps, x as LinePoint, w as LinePointLocation, m as LinePosition, k as LineRenderType, v as LineType, D as NodesDragEndEvent, N as NodesDragEvent, C as NodesDragStartEvent, E as NodesDraggingEvent, O as OnDragLineEnd, t as WorkflowContentChangeEvent, s as WorkflowContentChangeType, W as WorkflowJSON, l as WorkflowLineRenderContribution, A as WorkflowLineRenderContributionFactory, h as WorkflowNodeJSON, u as WorkflowNodeMeta, B as WorkflowSubCanvas, F as onDragLineEndParams } from '../workflow-node-entity-03Q7Fvv6.js';
|
|
2
2
|
export { WorkflowEdgeJSON } from './workflow-edge.js';
|
|
3
3
|
export { WorkflowNodeFormMeta, WorkflowNodeRegistry, WorkflowNodeRenderProps } from './workflow-registry.js';
|
|
4
4
|
export { NodePostionUpdateEvent, WorkflowOperationBaseService } from './workflow-operation.js';
|
|
@@ -2,6 +2,6 @@ import 'react';
|
|
|
2
2
|
import '@flowgram.ai/utils';
|
|
3
3
|
import '@flowgram.ai/document';
|
|
4
4
|
import '@flowgram.ai/core';
|
|
5
|
-
export { g as LineEventProps,
|
|
5
|
+
export { g as LineEventProps, D as NodesDragEndEvent, N as NodesDragEvent, C as NodesDragStartEvent, E as NodesDraggingEvent, O as OnDragLineEnd, F as onDragLineEndParams } from '../workflow-node-entity-C6bFzfXc.mjs';
|
|
6
6
|
import '@flowgram.ai/form-core';
|
|
7
7
|
import './workflow-edge.mjs';
|
|
@@ -2,6 +2,6 @@ import 'react';
|
|
|
2
2
|
import '@flowgram.ai/utils';
|
|
3
3
|
import '@flowgram.ai/document';
|
|
4
4
|
import '@flowgram.ai/core';
|
|
5
|
-
export { g as LineEventProps,
|
|
5
|
+
export { g as LineEventProps, D as NodesDragEndEvent, N as NodesDragEvent, C as NodesDragStartEvent, E as NodesDraggingEvent, O as OnDragLineEnd, F as onDragLineEndParams } from '../workflow-node-entity-03Q7Fvv6.js';
|
|
6
6
|
import '@flowgram.ai/form-core';
|
|
7
7
|
import './workflow-edge.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { t as WorkflowContentChangeEvent, s as WorkflowContentChangeType, W as WorkflowJSON } from '../workflow-node-entity-C6bFzfXc.mjs';
|
|
2
2
|
import './workflow-edge.mjs';
|
|
3
3
|
import '@flowgram.ai/document';
|
|
4
4
|
import '@flowgram.ai/core';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { t as WorkflowContentChangeEvent, s as WorkflowContentChangeType, W as WorkflowJSON } from '../workflow-node-entity-03Q7Fvv6.js';
|
|
2
2
|
import './workflow-edge.js';
|
|
3
3
|
import '@flowgram.ai/document';
|
|
4
4
|
import '@flowgram.ai/core';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
|
-
export { L as LineCenterPoint,
|
|
2
|
+
export { L as LineCenterPoint, y as LineColor, z as LineColors, x as LinePoint, w as LinePointLocation, m as LinePosition, k as LineRenderType, v as LineType, l as WorkflowLineRenderContribution, A as WorkflowLineRenderContributionFactory } from '../workflow-node-entity-C6bFzfXc.mjs';
|
|
3
3
|
import '@flowgram.ai/document';
|
|
4
4
|
import '@flowgram.ai/core';
|
|
5
5
|
import 'react';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
|
-
export { L as LineCenterPoint,
|
|
2
|
+
export { L as LineCenterPoint, y as LineColor, z as LineColors, x as LinePoint, w as LinePointLocation, m as LinePosition, k as LineRenderType, v as LineType, l as WorkflowLineRenderContribution, A as WorkflowLineRenderContributionFactory } from '../workflow-node-entity-03Q7Fvv6.js';
|
|
3
3
|
import '@flowgram.ai/document';
|
|
4
4
|
import '@flowgram.ai/core';
|
|
5
5
|
import 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
2
|
import '@flowgram.ai/document';
|
|
3
|
-
export { h as WorkflowNodeJSON,
|
|
3
|
+
export { h as WorkflowNodeJSON, u as WorkflowNodeMeta } from '../workflow-node-entity-C6bFzfXc.mjs';
|
|
4
4
|
import './workflow-edge.mjs';
|
|
5
5
|
import '@flowgram.ai/core';
|
|
6
6
|
import 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@flowgram.ai/utils';
|
|
2
2
|
import '@flowgram.ai/document';
|
|
3
|
-
export { h as WorkflowNodeJSON,
|
|
3
|
+
export { h as WorkflowNodeJSON, u as WorkflowNodeMeta } from '../workflow-node-entity-03Q7Fvv6.js';
|
|
4
4
|
import './workflow-edge.js';
|
|
5
5
|
import '@flowgram.ai/core';
|
|
6
6
|
import 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IPoint, Event } from '@flowgram.ai/utils';
|
|
2
2
|
import { FlowNodeEntity, FlowOperationBaseService, FlowNodeEntityOrId } from '@flowgram.ai/document';
|
|
3
|
-
import { W as WorkflowJSON } from '../workflow-node-entity-
|
|
3
|
+
import { W as WorkflowJSON } from '../workflow-node-entity-C6bFzfXc.mjs';
|
|
4
4
|
import '@flowgram.ai/core';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@flowgram.ai/form-core';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IPoint, Event } from '@flowgram.ai/utils';
|
|
2
2
|
import { FlowNodeEntity, FlowOperationBaseService, FlowNodeEntityOrId } from '@flowgram.ai/document';
|
|
3
|
-
import { W as WorkflowJSON } from '../workflow-node-entity-
|
|
3
|
+
import { W as WorkflowJSON } from '../workflow-node-entity-03Q7Fvv6.js';
|
|
4
4
|
import '@flowgram.ai/core';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@flowgram.ai/form-core';
|
|
@@ -1,7 +1,7 @@
|
|
|
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 {
|
|
4
|
+
import { u as WorkflowNodeMeta, i as WorkflowPortEntity, d as WorkflowLinesManager, b as WorkflowNodeEntity } from '../workflow-node-entity-C6bFzfXc.mjs';
|
|
5
5
|
import '@flowgram.ai/core';
|
|
6
6
|
import '@flowgram.ai/utils';
|
|
7
7
|
import 'react';
|
|
@@ -1,7 +1,7 @@
|
|
|
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 {
|
|
4
|
+
import { u as WorkflowNodeMeta, i as WorkflowPortEntity, d as WorkflowLinesManager, b as WorkflowNodeEntity } from '../workflow-node-entity-03Q7Fvv6.js';
|
|
5
5
|
import '@flowgram.ai/core';
|
|
6
6
|
import '@flowgram.ai/utils';
|
|
7
7
|
import 'react';
|
|
@@ -12,6 +12,7 @@ import { WorkflowEdgeJSON } from './typings/workflow-edge.js';
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
type WorkflowPortType = 'input' | 'output';
|
|
15
|
+
declare const getPortEntityIdByNodeId: (nodeId: string, portType: WorkflowPortType, portID?: string | number) => string;
|
|
15
16
|
declare const getPortEntityId: (node: WorkflowNodeEntity, portType: WorkflowPortType, portID?: string | number) => string;
|
|
16
17
|
declare const WORKFLOW_LINE_ENTITY = "WorkflowLineEntity";
|
|
17
18
|
declare function domReactToBounds(react: DOMRect): Rectangle;
|
|
@@ -579,6 +580,7 @@ type OnDragLineEnd = (params: onDragLineEndParams) => Promise<void>;
|
|
|
579
580
|
declare class WorkflowLinesManager {
|
|
580
581
|
protected document: WorkflowDocument;
|
|
581
582
|
protected toDispose: DisposableCollection;
|
|
583
|
+
protected readonly portLineMap: Map<string, Set<WorkflowLineEntity>>;
|
|
582
584
|
protected _lineType: LineRenderType;
|
|
583
585
|
protected onAvailableLinesChangeEmitter: Emitter<WorkflowContentChangeEvent>;
|
|
584
586
|
protected onForceUpdateEmitter: Emitter<void>;
|
|
@@ -601,6 +603,11 @@ declare class WorkflowLinesManager {
|
|
|
601
603
|
get lineColor(): LineColor;
|
|
602
604
|
switchLineType(newType?: LineRenderType): LineRenderType;
|
|
603
605
|
getAllLines(): WorkflowLineEntity[];
|
|
606
|
+
getLinesByPortId(portId: string): WorkflowLineEntity[];
|
|
607
|
+
rebindLinePorts(line: WorkflowLineEntity, prevInfo?: WorkflowLineInfo, nextInfo?: WorkflowLineInfo): void;
|
|
608
|
+
private attachLineToPortId;
|
|
609
|
+
private detachLineFromPortId;
|
|
610
|
+
private getLinePortId;
|
|
604
611
|
getAllAvailableLines(): WorkflowLineEntity[];
|
|
605
612
|
hasLine(portInfo: Omit<WorkflowLinePortInfo, 'data'>): boolean;
|
|
606
613
|
getLine(portInfo: Omit<WorkflowLinePortInfo, 'data'>): WorkflowLineEntity | undefined;
|
|
@@ -862,6 +869,8 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
862
869
|
* @param info 线条信息
|
|
863
870
|
*/
|
|
864
871
|
protected initInfo(info: WorkflowLineInfo): void;
|
|
872
|
+
private updateInfo;
|
|
873
|
+
private applyInfo;
|
|
865
874
|
validate(): void;
|
|
866
875
|
/**
|
|
867
876
|
* use `validate` instead
|
|
@@ -1146,4 +1155,4 @@ declare module '@flowgram.ai/document' {
|
|
|
1146
1155
|
type WorkflowNodeEntity = FlowNodeEntity;
|
|
1147
1156
|
declare const WorkflowNodeEntity: typeof FlowNodeEntity;
|
|
1148
1157
|
|
|
1149
|
-
export { type
|
|
1158
|
+
export { WorkflowDocumentOptionsDefault as $, type WorkflowLineRenderContributionFactory as A, type WorkflowSubCanvas as B, type NodesDragStartEvent as C, type NodesDragEndEvent as D, type NodesDraggingEvent as E, type onDragLineEndParams as F, LINE_HOVER_DISTANCE as G, type WorkflowLinePortInfo as H, type WorkflowLineEntityOpts as I, type WorkflowLineInfo as J, type WorkflowLineUIState as K, type LineCenterPoint as L, PORT_SIZE as M, type NodesDragEvent as N, type OnDragLineEnd as O, POINT_RADIUS as P, type WorkflowPort as Q, type WorkflowPorts as R, type WorkflowPortEntityOpts as S, WorkflowNodePortsData as T, type WorkflowNodeLines as U, WorkflowNodeLinesData as V, type WorkflowJSON as W, type WorkflowEntityHoverable as X, type HoverPosition as Y, type WorkfloEntityHoverable as Z, WorkflowDocumentProvider as _, WorkflowDocument as a, WorkflowNodeEntity as b, WorkflowHoverService as c, WorkflowLinesManager as d, WorkflowSelectService as e, WorkflowDocumentOptions as f, type LineEventProps as g, type WorkflowNodeJSON as h, WorkflowPortEntity as i, WorkflowLineEntity as j, type LineRenderType as k, type WorkflowLineRenderContribution as l, type LinePosition as m, type WorkflowPortType as n, getPortEntityIdByNodeId as o, getPortEntityId as p, WORKFLOW_LINE_ENTITY as q, domReactToBounds as r, WorkflowContentChangeType as s, type WorkflowContentChangeEvent as t, type WorkflowNodeMeta as u, LineType as v, type LinePointLocation as w, type LinePoint as x, type LineColor as y, LineColors as z };
|
|
@@ -12,6 +12,7 @@ import { WorkflowEdgeJSON } from './typings/workflow-edge.mjs';
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
type WorkflowPortType = 'input' | 'output';
|
|
15
|
+
declare const getPortEntityIdByNodeId: (nodeId: string, portType: WorkflowPortType, portID?: string | number) => string;
|
|
15
16
|
declare const getPortEntityId: (node: WorkflowNodeEntity, portType: WorkflowPortType, portID?: string | number) => string;
|
|
16
17
|
declare const WORKFLOW_LINE_ENTITY = "WorkflowLineEntity";
|
|
17
18
|
declare function domReactToBounds(react: DOMRect): Rectangle;
|
|
@@ -579,6 +580,7 @@ type OnDragLineEnd = (params: onDragLineEndParams) => Promise<void>;
|
|
|
579
580
|
declare class WorkflowLinesManager {
|
|
580
581
|
protected document: WorkflowDocument;
|
|
581
582
|
protected toDispose: DisposableCollection;
|
|
583
|
+
protected readonly portLineMap: Map<string, Set<WorkflowLineEntity>>;
|
|
582
584
|
protected _lineType: LineRenderType;
|
|
583
585
|
protected onAvailableLinesChangeEmitter: Emitter<WorkflowContentChangeEvent>;
|
|
584
586
|
protected onForceUpdateEmitter: Emitter<void>;
|
|
@@ -601,6 +603,11 @@ declare class WorkflowLinesManager {
|
|
|
601
603
|
get lineColor(): LineColor;
|
|
602
604
|
switchLineType(newType?: LineRenderType): LineRenderType;
|
|
603
605
|
getAllLines(): WorkflowLineEntity[];
|
|
606
|
+
getLinesByPortId(portId: string): WorkflowLineEntity[];
|
|
607
|
+
rebindLinePorts(line: WorkflowLineEntity, prevInfo?: WorkflowLineInfo, nextInfo?: WorkflowLineInfo): void;
|
|
608
|
+
private attachLineToPortId;
|
|
609
|
+
private detachLineFromPortId;
|
|
610
|
+
private getLinePortId;
|
|
604
611
|
getAllAvailableLines(): WorkflowLineEntity[];
|
|
605
612
|
hasLine(portInfo: Omit<WorkflowLinePortInfo, 'data'>): boolean;
|
|
606
613
|
getLine(portInfo: Omit<WorkflowLinePortInfo, 'data'>): WorkflowLineEntity | undefined;
|
|
@@ -862,6 +869,8 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
|
|
|
862
869
|
* @param info 线条信息
|
|
863
870
|
*/
|
|
864
871
|
protected initInfo(info: WorkflowLineInfo): void;
|
|
872
|
+
private updateInfo;
|
|
873
|
+
private applyInfo;
|
|
865
874
|
validate(): void;
|
|
866
875
|
/**
|
|
867
876
|
* use `validate` instead
|
|
@@ -1146,4 +1155,4 @@ declare module '@flowgram.ai/document' {
|
|
|
1146
1155
|
type WorkflowNodeEntity = FlowNodeEntity;
|
|
1147
1156
|
declare const WorkflowNodeEntity: typeof FlowNodeEntity;
|
|
1148
1157
|
|
|
1149
|
-
export { type
|
|
1158
|
+
export { WorkflowDocumentOptionsDefault as $, type WorkflowLineRenderContributionFactory as A, type WorkflowSubCanvas as B, type NodesDragStartEvent as C, type NodesDragEndEvent as D, type NodesDraggingEvent as E, type onDragLineEndParams as F, LINE_HOVER_DISTANCE as G, type WorkflowLinePortInfo as H, type WorkflowLineEntityOpts as I, type WorkflowLineInfo as J, type WorkflowLineUIState as K, type LineCenterPoint as L, PORT_SIZE as M, type NodesDragEvent as N, type OnDragLineEnd as O, POINT_RADIUS as P, type WorkflowPort as Q, type WorkflowPorts as R, type WorkflowPortEntityOpts as S, WorkflowNodePortsData as T, type WorkflowNodeLines as U, WorkflowNodeLinesData as V, type WorkflowJSON as W, type WorkflowEntityHoverable as X, type HoverPosition as Y, type WorkfloEntityHoverable as Z, WorkflowDocumentProvider as _, WorkflowDocument as a, WorkflowNodeEntity as b, WorkflowHoverService as c, WorkflowLinesManager as d, WorkflowSelectService as e, WorkflowDocumentOptions as f, type LineEventProps as g, type WorkflowNodeJSON as h, WorkflowPortEntity as i, WorkflowLineEntity as j, type LineRenderType as k, type WorkflowLineRenderContribution as l, type LinePosition as m, type WorkflowPortType as n, getPortEntityIdByNodeId as o, getPortEntityId as p, WORKFLOW_LINE_ENTITY as q, domReactToBounds as r, WorkflowContentChangeType as s, type WorkflowContentChangeEvent as t, type WorkflowNodeMeta as u, LineType as v, type LinePointLocation as w, type LinePoint as x, type LineColor as y, LineColors as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flowgram.ai/free-layout-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"homepage": "https://flowgram.ai/",
|
|
5
5
|
"repository": "https://github.com/bytedance/flowgram.ai",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"reflect-metadata": "~0.2.2",
|
|
35
35
|
"lodash-es": "^4.17.21",
|
|
36
36
|
"nanoid": "^5.0.9",
|
|
37
|
-
"@flowgram.ai/core": "1.0.
|
|
38
|
-
"@flowgram.ai/
|
|
39
|
-
"@flowgram.ai/
|
|
40
|
-
"@flowgram.ai/node": "1.0.
|
|
41
|
-
"@flowgram.ai/
|
|
42
|
-
"@flowgram.ai/
|
|
37
|
+
"@flowgram.ai/core": "1.0.11",
|
|
38
|
+
"@flowgram.ai/form-core": "1.0.11",
|
|
39
|
+
"@flowgram.ai/document": "1.0.11",
|
|
40
|
+
"@flowgram.ai/node": "1.0.11",
|
|
41
|
+
"@flowgram.ai/reactive": "1.0.11",
|
|
42
|
+
"@flowgram.ai/utils": "1.0.11"
|
|
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.8.3",
|
|
55
55
|
"vitest": "^3.2.4",
|
|
56
|
-
"@flowgram.ai/eslint-config": "1.0.
|
|
57
|
-
"@flowgram.ai/ts-config": "1.0.
|
|
56
|
+
"@flowgram.ai/eslint-config": "1.0.11",
|
|
57
|
+
"@flowgram.ai/ts-config": "1.0.11"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"react": ">=16.8",
|