@inditextech/weave-sdk 0.52.3 → 0.53.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
  });
@@ -17135,9 +17171,11 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
17135
17171
  this.instance.addNode(node, containerId);
17136
17172
  const realNode = this.instance.getStage().findOne(`#${newNodeId}`);
17137
17173
  if (realNode) nodesToSelect.push(realNode);
17138
- this.instance.emitEvent("onPaste");
17139
17174
  }
17140
- this.instance.emitEvent("onPaste", void 0);
17175
+ this.instance.emitEvent("onPaste", {
17176
+ error: void 0,
17177
+ pastedNodes: nodesToSelect.map((n) => n.getAttrs().id ?? "")
17178
+ });
17141
17179
  const nodesSelectionPlugin = this.getNodesSelectionPlugin();
17142
17180
  nodesSelectionPlugin?.setSelectedNodes(nodesToSelect);
17143
17181
  this.toPaste = void 0;
@@ -17187,7 +17225,7 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
17187
17225
  await this.writeClipboardData(JSON.stringify(copyClipboard));
17188
17226
  this.instance.emitEvent("onCopy");
17189
17227
  } catch (ex) {
17190
- this.instance.emitEvent("onCopy", ex);
17228
+ this.instance.emitEvent("onCopy", { error: ex });
17191
17229
  }
17192
17230
  }
17193
17231
  async copy() {
@@ -17203,7 +17241,7 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
17203
17241
  return;
17204
17242
  }
17205
17243
  } catch (ex) {
17206
- this.instance.emitEvent("onPaste", ex);
17244
+ this.instance.emitEvent("onPaste", { error: ex });
17207
17245
  }
17208
17246
  try {
17209
17247
  const items = await navigator.clipboard.read();
@@ -17229,7 +17267,7 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
17229
17267
  items
17230
17268
  });
17231
17269
  } catch (ex) {
17232
- this.instance.emitEvent("onPaste", ex);
17270
+ this.instance.emitEvent("onPaste", { error: ex });
17233
17271
  }
17234
17272
  }
17235
17273
  getSelectedNodes() {
@@ -17424,7 +17462,7 @@ var WeaveNode = class {
17424
17462
  if (nodesSelectionPlugin && this.isSelecting() && this.isNodeSelected(node$1)) nodesSelectionPlugin.getTransformer().forceUpdate();
17425
17463
  if (nodesEdgeSnappingPlugin && transforming && this.isSelecting() && this.isNodeSelected(node$1)) nodesEdgeSnappingPlugin.evaluateGuidelines(e);
17426
17464
  };
17427
- node.on("transform", (0, import_lodash$1.throttle)(handleTransform, 100));
17465
+ node.on("transform", (0, import_lodash.throttle)(handleTransform, 100));
17428
17466
  node.on("transformend", (e) => {
17429
17467
  const node$1 = e.target;
17430
17468
  this.instance.emitEvent("onTransform", null);
@@ -17478,7 +17516,7 @@ var WeaveNode = class {
17478
17516
  if (layerToMove && !hasFrames(node) && node.isDragging()) layerToMove.fire(WEAVE_NODE_CUSTOM_EVENTS.onTargetEnter, { bubbles: true });
17479
17517
  }
17480
17518
  };
17481
- node.on("dragmove", (0, import_lodash$1.throttle)(handleDragMove, 100));
17519
+ node.on("dragmove", (0, import_lodash.throttle)(handleDragMove, 100));
17482
17520
  node.on("dragend", (e) => {
17483
17521
  if (!this.didMove) return;
17484
17522
  const isErasing = this.instance.getActiveAction() === "eraseTool";
@@ -19191,7 +19229,7 @@ var WeaveRegisterManager = class {
19191
19229
 
19192
19230
  //#endregion
19193
19231
  //#region package.json
19194
- var version = "0.52.3";
19232
+ var version = "0.53.0";
19195
19233
 
19196
19234
  //#endregion
19197
19235
  //#region src/managers/setup.ts
@@ -19782,6 +19820,15 @@ var Weave = class {
19782
19820
  }
19783
19821
  return nodeContainer;
19784
19822
  }
19823
+ getNodeContainer(node) {
19824
+ const stage = this.getStage();
19825
+ let nodeContainer = node.getParent();
19826
+ if (typeof node.getParent()?.getAttrs().nodeId !== "undefined") {
19827
+ const realContainer = stage.findOne(`#${node.getParent()?.getAttrs().nodeId}`);
19828
+ if (realContainer) nodeContainer = realContainer;
19829
+ }
19830
+ return nodeContainer;
19831
+ }
19785
19832
  moveUp(node) {
19786
19833
  this.zIndexManager.moveUp(node);
19787
19834
  }
@@ -20390,7 +20437,7 @@ var WeaveTextNode = class extends WeaveNode {
20390
20437
  text.on("transformstart", (e) => {
20391
20438
  this.instance.emitEvent("onTransform", e.target);
20392
20439
  });
20393
- text.on("transform", (0, import_lodash$1.throttle)(handleTextTransform, 50));
20440
+ text.on("transform", (0, import_lodash.throttle)(handleTextTransform, 50));
20394
20441
  text.on("transformend", () => {
20395
20442
  this.instance.emitEvent("onTransform", null);
20396
20443
  });
@@ -21698,7 +21745,7 @@ var WeaveImageNode = class extends WeaveNode {
21698
21745
  const stage = this.instance.getStage();
21699
21746
  const image = stage.findOne(`#${imageAttrs.id}`);
21700
21747
  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 ?? ""])) {
21748
+ if (image && internalImage && !imageAttrs.adding && imageAttrs.cropInfo && !(0, import_lodash.isEqual)(imageAttrs.cropInfo, this.cachedCropInfo[imageAttrs.id ?? ""])) {
21702
21749
  const actualScale = imageAttrs.uncroppedImage.width / imageAttrs.imageInfo.width;
21703
21750
  internalImage.width(imageAttrs.uncroppedImage.width);
21704
21751
  internalImage.height(imageAttrs.uncroppedImage.height);
@@ -21715,7 +21762,7 @@ var WeaveImageNode = class extends WeaveNode {
21715
21762
  internalImage.height(imageAttrs.cropSize.height);
21716
21763
  this.cachedCropInfo[imageAttrs.id ?? ""] = imageAttrs.cropInfo;
21717
21764
  }
21718
- if (image && internalImage && !imageAttrs.adding && !imageAttrs.cropInfo && !(0, import_lodash$1.isEqual)(imageAttrs.cropInfo, this.cachedCropInfo[imageAttrs.id ?? ""])) {
21765
+ if (image && internalImage && !imageAttrs.adding && !imageAttrs.cropInfo && !(0, import_lodash.isEqual)(imageAttrs.cropInfo, this.cachedCropInfo[imageAttrs.id ?? ""])) {
21719
21766
  internalImage.width(imageAttrs.uncroppedImage.width);
21720
21767
  internalImage.height(imageAttrs.uncroppedImage.height);
21721
21768
  internalImage.rotation(0);
@@ -22461,7 +22508,7 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
22461
22508
  constructor(params) {
22462
22509
  super();
22463
22510
  const { config } = params ?? {};
22464
- this.config = (0, import_lodash$1.merge)(WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, config);
22511
+ this.config = (0, import_lodash.merge)(WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, config);
22465
22512
  if (!this.config.zoomSteps.includes(this.config.defaultZoom)) throw new Error(`Default zoom ${this.config.defaultZoom} is not in zoom steps`);
22466
22513
  this.pinching = false;
22467
22514
  this.isTrackpad = false;
@@ -22489,7 +22536,7 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
22489
22536
  this.config.zoomSteps = [minimumZoom, ...this.config.zoomSteps];
22490
22537
  }
22491
22538
  };
22492
- mainLayer?.on("draw", (0, import_lodash$1.throttle)(handleDraw, 50));
22539
+ mainLayer?.on("draw", (0, import_lodash.throttle)(handleDraw, 50));
22493
22540
  this.setZoom(this.config.zoomSteps[this.actualStep]);
22494
22541
  }
22495
22542
  setZoom(scale, centered = true, pointer) {
@@ -25383,7 +25430,7 @@ var WeaveStageGridPlugin = class extends WeavePlugin {
25383
25430
  if (!this.enabled || !(this.isSpaceKeyPressed || this.isMouseMiddleButtonPressed || this.moveToolActive)) return;
25384
25431
  this.onRender();
25385
25432
  };
25386
- stage.on("pointermove", (0, import_lodash$1.throttle)(handleMouseMove, 50));
25433
+ stage.on("pointermove", (0, import_lodash.throttle)(handleMouseMove, 50));
25387
25434
  stage.on("pointermove", () => {
25388
25435
  if (this.enabled) this.onRender();
25389
25436
  });
@@ -25597,8 +25644,11 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
25597
25644
  super();
25598
25645
  this.pointers = new Map();
25599
25646
  this.panning = false;
25647
+ this.isDragging = false;
25648
+ this.enableMove = false;
25600
25649
  this.enabled = true;
25601
25650
  this.moveToolActive = false;
25651
+ this.isMouseLeftButtonPressed = false;
25602
25652
  this.isMouseMiddleButtonPressed = false;
25603
25653
  this.isCtrlOrMetaPressed = false;
25604
25654
  this.isSpaceKeyPressed = false;
@@ -25610,7 +25660,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
25610
25660
  onInit() {
25611
25661
  this.initEvents();
25612
25662
  }
25613
- enableMove() {
25663
+ setCursor() {
25614
25664
  const stage = this.instance.getStage();
25615
25665
  if (stage.container().style.cursor !== "grabbing") {
25616
25666
  this.previousPointer = stage.container().style.cursor;
@@ -25634,7 +25684,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
25634
25684
  this.getNodesEdgeSnappingPlugin()?.disable();
25635
25685
  this.getNodesDistanceSnappingPlugin()?.disable();
25636
25686
  this.isSpaceKeyPressed = true;
25637
- this.enableMove();
25687
+ this.setCursor();
25638
25688
  }
25639
25689
  });
25640
25690
  window.addEventListener("keyup", (e) => {
@@ -25649,7 +25699,6 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
25649
25699
  }
25650
25700
  });
25651
25701
  let lastPos = null;
25652
- let isDragging = false;
25653
25702
  stage.on("pointerdown", (e) => {
25654
25703
  this.pointers.set(e.evt.pointerId, {
25655
25704
  x: e.evt.clientX,
@@ -25657,14 +25706,15 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
25657
25706
  });
25658
25707
  if (this.pointers.size > 1) return;
25659
25708
  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;
25709
+ this.enableMove = false;
25710
+ if (activeAction === MOVE_TOOL_ACTION_NAME) this.moveToolActive = true;
25711
+ if (e.evt.pointerType === "mouse" && e.evt.buttons === 1) this.isMouseLeftButtonPressed = true;
25712
+ if (e.evt.pointerType === "mouse" && e.evt.buttons === 4) this.isMouseMiddleButtonPressed = true;
25713
+ if (this.enabled && (this.isSpaceKeyPressed || this.moveToolActive && this.isMouseLeftButtonPressed || this.isMouseMiddleButtonPressed)) this.enableMove = true;
25714
+ if (this.enableMove) {
25715
+ this.isDragging = true;
25666
25716
  lastPos = stage.getPointerPosition();
25667
- this.enableMove();
25717
+ this.setCursor();
25668
25718
  }
25669
25719
  });
25670
25720
  stage.on("pointercancel", (e) => {
@@ -25678,7 +25728,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
25678
25728
  });
25679
25729
  if (this.pointers.size > 1) return;
25680
25730
  if (this.isSpaceKeyPressed) stage.container().style.cursor = "grabbing";
25681
- if (!isDragging) return;
25731
+ if (!this.isDragging) return;
25682
25732
  this.getContextMenuPlugin()?.cancelLongPressTimer();
25683
25733
  const pos = stage.getPointerPosition();
25684
25734
  if (pos && lastPos) {
@@ -25693,7 +25743,11 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
25693
25743
  stage.on("pointermove", handleMouseMove);
25694
25744
  stage.on("pointerup", (e) => {
25695
25745
  this.pointers.delete(e.evt.pointerId);
25696
- isDragging = false;
25746
+ this.isMouseLeftButtonPressed = false;
25747
+ this.isMouseMiddleButtonPressed = false;
25748
+ this.moveToolActive = false;
25749
+ this.isDragging = false;
25750
+ this.enableMove = false;
25697
25751
  this.panning = false;
25698
25752
  });
25699
25753
  const handleWheel = (e) => {
@@ -25855,7 +25909,7 @@ var WeaveConnectedUsersPlugin = class extends WeavePlugin {
25855
25909
  newConnectedUsers[userInformation.id] = userInformation;
25856
25910
  }
25857
25911
  }
25858
- if (!(0, import_lodash$1.isEqual)(this.connectedUsers, newConnectedUsers)) this.instance.emitEvent("onConnectedUsersChange", newConnectedUsers);
25912
+ if (!(0, import_lodash.isEqual)(this.connectedUsers, newConnectedUsers)) this.instance.emitEvent("onConnectedUsersChange", newConnectedUsers);
25859
25913
  this.connectedUsers = newConnectedUsers;
25860
25914
  });
25861
25915
  }
@@ -26264,7 +26318,10 @@ var WeaveNodesEdgeSnappingPlugin = class extends WeavePlugin {
26264
26318
  if (!utilityLayer) return;
26265
26319
  const { targetNode: node, skipNodes } = getTargetAndSkipNodes(this.instance, e);
26266
26320
  if (typeof node === "undefined") return;
26267
- const visibleNodes = this.getVisibleNodes(skipNodes);
26321
+ const nodeParent = this.instance.getNodeContainer(node);
26322
+ if (nodeParent === null) return;
26323
+ const stage = this.instance.getStage();
26324
+ const visibleNodes = getVisibleNodes(this.instance, stage, nodeParent, skipNodes, this.instance.getMainLayer());
26268
26325
  const lineGuideStops = this.getLineGuideStops(visibleNodes);
26269
26326
  const itemBounds = this.getObjectSnappingEdges(node);
26270
26327
  const guides = this.getGuides(lineGuideStops, itemBounds, e.type);
@@ -26342,21 +26399,6 @@ var WeaveNodesEdgeSnappingPlugin = class extends WeavePlugin {
26342
26399
  });
26343
26400
  }
26344
26401
  }
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
26402
  getLineGuideStops(nodes) {
26361
26403
  const vertical = [];
26362
26404
  const horizontal = [];
@@ -26578,6 +26620,7 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
26578
26620
  const { config } = params ?? {};
26579
26621
  this.enterSnappingTolerance = config?.enterSnappingTolerance ?? GUIDE_ENTER_SNAPPING_TOLERANCE;
26580
26622
  this.exitSnappingTolerance = config?.exitSnappingTolerance ?? GUIDE_EXIT_SNAPPING_TOLERANCE;
26623
+ this.uiConfig = import_lodash.default.merge(GUIDE_DISTANCE_LINE_DEFAULT_CONFIG, config?.ui);
26581
26624
  this.enabled = true;
26582
26625
  }
26583
26626
  getName() {
@@ -26597,19 +26640,16 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
26597
26640
  }
26598
26641
  }
26599
26642
  evaluateGuidelines(e) {
26600
- const stage = this.instance.getStage();
26601
- const mainLayer = this.instance.getMainLayer();
26602
26643
  const utilityLayer = this.instance.getUtilityLayer();
26603
26644
  if (!this.enabled) return;
26604
26645
  if (!utilityLayer) return;
26605
26646
  const { targetNode: node, skipNodes } = getTargetAndSkipNodes(this.instance, e);
26606
26647
  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);
26648
+ const nodeParent = this.instance.getNodeContainer(node);
26649
+ if (nodeParent === null) return;
26650
+ const stage = this.instance.getStage();
26651
+ this.referenceLayer = nodeParent;
26652
+ const visibleNodes = getVisibleNodes(this.instance, stage, nodeParent, skipNodes, this.referenceLayer);
26613
26653
  const { intersectedNodes: sortedHorizontalIntersectedNodes, intersectedNodesWithDistances: horizontalIntersectedNodes } = this.getHorizontallyIntersectingNodes(node, visibleNodes);
26614
26654
  const { intersectedNodes: sortedVerticalIntersectedNodes, intersectedNodesWithDistances: verticalIntersectedNodes } = this.getVerticallyIntersectingNodes(node, visibleNodes);
26615
26655
  this.cleanupGuidelines();
@@ -26840,6 +26880,11 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
26840
26880
  });
26841
26881
  }
26842
26882
  }
26883
+ isOverlapping(node1, node2) {
26884
+ const box1 = this.getBoxClientRect(node1);
26885
+ const box2 = this.getBoxClientRect(node2);
26886
+ 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);
26887
+ }
26843
26888
  getVerticallyIntersectingNodes(targetNode, nodes) {
26844
26889
  const targetBox = this.getBoxClientRect(targetNode);
26845
26890
  const intersectedNodes = [];
@@ -26856,30 +26901,32 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
26856
26901
  return ay - by;
26857
26902
  });
26858
26903
  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
- });
26904
+ for (let i = 0; i < intersectedNodes.length; i++) for (let j = i + 1; j < intersectedNodes.length; j++) {
26905
+ const nodeA = intersectedNodes[i];
26906
+ const nodeB = intersectedNodes[j];
26907
+ if (!this.isOverlapping(nodeA, nodeB)) {
26908
+ const boxA = this.getBoxClientRect(nodeA);
26909
+ const boxB = this.getBoxClientRect(nodeB);
26910
+ const aBottom = boxA.y + boxA.height;
26911
+ const bTop = boxB.y;
26912
+ const distance = Math.abs(aBottom - bTop);
26913
+ const left = Math.max(boxA.x, boxB.x);
26914
+ const right = Math.min(boxA.x + boxA.width, boxB.x + boxB.width);
26915
+ let midX;
26916
+ if (right > left) midX = left + (right - left) / 2;
26917
+ else {
26918
+ const aCenterX = boxA.x + boxA.width / 2;
26919
+ const bCenterX = boxB.x + boxB.width / 2;
26920
+ midX = (aCenterX + bCenterX) / 2;
26921
+ }
26922
+ intersectedNodesWithDistances.push({
26923
+ index: i,
26924
+ from: nodeA,
26925
+ to: nodeB,
26926
+ midX,
26927
+ distance: Math.round(distance)
26928
+ });
26929
+ }
26883
26930
  }
26884
26931
  return {
26885
26932
  intersectedNodes,
@@ -26902,56 +26949,38 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
26902
26949
  return ax - bx;
26903
26950
  });
26904
26951
  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
- });
26952
+ for (let i = 0; i < intersectedNodes.length; i++) for (let j = i + 1; j < intersectedNodes.length; j++) {
26953
+ const nodeA = intersectedNodes[i];
26954
+ const nodeB = intersectedNodes[j];
26955
+ if (!this.isOverlapping(nodeA, nodeB)) {
26956
+ const boxA = this.getBoxClientRect(nodeA);
26957
+ const boxB = this.getBoxClientRect(nodeB);
26958
+ const aRight = boxA.x + boxA.width;
26959
+ const bLeft = boxB.x;
26960
+ const distance = Math.abs(Math.round(aRight - bLeft));
26961
+ const top = Math.max(boxA.y, boxB.y);
26962
+ const bottom = Math.min(boxA.y + boxA.height, boxB.y + boxB.height);
26963
+ let midY;
26964
+ if (bottom > top) midY = top + (bottom - top) / 2;
26965
+ else {
26966
+ const aCenterY = boxA.y + boxA.height / 2;
26967
+ const bCenterY = boxB.y + boxB.height / 2;
26968
+ midY = (aCenterY + bCenterY) / 2;
26969
+ }
26970
+ intersectedNodesWithDistances.push({
26971
+ index: i,
26972
+ from: nodeA,
26973
+ to: nodeB,
26974
+ midY,
26975
+ distance: Math.round(distance)
26976
+ });
26977
+ }
26929
26978
  }
26930
26979
  return {
26931
26980
  intersectedNodes,
26932
26981
  intersectedNodesWithDistances
26933
26982
  };
26934
26983
  }
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
26984
  drawSizeGuidesHorizontally(intersectionsH, peerDistance) {
26956
26985
  const utilityLayer = this.instance.getUtilityLayer();
26957
26986
  if (utilityLayer) intersectionsH.forEach((pairInfo) => {
@@ -26968,40 +26997,60 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
26968
26997
  if (pairInfo.distance === peerDistance) this.renderVerticalLineWithDistanceBetweenNodes(from, to, pairInfo.midX, `${pairInfo.distance}`);
26969
26998
  });
26970
26999
  }
26971
- renderDistanceLabel(ctx, stage, labelText, { canvasMidX, canvasMidY }) {
27000
+ renderDistanceLabel(ctx, stage, labelText, orientation, { canvasMidX, canvasMidY }, config) {
26972
27001
  const scaleX = stage?.scaleX() || 1;
26973
27002
  const scaleY = stage?.scaleY() || 1;
26974
- const fontSize = 12;
26975
- const fontFamily = "Arial";
26976
- const padding = 6;
27003
+ const fontSize = config.label.fontSize;
27004
+ const fontFamily = config.label.fontFamily;
27005
+ const fontStyle = config.label.fontStyle;
27006
+ const cornerRadius = config.label.cornerRadius;
27007
+ const linePadding = config.label.linePadding;
27008
+ const fill = config.label.fill;
27009
+ const height = config.label.height;
27010
+ const paddingX = config.label.paddingX;
26977
27011
  const tempText = new Konva.Text({
26978
27012
  text: labelText,
26979
27013
  fontSize,
27014
+ fontStyle,
26980
27015
  fontFamily,
26981
27016
  visible: false
26982
27017
  });
26983
27018
  const textWidth = tempText.width();
26984
- const textHeight = tempText.height();
26985
- const labelWidth = textWidth + padding * 2;
26986
- const labelHeight = textHeight + padding * 2;
27019
+ const labelWidth = textWidth + paddingX * 2;
27020
+ const labelHeight = height;
26987
27021
  ctx.save();
26988
27022
  ctx.scale(1 / scaleX, 1 / scaleY);
26989
- const labelX = canvasMidX - labelWidth / 2;
26990
- const labelY = canvasMidY - labelHeight / 2;
27023
+ let labelX = canvasMidX - labelWidth / 2;
27024
+ let labelY = canvasMidY + linePadding;
27025
+ if (orientation === "vertical") {
27026
+ labelX = canvasMidX + linePadding;
27027
+ labelY = canvasMidY - labelWidth / 2;
27028
+ }
27029
+ const r = Math.min(cornerRadius, labelWidth / 2, labelHeight / 2);
26991
27030
  ctx.beginPath();
26992
- ctx.rect(labelX, labelY, labelWidth, labelHeight);
26993
- ctx.fillStyle = "#ff0000";
27031
+ ctx.moveTo(labelX + r, labelY);
27032
+ ctx.lineTo(labelX + labelWidth - r, labelY);
27033
+ ctx.quadraticCurveTo(labelX + labelWidth, labelY, labelX + labelWidth, labelY + r);
27034
+ ctx.lineTo(labelX + labelWidth, labelY + labelHeight - r);
27035
+ ctx.quadraticCurveTo(labelX + labelWidth, labelY + labelHeight, labelX + labelWidth - r, labelY + labelHeight);
27036
+ ctx.lineTo(labelX + r, labelY + labelHeight);
27037
+ ctx.quadraticCurveTo(labelX, labelY + labelHeight, labelX, labelY + labelHeight - r);
27038
+ ctx.lineTo(labelX, labelY + r);
27039
+ ctx.quadraticCurveTo(labelX, labelY, labelX + r, labelY);
27040
+ ctx.closePath();
27041
+ ctx.fillStyle = fill;
26994
27042
  ctx.fill();
26995
- ctx.font = `bold ${fontSize}px ${fontFamily}`;
27043
+ ctx.font = `${fontStyle} ${fontSize}px ${fontFamily}`;
26996
27044
  ctx.fillStyle = "white";
26997
27045
  ctx.textAlign = "center";
26998
27046
  ctx.textBaseline = "middle";
26999
- ctx.fillText(labelText, canvasMidX, labelY + labelHeight / 2);
27047
+ ctx.fillText(labelText, labelX + labelWidth / 2, labelY + labelHeight / 2);
27000
27048
  ctx.restore();
27001
27049
  }
27002
27050
  renderHorizontalLineWithDistanceBetweenNodes(from, to, midY, labelText) {
27003
27051
  const utilityLayer = this.instance.getUtilityLayer();
27004
27052
  const renderLabel = this.renderDistanceLabel;
27053
+ const uiConfig = this.uiConfig;
27005
27054
  const lineWithLabel = new Konva.Shape({
27006
27055
  name: GUIDE_HORIZONTAL_LINE_NAME,
27007
27056
  sceneFunc: function(ctx, shape) {
@@ -27015,8 +27064,8 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
27015
27064
  ctx.moveTo(x1, y);
27016
27065
  ctx.lineTo(x2, y);
27017
27066
  ctx.closePath();
27018
- ctx.strokeStyle = "#ff0000";
27019
- ctx.lineWidth = 1;
27067
+ ctx.strokeStyle = uiConfig.line.stroke;
27068
+ ctx.lineWidth = uiConfig.line.strokeWidth;
27020
27069
  ctx.setLineDash([]);
27021
27070
  ctx.stroke();
27022
27071
  ctx.closePath();
@@ -27024,10 +27073,10 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
27024
27073
  const worldMidY = y;
27025
27074
  const canvasMidX = worldMidX * scaleX;
27026
27075
  const canvasMidY = worldMidY * scaleY;
27027
- renderLabel(ctx, stage, labelText, {
27076
+ renderLabel(ctx, stage, labelText, "horizontal", {
27028
27077
  canvasMidX,
27029
27078
  canvasMidY
27030
- });
27079
+ }, uiConfig);
27031
27080
  ctx.fillStrokeShape(shape);
27032
27081
  }
27033
27082
  });
@@ -27037,6 +27086,7 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
27037
27086
  renderVerticalLineWithDistanceBetweenNodes(from, to, midX, labelText) {
27038
27087
  const utilityLayer = this.instance.getUtilityLayer();
27039
27088
  const renderLabel = this.renderDistanceLabel;
27089
+ const uiConfig = this.uiConfig;
27040
27090
  const lineWithLabel = new Konva.Shape({
27041
27091
  name: GUIDE_VERTICAL_LINE_NAME,
27042
27092
  sceneFunc: function(ctx, shape) {
@@ -27050,18 +27100,18 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
27050
27100
  ctx.setLineDash([]);
27051
27101
  ctx.moveTo(x, y1);
27052
27102
  ctx.lineTo(x, y2);
27053
- ctx.strokeStyle = "#ff0000";
27054
- ctx.lineWidth = 1;
27103
+ ctx.strokeStyle = uiConfig.line.stroke;
27104
+ ctx.lineWidth = uiConfig.line.strokeWidth;
27055
27105
  ctx.stroke();
27056
27106
  ctx.closePath();
27057
27107
  const worldMidX = x;
27058
27108
  const worldMidY = (y1 + y2) / 2;
27059
27109
  const canvasMidX = worldMidX * scaleX;
27060
27110
  const canvasMidY = worldMidY * scaleY;
27061
- renderLabel(ctx, stage, labelText, {
27111
+ renderLabel(ctx, stage, labelText, "vertical", {
27062
27112
  canvasMidX,
27063
27113
  canvasMidY
27064
- });
27114
+ }, uiConfig);
27065
27115
  ctx.fillStrokeShape(shape);
27066
27116
  }
27067
27117
  });
@@ -27077,5 +27127,5 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
27077
27127
  };
27078
27128
 
27079
27129
  //#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 };
27130
+ 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_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
27131
  //# sourceMappingURL=sdk.js.map