@inditextech/weave-sdk 3.7.1 → 3.8.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.node.js CHANGED
@@ -15101,6 +15101,9 @@ var WeaveStore = class {
15101
15101
  getStateJson() {
15102
15102
  return JSON.parse(JSON.stringify(this.state, void 0, 2));
15103
15103
  }
15104
+ getRoomId() {
15105
+ return this.roomId;
15106
+ }
15104
15107
  getStateSnapshot() {
15105
15108
  const doc = this.getDocument();
15106
15109
  return yjs_default.encodeStateAsUpdate(doc);
@@ -18677,7 +18680,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18677
18680
  "bottom-right"
18678
18681
  ];
18679
18682
  this.taps = 0;
18680
- this.isCtrlMetaPressed = false;
18681
18683
  this.isSpaceKeyPressed = false;
18682
18684
  this.isDoubleTap = false;
18683
18685
  this.tapStart = null;
@@ -18777,12 +18779,12 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18777
18779
  }
18778
18780
  };
18779
18781
  stage.on("pointermove", (0, import_throttle.default)(handlePointerMoveInit, DEFAULT_THROTTLE_MS));
18780
- tr.on("transformstart", () => {
18782
+ tr.on("transformstart", (e) => {
18781
18783
  this.transformInProcess = true;
18782
18784
  this.triggerSelectedNodesEvent();
18783
18785
  const selectedNodes$1 = tr.nodes();
18784
18786
  for (const node of selectedNodes$1) {
18785
- node.handleMouseout();
18787
+ node.handleMouseout(e);
18786
18788
  if (node.getAttrs().strokeScaleEnabled !== false) {
18787
18789
  node.setAttr("strokeScaleEnabled", false);
18788
18790
  node.setAttr("_revertStrokeScaleEnabled", true);
@@ -18794,7 +18796,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18794
18796
  });
18795
18797
  });
18796
18798
  let nodeHovered = void 0;
18797
- tr.on("mousemove", () => {
18799
+ tr.on("mousemove", (e) => {
18798
18800
  if (this.dragInProcess) return;
18799
18801
  const pointerPos = stage.getPointerPosition();
18800
18802
  if (!pointerPos) return;
@@ -18804,13 +18806,13 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18804
18806
  if (shape) {
18805
18807
  const targetNode = this.instance.getInstanceRecursive(shape);
18806
18808
  if (targetNode && targetNode !== nodeHovered) {
18807
- this.instance.getStage().handleMouseover();
18808
- nodeHovered?.handleMouseout?.();
18809
- targetNode?.handleMouseover?.();
18809
+ this.instance.getStage().handleMouseover(e);
18810
+ nodeHovered?.handleMouseout?.(e);
18811
+ targetNode?.handleMouseover?.(e);
18810
18812
  nodeHovered = targetNode;
18811
18813
  }
18812
- targetNode?.handleMouseover?.();
18813
- } else nodeHovered?.handleMouseout?.();
18814
+ targetNode?.handleMouseover?.(e);
18815
+ } else nodeHovered?.handleMouseout?.(e);
18814
18816
  });
18815
18817
  tr.on("mouseover", () => {
18816
18818
  const nodesSelected = tr.nodes();
@@ -18819,16 +18821,16 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18819
18821
  stage.container().style.cursor = node.defineMousePointer() ?? "grab";
18820
18822
  } else stage.container().style.cursor = "grab";
18821
18823
  });
18822
- tr.on("mouseout", () => {
18823
- this.instance.getStage().handleMouseover?.();
18824
+ tr.on("mouseout", (e) => {
18825
+ this.instance.getStage().handleMouseover?.(e);
18824
18826
  nodeHovered = void 0;
18825
18827
  });
18826
- window.addEventListener("mouseout", () => {
18828
+ window.addEventListener("mouseout", (e) => {
18827
18829
  if (nodeHovered) {
18828
- nodeHovered.handleMouseout();
18830
+ nodeHovered.handleMouseout(e);
18829
18831
  nodeHovered = void 0;
18830
18832
  }
18831
- this.instance.getStage().handleMouseover?.();
18833
+ this.instance.getStage().handleMouseover?.(e);
18832
18834
  }, { signal: this.instance.getEventsController()?.signal });
18833
18835
  const handleTransform = (e) => {
18834
18836
  const moved = this.checkMoved(e);
@@ -18868,6 +18870,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18868
18870
  let selectedNodes = [];
18869
18871
  tr.on("dragstart", (e) => {
18870
18872
  this.dragInProcess = true;
18873
+ let isWheelMousePressed = false;
18874
+ if (e.evt.button === 1) isWheelMousePressed = true;
18871
18875
  const mainLayer = this.instance.getMainLayer();
18872
18876
  if (!mainLayer) return;
18873
18877
  initialPos = {
@@ -18879,7 +18883,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18879
18883
  this.saveDragSelectedNodes();
18880
18884
  if (this.getDragSelectedNodes().length > 1) this.setNodesOpacityOnDrag();
18881
18885
  selectedNodes = tr.nodes();
18882
- if (stage$1.isMouseWheelPressed()) {
18886
+ if (isWheelMousePressed) {
18883
18887
  e.cancelBubble = true;
18884
18888
  e.target.stopDrag();
18885
18889
  return;
@@ -18903,13 +18907,14 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18903
18907
  x: e.target.x(),
18904
18908
  y: e.target.y()
18905
18909
  };
18910
+ let isWheelMousePressed = false;
18911
+ if (e.evt.button === 1) isWheelMousePressed = true;
18906
18912
  e.cancelBubble = true;
18907
18913
  if (initialPos) {
18908
18914
  const moved = this.checkMovedDrag(initialPos, actualPos);
18909
18915
  if (moved) this.getContextMenuPlugin()?.cancelLongPressTimer();
18910
18916
  }
18911
- const stage$1 = this.instance.getStage();
18912
- if (stage$1.isMouseWheelPressed()) {
18917
+ if (isWheelMousePressed) {
18913
18918
  e.cancelBubble = true;
18914
18919
  e.target.stopDrag();
18915
18920
  return;
@@ -19019,16 +19024,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
19019
19024
  tr.forceUpdate();
19020
19025
  }
19021
19026
  });
19022
- this.instance.addEventListener("onRender", () => {
19023
- const point = stage.getPointerPosition();
19024
- if (point) {
19025
- const ele = this.instance.getTargetingManager().pointIntersectsElement(point);
19026
- if (ele) {
19027
- const realEle = this.instance.getTargetingManager().resolveNode(ele);
19028
- realEle?.handleMouseover();
19029
- }
19030
- }
19031
- });
19032
19027
  this.instance.addEventListener("onNodesChange", () => {
19033
19028
  const currentSelectedNodes = tr.nodes();
19034
19029
  const unselectedNodes = this.prevSelectedNodes.filter((node) => !currentSelectedNodes.map((node1) => node1.getAttrs().id).includes(node.getAttrs().id));
@@ -19235,12 +19230,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
19235
19230
  initEvents() {
19236
19231
  this.selecting = false;
19237
19232
  const stage = this.instance.getStage();
19238
- window.addEventListener("blur", () => {
19239
- this.isCtrlMetaPressed = false;
19240
- this.isSpaceKeyPressed = false;
19241
- }, { signal: this.instance.getEventsController()?.signal });
19242
19233
  stage.container().addEventListener("keydown", (e) => {
19243
- if (e.ctrlKey || e.metaKey) this.isCtrlMetaPressed = true;
19244
19234
  if (e.code === "Space") this.isSpaceKeyPressed = true;
19245
19235
  if (e.code === "Backspace" || e.code === "Delete") {
19246
19236
  Promise.resolve().then(() => {
@@ -19250,7 +19240,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
19250
19240
  }
19251
19241
  }, { signal: this.instance.getEventsController()?.signal });
19252
19242
  stage.container().addEventListener("keyup", (e) => {
19253
- if (!(e.ctrlKey || e.metaKey)) this.isCtrlMetaPressed = false;
19254
19243
  if (e.code === "Space") this.isSpaceKeyPressed = false;
19255
19244
  }, { signal: this.instance.getEventsController()?.signal });
19256
19245
  stage.on("pointerdown", (e) => {
@@ -19302,7 +19291,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
19302
19291
  this.selectionRectangle.width(0);
19303
19292
  this.selectionRectangle.height(0);
19304
19293
  this.selecting = true;
19305
- if (this.isCtrlMetaPressed) {
19294
+ const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
19295
+ if (isCtrlOrMetaPressed) {
19306
19296
  const nodesSelected = this.tr.nodes();
19307
19297
  for (const node of nodesSelected) node.fire("onSelectionCleared", { bubbles: true });
19308
19298
  }
@@ -19522,7 +19512,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
19522
19512
  nodeTargeted.dblClick();
19523
19513
  return;
19524
19514
  }
19525
- if (stage.isCmdCtrlPressed()) return;
19515
+ const isCtrlOrCmdPressed = e.evt.ctrlKey || e.evt.metaKey;
19516
+ if (isCtrlOrCmdPressed) return;
19526
19517
  if (!metaPressed) {
19527
19518
  this.tr.nodes([nodeTargeted]);
19528
19519
  this.tr.show();
@@ -20164,11 +20155,6 @@ const MOVE_TOOL_STATE = {
20164
20155
 
20165
20156
  //#endregion
20166
20157
  //#region src/nodes/node.ts
20167
- const augmentKonvaStageClass = () => {
20168
- Konva.Stage.prototype.isMouseWheelPressed = function() {
20169
- return false;
20170
- };
20171
- };
20172
20158
  const augmentKonvaNodeClass = (config) => {
20173
20159
  const { transform } = config ?? {};
20174
20160
  Konva.Node.prototype.getTransformerProperties = function() {
@@ -20475,6 +20461,8 @@ var WeaveNode = class {
20475
20461
  node.off("dragstart");
20476
20462
  node.on("dragstart", (e) => {
20477
20463
  const nodeTarget = e.target;
20464
+ let isWheelMousePressed = false;
20465
+ if (e.evt.button === 1) isWheelMousePressed = true;
20478
20466
  e.cancelBubble = true;
20479
20467
  this.getNodesSelectionFeedbackPlugin()?.hideSelectionHalo(nodeTarget);
20480
20468
  this.getSelectionPlugin()?.saveDragSelectedNodes();
@@ -20495,7 +20483,7 @@ var WeaveNode = class {
20495
20483
  return;
20496
20484
  }
20497
20485
  this.instance.emitEvent("onDrag", nodeTarget);
20498
- if (stage.isMouseWheelPressed()) {
20486
+ if (isWheelMousePressed) {
20499
20487
  e.cancelBubble = true;
20500
20488
  nodeTarget.stopDrag();
20501
20489
  }
@@ -20512,6 +20500,7 @@ var WeaveNode = class {
20512
20500
  originalNode = realNodeTarget.clone();
20513
20501
  originalContainer = realNodeTarget.getParent();
20514
20502
  if (originalContainer?.getAttrs().nodeId) originalContainer = stage.findOne(`#${originalContainer.getAttrs().nodeId}`);
20503
+ realNodeTarget.fire("nodeDragStart", { node: realNodeTarget });
20515
20504
  if (e.evt?.altKey) {
20516
20505
  nodeTarget.setAttrs({ isCloneOrigin: true });
20517
20506
  nodeTarget.setAttrs({ isCloned: false });
@@ -20540,19 +20529,20 @@ var WeaveNode = class {
20540
20529
  });
20541
20530
  const handleDragMove = (e) => {
20542
20531
  const nodeTarget = e.target;
20532
+ let isWheelMousePressed = false;
20533
+ if (e.evt.button === 1) isWheelMousePressed = true;
20543
20534
  e.cancelBubble = true;
20544
20535
  if (e.evt?.buttons === 0) {
20545
20536
  nodeTarget.stopDrag();
20546
20537
  return;
20547
20538
  }
20548
20539
  this.didMove = true;
20549
- const stage$1 = this.instance.getStage();
20550
20540
  const isErasing = this.instance.getActiveAction() === "eraseTool";
20551
20541
  if (isErasing) {
20552
20542
  nodeTarget.stopDrag();
20553
20543
  return;
20554
20544
  }
20555
- if (stage$1.isMouseWheelPressed()) {
20545
+ if (isWheelMousePressed) {
20556
20546
  e.cancelBubble = true;
20557
20547
  nodeTarget.stopDrag();
20558
20548
  return;
@@ -20666,11 +20656,11 @@ var WeaveNode = class {
20666
20656
  originalPosition = realNodeTarget.getAbsolutePosition();
20667
20657
  });
20668
20658
  if (!node.getAttrs().overridesMouseControl) {
20669
- node.handleMouseover = () => {
20670
- this.handleMouseOver(node);
20659
+ node.handleMouseover = (e) => {
20660
+ this.handleMouseOver(e, node);
20671
20661
  };
20672
- node.handleMouseout = () => {
20673
- this.handleMouseout(node);
20662
+ node.handleMouseout = (e) => {
20663
+ this.handleMouseout(e, node);
20674
20664
  };
20675
20665
  }
20676
20666
  node.on("xChange yChange", () => {
@@ -20698,20 +20688,21 @@ var WeaveNode = class {
20698
20688
  };
20699
20689
  node.on("pointerover", (e) => {
20700
20690
  const realNodeTarget = this.getRealSelectedNode(e.target);
20701
- realNodeTarget?.handleMouseover?.();
20702
- const doCancelBubble = this.handleMouseOver(e.target);
20691
+ realNodeTarget?.handleMouseover?.(e);
20692
+ const doCancelBubble = this.handleMouseOver(e, e.target);
20703
20693
  if (doCancelBubble) e.cancelBubble = true;
20704
20694
  });
20705
20695
  node.on("pointerleave", (e) => {
20706
20696
  const realNodeTarget = this.getRealSelectedNode(e.target);
20707
- realNodeTarget?.handleMouseout?.();
20708
- this.handleMouseout(e.target);
20697
+ realNodeTarget?.handleMouseout?.(e);
20698
+ this.handleMouseout(e, e.target);
20709
20699
  });
20710
20700
  }
20711
20701
  }
20712
- handleMouseOver(node) {
20702
+ handleMouseOver(e, node) {
20713
20703
  const stage = this.instance.getStage();
20714
- if (stage?.isCmdCtrlPressed?.()) return false;
20704
+ const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
20705
+ if (isCtrlOrMetaPressed) return false;
20715
20706
  const user = this.instance.getStore().getUser();
20716
20707
  const activeAction = this.instance.getActiveAction();
20717
20708
  const isNodeSelectionEnabled = this.getSelectionPlugin()?.isEnabled();
@@ -20745,9 +20736,9 @@ var WeaveNode = class {
20745
20736
  else this.hideHoverState();
20746
20737
  return cancelBubble;
20747
20738
  }
20748
- handleMouseout(node) {
20749
- const stage = this.instance.getStage();
20750
- if (stage?.isCmdCtrlPressed?.()) return;
20739
+ handleMouseout(e, node) {
20740
+ const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
20741
+ if (isCtrlOrMetaPressed) return;
20751
20742
  const realNode = this.instance.getInstanceRecursive(node);
20752
20743
  if (realNode) this.hideHoverState();
20753
20744
  }
@@ -22021,7 +22012,7 @@ var WeaveRegisterManager = class {
22021
22012
 
22022
22013
  //#endregion
22023
22014
  //#region package.json
22024
- var version = "3.7.1";
22015
+ var version = "3.8.0";
22025
22016
 
22026
22017
  //#endregion
22027
22018
  //#region src/managers/setup.ts
@@ -23467,7 +23458,6 @@ var Weave = class {
23467
23458
  this.status = WEAVE_INSTANCE_STATUS.STARTING;
23468
23459
  this.emitEvent("onInstanceStatus", this.status);
23469
23460
  await this.registerManager.registerNodesHandlers();
23470
- this.augmentKonvaStageClass();
23471
23461
  this.augmentKonvaNodeClass();
23472
23462
  this.registerManager.registerPlugins();
23473
23463
  this.registerManager.registerActionsHandlers();
@@ -23539,9 +23529,6 @@ var Weave = class {
23539
23529
  getConfiguration() {
23540
23530
  return this.config;
23541
23531
  }
23542
- augmentKonvaStageClass() {
23543
- augmentKonvaStageClass();
23544
- }
23545
23532
  augmentKonvaNodeClass(config) {
23546
23533
  augmentKonvaNodeClass(config);
23547
23534
  }
@@ -24314,8 +24301,6 @@ const setupUpscaleStage = (instance, stage) => {
24314
24301
  var WeaveStageNode = class extends WeaveNode {
24315
24302
  nodeType = WEAVE_STAGE_NODE_TYPE;
24316
24303
  stageFocused = false;
24317
- wheelMousePressed = false;
24318
- isCmdCtrlPressed = false;
24319
24304
  globalEventsInitialized = false;
24320
24305
  initialize = void 0;
24321
24306
  onRender(props) {
@@ -24324,9 +24309,7 @@ var WeaveStageNode = class extends WeaveNode {
24324
24309
  mode: "default"
24325
24310
  });
24326
24311
  setupUpscaleStage(this.instance, stage);
24327
- this.wheelMousePressed = false;
24328
24312
  stage.isFocused = () => this.stageFocused;
24329
- stage.isMouseWheelPressed = () => this.wheelMousePressed;
24330
24313
  stage.position({
24331
24314
  x: 0,
24332
24315
  y: 0
@@ -24362,8 +24345,7 @@ var WeaveStageNode = class extends WeaveNode {
24362
24345
  };
24363
24346
  stage.handleMouseout = function() {};
24364
24347
  stage.mode(WEAVE_STAGE_DEFAULT_MODE);
24365
- stage.on("pointerdown", (e) => {
24366
- if (e.evt.button === 1) this.wheelMousePressed = true;
24348
+ stage.on("pointerdown", () => {
24367
24349
  if (!this.instance.isServerSide() && [MOVE_TOOL_ACTION_NAME].includes(this.instance.getActiveAction() ?? "")) stage.container().style.cursor = "grabbing";
24368
24350
  });
24369
24351
  stage.on("pointermove", (e) => {
@@ -24377,9 +24359,8 @@ var WeaveStageNode = class extends WeaveNode {
24377
24359
  stage$1.container().style.cursor = "default";
24378
24360
  }
24379
24361
  });
24380
- stage.on("pointerup", (e) => {
24362
+ stage.on("pointerup", () => {
24381
24363
  const activeAction = this.instance.getActiveAction();
24382
- if (e.evt.button === 1) this.wheelMousePressed = false;
24383
24364
  if (!this.instance.isServerSide() && [MOVE_TOOL_ACTION_NAME].includes(activeAction ?? "")) stage.container().style.cursor = "grab";
24384
24365
  });
24385
24366
  stage.on("pointerover", (e) => {
@@ -24391,7 +24372,6 @@ var WeaveStageNode = class extends WeaveNode {
24391
24372
  this.hideHoverState();
24392
24373
  if (!this.instance.isServerSide()) stage.container().style.cursor = "default";
24393
24374
  });
24394
- stage.isCmdCtrlPressed = () => this.isCmdCtrlPressed;
24395
24375
  this.setupEvents();
24396
24376
  return stage;
24397
24377
  }
@@ -24399,12 +24379,8 @@ var WeaveStageNode = class extends WeaveNode {
24399
24379
  setupEvents() {
24400
24380
  if (this.globalEventsInitialized) return;
24401
24381
  if (this.instance.isServerSide()) return;
24402
- window.addEventListener("blur", () => {
24403
- this.isCmdCtrlPressed = false;
24404
- }, { signal: this.instance.getEventsController()?.signal });
24405
24382
  window.addEventListener("keydown", (e) => {
24406
24383
  if (this.isOnlyCtrlOrMeta(e)) {
24407
- this.isCmdCtrlPressed = true;
24408
24384
  this.instance.getStage().container().style.cursor = "default";
24409
24385
  const transformer = this.getSelectionPlugin()?.getTransformer();
24410
24386
  if (!transformer) return;
@@ -24415,7 +24391,6 @@ var WeaveStageNode = class extends WeaveNode {
24415
24391
  }, { signal: this.instance.getEventsController()?.signal });
24416
24392
  window.addEventListener("keyup", (e) => {
24417
24393
  if (!(e.ctrlKey || e.metaKey)) {
24418
- this.isCmdCtrlPressed = false;
24419
24394
  this.instance.getStage().container().style.cursor = "default";
24420
24395
  const transformer = this.getSelectionPlugin()?.getTransformer();
24421
24396
  if (!transformer) return;
@@ -25096,35 +25071,26 @@ var WeaveTextNode = class extends WeaveNode {
25096
25071
  }
25097
25072
  initialize() {
25098
25073
  this.keyPressHandler = void 0;
25099
- this.eventsInitialized = false;
25100
- this.isCtrlMetaPressed = false;
25101
25074
  this.textAreaSuperContainer = null;
25102
25075
  this.textAreaContainer = null;
25103
25076
  this.textArea = null;
25104
25077
  this.editing = false;
25105
25078
  this.textArea = null;
25106
25079
  }
25107
- initEvents() {
25108
- if (!this.eventsInitialized && !globalThis._weave_isServerSide) {
25109
- window.addEventListener("blur", () => {
25110
- this.isCtrlMetaPressed = false;
25111
- }, { signal: this.instance.getEventsController()?.signal });
25112
- window.addEventListener("keydown", (e) => {
25113
- if (e.ctrlKey || e.metaKey) this.isCtrlMetaPressed = true;
25114
- }, { signal: this.instance.getEventsController()?.signal });
25115
- window.addEventListener("keyup", (e) => {
25116
- if (!(e.ctrlKey || e.metaKey)) this.isCtrlMetaPressed = false;
25117
- }, { signal: this.instance.getEventsController()?.signal });
25118
- this.eventsInitialized = true;
25119
- }
25120
- }
25121
25080
  updateNode(nodeInstance) {
25122
25081
  const actNode = this.instance.getStage().findOne(`#${nodeInstance.id()}`);
25123
25082
  if (actNode) {
25124
25083
  const clonedText = actNode.clone();
25125
25084
  clonedText.setAttr("triggerEditMode", void 0);
25126
25085
  clonedText.setAttr("cancelEditMode", void 0);
25127
- this.instance.updateNode(this.serialize(clonedText));
25086
+ if (this.createNode && actNode.getAttrs().text !== "") {
25087
+ const actualContainer = actNode.getParent();
25088
+ actNode.destroy();
25089
+ const serializedNode = this.serialize(clonedText);
25090
+ this.instance.addNode(serializedNode, actualContainer?.getAttrs().id);
25091
+ } else if (this.createNode && actNode.getAttrs().text === "") actNode.destroy();
25092
+ else this.instance.updateNode(this.serialize(clonedText));
25093
+ this.createNode = false;
25128
25094
  clonedText.destroy();
25129
25095
  }
25130
25096
  }
@@ -25146,7 +25112,6 @@ var WeaveTextNode = class extends WeaveNode {
25146
25112
  }
25147
25113
  }
25148
25114
  onRender(props) {
25149
- this.initEvents();
25150
25115
  const text = new Konva.Text({
25151
25116
  ...props,
25152
25117
  name: "node",
@@ -25213,6 +25178,7 @@ var WeaveTextNode = class extends WeaveNode {
25213
25178
  text.setAttr("triggerEditMode", this.triggerEditMode.bind(this));
25214
25179
  let actualAnchor = void 0;
25215
25180
  text.on("transformstart", (e) => {
25181
+ const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
25216
25182
  this.instance.emitEvent("onTransform", e.target);
25217
25183
  actualAnchor = this.getNodesSelectionPlugin()?.getTransformer()?.getActiveAnchor();
25218
25184
  if (text.getAttrs().layout === TEXT_LAYOUT.SMART && [
@@ -25220,10 +25186,11 @@ var WeaveTextNode = class extends WeaveNode {
25220
25186
  "top-right",
25221
25187
  "bottom-left",
25222
25188
  "bottom-right"
25223
- ].includes(actualAnchor ?? "") || text.getAttrs().layout === TEXT_LAYOUT.FIXED && this.isCtrlMetaPressed) this.getNodesSelectionPlugin()?.getTransformer()?.keepRatio(true);
25189
+ ].includes(actualAnchor ?? "") || text.getAttrs().layout === TEXT_LAYOUT.FIXED && isCtrlOrMetaPressed) this.getNodesSelectionPlugin()?.getTransformer()?.keepRatio(true);
25224
25190
  else this.getNodesSelectionPlugin()?.getTransformer()?.keepRatio(false);
25225
25191
  if ([TEXT_LAYOUT.AUTO_HEIGHT, TEXT_LAYOUT.SMART].includes(text.getAttrs().layout) && ["middle-right", "middle-left"].includes(actualAnchor ?? "")) {
25226
25192
  text.wrap("word");
25193
+ text.scaleY(1);
25227
25194
  text.height(void 0);
25228
25195
  }
25229
25196
  e.cancelBubble = true;
@@ -25249,7 +25216,7 @@ var WeaveTextNode = class extends WeaveNode {
25249
25216
  text.setAttr("shouldUpdateOnTransform", false);
25250
25217
  text.getLayer()?.batchDraw();
25251
25218
  };
25252
- text.on("transform", (0, import_lodash.throttle)(handleTextTransform, DEFAULT_THROTTLE_MS));
25219
+ text.on("transform", handleTextTransform);
25253
25220
  const handleTransformEnd = () => {
25254
25221
  this.instance.emitEvent("onTransform", null);
25255
25222
  let definedSmartWidth = false;
@@ -25278,6 +25245,7 @@ var WeaveTextNode = class extends WeaveNode {
25278
25245
  definedSmartWidth = true;
25279
25246
  text.width(Math.ceil(text.width() * text.scaleX()));
25280
25247
  text.scaleX(1);
25248
+ text.scaleY(1);
25281
25249
  text.height(void 0);
25282
25250
  text.getLayer()?.batchDraw();
25283
25251
  text.height(Math.ceil(text.height()));
@@ -25292,7 +25260,7 @@ var WeaveTextNode = class extends WeaveNode {
25292
25260
  handleTransformEnd();
25293
25261
  });
25294
25262
  this.instance.addEventListener("onNodeRenderedAdded", (node) => {
25295
- if (node.id() === text.id() && node.getParent() !== text.getParent()) text.getAttr("cancelEditMode")?.();
25263
+ if (node.id() === text.id() && node.getParent() !== text.getParent() && this.editing) text.getAttr("cancelEditMode")?.();
25296
25264
  });
25297
25265
  if (!this.instance.isServerSide() && !this.keyPressHandler) {
25298
25266
  this.keyPressHandler = this.handleKeyPress.bind(this);
@@ -25301,14 +25269,6 @@ var WeaveTextNode = class extends WeaveNode {
25301
25269
  return text;
25302
25270
  }
25303
25271
  onUpdate(nodeInstance, nextProps) {
25304
- const actualFontFamily = nodeInstance.getAttrs().fontFamily;
25305
- const actualFontSize = nodeInstance.getAttrs().fontSize;
25306
- const actualFontStyle = nodeInstance.getAttrs().fontStyle;
25307
- const actualFontVariant = nodeInstance.getAttrs().fontVariant;
25308
- const actualTextDecoration = nodeInstance.getAttrs().textDecoration;
25309
- const actualLineHeight = nodeInstance.getAttrs().lineHeight;
25310
- let updateNeeded = false;
25311
- if (actualFontFamily !== nextProps.fontFamily || actualFontSize !== nextProps.fontSize || actualFontStyle !== nextProps.fontStyle || actualFontVariant !== nextProps.fontVariant || actualTextDecoration !== nextProps.textDecoration || actualLineHeight !== nextProps.lineHeight) updateNeeded = true;
25312
25272
  nodeInstance.setAttrs({
25313
25273
  ...nextProps,
25314
25274
  ...!this.config.outline.enabled && { strokeEnabled: false },
@@ -25323,22 +25283,20 @@ var WeaveTextNode = class extends WeaveNode {
25323
25283
  let height = nextProps.height;
25324
25284
  if (nextProps.layout === TEXT_LAYOUT.AUTO_ALL) {
25325
25285
  const { width: textAreaWidth, height: textAreaHeight } = this.textRenderedSize(nextProps.text, nodeInstance);
25326
- width = textAreaWidth;
25327
- height = textAreaHeight;
25286
+ width = (textAreaWidth + 2) * nodeInstance.getAbsoluteScale().x;
25287
+ height = (textAreaHeight + 2) * nodeInstance.getAbsoluteScale().x;
25328
25288
  }
25329
25289
  if (nextProps.layout === TEXT_LAYOUT.SMART && !nextProps.smartFixedWidth) {
25330
25290
  const { width: textAreaWidth } = this.textRenderedSize(nextProps.text, nodeInstance);
25331
- width = textAreaWidth;
25291
+ width = textAreaWidth / this.instance.getStage().scaleX();
25332
25292
  height = void 0;
25333
25293
  }
25334
25294
  if (nextProps.layout === TEXT_LAYOUT.SMART && nextProps.smartFixedWidth) height = void 0;
25335
25295
  if (nextProps.layout === TEXT_LAYOUT.AUTO_HEIGHT) height = void 0;
25336
- if (nextProps.layout === TEXT_LAYOUT.FIXED) updateNeeded = false;
25337
25296
  nodeInstance.setAttrs({
25338
25297
  width,
25339
25298
  height
25340
25299
  });
25341
- if (updateNeeded) this.instance.updateNode(this.serialize(nodeInstance));
25342
25300
  if (this.editing) this.updateTextAreaDOM(nodeInstance);
25343
25301
  if (!this.editing) {
25344
25302
  const nodesSelectionPlugin = this.instance.getPlugin("nodesSelection");
@@ -25386,14 +25344,17 @@ var WeaveTextNode = class extends WeaveNode {
25386
25344
  if (!this.textArea || !this.textAreaContainer) return;
25387
25345
  if (!textNode.getAttrs().layout || textNode.getAttrs().layout === TEXT_LAYOUT.AUTO_ALL || textNode.getAttrs().layout === TEXT_LAYOUT.SMART && !textNode.getAttrs().smartFixedWidth) {
25388
25346
  const { width: textAreaWidth } = this.textRenderedSize(this.textArea.value, textNode);
25389
- this.textAreaContainer.style.width = textAreaWidth * textNode.getAbsoluteScale().x + 1 + "px";
25347
+ const width = (textAreaWidth + 2) * textNode.getAbsoluteScale().x / this.instance.getStage().scaleX();
25348
+ this.textAreaContainer.style.width = width + "px";
25390
25349
  }
25391
25350
  if (!textNode.getAttrs().layout || textNode.getAttrs().layout === TEXT_LAYOUT.AUTO_ALL || textNode.getAttrs().layout === TEXT_LAYOUT.AUTO_HEIGHT || textNode.getAttrs().layout === TEXT_LAYOUT.SMART) {
25392
25351
  this.textAreaContainer.style.height = "auto";
25393
- this.textAreaContainer.style.height = this.textArea.scrollHeight + textNode.getAbsoluteScale().y + "px";
25352
+ const height$1 = this.textArea.scrollHeight + textNode.getAbsoluteScale().y;
25353
+ this.textAreaContainer.style.height = height$1 + "px";
25394
25354
  }
25395
25355
  this.textArea.style.height = "auto";
25396
- this.textArea.style.height = this.textArea.scrollHeight + textNode.getAbsoluteScale().x + "px";
25356
+ const height = this.textArea.scrollHeight + textNode.getAbsoluteScale().y;
25357
+ this.textArea.style.height = height + "px";
25397
25358
  this.textArea.rows = this.textArea.value.split("\n").length;
25398
25359
  }
25399
25360
  measureMultilineText(textNode) {
@@ -25415,8 +25376,8 @@ var WeaveTextNode = class extends WeaveNode {
25415
25376
  height = height + textSize.height * (textNode.lineHeight() ?? 1);
25416
25377
  }
25417
25378
  return {
25418
- width: width * 1.01,
25419
- height
25379
+ width: width * this.instance.getStage().scaleX() * 1.01,
25380
+ height: height * this.instance.getStage().scaleX() * 1.01
25420
25381
  };
25421
25382
  }
25422
25383
  mimicTextNode(textNode) {
@@ -25425,7 +25386,7 @@ var WeaveTextNode = class extends WeaveNode {
25425
25386
  this.textArea.rows = textNode.text().split("\n").length;
25426
25387
  this.textArea.style.letterSpacing = `${textNode.letterSpacing()}`;
25427
25388
  this.textArea.style.opacity = `${textNode.getAttrs().opacity}`;
25428
- this.textArea.style.lineHeight = `${textNode.lineHeight()}`;
25389
+ this.textArea.style.lineHeight = `${textNode.lineHeight()}em`;
25429
25390
  this.textArea.style.fontFamily = textNode.fontFamily();
25430
25391
  let fontWeight = "normal";
25431
25392
  let fontStyle = "normal";
@@ -25438,6 +25399,10 @@ var WeaveTextNode = class extends WeaveNode {
25438
25399
  this.textArea.style.textDecoration = textNode.textDecoration();
25439
25400
  this.textArea.style.textAlign = textNode.align();
25440
25401
  this.textArea.style.color = `${textNode.fill()}`;
25402
+ if (this.config.outline.enabled) {
25403
+ this.textArea.style.paintOrder = "stroke fill";
25404
+ this.textArea.style.webkitTextStroke = `${this.config.outline.width * this.instance.getStage().scaleX()}px ${this.config.outline.color}`;
25405
+ }
25441
25406
  }
25442
25407
  createTextAreaDOM(textNode, position) {
25443
25408
  const stage = this.instance.getStage();
@@ -25476,19 +25441,19 @@ var WeaveTextNode = class extends WeaveNode {
25476
25441
  this.textAreaContainer.style.left = position.x * upscaleScale + "px";
25477
25442
  if (textNode.getAttrs().layout === TEXT_LAYOUT.SMART && !textNode.getAttrs().smartFixedWidth) {
25478
25443
  const rect = textNode.getClientRect({ relativeTo: stage });
25479
- this.textAreaContainer.style.width = (rect.width + 2) * stage.scaleX() + "px";
25480
- this.textAreaContainer.style.height = (textNode.height() - textNode.padding() * 2 + 1) * textNode.getAbsoluteScale().x + "px";
25444
+ this.textAreaContainer.style.width = (rect.width + 2) * textNode.getAbsoluteScale().x + "px";
25445
+ this.textAreaContainer.style.height = (textNode.height() - textNode.padding() * 2) * textNode.getAbsoluteScale().x + "px";
25481
25446
  }
25482
25447
  if (!textNode.getAttrs().layout || textNode.getAttrs().layout === TEXT_LAYOUT.AUTO_ALL) {
25483
25448
  const rect = textNode.getClientRect({ relativeTo: stage });
25484
- this.textAreaContainer.style.width = (rect.width + 2) * stage.scaleX() + "px";
25485
- this.textAreaContainer.style.height = (textNode.height() - textNode.padding() * 2 + 1) * textNode.getAbsoluteScale().x + "px";
25449
+ this.textAreaContainer.style.width = (rect.width + 2) * textNode.getAbsoluteScale().x + "px";
25450
+ this.textAreaContainer.style.height = (textNode.height() - textNode.padding() * 2) * textNode.getAbsoluteScale().x + "px";
25486
25451
  }
25487
25452
  if (textNode.getAttrs().layout === TEXT_LAYOUT.AUTO_HEIGHT || textNode.getAttrs().layout === TEXT_LAYOUT.SMART && textNode.getAttrs().smartFixedWidth) {
25488
25453
  const rect = textNode.getClientRect({ relativeTo: stage });
25489
- this.textAreaContainer.style.width = (rect.width + 10) * stage.scaleX() + "px";
25490
- if (textNode.getAttrs().smartFixedWidth) this.textAreaContainer.style.width = (textNode.width() - textNode.padding() * 2 + 1) * textNode.getAbsoluteScale().x + "px";
25491
- this.textAreaContainer.style.height = (textNode.height() - textNode.padding() * 2 + 1) * textNode.getAbsoluteScale().x + "px";
25454
+ this.textAreaContainer.style.width = (rect.width + 10) * textNode.getAbsoluteScale().x + "px";
25455
+ if (textNode.getAttrs().smartFixedWidth) this.textAreaContainer.style.width = (textNode.width() - textNode.padding() * 2) * textNode.getAbsoluteScale().x + "px";
25456
+ this.textAreaContainer.style.height = (textNode.height() - textNode.padding() * 2) * textNode.getAbsoluteScale().x + "px";
25492
25457
  }
25493
25458
  if (textNode.getAttrs().layout === TEXT_LAYOUT.FIXED) {
25494
25459
  this.textAreaContainer.style.width = (textNode.width() - textNode.padding() * 2) * textNode.getAbsoluteScale().x + "px";
@@ -25498,6 +25463,7 @@ var WeaveTextNode = class extends WeaveNode {
25498
25463
  this.textArea.style.position = "absolute";
25499
25464
  this.textArea.style.top = "0px";
25500
25465
  this.textArea.style.left = "0px";
25466
+ this.textArea.style.lineHeight = "1em";
25501
25467
  this.textArea.style.overscrollBehavior = "contains";
25502
25468
  this.textArea.style.scrollBehavior = "auto";
25503
25469
  this.textArea.style.caretColor = "black";
@@ -25506,31 +25472,22 @@ var WeaveTextNode = class extends WeaveNode {
25506
25472
  this.textArea.style.margin = "0px";
25507
25473
  this.textArea.style.padding = "0px";
25508
25474
  this.textArea.style.paddingTop = "0px";
25509
- this.textArea.style.boxSizing = "content-box";
25475
+ this.textArea.style.boxSizing = "border-box";
25510
25476
  this.textArea.style.overflow = "hidden";
25511
25477
  this.textArea.style.background = "transparent";
25512
25478
  this.textArea.style.border = "none";
25513
25479
  this.textArea.style.outline = "none";
25514
25480
  this.textArea.style.resize = "none";
25515
25481
  this.textArea.style.overflow = "hidden";
25482
+ if (this.config.outline.enabled) {
25483
+ this.textArea.style.paintOrder = "stroke fill";
25484
+ this.textArea.style.webkitTextStroke = `${this.config.outline.width * this.instance.getStage().scaleX()}px ${this.config.outline.color}`;
25485
+ }
25516
25486
  this.textArea.style.backgroundColor = "transparent";
25517
25487
  this.textAreaContainer.style.transformOrigin = "left top";
25518
25488
  this.mimicTextNode(textNode);
25519
- const loadedFonts = this.instance.getFonts();
25520
- const fontFamily = this.textArea.style.fontFamily;
25521
- const actualFont = loadedFonts.find((f) => f.name === fontFamily);
25522
- const correctionX = (actualFont === void 0 ? 0 : actualFont.offsetX ?? 0) * stage.scaleX();
25523
- const correctionY = (actualFont === void 0 ? 0 : actualFont.offsetY ?? 0) * stage.scaleX();
25524
- this.textArea.style.left = `${correctionX - 1}px`;
25525
- this.textArea.style.top = `${correctionY}px`;
25526
- const updateTextNode = () => {
25527
- if (!this.textArea) return;
25528
- updateTextNodeSize();
25529
- textNode.text(this.textArea.value);
25530
- textNode.visible(true);
25531
- this.instance.updateNode(this.serialize(textNode));
25532
- };
25533
- const throttledUpdateTextNode = (0, import_lodash.throttle)(updateTextNode, 300);
25489
+ this.textArea.style.left = `-1px`;
25490
+ this.textArea.style.top = `-1px`;
25534
25491
  this.textArea.onfocus = () => {
25535
25492
  this.textAreaDomResize(textNode);
25536
25493
  };
@@ -25544,11 +25501,9 @@ var WeaveTextNode = class extends WeaveNode {
25544
25501
  };
25545
25502
  this.textArea.onpaste = () => {
25546
25503
  this.textAreaDomResize(textNode);
25547
- throttledUpdateTextNode();
25548
25504
  };
25549
25505
  this.textArea.oninput = () => {
25550
25506
  this.textAreaDomResize(textNode);
25551
- throttledUpdateTextNode();
25552
25507
  };
25553
25508
  this.textAreaSuperContainer.addEventListener("scroll", () => {
25554
25509
  if (this.textAreaSuperContainer) {
@@ -25575,7 +25530,8 @@ var WeaveTextNode = class extends WeaveNode {
25575
25530
  if (!this.textArea) return;
25576
25531
  if (!textNode.getAttrs().layout || textNode.getAttrs().layout === TEXT_LAYOUT.AUTO_ALL || textNode.getAttrs().layout === TEXT_LAYOUT.SMART && !textNode.getAttrs().smartFixedWidth) {
25577
25532
  const { width: textAreaWidth } = this.textRenderedSize(this.textArea.value, textNode);
25578
- textNode.width(textAreaWidth);
25533
+ const width = textAreaWidth / this.instance.getStage().scaleX();
25534
+ textNode.width(width);
25579
25535
  }
25580
25536
  if (!textNode.getAttrs().layout || textNode.getAttrs().layout === TEXT_LAYOUT.AUTO_HEIGHT || textNode.getAttrs().layout === TEXT_LAYOUT.AUTO_ALL || textNode.getAttrs().layout === TEXT_LAYOUT.SMART) textNode.height(this.textArea.scrollHeight * (1 / textNode.getAbsoluteScale().x));
25581
25537
  };
@@ -25696,7 +25652,8 @@ var WeaveTextNode = class extends WeaveNode {
25696
25652
  stage.container().focus();
25697
25653
  this.instance.emitEvent("onExitTextNodeEditMode", { node: textNode });
25698
25654
  }
25699
- triggerEditMode(textNode) {
25655
+ triggerEditMode(textNode, create = false) {
25656
+ if (create) this.createNode = true;
25700
25657
  const lockAcquired = this.instance.setMutexLock({
25701
25658
  nodeIds: [textNode.id()],
25702
25659
  operation: "text-edit"
@@ -26141,7 +26098,8 @@ var WeaveImageCrop = class WeaveImageCrop {
26141
26098
  this.onClose();
26142
26099
  const utilityLayer = this.instance.getUtilityLayer();
26143
26100
  utilityLayer?.destroyChildren();
26144
- if (stage.isCmdCtrlPressed() && utilityLayer) {
26101
+ const isCtrlOrMetaPressed = e.ctrlKey || e.metaKey;
26102
+ if (isCtrlOrMetaPressed && utilityLayer) {
26145
26103
  this.node.renderCropMode(utilityLayer, this.image);
26146
26104
  utilityLayer.show();
26147
26105
  }
@@ -26677,23 +26635,36 @@ var WeaveImageNode = class extends WeaveNode {
26677
26635
  if (this.imageCrop) this.closeCrop(image, WEAVE_IMAGE_CROP_END_TYPE.CANCEL);
26678
26636
  }
26679
26637
  });
26638
+ image.on("nodeDragStart", () => {
26639
+ const utilityLayer = this.instance.getUtilityLayer();
26640
+ if (!utilityLayer) return;
26641
+ const nodes = utilityLayer?.find(".cropMode") ?? [];
26642
+ nodes.forEach((n) => {
26643
+ n.destroy();
26644
+ });
26645
+ const transformer = this.getSelectionPlugin()?.getTransformer();
26646
+ if (!transformer) return;
26647
+ transformer.show();
26648
+ });
26680
26649
  if (this.config.cropMode.enabled && this.config.cropMode.triggers.ctrlCmd) {
26681
26650
  image.on("onCmdCtrlPressed", () => {
26651
+ const utilityLayer = this.instance.getUtilityLayer();
26652
+ if (!utilityLayer) return;
26653
+ if (image.isDragging()) return;
26682
26654
  const transformer = this.getSelectionPlugin()?.getTransformer();
26683
26655
  if (!transformer) return;
26684
26656
  transformer.hide();
26685
- const utilityLayer = this.instance.getUtilityLayer();
26686
- if (!utilityLayer) return;
26687
26657
  utilityLayer?.destroyChildren();
26688
26658
  this.renderCropMode(utilityLayer, image);
26689
26659
  utilityLayer?.show();
26690
26660
  });
26691
26661
  image.on("onCmdCtrlReleased", () => {
26662
+ const utilityLayer = this.instance.getUtilityLayer();
26663
+ if (!utilityLayer) return;
26664
+ if (image.isDragging()) return;
26692
26665
  const transformer = this.getSelectionPlugin()?.getTransformer();
26693
26666
  if (!transformer) return;
26694
26667
  transformer.show();
26695
- const utilityLayer = this.instance.getUtilityLayer();
26696
- if (!utilityLayer) return;
26697
26668
  utilityLayer?.destroyChildren();
26698
26669
  });
26699
26670
  }
@@ -26752,6 +26723,7 @@ var WeaveImageNode = class extends WeaveNode {
26752
26723
  fill: "transparent",
26753
26724
  strokeScaleEnabled: false,
26754
26725
  strokeWidth: 2,
26726
+ name: "cropMode",
26755
26727
  stroke: "#1a1aff",
26756
26728
  draggable: false,
26757
26729
  listening: false,
@@ -26812,6 +26784,7 @@ var WeaveImageNode = class extends WeaveNode {
26812
26784
  }));
26813
26785
  const anchor = new Konva.Rect({
26814
26786
  draggable: false,
26787
+ name: "cropMode",
26815
26788
  rotation: node.rotation()
26816
26789
  });
26817
26790
  this.config.cropMode.selection.anchorStyleFunc(anchor, position);
@@ -27254,6 +27227,11 @@ var WeaveImageNode = class extends WeaveNode {
27254
27227
  const nodeId = nodeInstance.getAttrs().id ?? "";
27255
27228
  const isMoveContainer = nodeInstance.getAttr("onMoveContainer");
27256
27229
  nodeInstance.setAttr("onMoveContainer", void 0);
27230
+ const utilityLayer = this.instance.getUtilityLayer();
27231
+ const nodes = utilityLayer?.find(".cropMode") ?? [];
27232
+ nodes.forEach((n) => {
27233
+ n.destroy();
27234
+ });
27257
27235
  if (this.imageTryoutIds[nodeId]) {
27258
27236
  clearTimeout(this.imageTryoutIds[nodeId]);
27259
27237
  delete this.imageTryoutIds[nodeId];
@@ -29858,16 +29836,16 @@ var WeaveVideoNode = class extends WeaveNode {
29858
29836
  }
29859
29837
  if (isServer()) this.instance.updateNode(this.serialize(videoGroup));
29860
29838
  const defaultHandleMouseover = videoGroup.handleMouseover;
29861
- videoGroup.handleMouseover = () => {
29862
- defaultHandleMouseover.call(this);
29839
+ videoGroup.handleMouseover = (e) => {
29840
+ defaultHandleMouseover.call(this, e);
29863
29841
  if (this.config.style.track.onlyOnHover && this.videoState[id].loaded) {
29864
29842
  const videoProgress = videoGroup.findOne(`#${id}-video-progress`);
29865
29843
  videoProgress?.show();
29866
29844
  }
29867
29845
  };
29868
29846
  const defaultHandleMouseout = videoGroup.handleMouseout;
29869
- videoGroup.handleMouseout = () => {
29870
- defaultHandleMouseout.call(this);
29847
+ videoGroup.handleMouseout = (e) => {
29848
+ defaultHandleMouseout.call(e, this);
29871
29849
  if (this.config.style.track.onlyOnHover && this.videoState[id].loaded && !this.videoState[id].paused) {
29872
29850
  const videoProgress = videoGroup.findOne(`#${id}-video-progress`);
29873
29851
  videoProgress?.hide();
@@ -32137,7 +32115,6 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32137
32115
  this.zooming = false;
32138
32116
  this.isTrackpad = false;
32139
32117
  this.zoomVelocity = 0;
32140
- this.isCtrlOrMetaPressed = false;
32141
32118
  this.updatedMinimumZoom = false;
32142
32119
  this.actualStep = this.config.zoomSteps.findIndex((step) => step === this.config.defaultZoom);
32143
32120
  this.actualScale = this.config.zoomSteps[this.actualStep];
@@ -32448,15 +32425,6 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32448
32425
  };
32449
32426
  }
32450
32427
  initEvents() {
32451
- window.addEventListener("blur", () => {
32452
- this.isCtrlOrMetaPressed = false;
32453
- }, { signal: this.instance.getEventsController()?.signal });
32454
- window.addEventListener("keydown", (e) => {
32455
- if (e.ctrlKey || e.metaKey) this.isCtrlOrMetaPressed = true;
32456
- }, { signal: this.instance.getEventsController()?.signal });
32457
- window.addEventListener("keyup", (e) => {
32458
- if (!(e.ctrlKey || e.metaKey)) this.isCtrlOrMetaPressed = false;
32459
- }, { signal: this.instance.getEventsController()?.signal });
32460
32428
  const stage = this.instance.getStage();
32461
32429
  let lastCenter = null;
32462
32430
  let lastDist = 0;
@@ -32538,7 +32506,8 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32538
32506
  });
32539
32507
  let doZoom = false;
32540
32508
  const handleWheelImmediate = (e) => {
32541
- const performZoom = this.isCtrlOrMetaPressed || !this.isCtrlOrMetaPressed && e.ctrlKey && e.deltaMode === 0;
32509
+ const isCtrlOrMetaPressed = e.ctrlKey || e.metaKey;
32510
+ const performZoom = isCtrlOrMetaPressed || !isCtrlOrMetaPressed && e.ctrlKey && e.deltaMode === 0;
32542
32511
  const mouseX = e.clientX;
32543
32512
  const mouseY = e.clientY;
32544
32513
  let elementUnderMouse = document.elementFromPoint(mouseX, mouseY);
@@ -34281,6 +34250,7 @@ var WeaveTextToolAction = class extends WeaveAction {
34281
34250
  fontFamily: "Arial, sans-serif",
34282
34251
  fill: "#000000",
34283
34252
  align: "left",
34253
+ lineHeight: 1,
34284
34254
  verticalAlign: "top",
34285
34255
  strokeEnabled: false
34286
34256
  };
@@ -34334,7 +34304,8 @@ var WeaveTextToolAction = class extends WeaveAction {
34334
34304
  y: this.clickPoint?.y ?? 0,
34335
34305
  draggable: true
34336
34306
  });
34337
- this.instance.addNode(node, this.container?.getAttrs().id);
34307
+ const renderedNode = nodeHandler.onRender(node.props);
34308
+ this.container.add(renderedNode);
34338
34309
  this.instance.emitEvent("onAddedArrow");
34339
34310
  }
34340
34311
  this.setState(TEXT_TOOL_STATE.FINISHED);
@@ -34359,7 +34330,7 @@ var WeaveTextToolAction = class extends WeaveAction {
34359
34330
  this.instance.triggerAction(SELECTION_TOOL_ACTION_NAME);
34360
34331
  }
34361
34332
  const node = stage.findOne(`#${this.textId}`);
34362
- if (node) node.getAttr("triggerEditMode")(node);
34333
+ if (node) node.getAttr("triggerEditMode")(node, true);
34363
34334
  this.initialCursor = null;
34364
34335
  this.textId = null;
34365
34336
  this.container = void 0;
@@ -38140,7 +38111,6 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
38140
38111
  this.moveToolActive = false;
38141
38112
  this.isMouseLeftButtonPressed = false;
38142
38113
  this.isMouseMiddleButtonPressed = false;
38143
- this.isCtrlOrMetaPressed = false;
38144
38114
  this.isSpaceKeyPressed = false;
38145
38115
  this.previousPointer = null;
38146
38116
  this.currentPointer = null;
@@ -38169,11 +38139,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
38169
38139
  }
38170
38140
  initEvents() {
38171
38141
  const stage = this.instance.getStage();
38172
- window.addEventListener("blur", () => {
38173
- this.isCtrlOrMetaPressed = false;
38174
- }, { signal: this.instance.getEventsController()?.signal });
38175
38142
  window.addEventListener("keydown", (e) => {
38176
- if (e.ctrlKey || e.metaKey) this.isCtrlOrMetaPressed = true;
38177
38143
  if (e.code === "Space") {
38178
38144
  this.getContextMenuPlugin()?.disable();
38179
38145
  this.getNodesSelectionPlugin()?.disable();
@@ -38184,7 +38150,6 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
38184
38150
  }
38185
38151
  }, { signal: this.instance.getEventsController()?.signal });
38186
38152
  window.addEventListener("keyup", (e) => {
38187
- if (e.key === "Meta" || e.key === "Control") this.isCtrlOrMetaPressed = false;
38188
38153
  if (e.code === "Space") {
38189
38154
  this.getContextMenuPlugin()?.enable();
38190
38155
  this.getNodesSelectionPlugin()?.enable();
@@ -38251,7 +38216,8 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
38251
38216
  this.cleanupEdgeMoveIntervals();
38252
38217
  });
38253
38218
  const handleWheel = (e) => {
38254
- const performPanning = !this.isCtrlOrMetaPressed && !e.ctrlKey;
38219
+ const isCtrlOrMetaPressed = e.ctrlKey || e.metaKey;
38220
+ const performPanning = !isCtrlOrMetaPressed && !e.ctrlKey;
38255
38221
  const mouseX = e.clientX;
38256
38222
  const mouseY = e.clientY;
38257
38223
  let elementUnderMouse = document.elementFromPoint(mouseX, mouseY);
@@ -38259,7 +38225,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
38259
38225
  const shadowHost = getTopmostShadowHost(stage.container());
38260
38226
  if (shadowHost) elementUnderMouse = shadowHost.elementFromPoint(mouseX, mouseY);
38261
38227
  }
38262
- if (!this.enabled || this.isCtrlOrMetaPressed || e.buttons === 4 || !performPanning || this.instance.getClosestParentWithWeaveId(elementUnderMouse) !== stage.container()) return;
38228
+ if (!this.enabled || isCtrlOrMetaPressed || e.buttons === 4 || !performPanning || this.instance.getClosestParentWithWeaveId(elementUnderMouse) !== stage.container()) return;
38263
38229
  this.getContextMenuPlugin()?.cancelLongPressTimer();
38264
38230
  stage.x(stage.x() - e.deltaX);
38265
38231
  stage.y(stage.y() - e.deltaY);
@@ -40516,7 +40482,16 @@ var WeaveCommentsRendererPlugin = class extends WeavePlugin {
40516
40482
  //#endregion
40517
40483
  //#region src/plugins/stage-keyboard-move/constants.ts
40518
40484
  const WEAVE_STAGE_KEYBOARD_MOVE_KEY = "stageKeyboardMove";
40519
- const WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG = { movementDelta: 5 };
40485
+ const WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG = {
40486
+ movementDelta: 1,
40487
+ shiftMovementDelta: 10
40488
+ };
40489
+ const WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION = {
40490
+ ["UP"]: "up",
40491
+ ["DOWN"]: "down",
40492
+ ["LEFT"]: "left",
40493
+ ["RIGHT"]: "right"
40494
+ };
40520
40495
 
40521
40496
  //#endregion
40522
40497
  //#region src/plugins/stage-keyboard-move/stage-keyboard-move.ts
@@ -40531,25 +40506,31 @@ var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
40531
40506
  getName() {
40532
40507
  return WEAVE_STAGE_KEYBOARD_MOVE_KEY;
40533
40508
  }
40534
- handleNodesMovement(movementOrientation) {
40509
+ handleNodesMovement(movementOrientation, { isShiftPressed }) {
40535
40510
  const nodesSelectionPlugin = this.instance.getPlugin("nodesSelection");
40536
40511
  if (nodesSelectionPlugin) {
40537
40512
  const selectedNodes = nodesSelectionPlugin.getSelectedNodes();
40513
+ const movementDelta = isShiftPressed ? this.config.shiftMovementDelta : this.config.movementDelta;
40538
40514
  for (const node of selectedNodes) {
40539
40515
  switch (movementOrientation) {
40540
- case "up":
40541
- node.y(node.y() - this.config.movementDelta);
40516
+ case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.UP:
40517
+ node.y(node.y() - movementDelta);
40542
40518
  break;
40543
- case "down":
40544
- node.y(node.y() + this.config.movementDelta);
40519
+ case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.DOWN:
40520
+ node.y(node.y() + movementDelta);
40545
40521
  break;
40546
- case "left":
40547
- node.x(node.x() - this.config.movementDelta);
40522
+ case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.LEFT:
40523
+ node.x(node.x() - movementDelta);
40548
40524
  break;
40549
- case "right":
40550
- node.x(node.x() + this.config.movementDelta);
40525
+ case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.RIGHT:
40526
+ node.x(node.x() + movementDelta);
40551
40527
  break;
40552
40528
  }
40529
+ this.instance.emitEvent("onNodeKeyboardMove", {
40530
+ node,
40531
+ orientation: movementOrientation,
40532
+ delta: movementDelta
40533
+ });
40553
40534
  const nodeHandler = this.instance.getNodeHandler(node.getAttrs().nodeType);
40554
40535
  if (!nodeHandler) break;
40555
40536
  this.instance.updateNode(nodeHandler.serialize(node));
@@ -40558,10 +40539,11 @@ var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
40558
40539
  }
40559
40540
  onInit() {
40560
40541
  window.addEventListener("keydown", (e) => {
40561
- if (e.code === "ArrowUp" && e.shiftKey) this.handleNodesMovement("up");
40562
- if (e.code === "ArrowLeft" && e.shiftKey) this.handleNodesMovement("left");
40563
- if (e.code === "ArrowRight" && e.shiftKey) this.handleNodesMovement("right");
40564
- if (e.code === "ArrowDown" && e.shiftKey) this.handleNodesMovement("down");
40542
+ const isShiftPressed = e.shiftKey || e.code === "Shift";
40543
+ if (e.code === "ArrowUp") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.UP, { isShiftPressed });
40544
+ if (e.code === "ArrowLeft") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.LEFT, { isShiftPressed });
40545
+ if (e.code === "ArrowRight") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.RIGHT, { isShiftPressed });
40546
+ if (e.code === "ArrowDown") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.DOWN, { isShiftPressed });
40565
40547
  }, { signal: this.instance.getEventsController()?.signal });
40566
40548
  }
40567
40549
  enable() {
@@ -40584,4 +40566,4 @@ const setupCanvasBackend = async () => {
40584
40566
  };
40585
40567
 
40586
40568
  //#endregion
40587
- 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, getPositionRelativeToContainerOnPosition, getSelectedNodesMetadata, getStageClickPoint, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodes, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isIOS, isInShadowDOM, isNodeInSelection, isServer, loadImageSource, memoize, mergeExceptArrays, moveNodeToContainer, moveNodeToContainerNT, resetScale, setupCanvasBackend, setupSkiaBackend };
40569
+ 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, getPositionRelativeToContainerOnPosition, getSelectedNodesMetadata, getStageClickPoint, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodes, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isIOS, isInShadowDOM, isNodeInSelection, isServer, loadImageSource, memoize, mergeExceptArrays, moveNodeToContainer, moveNodeToContainerNT, resetScale, setupCanvasBackend, setupSkiaBackend };