@inditextech/weave-sdk 3.7.2 → 3.8.1-SNAPSHOT.191.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 +229 -247
- package/dist/sdk.node.js +229 -247
- package/dist/types.d.ts +47 -34
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +229 -247
- package/dist/types.js.map +1 -1
- package/package.json +2 -2
package/dist/sdk.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;
|
|
@@ -18608,12 +18601,10 @@ const WEAVE_GRID_LAYER_ID = "gridLayer";
|
|
|
18608
18601
|
//#region src/plugins/stage-panning/constants.ts
|
|
18609
18602
|
const WEAVE_STAGE_PANNING_KEY = "stagePanning";
|
|
18610
18603
|
const WEAVE_STAGE_PANNING_THROTTLE_MS = 20;
|
|
18611
|
-
const WEAVE_STAGE_PANNING_DEFAULT_CONFIG = {
|
|
18612
|
-
|
|
18613
|
-
|
|
18614
|
-
|
|
18615
|
-
edgePanMaxSpeed: 30
|
|
18616
|
-
};
|
|
18604
|
+
const WEAVE_STAGE_PANNING_DEFAULT_CONFIG = { edgePan: {
|
|
18605
|
+
offset: 25,
|
|
18606
|
+
speed: 20
|
|
18607
|
+
} };
|
|
18617
18608
|
|
|
18618
18609
|
//#endregion
|
|
18619
18610
|
//#region src/plugins/nodes-multi-selection-feedback/constants.ts
|
|
@@ -18678,7 +18669,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18678
18669
|
"bottom-right"
|
|
18679
18670
|
];
|
|
18680
18671
|
this.taps = 0;
|
|
18681
|
-
this.isCtrlMetaPressed = false;
|
|
18682
18672
|
this.isSpaceKeyPressed = false;
|
|
18683
18673
|
this.isDoubleTap = false;
|
|
18684
18674
|
this.tapStart = null;
|
|
@@ -18778,12 +18768,12 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18778
18768
|
}
|
|
18779
18769
|
};
|
|
18780
18770
|
stage.on("pointermove", (0, import_throttle.default)(handlePointerMoveInit, DEFAULT_THROTTLE_MS));
|
|
18781
|
-
tr.on("transformstart", () => {
|
|
18771
|
+
tr.on("transformstart", (e) => {
|
|
18782
18772
|
this.transformInProcess = true;
|
|
18783
18773
|
this.triggerSelectedNodesEvent();
|
|
18784
18774
|
const selectedNodes$1 = tr.nodes();
|
|
18785
18775
|
for (const node of selectedNodes$1) {
|
|
18786
|
-
node.handleMouseout();
|
|
18776
|
+
node.handleMouseout(e);
|
|
18787
18777
|
if (node.getAttrs().strokeScaleEnabled !== false) {
|
|
18788
18778
|
node.setAttr("strokeScaleEnabled", false);
|
|
18789
18779
|
node.setAttr("_revertStrokeScaleEnabled", true);
|
|
@@ -18795,7 +18785,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18795
18785
|
});
|
|
18796
18786
|
});
|
|
18797
18787
|
let nodeHovered = void 0;
|
|
18798
|
-
tr.on("mousemove", () => {
|
|
18788
|
+
tr.on("mousemove", (e) => {
|
|
18799
18789
|
if (this.dragInProcess) return;
|
|
18800
18790
|
const pointerPos = stage.getPointerPosition();
|
|
18801
18791
|
if (!pointerPos) return;
|
|
@@ -18805,13 +18795,13 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18805
18795
|
if (shape) {
|
|
18806
18796
|
const targetNode = this.instance.getInstanceRecursive(shape);
|
|
18807
18797
|
if (targetNode && targetNode !== nodeHovered) {
|
|
18808
|
-
this.instance.getStage().handleMouseover();
|
|
18809
|
-
nodeHovered?.handleMouseout?.();
|
|
18810
|
-
targetNode?.handleMouseover?.();
|
|
18798
|
+
this.instance.getStage().handleMouseover(e);
|
|
18799
|
+
nodeHovered?.handleMouseout?.(e);
|
|
18800
|
+
targetNode?.handleMouseover?.(e);
|
|
18811
18801
|
nodeHovered = targetNode;
|
|
18812
18802
|
}
|
|
18813
|
-
targetNode?.handleMouseover?.();
|
|
18814
|
-
} else nodeHovered?.handleMouseout?.();
|
|
18803
|
+
targetNode?.handleMouseover?.(e);
|
|
18804
|
+
} else nodeHovered?.handleMouseout?.(e);
|
|
18815
18805
|
});
|
|
18816
18806
|
tr.on("mouseover", () => {
|
|
18817
18807
|
const nodesSelected = tr.nodes();
|
|
@@ -18820,32 +18810,37 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18820
18810
|
stage.container().style.cursor = node.defineMousePointer() ?? "grab";
|
|
18821
18811
|
} else stage.container().style.cursor = "grab";
|
|
18822
18812
|
});
|
|
18823
|
-
tr.on("mouseout", () => {
|
|
18824
|
-
this.instance.getStage().handleMouseover?.();
|
|
18813
|
+
tr.on("mouseout", (e) => {
|
|
18814
|
+
this.instance.getStage().handleMouseover?.(e);
|
|
18825
18815
|
nodeHovered = void 0;
|
|
18826
18816
|
});
|
|
18827
|
-
window.addEventListener("mouseout", () => {
|
|
18817
|
+
window.addEventListener("mouseout", (e) => {
|
|
18828
18818
|
if (nodeHovered) {
|
|
18829
|
-
nodeHovered.handleMouseout();
|
|
18819
|
+
nodeHovered.handleMouseout(e);
|
|
18830
18820
|
nodeHovered = void 0;
|
|
18831
18821
|
}
|
|
18832
|
-
this.instance.getStage().handleMouseover?.();
|
|
18822
|
+
this.instance.getStage().handleMouseover?.(e);
|
|
18833
18823
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
18834
18824
|
const handleTransform = (e) => {
|
|
18835
18825
|
const moved = this.checkMoved(e);
|
|
18836
18826
|
if (moved) this.getContextMenuPlugin()?.cancelLongPressTimer();
|
|
18837
18827
|
this.triggerSelectedNodesEvent();
|
|
18838
18828
|
if (this.getUsersPresencePlugin()) {
|
|
18839
|
-
for (const node of tr.nodes())
|
|
18840
|
-
|
|
18841
|
-
|
|
18842
|
-
|
|
18843
|
-
|
|
18844
|
-
|
|
18845
|
-
|
|
18846
|
-
|
|
18847
|
-
|
|
18848
|
-
|
|
18829
|
+
for (const node of tr.nodes()) {
|
|
18830
|
+
let parentId = node.getParent()?.id() ?? "";
|
|
18831
|
+
const parent = node.getParent();
|
|
18832
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
18833
|
+
this.getUsersPresencePlugin()?.setPresence(node.id(), parentId, {
|
|
18834
|
+
x: node.x(),
|
|
18835
|
+
y: node.y(),
|
|
18836
|
+
width: node.width(),
|
|
18837
|
+
height: node.height(),
|
|
18838
|
+
scaleX: node.scaleX(),
|
|
18839
|
+
scaleY: node.scaleY(),
|
|
18840
|
+
rotation: node.rotation(),
|
|
18841
|
+
strokeScaleEnabled: false
|
|
18842
|
+
}, false);
|
|
18843
|
+
}
|
|
18849
18844
|
this.getUsersPresencePlugin()?.forceSendPresence();
|
|
18850
18845
|
}
|
|
18851
18846
|
};
|
|
@@ -18869,6 +18864,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18869
18864
|
let selectedNodes = [];
|
|
18870
18865
|
tr.on("dragstart", (e) => {
|
|
18871
18866
|
this.dragInProcess = true;
|
|
18867
|
+
let isWheelMousePressed = false;
|
|
18868
|
+
if (e.evt.button === 1) isWheelMousePressed = true;
|
|
18872
18869
|
const mainLayer = this.instance.getMainLayer();
|
|
18873
18870
|
if (!mainLayer) return;
|
|
18874
18871
|
initialPos = {
|
|
@@ -18878,9 +18875,9 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18878
18875
|
this.didMove = false;
|
|
18879
18876
|
const stage$1 = this.instance.getStage();
|
|
18880
18877
|
this.saveDragSelectedNodes();
|
|
18881
|
-
|
|
18878
|
+
this.setNodesOpacityOnDrag();
|
|
18882
18879
|
selectedNodes = tr.nodes();
|
|
18883
|
-
if (
|
|
18880
|
+
if (isWheelMousePressed) {
|
|
18884
18881
|
e.cancelBubble = true;
|
|
18885
18882
|
e.target.stopDrag();
|
|
18886
18883
|
return;
|
|
@@ -18904,13 +18901,14 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18904
18901
|
x: e.target.x(),
|
|
18905
18902
|
y: e.target.y()
|
|
18906
18903
|
};
|
|
18904
|
+
let isWheelMousePressed = false;
|
|
18905
|
+
if (e.evt.button === 1) isWheelMousePressed = true;
|
|
18907
18906
|
e.cancelBubble = true;
|
|
18908
18907
|
if (initialPos) {
|
|
18909
18908
|
const moved = this.checkMovedDrag(initialPos, actualPos);
|
|
18910
18909
|
if (moved) this.getContextMenuPlugin()?.cancelLongPressTimer();
|
|
18911
18910
|
}
|
|
18912
|
-
|
|
18913
|
-
if (stage$1.isMouseWheelPressed()) {
|
|
18911
|
+
if (isWheelMousePressed) {
|
|
18914
18912
|
e.cancelBubble = true;
|
|
18915
18913
|
e.target.stopDrag();
|
|
18916
18914
|
return;
|
|
@@ -18930,10 +18928,15 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18930
18928
|
clearContainerTargets(this.instance);
|
|
18931
18929
|
const layerToMove = containerOverCursor(this.instance, selectedNodes);
|
|
18932
18930
|
if (this.getUsersPresencePlugin() && this.dragInProcess) {
|
|
18933
|
-
for (const node of selectedNodes)
|
|
18934
|
-
|
|
18935
|
-
|
|
18936
|
-
|
|
18931
|
+
for (const node of selectedNodes) {
|
|
18932
|
+
let parentId = node.getParent()?.id() ?? "";
|
|
18933
|
+
const parent = node.getParent();
|
|
18934
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
18935
|
+
this.getUsersPresencePlugin()?.setPresence(node.id(), parentId, {
|
|
18936
|
+
x: node.x(),
|
|
18937
|
+
y: node.y()
|
|
18938
|
+
}, false);
|
|
18939
|
+
}
|
|
18937
18940
|
this.getUsersPresencePlugin()?.forceSendPresence();
|
|
18938
18941
|
}
|
|
18939
18942
|
if (layerToMove && !selectionContainsFrames) layerToMove.fire(WEAVE_NODE_CUSTOM_EVENTS.onTargetEnter, { bubbles: true });
|
|
@@ -18947,7 +18950,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18947
18950
|
if (!mainLayer) return;
|
|
18948
18951
|
this.instance.getSelectionLayer()?.hitGraphEnabled(true);
|
|
18949
18952
|
this.instance.getMainLayer()?.hitGraphEnabled(true);
|
|
18950
|
-
if (this.getDragSelectedNodes().length > 1) this.restoreNodesOpacityOnDrag();
|
|
18951
18953
|
if (!this.didMove) return;
|
|
18952
18954
|
if (selectedNodes.length > 1) this.instance.releaseMutexLock();
|
|
18953
18955
|
e.cancelBubble = true;
|
|
@@ -19020,16 +19022,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19020
19022
|
tr.forceUpdate();
|
|
19021
19023
|
}
|
|
19022
19024
|
});
|
|
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
19025
|
this.instance.addEventListener("onNodesChange", () => {
|
|
19034
19026
|
const currentSelectedNodes = tr.nodes();
|
|
19035
19027
|
const unselectedNodes = this.prevSelectedNodes.filter((node) => !currentSelectedNodes.map((node1) => node1.getAttrs().id).includes(node.getAttrs().id));
|
|
@@ -19236,12 +19228,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19236
19228
|
initEvents() {
|
|
19237
19229
|
this.selecting = false;
|
|
19238
19230
|
const stage = this.instance.getStage();
|
|
19239
|
-
window.addEventListener("blur", () => {
|
|
19240
|
-
this.isCtrlMetaPressed = false;
|
|
19241
|
-
this.isSpaceKeyPressed = false;
|
|
19242
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
19243
19231
|
stage.container().addEventListener("keydown", (e) => {
|
|
19244
|
-
if (e.ctrlKey || e.metaKey) this.isCtrlMetaPressed = true;
|
|
19245
19232
|
if (e.code === "Space") this.isSpaceKeyPressed = true;
|
|
19246
19233
|
if (e.code === "Backspace" || e.code === "Delete") {
|
|
19247
19234
|
Promise.resolve().then(() => {
|
|
@@ -19251,7 +19238,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19251
19238
|
}
|
|
19252
19239
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
19253
19240
|
stage.container().addEventListener("keyup", (e) => {
|
|
19254
|
-
if (!(e.ctrlKey || e.metaKey)) this.isCtrlMetaPressed = false;
|
|
19255
19241
|
if (e.code === "Space") this.isSpaceKeyPressed = false;
|
|
19256
19242
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
19257
19243
|
stage.on("pointerdown", (e) => {
|
|
@@ -19303,7 +19289,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19303
19289
|
this.selectionRectangle.width(0);
|
|
19304
19290
|
this.selectionRectangle.height(0);
|
|
19305
19291
|
this.selecting = true;
|
|
19306
|
-
|
|
19292
|
+
const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
|
|
19293
|
+
if (isCtrlOrMetaPressed) {
|
|
19307
19294
|
const nodesSelected = this.tr.nodes();
|
|
19308
19295
|
for (const node of nodesSelected) node.fire("onSelectionCleared", { bubbles: true });
|
|
19309
19296
|
}
|
|
@@ -19523,7 +19510,8 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19523
19510
|
nodeTargeted.dblClick();
|
|
19524
19511
|
return;
|
|
19525
19512
|
}
|
|
19526
|
-
|
|
19513
|
+
const isCtrlOrCmdPressed = e.evt.ctrlKey || e.evt.metaKey;
|
|
19514
|
+
if (isCtrlOrCmdPressed) return;
|
|
19527
19515
|
if (!metaPressed) {
|
|
19528
19516
|
this.tr.nodes([nodeTargeted]);
|
|
19529
19517
|
this.tr.show();
|
|
@@ -19700,11 +19688,18 @@ const COPY_PASTE_NODES_PLUGIN_STATE = {
|
|
|
19700
19688
|
["IDLE"]: "idle",
|
|
19701
19689
|
["PASTING"]: "pasting"
|
|
19702
19690
|
};
|
|
19703
|
-
const WEAVE_COPY_PASTE_CONFIG_DEFAULT = {
|
|
19704
|
-
|
|
19705
|
-
|
|
19706
|
-
|
|
19707
|
-
|
|
19691
|
+
const WEAVE_COPY_PASTE_CONFIG_DEFAULT = {
|
|
19692
|
+
canPasteOnto: (node, atTarget) => {
|
|
19693
|
+
const targetType = atTarget.getAttrs().nodeType;
|
|
19694
|
+
if (targetType === "frame" && node.type === "frame") return false;
|
|
19695
|
+
return true;
|
|
19696
|
+
},
|
|
19697
|
+
paddingOnPaste: {
|
|
19698
|
+
enabled: false,
|
|
19699
|
+
paddingX: 0,
|
|
19700
|
+
paddingY: 0
|
|
19701
|
+
}
|
|
19702
|
+
};
|
|
19708
19703
|
|
|
19709
19704
|
//#endregion
|
|
19710
19705
|
//#region src/plugins/copy-paste-nodes/copy-paste-nodes.ts
|
|
@@ -19931,6 +19926,7 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
19931
19926
|
}
|
|
19932
19927
|
};
|
|
19933
19928
|
this.instance.addEventListener("onNodeRenderedAdded", handleOnNodeAdded);
|
|
19929
|
+
const nodesToPaste = [];
|
|
19934
19930
|
for (const element of Object.keys(this.toPaste.weave)) {
|
|
19935
19931
|
const node = this.toPaste.weave[element].element;
|
|
19936
19932
|
const posRelativeToSelection = this.toPaste.weave[element].posRelativeToSelection;
|
|
@@ -19971,12 +19967,22 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
19971
19967
|
containerId = this.instance.getMainLayer()?.getAttrs().id ?? "";
|
|
19972
19968
|
containerNode = this.instance.getMainLayer();
|
|
19973
19969
|
}
|
|
19974
|
-
|
|
19970
|
+
const canPasteNodeOntoTarget = this.config.canPasteOnto(node, containerNode);
|
|
19971
|
+
if (!canPasteNodeOntoTarget) throw new Error(`Cannot paste node ${node.key} onto target container: ${containerId}`, { cause: "InvalidPasteTarget" });
|
|
19972
|
+
if (containerId && canPasteNodeOntoTarget) {
|
|
19975
19973
|
nodesToSelect.push(newNodeId);
|
|
19976
|
-
|
|
19974
|
+
nodesToPaste.push({
|
|
19975
|
+
node,
|
|
19976
|
+
containerId
|
|
19977
|
+
});
|
|
19977
19978
|
}
|
|
19978
19979
|
this.getStageGridPlugin()?.onRender();
|
|
19979
19980
|
}
|
|
19981
|
+
for (const elementToPaste of nodesToPaste) {
|
|
19982
|
+
const { node, containerId } = elementToPaste;
|
|
19983
|
+
this.instance.addNodeNT(node, containerId);
|
|
19984
|
+
this.getStageGridPlugin()?.onRender();
|
|
19985
|
+
}
|
|
19980
19986
|
});
|
|
19981
19987
|
}
|
|
19982
19988
|
async finishHandleCopy() {
|
|
@@ -20068,6 +20074,7 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
20068
20074
|
}
|
|
20069
20075
|
} catch (ex) {
|
|
20070
20076
|
this.instance.emitEvent("onPaste", { error: ex });
|
|
20077
|
+
if (ex instanceof Error && ex.cause === "InvalidPasteTarget") return;
|
|
20071
20078
|
}
|
|
20072
20079
|
try {
|
|
20073
20080
|
const items = await navigator.clipboard.read();
|
|
@@ -20165,11 +20172,6 @@ const MOVE_TOOL_STATE = {
|
|
|
20165
20172
|
|
|
20166
20173
|
//#endregion
|
|
20167
20174
|
//#region src/nodes/node.ts
|
|
20168
|
-
const augmentKonvaStageClass = () => {
|
|
20169
|
-
Konva.Stage.prototype.isMouseWheelPressed = function() {
|
|
20170
|
-
return false;
|
|
20171
|
-
};
|
|
20172
|
-
};
|
|
20173
20175
|
const augmentKonvaNodeClass = (config) => {
|
|
20174
20176
|
const { transform } = config ?? {};
|
|
20175
20177
|
Konva.Node.prototype.getTransformerProperties = function() {
|
|
@@ -20181,7 +20183,6 @@ const augmentKonvaNodeClass = (config) => {
|
|
|
20181
20183
|
Konva.Node.prototype.getRealClientRect = function(config$1) {
|
|
20182
20184
|
return this.getClientRect(config$1);
|
|
20183
20185
|
};
|
|
20184
|
-
Konva.Node.prototype.movedToContainer = function() {};
|
|
20185
20186
|
Konva.Node.prototype.updatePosition = function() {};
|
|
20186
20187
|
Konva.Node.prototype.triggerCrop = function() {};
|
|
20187
20188
|
Konva.Node.prototype.closeCrop = function() {};
|
|
@@ -20231,7 +20232,6 @@ var WeaveNode = class {
|
|
|
20231
20232
|
"bottom-right"
|
|
20232
20233
|
];
|
|
20233
20234
|
};
|
|
20234
|
-
node.movedToContainer = function() {};
|
|
20235
20235
|
node.updatePosition = function() {};
|
|
20236
20236
|
node.resetCrop = function() {};
|
|
20237
20237
|
node.handleMouseover = function() {};
|
|
@@ -20420,7 +20420,10 @@ var WeaveNode = class {
|
|
|
20420
20420
|
const nodesEdgeSnappingPlugin = this.getNodesEdgeSnappingPlugin();
|
|
20421
20421
|
if (nodesSelectionPlugin && this.isSelecting() && this.isNodeSelected(node$1)) nodesSelectionPlugin.getTransformer().forceUpdate();
|
|
20422
20422
|
if (nodesEdgeSnappingPlugin && transforming && this.isSelecting() && this.isNodeSelected(node$1)) nodesEdgeSnappingPlugin.evaluateGuidelines(e);
|
|
20423
|
-
|
|
20423
|
+
let parentId = node$1.getParent()?.id() ?? "";
|
|
20424
|
+
const parent = node$1.getParent();
|
|
20425
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
20426
|
+
this.getUsersPresencePlugin()?.setPresence(node$1.id(), parentId, {
|
|
20424
20427
|
x: node$1.x(),
|
|
20425
20428
|
y: node$1.y(),
|
|
20426
20429
|
width: node$1.width(),
|
|
@@ -20476,10 +20479,9 @@ var WeaveNode = class {
|
|
|
20476
20479
|
node.off("dragstart");
|
|
20477
20480
|
node.on("dragstart", (e) => {
|
|
20478
20481
|
const nodeTarget = e.target;
|
|
20479
|
-
|
|
20482
|
+
let isWheelMousePressed = false;
|
|
20483
|
+
if (e.evt.button === 1) isWheelMousePressed = true;
|
|
20480
20484
|
this.getNodesSelectionFeedbackPlugin()?.hideSelectionHalo(nodeTarget);
|
|
20481
|
-
this.getSelectionPlugin()?.saveDragSelectedNodes();
|
|
20482
|
-
if (this.getSelectionPlugin()?.getDragSelectedNodes().length === 1) this.getSelectionPlugin()?.setNodesOpacityOnDrag();
|
|
20483
20485
|
const canMove = nodeTarget?.canDrag() ?? false;
|
|
20484
20486
|
if (!canMove) {
|
|
20485
20487
|
nodeTarget.stopDrag();
|
|
@@ -20496,7 +20498,7 @@ var WeaveNode = class {
|
|
|
20496
20498
|
return;
|
|
20497
20499
|
}
|
|
20498
20500
|
this.instance.emitEvent("onDrag", nodeTarget);
|
|
20499
|
-
if (
|
|
20501
|
+
if (isWheelMousePressed) {
|
|
20500
20502
|
e.cancelBubble = true;
|
|
20501
20503
|
nodeTarget.stopDrag();
|
|
20502
20504
|
}
|
|
@@ -20513,6 +20515,7 @@ var WeaveNode = class {
|
|
|
20513
20515
|
originalNode = realNodeTarget.clone();
|
|
20514
20516
|
originalContainer = realNodeTarget.getParent();
|
|
20515
20517
|
if (originalContainer?.getAttrs().nodeId) originalContainer = stage.findOne(`#${originalContainer.getAttrs().nodeId}`);
|
|
20518
|
+
realNodeTarget.fire("nodeDragStart", { node: realNodeTarget });
|
|
20516
20519
|
if (e.evt?.altKey) {
|
|
20517
20520
|
nodeTarget.setAttrs({ isCloneOrigin: true });
|
|
20518
20521
|
nodeTarget.setAttrs({ isCloned: false });
|
|
@@ -20541,19 +20544,20 @@ var WeaveNode = class {
|
|
|
20541
20544
|
});
|
|
20542
20545
|
const handleDragMove = (e) => {
|
|
20543
20546
|
const nodeTarget = e.target;
|
|
20547
|
+
let isWheelMousePressed = false;
|
|
20548
|
+
if (e.evt.button === 1) isWheelMousePressed = true;
|
|
20544
20549
|
e.cancelBubble = true;
|
|
20545
20550
|
if (e.evt?.buttons === 0) {
|
|
20546
20551
|
nodeTarget.stopDrag();
|
|
20547
20552
|
return;
|
|
20548
20553
|
}
|
|
20549
20554
|
this.didMove = true;
|
|
20550
|
-
const stage$1 = this.instance.getStage();
|
|
20551
20555
|
const isErasing = this.instance.getActiveAction() === "eraseTool";
|
|
20552
20556
|
if (isErasing) {
|
|
20553
20557
|
nodeTarget.stopDrag();
|
|
20554
20558
|
return;
|
|
20555
20559
|
}
|
|
20556
|
-
if (
|
|
20560
|
+
if (isWheelMousePressed) {
|
|
20557
20561
|
e.cancelBubble = true;
|
|
20558
20562
|
nodeTarget.stopDrag();
|
|
20559
20563
|
return;
|
|
@@ -20568,7 +20572,10 @@ var WeaveNode = class {
|
|
|
20568
20572
|
}
|
|
20569
20573
|
if (this.isSelecting() && this.getSelectionPlugin()?.getSelectedNodes().length === 1) {
|
|
20570
20574
|
clearContainerTargets(this.instance);
|
|
20571
|
-
|
|
20575
|
+
let parentId = realNodeTarget.getParent()?.id() ?? "";
|
|
20576
|
+
const parent = realNodeTarget.getParent();
|
|
20577
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
20578
|
+
this.getUsersPresencePlugin()?.setPresence(realNodeTarget.id(), parentId, {
|
|
20572
20579
|
x: realNodeTarget.x(),
|
|
20573
20580
|
y: realNodeTarget.y()
|
|
20574
20581
|
});
|
|
@@ -20603,7 +20610,7 @@ var WeaveNode = class {
|
|
|
20603
20610
|
startPosition = null;
|
|
20604
20611
|
lockedAxis = null;
|
|
20605
20612
|
isShiftPressed = false;
|
|
20606
|
-
|
|
20613
|
+
this.getSelectionPlugin()?.restoreNodesOpacityOnDrag();
|
|
20607
20614
|
if (this.getSelectionPlugin()?.getSelectedNodes().length === 1) {
|
|
20608
20615
|
this.instance.releaseMutexLock();
|
|
20609
20616
|
this.getNodesSelectionFeedbackPlugin()?.showSelectionHalo(nodeTarget);
|
|
@@ -20667,11 +20674,11 @@ var WeaveNode = class {
|
|
|
20667
20674
|
originalPosition = realNodeTarget.getAbsolutePosition();
|
|
20668
20675
|
});
|
|
20669
20676
|
if (!node.getAttrs().overridesMouseControl) {
|
|
20670
|
-
node.handleMouseover = () => {
|
|
20671
|
-
this.handleMouseOver(node);
|
|
20677
|
+
node.handleMouseover = (e) => {
|
|
20678
|
+
this.handleMouseOver(e, node);
|
|
20672
20679
|
};
|
|
20673
|
-
node.handleMouseout = () => {
|
|
20674
|
-
this.handleMouseout(node);
|
|
20680
|
+
node.handleMouseout = (e) => {
|
|
20681
|
+
this.handleMouseout(e, node);
|
|
20675
20682
|
};
|
|
20676
20683
|
}
|
|
20677
20684
|
node.on("xChange yChange", () => {
|
|
@@ -20699,20 +20706,21 @@ var WeaveNode = class {
|
|
|
20699
20706
|
};
|
|
20700
20707
|
node.on("pointerover", (e) => {
|
|
20701
20708
|
const realNodeTarget = this.getRealSelectedNode(e.target);
|
|
20702
|
-
realNodeTarget?.handleMouseover?.();
|
|
20703
|
-
const doCancelBubble = this.handleMouseOver(e.target);
|
|
20709
|
+
realNodeTarget?.handleMouseover?.(e);
|
|
20710
|
+
const doCancelBubble = this.handleMouseOver(e, e.target);
|
|
20704
20711
|
if (doCancelBubble) e.cancelBubble = true;
|
|
20705
20712
|
});
|
|
20706
20713
|
node.on("pointerleave", (e) => {
|
|
20707
20714
|
const realNodeTarget = this.getRealSelectedNode(e.target);
|
|
20708
|
-
realNodeTarget?.handleMouseout?.();
|
|
20709
|
-
this.handleMouseout(e.target);
|
|
20715
|
+
realNodeTarget?.handleMouseout?.(e);
|
|
20716
|
+
this.handleMouseout(e, e.target);
|
|
20710
20717
|
});
|
|
20711
20718
|
}
|
|
20712
20719
|
}
|
|
20713
|
-
handleMouseOver(node) {
|
|
20720
|
+
handleMouseOver(e, node) {
|
|
20714
20721
|
const stage = this.instance.getStage();
|
|
20715
|
-
|
|
20722
|
+
const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
|
|
20723
|
+
if (isCtrlOrMetaPressed) return false;
|
|
20716
20724
|
const user = this.instance.getStore().getUser();
|
|
20717
20725
|
const activeAction = this.instance.getActiveAction();
|
|
20718
20726
|
const isNodeSelectionEnabled = this.getSelectionPlugin()?.isEnabled();
|
|
@@ -20746,9 +20754,9 @@ var WeaveNode = class {
|
|
|
20746
20754
|
else this.hideHoverState();
|
|
20747
20755
|
return cancelBubble;
|
|
20748
20756
|
}
|
|
20749
|
-
handleMouseout(node) {
|
|
20750
|
-
const
|
|
20751
|
-
if (
|
|
20757
|
+
handleMouseout(e, node) {
|
|
20758
|
+
const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
|
|
20759
|
+
if (isCtrlOrMetaPressed) return;
|
|
20752
20760
|
const realNode = this.instance.getInstanceRecursive(node);
|
|
20753
20761
|
if (realNode) this.hideHoverState();
|
|
20754
20762
|
}
|
|
@@ -20780,7 +20788,6 @@ var WeaveNode = class {
|
|
|
20780
20788
|
delete cleanedAttrs.mutexUserId;
|
|
20781
20789
|
delete cleanedAttrs.draggable;
|
|
20782
20790
|
delete cleanedAttrs.overridesMouseControl;
|
|
20783
|
-
delete cleanedAttrs.onMoveContainer;
|
|
20784
20791
|
delete cleanedAttrs.dragBoundFunc;
|
|
20785
20792
|
return {
|
|
20786
20793
|
key: attrs.id ?? "",
|
|
@@ -21395,45 +21402,24 @@ var WeaveTargetingManager = class {
|
|
|
21395
21402
|
}
|
|
21396
21403
|
getMousePointer(point) {
|
|
21397
21404
|
this.logger.debug({ point }, "getMousePointer");
|
|
21398
|
-
const stage = this.instance.getStage();
|
|
21399
21405
|
const mainLayer = this.instance.getMainLayer();
|
|
21400
21406
|
let relativeMousePointer = typeof point !== "undefined" ? point : mainLayer?.getRelativePointerPosition() ?? {
|
|
21401
21407
|
x: 0,
|
|
21402
21408
|
y: 0
|
|
21403
21409
|
};
|
|
21404
|
-
let measureContainer = mainLayer;
|
|
21405
|
-
let container = mainLayer;
|
|
21406
21410
|
const utilityLayer = this.instance.getUtilityLayer();
|
|
21407
21411
|
if (utilityLayer) utilityLayer.visible(false);
|
|
21412
|
+
let containerAlt = containerOverCursor(this.instance, [], relativeMousePointer);
|
|
21413
|
+
if (!containerAlt) containerAlt = this.instance.getMainLayer();
|
|
21408
21414
|
const nodesSelection = this.instance.getPlugin("nodesSelection");
|
|
21409
21415
|
if (nodesSelection) nodesSelection.getTransformer().visible(false);
|
|
21410
|
-
|
|
21411
|
-
width: 10,
|
|
21412
|
-
height: 10,
|
|
21413
|
-
x: relativeMousePointer.x,
|
|
21414
|
-
y: relativeMousePointer.y
|
|
21415
|
-
});
|
|
21416
|
-
mainLayer?.add(dummyRect);
|
|
21417
|
-
const intersectedNode = this.nodeIntersectsContainerElement(dummyRect);
|
|
21418
|
-
if (intersectedNode) {
|
|
21419
|
-
const containerOfNode = stage.findOne(`#${intersectedNode.getAttrs().containerId}`);
|
|
21420
|
-
if (containerOfNode) {
|
|
21421
|
-
container = intersectedNode;
|
|
21422
|
-
measureContainer = containerOfNode;
|
|
21423
|
-
}
|
|
21424
|
-
}
|
|
21425
|
-
if (typeof point === "undefined" && container?.getAttrs().nodeType !== "layer") relativeMousePointer = measureContainer?.getRelativePointerPosition() ?? relativeMousePointer;
|
|
21426
|
-
if (typeof point === "undefined" && container?.getAttrs().nodeType === "layer") relativeMousePointer = measureContainer?.getRelativePointerPosition() ?? {
|
|
21427
|
-
x: 0,
|
|
21428
|
-
y: 0
|
|
21429
|
-
};
|
|
21416
|
+
relativeMousePointer = containerAlt?.getRelativePointerPosition() ?? relativeMousePointer;
|
|
21430
21417
|
if (utilityLayer) utilityLayer.visible(true);
|
|
21431
21418
|
if (nodesSelection) nodesSelection.getTransformer().visible(true);
|
|
21432
|
-
dummyRect.destroy();
|
|
21433
21419
|
return {
|
|
21434
21420
|
mousePoint: relativeMousePointer,
|
|
21435
|
-
container,
|
|
21436
|
-
measureContainer
|
|
21421
|
+
container: containerAlt,
|
|
21422
|
+
measureContainer: containerAlt
|
|
21437
21423
|
};
|
|
21438
21424
|
}
|
|
21439
21425
|
getMousePointerRelativeToContainer(container) {
|
|
@@ -22022,7 +22008,7 @@ var WeaveRegisterManager = class {
|
|
|
22022
22008
|
|
|
22023
22009
|
//#endregion
|
|
22024
22010
|
//#region package.json
|
|
22025
|
-
var version = "3.
|
|
22011
|
+
var version = "3.8.1-SNAPSHOT.191.1";
|
|
22026
22012
|
|
|
22027
22013
|
//#endregion
|
|
22028
22014
|
//#region src/managers/setup.ts
|
|
@@ -23462,13 +23448,12 @@ var Weave = class {
|
|
|
23462
23448
|
this.moduleLogger.info("Start instance");
|
|
23463
23449
|
if (!this.isServerSide()) {
|
|
23464
23450
|
this.eventsController = new AbortController();
|
|
23465
|
-
|
|
23451
|
+
window.weave = this;
|
|
23466
23452
|
}
|
|
23467
23453
|
this.emitEvent("onRoomLoaded", false);
|
|
23468
23454
|
this.status = WEAVE_INSTANCE_STATUS.STARTING;
|
|
23469
23455
|
this.emitEvent("onInstanceStatus", this.status);
|
|
23470
23456
|
await this.registerManager.registerNodesHandlers();
|
|
23471
|
-
this.augmentKonvaStageClass();
|
|
23472
23457
|
this.augmentKonvaNodeClass();
|
|
23473
23458
|
this.registerManager.registerPlugins();
|
|
23474
23459
|
this.registerManager.registerActionsHandlers();
|
|
@@ -23540,9 +23525,6 @@ var Weave = class {
|
|
|
23540
23525
|
getConfiguration() {
|
|
23541
23526
|
return this.config;
|
|
23542
23527
|
}
|
|
23543
|
-
augmentKonvaStageClass() {
|
|
23544
|
-
augmentKonvaStageClass();
|
|
23545
|
-
}
|
|
23546
23528
|
augmentKonvaNodeClass(config) {
|
|
23547
23529
|
augmentKonvaNodeClass(config);
|
|
23548
23530
|
}
|
|
@@ -24315,8 +24297,6 @@ const setupUpscaleStage = (instance, stage) => {
|
|
|
24315
24297
|
var WeaveStageNode = class extends WeaveNode {
|
|
24316
24298
|
nodeType = WEAVE_STAGE_NODE_TYPE;
|
|
24317
24299
|
stageFocused = false;
|
|
24318
|
-
wheelMousePressed = false;
|
|
24319
|
-
isCmdCtrlPressed = false;
|
|
24320
24300
|
globalEventsInitialized = false;
|
|
24321
24301
|
initialize = void 0;
|
|
24322
24302
|
onRender(props) {
|
|
@@ -24325,9 +24305,7 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24325
24305
|
mode: "default"
|
|
24326
24306
|
});
|
|
24327
24307
|
setupUpscaleStage(this.instance, stage);
|
|
24328
|
-
this.wheelMousePressed = false;
|
|
24329
24308
|
stage.isFocused = () => this.stageFocused;
|
|
24330
|
-
stage.isMouseWheelPressed = () => this.wheelMousePressed;
|
|
24331
24309
|
stage.position({
|
|
24332
24310
|
x: 0,
|
|
24333
24311
|
y: 0
|
|
@@ -24363,8 +24341,7 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24363
24341
|
};
|
|
24364
24342
|
stage.handleMouseout = function() {};
|
|
24365
24343
|
stage.mode(WEAVE_STAGE_DEFAULT_MODE);
|
|
24366
|
-
stage.on("pointerdown", (
|
|
24367
|
-
if (e.evt.button === 1) this.wheelMousePressed = true;
|
|
24344
|
+
stage.on("pointerdown", () => {
|
|
24368
24345
|
if (!this.instance.isServerSide() && [MOVE_TOOL_ACTION_NAME].includes(this.instance.getActiveAction() ?? "")) stage.container().style.cursor = "grabbing";
|
|
24369
24346
|
});
|
|
24370
24347
|
stage.on("pointermove", (e) => {
|
|
@@ -24378,9 +24355,8 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24378
24355
|
stage$1.container().style.cursor = "default";
|
|
24379
24356
|
}
|
|
24380
24357
|
});
|
|
24381
|
-
stage.on("pointerup", (
|
|
24358
|
+
stage.on("pointerup", () => {
|
|
24382
24359
|
const activeAction = this.instance.getActiveAction();
|
|
24383
|
-
if (e.evt.button === 1) this.wheelMousePressed = false;
|
|
24384
24360
|
if (!this.instance.isServerSide() && [MOVE_TOOL_ACTION_NAME].includes(activeAction ?? "")) stage.container().style.cursor = "grab";
|
|
24385
24361
|
});
|
|
24386
24362
|
stage.on("pointerover", (e) => {
|
|
@@ -24392,7 +24368,6 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24392
24368
|
this.hideHoverState();
|
|
24393
24369
|
if (!this.instance.isServerSide()) stage.container().style.cursor = "default";
|
|
24394
24370
|
});
|
|
24395
|
-
stage.isCmdCtrlPressed = () => this.isCmdCtrlPressed;
|
|
24396
24371
|
this.setupEvents();
|
|
24397
24372
|
return stage;
|
|
24398
24373
|
}
|
|
@@ -24400,12 +24375,8 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24400
24375
|
setupEvents() {
|
|
24401
24376
|
if (this.globalEventsInitialized) return;
|
|
24402
24377
|
if (this.instance.isServerSide()) return;
|
|
24403
|
-
window.addEventListener("blur", () => {
|
|
24404
|
-
this.isCmdCtrlPressed = false;
|
|
24405
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
24406
24378
|
window.addEventListener("keydown", (e) => {
|
|
24407
24379
|
if (this.isOnlyCtrlOrMeta(e)) {
|
|
24408
|
-
this.isCmdCtrlPressed = true;
|
|
24409
24380
|
this.instance.getStage().container().style.cursor = "default";
|
|
24410
24381
|
const transformer = this.getSelectionPlugin()?.getTransformer();
|
|
24411
24382
|
if (!transformer) return;
|
|
@@ -24416,7 +24387,6 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24416
24387
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
24417
24388
|
window.addEventListener("keyup", (e) => {
|
|
24418
24389
|
if (!(e.ctrlKey || e.metaKey)) {
|
|
24419
|
-
this.isCmdCtrlPressed = false;
|
|
24420
24390
|
this.instance.getStage().container().style.cursor = "default";
|
|
24421
24391
|
const transformer = this.getSelectionPlugin()?.getTransformer();
|
|
24422
24392
|
if (!transformer) return;
|
|
@@ -24469,7 +24439,6 @@ var WeaveLayerNode = class extends WeaveNode {
|
|
|
24469
24439
|
delete cleanedAttrs.mutexUserId;
|
|
24470
24440
|
delete cleanedAttrs.draggable;
|
|
24471
24441
|
delete cleanedAttrs.overridesMouseControl;
|
|
24472
|
-
delete cleanedAttrs.onMoveContainer;
|
|
24473
24442
|
delete cleanedAttrs.dragBoundFunc;
|
|
24474
24443
|
return {
|
|
24475
24444
|
key: attrs.id ?? "",
|
|
@@ -24554,7 +24523,6 @@ var WeaveGroupNode = class extends WeaveNode {
|
|
|
24554
24523
|
delete cleanedAttrs.mutexUserId;
|
|
24555
24524
|
delete cleanedAttrs.draggable;
|
|
24556
24525
|
delete cleanedAttrs.overridesMouseControl;
|
|
24557
|
-
delete cleanedAttrs.onMoveContainer;
|
|
24558
24526
|
delete cleanedAttrs.dragBoundFunc;
|
|
24559
24527
|
return {
|
|
24560
24528
|
key: attrs.id ?? "",
|
|
@@ -25097,28 +25065,12 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25097
25065
|
}
|
|
25098
25066
|
initialize() {
|
|
25099
25067
|
this.keyPressHandler = void 0;
|
|
25100
|
-
this.eventsInitialized = false;
|
|
25101
|
-
this.isCtrlMetaPressed = false;
|
|
25102
25068
|
this.textAreaSuperContainer = null;
|
|
25103
25069
|
this.textAreaContainer = null;
|
|
25104
25070
|
this.textArea = null;
|
|
25105
25071
|
this.editing = false;
|
|
25106
25072
|
this.textArea = null;
|
|
25107
25073
|
}
|
|
25108
|
-
initEvents() {
|
|
25109
|
-
if (!this.eventsInitialized && !globalThis._weave_isServerSide) {
|
|
25110
|
-
window.addEventListener("blur", () => {
|
|
25111
|
-
this.isCtrlMetaPressed = false;
|
|
25112
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
25113
|
-
window.addEventListener("keydown", (e) => {
|
|
25114
|
-
if (e.ctrlKey || e.metaKey) this.isCtrlMetaPressed = true;
|
|
25115
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
25116
|
-
window.addEventListener("keyup", (e) => {
|
|
25117
|
-
if (!(e.ctrlKey || e.metaKey)) this.isCtrlMetaPressed = false;
|
|
25118
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
25119
|
-
this.eventsInitialized = true;
|
|
25120
|
-
}
|
|
25121
|
-
}
|
|
25122
25074
|
updateNode(nodeInstance) {
|
|
25123
25075
|
const actNode = this.instance.getStage().findOne(`#${nodeInstance.id()}`);
|
|
25124
25076
|
if (actNode) {
|
|
@@ -25154,7 +25106,6 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25154
25106
|
}
|
|
25155
25107
|
}
|
|
25156
25108
|
onRender(props) {
|
|
25157
|
-
this.initEvents();
|
|
25158
25109
|
const text = new Konva.Text({
|
|
25159
25110
|
...props,
|
|
25160
25111
|
name: "node",
|
|
@@ -25221,6 +25172,7 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25221
25172
|
text.setAttr("triggerEditMode", this.triggerEditMode.bind(this));
|
|
25222
25173
|
let actualAnchor = void 0;
|
|
25223
25174
|
text.on("transformstart", (e) => {
|
|
25175
|
+
const isCtrlOrMetaPressed = e.evt.ctrlKey || e.evt.metaKey;
|
|
25224
25176
|
this.instance.emitEvent("onTransform", e.target);
|
|
25225
25177
|
actualAnchor = this.getNodesSelectionPlugin()?.getTransformer()?.getActiveAnchor();
|
|
25226
25178
|
if (text.getAttrs().layout === TEXT_LAYOUT.SMART && [
|
|
@@ -25228,7 +25180,7 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25228
25180
|
"top-right",
|
|
25229
25181
|
"bottom-left",
|
|
25230
25182
|
"bottom-right"
|
|
25231
|
-
].includes(actualAnchor ?? "") || text.getAttrs().layout === TEXT_LAYOUT.FIXED &&
|
|
25183
|
+
].includes(actualAnchor ?? "") || text.getAttrs().layout === TEXT_LAYOUT.FIXED && isCtrlOrMetaPressed) this.getNodesSelectionPlugin()?.getTransformer()?.keepRatio(true);
|
|
25232
25184
|
else this.getNodesSelectionPlugin()?.getTransformer()?.keepRatio(false);
|
|
25233
25185
|
if ([TEXT_LAYOUT.AUTO_HEIGHT, TEXT_LAYOUT.SMART].includes(text.getAttrs().layout) && ["middle-right", "middle-left"].includes(actualAnchor ?? "")) {
|
|
25234
25186
|
text.wrap("word");
|
|
@@ -25359,7 +25311,6 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25359
25311
|
delete cleanedAttrs.measureMultilineText;
|
|
25360
25312
|
delete cleanedAttrs.overridesMouseControl;
|
|
25361
25313
|
delete cleanedAttrs.shouldUpdateOnTransform;
|
|
25362
|
-
delete cleanedAttrs.onMoveContainer;
|
|
25363
25314
|
delete cleanedAttrs.dragBoundFunc;
|
|
25364
25315
|
return {
|
|
25365
25316
|
key: attrs.id ?? "",
|
|
@@ -25751,13 +25702,14 @@ const WEAVE_IMAGE_CROP_ANCHOR_POSITION = {
|
|
|
25751
25702
|
["BOTTOM_CENTER"]: "bottom-center"
|
|
25752
25703
|
};
|
|
25753
25704
|
const WEAVE_IMAGE_DEFAULT_CONFIG = {
|
|
25705
|
+
cleanup: { intervalMs: 60 * 1e3 },
|
|
25754
25706
|
performance: { cache: { enabled: false } },
|
|
25755
25707
|
style: {
|
|
25756
25708
|
placeholder: { fill: "#aaaaaa" },
|
|
25757
25709
|
cursor: { loading: "wait" }
|
|
25758
25710
|
},
|
|
25759
25711
|
imageLoading: {
|
|
25760
|
-
maxRetryAttempts:
|
|
25712
|
+
maxRetryAttempts: 3,
|
|
25761
25713
|
retryDelayMs: 2e3
|
|
25762
25714
|
},
|
|
25763
25715
|
crossOrigin: "anonymous",
|
|
@@ -26140,7 +26092,8 @@ var WeaveImageCrop = class WeaveImageCrop {
|
|
|
26140
26092
|
this.onClose();
|
|
26141
26093
|
const utilityLayer = this.instance.getUtilityLayer();
|
|
26142
26094
|
utilityLayer?.destroyChildren();
|
|
26143
|
-
|
|
26095
|
+
const isCtrlOrMetaPressed = e.ctrlKey || e.metaKey;
|
|
26096
|
+
if (isCtrlOrMetaPressed && utilityLayer) {
|
|
26144
26097
|
this.node.renderCropMode(utilityLayer, this.image);
|
|
26145
26098
|
utilityLayer.show();
|
|
26146
26099
|
}
|
|
@@ -26449,6 +26402,25 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26449
26402
|
this.imageTryoutAttempts = {};
|
|
26450
26403
|
this.imageFallback = {};
|
|
26451
26404
|
}
|
|
26405
|
+
setupNotUsedImagesCleanup() {
|
|
26406
|
+
const cleanupHandler = () => {
|
|
26407
|
+
this.notUsedImagesCleanup = null;
|
|
26408
|
+
const stage = this.instance.getStage();
|
|
26409
|
+
const nodesIds = Object.keys(this.imageState);
|
|
26410
|
+
for (const nodeId of nodesIds) {
|
|
26411
|
+
const node = stage.findOne(`#${nodeId}`);
|
|
26412
|
+
if (!node) {
|
|
26413
|
+
delete this.imageSource[nodeId];
|
|
26414
|
+
delete this.imageState[nodeId];
|
|
26415
|
+
delete this.imageTryoutAttempts[nodeId];
|
|
26416
|
+
delete this.imageFallback[nodeId];
|
|
26417
|
+
}
|
|
26418
|
+
}
|
|
26419
|
+
this.setupNotUsedImagesCleanup();
|
|
26420
|
+
};
|
|
26421
|
+
const bindedCleanupHandler = cleanupHandler.bind(this);
|
|
26422
|
+
if (!this.notUsedImagesCleanup) setTimeout(bindedCleanupHandler, this.config.cleanup.intervalMs);
|
|
26423
|
+
}
|
|
26452
26424
|
preloadCursors() {
|
|
26453
26425
|
return new Promise((resolve) => {
|
|
26454
26426
|
(async () => {
|
|
@@ -26525,6 +26497,7 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26525
26497
|
this.instance.resolveAsyncElement(nodeId, WEAVE_IMAGE_NODE_TYPE);
|
|
26526
26498
|
}
|
|
26527
26499
|
onRender(props) {
|
|
26500
|
+
this.setupNotUsedImagesCleanup();
|
|
26528
26501
|
const imageProperties = props.imageProperties;
|
|
26529
26502
|
const imageProps = props;
|
|
26530
26503
|
const { id } = imageProps;
|
|
@@ -26550,11 +26523,6 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26550
26523
|
if (this.isSelecting() && selectedNodes.includes(image)) return "grab";
|
|
26551
26524
|
return "pointer";
|
|
26552
26525
|
};
|
|
26553
|
-
image.movedToContainer = () => {
|
|
26554
|
-
const stage = this.instance.getStage();
|
|
26555
|
-
const image$1 = stage.findOne(`#${id}`);
|
|
26556
|
-
if (!image$1) return;
|
|
26557
|
-
};
|
|
26558
26526
|
if (this.config.cropMode.enabled) {
|
|
26559
26527
|
image.triggerCrop = () => {
|
|
26560
26528
|
this.triggerCrop(image, { cmdCtrl: { triggered: false } });
|
|
@@ -26676,23 +26644,36 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26676
26644
|
if (this.imageCrop) this.closeCrop(image, WEAVE_IMAGE_CROP_END_TYPE.CANCEL);
|
|
26677
26645
|
}
|
|
26678
26646
|
});
|
|
26647
|
+
image.on("nodeDragStart", () => {
|
|
26648
|
+
const utilityLayer = this.instance.getUtilityLayer();
|
|
26649
|
+
if (!utilityLayer) return;
|
|
26650
|
+
const nodes = utilityLayer?.find(".cropMode") ?? [];
|
|
26651
|
+
nodes.forEach((n) => {
|
|
26652
|
+
n.destroy();
|
|
26653
|
+
});
|
|
26654
|
+
const transformer = this.getSelectionPlugin()?.getTransformer();
|
|
26655
|
+
if (!transformer) return;
|
|
26656
|
+
transformer.show();
|
|
26657
|
+
});
|
|
26679
26658
|
if (this.config.cropMode.enabled && this.config.cropMode.triggers.ctrlCmd) {
|
|
26680
26659
|
image.on("onCmdCtrlPressed", () => {
|
|
26660
|
+
const utilityLayer = this.instance.getUtilityLayer();
|
|
26661
|
+
if (!utilityLayer) return;
|
|
26662
|
+
if (image.isDragging()) return;
|
|
26681
26663
|
const transformer = this.getSelectionPlugin()?.getTransformer();
|
|
26682
26664
|
if (!transformer) return;
|
|
26683
26665
|
transformer.hide();
|
|
26684
|
-
const utilityLayer = this.instance.getUtilityLayer();
|
|
26685
|
-
if (!utilityLayer) return;
|
|
26686
26666
|
utilityLayer?.destroyChildren();
|
|
26687
26667
|
this.renderCropMode(utilityLayer, image);
|
|
26688
26668
|
utilityLayer?.show();
|
|
26689
26669
|
});
|
|
26690
26670
|
image.on("onCmdCtrlReleased", () => {
|
|
26671
|
+
const utilityLayer = this.instance.getUtilityLayer();
|
|
26672
|
+
if (!utilityLayer) return;
|
|
26673
|
+
if (image.isDragging()) return;
|
|
26691
26674
|
const transformer = this.getSelectionPlugin()?.getTransformer();
|
|
26692
26675
|
if (!transformer) return;
|
|
26693
26676
|
transformer.show();
|
|
26694
|
-
const utilityLayer = this.instance.getUtilityLayer();
|
|
26695
|
-
if (!utilityLayer) return;
|
|
26696
26677
|
utilityLayer?.destroyChildren();
|
|
26697
26678
|
});
|
|
26698
26679
|
}
|
|
@@ -26751,6 +26732,7 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26751
26732
|
fill: "transparent",
|
|
26752
26733
|
strokeScaleEnabled: false,
|
|
26753
26734
|
strokeWidth: 2,
|
|
26735
|
+
name: "cropMode",
|
|
26754
26736
|
stroke: "#1a1aff",
|
|
26755
26737
|
draggable: false,
|
|
26756
26738
|
listening: false,
|
|
@@ -26811,6 +26793,7 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26811
26793
|
}));
|
|
26812
26794
|
const anchor = new Konva.Rect({
|
|
26813
26795
|
draggable: false,
|
|
26796
|
+
name: "cropMode",
|
|
26814
26797
|
rotation: node.rotation()
|
|
26815
26798
|
});
|
|
26816
26799
|
this.config.cropMode.selection.anchorStyleFunc(anchor, position);
|
|
@@ -27251,20 +27234,15 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
27251
27234
|
}
|
|
27252
27235
|
onDestroy(nodeInstance) {
|
|
27253
27236
|
const nodeId = nodeInstance.getAttrs().id ?? "";
|
|
27254
|
-
const isMoveContainer = nodeInstance.getAttr("onMoveContainer");
|
|
27255
|
-
nodeInstance.setAttr("onMoveContainer", void 0);
|
|
27256
27237
|
const utilityLayer = this.instance.getUtilityLayer();
|
|
27257
|
-
utilityLayer?.
|
|
27238
|
+
const nodes = utilityLayer?.find(".cropMode") ?? [];
|
|
27239
|
+
nodes.forEach((n) => {
|
|
27240
|
+
n.destroy();
|
|
27241
|
+
});
|
|
27258
27242
|
if (this.imageTryoutIds[nodeId]) {
|
|
27259
27243
|
clearTimeout(this.imageTryoutIds[nodeId]);
|
|
27260
27244
|
delete this.imageTryoutIds[nodeId];
|
|
27261
27245
|
}
|
|
27262
|
-
if (!isMoveContainer) {
|
|
27263
|
-
delete this.imageSource[nodeId];
|
|
27264
|
-
delete this.imageState[nodeId];
|
|
27265
|
-
delete this.imageTryoutAttempts[nodeId];
|
|
27266
|
-
delete this.imageFallback[nodeId];
|
|
27267
|
-
}
|
|
27268
27246
|
nodeInstance.destroy();
|
|
27269
27247
|
}
|
|
27270
27248
|
};
|
|
@@ -27811,7 +27789,6 @@ var WeaveFrameNode = class extends WeaveNode {
|
|
|
27811
27789
|
delete cleanedAttrs.draggable;
|
|
27812
27790
|
delete cleanedAttrs.onTargetEnter;
|
|
27813
27791
|
delete cleanedAttrs.overridesMouseControl;
|
|
27814
|
-
delete cleanedAttrs.onMoveContainer;
|
|
27815
27792
|
delete cleanedAttrs.dragBoundFunc;
|
|
27816
27793
|
return {
|
|
27817
27794
|
key: realAttrs?.id ?? "",
|
|
@@ -28050,7 +28027,6 @@ var WeaveStrokeNode = class extends WeaveNode {
|
|
|
28050
28027
|
delete cleanedAttrs.sceneFunc;
|
|
28051
28028
|
delete cleanedAttrs.hitFunc;
|
|
28052
28029
|
delete cleanedAttrs.overridesMouseControl;
|
|
28053
|
-
delete cleanedAttrs.onMoveContainer;
|
|
28054
28030
|
delete cleanedAttrs.dragBoundFunc;
|
|
28055
28031
|
return {
|
|
28056
28032
|
key: attrs.id ?? "",
|
|
@@ -29595,6 +29571,7 @@ var WeaveVideoNode = class extends WeaveNode {
|
|
|
29595
29571
|
const videoIconGroup = video.findOne(`#${id}-video-icon-group`);
|
|
29596
29572
|
if (!videoPlaceholder || !videoIconGroup) return;
|
|
29597
29573
|
const realVideoPlaceholderURL = this.config.urlTransformer?.(videoProps.videoPlaceholderURL ?? "", video) ?? videoProps.videoPlaceholderURL;
|
|
29574
|
+
if (!this.videoPlaceholder) this.initialize();
|
|
29598
29575
|
this.videoPlaceholder[id] = Konva.Util.createImageElement();
|
|
29599
29576
|
this.videoPlaceholder[id].crossOrigin = this.config.crossOrigin;
|
|
29600
29577
|
this.videoPlaceholder[id].src = realVideoPlaceholderURL;
|
|
@@ -29859,16 +29836,16 @@ var WeaveVideoNode = class extends WeaveNode {
|
|
|
29859
29836
|
}
|
|
29860
29837
|
if (isServer()) this.instance.updateNode(this.serialize(videoGroup));
|
|
29861
29838
|
const defaultHandleMouseover = videoGroup.handleMouseover;
|
|
29862
|
-
videoGroup.handleMouseover = () => {
|
|
29863
|
-
defaultHandleMouseover.call(this);
|
|
29839
|
+
videoGroup.handleMouseover = (e) => {
|
|
29840
|
+
defaultHandleMouseover.call(this, e);
|
|
29864
29841
|
if (this.config.style.track.onlyOnHover && this.videoState[id].loaded) {
|
|
29865
29842
|
const videoProgress = videoGroup.findOne(`#${id}-video-progress`);
|
|
29866
29843
|
videoProgress?.show();
|
|
29867
29844
|
}
|
|
29868
29845
|
};
|
|
29869
29846
|
const defaultHandleMouseout = videoGroup.handleMouseout;
|
|
29870
|
-
videoGroup.handleMouseout = () => {
|
|
29871
|
-
defaultHandleMouseout.call(this);
|
|
29847
|
+
videoGroup.handleMouseout = (e) => {
|
|
29848
|
+
defaultHandleMouseout.call(e, this);
|
|
29872
29849
|
if (this.config.style.track.onlyOnHover && this.videoState[id].loaded && !this.videoState[id].paused) {
|
|
29873
29850
|
const videoProgress = videoGroup.findOne(`#${id}-video-progress`);
|
|
29874
29851
|
videoProgress?.hide();
|
|
@@ -31982,7 +31959,6 @@ var WeaveConnectorNode = class extends WeaveNode {
|
|
|
31982
31959
|
delete cleanedAttrs.startInfoLoaded;
|
|
31983
31960
|
delete cleanedAttrs.endInfoLoaded;
|
|
31984
31961
|
delete cleanedAttrs.overridesMouseControl;
|
|
31985
|
-
delete cleanedAttrs.onMoveContainer;
|
|
31986
31962
|
delete cleanedAttrs.dragBoundFunc;
|
|
31987
31963
|
return {
|
|
31988
31964
|
key: attrs.id ?? "",
|
|
@@ -32138,7 +32114,6 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
|
|
|
32138
32114
|
this.zooming = false;
|
|
32139
32115
|
this.isTrackpad = false;
|
|
32140
32116
|
this.zoomVelocity = 0;
|
|
32141
|
-
this.isCtrlOrMetaPressed = false;
|
|
32142
32117
|
this.updatedMinimumZoom = false;
|
|
32143
32118
|
this.actualStep = this.config.zoomSteps.findIndex((step) => step === this.config.defaultZoom);
|
|
32144
32119
|
this.actualScale = this.config.zoomSteps[this.actualStep];
|
|
@@ -32449,15 +32424,6 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
|
|
|
32449
32424
|
};
|
|
32450
32425
|
}
|
|
32451
32426
|
initEvents() {
|
|
32452
|
-
window.addEventListener("blur", () => {
|
|
32453
|
-
this.isCtrlOrMetaPressed = false;
|
|
32454
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
32455
|
-
window.addEventListener("keydown", (e) => {
|
|
32456
|
-
if (e.ctrlKey || e.metaKey) this.isCtrlOrMetaPressed = true;
|
|
32457
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
32458
|
-
window.addEventListener("keyup", (e) => {
|
|
32459
|
-
if (!(e.ctrlKey || e.metaKey)) this.isCtrlOrMetaPressed = false;
|
|
32460
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
32461
32427
|
const stage = this.instance.getStage();
|
|
32462
32428
|
let lastCenter = null;
|
|
32463
32429
|
let lastDist = 0;
|
|
@@ -32539,7 +32505,8 @@ var WeaveStageZoomPlugin = class extends WeavePlugin {
|
|
|
32539
32505
|
});
|
|
32540
32506
|
let doZoom = false;
|
|
32541
32507
|
const handleWheelImmediate = (e) => {
|
|
32542
|
-
const
|
|
32508
|
+
const isCtrlOrMetaPressed = e.ctrlKey || e.metaKey;
|
|
32509
|
+
const performZoom = isCtrlOrMetaPressed || !isCtrlOrMetaPressed && e.ctrlKey && e.deltaMode === 0;
|
|
32543
32510
|
const mouseX = e.clientX;
|
|
32544
32511
|
const mouseY = e.clientY;
|
|
32545
32512
|
let elementUnderMouse = document.elementFromPoint(mouseX, mouseY);
|
|
@@ -34450,7 +34417,7 @@ var WeaveImageToolAction = class extends WeaveAction {
|
|
|
34450
34417
|
const dragProperties = this.instance.getDragProperties();
|
|
34451
34418
|
if (dragProperties && dragId === WEAVE_IMAGE_TOOL_ACTION_NAME) {
|
|
34452
34419
|
this.instance.getStage().setPointersPositions(e);
|
|
34453
|
-
const position =
|
|
34420
|
+
const position = this.instance.getStage().getRelativePointerPosition();
|
|
34454
34421
|
if (!position) return;
|
|
34455
34422
|
this.instance.triggerAction(WEAVE_IMAGE_TOOL_ACTION_NAME, {
|
|
34456
34423
|
type: WEAVE_IMAGE_TOOL_UPLOAD_TYPE.IMAGE_URL,
|
|
@@ -34900,7 +34867,7 @@ var WeaveImagesToolAction = class extends WeaveAction {
|
|
|
34900
34867
|
const dragProperties = this.instance.getDragProperties();
|
|
34901
34868
|
if (dragProperties && dragId === WEAVE_IMAGES_TOOL_ACTION_NAME) {
|
|
34902
34869
|
this.instance.getStage().setPointersPositions(e);
|
|
34903
|
-
const position =
|
|
34870
|
+
const position = this.instance.getStage().getRelativePointerPosition();
|
|
34904
34871
|
if (!position) return;
|
|
34905
34872
|
this.instance.triggerAction(WEAVE_IMAGES_TOOL_ACTION_NAME, {
|
|
34906
34873
|
type: WEAVE_IMAGES_TOOL_UPLOAD_TYPE.IMAGE_URL,
|
|
@@ -37011,7 +36978,7 @@ var WeaveVideoToolAction = class extends WeaveAction {
|
|
|
37011
36978
|
const dragProperties = this.instance.getDragProperties();
|
|
37012
36979
|
if (dragProperties && dragId === VIDEO_TOOL_ACTION_NAME) {
|
|
37013
36980
|
this.instance.getStage().setPointersPositions(e);
|
|
37014
|
-
const position =
|
|
36981
|
+
const position = this.instance.getStage().getRelativePointerPosition();
|
|
37015
36982
|
this.instance.triggerAction(VIDEO_TOOL_ACTION_NAME, {
|
|
37016
36983
|
videoId: dragProperties.videoId,
|
|
37017
36984
|
videoParams: dragProperties.videoParams,
|
|
@@ -38143,7 +38110,6 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38143
38110
|
this.moveToolActive = false;
|
|
38144
38111
|
this.isMouseLeftButtonPressed = false;
|
|
38145
38112
|
this.isMouseMiddleButtonPressed = false;
|
|
38146
|
-
this.isCtrlOrMetaPressed = false;
|
|
38147
38113
|
this.isSpaceKeyPressed = false;
|
|
38148
38114
|
this.previousPointer = null;
|
|
38149
38115
|
this.currentPointer = null;
|
|
@@ -38172,11 +38138,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38172
38138
|
}
|
|
38173
38139
|
initEvents() {
|
|
38174
38140
|
const stage = this.instance.getStage();
|
|
38175
|
-
window.addEventListener("blur", () => {
|
|
38176
|
-
this.isCtrlOrMetaPressed = false;
|
|
38177
|
-
}, { signal: this.instance.getEventsController()?.signal });
|
|
38178
38141
|
window.addEventListener("keydown", (e) => {
|
|
38179
|
-
if (e.ctrlKey || e.metaKey) this.isCtrlOrMetaPressed = true;
|
|
38180
38142
|
if (e.code === "Space") {
|
|
38181
38143
|
this.getContextMenuPlugin()?.disable();
|
|
38182
38144
|
this.getNodesSelectionPlugin()?.disable();
|
|
@@ -38187,7 +38149,6 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38187
38149
|
}
|
|
38188
38150
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
38189
38151
|
window.addEventListener("keyup", (e) => {
|
|
38190
|
-
if (e.key === "Meta" || e.key === "Control") this.isCtrlOrMetaPressed = false;
|
|
38191
38152
|
if (e.code === "Space") {
|
|
38192
38153
|
this.getContextMenuPlugin()?.enable();
|
|
38193
38154
|
this.getNodesSelectionPlugin()?.enable();
|
|
@@ -38254,7 +38215,8 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38254
38215
|
this.cleanupEdgeMoveIntervals();
|
|
38255
38216
|
});
|
|
38256
38217
|
const handleWheel = (e) => {
|
|
38257
|
-
const
|
|
38218
|
+
const isCtrlOrMetaPressed = e.ctrlKey || e.metaKey;
|
|
38219
|
+
const performPanning = !isCtrlOrMetaPressed && !e.ctrlKey;
|
|
38258
38220
|
const mouseX = e.clientX;
|
|
38259
38221
|
const mouseY = e.clientY;
|
|
38260
38222
|
let elementUnderMouse = document.elementFromPoint(mouseX, mouseY);
|
|
@@ -38262,7 +38224,7 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38262
38224
|
const shadowHost = getTopmostShadowHost(stage.container());
|
|
38263
38225
|
if (shadowHost) elementUnderMouse = shadowHost.elementFromPoint(mouseX, mouseY);
|
|
38264
38226
|
}
|
|
38265
|
-
if (!this.enabled ||
|
|
38227
|
+
if (!this.enabled || isCtrlOrMetaPressed || e.buttons === 4 || !performPanning || this.instance.getClosestParentWithWeaveId(elementUnderMouse) !== stage.container()) return;
|
|
38266
38228
|
this.getContextMenuPlugin()?.cancelLongPressTimer();
|
|
38267
38229
|
stage.x(stage.x() - e.deltaX);
|
|
38268
38230
|
stage.y(stage.y() - e.deltaY);
|
|
@@ -38278,13 +38240,12 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38278
38240
|
if (this.panEdgeTargets[e.target.getAttrs().id ?? ""] !== void 0) return;
|
|
38279
38241
|
this.panEdgeTargets[e.target.getAttrs().id ?? ""] = e.target;
|
|
38280
38242
|
if (this.stageScrollInterval !== void 0) return;
|
|
38243
|
+
const speed = this.config.edgePan.speed;
|
|
38281
38244
|
this.stageScrollInterval = setInterval(() => {
|
|
38282
38245
|
const pos = stage.getPointerPosition();
|
|
38283
|
-
const offset = this.config.
|
|
38246
|
+
const offset = this.config.edgePan.offset;
|
|
38284
38247
|
if (!pos) return;
|
|
38285
38248
|
const { width, height } = stage.size();
|
|
38286
|
-
const scale = stage.scaleX();
|
|
38287
|
-
const speed = Math.max(this.config.edgePanMinSpeed, Math.min(this.config.edgePanMaxSpeed, this.config.edgePanSpeed / scale));
|
|
38288
38249
|
let isNearLeft = false;
|
|
38289
38250
|
let isNearRight = false;
|
|
38290
38251
|
let isNearTop = false;
|
|
@@ -39294,7 +39255,11 @@ var WeaveUsersPresencePlugin = class extends WeavePlugin {
|
|
|
39294
39255
|
const presenceInfo = userPresence[nodeId];
|
|
39295
39256
|
if (this.config.getUser().id === presenceInfo.userId) continue;
|
|
39296
39257
|
const nodeInstance = stage.findOne(`#${presenceInfo.nodeId}`);
|
|
39297
|
-
if (nodeInstance)
|
|
39258
|
+
if (!nodeInstance) continue;
|
|
39259
|
+
let parentId = nodeInstance.getParent()?.id() ?? "";
|
|
39260
|
+
const parent = nodeInstance.getParent();
|
|
39261
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
39262
|
+
if (nodeInstance && presenceInfo.parentId === parentId) {
|
|
39298
39263
|
const newProps = {
|
|
39299
39264
|
...nodeInstance.getAttrs(),
|
|
39300
39265
|
...presenceInfo.attrs
|
|
@@ -39309,10 +39274,11 @@ var WeaveUsersPresencePlugin = class extends WeavePlugin {
|
|
|
39309
39274
|
const store = this.instance.getStore();
|
|
39310
39275
|
store.setAwarenessInfo(WEAVE_USER_PRESENCE_KEY, this.userPresence);
|
|
39311
39276
|
}
|
|
39312
|
-
setPresence(nodeId, attrs, forceUpdate = true) {
|
|
39277
|
+
setPresence(nodeId, parentId, attrs, forceUpdate = true) {
|
|
39313
39278
|
const userInfo = this.config.getUser();
|
|
39314
39279
|
this.userPresence[nodeId] = {
|
|
39315
39280
|
userId: userInfo.id,
|
|
39281
|
+
parentId,
|
|
39316
39282
|
nodeId,
|
|
39317
39283
|
attrs
|
|
39318
39284
|
};
|
|
@@ -40519,7 +40485,16 @@ var WeaveCommentsRendererPlugin = class extends WeavePlugin {
|
|
|
40519
40485
|
//#endregion
|
|
40520
40486
|
//#region src/plugins/stage-keyboard-move/constants.ts
|
|
40521
40487
|
const WEAVE_STAGE_KEYBOARD_MOVE_KEY = "stageKeyboardMove";
|
|
40522
|
-
const WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG = {
|
|
40488
|
+
const WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG = {
|
|
40489
|
+
movementDelta: 1,
|
|
40490
|
+
shiftMovementDelta: 10
|
|
40491
|
+
};
|
|
40492
|
+
const WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION = {
|
|
40493
|
+
["UP"]: "up",
|
|
40494
|
+
["DOWN"]: "down",
|
|
40495
|
+
["LEFT"]: "left",
|
|
40496
|
+
["RIGHT"]: "right"
|
|
40497
|
+
};
|
|
40523
40498
|
|
|
40524
40499
|
//#endregion
|
|
40525
40500
|
//#region src/plugins/stage-keyboard-move/stage-keyboard-move.ts
|
|
@@ -40534,25 +40509,31 @@ var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
|
|
|
40534
40509
|
getName() {
|
|
40535
40510
|
return WEAVE_STAGE_KEYBOARD_MOVE_KEY;
|
|
40536
40511
|
}
|
|
40537
|
-
handleNodesMovement(movementOrientation) {
|
|
40512
|
+
handleNodesMovement(movementOrientation, { isShiftPressed }) {
|
|
40538
40513
|
const nodesSelectionPlugin = this.instance.getPlugin("nodesSelection");
|
|
40539
40514
|
if (nodesSelectionPlugin) {
|
|
40540
40515
|
const selectedNodes = nodesSelectionPlugin.getSelectedNodes();
|
|
40516
|
+
const movementDelta = isShiftPressed ? this.config.shiftMovementDelta : this.config.movementDelta;
|
|
40541
40517
|
for (const node of selectedNodes) {
|
|
40542
40518
|
switch (movementOrientation) {
|
|
40543
|
-
case
|
|
40544
|
-
node.y(node.y() -
|
|
40519
|
+
case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.UP:
|
|
40520
|
+
node.y(node.y() - movementDelta);
|
|
40545
40521
|
break;
|
|
40546
|
-
case
|
|
40547
|
-
node.y(node.y() +
|
|
40522
|
+
case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.DOWN:
|
|
40523
|
+
node.y(node.y() + movementDelta);
|
|
40548
40524
|
break;
|
|
40549
|
-
case
|
|
40550
|
-
node.x(node.x() -
|
|
40525
|
+
case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.LEFT:
|
|
40526
|
+
node.x(node.x() - movementDelta);
|
|
40551
40527
|
break;
|
|
40552
|
-
case
|
|
40553
|
-
node.x(node.x() +
|
|
40528
|
+
case WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.RIGHT:
|
|
40529
|
+
node.x(node.x() + movementDelta);
|
|
40554
40530
|
break;
|
|
40555
40531
|
}
|
|
40532
|
+
this.instance.emitEvent("onNodeKeyboardMove", {
|
|
40533
|
+
node,
|
|
40534
|
+
orientation: movementOrientation,
|
|
40535
|
+
delta: movementDelta
|
|
40536
|
+
});
|
|
40556
40537
|
const nodeHandler = this.instance.getNodeHandler(node.getAttrs().nodeType);
|
|
40557
40538
|
if (!nodeHandler) break;
|
|
40558
40539
|
this.instance.updateNode(nodeHandler.serialize(node));
|
|
@@ -40561,10 +40542,11 @@ var WeaveStageKeyboardMovePlugin = class extends WeavePlugin {
|
|
|
40561
40542
|
}
|
|
40562
40543
|
onInit() {
|
|
40563
40544
|
window.addEventListener("keydown", (e) => {
|
|
40564
|
-
|
|
40565
|
-
if (e.code === "
|
|
40566
|
-
if (e.code === "
|
|
40567
|
-
if (e.code === "
|
|
40545
|
+
const isShiftPressed = e.shiftKey || e.code === "Shift";
|
|
40546
|
+
if (e.code === "ArrowUp") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.UP, { isShiftPressed });
|
|
40547
|
+
if (e.code === "ArrowLeft") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.LEFT, { isShiftPressed });
|
|
40548
|
+
if (e.code === "ArrowRight") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.RIGHT, { isShiftPressed });
|
|
40549
|
+
if (e.code === "ArrowDown") this.handleNodesMovement(WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION.DOWN, { isShiftPressed });
|
|
40568
40550
|
}, { signal: this.instance.getEventsController()?.signal });
|
|
40569
40551
|
}
|
|
40570
40552
|
enable() {
|
|
@@ -40622,4 +40604,4 @@ function getJSONFromYjsBinary(actualState) {
|
|
|
40622
40604
|
}
|
|
40623
40605
|
|
|
40624
40606
|
//#endregion
|
|
40625
|
-
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,
|
|
40607
|
+
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, weavejsToYjsBinary };
|