@flowgram.ai/free-layout-core 0.1.0-alpha.12 → 0.1.0-alpha.14

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.
Files changed (36) hide show
  1. package/dist/esm/{chunk-CTGO4RKX.js → chunk-5BT3ZR4D.js} +2 -1
  2. package/dist/esm/chunk-5BT3ZR4D.js.map +1 -0
  3. package/dist/esm/{chunk-242F2JCI.js → chunk-U2XMPOSL.js} +2 -1
  4. package/dist/esm/{chunk-242F2JCI.js.map → chunk-U2XMPOSL.js.map} +1 -1
  5. package/dist/esm/index.js +254 -155
  6. package/dist/esm/index.js.map +1 -1
  7. package/dist/esm/typings/index.js +2 -2
  8. package/dist/esm/typings/workflow-json.js +1 -1
  9. package/dist/esm/typings/workflow-line.js +1 -1
  10. package/dist/index.d.mts +26 -34
  11. package/dist/index.d.ts +26 -34
  12. package/dist/index.js +236 -135
  13. package/dist/index.js.map +1 -1
  14. package/dist/typings/index.d.mts +1 -1
  15. package/dist/typings/index.d.ts +1 -1
  16. package/dist/typings/index.js +2 -0
  17. package/dist/typings/index.js.map +1 -1
  18. package/dist/typings/workflow-drag.d.mts +1 -1
  19. package/dist/typings/workflow-drag.d.ts +1 -1
  20. package/dist/typings/workflow-json.d.mts +1 -1
  21. package/dist/typings/workflow-json.d.ts +1 -1
  22. package/dist/typings/workflow-json.js +1 -0
  23. package/dist/typings/workflow-json.js.map +1 -1
  24. package/dist/typings/workflow-line.d.mts +1 -1
  25. package/dist/typings/workflow-line.d.ts +1 -1
  26. package/dist/typings/workflow-line.js +1 -0
  27. package/dist/typings/workflow-line.js.map +1 -1
  28. package/dist/typings/workflow-node.d.mts +1 -1
  29. package/dist/typings/workflow-node.d.ts +1 -1
  30. package/dist/typings/workflow-registry.d.mts +2 -1
  31. package/dist/typings/workflow-registry.d.ts +2 -1
  32. package/dist/typings/workflow-registry.js.map +1 -1
  33. package/dist/{workflow-line-entity-LhmV98jq.d.ts → workflow-line-entity-BmPrinpL.d.ts} +152 -45
  34. package/dist/{workflow-line-entity-Iq1OHmuK.d.mts → workflow-line-entity-Dn8glLaW.d.mts} +152 -45
  35. package/package.json +9 -9
  36. package/dist/esm/chunk-CTGO4RKX.js.map +0 -1
@@ -5,7 +5,7 @@ import { FlowNodeMeta, FlowNodeJSON, FlowNodeEntity, FlowDocumentOptions, FlowNo
5
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
- import React from 'react';
8
+ import React$1 from 'react';
9
9
 
10
10
  /**
11
11
  * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
@@ -85,6 +85,10 @@ declare enum WorkflowContentChangeType {
85
85
  * 删除线条
86
86
  */
87
87
  DELETE_LINE = "DELETE_LINE",
88
+ /**
89
+ * 线条数据修改
90
+ */
91
+ LINE_DATA_CHANGE = "LINE_DATA_CHANGE",
88
92
  /**
89
93
  * 节点Meta信息变更
90
94
  */
@@ -96,6 +100,10 @@ interface WorkflowContentChangeEvent {
96
100
  * 当前触发的元素的json数据,toJSON 需要主动触发
97
101
  */
98
102
  toJSON: () => any;
103
+ /**
104
+ * oldValue
105
+ */
106
+ oldValue?: any;
99
107
  entity: WorkflowNodeEntity | WorkflowLineEntity;
100
108
  }
101
109
 
@@ -106,12 +114,19 @@ interface WorkflowContentChangeEvent {
106
114
 
107
115
  declare enum LineType {
108
116
  BEZIER = 0,// 贝塞尔曲线
109
- LINE_CHART = 1
117
+ LINE_CHART = 1,// 折叠线
118
+ STRAIGHT = 2
110
119
  }
111
120
  type LineRenderType = LineType | string;
121
+ type LinePointLocation = 'left' | 'top' | 'right' | 'bottom';
122
+ interface LinePoint {
123
+ x: number;
124
+ y: number;
125
+ location: LinePointLocation;
126
+ }
112
127
  interface LinePosition {
113
- from: IPoint;
114
- to: IPoint;
128
+ from: LinePoint;
129
+ to: LinePoint;
115
130
  }
116
131
  interface LineColor {
117
132
  hidden: string;
@@ -131,13 +146,20 @@ declare enum LineColors {
131
146
  ERROR = "var(--g-workflow-line-color-error,red)",
132
147
  FLOWING = "var(--g-workflow-line-color-flowing,#4d53e8)"
133
148
  }
149
+ interface LineCenterPoint {
150
+ x: number;
151
+ y: number;
152
+ labelX: number;
153
+ labelY: number;
154
+ }
134
155
  interface WorkflowLineRenderContribution {
135
156
  entity: WorkflowLineEntity;
136
157
  path: string;
158
+ center?: LineCenterPoint;
137
159
  bounds: Rectangle;
138
160
  update: (params: {
139
- fromPos: IPoint;
140
- toPos: IPoint;
161
+ fromPos: LinePoint;
162
+ toPos: LinePoint;
141
163
  }) => void;
142
164
  calcDistance: (pos: IPoint) => number;
143
165
  }
@@ -160,7 +182,7 @@ interface INodesDragEvent {
160
182
  nodes: FlowNodeEntity[];
161
183
  startPositions: PositionSchema[];
162
184
  dragEvent: PlaygroundDragEvent;
163
- triggerEvent: MouseEvent | React.MouseEvent;
185
+ triggerEvent: MouseEvent | React$1.MouseEvent;
164
186
  dragger: PlaygroundDrag;
165
187
  }
166
188
  interface NodesDragStartEvent extends INodesDragEvent {
@@ -214,8 +236,6 @@ interface WorkflowDocumentOptions extends FlowDocumentOptions {
214
236
  isFlowingLine?: (line: WorkflowLineEntity) => boolean;
215
237
  /** 是否禁用线条 */
216
238
  isDisabledLine?: (line: WorkflowLineEntity) => boolean;
217
- /** 是否竖向线条 */
218
- isVerticalLine?: (line: WorkflowLineEntity) => boolean;
219
239
  /** 拖拽线条结束 */
220
240
  onDragLineEnd?: (params: onDragLineEndParams) => Promise<void>;
221
241
  /** 获取线条渲染器 */
@@ -227,7 +247,7 @@ interface WorkflowDocumentOptions extends FlowDocumentOptions {
227
247
  /** 能否删除节点 */
228
248
  canDeleteNode?: (node: WorkflowNodeEntity, silent?: boolean) => boolean;
229
249
  /** 能否删除线条 */
230
- canDeleteLine?: (line: WorkflowLineEntity, newLineInfo?: Required<WorkflowLinePortInfo>, silent?: boolean) => boolean;
250
+ canDeleteLine?: (line: WorkflowLineEntity, newLineInfo?: Required<Omit<WorkflowLinePortInfo, 'data'>>, silent?: boolean) => boolean;
231
251
  /**
232
252
  * @param fromPort - 开始点
233
253
  * @param oldToPort - 旧的连接点
@@ -404,6 +424,11 @@ declare class WorkflowDocument extends FlowDocument {
404
424
  nodeEngineContext: NodeEngineContext;
405
425
  selectServices: WorkflowSelectService;
406
426
  get loading(): boolean;
427
+ /**
428
+ * use `ctx.tools.fitView()` instead
429
+ * @deprecated
430
+ * @param easing
431
+ */
407
432
  fitView(easing?: boolean): Promise<void>;
408
433
  init(): void;
409
434
  load(): Promise<void>;
@@ -475,7 +500,10 @@ declare class WorkflowDocument extends FlowDocument {
475
500
  toJSON(): WorkflowJSON;
476
501
  dispose(): void;
477
502
  /**
478
- * 逐层创建节点和线条
503
+ * 批量添加节点
504
+ * @deprecated use 'batchAddFromJSON' instead
505
+ * @param json
506
+ * @param options
479
507
  */
480
508
  renderJSON(json: WorkflowJSON, options?: {
481
509
  parent?: WorkflowNodeEntity;
@@ -484,6 +512,16 @@ declare class WorkflowDocument extends FlowDocument {
484
512
  nodes: WorkflowNodeEntity[];
485
513
  edges: WorkflowLineEntity[];
486
514
  };
515
+ /**
516
+ * 批量添加节点
517
+ */
518
+ batchAddFromJSON(json: WorkflowJSON, options?: {
519
+ parent?: WorkflowNodeEntity;
520
+ isClone?: boolean;
521
+ }): {
522
+ nodes: WorkflowNodeEntity[];
523
+ edges: WorkflowLineEntity[];
524
+ };
487
525
  private getNodeSubCanvas;
488
526
  private getNodeChildren;
489
527
  private toLineJSON;
@@ -518,11 +556,12 @@ declare class WorkflowLinesManager {
518
556
  get lineColor(): LineColor;
519
557
  switchLineType(newType?: LineRenderType): LineRenderType;
520
558
  getAllLines(): WorkflowLineEntity[];
521
- hasLine(portInfo: WorkflowLinePortInfo): boolean;
522
- getLine(portInfo: WorkflowLinePortInfo): WorkflowLineEntity | undefined;
523
- replaceLine(oldPortInfo: WorkflowLinePortInfo, newPortInfo: WorkflowLinePortInfo): WorkflowLineEntity;
559
+ hasLine(portInfo: Omit<WorkflowLinePortInfo, 'data'>): boolean;
560
+ getLine(portInfo: Omit<WorkflowLinePortInfo, 'data'>): WorkflowLineEntity | undefined;
561
+ getLineById(id: string): WorkflowLineEntity | undefined;
562
+ replaceLine(oldPortInfo: Omit<WorkflowLinePortInfo, 'data'>, newPortInfo: Omit<WorkflowLinePortInfo, 'data'>): WorkflowLineEntity;
524
563
  createLine(options: {
525
- drawingTo?: IPoint;
564
+ drawingTo?: LinePoint;
526
565
  key?: string;
527
566
  } & WorkflowLinePortInfo): WorkflowLineEntity | undefined;
528
567
  /**
@@ -543,14 +582,13 @@ declare class WorkflowLinesManager {
543
582
  isHideArrowLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
544
583
  isFlowingLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
545
584
  isDisabledLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
546
- isVerticalLine(line: WorkflowLineEntity, defaultValue?: boolean): boolean;
547
585
  setLineRenderType(line: WorkflowLineEntity): LineRenderType | undefined;
548
586
  setLineClassName(line: WorkflowLineEntity): string | undefined;
549
587
  getLineColor(line: WorkflowLineEntity): string | undefined;
550
588
  canAddLine(fromPort: WorkflowPortEntity, toPort: WorkflowPortEntity, silent?: boolean): boolean;
551
589
  toJSON(): WorkflowEdgeJSON[];
552
590
  getPortById(portId: string): WorkflowPortEntity | undefined;
553
- canRemove(line: WorkflowLineEntity, newLineInfo?: Required<WorkflowLinePortInfo>, silent?: boolean): boolean;
591
+ canRemove(line: WorkflowLineEntity, newLineInfo?: Required<Omit<WorkflowLinePortInfo, 'data'>>, silent?: boolean): boolean;
554
592
  canReset(fromPort: WorkflowPortEntity, oldToPort: WorkflowPortEntity, newToPort: WorkflowPortEntity): boolean;
555
593
  /**
556
594
  * 根据鼠标位置找到 port
@@ -586,6 +624,25 @@ interface WorkflowPort {
586
624
  * 没有代表 默认连接点,默认 input 类型 为最左边中心,output 类型为最右边中心
587
625
  */
588
626
  portID?: string | number;
627
+ /**
628
+ * 输入或者输出点
629
+ */
630
+ type: WorkflowPortType;
631
+ /**
632
+ * 端口位置
633
+ */
634
+ location?: LinePointLocation;
635
+ /**
636
+ * 端口热区大小
637
+ */
638
+ size?: {
639
+ width: number;
640
+ height: number;
641
+ };
642
+ /**
643
+ * 相对于 position 的偏移
644
+ */
645
+ offset?: IPoint;
589
646
  /**
590
647
  * 禁用端口
591
648
  */
@@ -594,10 +651,6 @@ interface WorkflowPort {
594
651
  * 将点位渲染到该父节点上
595
652
  */
596
653
  targetElement?: HTMLElement;
597
- /**
598
- * 输入或者输出点
599
- */
600
- type: WorkflowPortType;
601
654
  }
602
655
  type WorkflowPorts = WorkflowPort[];
603
656
  interface WorkflowPortEntityOpts extends EntityOpts, WorkflowPort {
@@ -612,25 +665,27 @@ interface WorkflowPortEntityOpts extends EntityOpts, WorkflowPort {
612
665
  declare class WorkflowPortEntity extends Entity<WorkflowPortEntityOpts> {
613
666
  static type: string;
614
667
  readonly node: WorkflowNodeEntity;
615
- targetElement?: HTMLElement;
616
668
  readonly portID: string | number;
617
- readonly _disabled: boolean;
669
+ readonly portType: WorkflowPortType;
670
+ private _disabled?;
618
671
  private _hasError;
672
+ private _location?;
673
+ private _size?;
674
+ private _offset?;
619
675
  protected readonly _onErrorChangedEmitter: Emitter<void>;
620
676
  onErrorChanged: _flowgram_ai_utils.Event<void>;
621
- /**
622
- * port 类型
623
- */
624
- portType: WorkflowPortType;
677
+ targetElement?: HTMLElement;
625
678
  static getPortEntityId(node: WorkflowNodeEntity, portType: WorkflowPortType, portID?: string | number): string;
679
+ get position(): LinePointLocation | undefined;
626
680
  constructor(opts: WorkflowPortEntityOpts);
627
681
  get hasError(): boolean;
628
682
  set hasError(hasError: boolean);
629
683
  validate(): void;
630
684
  isErrorPort(): boolean;
631
- get point(): IPoint;
685
+ get location(): LinePointLocation;
686
+ get point(): LinePoint;
632
687
  /**
633
- * 点的区域
688
+ * 端口热区
634
689
  */
635
690
  get bounds(): Rectangle;
636
691
  isHovered(x: number, y: number): boolean;
@@ -656,14 +711,10 @@ declare class WorkflowPortEntity extends Entity<WorkflowPortEntityOpts> {
656
711
  * 当前点位上连接的线条(包含 isDrawing === true 的线条)
657
712
  */
658
713
  get allLines(): WorkflowLineEntity[];
714
+ update(data: Exclude<WorkflowPort, 'portID' | 'type'>): void;
659
715
  dispose(): void;
660
716
  }
661
717
 
662
- /**
663
- * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
664
- * SPDX-License-Identifier: MIT
665
- */
666
-
667
718
  declare const LINE_HOVER_DISTANCE = 8;
668
719
  declare const POINT_RADIUS = 10;
669
720
  interface WorkflowLinePortInfo {
@@ -671,25 +722,74 @@ interface WorkflowLinePortInfo {
671
722
  to?: string;
672
723
  fromPort?: string | number;
673
724
  toPort?: string | number;
725
+ data?: any;
674
726
  }
675
727
  interface WorkflowLineEntityOpts extends EntityOpts, WorkflowLinePortInfo {
676
728
  document: WorkflowDocument;
677
729
  linesManager: WorkflowLinesManager;
678
- drawingTo?: IPoint;
730
+ drawingTo?: LinePoint;
679
731
  }
680
732
  interface WorkflowLineInfo extends WorkflowLinePortInfo {
681
- drawingTo?: IPoint;
682
- isDefaultLine?: boolean;
733
+ drawingTo?: LinePoint;
683
734
  }
684
735
  interface WorkflowLineUIState {
736
+ /**
737
+ * 是否出错
738
+ */
685
739
  hasError: boolean;
740
+ /**
741
+ * 流动
742
+ */
686
743
  flowing: boolean;
744
+ /**
745
+ * 禁用
746
+ */
687
747
  disabled: boolean;
688
- vertical: boolean;
748
+ /**
749
+ * 箭头反转
750
+ */
689
751
  reverse: boolean;
752
+ /**
753
+ * 隐藏箭头
754
+ */
690
755
  hideArrow: boolean;
756
+ /**
757
+ * 线条宽度
758
+ * @default 2
759
+ */
760
+ strokeWidth?: number;
761
+ /**
762
+ * 选中后的线条宽度
763
+ * @default 3
764
+ */
765
+ strokeWidthSelected?: number;
766
+ /**
767
+ * 收缩
768
+ * @default 10
769
+ */
770
+ shrink: number;
771
+ /**
772
+ * @deprecated use `lockedColor` instead
773
+ */
691
774
  highlightColor: string;
775
+ /**
776
+ * 曲率
777
+ * only for Bezier,
778
+ * @default 0.25
779
+ */
780
+ curvature: number;
781
+ /**
782
+ * Line locked color
783
+ */
692
784
  lockedColor: string;
785
+ /**
786
+ * React className
787
+ */
788
+ className?: string;
789
+ /**
790
+ * React style
791
+ */
792
+ style?: React.CSSProperties;
693
793
  }
694
794
  /**
695
795
  * 线条
@@ -701,8 +801,13 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
701
801
  * @param info
702
802
  */
703
803
  static portInfoToLineId(info: WorkflowLinePortInfo): string;
804
+ private _onLineDataChangeEmitter;
704
805
  readonly document: WorkflowDocument;
705
806
  readonly linesManager: WorkflowLinesManager;
807
+ readonly onLineDataChange: _flowgram_ai_utils.Event<{
808
+ oldValue: any;
809
+ newValue: any;
810
+ }>;
706
811
  private _from;
707
812
  private _to?;
708
813
  private _lineData;
@@ -724,7 +829,7 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
724
829
  * 更新线条扩展数据
725
830
  * @param data
726
831
  */
727
- set lineData(data: any);
832
+ set lineData(newValue: any);
728
833
  stackIndex: number;
729
834
  /**
730
835
  * 线条数据
@@ -748,12 +853,12 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
748
853
  get inContainer(): boolean;
749
854
  /**
750
855
  * 获取是否 testrun processing
751
- * @deprecated use `uiState.flowing` instead
856
+ * @deprecated use `flowing` instead
752
857
  */
753
858
  get processing(): boolean;
754
859
  /**
755
860
  * 设置 testrun processing 状态
756
- * @deprecated use `uiState.flowing` instead
861
+ * @deprecated use `flowing` instead
757
862
  */
758
863
  set processing(status: boolean);
759
864
  get hasError(): boolean;
@@ -765,11 +870,11 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
765
870
  /**
766
871
  * 设置线条画线时的目标位置
767
872
  */
768
- set drawingTo(pos: IPoint | undefined);
873
+ set drawingTo(pos: LinePoint | undefined);
769
874
  /**
770
875
  * 获取线条正在画线的位置
771
876
  */
772
- get drawingTo(): IPoint | undefined;
877
+ get drawingTo(): LinePoint | undefined;
773
878
  get highlightColor(): string;
774
879
  set highlightColor(highlightColor: string);
775
880
  get lockedColor(): string;
@@ -778,6 +883,7 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
778
883
  * 获取线条的边框位置大小
779
884
  */
780
885
  get bounds(): Rectangle;
886
+ get center(): LineCenterPoint;
781
887
  /**
782
888
  * 获取点和线最接近的距离
783
889
  */
@@ -794,6 +900,7 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
794
900
  get hideArrow(): boolean;
795
901
  /** 是否流动 */
796
902
  get flowing(): boolean;
903
+ set flowing(flowing: boolean);
797
904
  /** 是否禁用 */
798
905
  get disabled(): boolean;
799
906
  /** 是否竖向 */
@@ -801,7 +908,7 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
801
908
  /** 获取线条渲染器类型 */
802
909
  get renderType(): LineRenderType | undefined;
803
910
  /** 获取线条样式 */
804
- get className(): string | undefined;
911
+ get className(): string;
805
912
  get color(): string | undefined;
806
913
  /**
807
914
  * 初始化线条
@@ -822,4 +929,4 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
822
929
  fireRender(): void;
823
930
  }
824
931
 
825
- 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, type WorkflowLineUIState as G, PORT_SIZE as H, type WorkflowPortEntityOpts as I, type WorkflowEntityHoverable as J, type HoverPosition as K, type LineEventProps as L, type WorkfloEntityHoverable as M, type NodesDragEvent as N, type OnDragLineEnd as O, POINT_RADIUS as P, WorkflowDocumentProvider as Q, WorkflowDocumentOptionsDefault as R, 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 WorkflowJSON as h, type WorkflowPorts as i, type WorkflowPortType as j, type WorkflowPort as k, type LineRenderType as l, type WorkflowLineRenderContribution as m, type LinePosition as n, getPortEntityId as o, WORKFLOW_LINE_ENTITY as p, domReactToBounds 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 };
932
+ export { type WorkflowLineRenderContributionFactory as A, type NodesDragStartEvent as B, type NodesDragEndEvent as C, type NodesDraggingEvent as D, type onDragLineEndParams as E, LINE_HOVER_DISTANCE as F, type WorkflowLinePortInfo as G, type WorkflowLineEntityOpts as H, type WorkflowLineInfo as I, type WorkflowLineUIState as J, PORT_SIZE as K, type LineEventProps as L, type WorkflowPortEntityOpts as M, type NodesDragEvent as N, type OnDragLineEnd as O, POINT_RADIUS as P, type WorkflowEntityHoverable as Q, type HoverPosition as R, type WorkfloEntityHoverable as S, WorkflowDocumentProvider as T, WorkflowDocumentOptionsDefault as U, 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 WorkflowJSON as h, type LineCenterPoint as i, type WorkflowPorts as j, type WorkflowPortType as k, type LinePoint as l, type WorkflowPort as m, type LineRenderType as n, type WorkflowLineRenderContribution as o, type LinePosition as p, getPortEntityId as q, WORKFLOW_LINE_ENTITY as r, domReactToBounds as s, WorkflowContentChangeType as t, type WorkflowContentChangeEvent as u, type WorkflowNodeMeta as v, LineType as w, type LinePointLocation 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": "0.1.0-alpha.12",
3
+ "version": "0.1.0-alpha.14",
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.12",
38
- "@flowgram.ai/document": "0.1.0-alpha.12",
39
- "@flowgram.ai/form-core": "0.1.0-alpha.12",
40
- "@flowgram.ai/node": "0.1.0-alpha.12",
41
- "@flowgram.ai/utils": "0.1.0-alpha.12",
42
- "@flowgram.ai/reactive": "0.1.0-alpha.12"
37
+ "@flowgram.ai/core": "0.1.0-alpha.14",
38
+ "@flowgram.ai/document": "0.1.0-alpha.14",
39
+ "@flowgram.ai/node": "0.1.0-alpha.14",
40
+ "@flowgram.ai/form-core": "0.1.0-alpha.14",
41
+ "@flowgram.ai/reactive": "0.1.0-alpha.14",
42
+ "@flowgram.ai/utils": "0.1.0-alpha.14"
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": "^0.34.6",
56
- "@flowgram.ai/eslint-config": "0.1.0-alpha.12",
57
- "@flowgram.ai/ts-config": "0.1.0-alpha.12"
56
+ "@flowgram.ai/eslint-config": "0.1.0-alpha.14",
57
+ "@flowgram.ai/ts-config": "0.1.0-alpha.14"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "react": ">=16.8",
@@ -1 +0,0 @@
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":";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"]}