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