@inditextech/weave-sdk 3.7.2 → 3.9.0-SNAPSHOT.172.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.js +193 -224
- package/dist/sdk.node.js +193 -224
- package/dist/types.d.ts +37 -26
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +193 -224
- package/dist/types.js.map +1 -1
- package/package.json +2 -2
package/dist/sdk.node.js
CHANGED
|
@@ -15101,6 +15101,9 @@ var WeaveStore = class {
|
|
|
15101
15101
|
getStateJson() {
|
|
15102
15102
|
return JSON.parse(JSON.stringify(this.state, void 0, 2));
|
|
15103
15103
|
}
|
|
15104
|
+
getRoomId() {
|
|
15105
|
+
return this.roomId;
|
|
15106
|
+
}
|
|
15104
15107
|
getStateSnapshot() {
|
|
15105
15108
|
const doc = this.getDocument();
|
|
15106
15109
|
return yjs_default.encodeStateAsUpdate(doc);
|
|
@@ -17675,19 +17678,20 @@ function moveNodeToContainerNT(instance, node, containerToMove, originalNode, or
|
|
|
17675
17678
|
node.rotation(nodeRotation);
|
|
17676
17679
|
node.x(node.x() - (layerToMoveAttrs.containerOffsetX ?? 0));
|
|
17677
17680
|
node.y(node.y() - (layerToMoveAttrs.containerOffsetY ?? 0));
|
|
17678
|
-
node.
|
|
17681
|
+
node.destroy();
|
|
17682
|
+
const newNode = node.clone();
|
|
17679
17683
|
instance.emitEvent("onNodeMovedToContainer", {
|
|
17680
|
-
node:
|
|
17684
|
+
node: newNode,
|
|
17681
17685
|
container: layerToMove,
|
|
17682
17686
|
originalNode,
|
|
17683
17687
|
originalContainer
|
|
17684
17688
|
});
|
|
17685
17689
|
const nodeHandler = instance.getNodeHandler(node.getAttrs().nodeType);
|
|
17686
17690
|
if (nodeHandler) {
|
|
17687
|
-
|
|
17688
|
-
const
|
|
17689
|
-
instance.removeNodeNT(
|
|
17690
|
-
instance.addNodeNT(
|
|
17691
|
+
const actualNodeState = nodeHandler.serialize(node);
|
|
17692
|
+
const newNodeState = nodeHandler.serialize(newNode);
|
|
17693
|
+
instance.removeNodeNT(actualNodeState, { emitUserChangeEvent: false });
|
|
17694
|
+
instance.addNodeNT(newNodeState, layerToMoveAttrs.id, {
|
|
17691
17695
|
emitUserChangeEvent: false,
|
|
17692
17696
|
overrideUserChangeType: WEAVE_NODE_CHANGE_TYPE.UPDATE
|
|
17693
17697
|
});
|
|
@@ -17916,17 +17920,6 @@ function isIOS() {
|
|
|
17916
17920
|
return /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
|
|
17917
17921
|
}
|
|
17918
17922
|
const isServer = () => typeof window === "undefined";
|
|
17919
|
-
const getPositionRelativeToContainerOnPosition = (instance) => {
|
|
17920
|
-
let position = instance.getStage().getRelativePointerPosition();
|
|
17921
|
-
if (!position) return position;
|
|
17922
|
-
const container = containerOverCursor(instance, [], position);
|
|
17923
|
-
if (container) if (container.getAttrs().containerId) {
|
|
17924
|
-
const containerNode = container.findOne(`#${container.getAttrs().containerId}`);
|
|
17925
|
-
if (containerNode) position = containerNode?.getRelativePointerPosition();
|
|
17926
|
-
} else position = container?.getRelativePointerPosition();
|
|
17927
|
-
if (!position) return position;
|
|
17928
|
-
return position;
|
|
17929
|
-
};
|
|
17930
17923
|
const canComposite = (node) => {
|
|
17931
17924
|
const parent = node.getParent();
|
|
17932
17925
|
return parent?.getClassName() === "Group" && parent?.getAttrs().nodeType !== "frame" && parent?.getAttrs().nodeId === void 0;
|
|
@@ -18677,7 +18670,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18677
18670
|
"bottom-right"
|
|
18678
18671
|
];
|
|
18679
18672
|
this.taps = 0;
|
|
18680
|
-
this.isCtrlMetaPressed = false;
|
|
18681
18673
|
this.isSpaceKeyPressed = false;
|
|
18682
18674
|
this.isDoubleTap = false;
|
|
18683
18675
|
this.tapStart = null;
|
|
@@ -18777,12 +18769,12 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18777
18769
|
}
|
|
18778
18770
|
};
|
|
18779
18771
|
stage.on("pointermove", (0, import_throttle.default)(handlePointerMoveInit, DEFAULT_THROTTLE_MS));
|
|
18780
|
-
tr.on("transformstart", () => {
|
|
18772
|
+
tr.on("transformstart", (e) => {
|
|
18781
18773
|
this.transformInProcess = true;
|
|
18782
18774
|
this.triggerSelectedNodesEvent();
|
|
18783
18775
|
const selectedNodes$1 = tr.nodes();
|
|
18784
18776
|
for (const node of selectedNodes$1) {
|
|
18785
|
-
node.handleMouseout();
|
|
18777
|
+
node.handleMouseout(e);
|
|
18786
18778
|
if (node.getAttrs().strokeScaleEnabled !== false) {
|
|
18787
18779
|
node.setAttr("strokeScaleEnabled", false);
|
|
18788
18780
|
node.setAttr("_revertStrokeScaleEnabled", true);
|
|
@@ -18794,7 +18786,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18794
18786
|
});
|
|
18795
18787
|
});
|
|
18796
18788
|
let nodeHovered = void 0;
|
|
18797
|
-
tr.on("mousemove", () => {
|
|
18789
|
+
tr.on("mousemove", (e) => {
|
|
18798
18790
|
if (this.dragInProcess) return;
|
|
18799
18791
|
const pointerPos = stage.getPointerPosition();
|
|
18800
18792
|
if (!pointerPos) return;
|
|
@@ -18804,13 +18796,13 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18804
18796
|
if (shape) {
|
|
18805
18797
|
const targetNode = this.instance.getInstanceRecursive(shape);
|
|
18806
18798
|
if (targetNode && targetNode !== nodeHovered) {
|
|
18807
|
-
this.instance.getStage().handleMouseover();
|
|
18808
|
-
nodeHovered?.handleMouseout?.();
|
|
18809
|
-
targetNode?.handleMouseover?.();
|
|
18799
|
+
this.instance.getStage().handleMouseover(e);
|
|
18800
|
+
nodeHovered?.handleMouseout?.(e);
|
|
18801
|
+
targetNode?.handleMouseover?.(e);
|
|
18810
18802
|
nodeHovered = targetNode;
|
|
18811
18803
|
}
|
|
18812
|
-
targetNode?.handleMouseover?.();
|
|
18813
|
-
} else nodeHovered?.handleMouseout?.();
|
|
18804
|
+
targetNode?.handleMouseover?.(e);
|
|
18805
|
+
} else nodeHovered?.handleMouseout?.(e);
|
|
18814
18806
|
});
|
|
18815
18807
|
tr.on("mouseover", () => {
|
|
18816
18808
|
const nodesSelected = tr.nodes();
|
|
@@ -18819,32 +18811,37 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18819
18811
|
stage.container().style.cursor = node.defineMousePointer() ?? "grab";
|
|
18820
18812
|
} else stage.container().style.cursor = "grab";
|
|
18821
18813
|
});
|
|
18822
|
-
tr.on("mouseout", () => {
|
|
18823
|
-
this.instance.getStage().handleMouseover?.();
|
|
18814
|
+
tr.on("mouseout", (e) => {
|
|
18815
|
+
this.instance.getStage().handleMouseover?.(e);
|
|
18824
18816
|
nodeHovered = void 0;
|
|
18825
18817
|
});
|
|
18826
|
-
window.addEventListener("mouseout", () => {
|
|
18818
|
+
window.addEventListener("mouseout", (e) => {
|
|
18827
18819
|
if (nodeHovered) {
|
|
18828
|
-
nodeHovered.handleMouseout();
|
|
18820
|
+
nodeHovered.handleMouseout(e);
|
|
18829
18821
|
nodeHovered = void 0;
|
|
18830
18822
|
}
|
|
18831
|
-
this.instance.getStage().handleMouseover?.();
|
|
18823
|
+
this.instance.getStage().handleMouseover?.(e);
|
|
18832
18824
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
18833
18825
|
const handleTransform = (e) => {
|
|
18834
18826
|
const moved = this.checkMoved(e);
|
|
18835
18827
|
if (moved) this.getContextMenuPlugin()?.cancelLongPressTimer();
|
|
18836
18828
|
this.triggerSelectedNodesEvent();
|
|
18837
18829
|
if (this.getUsersPresencePlugin()) {
|
|
18838
|
-
for (const node of tr.nodes())
|
|
18839
|
-
|
|
18840
|
-
|
|
18841
|
-
|
|
18842
|
-
|
|
18843
|
-
|
|
18844
|
-
|
|
18845
|
-
|
|
18846
|
-
|
|
18847
|
-
|
|
18830
|
+
for (const node of tr.nodes()) {
|
|
18831
|
+
let parentId = node.getParent()?.id() ?? "";
|
|
18832
|
+
const parent = node.getParent();
|
|
18833
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
18834
|
+
this.getUsersPresencePlugin()?.setPresence(node.id(), parentId, {
|
|
18835
|
+
x: node.x(),
|
|
18836
|
+
y: node.y(),
|
|
18837
|
+
width: node.width(),
|
|
18838
|
+
height: node.height(),
|
|
18839
|
+
scaleX: node.scaleX(),
|
|
18840
|
+
scaleY: node.scaleY(),
|
|
18841
|
+
rotation: node.rotation(),
|
|
18842
|
+
strokeScaleEnabled: false
|
|
18843
|
+
}, false);
|
|
18844
|
+
}
|
|
18848
18845
|
this.getUsersPresencePlugin()?.forceSendPresence();
|
|
18849
18846
|
}
|
|
18850
18847
|
};
|
|
@@ -18868,6 +18865,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18868
18865
|
let selectedNodes = [];
|
|
18869
18866
|
tr.on("dragstart", (e) => {
|
|
18870
18867
|
this.dragInProcess = true;
|
|
18868
|
+
let isWheelMousePressed = false;
|
|
18869
|
+
if (e.evt.button === 1) isWheelMousePressed = true;
|
|
18871
18870
|
const mainLayer = this.instance.getMainLayer();
|
|
18872
18871
|
if (!mainLayer) return;
|
|
18873
18872
|
initialPos = {
|
|
@@ -18879,7 +18878,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18879
18878
|
this.saveDragSelectedNodes();
|
|
18880
18879
|
if (this.getDragSelectedNodes().length > 1) this.setNodesOpacityOnDrag();
|
|
18881
18880
|
selectedNodes = tr.nodes();
|
|
18882
|
-
if (
|
|
18881
|
+
if (isWheelMousePressed) {
|
|
18883
18882
|
e.cancelBubble = true;
|
|
18884
18883
|
e.target.stopDrag();
|
|
18885
18884
|
return;
|
|
@@ -18903,13 +18902,14 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18903
18902
|
x: e.target.x(),
|
|
18904
18903
|
y: e.target.y()
|
|
18905
18904
|
};
|
|
18905
|
+
let isWheelMousePressed = false;
|
|
18906
|
+
if (e.evt.button === 1) isWheelMousePressed = true;
|
|
18906
18907
|
e.cancelBubble = true;
|
|
18907
18908
|
if (initialPos) {
|
|
18908
18909
|
const moved = this.checkMovedDrag(initialPos, actualPos);
|
|
18909
18910
|
if (moved) this.getContextMenuPlugin()?.cancelLongPressTimer();
|
|
18910
18911
|
}
|
|
18911
|
-
|
|
18912
|
-
if (stage$1.isMouseWheelPressed()) {
|
|
18912
|
+
if (isWheelMousePressed) {
|
|
18913
18913
|
e.cancelBubble = true;
|
|
18914
18914
|
e.target.stopDrag();
|
|
18915
18915
|
return;
|
|
@@ -18929,10 +18929,15 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18929
18929
|
clearContainerTargets(this.instance);
|
|
18930
18930
|
const layerToMove = containerOverCursor(this.instance, selectedNodes);
|
|
18931
18931
|
if (this.getUsersPresencePlugin() && this.dragInProcess) {
|
|
18932
|
-
for (const node of selectedNodes)
|
|
18933
|
-
|
|
18934
|
-
|
|
18935
|
-
|
|
18932
|
+
for (const node of selectedNodes) {
|
|
18933
|
+
let parentId = node.getParent()?.id() ?? "";
|
|
18934
|
+
const parent = node.getParent();
|
|
18935
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
18936
|
+
this.getUsersPresencePlugin()?.setPresence(node.id(), parentId, {
|
|
18937
|
+
x: node.x(),
|
|
18938
|
+
y: node.y()
|
|
18939
|
+
}, false);
|
|
18940
|
+
}
|
|
18936
18941
|
this.getUsersPresencePlugin()?.forceSendPresence();
|
|
18937
18942
|
}
|
|
18938
18943
|
if (layerToMove && !selectionContainsFrames) layerToMove.fire(WEAVE_NODE_CUSTOM_EVENTS.onTargetEnter, { bubbles: true });
|
|
@@ -19019,16 +19024,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19019
19024
|
tr.forceUpdate();
|
|
19020
19025
|
}
|
|
19021
19026
|
});
|
|
19022
|
-
this.instance.addEventListener("onRender", () => {
|
|
19023
|
-
const point = stage.getPointerPosition();
|
|
19024
|
-
if (point) {
|
|
19025
|
-
const ele = this.instance.getTargetingManager().pointIntersectsElement(point);
|
|
19026
|
-
if (ele) {
|
|
19027
|
-
const realEle = this.instance.getTargetingManager().resolveNode(ele);
|
|
19028
|
-
realEle?.handleMouseover();
|
|
19029
|
-
}
|
|
19030
|
-
}
|
|
19031
|
-
});
|
|
19032
19027
|
this.instance.addEventListener("onNodesChange", () => {
|
|
19033
19028
|
const currentSelectedNodes = tr.nodes();
|
|
19034
19029
|
const unselectedNodes = this.prevSelectedNodes.filter((node) => !currentSelectedNodes.map((node1) => node1.getAttrs().id).includes(node.getAttrs().id));
|
|
@@ -19235,12 +19230,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19235
19230
|
initEvents() {
|
|
19236
19231
|
this.selecting = false;
|
|
19237
19232
|
const stage = this.instance.getStage();
|
|
19238
|
-
window.addEventListener("blur", () => {
|
|
19239
|
-
this.isCtrlMetaPressed = false;
|
|
19240
|
-
this.isSpaceKeyPressed = false;
|
|
19241
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
19242
19233
|
stage.container().addEventListener("keydown", (e) => {
|
|
19243
|
-
if (e.ctrlKey || e.metaKey) this.isCtrlMetaPressed = true;
|
|
19244
19234
|
if (e.code === "Space") this.isSpaceKeyPressed = true;
|
|
19245
19235
|
if (e.code === "Backspace" || e.code === "Delete") {
|
|
19246
19236
|
Promise.resolve().then(() => {
|
|
@@ -19250,7 +19240,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19250
19240
|
}
|
|
19251
19241
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
19252
19242
|
stage.container().addEventListener("keyup", (e) => {
|
|
19253
|
-
if (!(e.ctrlKey || e.metaKey)) this.isCtrlMetaPressed = false;
|
|
19254
19243
|
if (e.code === "Space") this.isSpaceKeyPressed = false;
|
|
19255
19244
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
19256
19245
|
stage.on("pointerdown", (e) => {
|
|
@@ -19302,7 +19291,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19302
19291
|
this.selectionRectangle.width(0);
|
|
19303
19292
|
this.selectionRectangle.height(0);
|
|
19304
19293
|
this.selecting = true;
|
|
19305
|
-
|
|
19294
|
+
const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
|
|
19295
|
+
if (isCtrlOrMetaPressed) {
|
|
19306
19296
|
const nodesSelected = this.tr.nodes();
|
|
19307
19297
|
for (const node of nodesSelected) node.fire("onSelectionCleared", { bubbles: true });
|
|
19308
19298
|
}
|
|
@@ -19522,7 +19512,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19522
19512
|
nodeTargeted.dblClick();
|
|
19523
19513
|
return;
|
|
19524
19514
|
}
|
|
19525
|
-
|
|
19515
|
+
const isCtrlOrCmdPressed = e.evt.ctrlKey || e.evt.metaKey;
|
|
19516
|
+
if (isCtrlOrCmdPressed) return;
|
|
19526
19517
|
if (!metaPressed) {
|
|
19527
19518
|
this.tr.nodes([nodeTargeted]);
|
|
19528
19519
|
this.tr.show();
|
|
@@ -20164,11 +20155,6 @@ const MOVE_TOOL_STATE = {
|
|
|
20164
20155
|
|
|
20165
20156
|
//#endregion
|
|
20166
20157
|
//#region src/nodes/node.ts
|
|
20167
|
-
const augmentKonvaStageClass = () => {
|
|
20168
|
-
Konva.Stage.prototype.isMouseWheelPressed = function() {
|
|
20169
|
-
return false;
|
|
20170
|
-
};
|
|
20171
|
-
};
|
|
20172
20158
|
const augmentKonvaNodeClass = (config) => {
|
|
20173
20159
|
const { transform } = config ?? {};
|
|
20174
20160
|
Konva.Node.prototype.getTransformerProperties = function() {
|
|
@@ -20180,7 +20166,6 @@ const augmentKonvaNodeClass = (config) => {
|
|
|
20180
20166
|
Konva.Node.prototype.getRealClientRect = function(config$1) {
|
|
20181
20167
|
return this.getClientRect(config$1);
|
|
20182
20168
|
};
|
|
20183
|
-
Konva.Node.prototype.movedToContainer = function() {};
|
|
20184
20169
|
Konva.Node.prototype.updatePosition = function() {};
|
|
20185
20170
|
Konva.Node.prototype.triggerCrop = function() {};
|
|
20186
20171
|
Konva.Node.prototype.closeCrop = function() {};
|
|
@@ -20230,7 +20215,6 @@ var WeaveNode = class {
|
|
|
20230
20215
|
"bottom-right"
|
|
20231
20216
|
];
|
|
20232
20217
|
};
|
|
20233
|
-
node.movedToContainer = function() {};
|
|
20234
20218
|
node.updatePosition = function() {};
|
|
20235
20219
|
node.resetCrop = function() {};
|
|
20236
20220
|
node.handleMouseover = function() {};
|
|
@@ -20419,7 +20403,10 @@ var WeaveNode = class {
|
|
|
20419
20403
|
const nodesEdgeSnappingPlugin = this.getNodesEdgeSnappingPlugin();
|
|
20420
20404
|
if (nodesSelectionPlugin && this.isSelecting() && this.isNodeSelected(node$1)) nodesSelectionPlugin.getTransformer().forceUpdate();
|
|
20421
20405
|
if (nodesEdgeSnappingPlugin && transforming && this.isSelecting() && this.isNodeSelected(node$1)) nodesEdgeSnappingPlugin.evaluateGuidelines(e);
|
|
20422
|
-
|
|
20406
|
+
let parentId = node$1.getParent()?.id() ?? "";
|
|
20407
|
+
const parent = node$1.getParent();
|
|
20408
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
20409
|
+
this.getUsersPresencePlugin()?.setPresence(node$1.id(), parentId, {
|
|
20423
20410
|
x: node$1.x(),
|
|
20424
20411
|
y: node$1.y(),
|
|
20425
20412
|
width: node$1.width(),
|
|
@@ -20475,6 +20462,8 @@ var WeaveNode = class {
|
|
|
20475
20462
|
node.off("dragstart");
|
|
20476
20463
|
node.on("dragstart", (e) => {
|
|
20477
20464
|
const nodeTarget = e.target;
|
|
20465
|
+
let isWheelMousePressed = false;
|
|
20466
|
+
if (e.evt.button === 1) isWheelMousePressed = true;
|
|
20478
20467
|
e.cancelBubble = true;
|
|
20479
20468
|
this.getNodesSelectionFeedbackPlugin()?.hideSelectionHalo(nodeTarget);
|
|
20480
20469
|
this.getSelectionPlugin()?.saveDragSelectedNodes();
|
|
@@ -20495,7 +20484,7 @@ var WeaveNode = class {
|
|
|
20495
20484
|
return;
|
|
20496
20485
|
}
|
|
20497
20486
|
this.instance.emitEvent("onDrag", nodeTarget);
|
|
20498
|
-
if (
|
|
20487
|
+
if (isWheelMousePressed) {
|
|
20499
20488
|
e.cancelBubble = true;
|
|
20500
20489
|
nodeTarget.stopDrag();
|
|
20501
20490
|
}
|
|
@@ -20512,6 +20501,7 @@ var WeaveNode = class {
|
|
|
20512
20501
|
originalNode = realNodeTarget.clone();
|
|
20513
20502
|
originalContainer = realNodeTarget.getParent();
|
|
20514
20503
|
if (originalContainer?.getAttrs().nodeId) originalContainer = stage.findOne(`#${originalContainer.getAttrs().nodeId}`);
|
|
20504
|
+
realNodeTarget.fire("nodeDragStart", { node: realNodeTarget });
|
|
20515
20505
|
if (e.evt?.altKey) {
|
|
20516
20506
|
nodeTarget.setAttrs({ isCloneOrigin: true });
|
|
20517
20507
|
nodeTarget.setAttrs({ isCloned: false });
|
|
@@ -20540,19 +20530,20 @@ var WeaveNode = class {
|
|
|
20540
20530
|
});
|
|
20541
20531
|
const handleDragMove = (e) => {
|
|
20542
20532
|
const nodeTarget = e.target;
|
|
20533
|
+
let isWheelMousePressed = false;
|
|
20534
|
+
if (e.evt.button === 1) isWheelMousePressed = true;
|
|
20543
20535
|
e.cancelBubble = true;
|
|
20544
20536
|
if (e.evt?.buttons === 0) {
|
|
20545
20537
|
nodeTarget.stopDrag();
|
|
20546
20538
|
return;
|
|
20547
20539
|
}
|
|
20548
20540
|
this.didMove = true;
|
|
20549
|
-
const stage$1 = this.instance.getStage();
|
|
20550
20541
|
const isErasing = this.instance.getActiveAction() === "eraseTool";
|
|
20551
20542
|
if (isErasing) {
|
|
20552
20543
|
nodeTarget.stopDrag();
|
|
20553
20544
|
return;
|
|
20554
20545
|
}
|
|
20555
|
-
if (
|
|
20546
|
+
if (isWheelMousePressed) {
|
|
20556
20547
|
e.cancelBubble = true;
|
|
20557
20548
|
nodeTarget.stopDrag();
|
|
20558
20549
|
return;
|
|
@@ -20567,7 +20558,10 @@ var WeaveNode = class {
|
|
|
20567
20558
|
}
|
|
20568
20559
|
if (this.isSelecting() && this.getSelectionPlugin()?.getSelectedNodes().length === 1) {
|
|
20569
20560
|
clearContainerTargets(this.instance);
|
|
20570
|
-
|
|
20561
|
+
let parentId = realNodeTarget.getParent()?.id() ?? "";
|
|
20562
|
+
const parent = realNodeTarget.getParent();
|
|
20563
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
20564
|
+
this.getUsersPresencePlugin()?.setPresence(realNodeTarget.id(), parentId, {
|
|
20571
20565
|
x: realNodeTarget.x(),
|
|
20572
20566
|
y: realNodeTarget.y()
|
|
20573
20567
|
});
|
|
@@ -20666,11 +20660,11 @@ var WeaveNode = class {
|
|
|
20666
20660
|
originalPosition = realNodeTarget.getAbsolutePosition();
|
|
20667
20661
|
});
|
|
20668
20662
|
if (!node.getAttrs().overridesMouseControl) {
|
|
20669
|
-
node.handleMouseover = () => {
|
|
20670
|
-
this.handleMouseOver(node);
|
|
20663
|
+
node.handleMouseover = (e) => {
|
|
20664
|
+
this.handleMouseOver(e, node);
|
|
20671
20665
|
};
|
|
20672
|
-
node.handleMouseout = () => {
|
|
20673
|
-
this.handleMouseout(node);
|
|
20666
|
+
node.handleMouseout = (e) => {
|
|
20667
|
+
this.handleMouseout(e, node);
|
|
20674
20668
|
};
|
|
20675
20669
|
}
|
|
20676
20670
|
node.on("xChange yChange", () => {
|
|
@@ -20698,20 +20692,21 @@ var WeaveNode = class {
|
|
|
20698
20692
|
};
|
|
20699
20693
|
node.on("pointerover", (e) => {
|
|
20700
20694
|
const realNodeTarget = this.getRealSelectedNode(e.target);
|
|
20701
|
-
realNodeTarget?.handleMouseover?.();
|
|
20702
|
-
const doCancelBubble = this.handleMouseOver(e.target);
|
|
20695
|
+
realNodeTarget?.handleMouseover?.(e);
|
|
20696
|
+
const doCancelBubble = this.handleMouseOver(e, e.target);
|
|
20703
20697
|
if (doCancelBubble) e.cancelBubble = true;
|
|
20704
20698
|
});
|
|
20705
20699
|
node.on("pointerleave", (e) => {
|
|
20706
20700
|
const realNodeTarget = this.getRealSelectedNode(e.target);
|
|
20707
|
-
realNodeTarget?.handleMouseout?.();
|
|
20708
|
-
this.handleMouseout(e.target);
|
|
20701
|
+
realNodeTarget?.handleMouseout?.(e);
|
|
20702
|
+
this.handleMouseout(e, e.target);
|
|
20709
20703
|
});
|
|
20710
20704
|
}
|
|
20711
20705
|
}
|
|
20712
|
-
handleMouseOver(node) {
|
|
20706
|
+
handleMouseOver(e, node) {
|
|
20713
20707
|
const stage = this.instance.getStage();
|
|
20714
|
-
|
|
20708
|
+
const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
|
|
20709
|
+
if (isCtrlOrMetaPressed) return false;
|
|
20715
20710
|
const user = this.instance.getStore().getUser();
|
|
20716
20711
|
const activeAction = this.instance.getActiveAction();
|
|
20717
20712
|
const isNodeSelectionEnabled = this.getSelectionPlugin()?.isEnabled();
|
|
@@ -20745,9 +20740,9 @@ var WeaveNode = class {
|
|
|
20745
20740
|
else this.hideHoverState();
|
|
20746
20741
|
return cancelBubble;
|
|
20747
20742
|
}
|
|
20748
|
-
handleMouseout(node) {
|
|
20749
|
-
const
|
|
20750
|
-
if (
|
|
20743
|
+
handleMouseout(e, node) {
|
|
20744
|
+
const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
|
|
20745
|
+
if (isCtrlOrMetaPressed) return;
|
|
20751
20746
|
const realNode = this.instance.getInstanceRecursive(node);
|
|
20752
20747
|
if (realNode) this.hideHoverState();
|
|
20753
20748
|
}
|
|
@@ -20779,7 +20774,6 @@ var WeaveNode = class {
|
|
|
20779
20774
|
delete cleanedAttrs.mutexUserId;
|
|
20780
20775
|
delete cleanedAttrs.draggable;
|
|
20781
20776
|
delete cleanedAttrs.overridesMouseControl;
|
|
20782
|
-
delete cleanedAttrs.onMoveContainer;
|
|
20783
20777
|
delete cleanedAttrs.dragBoundFunc;
|
|
20784
20778
|
return {
|
|
20785
20779
|
key: attrs.id ?? "",
|
|
@@ -21394,45 +21388,23 @@ var WeaveTargetingManager = class {
|
|
|
21394
21388
|
}
|
|
21395
21389
|
getMousePointer(point) {
|
|
21396
21390
|
this.logger.debug({ point }, "getMousePointer");
|
|
21397
|
-
const stage = this.instance.getStage();
|
|
21398
21391
|
const mainLayer = this.instance.getMainLayer();
|
|
21399
21392
|
let relativeMousePointer = typeof point !== "undefined" ? point : mainLayer?.getRelativePointerPosition() ?? {
|
|
21400
21393
|
x: 0,
|
|
21401
21394
|
y: 0
|
|
21402
21395
|
};
|
|
21403
|
-
let measureContainer = mainLayer;
|
|
21404
|
-
let container = mainLayer;
|
|
21405
21396
|
const utilityLayer = this.instance.getUtilityLayer();
|
|
21406
21397
|
if (utilityLayer) utilityLayer.visible(false);
|
|
21398
|
+
const containerAlt = containerOverCursor(this.instance, [], relativeMousePointer);
|
|
21407
21399
|
const nodesSelection = this.instance.getPlugin("nodesSelection");
|
|
21408
21400
|
if (nodesSelection) nodesSelection.getTransformer().visible(false);
|
|
21409
|
-
|
|
21410
|
-
width: 10,
|
|
21411
|
-
height: 10,
|
|
21412
|
-
x: relativeMousePointer.x,
|
|
21413
|
-
y: relativeMousePointer.y
|
|
21414
|
-
});
|
|
21415
|
-
mainLayer?.add(dummyRect);
|
|
21416
|
-
const intersectedNode = this.nodeIntersectsContainerElement(dummyRect);
|
|
21417
|
-
if (intersectedNode) {
|
|
21418
|
-
const containerOfNode = stage.findOne(`#${intersectedNode.getAttrs().containerId}`);
|
|
21419
|
-
if (containerOfNode) {
|
|
21420
|
-
container = intersectedNode;
|
|
21421
|
-
measureContainer = containerOfNode;
|
|
21422
|
-
}
|
|
21423
|
-
}
|
|
21424
|
-
if (typeof point === "undefined" && container?.getAttrs().nodeType !== "layer") relativeMousePointer = measureContainer?.getRelativePointerPosition() ?? relativeMousePointer;
|
|
21425
|
-
if (typeof point === "undefined" && container?.getAttrs().nodeType === "layer") relativeMousePointer = measureContainer?.getRelativePointerPosition() ?? {
|
|
21426
|
-
x: 0,
|
|
21427
|
-
y: 0
|
|
21428
|
-
};
|
|
21401
|
+
relativeMousePointer = containerAlt?.getRelativePointerPosition() ?? relativeMousePointer;
|
|
21429
21402
|
if (utilityLayer) utilityLayer.visible(true);
|
|
21430
21403
|
if (nodesSelection) nodesSelection.getTransformer().visible(true);
|
|
21431
|
-
dummyRect.destroy();
|
|
21432
21404
|
return {
|
|
21433
21405
|
mousePoint: relativeMousePointer,
|
|
21434
|
-
container,
|
|
21435
|
-
measureContainer
|
|
21406
|
+
container: containerAlt,
|
|
21407
|
+
measureContainer: containerAlt
|
|
21436
21408
|
};
|
|
21437
21409
|
}
|
|
21438
21410
|
getMousePointerRelativeToContainer(container) {
|
|
@@ -22021,7 +21993,7 @@ var WeaveRegisterManager = class {
|
|
|
22021
21993
|
|
|
22022
21994
|
//#endregion
|
|
22023
21995
|
//#region package.json
|
|
22024
|
-
var version = "3.
|
|
21996
|
+
var version = "3.9.0-SNAPSHOT.172.1";
|
|
22025
21997
|
|
|
22026
21998
|
//#endregion
|
|
22027
21999
|
//#region src/managers/setup.ts
|
|
@@ -23461,13 +23433,12 @@ var Weave = class {
|
|
|
23461
23433
|
this.moduleLogger.info("Start instance");
|
|
23462
23434
|
if (!this.isServerSide()) {
|
|
23463
23435
|
this.eventsController = new AbortController();
|
|
23464
|
-
|
|
23436
|
+
window.weave = this;
|
|
23465
23437
|
}
|
|
23466
23438
|
this.emitEvent("onRoomLoaded", false);
|
|
23467
23439
|
this.status = WEAVE_INSTANCE_STATUS.STARTING;
|
|
23468
23440
|
this.emitEvent("onInstanceStatus", this.status);
|
|
23469
23441
|
await this.registerManager.registerNodesHandlers();
|
|
23470
|
-
this.augmentKonvaStageClass();
|
|
23471
23442
|
this.augmentKonvaNodeClass();
|
|
23472
23443
|
this.registerManager.registerPlugins();
|
|
23473
23444
|
this.registerManager.registerActionsHandlers();
|
|
@@ -23539,9 +23510,6 @@ var Weave = class {
|
|
|
23539
23510
|
getConfiguration() {
|
|
23540
23511
|
return this.config;
|
|
23541
23512
|
}
|
|
23542
|
-
augmentKonvaStageClass() {
|
|
23543
|
-
augmentKonvaStageClass();
|
|
23544
|
-
}
|
|
23545
23513
|
augmentKonvaNodeClass(config) {
|
|
23546
23514
|
augmentKonvaNodeClass(config);
|
|
23547
23515
|
}
|
|
@@ -24314,8 +24282,6 @@ const setupUpscaleStage = (instance, stage) => {
|
|
|
24314
24282
|
var WeaveStageNode = class extends WeaveNode {
|
|
24315
24283
|
nodeType = WEAVE_STAGE_NODE_TYPE;
|
|
24316
24284
|
stageFocused = false;
|
|
24317
|
-
wheelMousePressed = false;
|
|
24318
|
-
isCmdCtrlPressed = false;
|
|
24319
24285
|
globalEventsInitialized = false;
|
|
24320
24286
|
initialize = void 0;
|
|
24321
24287
|
onRender(props) {
|
|
@@ -24324,9 +24290,7 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24324
24290
|
mode: "default"
|
|
24325
24291
|
});
|
|
24326
24292
|
setupUpscaleStage(this.instance, stage);
|
|
24327
|
-
this.wheelMousePressed = false;
|
|
24328
24293
|
stage.isFocused = () => this.stageFocused;
|
|
24329
|
-
stage.isMouseWheelPressed = () => this.wheelMousePressed;
|
|
24330
24294
|
stage.position({
|
|
24331
24295
|
x: 0,
|
|
24332
24296
|
y: 0
|
|
@@ -24362,8 +24326,7 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24362
24326
|
};
|
|
24363
24327
|
stage.handleMouseout = function() {};
|
|
24364
24328
|
stage.mode(WEAVE_STAGE_DEFAULT_MODE);
|
|
24365
|
-
stage.on("pointerdown", (
|
|
24366
|
-
if (e.evt.button === 1) this.wheelMousePressed = true;
|
|
24329
|
+
stage.on("pointerdown", () => {
|
|
24367
24330
|
if (!this.instance.isServerSide() && [MOVE_TOOL_ACTION_NAME].includes(this.instance.getActiveAction() ?? "")) stage.container().style.cursor = "grabbing";
|
|
24368
24331
|
});
|
|
24369
24332
|
stage.on("pointermove", (e) => {
|
|
@@ -24377,9 +24340,8 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24377
24340
|
stage$1.container().style.cursor = "default";
|
|
24378
24341
|
}
|
|
24379
24342
|
});
|
|
24380
|
-
stage.on("pointerup", (
|
|
24343
|
+
stage.on("pointerup", () => {
|
|
24381
24344
|
const activeAction = this.instance.getActiveAction();
|
|
24382
|
-
if (e.evt.button === 1) this.wheelMousePressed = false;
|
|
24383
24345
|
if (!this.instance.isServerSide() && [MOVE_TOOL_ACTION_NAME].includes(activeAction ?? "")) stage.container().style.cursor = "grab";
|
|
24384
24346
|
});
|
|
24385
24347
|
stage.on("pointerover", (e) => {
|
|
@@ -24391,7 +24353,6 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24391
24353
|
this.hideHoverState();
|
|
24392
24354
|
if (!this.instance.isServerSide()) stage.container().style.cursor = "default";
|
|
24393
24355
|
});
|
|
24394
|
-
stage.isCmdCtrlPressed = () => this.isCmdCtrlPressed;
|
|
24395
24356
|
this.setupEvents();
|
|
24396
24357
|
return stage;
|
|
24397
24358
|
}
|
|
@@ -24399,12 +24360,8 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24399
24360
|
setupEvents() {
|
|
24400
24361
|
if (this.globalEventsInitialized) return;
|
|
24401
24362
|
if (this.instance.isServerSide()) return;
|
|
24402
|
-
window.addEventListener("blur", () => {
|
|
24403
|
-
this.isCmdCtrlPressed = false;
|
|
24404
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
24405
24363
|
window.addEventListener("keydown", (e) => {
|
|
24406
24364
|
if (this.isOnlyCtrlOrMeta(e)) {
|
|
24407
|
-
this.isCmdCtrlPressed = true;
|
|
24408
24365
|
this.instance.getStage().container().style.cursor = "default";
|
|
24409
24366
|
const transformer = this.getSelectionPlugin()?.getTransformer();
|
|
24410
24367
|
if (!transformer) return;
|
|
@@ -24415,7 +24372,6 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24415
24372
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
24416
24373
|
window.addEventListener("keyup", (e) => {
|
|
24417
24374
|
if (!(e.ctrlKey || e.metaKey)) {
|
|
24418
|
-
this.isCmdCtrlPressed = false;
|
|
24419
24375
|
this.instance.getStage().container().style.cursor = "default";
|
|
24420
24376
|
const transformer = this.getSelectionPlugin()?.getTransformer();
|
|
24421
24377
|
if (!transformer) return;
|
|
@@ -24468,7 +24424,6 @@ var WeaveLayerNode = class extends WeaveNode {
|
|
|
24468
24424
|
delete cleanedAttrs.mutexUserId;
|
|
24469
24425
|
delete cleanedAttrs.draggable;
|
|
24470
24426
|
delete cleanedAttrs.overridesMouseControl;
|
|
24471
|
-
delete cleanedAttrs.onMoveContainer;
|
|
24472
24427
|
delete cleanedAttrs.dragBoundFunc;
|
|
24473
24428
|
return {
|
|
24474
24429
|
key: attrs.id ?? "",
|
|
@@ -24553,7 +24508,6 @@ var WeaveGroupNode = class extends WeaveNode {
|
|
|
24553
24508
|
delete cleanedAttrs.mutexUserId;
|
|
24554
24509
|
delete cleanedAttrs.draggable;
|
|
24555
24510
|
delete cleanedAttrs.overridesMouseControl;
|
|
24556
|
-
delete cleanedAttrs.onMoveContainer;
|
|
24557
24511
|
delete cleanedAttrs.dragBoundFunc;
|
|
24558
24512
|
return {
|
|
24559
24513
|
key: attrs.id ?? "",
|
|
@@ -25096,28 +25050,12 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25096
25050
|
}
|
|
25097
25051
|
initialize() {
|
|
25098
25052
|
this.keyPressHandler = void 0;
|
|
25099
|
-
this.eventsInitialized = false;
|
|
25100
|
-
this.isCtrlMetaPressed = false;
|
|
25101
25053
|
this.textAreaSuperContainer = null;
|
|
25102
25054
|
this.textAreaContainer = null;
|
|
25103
25055
|
this.textArea = null;
|
|
25104
25056
|
this.editing = false;
|
|
25105
25057
|
this.textArea = null;
|
|
25106
25058
|
}
|
|
25107
|
-
initEvents() {
|
|
25108
|
-
if (!this.eventsInitialized && !globalThis._weave_isServerSide) {
|
|
25109
|
-
window.addEventListener("blur", () => {
|
|
25110
|
-
this.isCtrlMetaPressed = false;
|
|
25111
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
25112
|
-
window.addEventListener("keydown", (e) => {
|
|
25113
|
-
if (e.ctrlKey || e.metaKey) this.isCtrlMetaPressed = true;
|
|
25114
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
25115
|
-
window.addEventListener("keyup", (e) => {
|
|
25116
|
-
if (!(e.ctrlKey || e.metaKey)) this.isCtrlMetaPressed = false;
|
|
25117
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
25118
|
-
this.eventsInitialized = true;
|
|
25119
|
-
}
|
|
25120
|
-
}
|
|
25121
25059
|
updateNode(nodeInstance) {
|
|
25122
25060
|
const actNode = this.instance.getStage().findOne(`#${nodeInstance.id()}`);
|
|
25123
25061
|
if (actNode) {
|
|
@@ -25153,7 +25091,6 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25153
25091
|
}
|
|
25154
25092
|
}
|
|
25155
25093
|
onRender(props) {
|
|
25156
|
-
this.initEvents();
|
|
25157
25094
|
const text = new Konva.Text({
|
|
25158
25095
|
...props,
|
|
25159
25096
|
name: "node",
|
|
@@ -25220,6 +25157,7 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25220
25157
|
text.setAttr("triggerEditMode", this.triggerEditMode.bind(this));
|
|
25221
25158
|
let actualAnchor = void 0;
|
|
25222
25159
|
text.on("transformstart", (e) => {
|
|
25160
|
+
const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
|
|
25223
25161
|
this.instance.emitEvent("onTransform", e.target);
|
|
25224
25162
|
actualAnchor = this.getNodesSelectionPlugin()?.getTransformer()?.getActiveAnchor();
|
|
25225
25163
|
if (text.getAttrs().layout === TEXT_LAYOUT.SMART && [
|
|
@@ -25227,7 +25165,7 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25227
25165
|
"top-right",
|
|
25228
25166
|
"bottom-left",
|
|
25229
25167
|
"bottom-right"
|
|
25230
|
-
].includes(actualAnchor ?? "") || text.getAttrs().layout === TEXT_LAYOUT.FIXED &&
|
|
25168
|
+
].includes(actualAnchor ?? "") || text.getAttrs().layout === TEXT_LAYOUT.FIXED && isCtrlOrMetaPressed) this.getNodesSelectionPlugin()?.getTransformer()?.keepRatio(true);
|
|
25231
25169
|
else this.getNodesSelectionPlugin()?.getTransformer()?.keepRatio(false);
|
|
25232
25170
|
if ([TEXT_LAYOUT.AUTO_HEIGHT, TEXT_LAYOUT.SMART].includes(text.getAttrs().layout) && ["middle-right", "middle-left"].includes(actualAnchor ?? "")) {
|
|
25233
25171
|
text.wrap("word");
|
|
@@ -25358,7 +25296,6 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25358
25296
|
delete cleanedAttrs.measureMultilineText;
|
|
25359
25297
|
delete cleanedAttrs.overridesMouseControl;
|
|
25360
25298
|
delete cleanedAttrs.shouldUpdateOnTransform;
|
|
25361
|
-
delete cleanedAttrs.onMoveContainer;
|
|
25362
25299
|
delete cleanedAttrs.dragBoundFunc;
|
|
25363
25300
|
return {
|
|
25364
25301
|
key: attrs.id ?? "",
|
|
@@ -25750,6 +25687,7 @@ const WEAVE_IMAGE_CROP_ANCHOR_POSITION = {
|
|
|
25750
25687
|
["BOTTOM_CENTER"]: "bottom-center"
|
|
25751
25688
|
};
|
|
25752
25689
|
const WEAVE_IMAGE_DEFAULT_CONFIG = {
|
|
25690
|
+
cleanup: { intervalMs: 60 * 1e3 },
|
|
25753
25691
|
performance: { cache: { enabled: false } },
|
|
25754
25692
|
style: {
|
|
25755
25693
|
placeholder: { fill: "#aaaaaa" },
|
|
@@ -26139,7 +26077,8 @@ var WeaveImageCrop = class WeaveImageCrop {
|
|
|
26139
26077
|
this.onClose();
|
|
26140
26078
|
const utilityLayer = this.instance.getUtilityLayer();
|
|
26141
26079
|
utilityLayer?.destroyChildren();
|
|
26142
|
-
|
|
26080
|
+
const isCtrlOrMetaPressed = e.ctrlKey || e.metaKey;
|
|
26081
|
+
if (isCtrlOrMetaPressed && utilityLayer) {
|
|
26143
26082
|
this.node.renderCropMode(utilityLayer, this.image);
|
|
26144
26083
|
utilityLayer.show();
|
|
26145
26084
|
}
|
|
@@ -26448,6 +26387,25 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26448
26387
|
this.imageTryoutAttempts = {};
|
|
26449
26388
|
this.imageFallback = {};
|
|
26450
26389
|
}
|
|
26390
|
+
setupNotUsedImagesCleanup() {
|
|
26391
|
+
const cleanupHandler = () => {
|
|
26392
|
+
this.notUsedImagesCleanup = null;
|
|
26393
|
+
const stage = this.instance.getStage();
|
|
26394
|
+
const nodesIds = Object.keys(this.imageState);
|
|
26395
|
+
for (const nodeId of nodesIds) {
|
|
26396
|
+
const node = stage.findOne(`#${nodeId}`);
|
|
26397
|
+
if (!node) {
|
|
26398
|
+
delete this.imageSource[nodeId];
|
|
26399
|
+
delete this.imageState[nodeId];
|
|
26400
|
+
delete this.imageTryoutAttempts[nodeId];
|
|
26401
|
+
delete this.imageFallback[nodeId];
|
|
26402
|
+
}
|
|
26403
|
+
}
|
|
26404
|
+
this.setupNotUsedImagesCleanup();
|
|
26405
|
+
};
|
|
26406
|
+
const bindedCleanupHandler = cleanupHandler.bind(this);
|
|
26407
|
+
if (!this.notUsedImagesCleanup) setTimeout(bindedCleanupHandler, this.config.cleanup.intervalMs);
|
|
26408
|
+
}
|
|
26451
26409
|
preloadCursors() {
|
|
26452
26410
|
return new Promise((resolve) => {
|
|
26453
26411
|
(async () => {
|
|
@@ -26524,6 +26482,7 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26524
26482
|
this.instance.resolveAsyncElement(nodeId, WEAVE_IMAGE_NODE_TYPE);
|
|
26525
26483
|
}
|
|
26526
26484
|
onRender(props) {
|
|
26485
|
+
this.setupNotUsedImagesCleanup();
|
|
26527
26486
|
const imageProperties = props.imageProperties;
|
|
26528
26487
|
const imageProps = props;
|
|
26529
26488
|
const { id } = imageProps;
|
|
@@ -26549,11 +26508,6 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26549
26508
|
if (this.isSelecting() && selectedNodes.includes(image)) return "grab";
|
|
26550
26509
|
return "pointer";
|
|
26551
26510
|
};
|
|
26552
|
-
image.movedToContainer = () => {
|
|
26553
|
-
const stage = this.instance.getStage();
|
|
26554
|
-
const image$1 = stage.findOne(`#${id}`);
|
|
26555
|
-
if (!image$1) return;
|
|
26556
|
-
};
|
|
26557
26511
|
if (this.config.cropMode.enabled) {
|
|
26558
26512
|
image.triggerCrop = () => {
|
|
26559
26513
|
this.triggerCrop(image, { cmdCtrl: { triggered: false } });
|
|
@@ -26675,23 +26629,36 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26675
26629
|
if (this.imageCrop) this.closeCrop(image, WEAVE_IMAGE_CROP_END_TYPE.CANCEL);
|
|
26676
26630
|
}
|
|
26677
26631
|
});
|
|
26632
|
+
image.on("nodeDragStart", () => {
|
|
26633
|
+
const utilityLayer = this.instance.getUtilityLayer();
|
|
26634
|
+
if (!utilityLayer) return;
|
|
26635
|
+
const nodes = utilityLayer?.find(".cropMode") ?? [];
|
|
26636
|
+
nodes.forEach((n) => {
|
|
26637
|
+
n.destroy();
|
|
26638
|
+
});
|
|
26639
|
+
const transformer = this.getSelectionPlugin()?.getTransformer();
|
|
26640
|
+
if (!transformer) return;
|
|
26641
|
+
transformer.show();
|
|
26642
|
+
});
|
|
26678
26643
|
if (this.config.cropMode.enabled && this.config.cropMode.triggers.ctrlCmd) {
|
|
26679
26644
|
image.on("onCmdCtrlPressed", () => {
|
|
26645
|
+
const utilityLayer = this.instance.getUtilityLayer();
|
|
26646
|
+
if (!utilityLayer) return;
|
|
26647
|
+
if (image.isDragging()) return;
|
|
26680
26648
|
const transformer = this.getSelectionPlugin()?.getTransformer();
|
|
26681
26649
|
if (!transformer) return;
|
|
26682
26650
|
transformer.hide();
|
|
26683
|
-
const utilityLayer = this.instance.getUtilityLayer();
|
|
26684
|
-
if (!utilityLayer) return;
|
|
26685
26651
|
utilityLayer?.destroyChildren();
|
|
26686
26652
|
this.renderCropMode(utilityLayer, image);
|
|
26687
26653
|
utilityLayer?.show();
|
|
26688
26654
|
});
|
|
26689
26655
|
image.on("onCmdCtrlReleased", () => {
|
|
26656
|
+
const utilityLayer = this.instance.getUtilityLayer();
|
|
26657
|
+
if (!utilityLayer) return;
|
|
26658
|
+
if (image.isDragging()) return;
|
|
26690
26659
|
const transformer = this.getSelectionPlugin()?.getTransformer();
|
|
26691
26660
|
if (!transformer) return;
|
|
26692
26661
|
transformer.show();
|
|
26693
|
-
const utilityLayer = this.instance.getUtilityLayer();
|
|
26694
|
-
if (!utilityLayer) return;
|
|
26695
26662
|
utilityLayer?.destroyChildren();
|
|
26696
26663
|
});
|
|
26697
26664
|
}
|
|
@@ -26750,6 +26717,7 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26750
26717
|
fill: "transparent",
|
|
26751
26718
|
strokeScaleEnabled: false,
|
|
26752
26719
|
strokeWidth: 2,
|
|
26720
|
+
name: "cropMode",
|
|
26753
26721
|
stroke: "#1a1aff",
|
|
26754
26722
|
draggable: false,
|
|
26755
26723
|
listening: false,
|
|
@@ -26810,6 +26778,7 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26810
26778
|
}));
|
|
26811
26779
|
const anchor = new Konva.Rect({
|
|
26812
26780
|
draggable: false,
|
|
26781
|
+
name: "cropMode",
|
|
26813
26782
|
rotation: node.rotation()
|
|
26814
26783
|
});
|
|
26815
26784
|
this.config.cropMode.selection.anchorStyleFunc(anchor, position);
|
|
@@ -27250,20 +27219,15 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
27250
27219
|
}
|
|
27251
27220
|
onDestroy(nodeInstance) {
|
|
27252
27221
|
const nodeId = nodeInstance.getAttrs().id ?? "";
|
|
27253
|
-
const isMoveContainer = nodeInstance.getAttr("onMoveContainer");
|
|
27254
|
-
nodeInstance.setAttr("onMoveContainer", void 0);
|
|
27255
27222
|
const utilityLayer = this.instance.getUtilityLayer();
|
|
27256
|
-
utilityLayer?.
|
|
27223
|
+
const nodes = utilityLayer?.find(".cropMode") ?? [];
|
|
27224
|
+
nodes.forEach((n) => {
|
|
27225
|
+
n.destroy();
|
|
27226
|
+
});
|
|
27257
27227
|
if (this.imageTryoutIds[nodeId]) {
|
|
27258
27228
|
clearTimeout(this.imageTryoutIds[nodeId]);
|
|
27259
27229
|
delete this.imageTryoutIds[nodeId];
|
|
27260
27230
|
}
|
|
27261
|
-
if (!isMoveContainer) {
|
|
27262
|
-
delete this.imageSource[nodeId];
|
|
27263
|
-
delete this.imageState[nodeId];
|
|
27264
|
-
delete this.imageTryoutAttempts[nodeId];
|
|
27265
|
-
delete this.imageFallback[nodeId];
|
|
27266
|
-
}
|
|
27267
27231
|
nodeInstance.destroy();
|
|
27268
27232
|
}
|
|
27269
27233
|
};
|
|
@@ -27810,7 +27774,6 @@ var WeaveFrameNode = class extends WeaveNode {
|
|
|
27810
27774
|
delete cleanedAttrs.draggable;
|
|
27811
27775
|
delete cleanedAttrs.onTargetEnter;
|
|
27812
27776
|
delete cleanedAttrs.overridesMouseControl;
|
|
27813
|
-
delete cleanedAttrs.onMoveContainer;
|
|
27814
27777
|
delete cleanedAttrs.dragBoundFunc;
|
|
27815
27778
|
return {
|
|
27816
27779
|
key: realAttrs?.id ?? "",
|
|
@@ -28049,7 +28012,6 @@ var WeaveStrokeNode = class extends WeaveNode {
|
|
|
28049
28012
|
delete cleanedAttrs.sceneFunc;
|
|
28050
28013
|
delete cleanedAttrs.hitFunc;
|
|
28051
28014
|
delete cleanedAttrs.overridesMouseControl;
|
|
28052
|
-
delete cleanedAttrs.onMoveContainer;
|
|
28053
28015
|
delete cleanedAttrs.dragBoundFunc;
|
|
28054
28016
|
return {
|
|
28055
28017
|
key: attrs.id ?? "",
|
|
@@ -29594,6 +29556,7 @@ var WeaveVideoNode = class extends WeaveNode {
|
|
|
29594
29556
|
const videoIconGroup = video.findOne(`#${id}-video-icon-group`);
|
|
29595
29557
|
if (!videoPlaceholder || !videoIconGroup) return;
|
|
29596
29558
|
const realVideoPlaceholderURL = this.config.urlTransformer?.(videoProps.videoPlaceholderURL ?? "", video) ?? videoProps.videoPlaceholderURL;
|
|
29559
|
+
if (!this.videoPlaceholder) this.initialize();
|
|
29597
29560
|
this.videoPlaceholder[id] = Konva.Util.createImageElement();
|
|
29598
29561
|
this.videoPlaceholder[id].crossOrigin = this.config.crossOrigin;
|
|
29599
29562
|
this.videoPlaceholder[id].src = realVideoPlaceholderURL;
|
|
@@ -29858,16 +29821,16 @@ var WeaveVideoNode = class extends WeaveNode {
|
|
|
29858
29821
|
}
|
|
29859
29822
|
if (isServer()) this.instance.updateNode(this.serialize(videoGroup));
|
|
29860
29823
|
const defaultHandleMouseover = videoGroup.handleMouseover;
|
|
29861
|
-
videoGroup.handleMouseover = () => {
|
|
29862
|
-
defaultHandleMouseover.call(this);
|
|
29824
|
+
videoGroup.handleMouseover = (e) => {
|
|
29825
|
+
defaultHandleMouseover.call(this, e);
|
|
29863
29826
|
if (this.config.style.track.onlyOnHover && this.videoState[id].loaded) {
|
|
29864
29827
|
const videoProgress = videoGroup.findOne(`#${id}-video-progress`);
|
|
29865
29828
|
videoProgress?.show();
|
|
29866
29829
|
}
|
|
29867
29830
|
};
|
|
29868
29831
|
const defaultHandleMouseout = videoGroup.handleMouseout;
|
|
29869
|
-
videoGroup.handleMouseout = () => {
|
|
29870
|
-
defaultHandleMouseout.call(this);
|
|
29832
|
+
videoGroup.handleMouseout = (e) => {
|
|
29833
|
+
defaultHandleMouseout.call(e, this);
|
|
29871
29834
|
if (this.config.style.track.onlyOnHover && this.videoState[id].loaded && !this.videoState[id].paused) {
|
|
29872
29835
|
const videoProgress = videoGroup.findOne(`#${id}-video-progress`);
|
|
29873
29836
|
videoProgress?.hide();
|
|
@@ -31981,7 +31944,6 @@ var WeaveConnectorNode = class extends WeaveNode {
|
|
|
31981
31944
|
delete cleanedAttrs.startInfoLoaded;
|
|
31982
31945
|
delete cleanedAttrs.endInfoLoaded;
|
|
31983
31946
|
delete cleanedAttrs.overridesMouseControl;
|
|
31984
|
-
delete cleanedAttrs.onMoveContainer;
|
|
31985
31947
|
delete cleanedAttrs.dragBoundFunc;
|
|
31986
31948
|
return {
|
|
31987
31949
|
key: attrs.id ?? "",
|
|
@@ -32137,7 +32099,6 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
|
|
|
32137
32099
|
this.zooming = false;
|
|
32138
32100
|
this.isTrackpad = false;
|
|
32139
32101
|
this.zoomVelocity = 0;
|
|
32140
|
-
this.isCtrlOrMetaPressed = false;
|
|
32141
32102
|
this.updatedMinimumZoom = false;
|
|
32142
32103
|
this.actualStep = this.config.zoomSteps.findIndex((step) => step === this.config.defaultZoom);
|
|
32143
32104
|
this.actualScale = this.config.zoomSteps[this.actualStep];
|
|
@@ -32448,15 +32409,6 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
|
|
|
32448
32409
|
};
|
|
32449
32410
|
}
|
|
32450
32411
|
initEvents() {
|
|
32451
|
-
window.addEventListener("blur", () => {
|
|
32452
|
-
this.isCtrlOrMetaPressed = false;
|
|
32453
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
32454
|
-
window.addEventListener("keydown", (e) => {
|
|
32455
|
-
if (e.ctrlKey || e.metaKey) this.isCtrlOrMetaPressed = true;
|
|
32456
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
32457
|
-
window.addEventListener("keyup", (e) => {
|
|
32458
|
-
if (!(e.ctrlKey || e.metaKey)) this.isCtrlOrMetaPressed = false;
|
|
32459
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
32460
32412
|
const stage = this.instance.getStage();
|
|
32461
32413
|
let lastCenter = null;
|
|
32462
32414
|
let lastDist = 0;
|
|
@@ -32538,7 +32490,8 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
|
|
|
32538
32490
|
});
|
|
32539
32491
|
let doZoom = false;
|
|
32540
32492
|
const handleWheelImmediate = (e) => {
|
|
32541
|
-
const
|
|
32493
|
+
const isCtrlOrMetaPressed = e.ctrlKey || e.metaKey;
|
|
32494
|
+
const performZoom = isCtrlOrMetaPressed || !isCtrlOrMetaPressed && e.ctrlKey && e.deltaMode === 0;
|
|
32542
32495
|
const mouseX = e.clientX;
|
|
32543
32496
|
const mouseY = e.clientY;
|
|
32544
32497
|
let elementUnderMouse = document.elementFromPoint(mouseX, mouseY);
|
|
@@ -34449,7 +34402,7 @@ var WeaveImageToolAction = class extends WeaveAction {
|
|
|
34449
34402
|
const dragProperties = this.instance.getDragProperties();
|
|
34450
34403
|
if (dragProperties && dragId === WEAVE_IMAGE_TOOL_ACTION_NAME) {
|
|
34451
34404
|
this.instance.getStage().setPointersPositions(e);
|
|
34452
|
-
const position =
|
|
34405
|
+
const position = this.instance.getStage().getRelativePointerPosition();
|
|
34453
34406
|
if (!position) return;
|
|
34454
34407
|
this.instance.triggerAction(WEAVE_IMAGE_TOOL_ACTION_NAME, {
|
|
34455
34408
|
type: WEAVE_IMAGE_TOOL_UPLOAD_TYPE.IMAGE_URL,
|
|
@@ -34899,7 +34852,7 @@ var WeaveImagesToolAction = class extends WeaveAction {
|
|
|
34899
34852
|
const dragProperties = this.instance.getDragProperties();
|
|
34900
34853
|
if (dragProperties && dragId === WEAVE_IMAGES_TOOL_ACTION_NAME) {
|
|
34901
34854
|
this.instance.getStage().setPointersPositions(e);
|
|
34902
|
-
const position =
|
|
34855
|
+
const position = this.instance.getStage().getRelativePointerPosition();
|
|
34903
34856
|
if (!position) return;
|
|
34904
34857
|
this.instance.triggerAction(WEAVE_IMAGES_TOOL_ACTION_NAME, {
|
|
34905
34858
|
type: WEAVE_IMAGES_TOOL_UPLOAD_TYPE.IMAGE_URL,
|
|
@@ -37010,7 +36963,7 @@ var WeaveVideoToolAction = class extends WeaveAction {
|
|
|
37010
36963
|
const dragProperties = this.instance.getDragProperties();
|
|
37011
36964
|
if (dragProperties && dragId === VIDEO_TOOL_ACTION_NAME) {
|
|
37012
36965
|
this.instance.getStage().setPointersPositions(e);
|
|
37013
|
-
const position =
|
|
36966
|
+
const position = this.instance.getStage().getRelativePointerPosition();
|
|
37014
36967
|
this.instance.triggerAction(VIDEO_TOOL_ACTION_NAME, {
|
|
37015
36968
|
videoId: dragProperties.videoId,
|
|
37016
36969
|
videoParams: dragProperties.videoParams,
|
|
@@ -38142,7 +38095,6 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38142
38095
|
this.moveToolActive = false;
|
|
38143
38096
|
this.isMouseLeftButtonPressed = false;
|
|
38144
38097
|
this.isMouseMiddleButtonPressed = false;
|
|
38145
|
-
this.isCtrlOrMetaPressed = false;
|
|
38146
38098
|
this.isSpaceKeyPressed = false;
|
|
38147
38099
|
this.previousPointer = null;
|
|
38148
38100
|
this.currentPointer = null;
|
|
@@ -38171,11 +38123,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38171
38123
|
}
|
|
38172
38124
|
initEvents() {
|
|
38173
38125
|
const stage = this.instance.getStage();
|
|
38174
|
-
window.addEventListener("blur", () => {
|
|
38175
|
-
this.isCtrlOrMetaPressed = false;
|
|
38176
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
38177
38126
|
window.addEventListener("keydown", (e) => {
|
|
38178
|
-
if (e.ctrlKey || e.metaKey) this.isCtrlOrMetaPressed = true;
|
|
38179
38127
|
if (e.code === "Space") {
|
|
38180
38128
|
this.getContextMenuPlugin()?.disable();
|
|
38181
38129
|
this.getNodesSelectionPlugin()?.disable();
|
|
@@ -38186,7 +38134,6 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38186
38134
|
}
|
|
38187
38135
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
38188
38136
|
window.addEventListener("keyup", (e) => {
|
|
38189
|
-
if (e.key === "Meta" || e.key === "Control") this.isCtrlOrMetaPressed = false;
|
|
38190
38137
|
if (e.code === "Space") {
|
|
38191
38138
|
this.getContextMenuPlugin()?.enable();
|
|
38192
38139
|
this.getNodesSelectionPlugin()?.enable();
|
|
@@ -38253,7 +38200,8 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38253
38200
|
this.cleanupEdgeMoveIntervals();
|
|
38254
38201
|
});
|
|
38255
38202
|
const handleWheel = (e) => {
|
|
38256
|
-
const
|
|
38203
|
+
const isCtrlOrMetaPressed = e.ctrlKey || e.metaKey;
|
|
38204
|
+
const performPanning = !isCtrlOrMetaPressed && !e.ctrlKey;
|
|
38257
38205
|
const mouseX = e.clientX;
|
|
38258
38206
|
const mouseY = e.clientY;
|
|
38259
38207
|
let elementUnderMouse = document.elementFromPoint(mouseX, mouseY);
|
|
@@ -38261,7 +38209,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38261
38209
|
const shadowHost = getTopmostShadowHost(stage.container());
|
|
38262
38210
|
if (shadowHost) elementUnderMouse = shadowHost.elementFromPoint(mouseX, mouseY);
|
|
38263
38211
|
}
|
|
38264
|
-
if (!this.enabled ||
|
|
38212
|
+
if (!this.enabled || isCtrlOrMetaPressed || e.buttons === 4 || !performPanning || this.instance.getClosestParentWithWeaveId(elementUnderMouse) !== stage.container()) return;
|
|
38265
38213
|
this.getContextMenuPlugin()?.cancelLongPressTimer();
|
|
38266
38214
|
stage.x(stage.x() - e.deltaX);
|
|
38267
38215
|
stage.y(stage.y() - e.deltaY);
|
|
@@ -39293,7 +39241,11 @@ var WeaveUsersPresencePlugin = class extends WeavePlugin {
|
|
|
39293
39241
|
const presenceInfo = userPresence[nodeId];
|
|
39294
39242
|
if (this.config.getUser().id === presenceInfo.userId) continue;
|
|
39295
39243
|
const nodeInstance = stage.findOne(`#${presenceInfo.nodeId}`);
|
|
39296
|
-
if (nodeInstance)
|
|
39244
|
+
if (!nodeInstance) continue;
|
|
39245
|
+
let parentId = nodeInstance.getParent()?.id() ?? "";
|
|
39246
|
+
const parent = nodeInstance.getParent();
|
|
39247
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
39248
|
+
if (nodeInstance && presenceInfo.parentId === parentId) {
|
|
39297
39249
|
const newProps = {
|
|
39298
39250
|
...nodeInstance.getAttrs(),
|
|
39299
39251
|
...presenceInfo.attrs
|
|
@@ -39308,10 +39260,11 @@ var WeaveUsersPresencePlugin = class extends WeavePlugin {
|
|
|
39308
39260
|
const store = this.instance.getStore();
|
|
39309
39261
|
store.setAwarenessInfo(WEAVE_USER_PRESENCE_KEY, this.userPresence);
|
|
39310
39262
|
}
|
|
39311
|
-
setPresence(nodeId, attrs, forceUpdate = true) {
|
|
39263
|
+
setPresence(nodeId, parentId, attrs, forceUpdate = true) {
|
|
39312
39264
|
const userInfo = this.config.getUser();
|
|
39313
39265
|
this.userPresence[nodeId] = {
|
|
39314
39266
|
userId: userInfo.id,
|
|
39267
|
+
parentId,
|
|
39315
39268
|
nodeId,
|
|
39316
39269
|
attrs
|
|
39317
39270
|
};
|
|
@@ -40518,7 +40471,16 @@ var WeaveCommentsRendererPlugin = class extends WeavePlugin {
|
|
|
40518
40471
|
//#endregion
|
|
40519
40472
|
//#region src/plugins/stage-keyboard-move/constants.ts
|
|
40520
40473
|
const WEAVE_STAGE_KEYBOARD_MOVE_KEY = "stageKeyboardMove";
|
|
40521
|
-
const WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG = {
|
|
40474
|
+
const WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG = {
|
|
40475
|
+
movementDelta: 1,
|
|
40476
|
+
shiftMovementDelta: 10
|
|
40477
|
+
};
|
|
40478
|
+
const WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION = {
|
|
40479
|
+
["UP"]: "up",
|
|
40480
|
+
["DOWN"]: "down",
|
|
40481
|
+
["LEFT"]: "left",
|
|
40482
|
+
["RIGHT"]: "right"
|
|
40483
|
+
};
|
|
40522
40484
|
|
|
40523
40485
|
//#endregion
|
|
40524
40486
|
//#region src/plugins/stage-keyboard-move/stage-keyboard-move.ts
|
|
@@ -40533,25 +40495,31 @@ var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
|
|
|
40533
40495
|
getName() {
|
|
40534
40496
|
return WEAVE_STAGE_KEYBOARD_MOVE_KEY;
|
|
40535
40497
|
}
|
|
40536
|
-
handleNodesMovement(movementOrientation) {
|
|
40498
|
+
handleNodesMovement(movementOrientation, { isShiftPressed }) {
|
|
40537
40499
|
const nodesSelectionPlugin = this.instance.getPlugin("nodesSelection");
|
|
40538
40500
|
if (nodesSelectionPlugin) {
|
|
40539
40501
|
const selectedNodes = nodesSelectionPlugin.getSelectedNodes();
|
|
40502
|
+
const movementDelta = isShiftPressed ? this.config.shiftMovementDelta : this.config.movementDelta;
|
|
40540
40503
|
for (const node of selectedNodes) {
|
|
40541
40504
|
switch (movementOrientation) {
|
|
40542
|
-
case
|
|
40543
|
-
node.y(node.y() -
|
|
40505
|
+
case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.UP:
|
|
40506
|
+
node.y(node.y() - movementDelta);
|
|
40544
40507
|
break;
|
|
40545
|
-
case
|
|
40546
|
-
node.y(node.y() +
|
|
40508
|
+
case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.DOWN:
|
|
40509
|
+
node.y(node.y() + movementDelta);
|
|
40547
40510
|
break;
|
|
40548
|
-
case
|
|
40549
|
-
node.x(node.x() -
|
|
40511
|
+
case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.LEFT:
|
|
40512
|
+
node.x(node.x() - movementDelta);
|
|
40550
40513
|
break;
|
|
40551
|
-
case
|
|
40552
|
-
node.x(node.x() +
|
|
40514
|
+
case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.RIGHT:
|
|
40515
|
+
node.x(node.x() + movementDelta);
|
|
40553
40516
|
break;
|
|
40554
40517
|
}
|
|
40518
|
+
this.instance.emitEvent("onNodeKeyboardMove", {
|
|
40519
|
+
node,
|
|
40520
|
+
orientation: movementOrientation,
|
|
40521
|
+
delta: movementDelta
|
|
40522
|
+
});
|
|
40555
40523
|
const nodeHandler = this.instance.getNodeHandler(node.getAttrs().nodeType);
|
|
40556
40524
|
if (!nodeHandler) break;
|
|
40557
40525
|
this.instance.updateNode(nodeHandler.serialize(node));
|
|
@@ -40560,10 +40528,11 @@ var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
|
|
|
40560
40528
|
}
|
|
40561
40529
|
onInit() {
|
|
40562
40530
|
window.addEventListener("keydown", (e) => {
|
|
40563
|
-
|
|
40564
|
-
if (e.code === "
|
|
40565
|
-
if (e.code === "
|
|
40566
|
-
if (e.code === "
|
|
40531
|
+
const isShiftPressed = e.shiftKey || e.code === "Shift";
|
|
40532
|
+
if (e.code === "ArrowUp") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.UP, { isShiftPressed });
|
|
40533
|
+
if (e.code === "ArrowLeft") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.LEFT, { isShiftPressed });
|
|
40534
|
+
if (e.code === "ArrowRight") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.RIGHT, { isShiftPressed });
|
|
40535
|
+
if (e.code === "ArrowDown") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.DOWN, { isShiftPressed });
|
|
40567
40536
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
40568
40537
|
}
|
|
40569
40538
|
enable() {
|
|
@@ -40586,4 +40555,4 @@ const setupCanvasBackend = async () => {
|
|
|
40586
40555
|
};
|
|
40587
40556
|
|
|
40588
40557
|
//#endregion
|
|
40589
|
-
export { ALIGN_NODES_ALIGN_TO, ALIGN_NODES_TOOL_ACTION_NAME, ALIGN_NODES_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_DEFAULT_CONFIG, BRUSH_TOOL_STATE, CONNECTOR_TOOL_ACTION_NAME, CONNECTOR_TOOL_DEFAULT_CONFIG, CONNECTOR_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_DISTANCE_LINE_DEFAULT_CONFIG, GUIDE_ENTER_SNAPPING_TOLERANCE, GUIDE_EXIT_SNAPPING_TOLERANCE, GUIDE_HORIZONTAL_LINE_NAME, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, GUIDE_VERTICAL_LINE_NAME, LINE_TOOL_ACTION_NAME, LINE_TOOL_DEFAULT_CONFIG, LINE_TOOL_STATE, MEASURE_TOOL_ACTION_NAME, MEASURE_TOOL_STATE, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NODE_SNAP_HORIZONTAL, NODE_SNAP_VERTICAL, PEN_TOOL_ACTION_NAME, PEN_TOOL_STATE, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, REGULAR_POLYGON_TOOL_ACTION_NAME, REGULAR_POLYGON_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, STAGE_MINIMAP_DEFAULT_CONFIG, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, VIDEO_TOOL_ACTION_NAME, VIDEO_TOOL_STATE, WEAVE_ARROW_NODE_TYPE, WEAVE_ARROW_TOOL_ACTION_NAME, WEAVE_ARROW_TOOL_STATE, WEAVE_COMMENTS_RENDERER_KEY, WEAVE_COMMENTS_TOOL_LAYER_ID, WEAVE_COMMENT_CREATE_ACTION, WEAVE_COMMENT_NODE_ACTION, WEAVE_COMMENT_NODE_DEFAULTS, WEAVE_COMMENT_NODE_TYPE, WEAVE_COMMENT_STATUS, WEAVE_COMMENT_TOOL_ACTION_NAME, WEAVE_COMMENT_TOOL_DEFAULT_CONFIG, WEAVE_COMMENT_TOOL_STATE, WEAVE_COMMENT_VIEW_ACTION, WEAVE_CONNECTOR_NODE_ANCHOR_ORIGIN, WEAVE_CONNECTOR_NODE_DECORATOR_TYPE, WEAVE_CONNECTOR_NODE_DEFAULT_CONFIG, WEAVE_CONNECTOR_NODE_LINE_ORIGIN, WEAVE_CONNECTOR_NODE_LINE_TYPE, WEAVE_CONNECTOR_NODE_TYPE, WEAVE_COPY_PASTE_CONFIG_DEFAULT, WEAVE_COPY_PASTE_NODES_KEY, WEAVE_COPY_PASTE_PASTE_CATCHER_ID, WEAVE_COPY_PASTE_PASTE_MODES, WEAVE_DEFAULT_USER_INFO_FUNCTION, WEAVE_ELLIPSE_NODE_TYPE, WEAVE_FRAME_DEFAULT_BACKGROUND_COLOR, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_CONFIG, WEAVE_GRID_DOT_TYPES, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_GROUP_NODE_TYPE, WEAVE_IMAGES_TOOL_ACTION_NAME, WEAVE_IMAGES_TOOL_DEFAULT_CONFIG, WEAVE_IMAGES_TOOL_STATE, WEAVE_IMAGES_TOOL_UPLOAD_TYPE, WEAVE_IMAGE_CROP_ANCHOR_POSITION, WEAVE_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_DEFAULT_CONFIG, WEAVE_IMAGE_NODE_TYPE, WEAVE_IMAGE_TOOL_ACTION_NAME, WEAVE_IMAGE_TOOL_CONFIG_DEFAULT, WEAVE_IMAGE_TOOL_STATE, WEAVE_IMAGE_TOOL_UPLOAD_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_DEFAULT_CONFIG, WEAVE_LINE_NODE_TYPE, WEAVE_MEASURE_NODE_DEFAULT_CONFIG, WEAVE_MEASURE_NODE_TYPE, WEAVE_MEASURE_TOOL_DEFAULT_CONFIG, WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_DEFAULT_CONFIG, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_KEY, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_LAYER_ID, WEAVE_NODES_SELECTION_DEFAULT_CONFIG, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_STAGE_DEFAULT_MODE, WEAVE_STAGE_DROP_AREA_KEY, WEAVE_STAGE_GRID_PLUGIN_KEY, WEAVE_STAGE_IMAGE_CROPPING_MODE, WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG, WEAVE_STAGE_KEYBOARD_MOVE_KEY, WEAVE_STAGE_MINIMAP_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAGE_PANNING_DEFAULT_CONFIG, WEAVE_STAGE_PANNING_KEY, WEAVE_STAGE_PANNING_THROTTLE_MS, WEAVE_STAGE_TEXT_EDITION_MODE, WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, WEAVE_STAGE_ZOOM_KEY, WEAVE_STAGE_ZOOM_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_NODE_TYPE, WEAVE_STROKE_SINGLE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_SINGLE_NODE_TIP_SIDE, WEAVE_STROKE_SINGLE_NODE_TIP_TYPE, WEAVE_STROKE_SINGLE_NODE_TYPE, WEAVE_STROKE_TOOL_ACTION_NAME, WEAVE_STROKE_TOOL_ACTION_NAME_ALIASES, WEAVE_STROKE_TOOL_DEFAULT_CONFIG, WEAVE_STROKE_TOOL_STATE, WEAVE_TEXT_NODE_DEFAULT_CONFIG, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_CONFIG_DEFAULT_PROPS, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_PRESENCE_CONFIG_DEFAULT_PROPS, WEAVE_USERS_PRESENCE_PLUGIN_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTER_KEY, WEAVE_USER_PRESENCE_KEY, WEAVE_USER_SELECTION_KEY, WEAVE_VIDEO_DEFAULT_CONFIG, WEAVE_VIDEO_NODE_TYPE, Weave, WeaveAction, WeaveAlignNodesToolAction, WeaveArrowNode, WeaveArrowToolAction, WeaveBrushToolAction, WeaveCommentNode, WeaveCommentToolAction, WeaveCommentsRendererPlugin, WeaveConnectedUsersPlugin, WeaveConnectorNode, WeaveConnectorToolAction, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveEllipseNode, WeaveEllipseToolAction, WeaveEraserToolAction, WeaveExportNodesToolAction, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToSelectionToolAction, WeaveFrameNode, WeaveFrameToolAction, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveImagesToolAction, WeaveLayerNode, WeaveLineNode, WeaveLineToolAction, WeaveMeasureNode, WeaveMeasureToolAction, WeaveMoveToolAction, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesEdgeSnappingPlugin, WeaveNodesMultiSelectionFeedbackPlugin, WeaveNodesSelectionPlugin, WeavePenToolAction, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRegularPolygonNode, WeaveRegularPolygonToolAction, WeaveRenderer, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageKeyboardMovePlugin, WeaveStageMinimapPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStarNode, WeaveStarToolAction, WeaveStore, WeaveStrokeNode, WeaveStrokeSingleNode, WeaveStrokeToolAction, WeaveTextNode, WeaveTextToolAction, WeaveUsersPointersPlugin, WeaveUsersPresencePlugin, WeaveUsersSelectionPlugin, WeaveVideoNode, WeaveVideoToolAction, WeaveZoomInToolAction, WeaveZoomOutToolAction, canComposite, clearContainerTargets, containerOverCursor, containsNodeDeep, defaultInitialState, downscaleImageFile, downscaleImageFromURL, getBoundingBox, getDownscaleRatio, getExportBoundingBox, getImageSizeFromFile,
|
|
40558
|
+
export { ALIGN_NODES_ALIGN_TO, ALIGN_NODES_TOOL_ACTION_NAME, ALIGN_NODES_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_DEFAULT_CONFIG, BRUSH_TOOL_STATE, CONNECTOR_TOOL_ACTION_NAME, CONNECTOR_TOOL_DEFAULT_CONFIG, CONNECTOR_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_DISTANCE_LINE_DEFAULT_CONFIG, GUIDE_ENTER_SNAPPING_TOLERANCE, GUIDE_EXIT_SNAPPING_TOLERANCE, GUIDE_HORIZONTAL_LINE_NAME, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, GUIDE_VERTICAL_LINE_NAME, LINE_TOOL_ACTION_NAME, LINE_TOOL_DEFAULT_CONFIG, LINE_TOOL_STATE, MEASURE_TOOL_ACTION_NAME, MEASURE_TOOL_STATE, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NODE_SNAP_HORIZONTAL, NODE_SNAP_VERTICAL, PEN_TOOL_ACTION_NAME, PEN_TOOL_STATE, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, REGULAR_POLYGON_TOOL_ACTION_NAME, REGULAR_POLYGON_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, STAGE_MINIMAP_DEFAULT_CONFIG, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, VIDEO_TOOL_ACTION_NAME, VIDEO_TOOL_STATE, WEAVE_ARROW_NODE_TYPE, WEAVE_ARROW_TOOL_ACTION_NAME, WEAVE_ARROW_TOOL_STATE, WEAVE_COMMENTS_RENDERER_KEY, WEAVE_COMMENTS_TOOL_LAYER_ID, WEAVE_COMMENT_CREATE_ACTION, WEAVE_COMMENT_NODE_ACTION, WEAVE_COMMENT_NODE_DEFAULTS, WEAVE_COMMENT_NODE_TYPE, WEAVE_COMMENT_STATUS, WEAVE_COMMENT_TOOL_ACTION_NAME, WEAVE_COMMENT_TOOL_DEFAULT_CONFIG, WEAVE_COMMENT_TOOL_STATE, WEAVE_COMMENT_VIEW_ACTION, WEAVE_CONNECTOR_NODE_ANCHOR_ORIGIN, WEAVE_CONNECTOR_NODE_DECORATOR_TYPE, WEAVE_CONNECTOR_NODE_DEFAULT_CONFIG, WEAVE_CONNECTOR_NODE_LINE_ORIGIN, WEAVE_CONNECTOR_NODE_LINE_TYPE, WEAVE_CONNECTOR_NODE_TYPE, WEAVE_COPY_PASTE_CONFIG_DEFAULT, WEAVE_COPY_PASTE_NODES_KEY, WEAVE_COPY_PASTE_PASTE_CATCHER_ID, WEAVE_COPY_PASTE_PASTE_MODES, WEAVE_DEFAULT_USER_INFO_FUNCTION, WEAVE_ELLIPSE_NODE_TYPE, WEAVE_FRAME_DEFAULT_BACKGROUND_COLOR, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_CONFIG, WEAVE_GRID_DOT_TYPES, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_GROUP_NODE_TYPE, WEAVE_IMAGES_TOOL_ACTION_NAME, WEAVE_IMAGES_TOOL_DEFAULT_CONFIG, WEAVE_IMAGES_TOOL_STATE, WEAVE_IMAGES_TOOL_UPLOAD_TYPE, WEAVE_IMAGE_CROP_ANCHOR_POSITION, WEAVE_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_DEFAULT_CONFIG, WEAVE_IMAGE_NODE_TYPE, WEAVE_IMAGE_TOOL_ACTION_NAME, WEAVE_IMAGE_TOOL_CONFIG_DEFAULT, WEAVE_IMAGE_TOOL_STATE, WEAVE_IMAGE_TOOL_UPLOAD_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_DEFAULT_CONFIG, WEAVE_LINE_NODE_TYPE, WEAVE_MEASURE_NODE_DEFAULT_CONFIG, WEAVE_MEASURE_NODE_TYPE, WEAVE_MEASURE_TOOL_DEFAULT_CONFIG, WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_DEFAULT_CONFIG, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_KEY, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_LAYER_ID, WEAVE_NODES_SELECTION_DEFAULT_CONFIG, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_STAGE_DEFAULT_MODE, WEAVE_STAGE_DROP_AREA_KEY, WEAVE_STAGE_GRID_PLUGIN_KEY, WEAVE_STAGE_IMAGE_CROPPING_MODE, WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG, WEAVE_STAGE_KEYBOARD_MOVE_KEY, WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION, WEAVE_STAGE_MINIMAP_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAGE_PANNING_DEFAULT_CONFIG, WEAVE_STAGE_PANNING_KEY, WEAVE_STAGE_PANNING_THROTTLE_MS, WEAVE_STAGE_TEXT_EDITION_MODE, WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, WEAVE_STAGE_ZOOM_KEY, WEAVE_STAGE_ZOOM_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_NODE_TYPE, WEAVE_STROKE_SINGLE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_SINGLE_NODE_TIP_SIDE, WEAVE_STROKE_SINGLE_NODE_TIP_TYPE, WEAVE_STROKE_SINGLE_NODE_TYPE, WEAVE_STROKE_TOOL_ACTION_NAME, WEAVE_STROKE_TOOL_ACTION_NAME_ALIASES, WEAVE_STROKE_TOOL_DEFAULT_CONFIG, WEAVE_STROKE_TOOL_STATE, WEAVE_TEXT_NODE_DEFAULT_CONFIG, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_CONFIG_DEFAULT_PROPS, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_PRESENCE_CONFIG_DEFAULT_PROPS, WEAVE_USERS_PRESENCE_PLUGIN_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTER_KEY, WEAVE_USER_PRESENCE_KEY, WEAVE_USER_SELECTION_KEY, WEAVE_VIDEO_DEFAULT_CONFIG, WEAVE_VIDEO_NODE_TYPE, Weave, WeaveAction, WeaveAlignNodesToolAction, WeaveArrowNode, WeaveArrowToolAction, WeaveBrushToolAction, WeaveCommentNode, WeaveCommentToolAction, WeaveCommentsRendererPlugin, WeaveConnectedUsersPlugin, WeaveConnectorNode, WeaveConnectorToolAction, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveEllipseNode, WeaveEllipseToolAction, WeaveEraserToolAction, WeaveExportNodesToolAction, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToSelectionToolAction, WeaveFrameNode, WeaveFrameToolAction, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveImagesToolAction, WeaveLayerNode, WeaveLineNode, WeaveLineToolAction, WeaveMeasureNode, WeaveMeasureToolAction, WeaveMoveToolAction, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesEdgeSnappingPlugin, WeaveNodesMultiSelectionFeedbackPlugin, WeaveNodesSelectionPlugin, WeavePenToolAction, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRegularPolygonNode, WeaveRegularPolygonToolAction, WeaveRenderer, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageKeyboardMovePlugin, WeaveStageMinimapPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStarNode, WeaveStarToolAction, WeaveStore, WeaveStrokeNode, WeaveStrokeSingleNode, WeaveStrokeToolAction, WeaveTextNode, WeaveTextToolAction, WeaveUsersPointersPlugin, WeaveUsersPresencePlugin, WeaveUsersSelectionPlugin, WeaveVideoNode, WeaveVideoToolAction, WeaveZoomInToolAction, WeaveZoomOutToolAction, canComposite, clearContainerTargets, containerOverCursor, containsNodeDeep, defaultInitialState, downscaleImageFile, downscaleImageFromURL, getBoundingBox, getDownscaleRatio, getExportBoundingBox, getImageSizeFromFile, getSelectedNodesMetadata, getStageClickPoint, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodes, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isIOS, isInShadowDOM, isNodeInSelection, isServer, loadImageSource, memoize, mergeExceptArrays, moveNodeToContainer, moveNodeToContainerNT, resetScale, setupCanvasBackend, setupSkiaBackend };
|