@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.cjs
CHANGED
|
@@ -15913,6 +15913,18 @@ function getClosestParentWithId(el) {
|
|
|
15913
15913
|
}
|
|
15914
15914
|
return null;
|
|
15915
15915
|
}
|
|
15916
|
+
function isInShadowDOM(el) {
|
|
15917
|
+
return el?.getRootNode() instanceof ShadowRoot;
|
|
15918
|
+
}
|
|
15919
|
+
function getTopmostShadowHost(el) {
|
|
15920
|
+
let current = el;
|
|
15921
|
+
let root = current?.getRootNode();
|
|
15922
|
+
while (root instanceof ShadowRoot) {
|
|
15923
|
+
current = root.host;
|
|
15924
|
+
root = current.getRootNode();
|
|
15925
|
+
}
|
|
15926
|
+
return current?.shadowRoot || null;
|
|
15927
|
+
}
|
|
15916
15928
|
|
|
15917
15929
|
//#endregion
|
|
15918
15930
|
//#region src/actions/selection-tool/constants.ts
|
|
@@ -16244,6 +16256,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
16244
16256
|
"bottom-right"
|
|
16245
16257
|
];
|
|
16246
16258
|
this.taps = 0;
|
|
16259
|
+
this.isSpaceKeyPressed = false;
|
|
16247
16260
|
this.isDoubleTap = false;
|
|
16248
16261
|
this.tapStart = {
|
|
16249
16262
|
x: 0,
|
|
@@ -16574,11 +16587,15 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
16574
16587
|
this.selecting = false;
|
|
16575
16588
|
const stage = this.instance.getStage();
|
|
16576
16589
|
stage.container().addEventListener("keydown", (e) => {
|
|
16590
|
+
if (e.code === "Space") this.isSpaceKeyPressed = true;
|
|
16577
16591
|
if ((e.key === "Backspace" || e.key === "Delete") && Object.keys(window.weaveTextEditing).length === 0) {
|
|
16578
16592
|
this.removeSelectedNodes();
|
|
16579
16593
|
return;
|
|
16580
16594
|
}
|
|
16581
16595
|
});
|
|
16596
|
+
stage.container().addEventListener("keyup", (e) => {
|
|
16597
|
+
if (e.key === "Space") this.isSpaceKeyPressed = false;
|
|
16598
|
+
});
|
|
16582
16599
|
stage.on("pointerdown", (e) => {
|
|
16583
16600
|
this.setTapStart(e);
|
|
16584
16601
|
this.pointers[e.evt.pointerId] = e.evt;
|
|
@@ -16631,6 +16648,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
16631
16648
|
this.selecting = false;
|
|
16632
16649
|
return;
|
|
16633
16650
|
}
|
|
16651
|
+
if (this.isSpaceKeyPressed) return;
|
|
16634
16652
|
if (!this.selecting) return;
|
|
16635
16653
|
const intStage = this.instance.getStage();
|
|
16636
16654
|
x2 = intStage.getRelativePointerPosition()?.x ?? 0;
|
|
@@ -16673,7 +16691,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
16673
16691
|
y: 0,
|
|
16674
16692
|
time: 0
|
|
16675
16693
|
};
|
|
16676
|
-
this.isDoubleTap = true;
|
|
16677
16694
|
this.hideSelectorArea();
|
|
16678
16695
|
this.handleClickOrTap(e);
|
|
16679
16696
|
return;
|
|
@@ -16805,6 +16822,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
16805
16822
|
}
|
|
16806
16823
|
if (typeof nodeTargeted.getAttrs().isContainerPrincipal !== "undefined" && !nodeTargeted.getAttrs().isContainerPrincipal) return;
|
|
16807
16824
|
if (this.isDoubleTap && !metaPressed) {
|
|
16825
|
+
this.isDoubleTap = false;
|
|
16808
16826
|
nodeTargeted.dblClick();
|
|
16809
16827
|
return;
|
|
16810
16828
|
}
|
|
@@ -16968,19 +16986,30 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
16968
16986
|
catcher.style.zIndex = "-1";
|
|
16969
16987
|
catcher.style.outline = "none";
|
|
16970
16988
|
catcher.style.opacity = "0";
|
|
16989
|
+
catcher.onpaste = () => false;
|
|
16990
|
+
catcher.oncontextmenu = () => false;
|
|
16971
16991
|
catcher.tabIndex = 0;
|
|
16972
16992
|
const stageContainer = stage.container();
|
|
16973
16993
|
if (stageContainer?.parentNode) stageContainer.parentNode.appendChild(catcher);
|
|
16974
16994
|
}
|
|
16975
16995
|
}
|
|
16996
|
+
getCatcherElement() {
|
|
16997
|
+
const stage = this.instance.getStage();
|
|
16998
|
+
let catcher = document.getElementById(WEAVE_COPY_PASTE_PASTE_CATCHER_ID);
|
|
16999
|
+
if (isInShadowDOM(stage.container())) {
|
|
17000
|
+
const shadowHost = getTopmostShadowHost(stage.container());
|
|
17001
|
+
if (shadowHost) catcher = shadowHost.querySelector(`#${WEAVE_COPY_PASTE_PASTE_CATCHER_ID}`);
|
|
17002
|
+
}
|
|
17003
|
+
return catcher;
|
|
17004
|
+
}
|
|
16976
17005
|
focusPasteCatcher() {
|
|
16977
|
-
const catcher =
|
|
17006
|
+
const catcher = this.getCatcherElement();
|
|
16978
17007
|
catcher?.focus();
|
|
16979
17008
|
}
|
|
16980
17009
|
initEvents() {
|
|
16981
17010
|
const stage = this.instance.getStage();
|
|
16982
17011
|
this.createPasteCatcher();
|
|
16983
|
-
const catcher =
|
|
17012
|
+
const catcher = this.getCatcherElement();
|
|
16984
17013
|
window.addEventListener("keydown", async (e) => {
|
|
16985
17014
|
if (stage.isFocused() && e.key === "c" && (e.ctrlKey || e.metaKey)) {
|
|
16986
17015
|
e.preventDefault();
|
|
@@ -16992,47 +17021,47 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
16992
17021
|
if (!this.enabled) return;
|
|
16993
17022
|
}
|
|
16994
17023
|
});
|
|
16995
|
-
if (catcher)
|
|
16996
|
-
|
|
16997
|
-
|
|
16998
|
-
|
|
16999
|
-
|
|
17000
|
-
if (
|
|
17001
|
-
|
|
17002
|
-
|
|
17003
|
-
|
|
17004
|
-
|
|
17005
|
-
|
|
17006
|
-
|
|
17007
|
-
|
|
17008
|
-
|
|
17009
|
-
|
|
17010
|
-
|
|
17011
|
-
|
|
17012
|
-
this.
|
|
17024
|
+
if (catcher) {
|
|
17025
|
+
document.addEventListener("paste", (e) => {
|
|
17026
|
+
e.preventDefault();
|
|
17027
|
+
const dataList = e.clipboardData?.items;
|
|
17028
|
+
if (!dataList) return;
|
|
17029
|
+
if (dataList?.length > 0) {
|
|
17030
|
+
const container = stage.container();
|
|
17031
|
+
const scale = stage.scale();
|
|
17032
|
+
const position = stage.position();
|
|
17033
|
+
const width = container.clientWidth;
|
|
17034
|
+
const height = container.clientHeight;
|
|
17035
|
+
const centerX = (width / 2 - position.x) / scale.x;
|
|
17036
|
+
const centerY = (height / 2 - position.y) / scale.y;
|
|
17037
|
+
const pastePosition = {
|
|
17038
|
+
x: centerX,
|
|
17039
|
+
y: centerY
|
|
17040
|
+
};
|
|
17041
|
+
this.instance.emitEvent("onPasteExternal", {
|
|
17042
|
+
positionCalculated: true,
|
|
17043
|
+
position: pastePosition,
|
|
17044
|
+
dataList,
|
|
17045
|
+
items: void 0
|
|
17046
|
+
});
|
|
17013
17047
|
}
|
|
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
17048
|
});
|
|
17035
|
-
|
|
17049
|
+
catcher.addEventListener("paste", async (e) => {
|
|
17050
|
+
e.preventDefault();
|
|
17051
|
+
let items = void 0;
|
|
17052
|
+
let hasWeaveData = false;
|
|
17053
|
+
if (!items) {
|
|
17054
|
+
if (this.isClipboardAPIAvailable()) items = await navigator.clipboard.read();
|
|
17055
|
+
}
|
|
17056
|
+
if (!items || items.length === 0) return;
|
|
17057
|
+
if (this.isClipboardAPIAvailable()) {
|
|
17058
|
+
const readText = await navigator.clipboard.readText();
|
|
17059
|
+
const continueToPaste = this.isWeaveData(readText);
|
|
17060
|
+
if (continueToPaste) hasWeaveData = true;
|
|
17061
|
+
}
|
|
17062
|
+
if (hasWeaveData) this.handlePaste();
|
|
17063
|
+
});
|
|
17064
|
+
}
|
|
17036
17065
|
}
|
|
17037
17066
|
isWeaveData(text) {
|
|
17038
17067
|
try {
|
|
@@ -17047,13 +17076,6 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
17047
17076
|
return false;
|
|
17048
17077
|
}
|
|
17049
17078
|
}
|
|
17050
|
-
getTextFromClipboard(item) {
|
|
17051
|
-
return new Promise((resolve) => {
|
|
17052
|
-
item.getAsString((text) => {
|
|
17053
|
-
resolve(text);
|
|
17054
|
-
});
|
|
17055
|
-
});
|
|
17056
|
-
}
|
|
17057
17079
|
mapToPasteNodes() {
|
|
17058
17080
|
const nodesSelectionPlugin = this.getNodesSelectionPlugin();
|
|
17059
17081
|
const selectedNodes = nodesSelectionPlugin?.getSelectedNodes();
|
|
@@ -17184,8 +17206,10 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
17184
17206
|
}
|
|
17185
17207
|
try {
|
|
17186
17208
|
const items = await navigator.clipboard.read();
|
|
17187
|
-
let
|
|
17209
|
+
let positionCalculated = false;
|
|
17210
|
+
let pastePosition = relativePosition;
|
|
17188
17211
|
if (typeof pastePosition === "undefined") {
|
|
17212
|
+
positionCalculated = true;
|
|
17189
17213
|
const container = stage.container();
|
|
17190
17214
|
const scale = stage.scale();
|
|
17191
17215
|
const position$1 = stage.position();
|
|
@@ -17199,6 +17223,7 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
17199
17223
|
};
|
|
17200
17224
|
}
|
|
17201
17225
|
this.instance.emitEvent("onPasteExternal", {
|
|
17226
|
+
positionCalculated,
|
|
17202
17227
|
position: pastePosition,
|
|
17203
17228
|
items
|
|
17204
17229
|
});
|
|
@@ -19165,7 +19190,7 @@ var WeaveRegisterManager = class {
|
|
|
19165
19190
|
|
|
19166
19191
|
//#endregion
|
|
19167
19192
|
//#region package.json
|
|
19168
|
-
var version = "0.52.
|
|
19193
|
+
var version = "0.52.3";
|
|
19169
19194
|
|
|
19170
19195
|
//#endregion
|
|
19171
19196
|
//#region src/managers/setup.ts
|
|
@@ -19747,6 +19772,15 @@ var Weave = class {
|
|
|
19747
19772
|
isEmpty() {
|
|
19748
19773
|
return this.getElementsTree().length === 0;
|
|
19749
19774
|
}
|
|
19775
|
+
getNodeContainerId(node) {
|
|
19776
|
+
const stage = this.getStage();
|
|
19777
|
+
let nodeContainer = node.getParent()?.getAttrs().id ?? "";
|
|
19778
|
+
if (typeof node.getParent()?.getAttrs().nodeId !== "undefined") {
|
|
19779
|
+
const realContainer = stage.findOne(`#${node.getParent()?.getAttrs().nodeId}`);
|
|
19780
|
+
if (realContainer) nodeContainer = realContainer.getAttrs().id ?? "";
|
|
19781
|
+
}
|
|
19782
|
+
return nodeContainer;
|
|
19783
|
+
}
|
|
19750
19784
|
moveUp(node) {
|
|
19751
19785
|
this.zIndexManager.moveUp(node);
|
|
19752
19786
|
}
|
|
@@ -20171,7 +20205,7 @@ var WeaveEllipseNode = class extends WeaveNode {
|
|
|
20171
20205
|
ellipse.allowedAnchors = () => {
|
|
20172
20206
|
const stage = this.instance.getStage();
|
|
20173
20207
|
const actualEllipse = stage.findOne(`#${ellipse.id()}`);
|
|
20174
|
-
if (actualEllipse?.getAttrs()
|
|
20208
|
+
if (actualEllipse?.getAttrs()?.keepAspectRatio) return [
|
|
20175
20209
|
"top-left",
|
|
20176
20210
|
"top-right",
|
|
20177
20211
|
"bottom-left",
|
|
@@ -20618,7 +20652,7 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
20618
20652
|
this.removeTextAreaDOM(textNode);
|
|
20619
20653
|
this.instance.removeEventListener("onZoomChange", this.onZoomChangeHandler(textNode).bind(this));
|
|
20620
20654
|
this.instance.removeEventListener("onStageMove", this.onStageMoveHandler(textNode).bind(this));
|
|
20621
|
-
window.removeEventListener("
|
|
20655
|
+
window.removeEventListener("pointerup", handleOutsideClick);
|
|
20622
20656
|
return;
|
|
20623
20657
|
}
|
|
20624
20658
|
};
|
|
@@ -20642,20 +20676,27 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
20642
20676
|
const handleOutsideClick = (e) => {
|
|
20643
20677
|
e.stopPropagation();
|
|
20644
20678
|
if (!this.textArea) return;
|
|
20679
|
+
const mouseX = e.clientX;
|
|
20680
|
+
const mouseY = e.clientY;
|
|
20681
|
+
let elementUnderMouse = document.elementFromPoint(mouseX, mouseY);
|
|
20682
|
+
if (isInShadowDOM(stage.container())) {
|
|
20683
|
+
const shadowHost = getTopmostShadowHost(stage.container());
|
|
20684
|
+
if (shadowHost) elementUnderMouse = shadowHost.elementFromPoint(mouseX, mouseY);
|
|
20685
|
+
}
|
|
20645
20686
|
let clickedOnCanvas = false;
|
|
20646
|
-
if (
|
|
20687
|
+
if (elementUnderMouse?.id !== `${textNode.id()}`) clickedOnCanvas = true;
|
|
20647
20688
|
if (clickedOnCanvas) {
|
|
20648
20689
|
textNode.text(this.textArea.value);
|
|
20649
20690
|
this.removeTextAreaDOM(textNode);
|
|
20650
20691
|
this.textArea.removeEventListener("keydown", handleKeyDown);
|
|
20651
20692
|
this.textArea.removeEventListener("keyup", handleKeyUp);
|
|
20652
|
-
window.removeEventListener("
|
|
20693
|
+
window.removeEventListener("pointerup", handleOutsideClick);
|
|
20653
20694
|
window.removeEventListener("pointerdown", handleOutsideClick);
|
|
20654
20695
|
return;
|
|
20655
20696
|
}
|
|
20656
20697
|
};
|
|
20657
20698
|
setTimeout(() => {
|
|
20658
|
-
window.addEventListener("
|
|
20699
|
+
window.addEventListener("pointerup", handleOutsideClick);
|
|
20659
20700
|
window.addEventListener("pointerdown", handleOutsideClick);
|
|
20660
20701
|
}, 0);
|
|
20661
20702
|
this.editing = true;
|
|
@@ -20978,6 +21019,7 @@ var WeaveImageToolAction = class extends WeaveAction {
|
|
|
20978
21019
|
this.imageId = null;
|
|
20979
21020
|
this.forceMainContainer = false;
|
|
20980
21021
|
this.container = void 0;
|
|
21022
|
+
this.tempImageNode = null;
|
|
20981
21023
|
this.imageURL = null;
|
|
20982
21024
|
this.clickPoint = null;
|
|
20983
21025
|
this.setState(IMAGE_TOOL_STATE.IDLE);
|
|
@@ -20993,19 +21035,19 @@ var WeaveImageCrop = class WeaveImageCrop {
|
|
|
20993
21035
|
this.image = image;
|
|
20994
21036
|
this.internalImage = internalImage;
|
|
20995
21037
|
this.cropGroup = clipGroup;
|
|
21038
|
+
this.cropping = false;
|
|
20996
21039
|
this.onClose = () => {};
|
|
20997
21040
|
this.handleHide = this.hide.bind(this);
|
|
20998
21041
|
}
|
|
20999
21042
|
show(onClose) {
|
|
21000
21043
|
this.onClose = onClose;
|
|
21001
|
-
|
|
21002
|
-
|
|
21003
|
-
|
|
21004
|
-
|
|
21005
|
-
|
|
21006
|
-
|
|
21007
|
-
|
|
21008
|
-
}
|
|
21044
|
+
this.cropping = true;
|
|
21045
|
+
const nodeEdgeSnappingPlugin = this.getNodesEdgeSnappingPlugin();
|
|
21046
|
+
if (nodeEdgeSnappingPlugin) nodeEdgeSnappingPlugin.disable();
|
|
21047
|
+
const nodeDistanceSnappingPlugin = this.getNodesDistanceSnappingPlugin();
|
|
21048
|
+
if (nodeDistanceSnappingPlugin) nodeDistanceSnappingPlugin.disable();
|
|
21049
|
+
const nodesSelectionPlugin = this.getNodesSelectionPlugin();
|
|
21050
|
+
if (nodesSelectionPlugin) nodesSelectionPlugin.disable();
|
|
21009
21051
|
this.image.setAttrs({ cropping: true });
|
|
21010
21052
|
const imageAttrs = this.image.getAttrs();
|
|
21011
21053
|
this.internalImage.hide();
|
|
@@ -21125,6 +21167,7 @@ var WeaveImageCrop = class WeaveImageCrop {
|
|
|
21125
21167
|
this.drawGridLines(cropRect$1.x, cropRect$1.y, cropRect$1.width, cropRect$1.height);
|
|
21126
21168
|
};
|
|
21127
21169
|
this.instance.getStage().on("pointerdown", (e) => {
|
|
21170
|
+
if (!this.cropping) return;
|
|
21128
21171
|
const isStage = e.target instanceof konva.default.Stage;
|
|
21129
21172
|
const isContainerEmptyArea = typeof e.target.getAttrs().isContainerPrincipal !== "undefined" && !e.target.getAttrs().isContainerPrincipal;
|
|
21130
21173
|
if (isStage || isContainerEmptyArea) this.cancel();
|
|
@@ -21164,6 +21207,7 @@ var WeaveImageCrop = class WeaveImageCrop {
|
|
|
21164
21207
|
}
|
|
21165
21208
|
hide(e) {
|
|
21166
21209
|
if (!["Enter", "Escape"].includes(e.key)) return;
|
|
21210
|
+
this.cropping = false;
|
|
21167
21211
|
this.image.setAttrs({ cropping: false });
|
|
21168
21212
|
if (e.key === "Enter") this.handleClipEnd();
|
|
21169
21213
|
const stage = this.instance.getStage();
|
|
@@ -21173,20 +21217,13 @@ var WeaveImageCrop = class WeaveImageCrop {
|
|
|
21173
21217
|
this.instance.getStage().container().removeEventListener("keydown", this.handleHide);
|
|
21174
21218
|
this.cropGroup.destroyChildren();
|
|
21175
21219
|
this.cropGroup.hide();
|
|
21176
|
-
const
|
|
21177
|
-
if (
|
|
21220
|
+
const nodesEdgeSnappingPlugin = this.getNodesEdgeSnappingPlugin();
|
|
21221
|
+
if (nodesEdgeSnappingPlugin) nodesEdgeSnappingPlugin.enable();
|
|
21222
|
+
const nodesDistanceSnappingPlugin = this.getNodesDistanceSnappingPlugin();
|
|
21223
|
+
if (nodesDistanceSnappingPlugin) nodesDistanceSnappingPlugin.enable();
|
|
21178
21224
|
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
|
-
}
|
|
21225
|
+
const nodesSelectionPlugin = this.getNodesSelectionPlugin();
|
|
21226
|
+
if (nodesSelectionPlugin) nodesSelectionPlugin.enable();
|
|
21190
21227
|
stage.mode(WEAVE_STAGE_DEFAULT_MODE);
|
|
21191
21228
|
this.instance.emitEvent("onImageCropEnd", { instance: this.image });
|
|
21192
21229
|
}
|
|
@@ -21324,6 +21361,18 @@ var WeaveImageCrop = class WeaveImageCrop {
|
|
|
21324
21361
|
y: a.y + t * ab.y
|
|
21325
21362
|
};
|
|
21326
21363
|
}
|
|
21364
|
+
getNodesEdgeSnappingPlugin() {
|
|
21365
|
+
const snappingEdgesPlugin = this.instance.getPlugin(WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY);
|
|
21366
|
+
return snappingEdgesPlugin;
|
|
21367
|
+
}
|
|
21368
|
+
getNodesDistanceSnappingPlugin() {
|
|
21369
|
+
const snappingDistancePlugin = this.instance.getPlugin(WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY);
|
|
21370
|
+
return snappingDistancePlugin;
|
|
21371
|
+
}
|
|
21372
|
+
getNodesSelectionPlugin() {
|
|
21373
|
+
const nodesSelectionPlugin = this.instance.getPlugin(WEAVE_NODES_SELECTION_KEY);
|
|
21374
|
+
return nodesSelectionPlugin;
|
|
21375
|
+
}
|
|
21327
21376
|
};
|
|
21328
21377
|
|
|
21329
21378
|
//#endregion
|
|
@@ -21587,12 +21636,6 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
21587
21636
|
});
|
|
21588
21637
|
this.updateImageCrop(nextProps);
|
|
21589
21638
|
}
|
|
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
21639
|
}
|
|
21597
21640
|
loadImage(params, image) {
|
|
21598
21641
|
const imageProps = params;
|
|
@@ -22764,8 +22807,13 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
|
|
|
22764
22807
|
const performZoom = this.isCtrlOrMetaPressed || !this.isCtrlOrMetaPressed && e.ctrlKey && e.deltaMode === 0;
|
|
22765
22808
|
const mouseX = e.clientX;
|
|
22766
22809
|
const mouseY = e.clientY;
|
|
22767
|
-
|
|
22810
|
+
let elementUnderMouse = document.elementFromPoint(mouseX, mouseY);
|
|
22811
|
+
if (isInShadowDOM(stage.container())) {
|
|
22812
|
+
const shadowHost = getTopmostShadowHost(stage.container());
|
|
22813
|
+
if (shadowHost) elementUnderMouse = shadowHost.elementFromPoint(mouseX, mouseY);
|
|
22814
|
+
}
|
|
22768
22815
|
if (!this.enabled || !performZoom || getClosestParentWithId(elementUnderMouse) !== stage.container()) return;
|
|
22816
|
+
e.preventDefault();
|
|
22769
22817
|
const delta = e.deltaY > 0 ? 1 : -1;
|
|
22770
22818
|
this.zoomVelocity += delta;
|
|
22771
22819
|
this.isTrackpad = Math.abs(e.deltaY) < 15 && e.deltaMode === 0;
|
|
@@ -25580,6 +25628,10 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
25580
25628
|
window.addEventListener("keydown", (e) => {
|
|
25581
25629
|
if (e.ctrlKey || e.metaKey) this.isCtrlOrMetaPressed = true;
|
|
25582
25630
|
if (e.code === "Space") {
|
|
25631
|
+
this.getContextMenuPlugin()?.disable();
|
|
25632
|
+
this.getNodesSelectionPlugin()?.disable();
|
|
25633
|
+
this.getNodesEdgeSnappingPlugin()?.disable();
|
|
25634
|
+
this.getNodesDistanceSnappingPlugin()?.disable();
|
|
25583
25635
|
this.isSpaceKeyPressed = true;
|
|
25584
25636
|
this.enableMove();
|
|
25585
25637
|
}
|
|
@@ -25587,6 +25639,10 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
25587
25639
|
window.addEventListener("keyup", (e) => {
|
|
25588
25640
|
if (e.key === "Meta" || e.key === "Control") this.isCtrlOrMetaPressed = false;
|
|
25589
25641
|
if (e.code === "Space") {
|
|
25642
|
+
this.getContextMenuPlugin()?.enable();
|
|
25643
|
+
this.getNodesSelectionPlugin()?.enable();
|
|
25644
|
+
this.getNodesEdgeSnappingPlugin()?.enable();
|
|
25645
|
+
this.getNodesDistanceSnappingPlugin()?.enable();
|
|
25590
25646
|
this.isSpaceKeyPressed = false;
|
|
25591
25647
|
this.disableMove();
|
|
25592
25648
|
}
|
|
@@ -25601,14 +25657,9 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
25601
25657
|
if (this.pointers.size > 1) return;
|
|
25602
25658
|
const activeAction = this.instance.getActiveAction();
|
|
25603
25659
|
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
|
-
}
|
|
25660
|
+
if (e && (e.evt.pointerType !== "mouse" || e.evt.pointerType === "mouse" && e.evt.buttons === 1) && activeAction === MOVE_TOOL_ACTION_NAME) this.moveToolActive = true;
|
|
25661
|
+
if (!enableMove && e.evt.pointerType === "mouse" && e.evt.buttons === 4) this.isMouseMiddleButtonPressed = true;
|
|
25662
|
+
if (this.enabled && (this.isSpaceKeyPressed || this.moveToolActive || this.isMouseMiddleButtonPressed)) enableMove = true;
|
|
25612
25663
|
if (enableMove) {
|
|
25613
25664
|
isDragging = true;
|
|
25614
25665
|
lastPos = stage.getPointerPosition();
|
|
@@ -25625,8 +25676,8 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
25625
25676
|
y: e.evt.clientY
|
|
25626
25677
|
});
|
|
25627
25678
|
if (this.pointers.size > 1) return;
|
|
25679
|
+
if (this.isSpaceKeyPressed) stage.container().style.cursor = "grabbing";
|
|
25628
25680
|
if (!isDragging) return;
|
|
25629
|
-
if (!this.enabled || !(this.isSpaceKeyPressed || this.isMouseMiddleButtonPressed || this.moveToolActive)) return;
|
|
25630
25681
|
this.getContextMenuPlugin()?.cancelLongPressTimer();
|
|
25631
25682
|
const pos = stage.getPointerPosition();
|
|
25632
25683
|
if (pos && lastPos) {
|
|
@@ -25648,14 +25699,18 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
25648
25699
|
const performPanning = !this.isCtrlOrMetaPressed && !e.ctrlKey;
|
|
25649
25700
|
const mouseX = e.clientX;
|
|
25650
25701
|
const mouseY = e.clientY;
|
|
25651
|
-
|
|
25702
|
+
let elementUnderMouse = document.elementFromPoint(mouseX, mouseY);
|
|
25703
|
+
if (isInShadowDOM(stage.container())) {
|
|
25704
|
+
const shadowHost = getTopmostShadowHost(stage.container());
|
|
25705
|
+
if (shadowHost) elementUnderMouse = shadowHost.elementFromPoint(mouseX, mouseY);
|
|
25706
|
+
}
|
|
25652
25707
|
if (!this.enabled || this.isCtrlOrMetaPressed || e.buttons === 4 || !performPanning || getClosestParentWithId(elementUnderMouse) !== stage.container()) return;
|
|
25653
25708
|
this.getContextMenuPlugin()?.cancelLongPressTimer();
|
|
25654
25709
|
stage.x(stage.x() - e.deltaX);
|
|
25655
25710
|
stage.y(stage.y() - e.deltaY);
|
|
25656
25711
|
this.instance.emitEvent("onStageMove");
|
|
25657
25712
|
};
|
|
25658
|
-
window.addEventListener("wheel", handleWheel, { passive:
|
|
25713
|
+
window.addEventListener("wheel", handleWheel, { passive: true });
|
|
25659
25714
|
stage.container().style.touchAction = "none";
|
|
25660
25715
|
stage.container().style.userSelect = "none";
|
|
25661
25716
|
stage.container().style.setProperty("-webkit-user-drag", "none");
|
|
@@ -25685,9 +25740,21 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
25685
25740
|
return zoomPlugin;
|
|
25686
25741
|
}
|
|
25687
25742
|
getContextMenuPlugin() {
|
|
25688
|
-
const contextMenuPlugin = this.instance.getPlugin(
|
|
25743
|
+
const contextMenuPlugin = this.instance.getPlugin(WEAVE_CONTEXT_MENU_PLUGIN_KEY);
|
|
25689
25744
|
return contextMenuPlugin;
|
|
25690
25745
|
}
|
|
25746
|
+
getNodesSelectionPlugin() {
|
|
25747
|
+
const selectionPlugin = this.instance.getPlugin(WEAVE_NODES_SELECTION_KEY);
|
|
25748
|
+
return selectionPlugin;
|
|
25749
|
+
}
|
|
25750
|
+
getNodesEdgeSnappingPlugin() {
|
|
25751
|
+
const snappingPlugin = this.instance.getPlugin(WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY);
|
|
25752
|
+
return snappingPlugin;
|
|
25753
|
+
}
|
|
25754
|
+
getNodesDistanceSnappingPlugin() {
|
|
25755
|
+
const snappingPlugin = this.instance.getPlugin(WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY);
|
|
25756
|
+
return snappingPlugin;
|
|
25757
|
+
}
|
|
25691
25758
|
enable() {
|
|
25692
25759
|
this.enabled = true;
|
|
25693
25760
|
}
|
|
@@ -27156,10 +27223,12 @@ exports.getExportBoundingBox = getExportBoundingBox
|
|
|
27156
27223
|
exports.getSelectedNodesMetadata = getSelectedNodesMetadata
|
|
27157
27224
|
exports.getTargetAndSkipNodes = getTargetAndSkipNodes
|
|
27158
27225
|
exports.getTargetedNode = getTargetedNode
|
|
27226
|
+
exports.getTopmostShadowHost = getTopmostShadowHost
|
|
27159
27227
|
exports.getVisibleNodesInViewport = getVisibleNodesInViewport
|
|
27160
27228
|
exports.hasFrames = hasFrames
|
|
27161
27229
|
exports.hasImages = hasImages
|
|
27162
27230
|
exports.intersectArrays = intersectArrays
|
|
27231
|
+
exports.isInShadowDOM = isInShadowDOM
|
|
27163
27232
|
exports.isNodeInSelection = isNodeInSelection
|
|
27164
27233
|
exports.moveNodeToContainer = moveNodeToContainer
|
|
27165
27234
|
exports.resetScale = resetScale
|
package/dist/sdk.d.cts
CHANGED
|
@@ -517,6 +517,7 @@ declare class WeaveNodesSelectionPlugin extends WeavePlugin {
|
|
|
517
517
|
private didMove;
|
|
518
518
|
private initialized;
|
|
519
519
|
private readonly selectionOriginalConfig;
|
|
520
|
+
private isSpaceKeyPressed;
|
|
520
521
|
protected taps: number;
|
|
521
522
|
protected isDoubleTap: boolean;
|
|
522
523
|
protected tapStart: {
|
|
@@ -781,6 +782,7 @@ declare class Weave {
|
|
|
781
782
|
moveNode(node: WeaveStateElement, position: WeavePosition): void;
|
|
782
783
|
getElementsTree(): WeaveStateElement[];
|
|
783
784
|
isEmpty(): boolean;
|
|
785
|
+
getNodeContainerId(node: WeaveElementInstance | Konva.Node): string;
|
|
784
786
|
moveUp(node: WeaveElementInstance): void;
|
|
785
787
|
moveDown(node: WeaveElementInstance): void;
|
|
786
788
|
sendToBack(nodes: WeaveElementInstance | WeaveElementInstance[]): void;
|
|
@@ -828,9 +830,15 @@ type WeaveActionPropsChangeEvent = {
|
|
|
828
830
|
props: WeaveElementAttributes;
|
|
829
831
|
};
|
|
830
832
|
|
|
833
|
+
//#endregion
|
|
834
|
+
//#region src/types.d.ts
|
|
835
|
+
//# sourceMappingURL=types.d.ts.map
|
|
836
|
+
type DOMElement = HTMLElement | Element | null;
|
|
837
|
+
|
|
831
838
|
//#endregion
|
|
832
839
|
//#region src/utils.d.ts
|
|
833
840
|
//# sourceMappingURL=types.d.ts.map
|
|
841
|
+
|
|
834
842
|
declare function resetScale(node: Konva.Node): void;
|
|
835
843
|
declare function clearContainerTargets(instance: Weave): void;
|
|
836
844
|
declare function containerOverCursor(instance: Weave, ignoreNodes: Konva.Node[], definedCursorPosition?: Vector2d): Konva.Node | undefined;
|
|
@@ -865,7 +873,9 @@ declare function getTargetAndSkipNodes(instance: Weave, e: KonvaEventObject<any,
|
|
|
865
873
|
skipNodes: string[];
|
|
866
874
|
};
|
|
867
875
|
declare function getVisibleNodesInViewport(stage: Konva.Stage, referenceLayer: Konva.Layer | Konva.Group | undefined): konva_lib_Node3.Node<konva_lib_Node2.NodeConfig>[];
|
|
868
|
-
declare function getClosestParentWithId(el:
|
|
876
|
+
declare function getClosestParentWithId(el: DOMElement): DOMElement;
|
|
877
|
+
declare function isInShadowDOM(el: DOMElement): boolean;
|
|
878
|
+
declare function getTopmostShadowHost(el: DOMElement): ShadowRoot | null;
|
|
869
879
|
|
|
870
880
|
//#endregion
|
|
871
881
|
//#region src/nodes/stage/stage.d.ts
|
|
@@ -2391,6 +2401,9 @@ declare class WeaveStagePanningPlugin extends WeavePlugin {
|
|
|
2391
2401
|
} | null;
|
|
2392
2402
|
getZoomPlugin(): WeaveStageZoomPlugin | undefined;
|
|
2393
2403
|
getContextMenuPlugin(): WeaveContextMenuPlugin | undefined;
|
|
2404
|
+
getNodesSelectionPlugin(): WeaveNodesSelectionPlugin | undefined;
|
|
2405
|
+
getNodesEdgeSnappingPlugin(): WeaveNodesEdgeSnappingPlugin | undefined;
|
|
2406
|
+
getNodesDistanceSnappingPlugin(): WeaveNodesDistanceSnappingPlugin | undefined;
|
|
2394
2407
|
enable(): void;
|
|
2395
2408
|
disable(): void;
|
|
2396
2409
|
}
|
|
@@ -2616,6 +2629,7 @@ type WeaveCopyPasteNodesPluginOnPasteEvent = Error | undefined;
|
|
|
2616
2629
|
type WeaveCopyPasteNodesPluginOnPasteExternalEvent = {
|
|
2617
2630
|
items?: ClipboardItems;
|
|
2618
2631
|
dataList?: DataTransferItemList;
|
|
2632
|
+
positionCalculated: boolean;
|
|
2619
2633
|
position: Vector2d;
|
|
2620
2634
|
};
|
|
2621
2635
|
type WeaveCopyPastePasteModeKeys = keyof typeof WEAVE_COPY_PASTE_PASTE_MODES;
|
|
@@ -2649,10 +2663,10 @@ declare class WeaveCopyPasteNodesPlugin extends WeavePlugin {
|
|
|
2649
2663
|
private writeClipboardData;
|
|
2650
2664
|
private existsPasteCatcher;
|
|
2651
2665
|
private createPasteCatcher;
|
|
2666
|
+
private getCatcherElement;
|
|
2652
2667
|
private focusPasteCatcher;
|
|
2653
2668
|
initEvents(): void;
|
|
2654
2669
|
private isWeaveData;
|
|
2655
|
-
private getTextFromClipboard;
|
|
2656
2670
|
private mapToPasteNodes;
|
|
2657
2671
|
private setState;
|
|
2658
2672
|
private recursivelyUpdateKeys;
|
|
@@ -2681,5 +2695,5 @@ declare class WeaveCopyPasteNodesPlugin extends WeavePlugin {
|
|
|
2681
2695
|
//#endregion
|
|
2682
2696
|
//# sourceMappingURL=copy-paste-nodes.d.ts.map
|
|
2683
2697
|
|
|
2684
|
-
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, DistanceInfoH, DistanceInfoV, 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, Guide, GuideOrientation, GuideOrientationKeys, IMAGE_TOOL_ACTION_NAME, IMAGE_TOOL_STATE, ImageOptions, ImageProps, LineGuide, LineGuideStop, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NODE_SNAP_HORIZONTAL, NODE_SNAP_VERTICAL, NodeSnap, NodeSnapHorizontal, NodeSnapHorizontalKeys, NodeSnapKeys, NodeSnapVertical, NodeSnapVerticalKeys, NodeSnappingEdge, NodeSnappingEdges, 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, TextSerializable, 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, WeaveActionPropsChangeEvent, WeaveAlignNodesToolAction, WeaveAlignNodesToolActionAlignTo, WeaveAlignNodesToolActionAlignToKeys, WeaveAlignNodesToolActionState, WeaveAlignNodesToolActionStateKeys, WeaveAlignNodesToolActionTriggerParams, WeaveArrowNode, WeaveArrowNodeParams, WeaveArrowProperties, WeaveArrowToolAction, WeaveArrowToolActionOnAddedEvent, WeaveArrowToolActionOnAddingEvent, WeaveArrowToolActionState, WeaveArrowToolActionStateKeys, WeaveBrushToolAction, WeaveBrushToolActionOnAddedEvent, WeaveBrushToolActionOnAddingEvent, WeaveBrushToolActionState, WeaveBrushToolActionStateKeys, WeaveConnectedUserInfoKey, WeaveConnectedUsers, WeaveConnectedUsersChangeEvent, WeaveConnectedUsersPlugin, WeaveConnectedUsersPluginConfig, WeaveConnectedUsersPluginParams, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveCopyPasteNodesPluginOnCopyEvent, WeaveCopyPasteNodesPluginOnPasteEvent, WeaveCopyPasteNodesPluginOnPasteExternalEvent, WeaveCopyPasteNodesPluginState, WeaveCopyPasteNodesPluginStateKeys, WeaveCopyPastePasteMode, WeaveCopyPastePasteModeKeys, WeaveEllipseNode, WeaveEllipseNodeParams, WeaveEllipseProperties, WeaveEllipseToolAction, WeaveEllipseToolActionOnAddedEvent, WeaveEllipseToolActionOnAddingEvent, WeaveEllipseToolActionState, WeaveEllipseToolActionStateKeys, WeaveEraserToolAction, WeaveEraserToolActionState, WeaveEraserToolActionStateKeys, WeaveExportNodesActionParams, WeaveExportNodesToolAction, WeaveExportStageActionParams, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToScreenToolActionParams, WeaveFitToSelectionToolAction, WeaveFitToSelectionToolActionParams, WeaveFrameAttributes, WeaveFrameNode, WeaveFrameNodeParams, WeaveFrameProperties, WeaveFrameToolAction, WeaveFrameToolActionOnAddedEvent, WeaveFrameToolActionOnAddingEvent, WeaveFrameToolActionState, WeaveFrameToolActionStateKeys, WeaveFrameToolActionTriggerParams, WeaveFrameToolProps, WeaveGroupNode, WeaveGroupNodeParams, WeaveGroupProperties, WeaveImageCropEndType, WeaveImageCropEndTypeKeys, WeaveImageNode, WeaveImageNodeParams, WeaveImageOnCropEndEvent, WeaveImageOnCropStartEvent, WeaveImageProperties, WeaveImageToolAction, WeaveImageToolActionOnAddedEvent, WeaveImageToolActionOnAddingEvent, WeaveImageToolActionOnEndLoadImageEvent, WeaveImageToolActionOnStartLoadImageEvent, WeaveImageToolActionState, WeaveImageToolActionStateKeys, WeaveImageToolActionTriggerParams, WeaveImageToolActionTriggerReturn, WeaveLayerNode, WeaveLineNode, WeaveLineNodeParams, WeaveLineProperties, WeaveMoveToolAction, WeaveMoveToolActionParams, WeaveMoveToolActionState, WeaveMoveToolActionStateKeys, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesDistanceSnappingPluginConfig, WeaveNodesDistanceSnappingPluginParams, WeaveNodesEdgeSnappingPlugin, WeaveNodesEdgeSnappingPluginConfig, WeaveNodesEdgeSnappingPluginParams, WeaveNodesSelectionBehaviorsConfig, WeaveNodesSelectionConfig, WeaveNodesSelectionPlugin, WeaveNodesSelectionPluginConfig, WeaveNodesSelectionPluginOnNodesChangeEvent, WeaveNodesSelectionPluginOnSelectionStateEvent, WeaveNodesSelectionPluginOnStageSelectionEvent, WeaveNodesSelectionPluginParams, WeavePasteModel, WeavePenToolAction, WeavePenToolActionOnAddedEvent, WeavePenToolActionOnAddingEvent, WeavePenToolActionState, WeavePenToolActionStateKeys, WeavePlugin, WeaveRectangleNode, WeaveRectangleNodeParams, WeaveRectangleProperties, WeaveRectangleToolAction, WeaveRectangleToolActionOnAddedEvent, WeaveRectangleToolActionOnAddingEvent, WeaveRectangleToolActionState, WeaveRectangleToolActionStateKeys, WeaveRegularPolygonNode, WeaveRegularPolygonNodeParams, WeaveRegularPolygonProperties, WeaveRegularPolygonToolAction, WeaveRegularPolygonToolActionOnAddedEvent, WeaveRegularPolygonToolActionOnAddingEvent, WeaveRegularPolygonToolActionState, WeaveRegularPolygonToolActionStateKeys, WeaveSelectionToolAction, WeaveSelectionToolActionState, WeaveSelectionToolActionStateKeys, WeaveStageContextMenuPluginConfig, WeaveStageContextMenuPluginOnNodeContextMenuEvent, WeaveStageContextMenuPluginParams, WeaveStageDropAreaPlugin, WeaveStageDropPluginOnStageDropEvent, WeaveStageGridPlugin, WeaveStageGridPluginConfig, WeaveStageGridPluginParams, WeaveStageGridType, WeaveStageGridTypeKeys, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomChanged, WeaveStageZoomPlugin, WeaveStageZoomPluginConfig, WeaveStageZoomPluginOnZoomChangeEvent, WeaveStageZoomPluginParams, WeaveStageZoomType, WeaveStageZoomTypeKeys, WeaveStarNode, WeaveStarNodeParams, WeaveStarProperties, WeaveStarToolAction, WeaveStarToolActionOnAddedEvent, WeaveStarToolActionOnAddingEvent, WeaveStarToolActionState, WeaveStarToolActionStateKeys, WeaveStore, WeaveStoreOnNodeChangeEvent, WeaveStoreOnRoomLoadedEvent, WeaveStoreOnStateChangeEvent, WeaveStoreOnUndoRedoChangeEvent, WeaveStrokeNode, WeaveStrokeNodeParams, WeaveStrokePoint, WeaveStrokeProperties, WeaveTextLayout, WeaveTextLayoutKeys, WeaveTextNode, WeaveTextNodeParams, WeaveTextProperties, WeaveTextToolAction, WeaveTextToolActionOnAddedEvent, WeaveTextToolActionOnAddingEvent, WeaveTextToolActionState, WeaveTextToolActionStateKeys, WeaveToPasteNode, WeaveUserPointer, WeaveUserPointerKey, WeaveUserPointersUIProperties, WeaveUserSelectionInfo, WeaveUserSelectionKey, WeaveUsersPointersPlugin, WeaveUsersPointersPluginConfig, WeaveUsersPointersPluginParams, WeaveUsersSelectionPlugin, WeaveUsersSelectionPluginConfig, WeaveUsersSelectionPluginParams, WeaveZoomInToolAction, WeaveZoomInToolActionParams, WeaveZoomOutToolAction, WeaveZoomOutToolActionParams, clearContainerTargets, containerOverCursor, containsNodeDeep, getBoundingBox, getClosestParentWithId, getContrastTextColor, getExportBoundingBox, getSelectedNodesMetadata, getTargetAndSkipNodes, getTargetedNode, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isNodeInSelection, moveNodeToContainer, resetScale, stringToColor };
|
|
2698
|
+
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, DistanceInfoH, DistanceInfoV, 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, Guide, GuideOrientation, GuideOrientationKeys, IMAGE_TOOL_ACTION_NAME, IMAGE_TOOL_STATE, ImageOptions, ImageProps, LineGuide, LineGuideStop, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NODE_SNAP_HORIZONTAL, NODE_SNAP_VERTICAL, NodeSnap, NodeSnapHorizontal, NodeSnapHorizontalKeys, NodeSnapKeys, NodeSnapVertical, NodeSnapVerticalKeys, NodeSnappingEdge, NodeSnappingEdges, 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, TextSerializable, 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, WeaveActionPropsChangeEvent, WeaveAlignNodesToolAction, WeaveAlignNodesToolActionAlignTo, WeaveAlignNodesToolActionAlignToKeys, WeaveAlignNodesToolActionState, WeaveAlignNodesToolActionStateKeys, WeaveAlignNodesToolActionTriggerParams, WeaveArrowNode, WeaveArrowNodeParams, WeaveArrowProperties, WeaveArrowToolAction, WeaveArrowToolActionOnAddedEvent, WeaveArrowToolActionOnAddingEvent, WeaveArrowToolActionState, WeaveArrowToolActionStateKeys, WeaveBrushToolAction, WeaveBrushToolActionOnAddedEvent, WeaveBrushToolActionOnAddingEvent, WeaveBrushToolActionState, WeaveBrushToolActionStateKeys, WeaveConnectedUserInfoKey, WeaveConnectedUsers, WeaveConnectedUsersChangeEvent, WeaveConnectedUsersPlugin, WeaveConnectedUsersPluginConfig, WeaveConnectedUsersPluginParams, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveCopyPasteNodesPluginOnCopyEvent, WeaveCopyPasteNodesPluginOnPasteEvent, WeaveCopyPasteNodesPluginOnPasteExternalEvent, WeaveCopyPasteNodesPluginState, WeaveCopyPasteNodesPluginStateKeys, WeaveCopyPastePasteMode, WeaveCopyPastePasteModeKeys, WeaveEllipseNode, WeaveEllipseNodeParams, WeaveEllipseProperties, WeaveEllipseToolAction, WeaveEllipseToolActionOnAddedEvent, WeaveEllipseToolActionOnAddingEvent, WeaveEllipseToolActionState, WeaveEllipseToolActionStateKeys, WeaveEraserToolAction, WeaveEraserToolActionState, WeaveEraserToolActionStateKeys, WeaveExportNodesActionParams, WeaveExportNodesToolAction, WeaveExportStageActionParams, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToScreenToolActionParams, WeaveFitToSelectionToolAction, WeaveFitToSelectionToolActionParams, WeaveFrameAttributes, WeaveFrameNode, WeaveFrameNodeParams, WeaveFrameProperties, WeaveFrameToolAction, WeaveFrameToolActionOnAddedEvent, WeaveFrameToolActionOnAddingEvent, WeaveFrameToolActionState, WeaveFrameToolActionStateKeys, WeaveFrameToolActionTriggerParams, WeaveFrameToolProps, WeaveGroupNode, WeaveGroupNodeParams, WeaveGroupProperties, WeaveImageCropEndType, WeaveImageCropEndTypeKeys, WeaveImageNode, WeaveImageNodeParams, WeaveImageOnCropEndEvent, WeaveImageOnCropStartEvent, WeaveImageProperties, WeaveImageToolAction, WeaveImageToolActionOnAddedEvent, WeaveImageToolActionOnAddingEvent, WeaveImageToolActionOnEndLoadImageEvent, WeaveImageToolActionOnStartLoadImageEvent, WeaveImageToolActionState, WeaveImageToolActionStateKeys, WeaveImageToolActionTriggerParams, WeaveImageToolActionTriggerReturn, WeaveLayerNode, WeaveLineNode, WeaveLineNodeParams, WeaveLineProperties, WeaveMoveToolAction, WeaveMoveToolActionParams, WeaveMoveToolActionState, WeaveMoveToolActionStateKeys, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesDistanceSnappingPluginConfig, WeaveNodesDistanceSnappingPluginParams, WeaveNodesEdgeSnappingPlugin, WeaveNodesEdgeSnappingPluginConfig, WeaveNodesEdgeSnappingPluginParams, WeaveNodesSelectionBehaviorsConfig, WeaveNodesSelectionConfig, WeaveNodesSelectionPlugin, WeaveNodesSelectionPluginConfig, WeaveNodesSelectionPluginOnNodesChangeEvent, WeaveNodesSelectionPluginOnSelectionStateEvent, WeaveNodesSelectionPluginOnStageSelectionEvent, WeaveNodesSelectionPluginParams, WeavePasteModel, WeavePenToolAction, WeavePenToolActionOnAddedEvent, WeavePenToolActionOnAddingEvent, WeavePenToolActionState, WeavePenToolActionStateKeys, WeavePlugin, WeaveRectangleNode, WeaveRectangleNodeParams, WeaveRectangleProperties, WeaveRectangleToolAction, WeaveRectangleToolActionOnAddedEvent, WeaveRectangleToolActionOnAddingEvent, WeaveRectangleToolActionState, WeaveRectangleToolActionStateKeys, WeaveRegularPolygonNode, WeaveRegularPolygonNodeParams, WeaveRegularPolygonProperties, WeaveRegularPolygonToolAction, WeaveRegularPolygonToolActionOnAddedEvent, WeaveRegularPolygonToolActionOnAddingEvent, WeaveRegularPolygonToolActionState, WeaveRegularPolygonToolActionStateKeys, WeaveSelectionToolAction, WeaveSelectionToolActionState, WeaveSelectionToolActionStateKeys, WeaveStageContextMenuPluginConfig, WeaveStageContextMenuPluginOnNodeContextMenuEvent, WeaveStageContextMenuPluginParams, WeaveStageDropAreaPlugin, WeaveStageDropPluginOnStageDropEvent, WeaveStageGridPlugin, WeaveStageGridPluginConfig, WeaveStageGridPluginParams, WeaveStageGridType, WeaveStageGridTypeKeys, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomChanged, WeaveStageZoomPlugin, WeaveStageZoomPluginConfig, WeaveStageZoomPluginOnZoomChangeEvent, WeaveStageZoomPluginParams, WeaveStageZoomType, WeaveStageZoomTypeKeys, WeaveStarNode, WeaveStarNodeParams, WeaveStarProperties, WeaveStarToolAction, WeaveStarToolActionOnAddedEvent, WeaveStarToolActionOnAddingEvent, WeaveStarToolActionState, WeaveStarToolActionStateKeys, WeaveStore, WeaveStoreOnNodeChangeEvent, WeaveStoreOnRoomLoadedEvent, WeaveStoreOnStateChangeEvent, WeaveStoreOnUndoRedoChangeEvent, WeaveStrokeNode, WeaveStrokeNodeParams, WeaveStrokePoint, WeaveStrokeProperties, WeaveTextLayout, WeaveTextLayoutKeys, WeaveTextNode, WeaveTextNodeParams, WeaveTextProperties, WeaveTextToolAction, WeaveTextToolActionOnAddedEvent, WeaveTextToolActionOnAddingEvent, WeaveTextToolActionState, WeaveTextToolActionStateKeys, WeaveToPasteNode, WeaveUserPointer, WeaveUserPointerKey, WeaveUserPointersUIProperties, WeaveUserSelectionInfo, WeaveUserSelectionKey, WeaveUsersPointersPlugin, WeaveUsersPointersPluginConfig, WeaveUsersPointersPluginParams, WeaveUsersSelectionPlugin, WeaveUsersSelectionPluginConfig, WeaveUsersSelectionPluginParams, WeaveZoomInToolAction, WeaveZoomInToolActionParams, WeaveZoomOutToolAction, WeaveZoomOutToolActionParams, clearContainerTargets, containerOverCursor, containsNodeDeep, getBoundingBox, getClosestParentWithId, getContrastTextColor, getExportBoundingBox, getSelectedNodesMetadata, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isInShadowDOM, isNodeInSelection, moveNodeToContainer, resetScale, stringToColor };
|
|
2685
2699
|
//# sourceMappingURL=sdk.d.cts.map
|