@inditextech/weave-sdk 3.7.2 → 3.9.0-SNAPSHOT.172.1

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
@@ -15102,6 +15102,9 @@ var WeaveStore = class {
15102
15102
  getStateJson() {
15103
15103
  return JSON.parse(JSON.stringify(this.state, void 0, 2));
15104
15104
  }
15105
+ getRoomId() {
15106
+ return this.roomId;
15107
+ }
15105
15108
  getStateSnapshot() {
15106
15109
  const doc = this.getDocument();
15107
15110
  return yjs_default.encodeStateAsUpdate(doc);
@@ -17676,19 +17679,20 @@ function moveNodeToContainerNT(instance, node, containerToMove, originalNode, or
17676
17679
  node.rotation(nodeRotation);
17677
17680
  node.x(node.x() - (layerToMoveAttrs.containerOffsetX ?? 0));
17678
17681
  node.y(node.y() - (layerToMoveAttrs.containerOffsetY ?? 0));
17679
- node.movedToContainer(layerToMove);
17682
+ node.destroy();
17683
+ const newNode = node.clone();
17680
17684
  instance.emitEvent("onNodeMovedToContainer", {
17681
- node: node.clone(),
17685
+ node: newNode,
17682
17686
  container: layerToMove,
17683
17687
  originalNode,
17684
17688
  originalContainer
17685
17689
  });
17686
17690
  const nodeHandler = instance.getNodeHandler(node.getAttrs().nodeType);
17687
17691
  if (nodeHandler) {
17688
- node.setAttrs({ onMoveContainer: true });
17689
- const actualNode = nodeHandler.serialize(node);
17690
- instance.removeNodeNT(actualNode, { emitUserChangeEvent: false });
17691
- instance.addNodeNT(actualNode, layerToMoveAttrs.id, {
17692
+ const actualNodeState = nodeHandler.serialize(node);
17693
+ const newNodeState = nodeHandler.serialize(newNode);
17694
+ instance.removeNodeNT(actualNodeState, { emitUserChangeEvent: false });
17695
+ instance.addNodeNT(newNodeState, layerToMoveAttrs.id, {
17692
17696
  emitUserChangeEvent: false,
17693
17697
  overrideUserChangeType: WEAVE_NODE_CHANGE_TYPE.UPDATE
17694
17698
  });
@@ -17917,17 +17921,6 @@ function isIOS() {
17917
17921
  return /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
17918
17922
  }
17919
17923
  const isServer = () => typeof window === "undefined";
17920
- const getPositionRelativeToContainerOnPosition = (instance) => {
17921
- let position = instance.getStage().getRelativePointerPosition();
17922
- if (!position) return position;
17923
- const container = containerOverCursor(instance, [], position);
17924
- if (container) if (container.getAttrs().containerId) {
17925
- const containerNode = container.findOne(`#${container.getAttrs().containerId}`);
17926
- if (containerNode) position = containerNode?.getRelativePointerPosition();
17927
- } else position = container?.getRelativePointerPosition();
17928
- if (!position) return position;
17929
- return position;
17930
- };
17931
17924
  const canComposite = (node) => {
17932
17925
  const parent = node.getParent();
17933
17926
  return parent?.getClassName() === "Group" && parent?.getAttrs().nodeType !== "frame" && parent?.getAttrs().nodeId === void 0;
@@ -18678,7 +18671,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18678
18671
  "bottom-right"
18679
18672
  ];
18680
18673
  this.taps = 0;
18681
- this.isCtrlMetaPressed = false;
18682
18674
  this.isSpaceKeyPressed = false;
18683
18675
  this.isDoubleTap = false;
18684
18676
  this.tapStart = null;
@@ -18778,12 +18770,12 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18778
18770
  }
18779
18771
  };
18780
18772
  stage.on("pointermove", (0, import_throttle.default)(handlePointerMoveInit, DEFAULT_THROTTLE_MS));
18781
- tr.on("transformstart", () => {
18773
+ tr.on("transformstart", (e) => {
18782
18774
  this.transformInProcess = true;
18783
18775
  this.triggerSelectedNodesEvent();
18784
18776
  const selectedNodes$1 = tr.nodes();
18785
18777
  for (const node of selectedNodes$1) {
18786
- node.handleMouseout();
18778
+ node.handleMouseout(e);
18787
18779
  if (node.getAttrs().strokeScaleEnabled !== false) {
18788
18780
  node.setAttr("strokeScaleEnabled", false);
18789
18781
  node.setAttr("_revertStrokeScaleEnabled", true);
@@ -18795,7 +18787,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18795
18787
  });
18796
18788
  });
18797
18789
  let nodeHovered = void 0;
18798
- tr.on("mousemove", () => {
18790
+ tr.on("mousemove", (e) => {
18799
18791
  if (this.dragInProcess) return;
18800
18792
  const pointerPos = stage.getPointerPosition();
18801
18793
  if (!pointerPos) return;
@@ -18805,13 +18797,13 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18805
18797
  if (shape) {
18806
18798
  const targetNode = this.instance.getInstanceRecursive(shape);
18807
18799
  if (targetNode && targetNode !== nodeHovered) {
18808
- this.instance.getStage().handleMouseover();
18809
- nodeHovered?.handleMouseout?.();
18810
- targetNode?.handleMouseover?.();
18800
+ this.instance.getStage().handleMouseover(e);
18801
+ nodeHovered?.handleMouseout?.(e);
18802
+ targetNode?.handleMouseover?.(e);
18811
18803
  nodeHovered = targetNode;
18812
18804
  }
18813
- targetNode?.handleMouseover?.();
18814
- } else nodeHovered?.handleMouseout?.();
18805
+ targetNode?.handleMouseover?.(e);
18806
+ } else nodeHovered?.handleMouseout?.(e);
18815
18807
  });
18816
18808
  tr.on("mouseover", () => {
18817
18809
  const nodesSelected = tr.nodes();
@@ -18820,32 +18812,37 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18820
18812
  stage.container().style.cursor = node.defineMousePointer() ?? "grab";
18821
18813
  } else stage.container().style.cursor = "grab";
18822
18814
  });
18823
- tr.on("mouseout", () => {
18824
- this.instance.getStage().handleMouseover?.();
18815
+ tr.on("mouseout", (e) => {
18816
+ this.instance.getStage().handleMouseover?.(e);
18825
18817
  nodeHovered = void 0;
18826
18818
  });
18827
- window.addEventListener("mouseout", () => {
18819
+ window.addEventListener("mouseout", (e) => {
18828
18820
  if (nodeHovered) {
18829
- nodeHovered.handleMouseout();
18821
+ nodeHovered.handleMouseout(e);
18830
18822
  nodeHovered = void 0;
18831
18823
  }
18832
- this.instance.getStage().handleMouseover?.();
18824
+ this.instance.getStage().handleMouseover?.(e);
18833
18825
  }, { signal: this.instance.getEventsController()?.signal });
18834
18826
  const handleTransform = (e) => {
18835
18827
  const moved = this.checkMoved(e);
18836
18828
  if (moved) this.getContextMenuPlugin()?.cancelLongPressTimer();
18837
18829
  this.triggerSelectedNodesEvent();
18838
18830
  if (this.getUsersPresencePlugin()) {
18839
- for (const node of tr.nodes()) this.getUsersPresencePlugin()?.setPresence(node.id(), {
18840
- x: node.x(),
18841
- y: node.y(),
18842
- width: node.width(),
18843
- height: node.height(),
18844
- scaleX: node.scaleX(),
18845
- scaleY: node.scaleY(),
18846
- rotation: node.rotation(),
18847
- strokeScaleEnabled: false
18848
- }, false);
18831
+ for (const node of tr.nodes()) {
18832
+ let parentId = node.getParent()?.id() ?? "";
18833
+ const parent = node.getParent();
18834
+ if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
18835
+ this.getUsersPresencePlugin()?.setPresence(node.id(), parentId, {
18836
+ x: node.x(),
18837
+ y: node.y(),
18838
+ width: node.width(),
18839
+ height: node.height(),
18840
+ scaleX: node.scaleX(),
18841
+ scaleY: node.scaleY(),
18842
+ rotation: node.rotation(),
18843
+ strokeScaleEnabled: false
18844
+ }, false);
18845
+ }
18849
18846
  this.getUsersPresencePlugin()?.forceSendPresence();
18850
18847
  }
18851
18848
  };
@@ -18869,6 +18866,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18869
18866
  let selectedNodes = [];
18870
18867
  tr.on("dragstart", (e) => {
18871
18868
  this.dragInProcess = true;
18869
+ let isWheelMousePressed = false;
18870
+ if (e.evt.button === 1) isWheelMousePressed = true;
18872
18871
  const mainLayer = this.instance.getMainLayer();
18873
18872
  if (!mainLayer) return;
18874
18873
  initialPos = {
@@ -18880,7 +18879,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18880
18879
  this.saveDragSelectedNodes();
18881
18880
  if (this.getDragSelectedNodes().length > 1) this.setNodesOpacityOnDrag();
18882
18881
  selectedNodes = tr.nodes();
18883
- if (stage$1.isMouseWheelPressed()) {
18882
+ if (isWheelMousePressed) {
18884
18883
  e.cancelBubble = true;
18885
18884
  e.target.stopDrag();
18886
18885
  return;
@@ -18904,13 +18903,14 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18904
18903
  x: e.target.x(),
18905
18904
  y: e.target.y()
18906
18905
  };
18906
+ let isWheelMousePressed = false;
18907
+ if (e.evt.button === 1) isWheelMousePressed = true;
18907
18908
  e.cancelBubble = true;
18908
18909
  if (initialPos) {
18909
18910
  const moved = this.checkMovedDrag(initialPos, actualPos);
18910
18911
  if (moved) this.getContextMenuPlugin()?.cancelLongPressTimer();
18911
18912
  }
18912
- const stage$1 = this.instance.getStage();
18913
- if (stage$1.isMouseWheelPressed()) {
18913
+ if (isWheelMousePressed) {
18914
18914
  e.cancelBubble = true;
18915
18915
  e.target.stopDrag();
18916
18916
  return;
@@ -18930,10 +18930,15 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18930
18930
  clearContainerTargets(this.instance);
18931
18931
  const layerToMove = containerOverCursor(this.instance, selectedNodes);
18932
18932
  if (this.getUsersPresencePlugin() && this.dragInProcess) {
18933
- for (const node of selectedNodes) this.getUsersPresencePlugin()?.setPresence(node.id(), {
18934
- x: node.x(),
18935
- y: node.y()
18936
- }, false);
18933
+ for (const node of selectedNodes) {
18934
+ let parentId = node.getParent()?.id() ?? "";
18935
+ const parent = node.getParent();
18936
+ if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
18937
+ this.getUsersPresencePlugin()?.setPresence(node.id(), parentId, {
18938
+ x: node.x(),
18939
+ y: node.y()
18940
+ }, false);
18941
+ }
18937
18942
  this.getUsersPresencePlugin()?.forceSendPresence();
18938
18943
  }
18939
18944
  if (layerToMove && !selectionContainsFrames) layerToMove.fire(WEAVE_NODE_CUSTOM_EVENTS.onTargetEnter, { bubbles: true });
@@ -19020,16 +19025,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
19020
19025
  tr.forceUpdate();
19021
19026
  }
19022
19027
  });
19023
- this.instance.addEventListener("onRender", () => {
19024
- const point = stage.getPointerPosition();
19025
- if (point) {
19026
- const ele = this.instance.getTargetingManager().pointIntersectsElement(point);
19027
- if (ele) {
19028
- const realEle = this.instance.getTargetingManager().resolveNode(ele);
19029
- realEle?.handleMouseover();
19030
- }
19031
- }
19032
- });
19033
19028
  this.instance.addEventListener("onNodesChange", () => {
19034
19029
  const currentSelectedNodes = tr.nodes();
19035
19030
  const unselectedNodes = this.prevSelectedNodes.filter((node) => !currentSelectedNodes.map((node1) => node1.getAttrs().id).includes(node.getAttrs().id));
@@ -19236,12 +19231,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
19236
19231
  initEvents() {
19237
19232
  this.selecting = false;
19238
19233
  const stage = this.instance.getStage();
19239
- window.addEventListener("blur", () => {
19240
- this.isCtrlMetaPressed = false;
19241
- this.isSpaceKeyPressed = false;
19242
- }, { signal: this.instance.getEventsController()?.signal });
19243
19234
  stage.container().addEventListener("keydown", (e) => {
19244
- if (e.ctrlKey || e.metaKey) this.isCtrlMetaPressed = true;
19245
19235
  if (e.code === "Space") this.isSpaceKeyPressed = true;
19246
19236
  if (e.code === "Backspace" || e.code === "Delete") {
19247
19237
  Promise.resolve().then(() => {
@@ -19251,7 +19241,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
19251
19241
  }
19252
19242
  }, { signal: this.instance.getEventsController()?.signal });
19253
19243
  stage.container().addEventListener("keyup", (e) => {
19254
- if (!(e.ctrlKey || e.metaKey)) this.isCtrlMetaPressed = false;
19255
19244
  if (e.code === "Space") this.isSpaceKeyPressed = false;
19256
19245
  }, { signal: this.instance.getEventsController()?.signal });
19257
19246
  stage.on("pointerdown", (e) => {
@@ -19303,7 +19292,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
19303
19292
  this.selectionRectangle.width(0);
19304
19293
  this.selectionRectangle.height(0);
19305
19294
  this.selecting = true;
19306
- if (this.isCtrlMetaPressed) {
19295
+ const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
19296
+ if (isCtrlOrMetaPressed) {
19307
19297
  const nodesSelected = this.tr.nodes();
19308
19298
  for (const node of nodesSelected) node.fire("onSelectionCleared", { bubbles: true });
19309
19299
  }
@@ -19523,7 +19513,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
19523
19513
  nodeTargeted.dblClick();
19524
19514
  return;
19525
19515
  }
19526
- if (stage.isCmdCtrlPressed()) return;
19516
+ const isCtrlOrCmdPressed = e.evt.ctrlKey || e.evt.metaKey;
19517
+ if (isCtrlOrCmdPressed) return;
19527
19518
  if (!metaPressed) {
19528
19519
  this.tr.nodes([nodeTargeted]);
19529
19520
  this.tr.show();
@@ -20165,11 +20156,6 @@ const MOVE_TOOL_STATE = {
20165
20156
 
20166
20157
  //#endregion
20167
20158
  //#region src/nodes/node.ts
20168
- const augmentKonvaStageClass = () => {
20169
- Konva.Stage.prototype.isMouseWheelPressed = function() {
20170
- return false;
20171
- };
20172
- };
20173
20159
  const augmentKonvaNodeClass = (config) => {
20174
20160
  const { transform } = config ?? {};
20175
20161
  Konva.Node.prototype.getTransformerProperties = function() {
@@ -20181,7 +20167,6 @@ const augmentKonvaNodeClass = (config) => {
20181
20167
  Konva.Node.prototype.getRealClientRect = function(config$1) {
20182
20168
  return this.getClientRect(config$1);
20183
20169
  };
20184
- Konva.Node.prototype.movedToContainer = function() {};
20185
20170
  Konva.Node.prototype.updatePosition = function() {};
20186
20171
  Konva.Node.prototype.triggerCrop = function() {};
20187
20172
  Konva.Node.prototype.closeCrop = function() {};
@@ -20231,7 +20216,6 @@ var WeaveNode = class {
20231
20216
  "bottom-right"
20232
20217
  ];
20233
20218
  };
20234
- node.movedToContainer = function() {};
20235
20219
  node.updatePosition = function() {};
20236
20220
  node.resetCrop = function() {};
20237
20221
  node.handleMouseover = function() {};
@@ -20420,7 +20404,10 @@ var WeaveNode = class {
20420
20404
  const nodesEdgeSnappingPlugin = this.getNodesEdgeSnappingPlugin();
20421
20405
  if (nodesSelectionPlugin && this.isSelecting() && this.isNodeSelected(node$1)) nodesSelectionPlugin.getTransformer().forceUpdate();
20422
20406
  if (nodesEdgeSnappingPlugin && transforming && this.isSelecting() && this.isNodeSelected(node$1)) nodesEdgeSnappingPlugin.evaluateGuidelines(e);
20423
- this.getUsersPresencePlugin()?.setPresence(node$1.id(), {
20407
+ let parentId = node$1.getParent()?.id() ?? "";
20408
+ const parent = node$1.getParent();
20409
+ if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
20410
+ this.getUsersPresencePlugin()?.setPresence(node$1.id(), parentId, {
20424
20411
  x: node$1.x(),
20425
20412
  y: node$1.y(),
20426
20413
  width: node$1.width(),
@@ -20476,6 +20463,8 @@ var WeaveNode = class {
20476
20463
  node.off("dragstart");
20477
20464
  node.on("dragstart", (e) => {
20478
20465
  const nodeTarget = e.target;
20466
+ let isWheelMousePressed = false;
20467
+ if (e.evt.button === 1) isWheelMousePressed = true;
20479
20468
  e.cancelBubble = true;
20480
20469
  this.getNodesSelectionFeedbackPlugin()?.hideSelectionHalo(nodeTarget);
20481
20470
  this.getSelectionPlugin()?.saveDragSelectedNodes();
@@ -20496,7 +20485,7 @@ var WeaveNode = class {
20496
20485
  return;
20497
20486
  }
20498
20487
  this.instance.emitEvent("onDrag", nodeTarget);
20499
- if (stage.isMouseWheelPressed()) {
20488
+ if (isWheelMousePressed) {
20500
20489
  e.cancelBubble = true;
20501
20490
  nodeTarget.stopDrag();
20502
20491
  }
@@ -20513,6 +20502,7 @@ var WeaveNode = class {
20513
20502
  originalNode = realNodeTarget.clone();
20514
20503
  originalContainer = realNodeTarget.getParent();
20515
20504
  if (originalContainer?.getAttrs().nodeId) originalContainer = stage.findOne(`#${originalContainer.getAttrs().nodeId}`);
20505
+ realNodeTarget.fire("nodeDragStart", { node: realNodeTarget });
20516
20506
  if (e.evt?.altKey) {
20517
20507
  nodeTarget.setAttrs({ isCloneOrigin: true });
20518
20508
  nodeTarget.setAttrs({ isCloned: false });
@@ -20541,19 +20531,20 @@ var WeaveNode = class {
20541
20531
  });
20542
20532
  const handleDragMove = (e) => {
20543
20533
  const nodeTarget = e.target;
20534
+ let isWheelMousePressed = false;
20535
+ if (e.evt.button === 1) isWheelMousePressed = true;
20544
20536
  e.cancelBubble = true;
20545
20537
  if (e.evt?.buttons === 0) {
20546
20538
  nodeTarget.stopDrag();
20547
20539
  return;
20548
20540
  }
20549
20541
  this.didMove = true;
20550
- const stage$1 = this.instance.getStage();
20551
20542
  const isErasing = this.instance.getActiveAction() === "eraseTool";
20552
20543
  if (isErasing) {
20553
20544
  nodeTarget.stopDrag();
20554
20545
  return;
20555
20546
  }
20556
- if (stage$1.isMouseWheelPressed()) {
20547
+ if (isWheelMousePressed) {
20557
20548
  e.cancelBubble = true;
20558
20549
  nodeTarget.stopDrag();
20559
20550
  return;
@@ -20568,7 +20559,10 @@ var WeaveNode = class {
20568
20559
  }
20569
20560
  if (this.isSelecting() && this.getSelectionPlugin()?.getSelectedNodes().length === 1) {
20570
20561
  clearContainerTargets(this.instance);
20571
- this.getUsersPresencePlugin()?.setPresence(realNodeTarget.id(), {
20562
+ let parentId = realNodeTarget.getParent()?.id() ?? "";
20563
+ const parent = realNodeTarget.getParent();
20564
+ if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
20565
+ this.getUsersPresencePlugin()?.setPresence(realNodeTarget.id(), parentId, {
20572
20566
  x: realNodeTarget.x(),
20573
20567
  y: realNodeTarget.y()
20574
20568
  });
@@ -20667,11 +20661,11 @@ var WeaveNode = class {
20667
20661
  originalPosition = realNodeTarget.getAbsolutePosition();
20668
20662
  });
20669
20663
  if (!node.getAttrs().overridesMouseControl) {
20670
- node.handleMouseover = () => {
20671
- this.handleMouseOver(node);
20664
+ node.handleMouseover = (e) => {
20665
+ this.handleMouseOver(e, node);
20672
20666
  };
20673
- node.handleMouseout = () => {
20674
- this.handleMouseout(node);
20667
+ node.handleMouseout = (e) => {
20668
+ this.handleMouseout(e, node);
20675
20669
  };
20676
20670
  }
20677
20671
  node.on("xChange yChange", () => {
@@ -20699,20 +20693,21 @@ var WeaveNode = class {
20699
20693
  };
20700
20694
  node.on("pointerover", (e) => {
20701
20695
  const realNodeTarget = this.getRealSelectedNode(e.target);
20702
- realNodeTarget?.handleMouseover?.();
20703
- const doCancelBubble = this.handleMouseOver(e.target);
20696
+ realNodeTarget?.handleMouseover?.(e);
20697
+ const doCancelBubble = this.handleMouseOver(e, e.target);
20704
20698
  if (doCancelBubble) e.cancelBubble = true;
20705
20699
  });
20706
20700
  node.on("pointerleave", (e) => {
20707
20701
  const realNodeTarget = this.getRealSelectedNode(e.target);
20708
- realNodeTarget?.handleMouseout?.();
20709
- this.handleMouseout(e.target);
20702
+ realNodeTarget?.handleMouseout?.(e);
20703
+ this.handleMouseout(e, e.target);
20710
20704
  });
20711
20705
  }
20712
20706
  }
20713
- handleMouseOver(node) {
20707
+ handleMouseOver(e, node) {
20714
20708
  const stage = this.instance.getStage();
20715
- if (stage?.isCmdCtrlPressed?.()) return false;
20709
+ const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
20710
+ if (isCtrlOrMetaPressed) return false;
20716
20711
  const user = this.instance.getStore().getUser();
20717
20712
  const activeAction = this.instance.getActiveAction();
20718
20713
  const isNodeSelectionEnabled = this.getSelectionPlugin()?.isEnabled();
@@ -20746,9 +20741,9 @@ var WeaveNode = class {
20746
20741
  else this.hideHoverState();
20747
20742
  return cancelBubble;
20748
20743
  }
20749
- handleMouseout(node) {
20750
- const stage = this.instance.getStage();
20751
- if (stage?.isCmdCtrlPressed?.()) return;
20744
+ handleMouseout(e, node) {
20745
+ const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
20746
+ if (isCtrlOrMetaPressed) return;
20752
20747
  const realNode = this.instance.getInstanceRecursive(node);
20753
20748
  if (realNode) this.hideHoverState();
20754
20749
  }
@@ -20780,7 +20775,6 @@ var WeaveNode = class {
20780
20775
  delete cleanedAttrs.mutexUserId;
20781
20776
  delete cleanedAttrs.draggable;
20782
20777
  delete cleanedAttrs.overridesMouseControl;
20783
- delete cleanedAttrs.onMoveContainer;
20784
20778
  delete cleanedAttrs.dragBoundFunc;
20785
20779
  return {
20786
20780
  key: attrs.id ?? "",
@@ -21395,45 +21389,23 @@ var WeaveTargetingManager = class {
21395
21389
  }
21396
21390
  getMousePointer(point) {
21397
21391
  this.logger.debug({ point }, "getMousePointer");
21398
- const stage = this.instance.getStage();
21399
21392
  const mainLayer = this.instance.getMainLayer();
21400
21393
  let relativeMousePointer = typeof point !== "undefined" ? point : mainLayer?.getRelativePointerPosition() ?? {
21401
21394
  x: 0,
21402
21395
  y: 0
21403
21396
  };
21404
- let measureContainer = mainLayer;
21405
- let container = mainLayer;
21406
21397
  const utilityLayer = this.instance.getUtilityLayer();
21407
21398
  if (utilityLayer) utilityLayer.visible(false);
21399
+ const containerAlt = containerOverCursor(this.instance, [], relativeMousePointer);
21408
21400
  const nodesSelection = this.instance.getPlugin("nodesSelection");
21409
21401
  if (nodesSelection) nodesSelection.getTransformer().visible(false);
21410
- const dummyRect = new Konva.Rect({
21411
- width: 10,
21412
- height: 10,
21413
- x: relativeMousePointer.x,
21414
- y: relativeMousePointer.y
21415
- });
21416
- mainLayer?.add(dummyRect);
21417
- const intersectedNode = this.nodeIntersectsContainerElement(dummyRect);
21418
- if (intersectedNode) {
21419
- const containerOfNode = stage.findOne(`#${intersectedNode.getAttrs().containerId}`);
21420
- if (containerOfNode) {
21421
- container = intersectedNode;
21422
- measureContainer = containerOfNode;
21423
- }
21424
- }
21425
- if (typeof point === "undefined" && container?.getAttrs().nodeType !== "layer") relativeMousePointer = measureContainer?.getRelativePointerPosition() ?? relativeMousePointer;
21426
- if (typeof point === "undefined" && container?.getAttrs().nodeType === "layer") relativeMousePointer = measureContainer?.getRelativePointerPosition() ?? {
21427
- x: 0,
21428
- y: 0
21429
- };
21402
+ relativeMousePointer = containerAlt?.getRelativePointerPosition() ?? relativeMousePointer;
21430
21403
  if (utilityLayer) utilityLayer.visible(true);
21431
21404
  if (nodesSelection) nodesSelection.getTransformer().visible(true);
21432
- dummyRect.destroy();
21433
21405
  return {
21434
21406
  mousePoint: relativeMousePointer,
21435
- container,
21436
- measureContainer
21407
+ container: containerAlt,
21408
+ measureContainer: containerAlt
21437
21409
  };
21438
21410
  }
21439
21411
  getMousePointerRelativeToContainer(container) {
@@ -22022,7 +21994,7 @@ var WeaveRegisterManager = class {
22022
21994
 
22023
21995
  //#endregion
22024
21996
  //#region package.json
22025
- var version = "3.7.2";
21997
+ var version = "3.9.0-SNAPSHOT.172.1";
22026
21998
 
22027
21999
  //#endregion
22028
22000
  //#region src/managers/setup.ts
@@ -23462,13 +23434,12 @@ var Weave = class {
23462
23434
  this.moduleLogger.info("Start instance");
23463
23435
  if (!this.isServerSide()) {
23464
23436
  this.eventsController = new AbortController();
23465
- if (!window.weave) window.weave = this;
23437
+ window.weave = this;
23466
23438
  }
23467
23439
  this.emitEvent("onRoomLoaded", false);
23468
23440
  this.status = WEAVE_INSTANCE_STATUS.STARTING;
23469
23441
  this.emitEvent("onInstanceStatus", this.status);
23470
23442
  await this.registerManager.registerNodesHandlers();
23471
- this.augmentKonvaStageClass();
23472
23443
  this.augmentKonvaNodeClass();
23473
23444
  this.registerManager.registerPlugins();
23474
23445
  this.registerManager.registerActionsHandlers();
@@ -23540,9 +23511,6 @@ var Weave = class {
23540
23511
  getConfiguration() {
23541
23512
  return this.config;
23542
23513
  }
23543
- augmentKonvaStageClass() {
23544
- augmentKonvaStageClass();
23545
- }
23546
23514
  augmentKonvaNodeClass(config) {
23547
23515
  augmentKonvaNodeClass(config);
23548
23516
  }
@@ -24315,8 +24283,6 @@ const setupUpscaleStage = (instance, stage) => {
24315
24283
  var WeaveStageNode = class extends WeaveNode {
24316
24284
  nodeType = WEAVE_STAGE_NODE_TYPE;
24317
24285
  stageFocused = false;
24318
- wheelMousePressed = false;
24319
- isCmdCtrlPressed = false;
24320
24286
  globalEventsInitialized = false;
24321
24287
  initialize = void 0;
24322
24288
  onRender(props) {
@@ -24325,9 +24291,7 @@ var WeaveStageNode = class extends WeaveNode {
24325
24291
  mode: "default"
24326
24292
  });
24327
24293
  setupUpscaleStage(this.instance, stage);
24328
- this.wheelMousePressed = false;
24329
24294
  stage.isFocused = () => this.stageFocused;
24330
- stage.isMouseWheelPressed = () => this.wheelMousePressed;
24331
24295
  stage.position({
24332
24296
  x: 0,
24333
24297
  y: 0
@@ -24363,8 +24327,7 @@ var WeaveStageNode = class extends WeaveNode {
24363
24327
  };
24364
24328
  stage.handleMouseout = function() {};
24365
24329
  stage.mode(WEAVE_STAGE_DEFAULT_MODE);
24366
- stage.on("pointerdown", (e) => {
24367
- if (e.evt.button === 1) this.wheelMousePressed = true;
24330
+ stage.on("pointerdown", () => {
24368
24331
  if (!this.instance.isServerSide() && [MOVE_TOOL_ACTION_NAME].includes(this.instance.getActiveAction() ?? "")) stage.container().style.cursor = "grabbing";
24369
24332
  });
24370
24333
  stage.on("pointermove", (e) => {
@@ -24378,9 +24341,8 @@ var WeaveStageNode = class extends WeaveNode {
24378
24341
  stage$1.container().style.cursor = "default";
24379
24342
  }
24380
24343
  });
24381
- stage.on("pointerup", (e) => {
24344
+ stage.on("pointerup", () => {
24382
24345
  const activeAction = this.instance.getActiveAction();
24383
- if (e.evt.button === 1) this.wheelMousePressed = false;
24384
24346
  if (!this.instance.isServerSide() && [MOVE_TOOL_ACTION_NAME].includes(activeAction ?? "")) stage.container().style.cursor = "grab";
24385
24347
  });
24386
24348
  stage.on("pointerover", (e) => {
@@ -24392,7 +24354,6 @@ var WeaveStageNode = class extends WeaveNode {
24392
24354
  this.hideHoverState();
24393
24355
  if (!this.instance.isServerSide()) stage.container().style.cursor = "default";
24394
24356
  });
24395
- stage.isCmdCtrlPressed = () => this.isCmdCtrlPressed;
24396
24357
  this.setupEvents();
24397
24358
  return stage;
24398
24359
  }
@@ -24400,12 +24361,8 @@ var WeaveStageNode = class extends WeaveNode {
24400
24361
  setupEvents() {
24401
24362
  if (this.globalEventsInitialized) return;
24402
24363
  if (this.instance.isServerSide()) return;
24403
- window.addEventListener("blur", () => {
24404
- this.isCmdCtrlPressed = false;
24405
- }, { signal: this.instance.getEventsController()?.signal });
24406
24364
  window.addEventListener("keydown", (e) => {
24407
24365
  if (this.isOnlyCtrlOrMeta(e)) {
24408
- this.isCmdCtrlPressed = true;
24409
24366
  this.instance.getStage().container().style.cursor = "default";
24410
24367
  const transformer = this.getSelectionPlugin()?.getTransformer();
24411
24368
  if (!transformer) return;
@@ -24416,7 +24373,6 @@ var WeaveStageNode = class extends WeaveNode {
24416
24373
  }, { signal: this.instance.getEventsController()?.signal });
24417
24374
  window.addEventListener("keyup", (e) => {
24418
24375
  if (!(e.ctrlKey || e.metaKey)) {
24419
- this.isCmdCtrlPressed = false;
24420
24376
  this.instance.getStage().container().style.cursor = "default";
24421
24377
  const transformer = this.getSelectionPlugin()?.getTransformer();
24422
24378
  if (!transformer) return;
@@ -24469,7 +24425,6 @@ var WeaveLayerNode = class extends WeaveNode {
24469
24425
  delete cleanedAttrs.mutexUserId;
24470
24426
  delete cleanedAttrs.draggable;
24471
24427
  delete cleanedAttrs.overridesMouseControl;
24472
- delete cleanedAttrs.onMoveContainer;
24473
24428
  delete cleanedAttrs.dragBoundFunc;
24474
24429
  return {
24475
24430
  key: attrs.id ?? "",
@@ -24554,7 +24509,6 @@ var WeaveGroupNode = class extends WeaveNode {
24554
24509
  delete cleanedAttrs.mutexUserId;
24555
24510
  delete cleanedAttrs.draggable;
24556
24511
  delete cleanedAttrs.overridesMouseControl;
24557
- delete cleanedAttrs.onMoveContainer;
24558
24512
  delete cleanedAttrs.dragBoundFunc;
24559
24513
  return {
24560
24514
  key: attrs.id ?? "",
@@ -25097,28 +25051,12 @@ var WeaveTextNode = class extends WeaveNode {
25097
25051
  }
25098
25052
  initialize() {
25099
25053
  this.keyPressHandler = void 0;
25100
- this.eventsInitialized = false;
25101
- this.isCtrlMetaPressed = false;
25102
25054
  this.textAreaSuperContainer = null;
25103
25055
  this.textAreaContainer = null;
25104
25056
  this.textArea = null;
25105
25057
  this.editing = false;
25106
25058
  this.textArea = null;
25107
25059
  }
25108
- initEvents() {
25109
- if (!this.eventsInitialized && !globalThis._weave_isServerSide) {
25110
- window.addEventListener("blur", () => {
25111
- this.isCtrlMetaPressed = false;
25112
- }, { signal: this.instance.getEventsController()?.signal });
25113
- window.addEventListener("keydown", (e) => {
25114
- if (e.ctrlKey || e.metaKey) this.isCtrlMetaPressed = true;
25115
- }, { signal: this.instance.getEventsController()?.signal });
25116
- window.addEventListener("keyup", (e) => {
25117
- if (!(e.ctrlKey || e.metaKey)) this.isCtrlMetaPressed = false;
25118
- }, { signal: this.instance.getEventsController()?.signal });
25119
- this.eventsInitialized = true;
25120
- }
25121
- }
25122
25060
  updateNode(nodeInstance) {
25123
25061
  const actNode = this.instance.getStage().findOne(`#${nodeInstance.id()}`);
25124
25062
  if (actNode) {
@@ -25154,7 +25092,6 @@ var WeaveTextNode = class extends WeaveNode {
25154
25092
  }
25155
25093
  }
25156
25094
  onRender(props) {
25157
- this.initEvents();
25158
25095
  const text = new Konva.Text({
25159
25096
  ...props,
25160
25097
  name: "node",
@@ -25221,6 +25158,7 @@ var WeaveTextNode = class extends WeaveNode {
25221
25158
  text.setAttr("triggerEditMode", this.triggerEditMode.bind(this));
25222
25159
  let actualAnchor = void 0;
25223
25160
  text.on("transformstart", (e) => {
25161
+ const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
25224
25162
  this.instance.emitEvent("onTransform", e.target);
25225
25163
  actualAnchor = this.getNodesSelectionPlugin()?.getTransformer()?.getActiveAnchor();
25226
25164
  if (text.getAttrs().layout === TEXT_LAYOUT.SMART && [
@@ -25228,7 +25166,7 @@ var WeaveTextNode = class extends WeaveNode {
25228
25166
  "top-right",
25229
25167
  "bottom-left",
25230
25168
  "bottom-right"
25231
- ].includes(actualAnchor ?? "") || text.getAttrs().layout === TEXT_LAYOUT.FIXED && this.isCtrlMetaPressed) this.getNodesSelectionPlugin()?.getTransformer()?.keepRatio(true);
25169
+ ].includes(actualAnchor ?? "") || text.getAttrs().layout === TEXT_LAYOUT.FIXED && isCtrlOrMetaPressed) this.getNodesSelectionPlugin()?.getTransformer()?.keepRatio(true);
25232
25170
  else this.getNodesSelectionPlugin()?.getTransformer()?.keepRatio(false);
25233
25171
  if ([TEXT_LAYOUT.AUTO_HEIGHT, TEXT_LAYOUT.SMART].includes(text.getAttrs().layout) && ["middle-right", "middle-left"].includes(actualAnchor ?? "")) {
25234
25172
  text.wrap("word");
@@ -25359,7 +25297,6 @@ var WeaveTextNode = class extends WeaveNode {
25359
25297
  delete cleanedAttrs.measureMultilineText;
25360
25298
  delete cleanedAttrs.overridesMouseControl;
25361
25299
  delete cleanedAttrs.shouldUpdateOnTransform;
25362
- delete cleanedAttrs.onMoveContainer;
25363
25300
  delete cleanedAttrs.dragBoundFunc;
25364
25301
  return {
25365
25302
  key: attrs.id ?? "",
@@ -25751,6 +25688,7 @@ const WEAVE_IMAGE_CROP_ANCHOR_POSITION = {
25751
25688
  ["BOTTOM_CENTER"]: "bottom-center"
25752
25689
  };
25753
25690
  const WEAVE_IMAGE_DEFAULT_CONFIG = {
25691
+ cleanup: { intervalMs: 60 * 1e3 },
25754
25692
  performance: { cache: { enabled: false } },
25755
25693
  style: {
25756
25694
  placeholder: { fill: "#aaaaaa" },
@@ -26140,7 +26078,8 @@ var WeaveImageCrop = class WeaveImageCrop {
26140
26078
  this.onClose();
26141
26079
  const utilityLayer = this.instance.getUtilityLayer();
26142
26080
  utilityLayer?.destroyChildren();
26143
- if (stage.isCmdCtrlPressed() && utilityLayer) {
26081
+ const isCtrlOrMetaPressed = e.ctrlKey || e.metaKey;
26082
+ if (isCtrlOrMetaPressed && utilityLayer) {
26144
26083
  this.node.renderCropMode(utilityLayer, this.image);
26145
26084
  utilityLayer.show();
26146
26085
  }
@@ -26449,6 +26388,25 @@ var WeaveImageNode = class extends WeaveNode {
26449
26388
  this.imageTryoutAttempts = {};
26450
26389
  this.imageFallback = {};
26451
26390
  }
26391
+ setupNotUsedImagesCleanup() {
26392
+ const cleanupHandler = () => {
26393
+ this.notUsedImagesCleanup = null;
26394
+ const stage = this.instance.getStage();
26395
+ const nodesIds = Object.keys(this.imageState);
26396
+ for (const nodeId of nodesIds) {
26397
+ const node = stage.findOne(`#${nodeId}`);
26398
+ if (!node) {
26399
+ delete this.imageSource[nodeId];
26400
+ delete this.imageState[nodeId];
26401
+ delete this.imageTryoutAttempts[nodeId];
26402
+ delete this.imageFallback[nodeId];
26403
+ }
26404
+ }
26405
+ this.setupNotUsedImagesCleanup();
26406
+ };
26407
+ const bindedCleanupHandler = cleanupHandler.bind(this);
26408
+ if (!this.notUsedImagesCleanup) setTimeout(bindedCleanupHandler, this.config.cleanup.intervalMs);
26409
+ }
26452
26410
  preloadCursors() {
26453
26411
  return new Promise((resolve) => {
26454
26412
  (async () => {
@@ -26525,6 +26483,7 @@ var WeaveImageNode = class extends WeaveNode {
26525
26483
  this.instance.resolveAsyncElement(nodeId, WEAVE_IMAGE_NODE_TYPE);
26526
26484
  }
26527
26485
  onRender(props) {
26486
+ this.setupNotUsedImagesCleanup();
26528
26487
  const imageProperties = props.imageProperties;
26529
26488
  const imageProps = props;
26530
26489
  const { id } = imageProps;
@@ -26550,11 +26509,6 @@ var WeaveImageNode = class extends WeaveNode {
26550
26509
  if (this.isSelecting() && selectedNodes.includes(image)) return "grab";
26551
26510
  return "pointer";
26552
26511
  };
26553
- image.movedToContainer = () => {
26554
- const stage = this.instance.getStage();
26555
- const image$1 = stage.findOne(`#${id}`);
26556
- if (!image$1) return;
26557
- };
26558
26512
  if (this.config.cropMode.enabled) {
26559
26513
  image.triggerCrop = () => {
26560
26514
  this.triggerCrop(image, { cmdCtrl: { triggered: false } });
@@ -26676,23 +26630,36 @@ var WeaveImageNode = class extends WeaveNode {
26676
26630
  if (this.imageCrop) this.closeCrop(image, WEAVE_IMAGE_CROP_END_TYPE.CANCEL);
26677
26631
  }
26678
26632
  });
26633
+ image.on("nodeDragStart", () => {
26634
+ const utilityLayer = this.instance.getUtilityLayer();
26635
+ if (!utilityLayer) return;
26636
+ const nodes = utilityLayer?.find(".cropMode") ?? [];
26637
+ nodes.forEach((n) => {
26638
+ n.destroy();
26639
+ });
26640
+ const transformer = this.getSelectionPlugin()?.getTransformer();
26641
+ if (!transformer) return;
26642
+ transformer.show();
26643
+ });
26679
26644
  if (this.config.cropMode.enabled && this.config.cropMode.triggers.ctrlCmd) {
26680
26645
  image.on("onCmdCtrlPressed", () => {
26646
+ const utilityLayer = this.instance.getUtilityLayer();
26647
+ if (!utilityLayer) return;
26648
+ if (image.isDragging()) return;
26681
26649
  const transformer = this.getSelectionPlugin()?.getTransformer();
26682
26650
  if (!transformer) return;
26683
26651
  transformer.hide();
26684
- const utilityLayer = this.instance.getUtilityLayer();
26685
- if (!utilityLayer) return;
26686
26652
  utilityLayer?.destroyChildren();
26687
26653
  this.renderCropMode(utilityLayer, image);
26688
26654
  utilityLayer?.show();
26689
26655
  });
26690
26656
  image.on("onCmdCtrlReleased", () => {
26657
+ const utilityLayer = this.instance.getUtilityLayer();
26658
+ if (!utilityLayer) return;
26659
+ if (image.isDragging()) return;
26691
26660
  const transformer = this.getSelectionPlugin()?.getTransformer();
26692
26661
  if (!transformer) return;
26693
26662
  transformer.show();
26694
- const utilityLayer = this.instance.getUtilityLayer();
26695
- if (!utilityLayer) return;
26696
26663
  utilityLayer?.destroyChildren();
26697
26664
  });
26698
26665
  }
@@ -26751,6 +26718,7 @@ var WeaveImageNode = class extends WeaveNode {
26751
26718
  fill: "transparent",
26752
26719
  strokeScaleEnabled: false,
26753
26720
  strokeWidth: 2,
26721
+ name: "cropMode",
26754
26722
  stroke: "#1a1aff",
26755
26723
  draggable: false,
26756
26724
  listening: false,
@@ -26811,6 +26779,7 @@ var WeaveImageNode = class extends WeaveNode {
26811
26779
  }));
26812
26780
  const anchor = new Konva.Rect({
26813
26781
  draggable: false,
26782
+ name: "cropMode",
26814
26783
  rotation: node.rotation()
26815
26784
  });
26816
26785
  this.config.cropMode.selection.anchorStyleFunc(anchor, position);
@@ -27251,20 +27220,15 @@ var WeaveImageNode = class extends WeaveNode {
27251
27220
  }
27252
27221
  onDestroy(nodeInstance) {
27253
27222
  const nodeId = nodeInstance.getAttrs().id ?? "";
27254
- const isMoveContainer = nodeInstance.getAttr("onMoveContainer");
27255
- nodeInstance.setAttr("onMoveContainer", void 0);
27256
27223
  const utilityLayer = this.instance.getUtilityLayer();
27257
- utilityLayer?.destroyChildren();
27224
+ const nodes = utilityLayer?.find(".cropMode") ?? [];
27225
+ nodes.forEach((n) => {
27226
+ n.destroy();
27227
+ });
27258
27228
  if (this.imageTryoutIds[nodeId]) {
27259
27229
  clearTimeout(this.imageTryoutIds[nodeId]);
27260
27230
  delete this.imageTryoutIds[nodeId];
27261
27231
  }
27262
- if (!isMoveContainer) {
27263
- delete this.imageSource[nodeId];
27264
- delete this.imageState[nodeId];
27265
- delete this.imageTryoutAttempts[nodeId];
27266
- delete this.imageFallback[nodeId];
27267
- }
27268
27232
  nodeInstance.destroy();
27269
27233
  }
27270
27234
  };
@@ -27811,7 +27775,6 @@ var WeaveFrameNode = class extends WeaveNode {
27811
27775
  delete cleanedAttrs.draggable;
27812
27776
  delete cleanedAttrs.onTargetEnter;
27813
27777
  delete cleanedAttrs.overridesMouseControl;
27814
- delete cleanedAttrs.onMoveContainer;
27815
27778
  delete cleanedAttrs.dragBoundFunc;
27816
27779
  return {
27817
27780
  key: realAttrs?.id ?? "",
@@ -28050,7 +28013,6 @@ var WeaveStrokeNode = class extends WeaveNode {
28050
28013
  delete cleanedAttrs.sceneFunc;
28051
28014
  delete cleanedAttrs.hitFunc;
28052
28015
  delete cleanedAttrs.overridesMouseControl;
28053
- delete cleanedAttrs.onMoveContainer;
28054
28016
  delete cleanedAttrs.dragBoundFunc;
28055
28017
  return {
28056
28018
  key: attrs.id ?? "",
@@ -29595,6 +29557,7 @@ var WeaveVideoNode = class extends WeaveNode {
29595
29557
  const videoIconGroup = video.findOne(`#${id}-video-icon-group`);
29596
29558
  if (!videoPlaceholder || !videoIconGroup) return;
29597
29559
  const realVideoPlaceholderURL = this.config.urlTransformer?.(videoProps.videoPlaceholderURL ?? "", video) ?? videoProps.videoPlaceholderURL;
29560
+ if (!this.videoPlaceholder) this.initialize();
29598
29561
  this.videoPlaceholder[id] = Konva.Util.createImageElement();
29599
29562
  this.videoPlaceholder[id].crossOrigin = this.config.crossOrigin;
29600
29563
  this.videoPlaceholder[id].src = realVideoPlaceholderURL;
@@ -29859,16 +29822,16 @@ var WeaveVideoNode = class extends WeaveNode {
29859
29822
  }
29860
29823
  if (isServer()) this.instance.updateNode(this.serialize(videoGroup));
29861
29824
  const defaultHandleMouseover = videoGroup.handleMouseover;
29862
- videoGroup.handleMouseover = () => {
29863
- defaultHandleMouseover.call(this);
29825
+ videoGroup.handleMouseover = (e) => {
29826
+ defaultHandleMouseover.call(this, e);
29864
29827
  if (this.config.style.track.onlyOnHover && this.videoState[id].loaded) {
29865
29828
  const videoProgress = videoGroup.findOne(`#${id}-video-progress`);
29866
29829
  videoProgress?.show();
29867
29830
  }
29868
29831
  };
29869
29832
  const defaultHandleMouseout = videoGroup.handleMouseout;
29870
- videoGroup.handleMouseout = () => {
29871
- defaultHandleMouseout.call(this);
29833
+ videoGroup.handleMouseout = (e) => {
29834
+ defaultHandleMouseout.call(e, this);
29872
29835
  if (this.config.style.track.onlyOnHover && this.videoState[id].loaded && !this.videoState[id].paused) {
29873
29836
  const videoProgress = videoGroup.findOne(`#${id}-video-progress`);
29874
29837
  videoProgress?.hide();
@@ -31982,7 +31945,6 @@ var WeaveConnectorNode = class extends WeaveNode {
31982
31945
  delete cleanedAttrs.startInfoLoaded;
31983
31946
  delete cleanedAttrs.endInfoLoaded;
31984
31947
  delete cleanedAttrs.overridesMouseControl;
31985
- delete cleanedAttrs.onMoveContainer;
31986
31948
  delete cleanedAttrs.dragBoundFunc;
31987
31949
  return {
31988
31950
  key: attrs.id ?? "",
@@ -32138,7 +32100,6 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32138
32100
  this.zooming = false;
32139
32101
  this.isTrackpad = false;
32140
32102
  this.zoomVelocity = 0;
32141
- this.isCtrlOrMetaPressed = false;
32142
32103
  this.updatedMinimumZoom = false;
32143
32104
  this.actualStep = this.config.zoomSteps.findIndex((step) => step === this.config.defaultZoom);
32144
32105
  this.actualScale = this.config.zoomSteps[this.actualStep];
@@ -32449,15 +32410,6 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32449
32410
  };
32450
32411
  }
32451
32412
  initEvents() {
32452
- window.addEventListener("blur", () => {
32453
- this.isCtrlOrMetaPressed = false;
32454
- }, { signal: this.instance.getEventsController()?.signal });
32455
- window.addEventListener("keydown", (e) => {
32456
- if (e.ctrlKey || e.metaKey) this.isCtrlOrMetaPressed = true;
32457
- }, { signal: this.instance.getEventsController()?.signal });
32458
- window.addEventListener("keyup", (e) => {
32459
- if (!(e.ctrlKey || e.metaKey)) this.isCtrlOrMetaPressed = false;
32460
- }, { signal: this.instance.getEventsController()?.signal });
32461
32413
  const stage = this.instance.getStage();
32462
32414
  let lastCenter = null;
32463
32415
  let lastDist = 0;
@@ -32539,7 +32491,8 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32539
32491
  });
32540
32492
  let doZoom = false;
32541
32493
  const handleWheelImmediate = (e) => {
32542
- const performZoom = this.isCtrlOrMetaPressed || !this.isCtrlOrMetaPressed && e.ctrlKey && e.deltaMode === 0;
32494
+ const isCtrlOrMetaPressed = e.ctrlKey || e.metaKey;
32495
+ const performZoom = isCtrlOrMetaPressed || !isCtrlOrMetaPressed && e.ctrlKey && e.deltaMode === 0;
32543
32496
  const mouseX = e.clientX;
32544
32497
  const mouseY = e.clientY;
32545
32498
  let elementUnderMouse = document.elementFromPoint(mouseX, mouseY);
@@ -34450,7 +34403,7 @@ var WeaveImageToolAction = class extends WeaveAction {
34450
34403
  const dragProperties = this.instance.getDragProperties();
34451
34404
  if (dragProperties && dragId === WEAVE_IMAGE_TOOL_ACTION_NAME) {
34452
34405
  this.instance.getStage().setPointersPositions(e);
34453
- const position = getPositionRelativeToContainerOnPosition(this.instance);
34406
+ const position = this.instance.getStage().getRelativePointerPosition();
34454
34407
  if (!position) return;
34455
34408
  this.instance.triggerAction(WEAVE_IMAGE_TOOL_ACTION_NAME, {
34456
34409
  type: WEAVE_IMAGE_TOOL_UPLOAD_TYPE.IMAGE_URL,
@@ -34900,7 +34853,7 @@ var WeaveImagesToolAction = class extends WeaveAction {
34900
34853
  const dragProperties = this.instance.getDragProperties();
34901
34854
  if (dragProperties && dragId === WEAVE_IMAGES_TOOL_ACTION_NAME) {
34902
34855
  this.instance.getStage().setPointersPositions(e);
34903
- const position = getPositionRelativeToContainerOnPosition(this.instance);
34856
+ const position = this.instance.getStage().getRelativePointerPosition();
34904
34857
  if (!position) return;
34905
34858
  this.instance.triggerAction(WEAVE_IMAGES_TOOL_ACTION_NAME, {
34906
34859
  type: WEAVE_IMAGES_TOOL_UPLOAD_TYPE.IMAGE_URL,
@@ -37011,7 +36964,7 @@ var WeaveVideoToolAction = class extends WeaveAction {
37011
36964
  const dragProperties = this.instance.getDragProperties();
37012
36965
  if (dragProperties && dragId === VIDEO_TOOL_ACTION_NAME) {
37013
36966
  this.instance.getStage().setPointersPositions(e);
37014
- const position = getPositionRelativeToContainerOnPosition(this.instance);
36967
+ const position = this.instance.getStage().getRelativePointerPosition();
37015
36968
  this.instance.triggerAction(VIDEO_TOOL_ACTION_NAME, {
37016
36969
  videoId: dragProperties.videoId,
37017
36970
  videoParams: dragProperties.videoParams,
@@ -38143,7 +38096,6 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
38143
38096
  this.moveToolActive = false;
38144
38097
  this.isMouseLeftButtonPressed = false;
38145
38098
  this.isMouseMiddleButtonPressed = false;
38146
- this.isCtrlOrMetaPressed = false;
38147
38099
  this.isSpaceKeyPressed = false;
38148
38100
  this.previousPointer = null;
38149
38101
  this.currentPointer = null;
@@ -38172,11 +38124,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
38172
38124
  }
38173
38125
  initEvents() {
38174
38126
  const stage = this.instance.getStage();
38175
- window.addEventListener("blur", () => {
38176
- this.isCtrlOrMetaPressed = false;
38177
- }, { signal: this.instance.getEventsController()?.signal });
38178
38127
  window.addEventListener("keydown", (e) => {
38179
- if (e.ctrlKey || e.metaKey) this.isCtrlOrMetaPressed = true;
38180
38128
  if (e.code === "Space") {
38181
38129
  this.getContextMenuPlugin()?.disable();
38182
38130
  this.getNodesSelectionPlugin()?.disable();
@@ -38187,7 +38135,6 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
38187
38135
  }
38188
38136
  }, { signal: this.instance.getEventsController()?.signal });
38189
38137
  window.addEventListener("keyup", (e) => {
38190
- if (e.key === "Meta" || e.key === "Control") this.isCtrlOrMetaPressed = false;
38191
38138
  if (e.code === "Space") {
38192
38139
  this.getContextMenuPlugin()?.enable();
38193
38140
  this.getNodesSelectionPlugin()?.enable();
@@ -38254,7 +38201,8 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
38254
38201
  this.cleanupEdgeMoveIntervals();
38255
38202
  });
38256
38203
  const handleWheel = (e) => {
38257
- const performPanning = !this.isCtrlOrMetaPressed && !e.ctrlKey;
38204
+ const isCtrlOrMetaPressed = e.ctrlKey || e.metaKey;
38205
+ const performPanning = !isCtrlOrMetaPressed && !e.ctrlKey;
38258
38206
  const mouseX = e.clientX;
38259
38207
  const mouseY = e.clientY;
38260
38208
  let elementUnderMouse = document.elementFromPoint(mouseX, mouseY);
@@ -38262,7 +38210,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
38262
38210
  const shadowHost = getTopmostShadowHost(stage.container());
38263
38211
  if (shadowHost) elementUnderMouse = shadowHost.elementFromPoint(mouseX, mouseY);
38264
38212
  }
38265
- if (!this.enabled || this.isCtrlOrMetaPressed || e.buttons === 4 || !performPanning || this.instance.getClosestParentWithWeaveId(elementUnderMouse) !== stage.container()) return;
38213
+ if (!this.enabled || isCtrlOrMetaPressed || e.buttons === 4 || !performPanning || this.instance.getClosestParentWithWeaveId(elementUnderMouse) !== stage.container()) return;
38266
38214
  this.getContextMenuPlugin()?.cancelLongPressTimer();
38267
38215
  stage.x(stage.x() - e.deltaX);
38268
38216
  stage.y(stage.y() - e.deltaY);
@@ -39294,7 +39242,11 @@ var WeaveUsersPresencePlugin = class extends WeavePlugin {
39294
39242
  const presenceInfo = userPresence[nodeId];
39295
39243
  if (this.config.getUser().id === presenceInfo.userId) continue;
39296
39244
  const nodeInstance = stage.findOne(`#${presenceInfo.nodeId}`);
39297
- if (nodeInstance) {
39245
+ if (!nodeInstance) continue;
39246
+ let parentId = nodeInstance.getParent()?.id() ?? "";
39247
+ const parent = nodeInstance.getParent();
39248
+ if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
39249
+ if (nodeInstance && presenceInfo.parentId === parentId) {
39298
39250
  const newProps = {
39299
39251
  ...nodeInstance.getAttrs(),
39300
39252
  ...presenceInfo.attrs
@@ -39309,10 +39261,11 @@ var WeaveUsersPresencePlugin = class extends WeavePlugin {
39309
39261
  const store = this.instance.getStore();
39310
39262
  store.setAwarenessInfo(WEAVE_USER_PRESENCE_KEY, this.userPresence);
39311
39263
  }
39312
- setPresence(nodeId, attrs, forceUpdate = true) {
39264
+ setPresence(nodeId, parentId, attrs, forceUpdate = true) {
39313
39265
  const userInfo = this.config.getUser();
39314
39266
  this.userPresence[nodeId] = {
39315
39267
  userId: userInfo.id,
39268
+ parentId,
39316
39269
  nodeId,
39317
39270
  attrs
39318
39271
  };
@@ -40519,7 +40472,16 @@ var WeaveCommentsRendererPlugin = class extends WeavePlugin {
40519
40472
  //#endregion
40520
40473
  //#region src/plugins/stage-keyboard-move/constants.ts
40521
40474
  const WEAVE_STAGE_KEYBOARD_MOVE_KEY = "stageKeyboardMove";
40522
- const WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG = { movementDelta: 5 };
40475
+ const WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG = {
40476
+ movementDelta: 1,
40477
+ shiftMovementDelta: 10
40478
+ };
40479
+ const WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION = {
40480
+ ["UP"]: "up",
40481
+ ["DOWN"]: "down",
40482
+ ["LEFT"]: "left",
40483
+ ["RIGHT"]: "right"
40484
+ };
40523
40485
 
40524
40486
  //#endregion
40525
40487
  //#region src/plugins/stage-keyboard-move/stage-keyboard-move.ts
@@ -40534,25 +40496,31 @@ var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
40534
40496
  getName() {
40535
40497
  return WEAVE_STAGE_KEYBOARD_MOVE_KEY;
40536
40498
  }
40537
- handleNodesMovement(movementOrientation) {
40499
+ handleNodesMovement(movementOrientation, { isShiftPressed }) {
40538
40500
  const nodesSelectionPlugin = this.instance.getPlugin("nodesSelection");
40539
40501
  if (nodesSelectionPlugin) {
40540
40502
  const selectedNodes = nodesSelectionPlugin.getSelectedNodes();
40503
+ const movementDelta = isShiftPressed ? this.config.shiftMovementDelta : this.config.movementDelta;
40541
40504
  for (const node of selectedNodes) {
40542
40505
  switch (movementOrientation) {
40543
- case "up":
40544
- node.y(node.y() - this.config.movementDelta);
40506
+ case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.UP:
40507
+ node.y(node.y() - movementDelta);
40545
40508
  break;
40546
- case "down":
40547
- node.y(node.y() + this.config.movementDelta);
40509
+ case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.DOWN:
40510
+ node.y(node.y() + movementDelta);
40548
40511
  break;
40549
- case "left":
40550
- node.x(node.x() - this.config.movementDelta);
40512
+ case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.LEFT:
40513
+ node.x(node.x() - movementDelta);
40551
40514
  break;
40552
- case "right":
40553
- node.x(node.x() + this.config.movementDelta);
40515
+ case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.RIGHT:
40516
+ node.x(node.x() + movementDelta);
40554
40517
  break;
40555
40518
  }
40519
+ this.instance.emitEvent("onNodeKeyboardMove", {
40520
+ node,
40521
+ orientation: movementOrientation,
40522
+ delta: movementDelta
40523
+ });
40556
40524
  const nodeHandler = this.instance.getNodeHandler(node.getAttrs().nodeType);
40557
40525
  if (!nodeHandler) break;
40558
40526
  this.instance.updateNode(nodeHandler.serialize(node));
@@ -40561,10 +40529,11 @@ var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
40561
40529
  }
40562
40530
  onInit() {
40563
40531
  window.addEventListener("keydown", (e) => {
40564
- if (e.code === "ArrowUp" && e.shiftKey) this.handleNodesMovement("up");
40565
- if (e.code === "ArrowLeft" && e.shiftKey) this.handleNodesMovement("left");
40566
- if (e.code === "ArrowRight" && e.shiftKey) this.handleNodesMovement("right");
40567
- if (e.code === "ArrowDown" && e.shiftKey) this.handleNodesMovement("down");
40532
+ const isShiftPressed = e.shiftKey || e.code === "Shift";
40533
+ if (e.code === "ArrowUp") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.UP, { isShiftPressed });
40534
+ if (e.code === "ArrowLeft") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.LEFT, { isShiftPressed });
40535
+ if (e.code === "ArrowRight") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.RIGHT, { isShiftPressed });
40536
+ if (e.code === "ArrowDown") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.DOWN, { isShiftPressed });
40568
40537
  }, { signal: this.instance.getEventsController()?.signal });
40569
40538
  }
40570
40539
  enable() {
@@ -40622,4 +40591,4 @@ function getJSONFromYjsBinary(actualState) {
40622
40591
  }
40623
40592
 
40624
40593
  //#endregion
40625
- export { ALIGN_NODES_ALIGN_TO, ALIGN_NODES_TOOL_ACTION_NAME, ALIGN_NODES_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_DEFAULT_CONFIG, BRUSH_TOOL_STATE, CONNECTOR_TOOL_ACTION_NAME, CONNECTOR_TOOL_DEFAULT_CONFIG, CONNECTOR_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, LINE_TOOL_ACTION_NAME, LINE_TOOL_DEFAULT_CONFIG, LINE_TOOL_STATE, MEASURE_TOOL_ACTION_NAME, MEASURE_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, STAGE_MINIMAP_DEFAULT_CONFIG, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, VIDEO_TOOL_ACTION_NAME, VIDEO_TOOL_STATE, WEAVE_ARROW_NODE_TYPE, WEAVE_ARROW_TOOL_ACTION_NAME, WEAVE_ARROW_TOOL_STATE, WEAVE_COMMENTS_RENDERER_KEY, WEAVE_COMMENTS_TOOL_LAYER_ID, WEAVE_COMMENT_CREATE_ACTION, WEAVE_COMMENT_NODE_ACTION, WEAVE_COMMENT_NODE_DEFAULTS, WEAVE_COMMENT_NODE_TYPE, WEAVE_COMMENT_STATUS, WEAVE_COMMENT_TOOL_ACTION_NAME, WEAVE_COMMENT_TOOL_DEFAULT_CONFIG, WEAVE_COMMENT_TOOL_STATE, WEAVE_COMMENT_VIEW_ACTION, WEAVE_CONNECTOR_NODE_ANCHOR_ORIGIN, WEAVE_CONNECTOR_NODE_DECORATOR_TYPE, WEAVE_CONNECTOR_NODE_DEFAULT_CONFIG, WEAVE_CONNECTOR_NODE_LINE_ORIGIN, WEAVE_CONNECTOR_NODE_LINE_TYPE, WEAVE_CONNECTOR_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_DEFAULT_BACKGROUND_COLOR, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_CONFIG, WEAVE_GRID_DOT_TYPES, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_GROUP_NODE_TYPE, WEAVE_IMAGES_TOOL_ACTION_NAME, WEAVE_IMAGES_TOOL_DEFAULT_CONFIG, WEAVE_IMAGES_TOOL_STATE, WEAVE_IMAGES_TOOL_UPLOAD_TYPE, WEAVE_IMAGE_CROP_ANCHOR_POSITION, WEAVE_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_DEFAULT_CONFIG, WEAVE_IMAGE_NODE_TYPE, WEAVE_IMAGE_TOOL_ACTION_NAME, WEAVE_IMAGE_TOOL_CONFIG_DEFAULT, WEAVE_IMAGE_TOOL_STATE, WEAVE_IMAGE_TOOL_UPLOAD_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_DEFAULT_CONFIG, WEAVE_LINE_NODE_TYPE, WEAVE_MEASURE_NODE_DEFAULT_CONFIG, WEAVE_MEASURE_NODE_TYPE, WEAVE_MEASURE_TOOL_DEFAULT_CONFIG, WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_DEFAULT_CONFIG, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_KEY, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_LAYER_ID, WEAVE_NODES_SELECTION_DEFAULT_CONFIG, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_STAGE_DEFAULT_MODE, WEAVE_STAGE_DROP_AREA_KEY, WEAVE_STAGE_GRID_PLUGIN_KEY, WEAVE_STAGE_IMAGE_CROPPING_MODE, WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG, WEAVE_STAGE_KEYBOARD_MOVE_KEY, WEAVE_STAGE_MINIMAP_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAGE_PANNING_DEFAULT_CONFIG, WEAVE_STAGE_PANNING_KEY, WEAVE_STAGE_PANNING_THROTTLE_MS, WEAVE_STAGE_TEXT_EDITION_MODE, WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, WEAVE_STAGE_ZOOM_KEY, WEAVE_STAGE_ZOOM_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_NODE_TYPE, WEAVE_STROKE_SINGLE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_SINGLE_NODE_TIP_SIDE, WEAVE_STROKE_SINGLE_NODE_TIP_TYPE, WEAVE_STROKE_SINGLE_NODE_TYPE, WEAVE_STROKE_TOOL_ACTION_NAME, WEAVE_STROKE_TOOL_ACTION_NAME_ALIASES, WEAVE_STROKE_TOOL_DEFAULT_CONFIG, WEAVE_STROKE_TOOL_STATE, WEAVE_TEXT_NODE_DEFAULT_CONFIG, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_CONFIG_DEFAULT_PROPS, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_PRESENCE_CONFIG_DEFAULT_PROPS, WEAVE_USERS_PRESENCE_PLUGIN_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTER_KEY, WEAVE_USER_PRESENCE_KEY, WEAVE_USER_SELECTION_KEY, WEAVE_VIDEO_DEFAULT_CONFIG, WEAVE_VIDEO_NODE_TYPE, Weave, WeaveAction, WeaveAlignNodesToolAction, WeaveArrowNode, WeaveArrowToolAction, WeaveBrushToolAction, WeaveCommentNode, WeaveCommentToolAction, WeaveCommentsRendererPlugin, WeaveConnectedUsersPlugin, WeaveConnectorNode, WeaveConnectorToolAction, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveEllipseNode, WeaveEllipseToolAction, WeaveEraserToolAction, WeaveExportNodesToolAction, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToSelectionToolAction, WeaveFrameNode, WeaveFrameToolAction, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveImagesToolAction, WeaveLayerNode, WeaveLineNode, WeaveLineToolAction, WeaveMeasureNode, WeaveMeasureToolAction, WeaveMoveToolAction, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesEdgeSnappingPlugin, WeaveNodesMultiSelectionFeedbackPlugin, WeaveNodesSelectionPlugin, WeavePenToolAction, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRegularPolygonNode, WeaveRegularPolygonToolAction, WeaveRenderer, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageKeyboardMovePlugin, WeaveStageMinimapPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStarNode, WeaveStarToolAction, WeaveStore, WeaveStrokeNode, WeaveStrokeSingleNode, WeaveStrokeToolAction, WeaveTextNode, WeaveTextToolAction, WeaveUsersPointersPlugin, WeaveUsersPresencePlugin, WeaveUsersSelectionPlugin, WeaveVideoNode, WeaveVideoToolAction, WeaveZoomInToolAction, WeaveZoomOutToolAction, canComposite, clearContainerTargets, containerOverCursor, containsNodeDeep, defaultInitialState, downscaleImageFile, downscaleImageFromURL, getBoundingBox, getDownscaleRatio, getExportBoundingBox, getImageSizeFromFile, getJSONFromYjsBinary, getPositionRelativeToContainerOnPosition, getSelectedNodesMetadata, getStageClickPoint, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodes, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isArray, isIOS, isInShadowDOM, isNodeInSelection, isObject, isServer, loadImageSource, mapJsonToYjsArray, mapJsonToYjsElements, mapJsonToYjsMap, memoize, mergeExceptArrays, moveNodeToContainer, moveNodeToContainerNT, resetScale, weavejsToYjsBinary };
40594
+ export { ALIGN_NODES_ALIGN_TO, ALIGN_NODES_TOOL_ACTION_NAME, ALIGN_NODES_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_DEFAULT_CONFIG, BRUSH_TOOL_STATE, CONNECTOR_TOOL_ACTION_NAME, CONNECTOR_TOOL_DEFAULT_CONFIG, CONNECTOR_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, LINE_TOOL_ACTION_NAME, LINE_TOOL_DEFAULT_CONFIG, LINE_TOOL_STATE, MEASURE_TOOL_ACTION_NAME, MEASURE_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, STAGE_MINIMAP_DEFAULT_CONFIG, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, VIDEO_TOOL_ACTION_NAME, VIDEO_TOOL_STATE, WEAVE_ARROW_NODE_TYPE, WEAVE_ARROW_TOOL_ACTION_NAME, WEAVE_ARROW_TOOL_STATE, WEAVE_COMMENTS_RENDERER_KEY, WEAVE_COMMENTS_TOOL_LAYER_ID, WEAVE_COMMENT_CREATE_ACTION, WEAVE_COMMENT_NODE_ACTION, WEAVE_COMMENT_NODE_DEFAULTS, WEAVE_COMMENT_NODE_TYPE, WEAVE_COMMENT_STATUS, WEAVE_COMMENT_TOOL_ACTION_NAME, WEAVE_COMMENT_TOOL_DEFAULT_CONFIG, WEAVE_COMMENT_TOOL_STATE, WEAVE_COMMENT_VIEW_ACTION, WEAVE_CONNECTOR_NODE_ANCHOR_ORIGIN, WEAVE_CONNECTOR_NODE_DECORATOR_TYPE, WEAVE_CONNECTOR_NODE_DEFAULT_CONFIG, WEAVE_CONNECTOR_NODE_LINE_ORIGIN, WEAVE_CONNECTOR_NODE_LINE_TYPE, WEAVE_CONNECTOR_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_DEFAULT_BACKGROUND_COLOR, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_CONFIG, WEAVE_GRID_DOT_TYPES, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_GROUP_NODE_TYPE, WEAVE_IMAGES_TOOL_ACTION_NAME, WEAVE_IMAGES_TOOL_DEFAULT_CONFIG, WEAVE_IMAGES_TOOL_STATE, WEAVE_IMAGES_TOOL_UPLOAD_TYPE, WEAVE_IMAGE_CROP_ANCHOR_POSITION, WEAVE_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_DEFAULT_CONFIG, WEAVE_IMAGE_NODE_TYPE, WEAVE_IMAGE_TOOL_ACTION_NAME, WEAVE_IMAGE_TOOL_CONFIG_DEFAULT, WEAVE_IMAGE_TOOL_STATE, WEAVE_IMAGE_TOOL_UPLOAD_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_DEFAULT_CONFIG, WEAVE_LINE_NODE_TYPE, WEAVE_MEASURE_NODE_DEFAULT_CONFIG, WEAVE_MEASURE_NODE_TYPE, WEAVE_MEASURE_TOOL_DEFAULT_CONFIG, WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_DEFAULT_CONFIG, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_KEY, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_LAYER_ID, WEAVE_NODES_SELECTION_DEFAULT_CONFIG, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_STAGE_DEFAULT_MODE, WEAVE_STAGE_DROP_AREA_KEY, WEAVE_STAGE_GRID_PLUGIN_KEY, WEAVE_STAGE_IMAGE_CROPPING_MODE, WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG, WEAVE_STAGE_KEYBOARD_MOVE_KEY, WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION, WEAVE_STAGE_MINIMAP_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAGE_PANNING_DEFAULT_CONFIG, WEAVE_STAGE_PANNING_KEY, WEAVE_STAGE_PANNING_THROTTLE_MS, WEAVE_STAGE_TEXT_EDITION_MODE, WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, WEAVE_STAGE_ZOOM_KEY, WEAVE_STAGE_ZOOM_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_NODE_TYPE, WEAVE_STROKE_SINGLE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_SINGLE_NODE_TIP_SIDE, WEAVE_STROKE_SINGLE_NODE_TIP_TYPE, WEAVE_STROKE_SINGLE_NODE_TYPE, WEAVE_STROKE_TOOL_ACTION_NAME, WEAVE_STROKE_TOOL_ACTION_NAME_ALIASES, WEAVE_STROKE_TOOL_DEFAULT_CONFIG, WEAVE_STROKE_TOOL_STATE, WEAVE_TEXT_NODE_DEFAULT_CONFIG, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_CONFIG_DEFAULT_PROPS, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_PRESENCE_CONFIG_DEFAULT_PROPS, WEAVE_USERS_PRESENCE_PLUGIN_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTER_KEY, WEAVE_USER_PRESENCE_KEY, WEAVE_USER_SELECTION_KEY, WEAVE_VIDEO_DEFAULT_CONFIG, WEAVE_VIDEO_NODE_TYPE, Weave, WeaveAction, WeaveAlignNodesToolAction, WeaveArrowNode, WeaveArrowToolAction, WeaveBrushToolAction, WeaveCommentNode, WeaveCommentToolAction, WeaveCommentsRendererPlugin, WeaveConnectedUsersPlugin, WeaveConnectorNode, WeaveConnectorToolAction, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveEllipseNode, WeaveEllipseToolAction, WeaveEraserToolAction, WeaveExportNodesToolAction, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToSelectionToolAction, WeaveFrameNode, WeaveFrameToolAction, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveImagesToolAction, WeaveLayerNode, WeaveLineNode, WeaveLineToolAction, WeaveMeasureNode, WeaveMeasureToolAction, WeaveMoveToolAction, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesEdgeSnappingPlugin, WeaveNodesMultiSelectionFeedbackPlugin, WeaveNodesSelectionPlugin, WeavePenToolAction, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRegularPolygonNode, WeaveRegularPolygonToolAction, WeaveRenderer, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageKeyboardMovePlugin, WeaveStageMinimapPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStarNode, WeaveStarToolAction, WeaveStore, WeaveStrokeNode, WeaveStrokeSingleNode, WeaveStrokeToolAction, WeaveTextNode, WeaveTextToolAction, WeaveUsersPointersPlugin, WeaveUsersPresencePlugin, WeaveUsersSelectionPlugin, WeaveVideoNode, WeaveVideoToolAction, WeaveZoomInToolAction, WeaveZoomOutToolAction, canComposite, clearContainerTargets, containerOverCursor, containsNodeDeep, defaultInitialState, downscaleImageFile, downscaleImageFromURL, getBoundingBox, getDownscaleRatio, getExportBoundingBox, getImageSizeFromFile, getJSONFromYjsBinary, getSelectedNodesMetadata, getStageClickPoint, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodes, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isArray, isIOS, isInShadowDOM, isNodeInSelection, isObject, isServer, loadImageSource, mapJsonToYjsArray, mapJsonToYjsElements, mapJsonToYjsMap, memoize, mergeExceptArrays, moveNodeToContainer, moveNodeToContainerNT, resetScale, weavejsToYjsBinary };