@inditextech/weave-sdk 3.8.0 → 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 +114 -112
- package/dist/sdk.node.js +114 -112
- package/dist/types.d.ts +34 -27
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +114 -112
- package/dist/types.js.map +1 -1
- package/package.json +2 -2
package/dist/sdk.node.js
CHANGED
|
@@ -17678,19 +17678,20 @@ function moveNodeToContainerNT(instance, node, containerToMove, originalNode, or
|
|
|
17678
17678
|
node.rotation(nodeRotation);
|
|
17679
17679
|
node.x(node.x() - (layerToMoveAttrs.containerOffsetX ?? 0));
|
|
17680
17680
|
node.y(node.y() - (layerToMoveAttrs.containerOffsetY ?? 0));
|
|
17681
|
-
node.
|
|
17681
|
+
node.destroy();
|
|
17682
|
+
const newNode = node.clone();
|
|
17682
17683
|
instance.emitEvent("onNodeMovedToContainer", {
|
|
17683
|
-
node:
|
|
17684
|
+
node: newNode,
|
|
17684
17685
|
container: layerToMove,
|
|
17685
17686
|
originalNode,
|
|
17686
17687
|
originalContainer
|
|
17687
17688
|
});
|
|
17688
17689
|
const nodeHandler = instance.getNodeHandler(node.getAttrs().nodeType);
|
|
17689
17690
|
if (nodeHandler) {
|
|
17690
|
-
|
|
17691
|
-
const
|
|
17692
|
-
instance.removeNodeNT(
|
|
17693
|
-
instance.addNodeNT(
|
|
17691
|
+
const actualNodeState = nodeHandler.serialize(node);
|
|
17692
|
+
const newNodeState = nodeHandler.serialize(newNode);
|
|
17693
|
+
instance.removeNodeNT(actualNodeState, { emitUserChangeEvent: false });
|
|
17694
|
+
instance.addNodeNT(newNodeState, layerToMoveAttrs.id, {
|
|
17694
17695
|
emitUserChangeEvent: false,
|
|
17695
17696
|
overrideUserChangeType: WEAVE_NODE_CHANGE_TYPE.UPDATE
|
|
17696
17697
|
});
|
|
@@ -17919,17 +17920,6 @@ function isIOS() {
|
|
|
17919
17920
|
return /iPad|iPhone|iPod/.test(navigator.userAgent) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
|
|
17920
17921
|
}
|
|
17921
17922
|
const isServer = () => typeof window === "undefined";
|
|
17922
|
-
const getPositionRelativeToContainerOnPosition = (instance) => {
|
|
17923
|
-
let position = instance.getStage().getRelativePointerPosition();
|
|
17924
|
-
if (!position) return position;
|
|
17925
|
-
const container = containerOverCursor(instance, [], position);
|
|
17926
|
-
if (container) if (container.getAttrs().containerId) {
|
|
17927
|
-
const containerNode = container.findOne(`#${container.getAttrs().containerId}`);
|
|
17928
|
-
if (containerNode) position = containerNode?.getRelativePointerPosition();
|
|
17929
|
-
} else position = container?.getRelativePointerPosition();
|
|
17930
|
-
if (!position) return position;
|
|
17931
|
-
return position;
|
|
17932
|
-
};
|
|
17933
17923
|
const canComposite = (node) => {
|
|
17934
17924
|
const parent = node.getParent();
|
|
17935
17925
|
return parent?.getClassName() === "Group" && parent?.getAttrs().nodeType !== "frame" && parent?.getAttrs().nodeId === void 0;
|
|
@@ -18610,12 +18600,10 @@ const WEAVE_GRID_LAYER_ID = "gridLayer";
|
|
|
18610
18600
|
//#region src/plugins/stage-panning/constants.ts
|
|
18611
18601
|
const WEAVE_STAGE_PANNING_KEY = "stagePanning";
|
|
18612
18602
|
const WEAVE_STAGE_PANNING_THROTTLE_MS = 20;
|
|
18613
|
-
const WEAVE_STAGE_PANNING_DEFAULT_CONFIG = {
|
|
18614
|
-
|
|
18615
|
-
|
|
18616
|
-
|
|
18617
|
-
edgePanMaxSpeed: 30
|
|
18618
|
-
};
|
|
18603
|
+
const WEAVE_STAGE_PANNING_DEFAULT_CONFIG = { edgePan: {
|
|
18604
|
+
offset: 25,
|
|
18605
|
+
speed: 20
|
|
18606
|
+
} };
|
|
18619
18607
|
|
|
18620
18608
|
//#endregion
|
|
18621
18609
|
//#region src/plugins/nodes-multi-selection-feedback/constants.ts
|
|
@@ -18837,16 +18825,21 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18837
18825
|
if (moved) this.getContextMenuPlugin()?.cancelLongPressTimer();
|
|
18838
18826
|
this.triggerSelectedNodesEvent();
|
|
18839
18827
|
if (this.getUsersPresencePlugin()) {
|
|
18840
|
-
for (const node of tr.nodes())
|
|
18841
|
-
|
|
18842
|
-
|
|
18843
|
-
|
|
18844
|
-
|
|
18845
|
-
|
|
18846
|
-
|
|
18847
|
-
|
|
18848
|
-
|
|
18849
|
-
|
|
18828
|
+
for (const node of tr.nodes()) {
|
|
18829
|
+
let parentId = node.getParent()?.id() ?? "";
|
|
18830
|
+
const parent = node.getParent();
|
|
18831
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
18832
|
+
this.getUsersPresencePlugin()?.setPresence(node.id(), parentId, {
|
|
18833
|
+
x: node.x(),
|
|
18834
|
+
y: node.y(),
|
|
18835
|
+
width: node.width(),
|
|
18836
|
+
height: node.height(),
|
|
18837
|
+
scaleX: node.scaleX(),
|
|
18838
|
+
scaleY: node.scaleY(),
|
|
18839
|
+
rotation: node.rotation(),
|
|
18840
|
+
strokeScaleEnabled: false
|
|
18841
|
+
}, false);
|
|
18842
|
+
}
|
|
18850
18843
|
this.getUsersPresencePlugin()?.forceSendPresence();
|
|
18851
18844
|
}
|
|
18852
18845
|
};
|
|
@@ -18881,7 +18874,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18881
18874
|
this.didMove = false;
|
|
18882
18875
|
const stage$1 = this.instance.getStage();
|
|
18883
18876
|
this.saveDragSelectedNodes();
|
|
18884
|
-
|
|
18877
|
+
this.setNodesOpacityOnDrag();
|
|
18885
18878
|
selectedNodes = tr.nodes();
|
|
18886
18879
|
if (isWheelMousePressed) {
|
|
18887
18880
|
e.cancelBubble = true;
|
|
@@ -18934,10 +18927,15 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18934
18927
|
clearContainerTargets(this.instance);
|
|
18935
18928
|
const layerToMove = containerOverCursor(this.instance, selectedNodes);
|
|
18936
18929
|
if (this.getUsersPresencePlugin() && this.dragInProcess) {
|
|
18937
|
-
for (const node of selectedNodes)
|
|
18938
|
-
|
|
18939
|
-
|
|
18940
|
-
|
|
18930
|
+
for (const node of selectedNodes) {
|
|
18931
|
+
let parentId = node.getParent()?.id() ?? "";
|
|
18932
|
+
const parent = node.getParent();
|
|
18933
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
18934
|
+
this.getUsersPresencePlugin()?.setPresence(node.id(), parentId, {
|
|
18935
|
+
x: node.x(),
|
|
18936
|
+
y: node.y()
|
|
18937
|
+
}, false);
|
|
18938
|
+
}
|
|
18941
18939
|
this.getUsersPresencePlugin()?.forceSendPresence();
|
|
18942
18940
|
}
|
|
18943
18941
|
if (layerToMove && !selectionContainsFrames) layerToMove.fire(WEAVE_NODE_CUSTOM_EVENTS.onTargetEnter, { bubbles: true });
|
|
@@ -18951,7 +18949,6 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18951
18949
|
if (!mainLayer) return;
|
|
18952
18950
|
this.instance.getSelectionLayer()?.hitGraphEnabled(true);
|
|
18953
18951
|
this.instance.getMainLayer()?.hitGraphEnabled(true);
|
|
18954
|
-
if (this.getDragSelectedNodes().length > 1) this.restoreNodesOpacityOnDrag();
|
|
18955
18952
|
if (!this.didMove) return;
|
|
18956
18953
|
if (selectedNodes.length > 1) this.instance.releaseMutexLock();
|
|
18957
18954
|
e.cancelBubble = true;
|
|
@@ -19690,11 +19687,18 @@ const COPY_PASTE_NODES_PLUGIN_STATE = {
|
|
|
19690
19687
|
["IDLE"]: "idle",
|
|
19691
19688
|
["PASTING"]: "pasting"
|
|
19692
19689
|
};
|
|
19693
|
-
const WEAVE_COPY_PASTE_CONFIG_DEFAULT = {
|
|
19694
|
-
|
|
19695
|
-
|
|
19696
|
-
|
|
19697
|
-
|
|
19690
|
+
const WEAVE_COPY_PASTE_CONFIG_DEFAULT = {
|
|
19691
|
+
canPasteOnto: (node, atTarget) => {
|
|
19692
|
+
const targetType = atTarget.getAttrs().nodeType;
|
|
19693
|
+
if (targetType === "frame" && node.type === "frame") return false;
|
|
19694
|
+
return true;
|
|
19695
|
+
},
|
|
19696
|
+
paddingOnPaste: {
|
|
19697
|
+
enabled: false,
|
|
19698
|
+
paddingX: 0,
|
|
19699
|
+
paddingY: 0
|
|
19700
|
+
}
|
|
19701
|
+
};
|
|
19698
19702
|
|
|
19699
19703
|
//#endregion
|
|
19700
19704
|
//#region src/plugins/copy-paste-nodes/copy-paste-nodes.ts
|
|
@@ -19921,6 +19925,7 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
19921
19925
|
}
|
|
19922
19926
|
};
|
|
19923
19927
|
this.instance.addEventListener("onNodeRenderedAdded", handleOnNodeAdded);
|
|
19928
|
+
const nodesToPaste = [];
|
|
19924
19929
|
for (const element of Object.keys(this.toPaste.weave)) {
|
|
19925
19930
|
const node = this.toPaste.weave[element].element;
|
|
19926
19931
|
const posRelativeToSelection = this.toPaste.weave[element].posRelativeToSelection;
|
|
@@ -19961,12 +19966,22 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
19961
19966
|
containerId = this.instance.getMainLayer()?.getAttrs().id ?? "";
|
|
19962
19967
|
containerNode = this.instance.getMainLayer();
|
|
19963
19968
|
}
|
|
19964
|
-
|
|
19969
|
+
const canPasteNodeOntoTarget = this.config.canPasteOnto(node, containerNode);
|
|
19970
|
+
if (!canPasteNodeOntoTarget) throw new Error(`Cannot paste node ${node.key} onto target container: ${containerId}`, { cause: "InvalidPasteTarget" });
|
|
19971
|
+
if (containerId && canPasteNodeOntoTarget) {
|
|
19965
19972
|
nodesToSelect.push(newNodeId);
|
|
19966
|
-
|
|
19973
|
+
nodesToPaste.push({
|
|
19974
|
+
node,
|
|
19975
|
+
containerId
|
|
19976
|
+
});
|
|
19967
19977
|
}
|
|
19968
19978
|
this.getStageGridPlugin()?.onRender();
|
|
19969
19979
|
}
|
|
19980
|
+
for (const elementToPaste of nodesToPaste) {
|
|
19981
|
+
const { node, containerId } = elementToPaste;
|
|
19982
|
+
this.instance.addNodeNT(node, containerId);
|
|
19983
|
+
this.getStageGridPlugin()?.onRender();
|
|
19984
|
+
}
|
|
19970
19985
|
});
|
|
19971
19986
|
}
|
|
19972
19987
|
async finishHandleCopy() {
|
|
@@ -20058,6 +20073,7 @@ var WeaveCopyPasteNodesPlugin = class extends WeavePlugin {
|
|
|
20058
20073
|
}
|
|
20059
20074
|
} catch (ex) {
|
|
20060
20075
|
this.instance.emitEvent("onPaste", { error: ex });
|
|
20076
|
+
if (ex instanceof Error && ex.cause === "InvalidPasteTarget") return;
|
|
20061
20077
|
}
|
|
20062
20078
|
try {
|
|
20063
20079
|
const items = await navigator.clipboard.read();
|
|
@@ -20166,7 +20182,6 @@ const augmentKonvaNodeClass = (config) => {
|
|
|
20166
20182
|
Konva.Node.prototype.getRealClientRect = function(config$1) {
|
|
20167
20183
|
return this.getClientRect(config$1);
|
|
20168
20184
|
};
|
|
20169
|
-
Konva.Node.prototype.movedToContainer = function() {};
|
|
20170
20185
|
Konva.Node.prototype.updatePosition = function() {};
|
|
20171
20186
|
Konva.Node.prototype.triggerCrop = function() {};
|
|
20172
20187
|
Konva.Node.prototype.closeCrop = function() {};
|
|
@@ -20216,7 +20231,6 @@ var WeaveNode = class {
|
|
|
20216
20231
|
"bottom-right"
|
|
20217
20232
|
];
|
|
20218
20233
|
};
|
|
20219
|
-
node.movedToContainer = function() {};
|
|
20220
20234
|
node.updatePosition = function() {};
|
|
20221
20235
|
node.resetCrop = function() {};
|
|
20222
20236
|
node.handleMouseover = function() {};
|
|
@@ -20405,7 +20419,10 @@ var WeaveNode = class {
|
|
|
20405
20419
|
const nodesEdgeSnappingPlugin = this.getNodesEdgeSnappingPlugin();
|
|
20406
20420
|
if (nodesSelectionPlugin && this.isSelecting() && this.isNodeSelected(node$1)) nodesSelectionPlugin.getTransformer().forceUpdate();
|
|
20407
20421
|
if (nodesEdgeSnappingPlugin && transforming && this.isSelecting() && this.isNodeSelected(node$1)) nodesEdgeSnappingPlugin.evaluateGuidelines(e);
|
|
20408
|
-
|
|
20422
|
+
let parentId = node$1.getParent()?.id() ?? "";
|
|
20423
|
+
const parent = node$1.getParent();
|
|
20424
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
20425
|
+
this.getUsersPresencePlugin()?.setPresence(node$1.id(), parentId, {
|
|
20409
20426
|
x: node$1.x(),
|
|
20410
20427
|
y: node$1.y(),
|
|
20411
20428
|
width: node$1.width(),
|
|
@@ -20463,10 +20480,7 @@ var WeaveNode = class {
|
|
|
20463
20480
|
const nodeTarget = e.target;
|
|
20464
20481
|
let isWheelMousePressed = false;
|
|
20465
20482
|
if (e.evt.button === 1) isWheelMousePressed = true;
|
|
20466
|
-
e.cancelBubble = true;
|
|
20467
20483
|
this.getNodesSelectionFeedbackPlugin()?.hideSelectionHalo(nodeTarget);
|
|
20468
|
-
this.getSelectionPlugin()?.saveDragSelectedNodes();
|
|
20469
|
-
if (this.getSelectionPlugin()?.getDragSelectedNodes().length === 1) this.getSelectionPlugin()?.setNodesOpacityOnDrag();
|
|
20470
20484
|
const canMove = nodeTarget?.canDrag() ?? false;
|
|
20471
20485
|
if (!canMove) {
|
|
20472
20486
|
nodeTarget.stopDrag();
|
|
@@ -20557,7 +20571,10 @@ var WeaveNode = class {
|
|
|
20557
20571
|
}
|
|
20558
20572
|
if (this.isSelecting() && this.getSelectionPlugin()?.getSelectedNodes().length === 1) {
|
|
20559
20573
|
clearContainerTargets(this.instance);
|
|
20560
|
-
|
|
20574
|
+
let parentId = realNodeTarget.getParent()?.id() ?? "";
|
|
20575
|
+
const parent = realNodeTarget.getParent();
|
|
20576
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
20577
|
+
this.getUsersPresencePlugin()?.setPresence(realNodeTarget.id(), parentId, {
|
|
20561
20578
|
x: realNodeTarget.x(),
|
|
20562
20579
|
y: realNodeTarget.y()
|
|
20563
20580
|
});
|
|
@@ -20592,7 +20609,7 @@ var WeaveNode = class {
|
|
|
20592
20609
|
startPosition = null;
|
|
20593
20610
|
lockedAxis = null;
|
|
20594
20611
|
isShiftPressed = false;
|
|
20595
|
-
|
|
20612
|
+
this.getSelectionPlugin()?.restoreNodesOpacityOnDrag();
|
|
20596
20613
|
if (this.getSelectionPlugin()?.getSelectedNodes().length === 1) {
|
|
20597
20614
|
this.instance.releaseMutexLock();
|
|
20598
20615
|
this.getNodesSelectionFeedbackPlugin()?.showSelectionHalo(nodeTarget);
|
|
@@ -20770,7 +20787,6 @@ var WeaveNode = class {
|
|
|
20770
20787
|
delete cleanedAttrs.mutexUserId;
|
|
20771
20788
|
delete cleanedAttrs.draggable;
|
|
20772
20789
|
delete cleanedAttrs.overridesMouseControl;
|
|
20773
|
-
delete cleanedAttrs.onMoveContainer;
|
|
20774
20790
|
delete cleanedAttrs.dragBoundFunc;
|
|
20775
20791
|
return {
|
|
20776
20792
|
key: attrs.id ?? "",
|
|
@@ -21385,45 +21401,24 @@ var WeaveTargetingManager = class {
|
|
|
21385
21401
|
}
|
|
21386
21402
|
getMousePointer(point) {
|
|
21387
21403
|
this.logger.debug({ point }, "getMousePointer");
|
|
21388
|
-
const stage = this.instance.getStage();
|
|
21389
21404
|
const mainLayer = this.instance.getMainLayer();
|
|
21390
21405
|
let relativeMousePointer = typeof point !== "undefined" ? point : mainLayer?.getRelativePointerPosition() ?? {
|
|
21391
21406
|
x: 0,
|
|
21392
21407
|
y: 0
|
|
21393
21408
|
};
|
|
21394
|
-
let measureContainer = mainLayer;
|
|
21395
|
-
let container = mainLayer;
|
|
21396
21409
|
const utilityLayer = this.instance.getUtilityLayer();
|
|
21397
21410
|
if (utilityLayer) utilityLayer.visible(false);
|
|
21411
|
+
let containerAlt = containerOverCursor(this.instance, [], relativeMousePointer);
|
|
21412
|
+
if (!containerAlt) containerAlt = this.instance.getMainLayer();
|
|
21398
21413
|
const nodesSelection = this.instance.getPlugin("nodesSelection");
|
|
21399
21414
|
if (nodesSelection) nodesSelection.getTransformer().visible(false);
|
|
21400
|
-
|
|
21401
|
-
width: 10,
|
|
21402
|
-
height: 10,
|
|
21403
|
-
x: relativeMousePointer.x,
|
|
21404
|
-
y: relativeMousePointer.y
|
|
21405
|
-
});
|
|
21406
|
-
mainLayer?.add(dummyRect);
|
|
21407
|
-
const intersectedNode = this.nodeIntersectsContainerElement(dummyRect);
|
|
21408
|
-
if (intersectedNode) {
|
|
21409
|
-
const containerOfNode = stage.findOne(`#${intersectedNode.getAttrs().containerId}`);
|
|
21410
|
-
if (containerOfNode) {
|
|
21411
|
-
container = intersectedNode;
|
|
21412
|
-
measureContainer = containerOfNode;
|
|
21413
|
-
}
|
|
21414
|
-
}
|
|
21415
|
-
if (typeof point === "undefined" && container?.getAttrs().nodeType !== "layer") relativeMousePointer = measureContainer?.getRelativePointerPosition() ?? relativeMousePointer;
|
|
21416
|
-
if (typeof point === "undefined" && container?.getAttrs().nodeType === "layer") relativeMousePointer = measureContainer?.getRelativePointerPosition() ?? {
|
|
21417
|
-
x: 0,
|
|
21418
|
-
y: 0
|
|
21419
|
-
};
|
|
21415
|
+
relativeMousePointer = containerAlt?.getRelativePointerPosition() ?? relativeMousePointer;
|
|
21420
21416
|
if (utilityLayer) utilityLayer.visible(true);
|
|
21421
21417
|
if (nodesSelection) nodesSelection.getTransformer().visible(true);
|
|
21422
|
-
dummyRect.destroy();
|
|
21423
21418
|
return {
|
|
21424
21419
|
mousePoint: relativeMousePointer,
|
|
21425
|
-
container,
|
|
21426
|
-
measureContainer
|
|
21420
|
+
container: containerAlt,
|
|
21421
|
+
measureContainer: containerAlt
|
|
21427
21422
|
};
|
|
21428
21423
|
}
|
|
21429
21424
|
getMousePointerRelativeToContainer(container) {
|
|
@@ -22012,7 +22007,7 @@ var WeaveRegisterManager = class {
|
|
|
22012
22007
|
|
|
22013
22008
|
//#endregion
|
|
22014
22009
|
//#region package.json
|
|
22015
|
-
var version = "3.8.
|
|
22010
|
+
var version = "3.8.1-SNAPSHOT.191.1";
|
|
22016
22011
|
|
|
22017
22012
|
//#endregion
|
|
22018
22013
|
//#region src/managers/setup.ts
|
|
@@ -23452,7 +23447,7 @@ var Weave = class {
|
|
|
23452
23447
|
this.moduleLogger.info("Start instance");
|
|
23453
23448
|
if (!this.isServerSide()) {
|
|
23454
23449
|
this.eventsController = new AbortController();
|
|
23455
|
-
|
|
23450
|
+
window.weave = this;
|
|
23456
23451
|
}
|
|
23457
23452
|
this.emitEvent("onRoomLoaded", false);
|
|
23458
23453
|
this.status = WEAVE_INSTANCE_STATUS.STARTING;
|
|
@@ -24443,7 +24438,6 @@ var WeaveLayerNode = class extends WeaveNode {
|
|
|
24443
24438
|
delete cleanedAttrs.mutexUserId;
|
|
24444
24439
|
delete cleanedAttrs.draggable;
|
|
24445
24440
|
delete cleanedAttrs.overridesMouseControl;
|
|
24446
|
-
delete cleanedAttrs.onMoveContainer;
|
|
24447
24441
|
delete cleanedAttrs.dragBoundFunc;
|
|
24448
24442
|
return {
|
|
24449
24443
|
key: attrs.id ?? "",
|
|
@@ -24528,7 +24522,6 @@ var WeaveGroupNode = class extends WeaveNode {
|
|
|
24528
24522
|
delete cleanedAttrs.mutexUserId;
|
|
24529
24523
|
delete cleanedAttrs.draggable;
|
|
24530
24524
|
delete cleanedAttrs.overridesMouseControl;
|
|
24531
|
-
delete cleanedAttrs.onMoveContainer;
|
|
24532
24525
|
delete cleanedAttrs.dragBoundFunc;
|
|
24533
24526
|
return {
|
|
24534
24527
|
key: attrs.id ?? "",
|
|
@@ -25317,7 +25310,6 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25317
25310
|
delete cleanedAttrs.measureMultilineText;
|
|
25318
25311
|
delete cleanedAttrs.overridesMouseControl;
|
|
25319
25312
|
delete cleanedAttrs.shouldUpdateOnTransform;
|
|
25320
|
-
delete cleanedAttrs.onMoveContainer;
|
|
25321
25313
|
delete cleanedAttrs.dragBoundFunc;
|
|
25322
25314
|
return {
|
|
25323
25315
|
key: attrs.id ?? "",
|
|
@@ -25709,13 +25701,14 @@ const WEAVE_IMAGE_CROP_ANCHOR_POSITION = {
|
|
|
25709
25701
|
["BOTTOM_CENTER"]: "bottom-center"
|
|
25710
25702
|
};
|
|
25711
25703
|
const WEAVE_IMAGE_DEFAULT_CONFIG = {
|
|
25704
|
+
cleanup: { intervalMs: 60 * 1e3 },
|
|
25712
25705
|
performance: { cache: { enabled: false } },
|
|
25713
25706
|
style: {
|
|
25714
25707
|
placeholder: { fill: "#aaaaaa" },
|
|
25715
25708
|
cursor: { loading: "wait" }
|
|
25716
25709
|
},
|
|
25717
25710
|
imageLoading: {
|
|
25718
|
-
maxRetryAttempts:
|
|
25711
|
+
maxRetryAttempts: 3,
|
|
25719
25712
|
retryDelayMs: 2e3
|
|
25720
25713
|
},
|
|
25721
25714
|
crossOrigin: "anonymous",
|
|
@@ -26408,6 +26401,25 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26408
26401
|
this.imageTryoutAttempts = {};
|
|
26409
26402
|
this.imageFallback = {};
|
|
26410
26403
|
}
|
|
26404
|
+
setupNotUsedImagesCleanup() {
|
|
26405
|
+
const cleanupHandler = () => {
|
|
26406
|
+
this.notUsedImagesCleanup = null;
|
|
26407
|
+
const stage = this.instance.getStage();
|
|
26408
|
+
const nodesIds = Object.keys(this.imageState);
|
|
26409
|
+
for (const nodeId of nodesIds) {
|
|
26410
|
+
const node = stage.findOne(`#${nodeId}`);
|
|
26411
|
+
if (!node) {
|
|
26412
|
+
delete this.imageSource[nodeId];
|
|
26413
|
+
delete this.imageState[nodeId];
|
|
26414
|
+
delete this.imageTryoutAttempts[nodeId];
|
|
26415
|
+
delete this.imageFallback[nodeId];
|
|
26416
|
+
}
|
|
26417
|
+
}
|
|
26418
|
+
this.setupNotUsedImagesCleanup();
|
|
26419
|
+
};
|
|
26420
|
+
const bindedCleanupHandler = cleanupHandler.bind(this);
|
|
26421
|
+
if (!this.notUsedImagesCleanup) setTimeout(bindedCleanupHandler, this.config.cleanup.intervalMs);
|
|
26422
|
+
}
|
|
26411
26423
|
preloadCursors() {
|
|
26412
26424
|
return new Promise((resolve) => {
|
|
26413
26425
|
(async () => {
|
|
@@ -26484,6 +26496,7 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26484
26496
|
this.instance.resolveAsyncElement(nodeId, WEAVE_IMAGE_NODE_TYPE);
|
|
26485
26497
|
}
|
|
26486
26498
|
onRender(props) {
|
|
26499
|
+
this.setupNotUsedImagesCleanup();
|
|
26487
26500
|
const imageProperties = props.imageProperties;
|
|
26488
26501
|
const imageProps = props;
|
|
26489
26502
|
const { id } = imageProps;
|
|
@@ -26509,11 +26522,6 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
26509
26522
|
if (this.isSelecting() && selectedNodes.includes(image)) return "grab";
|
|
26510
26523
|
return "pointer";
|
|
26511
26524
|
};
|
|
26512
|
-
image.movedToContainer = () => {
|
|
26513
|
-
const stage = this.instance.getStage();
|
|
26514
|
-
const image$1 = stage.findOne(`#${id}`);
|
|
26515
|
-
if (!image$1) return;
|
|
26516
|
-
};
|
|
26517
26525
|
if (this.config.cropMode.enabled) {
|
|
26518
26526
|
image.triggerCrop = () => {
|
|
26519
26527
|
this.triggerCrop(image, { cmdCtrl: { triggered: false } });
|
|
@@ -27225,8 +27233,6 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
27225
27233
|
}
|
|
27226
27234
|
onDestroy(nodeInstance) {
|
|
27227
27235
|
const nodeId = nodeInstance.getAttrs().id ?? "";
|
|
27228
|
-
const isMoveContainer = nodeInstance.getAttr("onMoveContainer");
|
|
27229
|
-
nodeInstance.setAttr("onMoveContainer", void 0);
|
|
27230
27236
|
const utilityLayer = this.instance.getUtilityLayer();
|
|
27231
27237
|
const nodes = utilityLayer?.find(".cropMode") ?? [];
|
|
27232
27238
|
nodes.forEach((n) => {
|
|
@@ -27236,12 +27242,6 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
27236
27242
|
clearTimeout(this.imageTryoutIds[nodeId]);
|
|
27237
27243
|
delete this.imageTryoutIds[nodeId];
|
|
27238
27244
|
}
|
|
27239
|
-
if (!isMoveContainer) {
|
|
27240
|
-
delete this.imageSource[nodeId];
|
|
27241
|
-
delete this.imageState[nodeId];
|
|
27242
|
-
delete this.imageTryoutAttempts[nodeId];
|
|
27243
|
-
delete this.imageFallback[nodeId];
|
|
27244
|
-
}
|
|
27245
27245
|
nodeInstance.destroy();
|
|
27246
27246
|
}
|
|
27247
27247
|
};
|
|
@@ -27788,7 +27788,6 @@ var WeaveFrameNode = class extends WeaveNode {
|
|
|
27788
27788
|
delete cleanedAttrs.draggable;
|
|
27789
27789
|
delete cleanedAttrs.onTargetEnter;
|
|
27790
27790
|
delete cleanedAttrs.overridesMouseControl;
|
|
27791
|
-
delete cleanedAttrs.onMoveContainer;
|
|
27792
27791
|
delete cleanedAttrs.dragBoundFunc;
|
|
27793
27792
|
return {
|
|
27794
27793
|
key: realAttrs?.id ?? "",
|
|
@@ -28027,7 +28026,6 @@ var WeaveStrokeNode = class extends WeaveNode {
|
|
|
28027
28026
|
delete cleanedAttrs.sceneFunc;
|
|
28028
28027
|
delete cleanedAttrs.hitFunc;
|
|
28029
28028
|
delete cleanedAttrs.overridesMouseControl;
|
|
28030
|
-
delete cleanedAttrs.onMoveContainer;
|
|
28031
28029
|
delete cleanedAttrs.dragBoundFunc;
|
|
28032
28030
|
return {
|
|
28033
28031
|
key: attrs.id ?? "",
|
|
@@ -29572,6 +29570,7 @@ var WeaveVideoNode = class extends WeaveNode {
|
|
|
29572
29570
|
const videoIconGroup = video.findOne(`#${id}-video-icon-group`);
|
|
29573
29571
|
if (!videoPlaceholder || !videoIconGroup) return;
|
|
29574
29572
|
const realVideoPlaceholderURL = this.config.urlTransformer?.(videoProps.videoPlaceholderURL ?? "", video) ?? videoProps.videoPlaceholderURL;
|
|
29573
|
+
if (!this.videoPlaceholder) this.initialize();
|
|
29575
29574
|
this.videoPlaceholder[id] = Konva.Util.createImageElement();
|
|
29576
29575
|
this.videoPlaceholder[id].crossOrigin = this.config.crossOrigin;
|
|
29577
29576
|
this.videoPlaceholder[id].src = realVideoPlaceholderURL;
|
|
@@ -31959,7 +31958,6 @@ var WeaveConnectorNode = class extends WeaveNode {
|
|
|
31959
31958
|
delete cleanedAttrs.startInfoLoaded;
|
|
31960
31959
|
delete cleanedAttrs.endInfoLoaded;
|
|
31961
31960
|
delete cleanedAttrs.overridesMouseControl;
|
|
31962
|
-
delete cleanedAttrs.onMoveContainer;
|
|
31963
31961
|
delete cleanedAttrs.dragBoundFunc;
|
|
31964
31962
|
return {
|
|
31965
31963
|
key: attrs.id ?? "",
|
|
@@ -34418,7 +34416,7 @@ var WeaveImageToolAction = class extends WeaveAction {
|
|
|
34418
34416
|
const dragProperties = this.instance.getDragProperties();
|
|
34419
34417
|
if (dragProperties && dragId === WEAVE_IMAGE_TOOL_ACTION_NAME) {
|
|
34420
34418
|
this.instance.getStage().setPointersPositions(e);
|
|
34421
|
-
const position =
|
|
34419
|
+
const position = this.instance.getStage().getRelativePointerPosition();
|
|
34422
34420
|
if (!position) return;
|
|
34423
34421
|
this.instance.triggerAction(WEAVE_IMAGE_TOOL_ACTION_NAME, {
|
|
34424
34422
|
type: WEAVE_IMAGE_TOOL_UPLOAD_TYPE.IMAGE_URL,
|
|
@@ -34868,7 +34866,7 @@ var WeaveImagesToolAction = class extends WeaveAction {
|
|
|
34868
34866
|
const dragProperties = this.instance.getDragProperties();
|
|
34869
34867
|
if (dragProperties && dragId === WEAVE_IMAGES_TOOL_ACTION_NAME) {
|
|
34870
34868
|
this.instance.getStage().setPointersPositions(e);
|
|
34871
|
-
const position =
|
|
34869
|
+
const position = this.instance.getStage().getRelativePointerPosition();
|
|
34872
34870
|
if (!position) return;
|
|
34873
34871
|
this.instance.triggerAction(WEAVE_IMAGES_TOOL_ACTION_NAME, {
|
|
34874
34872
|
type: WEAVE_IMAGES_TOOL_UPLOAD_TYPE.IMAGE_URL,
|
|
@@ -36979,7 +36977,7 @@ var WeaveVideoToolAction = class extends WeaveAction {
|
|
|
36979
36977
|
const dragProperties = this.instance.getDragProperties();
|
|
36980
36978
|
if (dragProperties && dragId === VIDEO_TOOL_ACTION_NAME) {
|
|
36981
36979
|
this.instance.getStage().setPointersPositions(e);
|
|
36982
|
-
const position =
|
|
36980
|
+
const position = this.instance.getStage().getRelativePointerPosition();
|
|
36983
36981
|
this.instance.triggerAction(VIDEO_TOOL_ACTION_NAME, {
|
|
36984
36982
|
videoId: dragProperties.videoId,
|
|
36985
36983
|
videoParams: dragProperties.videoParams,
|
|
@@ -38241,13 +38239,12 @@ var WeaveStagePanningPlugin = class extends WeavePlugin {
|
|
|
38241
38239
|
if (this.panEdgeTargets[e.target.getAttrs().id ?? ""] !== void 0) return;
|
|
38242
38240
|
this.panEdgeTargets[e.target.getAttrs().id ?? ""] = e.target;
|
|
38243
38241
|
if (this.stageScrollInterval !== void 0) return;
|
|
38242
|
+
const speed = this.config.edgePan.speed;
|
|
38244
38243
|
this.stageScrollInterval = setInterval(() => {
|
|
38245
38244
|
const pos = stage.getPointerPosition();
|
|
38246
|
-
const offset = this.config.
|
|
38245
|
+
const offset = this.config.edgePan.offset;
|
|
38247
38246
|
if (!pos) return;
|
|
38248
38247
|
const { width, height } = stage.size();
|
|
38249
|
-
const scale = stage.scaleX();
|
|
38250
|
-
const speed = Math.max(this.config.edgePanMinSpeed, Math.min(this.config.edgePanMaxSpeed, this.config.edgePanSpeed / scale));
|
|
38251
38248
|
let isNearLeft = false;
|
|
38252
38249
|
let isNearRight = false;
|
|
38253
38250
|
let isNearTop = false;
|
|
@@ -39257,7 +39254,11 @@ var WeaveUsersPresencePlugin = class extends WeavePlugin {
|
|
|
39257
39254
|
const presenceInfo = userPresence[nodeId];
|
|
39258
39255
|
if (this.config.getUser().id === presenceInfo.userId) continue;
|
|
39259
39256
|
const nodeInstance = stage.findOne(`#${presenceInfo.nodeId}`);
|
|
39260
|
-
if (nodeInstance)
|
|
39257
|
+
if (!nodeInstance) continue;
|
|
39258
|
+
let parentId = nodeInstance.getParent()?.id() ?? "";
|
|
39259
|
+
const parent = nodeInstance.getParent();
|
|
39260
|
+
if (parent?.getAttrs().nodeId) parentId = parent.getAttrs().nodeId;
|
|
39261
|
+
if (nodeInstance && presenceInfo.parentId === parentId) {
|
|
39261
39262
|
const newProps = {
|
|
39262
39263
|
...nodeInstance.getAttrs(),
|
|
39263
39264
|
...presenceInfo.attrs
|
|
@@ -39272,10 +39273,11 @@ var WeaveUsersPresencePlugin = class extends WeavePlugin {
|
|
|
39272
39273
|
const store = this.instance.getStore();
|
|
39273
39274
|
store.setAwarenessInfo(WEAVE_USER_PRESENCE_KEY, this.userPresence);
|
|
39274
39275
|
}
|
|
39275
|
-
setPresence(nodeId, attrs, forceUpdate = true) {
|
|
39276
|
+
setPresence(nodeId, parentId, attrs, forceUpdate = true) {
|
|
39276
39277
|
const userInfo = this.config.getUser();
|
|
39277
39278
|
this.userPresence[nodeId] = {
|
|
39278
39279
|
userId: userInfo.id,
|
|
39280
|
+
parentId,
|
|
39279
39281
|
nodeId,
|
|
39280
39282
|
attrs
|
|
39281
39283
|
};
|
|
@@ -40566,4 +40568,4 @@ const setupCanvasBackend = async () => {
|
|
|
40566
40568
|
};
|
|
40567
40569
|
|
|
40568
40570
|
//#endregion
|
|
40569
|
-
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,
|
|
40571
|
+
export { ALIGN_NODES_ALIGN_TO, ALIGN_NODES_TOOL_ACTION_NAME, ALIGN_NODES_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_DEFAULT_CONFIG, BRUSH_TOOL_STATE, CONNECTOR_TOOL_ACTION_NAME, CONNECTOR_TOOL_DEFAULT_CONFIG, CONNECTOR_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_DISTANCE_LINE_DEFAULT_CONFIG, GUIDE_ENTER_SNAPPING_TOLERANCE, GUIDE_EXIT_SNAPPING_TOLERANCE, GUIDE_HORIZONTAL_LINE_NAME, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, GUIDE_VERTICAL_LINE_NAME, LINE_TOOL_ACTION_NAME, LINE_TOOL_DEFAULT_CONFIG, LINE_TOOL_STATE, MEASURE_TOOL_ACTION_NAME, MEASURE_TOOL_STATE, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NODE_SNAP_HORIZONTAL, NODE_SNAP_VERTICAL, PEN_TOOL_ACTION_NAME, PEN_TOOL_STATE, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, REGULAR_POLYGON_TOOL_ACTION_NAME, REGULAR_POLYGON_TOOL_STATE, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, STAGE_MINIMAP_DEFAULT_CONFIG, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, VIDEO_TOOL_ACTION_NAME, VIDEO_TOOL_STATE, WEAVE_ARROW_NODE_TYPE, WEAVE_ARROW_TOOL_ACTION_NAME, WEAVE_ARROW_TOOL_STATE, WEAVE_COMMENTS_RENDERER_KEY, WEAVE_COMMENTS_TOOL_LAYER_ID, WEAVE_COMMENT_CREATE_ACTION, WEAVE_COMMENT_NODE_ACTION, WEAVE_COMMENT_NODE_DEFAULTS, WEAVE_COMMENT_NODE_TYPE, WEAVE_COMMENT_STATUS, WEAVE_COMMENT_TOOL_ACTION_NAME, WEAVE_COMMENT_TOOL_DEFAULT_CONFIG, WEAVE_COMMENT_TOOL_STATE, WEAVE_COMMENT_VIEW_ACTION, WEAVE_CONNECTOR_NODE_ANCHOR_ORIGIN, WEAVE_CONNECTOR_NODE_DECORATOR_TYPE, WEAVE_CONNECTOR_NODE_DEFAULT_CONFIG, WEAVE_CONNECTOR_NODE_LINE_ORIGIN, WEAVE_CONNECTOR_NODE_LINE_TYPE, WEAVE_CONNECTOR_NODE_TYPE, WEAVE_COPY_PASTE_CONFIG_DEFAULT, WEAVE_COPY_PASTE_NODES_KEY, WEAVE_COPY_PASTE_PASTE_CATCHER_ID, WEAVE_COPY_PASTE_PASTE_MODES, WEAVE_DEFAULT_USER_INFO_FUNCTION, WEAVE_ELLIPSE_NODE_TYPE, WEAVE_FRAME_DEFAULT_BACKGROUND_COLOR, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_CONFIG, WEAVE_GRID_DOT_TYPES, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_GROUP_NODE_TYPE, WEAVE_IMAGES_TOOL_ACTION_NAME, WEAVE_IMAGES_TOOL_DEFAULT_CONFIG, WEAVE_IMAGES_TOOL_STATE, WEAVE_IMAGES_TOOL_UPLOAD_TYPE, WEAVE_IMAGE_CROP_ANCHOR_POSITION, WEAVE_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_DEFAULT_CONFIG, WEAVE_IMAGE_NODE_TYPE, WEAVE_IMAGE_TOOL_ACTION_NAME, WEAVE_IMAGE_TOOL_CONFIG_DEFAULT, WEAVE_IMAGE_TOOL_STATE, WEAVE_IMAGE_TOOL_UPLOAD_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_DEFAULT_CONFIG, WEAVE_LINE_NODE_TYPE, WEAVE_MEASURE_NODE_DEFAULT_CONFIG, WEAVE_MEASURE_NODE_TYPE, WEAVE_MEASURE_TOOL_DEFAULT_CONFIG, WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_DEFAULT_CONFIG, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_KEY, WEAVE_NODES_MULTI_SELECTION_FEEDBACK_PLUGIN_LAYER_ID, WEAVE_NODES_SELECTION_DEFAULT_CONFIG, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_STAGE_DEFAULT_MODE, WEAVE_STAGE_DROP_AREA_KEY, WEAVE_STAGE_GRID_PLUGIN_KEY, WEAVE_STAGE_IMAGE_CROPPING_MODE, WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG, WEAVE_STAGE_KEYBOARD_MOVE_KEY, WEAVE_STAGE_KEYBOARD_MOVE_ORIENTATION, WEAVE_STAGE_MINIMAP_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAGE_PANNING_DEFAULT_CONFIG, WEAVE_STAGE_PANNING_KEY, WEAVE_STAGE_PANNING_THROTTLE_MS, WEAVE_STAGE_TEXT_EDITION_MODE, WEAVE_STAGE_ZOOM_DEFAULT_CONFIG, WEAVE_STAGE_ZOOM_KEY, WEAVE_STAGE_ZOOM_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_NODE_TYPE, WEAVE_STROKE_SINGLE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_SINGLE_NODE_TIP_SIDE, WEAVE_STROKE_SINGLE_NODE_TIP_TYPE, WEAVE_STROKE_SINGLE_NODE_TYPE, WEAVE_STROKE_TOOL_ACTION_NAME, WEAVE_STROKE_TOOL_ACTION_NAME_ALIASES, WEAVE_STROKE_TOOL_DEFAULT_CONFIG, WEAVE_STROKE_TOOL_STATE, WEAVE_TEXT_NODE_DEFAULT_CONFIG, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_CONFIG_DEFAULT_PROPS, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_PRESENCE_CONFIG_DEFAULT_PROPS, WEAVE_USERS_PRESENCE_PLUGIN_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTER_KEY, WEAVE_USER_PRESENCE_KEY, WEAVE_USER_SELECTION_KEY, WEAVE_VIDEO_DEFAULT_CONFIG, WEAVE_VIDEO_NODE_TYPE, Weave, WeaveAction, WeaveAlignNodesToolAction, WeaveArrowNode, WeaveArrowToolAction, WeaveBrushToolAction, WeaveCommentNode, WeaveCommentToolAction, WeaveCommentsRendererPlugin, WeaveConnectedUsersPlugin, WeaveConnectorNode, WeaveConnectorToolAction, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveEllipseNode, WeaveEllipseToolAction, WeaveEraserToolAction, WeaveExportNodesToolAction, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToSelectionToolAction, WeaveFrameNode, WeaveFrameToolAction, WeaveGroupNode, WeaveImageNode, WeaveImageToolAction, WeaveImagesToolAction, WeaveLayerNode, WeaveLineNode, WeaveLineToolAction, WeaveMeasureNode, WeaveMeasureToolAction, WeaveMoveToolAction, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesEdgeSnappingPlugin, WeaveNodesMultiSelectionFeedbackPlugin, WeaveNodesSelectionPlugin, WeavePenToolAction, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRegularPolygonNode, WeaveRegularPolygonToolAction, WeaveRenderer, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageKeyboardMovePlugin, WeaveStageMinimapPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStarNode, WeaveStarToolAction, WeaveStore, WeaveStrokeNode, WeaveStrokeSingleNode, WeaveStrokeToolAction, WeaveTextNode, WeaveTextToolAction, WeaveUsersPointersPlugin, WeaveUsersPresencePlugin, WeaveUsersSelectionPlugin, WeaveVideoNode, WeaveVideoToolAction, WeaveZoomInToolAction, WeaveZoomOutToolAction, canComposite, clearContainerTargets, containerOverCursor, containsNodeDeep, defaultInitialState, downscaleImageFile, downscaleImageFromURL, getBoundingBox, getDownscaleRatio, getExportBoundingBox, getImageSizeFromFile, getSelectedNodesMetadata, getStageClickPoint, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodes, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isIOS, isInShadowDOM, isNodeInSelection, isServer, loadImageSource, memoize, mergeExceptArrays, moveNodeToContainer, moveNodeToContainerNT, resetScale, setupCanvasBackend, setupSkiaBackend };
|