@flowgram.ai/free-layout-core 0.4.1 → 0.4.3

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/index.d.mts CHANGED
@@ -2,8 +2,8 @@ import { PlaygroundConfigEntity, CommandService, PlaygroundDragEvent, EntityData
2
2
  export { bindConfigEntity, useConfigEntity, useEntities, useEntityDataFromContext, useEntityFromContext, useListenEvents, usePlayground, usePlaygroundContainer, usePlaygroundContext, usePlaygroundLatest, useRefresh, useService } from '@flowgram.ai/core';
3
3
  import { NodeFormProps } from '@flowgram.ai/node';
4
4
  import { FlowOperationBaseService, FlowNodeType, FlowOperationBaseServiceImpl, FlowNodeEntityOrId, FlowNodeEntity } from '@flowgram.ai/document';
5
- import { W as WorkflowHoverService, a as WorkflowDocument, b as WorkflowLinesManager, c as WorkflowSelectService, d as WorkflowDocumentOptions, L as LineEventProps, N as NodesDragEvent, e as WorkflowNodeJSON, f as WorkflowPortEntity, g as WorkflowLineEntity, O as OnDragLineEnd, h as WorkflowJSON, i as WorkflowPorts, j as WorkflowPortType, k as LinePoint, l as WorkflowPort, m as LineRenderType, n as WorkflowLineRenderContribution, o as LinePosition } from './workflow-line-entity-DSC3qPV1.mjs';
6
- export { Q as HoverPosition, E as LINE_HOVER_DISTANCE, x as LineColor, y as LineColors, w as LinePointLocation, v as LineType, B as NodesDragEndEvent, A as NodesDragStartEvent, C as NodesDraggingEvent, P as POINT_RADIUS, J as PORT_SIZE, q as WORKFLOW_LINE_ENTITY, R as WorkfloEntityHoverable, t as WorkflowContentChangeEvent, s as WorkflowContentChangeType, T as WorkflowDocumentOptionsDefault, S as WorkflowDocumentProvider, M as WorkflowEntityHoverable, G as WorkflowLineEntityOpts, H as WorkflowLineInfo, F as WorkflowLinePortInfo, z as WorkflowLineRenderContributionFactory, I as WorkflowLineUIState, u as WorkflowNodeMeta, K as WorkflowPortEntityOpts, r as domReactToBounds, p as getPortEntityId, D as onDragLineEndParams } from './workflow-line-entity-DSC3qPV1.mjs';
5
+ import { W as WorkflowHoverService, a as WorkflowDocument, b as WorkflowLinesManager, c as WorkflowSelectService, d as WorkflowDocumentOptions, L as LineEventProps, N as NodesDragEvent, e as WorkflowNodeJSON, f as WorkflowPortEntity, g as WorkflowLineEntity, O as OnDragLineEnd, h as WorkflowJSON, i as WorkflowPorts, j as WorkflowPortType, k as LinePoint, l as WorkflowPort, m as LineRenderType, n as WorkflowLineRenderContribution, o as LinePosition } from './workflow-line-entity-CauIz5GH.mjs';
6
+ export { Q as HoverPosition, E as LINE_HOVER_DISTANCE, x as LineColor, y as LineColors, w as LinePointLocation, v as LineType, B as NodesDragEndEvent, A as NodesDragStartEvent, C as NodesDraggingEvent, P as POINT_RADIUS, J as PORT_SIZE, q as WORKFLOW_LINE_ENTITY, R as WorkfloEntityHoverable, t as WorkflowContentChangeEvent, s as WorkflowContentChangeType, T as WorkflowDocumentOptionsDefault, S as WorkflowDocumentProvider, M as WorkflowEntityHoverable, G as WorkflowLineEntityOpts, H as WorkflowLineInfo, F as WorkflowLinePortInfo, z as WorkflowLineRenderContributionFactory, I as WorkflowLineUIState, u as WorkflowNodeMeta, K as WorkflowPortEntityOpts, r as domReactToBounds, p as getPortEntityId, D as onDragLineEndParams } from './workflow-line-entity-CauIz5GH.mjs';
7
7
  import { W as WorkflowNodeEntity } from './workflow-sub-canvas-IQzlYvPD.mjs';
8
8
  export { a as WorkflowSubCanvas } from './workflow-sub-canvas-IQzlYvPD.mjs';
9
9
  import * as _flowgram_ai_utils from '@flowgram.ai/utils';
package/dist/index.d.ts CHANGED
@@ -2,8 +2,8 @@ import { PlaygroundConfigEntity, CommandService, PlaygroundDragEvent, EntityData
2
2
  export { bindConfigEntity, useConfigEntity, useEntities, useEntityDataFromContext, useEntityFromContext, useListenEvents, usePlayground, usePlaygroundContainer, usePlaygroundContext, usePlaygroundLatest, useRefresh, useService } from '@flowgram.ai/core';
3
3
  import { NodeFormProps } from '@flowgram.ai/node';
4
4
  import { FlowOperationBaseService, FlowNodeType, FlowOperationBaseServiceImpl, FlowNodeEntityOrId, FlowNodeEntity } from '@flowgram.ai/document';
5
- import { W as WorkflowHoverService, a as WorkflowDocument, b as WorkflowLinesManager, c as WorkflowSelectService, d as WorkflowDocumentOptions, L as LineEventProps, N as NodesDragEvent, e as WorkflowNodeJSON, f as WorkflowPortEntity, g as WorkflowLineEntity, O as OnDragLineEnd, h as WorkflowJSON, i as WorkflowPorts, j as WorkflowPortType, k as LinePoint, l as WorkflowPort, m as LineRenderType, n as WorkflowLineRenderContribution, o as LinePosition } from './workflow-line-entity-I_VrhJ_t.js';
6
- export { Q as HoverPosition, E as LINE_HOVER_DISTANCE, x as LineColor, y as LineColors, w as LinePointLocation, v as LineType, B as NodesDragEndEvent, A as NodesDragStartEvent, C as NodesDraggingEvent, P as POINT_RADIUS, J as PORT_SIZE, q as WORKFLOW_LINE_ENTITY, R as WorkfloEntityHoverable, t as WorkflowContentChangeEvent, s as WorkflowContentChangeType, T as WorkflowDocumentOptionsDefault, S as WorkflowDocumentProvider, M as WorkflowEntityHoverable, G as WorkflowLineEntityOpts, H as WorkflowLineInfo, F as WorkflowLinePortInfo, z as WorkflowLineRenderContributionFactory, I as WorkflowLineUIState, u as WorkflowNodeMeta, K as WorkflowPortEntityOpts, r as domReactToBounds, p as getPortEntityId, D as onDragLineEndParams } from './workflow-line-entity-I_VrhJ_t.js';
5
+ import { W as WorkflowHoverService, a as WorkflowDocument, b as WorkflowLinesManager, c as WorkflowSelectService, d as WorkflowDocumentOptions, L as LineEventProps, N as NodesDragEvent, e as WorkflowNodeJSON, f as WorkflowPortEntity, g as WorkflowLineEntity, O as OnDragLineEnd, h as WorkflowJSON, i as WorkflowPorts, j as WorkflowPortType, k as LinePoint, l as WorkflowPort, m as LineRenderType, n as WorkflowLineRenderContribution, o as LinePosition } from './workflow-line-entity-DqPb9Odw.js';
6
+ export { Q as HoverPosition, E as LINE_HOVER_DISTANCE, x as LineColor, y as LineColors, w as LinePointLocation, v as LineType, B as NodesDragEndEvent, A as NodesDragStartEvent, C as NodesDraggingEvent, P as POINT_RADIUS, J as PORT_SIZE, q as WORKFLOW_LINE_ENTITY, R as WorkfloEntityHoverable, t as WorkflowContentChangeEvent, s as WorkflowContentChangeType, T as WorkflowDocumentOptionsDefault, S as WorkflowDocumentProvider, M as WorkflowEntityHoverable, G as WorkflowLineEntityOpts, H as WorkflowLineInfo, F as WorkflowLinePortInfo, z as WorkflowLineRenderContributionFactory, I as WorkflowLineUIState, u as WorkflowNodeMeta, K as WorkflowPortEntityOpts, r as domReactToBounds, p as getPortEntityId, D as onDragLineEndParams } from './workflow-line-entity-DqPb9Odw.js';
7
7
  import { W as WorkflowNodeEntity } from './workflow-sub-canvas-IQzlYvPD.js';
8
8
  export { a as WorkflowSubCanvas } from './workflow-sub-canvas-IQzlYvPD.js';
9
9
  import * as _flowgram_ai_utils from '@flowgram.ai/utils';
package/dist/index.js CHANGED
@@ -2473,9 +2473,18 @@ var WorkflowDocument = class extends import_document8.FlowDocument {
2473
2473
  this._onReloadEmitter.dispose();
2474
2474
  }
2475
2475
  /**
2476
- * 逐层创建节点和线条
2476
+ * 批量添加节点
2477
+ * @deprecated use 'batchAddFromJSON' instead
2478
+ * @param json
2479
+ * @param options
2477
2480
  */
2478
2481
  renderJSON(json, options) {
2482
+ return this.batchAddFromJSON(json, options);
2483
+ }
2484
+ /**
2485
+ * 批量添加节点
2486
+ */
2487
+ batchAddFromJSON(json, options) {
2479
2488
  const { parent = this.root, isClone = false } = options ?? {};
2480
2489
  const containerID = this.getNodeSubCanvas(parent)?.canvasNode.id ?? parent.id;
2481
2490
  const processedJSON = buildGroupJSON(json);