@inditextech/weave-sdk 0.52.1 → 0.52.3
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.cjs +165 -96
- package/dist/sdk.d.cts +17 -3
- package/dist/sdk.d.cts.map +1 -1
- package/dist/sdk.d.ts +17 -3
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +177 -109
- package/dist/sdk.js.map +1 -1
- package/package.json +2 -2
package/dist/sdk.js
CHANGED
|
@@ -15494,6 +15494,7 @@ var require_lodash = __commonJS({ "../../node_modules/lodash/lodash.js"(exports,
|
|
|
15494
15494
|
} else root._ = _;
|
|
15495
15495
|
}).call(exports);
|
|
15496
15496
|
} });
|
|
15497
|
+
var import_lodash$1 = __toESM(require_lodash());
|
|
15497
15498
|
var import_lodash = __toESM(require_lodash(), 1);
|
|
15498
15499
|
|
|
15499
15500
|
//#endregion
|
|
@@ -15588,12 +15589,12 @@ var WeaveStore = class {
|
|
|
15588
15589
|
node: JSON.parse(JSON.stringify(nodeInfo.node))
|
|
15589
15590
|
});
|
|
15590
15591
|
}
|
|
15591
|
-
if (!this.isRoomLoaded && !(0, import_lodash.isEmpty)(this.state.weave)) {
|
|
15592
|
+
if (!this.isRoomLoaded && !(0, import_lodash$1.isEmpty)(this.state.weave)) {
|
|
15592
15593
|
this.instance.setupRenderer();
|
|
15593
15594
|
this.isRoomLoaded = true;
|
|
15594
15595
|
this.instance.emitEvent("onRoomLoaded", this.isRoomLoaded);
|
|
15595
15596
|
}
|
|
15596
|
-
if (this.isRoomLoaded && !(0, import_lodash.isEmpty)(this.state.weave)) this.instance.render();
|
|
15597
|
+
if (this.isRoomLoaded && !(0, import_lodash$1.isEmpty)(this.state.weave)) this.instance.render();
|
|
15597
15598
|
});
|
|
15598
15599
|
}
|
|
15599
15600
|
canUndoStateStep() {
|
|
@@ -15913,6 +15914,18 @@ function getClosestParentWithId(el) {
|
|
|
15913
15914
|
}
|
|
15914
15915
|
return null;
|
|
15915
15916
|
}
|
|
15917
|
+
function isInShadowDOM(el) {
|
|
15918
|
+
return el?.getRootNode() instanceof ShadowRoot;
|
|
15919
|
+
}
|
|
15920
|
+
function getTopmostShadowHost(el) {
|
|
15921
|
+
let current = el;
|
|
15922
|
+
let root = current?.getRootNode();
|
|
15923
|
+
while (root instanceof ShadowRoot) {
|
|
15924
|
+
current = root.host;
|
|
15925
|
+
root = current.getRootNode();
|
|
15926
|
+
}
|
|
15927
|
+
return current?.shadowRoot || null;
|
|
15928
|
+
}
|
|
15916
15929
|
|
|
15917
15930
|
//#endregion
|
|
15918
15931
|
//#region src/actions/selection-tool/constants.ts
|
|
@@ -16244,6 +16257,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
16244
16257
|
"bottom-right"
|
|
16245
16258
|
];
|
|
16246
16259
|
this.taps = 0;
|
|
16260
|
+
this.isSpaceKeyPressed = false;
|
|
16247
16261
|
this.isDoubleTap = false;
|
|
16248
16262
|
this.tapStart = {
|
|
16249
16263
|
x: 0,
|
|
@@ -16345,7 +16359,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
16345
16359
|
if (moved) this.getContextMenuPlugin()?.cancelLongPressTimer();
|
|
16346
16360
|
this.triggerSelectedNodesEvent();
|
|
16347
16361
|
};
|
|
16348
|
-
tr.on("transform", (0, import_lodash.throttle)(handleTransform, 50));
|
|
16362
|
+
tr.on("transform", (0, import_lodash$1.throttle)(handleTransform, 50));
|
|
16349
16363
|
tr.on("transformend", () => {
|
|
16350
16364
|
this.triggerSelectedNodesEvent();
|
|
16351
16365
|
});
|
|
@@ -16574,11 +16588,15 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
16574
16588
|
this.selecting = false;
|
|
16575
16589
|
const stage = this.instance.getStage();
|
|
16576
16590
|
stage.container().addEventListener("keydown", (e) => {
|
|
16591
|
+
if (e.code === "Space") this.isSpaceKeyPressed = true;
|
|
16577
16592
|
if ((e.key === "Backspace" || e.key === "Delete") && Object.keys(window.weaveTextEditing).length === 0) {
|
|
16578
16593
|
this.removeSelectedNodes();
|
|
16579
16594
|
return;
|
|
16580
16595
|
}
|
|
16581
16596
|
});
|
|
16597
|
+
stage.container().addEventListener("keyup", (e) => {
|
|
16598
|
+
if (e.key === "Space") this.isSpaceKeyPressed = false;
|
|
16599
|
+
});
|
|
16582
16600
|
stage.on("pointerdown", (e) => {
|
|
16583
16601
|
this.setTapStart(e);
|
|
16584
16602
|
this.pointers[e.evt.pointerId] = e.evt;
|
|
@@ -16631,6 +16649,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
16631
16649
|
this.selecting = false;
|
|
16632
16650
|
return;
|
|
16633
16651
|
}
|
|
16652
|
+
if (this.isSpaceKeyPressed) return;
|
|
16634
16653
|
if (!this.selecting) return;
|
|
16635
16654
|
const intStage = this.instance.getStage();
|
|
16636
16655
|
x2 = intStage.getRelativePointerPosition()?.x ?? 0;
|
|
@@ -16673,7 +16692,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
16673
16692
|
y: 0,
|
|
16674
16693
|
time: 0
|
|
16675
16694
|
};
|
|
16676
|
-
this.isDoubleTap = true;
|
|
16677
16695
|
this.hideSelectorArea();
|
|
16678
16696
|
this.handleClickOrTap(e);
|
|
16679
16697
|
return;
|
|
@@ -16805,6 +16823,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
16805
16823
|
}
|
|
16806
16824
|
if (typeof nodeTargeted.getAttrs().isContainerPrincipal !== "undefined" && !nodeTargeted.getAttrs().isContainerPrincipal) return;
|
|
16807
16825
|
if (this.isDoubleTap && !metaPressed) {
|
|
16826
|
+
this.isDoubleTap = false;
|
|
16808
16827
|
nodeTargeted.dblClick();
|
|
16809
16828
|
return;
|
|
16810
16829
|
}
|
|
@@ -16968,19 +16987,30 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
16968
16987
|
catcher.style.zIndex = "-1";
|
|
16969
16988
|
catcher.style.outline = "none";
|
|
16970
16989
|
catcher.style.opacity = "0";
|
|
16990
|
+
catcher.onpaste = () => false;
|
|
16991
|
+
catcher.oncontextmenu = () => false;
|
|
16971
16992
|
catcher.tabIndex = 0;
|
|
16972
16993
|
const stageContainer = stage.container();
|
|
16973
16994
|
if (stageContainer?.parentNode) stageContainer.parentNode.appendChild(catcher);
|
|
16974
16995
|
}
|
|
16975
16996
|
}
|
|
16997
|
+
getCatcherElement() {
|
|
16998
|
+
const stage = this.instance.getStage();
|
|
16999
|
+
let catcher = document.getElementById(WEAVE_COPY_PASTE_PASTE_CATCHER_ID);
|
|
17000
|
+
if (isInShadowDOM(stage.container())) {
|
|
17001
|
+
const shadowHost = getTopmostShadowHost(stage.container());
|
|
17002
|
+
if (shadowHost) catcher = shadowHost.querySelector(`#${WEAVE_COPY_PASTE_PASTE_CATCHER_ID}`);
|
|
17003
|
+
}
|
|
17004
|
+
return catcher;
|
|
17005
|
+
}
|
|
16976
17006
|
focusPasteCatcher() {
|
|
16977
|
-
const catcher =
|
|
17007
|
+
const catcher = this.getCatcherElement();
|
|
16978
17008
|
catcher?.focus();
|
|
16979
17009
|
}
|
|
16980
17010
|
initEvents() {
|
|
16981
17011
|
const stage = this.instance.getStage();
|
|
16982
17012
|
this.createPasteCatcher();
|
|
16983
|
-
const catcher =
|
|
17013
|
+
const catcher = this.getCatcherElement();
|
|
16984
17014
|
window.addEventListener("keydown", async (e) => {
|
|
16985
17015
|
if (stage.isFocused() && e.key === "c" && (e.ctrlKey || e.metaKey)) {
|
|
16986
17016
|
e.preventDefault();
|
|
@@ -16992,47 +17022,47 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
16992
17022
|
if (!this.enabled) return;
|
|
16993
17023
|
}
|
|
16994
17024
|
});
|
|
16995
|
-
if (catcher)
|
|
16996
|
-
|
|
16997
|
-
|
|
16998
|
-
|
|
16999
|
-
|
|
17000
|
-
if (
|
|
17001
|
-
|
|
17002
|
-
|
|
17003
|
-
|
|
17004
|
-
|
|
17005
|
-
|
|
17006
|
-
|
|
17007
|
-
|
|
17008
|
-
|
|
17009
|
-
|
|
17010
|
-
|
|
17011
|
-
|
|
17012
|
-
this.
|
|
17025
|
+
if (catcher) {
|
|
17026
|
+
document.addEventListener("paste", (e) => {
|
|
17027
|
+
e.preventDefault();
|
|
17028
|
+
const dataList = e.clipboardData?.items;
|
|
17029
|
+
if (!dataList) return;
|
|
17030
|
+
if (dataList?.length > 0) {
|
|
17031
|
+
const container = stage.container();
|
|
17032
|
+
const scale = stage.scale();
|
|
17033
|
+
const position = stage.position();
|
|
17034
|
+
const width = container.clientWidth;
|
|
17035
|
+
const height = container.clientHeight;
|
|
17036
|
+
const centerX = (width / 2 - position.x) / scale.x;
|
|
17037
|
+
const centerY = (height / 2 - position.y) / scale.y;
|
|
17038
|
+
const pastePosition = {
|
|
17039
|
+
x: centerX,
|
|
17040
|
+
y: centerY
|
|
17041
|
+
};
|
|
17042
|
+
this.instance.emitEvent("onPasteExternal", {
|
|
17043
|
+
positionCalculated: true,
|
|
17044
|
+
position: pastePosition,
|
|
17045
|
+
dataList,
|
|
17046
|
+
items: void 0
|
|
17047
|
+
});
|
|
17013
17048
|
}
|
|
17014
|
-
}
|
|
17015
|
-
if (hasWeaveData) {
|
|
17016
|
-
this.handlePaste();
|
|
17017
|
-
return;
|
|
17018
|
-
}
|
|
17019
|
-
const container = stage.container();
|
|
17020
|
-
const scale = stage.scale();
|
|
17021
|
-
const position = stage.position();
|
|
17022
|
-
const width = container.clientWidth;
|
|
17023
|
-
const height = container.clientHeight;
|
|
17024
|
-
const centerX = (width / 2 - position.x) / scale.x;
|
|
17025
|
-
const centerY = (height / 2 - position.y) / scale.y;
|
|
17026
|
-
const pastePosition = {
|
|
17027
|
-
x: centerX,
|
|
17028
|
-
y: centerY
|
|
17029
|
-
};
|
|
17030
|
-
this.instance.emitEvent("onPasteExternal", {
|
|
17031
|
-
position: pastePosition,
|
|
17032
|
-
dataList,
|
|
17033
|
-
items
|
|
17034
17049
|
});
|
|
17035
|
-
|
|
17050
|
+
catcher.addEventListener("paste", async (e) => {
|
|
17051
|
+
e.preventDefault();
|
|
17052
|
+
let items = void 0;
|
|
17053
|
+
let hasWeaveData = false;
|
|
17054
|
+
if (!items) {
|
|
17055
|
+
if (this.isClipboardAPIAvailable()) items = await navigator.clipboard.read();
|
|
17056
|
+
}
|
|
17057
|
+
if (!items || items.length === 0) return;
|
|
17058
|
+
if (this.isClipboardAPIAvailable()) {
|
|
17059
|
+
const readText = await navigator.clipboard.readText();
|
|
17060
|
+
const continueToPaste = this.isWeaveData(readText);
|
|
17061
|
+
if (continueToPaste) hasWeaveData = true;
|
|
17062
|
+
}
|
|
17063
|
+
if (hasWeaveData) this.handlePaste();
|
|
17064
|
+
});
|
|
17065
|
+
}
|
|
17036
17066
|
}
|
|
17037
17067
|
isWeaveData(text) {
|
|
17038
17068
|
try {
|
|
@@ -17047,13 +17077,6 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
17047
17077
|
return false;
|
|
17048
17078
|
}
|
|
17049
17079
|
}
|
|
17050
|
-
getTextFromClipboard(item) {
|
|
17051
|
-
return new Promise((resolve) => {
|
|
17052
|
-
item.getAsString((text) => {
|
|
17053
|
-
resolve(text);
|
|
17054
|
-
});
|
|
17055
|
-
});
|
|
17056
|
-
}
|
|
17057
17080
|
mapToPasteNodes() {
|
|
17058
17081
|
const nodesSelectionPlugin = this.getNodesSelectionPlugin();
|
|
17059
17082
|
const selectedNodes = nodesSelectionPlugin?.getSelectedNodes();
|
|
@@ -17184,8 +17207,10 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
17184
17207
|
}
|
|
17185
17208
|
try {
|
|
17186
17209
|
const items = await navigator.clipboard.read();
|
|
17187
|
-
let
|
|
17210
|
+
let positionCalculated = false;
|
|
17211
|
+
let pastePosition = relativePosition;
|
|
17188
17212
|
if (typeof pastePosition === "undefined") {
|
|
17213
|
+
positionCalculated = true;
|
|
17189
17214
|
const container = stage.container();
|
|
17190
17215
|
const scale = stage.scale();
|
|
17191
17216
|
const position$1 = stage.position();
|
|
@@ -17199,6 +17224,7 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
17199
17224
|
};
|
|
17200
17225
|
}
|
|
17201
17226
|
this.instance.emitEvent("onPasteExternal", {
|
|
17227
|
+
positionCalculated,
|
|
17202
17228
|
position: pastePosition,
|
|
17203
17229
|
items
|
|
17204
17230
|
});
|
|
@@ -17398,7 +17424,7 @@ var WeaveNode = class {
|
|
|
17398
17424
|
if (nodesSelectionPlugin && this.isSelecting() && this.isNodeSelected(node$1)) nodesSelectionPlugin.getTransformer().forceUpdate();
|
|
17399
17425
|
if (nodesEdgeSnappingPlugin && transforming && this.isSelecting() && this.isNodeSelected(node$1)) nodesEdgeSnappingPlugin.evaluateGuidelines(e);
|
|
17400
17426
|
};
|
|
17401
|
-
node.on("transform", (0, import_lodash.throttle)(handleTransform, 100));
|
|
17427
|
+
node.on("transform", (0, import_lodash$1.throttle)(handleTransform, 100));
|
|
17402
17428
|
node.on("transformend", (e) => {
|
|
17403
17429
|
const node$1 = e.target;
|
|
17404
17430
|
this.instance.emitEvent("onTransform", null);
|
|
@@ -17452,7 +17478,7 @@ var WeaveNode = class {
|
|
|
17452
17478
|
if (layerToMove && !hasFrames(node) && node.isDragging()) layerToMove.fire(WEAVE_NODE_CUSTOM_EVENTS.onTargetEnter, { bubbles: true });
|
|
17453
17479
|
}
|
|
17454
17480
|
};
|
|
17455
|
-
node.on("dragmove", (0, import_lodash.throttle)(handleDragMove, 100));
|
|
17481
|
+
node.on("dragmove", (0, import_lodash$1.throttle)(handleDragMove, 100));
|
|
17456
17482
|
node.on("dragend", (e) => {
|
|
17457
17483
|
if (!this.didMove) return;
|
|
17458
17484
|
const isErasing = this.instance.getActiveAction() === "eraseTool";
|
|
@@ -19165,7 +19191,7 @@ var WeaveRegisterManager = class {
|
|
|
19165
19191
|
|
|
19166
19192
|
//#endregion
|
|
19167
19193
|
//#region package.json
|
|
19168
|
-
var version = "0.52.
|
|
19194
|
+
var version = "0.52.3";
|
|
19169
19195
|
|
|
19170
19196
|
//#endregion
|
|
19171
19197
|
//#region src/managers/setup.ts
|
|
@@ -19747,6 +19773,15 @@ var Weave = class {
|
|
|
19747
19773
|
isEmpty() {
|
|
19748
19774
|
return this.getElementsTree().length === 0;
|
|
19749
19775
|
}
|
|
19776
|
+
getNodeContainerId(node) {
|
|
19777
|
+
const stage = this.getStage();
|
|
19778
|
+
let nodeContainer = node.getParent()?.getAttrs().id ?? "";
|
|
19779
|
+
if (typeof node.getParent()?.getAttrs().nodeId !== "undefined") {
|
|
19780
|
+
const realContainer = stage.findOne(`#${node.getParent()?.getAttrs().nodeId}`);
|
|
19781
|
+
if (realContainer) nodeContainer = realContainer.getAttrs().id ?? "";
|
|
19782
|
+
}
|
|
19783
|
+
return nodeContainer;
|
|
19784
|
+
}
|
|
19750
19785
|
moveUp(node) {
|
|
19751
19786
|
this.zIndexManager.moveUp(node);
|
|
19752
19787
|
}
|
|
@@ -20171,7 +20206,7 @@ var WeaveEllipseNode = class extends WeaveNode {
|
|
|
20171
20206
|
ellipse.allowedAnchors = () => {
|
|
20172
20207
|
const stage = this.instance.getStage();
|
|
20173
20208
|
const actualEllipse = stage.findOne(`#${ellipse.id()}`);
|
|
20174
|
-
if (actualEllipse?.getAttrs()
|
|
20209
|
+
if (actualEllipse?.getAttrs()?.keepAspectRatio) return [
|
|
20175
20210
|
"top-left",
|
|
20176
20211
|
"top-right",
|
|
20177
20212
|
"bottom-left",
|
|
@@ -20355,7 +20390,7 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
20355
20390
|
text.on("transformstart", (e) => {
|
|
20356
20391
|
this.instance.emitEvent("onTransform", e.target);
|
|
20357
20392
|
});
|
|
20358
|
-
text.on("transform", (0, import_lodash.throttle)(handleTextTransform, 50));
|
|
20393
|
+
text.on("transform", (0, import_lodash$1.throttle)(handleTextTransform, 50));
|
|
20359
20394
|
text.on("transformend", () => {
|
|
20360
20395
|
this.instance.emitEvent("onTransform", null);
|
|
20361
20396
|
});
|
|
@@ -20618,7 +20653,7 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
20618
20653
|
this.removeTextAreaDOM(textNode);
|
|
20619
20654
|
this.instance.removeEventListener("onZoomChange", this.onZoomChangeHandler(textNode).bind(this));
|
|
20620
20655
|
this.instance.removeEventListener("onStageMove", this.onStageMoveHandler(textNode).bind(this));
|
|
20621
|
-
window.removeEventListener("
|
|
20656
|
+
window.removeEventListener("pointerup", handleOutsideClick);
|
|
20622
20657
|
return;
|
|
20623
20658
|
}
|
|
20624
20659
|
};
|
|
@@ -20642,20 +20677,27 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
20642
20677
|
const handleOutsideClick = (e) => {
|
|
20643
20678
|
e.stopPropagation();
|
|
20644
20679
|
if (!this.textArea) return;
|
|
20680
|
+
const mouseX = e.clientX;
|
|
20681
|
+
const mouseY = e.clientY;
|
|
20682
|
+
let elementUnderMouse = document.elementFromPoint(mouseX, mouseY);
|
|
20683
|
+
if (isInShadowDOM(stage.container())) {
|
|
20684
|
+
const shadowHost = getTopmostShadowHost(stage.container());
|
|
20685
|
+
if (shadowHost) elementUnderMouse = shadowHost.elementFromPoint(mouseX, mouseY);
|
|
20686
|
+
}
|
|
20645
20687
|
let clickedOnCanvas = false;
|
|
20646
|
-
if (
|
|
20688
|
+
if (elementUnderMouse?.id !== `${textNode.id()}`) clickedOnCanvas = true;
|
|
20647
20689
|
if (clickedOnCanvas) {
|
|
20648
20690
|
textNode.text(this.textArea.value);
|
|
20649
20691
|
this.removeTextAreaDOM(textNode);
|
|
20650
20692
|
this.textArea.removeEventListener("keydown", handleKeyDown);
|
|
20651
20693
|
this.textArea.removeEventListener("keyup", handleKeyUp);
|
|
20652
|
-
window.removeEventListener("
|
|
20694
|
+
window.removeEventListener("pointerup", handleOutsideClick);
|
|
20653
20695
|
window.removeEventListener("pointerdown", handleOutsideClick);
|
|
20654
20696
|
return;
|
|
20655
20697
|
}
|
|
20656
20698
|
};
|
|
20657
20699
|
setTimeout(() => {
|
|
20658
|
-
window.addEventListener("
|
|
20700
|
+
window.addEventListener("pointerup", handleOutsideClick);
|
|
20659
20701
|
window.addEventListener("pointerdown", handleOutsideClick);
|
|
20660
20702
|
}, 0);
|
|
20661
20703
|
this.editing = true;
|
|
@@ -20978,6 +21020,7 @@ var WeaveImageToolAction = class extends WeaveAction {
|
|
|
20978
21020
|
this.imageId = null;
|
|
20979
21021
|
this.forceMainContainer = false;
|
|
20980
21022
|
this.container = void 0;
|
|
21023
|
+
this.tempImageNode = null;
|
|
20981
21024
|
this.imageURL = null;
|
|
20982
21025
|
this.clickPoint = null;
|
|
20983
21026
|
this.setState(IMAGE_TOOL_STATE.IDLE);
|
|
@@ -20993,19 +21036,19 @@ var WeaveImageCrop = class WeaveImageCrop {
|
|
|
20993
21036
|
this.image = image;
|
|
20994
21037
|
this.internalImage = internalImage;
|
|
20995
21038
|
this.cropGroup = clipGroup;
|
|
21039
|
+
this.cropping = false;
|
|
20996
21040
|
this.onClose = () => {};
|
|
20997
21041
|
this.handleHide = this.hide.bind(this);
|
|
20998
21042
|
}
|
|
20999
21043
|
show(onClose) {
|
|
21000
21044
|
this.onClose = onClose;
|
|
21001
|
-
|
|
21002
|
-
|
|
21003
|
-
|
|
21004
|
-
|
|
21005
|
-
|
|
21006
|
-
|
|
21007
|
-
|
|
21008
|
-
}
|
|
21045
|
+
this.cropping = true;
|
|
21046
|
+
const nodeEdgeSnappingPlugin = this.getNodesEdgeSnappingPlugin();
|
|
21047
|
+
if (nodeEdgeSnappingPlugin) nodeEdgeSnappingPlugin.disable();
|
|
21048
|
+
const nodeDistanceSnappingPlugin = this.getNodesDistanceSnappingPlugin();
|
|
21049
|
+
if (nodeDistanceSnappingPlugin) nodeDistanceSnappingPlugin.disable();
|
|
21050
|
+
const nodesSelectionPlugin = this.getNodesSelectionPlugin();
|
|
21051
|
+
if (nodesSelectionPlugin) nodesSelectionPlugin.disable();
|
|
21009
21052
|
this.image.setAttrs({ cropping: true });
|
|
21010
21053
|
const imageAttrs = this.image.getAttrs();
|
|
21011
21054
|
this.internalImage.hide();
|
|
@@ -21125,6 +21168,7 @@ var WeaveImageCrop = class WeaveImageCrop {
|
|
|
21125
21168
|
this.drawGridLines(cropRect$1.x, cropRect$1.y, cropRect$1.width, cropRect$1.height);
|
|
21126
21169
|
};
|
|
21127
21170
|
this.instance.getStage().on("pointerdown", (e) => {
|
|
21171
|
+
if (!this.cropping) return;
|
|
21128
21172
|
const isStage = e.target instanceof Konva.Stage;
|
|
21129
21173
|
const isContainerEmptyArea = typeof e.target.getAttrs().isContainerPrincipal !== "undefined" && !e.target.getAttrs().isContainerPrincipal;
|
|
21130
21174
|
if (isStage || isContainerEmptyArea) this.cancel();
|
|
@@ -21164,6 +21208,7 @@ var WeaveImageCrop = class WeaveImageCrop {
|
|
|
21164
21208
|
}
|
|
21165
21209
|
hide(e) {
|
|
21166
21210
|
if (!["Enter", "Escape"].includes(e.key)) return;
|
|
21211
|
+
this.cropping = false;
|
|
21167
21212
|
this.image.setAttrs({ cropping: false });
|
|
21168
21213
|
if (e.key === "Enter") this.handleClipEnd();
|
|
21169
21214
|
const stage = this.instance.getStage();
|
|
@@ -21173,20 +21218,13 @@ var WeaveImageCrop = class WeaveImageCrop {
|
|
|
21173
21218
|
this.instance.getStage().container().removeEventListener("keydown", this.handleHide);
|
|
21174
21219
|
this.cropGroup.destroyChildren();
|
|
21175
21220
|
this.cropGroup.hide();
|
|
21176
|
-
const
|
|
21177
|
-
if (
|
|
21221
|
+
const nodesEdgeSnappingPlugin = this.getNodesEdgeSnappingPlugin();
|
|
21222
|
+
if (nodesEdgeSnappingPlugin) nodesEdgeSnappingPlugin.enable();
|
|
21223
|
+
const nodesDistanceSnappingPlugin = this.getNodesDistanceSnappingPlugin();
|
|
21224
|
+
if (nodesDistanceSnappingPlugin) nodesDistanceSnappingPlugin.enable();
|
|
21178
21225
|
this.internalImage.show();
|
|
21179
|
-
const
|
|
21180
|
-
if (
|
|
21181
|
-
this.instance.enablePlugin("nodesSelection");
|
|
21182
|
-
const selectionTransformer = selectionPlugin.getTransformer();
|
|
21183
|
-
selectionTransformer.nodes([this.image]);
|
|
21184
|
-
selectionTransformer.show();
|
|
21185
|
-
setTimeout(() => {
|
|
21186
|
-
selectionPlugin.triggerSelectedNodesEvent();
|
|
21187
|
-
selectionTransformer.forceUpdate();
|
|
21188
|
-
}, 0);
|
|
21189
|
-
}
|
|
21226
|
+
const nodesSelectionPlugin = this.getNodesSelectionPlugin();
|
|
21227
|
+
if (nodesSelectionPlugin) nodesSelectionPlugin.enable();
|
|
21190
21228
|
stage.mode(WEAVE_STAGE_DEFAULT_MODE);
|
|
21191
21229
|
this.instance.emitEvent("onImageCropEnd", { instance: this.image });
|
|
21192
21230
|
}
|
|
@@ -21324,6 +21362,18 @@ var WeaveImageCrop = class WeaveImageCrop {
|
|
|
21324
21362
|
y: a.y + t * ab.y
|
|
21325
21363
|
};
|
|
21326
21364
|
}
|
|
21365
|
+
getNodesEdgeSnappingPlugin() {
|
|
21366
|
+
const snappingEdgesPlugin = this.instance.getPlugin(WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY);
|
|
21367
|
+
return snappingEdgesPlugin;
|
|
21368
|
+
}
|
|
21369
|
+
getNodesDistanceSnappingPlugin() {
|
|
21370
|
+
const snappingDistancePlugin = this.instance.getPlugin(WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY);
|
|
21371
|
+
return snappingDistancePlugin;
|
|
21372
|
+
}
|
|
21373
|
+
getNodesSelectionPlugin() {
|
|
21374
|
+
const nodesSelectionPlugin = this.instance.getPlugin(WEAVE_NODES_SELECTION_KEY);
|
|
21375
|
+
return nodesSelectionPlugin;
|
|
21376
|
+
}
|
|
21327
21377
|
};
|
|
21328
21378
|
|
|
21329
21379
|
//#endregion
|
|
@@ -21587,12 +21637,6 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
21587
21637
|
});
|
|
21588
21638
|
this.updateImageCrop(nextProps);
|
|
21589
21639
|
}
|
|
21590
|
-
try {
|
|
21591
|
-
const selectionPlugin = this.instance.getPlugin("nodesSelection");
|
|
21592
|
-
if (selectionPlugin) selectionPlugin.getTransformer().forceUpdate();
|
|
21593
|
-
} catch (error) {
|
|
21594
|
-
console.error("Error updating transformer", error);
|
|
21595
|
-
}
|
|
21596
21640
|
}
|
|
21597
21641
|
loadImage(params, image) {
|
|
21598
21642
|
const imageProps = params;
|
|
@@ -21654,7 +21698,7 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
21654
21698
|
const stage = this.instance.getStage();
|
|
21655
21699
|
const image = stage.findOne(`#${imageAttrs.id}`);
|
|
21656
21700
|
const internalImage = image?.findOne(`#${imageAttrs.id}-image`);
|
|
21657
|
-
if (image && internalImage && !imageAttrs.adding && imageAttrs.cropInfo && !(0, import_lodash.isEqual)(imageAttrs.cropInfo, this.cachedCropInfo[imageAttrs.id ?? ""])) {
|
|
21701
|
+
if (image && internalImage && !imageAttrs.adding && imageAttrs.cropInfo && !(0, import_lodash$1.isEqual)(imageAttrs.cropInfo, this.cachedCropInfo[imageAttrs.id ?? ""])) {
|
|
21658
21702
|
const actualScale = imageAttrs.uncroppedImage.width / imageAttrs.imageInfo.width;
|
|
21659
21703
|
internalImage.width(imageAttrs.uncroppedImage.width);
|
|
21660
21704
|
internalImage.height(imageAttrs.uncroppedImage.height);
|
|
@@ -21671,7 +21715,7 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
21671
21715
|
internalImage.height(imageAttrs.cropSize.height);
|
|
21672
21716
|
this.cachedCropInfo[imageAttrs.id ?? ""] = imageAttrs.cropInfo;
|
|
21673
21717
|
}
|
|
21674
|
-
if (image && internalImage && !imageAttrs.adding && !imageAttrs.cropInfo && !(0, import_lodash.isEqual)(imageAttrs.cropInfo, this.cachedCropInfo[imageAttrs.id ?? ""])) {
|
|
21718
|
+
if (image && internalImage && !imageAttrs.adding && !imageAttrs.cropInfo && !(0, import_lodash$1.isEqual)(imageAttrs.cropInfo, this.cachedCropInfo[imageAttrs.id ?? ""])) {
|
|
21675
21719
|
internalImage.width(imageAttrs.uncroppedImage.width);
|
|
21676
21720
|
internalImage.height(imageAttrs.uncroppedImage.height);
|
|
21677
21721
|
internalImage.rotation(0);
|
|
@@ -22417,7 +22461,7 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
|
|
|
22417
22461
|
constructor(params) {
|
|
22418
22462
|
super();
|
|
22419
22463
|
const { config } = params ?? {};
|
|
22420
|
-
this.config = (0, import_lodash.merge)(WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, config);
|
|
22464
|
+
this.config = (0, import_lodash$1.merge)(WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, config);
|
|
22421
22465
|
if (!this.config.zoomSteps.includes(this.config.defaultZoom)) throw new Error(`Default zoom ${this.config.defaultZoom} is not in zoom steps`);
|
|
22422
22466
|
this.pinching = false;
|
|
22423
22467
|
this.isTrackpad = false;
|
|
@@ -22445,7 +22489,7 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
|
|
|
22445
22489
|
this.config.zoomSteps = [minimumZoom, ...this.config.zoomSteps];
|
|
22446
22490
|
}
|
|
22447
22491
|
};
|
|
22448
|
-
mainLayer?.on("draw", (0, import_lodash.throttle)(handleDraw, 50));
|
|
22492
|
+
mainLayer?.on("draw", (0, import_lodash$1.throttle)(handleDraw, 50));
|
|
22449
22493
|
this.setZoom(this.config.zoomSteps[this.actualStep]);
|
|
22450
22494
|
}
|
|
22451
22495
|
setZoom(scale, centered = true, pointer) {
|
|
@@ -22764,8 +22808,13 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
|
|
|
22764
22808
|
const performZoom = this.isCtrlOrMetaPressed || !this.isCtrlOrMetaPressed && e.ctrlKey && e.deltaMode === 0;
|
|
22765
22809
|
const mouseX = e.clientX;
|
|
22766
22810
|
const mouseY = e.clientY;
|
|
22767
|
-
|
|
22811
|
+
let elementUnderMouse = document.elementFromPoint(mouseX, mouseY);
|
|
22812
|
+
if (isInShadowDOM(stage.container())) {
|
|
22813
|
+
const shadowHost = getTopmostShadowHost(stage.container());
|
|
22814
|
+
if (shadowHost) elementUnderMouse = shadowHost.elementFromPoint(mouseX, mouseY);
|
|
22815
|
+
}
|
|
22768
22816
|
if (!this.enabled || !performZoom || getClosestParentWithId(elementUnderMouse) !== stage.container()) return;
|
|
22817
|
+
e.preventDefault();
|
|
22769
22818
|
const delta = e.deltaY > 0 ? 1 : -1;
|
|
22770
22819
|
this.zoomVelocity += delta;
|
|
22771
22820
|
this.isTrackpad = Math.abs(e.deltaY) < 15 && e.deltaMode === 0;
|
|
@@ -25334,7 +25383,7 @@ var WeaveStageGridPlugin = class extends WeavePlugin {
|
|
|
25334
25383
|
if (!this.enabled || !(this.isSpaceKeyPressed || this.isMouseMiddleButtonPressed || this.moveToolActive)) return;
|
|
25335
25384
|
this.onRender();
|
|
25336
25385
|
};
|
|
25337
|
-
stage.on("pointermove", (0, import_lodash.throttle)(handleMouseMove, 50));
|
|
25386
|
+
stage.on("pointermove", (0, import_lodash$1.throttle)(handleMouseMove, 50));
|
|
25338
25387
|
stage.on("pointermove", () => {
|
|
25339
25388
|
if (this.enabled) this.onRender();
|
|
25340
25389
|
});
|
|
@@ -25580,6 +25629,10 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
25580
25629
|
window.addEventListener("keydown", (e) => {
|
|
25581
25630
|
if (e.ctrlKey || e.metaKey) this.isCtrlOrMetaPressed = true;
|
|
25582
25631
|
if (e.code === "Space") {
|
|
25632
|
+
this.getContextMenuPlugin()?.disable();
|
|
25633
|
+
this.getNodesSelectionPlugin()?.disable();
|
|
25634
|
+
this.getNodesEdgeSnappingPlugin()?.disable();
|
|
25635
|
+
this.getNodesDistanceSnappingPlugin()?.disable();
|
|
25583
25636
|
this.isSpaceKeyPressed = true;
|
|
25584
25637
|
this.enableMove();
|
|
25585
25638
|
}
|
|
@@ -25587,6 +25640,10 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
25587
25640
|
window.addEventListener("keyup", (e) => {
|
|
25588
25641
|
if (e.key === "Meta" || e.key === "Control") this.isCtrlOrMetaPressed = false;
|
|
25589
25642
|
if (e.code === "Space") {
|
|
25643
|
+
this.getContextMenuPlugin()?.enable();
|
|
25644
|
+
this.getNodesSelectionPlugin()?.enable();
|
|
25645
|
+
this.getNodesEdgeSnappingPlugin()?.enable();
|
|
25646
|
+
this.getNodesDistanceSnappingPlugin()?.enable();
|
|
25590
25647
|
this.isSpaceKeyPressed = false;
|
|
25591
25648
|
this.disableMove();
|
|
25592
25649
|
}
|
|
@@ -25601,14 +25658,9 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
25601
25658
|
if (this.pointers.size > 1) return;
|
|
25602
25659
|
const activeAction = this.instance.getActiveAction();
|
|
25603
25660
|
let enableMove = false;
|
|
25604
|
-
if (e && (e.evt.pointerType !== "mouse" || e.evt.pointerType === "mouse" && e.evt.buttons === 1) && activeAction === MOVE_TOOL_ACTION_NAME)
|
|
25605
|
-
|
|
25606
|
-
|
|
25607
|
-
}
|
|
25608
|
-
if (!enableMove && e.evt.pointerType === "mouse" && e.evt.buttons === 4) {
|
|
25609
|
-
this.isMouseMiddleButtonPressed = true;
|
|
25610
|
-
enableMove = true;
|
|
25611
|
-
}
|
|
25661
|
+
if (e && (e.evt.pointerType !== "mouse" || e.evt.pointerType === "mouse" && e.evt.buttons === 1) && activeAction === MOVE_TOOL_ACTION_NAME) this.moveToolActive = true;
|
|
25662
|
+
if (!enableMove && e.evt.pointerType === "mouse" && e.evt.buttons === 4) this.isMouseMiddleButtonPressed = true;
|
|
25663
|
+
if (this.enabled && (this.isSpaceKeyPressed || this.moveToolActive || this.isMouseMiddleButtonPressed)) enableMove = true;
|
|
25612
25664
|
if (enableMove) {
|
|
25613
25665
|
isDragging = true;
|
|
25614
25666
|
lastPos = stage.getPointerPosition();
|
|
@@ -25625,8 +25677,8 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
25625
25677
|
y: e.evt.clientY
|
|
25626
25678
|
});
|
|
25627
25679
|
if (this.pointers.size > 1) return;
|
|
25680
|
+
if (this.isSpaceKeyPressed) stage.container().style.cursor = "grabbing";
|
|
25628
25681
|
if (!isDragging) return;
|
|
25629
|
-
if (!this.enabled || !(this.isSpaceKeyPressed || this.isMouseMiddleButtonPressed || this.moveToolActive)) return;
|
|
25630
25682
|
this.getContextMenuPlugin()?.cancelLongPressTimer();
|
|
25631
25683
|
const pos = stage.getPointerPosition();
|
|
25632
25684
|
if (pos && lastPos) {
|
|
@@ -25648,14 +25700,18 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
25648
25700
|
const performPanning = !this.isCtrlOrMetaPressed && !e.ctrlKey;
|
|
25649
25701
|
const mouseX = e.clientX;
|
|
25650
25702
|
const mouseY = e.clientY;
|
|
25651
|
-
|
|
25703
|
+
let elementUnderMouse = document.elementFromPoint(mouseX, mouseY);
|
|
25704
|
+
if (isInShadowDOM(stage.container())) {
|
|
25705
|
+
const shadowHost = getTopmostShadowHost(stage.container());
|
|
25706
|
+
if (shadowHost) elementUnderMouse = shadowHost.elementFromPoint(mouseX, mouseY);
|
|
25707
|
+
}
|
|
25652
25708
|
if (!this.enabled || this.isCtrlOrMetaPressed || e.buttons === 4 || !performPanning || getClosestParentWithId(elementUnderMouse) !== stage.container()) return;
|
|
25653
25709
|
this.getContextMenuPlugin()?.cancelLongPressTimer();
|
|
25654
25710
|
stage.x(stage.x() - e.deltaX);
|
|
25655
25711
|
stage.y(stage.y() - e.deltaY);
|
|
25656
25712
|
this.instance.emitEvent("onStageMove");
|
|
25657
25713
|
};
|
|
25658
|
-
window.addEventListener("wheel", handleWheel, { passive:
|
|
25714
|
+
window.addEventListener("wheel", handleWheel, { passive: true });
|
|
25659
25715
|
stage.container().style.touchAction = "none";
|
|
25660
25716
|
stage.container().style.userSelect = "none";
|
|
25661
25717
|
stage.container().style.setProperty("-webkit-user-drag", "none");
|
|
@@ -25685,9 +25741,21 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
25685
25741
|
return zoomPlugin;
|
|
25686
25742
|
}
|
|
25687
25743
|
getContextMenuPlugin() {
|
|
25688
|
-
const contextMenuPlugin = this.instance.getPlugin(
|
|
25744
|
+
const contextMenuPlugin = this.instance.getPlugin(WEAVE_CONTEXT_MENU_PLUGIN_KEY);
|
|
25689
25745
|
return contextMenuPlugin;
|
|
25690
25746
|
}
|
|
25747
|
+
getNodesSelectionPlugin() {
|
|
25748
|
+
const selectionPlugin = this.instance.getPlugin(WEAVE_NODES_SELECTION_KEY);
|
|
25749
|
+
return selectionPlugin;
|
|
25750
|
+
}
|
|
25751
|
+
getNodesEdgeSnappingPlugin() {
|
|
25752
|
+
const snappingPlugin = this.instance.getPlugin(WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY);
|
|
25753
|
+
return snappingPlugin;
|
|
25754
|
+
}
|
|
25755
|
+
getNodesDistanceSnappingPlugin() {
|
|
25756
|
+
const snappingPlugin = this.instance.getPlugin(WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY);
|
|
25757
|
+
return snappingPlugin;
|
|
25758
|
+
}
|
|
25691
25759
|
enable() {
|
|
25692
25760
|
this.enabled = true;
|
|
25693
25761
|
}
|
|
@@ -25787,7 +25855,7 @@ var WeaveConnectedUsersPlugin = class extends WeavePlugin {
|
|
|
25787
25855
|
newConnectedUsers[userInformation.id] = userInformation;
|
|
25788
25856
|
}
|
|
25789
25857
|
}
|
|
25790
|
-
if (!(0, import_lodash.isEqual)(this.connectedUsers, newConnectedUsers)) this.instance.emitEvent("onConnectedUsersChange", newConnectedUsers);
|
|
25858
|
+
if (!(0, import_lodash$1.isEqual)(this.connectedUsers, newConnectedUsers)) this.instance.emitEvent("onConnectedUsersChange", newConnectedUsers);
|
|
25791
25859
|
this.connectedUsers = newConnectedUsers;
|
|
25792
25860
|
});
|
|
25793
25861
|
}
|
|
@@ -27009,5 +27077,5 @@ var WeaveNodesDistanceSnappingPlugin = class extends WeavePlugin {
|
|
|
27009
27077
|
};
|
|
27010
27078
|
|
|
27011
27079
|
//#endregion
|
|
27012
|
-
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_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_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, IMAGE_TOOL_ACTION_NAME, IMAGE_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, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, WEAVE_ARROW_NODE_TYPE, 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_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_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_NODE_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_TYPE, WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_STAGE_DEFAULT_MODE, WEAVE_STAGE_GRID_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_TYPE, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTERS_DEFAULT_PROPS, WEAVE_USER_POINTER_KEY, WEAVE_USER_SELECTION_KEY, Weave, WeaveAction, WeaveAlignNodesToolAction, WeaveArrowNode, WeaveArrowToolAction, WeaveBrushToolAction, WeaveConnectedUsersPlugin, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveEllipseNode, WeaveEllipseToolAction, WeaveEraserToolAction, WeaveExportNodesToolAction, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToSelectionToolAction, WeaveFrameNode, WeaveFrameToolAction, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveLayerNode, WeaveLineNode, WeaveMoveToolAction, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesEdgeSnappingPlugin, WeaveNodesSelectionPlugin, WeavePenToolAction, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRegularPolygonNode, WeaveRegularPolygonToolAction, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStarNode, WeaveStarToolAction, WeaveStore, WeaveStrokeNode, WeaveTextNode, WeaveTextToolAction, WeaveUsersPointersPlugin, WeaveUsersSelectionPlugin, WeaveZoomInToolAction, WeaveZoomOutToolAction, clearContainerTargets, containerOverCursor, containsNodeDeep, getBoundingBox, getClosestParentWithId, getContrastTextColor, getExportBoundingBox, getSelectedNodesMetadata, getTargetAndSkipNodes, getTargetedNode, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isNodeInSelection, moveNodeToContainer, resetScale, stringToColor };
|
|
27080
|
+
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_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_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, IMAGE_TOOL_ACTION_NAME, IMAGE_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, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, WEAVE_ARROW_NODE_TYPE, 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_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_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_NODE_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_TYPE, WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_STAGE_DEFAULT_MODE, WEAVE_STAGE_GRID_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_TYPE, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTERS_DEFAULT_PROPS, WEAVE_USER_POINTER_KEY, WEAVE_USER_SELECTION_KEY, Weave, WeaveAction, WeaveAlignNodesToolAction, WeaveArrowNode, WeaveArrowToolAction, WeaveBrushToolAction, WeaveConnectedUsersPlugin, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveEllipseNode, WeaveEllipseToolAction, WeaveEraserToolAction, WeaveExportNodesToolAction, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToSelectionToolAction, WeaveFrameNode, WeaveFrameToolAction, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveLayerNode, WeaveLineNode, WeaveMoveToolAction, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesEdgeSnappingPlugin, WeaveNodesSelectionPlugin, WeavePenToolAction, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRegularPolygonNode, WeaveRegularPolygonToolAction, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStarNode, WeaveStarToolAction, WeaveStore, WeaveStrokeNode, WeaveTextNode, WeaveTextToolAction, WeaveUsersPointersPlugin, WeaveUsersSelectionPlugin, WeaveZoomInToolAction, WeaveZoomOutToolAction, clearContainerTargets, containerOverCursor, containsNodeDeep, getBoundingBox, getClosestParentWithId, getContrastTextColor, getExportBoundingBox, getSelectedNodesMetadata, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isInShadowDOM, isNodeInSelection, moveNodeToContainer, resetScale, stringToColor };
|
|
27013
27081
|
//# sourceMappingURL=sdk.js.map
|