@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/types.js
CHANGED
|
@@ -15102,6 +15102,9 @@ var WeaveStore = class {
|
|
|
15102
15102
|
getStateJson() {
|
|
15103
15103
|
return JSON.parse(JSON.stringify(this.state, void 0, 2));
|
|
15104
15104
|
}
|
|
15105
|
+
getRoomId() {
|
|
15106
|
+
return this.roomId;
|
|
15107
|
+
}
|
|
15105
15108
|
getStateSnapshot() {
|
|
15106
15109
|
const doc = this.getDocument();
|
|
15107
15110
|
return yjs_default.encodeStateAsUpdate(doc);
|
|
@@ -17676,19 +17679,20 @@ function moveNodeToContainerNT(instance, node, containerToMove, originalNode, or
|
|
|
17676
17679
|
node.rotation(nodeRotation);
|
|
17677
17680
|
node.x(node.x() - (layerToMoveAttrs.containerOffsetX ?? 0));
|
|
17678
17681
|
node.y(node.y() - (layerToMoveAttrs.containerOffsetY ?? 0));
|
|
17679
|
-
node.
|
|
17682
|
+
node.destroy();
|
|
17683
|
+
const newNode = node.clone();
|
|
17680
17684
|
instance.emitEvent("onNodeMovedToContainer", {
|
|
17681
|
-
node:
|
|
17685
|
+
node: newNode,
|
|
17682
17686
|
container: layerToMove,
|
|
17683
17687
|
originalNode,
|
|
17684
17688
|
originalContainer
|
|
17685
17689
|
});
|
|
17686
17690
|
const nodeHandler = instance.getNodeHandler(node.getAttrs().nodeType);
|
|
17687
17691
|
if (nodeHandler) {
|
|
17688
|
-
|
|
17689
|
-
const
|
|
17690
|
-
instance.removeNodeNT(
|
|
17691
|
-
instance.addNodeNT(
|
|
17692
|
+
const actualNodeState = nodeHandler.serialize(node);
|
|
17693
|
+
const newNodeState = nodeHandler.serialize(newNode);
|
|
17694
|
+
instance.removeNodeNT(actualNodeState, { emitUserChangeEvent: false });
|
|
17695
|
+
instance.addNodeNT(newNodeState, layerToMoveAttrs.id, {
|
|
17692
17696
|
emitUserChangeEvent: false,
|
|
17693
17697
|
overrideUserChangeType: WEAVE_NODE_CHANGE_TYPE.UPDATE
|
|
17694
17698
|
});
|
|
@@ -17917,17 +17921,6 @@ function isIOS() {
|
|
|
17917
17921
|
return /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
|
|
17918
17922
|
}
|
|
17919
17923
|
const isServer = () => typeof window === "undefined";
|
|
17920
|
-
const getPositionRelativeToContainerOnPosition = (instance) => {
|
|
17921
|
-
let position = instance.getStage().getRelativePointerPosition();
|
|
17922
|
-
if (!position) return position;
|
|
17923
|
-
const container = containerOverCursor(instance, [], position);
|
|
17924
|
-
if (container) if (container.getAttrs().containerId) {
|
|
17925
|
-
const containerNode = container.findOne(`#${container.getAttrs().containerId}`);
|
|
17926
|
-
if (containerNode) position = containerNode?.getRelativePointerPosition();
|
|
17927
|
-
} else position = container?.getRelativePointerPosition();
|
|
17928
|
-
if (!position) return position;
|
|
17929
|
-
return position;
|
|
17930
|
-
};
|
|
17931
17924
|
const canComposite = (node) => {
|
|
17932
17925
|
const parent = node.getParent();
|
|
17933
17926
|
return parent?.getClassName() === "Group" && parent?.getAttrs().nodeType !== "frame" && parent?.getAttrs().nodeId === void 0;
|
|
@@ -18678,7 +18671,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18678
18671
|
"bottom-right"
|
|
18679
18672
|
];
|
|
18680
18673
|
this.taps = 0;
|
|
18681
|
-
this.isCtrlMetaPressed = false;
|
|
18682
18674
|
this.isSpaceKeyPressed = false;
|
|
18683
18675
|
this.isDoubleTap = false;
|
|
18684
18676
|
this.tapStart = null;
|
|
@@ -18778,12 +18770,12 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18778
18770
|
}
|
|
18779
18771
|
};
|
|
18780
18772
|
stage.on("pointermove", (0, import_throttle.default)(handlePointerMoveInit, DEFAULT_THROTTLE_MS));
|
|
18781
|
-
tr.on("transformstart", () => {
|
|
18773
|
+
tr.on("transformstart", (e) => {
|
|
18782
18774
|
this.transformInProcess = true;
|
|
18783
18775
|
this.triggerSelectedNodesEvent();
|
|
18784
18776
|
const selectedNodes$1 = tr.nodes();
|
|
18785
18777
|
for (const node of selectedNodes$1) {
|
|
18786
|
-
node.handleMouseout();
|
|
18778
|
+
node.handleMouseout(e);
|
|
18787
18779
|
if (node.getAttrs().strokeScaleEnabled !== false) {
|
|
18788
18780
|
node.setAttr("strokeScaleEnabled", false);
|
|
18789
18781
|
node.setAttr("_revertStrokeScaleEnabled", true);
|
|
@@ -18795,7 +18787,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18795
18787
|
});
|
|
18796
18788
|
});
|
|
18797
18789
|
let nodeHovered = void 0;
|
|
18798
|
-
tr.on("mousemove", () => {
|
|
18790
|
+
tr.on("mousemove", (e) => {
|
|
18799
18791
|
if (this.dragInProcess) return;
|
|
18800
18792
|
const pointerPos = stage.getPointerPosition();
|
|
18801
18793
|
if (!pointerPos) return;
|
|
@@ -18805,13 +18797,13 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18805
18797
|
if (shape) {
|
|
18806
18798
|
const targetNode = this.instance.getInstanceRecursive(shape);
|
|
18807
18799
|
if (targetNode && targetNode !== nodeHovered) {
|
|
18808
|
-
this.instance.getStage().handleMouseover();
|
|
18809
|
-
nodeHovered?.handleMouseout?.();
|
|
18810
|
-
targetNode?.handleMouseover?.();
|
|
18800
|
+
this.instance.getStage().handleMouseover(e);
|
|
18801
|
+
nodeHovered?.handleMouseout?.(e);
|
|
18802
|
+
targetNode?.handleMouseover?.(e);
|
|
18811
18803
|
nodeHovered = targetNode;
|
|
18812
18804
|
}
|
|
18813
|
-
targetNode?.handleMouseover?.();
|
|
18814
|
-
} else nodeHovered?.handleMouseout?.();
|
|
18805
|
+
targetNode?.handleMouseover?.(e);
|
|
18806
|
+
} else nodeHovered?.handleMouseout?.(e);
|
|
18815
18807
|
});
|
|
18816
18808
|
tr.on("mouseover", () => {
|
|
18817
18809
|
const nodesSelected = tr.nodes();
|
|
@@ -18820,32 +18812,37 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18820
18812
|
stage.container().style.cursor = node.defineMousePointer() ?? "grab";
|
|
18821
18813
|
} else stage.container().style.cursor = "grab";
|
|
18822
18814
|
});
|
|
18823
|
-
tr.on("mouseout", () => {
|
|
18824
|
-
this.instance.getStage().handleMouseover?.();
|
|
18815
|
+
tr.on("mouseout", (e) => {
|
|
18816
|
+
this.instance.getStage().handleMouseover?.(e);
|
|
18825
18817
|
nodeHovered = void 0;
|
|
18826
18818
|
});
|
|
18827
|
-
window.addEventListener("mouseout", () => {
|
|
18819
|
+
window.addEventListener("mouseout", (e) => {
|
|
18828
18820
|
if (nodeHovered) {
|
|
18829
|
-
nodeHovered.handleMouseout();
|
|
18821
|
+
nodeHovered.handleMouseout(e);
|
|
18830
18822
|
nodeHovered = void 0;
|
|
18831
18823
|
}
|
|
18832
|
-
this.instance.getStage().handleMouseover?.();
|
|
18824
|
+
this.instance.getStage().handleMouseover?.(e);
|
|
18833
18825
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
18834
18826
|
const handleTransform = (e) => {
|
|
18835
18827
|
const moved = this.checkMoved(e);
|
|
18836
18828
|
if (moved) this.getContextMenuPlugin()?.cancelLongPressTimer();
|
|
18837
18829
|
this.triggerSelectedNodesEvent();
|
|
18838
18830
|
if (this.getUsersPresencePlugin()) {
|
|
18839
|
-
for (const node of tr.nodes())
|
|
18840
|
-
|
|
18841
|
-
|
|
18842
|
-
|
|
18843
|
-
|
|
18844
|
-
|
|
18845
|
-
|
|
18846
|
-
|
|
18847
|
-
|
|
18848
|
-
|
|
18831
|
+
for (const node of tr.nodes()) {
|
|
18832
|
+
let parentId = node.getParent()?.id() ?? "";
|
|
18833
|
+
const parent = node.getParent();
|
|
18834
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
18835
|
+
this.getUsersPresencePlugin()?.setPresence(node.id(), parentId, {
|
|
18836
|
+
x: node.x(),
|
|
18837
|
+
y: node.y(),
|
|
18838
|
+
width: node.width(),
|
|
18839
|
+
height: node.height(),
|
|
18840
|
+
scaleX: node.scaleX(),
|
|
18841
|
+
scaleY: node.scaleY(),
|
|
18842
|
+
rotation: node.rotation(),
|
|
18843
|
+
strokeScaleEnabled: false
|
|
18844
|
+
}, false);
|
|
18845
|
+
}
|
|
18849
18846
|
this.getUsersPresencePlugin()?.forceSendPresence();
|
|
18850
18847
|
}
|
|
18851
18848
|
};
|
|
@@ -18869,6 +18866,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18869
18866
|
let selectedNodes = [];
|
|
18870
18867
|
tr.on("dragstart", (e) => {
|
|
18871
18868
|
this.dragInProcess = true;
|
|
18869
|
+
let isWheelMousePressed = false;
|
|
18870
|
+
if (e.evt.button === 1) isWheelMousePressed = true;
|
|
18872
18871
|
const mainLayer = this.instance.getMainLayer();
|
|
18873
18872
|
if (!mainLayer) return;
|
|
18874
18873
|
initialPos = {
|
|
@@ -18880,7 +18879,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18880
18879
|
this.saveDragSelectedNodes();
|
|
18881
18880
|
if (this.getDragSelectedNodes().length > 1) this.setNodesOpacityOnDrag();
|
|
18882
18881
|
selectedNodes = tr.nodes();
|
|
18883
|
-
if (
|
|
18882
|
+
if (isWheelMousePressed) {
|
|
18884
18883
|
e.cancelBubble = true;
|
|
18885
18884
|
e.target.stopDrag();
|
|
18886
18885
|
return;
|
|
@@ -18904,13 +18903,14 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18904
18903
|
x: e.target.x(),
|
|
18905
18904
|
y: e.target.y()
|
|
18906
18905
|
};
|
|
18906
|
+
let isWheelMousePressed = false;
|
|
18907
|
+
if (e.evt.button === 1) isWheelMousePressed = true;
|
|
18907
18908
|
e.cancelBubble = true;
|
|
18908
18909
|
if (initialPos) {
|
|
18909
18910
|
const moved = this.checkMovedDrag(initialPos, actualPos);
|
|
18910
18911
|
if (moved) this.getContextMenuPlugin()?.cancelLongPressTimer();
|
|
18911
18912
|
}
|
|
18912
|
-
|
|
18913
|
-
if (stage$1.isMouseWheelPressed()) {
|
|
18913
|
+
if (isWheelMousePressed) {
|
|
18914
18914
|
e.cancelBubble = true;
|
|
18915
18915
|
e.target.stopDrag();
|
|
18916
18916
|
return;
|
|
@@ -18930,10 +18930,15 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18930
18930
|
clearContainerTargets(this.instance);
|
|
18931
18931
|
const layerToMove = containerOverCursor(this.instance, selectedNodes);
|
|
18932
18932
|
if (this.getUsersPresencePlugin() && this.dragInProcess) {
|
|
18933
|
-
for (const node of selectedNodes)
|
|
18934
|
-
|
|
18935
|
-
|
|
18936
|
-
|
|
18933
|
+
for (const node of selectedNodes) {
|
|
18934
|
+
let parentId = node.getParent()?.id() ?? "";
|
|
18935
|
+
const parent = node.getParent();
|
|
18936
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
18937
|
+
this.getUsersPresencePlugin()?.setPresence(node.id(), parentId, {
|
|
18938
|
+
x: node.x(),
|
|
18939
|
+
y: node.y()
|
|
18940
|
+
}, false);
|
|
18941
|
+
}
|
|
18937
18942
|
this.getUsersPresencePlugin()?.forceSendPresence();
|
|
18938
18943
|
}
|
|
18939
18944
|
if (layerToMove && !selectionContainsFrames) layerToMove.fire(WEAVE_NODE_CUSTOM_EVENTS.onTargetEnter, { bubbles: true });
|
|
@@ -19020,16 +19025,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19020
19025
|
tr.forceUpdate();
|
|
19021
19026
|
}
|
|
19022
19027
|
});
|
|
19023
|
-
this.instance.addEventListener("onRender", () => {
|
|
19024
|
-
const point = stage.getPointerPosition();
|
|
19025
|
-
if (point) {
|
|
19026
|
-
const ele = this.instance.getTargetingManager().pointIntersectsElement(point);
|
|
19027
|
-
if (ele) {
|
|
19028
|
-
const realEle = this.instance.getTargetingManager().resolveNode(ele);
|
|
19029
|
-
realEle?.handleMouseover();
|
|
19030
|
-
}
|
|
19031
|
-
}
|
|
19032
|
-
});
|
|
19033
19028
|
this.instance.addEventListener("onNodesChange", () => {
|
|
19034
19029
|
const currentSelectedNodes = tr.nodes();
|
|
19035
19030
|
const unselectedNodes = this.prevSelectedNodes.filter((node) => !currentSelectedNodes.map((node1) => node1.getAttrs().id).includes(node.getAttrs().id));
|
|
@@ -19236,12 +19231,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19236
19231
|
initEvents() {
|
|
19237
19232
|
this.selecting = false;
|
|
19238
19233
|
const stage = this.instance.getStage();
|
|
19239
|
-
window.addEventListener("blur", () => {
|
|
19240
|
-
this.isCtrlMetaPressed = false;
|
|
19241
|
-
this.isSpaceKeyPressed = false;
|
|
19242
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
19243
19234
|
stage.container().addEventListener("keydown", (e) => {
|
|
19244
|
-
if (e.ctrlKey || e.metaKey) this.isCtrlMetaPressed = true;
|
|
19245
19235
|
if (e.code === "Space") this.isSpaceKeyPressed = true;
|
|
19246
19236
|
if (e.code === "Backspace" || e.code === "Delete") {
|
|
19247
19237
|
Promise.resolve().then(() => {
|
|
@@ -19251,7 +19241,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19251
19241
|
}
|
|
19252
19242
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
19253
19243
|
stage.container().addEventListener("keyup", (e) => {
|
|
19254
|
-
if (!(e.ctrlKey || e.metaKey)) this.isCtrlMetaPressed = false;
|
|
19255
19244
|
if (e.code === "Space") this.isSpaceKeyPressed = false;
|
|
19256
19245
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
19257
19246
|
stage.on("pointerdown", (e) => {
|
|
@@ -19303,7 +19292,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19303
19292
|
this.selectionRectangle.width(0);
|
|
19304
19293
|
this.selectionRectangle.height(0);
|
|
19305
19294
|
this.selecting = true;
|
|
19306
|
-
|
|
19295
|
+
const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
|
|
19296
|
+
if (isCtrlOrMetaPressed) {
|
|
19307
19297
|
const nodesSelected = this.tr.nodes();
|
|
19308
19298
|
for (const node of nodesSelected) node.fire("onSelectionCleared", { bubbles: true });
|
|
19309
19299
|
}
|
|
@@ -19523,7 +19513,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19523
19513
|
nodeTargeted.dblClick();
|
|
19524
19514
|
return;
|
|
19525
19515
|
}
|
|
19526
|
-
|
|
19516
|
+
const isCtrlOrCmdPressed = e.evt.ctrlKey || e.evt.metaKey;
|
|
19517
|
+
if (isCtrlOrCmdPressed) return;
|
|
19527
19518
|
if (!metaPressed) {
|
|
19528
19519
|
this.tr.nodes([nodeTargeted]);
|
|
19529
19520
|
this.tr.show();
|
|
@@ -20165,11 +20156,6 @@ const MOVE_TOOL_STATE = {
|
|
|
20165
20156
|
|
|
20166
20157
|
//#endregion
|
|
20167
20158
|
//#region src/nodes/node.ts
|
|
20168
|
-
const augmentKonvaStageClass = () => {
|
|
20169
|
-
Konva.Stage.prototype.isMouseWheelPressed = function() {
|
|
20170
|
-
return false;
|
|
20171
|
-
};
|
|
20172
|
-
};
|
|
20173
20159
|
const augmentKonvaNodeClass = (config) => {
|
|
20174
20160
|
const { transform } = config ?? {};
|
|
20175
20161
|
Konva.Node.prototype.getTransformerProperties = function() {
|
|
@@ -20181,7 +20167,6 @@ const augmentKonvaNodeClass = (config) => {
|
|
|
20181
20167
|
Konva.Node.prototype.getRealClientRect = function(config$1) {
|
|
20182
20168
|
return this.getClientRect(config$1);
|
|
20183
20169
|
};
|
|
20184
|
-
Konva.Node.prototype.movedToContainer = function() {};
|
|
20185
20170
|
Konva.Node.prototype.updatePosition = function() {};
|
|
20186
20171
|
Konva.Node.prototype.triggerCrop = function() {};
|
|
20187
20172
|
Konva.Node.prototype.closeCrop = function() {};
|
|
@@ -20231,7 +20216,6 @@ var WeaveNode = class {
|
|
|
20231
20216
|
"bottom-right"
|
|
20232
20217
|
];
|
|
20233
20218
|
};
|
|
20234
|
-
node.movedToContainer = function() {};
|
|
20235
20219
|
node.updatePosition = function() {};
|
|
20236
20220
|
node.resetCrop = function() {};
|
|
20237
20221
|
node.handleMouseover = function() {};
|
|
@@ -20420,7 +20404,10 @@ var WeaveNode = class {
|
|
|
20420
20404
|
const nodesEdgeSnappingPlugin = this.getNodesEdgeSnappingPlugin();
|
|
20421
20405
|
if (nodesSelectionPlugin && this.isSelecting() && this.isNodeSelected(node$1)) nodesSelectionPlugin.getTransformer().forceUpdate();
|
|
20422
20406
|
if (nodesEdgeSnappingPlugin && transforming && this.isSelecting() && this.isNodeSelected(node$1)) nodesEdgeSnappingPlugin.evaluateGuidelines(e);
|
|
20423
|
-
|
|
20407
|
+
let parentId = node$1.getParent()?.id() ?? "";
|
|
20408
|
+
const parent = node$1.getParent();
|
|
20409
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
20410
|
+
this.getUsersPresencePlugin()?.setPresence(node$1.id(), parentId, {
|
|
20424
20411
|
x: node$1.x(),
|
|
20425
20412
|
y: node$1.y(),
|
|
20426
20413
|
width: node$1.width(),
|
|
@@ -20476,6 +20463,8 @@ var WeaveNode = class {
|
|
|
20476
20463
|
node.off("dragstart");
|
|
20477
20464
|
node.on("dragstart", (e) => {
|
|
20478
20465
|
const nodeTarget = e.target;
|
|
20466
|
+
let isWheelMousePressed = false;
|
|
20467
|
+
if (e.evt.button === 1) isWheelMousePressed = true;
|
|
20479
20468
|
e.cancelBubble = true;
|
|
20480
20469
|
this.getNodesSelectionFeedbackPlugin()?.hideSelectionHalo(nodeTarget);
|
|
20481
20470
|
this.getSelectionPlugin()?.saveDragSelectedNodes();
|
|
@@ -20496,7 +20485,7 @@ var WeaveNode = class {
|
|
|
20496
20485
|
return;
|
|
20497
20486
|
}
|
|
20498
20487
|
this.instance.emitEvent("onDrag", nodeTarget);
|
|
20499
|
-
if (
|
|
20488
|
+
if (isWheelMousePressed) {
|
|
20500
20489
|
e.cancelBubble = true;
|
|
20501
20490
|
nodeTarget.stopDrag();
|
|
20502
20491
|
}
|
|
@@ -20513,6 +20502,7 @@ var WeaveNode = class {
|
|
|
20513
20502
|
originalNode = realNodeTarget.clone();
|
|
20514
20503
|
originalContainer = realNodeTarget.getParent();
|
|
20515
20504
|
if (originalContainer?.getAttrs().nodeId) originalContainer = stage.findOne(`#${originalContainer.getAttrs().nodeId}`);
|
|
20505
|
+
realNodeTarget.fire("nodeDragStart", { node: realNodeTarget });
|
|
20516
20506
|
if (e.evt?.altKey) {
|
|
20517
20507
|
nodeTarget.setAttrs({ isCloneOrigin: true });
|
|
20518
20508
|
nodeTarget.setAttrs({ isCloned: false });
|
|
@@ -20541,19 +20531,20 @@ var WeaveNode = class {
|
|
|
20541
20531
|
});
|
|
20542
20532
|
const handleDragMove = (e) => {
|
|
20543
20533
|
const nodeTarget = e.target;
|
|
20534
|
+
let isWheelMousePressed = false;
|
|
20535
|
+
if (e.evt.button === 1) isWheelMousePressed = true;
|
|
20544
20536
|
e.cancelBubble = true;
|
|
20545
20537
|
if (e.evt?.buttons === 0) {
|
|
20546
20538
|
nodeTarget.stopDrag();
|
|
20547
20539
|
return;
|
|
20548
20540
|
}
|
|
20549
20541
|
this.didMove = true;
|
|
20550
|
-
const stage$1 = this.instance.getStage();
|
|
20551
20542
|
const isErasing = this.instance.getActiveAction() === "eraseTool";
|
|
20552
20543
|
if (isErasing) {
|
|
20553
20544
|
nodeTarget.stopDrag();
|
|
20554
20545
|
return;
|
|
20555
20546
|
}
|
|
20556
|
-
if (
|
|
20547
|
+
if (isWheelMousePressed) {
|
|
20557
20548
|
e.cancelBubble = true;
|
|
20558
20549
|
nodeTarget.stopDrag();
|
|
20559
20550
|
return;
|
|
@@ -20568,7 +20559,10 @@ var WeaveNode = class {
|
|
|
20568
20559
|
}
|
|
20569
20560
|
if (this.isSelecting() && this.getSelectionPlugin()?.getSelectedNodes().length === 1) {
|
|
20570
20561
|
clearContainerTargets(this.instance);
|
|
20571
|
-
|
|
20562
|
+
let parentId = realNodeTarget.getParent()?.id() ?? "";
|
|
20563
|
+
const parent = realNodeTarget.getParent();
|
|
20564
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
20565
|
+
this.getUsersPresencePlugin()?.setPresence(realNodeTarget.id(), parentId, {
|
|
20572
20566
|
x: realNodeTarget.x(),
|
|
20573
20567
|
y: realNodeTarget.y()
|
|
20574
20568
|
});
|
|
@@ -20667,11 +20661,11 @@ var WeaveNode = class {
|
|
|
20667
20661
|
originalPosition = realNodeTarget.getAbsolutePosition();
|
|
20668
20662
|
});
|
|
20669
20663
|
if (!node.getAttrs().overridesMouseControl) {
|
|
20670
|
-
node.handleMouseover = () => {
|
|
20671
|
-
this.handleMouseOver(node);
|
|
20664
|
+
node.handleMouseover = (e) => {
|
|
20665
|
+
this.handleMouseOver(e, node);
|
|
20672
20666
|
};
|
|
20673
|
-
node.handleMouseout = () => {
|
|
20674
|
-
this.handleMouseout(node);
|
|
20667
|
+
node.handleMouseout = (e) => {
|
|
20668
|
+
this.handleMouseout(e, node);
|
|
20675
20669
|
};
|
|
20676
20670
|
}
|
|
20677
20671
|
node.on("xChange yChange", () => {
|
|
@@ -20699,20 +20693,21 @@ var WeaveNode = class {
|
|
|
20699
20693
|
};
|
|
20700
20694
|
node.on("pointerover", (e) => {
|
|
20701
20695
|
const realNodeTarget = this.getRealSelectedNode(e.target);
|
|
20702
|
-
realNodeTarget?.handleMouseover?.();
|
|
20703
|
-
const doCancelBubble = this.handleMouseOver(e.target);
|
|
20696
|
+
realNodeTarget?.handleMouseover?.(e);
|
|
20697
|
+
const doCancelBubble = this.handleMouseOver(e, e.target);
|
|
20704
20698
|
if (doCancelBubble) e.cancelBubble = true;
|
|
20705
20699
|
});
|
|
20706
20700
|
node.on("pointerleave", (e) => {
|
|
20707
20701
|
const realNodeTarget = this.getRealSelectedNode(e.target);
|
|
20708
|
-
realNodeTarget?.handleMouseout?.();
|
|
20709
|
-
this.handleMouseout(e.target);
|
|
20702
|
+
realNodeTarget?.handleMouseout?.(e);
|
|
20703
|
+
this.handleMouseout(e, e.target);
|
|
20710
20704
|
});
|
|
20711
20705
|
}
|
|
20712
20706
|
}
|
|
20713
|
-
handleMouseOver(node) {
|
|
20707
|
+
handleMouseOver(e, node) {
|
|
20714
20708
|
const stage = this.instance.getStage();
|
|
20715
|
-
|
|
20709
|
+
const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
|
|
20710
|
+
if (isCtrlOrMetaPressed) return false;
|
|
20716
20711
|
const user = this.instance.getStore().getUser();
|
|
20717
20712
|
const activeAction = this.instance.getActiveAction();
|
|
20718
20713
|
const isNodeSelectionEnabled = this.getSelectionPlugin()?.isEnabled();
|
|
@@ -20746,9 +20741,9 @@ var WeaveNode = class {
|
|
|
20746
20741
|
else this.hideHoverState();
|
|
20747
20742
|
return cancelBubble;
|
|
20748
20743
|
}
|
|
20749
|
-
handleMouseout(node) {
|
|
20750
|
-
const
|
|
20751
|
-
if (
|
|
20744
|
+
handleMouseout(e, node) {
|
|
20745
|
+
const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
|
|
20746
|
+
if (isCtrlOrMetaPressed) return;
|
|
20752
20747
|
const realNode = this.instance.getInstanceRecursive(node);
|
|
20753
20748
|
if (realNode) this.hideHoverState();
|
|
20754
20749
|
}
|
|
@@ -20780,7 +20775,6 @@ var WeaveNode = class {
|
|
|
20780
20775
|
delete cleanedAttrs.mutexUserId;
|
|
20781
20776
|
delete cleanedAttrs.draggable;
|
|
20782
20777
|
delete cleanedAttrs.overridesMouseControl;
|
|
20783
|
-
delete cleanedAttrs.onMoveContainer;
|
|
20784
20778
|
delete cleanedAttrs.dragBoundFunc;
|
|
20785
20779
|
return {
|
|
20786
20780
|
key: attrs.id ?? "",
|
|
@@ -21406,45 +21400,23 @@ var WeaveTargetingManager = class {
|
|
|
21406
21400
|
}
|
|
21407
21401
|
getMousePointer(point) {
|
|
21408
21402
|
this.logger.debug({ point }, "getMousePointer");
|
|
21409
|
-
const stage = this.instance.getStage();
|
|
21410
21403
|
const mainLayer = this.instance.getMainLayer();
|
|
21411
21404
|
let relativeMousePointer = typeof point !== "undefined" ? point : mainLayer?.getRelativePointerPosition() ?? {
|
|
21412
21405
|
x: 0,
|
|
21413
21406
|
y: 0
|
|
21414
21407
|
};
|
|
21415
|
-
let measureContainer = mainLayer;
|
|
21416
|
-
let container = mainLayer;
|
|
21417
21408
|
const utilityLayer = this.instance.getUtilityLayer();
|
|
21418
21409
|
if (utilityLayer) utilityLayer.visible(false);
|
|
21410
|
+
const containerAlt = containerOverCursor(this.instance, [], relativeMousePointer);
|
|
21419
21411
|
const nodesSelection = this.instance.getPlugin("nodesSelection");
|
|
21420
21412
|
if (nodesSelection) nodesSelection.getTransformer().visible(false);
|
|
21421
|
-
|
|
21422
|
-
width: 10,
|
|
21423
|
-
height: 10,
|
|
21424
|
-
x: relativeMousePointer.x,
|
|
21425
|
-
y: relativeMousePointer.y
|
|
21426
|
-
});
|
|
21427
|
-
mainLayer?.add(dummyRect);
|
|
21428
|
-
const intersectedNode = this.nodeIntersectsContainerElement(dummyRect);
|
|
21429
|
-
if (intersectedNode) {
|
|
21430
|
-
const containerOfNode = stage.findOne(`#${intersectedNode.getAttrs().containerId}`);
|
|
21431
|
-
if (containerOfNode) {
|
|
21432
|
-
container = intersectedNode;
|
|
21433
|
-
measureContainer = containerOfNode;
|
|
21434
|
-
}
|
|
21435
|
-
}
|
|
21436
|
-
if (typeof point === "undefined" && container?.getAttrs().nodeType !== "layer") relativeMousePointer = measureContainer?.getRelativePointerPosition() ?? relativeMousePointer;
|
|
21437
|
-
if (typeof point === "undefined" && container?.getAttrs().nodeType === "layer") relativeMousePointer = measureContainer?.getRelativePointerPosition() ?? {
|
|
21438
|
-
x: 0,
|
|
21439
|
-
y: 0
|
|
21440
|
-
};
|
|
21413
|
+
relativeMousePointer = containerAlt?.getRelativePointerPosition() ?? relativeMousePointer;
|
|
21441
21414
|
if (utilityLayer) utilityLayer.visible(true);
|
|
21442
21415
|
if (nodesSelection) nodesSelection.getTransformer().visible(true);
|
|
21443
|
-
dummyRect.destroy();
|
|
21444
21416
|
return {
|
|
21445
21417
|
mousePoint: relativeMousePointer,
|
|
21446
|
-
container,
|
|
21447
|
-
measureContainer
|
|
21418
|
+
container: containerAlt,
|
|
21419
|
+
measureContainer: containerAlt
|
|
21448
21420
|
};
|
|
21449
21421
|
}
|
|
21450
21422
|
getMousePointerRelativeToContainer(container) {
|
|
@@ -22033,7 +22005,7 @@ var WeaveRegisterManager = class {
|
|
|
22033
22005
|
|
|
22034
22006
|
//#endregion
|
|
22035
22007
|
//#region package.json
|
|
22036
|
-
var version = "3.
|
|
22008
|
+
var version = "3.9.0-SNAPSHOT.172.1";
|
|
22037
22009
|
|
|
22038
22010
|
//#endregion
|
|
22039
22011
|
//#region src/managers/setup.ts
|
|
@@ -23473,13 +23445,12 @@ var Weave = class {
|
|
|
23473
23445
|
this.moduleLogger.info("Start instance");
|
|
23474
23446
|
if (!this.isServerSide()) {
|
|
23475
23447
|
this.eventsController = new AbortController();
|
|
23476
|
-
|
|
23448
|
+
window.weave = this;
|
|
23477
23449
|
}
|
|
23478
23450
|
this.emitEvent("onRoomLoaded", false);
|
|
23479
23451
|
this.status = WEAVE_INSTANCE_STATUS.STARTING;
|
|
23480
23452
|
this.emitEvent("onInstanceStatus", this.status);
|
|
23481
23453
|
await this.registerManager.registerNodesHandlers();
|
|
23482
|
-
this.augmentKonvaStageClass();
|
|
23483
23454
|
this.augmentKonvaNodeClass();
|
|
23484
23455
|
this.registerManager.registerPlugins();
|
|
23485
23456
|
this.registerManager.registerActionsHandlers();
|
|
@@ -23551,9 +23522,6 @@ var Weave = class {
|
|
|
23551
23522
|
getConfiguration() {
|
|
23552
23523
|
return this.config;
|
|
23553
23524
|
}
|
|
23554
|
-
augmentKonvaStageClass() {
|
|
23555
|
-
augmentKonvaStageClass();
|
|
23556
|
-
}
|
|
23557
23525
|
augmentKonvaNodeClass(config) {
|
|
23558
23526
|
augmentKonvaNodeClass(config);
|
|
23559
23527
|
}
|
|
@@ -24326,8 +24294,6 @@ const setupUpscaleStage = (instance, stage) => {
|
|
|
24326
24294
|
var WeaveStageNode = class extends WeaveNode {
|
|
24327
24295
|
nodeType = WEAVE_STAGE_NODE_TYPE;
|
|
24328
24296
|
stageFocused = false;
|
|
24329
|
-
wheelMousePressed = false;
|
|
24330
|
-
isCmdCtrlPressed = false;
|
|
24331
24297
|
globalEventsInitialized = false;
|
|
24332
24298
|
initialize = void 0;
|
|
24333
24299
|
onRender(props) {
|
|
@@ -24336,9 +24302,7 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24336
24302
|
mode: "default"
|
|
24337
24303
|
});
|
|
24338
24304
|
setupUpscaleStage(this.instance, stage);
|
|
24339
|
-
this.wheelMousePressed = false;
|
|
24340
24305
|
stage.isFocused = () => this.stageFocused;
|
|
24341
|
-
stage.isMouseWheelPressed = () => this.wheelMousePressed;
|
|
24342
24306
|
stage.position({
|
|
24343
24307
|
x: 0,
|
|
24344
24308
|
y: 0
|
|
@@ -24374,8 +24338,7 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24374
24338
|
};
|
|
24375
24339
|
stage.handleMouseout = function() {};
|
|
24376
24340
|
stage.mode(WEAVE_STAGE_DEFAULT_MODE);
|
|
24377
|
-
stage.on("pointerdown", (
|
|
24378
|
-
if (e.evt.button === 1) this.wheelMousePressed = true;
|
|
24341
|
+
stage.on("pointerdown", () => {
|
|
24379
24342
|
if (!this.instance.isServerSide() && [MOVE_TOOL_ACTION_NAME].includes(this.instance.getActiveAction() ?? "")) stage.container().style.cursor = "grabbing";
|
|
24380
24343
|
});
|
|
24381
24344
|
stage.on("pointermove", (e) => {
|
|
@@ -24389,9 +24352,8 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24389
24352
|
stage$1.container().style.cursor = "default";
|
|
24390
24353
|
}
|
|
24391
24354
|
});
|
|
24392
|
-
stage.on("pointerup", (
|
|
24355
|
+
stage.on("pointerup", () => {
|
|
24393
24356
|
const activeAction = this.instance.getActiveAction();
|
|
24394
|
-
if (e.evt.button === 1) this.wheelMousePressed = false;
|
|
24395
24357
|
if (!this.instance.isServerSide() && [MOVE_TOOL_ACTION_NAME].includes(activeAction ?? "")) stage.container().style.cursor = "grab";
|
|
24396
24358
|
});
|
|
24397
24359
|
stage.on("pointerover", (e) => {
|
|
@@ -24403,7 +24365,6 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24403
24365
|
this.hideHoverState();
|
|
24404
24366
|
if (!this.instance.isServerSide()) stage.container().style.cursor = "default";
|
|
24405
24367
|
});
|
|
24406
|
-
stage.isCmdCtrlPressed = () => this.isCmdCtrlPressed;
|
|
24407
24368
|
this.setupEvents();
|
|
24408
24369
|
return stage;
|
|
24409
24370
|
}
|
|
@@ -24411,12 +24372,8 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24411
24372
|
setupEvents() {
|
|
24412
24373
|
if (this.globalEventsInitialized) return;
|
|
24413
24374
|
if (this.instance.isServerSide()) return;
|
|
24414
|
-
window.addEventListener("blur", () => {
|
|
24415
|
-
this.isCmdCtrlPressed = false;
|
|
24416
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
24417
24375
|
window.addEventListener("keydown", (e) => {
|
|
24418
24376
|
if (this.isOnlyCtrlOrMeta(e)) {
|
|
24419
|
-
this.isCmdCtrlPressed = true;
|
|
24420
24377
|
this.instance.getStage().container().style.cursor = "default";
|
|
24421
24378
|
const transformer = this.getSelectionPlugin()?.getTransformer();
|
|
24422
24379
|
if (!transformer) return;
|
|
@@ -24427,7 +24384,6 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24427
24384
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
24428
24385
|
window.addEventListener("keyup", (e) => {
|
|
24429
24386
|
if (!(e.ctrlKey || e.metaKey)) {
|
|
24430
|
-
this.isCmdCtrlPressed = false;
|
|
24431
24387
|
this.instance.getStage().container().style.cursor = "default";
|
|
24432
24388
|
const transformer = this.getSelectionPlugin()?.getTransformer();
|
|
24433
24389
|
if (!transformer) return;
|
|
@@ -24480,7 +24436,6 @@ var WeaveLayerNode = class extends WeaveNode {
|
|
|
24480
24436
|
delete cleanedAttrs.mutexUserId;
|
|
24481
24437
|
delete cleanedAttrs.draggable;
|
|
24482
24438
|
delete cleanedAttrs.overridesMouseControl;
|
|
24483
|
-
delete cleanedAttrs.onMoveContainer;
|
|
24484
24439
|
delete cleanedAttrs.dragBoundFunc;
|
|
24485
24440
|
return {
|
|
24486
24441
|
key: attrs.id ?? "",
|
|
@@ -24565,7 +24520,6 @@ var WeaveGroupNode = class extends WeaveNode {
|
|
|
24565
24520
|
delete cleanedAttrs.mutexUserId;
|
|
24566
24521
|
delete cleanedAttrs.draggable;
|
|
24567
24522
|
delete cleanedAttrs.overridesMouseControl;
|
|
24568
|
-
delete cleanedAttrs.onMoveContainer;
|
|
24569
24523
|
delete cleanedAttrs.dragBoundFunc;
|
|
24570
24524
|
return {
|
|
24571
24525
|
key: attrs.id ?? "",
|
|
@@ -25108,28 +25062,12 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25108
25062
|
}
|
|
25109
25063
|
initialize() {
|
|
25110
25064
|
this.keyPressHandler = void 0;
|
|
25111
|
-
this.eventsInitialized = false;
|
|
25112
|
-
this.isCtrlMetaPressed = false;
|
|
25113
25065
|
this.textAreaSuperContainer = null;
|
|
25114
25066
|
this.textAreaContainer = null;
|
|
25115
25067
|
this.textArea = null;
|
|
25116
25068
|
this.editing = false;
|
|
25117
25069
|
this.textArea = null;
|
|
25118
25070
|
}
|
|
25119
|
-
initEvents() {
|
|
25120
|
-
if (!this.eventsInitialized && !globalThis._weave_isServerSide) {
|
|
25121
|
-
window.addEventListener("blur", () => {
|
|
25122
|
-
this.isCtrlMetaPressed = false;
|
|
25123
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
25124
|
-
window.addEventListener("keydown", (e) => {
|
|
25125
|
-
if (e.ctrlKey || e.metaKey) this.isCtrlMetaPressed = true;
|
|
25126
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
25127
|
-
window.addEventListener("keyup", (e) => {
|
|
25128
|
-
if (!(e.ctrlKey || e.metaKey)) this.isCtrlMetaPressed = false;
|
|
25129
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
25130
|
-
this.eventsInitialized = true;
|
|
25131
|
-
}
|
|
25132
|
-
}
|
|
25133
25071
|
updateNode(nodeInstance) {
|
|
25134
25072
|
const actNode = this.instance.getStage().findOne(`#${nodeInstance.id()}`);
|
|
25135
25073
|
if (actNode) {
|
|
@@ -25165,7 +25103,6 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25165
25103
|
}
|
|
25166
25104
|
}
|
|
25167
25105
|
onRender(props) {
|
|
25168
|
-
this.initEvents();
|
|
25169
25106
|
const text = new Konva.Text({
|
|
25170
25107
|
...props,
|
|
25171
25108
|
name: "node",
|
|
@@ -25232,6 +25169,7 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25232
25169
|
text.setAttr("triggerEditMode", this.triggerEditMode.bind(this));
|
|
25233
25170
|
let actualAnchor = void 0;
|
|
25234
25171
|
text.on("transformstart", (e) => {
|
|
25172
|
+
const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
|
|
25235
25173
|
this.instance.emitEvent("onTransform", e.target);
|
|
25236
25174
|
actualAnchor = this.getNodesSelectionPlugin()?.getTransformer()?.getActiveAnchor();
|
|
25237
25175
|
if (text.getAttrs().layout === TEXT_LAYOUT.SMART && [
|
|
@@ -25239,7 +25177,7 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25239
25177
|
"top-right",
|
|
25240
25178
|
"bottom-left",
|
|
25241
25179
|
"bottom-right"
|
|
25242
|
-
].includes(actualAnchor ?? "") || text.getAttrs().layout === TEXT_LAYOUT.FIXED &&
|
|
25180
|
+
].includes(actualAnchor ?? "") || text.getAttrs().layout === TEXT_LAYOUT.FIXED && isCtrlOrMetaPressed) this.getNodesSelectionPlugin()?.getTransformer()?.keepRatio(true);
|
|
25243
25181
|
else this.getNodesSelectionPlugin()?.getTransformer()?.keepRatio(false);
|
|
25244
25182
|
if ([TEXT_LAYOUT.AUTO_HEIGHT, TEXT_LAYOUT.SMART].includes(text.getAttrs().layout) && ["middle-right", "middle-left"].includes(actualAnchor ?? "")) {
|
|
25245
25183
|
text.wrap("word");
|
|
@@ -25370,7 +25308,6 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25370
25308
|
delete cleanedAttrs.measureMultilineText;
|
|
25371
25309
|
delete cleanedAttrs.overridesMouseControl;
|
|
25372
25310
|
delete cleanedAttrs.shouldUpdateOnTransform;
|
|
25373
|
-
delete cleanedAttrs.onMoveContainer;
|
|
25374
25311
|
delete cleanedAttrs.dragBoundFunc;
|
|
25375
25312
|
return {
|
|
25376
25313
|
key: attrs.id ?? "",
|
|
@@ -25762,6 +25699,7 @@ const WEAVE_IMAGE_CROP_ANCHOR_POSITION = {
|
|
|
25762
25699
|
["BOTTOM_CENTER"]: "bottom-center"
|
|
25763
25700
|
};
|
|
25764
25701
|
const WEAVE_IMAGE_DEFAULT_CONFIG = {
|
|
25702
|
+
cleanup: { intervalMs: 60 * 1e3 },
|
|
25765
25703
|
performance: { cache: { enabled: false } },
|
|
25766
25704
|
style: {
|
|
25767
25705
|
placeholder: { fill: "#aaaaaa" },
|
|
@@ -26151,7 +26089,8 @@ var WeaveImageCrop = class WeaveImageCrop {
|
|
|
26151
26089
|
this.onClose();
|
|
26152
26090
|
const utilityLayer = this.instance.getUtilityLayer();
|
|
26153
26091
|
utilityLayer?.destroyChildren();
|
|
26154
|
-
|
|
26092
|
+
const isCtrlOrMetaPressed = e.ctrlKey || e.metaKey;
|
|
26093
|
+
if (isCtrlOrMetaPressed && utilityLayer) {
|
|
26155
26094
|
this.node.renderCropMode(utilityLayer, this.image);
|
|
26156
26095
|
utilityLayer.show();
|
|
26157
26096
|
}
|
|
@@ -26460,6 +26399,25 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26460
26399
|
this.imageTryoutAttempts = {};
|
|
26461
26400
|
this.imageFallback = {};
|
|
26462
26401
|
}
|
|
26402
|
+
setupNotUsedImagesCleanup() {
|
|
26403
|
+
const cleanupHandler = () => {
|
|
26404
|
+
this.notUsedImagesCleanup = null;
|
|
26405
|
+
const stage = this.instance.getStage();
|
|
26406
|
+
const nodesIds = Object.keys(this.imageState);
|
|
26407
|
+
for (const nodeId of nodesIds) {
|
|
26408
|
+
const node = stage.findOne(`#${nodeId}`);
|
|
26409
|
+
if (!node) {
|
|
26410
|
+
delete this.imageSource[nodeId];
|
|
26411
|
+
delete this.imageState[nodeId];
|
|
26412
|
+
delete this.imageTryoutAttempts[nodeId];
|
|
26413
|
+
delete this.imageFallback[nodeId];
|
|
26414
|
+
}
|
|
26415
|
+
}
|
|
26416
|
+
this.setupNotUsedImagesCleanup();
|
|
26417
|
+
};
|
|
26418
|
+
const bindedCleanupHandler = cleanupHandler.bind(this);
|
|
26419
|
+
if (!this.notUsedImagesCleanup) setTimeout(bindedCleanupHandler, this.config.cleanup.intervalMs);
|
|
26420
|
+
}
|
|
26463
26421
|
preloadCursors() {
|
|
26464
26422
|
return new Promise((resolve) => {
|
|
26465
26423
|
(async () => {
|
|
@@ -26536,6 +26494,7 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26536
26494
|
this.instance.resolveAsyncElement(nodeId, WEAVE_IMAGE_NODE_TYPE);
|
|
26537
26495
|
}
|
|
26538
26496
|
onRender(props) {
|
|
26497
|
+
this.setupNotUsedImagesCleanup();
|
|
26539
26498
|
const imageProperties = props.imageProperties;
|
|
26540
26499
|
const imageProps = props;
|
|
26541
26500
|
const { id } = imageProps;
|
|
@@ -26561,11 +26520,6 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26561
26520
|
if (this.isSelecting() && selectedNodes.includes(image)) return "grab";
|
|
26562
26521
|
return "pointer";
|
|
26563
26522
|
};
|
|
26564
|
-
image.movedToContainer = () => {
|
|
26565
|
-
const stage = this.instance.getStage();
|
|
26566
|
-
const image$1 = stage.findOne(`#${id}`);
|
|
26567
|
-
if (!image$1) return;
|
|
26568
|
-
};
|
|
26569
26523
|
if (this.config.cropMode.enabled) {
|
|
26570
26524
|
image.triggerCrop = () => {
|
|
26571
26525
|
this.triggerCrop(image, { cmdCtrl: { triggered: false } });
|
|
@@ -26687,23 +26641,36 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26687
26641
|
if (this.imageCrop) this.closeCrop(image, WEAVE_IMAGE_CROP_END_TYPE.CANCEL);
|
|
26688
26642
|
}
|
|
26689
26643
|
});
|
|
26644
|
+
image.on("nodeDragStart", () => {
|
|
26645
|
+
const utilityLayer = this.instance.getUtilityLayer();
|
|
26646
|
+
if (!utilityLayer) return;
|
|
26647
|
+
const nodes = utilityLayer?.find(".cropMode") ?? [];
|
|
26648
|
+
nodes.forEach((n) => {
|
|
26649
|
+
n.destroy();
|
|
26650
|
+
});
|
|
26651
|
+
const transformer = this.getSelectionPlugin()?.getTransformer();
|
|
26652
|
+
if (!transformer) return;
|
|
26653
|
+
transformer.show();
|
|
26654
|
+
});
|
|
26690
26655
|
if (this.config.cropMode.enabled && this.config.cropMode.triggers.ctrlCmd) {
|
|
26691
26656
|
image.on("onCmdCtrlPressed", () => {
|
|
26657
|
+
const utilityLayer = this.instance.getUtilityLayer();
|
|
26658
|
+
if (!utilityLayer) return;
|
|
26659
|
+
if (image.isDragging()) return;
|
|
26692
26660
|
const transformer = this.getSelectionPlugin()?.getTransformer();
|
|
26693
26661
|
if (!transformer) return;
|
|
26694
26662
|
transformer.hide();
|
|
26695
|
-
const utilityLayer = this.instance.getUtilityLayer();
|
|
26696
|
-
if (!utilityLayer) return;
|
|
26697
26663
|
utilityLayer?.destroyChildren();
|
|
26698
26664
|
this.renderCropMode(utilityLayer, image);
|
|
26699
26665
|
utilityLayer?.show();
|
|
26700
26666
|
});
|
|
26701
26667
|
image.on("onCmdCtrlReleased", () => {
|
|
26668
|
+
const utilityLayer = this.instance.getUtilityLayer();
|
|
26669
|
+
if (!utilityLayer) return;
|
|
26670
|
+
if (image.isDragging()) return;
|
|
26702
26671
|
const transformer = this.getSelectionPlugin()?.getTransformer();
|
|
26703
26672
|
if (!transformer) return;
|
|
26704
26673
|
transformer.show();
|
|
26705
|
-
const utilityLayer = this.instance.getUtilityLayer();
|
|
26706
|
-
if (!utilityLayer) return;
|
|
26707
26674
|
utilityLayer?.destroyChildren();
|
|
26708
26675
|
});
|
|
26709
26676
|
}
|
|
@@ -26762,6 +26729,7 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26762
26729
|
fill: "transparent",
|
|
26763
26730
|
strokeScaleEnabled: false,
|
|
26764
26731
|
strokeWidth: 2,
|
|
26732
|
+
name: "cropMode",
|
|
26765
26733
|
stroke: "#1a1aff",
|
|
26766
26734
|
draggable: false,
|
|
26767
26735
|
listening: false,
|
|
@@ -26822,6 +26790,7 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26822
26790
|
}));
|
|
26823
26791
|
const anchor = new Konva.Rect({
|
|
26824
26792
|
draggable: false,
|
|
26793
|
+
name: "cropMode",
|
|
26825
26794
|
rotation: node.rotation()
|
|
26826
26795
|
});
|
|
26827
26796
|
this.config.cropMode.selection.anchorStyleFunc(anchor, position);
|
|
@@ -27262,20 +27231,15 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
27262
27231
|
}
|
|
27263
27232
|
onDestroy(nodeInstance) {
|
|
27264
27233
|
const nodeId = nodeInstance.getAttrs().id ?? "";
|
|
27265
|
-
const isMoveContainer = nodeInstance.getAttr("onMoveContainer");
|
|
27266
|
-
nodeInstance.setAttr("onMoveContainer", void 0);
|
|
27267
27234
|
const utilityLayer = this.instance.getUtilityLayer();
|
|
27268
|
-
utilityLayer?.
|
|
27235
|
+
const nodes = utilityLayer?.find(".cropMode") ?? [];
|
|
27236
|
+
nodes.forEach((n) => {
|
|
27237
|
+
n.destroy();
|
|
27238
|
+
});
|
|
27269
27239
|
if (this.imageTryoutIds[nodeId]) {
|
|
27270
27240
|
clearTimeout(this.imageTryoutIds[nodeId]);
|
|
27271
27241
|
delete this.imageTryoutIds[nodeId];
|
|
27272
27242
|
}
|
|
27273
|
-
if (!isMoveContainer) {
|
|
27274
|
-
delete this.imageSource[nodeId];
|
|
27275
|
-
delete this.imageState[nodeId];
|
|
27276
|
-
delete this.imageTryoutAttempts[nodeId];
|
|
27277
|
-
delete this.imageFallback[nodeId];
|
|
27278
|
-
}
|
|
27279
27243
|
nodeInstance.destroy();
|
|
27280
27244
|
}
|
|
27281
27245
|
};
|
|
@@ -27822,7 +27786,6 @@ var WeaveFrameNode = class extends WeaveNode {
|
|
|
27822
27786
|
delete cleanedAttrs.draggable;
|
|
27823
27787
|
delete cleanedAttrs.onTargetEnter;
|
|
27824
27788
|
delete cleanedAttrs.overridesMouseControl;
|
|
27825
|
-
delete cleanedAttrs.onMoveContainer;
|
|
27826
27789
|
delete cleanedAttrs.dragBoundFunc;
|
|
27827
27790
|
return {
|
|
27828
27791
|
key: realAttrs?.id ?? "",
|
|
@@ -28061,7 +28024,6 @@ var WeaveStrokeNode = class extends WeaveNode {
|
|
|
28061
28024
|
delete cleanedAttrs.sceneFunc;
|
|
28062
28025
|
delete cleanedAttrs.hitFunc;
|
|
28063
28026
|
delete cleanedAttrs.overridesMouseControl;
|
|
28064
|
-
delete cleanedAttrs.onMoveContainer;
|
|
28065
28027
|
delete cleanedAttrs.dragBoundFunc;
|
|
28066
28028
|
return {
|
|
28067
28029
|
key: attrs.id ?? "",
|
|
@@ -29606,6 +29568,7 @@ var WeaveVideoNode = class extends WeaveNode {
|
|
|
29606
29568
|
const videoIconGroup = video.findOne(`#${id}-video-icon-group`);
|
|
29607
29569
|
if (!videoPlaceholder || !videoIconGroup) return;
|
|
29608
29570
|
const realVideoPlaceholderURL = this.config.urlTransformer?.(videoProps.videoPlaceholderURL ?? "", video) ?? videoProps.videoPlaceholderURL;
|
|
29571
|
+
if (!this.videoPlaceholder) this.initialize();
|
|
29609
29572
|
this.videoPlaceholder[id] = Konva.Util.createImageElement();
|
|
29610
29573
|
this.videoPlaceholder[id].crossOrigin = this.config.crossOrigin;
|
|
29611
29574
|
this.videoPlaceholder[id].src = realVideoPlaceholderURL;
|
|
@@ -29870,16 +29833,16 @@ var WeaveVideoNode = class extends WeaveNode {
|
|
|
29870
29833
|
}
|
|
29871
29834
|
if (isServer()) this.instance.updateNode(this.serialize(videoGroup));
|
|
29872
29835
|
const defaultHandleMouseover = videoGroup.handleMouseover;
|
|
29873
|
-
videoGroup.handleMouseover = () => {
|
|
29874
|
-
defaultHandleMouseover.call(this);
|
|
29836
|
+
videoGroup.handleMouseover = (e) => {
|
|
29837
|
+
defaultHandleMouseover.call(this, e);
|
|
29875
29838
|
if (this.config.style.track.onlyOnHover && this.videoState[id].loaded) {
|
|
29876
29839
|
const videoProgress = videoGroup.findOne(`#${id}-video-progress`);
|
|
29877
29840
|
videoProgress?.show();
|
|
29878
29841
|
}
|
|
29879
29842
|
};
|
|
29880
29843
|
const defaultHandleMouseout = videoGroup.handleMouseout;
|
|
29881
|
-
videoGroup.handleMouseout = () => {
|
|
29882
|
-
defaultHandleMouseout.call(this);
|
|
29844
|
+
videoGroup.handleMouseout = (e) => {
|
|
29845
|
+
defaultHandleMouseout.call(e, this);
|
|
29883
29846
|
if (this.config.style.track.onlyOnHover && this.videoState[id].loaded && !this.videoState[id].paused) {
|
|
29884
29847
|
const videoProgress = videoGroup.findOne(`#${id}-video-progress`);
|
|
29885
29848
|
videoProgress?.hide();
|
|
@@ -31993,7 +31956,6 @@ var WeaveConnectorNode = class extends WeaveNode {
|
|
|
31993
31956
|
delete cleanedAttrs.startInfoLoaded;
|
|
31994
31957
|
delete cleanedAttrs.endInfoLoaded;
|
|
31995
31958
|
delete cleanedAttrs.overridesMouseControl;
|
|
31996
|
-
delete cleanedAttrs.onMoveContainer;
|
|
31997
31959
|
delete cleanedAttrs.dragBoundFunc;
|
|
31998
31960
|
return {
|
|
31999
31961
|
key: attrs.id ?? "",
|
|
@@ -32149,7 +32111,6 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
|
|
|
32149
32111
|
this.zooming = false;
|
|
32150
32112
|
this.isTrackpad = false;
|
|
32151
32113
|
this.zoomVelocity = 0;
|
|
32152
|
-
this.isCtrlOrMetaPressed = false;
|
|
32153
32114
|
this.updatedMinimumZoom = false;
|
|
32154
32115
|
this.actualStep = this.config.zoomSteps.findIndex((step) => step === this.config.defaultZoom);
|
|
32155
32116
|
this.actualScale = this.config.zoomSteps[this.actualStep];
|
|
@@ -32460,15 +32421,6 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
|
|
|
32460
32421
|
};
|
|
32461
32422
|
}
|
|
32462
32423
|
initEvents() {
|
|
32463
|
-
window.addEventListener("blur", () => {
|
|
32464
|
-
this.isCtrlOrMetaPressed = false;
|
|
32465
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
32466
|
-
window.addEventListener("keydown", (e) => {
|
|
32467
|
-
if (e.ctrlKey || e.metaKey) this.isCtrlOrMetaPressed = true;
|
|
32468
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
32469
|
-
window.addEventListener("keyup", (e) => {
|
|
32470
|
-
if (!(e.ctrlKey || e.metaKey)) this.isCtrlOrMetaPressed = false;
|
|
32471
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
32472
32424
|
const stage = this.instance.getStage();
|
|
32473
32425
|
let lastCenter = null;
|
|
32474
32426
|
let lastDist = 0;
|
|
@@ -32550,7 +32502,8 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
|
|
|
32550
32502
|
});
|
|
32551
32503
|
let doZoom = false;
|
|
32552
32504
|
const handleWheelImmediate = (e) => {
|
|
32553
|
-
const
|
|
32505
|
+
const isCtrlOrMetaPressed = e.ctrlKey || e.metaKey;
|
|
32506
|
+
const performZoom = isCtrlOrMetaPressed || !isCtrlOrMetaPressed && e.ctrlKey && e.deltaMode === 0;
|
|
32554
32507
|
const mouseX = e.clientX;
|
|
32555
32508
|
const mouseY = e.clientY;
|
|
32556
32509
|
let elementUnderMouse = document.elementFromPoint(mouseX, mouseY);
|
|
@@ -34461,7 +34414,7 @@ var WeaveImageToolAction = class extends WeaveAction {
|
|
|
34461
34414
|
const dragProperties = this.instance.getDragProperties();
|
|
34462
34415
|
if (dragProperties && dragId === WEAVE_IMAGE_TOOL_ACTION_NAME) {
|
|
34463
34416
|
this.instance.getStage().setPointersPositions(e);
|
|
34464
|
-
const position =
|
|
34417
|
+
const position = this.instance.getStage().getRelativePointerPosition();
|
|
34465
34418
|
if (!position) return;
|
|
34466
34419
|
this.instance.triggerAction(WEAVE_IMAGE_TOOL_ACTION_NAME, {
|
|
34467
34420
|
type: WEAVE_IMAGE_TOOL_UPLOAD_TYPE.IMAGE_URL,
|
|
@@ -34911,7 +34864,7 @@ var WeaveImagesToolAction = class extends WeaveAction {
|
|
|
34911
34864
|
const dragProperties = this.instance.getDragProperties();
|
|
34912
34865
|
if (dragProperties && dragId === WEAVE_IMAGES_TOOL_ACTION_NAME) {
|
|
34913
34866
|
this.instance.getStage().setPointersPositions(e);
|
|
34914
|
-
const position =
|
|
34867
|
+
const position = this.instance.getStage().getRelativePointerPosition();
|
|
34915
34868
|
if (!position) return;
|
|
34916
34869
|
this.instance.triggerAction(WEAVE_IMAGES_TOOL_ACTION_NAME, {
|
|
34917
34870
|
type: WEAVE_IMAGES_TOOL_UPLOAD_TYPE.IMAGE_URL,
|
|
@@ -37022,7 +36975,7 @@ var WeaveVideoToolAction = class extends WeaveAction {
|
|
|
37022
36975
|
const dragProperties = this.instance.getDragProperties();
|
|
37023
36976
|
if (dragProperties && dragId === VIDEO_TOOL_ACTION_NAME) {
|
|
37024
36977
|
this.instance.getStage().setPointersPositions(e);
|
|
37025
|
-
const position =
|
|
36978
|
+
const position = this.instance.getStage().getRelativePointerPosition();
|
|
37026
36979
|
this.instance.triggerAction(VIDEO_TOOL_ACTION_NAME, {
|
|
37027
36980
|
videoId: dragProperties.videoId,
|
|
37028
36981
|
videoParams: dragProperties.videoParams,
|
|
@@ -38200,7 +38153,6 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38200
38153
|
this.moveToolActive = false;
|
|
38201
38154
|
this.isMouseLeftButtonPressed = false;
|
|
38202
38155
|
this.isMouseMiddleButtonPressed = false;
|
|
38203
|
-
this.isCtrlOrMetaPressed = false;
|
|
38204
38156
|
this.isSpaceKeyPressed = false;
|
|
38205
38157
|
this.previousPointer = null;
|
|
38206
38158
|
this.currentPointer = null;
|
|
@@ -38229,11 +38181,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38229
38181
|
}
|
|
38230
38182
|
initEvents() {
|
|
38231
38183
|
const stage = this.instance.getStage();
|
|
38232
|
-
window.addEventListener("blur", () => {
|
|
38233
|
-
this.isCtrlOrMetaPressed = false;
|
|
38234
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
38235
38184
|
window.addEventListener("keydown", (e) => {
|
|
38236
|
-
if (e.ctrlKey || e.metaKey) this.isCtrlOrMetaPressed = true;
|
|
38237
38185
|
if (e.code === "Space") {
|
|
38238
38186
|
this.getContextMenuPlugin()?.disable();
|
|
38239
38187
|
this.getNodesSelectionPlugin()?.disable();
|
|
@@ -38244,7 +38192,6 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38244
38192
|
}
|
|
38245
38193
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
38246
38194
|
window.addEventListener("keyup", (e) => {
|
|
38247
|
-
if (e.key === "Meta" || e.key === "Control") this.isCtrlOrMetaPressed = false;
|
|
38248
38195
|
if (e.code === "Space") {
|
|
38249
38196
|
this.getContextMenuPlugin()?.enable();
|
|
38250
38197
|
this.getNodesSelectionPlugin()?.enable();
|
|
@@ -38311,7 +38258,8 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38311
38258
|
this.cleanupEdgeMoveIntervals();
|
|
38312
38259
|
});
|
|
38313
38260
|
const handleWheel = (e) => {
|
|
38314
|
-
const
|
|
38261
|
+
const isCtrlOrMetaPressed = e.ctrlKey || e.metaKey;
|
|
38262
|
+
const performPanning = !isCtrlOrMetaPressed && !e.ctrlKey;
|
|
38315
38263
|
const mouseX = e.clientX;
|
|
38316
38264
|
const mouseY = e.clientY;
|
|
38317
38265
|
let elementUnderMouse = document.elementFromPoint(mouseX, mouseY);
|
|
@@ -38319,7 +38267,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38319
38267
|
const shadowHost = getTopmostShadowHost(stage.container());
|
|
38320
38268
|
if (shadowHost) elementUnderMouse = shadowHost.elementFromPoint(mouseX, mouseY);
|
|
38321
38269
|
}
|
|
38322
|
-
if (!this.enabled ||
|
|
38270
|
+
if (!this.enabled || isCtrlOrMetaPressed || e.buttons === 4 || !performPanning || this.instance.getClosestParentWithWeaveId(elementUnderMouse) !== stage.container()) return;
|
|
38323
38271
|
this.getContextMenuPlugin()?.cancelLongPressTimer();
|
|
38324
38272
|
stage.x(stage.x() - e.deltaX);
|
|
38325
38273
|
stage.y(stage.y() - e.deltaY);
|
|
@@ -39351,7 +39299,11 @@ var WeaveUsersPresencePlugin = class extends WeavePlugin {
|
|
|
39351
39299
|
const presenceInfo = userPresence[nodeId];
|
|
39352
39300
|
if (this.config.getUser().id === presenceInfo.userId) continue;
|
|
39353
39301
|
const nodeInstance = stage.findOne(`#${presenceInfo.nodeId}`);
|
|
39354
|
-
if (nodeInstance)
|
|
39302
|
+
if (!nodeInstance) continue;
|
|
39303
|
+
let parentId = nodeInstance.getParent()?.id() ?? "";
|
|
39304
|
+
const parent = nodeInstance.getParent();
|
|
39305
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
39306
|
+
if (nodeInstance && presenceInfo.parentId === parentId) {
|
|
39355
39307
|
const newProps = {
|
|
39356
39308
|
...nodeInstance.getAttrs(),
|
|
39357
39309
|
...presenceInfo.attrs
|
|
@@ -39366,10 +39318,11 @@ var WeaveUsersPresencePlugin = class extends WeavePlugin {
|
|
|
39366
39318
|
const store = this.instance.getStore();
|
|
39367
39319
|
store.setAwarenessInfo(WEAVE_USER_PRESENCE_KEY, this.userPresence);
|
|
39368
39320
|
}
|
|
39369
|
-
setPresence(nodeId, attrs, forceUpdate = true) {
|
|
39321
|
+
setPresence(nodeId, parentId, attrs, forceUpdate = true) {
|
|
39370
39322
|
const userInfo = this.config.getUser();
|
|
39371
39323
|
this.userPresence[nodeId] = {
|
|
39372
39324
|
userId: userInfo.id,
|
|
39325
|
+
parentId,
|
|
39373
39326
|
nodeId,
|
|
39374
39327
|
attrs
|
|
39375
39328
|
};
|
|
@@ -40576,7 +40529,16 @@ var WeaveCommentsRendererPlugin = class extends WeavePlugin {
|
|
|
40576
40529
|
//#endregion
|
|
40577
40530
|
//#region src/plugins/stage-keyboard-move/constants.ts
|
|
40578
40531
|
const WEAVE_STAGE_KEYBOARD_MOVE_KEY = "stageKeyboardMove";
|
|
40579
|
-
const WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG = {
|
|
40532
|
+
const WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG = {
|
|
40533
|
+
movementDelta: 1,
|
|
40534
|
+
shiftMovementDelta: 10
|
|
40535
|
+
};
|
|
40536
|
+
const WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION = {
|
|
40537
|
+
["UP"]: "up",
|
|
40538
|
+
["DOWN"]: "down",
|
|
40539
|
+
["LEFT"]: "left",
|
|
40540
|
+
["RIGHT"]: "right"
|
|
40541
|
+
};
|
|
40580
40542
|
|
|
40581
40543
|
//#endregion
|
|
40582
40544
|
//#region src/plugins/stage-keyboard-move/stage-keyboard-move.ts
|
|
@@ -40591,25 +40553,31 @@ var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
|
|
|
40591
40553
|
getName() {
|
|
40592
40554
|
return WEAVE_STAGE_KEYBOARD_MOVE_KEY;
|
|
40593
40555
|
}
|
|
40594
|
-
handleNodesMovement(movementOrientation) {
|
|
40556
|
+
handleNodesMovement(movementOrientation, { isShiftPressed }) {
|
|
40595
40557
|
const nodesSelectionPlugin = this.instance.getPlugin("nodesSelection");
|
|
40596
40558
|
if (nodesSelectionPlugin) {
|
|
40597
40559
|
const selectedNodes = nodesSelectionPlugin.getSelectedNodes();
|
|
40560
|
+
const movementDelta = isShiftPressed ? this.config.shiftMovementDelta : this.config.movementDelta;
|
|
40598
40561
|
for (const node of selectedNodes) {
|
|
40599
40562
|
switch (movementOrientation) {
|
|
40600
|
-
case
|
|
40601
|
-
node.y(node.y() -
|
|
40563
|
+
case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.UP:
|
|
40564
|
+
node.y(node.y() - movementDelta);
|
|
40602
40565
|
break;
|
|
40603
|
-
case
|
|
40604
|
-
node.y(node.y() +
|
|
40566
|
+
case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.DOWN:
|
|
40567
|
+
node.y(node.y() + movementDelta);
|
|
40605
40568
|
break;
|
|
40606
|
-
case
|
|
40607
|
-
node.x(node.x() -
|
|
40569
|
+
case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.LEFT:
|
|
40570
|
+
node.x(node.x() - movementDelta);
|
|
40608
40571
|
break;
|
|
40609
|
-
case
|
|
40610
|
-
node.x(node.x() +
|
|
40572
|
+
case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.RIGHT:
|
|
40573
|
+
node.x(node.x() + movementDelta);
|
|
40611
40574
|
break;
|
|
40612
40575
|
}
|
|
40576
|
+
this.instance.emitEvent("onNodeKeyboardMove", {
|
|
40577
|
+
node,
|
|
40578
|
+
orientation: movementOrientation,
|
|
40579
|
+
delta: movementDelta
|
|
40580
|
+
});
|
|
40613
40581
|
const nodeHandler = this.instance.getNodeHandler(node.getAttrs().nodeType);
|
|
40614
40582
|
if (!nodeHandler) break;
|
|
40615
40583
|
this.instance.updateNode(nodeHandler.serialize(node));
|
|
@@ -40618,10 +40586,11 @@ var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
|
|
|
40618
40586
|
}
|
|
40619
40587
|
onInit() {
|
|
40620
40588
|
window.addEventListener("keydown", (e) => {
|
|
40621
|
-
|
|
40622
|
-
if (e.code === "
|
|
40623
|
-
if (e.code === "
|
|
40624
|
-
if (e.code === "
|
|
40589
|
+
const isShiftPressed = e.shiftKey || e.code === "Shift";
|
|
40590
|
+
if (e.code === "ArrowUp") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.UP, { isShiftPressed });
|
|
40591
|
+
if (e.code === "ArrowLeft") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.LEFT, { isShiftPressed });
|
|
40592
|
+
if (e.code === "ArrowRight") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.RIGHT, { isShiftPressed });
|
|
40593
|
+
if (e.code === "ArrowDown") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.DOWN, { isShiftPressed });
|
|
40625
40594
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
40626
40595
|
}
|
|
40627
40596
|
enable() {
|
|
@@ -40633,5 +40602,5 @@ var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
|
|
|
40633
40602
|
};
|
|
40634
40603
|
|
|
40635
40604
|
//#endregion
|
|
40636
|
-
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, getJSONFromYjsBinary,
|
|
40605
|
+
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, getJSONFromYjsBinary, getSelectedNodesMetadata, getStageClickPoint, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodes, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isArray, isIOS, isInShadowDOM, isNodeInSelection, isObject, isServer, loadImageSource, mapJsonToYjsArray, mapJsonToYjsElements, mapJsonToYjsMap, memoize, mergeExceptArrays, moveNodeToContainer, moveNodeToContainerNT, resetScale, setupCanvasBackend, setupSkiaBackend, weavejsToYjsBinary };
|
|
40637
40606
|
//# sourceMappingURL=types.js.map
|