@inditextech/weave-sdk 0.52.3 → 0.54.0

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/sdk.js CHANGED
@@ -15494,7 +15494,6 @@ var require_lodash = __commonJS({ "../../node_modules/lodash/lodash.js"(exports,
15494
15494
  } else root._ = _;
15495
15495
  }).call(exports);
15496
15496
  } });
15497
- var import_lodash$1 = __toESM(require_lodash());
15498
15497
  var import_lodash = __toESM(require_lodash(), 1);
15499
15498
 
15500
15499
  //#endregion
@@ -15589,12 +15588,12 @@ var WeaveStore = class {
15589
15588
  node: JSON.parse(JSON.stringify(nodeInfo.node))
15590
15589
  });
15591
15590
  }
15592
- if (!this.isRoomLoaded && !(0, import_lodash$1.isEmpty)(this.state.weave)) {
15591
+ if (!this.isRoomLoaded && !(0, import_lodash.isEmpty)(this.state.weave)) {
15593
15592
  this.instance.setupRenderer();
15594
15593
  this.isRoomLoaded = true;
15595
15594
  this.instance.emitEvent("onRoomLoaded", this.isRoomLoaded);
15596
15595
  }
15597
- if (this.isRoomLoaded && !(0, import_lodash$1.isEmpty)(this.state.weave)) this.instance.render();
15596
+ if (this.isRoomLoaded && !(0, import_lodash.isEmpty)(this.state.weave)) this.instance.render();
15598
15597
  });
15599
15598
  }
15600
15599
  canUndoStateStep() {
@@ -15926,6 +15925,27 @@ function getTopmostShadowHost(el) {
15926
15925
  }
15927
15926
  return current?.shadowRoot || null;
15928
15927
  }
15928
+ function getVisibleNodes(instance, stage, nodeParent, skipNodes, referenceLayer) {
15929
+ const nodesSelection = instance.getPlugin("nodesSelection");
15930
+ if (nodesSelection) nodesSelection.getTransformer().hide();
15931
+ const nodes = getVisibleNodesInViewport(stage, referenceLayer);
15932
+ const finalVisibleNodes = [];
15933
+ nodes.forEach((node) => {
15934
+ const actualNodeParent = instance.getNodeContainer(node);
15935
+ if (actualNodeParent?.getAttrs().id !== nodeParent?.getAttrs().id) return;
15936
+ if (node.getParent()?.getAttrs().nodeType === "group") return;
15937
+ if (skipNodes.includes(node.getParent()?.getAttrs().nodeId)) return;
15938
+ if (skipNodes.includes(node.getAttrs().id ?? "")) return;
15939
+ if (node.getParent() !== referenceLayer && !node.getParent()?.getAttrs().nodeId) return;
15940
+ if (node.getParent() !== referenceLayer && node.getParent()?.getAttrs().nodeId) {
15941
+ const realNode = stage.findOne(`#${node.getParent()?.getAttrs().nodeId}`);
15942
+ if (realNode && realNode !== referenceLayer) return;
15943
+ }
15944
+ finalVisibleNodes.push(node);
15945
+ });
15946
+ if (nodesSelection) nodesSelection.getTransformer().show();
15947
+ return finalVisibleNodes;
15948
+ }
15929
15949
 
15930
15950
  //#endregion
15931
15951
  //#region src/actions/selection-tool/constants.ts
@@ -16161,6 +16181,22 @@ const NODE_SNAP = {
16161
16181
  const WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY = "nodesDistanceSnapping";
16162
16182
  const GUIDE_HORIZONTAL_LINE_NAME = "guide-distance-snapping-horizontal-line";
16163
16183
  const GUIDE_VERTICAL_LINE_NAME = "guide-distance-snapping-vertical-line";
16184
+ const GUIDE_DISTANCE_LINE_DEFAULT_CONFIG = {
16185
+ line: {
16186
+ stroke: "#E12D3C",
16187
+ strokeWidth: 1
16188
+ },
16189
+ label: {
16190
+ linePadding: 10,
16191
+ height: 20,
16192
+ cornerRadius: 0,
16193
+ fill: "#E12D3C",
16194
+ fontStyle: "normal",
16195
+ fontSize: 14,
16196
+ fontFamily: "Arial",
16197
+ paddingX: 4
16198
+ }
16199
+ };
16164
16200
  const GUIDE_ENTER_SNAPPING_TOLERANCE = 3;
16165
16201
  const GUIDE_EXIT_SNAPPING_TOLERANCE = 5;
16166
16202
  const NODE_SNAP_HORIZONTAL = {
@@ -16359,7 +16395,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
16359
16395
  if (moved) this.getContextMenuPlugin()?.cancelLongPressTimer();
16360
16396
  this.triggerSelectedNodesEvent();
16361
16397
  };
16362
- tr.on("transform", (0, import_lodash$1.throttle)(handleTransform, 50));
16398
+ tr.on("transform", (0, import_lodash.throttle)(handleTransform, 50));
16363
16399
  tr.on("transformend", () => {
16364
16400
  this.triggerSelectedNodesEvent();
16365
16401
  });
@@ -16944,12 +16980,24 @@ const COPY_PASTE_NODES_PLUGIN_STATE = {
16944
16980
  ["IDLE"]: "idle",
16945
16981
  ["PASTING"]: "pasting"
16946
16982
  };
16983
+ const WEAVE_COPY_PASTE_CONFIG_DEFAULT = { paddingOnPaste: {
16984
+ enabled: false,
16985
+ paddingX: 0,
16986
+ paddingY: 0
16987
+ } };
16947
16988
 
16948
16989
  //#endregion
16949
16990
  //#region src/plugins/copy-paste-nodes/copy-paste-nodes.ts
16950
16991
  var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
16951
- constructor() {
16992
+ constructor(params) {
16952
16993
  super();
16994
+ this.config = {
16995
+ ...WEAVE_COPY_PASTE_CONFIG_DEFAULT,
16996
+ ...params?.config
16997
+ };
16998
+ this.actualInternalPaddingX = 0;
16999
+ this.actualInternalPaddingY = 0;
17000
+ this.lastInternalPasteSnapshot = "";
16953
17001
  this.state = COPY_PASTE_NODES_PLUGIN_STATE.IDLE;
16954
17002
  }
16955
17003
  getName() {
@@ -17007,6 +17055,20 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
17007
17055
  const catcher = this.getCatcherElement();
17008
17056
  catcher?.focus();
17009
17057
  }
17058
+ checkIfInternalElementsAreNew(newData) {
17059
+ if (!this.config.paddingOnPaste.enabled) return false;
17060
+ if (this.lastInternalPasteSnapshot !== newData) {
17061
+ this.lastInternalPasteSnapshot = newData;
17062
+ return true;
17063
+ }
17064
+ return false;
17065
+ }
17066
+ updateInternalPastePadding() {
17067
+ if (this.config.paddingOnPaste.enabled) {
17068
+ this.actualInternalPaddingX = this.actualInternalPaddingX + this.config.paddingOnPaste.paddingX;
17069
+ this.actualInternalPaddingY = this.actualInternalPaddingY + this.config.paddingOnPaste.paddingY;
17070
+ }
17071
+ }
17010
17072
  initEvents() {
17011
17073
  const stage = this.instance.getStage();
17012
17074
  this.createPasteCatcher();
@@ -17100,6 +17162,12 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
17100
17162
  const stage = this.instance.getStage();
17101
17163
  if (this.toPaste) {
17102
17164
  const nodesToSelect = [];
17165
+ const newElements = this.checkIfInternalElementsAreNew(JSON.stringify(this.toPaste));
17166
+ if (this.config.paddingOnPaste.enabled && newElements) {
17167
+ this.actualInternalPaddingX = 0;
17168
+ this.actualInternalPaddingY = 0;
17169
+ }
17170
+ this.updateInternalPastePadding();
17103
17171
  for (const element of Object.keys(this.toPaste.weave)) {
17104
17172
  const node = this.toPaste.weave[element].element;
17105
17173
  const posRelativeToSelection = this.toPaste.weave[element].posRelativeToSelection;
@@ -17117,8 +17185,8 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
17117
17185
  const scale = stage.scaleX();
17118
17186
  const stagePos = stage.position();
17119
17187
  localPos = {
17120
- x: (localPos.x - stagePos.x) / scale,
17121
- y: (localPos.y - stagePos.y) / scale
17188
+ x: (localPos.x - stagePos.x + (this.config.paddingOnPaste.enabled ? this.actualInternalPaddingX : 0)) / scale,
17189
+ y: (localPos.y - stagePos.y + (this.config.paddingOnPaste.enabled ? this.actualInternalPaddingY : 0)) / scale
17122
17190
  };
17123
17191
  }
17124
17192
  if (container && container.getAttrs().nodeType === "frame") {
@@ -17131,15 +17199,27 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
17131
17199
  node.props.x = localPos.x + realOffset.x + posRelativeToSelection.x;
17132
17200
  node.props.y = localPos.y + realOffset.y + posRelativeToSelection.y;
17133
17201
  }
17202
+ } else {
17203
+ const nodeHandler = this.instance.getNodeHandler(node.props.nodeType ?? "");
17204
+ if (nodeHandler) {
17205
+ node.props.x = node.props.x + (this.config.paddingOnPaste.enabled ? this.actualInternalPaddingX : 0);
17206
+ node.props.y = node.props.y + (this.config.paddingOnPaste.enabled ? this.actualInternalPaddingY : 0);
17207
+ }
17134
17208
  }
17135
17209
  this.instance.addNode(node, containerId);
17136
17210
  const realNode = this.instance.getStage().findOne(`#${newNodeId}`);
17137
17211
  if (realNode) nodesToSelect.push(realNode);
17138
- this.instance.emitEvent("onPaste");
17139
17212
  }
17140
- this.instance.emitEvent("onPaste", void 0);
17213
+ this.instance.emitEvent("onPaste", {
17214
+ error: void 0,
17215
+ pastedNodes: nodesToSelect.map((n) => n.getAttrs().id ?? "")
17216
+ });
17141
17217
  const nodesSelectionPlugin = this.getNodesSelectionPlugin();
17142
17218
  nodesSelectionPlugin?.setSelectedNodes(nodesToSelect);
17219
+ this.instance?.triggerAction("fitToSelectionTool", {
17220
+ previousAction: "selectionTool",
17221
+ smartZoom: true
17222
+ });
17143
17223
  this.toPaste = void 0;
17144
17224
  }
17145
17225
  this.cancel();
@@ -17185,9 +17265,12 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
17185
17265
  }
17186
17266
  try {
17187
17267
  await this.writeClipboardData(JSON.stringify(copyClipboard));
17268
+ this.actualInternalPaddingX = 0;
17269
+ this.actualInternalPaddingY = 0;
17270
+ this.lastInternalPasteSnapshot = "";
17188
17271
  this.instance.emitEvent("onCopy");
17189
17272
  } catch (ex) {
17190
- this.instance.emitEvent("onCopy", ex);
17273
+ this.instance.emitEvent("onCopy", { error: ex });
17191
17274
  }
17192
17275
  }
17193
17276
  async copy() {
@@ -17203,7 +17286,7 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
17203
17286
  return;
17204
17287
  }
17205
17288
  } catch (ex) {
17206
- this.instance.emitEvent("onPaste", ex);
17289
+ this.instance.emitEvent("onPaste", { error: ex });
17207
17290
  }
17208
17291
  try {
17209
17292
  const items = await navigator.clipboard.read();
@@ -17229,7 +17312,7 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
17229
17312
  items
17230
17313
  });
17231
17314
  } catch (ex) {
17232
- this.instance.emitEvent("onPaste", ex);
17315
+ this.instance.emitEvent("onPaste", { error: ex });
17233
17316
  }
17234
17317
  }
17235
17318
  getSelectedNodes() {
@@ -17424,7 +17507,7 @@ var WeaveNode = class {
17424
17507
  if (nodesSelectionPlugin && this.isSelecting() && this.isNodeSelected(node$1)) nodesSelectionPlugin.getTransformer().forceUpdate();
17425
17508
  if (nodesEdgeSnappingPlugin && transforming && this.isSelecting() && this.isNodeSelected(node$1)) nodesEdgeSnappingPlugin.evaluateGuidelines(e);
17426
17509
  };
17427
- node.on("transform", (0, import_lodash$1.throttle)(handleTransform, 100));
17510
+ node.on("transform", (0, import_lodash.throttle)(handleTransform, 100));
17428
17511
  node.on("transformend", (e) => {
17429
17512
  const node$1 = e.target;
17430
17513
  this.instance.emitEvent("onTransform", null);
@@ -17478,7 +17561,7 @@ var WeaveNode = class {
17478
17561
  if (layerToMove && !hasFrames(node) && node.isDragging()) layerToMove.fire(WEAVE_NODE_CUSTOM_EVENTS.onTargetEnter, { bubbles: true });
17479
17562
  }
17480
17563
  };
17481
- node.on("dragmove", (0, import_lodash$1.throttle)(handleDragMove, 100));
17564
+ node.on("dragmove", (0, import_lodash.throttle)(handleDragMove, 100));
17482
17565
  node.on("dragend", (e) => {
17483
17566
  if (!this.didMove) return;
17484
17567
  const isErasing = this.instance.getActiveAction() === "eraseTool";
@@ -19191,7 +19274,7 @@ var WeaveRegisterManager = class {
19191
19274
 
19192
19275
  //#endregion
19193
19276
  //#region package.json
19194
- var version = "0.52.3";
19277
+ var version = "0.54.0";
19195
19278
 
19196
19279
  //#endregion
19197
19280
  //#region src/managers/setup.ts
@@ -19782,6 +19865,15 @@ var Weave = class {
19782
19865
  }
19783
19866
  return nodeContainer;
19784
19867
  }
19868
+ getNodeContainer(node) {
19869
+ const stage = this.getStage();
19870
+ let nodeContainer = node.getParent();
19871
+ if (typeof node.getParent()?.getAttrs().nodeId !== "undefined") {
19872
+ const realContainer = stage.findOne(`#${node.getParent()?.getAttrs().nodeId}`);
19873
+ if (realContainer) nodeContainer = realContainer;
19874
+ }
19875
+ return nodeContainer;
19876
+ }
19785
19877
  moveUp(node) {
19786
19878
  this.zIndexManager.moveUp(node);
19787
19879
  }
@@ -20390,7 +20482,7 @@ var WeaveTextNode = class extends WeaveNode {
20390
20482
  text.on("transformstart", (e) => {
20391
20483
  this.instance.emitEvent("onTransform", e.target);
20392
20484
  });
20393
- text.on("transform", (0, import_lodash$1.throttle)(handleTextTransform, 50));
20485
+ text.on("transform", (0, import_lodash.throttle)(handleTextTransform, 50));
20394
20486
  text.on("transformend", () => {
20395
20487
  this.instance.emitEvent("onTransform", null);
20396
20488
  });
@@ -21698,7 +21790,7 @@ var WeaveImageNode = class extends WeaveNode {
21698
21790
  const stage = this.instance.getStage();
21699
21791
  const image = stage.findOne(`#${imageAttrs.id}`);
21700
21792
  const internalImage = image?.findOne(`#${imageAttrs.id}-image`);
21701
- if (image && internalImage && !imageAttrs.adding && imageAttrs.cropInfo && !(0, import_lodash$1.isEqual)(imageAttrs.cropInfo, this.cachedCropInfo[imageAttrs.id ?? ""])) {
21793
+ if (image && internalImage && !imageAttrs.adding && imageAttrs.cropInfo && !(0, import_lodash.isEqual)(imageAttrs.cropInfo, this.cachedCropInfo[imageAttrs.id ?? ""])) {
21702
21794
  const actualScale = imageAttrs.uncroppedImage.width / imageAttrs.imageInfo.width;
21703
21795
  internalImage.width(imageAttrs.uncroppedImage.width);
21704
21796
  internalImage.height(imageAttrs.uncroppedImage.height);
@@ -21715,7 +21807,7 @@ var WeaveImageNode = class extends WeaveNode {
21715
21807
  internalImage.height(imageAttrs.cropSize.height);
21716
21808
  this.cachedCropInfo[imageAttrs.id ?? ""] = imageAttrs.cropInfo;
21717
21809
  }
21718
- if (image && internalImage && !imageAttrs.adding && !imageAttrs.cropInfo && !(0, import_lodash$1.isEqual)(imageAttrs.cropInfo, this.cachedCropInfo[imageAttrs.id ?? ""])) {
21810
+ if (image && internalImage && !imageAttrs.adding && !imageAttrs.cropInfo && !(0, import_lodash.isEqual)(imageAttrs.cropInfo, this.cachedCropInfo[imageAttrs.id ?? ""])) {
21719
21811
  internalImage.width(imageAttrs.uncroppedImage.width);
21720
21812
  internalImage.height(imageAttrs.uncroppedImage.height);
21721
21813
  internalImage.rotation(0);
@@ -22461,7 +22553,7 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
22461
22553
  constructor(params) {
22462
22554
  super();
22463
22555
  const { config } = params ?? {};
22464
- this.config = (0, import_lodash$1.merge)(WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, config);
22556
+ this.config = (0, import_lodash.merge)(WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, config);
22465
22557
  if (!this.config.zoomSteps.includes(this.config.defaultZoom)) throw new Error(`Default zoom ${this.config.defaultZoom} is not in zoom steps`);
22466
22558
  this.pinching = false;
22467
22559
  this.isTrackpad = false;
@@ -22489,7 +22581,7 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
22489
22581
  this.config.zoomSteps = [minimumZoom, ...this.config.zoomSteps];
22490
22582
  }
22491
22583
  };
22492
- mainLayer?.on("draw", (0, import_lodash$1.throttle)(handleDraw, 50));
22584
+ mainLayer?.on("draw", (0, import_lodash.throttle)(handleDraw, 50));
22493
22585
  this.setZoom(this.config.zoomSteps[this.actualStep]);
22494
22586
  }
22495
22587
  setZoom(scale, centered = true, pointer) {
@@ -25383,7 +25475,7 @@ var WeaveStageGridPlugin = class extends WeavePlugin {
25383
25475
  if (!this.enabled || !(this.isSpaceKeyPressed || this.isMouseMiddleButtonPressed || this.moveToolActive)) return;
25384
25476
  this.onRender();
25385
25477
  };
25386
- stage.on("pointermove", (0, import_lodash$1.throttle)(handleMouseMove, 50));
25478
+ stage.on("pointermove", (0, import_lodash.throttle)(handleMouseMove, 50));
25387
25479
  stage.on("pointermove", () => {
25388
25480
  if (this.enabled) this.onRender();
25389
25481
  });
@@ -25597,8 +25689,11 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
25597
25689
  super();
25598
25690
  this.pointers = new Map();
25599
25691
  this.panning = false;
25692
+ this.isDragging = false;
25693
+ this.enableMove = false;
25600
25694
  this.enabled = true;
25601
25695
  this.moveToolActive = false;
25696
+ this.isMouseLeftButtonPressed = false;
25602
25697
  this.isMouseMiddleButtonPressed = false;
25603
25698
  this.isCtrlOrMetaPressed = false;
25604
25699
  this.isSpaceKeyPressed = false;
@@ -25610,7 +25705,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
25610
25705
  onInit() {
25611
25706
  this.initEvents();
25612
25707
  }
25613
- enableMove() {
25708
+ setCursor() {
25614
25709
  const stage = this.instance.getStage();
25615
25710
  if (stage.container().style.cursor !== "grabbing") {
25616
25711
  this.previousPointer = stage.container().style.cursor;
@@ -25634,7 +25729,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
25634
25729
  this.getNodesEdgeSnappingPlugin()?.disable();
25635
25730
  this.getNodesDistanceSnappingPlugin()?.disable();
25636
25731
  this.isSpaceKeyPressed = true;
25637
- this.enableMove();
25732
+ this.setCursor();
25638
25733
  }
25639
25734
  });
25640
25735
  window.addEventListener("keyup", (e) => {
@@ -25649,7 +25744,6 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
25649
25744
  }
25650
25745
  });
25651
25746
  let lastPos = null;
25652
- let isDragging = false;
25653
25747
  stage.on("pointerdown", (e) => {
25654
25748
  this.pointers.set(e.evt.pointerId, {
25655
25749
  x: e.evt.clientX,
@@ -25657,14 +25751,15 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
25657
25751
  });
25658
25752
  if (this.pointers.size > 1) return;
25659
25753
  const activeAction = this.instance.getActiveAction();
25660
- let enableMove = false;
25661
- if (e && (e.evt.pointerType !== "mouse" || e.evt.pointerType === "mouse" && e.evt.buttons === 1) && activeAction === MOVE_TOOL_ACTION_NAME) this.moveToolActive = true;
25662
- if (!enableMove && e.evt.pointerType === "mouse" && e.evt.buttons === 4) this.isMouseMiddleButtonPressed = true;
25663
- if (this.enabled && (this.isSpaceKeyPressed || this.moveToolActive || this.isMouseMiddleButtonPressed)) enableMove = true;
25664
- if (enableMove) {
25665
- isDragging = true;
25754
+ this.enableMove = false;
25755
+ if (activeAction === MOVE_TOOL_ACTION_NAME) this.moveToolActive = true;
25756
+ if (e.evt.pointerType === "mouse" && e.evt.buttons === 1) this.isMouseLeftButtonPressed = true;
25757
+ if (e.evt.pointerType === "mouse" && e.evt.buttons === 4) this.isMouseMiddleButtonPressed = true;
25758
+ if (this.enabled && (this.isSpaceKeyPressed || this.moveToolActive && this.isMouseLeftButtonPressed || this.isMouseMiddleButtonPressed)) this.enableMove = true;
25759
+ if (this.enableMove) {
25760
+ this.isDragging = true;
25666
25761
  lastPos = stage.getPointerPosition();
25667
- this.enableMove();
25762
+ this.setCursor();
25668
25763
  }
25669
25764
  });
25670
25765
  stage.on("pointercancel", (e) => {
@@ -25678,7 +25773,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
25678
25773
  });
25679
25774
  if (this.pointers.size > 1) return;
25680
25775
  if (this.isSpaceKeyPressed) stage.container().style.cursor = "grabbing";
25681
- if (!isDragging) return;
25776
+ if (!this.isDragging) return;
25682
25777
  this.getContextMenuPlugin()?.cancelLongPressTimer();
25683
25778
  const pos = stage.getPointerPosition();
25684
25779
  if (pos && lastPos) {
@@ -25693,7 +25788,11 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
25693
25788
  stage.on("pointermove", handleMouseMove);
25694
25789
  stage.on("pointerup", (e) => {
25695
25790
  this.pointers.delete(e.evt.pointerId);
25696
- isDragging = false;
25791
+ this.isMouseLeftButtonPressed = false;
25792
+ this.isMouseMiddleButtonPressed = false;
25793
+ this.moveToolActive = false;
25794
+ this.isDragging = false;
25795
+ this.enableMove = false;
25697
25796
  this.panning = false;
25698
25797
  });
25699
25798
  const handleWheel = (e) => {
@@ -25855,7 +25954,7 @@ var WeaveConnectedUsersPlugin = class extends WeavePlugin {
25855
25954
  newConnectedUsers[userInformation.id] = userInformation;
25856
25955
  }
25857
25956
  }
25858
- if (!(0, import_lodash$1.isEqual)(this.connectedUsers, newConnectedUsers)) this.instance.emitEvent("onConnectedUsersChange", newConnectedUsers);
25957
+ if (!(0, import_lodash.isEqual)(this.connectedUsers, newConnectedUsers)) this.instance.emitEvent("onConnectedUsersChange", newConnectedUsers);
25859
25958
  this.connectedUsers = newConnectedUsers;
25860
25959
  });
25861
25960
  }
@@ -26264,7 +26363,10 @@ var WeaveNodesEdgeSnappingPlugin = class extends WeavePlugin {
26264
26363
  if (!utilityLayer) return;
26265
26364
  const { targetNode: node, skipNodes } = getTargetAndSkipNodes(this.instance, e);
26266
26365
  if (typeof node === "undefined") return;
26267
- const visibleNodes = this.getVisibleNodes(skipNodes);
26366
+ const nodeParent = this.instance.getNodeContainer(node);
26367
+ if (nodeParent === null) return;
26368
+ const stage = this.instance.getStage();
26369
+ const visibleNodes = getVisibleNodes(this.instance, stage, nodeParent, skipNodes, this.instance.getMainLayer());
26268
26370
  const lineGuideStops = this.getLineGuideStops(visibleNodes);
26269
26371
  const itemBounds = this.getObjectSnappingEdges(node);
26270
26372
  const guides = this.getGuides(lineGuideStops, itemBounds, e.type);
@@ -26342,21 +26444,6 @@ var WeaveNodesEdgeSnappingPlugin = class extends WeavePlugin {
26342
26444
  });
26343
26445
  }
26344
26446
  }
26345
- getVisibleNodes(skipNodes) {
26346
- const stage = this.instance.getStage();
26347
- const nodesSelection = this.instance.getPlugin("nodesSelection");
26348
- if (nodesSelection) nodesSelection.getTransformer().hide();
26349
- const nodes = getVisibleNodesInViewport(stage, this.instance.getMainLayer());
26350
- const finalVisibleNodes = [];
26351
- nodes.forEach((node) => {
26352
- if (node.getParent()?.getAttrs().nodeType === "group") return;
26353
- if (skipNodes.includes(node.getParent()?.getAttrs().nodeId)) return;
26354
- if (skipNodes.includes(node.getAttrs().id ?? "")) return;
26355
- finalVisibleNodes.push(node);
26356
- });
26357
- if (nodesSelection) nodesSelection.getTransformer().show();
26358
- return finalVisibleNodes;
26359
- }
26360
26447
  getLineGuideStops(nodes) {
26361
26448
  const vertical = [];
26362
26449
  const horizontal = [];
@@ -26578,6 +26665,7 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
26578
26665
  const { config } = params ?? {};
26579
26666
  this.enterSnappingTolerance = config?.enterSnappingTolerance ?? GUIDE_ENTER_SNAPPING_TOLERANCE;
26580
26667
  this.exitSnappingTolerance = config?.exitSnappingTolerance ?? GUIDE_EXIT_SNAPPING_TOLERANCE;
26668
+ this.uiConfig = import_lodash.default.merge(GUIDE_DISTANCE_LINE_DEFAULT_CONFIG, config?.ui);
26581
26669
  this.enabled = true;
26582
26670
  }
26583
26671
  getName() {
@@ -26597,19 +26685,16 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
26597
26685
  }
26598
26686
  }
26599
26687
  evaluateGuidelines(e) {
26600
- const stage = this.instance.getStage();
26601
- const mainLayer = this.instance.getMainLayer();
26602
26688
  const utilityLayer = this.instance.getUtilityLayer();
26603
26689
  if (!this.enabled) return;
26604
26690
  if (!utilityLayer) return;
26605
26691
  const { targetNode: node, skipNodes } = getTargetAndSkipNodes(this.instance, e);
26606
26692
  if (typeof node === "undefined") return;
26607
- if (node.getParent() === mainLayer) this.referenceLayer = mainLayer;
26608
- if (node.getParent()?.getAttrs().nodeId) {
26609
- const realNode = stage.findOne(`#${node.getParent()?.getAttrs().nodeId}`);
26610
- if (realNode) this.referenceLayer = realNode;
26611
- }
26612
- const visibleNodes = this.getVisibleNodes(skipNodes);
26693
+ const nodeParent = this.instance.getNodeContainer(node);
26694
+ if (nodeParent === null) return;
26695
+ const stage = this.instance.getStage();
26696
+ this.referenceLayer = nodeParent;
26697
+ const visibleNodes = getVisibleNodes(this.instance, stage, nodeParent, skipNodes, this.referenceLayer);
26613
26698
  const { intersectedNodes: sortedHorizontalIntersectedNodes, intersectedNodesWithDistances: horizontalIntersectedNodes } = this.getHorizontallyIntersectingNodes(node, visibleNodes);
26614
26699
  const { intersectedNodes: sortedVerticalIntersectedNodes, intersectedNodesWithDistances: verticalIntersectedNodes } = this.getVerticallyIntersectingNodes(node, visibleNodes);
26615
26700
  this.cleanupGuidelines();
@@ -26840,6 +26925,11 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
26840
26925
  });
26841
26926
  }
26842
26927
  }
26928
+ isOverlapping(node1, node2) {
26929
+ const box1 = this.getBoxClientRect(node1);
26930
+ const box2 = this.getBoxClientRect(node2);
26931
+ return !(box1.x + box1.width <= box2.x || box2.x + box2.width <= box1.x || box1.y + box1.height <= box2.y || box2.y + box2.height <= box1.y);
26932
+ }
26843
26933
  getVerticallyIntersectingNodes(targetNode, nodes) {
26844
26934
  const targetBox = this.getBoxClientRect(targetNode);
26845
26935
  const intersectedNodes = [];
@@ -26856,30 +26946,32 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
26856
26946
  return ay - by;
26857
26947
  });
26858
26948
  const intersectedNodesWithDistances = [];
26859
- for (let i = 0; i < intersectedNodes.length - 1; i++) {
26860
- const a = intersectedNodes[i];
26861
- const b = intersectedNodes[i + 1];
26862
- const boxA = this.getBoxClientRect(a);
26863
- const boxB = this.getBoxClientRect(b);
26864
- const aBottom = boxA.y + boxA.height;
26865
- const bTop = boxB.y;
26866
- const distance = Math.abs(aBottom - bTop);
26867
- const left = Math.max(boxA.x, boxB.x);
26868
- const right = Math.min(boxA.x + boxA.width, boxB.x + boxB.width);
26869
- let midX;
26870
- if (right > left) midX = left + (right - left) / 2;
26871
- else {
26872
- const aCenterX = boxA.x + boxA.width / 2;
26873
- const bCenterX = boxB.x + boxB.width / 2;
26874
- midX = (aCenterX + bCenterX) / 2;
26875
- }
26876
- intersectedNodesWithDistances.push({
26877
- index: i,
26878
- from: a,
26879
- to: b,
26880
- midX,
26881
- distance: Math.round(distance)
26882
- });
26949
+ for (let i = 0; i < intersectedNodes.length; i++) for (let j = i + 1; j < intersectedNodes.length; j++) {
26950
+ const nodeA = intersectedNodes[i];
26951
+ const nodeB = intersectedNodes[j];
26952
+ if (!this.isOverlapping(nodeA, nodeB)) {
26953
+ const boxA = this.getBoxClientRect(nodeA);
26954
+ const boxB = this.getBoxClientRect(nodeB);
26955
+ const aBottom = boxA.y + boxA.height;
26956
+ const bTop = boxB.y;
26957
+ const distance = Math.abs(aBottom - bTop);
26958
+ const left = Math.max(boxA.x, boxB.x);
26959
+ const right = Math.min(boxA.x + boxA.width, boxB.x + boxB.width);
26960
+ let midX;
26961
+ if (right > left) midX = left + (right - left) / 2;
26962
+ else {
26963
+ const aCenterX = boxA.x + boxA.width / 2;
26964
+ const bCenterX = boxB.x + boxB.width / 2;
26965
+ midX = (aCenterX + bCenterX) / 2;
26966
+ }
26967
+ intersectedNodesWithDistances.push({
26968
+ index: i,
26969
+ from: nodeA,
26970
+ to: nodeB,
26971
+ midX,
26972
+ distance: Math.round(distance)
26973
+ });
26974
+ }
26883
26975
  }
26884
26976
  return {
26885
26977
  intersectedNodes,
@@ -26902,56 +26994,38 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
26902
26994
  return ax - bx;
26903
26995
  });
26904
26996
  const intersectedNodesWithDistances = [];
26905
- for (let i = 0; i < intersectedNodes.length - 1; i++) {
26906
- const a = intersectedNodes[i];
26907
- const b = intersectedNodes[i + 1];
26908
- const boxA = this.getBoxClientRect(a);
26909
- const boxB = this.getBoxClientRect(b);
26910
- const aRight = boxA.x + boxA.width;
26911
- const bLeft = boxB.x;
26912
- const distance = Math.abs(Math.round(aRight - bLeft));
26913
- const top = Math.max(boxA.y, boxB.y);
26914
- const bottom = Math.min(boxA.y + boxA.height, boxB.y + boxB.height);
26915
- let midY;
26916
- if (bottom > top) midY = top + (bottom - top) / 2;
26917
- else {
26918
- const aCenterY = boxA.y + boxA.height / 2;
26919
- const bCenterY = boxB.y + boxB.height / 2;
26920
- midY = (aCenterY + bCenterY) / 2;
26921
- }
26922
- intersectedNodesWithDistances.push({
26923
- index: i,
26924
- from: a,
26925
- to: b,
26926
- midY,
26927
- distance
26928
- });
26997
+ for (let i = 0; i < intersectedNodes.length; i++) for (let j = i + 1; j < intersectedNodes.length; j++) {
26998
+ const nodeA = intersectedNodes[i];
26999
+ const nodeB = intersectedNodes[j];
27000
+ if (!this.isOverlapping(nodeA, nodeB)) {
27001
+ const boxA = this.getBoxClientRect(nodeA);
27002
+ const boxB = this.getBoxClientRect(nodeB);
27003
+ const aRight = boxA.x + boxA.width;
27004
+ const bLeft = boxB.x;
27005
+ const distance = Math.abs(Math.round(aRight - bLeft));
27006
+ const top = Math.max(boxA.y, boxB.y);
27007
+ const bottom = Math.min(boxA.y + boxA.height, boxB.y + boxB.height);
27008
+ let midY;
27009
+ if (bottom > top) midY = top + (bottom - top) / 2;
27010
+ else {
27011
+ const aCenterY = boxA.y + boxA.height / 2;
27012
+ const bCenterY = boxB.y + boxB.height / 2;
27013
+ midY = (aCenterY + bCenterY) / 2;
27014
+ }
27015
+ intersectedNodesWithDistances.push({
27016
+ index: i,
27017
+ from: nodeA,
27018
+ to: nodeB,
27019
+ midY,
27020
+ distance: Math.round(distance)
27021
+ });
27022
+ }
26929
27023
  }
26930
27024
  return {
26931
27025
  intersectedNodes,
26932
27026
  intersectedNodesWithDistances
26933
27027
  };
26934
27028
  }
26935
- getVisibleNodes(skipNodes) {
26936
- const stage = this.instance.getStage();
26937
- const nodesSelection = this.instance.getPlugin("nodesSelection");
26938
- if (nodesSelection) nodesSelection.getTransformer().hide();
26939
- const nodes = getVisibleNodesInViewport(stage, this.referenceLayer);
26940
- const finalVisibleNodes = [];
26941
- nodes.forEach((node) => {
26942
- if (node.getParent()?.getAttrs().nodeType === "group") return;
26943
- if (skipNodes.includes(node.getParent()?.getAttrs().nodeId)) return;
26944
- if (skipNodes.includes(node.getAttrs().id ?? "")) return;
26945
- if (node.getParent() !== this.referenceLayer && !node.getParent()?.getAttrs().nodeId) return;
26946
- if (node.getParent() !== this.referenceLayer && node.getParent()?.getAttrs().nodeId) {
26947
- const realNode = stage.findOne(`#${node.getParent()?.getAttrs().nodeId}`);
26948
- if (realNode && realNode !== this.referenceLayer) return;
26949
- }
26950
- finalVisibleNodes.push(node);
26951
- });
26952
- if (nodesSelection) nodesSelection.getTransformer().show();
26953
- return finalVisibleNodes;
26954
- }
26955
27029
  drawSizeGuidesHorizontally(intersectionsH, peerDistance) {
26956
27030
  const utilityLayer = this.instance.getUtilityLayer();
26957
27031
  if (utilityLayer) intersectionsH.forEach((pairInfo) => {
@@ -26968,40 +27042,60 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
26968
27042
  if (pairInfo.distance === peerDistance) this.renderVerticalLineWithDistanceBetweenNodes(from, to, pairInfo.midX, `${pairInfo.distance}`);
26969
27043
  });
26970
27044
  }
26971
- renderDistanceLabel(ctx, stage, labelText, { canvasMidX, canvasMidY }) {
27045
+ renderDistanceLabel(ctx, stage, labelText, orientation, { canvasMidX, canvasMidY }, config) {
26972
27046
  const scaleX = stage?.scaleX() || 1;
26973
27047
  const scaleY = stage?.scaleY() || 1;
26974
- const fontSize = 12;
26975
- const fontFamily = "Arial";
26976
- const padding = 6;
27048
+ const fontSize = config.label.fontSize;
27049
+ const fontFamily = config.label.fontFamily;
27050
+ const fontStyle = config.label.fontStyle;
27051
+ const cornerRadius = config.label.cornerRadius;
27052
+ const linePadding = config.label.linePadding;
27053
+ const fill = config.label.fill;
27054
+ const height = config.label.height;
27055
+ const paddingX = config.label.paddingX;
26977
27056
  const tempText = new Konva.Text({
26978
27057
  text: labelText,
26979
27058
  fontSize,
27059
+ fontStyle,
26980
27060
  fontFamily,
26981
27061
  visible: false
26982
27062
  });
26983
27063
  const textWidth = tempText.width();
26984
- const textHeight = tempText.height();
26985
- const labelWidth = textWidth + padding * 2;
26986
- const labelHeight = textHeight + padding * 2;
27064
+ const labelWidth = textWidth + paddingX * 2;
27065
+ const labelHeight = height;
26987
27066
  ctx.save();
26988
27067
  ctx.scale(1 / scaleX, 1 / scaleY);
26989
- const labelX = canvasMidX - labelWidth / 2;
26990
- const labelY = canvasMidY - labelHeight / 2;
27068
+ let labelX = canvasMidX - labelWidth / 2;
27069
+ let labelY = canvasMidY + linePadding;
27070
+ if (orientation === "vertical") {
27071
+ labelX = canvasMidX + linePadding;
27072
+ labelY = canvasMidY - labelWidth / 2;
27073
+ }
27074
+ const r = Math.min(cornerRadius, labelWidth / 2, labelHeight / 2);
26991
27075
  ctx.beginPath();
26992
- ctx.rect(labelX, labelY, labelWidth, labelHeight);
26993
- ctx.fillStyle = "#ff0000";
27076
+ ctx.moveTo(labelX + r, labelY);
27077
+ ctx.lineTo(labelX + labelWidth - r, labelY);
27078
+ ctx.quadraticCurveTo(labelX + labelWidth, labelY, labelX + labelWidth, labelY + r);
27079
+ ctx.lineTo(labelX + labelWidth, labelY + labelHeight - r);
27080
+ ctx.quadraticCurveTo(labelX + labelWidth, labelY + labelHeight, labelX + labelWidth - r, labelY + labelHeight);
27081
+ ctx.lineTo(labelX + r, labelY + labelHeight);
27082
+ ctx.quadraticCurveTo(labelX, labelY + labelHeight, labelX, labelY + labelHeight - r);
27083
+ ctx.lineTo(labelX, labelY + r);
27084
+ ctx.quadraticCurveTo(labelX, labelY, labelX + r, labelY);
27085
+ ctx.closePath();
27086
+ ctx.fillStyle = fill;
26994
27087
  ctx.fill();
26995
- ctx.font = `bold ${fontSize}px ${fontFamily}`;
27088
+ ctx.font = `${fontStyle} ${fontSize}px ${fontFamily}`;
26996
27089
  ctx.fillStyle = "white";
26997
27090
  ctx.textAlign = "center";
26998
27091
  ctx.textBaseline = "middle";
26999
- ctx.fillText(labelText, canvasMidX, labelY + labelHeight / 2);
27092
+ ctx.fillText(labelText, labelX + labelWidth / 2, labelY + labelHeight / 2);
27000
27093
  ctx.restore();
27001
27094
  }
27002
27095
  renderHorizontalLineWithDistanceBetweenNodes(from, to, midY, labelText) {
27003
27096
  const utilityLayer = this.instance.getUtilityLayer();
27004
27097
  const renderLabel = this.renderDistanceLabel;
27098
+ const uiConfig = this.uiConfig;
27005
27099
  const lineWithLabel = new Konva.Shape({
27006
27100
  name: GUIDE_HORIZONTAL_LINE_NAME,
27007
27101
  sceneFunc: function(ctx, shape) {
@@ -27015,8 +27109,8 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
27015
27109
  ctx.moveTo(x1, y);
27016
27110
  ctx.lineTo(x2, y);
27017
27111
  ctx.closePath();
27018
- ctx.strokeStyle = "#ff0000";
27019
- ctx.lineWidth = 1;
27112
+ ctx.strokeStyle = uiConfig.line.stroke;
27113
+ ctx.lineWidth = uiConfig.line.strokeWidth;
27020
27114
  ctx.setLineDash([]);
27021
27115
  ctx.stroke();
27022
27116
  ctx.closePath();
@@ -27024,10 +27118,10 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
27024
27118
  const worldMidY = y;
27025
27119
  const canvasMidX = worldMidX * scaleX;
27026
27120
  const canvasMidY = worldMidY * scaleY;
27027
- renderLabel(ctx, stage, labelText, {
27121
+ renderLabel(ctx, stage, labelText, "horizontal", {
27028
27122
  canvasMidX,
27029
27123
  canvasMidY
27030
- });
27124
+ }, uiConfig);
27031
27125
  ctx.fillStrokeShape(shape);
27032
27126
  }
27033
27127
  });
@@ -27037,6 +27131,7 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
27037
27131
  renderVerticalLineWithDistanceBetweenNodes(from, to, midX, labelText) {
27038
27132
  const utilityLayer = this.instance.getUtilityLayer();
27039
27133
  const renderLabel = this.renderDistanceLabel;
27134
+ const uiConfig = this.uiConfig;
27040
27135
  const lineWithLabel = new Konva.Shape({
27041
27136
  name: GUIDE_VERTICAL_LINE_NAME,
27042
27137
  sceneFunc: function(ctx, shape) {
@@ -27050,18 +27145,18 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
27050
27145
  ctx.setLineDash([]);
27051
27146
  ctx.moveTo(x, y1);
27052
27147
  ctx.lineTo(x, y2);
27053
- ctx.strokeStyle = "#ff0000";
27054
- ctx.lineWidth = 1;
27148
+ ctx.strokeStyle = uiConfig.line.stroke;
27149
+ ctx.lineWidth = uiConfig.line.strokeWidth;
27055
27150
  ctx.stroke();
27056
27151
  ctx.closePath();
27057
27152
  const worldMidX = x;
27058
27153
  const worldMidY = (y1 + y2) / 2;
27059
27154
  const canvasMidX = worldMidX * scaleX;
27060
27155
  const canvasMidY = worldMidY * scaleY;
27061
- renderLabel(ctx, stage, labelText, {
27156
+ renderLabel(ctx, stage, labelText, "vertical", {
27062
27157
  canvasMidX,
27063
27158
  canvasMidY
27064
- });
27159
+ }, uiConfig);
27065
27160
  ctx.fillStrokeShape(shape);
27066
27161
  }
27067
27162
  });
@@ -27077,5 +27172,5 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
27077
27172
  };
27078
27173
 
27079
27174
  //#endregion
27080
- export { ALIGN_NODES_ALIGN_TO, ALIGN_NODES_TOOL_ACTION_NAME, ALIGN_NODES_TOOL_STATE, ARROW_TOOL_ACTION_NAME, ARROW_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_ENTER_SNAPPING_TOLERANCE, GUIDE_EXIT_SNAPPING_TOLERANCE, GUIDE_HORIZONTAL_LINE_NAME, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, GUIDE_VERTICAL_LINE_NAME, IMAGE_TOOL_ACTION_NAME, IMAGE_TOOL_STATE, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NODE_SNAP_HORIZONTAL, NODE_SNAP_VERTICAL, PEN_TOOL_ACTION_NAME, PEN_TOOL_STATE, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, REGULAR_POLYGON_TOOL_ACTION_NAME, REGULAR_POLYGON_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, WEAVE_ARROW_NODE_TYPE, WEAVE_COPY_PASTE_NODES_KEY, WEAVE_COPY_PASTE_PASTE_CATCHER_ID, WEAVE_COPY_PASTE_PASTE_MODES, WEAVE_DEFAULT_USER_INFO_FUNCTION, WEAVE_ELLIPSE_NODE_TYPE, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_COLOR, WEAVE_GRID_DEFAULT_DOT_MAX_DOTS_PER_AXIS, WEAVE_GRID_DEFAULT_MAJOR_DOT_RATIO, WEAVE_GRID_DEFAULT_MAJOR_EVERY, WEAVE_GRID_DEFAULT_MAJOR_LINE_RATIO, WEAVE_GRID_DEFAULT_ORIGIN_COLOR, WEAVE_GRID_DEFAULT_RADIUS, WEAVE_GRID_DEFAULT_SIZE, WEAVE_GRID_DEFAULT_STROKE, WEAVE_GRID_DEFAULT_TYPE, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_GROUP_NODE_TYPE, WEAVE_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_NODE_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_TYPE, WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_STAGE_DEFAULT_MODE, WEAVE_STAGE_GRID_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_TYPE, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTERS_DEFAULT_PROPS, WEAVE_USER_POINTER_KEY, WEAVE_USER_SELECTION_KEY, Weave, WeaveAction, WeaveAlignNodesToolAction, WeaveArrowNode, WeaveArrowToolAction, WeaveBrushToolAction, WeaveConnectedUsersPlugin, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveEllipseNode, WeaveEllipseToolAction, WeaveEraserToolAction, WeaveExportNodesToolAction, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToSelectionToolAction, WeaveFrameNode, WeaveFrameToolAction, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveLayerNode, WeaveLineNode, WeaveMoveToolAction, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesEdgeSnappingPlugin, WeaveNodesSelectionPlugin, WeavePenToolAction, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRegularPolygonNode, WeaveRegularPolygonToolAction, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStarNode, WeaveStarToolAction, WeaveStore, WeaveStrokeNode, WeaveTextNode, WeaveTextToolAction, WeaveUsersPointersPlugin, WeaveUsersSelectionPlugin, WeaveZoomInToolAction, WeaveZoomOutToolAction, clearContainerTargets, containerOverCursor, containsNodeDeep, getBoundingBox, getClosestParentWithId, getContrastTextColor, getExportBoundingBox, getSelectedNodesMetadata, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isInShadowDOM, isNodeInSelection, moveNodeToContainer, resetScale, stringToColor };
27175
+ export { ALIGN_NODES_ALIGN_TO, ALIGN_NODES_TOOL_ACTION_NAME, ALIGN_NODES_TOOL_STATE, ARROW_TOOL_ACTION_NAME, ARROW_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_DISTANCE_LINE_DEFAULT_CONFIG, GUIDE_ENTER_SNAPPING_TOLERANCE, GUIDE_EXIT_SNAPPING_TOLERANCE, GUIDE_HORIZONTAL_LINE_NAME, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, GUIDE_VERTICAL_LINE_NAME, IMAGE_TOOL_ACTION_NAME, IMAGE_TOOL_STATE, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NODE_SNAP_HORIZONTAL, NODE_SNAP_VERTICAL, PEN_TOOL_ACTION_NAME, PEN_TOOL_STATE, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, REGULAR_POLYGON_TOOL_ACTION_NAME, REGULAR_POLYGON_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, WEAVE_ARROW_NODE_TYPE, WEAVE_COPY_PASTE_CONFIG_DEFAULT, WEAVE_COPY_PASTE_NODES_KEY, WEAVE_COPY_PASTE_PASTE_CATCHER_ID, WEAVE_COPY_PASTE_PASTE_MODES, WEAVE_DEFAULT_USER_INFO_FUNCTION, WEAVE_ELLIPSE_NODE_TYPE, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_COLOR, WEAVE_GRID_DEFAULT_DOT_MAX_DOTS_PER_AXIS, WEAVE_GRID_DEFAULT_MAJOR_DOT_RATIO, WEAVE_GRID_DEFAULT_MAJOR_EVERY, WEAVE_GRID_DEFAULT_MAJOR_LINE_RATIO, WEAVE_GRID_DEFAULT_ORIGIN_COLOR, WEAVE_GRID_DEFAULT_RADIUS, WEAVE_GRID_DEFAULT_SIZE, WEAVE_GRID_DEFAULT_STROKE, WEAVE_GRID_DEFAULT_TYPE, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_GROUP_NODE_TYPE, WEAVE_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_NODE_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_TYPE, WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_STAGE_DEFAULT_MODE, WEAVE_STAGE_GRID_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_TYPE, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTERS_DEFAULT_PROPS, WEAVE_USER_POINTER_KEY, WEAVE_USER_SELECTION_KEY, Weave, WeaveAction, WeaveAlignNodesToolAction, WeaveArrowNode, WeaveArrowToolAction, WeaveBrushToolAction, WeaveConnectedUsersPlugin, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveEllipseNode, WeaveEllipseToolAction, WeaveEraserToolAction, WeaveExportNodesToolAction, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToSelectionToolAction, WeaveFrameNode, WeaveFrameToolAction, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveLayerNode, WeaveLineNode, WeaveMoveToolAction, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesEdgeSnappingPlugin, WeaveNodesSelectionPlugin, WeavePenToolAction, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRegularPolygonNode, WeaveRegularPolygonToolAction, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStarNode, WeaveStarToolAction, WeaveStore, WeaveStrokeNode, WeaveTextNode, WeaveTextToolAction, WeaveUsersPointersPlugin, WeaveUsersSelectionPlugin, WeaveZoomInToolAction, WeaveZoomOutToolAction, clearContainerTargets, containerOverCursor, containsNodeDeep, getBoundingBox, getClosestParentWithId, getContrastTextColor, getExportBoundingBox, getSelectedNodesMetadata, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodes, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isInShadowDOM, isNodeInSelection, moveNodeToContainer, resetScale, stringToColor };
27081
27176
  //# sourceMappingURL=sdk.js.map