@flowgram.ai/free-layout-core 0.5.5 → 0.5.7

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/esm/index.js CHANGED
@@ -1423,10 +1423,7 @@ import {
1423
1423
  delay as delay2,
1424
1424
  Point
1425
1425
  } from "@flowgram.ai/utils";
1426
- import {
1427
- FlowNodeTransformData as FlowNodeTransformData6,
1428
- FlowOperationBaseService
1429
- } from "@flowgram.ai/document";
1426
+ import { FlowNodeTransformData as FlowNodeTransformData6 } from "@flowgram.ai/document";
1430
1427
  import { FlowNodeBaseType as FlowNodeBaseType3 } from "@flowgram.ai/document";
1431
1428
  import {
1432
1429
  CommandService,
@@ -3108,20 +3105,16 @@ var WorkflowDragService = class {
3108
3105
  })
3109
3106
  );
3110
3107
  const containerTransform = container.getData(TransformData8);
3111
- containerTransform.update({
3112
- position: {
3113
- x: containerTransform.position.x + bounds.x,
3114
- y: containerTransform.position.y + bounds.y
3115
- }
3108
+ this.operationService.updateNodePosition(container, {
3109
+ x: containerTransform.position.x + bounds.x,
3110
+ y: containerTransform.position.y + bounds.y
3116
3111
  });
3117
3112
  this.document.layout.updateAffectedTransform(container);
3118
3113
  container.blocks.forEach((node) => {
3119
3114
  const transform = node.getData(TransformData8);
3120
- transform.update({
3121
- position: {
3122
- x: transform.position.x - bounds.x,
3123
- y: transform.position.y - bounds.y
3124
- }
3115
+ this.operationService.updateNodePosition(node, {
3116
+ x: transform.position.x - bounds.x,
3117
+ y: transform.position.y - bounds.y
3125
3118
  });
3126
3119
  this.document.layout.updateAffectedTransform(node);
3127
3120
  });
@@ -3442,7 +3435,7 @@ __decorateClass([
3442
3435
  inject6(WorkflowSelectService)
3443
3436
  ], WorkflowDragService.prototype, "selectService", 2);
3444
3437
  __decorateClass([
3445
- inject6(FlowOperationBaseService)
3438
+ inject6(WorkflowOperationBaseService)
3446
3439
  ], WorkflowDragService.prototype, "operationService", 2);
3447
3440
  __decorateClass([
3448
3441
  inject6(WorkflowDocumentOptions)
@@ -3669,7 +3662,7 @@ function usePlaygroundReadonlyState(listenChange) {
3669
3662
  function checkTargetDraggable(el) {
3670
3663
  return el && el.tagName !== "INPUT" && el.tagName !== "TEXTAREA" && !el.closest(".flow-canvas-not-draggable");
3671
3664
  }
3672
- var isFirefox = navigator?.userAgent?.includes?.("Firefox");
3665
+ var isFirefox = typeof navigator !== "undefined" && navigator?.userAgent?.includes?.("Firefox");
3673
3666
  function useNodeRender(nodeFromProps) {
3674
3667
  const node = nodeFromProps || useContext(PlaygroundEntityContext);
3675
3668
  const renderData = node.getData(FlowNodeRenderData3);