@inditextech/weave-sdk 3.4.0-SNAPSHOT.38.1 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sdk.node.js CHANGED
@@ -32,13 +32,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
32
32
  }) : target, mod));
33
33
 
34
34
  //#endregion
35
- //#region ../../node_modules/emittery/maps.js
35
+ //#region node_modules/emittery/maps.js
36
36
  const anyMap = new WeakMap();
37
37
  const eventsMap = new WeakMap();
38
38
  const producersMap = new WeakMap();
39
39
 
40
40
  //#endregion
41
- //#region ../../node_modules/emittery/index.js
41
+ //#region node_modules/emittery/index.js
42
42
  const anyProducer = Symbol("anyProducer");
43
43
  const resolvedPromise = Promise.resolve();
44
44
  const listenerAdded = Symbol("listenerAdded");
@@ -15083,11 +15083,6 @@ var WeaveStore = class {
15083
15083
  getDocument() {
15084
15084
  return this.document;
15085
15085
  }
15086
- restartDocument() {
15087
- this.latestState = { weave: {} };
15088
- this.state = syncedStore({ weave: {} });
15089
- this.document = getYjsDoc(this.state);
15090
- }
15091
15086
  loadDocument(roomData) {
15092
15087
  yjs_default.applyUpdate(this.document, roomData);
15093
15088
  }
@@ -17963,15 +17958,6 @@ var WeaveContextMenuPlugin = class extends WeavePlugin {
17963
17958
  initLayer = void 0;
17964
17959
  constructor(params) {
17965
17960
  super();
17966
- const { config } = params ?? {};
17967
- this.config = {
17968
- xOffset: WEAVE_CONTEXT_MENU_X_OFFSET_DEFAULT,
17969
- yOffset: WEAVE_CONTEXT_MENU_Y_OFFSET_DEFAULT,
17970
- ...config
17971
- };
17972
- this.initialize();
17973
- }
17974
- initialize() {
17975
17961
  this.timer = null;
17976
17962
  this.tapHold = false;
17977
17963
  this.contextMenuVisible = false;
@@ -17981,6 +17967,12 @@ var WeaveContextMenuPlugin = class extends WeavePlugin {
17981
17967
  time: 0
17982
17968
  };
17983
17969
  this.tapHoldTimeout = WEAVE_CONTEXT_MENU_TAP_HOLD_TIMEOUT;
17970
+ const { config } = params ?? {};
17971
+ this.config = {
17972
+ xOffset: WEAVE_CONTEXT_MENU_X_OFFSET_DEFAULT,
17973
+ yOffset: WEAVE_CONTEXT_MENU_Y_OFFSET_DEFAULT,
17974
+ ...config
17975
+ };
17984
17976
  this.pointers = {};
17985
17977
  }
17986
17978
  getName() {
@@ -18653,9 +18645,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
18653
18645
  constructor(params) {
18654
18646
  super();
18655
18647
  this.config = mergeExceptArrays(WEAVE_NODES_SELECTION_DEFAULT_CONFIG, params?.config ?? {});
18656
- this.initialize();
18657
- }
18658
- initialize() {
18659
18648
  this.defaultEnabledAnchors = this.config.selection?.enabledAnchors ?? [
18660
18649
  "top-left",
18661
18650
  "top-center",
@@ -19445,7 +19434,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
19445
19434
  if (existNode) newSelectedNodes.push(existNode);
19446
19435
  }
19447
19436
  this.tr.nodes([...newSelectedNodes]);
19448
- if (newSelectedNodes.length > 0) this.tr.forceUpdate();
19437
+ this.tr.forceUpdate();
19449
19438
  this.triggerSelectedNodesEvent();
19450
19439
  }
19451
19440
  getSelectionPlugin() {
@@ -19698,9 +19687,6 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
19698
19687
  super();
19699
19688
  this.getImageBase64 = params.getImageBase64;
19700
19689
  this.config = mergeExceptArrays(WEAVE_COPY_PASTE_CONFIG_DEFAULT, params?.config);
19701
- this.initialize();
19702
- }
19703
- initialize() {
19704
19690
  this.actualInternalPaddingX = 0;
19705
19691
  this.actualInternalPaddingY = 0;
19706
19692
  this.lastInternalPasteSnapshot = "";
@@ -21980,34 +21966,11 @@ var WeaveRegisterManager = class {
21980
21966
  }
21981
21967
  }
21982
21968
  }
21983
- resetNodesHandlers() {
21984
- for (const nodeHandlerId of Object.keys(this.nodesHandlers)) {
21985
- const nodeHandler = this.nodesHandlers[nodeHandlerId];
21986
- nodeHandler.initialize?.();
21987
- }
21988
- }
21989
- resetActionsHandlers() {
21990
- for (const actionHandlerId of Object.keys(this.actionsHandlers)) {
21991
- const actionHandler = this.actionsHandlers[actionHandlerId];
21992
- actionHandler.initialize?.();
21993
- }
21994
- }
21995
- resetPlugins() {
21996
- for (const pluginId of Object.keys(this.plugins)) {
21997
- const plugin = this.plugins[pluginId];
21998
- plugin.initialize?.();
21999
- }
22000
- }
22001
- reset() {
22002
- this.resetNodesHandlers();
22003
- this.resetActionsHandlers();
22004
- this.resetPlugins();
22005
- }
22006
21969
  };
22007
21970
 
22008
21971
  //#endregion
22009
21972
  //#region package.json
22010
- var version = "3.4.0-SNAPSHOT.38.1";
21973
+ var version = "3.4.0";
22011
21974
 
22012
21975
  //#endregion
22013
21976
  //#region src/managers/setup.ts
@@ -22124,9 +22087,6 @@ var WeaveStageManager = class {
22124
22087
  initialZIndex: void 0
22125
22088
  };
22126
22089
  const stage = new Konva.Stage({ ...props });
22127
- const containerParent = stage.container().parentNode;
22128
- stage.width(containerParent.clientWidth);
22129
- stage.height(containerParent.clientHeight);
22130
22090
  const realContainer = stage.container();
22131
22091
  if (realContainer !== void 0 && realContainer.style?.position !== "relative") realContainer.style.position = "relative";
22132
22092
  this.setStage(stage);
@@ -22435,91 +22395,6 @@ var WeaveExportManager = class {
22435
22395
  height: imageHeight * pixelRatio
22436
22396
  };
22437
22397
  }
22438
- async exportAreaServerSide(area, options) {
22439
- const { format = WEAVE_EXPORT_FORMATS.PNG, padding = 0, pixelRatio = 1, backgroundColor = WEAVE_EXPORT_BACKGROUND_COLOR } = options;
22440
- this.getNodesSelectionPlugin()?.disable();
22441
- this.getNodesDistanceSnappingPlugin()?.disable();
22442
- this.getNodesEdgeSnappingPlugin()?.disable();
22443
- this.getStageGridPlugin()?.disable();
22444
- const stage = this.instance.getStage();
22445
- const mainLayer = this.instance.getMainLayer();
22446
- if (!mainLayer) throw new Error("Main layer not found");
22447
- const originalPosition = {
22448
- x: stage.x(),
22449
- y: stage.y()
22450
- };
22451
- const originalScale = {
22452
- x: stage.scaleX(),
22453
- y: stage.scaleY()
22454
- };
22455
- stage.scale({
22456
- x: 1,
22457
- y: 1
22458
- });
22459
- const bounds = area;
22460
- const scaleX = stage.scaleX();
22461
- const scaleY = stage.scaleY();
22462
- const unscaledBounds = {
22463
- x: bounds.x / scaleX,
22464
- y: bounds.y / scaleY,
22465
- width: bounds.width / scaleX,
22466
- height: bounds.height / scaleY
22467
- };
22468
- const background = new Konva.Rect({
22469
- x: unscaledBounds.x - padding,
22470
- y: unscaledBounds.y - padding,
22471
- width: unscaledBounds.width + 2 * padding,
22472
- height: unscaledBounds.height + 2 * padding,
22473
- strokeWidth: 0,
22474
- fill: backgroundColor
22475
- });
22476
- mainLayer.add(background);
22477
- background.moveToBottom();
22478
- const backgroundRect = background.getClientRect();
22479
- const composites = [];
22480
- const imageWidth = Math.round(backgroundRect.width);
22481
- const imageHeight = Math.round(backgroundRect.height);
22482
- const maxRenderSize = 1920;
22483
- const cols = Math.ceil(imageWidth / maxRenderSize);
22484
- const rows = Math.ceil(imageHeight / maxRenderSize);
22485
- const tileWidth = Math.floor(imageWidth / cols);
22486
- const tileHeight = Math.floor(imageHeight / rows);
22487
- for (let y = 0; y < imageHeight; y += tileHeight) for (let x = 0; x < imageWidth; x += tileWidth) {
22488
- const width = Math.min(tileWidth, imageWidth - x);
22489
- const height = Math.min(tileHeight, imageHeight - y);
22490
- const canvas = await mainLayer.toCanvas({
22491
- x: Math.round(backgroundRect.x) + x,
22492
- y: Math.round(backgroundRect.y) + y,
22493
- width,
22494
- height,
22495
- mimeType: format,
22496
- pixelRatio,
22497
- quality: options.quality ?? 1
22498
- });
22499
- let buffer = null;
22500
- if (globalThis._weave_serverSideBackend === WEAVE_KONVA_BACKEND.CANVAS) buffer = canvas.toBuffer();
22501
- if (globalThis._weave_serverSideBackend === WEAVE_KONVA_BACKEND.SKIA) buffer = await canvas.toBuffer();
22502
- if (!buffer) throw new Error("Failed to generate image buffer");
22503
- composites.push({
22504
- top: y * pixelRatio,
22505
- left: x * pixelRatio,
22506
- input: buffer
22507
- });
22508
- }
22509
- background.destroy();
22510
- stage.position(originalPosition);
22511
- stage.scale(originalScale);
22512
- stage.batchDraw();
22513
- this.getNodesSelectionPlugin()?.enable();
22514
- this.getNodesDistanceSnappingPlugin()?.enable();
22515
- this.getNodesEdgeSnappingPlugin()?.enable();
22516
- this.getStageGridPlugin()?.enable();
22517
- return {
22518
- composites,
22519
- width: imageWidth * pixelRatio,
22520
- height: imageHeight * pixelRatio
22521
- };
22522
- }
22523
22398
  imageToBase64(img, mimeType) {
22524
22399
  if (img.naturalWidth === 0 && img.naturalHeight === 0) throw new Error("Image has no content");
22525
22400
  const canvas = document.createElement("canvas");
@@ -22799,12 +22674,7 @@ var WeaveAsyncManager = class {
22799
22674
  this.instance.emitEvent("onAsyncElementChange");
22800
22675
  }, new Map());
22801
22676
  }
22802
- reset() {
22803
- this.asyncElements.clear();
22804
- this.asyncElementsLoadedEventEmitted = false;
22805
- }
22806
22677
  checkForAsyncElements(elements) {
22807
- this.instance.emitEvent("onAsyncElementsIdle");
22808
22678
  const amountAsyncResourcesExtracted = this.extractAsyncResources(elements);
22809
22679
  if (amountAsyncResourcesExtracted === 0 && !this.asyncElementsLoadedEventEmitted) {
22810
22680
  this.instance.emitEvent("onAsyncElementsLoaded");
@@ -22857,7 +22727,7 @@ var WeaveAsyncManager = class {
22857
22727
  status: WEAVE_ASYNC_STATUS.LOADING
22858
22728
  };
22859
22729
  this.asyncElements.set(nodeId, element);
22860
- if (!this.asyncElementsLoadedEventEmitted) this.instance.emitEvent("onAsyncElementsLoading", {
22730
+ this.instance.emitEvent("onAsyncElementsLoading", {
22861
22731
  loaded: this.getAmountAsyncElementsLoaded(),
22862
22732
  total: this.getAmountAsyncElements()
22863
22733
  });
@@ -22870,11 +22740,11 @@ var WeaveAsyncManager = class {
22870
22740
  status: WEAVE_ASYNC_STATUS.LOADED
22871
22741
  };
22872
22742
  this.asyncElements.set(nodeId, element);
22743
+ this.instance.emitEvent("onAsyncElementsLoading", {
22744
+ loaded: this.getAmountAsyncElementsLoaded(),
22745
+ total: this.getAmountAsyncElements()
22746
+ });
22873
22747
  if (!this.asyncElementsLoadedEventEmitted) {
22874
- this.instance.emitEvent("onAsyncElementsLoading", {
22875
- loaded: this.getAmountAsyncElementsLoaded(),
22876
- total: this.getAmountAsyncElements()
22877
- });
22878
22748
  const allLoaded = this.asyncElementsLoaded();
22879
22749
  if (allLoaded) {
22880
22750
  this.instance.emitEvent("onAsyncElementsLoaded");
@@ -23091,34 +22961,6 @@ var Weave = class {
23091
22961
  store.setup();
23092
22962
  store.connect();
23093
22963
  }
23094
- async switchRoom() {
23095
- this.moduleLogger.info(`Switching room`);
23096
- const nodeHandlers = this.registerManager.getNodesHandlers();
23097
- for (const nodeHandlerKey of Object.keys(nodeHandlers)) {
23098
- const nodeHandler = nodeHandlers[nodeHandlerKey];
23099
- nodeHandler?.onDestroyInstance();
23100
- }
23101
- const stage = this.getStage();
23102
- if (stage) stage.destroy();
23103
- this.registerManager.reset();
23104
- this.asyncManager.reset();
23105
- this.moduleLogger.info("Switching room instance");
23106
- if (!this.isServerSide()) {
23107
- if (!window.weave) window.weave = this;
23108
- }
23109
- this.emitEvent("onRoomLoaded", false);
23110
- this.status = WEAVE_INSTANCE_STATUS.STARTING;
23111
- this.emitEvent("onInstanceStatus", this.status);
23112
- this.registerManager.reset();
23113
- this.status = WEAVE_INSTANCE_STATUS.LOADING_FONTS;
23114
- this.emitEvent("onInstanceStatus", this.status);
23115
- await this.fontsManager.loadFonts();
23116
- this.setupManager.setupLog();
23117
- this.stageManager.initStage();
23118
- this.status = WEAVE_INSTANCE_STATUS.CONNECTING_TO_ROOM;
23119
- this.emitEvent("onInstanceStatus", this.status);
23120
- this.addEventListener("onStoreConnectionStatusChange", this.handleStoreConnectionStatusChange.bind(this));
23121
- }
23122
22964
  destroy() {
23123
22965
  this.moduleLogger.info(`Destroying the instance`);
23124
22966
  this.emitter.clearListeners();
@@ -23590,9 +23432,6 @@ var Weave = class {
23590
23432
  async exportNodesServerSide(nodes, boundingNodes, options) {
23591
23433
  return await this.exportManager.exportNodesServerSide(nodes, boundingNodes, options);
23592
23434
  }
23593
- async exportAreaServerSide(area, options) {
23594
- return await this.exportManager.exportAreaServerSide(area, options);
23595
- }
23596
23435
  async exportNodes(nodes, boundingNodes, options) {
23597
23436
  return await this.exportManager.exportNodesAsImage(nodes, boundingNodes, options);
23598
23437
  }
@@ -23880,14 +23719,7 @@ const setupUpscaleStage = (instance, stage) => {
23880
23719
  innerElement.style.transformOrigin = "0 0";
23881
23720
  innerElement.style.transform = `scale(${scaleToCover})`;
23882
23721
  }
23883
- } else {
23884
- const realContainer = stage.container();
23885
- const containerWidth = realContainer.offsetWidth;
23886
- const containerHeight = realContainer.offsetHeight;
23887
- stage.width(containerWidth);
23888
- stage.height(containerHeight);
23889
- stage.setAttrs({ upscaleScale: 1 });
23890
- }
23722
+ } else stage.setAttrs({ upscaleScale: 1 });
23891
23723
  };
23892
23724
 
23893
23725
  //#endregion
@@ -23898,7 +23730,6 @@ var WeaveStageNode = class extends WeaveNode {
23898
23730
  wheelMousePressed = false;
23899
23731
  isCmdCtrlPressed = false;
23900
23732
  globalEventsInitialized = false;
23901
- initialize = void 0;
23902
23733
  onRender(props) {
23903
23734
  const stage = new Konva.Stage({
23904
23735
  ...props,
@@ -24021,7 +23852,6 @@ const WEAVE_LAYER_NODE_TYPE = "layer";
24021
23852
  //#region src/nodes/layer/layer.ts
24022
23853
  var WeaveLayerNode = class extends WeaveNode {
24023
23854
  nodeType = WEAVE_LAYER_NODE_TYPE;
24024
- initialize = void 0;
24025
23855
  onRender(props) {
24026
23856
  const layer = new Konva.Layer({ ...props });
24027
23857
  layer.canMoveToContainer = function() {
@@ -24069,7 +23899,6 @@ const WEAVE_GROUP_NODE_TYPE = "group";
24069
23899
  //#region src/nodes/group/group.ts
24070
23900
  var WeaveGroupNode = class extends WeaveNode {
24071
23901
  nodeType = WEAVE_GROUP_NODE_TYPE;
24072
- initialize = void 0;
24073
23902
  constructor(params) {
24074
23903
  super();
24075
23904
  const { config } = params ?? {};
@@ -24162,7 +23991,6 @@ const WEAVE_RECTANGLE_NODE_TYPE = "rectangle";
24162
23991
  //#region src/nodes/rectangle/rectangle.ts
24163
23992
  var WeaveRectangleNode = class extends WeaveNode {
24164
23993
  nodeType = WEAVE_RECTANGLE_NODE_TYPE;
24165
- initialize = void 0;
24166
23994
  constructor(params) {
24167
23995
  super();
24168
23996
  const { config } = params ?? {};
@@ -24206,7 +24034,6 @@ const WEAVE_ELLIPSE_NODE_TYPE = "ellipse";
24206
24034
  //#region src/nodes/ellipse/ellipse.ts
24207
24035
  var WeaveEllipseNode = class extends WeaveNode {
24208
24036
  nodeType = WEAVE_ELLIPSE_NODE_TYPE;
24209
- initialize = void 0;
24210
24037
  constructor(params) {
24211
24038
  super();
24212
24039
  const { config } = params ?? {};
@@ -24352,16 +24179,13 @@ var WeaveLineNode = class extends WeaveNode {
24352
24179
  constructor(params) {
24353
24180
  super();
24354
24181
  this.config = mergeExceptArrays(WEAVE_LINE_NODE_DEFAULT_CONFIG, params?.config ?? {});
24182
+ this.handleNodeChanges = null;
24183
+ this.handleZoomChanges = null;
24355
24184
  this.snapper = new GreedySnapper({
24356
24185
  snapAngles: this.config.snapAngles.angles,
24357
24186
  activateThreshold: this.config.snapAngles.activateThreshold,
24358
24187
  releaseThreshold: this.config.snapAngles.releaseThreshold
24359
24188
  });
24360
- this.initialize();
24361
- }
24362
- initialize() {
24363
- this.handleNodeChanges = null;
24364
- this.handleZoomChanges = null;
24365
24189
  }
24366
24190
  onRender(props) {
24367
24191
  const line = new Konva.Line({
@@ -24666,19 +24490,17 @@ const TEXT_LAYOUT = {
24666
24490
  //#region src/nodes/text/text.ts
24667
24491
  var WeaveTextNode = class extends WeaveNode {
24668
24492
  nodeType = WEAVE_TEXT_NODE_TYPE;
24493
+ editing = false;
24494
+ textAreaSuperContainer = null;
24495
+ textAreaContainer = null;
24496
+ textArea = null;
24497
+ eventsInitialized = false;
24498
+ isCtrlMetaPressed = false;
24669
24499
  constructor(params) {
24670
24500
  super();
24671
24501
  const { config } = params ?? {};
24672
24502
  this.config = (0, import_lodash.merge)({}, WEAVE_TEXT_NODE_DEFAULT_CONFIG, config);
24673
- this.initialize();
24674
- }
24675
- initialize() {
24676
24503
  this.keyPressHandler = void 0;
24677
- this.eventsInitialized = false;
24678
- this.isCtrlMetaPressed = false;
24679
- this.textAreaSuperContainer = null;
24680
- this.textAreaContainer = null;
24681
- this.textArea = null;
24682
24504
  this.editing = false;
24683
24505
  this.textArea = null;
24684
24506
  }
@@ -25339,6 +25161,8 @@ const WEAVE_IMAGE_DEFAULT_CONFIG = {
25339
25161
  crossOrigin: "anonymous",
25340
25162
  useFallbackImage: true,
25341
25163
  cropMode: {
25164
+ enabled: true,
25165
+ triggers: { ctrlCmd: true },
25342
25166
  gridLines: { enabled: true },
25343
25167
  overlay: { fill: "rgba(0,0,0,0.2)" },
25344
25168
  selection: {
@@ -26000,21 +25824,24 @@ const isAllowedUrl = (value) => {
26000
25824
  //#endregion
26001
25825
  //#region src/nodes/image/image.ts
26002
25826
  var WeaveImageNode = class extends WeaveNode {
25827
+ imageBitmapCache = {};
25828
+ imageSource = {};
25829
+ imageFallback = {};
25830
+ imageState = {};
25831
+ imageTryoutAttempts = {};
25832
+ imageTryoutIds = {};
26003
25833
  nodeType = WEAVE_IMAGE_NODE_TYPE;
26004
25834
  cursorsFallback = { loading: "wait" };
26005
25835
  cursors = {};
26006
25836
  constructor(params) {
26007
25837
  super();
26008
25838
  const { config } = params ?? {};
26009
- this.config = mergeExceptArrays(WEAVE_IMAGE_DEFAULT_CONFIG, config);
26010
- this.initialize();
26011
- }
26012
- initialize() {
26013
25839
  this.tapStart = {
26014
25840
  x: 0,
26015
25841
  y: 0,
26016
25842
  time: 0
26017
25843
  };
25844
+ this.config = mergeExceptArrays(WEAVE_IMAGE_DEFAULT_CONFIG, config);
26018
25845
  this.imageCrop = null;
26019
25846
  this.imageBitmapCache = {};
26020
25847
  this.imageSource = {};
@@ -26045,6 +25872,7 @@ var WeaveImageNode = class extends WeaveNode {
26045
25872
  this.logger.info(`image caching enabled: ${this.config.performance.cache.enabled}`);
26046
25873
  }
26047
25874
  triggerCrop(imageNode, options) {
25875
+ if (!this.config.cropMode.enabled) return;
26048
25876
  const stage = this.instance.getStage();
26049
25877
  if (imageNode.getAttrs().cropping ?? false) return;
26050
25878
  if (!(this.isSelecting() && this.isNodeSelected(imageNode))) return;
@@ -26070,6 +25898,7 @@ var WeaveImageNode = class extends WeaveNode {
26070
25898
  });
26071
25899
  }
26072
25900
  closeCrop = (imageNode, type) => {
25901
+ if (!this.config.cropMode.enabled) return;
26073
25902
  if (!this.imageCrop) return;
26074
25903
  const stage = this.instance.getStage();
26075
25904
  stage.mode(WEAVE_STAGE_DEFAULT_MODE);
@@ -26083,6 +25912,7 @@ var WeaveImageNode = class extends WeaveNode {
26083
25912
  }
26084
25913
  };
26085
25914
  resetCrop = (imageNode) => {
25915
+ if (!this.config.cropMode.enabled) return;
26086
25916
  const internalImage = imageNode.findOne(`#${imageNode.getAttrs().id}-image`);
26087
25917
  const cropGroup = imageNode.findOne(`#${imageNode.getAttrs().id}-cropGroup`);
26088
25918
  if (!internalImage || !cropGroup) return;
@@ -26126,19 +25956,21 @@ var WeaveImageNode = class extends WeaveNode {
26126
25956
  const image$1 = stage.findOne(`#${id}`);
26127
25957
  if (!image$1) return;
26128
25958
  };
26129
- image.triggerCrop = () => {
26130
- this.triggerCrop(image, { cmdCtrl: { triggered: false } });
26131
- };
26132
- image.closeCrop = (type) => {
26133
- this.closeCrop(image, type);
26134
- };
26135
- image.resetCrop = () => {
26136
- const stage = this.instance.getStage();
26137
- const image$1 = stage.findOne(`#${id}`);
26138
- if (!image$1) return;
26139
- const imageCrop = new WeaveImageCrop(this.instance, this, image$1, internalImage, cropGroup);
26140
- imageCrop.unCrop();
26141
- };
25959
+ if (this.config.cropMode.enabled) {
25960
+ image.triggerCrop = () => {
25961
+ this.triggerCrop(image, { cmdCtrl: { triggered: false } });
25962
+ };
25963
+ image.closeCrop = (type) => {
25964
+ this.closeCrop(image, type);
25965
+ };
25966
+ image.resetCrop = () => {
25967
+ const stage = this.instance.getStage();
25968
+ const image$1 = stage.findOne(`#${id}`);
25969
+ if (!image$1) return;
25970
+ const imageCrop = new WeaveImageCrop(this.instance, this, image$1, internalImage, cropGroup);
25971
+ imageCrop.unCrop();
25972
+ };
25973
+ }
26142
25974
  const defaultTransformerProperties = this.defaultGetTransformerProperties(this.config.transform);
26143
25975
  image.getTransformerProperties = function() {
26144
25976
  return defaultTransformerProperties;
@@ -26245,24 +26077,26 @@ var WeaveImageNode = class extends WeaveNode {
26245
26077
  if (this.imageCrop) this.closeCrop(image, WEAVE_IMAGE_CROP_END_TYPE.CANCEL);
26246
26078
  }
26247
26079
  });
26248
- image.on("onCmdCtrlPressed", () => {
26249
- const transformer = this.getSelectionPlugin()?.getTransformer();
26250
- if (!transformer) return;
26251
- transformer.hide();
26252
- const utilityLayer = this.instance.getUtilityLayer();
26253
- if (!utilityLayer) return;
26254
- utilityLayer?.destroyChildren();
26255
- this.renderCropMode(utilityLayer, image);
26256
- utilityLayer?.show();
26257
- });
26258
- image.on("onCmdCtrlReleased", () => {
26259
- const transformer = this.getSelectionPlugin()?.getTransformer();
26260
- if (!transformer) return;
26261
- transformer.show();
26262
- const utilityLayer = this.instance.getUtilityLayer();
26263
- if (!utilityLayer) return;
26264
- utilityLayer?.destroyChildren();
26265
- });
26080
+ if (this.config.cropMode.enabled && this.config.cropMode.triggers.ctrlCmd) {
26081
+ image.on("onCmdCtrlPressed", () => {
26082
+ const transformer = this.getSelectionPlugin()?.getTransformer();
26083
+ if (!transformer) return;
26084
+ transformer.hide();
26085
+ const utilityLayer = this.instance.getUtilityLayer();
26086
+ if (!utilityLayer) return;
26087
+ utilityLayer?.destroyChildren();
26088
+ this.renderCropMode(utilityLayer, image);
26089
+ utilityLayer?.show();
26090
+ });
26091
+ image.on("onCmdCtrlReleased", () => {
26092
+ const transformer = this.getSelectionPlugin()?.getTransformer();
26093
+ if (!transformer) return;
26094
+ transformer.show();
26095
+ const utilityLayer = this.instance.getUtilityLayer();
26096
+ if (!utilityLayer) return;
26097
+ utilityLayer?.destroyChildren();
26098
+ });
26099
+ }
26266
26100
  image.on("onSelectionCleared", () => {
26267
26101
  const transformer = this.getSelectionPlugin()?.getTransformer();
26268
26102
  if (!transformer) return;
@@ -26316,6 +26150,7 @@ var WeaveImageNode = class extends WeaveNode {
26316
26150
  width: absoluteCorners[1].x - absoluteCorners[0].x,
26317
26151
  height: absoluteCorners[2].y - absoluteCorners[0].y,
26318
26152
  fill: "transparent",
26153
+ strokeScaleEnabled: false,
26319
26154
  strokeWidth: 2,
26320
26155
  stroke: "#1a1aff",
26321
26156
  draggable: false,
@@ -26328,13 +26163,6 @@ var WeaveImageNode = class extends WeaveNode {
26328
26163
  x: 1 / stageScale,
26329
26164
  y: 1 / stageScale
26330
26165
  });
26331
- stage.on("scaleXChange scaleYChange", () => {
26332
- const scale = stage.scaleX();
26333
- rect.scale({
26334
- x: 1 / scale,
26335
- y: 1 / scale
26336
- });
26337
- });
26338
26166
  }
26339
26167
  renderCropAnchor(position, node, layer, onClick) {
26340
26168
  const transform = node.getAbsoluteTransform().copy();
@@ -26620,7 +26448,7 @@ var WeaveImageNode = class extends WeaveNode {
26620
26448
  }
26621
26449
  this.loadAsyncElement(id);
26622
26450
  preloadFunction(id, realImageURL ?? "", {
26623
- onLoad: async () => {
26451
+ onLoad: () => {
26624
26452
  if (useFallback) this.imageTryoutIds[id] = setTimeout(() => {
26625
26453
  const node = this.instance.getStage().findOne(`#${id}`);
26626
26454
  if (node) {
@@ -26852,7 +26680,6 @@ const WEAVE_STAR_NODE_TYPE = "star";
26852
26680
  //#region src/nodes/star/star.ts
26853
26681
  var WeaveStarNode = class extends WeaveNode {
26854
26682
  nodeType = WEAVE_STAR_NODE_TYPE;
26855
- initialize = void 0;
26856
26683
  constructor(params) {
26857
26684
  super();
26858
26685
  const { config } = params ?? {};
@@ -26938,7 +26765,6 @@ const WEAVE_ARROW_NODE_TYPE = "arrow";
26938
26765
  //#region src/nodes/arrow/arrow.ts
26939
26766
  var WeaveArrowNode = class extends WeaveNode {
26940
26767
  nodeType = WEAVE_ARROW_NODE_TYPE;
26941
- initialize = void 0;
26942
26768
  constructor(params) {
26943
26769
  super();
26944
26770
  const { config } = params ?? {};
@@ -26995,7 +26821,6 @@ const WEAVE_REGULAR_POLYGON_NODE_TYPE = "regular-polygon";
26995
26821
  //#region src/nodes/regular-polygon/regular-polygon.ts
26996
26822
  var WeaveRegularPolygonNode = class extends WeaveNode {
26997
26823
  nodeType = WEAVE_REGULAR_POLYGON_NODE_TYPE;
26998
- initialize = void 0;
26999
26824
  constructor(params) {
27000
26825
  super();
27001
26826
  const { config } = params ?? {};
@@ -27109,7 +26934,6 @@ var GroupFrame = class extends Konva.Group {
27109
26934
  //#region src/nodes/frame/frame.ts
27110
26935
  var WeaveFrameNode = class extends WeaveNode {
27111
26936
  nodeType = WEAVE_FRAME_NODE_TYPE;
27112
- initialize = void 0;
27113
26937
  constructor(params) {
27114
26938
  super();
27115
26939
  const { config } = params ?? {};
@@ -27410,7 +27234,6 @@ const WEAVE_STROKE_NODE_DEFAULT_CONFIG = {
27410
27234
  //#region src/nodes/stroke/stroke.ts
27411
27235
  var WeaveStrokeNode = class extends WeaveNode {
27412
27236
  nodeType = WEAVE_STROKE_NODE_TYPE;
27413
- initialize = void 0;
27414
27237
  constructor(params) {
27415
27238
  super();
27416
27239
  const { config } = params ?? {};
@@ -27987,6 +27810,8 @@ var WeaveSquareLineTipManager = class extends WeaveBaseLineTipManager {
27987
27810
  //#endregion
27988
27811
  //#region src/nodes/stroke-single/stroke-single.ts
27989
27812
  var WeaveStrokeSingleNode = class extends WeaveNode {
27813
+ startHandle = null;
27814
+ endHandle = null;
27990
27815
  nodeType = WEAVE_STROKE_SINGLE_NODE_TYPE;
27991
27816
  tipManagers = {
27992
27817
  [WEAVE_STROKE_SINGLE_NODE_TIP_TYPE.ARROW]: new WeaveArrowLineTipManager(),
@@ -27997,20 +27822,15 @@ var WeaveStrokeSingleNode = class extends WeaveNode {
27997
27822
  constructor(params) {
27998
27823
  super();
27999
27824
  this.config = mergeExceptArrays(WEAVE_STROKE_SINGLE_NODE_DEFAULT_CONFIG, params?.config ?? {});
27825
+ this.handleNodeChanges = null;
27826
+ this.handleZoomChanges = null;
27827
+ this.shiftPressed = false;
28000
27828
  this.snapper = new GreedySnapper({
28001
27829
  snapAngles: this.config.snapAngles.angles,
28002
27830
  activateThreshold: this.config.snapAngles.activateThreshold,
28003
27831
  releaseThreshold: this.config.snapAngles.releaseThreshold
28004
27832
  });
28005
- this.initialize();
28006
- }
28007
- initialize() {
28008
27833
  this.eventsInitialized = false;
28009
- this.startHandle = null;
28010
- this.endHandle = null;
28011
- this.handleNodeChanges = null;
28012
- this.handleZoomChanges = null;
28013
- this.shiftPressed = false;
28014
27834
  }
28015
27835
  initEvents() {
28016
27836
  if (this.eventsInitialized) return;
@@ -28506,9 +28326,6 @@ var WeaveCommentNode = class extends WeaveNode {
28506
28326
  constructor(params) {
28507
28327
  super();
28508
28328
  this.config = mergeExceptArrays(WEAVE_COMMENT_NODE_DEFAULTS, params.config);
28509
- this.initialize();
28510
- }
28511
- initialize() {
28512
28329
  this.commentDomVisibleId = null;
28513
28330
  this.commentDomVisible = false;
28514
28331
  this.commentDomAction = null;
@@ -29137,6 +28954,10 @@ const WEAVE_VIDEO_DEFAULT_CONFIG = {
29137
28954
  //#endregion
29138
28955
  //#region src/nodes/video/video.ts
29139
28956
  var WeaveVideoNode = class extends WeaveNode {
28957
+ videoState = {};
28958
+ videoSourceFrameId = {};
28959
+ videoSource = {};
28960
+ videoPlaceholder = {};
29140
28961
  nodeType = WEAVE_VIDEO_NODE_TYPE;
29141
28962
  constructor(params) {
29142
28963
  super();
@@ -29149,13 +28970,6 @@ var WeaveVideoNode = class extends WeaveNode {
29149
28970
  this.videoIconImage.src = this.config.style.icon.dataURL;
29150
28971
  }
29151
28972
  }
29152
- initialize() {
29153
- this.videoState = {};
29154
- this.videoSource = {};
29155
- this.videoSourceFrameId = {};
29156
- this.videoPlaceholder = {};
29157
- this.videoIconImage = void 0;
29158
- }
29159
28973
  async loadPlaceholder(params, video) {
29160
28974
  const videoProps = params;
29161
28975
  const { id } = videoProps;
@@ -29650,7 +29464,6 @@ const WEAVE_MEASURE_NODE_DEFAULT_CONFIG = { style: {
29650
29464
  var WeaveMeasureNode = class extends WeaveNode {
29651
29465
  nodeType = WEAVE_MEASURE_NODE_TYPE;
29652
29466
  handlePointCircleRadius = 6;
29653
- initialize = void 0;
29654
29467
  constructor(params) {
29655
29468
  super();
29656
29469
  this.config = mergeExceptArrays(WEAVE_MEASURE_NODE_DEFAULT_CONFIG, params?.config ?? {});
@@ -30941,7 +30754,6 @@ var WeaveConnectorNode = class extends WeaveNode {
30941
30754
  [WEAVE_CONNECTOR_NODE_DECORATOR_TYPE.DOT]: setupNodeDecoratorDot,
30942
30755
  [WEAVE_CONNECTOR_NODE_DECORATOR_TYPE.ARROW]: setupNodeDecoratorArrow
30943
30756
  };
30944
- initialize = void 0;
30945
30757
  constructor(params) {
30946
30758
  super();
30947
30759
  this.config = mergeExceptArrays(WEAVE_CONNECTOR_NODE_DEFAULT_CONFIG, params?.config);
@@ -31692,6 +31504,10 @@ const WEAVE_STAGE_ZOOM_DEFAULT_CONFIG = {
31692
31504
  var WeaveStageZoomPlugin = class extends WeavePlugin {
31693
31505
  getLayerName = void 0;
31694
31506
  initLayer = void 0;
31507
+ pinching = false;
31508
+ zooming = false;
31509
+ isTrackpad = false;
31510
+ zoomVelocity = 0;
31695
31511
  zoomInertiaType = WEAVE_STAGE_ZOOM_TYPE.MOUSE_WHEEL;
31696
31512
  defaultStep = 3;
31697
31513
  constructor(params) {
@@ -31699,13 +31515,8 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
31699
31515
  const { config } = params ?? {};
31700
31516
  this.config = mergeExceptArrays(WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, config);
31701
31517
  if (!this.config.zoomSteps.includes(this.config.defaultZoom)) throw new Error(`Default zoom ${this.config.defaultZoom} is not in zoom steps`);
31702
- this.initialize();
31703
- }
31704
- initialize() {
31705
31518
  this.pinching = false;
31706
- this.zooming = false;
31707
31519
  this.isTrackpad = false;
31708
- this.zoomVelocity = 0;
31709
31520
  this.isCtrlOrMetaPressed = false;
31710
31521
  this.updatedMinimumZoom = false;
31711
31522
  this.actualStep = this.config.zoomSteps.findIndex((step) => step === this.config.defaultZoom);
@@ -31992,15 +31803,6 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
31992
31803
  if (box.width === 0 || box.height === 0) return;
31993
31804
  this.fitToElements(box, finalOptions);
31994
31805
  }
31995
- fitToArea(area, options) {
31996
- const finalOptions = mergeExceptArrays({
31997
- smartZoom: false,
31998
- overrideZoom: true
31999
- }, options);
32000
- if (!this.enabled) return;
32001
- if (area.width === 0 || area.height === 0) return;
32002
- this.fitToElements(area, finalOptions);
32003
- }
32004
31806
  enable() {
32005
31807
  this.enabled = true;
32006
31808
  }
@@ -32181,7 +31983,6 @@ const ZOOM_OUT_TOOL_ACTION_NAME = "zoomOutTool";
32181
31983
  //#region src/actions/zoom-out-tool/zoom-out-tool.ts
32182
31984
  var WeaveZoomOutToolAction = class extends WeaveAction {
32183
31985
  onPropsChange = void 0;
32184
- initialize = void 0;
32185
31986
  getName() {
32186
31987
  return ZOOM_OUT_TOOL_ACTION_NAME;
32187
31988
  }
@@ -32216,10 +32017,6 @@ const ZOOM_IN_TOOL_ACTION_NAME = "zoomInTool";
32216
32017
  //#region src/actions/zoom-in-tool/zoom-in-tool.ts
32217
32018
  var WeaveZoomInToolAction = class extends WeaveAction {
32218
32019
  onPropsChange = void 0;
32219
- initialize = void 0;
32220
- constructor() {
32221
- super();
32222
- }
32223
32020
  getName() {
32224
32021
  return ZOOM_IN_TOOL_ACTION_NAME;
32225
32022
  }
@@ -32254,10 +32051,6 @@ const FIT_TO_SCREEN_TOOL_ACTION_NAME = "fitToScreenTool";
32254
32051
  //#region src/actions/fit-to-screen-tool/fit-to-screen-tool.ts
32255
32052
  var WeaveFitToScreenToolAction = class extends WeaveAction {
32256
32053
  onPropsChange = void 0;
32257
- initialize = void 0;
32258
- constructor() {
32259
- super();
32260
- }
32261
32054
  getName() {
32262
32055
  return FIT_TO_SCREEN_TOOL_ACTION_NAME;
32263
32056
  }
@@ -32291,10 +32084,6 @@ const FIT_TO_SELECTION_TOOL_ACTION_NAME = "fitToSelectionTool";
32291
32084
  //#region src/actions/fit-to-selection-tool/fit-to-selection-tool.ts
32292
32085
  var WeaveFitToSelectionToolAction = class extends WeaveAction {
32293
32086
  onPropsChange = void 0;
32294
- initialize = void 0;
32295
- constructor() {
32296
- super();
32297
- }
32298
32087
  getName() {
32299
32088
  return FIT_TO_SELECTION_TOOL_ACTION_NAME;
32300
32089
  }
@@ -32337,9 +32126,6 @@ var WeaveMoveToolAction = class extends WeaveAction {
32337
32126
  onInit = void 0;
32338
32127
  constructor() {
32339
32128
  super();
32340
- this.initialize();
32341
- }
32342
- initialize() {
32343
32129
  this.initialized = false;
32344
32130
  this.state = MOVE_TOOL_STATE.IDLE;
32345
32131
  }
@@ -32412,9 +32198,6 @@ var WeaveSelectionToolAction = class extends WeaveAction {
32412
32198
  onInit = void 0;
32413
32199
  constructor() {
32414
32200
  super();
32415
- this.initialize();
32416
- }
32417
- initialize() {
32418
32201
  this.initialized = false;
32419
32202
  this.state = SELECTION_TOOL_STATE.IDLE;
32420
32203
  }
@@ -32478,9 +32261,6 @@ var WeaveEraserToolAction = class extends WeaveAction {
32478
32261
  onInit = void 0;
32479
32262
  constructor() {
32480
32263
  super();
32481
- this.initialize();
32482
- }
32483
- initialize() {
32484
32264
  this.initialized = false;
32485
32265
  this.erasing = false;
32486
32266
  this.state = ERASER_TOOL_STATE.IDLE;
@@ -32581,9 +32361,6 @@ var WeaveRectangleToolAction = class extends WeaveAction {
32581
32361
  onInit = void 0;
32582
32362
  constructor() {
32583
32363
  super();
32584
- this.initialize();
32585
- }
32586
- initialize() {
32587
32364
  this.pointers = new Map();
32588
32365
  this.initialized = false;
32589
32366
  this.state = RECTANGLE_TOOL_STATE.IDLE;
@@ -32793,9 +32570,6 @@ var WeaveEllipseToolAction = class extends WeaveAction {
32793
32570
  onInit = void 0;
32794
32571
  constructor() {
32795
32572
  super();
32796
- this.initialize();
32797
- }
32798
- initialize() {
32799
32573
  this.pointers = new Map();
32800
32574
  this.initialized = false;
32801
32575
  this.state = ELLIPSE_TOOL_STATE.IDLE;
@@ -33012,9 +32786,6 @@ var WeavePenToolAction = class extends WeaveAction {
33012
32786
  onInit = void 0;
33013
32787
  constructor() {
33014
32788
  super();
33015
- this.initialize();
33016
- }
33017
- initialize() {
33018
32789
  this.pointers = new Map();
33019
32790
  this.initialized = false;
33020
32791
  this.state = PEN_TOOL_STATE.IDLE;
@@ -33287,9 +33058,6 @@ var WeaveLineToolAction = class extends WeaveAction {
33287
33058
  constructor(params) {
33288
33059
  super();
33289
33060
  this.config = mergeExceptArrays(LINE_TOOL_DEFAULT_CONFIG, params?.config ?? {});
33290
- this.initialize();
33291
- }
33292
- initialize() {
33293
33061
  this.pointers = new Map();
33294
33062
  this.initialized = false;
33295
33063
  this.state = LINE_TOOL_STATE.IDLE;
@@ -33555,9 +33323,6 @@ var WeaveBrushToolAction = class extends WeaveAction {
33555
33323
  constructor(params) {
33556
33324
  super();
33557
33325
  this.config = mergeExceptArrays(BRUSH_TOOL_DEFAULT_CONFIG, params?.config ?? {});
33558
- this.initialize();
33559
- }
33560
- initialize() {
33561
33326
  this.initialized = false;
33562
33327
  this.state = BRUSH_TOOL_STATE.INACTIVE;
33563
33328
  this.strokeId = null;
@@ -33811,9 +33576,6 @@ var WeaveTextToolAction = class extends WeaveAction {
33811
33576
  onInit = void 0;
33812
33577
  constructor() {
33813
33578
  super();
33814
- this.initialize();
33815
- }
33816
- initialize() {
33817
33579
  this.initialized = false;
33818
33580
  this.state = TEXT_TOOL_STATE.IDLE;
33819
33581
  this.textId = null;
@@ -33971,9 +33733,6 @@ var WeaveImageToolAction = class extends WeaveAction {
33971
33733
  constructor(params) {
33972
33734
  super();
33973
33735
  this.config = mergeExceptArrays(WEAVE_IMAGE_TOOL_CONFIG_DEFAULT, params?.config ?? {});
33974
- this.initialize();
33975
- }
33976
- initialize() {
33977
33736
  this.pointers = new Map();
33978
33737
  this.initialized = false;
33979
33738
  this.imageId = null;
@@ -34414,9 +34173,6 @@ var WeaveImagesToolAction = class extends WeaveAction {
34414
34173
  constructor(params) {
34415
34174
  super();
34416
34175
  this.config = mergeExceptArrays(WEAVE_IMAGES_TOOL_DEFAULT_CONFIG, params ?? {});
34417
- this.initialize();
34418
- }
34419
- initialize() {
34420
34176
  this.pointers = new Map();
34421
34177
  this.initialized = false;
34422
34178
  this.tempPointerFeedbackNode = null;
@@ -34845,9 +34601,6 @@ var WeaveStarToolAction = class extends WeaveAction {
34845
34601
  onInit = void 0;
34846
34602
  constructor() {
34847
34603
  super();
34848
- this.initialize();
34849
- }
34850
- initialize() {
34851
34604
  this.pointers = new Map();
34852
34605
  this.initialized = false;
34853
34606
  this.state = STAR_TOOL_STATE.IDLE;
@@ -35049,8 +34802,8 @@ var WeaveStarToolAction = class extends WeaveAction {
35049
34802
 
35050
34803
  //#endregion
35051
34804
  //#region src/actions/arrow-tool/constants.ts
35052
- const WEAVE_ARROW_TOOL_ACTION_NAME = "arrowTool";
35053
- const WEAVE_ARROW_TOOL_STATE = {
34805
+ const ARROW_TOOL_ACTION_NAME = "arrowTool";
34806
+ const ARROW_TOOL_STATE = {
35054
34807
  ["IDLE"]: "idle",
35055
34808
  ["ADDING"]: "adding",
35056
34809
  ["DEFINING_SIZE"]: "definingSize",
@@ -35066,12 +34819,9 @@ var WeaveArrowToolAction = class extends WeaveAction {
35066
34819
  onInit = void 0;
35067
34820
  constructor() {
35068
34821
  super();
35069
- this.initialize();
35070
- }
35071
- initialize() {
35072
34822
  this.pointers = new Map();
35073
34823
  this.initialized = false;
35074
- this.state = WEAVE_ARROW_TOOL_STATE.IDLE;
34824
+ this.state = ARROW_TOOL_STATE.IDLE;
35075
34825
  this.arrowId = null;
35076
34826
  this.tempArrowId = null;
35077
34827
  this.tempMainArrowNode = null;
@@ -35084,7 +34834,7 @@ var WeaveArrowToolAction = class extends WeaveAction {
35084
34834
  this.props = this.initProps();
35085
34835
  }
35086
34836
  getName() {
35087
- return WEAVE_ARROW_TOOL_ACTION_NAME;
34837
+ return ARROW_TOOL_ACTION_NAME;
35088
34838
  }
35089
34839
  initProps() {
35090
34840
  return {
@@ -35101,11 +34851,14 @@ var WeaveArrowToolAction = class extends WeaveAction {
35101
34851
  setupEvents() {
35102
34852
  const stage = this.instance.getStage();
35103
34853
  window.addEventListener("keydown", (e) => {
35104
- if (e.code === "Enter" && this.instance.getActiveAction() === WEAVE_ARROW_TOOL_ACTION_NAME) {
34854
+ if (e.code === "Enter" && this.instance.getActiveAction() === ARROW_TOOL_ACTION_NAME) {
34855
+ this.cancelAction();
34856
+ return;
34857
+ }
34858
+ if (e.code === "Escape" && this.instance.getActiveAction() === ARROW_TOOL_ACTION_NAME) {
35105
34859
  this.cancelAction();
35106
34860
  return;
35107
34861
  }
35108
- if (e.code === "Escape" && this.instance.getActiveAction() === WEAVE_ARROW_TOOL_ACTION_NAME) this.cancelAction();
35109
34862
  });
35110
34863
  stage.on("pointerdown", (e) => {
35111
34864
  this.setTapStart(e);
@@ -35113,25 +34866,25 @@ var WeaveArrowToolAction = class extends WeaveAction {
35113
34866
  x: e.evt.clientX,
35114
34867
  y: e.evt.clientY
35115
34868
  });
35116
- if (this.pointers.size === 2 && this.instance.getActiveAction() === WEAVE_ARROW_TOOL_ACTION_NAME) {
35117
- this.state = WEAVE_ARROW_TOOL_STATE.ADDING;
34869
+ if (this.pointers.size === 2 && this.instance.getActiveAction() === ARROW_TOOL_ACTION_NAME) {
34870
+ this.state = ARROW_TOOL_STATE.ADDING;
35118
34871
  return;
35119
34872
  }
35120
- if (!this.tempMainArrowNode && this.state === WEAVE_ARROW_TOOL_STATE.ADDING) this.handleAdding();
35121
- if (this.tempMainArrowNode && this.state === WEAVE_ARROW_TOOL_STATE.ADDING) this.state = WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE;
34873
+ if (!this.tempMainArrowNode && this.state === ARROW_TOOL_STATE.ADDING) this.handleAdding();
34874
+ if (this.tempMainArrowNode && this.state === ARROW_TOOL_STATE.ADDING) this.state = ARROW_TOOL_STATE.DEFINING_SIZE;
35122
34875
  });
35123
34876
  stage.on("pointermove", () => {
35124
- if (this.state === WEAVE_ARROW_TOOL_STATE.IDLE) return;
34877
+ if (this.state === ARROW_TOOL_STATE.IDLE) return;
35125
34878
  this.setCursor();
35126
- if (this.pointers.size === 2 && this.instance.getActiveAction() === WEAVE_ARROW_TOOL_ACTION_NAME) {
35127
- this.state = WEAVE_ARROW_TOOL_STATE.ADDING;
34879
+ if (this.pointers.size === 2 && this.instance.getActiveAction() === ARROW_TOOL_ACTION_NAME) {
34880
+ this.state = ARROW_TOOL_STATE.ADDING;
35128
34881
  return;
35129
34882
  }
35130
- if (this.state === WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE) this.handleMovement();
34883
+ if (this.state === ARROW_TOOL_STATE.DEFINING_SIZE) this.handleMovement();
35131
34884
  });
35132
34885
  stage.on("pointerup", (e) => {
35133
34886
  this.pointers.delete(e.evt.pointerId);
35134
- if (this.state === WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE) this.handleSettingSize();
34887
+ if (this.state === ARROW_TOOL_STATE.DEFINING_SIZE) this.handleSettingSize();
35135
34888
  });
35136
34889
  this.initialized = true;
35137
34890
  }
@@ -35145,7 +34898,7 @@ var WeaveArrowToolAction = class extends WeaveAction {
35145
34898
  this.tempPoint = void 0;
35146
34899
  this.tempNextPoint = void 0;
35147
34900
  this.clickPoint = null;
35148
- this.setState(WEAVE_ARROW_TOOL_STATE.ADDING);
34901
+ this.setState(ARROW_TOOL_STATE.ADDING);
35149
34902
  }
35150
34903
  handleAdding() {
35151
34904
  const stage = this.instance.getStage();
@@ -35196,7 +34949,7 @@ var WeaveArrowToolAction = class extends WeaveAction {
35196
34949
  this.measureContainer?.add(this.tempNextPoint);
35197
34950
  this.tempPoint.moveToTop();
35198
34951
  this.tempNextPoint.moveToTop();
35199
- this.setState(WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE);
34952
+ this.setState(ARROW_TOOL_STATE.DEFINING_SIZE);
35200
34953
  }
35201
34954
  }
35202
34955
  handleSettingSize() {
@@ -35223,11 +34976,11 @@ var WeaveArrowToolAction = class extends WeaveAction {
35223
34976
  y: mousePoint.y,
35224
34977
  points: [0, 0]
35225
34978
  });
35226
- this.setState(WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE);
34979
+ this.setState(ARROW_TOOL_STATE.DEFINING_SIZE);
35227
34980
  }
35228
34981
  }
35229
34982
  handleMovement() {
35230
- if (this.state !== WEAVE_ARROW_TOOL_STATE.DEFINING_SIZE) return;
34983
+ if (this.state !== ARROW_TOOL_STATE.DEFINING_SIZE) return;
35231
34984
  if (this.arrowId && this.tempArrowNode && this.measureContainer && this.tempNextPoint) {
35232
34985
  const { mousePoint } = this.instance.getMousePointerRelativeToContainer(this.measureContainer);
35233
34986
  this.tempArrowNode.setAttrs({
@@ -35294,7 +35047,7 @@ var WeaveArrowToolAction = class extends WeaveAction {
35294
35047
  this.container = void 0;
35295
35048
  this.measureContainer = void 0;
35296
35049
  this.clickPoint = null;
35297
- this.setState(WEAVE_ARROW_TOOL_STATE.IDLE);
35050
+ this.setState(ARROW_TOOL_STATE.IDLE);
35298
35051
  }
35299
35052
  setCursor() {
35300
35053
  const stage = this.instance.getStage();
@@ -35338,15 +35091,13 @@ const WEAVE_STROKE_TOOL_DEFAULT_CONFIG = { snapAngles: {
35338
35091
  var WeaveStrokeToolAction = class extends WeaveAction {
35339
35092
  initialized = false;
35340
35093
  initialCursor = null;
35094
+ snappedAngle = null;
35341
35095
  shiftPressed = false;
35342
35096
  onPropsChange = void 0;
35343
35097
  onInit = void 0;
35344
35098
  constructor(params) {
35345
35099
  super();
35346
35100
  this.config = mergeExceptArrays(WEAVE_STROKE_TOOL_DEFAULT_CONFIG, params?.config ?? {});
35347
- this.initialize();
35348
- }
35349
- initialize() {
35350
35101
  this.pointers = new Map();
35351
35102
  this.initialized = false;
35352
35103
  this.state = WEAVE_STROKE_TOOL_STATE.IDLE;
@@ -35355,6 +35106,7 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35355
35106
  this.tempLineId = null;
35356
35107
  this.tempLineNode = null;
35357
35108
  this.container = void 0;
35109
+ this.snappedAngle = null;
35358
35110
  this.measureContainer = void 0;
35359
35111
  this.clickPoint = null;
35360
35112
  this.snapper = new GreedySnapper({
@@ -35367,9 +35119,6 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35367
35119
  getName() {
35368
35120
  return WEAVE_STROKE_TOOL_ACTION_NAME;
35369
35121
  }
35370
- getNames() {
35371
- return [WEAVE_STROKE_TOOL_ACTION_NAME, ...WEAVE_STROKE_TOOL_ACTION_NAME_ALIASES];
35372
- }
35373
35122
  hasAliases() {
35374
35123
  return true;
35375
35124
  }
@@ -35388,18 +35137,24 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35388
35137
  setupEvents() {
35389
35138
  const stage = this.instance.getStage();
35390
35139
  window.addEventListener("keydown", (e) => {
35391
- if (e.code === "Enter" && this.getNames().includes(this.instance.getActiveAction() ?? "")) {
35140
+ if (e.code === "Enter" && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35392
35141
  this.cancelAction();
35393
35142
  return;
35394
35143
  }
35395
- if (e.code === "Escape" && this.getNames().includes(this.instance.getActiveAction() ?? "")) {
35144
+ if (e.code === "Escape" && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35396
35145
  this.cancelAction();
35397
35146
  return;
35398
35147
  }
35399
- if (e.key === "Shift" && this.getNames().includes(this.instance.getActiveAction() ?? "")) this.shiftPressed = true;
35148
+ if (e.key === "Shift" && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35149
+ this.snappedAngle = null;
35150
+ this.shiftPressed = true;
35151
+ }
35400
35152
  });
35401
35153
  window.addEventListener("keyup", (e) => {
35402
- if (e.key === "Shift" && this.getNames().includes(this.instance.getActiveAction() ?? "")) this.shiftPressed = false;
35154
+ if (e.key === "Shift" && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35155
+ this.snappedAngle = null;
35156
+ this.shiftPressed = false;
35157
+ }
35403
35158
  });
35404
35159
  stage.on("pointerdown", (e) => {
35405
35160
  this.setTapStart(e);
@@ -35407,7 +35162,7 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35407
35162
  x: e.evt.clientX,
35408
35163
  y: e.evt.clientY
35409
35164
  });
35410
- if (this.pointers.size === 2 && this.getNames().includes(this.instance.getActiveAction() ?? "")) {
35165
+ if (this.pointers.size === 2 && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35411
35166
  this.state = WEAVE_STROKE_TOOL_STATE.ADDING;
35412
35167
  return;
35413
35168
  }
@@ -35417,7 +35172,7 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35417
35172
  stage.on("pointermove", () => {
35418
35173
  if (this.state === WEAVE_STROKE_TOOL_STATE.IDLE) return;
35419
35174
  this.setCursor();
35420
- if (this.pointers.size === 2 && this.getNames().includes(this.instance.getActiveAction() ?? "")) {
35175
+ if (this.pointers.size === 2 && this.instance.getActiveAction() === WEAVE_STROKE_TOOL_ACTION_NAME) {
35421
35176
  this.state = WEAVE_STROKE_TOOL_STATE.ADDING;
35422
35177
  return;
35423
35178
  }
@@ -35435,7 +35190,7 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35435
35190
  addLine() {
35436
35191
  this.setCursor();
35437
35192
  this.setFocusStage();
35438
- this.instance.emitEvent("onAddingStroke", { actionName: this.instance.getActiveAction() ?? "not-defined" });
35193
+ this.instance.emitEvent("onAddingStroke", { actionName: this.instance.getActiveAction() ?? WEAVE_STROKE_TOOL_ACTION_NAME });
35439
35194
  this.shiftPressed = false;
35440
35195
  this.clickPoint = null;
35441
35196
  this.setState(WEAVE_STROKE_TOOL_STATE.ADDING);
@@ -35543,7 +35298,7 @@ var WeaveStrokeToolAction = class extends WeaveAction {
35543
35298
  });
35544
35299
  delete finalLine.props.dragBoundFunc;
35545
35300
  this.instance.addNode(finalLine, this.container?.getAttrs().id);
35546
- this.instance.emitEvent("onAddedStroke", { actionName: this.instance.getActiveAction() ?? "not-defined" });
35301
+ this.instance.emitEvent("onAddedStroke", { actionName: this.instance.getActiveAction() ?? WEAVE_STROKE_TOOL_ACTION_NAME });
35547
35302
  nodeCreated = true;
35548
35303
  }
35549
35304
  }
@@ -35593,9 +35348,6 @@ var WeaveRegularPolygonToolAction = class extends WeaveAction {
35593
35348
  onInit = void 0;
35594
35349
  constructor() {
35595
35350
  super();
35596
- this.initialize();
35597
- }
35598
- initialize() {
35599
35351
  this.pointers = new Map();
35600
35352
  this.initialized = false;
35601
35353
  this.state = REGULAR_POLYGON_TOOL_STATE.IDLE;
@@ -35804,9 +35556,6 @@ var WeaveFrameToolAction = class extends WeaveAction {
35804
35556
  onInit = void 0;
35805
35557
  constructor() {
35806
35558
  super();
35807
- this.initialize();
35808
- }
35809
- initialize() {
35810
35559
  this.initialized = false;
35811
35560
  this.state = FRAME_TOOL_STATE.IDLE;
35812
35561
  this.frameId = null;
@@ -35936,10 +35685,6 @@ var WeaveExportStageToolAction = class extends WeaveAction {
35936
35685
  };
35937
35686
  onPropsChange = void 0;
35938
35687
  onInit = void 0;
35939
- initialize = void 0;
35940
- constructor() {
35941
- super();
35942
- }
35943
35688
  getName() {
35944
35689
  return EXPORT_STAGE_TOOL_ACTION_NAME;
35945
35690
  }
@@ -35987,10 +35732,6 @@ var WeaveExportNodesToolAction = class extends WeaveAction {
35987
35732
  };
35988
35733
  onPropsChange = void 0;
35989
35734
  onInit = void 0;
35990
- initialize = void 0;
35991
- constructor() {
35992
- super();
35993
- }
35994
35735
  getName() {
35995
35736
  return EXPORT_NODES_TOOL_ACTION_NAME;
35996
35737
  }
@@ -36043,9 +35784,6 @@ var WeaveAlignNodesToolAction = class extends WeaveAction {
36043
35784
  onInit = void 0;
36044
35785
  constructor() {
36045
35786
  super();
36046
- this.initialize();
36047
- }
36048
- initialize() {
36049
35787
  this.initialized = false;
36050
35788
  this.state = ALIGN_NODES_TOOL_STATE.IDLE;
36051
35789
  }
@@ -36295,9 +36033,6 @@ var WeaveCommentToolAction = class extends WeaveAction {
36295
36033
  super();
36296
36034
  const { config } = params ?? {};
36297
36035
  this.config = mergeExceptArrays(WEAVE_COMMENT_TOOL_DEFAULT_CONFIG, config);
36298
- this.initialize();
36299
- }
36300
- initialize() {
36301
36036
  this.pointers = new Map();
36302
36037
  this.initialized = false;
36303
36038
  this.state = WEAVE_COMMENT_TOOL_STATE.IDLE;
@@ -36526,9 +36261,6 @@ var WeaveVideoToolAction = class extends WeaveAction {
36526
36261
  update = void 0;
36527
36262
  constructor() {
36528
36263
  super();
36529
- this.initialize();
36530
- }
36531
- initialize() {
36532
36264
  this.pointers = new Map();
36533
36265
  this.initialized = false;
36534
36266
  this.state = VIDEO_TOOL_STATE.IDLE;
@@ -36708,9 +36440,6 @@ var WeaveMeasureToolAction = class extends WeaveAction {
36708
36440
  constructor(params) {
36709
36441
  super();
36710
36442
  this.config = mergeExceptArrays(WEAVE_MEASURE_TOOL_DEFAULT_CONFIG, params?.config ?? {});
36711
- this.initialize();
36712
- }
36713
- initialize() {
36714
36443
  this.initialized = false;
36715
36444
  this.state = MEASURE_TOOL_STATE.IDLE;
36716
36445
  this.measureId = null;
@@ -37007,9 +36736,6 @@ var WeaveConnectorToolAction = class extends WeaveAction {
37007
36736
  constructor(params) {
37008
36737
  super();
37009
36738
  this.config = mergeExceptArrays(CONNECTOR_TOOL_DEFAULT_CONFIG, params?.config);
37010
- this.initialize();
37011
- }
37012
- initialize() {
37013
36739
  this.pointers = new Map();
37014
36740
  this.initialized = false;
37015
36741
  this.tempLineNode = null;
@@ -37363,9 +37089,16 @@ var WeaveConnectorToolAction = class extends WeaveAction {
37363
37089
  //#endregion
37364
37090
  //#region src/plugins/stage-grid/stage-grid.ts
37365
37091
  var WeaveStageGridPlugin = class extends WeavePlugin {
37092
+ actStageZoomX = 1;
37093
+ actStageZoomY = 1;
37094
+ actStagePosX = 0;
37095
+ actStagePosY = 0;
37366
37096
  constructor(params) {
37367
37097
  super();
37368
37098
  const { config } = params ?? {};
37099
+ this.moveToolActive = false;
37100
+ this.isMouseMiddleButtonPressed = false;
37101
+ this.isSpaceKeyPressed = false;
37369
37102
  this.config = {
37370
37103
  type: WEAVE_GRID_DEFAULT_TYPE,
37371
37104
  gridColor: WEAVE_GRID_DEFAULT_COLOR,
@@ -37374,17 +37107,7 @@ var WeaveStageGridPlugin = class extends WeavePlugin {
37374
37107
  gridDotMaxDotsPerAxis: WEAVE_GRID_DEFAULT_DOT_MAX_DOTS_PER_AXIS,
37375
37108
  ...config
37376
37109
  };
37377
- this.initialize();
37378
- }
37379
- initialize() {
37380
- this.moveToolActive = false;
37381
- this.isMouseMiddleButtonPressed = false;
37382
- this.isSpaceKeyPressed = false;
37383
37110
  this.forceStageChange = false;
37384
- this.actStagePosX = 0;
37385
- this.actStagePosY = 0;
37386
- this.actStageZoomX = 1;
37387
- this.actStageZoomY = 1;
37388
37111
  }
37389
37112
  getName() {
37390
37113
  return WEAVE_STAGE_GRID_PLUGIN_KEY;
@@ -37646,14 +37369,15 @@ var WeaveStageGridPlugin = class extends WeavePlugin {
37646
37369
  //#endregion
37647
37370
  //#region src/plugins/stage-panning/stage-panning.ts
37648
37371
  var WeaveStagePanningPlugin = class extends WeavePlugin {
37372
+ panning = false;
37373
+ currentPointer = null;
37374
+ stageScrollInterval = void 0;
37375
+ panEdgeTargets = {};
37649
37376
  getLayerName = void 0;
37650
37377
  initLayer = void 0;
37651
37378
  constructor(params) {
37652
37379
  super();
37653
37380
  this.config = mergeExceptArrays(WEAVE_STAGE_PANNING_DEFAULT_CONFIG, params?.config ?? {});
37654
- this.initialize();
37655
- }
37656
- initialize() {
37657
37381
  this.pointers = new Map();
37658
37382
  this.panning = false;
37659
37383
  this.isDragging = false;
@@ -37665,9 +37389,6 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
37665
37389
  this.isCtrlOrMetaPressed = false;
37666
37390
  this.isSpaceKeyPressed = false;
37667
37391
  this.previousPointer = null;
37668
- this.currentPointer = null;
37669
- this.stageScrollInterval = void 0;
37670
- this.panEdgeTargets = {};
37671
37392
  }
37672
37393
  getName() {
37673
37394
  return WEAVE_STAGE_PANNING_KEY;
@@ -37921,9 +37642,6 @@ var WeaveStageMinimapPlugin = class extends WeavePlugin {
37921
37642
  constructor(params) {
37922
37643
  super();
37923
37644
  this.config = mergeExceptArrays(STAGE_MINIMAP_DEFAULT_CONFIG, params.config);
37924
- this.initialize();
37925
- }
37926
- initialize() {
37927
37645
  this.initialized = false;
37928
37646
  }
37929
37647
  getName() {
@@ -38101,7 +37819,6 @@ const WEAVE_STAGE_RESIZE_KEY = "stageResize";
38101
37819
  var WeaveStageResizePlugin = class extends WeavePlugin {
38102
37820
  getLayerName = void 0;
38103
37821
  initLayer = void 0;
38104
- initialize = void 0;
38105
37822
  getName() {
38106
37823
  return WEAVE_STAGE_RESIZE_KEY;
38107
37824
  }
@@ -38121,10 +37838,6 @@ var WeaveStageResizePlugin = class extends WeavePlugin {
38121
37838
  const pluginInstance = plugins[pluginId];
38122
37839
  pluginInstance.onRender?.();
38123
37840
  }
38124
- this.instance.emitEvent("onStageResize", {
38125
- width: stage.width(),
38126
- height: stage.height()
38127
- });
38128
37841
  }
38129
37842
  }
38130
37843
  onInit() {
@@ -38151,12 +37864,10 @@ var WeaveStageResizePlugin = class extends WeavePlugin {
38151
37864
  //#endregion
38152
37865
  //#region src/plugins/nodes-multi-selection-feedback/nodes-multi-selection-feedback.ts
38153
37866
  var WeaveNodesMultiSelectionFeedbackPlugin = class extends WeavePlugin {
37867
+ selectedHalos = {};
38154
37868
  constructor(params) {
38155
37869
  super();
38156
37870
  this.config = mergeExceptArrays(WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_DEFAULT_CONFIG, params?.config ?? {});
38157
- this.initialize();
38158
- }
38159
- initialize() {
38160
37871
  this.selectedHalos = {};
38161
37872
  }
38162
37873
  getName() {
@@ -38322,14 +38033,12 @@ var WeaveNodesMultiSelectionFeedbackPlugin = class extends WeavePlugin {
38322
38033
  //#endregion
38323
38034
  //#region src/plugins/connected-users/connected-users.ts
38324
38035
  var WeaveConnectedUsersPlugin = class extends WeavePlugin {
38036
+ connectedUsers = {};
38325
38037
  getLayerName = void 0;
38326
38038
  constructor(params) {
38327
38039
  super();
38328
38040
  const { config } = params ?? {};
38329
38041
  this.config = config;
38330
- this.initialize();
38331
- }
38332
- initialize() {
38333
38042
  this.connectedUsers = {};
38334
38043
  }
38335
38044
  getName() {
@@ -38376,9 +38085,6 @@ var WeaveUsersSelectionPlugin = class extends WeavePlugin {
38376
38085
  this.config = config;
38377
38086
  this.config.getUser = memoize(this.config.getUser);
38378
38087
  this.config.getUserColor = memoize(this.config.getUserColor);
38379
- this.initialize();
38380
- }
38381
- initialize() {
38382
38088
  this.usersSelection = {};
38383
38089
  }
38384
38090
  getName() {
@@ -38571,9 +38277,6 @@ var WeaveUsersPointersPlugin = class extends WeavePlugin {
38571
38277
  this.config.getUser = memoize(this.config.getUser);
38572
38278
  this.config.getUserBackgroundColor = memoize(this.config.getUserBackgroundColor);
38573
38279
  this.config.getUserForegroundColor = memoize(this.config.getUserForegroundColor);
38574
- this.initialize();
38575
- }
38576
- initialize() {
38577
38280
  this.usersPointers = {};
38578
38281
  this.usersOperations = {};
38579
38282
  }
@@ -38784,9 +38487,6 @@ var WeaveUsersPresencePlugin = class extends WeavePlugin {
38784
38487
  super();
38785
38488
  const { config } = params;
38786
38489
  this.config = mergeExceptArrays(WEAVE_USERS_PRESENCE_CONFIG_DEFAULT_PROPS, config);
38787
- this.initialize();
38788
- }
38789
- initialize() {
38790
38490
  this.userPresence = {};
38791
38491
  }
38792
38492
  getName() {
@@ -38862,9 +38562,6 @@ var WeaveStageDropAreaPlugin = class extends WeavePlugin {
38862
38562
  initLayer = void 0;
38863
38563
  constructor() {
38864
38564
  super();
38865
- this.initialize();
38866
- }
38867
- initialize() {
38868
38565
  this.enabled = true;
38869
38566
  }
38870
38567
  getName() {
@@ -38904,9 +38601,6 @@ var WeaveNodesEdgeSnappingPlugin = class extends WeavePlugin {
38904
38601
  this.guideLineConfig = config?.guideLine ?? GUIDE_LINE_DEFAULT_CONFIG;
38905
38602
  this.dragSnappingThreshold = config?.dragSnappingThreshold ?? GUIDE_LINE_DRAG_SNAPPING_THRESHOLD;
38906
38603
  this.transformSnappingThreshold = config?.transformSnappingThreshold ?? GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD;
38907
- this.initialize();
38908
- }
38909
- initialize() {
38910
38604
  this.enabled = true;
38911
38605
  }
38912
38606
  getName() {
@@ -39283,9 +38977,6 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
39283
38977
  this.enterSnappingTolerance = config?.enterSnappingTolerance ?? GUIDE_ENTER_SNAPPING_TOLERANCE;
39284
38978
  this.exitSnappingTolerance = config?.exitSnappingTolerance ?? GUIDE_EXIT_SNAPPING_TOLERANCE;
39285
38979
  this.uiConfig = mergeExceptArrays(GUIDE_DISTANCE_LINE_DEFAULT_CONFIG, config?.ui);
39286
- this.initialize();
39287
- }
39288
- initialize() {
39289
38980
  this.enabled = true;
39290
38981
  }
39291
38982
  getName() {
@@ -39932,14 +39623,12 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
39932
39623
  //#endregion
39933
39624
  //#region src/plugins/comments-renderer/comments-renderer.ts
39934
39625
  var WeaveCommentsRendererPlugin = class extends WeavePlugin {
39626
+ comments = [];
39935
39627
  getLayerName = void 0;
39936
39628
  constructor(params) {
39937
39629
  super();
39938
39630
  const { config } = params ?? {};
39939
39631
  this.config = config;
39940
- this.initialize();
39941
- }
39942
- initialize() {
39943
39632
  this.comments = [];
39944
39633
  }
39945
39634
  getName() {
@@ -40030,7 +39719,6 @@ const WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG = { movementDelta: 5 };
40030
39719
  var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
40031
39720
  getLayerName = void 0;
40032
39721
  initLayer = void 0;
40033
- initialize = void 0;
40034
39722
  constructor(params) {
40035
39723
  super();
40036
39724
  this.config = mergeExceptArrays(WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG, params?.config ?? {});
@@ -40091,4 +39779,4 @@ const setupCanvasBackend = async () => {
40091
39779
  };
40092
39780
 
40093
39781
  //#endregion
40094
- 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_COLOR, WEAVE_GRID_DEFAULT_DOT_MAX_DOTS_PER_AXIS, WEAVE_GRID_DEFAULT_MAJOR_DOT_RATIO, WEAVE_GRID_DEFAULT_MAJOR_EVERY, WEAVE_GRID_DEFAULT_MAJOR_LINE_RATIO, WEAVE_GRID_DEFAULT_ORIGIN_COLOR, WEAVE_GRID_DEFAULT_RADIUS, WEAVE_GRID_DEFAULT_SIZE, WEAVE_GRID_DEFAULT_STROKE, WEAVE_GRID_DEFAULT_TYPE, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_GROUP_NODE_TYPE, WEAVE_IMAGES_TOOL_ACTION_NAME, WEAVE_IMAGES_TOOL_DEFAULT_CONFIG, WEAVE_IMAGES_TOOL_STATE, WEAVE_IMAGES_TOOL_UPLOAD_TYPE, WEAVE_IMAGE_CROP_ANCHOR_POSITION, WEAVE_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_DEFAULT_CONFIG, WEAVE_IMAGE_NODE_TYPE, WEAVE_IMAGE_TOOL_ACTION_NAME, WEAVE_IMAGE_TOOL_CONFIG_DEFAULT, WEAVE_IMAGE_TOOL_STATE, WEAVE_IMAGE_TOOL_UPLOAD_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_DEFAULT_CONFIG, WEAVE_LINE_NODE_TYPE, WEAVE_MEASURE_NODE_DEFAULT_CONFIG, WEAVE_MEASURE_NODE_TYPE, WEAVE_MEASURE_TOOL_DEFAULT_CONFIG, WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_DEFAULT_CONFIG, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_KEY, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_LAYER_ID, WEAVE_NODES_SELECTION_DEFAULT_CONFIG, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_STAGE_DEFAULT_MODE, WEAVE_STAGE_DROP_AREA_KEY, WEAVE_STAGE_GRID_PLUGIN_KEY, WEAVE_STAGE_IMAGE_CROPPING_MODE, WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG, WEAVE_STAGE_KEYBOARD_MOVE_KEY, WEAVE_STAGE_MINIMAP_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAGE_PANNING_DEFAULT_CONFIG, WEAVE_STAGE_PANNING_KEY, WEAVE_STAGE_PANNING_THROTTLE_MS, WEAVE_STAGE_TEXT_EDITION_MODE, WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, WEAVE_STAGE_ZOOM_KEY, WEAVE_STAGE_ZOOM_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_NODE_TYPE, WEAVE_STROKE_SINGLE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_SINGLE_NODE_TIP_SIDE, WEAVE_STROKE_SINGLE_NODE_TIP_TYPE, WEAVE_STROKE_SINGLE_NODE_TYPE, WEAVE_STROKE_TOOL_ACTION_NAME, WEAVE_STROKE_TOOL_ACTION_NAME_ALIASES, WEAVE_STROKE_TOOL_DEFAULT_CONFIG, WEAVE_STROKE_TOOL_STATE, WEAVE_TEXT_NODE_DEFAULT_CONFIG, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_CONFIG_DEFAULT_PROPS, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_PRESENCE_CONFIG_DEFAULT_PROPS, WEAVE_USERS_PRESENCE_PLUGIN_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTER_KEY, WEAVE_USER_PRESENCE_KEY, WEAVE_USER_SELECTION_KEY, WEAVE_VIDEO_DEFAULT_CONFIG, WEAVE_VIDEO_NODE_TYPE, Weave, WeaveAction, WeaveAlignNodesToolAction, WeaveArrowNode, WeaveArrowToolAction, WeaveBrushToolAction, WeaveCommentNode, WeaveCommentToolAction, WeaveCommentsRendererPlugin, WeaveConnectedUsersPlugin, WeaveConnectorNode, WeaveConnectorToolAction, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveEllipseNode, WeaveEllipseToolAction, WeaveEraserToolAction, WeaveExportNodesToolAction, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToSelectionToolAction, WeaveFrameNode, WeaveFrameToolAction, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveImagesToolAction, WeaveLayerNode, WeaveLineNode, WeaveLineToolAction, WeaveMeasureNode, WeaveMeasureToolAction, WeaveMoveToolAction, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesEdgeSnappingPlugin, WeaveNodesMultiSelectionFeedbackPlugin, WeaveNodesSelectionPlugin, WeavePenToolAction, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRegularPolygonNode, WeaveRegularPolygonToolAction, WeaveRenderer, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageKeyboardMovePlugin, WeaveStageMinimapPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStarNode, WeaveStarToolAction, WeaveStore, WeaveStrokeNode, WeaveStrokeSingleNode, WeaveStrokeToolAction, WeaveTextNode, WeaveTextToolAction, WeaveUsersPointersPlugin, WeaveUsersPresencePlugin, WeaveUsersSelectionPlugin, WeaveVideoNode, WeaveVideoToolAction, WeaveZoomInToolAction, WeaveZoomOutToolAction, canComposite, clearContainerTargets, containerOverCursor, containsNodeDeep, defaultInitialState, downscaleImageFile, downscaleImageFromURL, getBoundingBox, getDownscaleRatio, getExportBoundingBox, getImageSizeFromFile, getPositionRelativeToContainerOnPosition, getSelectedNodesMetadata, getStageClickPoint, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodes, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isIOS, isInShadowDOM, isNodeInSelection, isServer, loadImageSource, memoize, mergeExceptArrays, moveNodeToContainer, moveNodeToContainerNT, resetScale, setupCanvasBackend, setupSkiaBackend };
39782
+ 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_COLOR, WEAVE_GRID_DEFAULT_DOT_MAX_DOTS_PER_AXIS, WEAVE_GRID_DEFAULT_MAJOR_DOT_RATIO, WEAVE_GRID_DEFAULT_MAJOR_EVERY, WEAVE_GRID_DEFAULT_MAJOR_LINE_RATIO, WEAVE_GRID_DEFAULT_ORIGIN_COLOR, WEAVE_GRID_DEFAULT_RADIUS, WEAVE_GRID_DEFAULT_SIZE, WEAVE_GRID_DEFAULT_STROKE, WEAVE_GRID_DEFAULT_TYPE, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_GROUP_NODE_TYPE, WEAVE_IMAGES_TOOL_ACTION_NAME, WEAVE_IMAGES_TOOL_DEFAULT_CONFIG, WEAVE_IMAGES_TOOL_STATE, WEAVE_IMAGES_TOOL_UPLOAD_TYPE, WEAVE_IMAGE_CROP_ANCHOR_POSITION, WEAVE_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_DEFAULT_CONFIG, WEAVE_IMAGE_NODE_TYPE, WEAVE_IMAGE_TOOL_ACTION_NAME, WEAVE_IMAGE_TOOL_CONFIG_DEFAULT, WEAVE_IMAGE_TOOL_STATE, WEAVE_IMAGE_TOOL_UPLOAD_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_DEFAULT_CONFIG, WEAVE_LINE_NODE_TYPE, WEAVE_MEASURE_NODE_DEFAULT_CONFIG, WEAVE_MEASURE_NODE_TYPE, WEAVE_MEASURE_TOOL_DEFAULT_CONFIG, WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_DEFAULT_CONFIG, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_KEY, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_LAYER_ID, WEAVE_NODES_SELECTION_DEFAULT_CONFIG, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_STAGE_DEFAULT_MODE, WEAVE_STAGE_DROP_AREA_KEY, WEAVE_STAGE_GRID_PLUGIN_KEY, WEAVE_STAGE_IMAGE_CROPPING_MODE, WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG, WEAVE_STAGE_KEYBOARD_MOVE_KEY, WEAVE_STAGE_MINIMAP_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAGE_PANNING_DEFAULT_CONFIG, WEAVE_STAGE_PANNING_KEY, WEAVE_STAGE_PANNING_THROTTLE_MS, WEAVE_STAGE_TEXT_EDITION_MODE, WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, WEAVE_STAGE_ZOOM_KEY, WEAVE_STAGE_ZOOM_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_NODE_TYPE, WEAVE_STROKE_SINGLE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_SINGLE_NODE_TIP_SIDE, WEAVE_STROKE_SINGLE_NODE_TIP_TYPE, WEAVE_STROKE_SINGLE_NODE_TYPE, WEAVE_STROKE_TOOL_ACTION_NAME, WEAVE_STROKE_TOOL_ACTION_NAME_ALIASES, WEAVE_STROKE_TOOL_DEFAULT_CONFIG, WEAVE_STROKE_TOOL_STATE, WEAVE_TEXT_NODE_DEFAULT_CONFIG, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_CONFIG_DEFAULT_PROPS, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_PRESENCE_CONFIG_DEFAULT_PROPS, WEAVE_USERS_PRESENCE_PLUGIN_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTER_KEY, WEAVE_USER_PRESENCE_KEY, WEAVE_USER_SELECTION_KEY, WEAVE_VIDEO_DEFAULT_CONFIG, WEAVE_VIDEO_NODE_TYPE, Weave, WeaveAction, WeaveAlignNodesToolAction, WeaveArrowNode, WeaveArrowToolAction, WeaveBrushToolAction, WeaveCommentNode, WeaveCommentToolAction, WeaveCommentsRendererPlugin, WeaveConnectedUsersPlugin, WeaveConnectorNode, WeaveConnectorToolAction, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveEllipseNode, WeaveEllipseToolAction, WeaveEraserToolAction, WeaveExportNodesToolAction, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToSelectionToolAction, WeaveFrameNode, WeaveFrameToolAction, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveImagesToolAction, WeaveLayerNode, WeaveLineNode, WeaveLineToolAction, WeaveMeasureNode, WeaveMeasureToolAction, WeaveMoveToolAction, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesEdgeSnappingPlugin, WeaveNodesMultiSelectionFeedbackPlugin, WeaveNodesSelectionPlugin, WeavePenToolAction, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRegularPolygonNode, WeaveRegularPolygonToolAction, WeaveRenderer, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageKeyboardMovePlugin, WeaveStageMinimapPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStarNode, WeaveStarToolAction, WeaveStore, WeaveStrokeNode, WeaveStrokeSingleNode, WeaveStrokeToolAction, WeaveTextNode, WeaveTextToolAction, WeaveUsersPointersPlugin, WeaveUsersPresencePlugin, WeaveUsersSelectionPlugin, WeaveVideoNode, WeaveVideoToolAction, WeaveZoomInToolAction, WeaveZoomOutToolAction, canComposite, clearContainerTargets, containerOverCursor, containsNodeDeep, defaultInitialState, downscaleImageFile, downscaleImageFromURL, getBoundingBox, getDownscaleRatio, getExportBoundingBox, getImageSizeFromFile, getPositionRelativeToContainerOnPosition, getSelectedNodesMetadata, getStageClickPoint, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodes, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isIOS, isInShadowDOM, isNodeInSelection, isServer, loadImageSource, memoize, mergeExceptArrays, moveNodeToContainer, moveNodeToContainerNT, resetScale, setupCanvasBackend, setupSkiaBackend };