@inditextech/weave-sdk 0.46.1 → 0.47.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 +121 -83
- package/dist/sdk.d.cts +6 -6
- package/dist/sdk.d.cts.map +1 -1
- package/dist/sdk.d.ts +6 -6
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +120 -84
- package/dist/sdk.js.map +1 -1
- package/package.json +2 -2
package/dist/sdk.cjs
CHANGED
|
@@ -15665,21 +15665,21 @@ function clearContainerTargets(instance) {
|
|
|
15665
15665
|
const containers = instance.getContainerNodes();
|
|
15666
15666
|
for (const container of containers) container.fire(__inditextech_weave_types.WEAVE_NODE_CUSTOM_EVENTS.onTargetLeave, { bubbles: true });
|
|
15667
15667
|
}
|
|
15668
|
-
function containerOverCursor(instance) {
|
|
15668
|
+
function containerOverCursor(instance, ignoreNodes) {
|
|
15669
15669
|
konva.default.hitOnDragEnabled = true;
|
|
15670
15670
|
const stage = instance.getStage();
|
|
15671
15671
|
const cursorPosition = stage.getRelativePointerPosition();
|
|
15672
15672
|
if (!cursorPosition) return void 0;
|
|
15673
|
-
const
|
|
15674
|
-
stage.find("
|
|
15675
|
-
if (!node.isVisible()
|
|
15673
|
+
const containerUnderPointer = new Set();
|
|
15674
|
+
stage.find(".containerCapable").reverse().forEach((node) => {
|
|
15675
|
+
if (!node.isVisible()) return;
|
|
15676
|
+
if (containsNodeDeep(ignoreNodes, node)) return;
|
|
15676
15677
|
const shapeRect = node.getClientRect({ relativeTo: stage });
|
|
15677
|
-
if (cursorPosition.x >= shapeRect.x && cursorPosition.x <= shapeRect.x + shapeRect.width && cursorPosition.y >= shapeRect.y && cursorPosition.y <= shapeRect.y + shapeRect.height
|
|
15678
|
-
|
|
15679
|
-
if (realNode?.getAttrs().isContainerPrincipal) nodesUnderPointer.add(realNode);
|
|
15678
|
+
if (cursorPosition.x >= shapeRect.x && cursorPosition.x <= shapeRect.x + shapeRect.width && cursorPosition.y >= shapeRect.y && cursorPosition.y <= shapeRect.y + shapeRect.height) {
|
|
15679
|
+
if (node?.getAttrs().isContainerPrincipal) containerUnderPointer.add(node);
|
|
15680
15680
|
}
|
|
15681
15681
|
});
|
|
15682
|
-
const nodes = Array.from(
|
|
15682
|
+
const nodes = Array.from(containerUnderPointer);
|
|
15683
15683
|
if (nodes.length === 0) return void 0;
|
|
15684
15684
|
let layerToMove = void 0;
|
|
15685
15685
|
if (nodes[0]?.getAttrs().containerId && nodes[0]?.getAttrs().isContainerPrincipal) layerToMove = nodes[0];
|
|
@@ -15688,13 +15688,13 @@ function containerOverCursor(instance) {
|
|
|
15688
15688
|
function moveNodeToContainer(instance, node, containerToMove, invalidOriginsTypes = ["frame"]) {
|
|
15689
15689
|
const stage = instance.getStage();
|
|
15690
15690
|
const isLocked = instance.allNodesLocked([node]);
|
|
15691
|
-
if (isLocked) return;
|
|
15691
|
+
if (isLocked) return false;
|
|
15692
15692
|
let nodeActualContainer = node.getParent();
|
|
15693
15693
|
if (nodeActualContainer.getAttrs().nodeId) {
|
|
15694
15694
|
const realParent = stage.findOne(`#${nodeActualContainer.getAttrs().nodeId}`);
|
|
15695
15695
|
if (realParent) nodeActualContainer = realParent;
|
|
15696
15696
|
}
|
|
15697
|
-
if (!nodeActualContainer) return
|
|
15697
|
+
if (!nodeActualContainer) return false;
|
|
15698
15698
|
const actualContainerAttrs = nodeActualContainer.getAttrs();
|
|
15699
15699
|
let layerToMove = void 0;
|
|
15700
15700
|
if (actualContainerAttrs.id !== containerToMove.getAttrs().id && !invalidOriginsTypes.includes(node.getAttrs().nodeType)) layerToMove = containerToMove;
|
|
@@ -15713,10 +15713,10 @@ function moveNodeToContainer(instance, node, containerToMove, invalidOriginsType
|
|
|
15713
15713
|
const actualNode = nodeHandler.serialize(node);
|
|
15714
15714
|
instance.removeNode(actualNode);
|
|
15715
15715
|
instance.addNode(actualNode, layerToMoveAttrs.id);
|
|
15716
|
-
return
|
|
15716
|
+
return true;
|
|
15717
15717
|
}
|
|
15718
15718
|
}
|
|
15719
|
-
return
|
|
15719
|
+
return false;
|
|
15720
15720
|
}
|
|
15721
15721
|
function getContrastTextColor(hex) {
|
|
15722
15722
|
const cleaned = hex.replace(/^#/, "");
|
|
@@ -15794,6 +15794,16 @@ function hasFrames(node) {
|
|
|
15794
15794
|
function intersectArrays(arrays) {
|
|
15795
15795
|
return arrays.reduce((acc, arr) => acc.filter((val) => arr.includes(val)), arrays[0]);
|
|
15796
15796
|
}
|
|
15797
|
+
function isNodeInSelection(node, nodes) {
|
|
15798
|
+
return nodes.some((selectedNode) => selectedNode.id() === node.id());
|
|
15799
|
+
}
|
|
15800
|
+
function containsNodeDeep(nodes, target) {
|
|
15801
|
+
for (const node of nodes) {
|
|
15802
|
+
if (node === target) return true;
|
|
15803
|
+
if (node.hasChildren?.() && containsNodeDeep(node.getChildren(), target)) return true;
|
|
15804
|
+
}
|
|
15805
|
+
return false;
|
|
15806
|
+
}
|
|
15797
15807
|
|
|
15798
15808
|
//#endregion
|
|
15799
15809
|
//#region src/plugins/context-menu/context-menu.ts
|
|
@@ -16181,7 +16191,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
16181
16191
|
}
|
|
16182
16192
|
if (this.isSelecting() && selectedNodes.length > 1) {
|
|
16183
16193
|
clearContainerTargets(this.instance);
|
|
16184
|
-
const layerToMove = containerOverCursor(this.instance);
|
|
16194
|
+
const layerToMove = containerOverCursor(this.instance, selectedNodes);
|
|
16185
16195
|
if (layerToMove && !selectionContainsFrames) layerToMove.fire(__inditextech_weave_types.WEAVE_NODE_CUSTOM_EVENTS.onTargetEnter, { bubbles: true });
|
|
16186
16196
|
}
|
|
16187
16197
|
tr.forceUpdate();
|
|
@@ -16203,7 +16213,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
16203
16213
|
clearContainerTargets(this.instance);
|
|
16204
16214
|
const toSelect = [];
|
|
16205
16215
|
const toUpdate = [];
|
|
16206
|
-
const layerToMove = containerOverCursor(this.instance);
|
|
16216
|
+
const layerToMove = containerOverCursor(this.instance, selectedNodes);
|
|
16207
16217
|
const nodeUpdatePromise = (node) => {
|
|
16208
16218
|
return new Promise((resolve) => {
|
|
16209
16219
|
setTimeout(() => {
|
|
@@ -16215,10 +16225,11 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
16215
16225
|
containerToMove = layerToMove;
|
|
16216
16226
|
containerToMove.fire(__inditextech_weave_types.WEAVE_NODE_CUSTOM_EVENTS.onTargetLeave, { bubbles: true });
|
|
16217
16227
|
}
|
|
16218
|
-
|
|
16228
|
+
let moved = false;
|
|
16229
|
+
if (containerToMove && !selectionContainsFrames) moved = moveNodeToContainer(this.instance, node, containerToMove);
|
|
16219
16230
|
if (!nodeHandler) return resolve();
|
|
16220
16231
|
toSelect.push(node.getAttrs().id ?? "");
|
|
16221
|
-
toUpdate.push(nodeHandler.serialize(node));
|
|
16232
|
+
if (!moved) toUpdate.push(nodeHandler.serialize(node));
|
|
16222
16233
|
resolve();
|
|
16223
16234
|
}, 0);
|
|
16224
16235
|
});
|
|
@@ -16265,8 +16276,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
16265
16276
|
const newSelectedNodes = selectedNodes.filter((actNode) => {
|
|
16266
16277
|
return actNode.getAttrs().id !== node.id;
|
|
16267
16278
|
});
|
|
16268
|
-
this.
|
|
16269
|
-
this.triggerSelectedNodesEvent();
|
|
16279
|
+
this.setSelectedNodes(newSelectedNodes);
|
|
16270
16280
|
stage.container().tabIndex = 1;
|
|
16271
16281
|
stage.container().focus();
|
|
16272
16282
|
stage.container().style.cursor = "default";
|
|
@@ -16637,10 +16647,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
16637
16647
|
...this.selectionOriginalConfig,
|
|
16638
16648
|
enabledAnchors: intersectArrays(anchorsArrays)
|
|
16639
16649
|
};
|
|
16640
|
-
|
|
16641
|
-
this.tr.setAttrs(transformerAttrs);
|
|
16642
|
-
this.tr.forceUpdate();
|
|
16643
|
-
}
|
|
16650
|
+
this.tr.setAttrs(transformerAttrs);
|
|
16644
16651
|
}
|
|
16645
16652
|
setSelectedNodes(nodes) {
|
|
16646
16653
|
this.tr.setNodes(nodes);
|
|
@@ -16926,6 +16933,14 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
16926
16933
|
}
|
|
16927
16934
|
};
|
|
16928
16935
|
|
|
16936
|
+
//#endregion
|
|
16937
|
+
//#region src/actions/move-tool/constants.ts
|
|
16938
|
+
const MOVE_TOOL_ACTION_NAME = "moveTool";
|
|
16939
|
+
const MOVE_TOOL_STATE = {
|
|
16940
|
+
["IDLE"]: "idle",
|
|
16941
|
+
["MOVING"]: "moving"
|
|
16942
|
+
};
|
|
16943
|
+
|
|
16929
16944
|
//#endregion
|
|
16930
16945
|
//#region src/nodes/node.ts
|
|
16931
16946
|
const augmentKonvaStageClass = () => {
|
|
@@ -17102,7 +17117,7 @@ var WeaveNode = class {
|
|
|
17102
17117
|
}
|
|
17103
17118
|
if (this.isSelecting() && this.isNodeSelected(node) && this.getSelectionPlugin()?.getSelectedNodes().length === 1) {
|
|
17104
17119
|
clearContainerTargets(this.instance);
|
|
17105
|
-
const layerToMove = containerOverCursor(this.instance);
|
|
17120
|
+
const layerToMove = containerOverCursor(this.instance, [node]);
|
|
17106
17121
|
if (layerToMove && !hasFrames(node)) layerToMove.fire(__inditextech_weave_types.WEAVE_NODE_CUSTOM_EVENTS.onTargetEnter, { bubbles: true });
|
|
17107
17122
|
}
|
|
17108
17123
|
};
|
|
@@ -17119,23 +17134,26 @@ var WeaveNode = class {
|
|
|
17119
17134
|
clearContainerTargets(this.instance);
|
|
17120
17135
|
const nodesSnappingPlugin = this.instance.getPlugin("nodesSnapping");
|
|
17121
17136
|
if (nodesSnappingPlugin) nodesSnappingPlugin.cleanupEvaluateGuidelines();
|
|
17122
|
-
const layerToMove = containerOverCursor(this.instance);
|
|
17137
|
+
const layerToMove = containerOverCursor(this.instance, [node]);
|
|
17123
17138
|
let containerToMove = this.instance.getMainLayer();
|
|
17124
17139
|
if (layerToMove) {
|
|
17125
17140
|
containerToMove = layerToMove;
|
|
17126
17141
|
containerToMove.fire(__inditextech_weave_types.WEAVE_NODE_CUSTOM_EVENTS.onTargetLeave, { bubbles: true });
|
|
17127
17142
|
}
|
|
17128
|
-
|
|
17129
|
-
this.instance.
|
|
17143
|
+
let moved = false;
|
|
17144
|
+
if (containerToMove && !hasFrames(node)) moved = moveNodeToContainer(this.instance, e.target, containerToMove);
|
|
17145
|
+
if (!moved) this.instance.updateNode(this.serialize(node));
|
|
17130
17146
|
}
|
|
17131
17147
|
});
|
|
17132
17148
|
node.on("pointerover", (e) => {
|
|
17133
17149
|
e.cancelBubble = true;
|
|
17134
17150
|
const stage = this.instance.getStage();
|
|
17151
|
+
const activeAction = this.instance.getActiveAction();
|
|
17135
17152
|
const isNodeSelectionEnabled = this.getSelectionPlugin()?.isEnabled();
|
|
17136
17153
|
const realNode = this.instance.getInstanceRecursive(node);
|
|
17137
17154
|
const isTargetable = e.target.getAttrs().isTargetable !== false;
|
|
17138
17155
|
const isLocked$1 = realNode.getAttrs().locked ?? false;
|
|
17156
|
+
if ([MOVE_TOOL_ACTION_NAME].includes(activeAction ?? "")) return;
|
|
17139
17157
|
if (isNodeSelectionEnabled && this.isSelecting() && !this.isNodeSelected(realNode) && !this.isPasting() && isLocked$1) {
|
|
17140
17158
|
const stage$1 = this.instance.getStage();
|
|
17141
17159
|
stage$1.container().style.cursor = "default";
|
|
@@ -18822,7 +18840,7 @@ var WeaveRegisterManager = class {
|
|
|
18822
18840
|
|
|
18823
18841
|
//#endregion
|
|
18824
18842
|
//#region package.json
|
|
18825
|
-
var version = "0.
|
|
18843
|
+
var version = "0.47.1";
|
|
18826
18844
|
|
|
18827
18845
|
//#endregion
|
|
18828
18846
|
//#region src/managers/setup.ts
|
|
@@ -19545,6 +19563,14 @@ var Weave = class {
|
|
|
19545
19563
|
}
|
|
19546
19564
|
};
|
|
19547
19565
|
|
|
19566
|
+
//#endregion
|
|
19567
|
+
//#region src/actions/selection-tool/constants.ts
|
|
19568
|
+
const SELECTION_TOOL_ACTION_NAME = "selectionTool";
|
|
19569
|
+
const SELECTION_TOOL_STATE = {
|
|
19570
|
+
["IDLE"]: "idle",
|
|
19571
|
+
["SELECTING"]: "selection"
|
|
19572
|
+
};
|
|
19573
|
+
|
|
19548
19574
|
//#endregion
|
|
19549
19575
|
//#region src/nodes/stage/stage.ts
|
|
19550
19576
|
var WeaveStageNode = class extends WeaveNode {
|
|
@@ -19585,29 +19611,35 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
19585
19611
|
return this._allowSelection;
|
|
19586
19612
|
};
|
|
19587
19613
|
stage.mode(WEAVE_STAGE_DEFAULT_MODE);
|
|
19614
|
+
stage.on("pointerdown", (e) => {
|
|
19615
|
+
if (e.evt.button === 1) this.wheelMousePressed = true;
|
|
19616
|
+
if ([MOVE_TOOL_ACTION_NAME].includes(this.instance.getActiveAction() ?? "")) stage.container().style.cursor = "grabbing";
|
|
19617
|
+
});
|
|
19588
19618
|
stage.on("pointermove", (e) => {
|
|
19589
|
-
|
|
19619
|
+
const activeAction = this.instance.getActiveAction();
|
|
19620
|
+
if (![MOVE_TOOL_ACTION_NAME].includes(activeAction ?? "") && stage.allowSelection() && !stage.allowActions().includes(this.instance.getActiveAction() ?? "") && !stage.allowSelectNodes().includes(e.target.getAttrs()?.nodeType ?? "")) {
|
|
19590
19621
|
const stage$1 = this.instance.getStage();
|
|
19591
19622
|
stage$1.container().style.cursor = "default";
|
|
19592
19623
|
}
|
|
19593
|
-
if (e.target === stage &&
|
|
19624
|
+
if (e.target === stage && [SELECTION_TOOL_ACTION_NAME].includes(activeAction ?? "")) {
|
|
19594
19625
|
const stage$1 = this.instance.getStage();
|
|
19595
19626
|
stage$1.container().style.cursor = "default";
|
|
19596
19627
|
}
|
|
19597
19628
|
});
|
|
19629
|
+
stage.on("pointerup", (e) => {
|
|
19630
|
+
const activeAction = this.instance.getActiveAction();
|
|
19631
|
+
if (e.evt.button === 1) this.wheelMousePressed = false;
|
|
19632
|
+
if ([MOVE_TOOL_ACTION_NAME].includes(activeAction ?? "")) stage.container().style.cursor = "grab";
|
|
19633
|
+
});
|
|
19598
19634
|
stage.on("pointerover", (e) => {
|
|
19635
|
+
const activeAction = this.instance.getActiveAction();
|
|
19636
|
+
if ([MOVE_TOOL_ACTION_NAME].includes(activeAction ?? "")) return;
|
|
19599
19637
|
if (e.target !== stage && !e.target.getAttrs().nodeId) return;
|
|
19600
19638
|
const parent = e.target.getParent();
|
|
19601
19639
|
if (parent && parent instanceof konva.default.Transformer) return;
|
|
19602
19640
|
this.hideHoverState();
|
|
19603
19641
|
stage.container().style.cursor = "default";
|
|
19604
19642
|
});
|
|
19605
|
-
stage.on("pointerdown", (e) => {
|
|
19606
|
-
if (e.evt.button === 1) this.wheelMousePressed = true;
|
|
19607
|
-
});
|
|
19608
|
-
stage.on("pointerup", (e) => {
|
|
19609
|
-
if (e.evt.button === 1) this.wheelMousePressed = false;
|
|
19610
|
-
});
|
|
19611
19643
|
return stage;
|
|
19612
19644
|
}
|
|
19613
19645
|
onUpdate() {}
|
|
@@ -19906,14 +19938,6 @@ var WeaveLineNode = class extends WeaveNode {
|
|
|
19906
19938
|
//#region src/nodes/text/constants.ts
|
|
19907
19939
|
const WEAVE_TEXT_NODE_TYPE = "text";
|
|
19908
19940
|
|
|
19909
|
-
//#endregion
|
|
19910
|
-
//#region src/actions/selection-tool/constants.ts
|
|
19911
|
-
const SELECTION_TOOL_ACTION_NAME = "selectionTool";
|
|
19912
|
-
const SELECTION_TOOL_STATE = {
|
|
19913
|
-
["IDLE"]: "idle",
|
|
19914
|
-
["SELECTING"]: "selection"
|
|
19915
|
-
};
|
|
19916
|
-
|
|
19917
19941
|
//#endregion
|
|
19918
19942
|
//#region src/actions/text-tool/constants.ts
|
|
19919
19943
|
const TEXT_TOOL_ACTION_NAME = "textTool";
|
|
@@ -21880,25 +21904,21 @@ var WeaveStrokeNode = class extends WeaveNode {
|
|
|
21880
21904
|
const { config } = params ?? {};
|
|
21881
21905
|
this.config = { transform: { ...config?.transform } };
|
|
21882
21906
|
}
|
|
21883
|
-
drawStroke(strokeElements, context, shape) {
|
|
21884
|
-
|
|
21885
|
-
context.lineCap = "round";
|
|
21886
|
-
context.lineJoin = "round";
|
|
21907
|
+
drawStroke(strokeElements, prevLineWidth, context, shape) {
|
|
21908
|
+
const strokeWidth = shape.getAttrs().strokeWidth ?? 1;
|
|
21887
21909
|
const l = strokeElements.length - 1;
|
|
21888
21910
|
if (strokeElements.length >= 3) {
|
|
21889
|
-
const
|
|
21890
|
-
const
|
|
21891
|
-
|
|
21911
|
+
const prevPoint = strokeElements[l - 1];
|
|
21912
|
+
const actualPoint = strokeElements[l];
|
|
21913
|
+
const xc = (actualPoint.x + prevPoint.x) / 2;
|
|
21914
|
+
const yc = (actualPoint.y + prevPoint.y) / 2;
|
|
21915
|
+
context.lineWidth = Math.log(actualPoint.pressure + 1) * strokeWidth + prevLineWidth * .8;
|
|
21892
21916
|
context.quadraticCurveTo(strokeElements[l - 1].x, strokeElements[l - 1].y, xc, yc);
|
|
21893
|
-
context.
|
|
21894
|
-
context.beginPath();
|
|
21895
|
-
context.moveTo(xc, yc);
|
|
21917
|
+
return context.lineWidth;
|
|
21896
21918
|
} else {
|
|
21897
21919
|
const point = strokeElements[l];
|
|
21898
|
-
context.lineWidth = point.
|
|
21899
|
-
context.
|
|
21900
|
-
context.moveTo(point.x, point.y);
|
|
21901
|
-
context.stroke();
|
|
21920
|
+
context.lineWidth = Math.log(point.pressure + 1) * strokeWidth;
|
|
21921
|
+
return context.lineWidth;
|
|
21902
21922
|
}
|
|
21903
21923
|
}
|
|
21904
21924
|
onRender(props) {
|
|
@@ -21907,13 +21927,22 @@ var WeaveStrokeNode = class extends WeaveNode {
|
|
|
21907
21927
|
name: "node",
|
|
21908
21928
|
sceneFunc: (context, shape) => {
|
|
21909
21929
|
context.beginPath();
|
|
21930
|
+
context.strokeStyle = shape.getAttrs().stroke ?? "black";
|
|
21931
|
+
context.setLineDash(shape.getAttrs().dash || []);
|
|
21932
|
+
context.lineCap = shape.getAttrs().lineCap ?? "round";
|
|
21933
|
+
context.lineJoin = shape.getAttrs().lineJoin ?? "round";
|
|
21910
21934
|
const strokeElements = shape.getAttrs().strokeElements;
|
|
21935
|
+
if (strokeElements.length === 0) return;
|
|
21936
|
+
context.moveTo(strokeElements[0].x, strokeElements[0].y);
|
|
21937
|
+
let prevLineWidth = 0;
|
|
21911
21938
|
const strokePath = [];
|
|
21912
21939
|
strokeElements.forEach((point) => {
|
|
21913
21940
|
strokePath.push(point);
|
|
21914
|
-
this.drawStroke(strokePath, context, shape);
|
|
21941
|
+
prevLineWidth = this.drawStroke(strokePath, prevLineWidth, context, shape);
|
|
21915
21942
|
});
|
|
21943
|
+
context.strokeShape(shape);
|
|
21916
21944
|
},
|
|
21945
|
+
dashEnabled: false,
|
|
21917
21946
|
hitFunc: (context, shape) => {
|
|
21918
21947
|
context.beginPath();
|
|
21919
21948
|
context.rect(0, 0, shape.width(), shape.height());
|
|
@@ -22558,14 +22587,6 @@ var WeaveFitToSelectionToolAction = class extends WeaveAction {
|
|
|
22558
22587
|
}
|
|
22559
22588
|
};
|
|
22560
22589
|
|
|
22561
|
-
//#endregion
|
|
22562
|
-
//#region src/actions/move-tool/constants.ts
|
|
22563
|
-
const MOVE_TOOL_ACTION_NAME = "moveTool";
|
|
22564
|
-
const MOVE_TOOL_STATE = {
|
|
22565
|
-
["IDLE"]: "idle",
|
|
22566
|
-
["MOVING"]: "moving"
|
|
22567
|
-
};
|
|
22568
|
-
|
|
22569
22590
|
//#endregion
|
|
22570
22591
|
//#region src/actions/move-tool/move-tool.ts
|
|
22571
22592
|
var WeaveMoveToolAction = class extends WeaveAction {
|
|
@@ -22588,6 +22609,12 @@ var WeaveMoveToolAction = class extends WeaveAction {
|
|
|
22588
22609
|
return;
|
|
22589
22610
|
}
|
|
22590
22611
|
});
|
|
22612
|
+
stage.on("pointerdown", () => {
|
|
22613
|
+
if ([MOVE_TOOL_ACTION_NAME].includes(this.instance.getActiveAction() ?? "")) stage.container().style.cursor = "grabbing";
|
|
22614
|
+
});
|
|
22615
|
+
stage.on("pointerup", () => {
|
|
22616
|
+
if ([MOVE_TOOL_ACTION_NAME].includes(this.instance.getActiveAction() ?? "")) stage.container().style.cursor = "grab";
|
|
22617
|
+
});
|
|
22591
22618
|
this.initialized = true;
|
|
22592
22619
|
}
|
|
22593
22620
|
setState(state) {
|
|
@@ -22598,6 +22625,14 @@ var WeaveMoveToolAction = class extends WeaveAction {
|
|
|
22598
22625
|
stage.container().style.cursor = "grab";
|
|
22599
22626
|
stage.container().focus();
|
|
22600
22627
|
this.setState(MOVE_TOOL_STATE.MOVING);
|
|
22628
|
+
const selectionPlugin = this.instance.getPlugin("nodesSelection");
|
|
22629
|
+
if (selectionPlugin && !selectionPlugin.isEnabled()) {
|
|
22630
|
+
const tr = selectionPlugin.getTransformer();
|
|
22631
|
+
this.instance.enablePlugin("nodesSelection");
|
|
22632
|
+
tr.listening(false);
|
|
22633
|
+
tr.draggable(false);
|
|
22634
|
+
tr.show();
|
|
22635
|
+
}
|
|
22601
22636
|
}
|
|
22602
22637
|
trigger(cancelAction, params) {
|
|
22603
22638
|
if (!this.instance) throw new Error("Instance not defined");
|
|
@@ -22614,6 +22649,11 @@ var WeaveMoveToolAction = class extends WeaveAction {
|
|
|
22614
22649
|
const stage = this.instance.getStage();
|
|
22615
22650
|
stage.container().style.cursor = "default";
|
|
22616
22651
|
const selectionPlugin = this.instance.getPlugin("nodesSelection");
|
|
22652
|
+
if (selectionPlugin) {
|
|
22653
|
+
const tr = selectionPlugin.getTransformer();
|
|
22654
|
+
tr.listening(true);
|
|
22655
|
+
tr.draggable(true);
|
|
22656
|
+
}
|
|
22617
22657
|
if (selectionPlugin && this.triggerSelectionTool) this.instance.triggerAction(SELECTION_TOOL_ACTION_NAME);
|
|
22618
22658
|
this.setState(MOVE_TOOL_STATE.IDLE);
|
|
22619
22659
|
}
|
|
@@ -23414,13 +23454,11 @@ const BRUSH_TOOL_STATE = {
|
|
|
23414
23454
|
//#region src/actions/brush-tool/brush-tool.ts
|
|
23415
23455
|
var WeaveBrushToolAction = class extends WeaveAction {
|
|
23416
23456
|
initialized = false;
|
|
23417
|
-
lineWidth = 0;
|
|
23418
23457
|
onPropsChange = void 0;
|
|
23419
23458
|
onInit = void 0;
|
|
23420
23459
|
constructor() {
|
|
23421
23460
|
super();
|
|
23422
23461
|
this.initialized = false;
|
|
23423
|
-
this.lineWidth = 0;
|
|
23424
23462
|
this.state = BRUSH_TOOL_STATE.INACTIVE;
|
|
23425
23463
|
this.strokeId = null;
|
|
23426
23464
|
this.clickPoint = null;
|
|
@@ -23460,16 +23498,14 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
23460
23498
|
const handlePointerDown = (e) => {
|
|
23461
23499
|
if (this.state !== BRUSH_TOOL_STATE.IDLE) return;
|
|
23462
23500
|
const pointPressure = this.getPointPressure(e);
|
|
23463
|
-
this.
|
|
23464
|
-
this.handleStartStroke();
|
|
23501
|
+
this.handleStartStroke(pointPressure);
|
|
23465
23502
|
e.evt.stopPropagation();
|
|
23466
23503
|
};
|
|
23467
23504
|
stage.on("pointerdown touchstart", handlePointerDown);
|
|
23468
23505
|
const handlePointerMove = (e) => {
|
|
23469
23506
|
if (this.state !== BRUSH_TOOL_STATE.DEFINE_STROKE) return;
|
|
23470
23507
|
const pointPressure = this.getPointPressure(e);
|
|
23471
|
-
this.
|
|
23472
|
-
this.handleMovement();
|
|
23508
|
+
this.handleMovement(pointPressure);
|
|
23473
23509
|
e.evt.stopPropagation();
|
|
23474
23510
|
};
|
|
23475
23511
|
stage.on("pointermove touchmove", handlePointerMove);
|
|
@@ -23508,14 +23544,20 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
23508
23544
|
height: maxY - minY
|
|
23509
23545
|
};
|
|
23510
23546
|
}
|
|
23511
|
-
handleStartStroke() {
|
|
23547
|
+
handleStartStroke(pressure) {
|
|
23512
23548
|
const { mousePoint, container, measureContainer } = this.instance.getMousePointer();
|
|
23513
23549
|
this.clickPoint = mousePoint;
|
|
23514
23550
|
this.container = container;
|
|
23515
23551
|
this.measureContainer = measureContainer;
|
|
23516
23552
|
this.strokeId = v4_default();
|
|
23517
23553
|
const nodeHandler = this.instance.getNodeHandler("stroke");
|
|
23518
|
-
if (nodeHandler) {
|
|
23554
|
+
if (nodeHandler && mousePoint && this.measureContainer) {
|
|
23555
|
+
const newStrokeElements = [];
|
|
23556
|
+
newStrokeElements.push({
|
|
23557
|
+
x: mousePoint.x,
|
|
23558
|
+
y: mousePoint.y,
|
|
23559
|
+
pressure
|
|
23560
|
+
});
|
|
23519
23561
|
const node = nodeHandler.create(this.strokeId, {
|
|
23520
23562
|
...this.props,
|
|
23521
23563
|
strokeScaleEnabled: false,
|
|
@@ -23523,14 +23565,14 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
23523
23565
|
y: 0,
|
|
23524
23566
|
width: 0,
|
|
23525
23567
|
height: 0,
|
|
23526
|
-
strokeElements:
|
|
23568
|
+
strokeElements: newStrokeElements
|
|
23527
23569
|
});
|
|
23528
23570
|
const nodeInstance = nodeHandler.onRender(node.props);
|
|
23529
23571
|
this.measureContainer?.add(nodeInstance);
|
|
23530
23572
|
}
|
|
23531
23573
|
this.setState(BRUSH_TOOL_STATE.DEFINE_STROKE);
|
|
23532
23574
|
}
|
|
23533
|
-
handleMovement() {
|
|
23575
|
+
handleMovement(pressure) {
|
|
23534
23576
|
if (this.state !== BRUSH_TOOL_STATE.DEFINE_STROKE) return;
|
|
23535
23577
|
const tempStroke = this.instance.getStage().findOne(`#${this.strokeId}`);
|
|
23536
23578
|
if (this.measureContainer && tempStroke) {
|
|
@@ -23539,7 +23581,7 @@ var WeaveBrushToolAction = class extends WeaveAction {
|
|
|
23539
23581
|
newStrokeElements.push({
|
|
23540
23582
|
x: mousePoint.x - tempStroke.x(),
|
|
23541
23583
|
y: mousePoint.y - tempStroke.y(),
|
|
23542
|
-
|
|
23584
|
+
pressure
|
|
23543
23585
|
});
|
|
23544
23586
|
const box = this.getBoundingBox(newStrokeElements);
|
|
23545
23587
|
tempStroke.setAttrs({
|
|
@@ -25237,10 +25279,8 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
25237
25279
|
const performPanning = !this.isCtrlOrMetaPressed && !e.evt.ctrlKey;
|
|
25238
25280
|
if (!this.enabled || !stage$1.isFocused() || this.isCtrlOrMetaPressed || e.evt.buttons === 4 || !performPanning) return;
|
|
25239
25281
|
this.getContextMenuPlugin()?.cancelLongPressTimer();
|
|
25240
|
-
this.getNodesSelectionPlugin()?.disable();
|
|
25241
25282
|
stage$1.x(stage$1.x() - e.evt.deltaX);
|
|
25242
25283
|
stage$1.y(stage$1.y() - e.evt.deltaY);
|
|
25243
|
-
this.getNodesSelectionPlugin()?.enable();
|
|
25244
25284
|
this.instance.emitEvent("onStageMove");
|
|
25245
25285
|
};
|
|
25246
25286
|
stage.on("wheel", handleWheel);
|
|
@@ -25268,10 +25308,6 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
25268
25308
|
y: (p1.y + p2.y) / 2
|
|
25269
25309
|
};
|
|
25270
25310
|
}
|
|
25271
|
-
getNodesSelectionPlugin() {
|
|
25272
|
-
const selectionPlugin = this.instance.getPlugin("nodesSelection");
|
|
25273
|
-
return selectionPlugin;
|
|
25274
|
-
}
|
|
25275
25311
|
getZoomPlugin() {
|
|
25276
25312
|
const zoomPlugin = this.instance.getPlugin("stageZoom");
|
|
25277
25313
|
return zoomPlugin;
|
|
@@ -26271,12 +26307,14 @@ exports.WeaveZoomInToolAction = WeaveZoomInToolAction
|
|
|
26271
26307
|
exports.WeaveZoomOutToolAction = WeaveZoomOutToolAction
|
|
26272
26308
|
exports.clearContainerTargets = clearContainerTargets
|
|
26273
26309
|
exports.containerOverCursor = containerOverCursor
|
|
26310
|
+
exports.containsNodeDeep = containsNodeDeep
|
|
26274
26311
|
exports.getBoundingBox = getBoundingBox
|
|
26275
26312
|
exports.getContrastTextColor = getContrastTextColor
|
|
26276
26313
|
exports.getTargetedNode = getTargetedNode
|
|
26277
26314
|
exports.hasFrames = hasFrames
|
|
26278
26315
|
exports.hasImages = hasImages
|
|
26279
26316
|
exports.intersectArrays = intersectArrays
|
|
26317
|
+
exports.isNodeInSelection = isNodeInSelection
|
|
26280
26318
|
exports.moveNodeToContainer = moveNodeToContainer
|
|
26281
26319
|
exports.resetScale = resetScale
|
|
26282
26320
|
exports.stringToColor = stringToColor
|
package/dist/sdk.d.cts
CHANGED
|
@@ -738,8 +738,8 @@ type WeaveActionPropsChangeEvent = {
|
|
|
738
738
|
//# sourceMappingURL=types.d.ts.map
|
|
739
739
|
declare function resetScale(node: Konva.Node): void;
|
|
740
740
|
declare function clearContainerTargets(instance: Weave): void;
|
|
741
|
-
declare function containerOverCursor(instance: Weave): Konva.Node | undefined;
|
|
742
|
-
declare function moveNodeToContainer(instance: Weave, node: Konva.Node, containerToMove: Konva.Layer | Konva.Node, invalidOriginsTypes?: string[]):
|
|
741
|
+
declare function containerOverCursor(instance: Weave, ignoreNodes: Konva.Node[]): Konva.Node | undefined;
|
|
742
|
+
declare function moveNodeToContainer(instance: Weave, node: Konva.Node, containerToMove: Konva.Layer | Konva.Node, invalidOriginsTypes?: string[]): boolean;
|
|
743
743
|
declare function getContrastTextColor(hex: string): 'white' | 'black';
|
|
744
744
|
declare function stringToColor(str: string): string;
|
|
745
745
|
declare function getBoundingBox(stage: Konva.Stage, nodes: Konva.Node[]): {
|
|
@@ -752,6 +752,8 @@ declare function getTargetedNode(instance: Weave): Konva.Node | undefined;
|
|
|
752
752
|
declare function hasImages(node: Konva.Node): boolean;
|
|
753
753
|
declare function hasFrames(node: Konva.Node): boolean;
|
|
754
754
|
declare function intersectArrays<T>(arrays: T[][]): T[];
|
|
755
|
+
declare function isNodeInSelection(node: Konva.Node, nodes: Konva.Node[]): boolean;
|
|
756
|
+
declare function containsNodeDeep(nodes: Konva.Node[], target: Konva.Node): boolean;
|
|
755
757
|
|
|
756
758
|
//#endregion
|
|
757
759
|
//#region src/nodes/stage/stage.d.ts
|
|
@@ -1184,7 +1186,7 @@ type WeaveStrokeNodeParams = {
|
|
|
1184
1186
|
type WeaveStrokePoint = {
|
|
1185
1187
|
x: number;
|
|
1186
1188
|
y: number;
|
|
1187
|
-
|
|
1189
|
+
pressure: number;
|
|
1188
1190
|
};
|
|
1189
1191
|
|
|
1190
1192
|
//#endregion
|
|
@@ -1589,7 +1591,6 @@ declare class WeaveBrushToolAction extends WeaveAction {
|
|
|
1589
1591
|
protected strokeId: string | null;
|
|
1590
1592
|
protected container: Konva.Layer | Konva.Node | undefined;
|
|
1591
1593
|
protected measureContainer: Konva.Layer | Konva.Group | undefined;
|
|
1592
|
-
protected lineWidth: number;
|
|
1593
1594
|
protected cancelAction: () => void;
|
|
1594
1595
|
onPropsChange: undefined;
|
|
1595
1596
|
onInit: undefined;
|
|
@@ -2268,7 +2269,6 @@ declare class WeaveStagePanningPlugin extends WeavePlugin {
|
|
|
2268
2269
|
x: number;
|
|
2269
2270
|
y: number;
|
|
2270
2271
|
} | null;
|
|
2271
|
-
getNodesSelectionPlugin(): WeaveNodesSelectionPlugin | undefined;
|
|
2272
2272
|
getZoomPlugin(): WeaveStageZoomPlugin | undefined;
|
|
2273
2273
|
getContextMenuPlugin(): WeaveContextMenuPlugin | undefined;
|
|
2274
2274
|
enable(): void;
|
|
@@ -2543,5 +2543,5 @@ declare class WeaveCopyPasteNodesPlugin extends WeavePlugin {
|
|
|
2543
2543
|
//#endregion
|
|
2544
2544
|
//# sourceMappingURL=copy-paste-nodes.d.ts.map
|
|
2545
2545
|
|
|
2546
|
-
export { ALIGN_NODES_ALIGN_TO, ALIGN_NODES_TOOL_ACTION_NAME, ALIGN_NODES_TOOL_STATE, ARROW_TOOL_ACTION_NAME, ARROW_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_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, ImageOptions, 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, 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_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_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_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_NODES_SNAPPING_KEY, 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, WeaveNodesSelectionBehaviorsConfig, WeaveNodesSelectionConfig, WeaveNodesSelectionPlugin, WeaveNodesSelectionPluginConfig, WeaveNodesSelectionPluginOnNodesChangeEvent, WeaveNodesSelectionPluginOnSelectionStateEvent, WeaveNodesSelectionPluginOnStageSelectionEvent, WeaveNodesSelectionPluginParams, WeaveNodesSnappingPlugin, WeaveNodesSnappingPluginConfig, WeaveNodesSnappingPluginParams, 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, getBoundingBox, getContrastTextColor, getTargetedNode, hasFrames, hasImages, intersectArrays, moveNodeToContainer, resetScale, stringToColor };
|
|
2546
|
+
export { ALIGN_NODES_ALIGN_TO, ALIGN_NODES_TOOL_ACTION_NAME, ALIGN_NODES_TOOL_STATE, ARROW_TOOL_ACTION_NAME, ARROW_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_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, ImageOptions, 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, 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_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_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_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_NODES_SNAPPING_KEY, 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, WeaveNodesSelectionBehaviorsConfig, WeaveNodesSelectionConfig, WeaveNodesSelectionPlugin, WeaveNodesSelectionPluginConfig, WeaveNodesSelectionPluginOnNodesChangeEvent, WeaveNodesSelectionPluginOnSelectionStateEvent, WeaveNodesSelectionPluginOnStageSelectionEvent, WeaveNodesSelectionPluginParams, WeaveNodesSnappingPlugin, WeaveNodesSnappingPluginConfig, WeaveNodesSnappingPluginParams, 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, getContrastTextColor, getTargetedNode, hasFrames, hasImages, intersectArrays, isNodeInSelection, moveNodeToContainer, resetScale, stringToColor };
|
|
2547
2547
|
//# sourceMappingURL=sdk.d.cts.map
|