@flowgram.ai/free-layout-core 0.5.2 → 0.5.4

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.
@@ -1,4 +1,4 @@
1
- export { L as LineCenterPoint, x as LineColor, y as LineColors, g as LineEventProps, w as LinePoint, v as LinePointLocation, m as LinePosition, k as LineRenderType, u as LineType, C as NodesDragEndEvent, N as NodesDragEvent, B as NodesDragStartEvent, D as NodesDraggingEvent, O as OnDragLineEnd, s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, W as WorkflowJSON, l as WorkflowLineRenderContribution, z as WorkflowLineRenderContributionFactory, h as WorkflowNodeJSON, t as WorkflowNodeMeta, A as WorkflowSubCanvas, E as onDragLineEndParams } from '../workflow-node-entity-DgQT-wl9.mjs';
1
+ export { L as LineCenterPoint, x as LineColor, y as LineColors, g as LineEventProps, w as LinePoint, v as LinePointLocation, m as LinePosition, k as LineRenderType, u as LineType, C as NodesDragEndEvent, N as NodesDragEvent, B as NodesDragStartEvent, D as NodesDraggingEvent, O as OnDragLineEnd, s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, W as WorkflowJSON, l as WorkflowLineRenderContribution, z as WorkflowLineRenderContributionFactory, h as WorkflowNodeJSON, t as WorkflowNodeMeta, A as WorkflowSubCanvas, E as onDragLineEndParams } from '../workflow-node-entity-DH5qlw7I.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';
@@ -1,4 +1,4 @@
1
- export { L as LineCenterPoint, x as LineColor, y as LineColors, g as LineEventProps, w as LinePoint, v as LinePointLocation, m as LinePosition, k as LineRenderType, u as LineType, C as NodesDragEndEvent, N as NodesDragEvent, B as NodesDragStartEvent, D as NodesDraggingEvent, O as OnDragLineEnd, s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, W as WorkflowJSON, l as WorkflowLineRenderContribution, z as WorkflowLineRenderContributionFactory, h as WorkflowNodeJSON, t as WorkflowNodeMeta, A as WorkflowSubCanvas, E as onDragLineEndParams } from '../workflow-node-entity-kGsp2Roz.js';
1
+ export { L as LineCenterPoint, x as LineColor, y as LineColors, g as LineEventProps, w as LinePoint, v as LinePointLocation, m as LinePosition, k as LineRenderType, u as LineType, C as NodesDragEndEvent, N as NodesDragEvent, B as NodesDragStartEvent, D as NodesDraggingEvent, O as OnDragLineEnd, s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, W as WorkflowJSON, l as WorkflowLineRenderContribution, z as WorkflowLineRenderContributionFactory, h as WorkflowNodeJSON, t as WorkflowNodeMeta, A as WorkflowSubCanvas, E as onDragLineEndParams } from '../workflow-node-entity-DWVtlA2a.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, C as NodesDragEndEvent, N as NodesDragEvent, B as NodesDragStartEvent, D as NodesDraggingEvent, O as OnDragLineEnd, E as onDragLineEndParams } from '../workflow-node-entity-DgQT-wl9.mjs';
5
+ export { g as LineEventProps, C as NodesDragEndEvent, N as NodesDragEvent, B as NodesDragStartEvent, D as NodesDraggingEvent, O as OnDragLineEnd, E as onDragLineEndParams } from '../workflow-node-entity-DH5qlw7I.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, C as NodesDragEndEvent, N as NodesDragEvent, B as NodesDragStartEvent, D as NodesDraggingEvent, O as OnDragLineEnd, E as onDragLineEndParams } from '../workflow-node-entity-kGsp2Roz.js';
5
+ export { g as LineEventProps, C as NodesDragEndEvent, N as NodesDragEvent, B as NodesDragStartEvent, D as NodesDraggingEvent, O as OnDragLineEnd, E as onDragLineEndParams } from '../workflow-node-entity-DWVtlA2a.js';
6
6
  import '@flowgram.ai/form-core';
7
7
  import './workflow-edge.js';
@@ -1,4 +1,4 @@
1
- export { s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, W as WorkflowJSON } from '../workflow-node-entity-DgQT-wl9.mjs';
1
+ export { s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, W as WorkflowJSON } from '../workflow-node-entity-DH5qlw7I.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 { s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, W as WorkflowJSON } from '../workflow-node-entity-kGsp2Roz.js';
1
+ export { s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, W as WorkflowJSON } from '../workflow-node-entity-DWVtlA2a.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, x as LineColor, y as LineColors, w as LinePoint, v as LinePointLocation, m as LinePosition, k as LineRenderType, u as LineType, l as WorkflowLineRenderContribution, z as WorkflowLineRenderContributionFactory } from '../workflow-node-entity-DgQT-wl9.mjs';
2
+ export { L as LineCenterPoint, x as LineColor, y as LineColors, w as LinePoint, v as LinePointLocation, m as LinePosition, k as LineRenderType, u as LineType, l as WorkflowLineRenderContribution, z as WorkflowLineRenderContributionFactory } from '../workflow-node-entity-DH5qlw7I.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, x as LineColor, y as LineColors, w as LinePoint, v as LinePointLocation, m as LinePosition, k as LineRenderType, u as LineType, l as WorkflowLineRenderContribution, z as WorkflowLineRenderContributionFactory } from '../workflow-node-entity-kGsp2Roz.js';
2
+ export { L as LineCenterPoint, x as LineColor, y as LineColors, w as LinePoint, v as LinePointLocation, m as LinePosition, k as LineRenderType, u as LineType, l as WorkflowLineRenderContribution, z as WorkflowLineRenderContributionFactory } from '../workflow-node-entity-DWVtlA2a.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, t as WorkflowNodeMeta } from '../workflow-node-entity-DgQT-wl9.mjs';
3
+ export { h as WorkflowNodeJSON, t as WorkflowNodeMeta } from '../workflow-node-entity-DH5qlw7I.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, t as WorkflowNodeMeta } from '../workflow-node-entity-kGsp2Roz.js';
3
+ export { h as WorkflowNodeJSON, t as WorkflowNodeMeta } from '../workflow-node-entity-DWVtlA2a.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-DgQT-wl9.mjs';
3
+ import { W as WorkflowJSON } from '../workflow-node-entity-DH5qlw7I.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-kGsp2Roz.js';
3
+ import { W as WorkflowJSON } from '../workflow-node-entity-DWVtlA2a.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 { t as WorkflowNodeMeta, i as WorkflowPortEntity, d as WorkflowLinesManager, b as WorkflowNodeEntity } from '../workflow-node-entity-DgQT-wl9.mjs';
4
+ import { t as WorkflowNodeMeta, i as WorkflowPortEntity, d as WorkflowLinesManager, b as WorkflowNodeEntity } from '../workflow-node-entity-DH5qlw7I.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 { t as WorkflowNodeMeta, i as WorkflowPortEntity, d as WorkflowLinesManager, b as WorkflowNodeEntity } from '../workflow-node-entity-kGsp2Roz.js';
4
+ import { t as WorkflowNodeMeta, i as WorkflowPortEntity, d as WorkflowLinesManager, b as WorkflowNodeEntity } from '../workflow-node-entity-DWVtlA2a.js';
5
5
  import '@flowgram.ai/core';
6
6
  import '@flowgram.ai/utils';
7
7
  import 'react';
@@ -1,4 +1,4 @@
1
- export { A as WorkflowSubCanvas } from '../workflow-node-entity-DgQT-wl9.mjs';
1
+ export { A as WorkflowSubCanvas } from '../workflow-node-entity-DH5qlw7I.mjs';
2
2
  import '@flowgram.ai/document';
3
3
  import '@flowgram.ai/core';
4
4
  import '@flowgram.ai/utils';
@@ -1,4 +1,4 @@
1
- export { A as WorkflowSubCanvas } from '../workflow-node-entity-kGsp2Roz.js';
1
+ export { A as WorkflowSubCanvas } from '../workflow-node-entity-DWVtlA2a.js';
2
2
  import '@flowgram.ai/document';
3
3
  import '@flowgram.ai/core';
4
4
  import '@flowgram.ai/utils';
@@ -888,6 +888,30 @@ interface WorkflowPort {
888
888
  * 端口位置
889
889
  */
890
890
  location?: LinePointLocation;
891
+ /**
892
+ * 端口位置配置
893
+ * @example
894
+ * // bottom-center
895
+ * {
896
+ * left: '50%',
897
+ * bottom: 0
898
+ * }
899
+ * // right-center
900
+ * {
901
+ * right: 0,
902
+ * top: '50%'
903
+ * }
904
+ */
905
+ locationConfig?: {
906
+ left?: string | number;
907
+ top?: string | number;
908
+ right?: string | number;
909
+ bottom?: string | number;
910
+ };
911
+ /**
912
+ * 相对于 location 的偏移
913
+ */
914
+ offset?: IPoint;
891
915
  /**
892
916
  * 端口热区大小
893
917
  */
@@ -895,10 +919,6 @@ interface WorkflowPort {
895
919
  width: number;
896
920
  height: number;
897
921
  };
898
- /**
899
- * 相对于 location 的偏移
900
- */
901
- offset?: IPoint;
902
922
  /**
903
923
  * 禁用端口
904
924
  */
@@ -926,6 +946,7 @@ declare class WorkflowPortEntity extends Entity<WorkflowPortEntityOpts> {
926
946
  private _disabled?;
927
947
  private _hasError;
928
948
  private _location?;
949
+ private _locationConfig?;
929
950
  private _size?;
930
951
  private _offset?;
931
952
  protected readonly _onErrorChangedEmitter: Emitter<void>;
@@ -888,6 +888,30 @@ interface WorkflowPort {
888
888
  * 端口位置
889
889
  */
890
890
  location?: LinePointLocation;
891
+ /**
892
+ * 端口位置配置
893
+ * @example
894
+ * // bottom-center
895
+ * {
896
+ * left: '50%',
897
+ * bottom: 0
898
+ * }
899
+ * // right-center
900
+ * {
901
+ * right: 0,
902
+ * top: '50%'
903
+ * }
904
+ */
905
+ locationConfig?: {
906
+ left?: string | number;
907
+ top?: string | number;
908
+ right?: string | number;
909
+ bottom?: string | number;
910
+ };
911
+ /**
912
+ * 相对于 location 的偏移
913
+ */
914
+ offset?: IPoint;
891
915
  /**
892
916
  * 端口热区大小
893
917
  */
@@ -895,10 +919,6 @@ interface WorkflowPort {
895
919
  width: number;
896
920
  height: number;
897
921
  };
898
- /**
899
- * 相对于 location 的偏移
900
- */
901
- offset?: IPoint;
902
922
  /**
903
923
  * 禁用端口
904
924
  */
@@ -926,6 +946,7 @@ declare class WorkflowPortEntity extends Entity<WorkflowPortEntityOpts> {
926
946
  private _disabled?;
927
947
  private _hasError;
928
948
  private _location?;
949
+ private _locationConfig?;
929
950
  private _size?;
930
951
  private _offset?;
931
952
  protected readonly _onErrorChangedEmitter: Emitter<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowgram.ai/free-layout-core",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
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": "0.5.2",
38
- "@flowgram.ai/document": "0.5.2",
39
- "@flowgram.ai/form-core": "0.5.2",
40
- "@flowgram.ai/reactive": "0.5.2",
41
- "@flowgram.ai/utils": "0.5.2",
42
- "@flowgram.ai/node": "0.5.2"
37
+ "@flowgram.ai/core": "0.5.4",
38
+ "@flowgram.ai/node": "0.5.4",
39
+ "@flowgram.ai/form-core": "0.5.4",
40
+ "@flowgram.ai/document": "0.5.4",
41
+ "@flowgram.ai/reactive": "0.5.4",
42
+ "@flowgram.ai/utils": "0.5.4"
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": "0.5.2",
57
- "@flowgram.ai/ts-config": "0.5.2"
56
+ "@flowgram.ai/eslint-config": "0.5.4",
57
+ "@flowgram.ai/ts-config": "0.5.4"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "react": ">=16.8",