@inditextech/weave-sdk 3.6.0-SNAPSHOT.112.1 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sdk.js CHANGED
@@ -15084,11 +15084,6 @@ var WeaveStore = class {
15084
15084
  getDocument() {
15085
15085
  return this.document;
15086
15086
  }
15087
- restartDocument() {
15088
- this.latestState = { weave: {} };
15089
- this.state = syncedStore({ weave: {} });
15090
- this.document = getYjsDoc(this.state);
15091
- }
15092
15087
  loadDocument(roomData) {
15093
15088
  yjs_default.applyUpdate(this.document, roomData);
15094
15089
  }
@@ -17964,15 +17959,6 @@ var WeaveContextMenuPlugin = class extends WeavePlugin {
17964
17959
  initLayer = void 0;
17965
17960
  constructor(params) {
17966
17961
  super();
17967
- const { config } = params ?? {};
17968
- this.config = {
17969
- xOffset: WEAVE_CONTEXT_MENU_X_OFFSET_DEFAULT,
17970
- yOffset: WEAVE_CONTEXT_MENU_Y_OFFSET_DEFAULT,
17971
- ...config
17972
- };
17973
- this.initialize();
17974
- }
17975
- initialize() {
17976
17962
  this.timer = null;
17977
17963
  this.tapHold = false;
17978
17964
  this.contextMenuVisible = false;
@@ -17982,6 +17968,12 @@ var WeaveContextMenuPlugin = class extends WeavePlugin {
17982
17968
  time: 0
17983
17969
  };
17984
17970
  this.tapHoldTimeout = WEAVE_CONTEXT_MENU_TAP_HOLD_TIMEOUT;
17971
+ const { config } = params ?? {};
17972
+ this.config = {
17973
+ xOffset: WEAVE_CONTEXT_MENU_X_OFFSET_DEFAULT,
17974
+ yOffset: WEAVE_CONTEXT_MENU_Y_OFFSET_DEFAULT,
17975
+ ...config
17976
+ };
17985
17977
  this.pointers = {};
17986
17978
  }
17987
17979
  getName() {
@@ -18632,10 +18624,7 @@ const DEFAULT_ADD_NODE_OPTIONS = { emitUserChangeEvent: false };
18632
18624
  const DEFAULT_UPDATE_NODE_OPTIONS = { emitUserChangeEvent: false };
18633
18625
  const DEFAULT_REMOVE_NODE_OPTIONS = { emitUserChangeEvent: false };
18634
18626
  const DEFAULT_MOVE_NODE_OPTIONS = { emitUserChangeEvent: false };
18635
- const WEAVE_DEFAULT_CONFIG = {
18636
- behaviors: { axisLockThreshold: 5 },
18637
- performance: { upscale: { enabled: false } }
18638
- };
18627
+ const WEAVE_DEFAULT_CONFIG = { behaviors: { axisLockThreshold: 5 } };
18639
18628
 
18640
18629
  //#endregion
18641
18630
  //#region src/plugins/users-presence/constants.ts
@@ -18664,9 +18653,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18664
18653
  constructor(params) {
18665
18654
  super();
18666
18655
  this.config = mergeExceptArrays(WEAVE_NODES_SELECTION_DEFAULT_CONFIG, params?.config ?? {});
18667
- this.initialize();
18668
- }
18669
- initialize() {
18670
18656
  this.defaultEnabledAnchors = this.config.selection?.enabledAnchors ?? [
18671
18657
  "top-left",
18672
18658
  "top-center",
@@ -18830,7 +18816,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18830
18816
  nodeHovered = void 0;
18831
18817
  }
18832
18818
  this.instance.getStage().handleMouseover?.();
18833
- }, { signal: this.instance.getEventsController()?.signal });
18819
+ });
18834
18820
  const handleTransform = (e) => {
18835
18821
  const moved = this.checkMoved(e);
18836
18822
  if (moved) this.getContextMenuPlugin()?.cancelLongPressTimer();
@@ -19245,11 +19231,11 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
19245
19231
  });
19246
19232
  return;
19247
19233
  }
19248
- }, { signal: this.instance.getEventsController()?.signal });
19234
+ });
19249
19235
  stage.container().addEventListener("keyup", (e) => {
19250
19236
  if (!(e.ctrlKey || e.metaKey)) this.isCtrlMetaPressed = false;
19251
19237
  if (e.code === "Space") this.isSpaceKeyPressed = false;
19252
- }, { signal: this.instance.getEventsController()?.signal });
19238
+ });
19253
19239
  stage.on("pointerdown", (e) => {
19254
19240
  this.setTapStart(e);
19255
19241
  this.handledClickOrTap = false;
@@ -19456,7 +19442,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
19456
19442
  if (existNode) newSelectedNodes.push(existNode);
19457
19443
  }
19458
19444
  this.tr.nodes([...newSelectedNodes]);
19459
- if (newSelectedNodes.length > 0) this.tr.forceUpdate();
19445
+ this.tr.forceUpdate();
19460
19446
  this.triggerSelectedNodesEvent();
19461
19447
  }
19462
19448
  getSelectionPlugin() {
@@ -19709,9 +19695,6 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
19709
19695
  super();
19710
19696
  this.getImageBase64 = params.getImageBase64;
19711
19697
  this.config = mergeExceptArrays(WEAVE_COPY_PASTE_CONFIG_DEFAULT, params?.config);
19712
- this.initialize();
19713
- }
19714
- initialize() {
19715
19698
  this.actualInternalPaddingX = 0;
19716
19699
  this.actualInternalPaddingY = 0;
19717
19700
  this.lastInternalPasteSnapshot = "";
@@ -19817,7 +19800,7 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
19817
19800
  this.focusPasteCatcher();
19818
19801
  if (!this.enabled) return;
19819
19802
  }
19820
- }, { signal: this.instance.getEventsController()?.signal });
19803
+ });
19821
19804
  if (catcher) catcher.addEventListener("paste", async (e) => {
19822
19805
  e.preventDefault();
19823
19806
  let items = void 0;
@@ -19836,7 +19819,7 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
19836
19819
  return;
19837
19820
  }
19838
19821
  this.sendExternalPasteEvent(void 0, items);
19839
- }, { signal: this.instance.getEventsController()?.signal });
19822
+ });
19840
19823
  }
19841
19824
  sendExternalPasteEvent(dataList, items) {
19842
19825
  const stage = this.instance.getStage();
@@ -21991,34 +21974,11 @@ var WeaveRegisterManager = class {
21991
21974
  }
21992
21975
  }
21993
21976
  }
21994
- resetNodesHandlers() {
21995
- for (const nodeHandlerId of Object.keys(this.nodesHandlers)) {
21996
- const nodeHandler = this.nodesHandlers[nodeHandlerId];
21997
- nodeHandler.initialize?.();
21998
- }
21999
- }
22000
- resetActionsHandlers() {
22001
- for (const actionHandlerId of Object.keys(this.actionsHandlers)) {
22002
- const actionHandler = this.actionsHandlers[actionHandlerId];
22003
- actionHandler.initialize?.();
22004
- }
22005
- }
22006
- resetPlugins() {
22007
- for (const pluginId of Object.keys(this.plugins)) {
22008
- const plugin = this.plugins[pluginId];
22009
- plugin.initialize?.();
22010
- }
22011
- }
22012
- reset() {
22013
- this.resetNodesHandlers();
22014
- this.resetActionsHandlers();
22015
- this.resetPlugins();
22016
- }
22017
21977
  };
22018
21978
 
22019
21979
  //#endregion
22020
21980
  //#region package.json
22021
- var version = "3.6.0-SNAPSHOT.112.1";
21981
+ var version = "3.6.0";
22022
21982
 
22023
21983
  //#endregion
22024
21984
  //#region src/managers/setup.ts
@@ -22135,11 +22095,6 @@ var WeaveStageManager = class {
22135
22095
  initialZIndex: void 0
22136
22096
  };
22137
22097
  const stage = new Konva.Stage({ ...props });
22138
- if (!this.instance.isServerSide()) {
22139
- const containerParent = stage.container().parentNode;
22140
- stage.width(containerParent.clientWidth);
22141
- stage.height(containerParent.clientHeight);
22142
- }
22143
22098
  const realContainer = stage.container();
22144
22099
  if (realContainer !== void 0 && realContainer.style?.position !== "relative") realContainer.style.position = "relative";
22145
22100
  this.setStage(stage);
@@ -22880,12 +22835,7 @@ var WeaveAsyncManager = class {
22880
22835
  this.instance.emitEvent("onAsyncElementChange");
22881
22836
  }, new Map());
22882
22837
  }
22883
- reset() {
22884
- this.asyncElements.clear();
22885
- this.asyncElementsLoadedEventEmitted = false;
22886
- }
22887
22838
  checkForAsyncElements(elements) {
22888
- this.instance.emitEvent("onAsyncElementsIdle");
22889
22839
  const amountAsyncResourcesExtracted = this.extractAsyncResources(elements);
22890
22840
  if (amountAsyncResourcesExtracted === 0 && !this.asyncElementsLoadedEventEmitted) {
22891
22841
  this.instance.emitEvent("onAsyncElementsLoaded");
@@ -22938,7 +22888,7 @@ var WeaveAsyncManager = class {
22938
22888
  status: WEAVE_ASYNC_STATUS.LOADING
22939
22889
  };
22940
22890
  this.asyncElements.set(nodeId, element);
22941
- if (!this.asyncElementsLoadedEventEmitted) this.instance.emitEvent("onAsyncElementsLoading", {
22891
+ this.instance.emitEvent("onAsyncElementsLoading", {
22942
22892
  loaded: this.getAmountAsyncElementsLoaded(),
22943
22893
  total: this.getAmountAsyncElements()
22944
22894
  });
@@ -22951,11 +22901,11 @@ var WeaveAsyncManager = class {
22951
22901
  status: WEAVE_ASYNC_STATUS.LOADED
22952
22902
  };
22953
22903
  this.asyncElements.set(nodeId, element);
22904
+ this.instance.emitEvent("onAsyncElementsLoading", {
22905
+ loaded: this.getAmountAsyncElementsLoaded(),
22906
+ total: this.getAmountAsyncElements()
22907
+ });
22954
22908
  if (!this.asyncElementsLoadedEventEmitted) {
22955
- this.instance.emitEvent("onAsyncElementsLoading", {
22956
- loaded: this.getAmountAsyncElementsLoaded(),
22957
- total: this.getAmountAsyncElements()
22958
- });
22959
22909
  const allLoaded = this.asyncElementsLoaded();
22960
22910
  if (allLoaded) {
22961
22911
  this.instance.emitEvent("onAsyncElementsLoaded");
@@ -23080,7 +23030,6 @@ var Weave = class {
23080
23030
  constructor(weaveConfig, stageConfig) {
23081
23031
  globalThis._weave_isServerSide = false;
23082
23032
  if (typeof window === "undefined") globalThis._weave_isServerSide = true;
23083
- this.eventsController = void 0;
23084
23033
  this.emitter = new Emittery();
23085
23034
  Konva.showWarnings = false;
23086
23035
  this.id = v4_default();
@@ -23126,7 +23075,6 @@ var Weave = class {
23126
23075
  this.initialized = true;
23127
23076
  this.status = WEAVE_INSTANCE_STATUS.RUNNING;
23128
23077
  this.emitEvent("onInstanceStatus", this.status);
23129
- this.emitEvent("onRender");
23130
23078
  });
23131
23079
  }
23132
23080
  setStatus(status) {
@@ -23151,7 +23099,6 @@ var Weave = class {
23151
23099
  async start() {
23152
23100
  this.moduleLogger.info("Start instance");
23153
23101
  if (!this.isServerSide()) {
23154
- this.eventsController = new AbortController();
23155
23102
  if (!window.weave) window.weave = this;
23156
23103
  }
23157
23104
  this.emitEvent("onRoomLoaded", false);
@@ -23175,39 +23122,8 @@ var Weave = class {
23175
23122
  store.setup();
23176
23123
  store.connect();
23177
23124
  }
23178
- async switchRoom() {
23179
- this.moduleLogger.info(`Switching room`);
23180
- const nodeHandlers = this.registerManager.getNodesHandlers();
23181
- for (const nodeHandlerKey of Object.keys(nodeHandlers)) {
23182
- const nodeHandler = nodeHandlers[nodeHandlerKey];
23183
- nodeHandler?.onDestroyInstance();
23184
- }
23185
- const stage = this.getStage();
23186
- if (stage) stage.destroy();
23187
- if (this.eventsController) this.eventsController.abort();
23188
- if (!this.isServerSide()) this.eventsController = new AbortController();
23189
- this.registerManager.reset();
23190
- this.asyncManager.reset();
23191
- this.moduleLogger.info("Switching room instance");
23192
- if (!this.isServerSide()) {
23193
- if (!window.weave) window.weave = this;
23194
- }
23195
- this.emitEvent("onRoomLoaded", false);
23196
- this.status = WEAVE_INSTANCE_STATUS.STARTING;
23197
- this.emitEvent("onInstanceStatus", this.status);
23198
- this.registerManager.reset();
23199
- this.status = WEAVE_INSTANCE_STATUS.LOADING_FONTS;
23200
- this.emitEvent("onInstanceStatus", this.status);
23201
- await this.fontsManager.loadFonts();
23202
- this.setupManager.setupLog();
23203
- this.stageManager.initStage();
23204
- this.status = WEAVE_INSTANCE_STATUS.CONNECTING_TO_ROOM;
23205
- this.emitEvent("onInstanceStatus", this.status);
23206
- this.addEventListener("onStoreConnectionStatusChange", this.handleStoreConnectionStatusChange.bind(this));
23207
- }
23208
23125
  destroy() {
23209
23126
  this.moduleLogger.info(`Destroying the instance`);
23210
- if (this.eventsController) this.eventsController.abort();
23211
23127
  this.emitter.clearListeners();
23212
23128
  this.status = WEAVE_INSTANCE_STATUS.IDLE;
23213
23129
  this.emitEvent("onInstanceStatus", this.status);
@@ -23848,9 +23764,6 @@ var Weave = class {
23848
23764
  getDragProperties() {
23849
23765
  return this.dragAndDropManager.getDragProperties();
23850
23766
  }
23851
- getEventsController() {
23852
- return this.eventsController;
23853
- }
23854
23767
  };
23855
23768
 
23856
23769
  //#endregion
@@ -23942,7 +23855,6 @@ const downscaleImageFromURL = (url, options) => {
23942
23855
  //#endregion
23943
23856
  //#region src/internal-utils/upscale.ts
23944
23857
  const setupUpscaleStage = (instance, stage) => {
23945
- if (instance.isServerSide()) return;
23946
23858
  const config = instance.getConfiguration();
23947
23859
  const doUpscale = config.performance?.upscale?.enabled ?? false;
23948
23860
  if (doUpscale) {
@@ -23974,14 +23886,7 @@ const setupUpscaleStage = (instance, stage) => {
23974
23886
  innerElement.style.transformOrigin = "0 0";
23975
23887
  innerElement.style.transform = `scale(${scaleToCover})`;
23976
23888
  }
23977
- } else {
23978
- const realContainer = stage.container();
23979
- const containerWidth = realContainer.offsetWidth;
23980
- const containerHeight = realContainer.offsetHeight;
23981
- stage.width(containerWidth);
23982
- stage.height(containerHeight);
23983
- stage.setAttrs({ upscaleScale: 1 });
23984
- }
23889
+ } else stage.setAttrs({ upscaleScale: 1 });
23985
23890
  };
23986
23891
 
23987
23892
  //#endregion
@@ -23992,7 +23897,6 @@ var WeaveStageNode = class extends WeaveNode {
23992
23897
  wheelMousePressed = false;
23993
23898
  isCmdCtrlPressed = false;
23994
23899
  globalEventsInitialized = false;
23995
- initialize = void 0;
23996
23900
  onRender(props) {
23997
23901
  const stage = new Konva.Stage({
23998
23902
  ...props,
@@ -24011,10 +23915,10 @@ var WeaveStageNode = class extends WeaveNode {
24011
23915
  container.setAttribute("tabindex", "0");
24012
23916
  stage.container().addEventListener("focus", () => {
24013
23917
  this.stageFocused = true;
24014
- }, { signal: this.instance.getEventsController()?.signal });
23918
+ });
24015
23919
  stage.container().addEventListener("blur", () => {
24016
23920
  this.stageFocused = false;
24017
- }, { signal: this.instance.getEventsController()?.signal });
23921
+ });
24018
23922
  }
24019
23923
  Konva.Stage.prototype.mode = function(mode) {
24020
23924
  if (typeof mode !== "undefined") this._mode = mode;
@@ -24084,7 +23988,7 @@ var WeaveStageNode = class extends WeaveNode {
24084
23988
  const selectedNode = transformer.nodes()[0];
24085
23989
  selectedNode.fire("onCmdCtrlPressed");
24086
23990
  }
24087
- }, { signal: this.instance.getEventsController()?.signal });
23991
+ });
24088
23992
  window.addEventListener("keyup", (e) => {
24089
23993
  if (!(e.ctrlKey || e.metaKey)) {
24090
23994
  this.isCmdCtrlPressed = false;
@@ -24095,7 +23999,7 @@ var WeaveStageNode = class extends WeaveNode {
24095
23999
  const selectedNode = transformer.nodes()[0];
24096
24000
  selectedNode.fire("onCmdCtrlReleased");
24097
24001
  }
24098
- }, { signal: this.instance.getEventsController()?.signal });
24002
+ });
24099
24003
  this.globalEventsInitialized = true;
24100
24004
  }
24101
24005
  isOnlyCtrlOrMeta(event) {
@@ -24115,7 +24019,6 @@ const WEAVE_LAYER_NODE_TYPE = "layer";
24115
24019
  //#region src/nodes/layer/layer.ts
24116
24020
  var WeaveLayerNode = class extends WeaveNode {
24117
24021
  nodeType = WEAVE_LAYER_NODE_TYPE;
24118
- initialize = void 0;
24119
24022
  onRender(props) {
24120
24023
  const layer = new Konva.Layer({ ...props });
24121
24024
  layer.canMoveToContainer = function() {
@@ -24163,7 +24066,6 @@ const WEAVE_GROUP_NODE_TYPE = "group";
24163
24066
  //#region src/nodes/group/group.ts
24164
24067
  var WeaveGroupNode = class extends WeaveNode {
24165
24068
  nodeType = WEAVE_GROUP_NODE_TYPE;
24166
- initialize = void 0;
24167
24069
  constructor(params) {
24168
24070
  super();
24169
24071
  const { config } = params ?? {};
@@ -24256,7 +24158,6 @@ const WEAVE_RECTANGLE_NODE_TYPE = "rectangle";
24256
24158
  //#region src/nodes/rectangle/rectangle.ts
24257
24159
  var WeaveRectangleNode = class extends WeaveNode {
24258
24160
  nodeType = WEAVE_RECTANGLE_NODE_TYPE;
24259
- initialize = void 0;
24260
24161
  constructor(params) {
24261
24162
  super();
24262
24163
  const { config } = params ?? {};
@@ -24300,7 +24201,6 @@ const WEAVE_ELLIPSE_NODE_TYPE = "ellipse";
24300
24201
  //#region src/nodes/ellipse/ellipse.ts
24301
24202
  var WeaveEllipseNode = class extends WeaveNode {
24302
24203
  nodeType = WEAVE_ELLIPSE_NODE_TYPE;
24303
- initialize = void 0;
24304
24204
  constructor(params) {
24305
24205
  super();
24306
24206
  const { config } = params ?? {};
@@ -24446,16 +24346,13 @@ var WeaveLineNode = class extends WeaveNode {
24446
24346
  constructor(params) {
24447
24347
  super();
24448
24348
  this.config = mergeExceptArrays(WEAVE_LINE_NODE_DEFAULT_CONFIG, params?.config ?? {});
24349
+ this.handleNodeChanges = null;
24350
+ this.handleZoomChanges = null;
24449
24351
  this.snapper = new GreedySnapper({
24450
24352
  snapAngles: this.config.snapAngles.angles,
24451
24353
  activateThreshold: this.config.snapAngles.activateThreshold,
24452
24354
  releaseThreshold: this.config.snapAngles.releaseThreshold
24453
24355
  });
24454
- this.initialize();
24455
- }
24456
- initialize() {
24457
- this.handleNodeChanges = null;
24458
- this.handleZoomChanges = null;
24459
24356
  }
24460
24357
  onRender(props) {
24461
24358
  const line = new Konva.Line({
@@ -24760,19 +24657,17 @@ const TEXT_LAYOUT = {
24760
24657
  //#region src/nodes/text/text.ts
24761
24658
  var WeaveTextNode = class extends WeaveNode {
24762
24659
  nodeType = WEAVE_TEXT_NODE_TYPE;
24660
+ editing = false;
24661
+ textAreaSuperContainer = null;
24662
+ textAreaContainer = null;
24663
+ textArea = null;
24664
+ eventsInitialized = false;
24665
+ isCtrlMetaPressed = false;
24763
24666
  constructor(params) {
24764
24667
  super();
24765
24668
  const { config } = params ?? {};
24766
24669
  this.config = (0, import_lodash.merge)({}, WEAVE_TEXT_NODE_DEFAULT_CONFIG, config);
24767
- this.initialize();
24768
- }
24769
- initialize() {
24770
24670
  this.keyPressHandler = void 0;
24771
- this.eventsInitialized = false;
24772
- this.isCtrlMetaPressed = false;
24773
- this.textAreaSuperContainer = null;
24774
- this.textAreaContainer = null;
24775
- this.textArea = null;
24776
24671
  this.editing = false;
24777
24672
  this.textArea = null;
24778
24673
  }
@@ -24780,10 +24675,10 @@ var WeaveTextNode = class extends WeaveNode {
24780
24675
  if (!this.eventsInitialized && !globalThis._weave_isServerSide) {
24781
24676
  window.addEventListener("keydown", (e) => {
24782
24677
  if (e.ctrlKey || e.metaKey) this.isCtrlMetaPressed = true;
24783
- }, { signal: this.instance.getEventsController()?.signal });
24678
+ });
24784
24679
  window.addEventListener("keyup", (e) => {
24785
24680
  if (!(e.ctrlKey || e.metaKey)) this.isCtrlMetaPressed = false;
24786
- }, { signal: this.instance.getEventsController()?.signal });
24681
+ });
24787
24682
  this.eventsInitialized = true;
24788
24683
  }
24789
24684
  }
@@ -24811,7 +24706,7 @@ var WeaveTextNode = class extends WeaveNode {
24811
24706
  onAdd() {
24812
24707
  if (!this.instance.isServerSide() && !this.keyPressHandler) {
24813
24708
  this.keyPressHandler = this.handleKeyPress.bind(this);
24814
- window.addEventListener("keypress", this.keyPressHandler, { signal: this.instance.getEventsController()?.signal });
24709
+ window.addEventListener("keypress", this.keyPressHandler);
24815
24710
  }
24816
24711
  }
24817
24712
  onRender(props) {
@@ -24965,7 +24860,7 @@ var WeaveTextNode = class extends WeaveNode {
24965
24860
  });
24966
24861
  if (!this.instance.isServerSide() && !this.keyPressHandler) {
24967
24862
  this.keyPressHandler = this.handleKeyPress.bind(this);
24968
- window.addEventListener("keypress", this.keyPressHandler, { signal: this.instance.getEventsController()?.signal });
24863
+ window.addEventListener("keypress", this.keyPressHandler);
24969
24864
  }
24970
24865
  return text;
24971
24866
  }
@@ -25224,17 +25119,17 @@ var WeaveTextNode = class extends WeaveNode {
25224
25119
  this.textAreaSuperContainer.scrollTop = 0;
25225
25120
  this.textAreaSuperContainer.scrollLeft = 0;
25226
25121
  }
25227
- }, { signal: this.instance.getEventsController()?.signal });
25122
+ });
25228
25123
  this.textAreaContainer.addEventListener("scroll", () => {
25229
25124
  if (!this.textAreaContainer) return;
25230
25125
  this.textAreaContainer.scrollTop = 0;
25231
25126
  this.textAreaContainer.scrollLeft = 0;
25232
- }, { signal: this.instance.getEventsController()?.signal });
25127
+ });
25233
25128
  this.textArea.addEventListener("scroll", () => {
25234
25129
  if (!this.textArea) return;
25235
25130
  this.textArea.scrollTop = 0;
25236
25131
  this.textArea.scrollLeft = 0;
25237
- }, { signal: this.instance.getEventsController()?.signal });
25132
+ });
25238
25133
  const rotation = textNode.getAbsoluteRotation();
25239
25134
  if (rotation) {
25240
25135
  const transform = "rotate(" + rotation + "deg)";
@@ -25283,8 +25178,8 @@ var WeaveTextNode = class extends WeaveNode {
25283
25178
  this.textAreaDomResize(textNode);
25284
25179
  }
25285
25180
  };
25286
- this.textArea.addEventListener("keydown", handleKeyDown, { signal: this.instance.getEventsController()?.signal });
25287
- this.textArea.addEventListener("keyup", handleKeyUp, { signal: this.instance.getEventsController()?.signal });
25181
+ this.textArea.addEventListener("keydown", handleKeyDown);
25182
+ this.textArea.addEventListener("keyup", handleKeyUp);
25288
25183
  this.textArea.tabIndex = 1;
25289
25184
  this.textArea.focus();
25290
25185
  const handleOutsideClick = (e) => {
@@ -25310,7 +25205,7 @@ var WeaveTextNode = class extends WeaveNode {
25310
25205
  }
25311
25206
  };
25312
25207
  setTimeout(() => {
25313
- window.addEventListener("pointerup", handleOutsideClick, { signal: this.instance.getEventsController()?.signal });
25208
+ window.addEventListener("pointerup", handleOutsideClick);
25314
25209
  }, 0);
25315
25210
  this.instance.getStage().mode(WEAVE_STAGE_TEXT_EDITION_MODE);
25316
25211
  this.editing = true;
@@ -25646,7 +25541,7 @@ var WeaveImageCrop = class WeaveImageCrop {
25646
25541
  utilityLayer?.add(this.transformer);
25647
25542
  this.transformer?.forceUpdate();
25648
25543
  this.cropGroup.show();
25649
- window.addEventListener("keydown", this.handleHide, { signal: this.instance.getEventsController()?.signal });
25544
+ window.addEventListener("keydown", this.handleHide);
25650
25545
  if (options.cmdCtrl.triggered) {
25651
25546
  utilityLayer?.hide();
25652
25547
  const stage = this.instance.getStage();
@@ -26096,21 +25991,24 @@ const isAllowedUrl = (value) => {
26096
25991
  //#endregion
26097
25992
  //#region src/nodes/image/image.ts
26098
25993
  var WeaveImageNode = class extends WeaveNode {
25994
+ imageBitmapCache = {};
25995
+ imageSource = {};
25996
+ imageFallback = {};
25997
+ imageState = {};
25998
+ imageTryoutAttempts = {};
25999
+ imageTryoutIds = {};
26099
26000
  nodeType = WEAVE_IMAGE_NODE_TYPE;
26100
26001
  cursorsFallback = { loading: "wait" };
26101
26002
  cursors = {};
26102
26003
  constructor(params) {
26103
26004
  super();
26104
26005
  const { config } = params ?? {};
26105
- this.config = mergeExceptArrays(WEAVE_IMAGE_DEFAULT_CONFIG, config);
26106
- this.initialize();
26107
- }
26108
- initialize() {
26109
26006
  this.tapStart = {
26110
26007
  x: 0,
26111
26008
  y: 0,
26112
26009
  time: 0
26113
26010
  };
26011
+ this.config = mergeExceptArrays(WEAVE_IMAGE_DEFAULT_CONFIG, config);
26114
26012
  this.imageCrop = null;
26115
26013
  this.imageBitmapCache = {};
26116
26014
  this.imageSource = {};
@@ -26334,7 +26232,7 @@ var WeaveImageNode = class extends WeaveNode {
26334
26232
  };
26335
26233
  this.updateImageCrop(image);
26336
26234
  } else {
26337
- this.updatePlaceholderSize(image);
26235
+ this.updatePlaceholderSize(image, imagePlaceholder);
26338
26236
  this.loadImage(imageProps, image, true);
26339
26237
  }
26340
26238
  if (this.config.performance.cache.enabled) image.on("transformend", () => {
@@ -26717,7 +26615,7 @@ var WeaveImageNode = class extends WeaveNode {
26717
26615
  }
26718
26616
  this.loadAsyncElement(id);
26719
26617
  preloadFunction(id, realImageURL ?? "", {
26720
- onLoad: async () => {
26618
+ onLoad: () => {
26721
26619
  if (useFallback) this.imageTryoutIds[id] = setTimeout(() => {
26722
26620
  const node = this.instance.getStage().findOne(`#${id}`);
26723
26621
  if (node) {
@@ -26768,7 +26666,7 @@ var WeaveImageNode = class extends WeaveNode {
26768
26666
  error: false
26769
26667
  };
26770
26668
  this.updateImageCrop(image);
26771
- if (!useFallback) this.resolveAsyncElement(id);
26669
+ this.resolveAsyncElement(id);
26772
26670
  this.cacheNode(image);
26773
26671
  }
26774
26672
  },
@@ -26809,9 +26707,13 @@ var WeaveImageNode = class extends WeaveNode {
26809
26707
  }
26810
26708
  }, loadTryout);
26811
26709
  }
26812
- updatePlaceholderSize(image) {
26710
+ updatePlaceholderSize(image, imagePlaceholder) {
26813
26711
  const imageAttrs = image.getAttrs();
26814
26712
  if (!this.imageState[imageAttrs.id ?? ""]?.loaded) return;
26713
+ if (!imageAttrs.adding && !imageAttrs.cropInfo) {
26714
+ imagePlaceholder.width(imageAttrs.uncroppedImage.width);
26715
+ imagePlaceholder.height(imageAttrs.uncroppedImage.height);
26716
+ }
26815
26717
  }
26816
26718
  updateImageCrop(image) {
26817
26719
  const imageAttrs = image.getAttrs();
@@ -26945,7 +26847,6 @@ const WEAVE_STAR_NODE_TYPE = "star";
26945
26847
  //#region src/nodes/star/star.ts
26946
26848
  var WeaveStarNode = class extends WeaveNode {
26947
26849
  nodeType = WEAVE_STAR_NODE_TYPE;
26948
- initialize = void 0;
26949
26850
  constructor(params) {
26950
26851
  super();
26951
26852
  const { config } = params ?? {};
@@ -27031,7 +26932,6 @@ const WEAVE_ARROW_NODE_TYPE = "arrow";
27031
26932
  //#region src/nodes/arrow/arrow.ts
27032
26933
  var WeaveArrowNode = class extends WeaveNode {
27033
26934
  nodeType = WEAVE_ARROW_NODE_TYPE;
27034
- initialize = void 0;
27035
26935
  constructor(params) {
27036
26936
  super();
27037
26937
  const { config } = params ?? {};
@@ -27088,7 +26988,6 @@ const WEAVE_REGULAR_POLYGON_NODE_TYPE = "regular-polygon";
27088
26988
  //#region src/nodes/regular-polygon/regular-polygon.ts
27089
26989
  var WeaveRegularPolygonNode = class extends WeaveNode {
27090
26990
  nodeType = WEAVE_REGULAR_POLYGON_NODE_TYPE;
27091
- initialize = void 0;
27092
26991
  constructor(params) {
27093
26992
  super();
27094
26993
  const { config } = params ?? {};
@@ -27202,7 +27101,6 @@ var GroupFrame = class extends Konva.Group {
27202
27101
  //#region src/nodes/frame/frame.ts
27203
27102
  var WeaveFrameNode = class extends WeaveNode {
27204
27103
  nodeType = WEAVE_FRAME_NODE_TYPE;
27205
- initialize = void 0;
27206
27104
  constructor(params) {
27207
27105
  super();
27208
27106
  const { config } = params ?? {};
@@ -27503,7 +27401,6 @@ const WEAVE_STROKE_NODE_DEFAULT_CONFIG = {
27503
27401
  //#region src/nodes/stroke/stroke.ts
27504
27402
  var WeaveStrokeNode = class extends WeaveNode {
27505
27403
  nodeType = WEAVE_STROKE_NODE_TYPE;
27506
- initialize = void 0;
27507
27404
  constructor(params) {
27508
27405
  super();
27509
27406
  const { config } = params ?? {};
@@ -28080,6 +27977,8 @@ var WeaveSquareLineTipManager = class extends WeaveBaseLineTipManager {
28080
27977
  //#endregion
28081
27978
  //#region src/nodes/stroke-single/stroke-single.ts
28082
27979
  var WeaveStrokeSingleNode = class extends WeaveNode {
27980
+ startHandle = null;
27981
+ endHandle = null;
28083
27982
  nodeType = WEAVE_STROKE_SINGLE_NODE_TYPE;
28084
27983
  tipManagers = {
28085
27984
  [WEAVE_STROKE_SINGLE_NODE_TIP_TYPE.ARROW]: new WeaveArrowLineTipManager(),
@@ -28090,29 +27989,24 @@ var WeaveStrokeSingleNode = class extends WeaveNode {
28090
27989
  constructor(params) {
28091
27990
  super();
28092
27991
  this.config = mergeExceptArrays(WEAVE_STROKE_SINGLE_NODE_DEFAULT_CONFIG, params?.config ?? {});
27992
+ this.handleNodeChanges = null;
27993
+ this.handleZoomChanges = null;
27994
+ this.shiftPressed = false;
28093
27995
  this.snapper = new GreedySnapper({
28094
27996
  snapAngles: this.config.snapAngles.angles,
28095
27997
  activateThreshold: this.config.snapAngles.activateThreshold,
28096
27998
  releaseThreshold: this.config.snapAngles.releaseThreshold
28097
27999
  });
28098
- this.initialize();
28099
- }
28100
- initialize() {
28101
28000
  this.eventsInitialized = false;
28102
- this.startHandle = null;
28103
- this.endHandle = null;
28104
- this.handleNodeChanges = null;
28105
- this.handleZoomChanges = null;
28106
- this.shiftPressed = false;
28107
28001
  }
28108
28002
  initEvents() {
28109
28003
  if (this.eventsInitialized) return;
28110
28004
  window.addEventListener("keydown", (e) => {
28111
28005
  if (e.key === "Shift") this.shiftPressed = true;
28112
- }, { signal: this.instance.getEventsController()?.signal });
28006
+ });
28113
28007
  window.addEventListener("keyup", (e) => {
28114
28008
  if (e.key === "Shift") this.shiftPressed = false;
28115
- }, { signal: this.instance.getEventsController()?.signal });
28009
+ });
28116
28010
  this.eventsInitialized = true;
28117
28011
  }
28118
28012
  onRender(props) {
@@ -28599,9 +28493,6 @@ var WeaveCommentNode = class extends WeaveNode {
28599
28493
  constructor(params) {
28600
28494
  super();
28601
28495
  this.config = mergeExceptArrays(WEAVE_COMMENT_NODE_DEFAULTS, params.config);
28602
- this.initialize();
28603
- }
28604
- initialize() {
28605
28496
  this.commentDomVisibleId = null;
28606
28497
  this.commentDomVisible = false;
28607
28498
  this.commentDomAction = null;
@@ -29230,6 +29121,10 @@ const WEAVE_VIDEO_DEFAULT_CONFIG = {
29230
29121
  //#endregion
29231
29122
  //#region src/nodes/video/video.ts
29232
29123
  var WeaveVideoNode = class extends WeaveNode {
29124
+ videoState = {};
29125
+ videoSourceFrameId = {};
29126
+ videoSource = {};
29127
+ videoPlaceholder = {};
29233
29128
  nodeType = WEAVE_VIDEO_NODE_TYPE;
29234
29129
  constructor(params) {
29235
29130
  super();
@@ -29242,13 +29137,6 @@ var WeaveVideoNode = class extends WeaveNode {
29242
29137
  this.videoIconImage.src = this.config.style.icon.dataURL;
29243
29138
  }
29244
29139
  }
29245
- initialize() {
29246
- this.videoState = {};
29247
- this.videoSource = {};
29248
- this.videoSourceFrameId = {};
29249
- this.videoPlaceholder = {};
29250
- this.videoIconImage = void 0;
29251
- }
29252
29140
  async loadPlaceholder(params, video) {
29253
29141
  const videoProps = params;
29254
29142
  const { id } = videoProps;
@@ -29743,7 +29631,6 @@ const WEAVE_MEASURE_NODE_DEFAULT_CONFIG = { style: {
29743
29631
  var WeaveMeasureNode = class extends WeaveNode {
29744
29632
  nodeType = WEAVE_MEASURE_NODE_TYPE;
29745
29633
  handlePointCircleRadius = 6;
29746
- initialize = void 0;
29747
29634
  constructor(params) {
29748
29635
  super();
29749
29636
  this.config = mergeExceptArrays(WEAVE_MEASURE_NODE_DEFAULT_CONFIG, params?.config ?? {});
@@ -31034,7 +30921,6 @@ var WeaveConnectorNode = class extends WeaveNode {
31034
30921
  [WEAVE_CONNECTOR_NODE_DECORATOR_TYPE.DOT]: setupNodeDecoratorDot,
31035
30922
  [WEAVE_CONNECTOR_NODE_DECORATOR_TYPE.ARROW]: setupNodeDecoratorArrow
31036
30923
  };
31037
- initialize = void 0;
31038
30924
  constructor(params) {
31039
30925
  super();
31040
30926
  this.config = mergeExceptArrays(WEAVE_CONNECTOR_NODE_DEFAULT_CONFIG, params?.config);
@@ -31785,6 +31671,10 @@ const WEAVE_STAGE_ZOOM_DEFAULT_CONFIG = {
31785
31671
  var WeaveStageZoomPlugin = class extends WeavePlugin {
31786
31672
  getLayerName = void 0;
31787
31673
  initLayer = void 0;
31674
+ pinching = false;
31675
+ zooming = false;
31676
+ isTrackpad = false;
31677
+ zoomVelocity = 0;
31788
31678
  zoomInertiaType = WEAVE_STAGE_ZOOM_TYPE.MOUSE_WHEEL;
31789
31679
  defaultStep = 3;
31790
31680
  constructor(params) {
@@ -31792,13 +31682,8 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
31792
31682
  const { config } = params ?? {};
31793
31683
  this.config = mergeExceptArrays(WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, config);
31794
31684
  if (!this.config.zoomSteps.includes(this.config.defaultZoom)) throw new Error(`Default zoom ${this.config.defaultZoom} is not in zoom steps`);
31795
- this.initialize();
31796
- }
31797
- initialize() {
31798
31685
  this.pinching = false;
31799
- this.zooming = false;
31800
31686
  this.isTrackpad = false;
31801
- this.zoomVelocity = 0;
31802
31687
  this.isCtrlOrMetaPressed = false;
31803
31688
  this.updatedMinimumZoom = false;
31804
31689
  this.actualStep = this.config.zoomSteps.findIndex((step) => step === this.config.defaultZoom);
@@ -32085,15 +31970,6 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32085
31970
  if (box.width === 0 || box.height === 0) return;
32086
31971
  this.fitToElements(box, finalOptions);
32087
31972
  }
32088
- fitToArea(area, options) {
32089
- const finalOptions = mergeExceptArrays({
32090
- smartZoom: false,
32091
- overrideZoom: true
32092
- }, options);
32093
- if (!this.enabled) return;
32094
- if (area.width === 0 || area.height === 0) return;
32095
- this.fitToElements(area, finalOptions);
32096
- }
32097
31973
  enable() {
32098
31974
  this.enabled = true;
32099
31975
  }
@@ -32112,10 +31988,10 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32112
31988
  initEvents() {
32113
31989
  window.addEventListener("keydown", (e) => {
32114
31990
  if (e.ctrlKey || e.metaKey) this.isCtrlOrMetaPressed = true;
32115
- }, { signal: this.instance.getEventsController()?.signal });
31991
+ });
32116
31992
  window.addEventListener("keyup", (e) => {
32117
31993
  if (!(e.ctrlKey || e.metaKey)) this.isCtrlOrMetaPressed = false;
32118
- }, { signal: this.instance.getEventsController()?.signal });
31994
+ });
32119
31995
  const stage = this.instance.getStage();
32120
31996
  let lastCenter = null;
32121
31997
  let lastDist = 0;
@@ -32140,10 +32016,7 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32140
32016
  return;
32141
32017
  }
32142
32018
  }
32143
- }, {
32144
- passive: false,
32145
- signal: this.instance.getEventsController()?.signal
32146
- });
32019
+ }, { passive: false });
32147
32020
  stage.getContent().addEventListener("touchmove", (e) => {
32148
32021
  e.preventDefault();
32149
32022
  if (e.touches.length === 2) {
@@ -32183,18 +32056,12 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32183
32056
  lastDist = dist;
32184
32057
  lastCenter = newCenter;
32185
32058
  }
32186
- }, {
32187
- passive: false,
32188
- signal: this.instance.getEventsController()?.signal
32189
- });
32059
+ }, { passive: false });
32190
32060
  stage.getContent().addEventListener("touchend", () => {
32191
32061
  this.pinching = false;
32192
32062
  lastDist = 0;
32193
32063
  lastCenter = null;
32194
- }, {
32195
- passive: false,
32196
- signal: this.instance.getEventsController()?.signal
32197
- });
32064
+ }, { passive: false });
32198
32065
  let doZoom = false;
32199
32066
  const handleWheelImmediate = (e) => {
32200
32067
  const performZoom = this.isCtrlOrMetaPressed || !this.isCtrlOrMetaPressed && e.ctrlKey && e.deltaMode === 0;
@@ -32212,10 +32079,7 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32212
32079
  e.preventDefault();
32213
32080
  doZoom = true;
32214
32081
  };
32215
- window.addEventListener("wheel", handleWheelImmediate, {
32216
- signal: this.instance.getEventsController()?.signal,
32217
- passive: false
32218
- });
32082
+ window.addEventListener("wheel", handleWheelImmediate, { passive: false });
32219
32083
  const handleWheel = (e) => {
32220
32084
  if (!doZoom) return;
32221
32085
  const delta = e.deltaY > 0 ? 1 : -1;
@@ -32228,10 +32092,7 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32228
32092
  }
32229
32093
  };
32230
32094
  const throttledHandleWheel = (0, import_lodash.throttle)(handleWheel, DEFAULT_THROTTLE_MS);
32231
- window.addEventListener("wheel", throttledHandleWheel, {
32232
- signal: this.instance.getEventsController()?.signal,
32233
- passive: true
32234
- });
32095
+ window.addEventListener("wheel", throttledHandleWheel, { passive: true });
32235
32096
  }
32236
32097
  getInertiaScale() {
32237
32098
  const stage = this.instance.getStage();
@@ -32289,7 +32150,6 @@ const ZOOM_OUT_TOOL_ACTION_NAME = "zoomOutTool";
32289
32150
  //#region src/actions/zoom-out-tool/zoom-out-tool.ts
32290
32151
  var WeaveZoomOutToolAction = class extends WeaveAction {
32291
32152
  onPropsChange = void 0;
32292
- initialize = void 0;
32293
32153
  getName() {
32294
32154
  return ZOOM_OUT_TOOL_ACTION_NAME;
32295
32155
  }
@@ -32324,10 +32184,6 @@ const ZOOM_IN_TOOL_ACTION_NAME = "zoomInTool";
32324
32184
  //#region src/actions/zoom-in-tool/zoom-in-tool.ts
32325
32185
  var WeaveZoomInToolAction = class extends WeaveAction {
32326
32186
  onPropsChange = void 0;
32327
- initialize = void 0;
32328
- constructor() {
32329
- super();
32330
- }
32331
32187
  getName() {
32332
32188
  return ZOOM_IN_TOOL_ACTION_NAME;
32333
32189
  }
@@ -32362,10 +32218,6 @@ const FIT_TO_SCREEN_TOOL_ACTION_NAME = "fitToScreenTool";
32362
32218
  //#region src/actions/fit-to-screen-tool/fit-to-screen-tool.ts
32363
32219
  var WeaveFitToScreenToolAction = class extends WeaveAction {
32364
32220
  onPropsChange = void 0;
32365
- initialize = void 0;
32366
- constructor() {
32367
- super();
32368
- }
32369
32221
  getName() {
32370
32222
  return FIT_TO_SCREEN_TOOL_ACTION_NAME;
32371
32223
  }
@@ -32399,10 +32251,6 @@ const FIT_TO_SELECTION_TOOL_ACTION_NAME = "fitToSelectionTool";
32399
32251
  //#region src/actions/fit-to-selection-tool/fit-to-selection-tool.ts
32400
32252
  var WeaveFitToSelectionToolAction = class extends WeaveAction {
32401
32253
  onPropsChange = void 0;
32402
- initialize = void 0;
32403
- constructor() {
32404
- super();
32405
- }
32406
32254
  getName() {
32407
32255
  return FIT_TO_SELECTION_TOOL_ACTION_NAME;
32408
32256
  }
@@ -32445,9 +32293,6 @@ var WeaveMoveToolAction = class extends WeaveAction {
32445
32293
  onInit = void 0;
32446
32294
  constructor() {
32447
32295
  super();
32448
- this.initialize();
32449
- }
32450
- initialize() {
32451
32296
  this.initialized = false;
32452
32297
  this.state = MOVE_TOOL_STATE.IDLE;
32453
32298
  }
@@ -32461,7 +32306,7 @@ var WeaveMoveToolAction = class extends WeaveAction {
32461
32306
  this.cancelAction();
32462
32307
  return;
32463
32308
  }
32464
- }, { signal: this.instance.getEventsController()?.signal });
32309
+ });
32465
32310
  stage.on("pointerdown", () => {
32466
32311
  if ([MOVE_TOOL_ACTION_NAME].includes(this.instance.getActiveAction() ?? "")) stage.container().style.cursor = "grabbing";
32467
32312
  });
@@ -32520,9 +32365,6 @@ var WeaveSelectionToolAction = class extends WeaveAction {
32520
32365
  onInit = void 0;
32521
32366
  constructor() {
32522
32367
  super();
32523
- this.initialize();
32524
- }
32525
- initialize() {
32526
32368
  this.initialized = false;
32527
32369
  this.state = SELECTION_TOOL_STATE.IDLE;
32528
32370
  }
@@ -32586,9 +32428,6 @@ var WeaveEraserToolAction = class extends WeaveAction {
32586
32428
  onInit = void 0;
32587
32429
  constructor() {
32588
32430
  super();
32589
- this.initialize();
32590
- }
32591
- initialize() {
32592
32431
  this.initialized = false;
32593
32432
  this.erasing = false;
32594
32433
  this.state = ERASER_TOOL_STATE.IDLE;
@@ -32622,7 +32461,7 @@ var WeaveEraserToolAction = class extends WeaveAction {
32622
32461
  this.cancelAction();
32623
32462
  return;
32624
32463
  }
32625
- }, { signal: this.instance.getEventsController()?.signal });
32464
+ });
32626
32465
  this.initialized = true;
32627
32466
  }
32628
32467
  setState(state) {
@@ -32689,9 +32528,6 @@ var WeaveRectangleToolAction = class extends WeaveAction {
32689
32528
  onInit = void 0;
32690
32529
  constructor() {
32691
32530
  super();
32692
- this.initialize();
32693
- }
32694
- initialize() {
32695
32531
  this.pointers = new Map();
32696
32532
  this.initialized = false;
32697
32533
  this.state = RECTANGLE_TOOL_STATE.IDLE;
@@ -32727,7 +32563,7 @@ var WeaveRectangleToolAction = class extends WeaveAction {
32727
32563
  this.cancelAction();
32728
32564
  return;
32729
32565
  }
32730
- }, { signal: this.instance.getEventsController()?.signal });
32566
+ });
32731
32567
  stage.on("pointermove", () => {
32732
32568
  if (this.state === RECTANGLE_TOOL_STATE.IDLE) return;
32733
32569
  this.setCursor();
@@ -32901,9 +32737,6 @@ var WeaveEllipseToolAction = class extends WeaveAction {
32901
32737
  onInit = void 0;
32902
32738
  constructor() {
32903
32739
  super();
32904
- this.initialize();
32905
- }
32906
- initialize() {
32907
32740
  this.pointers = new Map();
32908
32741
  this.initialized = false;
32909
32742
  this.state = ELLIPSE_TOOL_STATE.IDLE;
@@ -32939,7 +32772,7 @@ var WeaveEllipseToolAction = class extends WeaveAction {
32939
32772
  this.cancelAction();
32940
32773
  return;
32941
32774
  }
32942
- }, { signal: this.instance.getEventsController()?.signal });
32775
+ });
32943
32776
  stage.on("pointerdown", (e) => {
32944
32777
  this.setTapStart(e);
32945
32778
  this.pointers.set(e.evt.pointerId, {
@@ -33120,9 +32953,6 @@ var WeavePenToolAction = class extends WeaveAction {
33120
32953
  onInit = void 0;
33121
32954
  constructor() {
33122
32955
  super();
33123
- this.initialize();
33124
- }
33125
- initialize() {
33126
32956
  this.pointers = new Map();
33127
32957
  this.initialized = false;
33128
32958
  this.state = PEN_TOOL_STATE.IDLE;
@@ -33158,7 +32988,7 @@ var WeavePenToolAction = class extends WeaveAction {
33158
32988
  this.cancelAction();
33159
32989
  return;
33160
32990
  }
33161
- }, { signal: this.instance.getEventsController()?.signal });
32991
+ });
33162
32992
  stage.on("pointerdown", (e) => {
33163
32993
  this.setTapStart(e);
33164
32994
  this.pointers.set(e.evt.pointerId, {
@@ -33395,9 +33225,6 @@ var WeaveLineToolAction = class extends WeaveAction {
33395
33225
  constructor(params) {
33396
33226
  super();
33397
33227
  this.config = mergeExceptArrays(LINE_TOOL_DEFAULT_CONFIG, params?.config ?? {});
33398
- this.initialize();
33399
- }
33400
- initialize() {
33401
33228
  this.pointers = new Map();
33402
33229
  this.initialized = false;
33403
33230
  this.state = LINE_TOOL_STATE.IDLE;
@@ -33442,13 +33269,13 @@ var WeaveLineToolAction = class extends WeaveAction {
33442
33269
  this.snappedAngle = null;
33443
33270
  this.shiftPressed = true;
33444
33271
  }
33445
- }, { signal: this.instance.getEventsController()?.signal });
33272
+ });
33446
33273
  window.addEventListener("keyup", (e) => {
33447
33274
  if (e.key === "Shift" && this.instance.getActiveAction() === LINE_TOOL_ACTION_NAME) {
33448
33275
  this.snappedAngle = null;
33449
33276
  this.shiftPressed = false;
33450
33277
  }
33451
- }, { signal: this.instance.getEventsController()?.signal });
33278
+ });
33452
33279
  stage.on("pointerdown", (e) => {
33453
33280
  this.setTapStart(e);
33454
33281
  this.pointers.set(e.evt.pointerId, {
@@ -33663,9 +33490,6 @@ var WeaveBrushToolAction = class extends WeaveAction {
33663
33490
  constructor(params) {
33664
33491
  super();
33665
33492
  this.config = mergeExceptArrays(BRUSH_TOOL_DEFAULT_CONFIG, params?.config ?? {});
33666
- this.initialize();
33667
- }
33668
- initialize() {
33669
33493
  this.initialized = false;
33670
33494
  this.state = BRUSH_TOOL_STATE.INACTIVE;
33671
33495
  this.strokeId = null;
@@ -33694,7 +33518,7 @@ var WeaveBrushToolAction = class extends WeaveAction {
33694
33518
  const stage = this.instance.getStage();
33695
33519
  window.addEventListener("keyup", (e) => {
33696
33520
  if (e.code === "Space" && this.instance.getActiveAction() === BRUSH_TOOL_ACTION_NAME) this.isSpacePressed = false;
33697
- }, { signal: this.instance.getEventsController()?.signal });
33521
+ });
33698
33522
  window.addEventListener("keydown", (e) => {
33699
33523
  if (e.code === "Enter" && this.instance.getActiveAction() === BRUSH_TOOL_ACTION_NAME) {
33700
33524
  e.stopPropagation();
@@ -33710,7 +33534,7 @@ var WeaveBrushToolAction = class extends WeaveAction {
33710
33534
  e.stopPropagation();
33711
33535
  this.cancelAction();
33712
33536
  }
33713
- }, { signal: this.instance.getEventsController()?.signal });
33537
+ });
33714
33538
  const handlePointerDown = (e) => {
33715
33539
  if (this.state === BRUSH_TOOL_STATE.INACTIVE) return;
33716
33540
  if (this.state !== BRUSH_TOOL_STATE.IDLE) return;
@@ -33919,9 +33743,6 @@ var WeaveTextToolAction = class extends WeaveAction {
33919
33743
  onInit = void 0;
33920
33744
  constructor() {
33921
33745
  super();
33922
- this.initialize();
33923
- }
33924
- initialize() {
33925
33746
  this.initialized = false;
33926
33747
  this.state = TEXT_TOOL_STATE.IDLE;
33927
33748
  this.textId = null;
@@ -33951,7 +33772,7 @@ var WeaveTextToolAction = class extends WeaveAction {
33951
33772
  this.cancelAction();
33952
33773
  return;
33953
33774
  }
33954
- }, { signal: this.instance.getEventsController()?.signal });
33775
+ });
33955
33776
  stage.on("pointermove", () => {
33956
33777
  if (this.state === TEXT_TOOL_STATE.IDLE) return;
33957
33778
  this.setCursor();
@@ -34079,9 +33900,6 @@ var WeaveImageToolAction = class extends WeaveAction {
34079
33900
  constructor(params) {
34080
33901
  super();
34081
33902
  this.config = mergeExceptArrays(WEAVE_IMAGE_TOOL_CONFIG_DEFAULT, params?.config ?? {});
34082
- this.initialize();
34083
- }
34084
- initialize() {
34085
33903
  this.pointers = new Map();
34086
33904
  this.initialized = false;
34087
33905
  this.imageId = null;
@@ -34125,7 +33943,7 @@ var WeaveImageToolAction = class extends WeaveAction {
34125
33943
  this.cancelAction();
34126
33944
  return;
34127
33945
  }
34128
- }, { signal: this.instance.getEventsController()?.signal });
33946
+ });
34129
33947
  stage.on("pointerdown", (e) => {
34130
33948
  this.setTapStart(e);
34131
33949
  if (this.ignorePointerEvents) return;
@@ -34522,9 +34340,6 @@ var WeaveImagesToolAction = class extends WeaveAction {
34522
34340
  constructor(params) {
34523
34341
  super();
34524
34342
  this.config = mergeExceptArrays(WEAVE_IMAGES_TOOL_DEFAULT_CONFIG, params ?? {});
34525
- this.initialize();
34526
- }
34527
- initialize() {
34528
34343
  this.pointers = new Map();
34529
34344
  this.initialized = false;
34530
34345
  this.tempPointerFeedbackNode = null;
@@ -34571,7 +34386,7 @@ var WeaveImagesToolAction = class extends WeaveAction {
34571
34386
  const stage = this.instance.getStage();
34572
34387
  stage.container().addEventListener("keydown", (e) => {
34573
34388
  if (e.key === "Escape" && this.instance.getActiveAction() === WEAVE_IMAGES_TOOL_ACTION_NAME) this.cancelAction();
34574
- }, { signal: this.instance.getEventsController()?.signal });
34389
+ });
34575
34390
  stage.on("pointerdown", (e) => {
34576
34391
  this.setTapStart(e);
34577
34392
  this.pointers.set(e.evt.pointerId, {
@@ -34953,9 +34768,6 @@ var WeaveStarToolAction = class extends WeaveAction {
34953
34768
  onInit = void 0;
34954
34769
  constructor() {
34955
34770
  super();
34956
- this.initialize();
34957
- }
34958
- initialize() {
34959
34771
  this.pointers = new Map();
34960
34772
  this.initialized = false;
34961
34773
  this.state = STAR_TOOL_STATE.IDLE;
@@ -34992,7 +34804,7 @@ var WeaveStarToolAction = class extends WeaveAction {
34992
34804
  this.cancelAction();
34993
34805
  return;
34994
34806
  }
34995
- }, { signal: this.instance.getEventsController()?.signal });
34807
+ });
34996
34808
  stage.on("pointerdown", (e) => {
34997
34809
  this.setTapStart(e);
34998
34810
  this.pointers.set(e.evt.pointerId, {
@@ -35157,8 +34969,8 @@ var WeaveStarToolAction = class extends WeaveAction {
35157
34969
 
35158
34970
  //#endregion
35159
34971
  //#region src/actions/arrow-tool/constants.ts
35160
- const WEAVE_ARROW_TOOL_ACTION_NAME = "arrowTool";
35161
- const WEAVE_ARROW_TOOL_STATE = {
34972
+ const ARROW_TOOL_ACTION_NAME = "arrowTool";
34973
+ const ARROW_TOOL_STATE = {
35162
34974
  ["IDLE"]: "idle",
35163
34975
  ["ADDING"]: "adding",
35164
34976
  ["DEFINING_SIZE"]: "definingSize",
@@ -35174,12 +34986,9 @@ var WeaveArrowToolAction = class extends WeaveAction {
35174
34986
  onInit = void 0;
35175
34987
  constructor() {
35176
34988
  super();
35177
- this.initialize();
35178
- }
35179
- initialize() {
35180
34989
  this.pointers = new Map();
35181
34990
  this.initialized = false;
35182
- this.state = WEAVE_ARROW_TOOL_STATE.IDLE;
34991
+ this.state = ARROW_TOOL_STATE.IDLE;
35183
34992
  this.arrowId = null;
35184
34993
  this.tempArrowId = null;
35185
34994
  this.tempMainArrowNode = null;
@@ -35192,7 +35001,7 @@ var WeaveArrowToolAction = class extends WeaveAction {
35192
35001
  this.props = this.initProps();
35193
35002
  }
35194
35003
  getName() {
35195
- return WEAVE_ARROW_TOOL_ACTION_NAME;
35004
+ return ARROW_TOOL_ACTION_NAME;
35196
35005
  }
35197
35006
  initProps() {
35198
35007
  return {
@@ -35209,37 +35018,40 @@ var WeaveArrowToolAction = class extends WeaveAction {
35209
35018
  setupEvents() {
35210
35019
  const stage = this.instance.getStage();
35211
35020
  window.addEventListener("keydown", (e) => {
35212
- if (e.code === "Enter" && this.instance.getActiveAction() === WEAVE_ARROW_TOOL_ACTION_NAME) {
35021
+ if (e.code === "Enter" && this.instance.getActiveAction() === ARROW_TOOL_ACTION_NAME) {
35213
35022
  this.cancelAction();
35214
35023
  return;
35215
35024
  }
35216
- if (e.code === "Escape" && this.instance.getActiveAction() === WEAVE_ARROW_TOOL_ACTION_NAME) this.cancelAction();
35217
- }, { signal: this.instance.getEventsController()?.signal });
35025
+ if (e.code === "Escape" && this.instance.getActiveAction() === ARROW_TOOL_ACTION_NAME) {
35026
+ this.cancelAction();
35027
+ return;
35028
+ }
35029
+ });
35218
35030
  stage.on("pointerdown", (e) => {
35219
35031
  this.setTapStart(e);
35220
35032
  this.pointers.set(e.evt.pointerId, {
35221
35033
  x: e.evt.clientX,
35222
35034
  y: e.evt.clientY
35223
35035
  });
35224
- if (this.pointers.size === 2 && this.instance.getActiveAction() === WEAVE_ARROW_TOOL_ACTION_NAME) {
35225
- this.state = WEAVE_ARROW_TOOL_STATE.ADDING;
35036
+ if (this.pointers.size === 2 && this.instance.getActiveAction() === ARROW_TOOL_ACTION_NAME) {
35037
+ this.state = ARROW_TOOL_STATE.ADDING;
35226
35038
  return;
35227
35039
  }
35228
- if (!this.tempMainArrowNode && this.state === WEAVE_ARROW_TOOL_STATE.ADDING) this.handleAdding();
35229
- if (this.tempMainArrowNode && this.state === WEAVE_ARROW_TOOL_STATE.ADDING) this.state = WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE;
35040
+ if (!this.tempMainArrowNode && this.state === ARROW_TOOL_STATE.ADDING) this.handleAdding();
35041
+ if (this.tempMainArrowNode && this.state === ARROW_TOOL_STATE.ADDING) this.state = ARROW_TOOL_STATE.DEFINING_SIZE;
35230
35042
  });
35231
35043
  stage.on("pointermove", () => {
35232
- if (this.state === WEAVE_ARROW_TOOL_STATE.IDLE) return;
35044
+ if (this.state === ARROW_TOOL_STATE.IDLE) return;
35233
35045
  this.setCursor();
35234
- if (this.pointers.size === 2 && this.instance.getActiveAction() === WEAVE_ARROW_TOOL_ACTION_NAME) {
35235
- this.state = WEAVE_ARROW_TOOL_STATE.ADDING;
35046
+ if (this.pointers.size === 2 && this.instance.getActiveAction() === ARROW_TOOL_ACTION_NAME) {
35047
+ this.state = ARROW_TOOL_STATE.ADDING;
35236
35048
  return;
35237
35049
  }
35238
- if (this.state === WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE) this.handleMovement();
35050
+ if (this.state === ARROW_TOOL_STATE.DEFINING_SIZE) this.handleMovement();
35239
35051
  });
35240
35052
  stage.on("pointerup", (e) => {
35241
35053
  this.pointers.delete(e.evt.pointerId);
35242
- if (this.state === WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE) this.handleSettingSize();
35054
+ if (this.state === ARROW_TOOL_STATE.DEFINING_SIZE) this.handleSettingSize();
35243
35055
  });
35244
35056
  this.initialized = true;
35245
35057
  }
@@ -35253,7 +35065,7 @@ var WeaveArrowToolAction = class extends WeaveAction {
35253
35065
  this.tempPoint = void 0;
35254
35066
  this.tempNextPoint = void 0;
35255
35067
  this.clickPoint = null;
35256
- this.setState(WEAVE_ARROW_TOOL_STATE.ADDING);
35068
+ this.setState(ARROW_TOOL_STATE.ADDING);
35257
35069
  }
35258
35070
  handleAdding() {
35259
35071
  const stage = this.instance.getStage();
@@ -35304,7 +35116,7 @@ var WeaveArrowToolAction = class extends WeaveAction {
35304
35116
  this.measureContainer?.add(this.tempNextPoint);
35305
35117
  this.tempPoint.moveToTop();
35306
35118
  this.tempNextPoint.moveToTop();
35307
- this.setState(WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE);
35119
+ this.setState(ARROW_TOOL_STATE.DEFINING_SIZE);
35308
35120
  }
35309
35121
  }
35310
35122
  handleSettingSize() {
@@ -35331,11 +35143,11 @@ var WeaveArrowToolAction = class extends WeaveAction {
35331
35143
  y: mousePoint.y,
35332
35144
  points: [0, 0]
35333
35145
  });
35334
- this.setState(WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE);
35146
+ this.setState(ARROW_TOOL_STATE.DEFINING_SIZE);
35335
35147
  }
35336
35148
  }
35337
35149
  handleMovement() {
35338
- if (this.state !== WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE) return;
35150
+ if (this.state !== ARROW_TOOL_STATE.DEFINING_SIZE) return;
35339
35151
  if (this.arrowId && this.tempArrowNode && this.measureContainer && this.tempNextPoint) {
35340
35152
  const { mousePoint } = this.instance.getMousePointerRelativeToContainer(this.measureContainer);
35341
35153
  this.tempArrowNode.setAttrs({
@@ -35402,7 +35214,7 @@ var WeaveArrowToolAction = class extends WeaveAction {
35402
35214
  this.container = void 0;
35403
35215
  this.measureContainer = void 0;
35404
35216
  this.clickPoint = null;
35405
- this.setState(WEAVE_ARROW_TOOL_STATE.IDLE);
35217
+ this.setState(ARROW_TOOL_STATE.IDLE);
35406
35218
  }
35407
35219
  setCursor() {
35408
35220
  const stage = this.instance.getStage();
@@ -35446,15 +35258,13 @@ const WEAVE_STROKE_TOOL_DEFAULT_CONFIG = { snapAngles: {
35446
35258
  var WeaveStrokeToolAction = class extends WeaveAction {
35447
35259
  initialized = false;
35448
35260
  initialCursor = null;
35261
+ snappedAngle = null;
35449
35262
  shiftPressed = false;
35450
35263
  onPropsChange = void 0;
35451
35264
  onInit = void 0;
35452
35265
  constructor(params) {
35453
35266
  super();
35454
35267
  this.config = mergeExceptArrays(WEAVE_STROKE_TOOL_DEFAULT_CONFIG, params?.config ?? {});
35455
- this.initialize();
35456
- }
35457
- initialize() {
35458
35268
  this.pointers = new Map();
35459
35269
  this.initialized = false;
35460
35270
  this.state = WEAVE_STROKE_TOOL_STATE.IDLE;
@@ -35463,6 +35273,7 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35463
35273
  this.tempLineId = null;
35464
35274
  this.tempLineNode = null;
35465
35275
  this.container = void 0;
35276
+ this.snappedAngle = null;
35466
35277
  this.measureContainer = void 0;
35467
35278
  this.clickPoint = null;
35468
35279
  this.snapper = new GreedySnapper({
@@ -35475,9 +35286,6 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35475
35286
  getName() {
35476
35287
  return WEAVE_STROKE_TOOL_ACTION_NAME;
35477
35288
  }
35478
- getNames() {
35479
- return [WEAVE_STROKE_TOOL_ACTION_NAME, ...WEAVE_STROKE_TOOL_ACTION_NAME_ALIASES];
35480
- }
35481
35289
  hasAliases() {
35482
35290
  return true;
35483
35291
  }
@@ -35496,26 +35304,32 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35496
35304
  setupEvents() {
35497
35305
  const stage = this.instance.getStage();
35498
35306
  window.addEventListener("keydown", (e) => {
35499
- if (e.code === "Enter" && this.getNames().includes(this.instance.getActiveAction() ?? "")) {
35307
+ if (e.code === "Enter" && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35500
35308
  this.cancelAction();
35501
35309
  return;
35502
35310
  }
35503
- if (e.code === "Escape" && this.getNames().includes(this.instance.getActiveAction() ?? "")) {
35311
+ if (e.code === "Escape" && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35504
35312
  this.cancelAction();
35505
35313
  return;
35506
35314
  }
35507
- if (e.key === "Shift" && this.getNames().includes(this.instance.getActiveAction() ?? "")) this.shiftPressed = true;
35508
- }, { signal: this.instance.getEventsController()?.signal });
35315
+ if (e.key === "Shift" && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35316
+ this.snappedAngle = null;
35317
+ this.shiftPressed = true;
35318
+ }
35319
+ });
35509
35320
  window.addEventListener("keyup", (e) => {
35510
- if (e.key === "Shift" && this.getNames().includes(this.instance.getActiveAction() ?? "")) this.shiftPressed = false;
35511
- }, { signal: this.instance.getEventsController()?.signal });
35321
+ if (e.key === "Shift" && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35322
+ this.snappedAngle = null;
35323
+ this.shiftPressed = false;
35324
+ }
35325
+ });
35512
35326
  stage.on("pointerdown", (e) => {
35513
35327
  this.setTapStart(e);
35514
35328
  this.pointers.set(e.evt.pointerId, {
35515
35329
  x: e.evt.clientX,
35516
35330
  y: e.evt.clientY
35517
35331
  });
35518
- if (this.pointers.size === 2 && this.getNames().includes(this.instance.getActiveAction() ?? "")) {
35332
+ if (this.pointers.size === 2 && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35519
35333
  this.state = WEAVE_STROKE_TOOL_STATE.ADDING;
35520
35334
  return;
35521
35335
  }
@@ -35525,7 +35339,7 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35525
35339
  stage.on("pointermove", () => {
35526
35340
  if (this.state === WEAVE_STROKE_TOOL_STATE.IDLE) return;
35527
35341
  this.setCursor();
35528
- if (this.pointers.size === 2 && this.getNames().includes(this.instance.getActiveAction() ?? "")) {
35342
+ if (this.pointers.size === 2 && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35529
35343
  this.state = WEAVE_STROKE_TOOL_STATE.ADDING;
35530
35344
  return;
35531
35345
  }
@@ -35543,7 +35357,7 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35543
35357
  addLine() {
35544
35358
  this.setCursor();
35545
35359
  this.setFocusStage();
35546
- this.instance.emitEvent("onAddingStroke", { actionName: this.instance.getActiveAction() ?? "not-defined" });
35360
+ this.instance.emitEvent("onAddingStroke", { actionName: this.instance.getActiveAction() ?? WEAVE_STROKE_TOOL_ACTION_NAME });
35547
35361
  this.shiftPressed = false;
35548
35362
  this.clickPoint = null;
35549
35363
  this.setState(WEAVE_STROKE_TOOL_STATE.ADDING);
@@ -35651,7 +35465,7 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35651
35465
  });
35652
35466
  delete finalLine.props.dragBoundFunc;
35653
35467
  this.instance.addNode(finalLine, this.container?.getAttrs().id);
35654
- this.instance.emitEvent("onAddedStroke", { actionName: this.instance.getActiveAction() ?? "not-defined" });
35468
+ this.instance.emitEvent("onAddedStroke", { actionName: this.instance.getActiveAction() ?? WEAVE_STROKE_TOOL_ACTION_NAME });
35655
35469
  nodeCreated = true;
35656
35470
  }
35657
35471
  }
@@ -35701,9 +35515,6 @@ var WeaveRegularPolygonToolAction = class extends WeaveAction {
35701
35515
  onInit = void 0;
35702
35516
  constructor() {
35703
35517
  super();
35704
- this.initialize();
35705
- }
35706
- initialize() {
35707
35518
  this.pointers = new Map();
35708
35519
  this.initialized = false;
35709
35520
  this.state = REGULAR_POLYGON_TOOL_STATE.IDLE;
@@ -35738,7 +35549,7 @@ var WeaveRegularPolygonToolAction = class extends WeaveAction {
35738
35549
  this.cancelAction();
35739
35550
  return;
35740
35551
  }
35741
- }, { signal: this.instance.getEventsController()?.signal });
35552
+ });
35742
35553
  stage.on("pointerdown", (e) => {
35743
35554
  this.setTapStart(e);
35744
35555
  this.pointers.set(e.evt.pointerId, {
@@ -35912,9 +35723,6 @@ var WeaveFrameToolAction = class extends WeaveAction {
35912
35723
  onInit = void 0;
35913
35724
  constructor() {
35914
35725
  super();
35915
- this.initialize();
35916
- }
35917
- initialize() {
35918
35726
  this.initialized = false;
35919
35727
  this.state = FRAME_TOOL_STATE.IDLE;
35920
35728
  this.frameId = null;
@@ -35942,7 +35750,7 @@ var WeaveFrameToolAction = class extends WeaveAction {
35942
35750
  this.cancelAction();
35943
35751
  return;
35944
35752
  }
35945
- }, { signal: this.instance.getEventsController()?.signal });
35753
+ });
35946
35754
  stage.on("pointermove", () => {
35947
35755
  if (this.state === FRAME_TOOL_STATE.IDLE) return;
35948
35756
  this.setCursor();
@@ -36044,10 +35852,6 @@ var WeaveExportStageToolAction = class extends WeaveAction {
36044
35852
  };
36045
35853
  onPropsChange = void 0;
36046
35854
  onInit = void 0;
36047
- initialize = void 0;
36048
- constructor() {
36049
- super();
36050
- }
36051
35855
  getName() {
36052
35856
  return EXPORT_STAGE_TOOL_ACTION_NAME;
36053
35857
  }
@@ -36095,10 +35899,6 @@ var WeaveExportNodesToolAction = class extends WeaveAction {
36095
35899
  };
36096
35900
  onPropsChange = void 0;
36097
35901
  onInit = void 0;
36098
- initialize = void 0;
36099
- constructor() {
36100
- super();
36101
- }
36102
35902
  getName() {
36103
35903
  return EXPORT_NODES_TOOL_ACTION_NAME;
36104
35904
  }
@@ -36151,9 +35951,6 @@ var WeaveAlignNodesToolAction = class extends WeaveAction {
36151
35951
  onInit = void 0;
36152
35952
  constructor() {
36153
35953
  super();
36154
- this.initialize();
36155
- }
36156
- initialize() {
36157
35954
  this.initialized = false;
36158
35955
  this.state = ALIGN_NODES_TOOL_STATE.IDLE;
36159
35956
  }
@@ -36403,9 +36200,6 @@ var WeaveCommentToolAction = class extends WeaveAction {
36403
36200
  super();
36404
36201
  const { config } = params ?? {};
36405
36202
  this.config = mergeExceptArrays(WEAVE_COMMENT_TOOL_DEFAULT_CONFIG, config);
36406
- this.initialize();
36407
- }
36408
- initialize() {
36409
36203
  this.pointers = new Map();
36410
36204
  this.initialized = false;
36411
36205
  this.state = WEAVE_COMMENT_TOOL_STATE.IDLE;
@@ -36483,7 +36277,7 @@ var WeaveCommentToolAction = class extends WeaveAction {
36483
36277
  return;
36484
36278
  }
36485
36279
  if (e.code === "Escape" && this.state === WEAVE_COMMENT_TOOL_STATE.CREATING_COMMENT) this.setState(WEAVE_COMMENT_TOOL_STATE.ADDING);
36486
- }, { signal: this.instance.getEventsController()?.signal });
36280
+ });
36487
36281
  stage.on("pointermove", (e) => {
36488
36282
  if (this.state === WEAVE_COMMENT_TOOL_STATE.IDLE) return;
36489
36283
  if (commentNodeHandler?.isCommentViewing()) {
@@ -36634,9 +36428,6 @@ var WeaveVideoToolAction = class extends WeaveAction {
36634
36428
  update = void 0;
36635
36429
  constructor() {
36636
36430
  super();
36637
- this.initialize();
36638
- }
36639
- initialize() {
36640
36431
  this.pointers = new Map();
36641
36432
  this.initialized = false;
36642
36433
  this.state = VIDEO_TOOL_STATE.IDLE;
@@ -36683,7 +36474,7 @@ var WeaveVideoToolAction = class extends WeaveAction {
36683
36474
  this.cancelAction();
36684
36475
  return;
36685
36476
  }
36686
- }, { signal: this.instance.getEventsController()?.signal });
36477
+ });
36687
36478
  stage.on("pointerdown", (e) => {
36688
36479
  this.setTapStart(e);
36689
36480
  this.pointers.set(e.evt.pointerId, {
@@ -36816,9 +36607,6 @@ var WeaveMeasureToolAction = class extends WeaveAction {
36816
36607
  constructor(params) {
36817
36608
  super();
36818
36609
  this.config = mergeExceptArrays(WEAVE_MEASURE_TOOL_DEFAULT_CONFIG, params?.config ?? {});
36819
- this.initialize();
36820
- }
36821
- initialize() {
36822
36610
  this.initialized = false;
36823
36611
  this.state = MEASURE_TOOL_STATE.IDLE;
36824
36612
  this.measureId = null;
@@ -36845,7 +36633,7 @@ var WeaveMeasureToolAction = class extends WeaveAction {
36845
36633
  const stage = this.instance.getStage();
36846
36634
  window.addEventListener("keydown", (e) => {
36847
36635
  if (e.code === "Escape" && this.instance.getActiveAction() === MEASURE_TOOL_ACTION_NAME) this.cancelAction();
36848
- }, { signal: this.instance.getEventsController()?.signal });
36636
+ });
36849
36637
  stage.on("pointermove", () => {
36850
36638
  if (this.state === MEASURE_TOOL_STATE.IDLE) return;
36851
36639
  if (this.state === MEASURE_TOOL_STATE.SET_TO) {
@@ -37115,9 +36903,6 @@ var WeaveConnectorToolAction = class extends WeaveAction {
37115
36903
  constructor(params) {
37116
36904
  super();
37117
36905
  this.config = mergeExceptArrays(CONNECTOR_TOOL_DEFAULT_CONFIG, params?.config);
37118
- this.initialize();
37119
- }
37120
- initialize() {
37121
36906
  this.pointers = new Map();
37122
36907
  this.initialized = false;
37123
36908
  this.tempLineNode = null;
@@ -37156,7 +36941,7 @@ var WeaveConnectorToolAction = class extends WeaveAction {
37156
36941
  return;
37157
36942
  }
37158
36943
  if (e.code === "Escape" && this.instance.getActiveAction() === CONNECTOR_TOOL_ACTION_NAME) this.cancelAction();
37159
- }, { signal: this.instance.getEventsController()?.signal });
36944
+ });
37160
36945
  let nodeHovered = void 0;
37161
36946
  stage.on("pointermove", () => {
37162
36947
  if (!(this.state === CONNECTOR_TOOL_STATE.SELECTING_INITIAL || this.state === CONNECTOR_TOOL_STATE.SELECTING_FINAL)) return;
@@ -37471,6 +37256,10 @@ var WeaveConnectorToolAction = class extends WeaveAction {
37471
37256
  //#endregion
37472
37257
  //#region src/plugins/stage-grid/stage-grid.ts
37473
37258
  var WeaveStageGridPlugin = class extends WeavePlugin {
37259
+ actStageZoomX = 1;
37260
+ actStageZoomY = 1;
37261
+ actStagePosX = 0;
37262
+ actStagePosY = 0;
37474
37263
  constructor(params) {
37475
37264
  super();
37476
37265
  const { config } = params ?? {};
@@ -37486,10 +37275,6 @@ var WeaveStageGridPlugin = class extends WeavePlugin {
37486
37275
  this.isMouseMiddleButtonPressed = false;
37487
37276
  this.isSpaceKeyPressed = false;
37488
37277
  this.forceStageChange = false;
37489
- this.actStagePosX = 0;
37490
- this.actStagePosY = 0;
37491
- this.actStageZoomX = 1;
37492
- this.actStageZoomY = 1;
37493
37278
  }
37494
37279
  getName() {
37495
37280
  return WEAVE_STAGE_GRID_PLUGIN_KEY;
@@ -37514,10 +37299,10 @@ var WeaveStageGridPlugin = class extends WeavePlugin {
37514
37299
  const stage = this.instance.getStage();
37515
37300
  window.addEventListener("keydown", (e) => {
37516
37301
  if (e.code === "Space") this.isSpaceKeyPressed = true;
37517
- }, { signal: this.instance.getEventsController()?.signal });
37302
+ });
37518
37303
  window.addEventListener("keyup", (e) => {
37519
37304
  if (e.code === "Space") this.isSpaceKeyPressed = false;
37520
- }, { signal: this.instance.getEventsController()?.signal });
37305
+ });
37521
37306
  this.instance.addEventListener("onStageMove", () => {
37522
37307
  this.onRender();
37523
37308
  });
@@ -37783,14 +37568,15 @@ var WeaveStageGridPlugin = class extends WeavePlugin {
37783
37568
  //#endregion
37784
37569
  //#region src/plugins/stage-panning/stage-panning.ts
37785
37570
  var WeaveStagePanningPlugin = class extends WeavePlugin {
37571
+ panning = false;
37572
+ currentPointer = null;
37573
+ stageScrollInterval = void 0;
37574
+ panEdgeTargets = {};
37786
37575
  getLayerName = void 0;
37787
37576
  initLayer = void 0;
37788
37577
  constructor(params) {
37789
37578
  super();
37790
37579
  this.config = mergeExceptArrays(WEAVE_STAGE_PANNING_DEFAULT_CONFIG, params?.config ?? {});
37791
- this.initialize();
37792
- }
37793
- initialize() {
37794
37580
  this.pointers = new Map();
37795
37581
  this.panning = false;
37796
37582
  this.isDragging = false;
@@ -37802,9 +37588,6 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
37802
37588
  this.isCtrlOrMetaPressed = false;
37803
37589
  this.isSpaceKeyPressed = false;
37804
37590
  this.previousPointer = null;
37805
- this.currentPointer = null;
37806
- this.stageScrollInterval = void 0;
37807
- this.panEdgeTargets = {};
37808
37591
  }
37809
37592
  getName() {
37810
37593
  return WEAVE_STAGE_PANNING_KEY;
@@ -37838,7 +37621,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
37838
37621
  this.isSpaceKeyPressed = true;
37839
37622
  this.setCursor();
37840
37623
  }
37841
- }, { signal: this.instance.getEventsController()?.signal });
37624
+ });
37842
37625
  window.addEventListener("keyup", (e) => {
37843
37626
  if (e.key === "Meta" || e.key === "Control") this.isCtrlOrMetaPressed = false;
37844
37627
  if (e.code === "Space") {
@@ -37849,7 +37632,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
37849
37632
  this.isSpaceKeyPressed = false;
37850
37633
  this.disableMove();
37851
37634
  }
37852
- }, { signal: this.instance.getEventsController()?.signal });
37635
+ });
37853
37636
  let lastPos = null;
37854
37637
  stage.on("pointerdown", (e) => {
37855
37638
  this.pointers.set(e.evt.pointerId, {
@@ -37922,10 +37705,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
37922
37705
  this.instance.emitEvent("onStageMove");
37923
37706
  };
37924
37707
  const handleWheelThrottled = (0, import_lodash.throttle)(handleWheel, WEAVE_STAGE_PANNING_THROTTLE_MS);
37925
- window.addEventListener("wheel", handleWheelThrottled, {
37926
- passive: true,
37927
- signal: this.instance.getEventsController()?.signal
37928
- });
37708
+ window.addEventListener("wheel", handleWheelThrottled, { passive: true });
37929
37709
  stage.on("dragstart", (e) => {
37930
37710
  const duration = 1e3 / 60;
37931
37711
  if (this.panEdgeTargets[e.target.getAttrs().id ?? ""] !== void 0) return;
@@ -37983,10 +37763,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
37983
37763
  stage.container().style.setProperty("-webkit-user-drag", "none");
37984
37764
  stage.getContent().addEventListener("touchmove", function(e) {
37985
37765
  e.preventDefault();
37986
- }, {
37987
- passive: false,
37988
- signal: this.instance.getEventsController()?.signal
37989
- });
37766
+ }, { passive: false });
37990
37767
  }
37991
37768
  isPanning() {
37992
37769
  return this.panning;
@@ -38064,9 +37841,6 @@ var WeaveStageMinimapPlugin = class extends WeavePlugin {
38064
37841
  constructor(params) {
38065
37842
  super();
38066
37843
  this.config = mergeExceptArrays(STAGE_MINIMAP_DEFAULT_CONFIG, params.config);
38067
- this.initialize();
38068
- }
38069
- initialize() {
38070
37844
  this.initialized = false;
38071
37845
  }
38072
37846
  getName() {
@@ -38244,7 +38018,6 @@ const WEAVE_STAGE_RESIZE_KEY = "stageResize";
38244
38018
  var WeaveStageResizePlugin = class extends WeavePlugin {
38245
38019
  getLayerName = void 0;
38246
38020
  initLayer = void 0;
38247
- initialize = void 0;
38248
38021
  getName() {
38249
38022
  return WEAVE_STAGE_RESIZE_KEY;
38250
38023
  }
@@ -38264,10 +38037,6 @@ var WeaveStageResizePlugin = class extends WeavePlugin {
38264
38037
  const pluginInstance = plugins[pluginId];
38265
38038
  pluginInstance.onRender?.();
38266
38039
  }
38267
- this.instance.emitEvent("onStageResize", {
38268
- width: stage.width(),
38269
- height: stage.height()
38270
- });
38271
38040
  }
38272
38041
  }
38273
38042
  onInit() {
@@ -38276,7 +38045,7 @@ var WeaveStageResizePlugin = class extends WeavePlugin {
38276
38045
  }, DEFAULT_THROTTLE_MS);
38277
38046
  window.addEventListener("resize", () => {
38278
38047
  throttledResize();
38279
- }, { signal: this.instance.getEventsController()?.signal });
38048
+ });
38280
38049
  const resizeObserver = new ResizeObserver(() => {
38281
38050
  throttledResize();
38282
38051
  });
@@ -38294,12 +38063,10 @@ var WeaveStageResizePlugin = class extends WeavePlugin {
38294
38063
  //#endregion
38295
38064
  //#region src/plugins/nodes-multi-selection-feedback/nodes-multi-selection-feedback.ts
38296
38065
  var WeaveNodesMultiSelectionFeedbackPlugin = class extends WeavePlugin {
38066
+ selectedHalos = {};
38297
38067
  constructor(params) {
38298
38068
  super();
38299
38069
  this.config = mergeExceptArrays(WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_DEFAULT_CONFIG, params?.config ?? {});
38300
- this.initialize();
38301
- }
38302
- initialize() {
38303
38070
  this.selectedHalos = {};
38304
38071
  }
38305
38072
  getName() {
@@ -38465,14 +38232,12 @@ var WeaveNodesMultiSelectionFeedbackPlugin = class extends WeavePlugin {
38465
38232
  //#endregion
38466
38233
  //#region src/plugins/connected-users/connected-users.ts
38467
38234
  var WeaveConnectedUsersPlugin = class extends WeavePlugin {
38235
+ connectedUsers = {};
38468
38236
  getLayerName = void 0;
38469
38237
  constructor(params) {
38470
38238
  super();
38471
38239
  const { config } = params ?? {};
38472
38240
  this.config = config;
38473
- this.initialize();
38474
- }
38475
- initialize() {
38476
38241
  this.connectedUsers = {};
38477
38242
  }
38478
38243
  getName() {
@@ -38519,9 +38284,6 @@ var WeaveUsersSelectionPlugin = class extends WeavePlugin {
38519
38284
  this.config = config;
38520
38285
  this.config.getUser = memoize(this.config.getUser);
38521
38286
  this.config.getUserColor = memoize(this.config.getUserColor);
38522
- this.initialize();
38523
- }
38524
- initialize() {
38525
38287
  this.usersSelection = {};
38526
38288
  }
38527
38289
  getName() {
@@ -38714,9 +38476,6 @@ var WeaveUsersPointersPlugin = class extends WeavePlugin {
38714
38476
  this.config.getUser = memoize(this.config.getUser);
38715
38477
  this.config.getUserBackgroundColor = memoize(this.config.getUserBackgroundColor);
38716
38478
  this.config.getUserForegroundColor = memoize(this.config.getUserForegroundColor);
38717
- this.initialize();
38718
- }
38719
- initialize() {
38720
38479
  this.usersPointers = {};
38721
38480
  this.usersOperations = {};
38722
38481
  }
@@ -38927,9 +38686,6 @@ var WeaveUsersPresencePlugin = class extends WeavePlugin {
38927
38686
  super();
38928
38687
  const { config } = params;
38929
38688
  this.config = mergeExceptArrays(WEAVE_USERS_PRESENCE_CONFIG_DEFAULT_PROPS, config);
38930
- this.initialize();
38931
- }
38932
- initialize() {
38933
38689
  this.userPresence = {};
38934
38690
  }
38935
38691
  getName() {
@@ -39005,9 +38761,6 @@ var WeaveStageDropAreaPlugin = class extends WeavePlugin {
39005
38761
  initLayer = void 0;
39006
38762
  constructor() {
39007
38763
  super();
39008
- this.initialize();
39009
- }
39010
- initialize() {
39011
38764
  this.enabled = true;
39012
38765
  }
39013
38766
  getName() {
@@ -39021,20 +38774,14 @@ var WeaveStageDropAreaPlugin = class extends WeavePlugin {
39021
38774
  stage.container().addEventListener("dragover", (e) => {
39022
38775
  e.preventDefault();
39023
38776
  e.stopPropagation();
39024
- }, { signal: this.instance.getEventsController()?.signal });
38777
+ });
39025
38778
  stage.container().addEventListener("drop", (e) => {
39026
38779
  e.preventDefault();
39027
38780
  e.stopPropagation();
39028
38781
  this.instance.emitEvent("onStageDrop", e);
39029
- }, { signal: this.instance.getEventsController()?.signal });
39030
- window.addEventListener("dragover", (e) => e.preventDefault(), {
39031
- signal: this.instance.getEventsController()?.signal,
39032
- passive: false
39033
- });
39034
- window.addEventListener("drop", (e) => e.preventDefault(), {
39035
- signal: this.instance.getEventsController()?.signal,
39036
- passive: false
39037
38782
  });
38783
+ window.addEventListener("dragover", (e) => e.preventDefault(), { passive: false });
38784
+ window.addEventListener("drop", (e) => e.preventDefault(), { passive: false });
39038
38785
  }
39039
38786
  enable() {
39040
38787
  this.enabled = true;
@@ -39053,9 +38800,6 @@ var WeaveNodesEdgeSnappingPlugin = class extends WeavePlugin {
39053
38800
  this.guideLineConfig = config?.guideLine ?? GUIDE_LINE_DEFAULT_CONFIG;
39054
38801
  this.dragSnappingThreshold = config?.dragSnappingThreshold ?? GUIDE_LINE_DRAG_SNAPPING_THRESHOLD;
39055
38802
  this.transformSnappingThreshold = config?.transformSnappingThreshold ?? GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD;
39056
- this.initialize();
39057
- }
39058
- initialize() {
39059
38803
  this.enabled = true;
39060
38804
  }
39061
38805
  getName() {
@@ -39432,9 +39176,6 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
39432
39176
  this.enterSnappingTolerance = config?.enterSnappingTolerance ?? GUIDE_ENTER_SNAPPING_TOLERANCE;
39433
39177
  this.exitSnappingTolerance = config?.exitSnappingTolerance ?? GUIDE_EXIT_SNAPPING_TOLERANCE;
39434
39178
  this.uiConfig = mergeExceptArrays(GUIDE_DISTANCE_LINE_DEFAULT_CONFIG, config?.ui);
39435
- this.initialize();
39436
- }
39437
- initialize() {
39438
39179
  this.enabled = true;
39439
39180
  }
39440
39181
  getName() {
@@ -40081,14 +39822,12 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
40081
39822
  //#endregion
40082
39823
  //#region src/plugins/comments-renderer/comments-renderer.ts
40083
39824
  var WeaveCommentsRendererPlugin = class extends WeavePlugin {
39825
+ comments = [];
40084
39826
  getLayerName = void 0;
40085
39827
  constructor(params) {
40086
39828
  super();
40087
39829
  const { config } = params ?? {};
40088
39830
  this.config = config;
40089
- this.initialize();
40090
- }
40091
- initialize() {
40092
39831
  this.comments = [];
40093
39832
  }
40094
39833
  getName() {
@@ -40179,7 +39918,6 @@ const WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG = { movementDelta: 5 };
40179
39918
  var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
40180
39919
  getLayerName = void 0;
40181
39920
  initLayer = void 0;
40182
- initialize = void 0;
40183
39921
  constructor(params) {
40184
39922
  super();
40185
39923
  this.config = mergeExceptArrays(WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG, params?.config ?? {});
@@ -40218,7 +39956,7 @@ var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
40218
39956
  if (e.code === "ArrowLeft" && e.shiftKey) this.handleNodesMovement("left");
40219
39957
  if (e.code === "ArrowRight" && e.shiftKey) this.handleNodesMovement("right");
40220
39958
  if (e.code === "ArrowDown" && e.shiftKey) this.handleNodesMovement("down");
40221
- }, { signal: this.instance.getEventsController()?.signal });
39959
+ });
40222
39960
  }
40223
39961
  enable() {
40224
39962
  this.enabled = true;
@@ -40275,4 +40013,4 @@ function getJSONFromYjsBinary(actualState) {
40275
40013
  }
40276
40014
 
40277
40015
  //#endregion
40278
- 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 };
40016
+ export { ALIGN_NODES_ALIGN_TO, ALIGN_NODES_TOOL_ACTION_NAME, ALIGN_NODES_TOOL_STATE, ARROW_TOOL_ACTION_NAME, ARROW_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_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_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 };