@flowgram.ai/free-layout-core 0.1.0-alpha.36 → 0.1.0-alpha.37

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, 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-DcXjib68.mjs';
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-BQBXdOoa.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, 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-_7O7-wJE.js';
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-Da9FrkWn.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, D as NodesDragEndEvent, N as NodesDragEvent, C as NodesDragStartEvent, E as NodesDraggingEvent, O as OnDragLineEnd, F as onDragLineEndParams } from '../workflow-node-entity-DcXjib68.mjs';
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-BQBXdOoa.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, D as NodesDragEndEvent, N as NodesDragEvent, C as NodesDragStartEvent, E as NodesDraggingEvent, O as OnDragLineEnd, F as onDragLineEndParams } from '../workflow-node-entity-_7O7-wJE.js';
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-Da9FrkWn.js';
6
6
  import '@flowgram.ai/form-core';
7
7
  import './workflow-edge.js';
@@ -1,4 +1,4 @@
1
- export { t as WorkflowContentChangeEvent, s as WorkflowContentChangeType, W as WorkflowJSON } from '../workflow-node-entity-DcXjib68.mjs';
1
+ export { t as WorkflowContentChangeEvent, s as WorkflowContentChangeType, W as WorkflowJSON } from '../workflow-node-entity-BQBXdOoa.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 { t as WorkflowContentChangeEvent, s as WorkflowContentChangeType, W as WorkflowJSON } from '../workflow-node-entity-_7O7-wJE.js';
1
+ export { t as WorkflowContentChangeEvent, s as WorkflowContentChangeType, W as WorkflowJSON } from '../workflow-node-entity-Da9FrkWn.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, 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-DcXjib68.mjs';
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-BQBXdOoa.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, 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-_7O7-wJE.js';
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-Da9FrkWn.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, u as WorkflowNodeMeta } from '../workflow-node-entity-DcXjib68.mjs';
3
+ export { h as WorkflowNodeJSON, u as WorkflowNodeMeta } from '../workflow-node-entity-BQBXdOoa.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, u as WorkflowNodeMeta } from '../workflow-node-entity-_7O7-wJE.js';
3
+ export { h as WorkflowNodeJSON, u as WorkflowNodeMeta } from '../workflow-node-entity-Da9FrkWn.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-DcXjib68.mjs';
3
+ import { W as WorkflowJSON } from '../workflow-node-entity-BQBXdOoa.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-_7O7-wJE.js';
3
+ import { W as WorkflowJSON } from '../workflow-node-entity-Da9FrkWn.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 { u as WorkflowNodeMeta, i as WorkflowPortEntity, d as WorkflowLinesManager, b as WorkflowNodeEntity } from '../workflow-node-entity-DcXjib68.mjs';
4
+ import { u as WorkflowNodeMeta, i as WorkflowPortEntity, d as WorkflowLinesManager, b as WorkflowNodeEntity } from '../workflow-node-entity-BQBXdOoa.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 { u as WorkflowNodeMeta, i as WorkflowPortEntity, d as WorkflowLinesManager, b as WorkflowNodeEntity } from '../workflow-node-entity-_7O7-wJE.js';
4
+ import { u as WorkflowNodeMeta, i as WorkflowPortEntity, d as WorkflowLinesManager, b as WorkflowNodeEntity } from '../workflow-node-entity-Da9FrkWn.js';
5
5
  import '@flowgram.ai/core';
6
6
  import '@flowgram.ai/utils';
7
7
  import 'react';
@@ -1,4 +1,4 @@
1
- export { B as WorkflowSubCanvas } from '../workflow-node-entity-DcXjib68.mjs';
1
+ export { B as WorkflowSubCanvas } from '../workflow-node-entity-BQBXdOoa.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 { B as WorkflowSubCanvas } from '../workflow-node-entity-_7O7-wJE.js';
1
+ export { B as WorkflowSubCanvas } from '../workflow-node-entity-Da9FrkWn.js';
2
2
  import '@flowgram.ai/document';
3
3
  import '@flowgram.ai/core';
4
4
  import '@flowgram.ai/utils';
@@ -589,6 +589,10 @@ declare class WorkflowLinesManager {
589
589
  private hoverNodesCache?;
590
590
  private hoverNodesCacheVersion?;
591
591
  private hoverNodesCacheActivatedID?;
592
+ private sortedNodeSpatialCache?;
593
+ private hoverNodeSpatialCache?;
594
+ private lineSpatialCache?;
595
+ private outsidePortNodesCache?;
592
596
  hoverService: WorkflowHoverService;
593
597
  selectService: WorkflowSelectService;
594
598
  protected readonly entityManager: EntityManager;
@@ -672,12 +676,26 @@ declare class WorkflowLinesManager {
672
676
  registerContribution(factory: WorkflowLineRenderContributionFactory): this;
673
677
  private registerData;
674
678
  private getSortedNodes;
679
+ private invalidateNodeHitCaches;
680
+ private invalidateLineHitCache;
681
+ private invalidateSpatialHitCaches;
675
682
  private getHoveredPortFromSortedNodes;
676
683
  private getHoveredPortsFromSortedNodes;
677
- private findHoveredPort;
684
+ private collectHoveredPorts;
678
685
  private filterCoveredPort;
679
686
  private getTopNodeFromSortedNodes;
680
687
  private getNodeHitInfoFromSortedNodes;
688
+ private getHoverNodeHitCandidates;
689
+ private getSortedNodeHitCandidates;
690
+ private getLineHitCandidates;
691
+ private createSpatialIndex;
692
+ private querySpatialIndex;
693
+ private getSpatialCell;
694
+ private getSpatialCellKey;
695
+ private canIndexBounds;
696
+ private isPointNearNodePorts;
697
+ private hasPortOutsideNodeBounds;
698
+ private getOutsidePortNodes;
681
699
  private getHoverNodes;
682
700
  private isPointInBounds;
683
701
  private getNodeIndex;
@@ -589,6 +589,10 @@ declare class WorkflowLinesManager {
589
589
  private hoverNodesCache?;
590
590
  private hoverNodesCacheVersion?;
591
591
  private hoverNodesCacheActivatedID?;
592
+ private sortedNodeSpatialCache?;
593
+ private hoverNodeSpatialCache?;
594
+ private lineSpatialCache?;
595
+ private outsidePortNodesCache?;
592
596
  hoverService: WorkflowHoverService;
593
597
  selectService: WorkflowSelectService;
594
598
  protected readonly entityManager: EntityManager;
@@ -672,12 +676,26 @@ declare class WorkflowLinesManager {
672
676
  registerContribution(factory: WorkflowLineRenderContributionFactory): this;
673
677
  private registerData;
674
678
  private getSortedNodes;
679
+ private invalidateNodeHitCaches;
680
+ private invalidateLineHitCache;
681
+ private invalidateSpatialHitCaches;
675
682
  private getHoveredPortFromSortedNodes;
676
683
  private getHoveredPortsFromSortedNodes;
677
- private findHoveredPort;
684
+ private collectHoveredPorts;
678
685
  private filterCoveredPort;
679
686
  private getTopNodeFromSortedNodes;
680
687
  private getNodeHitInfoFromSortedNodes;
688
+ private getHoverNodeHitCandidates;
689
+ private getSortedNodeHitCandidates;
690
+ private getLineHitCandidates;
691
+ private createSpatialIndex;
692
+ private querySpatialIndex;
693
+ private getSpatialCell;
694
+ private getSpatialCellKey;
695
+ private canIndexBounds;
696
+ private isPointNearNodePorts;
697
+ private hasPortOutsideNodeBounds;
698
+ private getOutsidePortNodes;
681
699
  private getHoverNodes;
682
700
  private isPointInBounds;
683
701
  private getNodeIndex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowgram.ai/free-layout-core",
3
- "version": "0.1.0-alpha.36",
3
+ "version": "0.1.0-alpha.37",
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.1.0-alpha.36",
38
- "@flowgram.ai/document": "0.1.0-alpha.36",
39
- "@flowgram.ai/form-core": "0.1.0-alpha.36",
40
- "@flowgram.ai/node": "0.1.0-alpha.36",
41
- "@flowgram.ai/reactive": "0.1.0-alpha.36",
42
- "@flowgram.ai/utils": "0.1.0-alpha.36"
37
+ "@flowgram.ai/core": "0.1.0-alpha.37",
38
+ "@flowgram.ai/document": "0.1.0-alpha.37",
39
+ "@flowgram.ai/node": "0.1.0-alpha.37",
40
+ "@flowgram.ai/form-core": "0.1.0-alpha.37",
41
+ "@flowgram.ai/reactive": "0.1.0-alpha.37",
42
+ "@flowgram.ai/utils": "0.1.0-alpha.37"
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.1.0-alpha.36",
57
- "@flowgram.ai/ts-config": "0.1.0-alpha.36"
56
+ "@flowgram.ai/eslint-config": "0.1.0-alpha.37",
57
+ "@flowgram.ai/ts-config": "0.1.0-alpha.37"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "react": ">=16.8",