@inditextech/weave-sdk 0.13.1 → 0.14.1
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 +129 -80
- package/dist/sdk.d.cts +7 -1
- package/dist/sdk.d.ts +7 -1
- package/dist/sdk.js +126 -81
- package/package.json +2 -2
package/dist/sdk.cjs
CHANGED
|
@@ -15886,21 +15886,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
15886
15886
|
...this.config.transformer
|
|
15887
15887
|
});
|
|
15888
15888
|
selectionLayer?.add(tr);
|
|
15889
|
-
tr.on("transform", (e) => {
|
|
15890
|
-
const node = e.target;
|
|
15891
|
-
const nodesSnappingPlugin = this.instance.getPlugin("nodesSnapping");
|
|
15892
|
-
if (nodesSnappingPlugin && this.isSelecting() && this.isNodeSelected(node)) nodesSnappingPlugin.evaluateGuidelines(e);
|
|
15893
|
-
if (this.isSelecting() && this.isNodeSelected(node)) {
|
|
15894
|
-
const nodeHandler = this.instance.getNodeHandler(node.getAttrs().nodeType);
|
|
15895
|
-
this.instance.updateNode(nodeHandler.serialize(node));
|
|
15896
|
-
e.cancelBubble = true;
|
|
15897
|
-
}
|
|
15898
|
-
});
|
|
15899
|
-
tr.on("transformend", (e) => {
|
|
15900
|
-
const node = e.target;
|
|
15901
|
-
const nodesSnappingPlugin = this.instance.getPlugin("nodesSnapping");
|
|
15902
|
-
if (nodesSnappingPlugin && this.isSelecting() && this.isNodeSelected(node)) nodesSnappingPlugin.cleanupEvaluateGuidelines();
|
|
15903
|
-
});
|
|
15904
15889
|
tr.on("mouseenter", (e) => {
|
|
15905
15890
|
if (!this.isPasting()) {
|
|
15906
15891
|
const stage$1 = this.instance.getStage();
|
|
@@ -16292,12 +16277,22 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
16292
16277
|
setState(state) {
|
|
16293
16278
|
this.state = state;
|
|
16294
16279
|
}
|
|
16280
|
+
recursivelyUpdateKeys(nodes) {
|
|
16281
|
+
for (const child of nodes) {
|
|
16282
|
+
const newNodeId = v4_default();
|
|
16283
|
+
child.key = newNodeId;
|
|
16284
|
+
child.props.id = newNodeId;
|
|
16285
|
+
if (child.props.children) this.recursivelyUpdateKeys(child.props.children);
|
|
16286
|
+
}
|
|
16287
|
+
}
|
|
16295
16288
|
handlePaste() {
|
|
16296
16289
|
if (this.toPaste) {
|
|
16297
16290
|
const { mousePoint, container } = this.instance.getMousePointer();
|
|
16298
16291
|
for (const element of Object.keys(this.toPaste.weave)) {
|
|
16299
16292
|
const node = this.toPaste.weave[element];
|
|
16293
|
+
if (node.props.children) this.recursivelyUpdateKeys(node.props.children);
|
|
16300
16294
|
const newNodeId = v4_default();
|
|
16295
|
+
delete node.props.containerId;
|
|
16301
16296
|
node.key = newNodeId;
|
|
16302
16297
|
node.props.id = newNodeId;
|
|
16303
16298
|
node.props.x = mousePoint.x + (node.props.x - this.toPaste.weaveMinPoint.x);
|
|
@@ -16415,6 +16410,25 @@ var WeaveNode = class {
|
|
|
16415
16410
|
if (selectionPlugin.getSelectedNodes().length === 1 && selectionPlugin.getSelectedNodes()[0].getAttrs().id === ele.getAttrs().id) selected = true;
|
|
16416
16411
|
return selected;
|
|
16417
16412
|
}
|
|
16413
|
+
scaleReset(node) {
|
|
16414
|
+
if (node.getAttrs().nodeType === "line") {
|
|
16415
|
+
const lineNode = node;
|
|
16416
|
+
const oldPoints = lineNode.points();
|
|
16417
|
+
const newPoints = [];
|
|
16418
|
+
for (let i = 0; i < oldPoints.length / 2; i++) {
|
|
16419
|
+
const point = {
|
|
16420
|
+
x: oldPoints[i * 2] * lineNode.scaleX(),
|
|
16421
|
+
y: oldPoints[i * 2 + 1] * lineNode.scaleY()
|
|
16422
|
+
};
|
|
16423
|
+
newPoints.push(point.x, point.y);
|
|
16424
|
+
}
|
|
16425
|
+
lineNode.points(newPoints);
|
|
16426
|
+
}
|
|
16427
|
+
node.width(Math.max(5, node.width() * node.scaleX()));
|
|
16428
|
+
node.height(Math.max(5, node.height() * node.scaleY()));
|
|
16429
|
+
node.scaleX(1);
|
|
16430
|
+
node.scaleY(1);
|
|
16431
|
+
}
|
|
16418
16432
|
setupDefaultNodeEvents(node) {
|
|
16419
16433
|
this.previousPointer = null;
|
|
16420
16434
|
this.instance.addEventListener("onNodesChange", () => {
|
|
@@ -16424,6 +16438,22 @@ var WeaveNode = class {
|
|
|
16424
16438
|
}
|
|
16425
16439
|
node.draggable(false);
|
|
16426
16440
|
});
|
|
16441
|
+
node.on("transform", (e) => {
|
|
16442
|
+
const node$1 = e.target;
|
|
16443
|
+
const nodesSnappingPlugin = this.instance.getPlugin("nodesSnapping");
|
|
16444
|
+
if (nodesSnappingPlugin && this.isSelecting() && this.isNodeSelected(node$1)) nodesSnappingPlugin.evaluateGuidelines(e);
|
|
16445
|
+
if (this.isSelecting() && this.isNodeSelected(node$1)) {
|
|
16446
|
+
this.scaleReset(node$1);
|
|
16447
|
+
const nodeHandler = this.instance.getNodeHandler(node$1.getAttrs().nodeType);
|
|
16448
|
+
this.instance.updateNode(nodeHandler.serialize(node$1));
|
|
16449
|
+
e.cancelBubble = true;
|
|
16450
|
+
}
|
|
16451
|
+
});
|
|
16452
|
+
node.on("transformend", (e) => {
|
|
16453
|
+
const node$1 = e.target;
|
|
16454
|
+
const nodesSnappingPlugin = this.instance.getPlugin("nodesSnapping");
|
|
16455
|
+
if (nodesSnappingPlugin && this.isSelecting() && this.isNodeSelected(node$1)) nodesSnappingPlugin.cleanupEvaluateGuidelines();
|
|
16456
|
+
});
|
|
16427
16457
|
node.on("dragmove", (e) => {
|
|
16428
16458
|
if (this.isSelecting() && this.isNodeSelected(node)) {
|
|
16429
16459
|
clearContainerTargets(this.instance);
|
|
@@ -17883,7 +17913,7 @@ var WeaveRegisterManager = class {
|
|
|
17883
17913
|
|
|
17884
17914
|
//#endregion
|
|
17885
17915
|
//#region package.json
|
|
17886
|
-
var version = "0.
|
|
17916
|
+
var version = "0.14.1";
|
|
17887
17917
|
|
|
17888
17918
|
//#endregion
|
|
17889
17919
|
//#region src/managers/setup.ts
|
|
@@ -18661,6 +18691,14 @@ var WeaveLineNode = class extends WeaveNode {
|
|
|
18661
18691
|
//#region src/nodes/text/constants.ts
|
|
18662
18692
|
const WEAVE_TEXT_NODE_TYPE = "text";
|
|
18663
18693
|
|
|
18694
|
+
//#endregion
|
|
18695
|
+
//#region src/actions/selection-tool/constants.ts
|
|
18696
|
+
const SELECTION_TOOL_ACTION_NAME = "selectionTool";
|
|
18697
|
+
const SELECTION_TOOL_STATE = {
|
|
18698
|
+
["IDLE"]: "idle",
|
|
18699
|
+
["SELECTING"]: "selection"
|
|
18700
|
+
};
|
|
18701
|
+
|
|
18664
18702
|
//#endregion
|
|
18665
18703
|
//#region src/nodes/text/text.ts
|
|
18666
18704
|
var WeaveTextNode = class extends WeaveNode {
|
|
@@ -18683,13 +18721,14 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
18683
18721
|
});
|
|
18684
18722
|
this.setupDefaultNodeEvents(text);
|
|
18685
18723
|
window.addEventListener("keypress", (e) => {
|
|
18686
|
-
if (this.editing)
|
|
18687
|
-
|
|
18688
|
-
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
|
|
18692
|
-
|
|
18724
|
+
if (e.key === "Enter" && this.instance.getActiveAction() === SELECTION_TOOL_ACTION_NAME && !this.editing) {
|
|
18725
|
+
e.preventDefault();
|
|
18726
|
+
if (this.isSelecting() && this.isNodeSelected(text)) {
|
|
18727
|
+
const nodesSelectionPlugin = this.instance.getPlugin("nodesSelection");
|
|
18728
|
+
if (nodesSelectionPlugin && nodesSelectionPlugin.getSelectedNodes().length === 1 && nodesSelectionPlugin.getSelectedNodes()[0].getAttrs().nodeType === WEAVE_TEXT_NODE_TYPE && !window.weaveTextEditing[nodesSelectionPlugin.getSelectedNodes()[0].id()]) {
|
|
18729
|
+
e.preventDefault();
|
|
18730
|
+
this.triggerEditMode(nodesSelectionPlugin.getSelectedNodes()[0]);
|
|
18731
|
+
}
|
|
18693
18732
|
}
|
|
18694
18733
|
}
|
|
18695
18734
|
});
|
|
@@ -18803,9 +18842,6 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
18803
18842
|
textArea.style.height = "auto";
|
|
18804
18843
|
textArea.style.height = textArea.scrollHeight + 1.6 * textNode.getAbsoluteScale().x + "px";
|
|
18805
18844
|
};
|
|
18806
|
-
textArea.onwheel = (e) => {
|
|
18807
|
-
e.preventDefault();
|
|
18808
|
-
};
|
|
18809
18845
|
textArea.oninput = () => {
|
|
18810
18846
|
textArea.style.height = "auto";
|
|
18811
18847
|
textArea.style.height = textArea.scrollHeight + 1.6 * textNode.getAbsoluteScale().x + "px";
|
|
@@ -18814,36 +18850,22 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
18814
18850
|
let transform = "";
|
|
18815
18851
|
if (rotation) transform += "rotateZ(" + rotation + "deg)";
|
|
18816
18852
|
const px = 0;
|
|
18817
|
-
const py = -3 *
|
|
18853
|
+
const py = -3 * stage.scaleY();
|
|
18818
18854
|
transform += "translateX(" + px + "px)";
|
|
18819
18855
|
transform += "translateY(" + py + "px)";
|
|
18820
18856
|
textArea.style.transform = transform;
|
|
18821
18857
|
const handleKeyDown = (e) => {
|
|
18822
|
-
|
|
18823
|
-
|
|
18824
|
-
|
|
18825
|
-
|
|
18826
|
-
|
|
18827
|
-
|
|
18828
|
-
|
|
18829
|
-
|
|
18830
|
-
|
|
18831
|
-
|
|
18832
|
-
|
|
18833
|
-
}
|
|
18834
|
-
return;
|
|
18835
|
-
}
|
|
18836
|
-
if (e.key === "Escape") {
|
|
18837
|
-
textNode.width(parseFloat(textArea.style.width) * (1 / textNode.getAbsoluteScale().x));
|
|
18838
|
-
textNode.height((textArea.scrollHeight + 1.6) * (1 / textNode.getAbsoluteScale().x));
|
|
18839
|
-
textNode.text(textArea.value);
|
|
18840
|
-
this.updateNode(textNode);
|
|
18841
|
-
this.removeTextAreaDOM(textNode);
|
|
18842
|
-
this.instance.removeEventListener("onZoomChange", this.onZoomChangeHandler(textNode).bind(this));
|
|
18843
|
-
this.instance.removeEventListener("onStageMove", this.onStageMoveHandler(textNode).bind(this));
|
|
18844
|
-
window.removeEventListener("click", handleOutsideClick);
|
|
18845
|
-
return;
|
|
18846
|
-
}
|
|
18858
|
+
e.stopPropagation();
|
|
18859
|
+
if (textArea && textNode && e.key === "Escape") {
|
|
18860
|
+
textNode.width(parseFloat(textArea.style.width) * (1 / textNode.getAbsoluteScale().x));
|
|
18861
|
+
textNode.height((textArea.scrollHeight + 1.6) * (1 / textNode.getAbsoluteScale().x));
|
|
18862
|
+
textNode.text(textArea.value);
|
|
18863
|
+
this.updateNode(textNode);
|
|
18864
|
+
this.removeTextAreaDOM(textNode);
|
|
18865
|
+
this.instance.removeEventListener("onZoomChange", this.onZoomChangeHandler(textNode).bind(this));
|
|
18866
|
+
this.instance.removeEventListener("onStageMove", this.onStageMoveHandler(textNode).bind(this));
|
|
18867
|
+
window.removeEventListener("click", handleOutsideClick);
|
|
18868
|
+
return;
|
|
18847
18869
|
}
|
|
18848
18870
|
};
|
|
18849
18871
|
const handleKeyUp = () => {
|
|
@@ -18925,6 +18947,7 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
18925
18947
|
|
|
18926
18948
|
//#endregion
|
|
18927
18949
|
//#region src/actions/image-tool/constants.ts
|
|
18950
|
+
const IMAGE_TOOL_ACTION_NAME = "imageTool";
|
|
18928
18951
|
const IMAGE_TOOL_STATE = {
|
|
18929
18952
|
["IDLE"]: "idle",
|
|
18930
18953
|
["UPLOADING"]: "uploading",
|
|
@@ -18951,7 +18974,7 @@ var WeaveImageToolAction = class extends WeaveAction {
|
|
|
18951
18974
|
this.clickPoint = null;
|
|
18952
18975
|
}
|
|
18953
18976
|
getName() {
|
|
18954
|
-
return
|
|
18977
|
+
return IMAGE_TOOL_ACTION_NAME;
|
|
18955
18978
|
}
|
|
18956
18979
|
getPreloadedImage(imageId) {
|
|
18957
18980
|
return this.preloadImgs?.[imageId];
|
|
@@ -18975,8 +18998,10 @@ var WeaveImageToolAction = class extends WeaveAction {
|
|
|
18975
18998
|
setupEvents() {
|
|
18976
18999
|
const stage = this.instance.getStage();
|
|
18977
19000
|
stage.container().addEventListener("keydown", (e) => {
|
|
18978
|
-
if (e.key === "Escape"
|
|
18979
|
-
|
|
19001
|
+
if (e.key === "Escape" && this.instance.getActiveAction() === IMAGE_TOOL_ACTION_NAME) {
|
|
19002
|
+
this.cancelAction();
|
|
19003
|
+
return;
|
|
19004
|
+
}
|
|
18980
19005
|
});
|
|
18981
19006
|
stage.on("click tap", (e) => {
|
|
18982
19007
|
e.evt.preventDefault();
|
|
@@ -19985,12 +20010,16 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
|
|
|
19985
20010
|
}
|
|
19986
20011
|
};
|
|
19987
20012
|
|
|
20013
|
+
//#endregion
|
|
20014
|
+
//#region src/actions/zoom-out-tool/constants.ts
|
|
20015
|
+
const ZOOM_OUT_TOOL_ACTION_NAME = "zoomOutTool";
|
|
20016
|
+
|
|
19988
20017
|
//#endregion
|
|
19989
20018
|
//#region src/actions/zoom-out-tool/zoom-out-tool.ts
|
|
19990
20019
|
var WeaveZoomOutToolAction = class extends WeaveAction {
|
|
19991
20020
|
onPropsChange = void 0;
|
|
19992
20021
|
getName() {
|
|
19993
|
-
return
|
|
20022
|
+
return ZOOM_OUT_TOOL_ACTION_NAME;
|
|
19994
20023
|
}
|
|
19995
20024
|
getStageZoomPlugin() {
|
|
19996
20025
|
return this.instance.getPlugin("stageZoom");
|
|
@@ -20014,12 +20043,16 @@ var WeaveZoomOutToolAction = class extends WeaveAction {
|
|
|
20014
20043
|
}
|
|
20015
20044
|
};
|
|
20016
20045
|
|
|
20046
|
+
//#endregion
|
|
20047
|
+
//#region src/actions/zoom-in-tool/constants.ts
|
|
20048
|
+
const ZOOM_IN_TOOL_ACTION_NAME = "zoomInTool";
|
|
20049
|
+
|
|
20017
20050
|
//#endregion
|
|
20018
20051
|
//#region src/actions/zoom-in-tool/zoom-in-tool.ts
|
|
20019
20052
|
var WeaveZoomInToolAction = class extends WeaveAction {
|
|
20020
20053
|
onPropsChange = void 0;
|
|
20021
20054
|
getName() {
|
|
20022
|
-
return
|
|
20055
|
+
return ZOOM_IN_TOOL_ACTION_NAME;
|
|
20023
20056
|
}
|
|
20024
20057
|
getStageZoomPlugin() {
|
|
20025
20058
|
return this.instance.getPlugin("stageZoom");
|
|
@@ -20043,12 +20076,16 @@ var WeaveZoomInToolAction = class extends WeaveAction {
|
|
|
20043
20076
|
}
|
|
20044
20077
|
};
|
|
20045
20078
|
|
|
20079
|
+
//#endregion
|
|
20080
|
+
//#region src/actions/fit-to-screen-tool/constants.ts
|
|
20081
|
+
const FIT_TO_SCREEN_TOOL_ACTION_NAME = "fitToScreenTool";
|
|
20082
|
+
|
|
20046
20083
|
//#endregion
|
|
20047
20084
|
//#region src/actions/fit-to-screen-tool/fit-to-screen-tool.ts
|
|
20048
20085
|
var WeaveFitToScreenToolAction = class extends WeaveAction {
|
|
20049
20086
|
onPropsChange = void 0;
|
|
20050
20087
|
getName() {
|
|
20051
|
-
return
|
|
20088
|
+
return FIT_TO_SCREEN_TOOL_ACTION_NAME;
|
|
20052
20089
|
}
|
|
20053
20090
|
getStageZoomPlugin() {
|
|
20054
20091
|
return this.instance.getPlugin("stageZoom");
|
|
@@ -20071,12 +20108,16 @@ var WeaveFitToScreenToolAction = class extends WeaveAction {
|
|
|
20071
20108
|
}
|
|
20072
20109
|
};
|
|
20073
20110
|
|
|
20111
|
+
//#endregion
|
|
20112
|
+
//#region src/actions/fit-to-selection-tool/constants.ts
|
|
20113
|
+
const FIT_TO_SELECTION_TOOL_ACTION_NAME = "fitToSelectionTool";
|
|
20114
|
+
|
|
20074
20115
|
//#endregion
|
|
20075
20116
|
//#region src/actions/fit-to-selection-tool/fit-to-selection-tool.ts
|
|
20076
20117
|
var WeaveFitToSelectionToolAction = class extends WeaveAction {
|
|
20077
20118
|
onPropsChange = void 0;
|
|
20078
20119
|
getName() {
|
|
20079
|
-
return
|
|
20120
|
+
return FIT_TO_SELECTION_TOOL_ACTION_NAME;
|
|
20080
20121
|
}
|
|
20081
20122
|
getNodesSelectionPlugin() {
|
|
20082
20123
|
return this.instance.getPlugin("nodesSelection");
|
|
@@ -20160,14 +20201,6 @@ var WeaveMoveToolAction = class extends WeaveAction {
|
|
|
20160
20201
|
}
|
|
20161
20202
|
};
|
|
20162
20203
|
|
|
20163
|
-
//#endregion
|
|
20164
|
-
//#region src/actions/selection-tool/constants.ts
|
|
20165
|
-
const SELECTION_TOOL_ACTION_NAME = "selectionTool";
|
|
20166
|
-
const SELECTION_TOOL_STATE = {
|
|
20167
|
-
["IDLE"]: "idle",
|
|
20168
|
-
["SELECTING"]: "selection"
|
|
20169
|
-
};
|
|
20170
|
-
|
|
20171
20204
|
//#endregion
|
|
20172
20205
|
//#region src/actions/selection-tool/selection-tool.ts
|
|
20173
20206
|
var WeaveSelectionToolAction = class extends WeaveAction {
|
|
@@ -20265,11 +20298,11 @@ var WeaveRectangleToolAction = class extends WeaveAction {
|
|
|
20265
20298
|
setupEvents() {
|
|
20266
20299
|
const stage = this.instance.getStage();
|
|
20267
20300
|
stage.container().addEventListener("keydown", (e) => {
|
|
20268
|
-
if (e.key === "Enter") {
|
|
20301
|
+
if (e.key === "Enter" && this.instance.getActiveAction() === RECTANGLE_TOOL_ACTION_NAME) {
|
|
20269
20302
|
this.cancelAction();
|
|
20270
20303
|
return;
|
|
20271
20304
|
}
|
|
20272
|
-
if (e.key === "Escape") {
|
|
20305
|
+
if (e.key === "Escape" && this.instance.getActiveAction() === RECTANGLE_TOOL_ACTION_NAME) {
|
|
20273
20306
|
this.cancelAction();
|
|
20274
20307
|
return;
|
|
20275
20308
|
}
|
|
@@ -20399,6 +20432,7 @@ var WeaveRectangleToolAction = class extends WeaveAction {
|
|
|
20399
20432
|
|
|
20400
20433
|
//#endregion
|
|
20401
20434
|
//#region src/actions/pen-tool/constants.ts
|
|
20435
|
+
const PEN_TOOL_ACTION_NAME = "penTool";
|
|
20402
20436
|
const PEN_TOOL_STATE = {
|
|
20403
20437
|
["IDLE"]: "idle",
|
|
20404
20438
|
["ADDING"]: "adding",
|
|
@@ -20427,7 +20461,7 @@ var WeavePenToolAction = class extends WeaveAction {
|
|
|
20427
20461
|
this.props = this.initProps();
|
|
20428
20462
|
}
|
|
20429
20463
|
getName() {
|
|
20430
|
-
return
|
|
20464
|
+
return PEN_TOOL_ACTION_NAME;
|
|
20431
20465
|
}
|
|
20432
20466
|
initProps() {
|
|
20433
20467
|
return {
|
|
@@ -20439,11 +20473,11 @@ var WeavePenToolAction = class extends WeaveAction {
|
|
|
20439
20473
|
setupEvents() {
|
|
20440
20474
|
const stage = this.instance.getStage();
|
|
20441
20475
|
stage.container().addEventListener("keydown", (e) => {
|
|
20442
|
-
if (e.key === "Enter") {
|
|
20476
|
+
if (e.key === "Enter" && this.instance.getActiveAction() === PEN_TOOL_ACTION_NAME) {
|
|
20443
20477
|
this.cancelAction();
|
|
20444
20478
|
return;
|
|
20445
20479
|
}
|
|
20446
|
-
if (e.key === "Escape") {
|
|
20480
|
+
if (e.key === "Escape" && this.instance.getActiveAction() === PEN_TOOL_ACTION_NAME) {
|
|
20447
20481
|
this.cancelAction();
|
|
20448
20482
|
return;
|
|
20449
20483
|
}
|
|
@@ -20512,6 +20546,7 @@ var WeavePenToolAction = class extends WeaveAction {
|
|
|
20512
20546
|
...this.props,
|
|
20513
20547
|
x: this.clickPoint?.x ?? 0,
|
|
20514
20548
|
y: this.clickPoint?.y ?? 0,
|
|
20549
|
+
strokeScaleEnabled: false,
|
|
20515
20550
|
points: [0, 0]
|
|
20516
20551
|
});
|
|
20517
20552
|
this.instance.addNode(tempLine, this.container?.getAttrs().id);
|
|
@@ -20636,6 +20671,7 @@ var WeavePenToolAction = class extends WeaveAction {
|
|
|
20636
20671
|
|
|
20637
20672
|
//#endregion
|
|
20638
20673
|
//#region src/actions/brush-tool/constants.ts
|
|
20674
|
+
const BRUSH_TOOL_ACTION_NAME = "brushTool";
|
|
20639
20675
|
const BRUSH_TOOL_STATE = {
|
|
20640
20676
|
["INACTIVE"]: "inactive",
|
|
20641
20677
|
["IDLE"]: "idle",
|
|
@@ -20659,7 +20695,7 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
20659
20695
|
this.props = this.initProps();
|
|
20660
20696
|
}
|
|
20661
20697
|
getName() {
|
|
20662
|
-
return
|
|
20698
|
+
return BRUSH_TOOL_ACTION_NAME;
|
|
20663
20699
|
}
|
|
20664
20700
|
initProps() {
|
|
20665
20701
|
return {
|
|
@@ -20673,11 +20709,11 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
20673
20709
|
stage.container().tabIndex = 1;
|
|
20674
20710
|
stage.container().focus();
|
|
20675
20711
|
stage.container().addEventListener("keydown", (e) => {
|
|
20676
|
-
if (e.key === "Enter") {
|
|
20712
|
+
if (e.key === "Enter" && this.instance.getActiveAction() === BRUSH_TOOL_ACTION_NAME) {
|
|
20677
20713
|
this.cancelAction();
|
|
20678
20714
|
return;
|
|
20679
20715
|
}
|
|
20680
|
-
if (e.key === "Escape") {
|
|
20716
|
+
if (e.key === "Escape" && this.instance.getActiveAction() === BRUSH_TOOL_ACTION_NAME) {
|
|
20681
20717
|
this.cancelAction();
|
|
20682
20718
|
return;
|
|
20683
20719
|
}
|
|
@@ -20785,6 +20821,7 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
20785
20821
|
|
|
20786
20822
|
//#endregion
|
|
20787
20823
|
//#region src/actions/text-tool/constants.ts
|
|
20824
|
+
const TEXT_TOOL_ACTION_NAME = "textTool";
|
|
20788
20825
|
const TEXT_TOOL_STATE = {
|
|
20789
20826
|
["IDLE"]: "idle",
|
|
20790
20827
|
["ADDING"]: "adding",
|
|
@@ -20807,12 +20844,12 @@ var WeaveTextToolAction = class extends WeaveAction {
|
|
|
20807
20844
|
this.clickPoint = null;
|
|
20808
20845
|
}
|
|
20809
20846
|
getName() {
|
|
20810
|
-
return
|
|
20847
|
+
return TEXT_TOOL_ACTION_NAME;
|
|
20811
20848
|
}
|
|
20812
20849
|
setupEvents() {
|
|
20813
20850
|
const stage = this.instance.getStage();
|
|
20814
20851
|
stage.container().addEventListener("keydown", (e) => {
|
|
20815
|
-
if (e.key === "Escape") {
|
|
20852
|
+
if (e.key === "Escape" && this.instance.getActiveAction() === TEXT_TOOL_ACTION_NAME) {
|
|
20816
20853
|
this.cancelAction();
|
|
20817
20854
|
return;
|
|
20818
20855
|
}
|
|
@@ -20934,7 +20971,7 @@ var WeaveFrameToolAction = class extends WeaveAction {
|
|
|
20934
20971
|
setupEvents() {
|
|
20935
20972
|
const stage = this.instance.getStage();
|
|
20936
20973
|
stage.container().addEventListener("keydown", (e) => {
|
|
20937
|
-
if (e.key === "Escape") {
|
|
20974
|
+
if (e.key === "Escape" && this.instance.getActiveAction() === FRAME_TOOL_ACTION_NAME) {
|
|
20938
20975
|
this.cancelAction();
|
|
20939
20976
|
return;
|
|
20940
20977
|
}
|
|
@@ -21006,6 +21043,10 @@ var WeaveFrameToolAction = class extends WeaveAction {
|
|
|
21006
21043
|
}
|
|
21007
21044
|
};
|
|
21008
21045
|
|
|
21046
|
+
//#endregion
|
|
21047
|
+
//#region src/actions/export-stage-tool/constants.ts
|
|
21048
|
+
const EXPORT_STAGE_TOOL_ACTION_NAME = "exportStageTool";
|
|
21049
|
+
|
|
21009
21050
|
//#endregion
|
|
21010
21051
|
//#region src/actions/export-stage-tool/export-stage-tool.ts
|
|
21011
21052
|
var WeaveExportStageToolAction = class extends WeaveAction {
|
|
@@ -21019,7 +21060,7 @@ var WeaveExportStageToolAction = class extends WeaveAction {
|
|
|
21019
21060
|
onPropsChange = void 0;
|
|
21020
21061
|
onInit = void 0;
|
|
21021
21062
|
getName() {
|
|
21022
|
-
return
|
|
21063
|
+
return EXPORT_STAGE_TOOL_ACTION_NAME;
|
|
21023
21064
|
}
|
|
21024
21065
|
async exportStage() {
|
|
21025
21066
|
const img = await this.instance.exportStage(this.options);
|
|
@@ -21050,6 +21091,10 @@ var WeaveExportStageToolAction = class extends WeaveAction {
|
|
|
21050
21091
|
}
|
|
21051
21092
|
};
|
|
21052
21093
|
|
|
21094
|
+
//#endregion
|
|
21095
|
+
//#region src/actions/export-node-tool/constants.ts
|
|
21096
|
+
const EXPORT_NODE_TOOL_ACTION_NAME = "exportNodeTool";
|
|
21097
|
+
|
|
21053
21098
|
//#endregion
|
|
21054
21099
|
//#region src/actions/export-node-tool/export-node-tool.ts
|
|
21055
21100
|
var WeaveExportNodeToolAction = class extends WeaveAction {
|
|
@@ -21063,7 +21108,7 @@ var WeaveExportNodeToolAction = class extends WeaveAction {
|
|
|
21063
21108
|
onPropsChange = void 0;
|
|
21064
21109
|
onInit = void 0;
|
|
21065
21110
|
getName() {
|
|
21066
|
-
return
|
|
21111
|
+
return EXPORT_NODE_TOOL_ACTION_NAME;
|
|
21067
21112
|
}
|
|
21068
21113
|
async exportNode(node) {
|
|
21069
21114
|
const img = await this.instance.exportNode(node, this.options);
|
|
@@ -22116,6 +22161,7 @@ var WeaveNodesSnappingPlugin = class extends WeavePlugin {
|
|
|
22116
22161
|
};
|
|
22117
22162
|
|
|
22118
22163
|
//#endregion
|
|
22164
|
+
exports.BRUSH_TOOL_ACTION_NAME = BRUSH_TOOL_ACTION_NAME
|
|
22119
22165
|
exports.BRUSH_TOOL_STATE = BRUSH_TOOL_STATE
|
|
22120
22166
|
exports.COPY_PASTE_NODES_PLUGIN_STATE = COPY_PASTE_NODES_PLUGIN_STATE
|
|
22121
22167
|
exports.FRAME_TOOL_ACTION_NAME = FRAME_TOOL_ACTION_NAME
|
|
@@ -22125,15 +22171,18 @@ exports.GUIDE_LINE_DRAG_SNAPPING_THRESHOLD = GUIDE_LINE_DRAG_SNAPPING_THRESHOLD
|
|
|
22125
22171
|
exports.GUIDE_LINE_NAME = GUIDE_LINE_NAME
|
|
22126
22172
|
exports.GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD = GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD
|
|
22127
22173
|
exports.GUIDE_ORIENTATION = GUIDE_ORIENTATION
|
|
22174
|
+
exports.IMAGE_TOOL_ACTION_NAME = IMAGE_TOOL_ACTION_NAME
|
|
22128
22175
|
exports.IMAGE_TOOL_STATE = IMAGE_TOOL_STATE
|
|
22129
22176
|
exports.MOVE_TOOL_ACTION_NAME = MOVE_TOOL_ACTION_NAME
|
|
22130
22177
|
exports.MOVE_TOOL_STATE = MOVE_TOOL_STATE
|
|
22131
22178
|
exports.NODE_SNAP = NODE_SNAP
|
|
22179
|
+
exports.PEN_TOOL_ACTION_NAME = PEN_TOOL_ACTION_NAME
|
|
22132
22180
|
exports.PEN_TOOL_STATE = PEN_TOOL_STATE
|
|
22133
22181
|
exports.RECTANGLE_TOOL_ACTION_NAME = RECTANGLE_TOOL_ACTION_NAME
|
|
22134
22182
|
exports.RECTANGLE_TOOL_STATE = RECTANGLE_TOOL_STATE
|
|
22135
22183
|
exports.SELECTION_TOOL_ACTION_NAME = SELECTION_TOOL_ACTION_NAME
|
|
22136
22184
|
exports.SELECTION_TOOL_STATE = SELECTION_TOOL_STATE
|
|
22185
|
+
exports.TEXT_TOOL_ACTION_NAME = TEXT_TOOL_ACTION_NAME
|
|
22137
22186
|
exports.TEXT_TOOL_STATE = TEXT_TOOL_STATE
|
|
22138
22187
|
exports.WEAVE_COPY_PASTE_NODES_KEY = WEAVE_COPY_PASTE_NODES_KEY
|
|
22139
22188
|
exports.WEAVE_FRAME_NODE_DEFAULT_CONFIG = WEAVE_FRAME_NODE_DEFAULT_CONFIG
|
package/dist/sdk.d.cts
CHANGED
|
@@ -280,6 +280,7 @@ declare abstract class WeaveNode implements WeaveNodeBase {
|
|
|
280
280
|
isSelecting(): boolean;
|
|
281
281
|
isPasting(): boolean;
|
|
282
282
|
isNodeSelected(ele: Konva.Node): boolean;
|
|
283
|
+
private scaleReset;
|
|
283
284
|
setupDefaultNodeEvents(node: Konva.Node): void;
|
|
284
285
|
create(key: string, props: WeaveElementAttributes): WeaveStateElement;
|
|
285
286
|
abstract onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
@@ -841,6 +842,7 @@ declare class WeaveRectangleToolAction extends WeaveAction {
|
|
|
841
842
|
|
|
842
843
|
//#endregion
|
|
843
844
|
//#region src/actions/pen-tool/constants.d.ts
|
|
845
|
+
declare const PEN_TOOL_ACTION_NAME = "penTool";
|
|
844
846
|
declare const PEN_TOOL_STATE: {
|
|
845
847
|
readonly "IDLE": "idle";
|
|
846
848
|
readonly "ADDING": "adding";
|
|
@@ -888,6 +890,7 @@ declare class WeavePenToolAction extends WeaveAction {
|
|
|
888
890
|
|
|
889
891
|
//#endregion
|
|
890
892
|
//#region src/actions/brush-tool/constants.d.ts
|
|
893
|
+
declare const BRUSH_TOOL_ACTION_NAME = "brushTool";
|
|
891
894
|
declare const BRUSH_TOOL_STATE: {
|
|
892
895
|
readonly "INACTIVE": "inactive";
|
|
893
896
|
readonly "IDLE": "idle";
|
|
@@ -929,6 +932,7 @@ declare class WeaveBrushToolAction extends WeaveAction {
|
|
|
929
932
|
|
|
930
933
|
//#endregion
|
|
931
934
|
//#region src/actions/text-tool/constants.d.ts
|
|
935
|
+
declare const TEXT_TOOL_ACTION_NAME = "textTool";
|
|
932
936
|
declare const TEXT_TOOL_STATE: {
|
|
933
937
|
readonly "IDLE": "idle";
|
|
934
938
|
readonly "ADDING": "adding";
|
|
@@ -964,6 +968,7 @@ declare class WeaveTextToolAction extends WeaveAction {
|
|
|
964
968
|
|
|
965
969
|
//#endregion
|
|
966
970
|
//#region src/actions/image-tool/constants.d.ts
|
|
971
|
+
declare const IMAGE_TOOL_ACTION_NAME = "imageTool";
|
|
967
972
|
declare const IMAGE_TOOL_STATE: {
|
|
968
973
|
readonly "IDLE": "idle";
|
|
969
974
|
readonly "UPLOADING": "uploading";
|
|
@@ -1423,6 +1428,7 @@ declare class WeaveCopyPasteNodesPlugin extends WeavePlugin {
|
|
|
1423
1428
|
initEvents(): void;
|
|
1424
1429
|
private mapToPasteNodes;
|
|
1425
1430
|
private setState;
|
|
1431
|
+
private recursivelyUpdateKeys;
|
|
1426
1432
|
private handlePaste;
|
|
1427
1433
|
private performCopy;
|
|
1428
1434
|
private performPaste;
|
|
@@ -1516,4 +1522,4 @@ declare class WeaveNodesSnappingPlugin extends WeavePlugin {
|
|
|
1516
1522
|
}
|
|
1517
1523
|
|
|
1518
1524
|
//#endregion
|
|
1519
|
-
export { BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, Guide, GuideOrientation, GuideOrientationKeys, IMAGE_TOOL_STATE, ImageProps, LineGuide, LineGuideStop, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NodeSnap, NodeSnapKeys, NodeSnappingEdge, NodeSnappingEdges, PEN_TOOL_STATE, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, TEXT_TOOL_STATE, TextSerializable, WEAVE_COPY_PASTE_NODES_KEY, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_SIZES, WEAVE_FRAME_NODE_SIZES_MULTIPLIER, WEAVE_FRAME_NODE_SIZES_ORIENTATION, WEAVE_FRAME_NODE_SIZES_TYPES, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_COLOR, WEAVE_GRID_DEFAULT_ORIGIN_COLOR, WEAVE_GRID_DEFAULT_SIZE, WEAVE_GRID_DEFAULT_TYPE, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_NODES_SNAPPING_KEY, WEAVE_STAGE_GRID_KEY, Weave, WeaveAction, WeaveActionPropsChangeEvent, WeaveBrushToolAction, WeaveBrushToolActionState, WeaveBrushToolActionStateKeys, WeaveConnectedUserInfoKey, WeaveConnectedUsers, WeaveConnectedUsersChangeEvent, WeaveConnectedUsersPlugin, WeaveConnectedUsersPluginConfig, WeaveConnectedUsersPluginParams, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveCopyPasteNodesPluginOnCopyEvent, WeaveCopyPasteNodesPluginOnPasteEvent, WeaveCopyPasteNodesPluginOnPasteExternalEvent, WeaveCopyPasteNodesPluginState, WeaveCopyPasteNodesPluginStateKeys, WeaveExportNodeActionParams, WeaveExportNodeToolAction, WeaveExportStageActionParams, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToScreenToolActionParams, WeaveFitToSelectionToolAction, WeaveFitToSelectionToolActionParams, WeaveFrameAttributes, WeaveFrameNode, WeaveFrameNodeParams, WeaveFrameNodeSizes, WeaveFrameNodeSizesInfo, WeaveFrameNodeSizesKeys, WeaveFrameNodeSizesOrientation, WeaveFrameNodeSizesOrientationKeys, WeaveFrameProperties, WeaveFrameToolAction, WeaveFrameToolActionState, WeaveFrameToolActionStateKeys, WeaveFrameToolActionTriggerParams, WeaveFrameToolProps, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveImageToolActionOnEndLoadImageEvent, WeaveImageToolActionOnStartLoadImageEvent, WeaveImageToolActionState, WeaveImageToolActionStateKeys, WeaveImageToolActionTriggerParams, WeaveImageToolActionTriggerReturn, WeaveLayerNode, WeaveLineNode, WeaveMoveToolAction, WeaveMoveToolActionState, WeaveMoveToolActionStateKeys, WeaveNode, WeaveNodesSelectionPlugin, WeaveNodesSelectionPluginConfig, WeaveNodesSelectionPluginOnNodesChangeEvent, WeaveNodesSelectionPluginOnSelectionStateEvent, WeaveNodesSelectionPluginOnStageSelectionEvent, WeaveNodesSelectionPluginParams, WeaveNodesSnappingPlugin, WeaveNodesSnappingPluginConfig, WeaveNodesSnappingPluginParams, WeavePasteModel, WeavePenToolAction, WeavePenToolActionState, WeavePenToolActionStateKeys, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRectangleToolActionState, WeaveRectangleToolActionStateKeys, WeaveSelectionToolAction, WeaveSelectionToolActionState, WeaveSelectionToolActionStateKeys, WeaveStageContextMenuPluginConfig, WeaveStageContextMenuPluginOnNodeContextMenuEvent, WeaveStageContextMenuPluginParams, WeaveStageDropAreaPlugin, WeaveStageDropPluginOnStageDropEvent, WeaveStageGridPlugin, WeaveStageGridPluginConfig, WeaveStageGridPluginParams, WeaveStageGridType, WeaveStageGridTypeKeys, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomChanged, WeaveStageZoomPlugin, WeaveStageZoomPluginConfig, WeaveStageZoomPluginOnZoomChangeEvent, WeaveStageZoomPluginParams, WeaveStore, WeaveTextNode, WeaveTextToolAction, WeaveTextToolActionState, WeaveTextToolActionStateKeys, WeaveToPasteNode, WeaveUserPointer, WeaveUserPointerKey, WeaveUsersPointersPlugin, WeaveUsersPointersPluginConfig, WeaveUsersPointersPluginParams, WeaveZoomInToolAction, WeaveZoomInToolActionParams, WeaveZoomOutToolAction, WeaveZoomOutToolActionParams, checkIfOverContainer, clearContainerTargets, moveNodeToContainer, resetScale };
|
|
1525
|
+
export { BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, Guide, GuideOrientation, GuideOrientationKeys, IMAGE_TOOL_ACTION_NAME, IMAGE_TOOL_STATE, ImageProps, LineGuide, LineGuideStop, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NodeSnap, NodeSnapKeys, NodeSnappingEdge, NodeSnappingEdges, PEN_TOOL_ACTION_NAME, PEN_TOOL_STATE, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, TextSerializable, WEAVE_COPY_PASTE_NODES_KEY, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_SIZES, WEAVE_FRAME_NODE_SIZES_MULTIPLIER, WEAVE_FRAME_NODE_SIZES_ORIENTATION, WEAVE_FRAME_NODE_SIZES_TYPES, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_COLOR, WEAVE_GRID_DEFAULT_ORIGIN_COLOR, WEAVE_GRID_DEFAULT_SIZE, WEAVE_GRID_DEFAULT_TYPE, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_NODES_SNAPPING_KEY, WEAVE_STAGE_GRID_KEY, Weave, WeaveAction, WeaveActionPropsChangeEvent, WeaveBrushToolAction, WeaveBrushToolActionState, WeaveBrushToolActionStateKeys, WeaveConnectedUserInfoKey, WeaveConnectedUsers, WeaveConnectedUsersChangeEvent, WeaveConnectedUsersPlugin, WeaveConnectedUsersPluginConfig, WeaveConnectedUsersPluginParams, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveCopyPasteNodesPluginOnCopyEvent, WeaveCopyPasteNodesPluginOnPasteEvent, WeaveCopyPasteNodesPluginOnPasteExternalEvent, WeaveCopyPasteNodesPluginState, WeaveCopyPasteNodesPluginStateKeys, WeaveExportNodeActionParams, WeaveExportNodeToolAction, WeaveExportStageActionParams, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToScreenToolActionParams, WeaveFitToSelectionToolAction, WeaveFitToSelectionToolActionParams, WeaveFrameAttributes, WeaveFrameNode, WeaveFrameNodeParams, WeaveFrameNodeSizes, WeaveFrameNodeSizesInfo, WeaveFrameNodeSizesKeys, WeaveFrameNodeSizesOrientation, WeaveFrameNodeSizesOrientationKeys, WeaveFrameProperties, WeaveFrameToolAction, WeaveFrameToolActionState, WeaveFrameToolActionStateKeys, WeaveFrameToolActionTriggerParams, WeaveFrameToolProps, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveImageToolActionOnEndLoadImageEvent, WeaveImageToolActionOnStartLoadImageEvent, WeaveImageToolActionState, WeaveImageToolActionStateKeys, WeaveImageToolActionTriggerParams, WeaveImageToolActionTriggerReturn, WeaveLayerNode, WeaveLineNode, WeaveMoveToolAction, WeaveMoveToolActionState, WeaveMoveToolActionStateKeys, WeaveNode, WeaveNodesSelectionPlugin, WeaveNodesSelectionPluginConfig, WeaveNodesSelectionPluginOnNodesChangeEvent, WeaveNodesSelectionPluginOnSelectionStateEvent, WeaveNodesSelectionPluginOnStageSelectionEvent, WeaveNodesSelectionPluginParams, WeaveNodesSnappingPlugin, WeaveNodesSnappingPluginConfig, WeaveNodesSnappingPluginParams, WeavePasteModel, WeavePenToolAction, WeavePenToolActionState, WeavePenToolActionStateKeys, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRectangleToolActionState, WeaveRectangleToolActionStateKeys, WeaveSelectionToolAction, WeaveSelectionToolActionState, WeaveSelectionToolActionStateKeys, WeaveStageContextMenuPluginConfig, WeaveStageContextMenuPluginOnNodeContextMenuEvent, WeaveStageContextMenuPluginParams, WeaveStageDropAreaPlugin, WeaveStageDropPluginOnStageDropEvent, WeaveStageGridPlugin, WeaveStageGridPluginConfig, WeaveStageGridPluginParams, WeaveStageGridType, WeaveStageGridTypeKeys, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomChanged, WeaveStageZoomPlugin, WeaveStageZoomPluginConfig, WeaveStageZoomPluginOnZoomChangeEvent, WeaveStageZoomPluginParams, WeaveStore, WeaveTextNode, WeaveTextToolAction, WeaveTextToolActionState, WeaveTextToolActionStateKeys, WeaveToPasteNode, WeaveUserPointer, WeaveUserPointerKey, WeaveUsersPointersPlugin, WeaveUsersPointersPluginConfig, WeaveUsersPointersPluginParams, WeaveZoomInToolAction, WeaveZoomInToolActionParams, WeaveZoomOutToolAction, WeaveZoomOutToolActionParams, checkIfOverContainer, clearContainerTargets, moveNodeToContainer, resetScale };
|
package/dist/sdk.d.ts
CHANGED
|
@@ -280,6 +280,7 @@ declare abstract class WeaveNode implements WeaveNodeBase {
|
|
|
280
280
|
isSelecting(): boolean;
|
|
281
281
|
isPasting(): boolean;
|
|
282
282
|
isNodeSelected(ele: Konva.Node): boolean;
|
|
283
|
+
private scaleReset;
|
|
283
284
|
setupDefaultNodeEvents(node: Konva.Node): void;
|
|
284
285
|
create(key: string, props: WeaveElementAttributes): WeaveStateElement;
|
|
285
286
|
abstract onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
@@ -841,6 +842,7 @@ declare class WeaveRectangleToolAction extends WeaveAction {
|
|
|
841
842
|
|
|
842
843
|
//#endregion
|
|
843
844
|
//#region src/actions/pen-tool/constants.d.ts
|
|
845
|
+
declare const PEN_TOOL_ACTION_NAME = "penTool";
|
|
844
846
|
declare const PEN_TOOL_STATE: {
|
|
845
847
|
readonly "IDLE": "idle";
|
|
846
848
|
readonly "ADDING": "adding";
|
|
@@ -888,6 +890,7 @@ declare class WeavePenToolAction extends WeaveAction {
|
|
|
888
890
|
|
|
889
891
|
//#endregion
|
|
890
892
|
//#region src/actions/brush-tool/constants.d.ts
|
|
893
|
+
declare const BRUSH_TOOL_ACTION_NAME = "brushTool";
|
|
891
894
|
declare const BRUSH_TOOL_STATE: {
|
|
892
895
|
readonly "INACTIVE": "inactive";
|
|
893
896
|
readonly "IDLE": "idle";
|
|
@@ -929,6 +932,7 @@ declare class WeaveBrushToolAction extends WeaveAction {
|
|
|
929
932
|
|
|
930
933
|
//#endregion
|
|
931
934
|
//#region src/actions/text-tool/constants.d.ts
|
|
935
|
+
declare const TEXT_TOOL_ACTION_NAME = "textTool";
|
|
932
936
|
declare const TEXT_TOOL_STATE: {
|
|
933
937
|
readonly "IDLE": "idle";
|
|
934
938
|
readonly "ADDING": "adding";
|
|
@@ -964,6 +968,7 @@ declare class WeaveTextToolAction extends WeaveAction {
|
|
|
964
968
|
|
|
965
969
|
//#endregion
|
|
966
970
|
//#region src/actions/image-tool/constants.d.ts
|
|
971
|
+
declare const IMAGE_TOOL_ACTION_NAME = "imageTool";
|
|
967
972
|
declare const IMAGE_TOOL_STATE: {
|
|
968
973
|
readonly "IDLE": "idle";
|
|
969
974
|
readonly "UPLOADING": "uploading";
|
|
@@ -1423,6 +1428,7 @@ declare class WeaveCopyPasteNodesPlugin extends WeavePlugin {
|
|
|
1423
1428
|
initEvents(): void;
|
|
1424
1429
|
private mapToPasteNodes;
|
|
1425
1430
|
private setState;
|
|
1431
|
+
private recursivelyUpdateKeys;
|
|
1426
1432
|
private handlePaste;
|
|
1427
1433
|
private performCopy;
|
|
1428
1434
|
private performPaste;
|
|
@@ -1516,4 +1522,4 @@ declare class WeaveNodesSnappingPlugin extends WeavePlugin {
|
|
|
1516
1522
|
}
|
|
1517
1523
|
|
|
1518
1524
|
//#endregion
|
|
1519
|
-
export { BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, Guide, GuideOrientation, GuideOrientationKeys, IMAGE_TOOL_STATE, ImageProps, LineGuide, LineGuideStop, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NodeSnap, NodeSnapKeys, NodeSnappingEdge, NodeSnappingEdges, PEN_TOOL_STATE, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, TEXT_TOOL_STATE, TextSerializable, WEAVE_COPY_PASTE_NODES_KEY, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_SIZES, WEAVE_FRAME_NODE_SIZES_MULTIPLIER, WEAVE_FRAME_NODE_SIZES_ORIENTATION, WEAVE_FRAME_NODE_SIZES_TYPES, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_COLOR, WEAVE_GRID_DEFAULT_ORIGIN_COLOR, WEAVE_GRID_DEFAULT_SIZE, WEAVE_GRID_DEFAULT_TYPE, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_NODES_SNAPPING_KEY, WEAVE_STAGE_GRID_KEY, Weave, WeaveAction, WeaveActionPropsChangeEvent, WeaveBrushToolAction, WeaveBrushToolActionState, WeaveBrushToolActionStateKeys, WeaveConnectedUserInfoKey, WeaveConnectedUsers, WeaveConnectedUsersChangeEvent, WeaveConnectedUsersPlugin, WeaveConnectedUsersPluginConfig, WeaveConnectedUsersPluginParams, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveCopyPasteNodesPluginOnCopyEvent, WeaveCopyPasteNodesPluginOnPasteEvent, WeaveCopyPasteNodesPluginOnPasteExternalEvent, WeaveCopyPasteNodesPluginState, WeaveCopyPasteNodesPluginStateKeys, WeaveExportNodeActionParams, WeaveExportNodeToolAction, WeaveExportStageActionParams, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToScreenToolActionParams, WeaveFitToSelectionToolAction, WeaveFitToSelectionToolActionParams, WeaveFrameAttributes, WeaveFrameNode, WeaveFrameNodeParams, WeaveFrameNodeSizes, WeaveFrameNodeSizesInfo, WeaveFrameNodeSizesKeys, WeaveFrameNodeSizesOrientation, WeaveFrameNodeSizesOrientationKeys, WeaveFrameProperties, WeaveFrameToolAction, WeaveFrameToolActionState, WeaveFrameToolActionStateKeys, WeaveFrameToolActionTriggerParams, WeaveFrameToolProps, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveImageToolActionOnEndLoadImageEvent, WeaveImageToolActionOnStartLoadImageEvent, WeaveImageToolActionState, WeaveImageToolActionStateKeys, WeaveImageToolActionTriggerParams, WeaveImageToolActionTriggerReturn, WeaveLayerNode, WeaveLineNode, WeaveMoveToolAction, WeaveMoveToolActionState, WeaveMoveToolActionStateKeys, WeaveNode, WeaveNodesSelectionPlugin, WeaveNodesSelectionPluginConfig, WeaveNodesSelectionPluginOnNodesChangeEvent, WeaveNodesSelectionPluginOnSelectionStateEvent, WeaveNodesSelectionPluginOnStageSelectionEvent, WeaveNodesSelectionPluginParams, WeaveNodesSnappingPlugin, WeaveNodesSnappingPluginConfig, WeaveNodesSnappingPluginParams, WeavePasteModel, WeavePenToolAction, WeavePenToolActionState, WeavePenToolActionStateKeys, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRectangleToolActionState, WeaveRectangleToolActionStateKeys, WeaveSelectionToolAction, WeaveSelectionToolActionState, WeaveSelectionToolActionStateKeys, WeaveStageContextMenuPluginConfig, WeaveStageContextMenuPluginOnNodeContextMenuEvent, WeaveStageContextMenuPluginParams, WeaveStageDropAreaPlugin, WeaveStageDropPluginOnStageDropEvent, WeaveStageGridPlugin, WeaveStageGridPluginConfig, WeaveStageGridPluginParams, WeaveStageGridType, WeaveStageGridTypeKeys, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomChanged, WeaveStageZoomPlugin, WeaveStageZoomPluginConfig, WeaveStageZoomPluginOnZoomChangeEvent, WeaveStageZoomPluginParams, WeaveStore, WeaveTextNode, WeaveTextToolAction, WeaveTextToolActionState, WeaveTextToolActionStateKeys, WeaveToPasteNode, WeaveUserPointer, WeaveUserPointerKey, WeaveUsersPointersPlugin, WeaveUsersPointersPluginConfig, WeaveUsersPointersPluginParams, WeaveZoomInToolAction, WeaveZoomInToolActionParams, WeaveZoomOutToolAction, WeaveZoomOutToolActionParams, checkIfOverContainer, clearContainerTargets, moveNodeToContainer, resetScale };
|
|
1525
|
+
export { BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, Guide, GuideOrientation, GuideOrientationKeys, IMAGE_TOOL_ACTION_NAME, IMAGE_TOOL_STATE, ImageProps, LineGuide, LineGuideStop, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NodeSnap, NodeSnapKeys, NodeSnappingEdge, NodeSnappingEdges, PEN_TOOL_ACTION_NAME, PEN_TOOL_STATE, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, TextSerializable, WEAVE_COPY_PASTE_NODES_KEY, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_SIZES, WEAVE_FRAME_NODE_SIZES_MULTIPLIER, WEAVE_FRAME_NODE_SIZES_ORIENTATION, WEAVE_FRAME_NODE_SIZES_TYPES, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_COLOR, WEAVE_GRID_DEFAULT_ORIGIN_COLOR, WEAVE_GRID_DEFAULT_SIZE, WEAVE_GRID_DEFAULT_TYPE, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_NODES_SNAPPING_KEY, WEAVE_STAGE_GRID_KEY, Weave, WeaveAction, WeaveActionPropsChangeEvent, WeaveBrushToolAction, WeaveBrushToolActionState, WeaveBrushToolActionStateKeys, WeaveConnectedUserInfoKey, WeaveConnectedUsers, WeaveConnectedUsersChangeEvent, WeaveConnectedUsersPlugin, WeaveConnectedUsersPluginConfig, WeaveConnectedUsersPluginParams, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveCopyPasteNodesPluginOnCopyEvent, WeaveCopyPasteNodesPluginOnPasteEvent, WeaveCopyPasteNodesPluginOnPasteExternalEvent, WeaveCopyPasteNodesPluginState, WeaveCopyPasteNodesPluginStateKeys, WeaveExportNodeActionParams, WeaveExportNodeToolAction, WeaveExportStageActionParams, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToScreenToolActionParams, WeaveFitToSelectionToolAction, WeaveFitToSelectionToolActionParams, WeaveFrameAttributes, WeaveFrameNode, WeaveFrameNodeParams, WeaveFrameNodeSizes, WeaveFrameNodeSizesInfo, WeaveFrameNodeSizesKeys, WeaveFrameNodeSizesOrientation, WeaveFrameNodeSizesOrientationKeys, WeaveFrameProperties, WeaveFrameToolAction, WeaveFrameToolActionState, WeaveFrameToolActionStateKeys, WeaveFrameToolActionTriggerParams, WeaveFrameToolProps, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveImageToolActionOnEndLoadImageEvent, WeaveImageToolActionOnStartLoadImageEvent, WeaveImageToolActionState, WeaveImageToolActionStateKeys, WeaveImageToolActionTriggerParams, WeaveImageToolActionTriggerReturn, WeaveLayerNode, WeaveLineNode, WeaveMoveToolAction, WeaveMoveToolActionState, WeaveMoveToolActionStateKeys, WeaveNode, WeaveNodesSelectionPlugin, WeaveNodesSelectionPluginConfig, WeaveNodesSelectionPluginOnNodesChangeEvent, WeaveNodesSelectionPluginOnSelectionStateEvent, WeaveNodesSelectionPluginOnStageSelectionEvent, WeaveNodesSelectionPluginParams, WeaveNodesSnappingPlugin, WeaveNodesSnappingPluginConfig, WeaveNodesSnappingPluginParams, WeavePasteModel, WeavePenToolAction, WeavePenToolActionState, WeavePenToolActionStateKeys, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRectangleToolActionState, WeaveRectangleToolActionStateKeys, WeaveSelectionToolAction, WeaveSelectionToolActionState, WeaveSelectionToolActionStateKeys, WeaveStageContextMenuPluginConfig, WeaveStageContextMenuPluginOnNodeContextMenuEvent, WeaveStageContextMenuPluginParams, WeaveStageDropAreaPlugin, WeaveStageDropPluginOnStageDropEvent, WeaveStageGridPlugin, WeaveStageGridPluginConfig, WeaveStageGridPluginParams, WeaveStageGridType, WeaveStageGridTypeKeys, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomChanged, WeaveStageZoomPlugin, WeaveStageZoomPluginConfig, WeaveStageZoomPluginOnZoomChangeEvent, WeaveStageZoomPluginParams, WeaveStore, WeaveTextNode, WeaveTextToolAction, WeaveTextToolActionState, WeaveTextToolActionStateKeys, WeaveToPasteNode, WeaveUserPointer, WeaveUserPointerKey, WeaveUsersPointersPlugin, WeaveUsersPointersPluginConfig, WeaveUsersPointersPluginParams, WeaveZoomInToolAction, WeaveZoomInToolActionParams, WeaveZoomOutToolAction, WeaveZoomOutToolActionParams, checkIfOverContainer, clearContainerTargets, moveNodeToContainer, resetScale };
|
package/dist/sdk.js
CHANGED
|
@@ -15886,21 +15886,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
15886
15886
|
...this.config.transformer
|
|
15887
15887
|
});
|
|
15888
15888
|
selectionLayer?.add(tr);
|
|
15889
|
-
tr.on("transform", (e) => {
|
|
15890
|
-
const node = e.target;
|
|
15891
|
-
const nodesSnappingPlugin = this.instance.getPlugin("nodesSnapping");
|
|
15892
|
-
if (nodesSnappingPlugin && this.isSelecting() && this.isNodeSelected(node)) nodesSnappingPlugin.evaluateGuidelines(e);
|
|
15893
|
-
if (this.isSelecting() && this.isNodeSelected(node)) {
|
|
15894
|
-
const nodeHandler = this.instance.getNodeHandler(node.getAttrs().nodeType);
|
|
15895
|
-
this.instance.updateNode(nodeHandler.serialize(node));
|
|
15896
|
-
e.cancelBubble = true;
|
|
15897
|
-
}
|
|
15898
|
-
});
|
|
15899
|
-
tr.on("transformend", (e) => {
|
|
15900
|
-
const node = e.target;
|
|
15901
|
-
const nodesSnappingPlugin = this.instance.getPlugin("nodesSnapping");
|
|
15902
|
-
if (nodesSnappingPlugin && this.isSelecting() && this.isNodeSelected(node)) nodesSnappingPlugin.cleanupEvaluateGuidelines();
|
|
15903
|
-
});
|
|
15904
15889
|
tr.on("mouseenter", (e) => {
|
|
15905
15890
|
if (!this.isPasting()) {
|
|
15906
15891
|
const stage$1 = this.instance.getStage();
|
|
@@ -16292,12 +16277,22 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
16292
16277
|
setState(state) {
|
|
16293
16278
|
this.state = state;
|
|
16294
16279
|
}
|
|
16280
|
+
recursivelyUpdateKeys(nodes) {
|
|
16281
|
+
for (const child of nodes) {
|
|
16282
|
+
const newNodeId = v4_default();
|
|
16283
|
+
child.key = newNodeId;
|
|
16284
|
+
child.props.id = newNodeId;
|
|
16285
|
+
if (child.props.children) this.recursivelyUpdateKeys(child.props.children);
|
|
16286
|
+
}
|
|
16287
|
+
}
|
|
16295
16288
|
handlePaste() {
|
|
16296
16289
|
if (this.toPaste) {
|
|
16297
16290
|
const { mousePoint, container } = this.instance.getMousePointer();
|
|
16298
16291
|
for (const element of Object.keys(this.toPaste.weave)) {
|
|
16299
16292
|
const node = this.toPaste.weave[element];
|
|
16293
|
+
if (node.props.children) this.recursivelyUpdateKeys(node.props.children);
|
|
16300
16294
|
const newNodeId = v4_default();
|
|
16295
|
+
delete node.props.containerId;
|
|
16301
16296
|
node.key = newNodeId;
|
|
16302
16297
|
node.props.id = newNodeId;
|
|
16303
16298
|
node.props.x = mousePoint.x + (node.props.x - this.toPaste.weaveMinPoint.x);
|
|
@@ -16415,6 +16410,25 @@ var WeaveNode = class {
|
|
|
16415
16410
|
if (selectionPlugin.getSelectedNodes().length === 1 && selectionPlugin.getSelectedNodes()[0].getAttrs().id === ele.getAttrs().id) selected = true;
|
|
16416
16411
|
return selected;
|
|
16417
16412
|
}
|
|
16413
|
+
scaleReset(node) {
|
|
16414
|
+
if (node.getAttrs().nodeType === "line") {
|
|
16415
|
+
const lineNode = node;
|
|
16416
|
+
const oldPoints = lineNode.points();
|
|
16417
|
+
const newPoints = [];
|
|
16418
|
+
for (let i = 0; i < oldPoints.length / 2; i++) {
|
|
16419
|
+
const point = {
|
|
16420
|
+
x: oldPoints[i * 2] * lineNode.scaleX(),
|
|
16421
|
+
y: oldPoints[i * 2 + 1] * lineNode.scaleY()
|
|
16422
|
+
};
|
|
16423
|
+
newPoints.push(point.x, point.y);
|
|
16424
|
+
}
|
|
16425
|
+
lineNode.points(newPoints);
|
|
16426
|
+
}
|
|
16427
|
+
node.width(Math.max(5, node.width() * node.scaleX()));
|
|
16428
|
+
node.height(Math.max(5, node.height() * node.scaleY()));
|
|
16429
|
+
node.scaleX(1);
|
|
16430
|
+
node.scaleY(1);
|
|
16431
|
+
}
|
|
16418
16432
|
setupDefaultNodeEvents(node) {
|
|
16419
16433
|
this.previousPointer = null;
|
|
16420
16434
|
this.instance.addEventListener("onNodesChange", () => {
|
|
@@ -16424,6 +16438,22 @@ var WeaveNode = class {
|
|
|
16424
16438
|
}
|
|
16425
16439
|
node.draggable(false);
|
|
16426
16440
|
});
|
|
16441
|
+
node.on("transform", (e) => {
|
|
16442
|
+
const node$1 = e.target;
|
|
16443
|
+
const nodesSnappingPlugin = this.instance.getPlugin("nodesSnapping");
|
|
16444
|
+
if (nodesSnappingPlugin && this.isSelecting() && this.isNodeSelected(node$1)) nodesSnappingPlugin.evaluateGuidelines(e);
|
|
16445
|
+
if (this.isSelecting() && this.isNodeSelected(node$1)) {
|
|
16446
|
+
this.scaleReset(node$1);
|
|
16447
|
+
const nodeHandler = this.instance.getNodeHandler(node$1.getAttrs().nodeType);
|
|
16448
|
+
this.instance.updateNode(nodeHandler.serialize(node$1));
|
|
16449
|
+
e.cancelBubble = true;
|
|
16450
|
+
}
|
|
16451
|
+
});
|
|
16452
|
+
node.on("transformend", (e) => {
|
|
16453
|
+
const node$1 = e.target;
|
|
16454
|
+
const nodesSnappingPlugin = this.instance.getPlugin("nodesSnapping");
|
|
16455
|
+
if (nodesSnappingPlugin && this.isSelecting() && this.isNodeSelected(node$1)) nodesSnappingPlugin.cleanupEvaluateGuidelines();
|
|
16456
|
+
});
|
|
16427
16457
|
node.on("dragmove", (e) => {
|
|
16428
16458
|
if (this.isSelecting() && this.isNodeSelected(node)) {
|
|
16429
16459
|
clearContainerTargets(this.instance);
|
|
@@ -17883,7 +17913,7 @@ var WeaveRegisterManager = class {
|
|
|
17883
17913
|
|
|
17884
17914
|
//#endregion
|
|
17885
17915
|
//#region package.json
|
|
17886
|
-
var version = "0.
|
|
17916
|
+
var version = "0.14.1";
|
|
17887
17917
|
|
|
17888
17918
|
//#endregion
|
|
17889
17919
|
//#region src/managers/setup.ts
|
|
@@ -18661,6 +18691,14 @@ var WeaveLineNode = class extends WeaveNode {
|
|
|
18661
18691
|
//#region src/nodes/text/constants.ts
|
|
18662
18692
|
const WEAVE_TEXT_NODE_TYPE = "text";
|
|
18663
18693
|
|
|
18694
|
+
//#endregion
|
|
18695
|
+
//#region src/actions/selection-tool/constants.ts
|
|
18696
|
+
const SELECTION_TOOL_ACTION_NAME = "selectionTool";
|
|
18697
|
+
const SELECTION_TOOL_STATE = {
|
|
18698
|
+
["IDLE"]: "idle",
|
|
18699
|
+
["SELECTING"]: "selection"
|
|
18700
|
+
};
|
|
18701
|
+
|
|
18664
18702
|
//#endregion
|
|
18665
18703
|
//#region src/nodes/text/text.ts
|
|
18666
18704
|
var WeaveTextNode = class extends WeaveNode {
|
|
@@ -18683,13 +18721,14 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
18683
18721
|
});
|
|
18684
18722
|
this.setupDefaultNodeEvents(text);
|
|
18685
18723
|
window.addEventListener("keypress", (e) => {
|
|
18686
|
-
if (this.editing)
|
|
18687
|
-
|
|
18688
|
-
|
|
18689
|
-
|
|
18690
|
-
|
|
18691
|
-
|
|
18692
|
-
|
|
18724
|
+
if (e.key === "Enter" && this.instance.getActiveAction() === SELECTION_TOOL_ACTION_NAME && !this.editing) {
|
|
18725
|
+
e.preventDefault();
|
|
18726
|
+
if (this.isSelecting() && this.isNodeSelected(text)) {
|
|
18727
|
+
const nodesSelectionPlugin = this.instance.getPlugin("nodesSelection");
|
|
18728
|
+
if (nodesSelectionPlugin && nodesSelectionPlugin.getSelectedNodes().length === 1 && nodesSelectionPlugin.getSelectedNodes()[0].getAttrs().nodeType === WEAVE_TEXT_NODE_TYPE && !window.weaveTextEditing[nodesSelectionPlugin.getSelectedNodes()[0].id()]) {
|
|
18729
|
+
e.preventDefault();
|
|
18730
|
+
this.triggerEditMode(nodesSelectionPlugin.getSelectedNodes()[0]);
|
|
18731
|
+
}
|
|
18693
18732
|
}
|
|
18694
18733
|
}
|
|
18695
18734
|
});
|
|
@@ -18803,9 +18842,6 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
18803
18842
|
textArea.style.height = "auto";
|
|
18804
18843
|
textArea.style.height = textArea.scrollHeight + 1.6 * textNode.getAbsoluteScale().x + "px";
|
|
18805
18844
|
};
|
|
18806
|
-
textArea.onwheel = (e) => {
|
|
18807
|
-
e.preventDefault();
|
|
18808
|
-
};
|
|
18809
18845
|
textArea.oninput = () => {
|
|
18810
18846
|
textArea.style.height = "auto";
|
|
18811
18847
|
textArea.style.height = textArea.scrollHeight + 1.6 * textNode.getAbsoluteScale().x + "px";
|
|
@@ -18814,36 +18850,22 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
18814
18850
|
let transform = "";
|
|
18815
18851
|
if (rotation) transform += "rotateZ(" + rotation + "deg)";
|
|
18816
18852
|
const px = 0;
|
|
18817
|
-
const py = -3 *
|
|
18853
|
+
const py = -3 * stage.scaleY();
|
|
18818
18854
|
transform += "translateX(" + px + "px)";
|
|
18819
18855
|
transform += "translateY(" + py + "px)";
|
|
18820
18856
|
textArea.style.transform = transform;
|
|
18821
18857
|
const handleKeyDown = (e) => {
|
|
18822
|
-
|
|
18823
|
-
|
|
18824
|
-
|
|
18825
|
-
|
|
18826
|
-
|
|
18827
|
-
|
|
18828
|
-
|
|
18829
|
-
|
|
18830
|
-
|
|
18831
|
-
|
|
18832
|
-
|
|
18833
|
-
}
|
|
18834
|
-
return;
|
|
18835
|
-
}
|
|
18836
|
-
if (e.key === "Escape") {
|
|
18837
|
-
textNode.width(parseFloat(textArea.style.width) * (1 / textNode.getAbsoluteScale().x));
|
|
18838
|
-
textNode.height((textArea.scrollHeight + 1.6) * (1 / textNode.getAbsoluteScale().x));
|
|
18839
|
-
textNode.text(textArea.value);
|
|
18840
|
-
this.updateNode(textNode);
|
|
18841
|
-
this.removeTextAreaDOM(textNode);
|
|
18842
|
-
this.instance.removeEventListener("onZoomChange", this.onZoomChangeHandler(textNode).bind(this));
|
|
18843
|
-
this.instance.removeEventListener("onStageMove", this.onStageMoveHandler(textNode).bind(this));
|
|
18844
|
-
window.removeEventListener("click", handleOutsideClick);
|
|
18845
|
-
return;
|
|
18846
|
-
}
|
|
18858
|
+
e.stopPropagation();
|
|
18859
|
+
if (textArea && textNode && e.key === "Escape") {
|
|
18860
|
+
textNode.width(parseFloat(textArea.style.width) * (1 / textNode.getAbsoluteScale().x));
|
|
18861
|
+
textNode.height((textArea.scrollHeight + 1.6) * (1 / textNode.getAbsoluteScale().x));
|
|
18862
|
+
textNode.text(textArea.value);
|
|
18863
|
+
this.updateNode(textNode);
|
|
18864
|
+
this.removeTextAreaDOM(textNode);
|
|
18865
|
+
this.instance.removeEventListener("onZoomChange", this.onZoomChangeHandler(textNode).bind(this));
|
|
18866
|
+
this.instance.removeEventListener("onStageMove", this.onStageMoveHandler(textNode).bind(this));
|
|
18867
|
+
window.removeEventListener("click", handleOutsideClick);
|
|
18868
|
+
return;
|
|
18847
18869
|
}
|
|
18848
18870
|
};
|
|
18849
18871
|
const handleKeyUp = () => {
|
|
@@ -18925,6 +18947,7 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
18925
18947
|
|
|
18926
18948
|
//#endregion
|
|
18927
18949
|
//#region src/actions/image-tool/constants.ts
|
|
18950
|
+
const IMAGE_TOOL_ACTION_NAME = "imageTool";
|
|
18928
18951
|
const IMAGE_TOOL_STATE = {
|
|
18929
18952
|
["IDLE"]: "idle",
|
|
18930
18953
|
["UPLOADING"]: "uploading",
|
|
@@ -18951,7 +18974,7 @@ var WeaveImageToolAction = class extends WeaveAction {
|
|
|
18951
18974
|
this.clickPoint = null;
|
|
18952
18975
|
}
|
|
18953
18976
|
getName() {
|
|
18954
|
-
return
|
|
18977
|
+
return IMAGE_TOOL_ACTION_NAME;
|
|
18955
18978
|
}
|
|
18956
18979
|
getPreloadedImage(imageId) {
|
|
18957
18980
|
return this.preloadImgs?.[imageId];
|
|
@@ -18975,8 +18998,10 @@ var WeaveImageToolAction = class extends WeaveAction {
|
|
|
18975
18998
|
setupEvents() {
|
|
18976
18999
|
const stage = this.instance.getStage();
|
|
18977
19000
|
stage.container().addEventListener("keydown", (e) => {
|
|
18978
|
-
if (e.key === "Escape"
|
|
18979
|
-
|
|
19001
|
+
if (e.key === "Escape" && this.instance.getActiveAction() === IMAGE_TOOL_ACTION_NAME) {
|
|
19002
|
+
this.cancelAction();
|
|
19003
|
+
return;
|
|
19004
|
+
}
|
|
18980
19005
|
});
|
|
18981
19006
|
stage.on("click tap", (e) => {
|
|
18982
19007
|
e.evt.preventDefault();
|
|
@@ -19985,12 +20010,16 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
|
|
|
19985
20010
|
}
|
|
19986
20011
|
};
|
|
19987
20012
|
|
|
20013
|
+
//#endregion
|
|
20014
|
+
//#region src/actions/zoom-out-tool/constants.ts
|
|
20015
|
+
const ZOOM_OUT_TOOL_ACTION_NAME = "zoomOutTool";
|
|
20016
|
+
|
|
19988
20017
|
//#endregion
|
|
19989
20018
|
//#region src/actions/zoom-out-tool/zoom-out-tool.ts
|
|
19990
20019
|
var WeaveZoomOutToolAction = class extends WeaveAction {
|
|
19991
20020
|
onPropsChange = void 0;
|
|
19992
20021
|
getName() {
|
|
19993
|
-
return
|
|
20022
|
+
return ZOOM_OUT_TOOL_ACTION_NAME;
|
|
19994
20023
|
}
|
|
19995
20024
|
getStageZoomPlugin() {
|
|
19996
20025
|
return this.instance.getPlugin("stageZoom");
|
|
@@ -20014,12 +20043,16 @@ var WeaveZoomOutToolAction = class extends WeaveAction {
|
|
|
20014
20043
|
}
|
|
20015
20044
|
};
|
|
20016
20045
|
|
|
20046
|
+
//#endregion
|
|
20047
|
+
//#region src/actions/zoom-in-tool/constants.ts
|
|
20048
|
+
const ZOOM_IN_TOOL_ACTION_NAME = "zoomInTool";
|
|
20049
|
+
|
|
20017
20050
|
//#endregion
|
|
20018
20051
|
//#region src/actions/zoom-in-tool/zoom-in-tool.ts
|
|
20019
20052
|
var WeaveZoomInToolAction = class extends WeaveAction {
|
|
20020
20053
|
onPropsChange = void 0;
|
|
20021
20054
|
getName() {
|
|
20022
|
-
return
|
|
20055
|
+
return ZOOM_IN_TOOL_ACTION_NAME;
|
|
20023
20056
|
}
|
|
20024
20057
|
getStageZoomPlugin() {
|
|
20025
20058
|
return this.instance.getPlugin("stageZoom");
|
|
@@ -20043,12 +20076,16 @@ var WeaveZoomInToolAction = class extends WeaveAction {
|
|
|
20043
20076
|
}
|
|
20044
20077
|
};
|
|
20045
20078
|
|
|
20079
|
+
//#endregion
|
|
20080
|
+
//#region src/actions/fit-to-screen-tool/constants.ts
|
|
20081
|
+
const FIT_TO_SCREEN_TOOL_ACTION_NAME = "fitToScreenTool";
|
|
20082
|
+
|
|
20046
20083
|
//#endregion
|
|
20047
20084
|
//#region src/actions/fit-to-screen-tool/fit-to-screen-tool.ts
|
|
20048
20085
|
var WeaveFitToScreenToolAction = class extends WeaveAction {
|
|
20049
20086
|
onPropsChange = void 0;
|
|
20050
20087
|
getName() {
|
|
20051
|
-
return
|
|
20088
|
+
return FIT_TO_SCREEN_TOOL_ACTION_NAME;
|
|
20052
20089
|
}
|
|
20053
20090
|
getStageZoomPlugin() {
|
|
20054
20091
|
return this.instance.getPlugin("stageZoom");
|
|
@@ -20071,12 +20108,16 @@ var WeaveFitToScreenToolAction = class extends WeaveAction {
|
|
|
20071
20108
|
}
|
|
20072
20109
|
};
|
|
20073
20110
|
|
|
20111
|
+
//#endregion
|
|
20112
|
+
//#region src/actions/fit-to-selection-tool/constants.ts
|
|
20113
|
+
const FIT_TO_SELECTION_TOOL_ACTION_NAME = "fitToSelectionTool";
|
|
20114
|
+
|
|
20074
20115
|
//#endregion
|
|
20075
20116
|
//#region src/actions/fit-to-selection-tool/fit-to-selection-tool.ts
|
|
20076
20117
|
var WeaveFitToSelectionToolAction = class extends WeaveAction {
|
|
20077
20118
|
onPropsChange = void 0;
|
|
20078
20119
|
getName() {
|
|
20079
|
-
return
|
|
20120
|
+
return FIT_TO_SELECTION_TOOL_ACTION_NAME;
|
|
20080
20121
|
}
|
|
20081
20122
|
getNodesSelectionPlugin() {
|
|
20082
20123
|
return this.instance.getPlugin("nodesSelection");
|
|
@@ -20160,14 +20201,6 @@ var WeaveMoveToolAction = class extends WeaveAction {
|
|
|
20160
20201
|
}
|
|
20161
20202
|
};
|
|
20162
20203
|
|
|
20163
|
-
//#endregion
|
|
20164
|
-
//#region src/actions/selection-tool/constants.ts
|
|
20165
|
-
const SELECTION_TOOL_ACTION_NAME = "selectionTool";
|
|
20166
|
-
const SELECTION_TOOL_STATE = {
|
|
20167
|
-
["IDLE"]: "idle",
|
|
20168
|
-
["SELECTING"]: "selection"
|
|
20169
|
-
};
|
|
20170
|
-
|
|
20171
20204
|
//#endregion
|
|
20172
20205
|
//#region src/actions/selection-tool/selection-tool.ts
|
|
20173
20206
|
var WeaveSelectionToolAction = class extends WeaveAction {
|
|
@@ -20265,11 +20298,11 @@ var WeaveRectangleToolAction = class extends WeaveAction {
|
|
|
20265
20298
|
setupEvents() {
|
|
20266
20299
|
const stage = this.instance.getStage();
|
|
20267
20300
|
stage.container().addEventListener("keydown", (e) => {
|
|
20268
|
-
if (e.key === "Enter") {
|
|
20301
|
+
if (e.key === "Enter" && this.instance.getActiveAction() === RECTANGLE_TOOL_ACTION_NAME) {
|
|
20269
20302
|
this.cancelAction();
|
|
20270
20303
|
return;
|
|
20271
20304
|
}
|
|
20272
|
-
if (e.key === "Escape") {
|
|
20305
|
+
if (e.key === "Escape" && this.instance.getActiveAction() === RECTANGLE_TOOL_ACTION_NAME) {
|
|
20273
20306
|
this.cancelAction();
|
|
20274
20307
|
return;
|
|
20275
20308
|
}
|
|
@@ -20399,6 +20432,7 @@ var WeaveRectangleToolAction = class extends WeaveAction {
|
|
|
20399
20432
|
|
|
20400
20433
|
//#endregion
|
|
20401
20434
|
//#region src/actions/pen-tool/constants.ts
|
|
20435
|
+
const PEN_TOOL_ACTION_NAME = "penTool";
|
|
20402
20436
|
const PEN_TOOL_STATE = {
|
|
20403
20437
|
["IDLE"]: "idle",
|
|
20404
20438
|
["ADDING"]: "adding",
|
|
@@ -20427,7 +20461,7 @@ var WeavePenToolAction = class extends WeaveAction {
|
|
|
20427
20461
|
this.props = this.initProps();
|
|
20428
20462
|
}
|
|
20429
20463
|
getName() {
|
|
20430
|
-
return
|
|
20464
|
+
return PEN_TOOL_ACTION_NAME;
|
|
20431
20465
|
}
|
|
20432
20466
|
initProps() {
|
|
20433
20467
|
return {
|
|
@@ -20439,11 +20473,11 @@ var WeavePenToolAction = class extends WeaveAction {
|
|
|
20439
20473
|
setupEvents() {
|
|
20440
20474
|
const stage = this.instance.getStage();
|
|
20441
20475
|
stage.container().addEventListener("keydown", (e) => {
|
|
20442
|
-
if (e.key === "Enter") {
|
|
20476
|
+
if (e.key === "Enter" && this.instance.getActiveAction() === PEN_TOOL_ACTION_NAME) {
|
|
20443
20477
|
this.cancelAction();
|
|
20444
20478
|
return;
|
|
20445
20479
|
}
|
|
20446
|
-
if (e.key === "Escape") {
|
|
20480
|
+
if (e.key === "Escape" && this.instance.getActiveAction() === PEN_TOOL_ACTION_NAME) {
|
|
20447
20481
|
this.cancelAction();
|
|
20448
20482
|
return;
|
|
20449
20483
|
}
|
|
@@ -20512,6 +20546,7 @@ var WeavePenToolAction = class extends WeaveAction {
|
|
|
20512
20546
|
...this.props,
|
|
20513
20547
|
x: this.clickPoint?.x ?? 0,
|
|
20514
20548
|
y: this.clickPoint?.y ?? 0,
|
|
20549
|
+
strokeScaleEnabled: false,
|
|
20515
20550
|
points: [0, 0]
|
|
20516
20551
|
});
|
|
20517
20552
|
this.instance.addNode(tempLine, this.container?.getAttrs().id);
|
|
@@ -20636,6 +20671,7 @@ var WeavePenToolAction = class extends WeaveAction {
|
|
|
20636
20671
|
|
|
20637
20672
|
//#endregion
|
|
20638
20673
|
//#region src/actions/brush-tool/constants.ts
|
|
20674
|
+
const BRUSH_TOOL_ACTION_NAME = "brushTool";
|
|
20639
20675
|
const BRUSH_TOOL_STATE = {
|
|
20640
20676
|
["INACTIVE"]: "inactive",
|
|
20641
20677
|
["IDLE"]: "idle",
|
|
@@ -20659,7 +20695,7 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
20659
20695
|
this.props = this.initProps();
|
|
20660
20696
|
}
|
|
20661
20697
|
getName() {
|
|
20662
|
-
return
|
|
20698
|
+
return BRUSH_TOOL_ACTION_NAME;
|
|
20663
20699
|
}
|
|
20664
20700
|
initProps() {
|
|
20665
20701
|
return {
|
|
@@ -20673,11 +20709,11 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
20673
20709
|
stage.container().tabIndex = 1;
|
|
20674
20710
|
stage.container().focus();
|
|
20675
20711
|
stage.container().addEventListener("keydown", (e) => {
|
|
20676
|
-
if (e.key === "Enter") {
|
|
20712
|
+
if (e.key === "Enter" && this.instance.getActiveAction() === BRUSH_TOOL_ACTION_NAME) {
|
|
20677
20713
|
this.cancelAction();
|
|
20678
20714
|
return;
|
|
20679
20715
|
}
|
|
20680
|
-
if (e.key === "Escape") {
|
|
20716
|
+
if (e.key === "Escape" && this.instance.getActiveAction() === BRUSH_TOOL_ACTION_NAME) {
|
|
20681
20717
|
this.cancelAction();
|
|
20682
20718
|
return;
|
|
20683
20719
|
}
|
|
@@ -20785,6 +20821,7 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
20785
20821
|
|
|
20786
20822
|
//#endregion
|
|
20787
20823
|
//#region src/actions/text-tool/constants.ts
|
|
20824
|
+
const TEXT_TOOL_ACTION_NAME = "textTool";
|
|
20788
20825
|
const TEXT_TOOL_STATE = {
|
|
20789
20826
|
["IDLE"]: "idle",
|
|
20790
20827
|
["ADDING"]: "adding",
|
|
@@ -20807,12 +20844,12 @@ var WeaveTextToolAction = class extends WeaveAction {
|
|
|
20807
20844
|
this.clickPoint = null;
|
|
20808
20845
|
}
|
|
20809
20846
|
getName() {
|
|
20810
|
-
return
|
|
20847
|
+
return TEXT_TOOL_ACTION_NAME;
|
|
20811
20848
|
}
|
|
20812
20849
|
setupEvents() {
|
|
20813
20850
|
const stage = this.instance.getStage();
|
|
20814
20851
|
stage.container().addEventListener("keydown", (e) => {
|
|
20815
|
-
if (e.key === "Escape") {
|
|
20852
|
+
if (e.key === "Escape" && this.instance.getActiveAction() === TEXT_TOOL_ACTION_NAME) {
|
|
20816
20853
|
this.cancelAction();
|
|
20817
20854
|
return;
|
|
20818
20855
|
}
|
|
@@ -20934,7 +20971,7 @@ var WeaveFrameToolAction = class extends WeaveAction {
|
|
|
20934
20971
|
setupEvents() {
|
|
20935
20972
|
const stage = this.instance.getStage();
|
|
20936
20973
|
stage.container().addEventListener("keydown", (e) => {
|
|
20937
|
-
if (e.key === "Escape") {
|
|
20974
|
+
if (e.key === "Escape" && this.instance.getActiveAction() === FRAME_TOOL_ACTION_NAME) {
|
|
20938
20975
|
this.cancelAction();
|
|
20939
20976
|
return;
|
|
20940
20977
|
}
|
|
@@ -21006,6 +21043,10 @@ var WeaveFrameToolAction = class extends WeaveAction {
|
|
|
21006
21043
|
}
|
|
21007
21044
|
};
|
|
21008
21045
|
|
|
21046
|
+
//#endregion
|
|
21047
|
+
//#region src/actions/export-stage-tool/constants.ts
|
|
21048
|
+
const EXPORT_STAGE_TOOL_ACTION_NAME = "exportStageTool";
|
|
21049
|
+
|
|
21009
21050
|
//#endregion
|
|
21010
21051
|
//#region src/actions/export-stage-tool/export-stage-tool.ts
|
|
21011
21052
|
var WeaveExportStageToolAction = class extends WeaveAction {
|
|
@@ -21019,7 +21060,7 @@ var WeaveExportStageToolAction = class extends WeaveAction {
|
|
|
21019
21060
|
onPropsChange = void 0;
|
|
21020
21061
|
onInit = void 0;
|
|
21021
21062
|
getName() {
|
|
21022
|
-
return
|
|
21063
|
+
return EXPORT_STAGE_TOOL_ACTION_NAME;
|
|
21023
21064
|
}
|
|
21024
21065
|
async exportStage() {
|
|
21025
21066
|
const img = await this.instance.exportStage(this.options);
|
|
@@ -21050,6 +21091,10 @@ var WeaveExportStageToolAction = class extends WeaveAction {
|
|
|
21050
21091
|
}
|
|
21051
21092
|
};
|
|
21052
21093
|
|
|
21094
|
+
//#endregion
|
|
21095
|
+
//#region src/actions/export-node-tool/constants.ts
|
|
21096
|
+
const EXPORT_NODE_TOOL_ACTION_NAME = "exportNodeTool";
|
|
21097
|
+
|
|
21053
21098
|
//#endregion
|
|
21054
21099
|
//#region src/actions/export-node-tool/export-node-tool.ts
|
|
21055
21100
|
var WeaveExportNodeToolAction = class extends WeaveAction {
|
|
@@ -21063,7 +21108,7 @@ var WeaveExportNodeToolAction = class extends WeaveAction {
|
|
|
21063
21108
|
onPropsChange = void 0;
|
|
21064
21109
|
onInit = void 0;
|
|
21065
21110
|
getName() {
|
|
21066
|
-
return
|
|
21111
|
+
return EXPORT_NODE_TOOL_ACTION_NAME;
|
|
21067
21112
|
}
|
|
21068
21113
|
async exportNode(node) {
|
|
21069
21114
|
const img = await this.instance.exportNode(node, this.options);
|
|
@@ -22116,4 +22161,4 @@ var WeaveNodesSnappingPlugin = class extends WeavePlugin {
|
|
|
22116
22161
|
};
|
|
22117
22162
|
|
|
22118
22163
|
//#endregion
|
|
22119
|
-
export { BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, IMAGE_TOOL_STATE, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, PEN_TOOL_STATE, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, TEXT_TOOL_STATE, WEAVE_COPY_PASTE_NODES_KEY, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_SIZES, WEAVE_FRAME_NODE_SIZES_MULTIPLIER, WEAVE_FRAME_NODE_SIZES_ORIENTATION, WEAVE_FRAME_NODE_SIZES_TYPES, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_COLOR, WEAVE_GRID_DEFAULT_ORIGIN_COLOR, WEAVE_GRID_DEFAULT_SIZE, WEAVE_GRID_DEFAULT_TYPE, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_NODES_SNAPPING_KEY, WEAVE_STAGE_GRID_KEY, Weave, WeaveAction, WeaveBrushToolAction, WeaveConnectedUsersPlugin, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveExportNodeToolAction, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToSelectionToolAction, WeaveFrameNode, WeaveFrameToolAction, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveLayerNode, WeaveLineNode, WeaveMoveToolAction, WeaveNode, WeaveNodesSelectionPlugin, WeaveNodesSnappingPlugin, WeavePenToolAction, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStore, WeaveTextNode, WeaveTextToolAction, WeaveUsersPointersPlugin, WeaveZoomInToolAction, WeaveZoomOutToolAction, checkIfOverContainer, clearContainerTargets, moveNodeToContainer, resetScale };
|
|
22164
|
+
export { BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, IMAGE_TOOL_ACTION_NAME, IMAGE_TOOL_STATE, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, PEN_TOOL_ACTION_NAME, PEN_TOOL_STATE, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, WEAVE_COPY_PASTE_NODES_KEY, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_SIZES, WEAVE_FRAME_NODE_SIZES_MULTIPLIER, WEAVE_FRAME_NODE_SIZES_ORIENTATION, WEAVE_FRAME_NODE_SIZES_TYPES, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_COLOR, WEAVE_GRID_DEFAULT_ORIGIN_COLOR, WEAVE_GRID_DEFAULT_SIZE, WEAVE_GRID_DEFAULT_TYPE, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_NODES_SNAPPING_KEY, WEAVE_STAGE_GRID_KEY, Weave, WeaveAction, WeaveBrushToolAction, WeaveConnectedUsersPlugin, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveExportNodeToolAction, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToSelectionToolAction, WeaveFrameNode, WeaveFrameToolAction, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveLayerNode, WeaveLineNode, WeaveMoveToolAction, WeaveNode, WeaveNodesSelectionPlugin, WeaveNodesSnappingPlugin, WeavePenToolAction, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStore, WeaveTextNode, WeaveTextToolAction, WeaveUsersPointersPlugin, WeaveZoomInToolAction, WeaveZoomOutToolAction, checkIfOverContainer, clearContainerTargets, moveNodeToContainer, resetScale };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inditextech/weave-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Jesus Manuel Piñeiro Cid <jesusmpc@inditex.com>",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"version:release": "npm version $RELEASE_VERSION -m \"[npm-scripts] prepare release $RELEASE_VERSION\" --tag-version-prefix \"\""
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@inditextech/weave-types": "0.
|
|
46
|
+
"@inditextech/weave-types": "0.14.1",
|
|
47
47
|
"@syncedstore/core": "0.6.0",
|
|
48
48
|
"canvas": "3.1.0",
|
|
49
49
|
"konva": "9.3.20",
|