@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/types.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();
@@ -22002,34 +21985,11 @@ var WeaveRegisterManager = class {
22002
21985
  }
22003
21986
  }
22004
21987
  }
22005
- resetNodesHandlers() {
22006
- for (const nodeHandlerId of Object.keys(this.nodesHandlers)) {
22007
- const nodeHandler = this.nodesHandlers[nodeHandlerId];
22008
- nodeHandler.initialize?.();
22009
- }
22010
- }
22011
- resetActionsHandlers() {
22012
- for (const actionHandlerId of Object.keys(this.actionsHandlers)) {
22013
- const actionHandler = this.actionsHandlers[actionHandlerId];
22014
- actionHandler.initialize?.();
22015
- }
22016
- }
22017
- resetPlugins() {
22018
- for (const pluginId of Object.keys(this.plugins)) {
22019
- const plugin = this.plugins[pluginId];
22020
- plugin.initialize?.();
22021
- }
22022
- }
22023
- reset() {
22024
- this.resetNodesHandlers();
22025
- this.resetActionsHandlers();
22026
- this.resetPlugins();
22027
- }
22028
21988
  };
22029
21989
 
22030
21990
  //#endregion
22031
21991
  //#region package.json
22032
- var version = "3.6.0-SNAPSHOT.112.1";
21992
+ var version = "3.6.0";
22033
21993
 
22034
21994
  //#endregion
22035
21995
  //#region src/managers/setup.ts
@@ -22146,11 +22106,6 @@ var WeaveStageManager = class {
22146
22106
  initialZIndex: void 0
22147
22107
  };
22148
22108
  const stage = new Konva.Stage({ ...props });
22149
- if (!this.instance.isServerSide()) {
22150
- const containerParent = stage.container().parentNode;
22151
- stage.width(containerParent.clientWidth);
22152
- stage.height(containerParent.clientHeight);
22153
- }
22154
22109
  const realContainer = stage.container();
22155
22110
  if (realContainer !== void 0 && realContainer.style?.position !== "relative") realContainer.style.position = "relative";
22156
22111
  this.setStage(stage);
@@ -22891,12 +22846,7 @@ var WeaveAsyncManager = class {
22891
22846
  this.instance.emitEvent("onAsyncElementChange");
22892
22847
  }, new Map());
22893
22848
  }
22894
- reset() {
22895
- this.asyncElements.clear();
22896
- this.asyncElementsLoadedEventEmitted = false;
22897
- }
22898
22849
  checkForAsyncElements(elements) {
22899
- this.instance.emitEvent("onAsyncElementsIdle");
22900
22850
  const amountAsyncResourcesExtracted = this.extractAsyncResources(elements);
22901
22851
  if (amountAsyncResourcesExtracted === 0 && !this.asyncElementsLoadedEventEmitted) {
22902
22852
  this.instance.emitEvent("onAsyncElementsLoaded");
@@ -22949,7 +22899,7 @@ var WeaveAsyncManager = class {
22949
22899
  status: WEAVE_ASYNC_STATUS.LOADING
22950
22900
  };
22951
22901
  this.asyncElements.set(nodeId, element);
22952
- if (!this.asyncElementsLoadedEventEmitted) this.instance.emitEvent("onAsyncElementsLoading", {
22902
+ this.instance.emitEvent("onAsyncElementsLoading", {
22953
22903
  loaded: this.getAmountAsyncElementsLoaded(),
22954
22904
  total: this.getAmountAsyncElements()
22955
22905
  });
@@ -22962,11 +22912,11 @@ var WeaveAsyncManager = class {
22962
22912
  status: WEAVE_ASYNC_STATUS.LOADED
22963
22913
  };
22964
22914
  this.asyncElements.set(nodeId, element);
22915
+ this.instance.emitEvent("onAsyncElementsLoading", {
22916
+ loaded: this.getAmountAsyncElementsLoaded(),
22917
+ total: this.getAmountAsyncElements()
22918
+ });
22965
22919
  if (!this.asyncElementsLoadedEventEmitted) {
22966
- this.instance.emitEvent("onAsyncElementsLoading", {
22967
- loaded: this.getAmountAsyncElementsLoaded(),
22968
- total: this.getAmountAsyncElements()
22969
- });
22970
22920
  const allLoaded = this.asyncElementsLoaded();
22971
22921
  if (allLoaded) {
22972
22922
  this.instance.emitEvent("onAsyncElementsLoaded");
@@ -23091,7 +23041,6 @@ var Weave = class {
23091
23041
  constructor(weaveConfig, stageConfig) {
23092
23042
  globalThis._weave_isServerSide = false;
23093
23043
  if (typeof window === "undefined") globalThis._weave_isServerSide = true;
23094
- this.eventsController = void 0;
23095
23044
  this.emitter = new Emittery();
23096
23045
  Konva.showWarnings = false;
23097
23046
  this.id = v4_default();
@@ -23137,7 +23086,6 @@ var Weave = class {
23137
23086
  this.initialized = true;
23138
23087
  this.status = WEAVE_INSTANCE_STATUS.RUNNING;
23139
23088
  this.emitEvent("onInstanceStatus", this.status);
23140
- this.emitEvent("onRender");
23141
23089
  });
23142
23090
  }
23143
23091
  setStatus(status) {
@@ -23162,7 +23110,6 @@ var Weave = class {
23162
23110
  async start() {
23163
23111
  this.moduleLogger.info("Start instance");
23164
23112
  if (!this.isServerSide()) {
23165
- this.eventsController = new AbortController();
23166
23113
  if (!window.weave) window.weave = this;
23167
23114
  }
23168
23115
  this.emitEvent("onRoomLoaded", false);
@@ -23186,39 +23133,8 @@ var Weave = class {
23186
23133
  store.setup();
23187
23134
  store.connect();
23188
23135
  }
23189
- async switchRoom() {
23190
- this.moduleLogger.info(`Switching room`);
23191
- const nodeHandlers = this.registerManager.getNodesHandlers();
23192
- for (const nodeHandlerKey of Object.keys(nodeHandlers)) {
23193
- const nodeHandler = nodeHandlers[nodeHandlerKey];
23194
- nodeHandler?.onDestroyInstance();
23195
- }
23196
- const stage = this.getStage();
23197
- if (stage) stage.destroy();
23198
- if (this.eventsController) this.eventsController.abort();
23199
- if (!this.isServerSide()) this.eventsController = new AbortController();
23200
- this.registerManager.reset();
23201
- this.asyncManager.reset();
23202
- this.moduleLogger.info("Switching room instance");
23203
- if (!this.isServerSide()) {
23204
- if (!window.weave) window.weave = this;
23205
- }
23206
- this.emitEvent("onRoomLoaded", false);
23207
- this.status = WEAVE_INSTANCE_STATUS.STARTING;
23208
- this.emitEvent("onInstanceStatus", this.status);
23209
- this.registerManager.reset();
23210
- this.status = WEAVE_INSTANCE_STATUS.LOADING_FONTS;
23211
- this.emitEvent("onInstanceStatus", this.status);
23212
- await this.fontsManager.loadFonts();
23213
- this.setupManager.setupLog();
23214
- this.stageManager.initStage();
23215
- this.status = WEAVE_INSTANCE_STATUS.CONNECTING_TO_ROOM;
23216
- this.emitEvent("onInstanceStatus", this.status);
23217
- this.addEventListener("onStoreConnectionStatusChange", this.handleStoreConnectionStatusChange.bind(this));
23218
- }
23219
23136
  destroy() {
23220
23137
  this.moduleLogger.info(`Destroying the instance`);
23221
- if (this.eventsController) this.eventsController.abort();
23222
23138
  this.emitter.clearListeners();
23223
23139
  this.status = WEAVE_INSTANCE_STATUS.IDLE;
23224
23140
  this.emitEvent("onInstanceStatus", this.status);
@@ -23859,9 +23775,6 @@ var Weave = class {
23859
23775
  getDragProperties() {
23860
23776
  return this.dragAndDropManager.getDragProperties();
23861
23777
  }
23862
- getEventsController() {
23863
- return this.eventsController;
23864
- }
23865
23778
  };
23866
23779
 
23867
23780
  //#endregion
@@ -23953,7 +23866,6 @@ const downscaleImageFromURL = (url, options) => {
23953
23866
  //#endregion
23954
23867
  //#region src/internal-utils/upscale.ts
23955
23868
  const setupUpscaleStage = (instance, stage) => {
23956
- if (instance.isServerSide()) return;
23957
23869
  const config = instance.getConfiguration();
23958
23870
  const doUpscale = config.performance?.upscale?.enabled ?? false;
23959
23871
  if (doUpscale) {
@@ -23985,14 +23897,7 @@ const setupUpscaleStage = (instance, stage) => {
23985
23897
  innerElement.style.transformOrigin = "0 0";
23986
23898
  innerElement.style.transform = `scale(${scaleToCover})`;
23987
23899
  }
23988
- } else {
23989
- const realContainer = stage.container();
23990
- const containerWidth = realContainer.offsetWidth;
23991
- const containerHeight = realContainer.offsetHeight;
23992
- stage.width(containerWidth);
23993
- stage.height(containerHeight);
23994
- stage.setAttrs({ upscaleScale: 1 });
23995
- }
23900
+ } else stage.setAttrs({ upscaleScale: 1 });
23996
23901
  };
23997
23902
 
23998
23903
  //#endregion
@@ -24003,7 +23908,6 @@ var WeaveStageNode = class extends WeaveNode {
24003
23908
  wheelMousePressed = false;
24004
23909
  isCmdCtrlPressed = false;
24005
23910
  globalEventsInitialized = false;
24006
- initialize = void 0;
24007
23911
  onRender(props) {
24008
23912
  const stage = new Konva.Stage({
24009
23913
  ...props,
@@ -24022,10 +23926,10 @@ var WeaveStageNode = class extends WeaveNode {
24022
23926
  container.setAttribute("tabindex", "0");
24023
23927
  stage.container().addEventListener("focus", () => {
24024
23928
  this.stageFocused = true;
24025
- }, { signal: this.instance.getEventsController()?.signal });
23929
+ });
24026
23930
  stage.container().addEventListener("blur", () => {
24027
23931
  this.stageFocused = false;
24028
- }, { signal: this.instance.getEventsController()?.signal });
23932
+ });
24029
23933
  }
24030
23934
  Konva.Stage.prototype.mode = function(mode) {
24031
23935
  if (typeof mode !== "undefined") this._mode = mode;
@@ -24095,7 +23999,7 @@ var WeaveStageNode = class extends WeaveNode {
24095
23999
  const selectedNode = transformer.nodes()[0];
24096
24000
  selectedNode.fire("onCmdCtrlPressed");
24097
24001
  }
24098
- }, { signal: this.instance.getEventsController()?.signal });
24002
+ });
24099
24003
  window.addEventListener("keyup", (e) => {
24100
24004
  if (!(e.ctrlKey || e.metaKey)) {
24101
24005
  this.isCmdCtrlPressed = false;
@@ -24106,7 +24010,7 @@ var WeaveStageNode = class extends WeaveNode {
24106
24010
  const selectedNode = transformer.nodes()[0];
24107
24011
  selectedNode.fire("onCmdCtrlReleased");
24108
24012
  }
24109
- }, { signal: this.instance.getEventsController()?.signal });
24013
+ });
24110
24014
  this.globalEventsInitialized = true;
24111
24015
  }
24112
24016
  isOnlyCtrlOrMeta(event) {
@@ -24126,7 +24030,6 @@ const WEAVE_LAYER_NODE_TYPE = "layer";
24126
24030
  //#region src/nodes/layer/layer.ts
24127
24031
  var WeaveLayerNode = class extends WeaveNode {
24128
24032
  nodeType = WEAVE_LAYER_NODE_TYPE;
24129
- initialize = void 0;
24130
24033
  onRender(props) {
24131
24034
  const layer = new Konva.Layer({ ...props });
24132
24035
  layer.canMoveToContainer = function() {
@@ -24174,7 +24077,6 @@ const WEAVE_GROUP_NODE_TYPE = "group";
24174
24077
  //#region src/nodes/group/group.ts
24175
24078
  var WeaveGroupNode = class extends WeaveNode {
24176
24079
  nodeType = WEAVE_GROUP_NODE_TYPE;
24177
- initialize = void 0;
24178
24080
  constructor(params) {
24179
24081
  super();
24180
24082
  const { config } = params ?? {};
@@ -24267,7 +24169,6 @@ const WEAVE_RECTANGLE_NODE_TYPE = "rectangle";
24267
24169
  //#region src/nodes/rectangle/rectangle.ts
24268
24170
  var WeaveRectangleNode = class extends WeaveNode {
24269
24171
  nodeType = WEAVE_RECTANGLE_NODE_TYPE;
24270
- initialize = void 0;
24271
24172
  constructor(params) {
24272
24173
  super();
24273
24174
  const { config } = params ?? {};
@@ -24311,7 +24212,6 @@ const WEAVE_ELLIPSE_NODE_TYPE = "ellipse";
24311
24212
  //#region src/nodes/ellipse/ellipse.ts
24312
24213
  var WeaveEllipseNode = class extends WeaveNode {
24313
24214
  nodeType = WEAVE_ELLIPSE_NODE_TYPE;
24314
- initialize = void 0;
24315
24215
  constructor(params) {
24316
24216
  super();
24317
24217
  const { config } = params ?? {};
@@ -24457,16 +24357,13 @@ var WeaveLineNode = class extends WeaveNode {
24457
24357
  constructor(params) {
24458
24358
  super();
24459
24359
  this.config = mergeExceptArrays(WEAVE_LINE_NODE_DEFAULT_CONFIG, params?.config ?? {});
24360
+ this.handleNodeChanges = null;
24361
+ this.handleZoomChanges = null;
24460
24362
  this.snapper = new GreedySnapper({
24461
24363
  snapAngles: this.config.snapAngles.angles,
24462
24364
  activateThreshold: this.config.snapAngles.activateThreshold,
24463
24365
  releaseThreshold: this.config.snapAngles.releaseThreshold
24464
24366
  });
24465
- this.initialize();
24466
- }
24467
- initialize() {
24468
- this.handleNodeChanges = null;
24469
- this.handleZoomChanges = null;
24470
24367
  }
24471
24368
  onRender(props) {
24472
24369
  const line = new Konva.Line({
@@ -24771,19 +24668,17 @@ const TEXT_LAYOUT = {
24771
24668
  //#region src/nodes/text/text.ts
24772
24669
  var WeaveTextNode = class extends WeaveNode {
24773
24670
  nodeType = WEAVE_TEXT_NODE_TYPE;
24671
+ editing = false;
24672
+ textAreaSuperContainer = null;
24673
+ textAreaContainer = null;
24674
+ textArea = null;
24675
+ eventsInitialized = false;
24676
+ isCtrlMetaPressed = false;
24774
24677
  constructor(params) {
24775
24678
  super();
24776
24679
  const { config } = params ?? {};
24777
24680
  this.config = (0, import_lodash.merge)({}, WEAVE_TEXT_NODE_DEFAULT_CONFIG, config);
24778
- this.initialize();
24779
- }
24780
- initialize() {
24781
24681
  this.keyPressHandler = void 0;
24782
- this.eventsInitialized = false;
24783
- this.isCtrlMetaPressed = false;
24784
- this.textAreaSuperContainer = null;
24785
- this.textAreaContainer = null;
24786
- this.textArea = null;
24787
24682
  this.editing = false;
24788
24683
  this.textArea = null;
24789
24684
  }
@@ -24791,10 +24686,10 @@ var WeaveTextNode = class extends WeaveNode {
24791
24686
  if (!this.eventsInitialized && !globalThis._weave_isServerSide) {
24792
24687
  window.addEventListener("keydown", (e) => {
24793
24688
  if (e.ctrlKey || e.metaKey) this.isCtrlMetaPressed = true;
24794
- }, { signal: this.instance.getEventsController()?.signal });
24689
+ });
24795
24690
  window.addEventListener("keyup", (e) => {
24796
24691
  if (!(e.ctrlKey || e.metaKey)) this.isCtrlMetaPressed = false;
24797
- }, { signal: this.instance.getEventsController()?.signal });
24692
+ });
24798
24693
  this.eventsInitialized = true;
24799
24694
  }
24800
24695
  }
@@ -24822,7 +24717,7 @@ var WeaveTextNode = class extends WeaveNode {
24822
24717
  onAdd() {
24823
24718
  if (!this.instance.isServerSide() && !this.keyPressHandler) {
24824
24719
  this.keyPressHandler = this.handleKeyPress.bind(this);
24825
- window.addEventListener("keypress", this.keyPressHandler, { signal: this.instance.getEventsController()?.signal });
24720
+ window.addEventListener("keypress", this.keyPressHandler);
24826
24721
  }
24827
24722
  }
24828
24723
  onRender(props) {
@@ -24976,7 +24871,7 @@ var WeaveTextNode = class extends WeaveNode {
24976
24871
  });
24977
24872
  if (!this.instance.isServerSide() && !this.keyPressHandler) {
24978
24873
  this.keyPressHandler = this.handleKeyPress.bind(this);
24979
- window.addEventListener("keypress", this.keyPressHandler, { signal: this.instance.getEventsController()?.signal });
24874
+ window.addEventListener("keypress", this.keyPressHandler);
24980
24875
  }
24981
24876
  return text;
24982
24877
  }
@@ -25235,17 +25130,17 @@ var WeaveTextNode = class extends WeaveNode {
25235
25130
  this.textAreaSuperContainer.scrollTop = 0;
25236
25131
  this.textAreaSuperContainer.scrollLeft = 0;
25237
25132
  }
25238
- }, { signal: this.instance.getEventsController()?.signal });
25133
+ });
25239
25134
  this.textAreaContainer.addEventListener("scroll", () => {
25240
25135
  if (!this.textAreaContainer) return;
25241
25136
  this.textAreaContainer.scrollTop = 0;
25242
25137
  this.textAreaContainer.scrollLeft = 0;
25243
- }, { signal: this.instance.getEventsController()?.signal });
25138
+ });
25244
25139
  this.textArea.addEventListener("scroll", () => {
25245
25140
  if (!this.textArea) return;
25246
25141
  this.textArea.scrollTop = 0;
25247
25142
  this.textArea.scrollLeft = 0;
25248
- }, { signal: this.instance.getEventsController()?.signal });
25143
+ });
25249
25144
  const rotation = textNode.getAbsoluteRotation();
25250
25145
  if (rotation) {
25251
25146
  const transform = "rotate(" + rotation + "deg)";
@@ -25294,8 +25189,8 @@ var WeaveTextNode = class extends WeaveNode {
25294
25189
  this.textAreaDomResize(textNode);
25295
25190
  }
25296
25191
  };
25297
- this.textArea.addEventListener("keydown", handleKeyDown, { signal: this.instance.getEventsController()?.signal });
25298
- this.textArea.addEventListener("keyup", handleKeyUp, { signal: this.instance.getEventsController()?.signal });
25192
+ this.textArea.addEventListener("keydown", handleKeyDown);
25193
+ this.textArea.addEventListener("keyup", handleKeyUp);
25299
25194
  this.textArea.tabIndex = 1;
25300
25195
  this.textArea.focus();
25301
25196
  const handleOutsideClick = (e) => {
@@ -25321,7 +25216,7 @@ var WeaveTextNode = class extends WeaveNode {
25321
25216
  }
25322
25217
  };
25323
25218
  setTimeout(() => {
25324
- window.addEventListener("pointerup", handleOutsideClick, { signal: this.instance.getEventsController()?.signal });
25219
+ window.addEventListener("pointerup", handleOutsideClick);
25325
25220
  }, 0);
25326
25221
  this.instance.getStage().mode(WEAVE_STAGE_TEXT_EDITION_MODE);
25327
25222
  this.editing = true;
@@ -25657,7 +25552,7 @@ var WeaveImageCrop = class WeaveImageCrop {
25657
25552
  utilityLayer?.add(this.transformer);
25658
25553
  this.transformer?.forceUpdate();
25659
25554
  this.cropGroup.show();
25660
- window.addEventListener("keydown", this.handleHide, { signal: this.instance.getEventsController()?.signal });
25555
+ window.addEventListener("keydown", this.handleHide);
25661
25556
  if (options.cmdCtrl.triggered) {
25662
25557
  utilityLayer?.hide();
25663
25558
  const stage = this.instance.getStage();
@@ -26107,21 +26002,24 @@ const isAllowedUrl = (value) => {
26107
26002
  //#endregion
26108
26003
  //#region src/nodes/image/image.ts
26109
26004
  var WeaveImageNode = class extends WeaveNode {
26005
+ imageBitmapCache = {};
26006
+ imageSource = {};
26007
+ imageFallback = {};
26008
+ imageState = {};
26009
+ imageTryoutAttempts = {};
26010
+ imageTryoutIds = {};
26110
26011
  nodeType = WEAVE_IMAGE_NODE_TYPE;
26111
26012
  cursorsFallback = { loading: "wait" };
26112
26013
  cursors = {};
26113
26014
  constructor(params) {
26114
26015
  super();
26115
26016
  const { config } = params ?? {};
26116
- this.config = mergeExceptArrays(WEAVE_IMAGE_DEFAULT_CONFIG, config);
26117
- this.initialize();
26118
- }
26119
- initialize() {
26120
26017
  this.tapStart = {
26121
26018
  x: 0,
26122
26019
  y: 0,
26123
26020
  time: 0
26124
26021
  };
26022
+ this.config = mergeExceptArrays(WEAVE_IMAGE_DEFAULT_CONFIG, config);
26125
26023
  this.imageCrop = null;
26126
26024
  this.imageBitmapCache = {};
26127
26025
  this.imageSource = {};
@@ -26345,7 +26243,7 @@ var WeaveImageNode = class extends WeaveNode {
26345
26243
  };
26346
26244
  this.updateImageCrop(image);
26347
26245
  } else {
26348
- this.updatePlaceholderSize(image);
26246
+ this.updatePlaceholderSize(image, imagePlaceholder);
26349
26247
  this.loadImage(imageProps, image, true);
26350
26248
  }
26351
26249
  if (this.config.performance.cache.enabled) image.on("transformend", () => {
@@ -26728,7 +26626,7 @@ var WeaveImageNode = class extends WeaveNode {
26728
26626
  }
26729
26627
  this.loadAsyncElement(id);
26730
26628
  preloadFunction(id, realImageURL ?? "", {
26731
- onLoad: async () => {
26629
+ onLoad: () => {
26732
26630
  if (useFallback) this.imageTryoutIds[id] = setTimeout(() => {
26733
26631
  const node = this.instance.getStage().findOne(`#${id}`);
26734
26632
  if (node) {
@@ -26779,7 +26677,7 @@ var WeaveImageNode = class extends WeaveNode {
26779
26677
  error: false
26780
26678
  };
26781
26679
  this.updateImageCrop(image);
26782
- if (!useFallback) this.resolveAsyncElement(id);
26680
+ this.resolveAsyncElement(id);
26783
26681
  this.cacheNode(image);
26784
26682
  }
26785
26683
  },
@@ -26820,9 +26718,13 @@ var WeaveImageNode = class extends WeaveNode {
26820
26718
  }
26821
26719
  }, loadTryout);
26822
26720
  }
26823
- updatePlaceholderSize(image) {
26721
+ updatePlaceholderSize(image, imagePlaceholder) {
26824
26722
  const imageAttrs = image.getAttrs();
26825
26723
  if (!this.imageState[imageAttrs.id ?? ""]?.loaded) return;
26724
+ if (!imageAttrs.adding && !imageAttrs.cropInfo) {
26725
+ imagePlaceholder.width(imageAttrs.uncroppedImage.width);
26726
+ imagePlaceholder.height(imageAttrs.uncroppedImage.height);
26727
+ }
26826
26728
  }
26827
26729
  updateImageCrop(image) {
26828
26730
  const imageAttrs = image.getAttrs();
@@ -26956,7 +26858,6 @@ const WEAVE_STAR_NODE_TYPE = "star";
26956
26858
  //#region src/nodes/star/star.ts
26957
26859
  var WeaveStarNode = class extends WeaveNode {
26958
26860
  nodeType = WEAVE_STAR_NODE_TYPE;
26959
- initialize = void 0;
26960
26861
  constructor(params) {
26961
26862
  super();
26962
26863
  const { config } = params ?? {};
@@ -27042,7 +26943,6 @@ const WEAVE_ARROW_NODE_TYPE = "arrow";
27042
26943
  //#region src/nodes/arrow/arrow.ts
27043
26944
  var WeaveArrowNode = class extends WeaveNode {
27044
26945
  nodeType = WEAVE_ARROW_NODE_TYPE;
27045
- initialize = void 0;
27046
26946
  constructor(params) {
27047
26947
  super();
27048
26948
  const { config } = params ?? {};
@@ -27099,7 +26999,6 @@ const WEAVE_REGULAR_POLYGON_NODE_TYPE = "regular-polygon";
27099
26999
  //#region src/nodes/regular-polygon/regular-polygon.ts
27100
27000
  var WeaveRegularPolygonNode = class extends WeaveNode {
27101
27001
  nodeType = WEAVE_REGULAR_POLYGON_NODE_TYPE;
27102
- initialize = void 0;
27103
27002
  constructor(params) {
27104
27003
  super();
27105
27004
  const { config } = params ?? {};
@@ -27213,7 +27112,6 @@ var GroupFrame = class extends Konva.Group {
27213
27112
  //#region src/nodes/frame/frame.ts
27214
27113
  var WeaveFrameNode = class extends WeaveNode {
27215
27114
  nodeType = WEAVE_FRAME_NODE_TYPE;
27216
- initialize = void 0;
27217
27115
  constructor(params) {
27218
27116
  super();
27219
27117
  const { config } = params ?? {};
@@ -27514,7 +27412,6 @@ const WEAVE_STROKE_NODE_DEFAULT_CONFIG = {
27514
27412
  //#region src/nodes/stroke/stroke.ts
27515
27413
  var WeaveStrokeNode = class extends WeaveNode {
27516
27414
  nodeType = WEAVE_STROKE_NODE_TYPE;
27517
- initialize = void 0;
27518
27415
  constructor(params) {
27519
27416
  super();
27520
27417
  const { config } = params ?? {};
@@ -28091,6 +27988,8 @@ var WeaveSquareLineTipManager = class extends WeaveBaseLineTipManager {
28091
27988
  //#endregion
28092
27989
  //#region src/nodes/stroke-single/stroke-single.ts
28093
27990
  var WeaveStrokeSingleNode = class extends WeaveNode {
27991
+ startHandle = null;
27992
+ endHandle = null;
28094
27993
  nodeType = WEAVE_STROKE_SINGLE_NODE_TYPE;
28095
27994
  tipManagers = {
28096
27995
  [WEAVE_STROKE_SINGLE_NODE_TIP_TYPE.ARROW]: new WeaveArrowLineTipManager(),
@@ -28101,29 +28000,24 @@ var WeaveStrokeSingleNode = class extends WeaveNode {
28101
28000
  constructor(params) {
28102
28001
  super();
28103
28002
  this.config = mergeExceptArrays(WEAVE_STROKE_SINGLE_NODE_DEFAULT_CONFIG, params?.config ?? {});
28003
+ this.handleNodeChanges = null;
28004
+ this.handleZoomChanges = null;
28005
+ this.shiftPressed = false;
28104
28006
  this.snapper = new GreedySnapper({
28105
28007
  snapAngles: this.config.snapAngles.angles,
28106
28008
  activateThreshold: this.config.snapAngles.activateThreshold,
28107
28009
  releaseThreshold: this.config.snapAngles.releaseThreshold
28108
28010
  });
28109
- this.initialize();
28110
- }
28111
- initialize() {
28112
28011
  this.eventsInitialized = false;
28113
- this.startHandle = null;
28114
- this.endHandle = null;
28115
- this.handleNodeChanges = null;
28116
- this.handleZoomChanges = null;
28117
- this.shiftPressed = false;
28118
28012
  }
28119
28013
  initEvents() {
28120
28014
  if (this.eventsInitialized) return;
28121
28015
  window.addEventListener("keydown", (e) => {
28122
28016
  if (e.key === "Shift") this.shiftPressed = true;
28123
- }, { signal: this.instance.getEventsController()?.signal });
28017
+ });
28124
28018
  window.addEventListener("keyup", (e) => {
28125
28019
  if (e.key === "Shift") this.shiftPressed = false;
28126
- }, { signal: this.instance.getEventsController()?.signal });
28020
+ });
28127
28021
  this.eventsInitialized = true;
28128
28022
  }
28129
28023
  onRender(props) {
@@ -28610,9 +28504,6 @@ var WeaveCommentNode = class extends WeaveNode {
28610
28504
  constructor(params) {
28611
28505
  super();
28612
28506
  this.config = mergeExceptArrays(WEAVE_COMMENT_NODE_DEFAULTS, params.config);
28613
- this.initialize();
28614
- }
28615
- initialize() {
28616
28507
  this.commentDomVisibleId = null;
28617
28508
  this.commentDomVisible = false;
28618
28509
  this.commentDomAction = null;
@@ -29241,6 +29132,10 @@ const WEAVE_VIDEO_DEFAULT_CONFIG = {
29241
29132
  //#endregion
29242
29133
  //#region src/nodes/video/video.ts
29243
29134
  var WeaveVideoNode = class extends WeaveNode {
29135
+ videoState = {};
29136
+ videoSourceFrameId = {};
29137
+ videoSource = {};
29138
+ videoPlaceholder = {};
29244
29139
  nodeType = WEAVE_VIDEO_NODE_TYPE;
29245
29140
  constructor(params) {
29246
29141
  super();
@@ -29253,13 +29148,6 @@ var WeaveVideoNode = class extends WeaveNode {
29253
29148
  this.videoIconImage.src = this.config.style.icon.dataURL;
29254
29149
  }
29255
29150
  }
29256
- initialize() {
29257
- this.videoState = {};
29258
- this.videoSource = {};
29259
- this.videoSourceFrameId = {};
29260
- this.videoPlaceholder = {};
29261
- this.videoIconImage = void 0;
29262
- }
29263
29151
  async loadPlaceholder(params, video) {
29264
29152
  const videoProps = params;
29265
29153
  const { id } = videoProps;
@@ -29754,7 +29642,6 @@ const WEAVE_MEASURE_NODE_DEFAULT_CONFIG = { style: {
29754
29642
  var WeaveMeasureNode = class extends WeaveNode {
29755
29643
  nodeType = WEAVE_MEASURE_NODE_TYPE;
29756
29644
  handlePointCircleRadius = 6;
29757
- initialize = void 0;
29758
29645
  constructor(params) {
29759
29646
  super();
29760
29647
  this.config = mergeExceptArrays(WEAVE_MEASURE_NODE_DEFAULT_CONFIG, params?.config ?? {});
@@ -31045,7 +30932,6 @@ var WeaveConnectorNode = class extends WeaveNode {
31045
30932
  [WEAVE_CONNECTOR_NODE_DECORATOR_TYPE.DOT]: setupNodeDecoratorDot,
31046
30933
  [WEAVE_CONNECTOR_NODE_DECORATOR_TYPE.ARROW]: setupNodeDecoratorArrow
31047
30934
  };
31048
- initialize = void 0;
31049
30935
  constructor(params) {
31050
30936
  super();
31051
30937
  this.config = mergeExceptArrays(WEAVE_CONNECTOR_NODE_DEFAULT_CONFIG, params?.config);
@@ -31796,6 +31682,10 @@ const WEAVE_STAGE_ZOOM_DEFAULT_CONFIG = {
31796
31682
  var WeaveStageZoomPlugin = class extends WeavePlugin {
31797
31683
  getLayerName = void 0;
31798
31684
  initLayer = void 0;
31685
+ pinching = false;
31686
+ zooming = false;
31687
+ isTrackpad = false;
31688
+ zoomVelocity = 0;
31799
31689
  zoomInertiaType = WEAVE_STAGE_ZOOM_TYPE.MOUSE_WHEEL;
31800
31690
  defaultStep = 3;
31801
31691
  constructor(params) {
@@ -31803,13 +31693,8 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
31803
31693
  const { config } = params ?? {};
31804
31694
  this.config = mergeExceptArrays(WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, config);
31805
31695
  if (!this.config.zoomSteps.includes(this.config.defaultZoom)) throw new Error(`Default zoom ${this.config.defaultZoom} is not in zoom steps`);
31806
- this.initialize();
31807
- }
31808
- initialize() {
31809
31696
  this.pinching = false;
31810
- this.zooming = false;
31811
31697
  this.isTrackpad = false;
31812
- this.zoomVelocity = 0;
31813
31698
  this.isCtrlOrMetaPressed = false;
31814
31699
  this.updatedMinimumZoom = false;
31815
31700
  this.actualStep = this.config.zoomSteps.findIndex((step) => step === this.config.defaultZoom);
@@ -32096,15 +31981,6 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32096
31981
  if (box.width === 0 || box.height === 0) return;
32097
31982
  this.fitToElements(box, finalOptions);
32098
31983
  }
32099
- fitToArea(area, options) {
32100
- const finalOptions = mergeExceptArrays({
32101
- smartZoom: false,
32102
- overrideZoom: true
32103
- }, options);
32104
- if (!this.enabled) return;
32105
- if (area.width === 0 || area.height === 0) return;
32106
- this.fitToElements(area, finalOptions);
32107
- }
32108
31984
  enable() {
32109
31985
  this.enabled = true;
32110
31986
  }
@@ -32123,10 +31999,10 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32123
31999
  initEvents() {
32124
32000
  window.addEventListener("keydown", (e) => {
32125
32001
  if (e.ctrlKey || e.metaKey) this.isCtrlOrMetaPressed = true;
32126
- }, { signal: this.instance.getEventsController()?.signal });
32002
+ });
32127
32003
  window.addEventListener("keyup", (e) => {
32128
32004
  if (!(e.ctrlKey || e.metaKey)) this.isCtrlOrMetaPressed = false;
32129
- }, { signal: this.instance.getEventsController()?.signal });
32005
+ });
32130
32006
  const stage = this.instance.getStage();
32131
32007
  let lastCenter = null;
32132
32008
  let lastDist = 0;
@@ -32151,10 +32027,7 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32151
32027
  return;
32152
32028
  }
32153
32029
  }
32154
- }, {
32155
- passive: false,
32156
- signal: this.instance.getEventsController()?.signal
32157
- });
32030
+ }, { passive: false });
32158
32031
  stage.getContent().addEventListener("touchmove", (e) => {
32159
32032
  e.preventDefault();
32160
32033
  if (e.touches.length === 2) {
@@ -32194,18 +32067,12 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32194
32067
  lastDist = dist;
32195
32068
  lastCenter = newCenter;
32196
32069
  }
32197
- }, {
32198
- passive: false,
32199
- signal: this.instance.getEventsController()?.signal
32200
- });
32070
+ }, { passive: false });
32201
32071
  stage.getContent().addEventListener("touchend", () => {
32202
32072
  this.pinching = false;
32203
32073
  lastDist = 0;
32204
32074
  lastCenter = null;
32205
- }, {
32206
- passive: false,
32207
- signal: this.instance.getEventsController()?.signal
32208
- });
32075
+ }, { passive: false });
32209
32076
  let doZoom = false;
32210
32077
  const handleWheelImmediate = (e) => {
32211
32078
  const performZoom = this.isCtrlOrMetaPressed || !this.isCtrlOrMetaPressed && e.ctrlKey && e.deltaMode === 0;
@@ -32223,10 +32090,7 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32223
32090
  e.preventDefault();
32224
32091
  doZoom = true;
32225
32092
  };
32226
- window.addEventListener("wheel", handleWheelImmediate, {
32227
- signal: this.instance.getEventsController()?.signal,
32228
- passive: false
32229
- });
32093
+ window.addEventListener("wheel", handleWheelImmediate, { passive: false });
32230
32094
  const handleWheel = (e) => {
32231
32095
  if (!doZoom) return;
32232
32096
  const delta = e.deltaY > 0 ? 1 : -1;
@@ -32239,10 +32103,7 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
32239
32103
  }
32240
32104
  };
32241
32105
  const throttledHandleWheel = (0, import_lodash.throttle)(handleWheel, DEFAULT_THROTTLE_MS);
32242
- window.addEventListener("wheel", throttledHandleWheel, {
32243
- signal: this.instance.getEventsController()?.signal,
32244
- passive: true
32245
- });
32106
+ window.addEventListener("wheel", throttledHandleWheel, { passive: true });
32246
32107
  }
32247
32108
  getInertiaScale() {
32248
32109
  const stage = this.instance.getStage();
@@ -32300,7 +32161,6 @@ const ZOOM_OUT_TOOL_ACTION_NAME = "zoomOutTool";
32300
32161
  //#region src/actions/zoom-out-tool/zoom-out-tool.ts
32301
32162
  var WeaveZoomOutToolAction = class extends WeaveAction {
32302
32163
  onPropsChange = void 0;
32303
- initialize = void 0;
32304
32164
  getName() {
32305
32165
  return ZOOM_OUT_TOOL_ACTION_NAME;
32306
32166
  }
@@ -32335,10 +32195,6 @@ const ZOOM_IN_TOOL_ACTION_NAME = "zoomInTool";
32335
32195
  //#region src/actions/zoom-in-tool/zoom-in-tool.ts
32336
32196
  var WeaveZoomInToolAction = class extends WeaveAction {
32337
32197
  onPropsChange = void 0;
32338
- initialize = void 0;
32339
- constructor() {
32340
- super();
32341
- }
32342
32198
  getName() {
32343
32199
  return ZOOM_IN_TOOL_ACTION_NAME;
32344
32200
  }
@@ -32373,10 +32229,6 @@ const FIT_TO_SCREEN_TOOL_ACTION_NAME = "fitToScreenTool";
32373
32229
  //#region src/actions/fit-to-screen-tool/fit-to-screen-tool.ts
32374
32230
  var WeaveFitToScreenToolAction = class extends WeaveAction {
32375
32231
  onPropsChange = void 0;
32376
- initialize = void 0;
32377
- constructor() {
32378
- super();
32379
- }
32380
32232
  getName() {
32381
32233
  return FIT_TO_SCREEN_TOOL_ACTION_NAME;
32382
32234
  }
@@ -32410,10 +32262,6 @@ const FIT_TO_SELECTION_TOOL_ACTION_NAME = "fitToSelectionTool";
32410
32262
  //#region src/actions/fit-to-selection-tool/fit-to-selection-tool.ts
32411
32263
  var WeaveFitToSelectionToolAction = class extends WeaveAction {
32412
32264
  onPropsChange = void 0;
32413
- initialize = void 0;
32414
- constructor() {
32415
- super();
32416
- }
32417
32265
  getName() {
32418
32266
  return FIT_TO_SELECTION_TOOL_ACTION_NAME;
32419
32267
  }
@@ -32456,9 +32304,6 @@ var WeaveMoveToolAction = class extends WeaveAction {
32456
32304
  onInit = void 0;
32457
32305
  constructor() {
32458
32306
  super();
32459
- this.initialize();
32460
- }
32461
- initialize() {
32462
32307
  this.initialized = false;
32463
32308
  this.state = MOVE_TOOL_STATE.IDLE;
32464
32309
  }
@@ -32472,7 +32317,7 @@ var WeaveMoveToolAction = class extends WeaveAction {
32472
32317
  this.cancelAction();
32473
32318
  return;
32474
32319
  }
32475
- }, { signal: this.instance.getEventsController()?.signal });
32320
+ });
32476
32321
  stage.on("pointerdown", () => {
32477
32322
  if ([MOVE_TOOL_ACTION_NAME].includes(this.instance.getActiveAction() ?? "")) stage.container().style.cursor = "grabbing";
32478
32323
  });
@@ -32531,9 +32376,6 @@ var WeaveSelectionToolAction = class extends WeaveAction {
32531
32376
  onInit = void 0;
32532
32377
  constructor() {
32533
32378
  super();
32534
- this.initialize();
32535
- }
32536
- initialize() {
32537
32379
  this.initialized = false;
32538
32380
  this.state = SELECTION_TOOL_STATE.IDLE;
32539
32381
  }
@@ -32597,9 +32439,6 @@ var WeaveEraserToolAction = class extends WeaveAction {
32597
32439
  onInit = void 0;
32598
32440
  constructor() {
32599
32441
  super();
32600
- this.initialize();
32601
- }
32602
- initialize() {
32603
32442
  this.initialized = false;
32604
32443
  this.erasing = false;
32605
32444
  this.state = ERASER_TOOL_STATE.IDLE;
@@ -32633,7 +32472,7 @@ var WeaveEraserToolAction = class extends WeaveAction {
32633
32472
  this.cancelAction();
32634
32473
  return;
32635
32474
  }
32636
- }, { signal: this.instance.getEventsController()?.signal });
32475
+ });
32637
32476
  this.initialized = true;
32638
32477
  }
32639
32478
  setState(state) {
@@ -32700,9 +32539,6 @@ var WeaveRectangleToolAction = class extends WeaveAction {
32700
32539
  onInit = void 0;
32701
32540
  constructor() {
32702
32541
  super();
32703
- this.initialize();
32704
- }
32705
- initialize() {
32706
32542
  this.pointers = new Map();
32707
32543
  this.initialized = false;
32708
32544
  this.state = RECTANGLE_TOOL_STATE.IDLE;
@@ -32738,7 +32574,7 @@ var WeaveRectangleToolAction = class extends WeaveAction {
32738
32574
  this.cancelAction();
32739
32575
  return;
32740
32576
  }
32741
- }, { signal: this.instance.getEventsController()?.signal });
32577
+ });
32742
32578
  stage.on("pointermove", () => {
32743
32579
  if (this.state === RECTANGLE_TOOL_STATE.IDLE) return;
32744
32580
  this.setCursor();
@@ -32912,9 +32748,6 @@ var WeaveEllipseToolAction = class extends WeaveAction {
32912
32748
  onInit = void 0;
32913
32749
  constructor() {
32914
32750
  super();
32915
- this.initialize();
32916
- }
32917
- initialize() {
32918
32751
  this.pointers = new Map();
32919
32752
  this.initialized = false;
32920
32753
  this.state = ELLIPSE_TOOL_STATE.IDLE;
@@ -32950,7 +32783,7 @@ var WeaveEllipseToolAction = class extends WeaveAction {
32950
32783
  this.cancelAction();
32951
32784
  return;
32952
32785
  }
32953
- }, { signal: this.instance.getEventsController()?.signal });
32786
+ });
32954
32787
  stage.on("pointerdown", (e) => {
32955
32788
  this.setTapStart(e);
32956
32789
  this.pointers.set(e.evt.pointerId, {
@@ -33131,9 +32964,6 @@ var WeavePenToolAction = class extends WeaveAction {
33131
32964
  onInit = void 0;
33132
32965
  constructor() {
33133
32966
  super();
33134
- this.initialize();
33135
- }
33136
- initialize() {
33137
32967
  this.pointers = new Map();
33138
32968
  this.initialized = false;
33139
32969
  this.state = PEN_TOOL_STATE.IDLE;
@@ -33169,7 +32999,7 @@ var WeavePenToolAction = class extends WeaveAction {
33169
32999
  this.cancelAction();
33170
33000
  return;
33171
33001
  }
33172
- }, { signal: this.instance.getEventsController()?.signal });
33002
+ });
33173
33003
  stage.on("pointerdown", (e) => {
33174
33004
  this.setTapStart(e);
33175
33005
  this.pointers.set(e.evt.pointerId, {
@@ -33406,9 +33236,6 @@ var WeaveLineToolAction = class extends WeaveAction {
33406
33236
  constructor(params) {
33407
33237
  super();
33408
33238
  this.config = mergeExceptArrays(LINE_TOOL_DEFAULT_CONFIG, params?.config ?? {});
33409
- this.initialize();
33410
- }
33411
- initialize() {
33412
33239
  this.pointers = new Map();
33413
33240
  this.initialized = false;
33414
33241
  this.state = LINE_TOOL_STATE.IDLE;
@@ -33453,13 +33280,13 @@ var WeaveLineToolAction = class extends WeaveAction {
33453
33280
  this.snappedAngle = null;
33454
33281
  this.shiftPressed = true;
33455
33282
  }
33456
- }, { signal: this.instance.getEventsController()?.signal });
33283
+ });
33457
33284
  window.addEventListener("keyup", (e) => {
33458
33285
  if (e.key === "Shift" && this.instance.getActiveAction() === LINE_TOOL_ACTION_NAME) {
33459
33286
  this.snappedAngle = null;
33460
33287
  this.shiftPressed = false;
33461
33288
  }
33462
- }, { signal: this.instance.getEventsController()?.signal });
33289
+ });
33463
33290
  stage.on("pointerdown", (e) => {
33464
33291
  this.setTapStart(e);
33465
33292
  this.pointers.set(e.evt.pointerId, {
@@ -33674,9 +33501,6 @@ var WeaveBrushToolAction = class extends WeaveAction {
33674
33501
  constructor(params) {
33675
33502
  super();
33676
33503
  this.config = mergeExceptArrays(BRUSH_TOOL_DEFAULT_CONFIG, params?.config ?? {});
33677
- this.initialize();
33678
- }
33679
- initialize() {
33680
33504
  this.initialized = false;
33681
33505
  this.state = BRUSH_TOOL_STATE.INACTIVE;
33682
33506
  this.strokeId = null;
@@ -33705,7 +33529,7 @@ var WeaveBrushToolAction = class extends WeaveAction {
33705
33529
  const stage = this.instance.getStage();
33706
33530
  window.addEventListener("keyup", (e) => {
33707
33531
  if (e.code === "Space" && this.instance.getActiveAction() === BRUSH_TOOL_ACTION_NAME) this.isSpacePressed = false;
33708
- }, { signal: this.instance.getEventsController()?.signal });
33532
+ });
33709
33533
  window.addEventListener("keydown", (e) => {
33710
33534
  if (e.code === "Enter" && this.instance.getActiveAction() === BRUSH_TOOL_ACTION_NAME) {
33711
33535
  e.stopPropagation();
@@ -33721,7 +33545,7 @@ var WeaveBrushToolAction = class extends WeaveAction {
33721
33545
  e.stopPropagation();
33722
33546
  this.cancelAction();
33723
33547
  }
33724
- }, { signal: this.instance.getEventsController()?.signal });
33548
+ });
33725
33549
  const handlePointerDown = (e) => {
33726
33550
  if (this.state === BRUSH_TOOL_STATE.INACTIVE) return;
33727
33551
  if (this.state !== BRUSH_TOOL_STATE.IDLE) return;
@@ -33930,9 +33754,6 @@ var WeaveTextToolAction = class extends WeaveAction {
33930
33754
  onInit = void 0;
33931
33755
  constructor() {
33932
33756
  super();
33933
- this.initialize();
33934
- }
33935
- initialize() {
33936
33757
  this.initialized = false;
33937
33758
  this.state = TEXT_TOOL_STATE.IDLE;
33938
33759
  this.textId = null;
@@ -33962,7 +33783,7 @@ var WeaveTextToolAction = class extends WeaveAction {
33962
33783
  this.cancelAction();
33963
33784
  return;
33964
33785
  }
33965
- }, { signal: this.instance.getEventsController()?.signal });
33786
+ });
33966
33787
  stage.on("pointermove", () => {
33967
33788
  if (this.state === TEXT_TOOL_STATE.IDLE) return;
33968
33789
  this.setCursor();
@@ -34090,9 +33911,6 @@ var WeaveImageToolAction = class extends WeaveAction {
34090
33911
  constructor(params) {
34091
33912
  super();
34092
33913
  this.config = mergeExceptArrays(WEAVE_IMAGE_TOOL_CONFIG_DEFAULT, params?.config ?? {});
34093
- this.initialize();
34094
- }
34095
- initialize() {
34096
33914
  this.pointers = new Map();
34097
33915
  this.initialized = false;
34098
33916
  this.imageId = null;
@@ -34136,7 +33954,7 @@ var WeaveImageToolAction = class extends WeaveAction {
34136
33954
  this.cancelAction();
34137
33955
  return;
34138
33956
  }
34139
- }, { signal: this.instance.getEventsController()?.signal });
33957
+ });
34140
33958
  stage.on("pointerdown", (e) => {
34141
33959
  this.setTapStart(e);
34142
33960
  if (this.ignorePointerEvents) return;
@@ -34533,9 +34351,6 @@ var WeaveImagesToolAction = class extends WeaveAction {
34533
34351
  constructor(params) {
34534
34352
  super();
34535
34353
  this.config = mergeExceptArrays(WEAVE_IMAGES_TOOL_DEFAULT_CONFIG, params ?? {});
34536
- this.initialize();
34537
- }
34538
- initialize() {
34539
34354
  this.pointers = new Map();
34540
34355
  this.initialized = false;
34541
34356
  this.tempPointerFeedbackNode = null;
@@ -34582,7 +34397,7 @@ var WeaveImagesToolAction = class extends WeaveAction {
34582
34397
  const stage = this.instance.getStage();
34583
34398
  stage.container().addEventListener("keydown", (e) => {
34584
34399
  if (e.key === "Escape" && this.instance.getActiveAction() === WEAVE_IMAGES_TOOL_ACTION_NAME) this.cancelAction();
34585
- }, { signal: this.instance.getEventsController()?.signal });
34400
+ });
34586
34401
  stage.on("pointerdown", (e) => {
34587
34402
  this.setTapStart(e);
34588
34403
  this.pointers.set(e.evt.pointerId, {
@@ -34964,9 +34779,6 @@ var WeaveStarToolAction = class extends WeaveAction {
34964
34779
  onInit = void 0;
34965
34780
  constructor() {
34966
34781
  super();
34967
- this.initialize();
34968
- }
34969
- initialize() {
34970
34782
  this.pointers = new Map();
34971
34783
  this.initialized = false;
34972
34784
  this.state = STAR_TOOL_STATE.IDLE;
@@ -35003,7 +34815,7 @@ var WeaveStarToolAction = class extends WeaveAction {
35003
34815
  this.cancelAction();
35004
34816
  return;
35005
34817
  }
35006
- }, { signal: this.instance.getEventsController()?.signal });
34818
+ });
35007
34819
  stage.on("pointerdown", (e) => {
35008
34820
  this.setTapStart(e);
35009
34821
  this.pointers.set(e.evt.pointerId, {
@@ -35168,8 +34980,8 @@ var WeaveStarToolAction = class extends WeaveAction {
35168
34980
 
35169
34981
  //#endregion
35170
34982
  //#region src/actions/arrow-tool/constants.ts
35171
- const WEAVE_ARROW_TOOL_ACTION_NAME = "arrowTool";
35172
- const WEAVE_ARROW_TOOL_STATE = {
34983
+ const ARROW_TOOL_ACTION_NAME = "arrowTool";
34984
+ const ARROW_TOOL_STATE = {
35173
34985
  ["IDLE"]: "idle",
35174
34986
  ["ADDING"]: "adding",
35175
34987
  ["DEFINING_SIZE"]: "definingSize",
@@ -35185,12 +34997,9 @@ var WeaveArrowToolAction = class extends WeaveAction {
35185
34997
  onInit = void 0;
35186
34998
  constructor() {
35187
34999
  super();
35188
- this.initialize();
35189
- }
35190
- initialize() {
35191
35000
  this.pointers = new Map();
35192
35001
  this.initialized = false;
35193
- this.state = WEAVE_ARROW_TOOL_STATE.IDLE;
35002
+ this.state = ARROW_TOOL_STATE.IDLE;
35194
35003
  this.arrowId = null;
35195
35004
  this.tempArrowId = null;
35196
35005
  this.tempMainArrowNode = null;
@@ -35203,7 +35012,7 @@ var WeaveArrowToolAction = class extends WeaveAction {
35203
35012
  this.props = this.initProps();
35204
35013
  }
35205
35014
  getName() {
35206
- return WEAVE_ARROW_TOOL_ACTION_NAME;
35015
+ return ARROW_TOOL_ACTION_NAME;
35207
35016
  }
35208
35017
  initProps() {
35209
35018
  return {
@@ -35220,37 +35029,40 @@ var WeaveArrowToolAction = class extends WeaveAction {
35220
35029
  setupEvents() {
35221
35030
  const stage = this.instance.getStage();
35222
35031
  window.addEventListener("keydown", (e) => {
35223
- if (e.code === "Enter" && this.instance.getActiveAction() === WEAVE_ARROW_TOOL_ACTION_NAME) {
35032
+ if (e.code === "Enter" && this.instance.getActiveAction() === ARROW_TOOL_ACTION_NAME) {
35224
35033
  this.cancelAction();
35225
35034
  return;
35226
35035
  }
35227
- if (e.code === "Escape" && this.instance.getActiveAction() === WEAVE_ARROW_TOOL_ACTION_NAME) this.cancelAction();
35228
- }, { signal: this.instance.getEventsController()?.signal });
35036
+ if (e.code === "Escape" && this.instance.getActiveAction() === ARROW_TOOL_ACTION_NAME) {
35037
+ this.cancelAction();
35038
+ return;
35039
+ }
35040
+ });
35229
35041
  stage.on("pointerdown", (e) => {
35230
35042
  this.setTapStart(e);
35231
35043
  this.pointers.set(e.evt.pointerId, {
35232
35044
  x: e.evt.clientX,
35233
35045
  y: e.evt.clientY
35234
35046
  });
35235
- if (this.pointers.size === 2 && this.instance.getActiveAction() === WEAVE_ARROW_TOOL_ACTION_NAME) {
35236
- this.state = WEAVE_ARROW_TOOL_STATE.ADDING;
35047
+ if (this.pointers.size === 2 && this.instance.getActiveAction() === ARROW_TOOL_ACTION_NAME) {
35048
+ this.state = ARROW_TOOL_STATE.ADDING;
35237
35049
  return;
35238
35050
  }
35239
- if (!this.tempMainArrowNode && this.state === WEAVE_ARROW_TOOL_STATE.ADDING) this.handleAdding();
35240
- if (this.tempMainArrowNode && this.state === WEAVE_ARROW_TOOL_STATE.ADDING) this.state = WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE;
35051
+ if (!this.tempMainArrowNode && this.state === ARROW_TOOL_STATE.ADDING) this.handleAdding();
35052
+ if (this.tempMainArrowNode && this.state === ARROW_TOOL_STATE.ADDING) this.state = ARROW_TOOL_STATE.DEFINING_SIZE;
35241
35053
  });
35242
35054
  stage.on("pointermove", () => {
35243
- if (this.state === WEAVE_ARROW_TOOL_STATE.IDLE) return;
35055
+ if (this.state === ARROW_TOOL_STATE.IDLE) return;
35244
35056
  this.setCursor();
35245
- if (this.pointers.size === 2 && this.instance.getActiveAction() === WEAVE_ARROW_TOOL_ACTION_NAME) {
35246
- this.state = WEAVE_ARROW_TOOL_STATE.ADDING;
35057
+ if (this.pointers.size === 2 && this.instance.getActiveAction() === ARROW_TOOL_ACTION_NAME) {
35058
+ this.state = ARROW_TOOL_STATE.ADDING;
35247
35059
  return;
35248
35060
  }
35249
- if (this.state === WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE) this.handleMovement();
35061
+ if (this.state === ARROW_TOOL_STATE.DEFINING_SIZE) this.handleMovement();
35250
35062
  });
35251
35063
  stage.on("pointerup", (e) => {
35252
35064
  this.pointers.delete(e.evt.pointerId);
35253
- if (this.state === WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE) this.handleSettingSize();
35065
+ if (this.state === ARROW_TOOL_STATE.DEFINING_SIZE) this.handleSettingSize();
35254
35066
  });
35255
35067
  this.initialized = true;
35256
35068
  }
@@ -35264,7 +35076,7 @@ var WeaveArrowToolAction = class extends WeaveAction {
35264
35076
  this.tempPoint = void 0;
35265
35077
  this.tempNextPoint = void 0;
35266
35078
  this.clickPoint = null;
35267
- this.setState(WEAVE_ARROW_TOOL_STATE.ADDING);
35079
+ this.setState(ARROW_TOOL_STATE.ADDING);
35268
35080
  }
35269
35081
  handleAdding() {
35270
35082
  const stage = this.instance.getStage();
@@ -35315,7 +35127,7 @@ var WeaveArrowToolAction = class extends WeaveAction {
35315
35127
  this.measureContainer?.add(this.tempNextPoint);
35316
35128
  this.tempPoint.moveToTop();
35317
35129
  this.tempNextPoint.moveToTop();
35318
- this.setState(WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE);
35130
+ this.setState(ARROW_TOOL_STATE.DEFINING_SIZE);
35319
35131
  }
35320
35132
  }
35321
35133
  handleSettingSize() {
@@ -35342,11 +35154,11 @@ var WeaveArrowToolAction = class extends WeaveAction {
35342
35154
  y: mousePoint.y,
35343
35155
  points: [0, 0]
35344
35156
  });
35345
- this.setState(WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE);
35157
+ this.setState(ARROW_TOOL_STATE.DEFINING_SIZE);
35346
35158
  }
35347
35159
  }
35348
35160
  handleMovement() {
35349
- if (this.state !== WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE) return;
35161
+ if (this.state !== ARROW_TOOL_STATE.DEFINING_SIZE) return;
35350
35162
  if (this.arrowId && this.tempArrowNode && this.measureContainer && this.tempNextPoint) {
35351
35163
  const { mousePoint } = this.instance.getMousePointerRelativeToContainer(this.measureContainer);
35352
35164
  this.tempArrowNode.setAttrs({
@@ -35413,7 +35225,7 @@ var WeaveArrowToolAction = class extends WeaveAction {
35413
35225
  this.container = void 0;
35414
35226
  this.measureContainer = void 0;
35415
35227
  this.clickPoint = null;
35416
- this.setState(WEAVE_ARROW_TOOL_STATE.IDLE);
35228
+ this.setState(ARROW_TOOL_STATE.IDLE);
35417
35229
  }
35418
35230
  setCursor() {
35419
35231
  const stage = this.instance.getStage();
@@ -35457,15 +35269,13 @@ const WEAVE_STROKE_TOOL_DEFAULT_CONFIG = { snapAngles: {
35457
35269
  var WeaveStrokeToolAction = class extends WeaveAction {
35458
35270
  initialized = false;
35459
35271
  initialCursor = null;
35272
+ snappedAngle = null;
35460
35273
  shiftPressed = false;
35461
35274
  onPropsChange = void 0;
35462
35275
  onInit = void 0;
35463
35276
  constructor(params) {
35464
35277
  super();
35465
35278
  this.config = mergeExceptArrays(WEAVE_STROKE_TOOL_DEFAULT_CONFIG, params?.config ?? {});
35466
- this.initialize();
35467
- }
35468
- initialize() {
35469
35279
  this.pointers = new Map();
35470
35280
  this.initialized = false;
35471
35281
  this.state = WEAVE_STROKE_TOOL_STATE.IDLE;
@@ -35474,6 +35284,7 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35474
35284
  this.tempLineId = null;
35475
35285
  this.tempLineNode = null;
35476
35286
  this.container = void 0;
35287
+ this.snappedAngle = null;
35477
35288
  this.measureContainer = void 0;
35478
35289
  this.clickPoint = null;
35479
35290
  this.snapper = new GreedySnapper({
@@ -35486,9 +35297,6 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35486
35297
  getName() {
35487
35298
  return WEAVE_STROKE_TOOL_ACTION_NAME;
35488
35299
  }
35489
- getNames() {
35490
- return [WEAVE_STROKE_TOOL_ACTION_NAME, ...WEAVE_STROKE_TOOL_ACTION_NAME_ALIASES];
35491
- }
35492
35300
  hasAliases() {
35493
35301
  return true;
35494
35302
  }
@@ -35507,26 +35315,32 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35507
35315
  setupEvents() {
35508
35316
  const stage = this.instance.getStage();
35509
35317
  window.addEventListener("keydown", (e) => {
35510
- if (e.code === "Enter" && this.getNames().includes(this.instance.getActiveAction() ?? "")) {
35318
+ if (e.code === "Enter" && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35511
35319
  this.cancelAction();
35512
35320
  return;
35513
35321
  }
35514
- if (e.code === "Escape" && this.getNames().includes(this.instance.getActiveAction() ?? "")) {
35322
+ if (e.code === "Escape" && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35515
35323
  this.cancelAction();
35516
35324
  return;
35517
35325
  }
35518
- if (e.key === "Shift" && this.getNames().includes(this.instance.getActiveAction() ?? "")) this.shiftPressed = true;
35519
- }, { signal: this.instance.getEventsController()?.signal });
35326
+ if (e.key === "Shift" && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35327
+ this.snappedAngle = null;
35328
+ this.shiftPressed = true;
35329
+ }
35330
+ });
35520
35331
  window.addEventListener("keyup", (e) => {
35521
- if (e.key === "Shift" && this.getNames().includes(this.instance.getActiveAction() ?? "")) this.shiftPressed = false;
35522
- }, { signal: this.instance.getEventsController()?.signal });
35332
+ if (e.key === "Shift" && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35333
+ this.snappedAngle = null;
35334
+ this.shiftPressed = false;
35335
+ }
35336
+ });
35523
35337
  stage.on("pointerdown", (e) => {
35524
35338
  this.setTapStart(e);
35525
35339
  this.pointers.set(e.evt.pointerId, {
35526
35340
  x: e.evt.clientX,
35527
35341
  y: e.evt.clientY
35528
35342
  });
35529
- if (this.pointers.size === 2 && this.getNames().includes(this.instance.getActiveAction() ?? "")) {
35343
+ if (this.pointers.size === 2 && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35530
35344
  this.state = WEAVE_STROKE_TOOL_STATE.ADDING;
35531
35345
  return;
35532
35346
  }
@@ -35536,7 +35350,7 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35536
35350
  stage.on("pointermove", () => {
35537
35351
  if (this.state === WEAVE_STROKE_TOOL_STATE.IDLE) return;
35538
35352
  this.setCursor();
35539
- if (this.pointers.size === 2 && this.getNames().includes(this.instance.getActiveAction() ?? "")) {
35353
+ if (this.pointers.size === 2 && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35540
35354
  this.state = WEAVE_STROKE_TOOL_STATE.ADDING;
35541
35355
  return;
35542
35356
  }
@@ -35554,7 +35368,7 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35554
35368
  addLine() {
35555
35369
  this.setCursor();
35556
35370
  this.setFocusStage();
35557
- this.instance.emitEvent("onAddingStroke", { actionName: this.instance.getActiveAction() ?? "not-defined" });
35371
+ this.instance.emitEvent("onAddingStroke", { actionName: this.instance.getActiveAction() ?? WEAVE_STROKE_TOOL_ACTION_NAME });
35558
35372
  this.shiftPressed = false;
35559
35373
  this.clickPoint = null;
35560
35374
  this.setState(WEAVE_STROKE_TOOL_STATE.ADDING);
@@ -35662,7 +35476,7 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35662
35476
  });
35663
35477
  delete finalLine.props.dragBoundFunc;
35664
35478
  this.instance.addNode(finalLine, this.container?.getAttrs().id);
35665
- this.instance.emitEvent("onAddedStroke", { actionName: this.instance.getActiveAction() ?? "not-defined" });
35479
+ this.instance.emitEvent("onAddedStroke", { actionName: this.instance.getActiveAction() ?? WEAVE_STROKE_TOOL_ACTION_NAME });
35666
35480
  nodeCreated = true;
35667
35481
  }
35668
35482
  }
@@ -35712,9 +35526,6 @@ var WeaveRegularPolygonToolAction = class extends WeaveAction {
35712
35526
  onInit = void 0;
35713
35527
  constructor() {
35714
35528
  super();
35715
- this.initialize();
35716
- }
35717
- initialize() {
35718
35529
  this.pointers = new Map();
35719
35530
  this.initialized = false;
35720
35531
  this.state = REGULAR_POLYGON_TOOL_STATE.IDLE;
@@ -35749,7 +35560,7 @@ var WeaveRegularPolygonToolAction = class extends WeaveAction {
35749
35560
  this.cancelAction();
35750
35561
  return;
35751
35562
  }
35752
- }, { signal: this.instance.getEventsController()?.signal });
35563
+ });
35753
35564
  stage.on("pointerdown", (e) => {
35754
35565
  this.setTapStart(e);
35755
35566
  this.pointers.set(e.evt.pointerId, {
@@ -35923,9 +35734,6 @@ var WeaveFrameToolAction = class extends WeaveAction {
35923
35734
  onInit = void 0;
35924
35735
  constructor() {
35925
35736
  super();
35926
- this.initialize();
35927
- }
35928
- initialize() {
35929
35737
  this.initialized = false;
35930
35738
  this.state = FRAME_TOOL_STATE.IDLE;
35931
35739
  this.frameId = null;
@@ -35953,7 +35761,7 @@ var WeaveFrameToolAction = class extends WeaveAction {
35953
35761
  this.cancelAction();
35954
35762
  return;
35955
35763
  }
35956
- }, { signal: this.instance.getEventsController()?.signal });
35764
+ });
35957
35765
  stage.on("pointermove", () => {
35958
35766
  if (this.state === FRAME_TOOL_STATE.IDLE) return;
35959
35767
  this.setCursor();
@@ -36055,10 +35863,6 @@ var WeaveExportStageToolAction = class extends WeaveAction {
36055
35863
  };
36056
35864
  onPropsChange = void 0;
36057
35865
  onInit = void 0;
36058
- initialize = void 0;
36059
- constructor() {
36060
- super();
36061
- }
36062
35866
  getName() {
36063
35867
  return EXPORT_STAGE_TOOL_ACTION_NAME;
36064
35868
  }
@@ -36106,10 +35910,6 @@ var WeaveExportNodesToolAction = class extends WeaveAction {
36106
35910
  };
36107
35911
  onPropsChange = void 0;
36108
35912
  onInit = void 0;
36109
- initialize = void 0;
36110
- constructor() {
36111
- super();
36112
- }
36113
35913
  getName() {
36114
35914
  return EXPORT_NODES_TOOL_ACTION_NAME;
36115
35915
  }
@@ -36162,9 +35962,6 @@ var WeaveAlignNodesToolAction = class extends WeaveAction {
36162
35962
  onInit = void 0;
36163
35963
  constructor() {
36164
35964
  super();
36165
- this.initialize();
36166
- }
36167
- initialize() {
36168
35965
  this.initialized = false;
36169
35966
  this.state = ALIGN_NODES_TOOL_STATE.IDLE;
36170
35967
  }
@@ -36414,9 +36211,6 @@ var WeaveCommentToolAction = class extends WeaveAction {
36414
36211
  super();
36415
36212
  const { config } = params ?? {};
36416
36213
  this.config = mergeExceptArrays(WEAVE_COMMENT_TOOL_DEFAULT_CONFIG, config);
36417
- this.initialize();
36418
- }
36419
- initialize() {
36420
36214
  this.pointers = new Map();
36421
36215
  this.initialized = false;
36422
36216
  this.state = WEAVE_COMMENT_TOOL_STATE.IDLE;
@@ -36494,7 +36288,7 @@ var WeaveCommentToolAction = class extends WeaveAction {
36494
36288
  return;
36495
36289
  }
36496
36290
  if (e.code === "Escape" && this.state === WEAVE_COMMENT_TOOL_STATE.CREATING_COMMENT) this.setState(WEAVE_COMMENT_TOOL_STATE.ADDING);
36497
- }, { signal: this.instance.getEventsController()?.signal });
36291
+ });
36498
36292
  stage.on("pointermove", (e) => {
36499
36293
  if (this.state === WEAVE_COMMENT_TOOL_STATE.IDLE) return;
36500
36294
  if (commentNodeHandler?.isCommentViewing()) {
@@ -36645,9 +36439,6 @@ var WeaveVideoToolAction = class extends WeaveAction {
36645
36439
  update = void 0;
36646
36440
  constructor() {
36647
36441
  super();
36648
- this.initialize();
36649
- }
36650
- initialize() {
36651
36442
  this.pointers = new Map();
36652
36443
  this.initialized = false;
36653
36444
  this.state = VIDEO_TOOL_STATE.IDLE;
@@ -36694,7 +36485,7 @@ var WeaveVideoToolAction = class extends WeaveAction {
36694
36485
  this.cancelAction();
36695
36486
  return;
36696
36487
  }
36697
- }, { signal: this.instance.getEventsController()?.signal });
36488
+ });
36698
36489
  stage.on("pointerdown", (e) => {
36699
36490
  this.setTapStart(e);
36700
36491
  this.pointers.set(e.evt.pointerId, {
@@ -36873,9 +36664,6 @@ var WeaveMeasureToolAction = class extends WeaveAction {
36873
36664
  constructor(params) {
36874
36665
  super();
36875
36666
  this.config = mergeExceptArrays(WEAVE_MEASURE_TOOL_DEFAULT_CONFIG, params?.config ?? {});
36876
- this.initialize();
36877
- }
36878
- initialize() {
36879
36667
  this.initialized = false;
36880
36668
  this.state = MEASURE_TOOL_STATE.IDLE;
36881
36669
  this.measureId = null;
@@ -36902,7 +36690,7 @@ var WeaveMeasureToolAction = class extends WeaveAction {
36902
36690
  const stage = this.instance.getStage();
36903
36691
  window.addEventListener("keydown", (e) => {
36904
36692
  if (e.code === "Escape" && this.instance.getActiveAction() === MEASURE_TOOL_ACTION_NAME) this.cancelAction();
36905
- }, { signal: this.instance.getEventsController()?.signal });
36693
+ });
36906
36694
  stage.on("pointermove", () => {
36907
36695
  if (this.state === MEASURE_TOOL_STATE.IDLE) return;
36908
36696
  if (this.state === MEASURE_TOOL_STATE.SET_TO) {
@@ -37172,9 +36960,6 @@ var WeaveConnectorToolAction = class extends WeaveAction {
37172
36960
  constructor(params) {
37173
36961
  super();
37174
36962
  this.config = mergeExceptArrays(CONNECTOR_TOOL_DEFAULT_CONFIG, params?.config);
37175
- this.initialize();
37176
- }
37177
- initialize() {
37178
36963
  this.pointers = new Map();
37179
36964
  this.initialized = false;
37180
36965
  this.tempLineNode = null;
@@ -37213,7 +36998,7 @@ var WeaveConnectorToolAction = class extends WeaveAction {
37213
36998
  return;
37214
36999
  }
37215
37000
  if (e.code === "Escape" && this.instance.getActiveAction() === CONNECTOR_TOOL_ACTION_NAME) this.cancelAction();
37216
- }, { signal: this.instance.getEventsController()?.signal });
37001
+ });
37217
37002
  let nodeHovered = void 0;
37218
37003
  stage.on("pointermove", () => {
37219
37004
  if (!(this.state === CONNECTOR_TOOL_STATE.SELECTING_INITIAL || this.state === CONNECTOR_TOOL_STATE.SELECTING_FINAL)) return;
@@ -37528,6 +37313,10 @@ var WeaveConnectorToolAction = class extends WeaveAction {
37528
37313
  //#endregion
37529
37314
  //#region src/plugins/stage-grid/stage-grid.ts
37530
37315
  var WeaveStageGridPlugin = class extends WeavePlugin {
37316
+ actStageZoomX = 1;
37317
+ actStageZoomY = 1;
37318
+ actStagePosX = 0;
37319
+ actStagePosY = 0;
37531
37320
  constructor(params) {
37532
37321
  super();
37533
37322
  const { config } = params ?? {};
@@ -37543,10 +37332,6 @@ var WeaveStageGridPlugin = class extends WeavePlugin {
37543
37332
  this.isMouseMiddleButtonPressed = false;
37544
37333
  this.isSpaceKeyPressed = false;
37545
37334
  this.forceStageChange = false;
37546
- this.actStagePosX = 0;
37547
- this.actStagePosY = 0;
37548
- this.actStageZoomX = 1;
37549
- this.actStageZoomY = 1;
37550
37335
  }
37551
37336
  getName() {
37552
37337
  return WEAVE_STAGE_GRID_PLUGIN_KEY;
@@ -37571,10 +37356,10 @@ var WeaveStageGridPlugin = class extends WeavePlugin {
37571
37356
  const stage = this.instance.getStage();
37572
37357
  window.addEventListener("keydown", (e) => {
37573
37358
  if (e.code === "Space") this.isSpaceKeyPressed = true;
37574
- }, { signal: this.instance.getEventsController()?.signal });
37359
+ });
37575
37360
  window.addEventListener("keyup", (e) => {
37576
37361
  if (e.code === "Space") this.isSpaceKeyPressed = false;
37577
- }, { signal: this.instance.getEventsController()?.signal });
37362
+ });
37578
37363
  this.instance.addEventListener("onStageMove", () => {
37579
37364
  this.onRender();
37580
37365
  });
@@ -37840,14 +37625,15 @@ var WeaveStageGridPlugin = class extends WeavePlugin {
37840
37625
  //#endregion
37841
37626
  //#region src/plugins/stage-panning/stage-panning.ts
37842
37627
  var WeaveStagePanningPlugin = class extends WeavePlugin {
37628
+ panning = false;
37629
+ currentPointer = null;
37630
+ stageScrollInterval = void 0;
37631
+ panEdgeTargets = {};
37843
37632
  getLayerName = void 0;
37844
37633
  initLayer = void 0;
37845
37634
  constructor(params) {
37846
37635
  super();
37847
37636
  this.config = mergeExceptArrays(WEAVE_STAGE_PANNING_DEFAULT_CONFIG, params?.config ?? {});
37848
- this.initialize();
37849
- }
37850
- initialize() {
37851
37637
  this.pointers = new Map();
37852
37638
  this.panning = false;
37853
37639
  this.isDragging = false;
@@ -37859,9 +37645,6 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
37859
37645
  this.isCtrlOrMetaPressed = false;
37860
37646
  this.isSpaceKeyPressed = false;
37861
37647
  this.previousPointer = null;
37862
- this.currentPointer = null;
37863
- this.stageScrollInterval = void 0;
37864
- this.panEdgeTargets = {};
37865
37648
  }
37866
37649
  getName() {
37867
37650
  return WEAVE_STAGE_PANNING_KEY;
@@ -37895,7 +37678,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
37895
37678
  this.isSpaceKeyPressed = true;
37896
37679
  this.setCursor();
37897
37680
  }
37898
- }, { signal: this.instance.getEventsController()?.signal });
37681
+ });
37899
37682
  window.addEventListener("keyup", (e) => {
37900
37683
  if (e.key === "Meta" || e.key === "Control") this.isCtrlOrMetaPressed = false;
37901
37684
  if (e.code === "Space") {
@@ -37906,7 +37689,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
37906
37689
  this.isSpaceKeyPressed = false;
37907
37690
  this.disableMove();
37908
37691
  }
37909
- }, { signal: this.instance.getEventsController()?.signal });
37692
+ });
37910
37693
  let lastPos = null;
37911
37694
  stage.on("pointerdown", (e) => {
37912
37695
  this.pointers.set(e.evt.pointerId, {
@@ -37979,10 +37762,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
37979
37762
  this.instance.emitEvent("onStageMove");
37980
37763
  };
37981
37764
  const handleWheelThrottled = (0, import_lodash.throttle)(handleWheel, WEAVE_STAGE_PANNING_THROTTLE_MS);
37982
- window.addEventListener("wheel", handleWheelThrottled, {
37983
- passive: true,
37984
- signal: this.instance.getEventsController()?.signal
37985
- });
37765
+ window.addEventListener("wheel", handleWheelThrottled, { passive: true });
37986
37766
  stage.on("dragstart", (e) => {
37987
37767
  const duration = 1e3 / 60;
37988
37768
  if (this.panEdgeTargets[e.target.getAttrs().id ?? ""] !== void 0) return;
@@ -38040,10 +37820,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
38040
37820
  stage.container().style.setProperty("-webkit-user-drag", "none");
38041
37821
  stage.getContent().addEventListener("touchmove", function(e) {
38042
37822
  e.preventDefault();
38043
- }, {
38044
- passive: false,
38045
- signal: this.instance.getEventsController()?.signal
38046
- });
37823
+ }, { passive: false });
38047
37824
  }
38048
37825
  isPanning() {
38049
37826
  return this.panning;
@@ -38121,9 +37898,6 @@ var WeaveStageMinimapPlugin = class extends WeavePlugin {
38121
37898
  constructor(params) {
38122
37899
  super();
38123
37900
  this.config = mergeExceptArrays(STAGE_MINIMAP_DEFAULT_CONFIG, params.config);
38124
- this.initialize();
38125
- }
38126
- initialize() {
38127
37901
  this.initialized = false;
38128
37902
  }
38129
37903
  getName() {
@@ -38301,7 +38075,6 @@ const WEAVE_STAGE_RESIZE_KEY = "stageResize";
38301
38075
  var WeaveStageResizePlugin = class extends WeavePlugin {
38302
38076
  getLayerName = void 0;
38303
38077
  initLayer = void 0;
38304
- initialize = void 0;
38305
38078
  getName() {
38306
38079
  return WEAVE_STAGE_RESIZE_KEY;
38307
38080
  }
@@ -38321,10 +38094,6 @@ var WeaveStageResizePlugin = class extends WeavePlugin {
38321
38094
  const pluginInstance = plugins[pluginId];
38322
38095
  pluginInstance.onRender?.();
38323
38096
  }
38324
- this.instance.emitEvent("onStageResize", {
38325
- width: stage.width(),
38326
- height: stage.height()
38327
- });
38328
38097
  }
38329
38098
  }
38330
38099
  onInit() {
@@ -38333,7 +38102,7 @@ var WeaveStageResizePlugin = class extends WeavePlugin {
38333
38102
  }, DEFAULT_THROTTLE_MS);
38334
38103
  window.addEventListener("resize", () => {
38335
38104
  throttledResize();
38336
- }, { signal: this.instance.getEventsController()?.signal });
38105
+ });
38337
38106
  const resizeObserver = new ResizeObserver(() => {
38338
38107
  throttledResize();
38339
38108
  });
@@ -38351,12 +38120,10 @@ var WeaveStageResizePlugin = class extends WeavePlugin {
38351
38120
  //#endregion
38352
38121
  //#region src/plugins/nodes-multi-selection-feedback/nodes-multi-selection-feedback.ts
38353
38122
  var WeaveNodesMultiSelectionFeedbackPlugin = class extends WeavePlugin {
38123
+ selectedHalos = {};
38354
38124
  constructor(params) {
38355
38125
  super();
38356
38126
  this.config = mergeExceptArrays(WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_DEFAULT_CONFIG, params?.config ?? {});
38357
- this.initialize();
38358
- }
38359
- initialize() {
38360
38127
  this.selectedHalos = {};
38361
38128
  }
38362
38129
  getName() {
@@ -38522,14 +38289,12 @@ var WeaveNodesMultiSelectionFeedbackPlugin = class extends WeavePlugin {
38522
38289
  //#endregion
38523
38290
  //#region src/plugins/connected-users/connected-users.ts
38524
38291
  var WeaveConnectedUsersPlugin = class extends WeavePlugin {
38292
+ connectedUsers = {};
38525
38293
  getLayerName = void 0;
38526
38294
  constructor(params) {
38527
38295
  super();
38528
38296
  const { config } = params ?? {};
38529
38297
  this.config = config;
38530
- this.initialize();
38531
- }
38532
- initialize() {
38533
38298
  this.connectedUsers = {};
38534
38299
  }
38535
38300
  getName() {
@@ -38576,9 +38341,6 @@ var WeaveUsersSelectionPlugin = class extends WeavePlugin {
38576
38341
  this.config = config;
38577
38342
  this.config.getUser = memoize(this.config.getUser);
38578
38343
  this.config.getUserColor = memoize(this.config.getUserColor);
38579
- this.initialize();
38580
- }
38581
- initialize() {
38582
38344
  this.usersSelection = {};
38583
38345
  }
38584
38346
  getName() {
@@ -38771,9 +38533,6 @@ var WeaveUsersPointersPlugin = class extends WeavePlugin {
38771
38533
  this.config.getUser = memoize(this.config.getUser);
38772
38534
  this.config.getUserBackgroundColor = memoize(this.config.getUserBackgroundColor);
38773
38535
  this.config.getUserForegroundColor = memoize(this.config.getUserForegroundColor);
38774
- this.initialize();
38775
- }
38776
- initialize() {
38777
38536
  this.usersPointers = {};
38778
38537
  this.usersOperations = {};
38779
38538
  }
@@ -38984,9 +38743,6 @@ var WeaveUsersPresencePlugin = class extends WeavePlugin {
38984
38743
  super();
38985
38744
  const { config } = params;
38986
38745
  this.config = mergeExceptArrays(WEAVE_USERS_PRESENCE_CONFIG_DEFAULT_PROPS, config);
38987
- this.initialize();
38988
- }
38989
- initialize() {
38990
38746
  this.userPresence = {};
38991
38747
  }
38992
38748
  getName() {
@@ -39062,9 +38818,6 @@ var WeaveStageDropAreaPlugin = class extends WeavePlugin {
39062
38818
  initLayer = void 0;
39063
38819
  constructor() {
39064
38820
  super();
39065
- this.initialize();
39066
- }
39067
- initialize() {
39068
38821
  this.enabled = true;
39069
38822
  }
39070
38823
  getName() {
@@ -39078,20 +38831,14 @@ var WeaveStageDropAreaPlugin = class extends WeavePlugin {
39078
38831
  stage.container().addEventListener("dragover", (e) => {
39079
38832
  e.preventDefault();
39080
38833
  e.stopPropagation();
39081
- }, { signal: this.instance.getEventsController()?.signal });
38834
+ });
39082
38835
  stage.container().addEventListener("drop", (e) => {
39083
38836
  e.preventDefault();
39084
38837
  e.stopPropagation();
39085
38838
  this.instance.emitEvent("onStageDrop", e);
39086
- }, { signal: this.instance.getEventsController()?.signal });
39087
- window.addEventListener("dragover", (e) => e.preventDefault(), {
39088
- signal: this.instance.getEventsController()?.signal,
39089
- passive: false
39090
- });
39091
- window.addEventListener("drop", (e) => e.preventDefault(), {
39092
- signal: this.instance.getEventsController()?.signal,
39093
- passive: false
39094
38839
  });
38840
+ window.addEventListener("dragover", (e) => e.preventDefault(), { passive: false });
38841
+ window.addEventListener("drop", (e) => e.preventDefault(), { passive: false });
39095
38842
  }
39096
38843
  enable() {
39097
38844
  this.enabled = true;
@@ -39110,9 +38857,6 @@ var WeaveNodesEdgeSnappingPlugin = class extends WeavePlugin {
39110
38857
  this.guideLineConfig = config?.guideLine ?? GUIDE_LINE_DEFAULT_CONFIG;
39111
38858
  this.dragSnappingThreshold = config?.dragSnappingThreshold ?? GUIDE_LINE_DRAG_SNAPPING_THRESHOLD;
39112
38859
  this.transformSnappingThreshold = config?.transformSnappingThreshold ?? GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD;
39113
- this.initialize();
39114
- }
39115
- initialize() {
39116
38860
  this.enabled = true;
39117
38861
  }
39118
38862
  getName() {
@@ -39489,9 +39233,6 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
39489
39233
  this.enterSnappingTolerance = config?.enterSnappingTolerance ?? GUIDE_ENTER_SNAPPING_TOLERANCE;
39490
39234
  this.exitSnappingTolerance = config?.exitSnappingTolerance ?? GUIDE_EXIT_SNAPPING_TOLERANCE;
39491
39235
  this.uiConfig = mergeExceptArrays(GUIDE_DISTANCE_LINE_DEFAULT_CONFIG, config?.ui);
39492
- this.initialize();
39493
- }
39494
- initialize() {
39495
39236
  this.enabled = true;
39496
39237
  }
39497
39238
  getName() {
@@ -40138,14 +39879,12 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
40138
39879
  //#endregion
40139
39880
  //#region src/plugins/comments-renderer/comments-renderer.ts
40140
39881
  var WeaveCommentsRendererPlugin = class extends WeavePlugin {
39882
+ comments = [];
40141
39883
  getLayerName = void 0;
40142
39884
  constructor(params) {
40143
39885
  super();
40144
39886
  const { config } = params ?? {};
40145
39887
  this.config = config;
40146
- this.initialize();
40147
- }
40148
- initialize() {
40149
39888
  this.comments = [];
40150
39889
  }
40151
39890
  getName() {
@@ -40236,7 +39975,6 @@ const WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG = { movementDelta: 5 };
40236
39975
  var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
40237
39976
  getLayerName = void 0;
40238
39977
  initLayer = void 0;
40239
- initialize = void 0;
40240
39978
  constructor(params) {
40241
39979
  super();
40242
39980
  this.config = mergeExceptArrays(WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG, params?.config ?? {});
@@ -40275,7 +40013,7 @@ var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
40275
40013
  if (e.code === "ArrowLeft" && e.shiftKey) this.handleNodesMovement("left");
40276
40014
  if (e.code === "ArrowRight" && e.shiftKey) this.handleNodesMovement("right");
40277
40015
  if (e.code === "ArrowDown" && e.shiftKey) this.handleNodesMovement("down");
40278
- }, { signal: this.instance.getEventsController()?.signal });
40016
+ });
40279
40017
  }
40280
40018
  enable() {
40281
40019
  this.enabled = true;
@@ -40286,5 +40024,5 @@ var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
40286
40024
  };
40287
40025
 
40288
40026
  //#endregion
40289
- 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, setupCanvasBackend, setupSkiaBackend, weavejsToYjsBinary };
40027
+ 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, setupCanvasBackend, setupSkiaBackend, weavejsToYjsBinary };
40290
40028
  //# sourceMappingURL=types.js.map