@flowgram.ai/free-layout-core 0.2.10 → 0.2.12

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 { 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-BGD6_sdy.mjs';
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-B34FWw9W.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';
@@ -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-OFVYg40b.js';
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-B4Mfa03B.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-BGD6_sdy.mjs';
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-B34FWw9W.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-OFVYg40b.js';
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-B4Mfa03B.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-BGD6_sdy.mjs';
2
+ export { s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, q as WorkflowJSON } from '../workflow-line-entity-B34FWw9W.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-OFVYg40b.js';
2
+ export { s as WorkflowContentChangeEvent, r as WorkflowContentChangeType, q as WorkflowJSON } from '../workflow-line-entity-B4Mfa03B.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-BGD6_sdy.mjs';
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-B34FWw9W.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-OFVYg40b.js';
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-B4Mfa03B.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-BGD6_sdy.mjs';
4
+ export { e as WorkflowNodeJSON, t as WorkflowNodeMeta } from '../workflow-line-entity-B34FWw9W.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-OFVYg40b.js';
4
+ export { e as WorkflowNodeJSON, t as WorkflowNodeMeta } from '../workflow-line-entity-B4Mfa03B.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-BGD6_sdy.mjs';
5
+ import { t as WorkflowNodeMeta } from '../workflow-line-entity-B34FWw9W.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-OFVYg40b.js';
5
+ import { t as WorkflowNodeMeta } from '../workflow-line-entity-B4Mfa03B.js';
6
6
  import '@flowgram.ai/utils';
7
7
  import '@flowgram.ai/core';
8
8
  import './workflow-edge.js';
@@ -217,6 +217,10 @@ declare const WorkflowDocumentOptionsDefault: WorkflowDocumentOptions;
217
217
  * 可 Hover 的节点 类型
218
218
  */
219
219
  type WorkflowEntityHoverable = WorkflowNodeEntity | WorkflowLineEntity | WorkflowPortEntity;
220
+ interface HoverPosition {
221
+ position: PositionSchema;
222
+ target?: HTMLElement;
223
+ }
220
224
  /** @deprecated */
221
225
  type WorkfloEntityHoverable = WorkflowEntityHoverable;
222
226
  /**
@@ -225,8 +229,10 @@ type WorkfloEntityHoverable = WorkflowEntityHoverable;
225
229
  declare class WorkflowHoverService {
226
230
  protected entityManager: EntityManager;
227
231
  protected onHoveredChangeEmitter: Emitter<string>;
232
+ protected onUpdateHoverPositionEmitter: Emitter<HoverPosition>;
228
233
  readonly onHoveredChange: _flowgram_ai_utils.Event<string>;
229
- hoveredPos: IPoint;
234
+ readonly onUpdateHoverPosition: _flowgram_ai_utils.Event<HoverPosition>;
235
+ hoveredPos: PositionSchema;
230
236
  /**
231
237
  * 当前 hovered 的 节点或者线条或者点
232
238
  * 1: nodeId / lineId (节点 / 线条)
@@ -238,6 +244,7 @@ declare class WorkflowHoverService {
238
244
  * @param hoveredKey hovered key
239
245
  */
240
246
  updateHoveredKey(hoveredKey: string): void;
247
+ updateHoverPosition(position: PositionSchema, target?: HTMLElement): void;
241
248
  /**
242
249
  * 清空 hover 内容
243
250
  */
@@ -720,4 +727,4 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
720
727
  fireRender(): void;
721
728
  }
722
729
 
723
- 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 };
730
+ 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 HoverPosition as J, type WorkfloEntityHoverable as K, type LineEventProps as L, WorkflowDocumentProvider as M, type NodesDragEvent as N, type OnDragLineEnd as O, POINT_RADIUS as P, WorkflowDocumentOptionsDefault as Q, 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 };
@@ -217,6 +217,10 @@ declare const WorkflowDocumentOptionsDefault: WorkflowDocumentOptions;
217
217
  * 可 Hover 的节点 类型
218
218
  */
219
219
  type WorkflowEntityHoverable = WorkflowNodeEntity | WorkflowLineEntity | WorkflowPortEntity;
220
+ interface HoverPosition {
221
+ position: PositionSchema;
222
+ target?: HTMLElement;
223
+ }
220
224
  /** @deprecated */
221
225
  type WorkfloEntityHoverable = WorkflowEntityHoverable;
222
226
  /**
@@ -225,8 +229,10 @@ type WorkfloEntityHoverable = WorkflowEntityHoverable;
225
229
  declare class WorkflowHoverService {
226
230
  protected entityManager: EntityManager;
227
231
  protected onHoveredChangeEmitter: Emitter<string>;
232
+ protected onUpdateHoverPositionEmitter: Emitter<HoverPosition>;
228
233
  readonly onHoveredChange: _flowgram_ai_utils.Event<string>;
229
- hoveredPos: IPoint;
234
+ readonly onUpdateHoverPosition: _flowgram_ai_utils.Event<HoverPosition>;
235
+ hoveredPos: PositionSchema;
230
236
  /**
231
237
  * 当前 hovered 的 节点或者线条或者点
232
238
  * 1: nodeId / lineId (节点 / 线条)
@@ -238,6 +244,7 @@ declare class WorkflowHoverService {
238
244
  * @param hoveredKey hovered key
239
245
  */
240
246
  updateHoveredKey(hoveredKey: string): void;
247
+ updateHoverPosition(position: PositionSchema, target?: HTMLElement): void;
241
248
  /**
242
249
  * 清空 hover 内容
243
250
  */
@@ -720,4 +727,4 @@ declare class WorkflowLineEntity extends Entity<WorkflowLineEntityOpts> {
720
727
  fireRender(): void;
721
728
  }
722
729
 
723
- 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 };
730
+ 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 HoverPosition as J, type WorkfloEntityHoverable as K, type LineEventProps as L, WorkflowDocumentProvider as M, type NodesDragEvent as N, type OnDragLineEnd as O, POINT_RADIUS as P, WorkflowDocumentOptionsDefault as Q, 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.2.10",
3
+ "version": "0.2.12",
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.2.10",
38
- "@flowgram.ai/document": "0.2.10",
39
- "@flowgram.ai/form-core": "0.2.10",
40
- "@flowgram.ai/node": "0.2.10",
41
- "@flowgram.ai/reactive": "0.2.10",
42
- "@flowgram.ai/utils": "0.2.10"
37
+ "@flowgram.ai/core": "0.2.12",
38
+ "@flowgram.ai/document": "0.2.12",
39
+ "@flowgram.ai/node": "0.2.12",
40
+ "@flowgram.ai/form-core": "0.2.12",
41
+ "@flowgram.ai/utils": "0.2.12",
42
+ "@flowgram.ai/reactive": "0.2.12"
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/eslint-config": "0.2.10",
57
- "@flowgram.ai/ts-config": "0.2.10"
56
+ "@flowgram.ai/eslint-config": "0.2.12",
57
+ "@flowgram.ai/ts-config": "0.2.12"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "react": ">=16.8",