@inditextech/weave-sdk 4.2.0-SNAPSHOT.307.1 → 4.2.0-SNAPSHOT.318.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 +433 -103
- package/dist/sdk.node.js +433 -103
- package/dist/sdk.node.stats.html +1 -1
- package/dist/sdk.stats.html +1 -1
- package/dist/stage-minimap.worker.js +0 -1
- package/dist/stage-minimap.worker.stats.html +1 -1
- package/dist/types.d.ts +84 -26
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +433 -103
- package/dist/types.js.map +1 -1
- package/dist/types.stats.html +1 -1
- package/package.json +2 -2
package/dist/sdk.js
CHANGED
|
@@ -10483,7 +10483,7 @@ var require_lodash = __commonJS({ "../../node_modules/lodash/lodash.js"(exports,
|
|
|
10483
10483
|
* // => false
|
|
10484
10484
|
*/
|
|
10485
10485
|
function isNaN$1(value) {
|
|
10486
|
-
return isNumber(value) && value != +value;
|
|
10486
|
+
return isNumber$1(value) && value != +value;
|
|
10487
10487
|
}
|
|
10488
10488
|
/**
|
|
10489
10489
|
* Checks if `value` is a pristine native function.
|
|
@@ -10584,7 +10584,7 @@ var require_lodash = __commonJS({ "../../node_modules/lodash/lodash.js"(exports,
|
|
|
10584
10584
|
* _.isNumber('3');
|
|
10585
10585
|
* // => false
|
|
10586
10586
|
*/
|
|
10587
|
-
function isNumber(value) {
|
|
10587
|
+
function isNumber$1(value) {
|
|
10588
10588
|
return typeof value == "number" || isObjectLike$7(value) && baseGetTag$6(value) == numberTag$1;
|
|
10589
10589
|
}
|
|
10590
10590
|
/**
|
|
@@ -14919,7 +14919,7 @@ var require_lodash = __commonJS({ "../../node_modules/lodash/lodash.js"(exports,
|
|
|
14919
14919
|
lodash.isNative = isNative;
|
|
14920
14920
|
lodash.isNil = isNil;
|
|
14921
14921
|
lodash.isNull = isNull;
|
|
14922
|
-
lodash.isNumber = isNumber;
|
|
14922
|
+
lodash.isNumber = isNumber$1;
|
|
14923
14923
|
lodash.isObject = isObject$12;
|
|
14924
14924
|
lodash.isObjectLike = isObjectLike$7;
|
|
14925
14925
|
lodash.isPlainObject = isPlainObject$2;
|
|
@@ -17875,7 +17875,8 @@ function moveNodeToContainerNT(instance, node, containerToMove, originalNode, or
|
|
|
17875
17875
|
const actualContainerAttrs = nodeActualContainer.getAttrs();
|
|
17876
17876
|
let layerToMove = void 0;
|
|
17877
17877
|
if (actualContainerAttrs.id !== containerToMove.getAttrs().id && !invalidOriginsTypes.includes(node.getAttrs().nodeType)) layerToMove = containerToMove;
|
|
17878
|
-
|
|
17878
|
+
const nodeHandler = instance.getNodeHandler(node.getAttrs().nodeType);
|
|
17879
|
+
if (layerToMove && actualContainerAttrs.id !== layerToMove.getAttrs().id && actualContainerAttrs.id !== layerToMove.getAttrs().containerId && nodeHandler) {
|
|
17879
17880
|
const layerToMoveAttrs = layerToMove.getAttrs();
|
|
17880
17881
|
const nodePos = node.getAbsolutePosition();
|
|
17881
17882
|
const nodeRotation = node.getAbsoluteRotation();
|
|
@@ -17884,7 +17885,6 @@ function moveNodeToContainerNT(instance, node, containerToMove, originalNode, or
|
|
|
17884
17885
|
node.rotation(nodeRotation);
|
|
17885
17886
|
node.x(node.x() - (layerToMoveAttrs.containerOffsetX ?? 0));
|
|
17886
17887
|
node.y(node.y() - (layerToMoveAttrs.containerOffsetY ?? 0));
|
|
17887
|
-
node.destroy();
|
|
17888
17888
|
const newNode = node.clone();
|
|
17889
17889
|
instance.emitEvent("onNodeMovedToContainer", {
|
|
17890
17890
|
node: newNode,
|
|
@@ -17892,17 +17892,15 @@ function moveNodeToContainerNT(instance, node, containerToMove, originalNode, or
|
|
|
17892
17892
|
originalNode,
|
|
17893
17893
|
originalContainer
|
|
17894
17894
|
});
|
|
17895
|
-
const
|
|
17896
|
-
|
|
17897
|
-
|
|
17898
|
-
|
|
17899
|
-
|
|
17900
|
-
|
|
17901
|
-
|
|
17902
|
-
|
|
17903
|
-
|
|
17904
|
-
return true;
|
|
17905
|
-
}
|
|
17895
|
+
const actualNodeState = nodeHandler.serialize(node);
|
|
17896
|
+
const newNodeState = nodeHandler.serialize(newNode);
|
|
17897
|
+
node.destroy();
|
|
17898
|
+
instance.removeNodeNT(actualNodeState, { emitUserChangeEvent: false });
|
|
17899
|
+
instance.addNodeNT(newNodeState, layerToMoveAttrs.id, {
|
|
17900
|
+
emitUserChangeEvent: false,
|
|
17901
|
+
overrideUserChangeType: WEAVE_NODE_CHANGE_TYPE.UPDATE
|
|
17902
|
+
});
|
|
17903
|
+
return true;
|
|
17906
17904
|
}
|
|
17907
17905
|
return false;
|
|
17908
17906
|
}
|
|
@@ -18147,6 +18145,9 @@ function getStageClickPoint(instance, pointerPos) {
|
|
|
18147
18145
|
};
|
|
18148
18146
|
return stageClickPoint;
|
|
18149
18147
|
}
|
|
18148
|
+
function isNumber(value) {
|
|
18149
|
+
return typeof value === "number" && !Number.isNaN(value);
|
|
18150
|
+
}
|
|
18150
18151
|
|
|
18151
18152
|
//#endregion
|
|
18152
18153
|
//#region src/actions/selection-tool/constants.ts
|
|
@@ -19431,10 +19432,10 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
19431
19432
|
}
|
|
19432
19433
|
const isStage = e.target instanceof Konva.Stage;
|
|
19433
19434
|
const isTransformer = e.target?.getParent() instanceof Konva.Transformer;
|
|
19434
|
-
const
|
|
19435
|
+
const canBeTargeted = e.target.getAttrs().canBeTargeted !== false;
|
|
19435
19436
|
const isContainerEmptyArea = e.target.getAttrs().isContainerPrincipal !== void 0 && !e.target.getAttrs().isContainerPrincipal;
|
|
19436
19437
|
if (isTransformer) return;
|
|
19437
|
-
if (!isStage && !isContainerEmptyArea &&
|
|
19438
|
+
if (!isStage && !isContainerEmptyArea && canBeTargeted) {
|
|
19438
19439
|
this.selecting = false;
|
|
19439
19440
|
this.stopPanLoop();
|
|
19440
19441
|
this.hideSelectorArea();
|
|
@@ -20534,6 +20535,9 @@ var WeaveNode = class {
|
|
|
20534
20535
|
mutexUserId: void 0
|
|
20535
20536
|
});
|
|
20536
20537
|
};
|
|
20538
|
+
const isLocked = node.getAttrs().locked ?? false;
|
|
20539
|
+
if (isLocked) node.listening(false);
|
|
20540
|
+
else node.listening(true);
|
|
20537
20541
|
}
|
|
20538
20542
|
isNodeSelected(ele) {
|
|
20539
20543
|
const selectionPlugin = this.instance.getPlugin("nodesSelection");
|
|
@@ -20907,27 +20911,27 @@ var WeaveNode = class {
|
|
|
20907
20911
|
const activeAction = this.instance.getActiveAction();
|
|
20908
20912
|
const isNodeSelectionEnabled = this.getSelectionPlugin()?.isEnabled();
|
|
20909
20913
|
const realNode = this.instance.getInstanceRecursive(node);
|
|
20910
|
-
const
|
|
20911
|
-
const isLocked =
|
|
20914
|
+
const canBeTargeted = realNode.getAttrs().canBeTargeted !== false;
|
|
20915
|
+
const isLocked = realNode.getAttrs().locked ?? false;
|
|
20912
20916
|
const isMutexLocked = realNode.getAttrs().mutexLocked && realNode.getAttrs().mutexUserId !== user.id;
|
|
20913
20917
|
if ([MOVE_TOOL_ACTION_NAME].includes(activeAction ?? "")) return false;
|
|
20914
20918
|
let showHover = false;
|
|
20915
20919
|
let cancelBubble = false;
|
|
20916
|
-
if (isNodeSelectionEnabled && this.isSelecting() && !this.isNodeSelected(realNode) && !this.isPasting() &&
|
|
20920
|
+
if (isNodeSelectionEnabled && this.isSelecting() && !this.isNodeSelected(realNode) && !this.isPasting() && realNode.hasName("node") && (isLocked || isMutexLocked)) {
|
|
20917
20921
|
stage.container().style.cursor = "default";
|
|
20918
20922
|
cancelBubble = true;
|
|
20919
20923
|
}
|
|
20920
|
-
if (isNodeSelectionEnabled && this.isSelecting() && !this.isNodeSelected(realNode) && !this.isPasting() &&
|
|
20924
|
+
if (isNodeSelectionEnabled && this.isSelecting() && !this.isNodeSelected(realNode) && !this.isPasting() && canBeTargeted && realNode.hasName("node") && !(isLocked || isMutexLocked) && stage.mode() === WEAVE_STAGE_DEFAULT_MODE) {
|
|
20921
20925
|
showHover = true;
|
|
20922
|
-
stage.container().style.cursor = (typeof
|
|
20926
|
+
stage.container().style.cursor = (typeof realNode?.defineMousePointer === "function" ? realNode.defineMousePointer() : null) ?? "pointer";
|
|
20923
20927
|
cancelBubble = true;
|
|
20924
20928
|
}
|
|
20925
|
-
if (isNodeSelectionEnabled && this.isSelecting() && this.isNodeSelected(realNode) && !this.isPasting() &&
|
|
20929
|
+
if (isNodeSelectionEnabled && this.isSelecting() && this.isNodeSelected(realNode) && !this.isPasting() && realNode.hasName("node") && canBeTargeted && !(isLocked || isMutexLocked) && stage.mode() === WEAVE_STAGE_DEFAULT_MODE) {
|
|
20926
20930
|
showHover = true;
|
|
20927
|
-
stage.container().style.cursor = (typeof
|
|
20931
|
+
stage.container().style.cursor = (typeof realNode?.defineMousePointer === "function" ? realNode.defineMousePointer() : null) ?? "grab";
|
|
20928
20932
|
cancelBubble = true;
|
|
20929
20933
|
}
|
|
20930
|
-
if (!
|
|
20934
|
+
if (!canBeTargeted) cancelBubble = true;
|
|
20931
20935
|
if (this.isPasting()) {
|
|
20932
20936
|
stage.container().style.cursor = "crosshair";
|
|
20933
20937
|
cancelBubble = true;
|
|
@@ -21015,7 +21019,12 @@ var WeaveNode = class {
|
|
|
21015
21019
|
}
|
|
21016
21020
|
lock(instance) {
|
|
21017
21021
|
if (instance.getAttrs().nodeType !== this.getNodeType()) return;
|
|
21018
|
-
instance.
|
|
21022
|
+
const isListening = instance.listening();
|
|
21023
|
+
instance.setAttrs({
|
|
21024
|
+
locked: true,
|
|
21025
|
+
listening: false,
|
|
21026
|
+
previousListening: isListening
|
|
21027
|
+
});
|
|
21019
21028
|
this.instance.updateNode(this.serialize(instance));
|
|
21020
21029
|
const selectionPlugin = this.getSelectionPlugin();
|
|
21021
21030
|
if (selectionPlugin) {
|
|
@@ -21033,7 +21042,12 @@ var WeaveNode = class {
|
|
|
21033
21042
|
let realInstance = instance;
|
|
21034
21043
|
if (instance.getAttrs().nodeId) realInstance = this.instance.getStage().findOne(`#${instance.getAttrs().nodeId}`);
|
|
21035
21044
|
if (!realInstance) return;
|
|
21036
|
-
realInstance.
|
|
21045
|
+
const previousListening = realInstance.getAttrs().previousListening ?? true;
|
|
21046
|
+
realInstance.setAttrs({
|
|
21047
|
+
locked: false,
|
|
21048
|
+
listening: previousListening,
|
|
21049
|
+
previousListening: void 0
|
|
21050
|
+
});
|
|
21037
21051
|
this.instance.updateNode(this.serialize(realInstance));
|
|
21038
21052
|
this.setupDefaultNodeEvents(realInstance);
|
|
21039
21053
|
const stage = this.instance.getStage();
|
|
@@ -21106,8 +21120,6 @@ var WeaveNode = class {
|
|
|
21106
21120
|
nodeType: z.string().describe("Type of the node, must be always provided"),
|
|
21107
21121
|
x: z.number().describe("X position of the node, relative to the parent container"),
|
|
21108
21122
|
y: z.number().describe("Y position of the node, relative to the parent container"),
|
|
21109
|
-
width: z.number().describe("Width of the node in pixels"),
|
|
21110
|
-
height: z.number().describe("Height of the node in pixels"),
|
|
21111
21123
|
scaleX: z.number().describe("Scale factor on the X axis, default is 1"),
|
|
21112
21124
|
scaleY: z.number().describe("Scale factor on the Y axis, default is 1"),
|
|
21113
21125
|
rotation: z.number().optional().describe("Rotation of the node in degrees, default is 0"),
|
|
@@ -22230,7 +22242,7 @@ var WeaveRegisterManager = class {
|
|
|
22230
22242
|
|
|
22231
22243
|
//#endregion
|
|
22232
22244
|
//#region package.json
|
|
22233
|
-
var version = "4.2.0-SNAPSHOT.
|
|
22245
|
+
var version = "4.2.0-SNAPSHOT.318.1";
|
|
22234
22246
|
|
|
22235
22247
|
//#endregion
|
|
22236
22248
|
//#region src/managers/setup.ts
|
|
@@ -23654,10 +23666,7 @@ var Weave = class {
|
|
|
23654
23666
|
const mainLayer = this.stageManager.getMainLayer();
|
|
23655
23667
|
if (mainLayer) mainLayer.destroy();
|
|
23656
23668
|
const stage = this.getStage();
|
|
23657
|
-
if (stage)
|
|
23658
|
-
console.log("remove stage");
|
|
23659
|
-
stage.destroy();
|
|
23660
|
-
}
|
|
23669
|
+
if (stage) stage.destroy();
|
|
23661
23670
|
if (this.eventsController) this.eventsController.abort();
|
|
23662
23671
|
if (!this.isServerSide()) this.eventsController = new AbortController();
|
|
23663
23672
|
this.registerManager.reset();
|
|
@@ -24392,6 +24401,7 @@ async function downscaleImageFile(file, ratio) {
|
|
|
24392
24401
|
ctx.drawImage(bitmap, 0, 0, width, height);
|
|
24393
24402
|
return new Promise((resolve) => {
|
|
24394
24403
|
canvas.toBlob((blob) => resolve(blob), file.type, .9);
|
|
24404
|
+
canvas.remove();
|
|
24395
24405
|
});
|
|
24396
24406
|
}
|
|
24397
24407
|
function getImageSizeFromFile(file) {
|
|
@@ -24447,7 +24457,9 @@ const downscaleImageFromURL = (url, options) => {
|
|
|
24447
24457
|
canvas.height = height;
|
|
24448
24458
|
const ctx = canvas.getContext("2d");
|
|
24449
24459
|
ctx.drawImage(img, 0, 0, width, height);
|
|
24450
|
-
|
|
24460
|
+
const dataURL = canvas.toDataURL(type);
|
|
24461
|
+
canvas.remove();
|
|
24462
|
+
resolve(dataURL);
|
|
24451
24463
|
};
|
|
24452
24464
|
img.onerror = () => {
|
|
24453
24465
|
reject(new Error("Invalid image", { cause: "InvalidImage" }));
|
|
@@ -24617,7 +24629,8 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24617
24629
|
globalEventsInitialized = false;
|
|
24618
24630
|
initialize = void 0;
|
|
24619
24631
|
onRender(props) {
|
|
24620
|
-
|
|
24632
|
+
let stage = this.instance.getStage();
|
|
24633
|
+
if (!stage) stage = new Konva.Stage({
|
|
24621
24634
|
...props,
|
|
24622
24635
|
mode: "default"
|
|
24623
24636
|
});
|
|
@@ -25013,17 +25026,19 @@ var WeaveRectangleNode = class extends WeaveNode {
|
|
|
25013
25026
|
}
|
|
25014
25027
|
static getSchema() {
|
|
25015
25028
|
const baseSchema = super.getSchema();
|
|
25016
|
-
const
|
|
25017
|
-
type: z.literal(
|
|
25029
|
+
const nodeSchema = baseSchema.extend({
|
|
25030
|
+
type: z.literal(WEAVE_RECTANGLE_NODE_TYPE).describe(`Type of the node, for a rectangle node it will always be "${WEAVE_RECTANGLE_NODE_TYPE}"`),
|
|
25018
25031
|
props: baseSchema.shape.props.extend({
|
|
25019
|
-
nodeType: z.literal(
|
|
25032
|
+
nodeType: z.literal(WEAVE_RECTANGLE_NODE_TYPE).describe(`Type of the node, for a rectangle node it will always be "${WEAVE_RECTANGLE_NODE_TYPE}"`),
|
|
25033
|
+
width: z.number().describe("Width of the rectangle in pixels"),
|
|
25034
|
+
height: z.number().describe("Height of the rectangle in pixels"),
|
|
25020
25035
|
fill: z.string().describe("Fill color of the rectangle in hex format with alpha channel (e.g. #RRGGBBAA)"),
|
|
25021
25036
|
stroke: z.string().describe("Stroke color of the rectangle in hex format with alpha channel (e.g. #RRGGBBAA)"),
|
|
25022
25037
|
strokeWidth: z.number().describe("Stroke width of the rectangle in pixels"),
|
|
25023
25038
|
strokeScaleEnabled: z.boolean().describe("Whether the rectangle stroke width should scale when the node is scaled. Defaults to true.")
|
|
25024
25039
|
})
|
|
25025
25040
|
});
|
|
25026
|
-
return
|
|
25041
|
+
return nodeSchema;
|
|
25027
25042
|
}
|
|
25028
25043
|
};
|
|
25029
25044
|
|
|
@@ -25184,6 +25199,67 @@ var WeaveEllipseNode = class extends WeaveNode {
|
|
|
25184
25199
|
node.x(node.x() + dx);
|
|
25185
25200
|
node.y(node.y() + dy);
|
|
25186
25201
|
}
|
|
25202
|
+
static defaultState(nodeId) {
|
|
25203
|
+
return {
|
|
25204
|
+
...super.defaultState(nodeId),
|
|
25205
|
+
type: WEAVE_ELLIPSE_NODE_TYPE,
|
|
25206
|
+
props: {
|
|
25207
|
+
...super.defaultState(nodeId).props,
|
|
25208
|
+
nodeType: WEAVE_ELLIPSE_NODE_TYPE,
|
|
25209
|
+
x: 0,
|
|
25210
|
+
y: 0,
|
|
25211
|
+
radiusX: 100,
|
|
25212
|
+
radiusY: 100,
|
|
25213
|
+
stroke: "#000000",
|
|
25214
|
+
fill: "#FFFFFF",
|
|
25215
|
+
strokeWidth: 1,
|
|
25216
|
+
strokeScaleEnabled: true,
|
|
25217
|
+
rotation: 0,
|
|
25218
|
+
zIndex: 1,
|
|
25219
|
+
children: []
|
|
25220
|
+
}
|
|
25221
|
+
};
|
|
25222
|
+
}
|
|
25223
|
+
static addNodeState(defaultNodeState, props) {
|
|
25224
|
+
return mergeExceptArrays(defaultNodeState, { props: {
|
|
25225
|
+
x: props.x,
|
|
25226
|
+
y: props.y,
|
|
25227
|
+
radiusX: props.radiusX,
|
|
25228
|
+
radiusY: props.radiusY,
|
|
25229
|
+
rotation: props.rotation,
|
|
25230
|
+
fill: props.fill,
|
|
25231
|
+
...props.stroke && { stroke: props.stroke },
|
|
25232
|
+
...props.strokeWidth && { strokeWidth: props.strokeWidth }
|
|
25233
|
+
} });
|
|
25234
|
+
}
|
|
25235
|
+
static updateNodeState(prevNodeState, nextProps) {
|
|
25236
|
+
return mergeExceptArrays(prevNodeState, { props: {
|
|
25237
|
+
x: nextProps.x,
|
|
25238
|
+
y: nextProps.y,
|
|
25239
|
+
radiusX: nextProps.radiusX,
|
|
25240
|
+
radiusY: nextProps.radiusY,
|
|
25241
|
+
rotation: nextProps.rotation,
|
|
25242
|
+
fill: nextProps.fill,
|
|
25243
|
+
...nextProps.stroke && { stroke: nextProps.stroke },
|
|
25244
|
+
...nextProps.strokeWidth && { strokeWidth: nextProps.strokeWidth }
|
|
25245
|
+
} });
|
|
25246
|
+
}
|
|
25247
|
+
static getSchema() {
|
|
25248
|
+
const baseSchema = super.getSchema();
|
|
25249
|
+
const nodeSchema = baseSchema.extend({
|
|
25250
|
+
type: z.literal(WEAVE_ELLIPSE_NODE_TYPE).describe(`Type of the node, for a ellipse node it will always be "${WEAVE_ELLIPSE_NODE_TYPE}"`),
|
|
25251
|
+
props: baseSchema.shape.props.extend({
|
|
25252
|
+
nodeType: z.literal(WEAVE_ELLIPSE_NODE_TYPE).describe(`Type of the node, for a ellipse node it will always be "${WEAVE_ELLIPSE_NODE_TYPE}"`),
|
|
25253
|
+
radiusX: z.number().describe("Radius on the X axis of the ellipse in pixels"),
|
|
25254
|
+
radiusY: z.number().describe("Radius on the Y axis of the ellipse in pixels"),
|
|
25255
|
+
fill: z.string().describe("Fill color of the ellipse in hex format with alpha channel (e.g. #RRGGBBAA)"),
|
|
25256
|
+
stroke: z.string().describe("Stroke color of the ellipse in hex format with alpha channel (e.g. #RRGGBBAA)"),
|
|
25257
|
+
strokeWidth: z.number().describe("Stroke width of the ellipse in pixels"),
|
|
25258
|
+
strokeScaleEnabled: z.boolean().describe("Whether the ellipse stroke width should scale when the node is scaled. Defaults to true.")
|
|
25259
|
+
})
|
|
25260
|
+
});
|
|
25261
|
+
return nodeSchema;
|
|
25262
|
+
}
|
|
25187
25263
|
};
|
|
25188
25264
|
|
|
25189
25265
|
//#endregion
|
|
@@ -25556,7 +25632,8 @@ const WEAVE_TEXT_NODE_TYPE = "text";
|
|
|
25556
25632
|
const WEAVE_STAGE_TEXT_EDITION_MODE = "text-edition";
|
|
25557
25633
|
const WEAVE_TEXT_NODE_DEFAULT_CONFIG = {
|
|
25558
25634
|
transform: { ...WEAVE_NODES_SELECTION_DEFAULT_CONFIG.selection },
|
|
25559
|
-
outline: { enabled: false }
|
|
25635
|
+
outline: { enabled: false },
|
|
25636
|
+
cursor: { color: "#000000" }
|
|
25560
25637
|
};
|
|
25561
25638
|
const TEXT_LAYOUT = {
|
|
25562
25639
|
["SMART"]: "smart",
|
|
@@ -25890,6 +25967,7 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25890
25967
|
}
|
|
25891
25968
|
mimicTextNode(textNode) {
|
|
25892
25969
|
if (!this.textArea) return;
|
|
25970
|
+
this.textArea.style.caretColor = this.config.cursor.color;
|
|
25893
25971
|
this.textArea.style.fontSize = textNode.fontSize() * textNode.getAbsoluteScale().x + "px";
|
|
25894
25972
|
this.textArea.rows = textNode.text().split("\n").length;
|
|
25895
25973
|
this.textArea.style.letterSpacing = `${textNode.letterSpacing()}`;
|
|
@@ -25898,7 +25976,9 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25898
25976
|
this.textArea.style.fontFamily = textNode.fontFamily();
|
|
25899
25977
|
let fontWeight = "normal";
|
|
25900
25978
|
let fontStyle = "normal";
|
|
25979
|
+
const matchNumber = textNode.fontStyle().match(/\d+/);
|
|
25901
25980
|
if ((textNode.fontStyle() ?? "normal").indexOf("bold") !== -1) fontWeight = "bold";
|
|
25981
|
+
if (matchNumber) fontWeight = matchNumber[0].toString();
|
|
25902
25982
|
if ((textNode.fontStyle() ?? "normal").indexOf("italic") !== -1) fontStyle = "italic";
|
|
25903
25983
|
this.textArea.style.fontWeight = fontWeight;
|
|
25904
25984
|
this.textArea.style.backgroundColor = "transparent";
|
|
@@ -26215,42 +26295,108 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
26215
26295
|
verticalAlign: "top",
|
|
26216
26296
|
fill: "#000000ff",
|
|
26217
26297
|
text: "This is a text node",
|
|
26298
|
+
layout: TEXT_LAYOUT.SMART,
|
|
26218
26299
|
...!config.outline.enabled && { strokeEnabled: false },
|
|
26219
26300
|
...config.outline.enabled && {
|
|
26220
26301
|
strokeEnabled: true,
|
|
26221
26302
|
stroke: config.outline.color,
|
|
26222
26303
|
strokeWidth: config.outline.width,
|
|
26223
26304
|
fillAfterStrokeEnabled: true
|
|
26224
|
-
}
|
|
26225
|
-
layout: TEXT_LAYOUT.SMART
|
|
26305
|
+
}
|
|
26226
26306
|
}
|
|
26227
26307
|
};
|
|
26228
26308
|
}
|
|
26309
|
+
static addNodeState(defaultNodeState, props) {
|
|
26310
|
+
return mergeExceptArrays(defaultNodeState, { props: {
|
|
26311
|
+
x: props.x,
|
|
26312
|
+
y: props.y,
|
|
26313
|
+
width: props.width,
|
|
26314
|
+
...props.height && { height: props.height },
|
|
26315
|
+
FontFamily: props.fontFamily,
|
|
26316
|
+
fontSize: props.fontSize,
|
|
26317
|
+
fontStyle: props.fontStyle,
|
|
26318
|
+
fontVariant: props.fontVariant,
|
|
26319
|
+
textDecoration: props.textDecoration,
|
|
26320
|
+
letterSpacing: props.letterSpacing,
|
|
26321
|
+
lineHeight: props.lineHeight,
|
|
26322
|
+
align: props.align,
|
|
26323
|
+
verticalAlign: props.verticalAlign,
|
|
26324
|
+
rotation: props.rotation,
|
|
26325
|
+
fill: props.fill,
|
|
26326
|
+
text: props.text,
|
|
26327
|
+
layout: props.layout,
|
|
26328
|
+
...props.strokeEnabled && { strokeEnabled: props.strokeEnabled },
|
|
26329
|
+
...props.stroke && { stroke: props.stroke },
|
|
26330
|
+
...props.strokeWidth && { strokeWidth: props.strokeWidth },
|
|
26331
|
+
...props.fillAfterStrokeEnabled && { fillAfterStrokeEnabled: props.fillAfterStrokeEnabled }
|
|
26332
|
+
} });
|
|
26333
|
+
}
|
|
26334
|
+
static updateNodeState(prevNodeState, nextProps) {
|
|
26335
|
+
return mergeExceptArrays(prevNodeState, { props: {
|
|
26336
|
+
x: nextProps.x,
|
|
26337
|
+
y: nextProps.y,
|
|
26338
|
+
width: nextProps.width,
|
|
26339
|
+
...nextProps.height && { height: nextProps.height },
|
|
26340
|
+
FontFamily: nextProps.fontFamily,
|
|
26341
|
+
fontSize: nextProps.fontSize,
|
|
26342
|
+
fontStyle: nextProps.fontStyle,
|
|
26343
|
+
fontVariant: nextProps.fontVariant,
|
|
26344
|
+
textDecoration: nextProps.textDecoration,
|
|
26345
|
+
letterSpacing: nextProps.letterSpacing,
|
|
26346
|
+
lineHeight: nextProps.lineHeight,
|
|
26347
|
+
align: nextProps.align,
|
|
26348
|
+
verticalAlign: nextProps.verticalAlign,
|
|
26349
|
+
rotation: nextProps.rotation,
|
|
26350
|
+
fill: nextProps.fill,
|
|
26351
|
+
text: nextProps.text,
|
|
26352
|
+
layout: nextProps.layout,
|
|
26353
|
+
...nextProps.strokeEnabled && { strokeEnabled: nextProps.strokeEnabled },
|
|
26354
|
+
...nextProps.stroke && { stroke: nextProps.stroke },
|
|
26355
|
+
...nextProps.strokeWidth && { strokeWidth: nextProps.strokeWidth },
|
|
26356
|
+
...nextProps.fillAfterStrokeEnabled && { fillAfterStrokeEnabled: nextProps.fillAfterStrokeEnabled }
|
|
26357
|
+
} });
|
|
26358
|
+
}
|
|
26229
26359
|
static getSchema() {
|
|
26230
26360
|
const baseSchema = super.getSchema();
|
|
26231
|
-
const
|
|
26232
|
-
type: z.literal(
|
|
26361
|
+
const nodeSchema = baseSchema.extend({
|
|
26362
|
+
type: z.literal(WEAVE_TEXT_NODE_TYPE).describe(`Type of the node, for a text node it will always be "${WEAVE_TEXT_NODE_TYPE}"`),
|
|
26233
26363
|
props: z.object({
|
|
26234
|
-
nodeType: z.literal(
|
|
26235
|
-
|
|
26236
|
-
|
|
26237
|
-
|
|
26238
|
-
|
|
26239
|
-
|
|
26240
|
-
|
|
26241
|
-
|
|
26242
|
-
|
|
26243
|
-
|
|
26244
|
-
|
|
26245
|
-
|
|
26246
|
-
|
|
26247
|
-
|
|
26248
|
-
|
|
26249
|
-
|
|
26250
|
-
|
|
26364
|
+
nodeType: z.literal(WEAVE_TEXT_NODE_TYPE).describe(`Type of the node, for a text node it will always be "${WEAVE_TEXT_NODE_TYPE}"`),
|
|
26365
|
+
width: z.number().describe("Width of the text in pixels"),
|
|
26366
|
+
height: z.number().optional().describe("Height of the text in pixels. Optional if layout is auto-height or smart."),
|
|
26367
|
+
fontFamily: z.string().default("Arial").describe("Font family of the text, e.g. Arial, Helvetica, etc."),
|
|
26368
|
+
fontSize: z.number().default(16).describe("Font size of the text in pixels."),
|
|
26369
|
+
fontStyle: z.string().regex(/^(?:normal|bold|\d+)(?: italic)?$/).default("normal").describe("Font style of the text, can be \"normal\", \"bold\", \"400\", \"italic\" or a combination like \"bold italic\" or \"700 italic\"."),
|
|
26370
|
+
fontVariant: z.enum(["normal", "small-caps"]).describe("Font variant of the text, can be \"normal\" or \"small-caps\"."),
|
|
26371
|
+
textDecoration: z.enum([
|
|
26372
|
+
"line-through",
|
|
26373
|
+
"underline",
|
|
26374
|
+
""
|
|
26375
|
+
]).default("").describe("Text decoration can be \"line-through\", \"underline\" or empty string for none."),
|
|
26376
|
+
letterSpacing: z.number().default(0).describe("Spacing between letters in pixels."),
|
|
26377
|
+
lineHeight: z.number().default(1).describe("Line height of the text, as a multiplier of font size."),
|
|
26378
|
+
align: z.enum([
|
|
26379
|
+
"left",
|
|
26380
|
+
"center",
|
|
26381
|
+
"right",
|
|
26382
|
+
"justify"
|
|
26383
|
+
]).default("left").describe("Text alignment, can be \"left\", \"center\", \"right\" or \"justify\"."),
|
|
26384
|
+
verticalAlign: z.enum([
|
|
26385
|
+
"top",
|
|
26386
|
+
"middle",
|
|
26387
|
+
"bottom"
|
|
26388
|
+
]).default("top").describe("Vertical alignment of the text, can be 'top', 'middle' or 'bottom'."),
|
|
26389
|
+
fill: z.string().default("#000000ff").describe("Fill color of the text in hex format with alpha channel (e.g. #RRGGBBAA)."),
|
|
26390
|
+
text: z.string().default("text").describe("The actual text content of the node."),
|
|
26391
|
+
strokeEnabled: z.boolean().default(false).describe("Whether the text outline is enabled."),
|
|
26392
|
+
stroke: z.string().optional().default("#d6d6d6").describe("Color of the text outline in hex format with alpha channel (e.g. #RRGGBBAA)."),
|
|
26393
|
+
strokeWidth: z.number().optional().default(2).describe("Width of the text outline in pixels."),
|
|
26394
|
+
strokeScaleEnabled: z.boolean().default(true).describe("Whether the stroke width should scale when the node is scaled."),
|
|
26395
|
+
fillAfterStrokeEnabled: z.boolean().default(true).describe("Whether the fill should be drawn after the stroke. If false, the stroke will be drawn on top of the fill."),
|
|
26396
|
+
layout: z.enum(TEXT_LAYOUT).default(TEXT_LAYOUT.SMART).describe("Layout mode of the text node. Can be:\n- 'fixed': the text node will have fixed width and height, and the text will be scaled to fit the node.\n- 'auto-height': the width of the text node will be fixed, but the height will adjust to fit the text content.\n- 'auto-all': both width and height of the text node will adjust to fit the text content.\n- 'smart': the text node will try to adjust its size based on the content and layout, but it will not exceed the initial width and height set on the node.")
|
|
26251
26397
|
})
|
|
26252
26398
|
});
|
|
26253
|
-
return
|
|
26399
|
+
return nodeSchema;
|
|
26254
26400
|
}
|
|
26255
26401
|
};
|
|
26256
26402
|
|
|
@@ -26905,6 +27051,7 @@ const doPreloadCursors = async (cursorsToPreload, setCursor, getFallbackCursor,
|
|
|
26905
27051
|
const ctx = canvas.getContext("2d");
|
|
26906
27052
|
ctx?.drawImage(img, 0, 0);
|
|
26907
27053
|
const dataURL = canvas.toDataURL("image/png");
|
|
27054
|
+
canvas.remove();
|
|
26908
27055
|
const tokens = value.split(" ");
|
|
26909
27056
|
tokens[0] = `url(${dataURL})`;
|
|
26910
27057
|
setCursor(state, tokens.join(" "));
|
|
@@ -27890,6 +28037,7 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
27890
28037
|
static defaultState(nodeId) {
|
|
27891
28038
|
return {
|
|
27892
28039
|
...super.defaultState(nodeId),
|
|
28040
|
+
type: WEAVE_IMAGE_NODE_TYPE,
|
|
27893
28041
|
props: {
|
|
27894
28042
|
...super.defaultState(nodeId).props,
|
|
27895
28043
|
nodeType: WEAVE_IMAGE_NODE_TYPE,
|
|
@@ -27966,10 +28114,12 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
27966
28114
|
}
|
|
27967
28115
|
static getSchema() {
|
|
27968
28116
|
const baseSchema = super.getSchema();
|
|
27969
|
-
const
|
|
27970
|
-
type: z.literal(
|
|
28117
|
+
const nodeSchema = baseSchema.extend({
|
|
28118
|
+
type: z.literal(WEAVE_IMAGE_NODE_TYPE).describe(`Type of the node, for a image node it will always be "${WEAVE_IMAGE_NODE_TYPE}"`),
|
|
27971
28119
|
props: baseSchema.shape.props.extend({
|
|
27972
|
-
nodeType: z.literal("image").describe(
|
|
28120
|
+
nodeType: z.literal("image").describe(`Type of the node, for a image node it will always be "${WEAVE_IMAGE_NODE_TYPE}"`),
|
|
28121
|
+
width: z.number().describe("Width of the image in pixels"),
|
|
28122
|
+
height: z.number().describe("Height of the image in pixels"),
|
|
27973
28123
|
imageURL: z.string().describe("The URL of the image to be rendered by the node"),
|
|
27974
28124
|
imageFallback: z.string().optional().describe("The fallback image to display while the image to loads, it must be a base64 string with the format: data:image/{format};base64,{data}"),
|
|
27975
28125
|
adding: z.boolean().default(false),
|
|
@@ -27987,7 +28137,7 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
27987
28137
|
cropping: z.boolean().default(false).describe("Whether the image is currently being cropped")
|
|
27988
28138
|
})
|
|
27989
28139
|
});
|
|
27990
|
-
return
|
|
28140
|
+
return nodeSchema;
|
|
27991
28141
|
}
|
|
27992
28142
|
};
|
|
27993
28143
|
|
|
@@ -28160,6 +28310,71 @@ var WeaveStarNode = class extends WeaveNode {
|
|
|
28160
28310
|
y: element.props.outerRadius
|
|
28161
28311
|
};
|
|
28162
28312
|
}
|
|
28313
|
+
static defaultState(nodeId) {
|
|
28314
|
+
return {
|
|
28315
|
+
...super.defaultState(nodeId),
|
|
28316
|
+
type: WEAVE_STAR_NODE_TYPE,
|
|
28317
|
+
props: {
|
|
28318
|
+
...super.defaultState(nodeId).props,
|
|
28319
|
+
nodeType: WEAVE_STAR_NODE_TYPE,
|
|
28320
|
+
x: 0,
|
|
28321
|
+
y: 0,
|
|
28322
|
+
numPoints: 5,
|
|
28323
|
+
innerRadius: 50,
|
|
28324
|
+
outerRadius: 100,
|
|
28325
|
+
stroke: "#000000",
|
|
28326
|
+
fill: "#FFFFFF",
|
|
28327
|
+
strokeWidth: 1,
|
|
28328
|
+
strokeScaleEnabled: true,
|
|
28329
|
+
rotation: 0,
|
|
28330
|
+
zIndex: 1,
|
|
28331
|
+
children: []
|
|
28332
|
+
}
|
|
28333
|
+
};
|
|
28334
|
+
}
|
|
28335
|
+
static addNodeState(defaultNodeState, props) {
|
|
28336
|
+
return mergeExceptArrays(defaultNodeState, { props: {
|
|
28337
|
+
x: props.x,
|
|
28338
|
+
y: props.y,
|
|
28339
|
+
numPoints: props.numPoints,
|
|
28340
|
+
innerRadius: props.innerRadius,
|
|
28341
|
+
outerRadius: props.outerRadius,
|
|
28342
|
+
rotation: props.rotation,
|
|
28343
|
+
fill: props.fill,
|
|
28344
|
+
...props.stroke && { stroke: props.stroke },
|
|
28345
|
+
...props.strokeWidth && { strokeWidth: props.strokeWidth }
|
|
28346
|
+
} });
|
|
28347
|
+
}
|
|
28348
|
+
static updateNodeState(prevNodeState, nextProps) {
|
|
28349
|
+
return mergeExceptArrays(prevNodeState, { props: {
|
|
28350
|
+
x: nextProps.x,
|
|
28351
|
+
y: nextProps.y,
|
|
28352
|
+
numPoints: nextProps.numPoints,
|
|
28353
|
+
innerRadius: nextProps.innerRadius,
|
|
28354
|
+
outerRadius: nextProps.outerRadius,
|
|
28355
|
+
rotation: nextProps.rotation,
|
|
28356
|
+
fill: nextProps.fill,
|
|
28357
|
+
...nextProps.stroke && { stroke: nextProps.stroke },
|
|
28358
|
+
...nextProps.strokeWidth && { strokeWidth: nextProps.strokeWidth }
|
|
28359
|
+
} });
|
|
28360
|
+
}
|
|
28361
|
+
static getSchema() {
|
|
28362
|
+
const baseSchema = super.getSchema();
|
|
28363
|
+
const nodeSchema = baseSchema.extend({
|
|
28364
|
+
type: z.literal(WEAVE_STAR_NODE_TYPE).describe(`Type of the node, for a start node it will always be "${WEAVE_STAR_NODE_TYPE}"`),
|
|
28365
|
+
props: baseSchema.shape.props.extend({
|
|
28366
|
+
nodeType: z.literal(WEAVE_STAR_NODE_TYPE).describe(`Type of the node, for a rectangle node it will always be "${WEAVE_STAR_NODE_TYPE}"`),
|
|
28367
|
+
numPoints: z.number().describe("Number of points of the star, must be greater than or equal to 3"),
|
|
28368
|
+
innerRadius: z.number().describe("Inner radius of the star, must be greater than or equal to 0"),
|
|
28369
|
+
outerRadius: z.number().describe("Outer radius of the star, must be greater than or equal to 0"),
|
|
28370
|
+
fill: z.string().describe("Fill color of the star in hex format with alpha channel (e.g. #RRGGBBAA)"),
|
|
28371
|
+
stroke: z.string().describe("Stroke color of the star in hex format with alpha channel (e.g. #RRGGBBAA)"),
|
|
28372
|
+
strokeWidth: z.number().describe("Stroke width of the star in pixels"),
|
|
28373
|
+
strokeScaleEnabled: z.boolean().describe("Whether the star stroke width should scale when the node is scaled. Defaults to true.")
|
|
28374
|
+
})
|
|
28375
|
+
});
|
|
28376
|
+
return nodeSchema;
|
|
28377
|
+
}
|
|
28163
28378
|
};
|
|
28164
28379
|
|
|
28165
28380
|
//#endregion
|
|
@@ -28375,6 +28590,67 @@ var WeaveRegularPolygonNode = class extends WeaveNode {
|
|
|
28375
28590
|
y: element.props.radius
|
|
28376
28591
|
};
|
|
28377
28592
|
}
|
|
28593
|
+
static defaultState(nodeId) {
|
|
28594
|
+
return {
|
|
28595
|
+
...super.defaultState(nodeId),
|
|
28596
|
+
type: WEAVE_REGULAR_POLYGON_NODE_TYPE,
|
|
28597
|
+
props: {
|
|
28598
|
+
...super.defaultState(nodeId).props,
|
|
28599
|
+
nodeType: WEAVE_REGULAR_POLYGON_NODE_TYPE,
|
|
28600
|
+
x: 0,
|
|
28601
|
+
y: 0,
|
|
28602
|
+
sides: 5,
|
|
28603
|
+
radius: 100,
|
|
28604
|
+
stroke: "#000000",
|
|
28605
|
+
fill: "#FFFFFF",
|
|
28606
|
+
strokeWidth: 1,
|
|
28607
|
+
strokeScaleEnabled: true,
|
|
28608
|
+
rotation: 0,
|
|
28609
|
+
zIndex: 1,
|
|
28610
|
+
children: []
|
|
28611
|
+
}
|
|
28612
|
+
};
|
|
28613
|
+
}
|
|
28614
|
+
static addNodeState(defaultNodeState, props) {
|
|
28615
|
+
return mergeExceptArrays(defaultNodeState, { props: {
|
|
28616
|
+
x: props.x,
|
|
28617
|
+
y: props.y,
|
|
28618
|
+
sides: props.sides,
|
|
28619
|
+
radius: props.radius,
|
|
28620
|
+
rotation: props.rotation,
|
|
28621
|
+
fill: props.fill,
|
|
28622
|
+
...props.stroke && { stroke: props.stroke },
|
|
28623
|
+
...props.strokeWidth && { strokeWidth: props.strokeWidth }
|
|
28624
|
+
} });
|
|
28625
|
+
}
|
|
28626
|
+
static updateNodeState(prevNodeState, nextProps) {
|
|
28627
|
+
return mergeExceptArrays(prevNodeState, { props: {
|
|
28628
|
+
x: nextProps.x,
|
|
28629
|
+
y: nextProps.y,
|
|
28630
|
+
sides: nextProps.sides,
|
|
28631
|
+
radius: nextProps.radius,
|
|
28632
|
+
rotation: nextProps.rotation,
|
|
28633
|
+
fill: nextProps.fill,
|
|
28634
|
+
...nextProps.stroke && { stroke: nextProps.stroke },
|
|
28635
|
+
...nextProps.strokeWidth && { strokeWidth: nextProps.strokeWidth }
|
|
28636
|
+
} });
|
|
28637
|
+
}
|
|
28638
|
+
static getSchema() {
|
|
28639
|
+
const baseSchema = super.getSchema();
|
|
28640
|
+
const nodeSchema = baseSchema.extend({
|
|
28641
|
+
type: z.literal(WEAVE_REGULAR_POLYGON_NODE_TYPE).describe(`Type of the node, for a regular polygon node it will always be "${WEAVE_REGULAR_POLYGON_NODE_TYPE}"`),
|
|
28642
|
+
props: baseSchema.shape.props.extend({
|
|
28643
|
+
nodeType: z.literal(WEAVE_REGULAR_POLYGON_NODE_TYPE).describe(`Type of the node, for a regular polygon node it will always be "${WEAVE_REGULAR_POLYGON_NODE_TYPE}"`),
|
|
28644
|
+
sides: z.number().describe("Number of sides of the regular polygon, must be 3 or more"),
|
|
28645
|
+
radius: z.number().describe("Radius of the regular polygon in pixels, distance from the center to any vertex"),
|
|
28646
|
+
fill: z.string().describe("Fill color of the regular polygon in hex format with alpha channel (e.g. #RRGGBBAA)"),
|
|
28647
|
+
stroke: z.string().describe("Stroke color of the regular polygon in hex format with alpha channel (e.g. #RRGGBBAA)"),
|
|
28648
|
+
strokeWidth: z.number().describe("Stroke width of the regular polygon in pixels"),
|
|
28649
|
+
strokeScaleEnabled: z.boolean().describe("Whether the regular polygon stroke width should scale when the node is scaled. Defaults to true.")
|
|
28650
|
+
})
|
|
28651
|
+
});
|
|
28652
|
+
return nodeSchema;
|
|
28653
|
+
}
|
|
28378
28654
|
};
|
|
28379
28655
|
|
|
28380
28656
|
//#endregion
|
|
@@ -28563,7 +28839,7 @@ var WeaveFrameNode = class extends WeaveNode {
|
|
|
28563
28839
|
strokeScaleEnabled: true,
|
|
28564
28840
|
listening: true,
|
|
28565
28841
|
draggable: false,
|
|
28566
|
-
|
|
28842
|
+
canBeTargeted: false
|
|
28567
28843
|
});
|
|
28568
28844
|
frameInternal.clip({
|
|
28569
28845
|
x: 0 * frameInternal.scaleX(),
|
|
@@ -28771,17 +29047,17 @@ var WeaveFrameNode = class extends WeaveNode {
|
|
|
28771
29047
|
}
|
|
28772
29048
|
static addNodeState(defaultNodeState, props) {
|
|
28773
29049
|
return mergeExceptArrays(defaultNodeState, { props: {
|
|
28774
|
-
x: props.
|
|
28775
|
-
y: props.
|
|
28776
|
-
width: props.
|
|
28777
|
-
height: props.
|
|
28778
|
-
...props.
|
|
28779
|
-
frameWidth: props.
|
|
28780
|
-
frameHeight: props.
|
|
28781
|
-
...props.
|
|
28782
|
-
rotation: props.
|
|
28783
|
-
...props.
|
|
28784
|
-
...props.
|
|
29050
|
+
x: props.x,
|
|
29051
|
+
y: props.y,
|
|
29052
|
+
width: props.width,
|
|
29053
|
+
height: props.height,
|
|
29054
|
+
...props.title && { stroke: props.title },
|
|
29055
|
+
frameWidth: props.frameWidth,
|
|
29056
|
+
frameHeight: props.frameHeight,
|
|
29057
|
+
...props.frameBackground && { stroke: props.frameBackground },
|
|
29058
|
+
rotation: props.rotation,
|
|
29059
|
+
...props.borderColor && { borderColor: props.borderColor },
|
|
29060
|
+
...props.borderWidth && { borderWidth: props.borderWidth }
|
|
28785
29061
|
} });
|
|
28786
29062
|
}
|
|
28787
29063
|
static updateNodeState(prevNodeState, nextProps) {
|
|
@@ -28799,22 +29075,20 @@ var WeaveFrameNode = class extends WeaveNode {
|
|
|
28799
29075
|
}
|
|
28800
29076
|
static getSchema() {
|
|
28801
29077
|
const baseSchema = super.getSchema();
|
|
28802
|
-
const
|
|
28803
|
-
type: z.literal(
|
|
29078
|
+
const nodeSchema = baseSchema.extend({
|
|
29079
|
+
type: z.literal(WEAVE_FRAME_NODE_TYPE).describe(`Type of the node, for a frame node it will always be "${WEAVE_FRAME_NODE_TYPE}"`),
|
|
28804
29080
|
props: baseSchema.shape.props.extend({
|
|
28805
|
-
nodeType: z.literal(
|
|
28806
|
-
|
|
28807
|
-
|
|
28808
|
-
|
|
28809
|
-
|
|
28810
|
-
|
|
28811
|
-
|
|
28812
|
-
frameHeight: z.number(),
|
|
28813
|
-
frameBackground: z.string().default(WEAVE_FRAME_DEFAULT_BACKGROUND_COLOR),
|
|
29081
|
+
nodeType: z.literal(WEAVE_FRAME_NODE_TYPE).describe(`Type of the node, for a frame node it will always be "${WEAVE_FRAME_NODE_TYPE}"`),
|
|
29082
|
+
borderColor: z.string().default("#000000ff").describe("Border color of the frame in hex format with alpha channel (e.g. #RRGGBBAA)"),
|
|
29083
|
+
borderWidth: z.number().default(1).describe("Border width of the frame in hex format with alpha channel (e.g. #RRGGBBAA)"),
|
|
29084
|
+
title: z.string().default("Frame").describe("Title of the frame"),
|
|
29085
|
+
frameWidth: z.number().describe("Width of the frame in pixels"),
|
|
29086
|
+
frameHeight: z.number().describe("Height of the frame in pixels"),
|
|
29087
|
+
frameBackground: z.string().default(WEAVE_FRAME_DEFAULT_BACKGROUND_COLOR).describe("Background color of the frame in hex format with alpha channel (e.g. #RRGGBBAA)"),
|
|
28814
29088
|
children: z.array(z.any()).default([])
|
|
28815
29089
|
})
|
|
28816
29090
|
});
|
|
28817
|
-
return
|
|
29091
|
+
return nodeSchema;
|
|
28818
29092
|
}
|
|
28819
29093
|
};
|
|
28820
29094
|
|
|
@@ -29785,6 +30059,70 @@ var WeaveStrokeSingleNode = class extends WeaveNode {
|
|
|
29785
30059
|
}
|
|
29786
30060
|
return pos;
|
|
29787
30061
|
}
|
|
30062
|
+
static defaultState(nodeId) {
|
|
30063
|
+
return {
|
|
30064
|
+
...super.defaultState(nodeId),
|
|
30065
|
+
type: WEAVE_STROKE_SINGLE_NODE_TYPE,
|
|
30066
|
+
props: {
|
|
30067
|
+
...super.defaultState(nodeId).props,
|
|
30068
|
+
nodeType: WEAVE_STROKE_SINGLE_NODE_TYPE,
|
|
30069
|
+
x: 0,
|
|
30070
|
+
y: 0,
|
|
30071
|
+
strokeElements: [
|
|
30072
|
+
0,
|
|
30073
|
+
0,
|
|
30074
|
+
100,
|
|
30075
|
+
100
|
|
30076
|
+
],
|
|
30077
|
+
stroke: "#000000",
|
|
30078
|
+
fill: "#FFFFFF",
|
|
30079
|
+
strokeWidth: 1,
|
|
30080
|
+
strokeScaleEnabled: true,
|
|
30081
|
+
rotation: 0,
|
|
30082
|
+
zIndex: 1,
|
|
30083
|
+
children: []
|
|
30084
|
+
}
|
|
30085
|
+
};
|
|
30086
|
+
}
|
|
30087
|
+
static addNodeState(defaultNodeState, props) {
|
|
30088
|
+
return mergeExceptArrays(defaultNodeState, { props: {
|
|
30089
|
+
x: props.x,
|
|
30090
|
+
y: props.y,
|
|
30091
|
+
strokeElements: props.strokeElements,
|
|
30092
|
+
rotation: props.rotation,
|
|
30093
|
+
fill: props.fill,
|
|
30094
|
+
...props.stroke && { stroke: props.stroke },
|
|
30095
|
+
...props.strokeWidth && { strokeWidth: props.strokeWidth }
|
|
30096
|
+
} });
|
|
30097
|
+
}
|
|
30098
|
+
static updateNodeState(prevNodeState, nextProps) {
|
|
30099
|
+
return mergeExceptArrays(prevNodeState, { props: {
|
|
30100
|
+
x: nextProps.x,
|
|
30101
|
+
y: nextProps.y,
|
|
30102
|
+
strokeElements: nextProps.strokeElements,
|
|
30103
|
+
rotation: nextProps.rotation,
|
|
30104
|
+
fill: nextProps.fill,
|
|
30105
|
+
...nextProps.stroke && { stroke: nextProps.stroke },
|
|
30106
|
+
...nextProps.strokeWidth && { strokeWidth: nextProps.strokeWidth }
|
|
30107
|
+
} });
|
|
30108
|
+
}
|
|
30109
|
+
static getSchema() {
|
|
30110
|
+
const baseSchema = super.getSchema();
|
|
30111
|
+
const nodeSchema = baseSchema.extend({
|
|
30112
|
+
type: z.literal(WEAVE_STROKE_SINGLE_NODE_TYPE).describe(`Type of the node, for a stroke node it will always be "${WEAVE_STROKE_SINGLE_NODE_TYPE}"`),
|
|
30113
|
+
props: baseSchema.shape.props.extend({
|
|
30114
|
+
nodeType: z.literal(WEAVE_STROKE_SINGLE_NODE_TYPE).describe(`Type of the node, for a stroke node it will always be "${WEAVE_STROKE_SINGLE_NODE_TYPE}"`),
|
|
30115
|
+
strokeElements: z.array(z.number()).length(4).describe("Array of 4 numbers representing the start and end points of the stroke in the format [startX, startY, endX, endY]"),
|
|
30116
|
+
tipStartStyle: z.string().describe(`Style of the line tip at the start of the stroke. Can be "none", "arrow", "circle" or "square". Defaults to "none".`),
|
|
30117
|
+
tipEndStyle: z.string().describe(`Style of the line tip at the end of the stroke. Can be "none", "arrow", "circle" or "square". Defaults to "none".`),
|
|
30118
|
+
fill: z.string().describe("Fill color of the rectangle in hex format with alpha channel (e.g. #RRGGBBAA)"),
|
|
30119
|
+
stroke: z.string().describe("Stroke color of the rectangle in hex format with alpha channel (e.g. #RRGGBBAA)"),
|
|
30120
|
+
strokeWidth: z.number().describe("Stroke width of the rectangle in pixels"),
|
|
30121
|
+
strokeScaleEnabled: z.boolean().describe("Whether the rectangle stroke width should scale when the node is scaled. Defaults to true.")
|
|
30122
|
+
})
|
|
30123
|
+
});
|
|
30124
|
+
return nodeSchema;
|
|
30125
|
+
}
|
|
29788
30126
|
};
|
|
29789
30127
|
|
|
29790
30128
|
//#endregion
|
|
@@ -29966,7 +30304,7 @@ var WeaveCommentNode = class extends WeaveNode {
|
|
|
29966
30304
|
const commentNode = new Konva.Group({
|
|
29967
30305
|
...commentParams,
|
|
29968
30306
|
name: "comment",
|
|
29969
|
-
|
|
30307
|
+
canBeTargeted: false,
|
|
29970
30308
|
isExpanded: false,
|
|
29971
30309
|
commentAction: null,
|
|
29972
30310
|
listening: true,
|
|
@@ -29977,7 +30315,7 @@ var WeaveCommentNode = class extends WeaveNode {
|
|
|
29977
30315
|
id: `${id}-bg`,
|
|
29978
30316
|
x: 0,
|
|
29979
30317
|
y: -heightContracted,
|
|
29980
|
-
|
|
30318
|
+
canBeTargeted: false,
|
|
29981
30319
|
fill: commentParams.userBackgroundColor ?? "#0000FF",
|
|
29982
30320
|
stroke: this.config.style.stroke,
|
|
29983
30321
|
strokeWidth: this.config.style.strokeWidth,
|
|
@@ -40185,7 +40523,6 @@ var WeaveStageMinimapPlugin = class extends WeavePlugin {
|
|
|
40185
40523
|
if (this.initialized) return;
|
|
40186
40524
|
const container = this.config.getContainer();
|
|
40187
40525
|
if (!container) return;
|
|
40188
|
-
console.log("setup minimap");
|
|
40189
40526
|
let preview = document.getElementById(this.config.id);
|
|
40190
40527
|
const windowAspectRatio = window.innerWidth / window.innerHeight;
|
|
40191
40528
|
if (!preview) {
|
|
@@ -40206,7 +40543,6 @@ var WeaveStageMinimapPlugin = class extends WeavePlugin {
|
|
|
40206
40543
|
this.initialized = true;
|
|
40207
40544
|
this.minimapLayer = new Konva.Layer();
|
|
40208
40545
|
this.minimapStage.add(this.minimapLayer);
|
|
40209
|
-
console.log("aqui?");
|
|
40210
40546
|
this.minimapViewportReference = new Konva.Rect({
|
|
40211
40547
|
...this.config.style.viewportReference,
|
|
40212
40548
|
id: "minimapViewportReference",
|
|
@@ -40218,10 +40554,8 @@ var WeaveStageMinimapPlugin = class extends WeavePlugin {
|
|
|
40218
40554
|
}
|
|
40219
40555
|
const stage = this.instance.getStage();
|
|
40220
40556
|
stage.on("dragmove wheel dragend scaleXChange scaleYChange xChange yChange", () => {
|
|
40221
|
-
console.log("update minimap viewport");
|
|
40222
40557
|
this.updateMinimapViewportReference();
|
|
40223
40558
|
});
|
|
40224
|
-
console.log("aqui initialized");
|
|
40225
40559
|
}
|
|
40226
40560
|
async updateMinimapContent() {
|
|
40227
40561
|
const stage = this.instance.getStage();
|
|
@@ -40254,10 +40588,8 @@ var WeaveStageMinimapPlugin = class extends WeavePlugin {
|
|
|
40254
40588
|
skipStroke: true
|
|
40255
40589
|
});
|
|
40256
40590
|
if (box.width === 0 || box.height === 0) return;
|
|
40257
|
-
console.log("update minimap viewport reference", this.minimapStage);
|
|
40258
40591
|
const width = this.minimapStage?.width();
|
|
40259
40592
|
const height = this.minimapStage?.height();
|
|
40260
|
-
console.log("update minimap viewport reference", width, height);
|
|
40261
40593
|
const fitScale = Math.min(width / box.width, height / box.height);
|
|
40262
40594
|
const centerOffset = {
|
|
40263
40595
|
x: (width - box.width * fitScale) / 2,
|
|
@@ -40288,9 +40620,7 @@ var WeaveStageMinimapPlugin = class extends WeavePlugin {
|
|
|
40288
40620
|
this.setupMinimap();
|
|
40289
40621
|
}
|
|
40290
40622
|
onInit() {
|
|
40291
|
-
console.log("init minimap");
|
|
40292
40623
|
const throttledUpdateMinimap = (0, import_lodash.throttle)(async () => {
|
|
40293
|
-
console.log("throttle update minimap");
|
|
40294
40624
|
await this.updateMinimapContent();
|
|
40295
40625
|
this.updateMinimapViewportReference();
|
|
40296
40626
|
}, DEFAULT_THROTTLE_MS);
|
|
@@ -43418,4 +43748,4 @@ function getJSONFromYjsBinary(actualState) {
|
|
|
43418
43748
|
}
|
|
43419
43749
|
|
|
43420
43750
|
//#endregion
|
|
43421
|
-
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, DEFAULT_GUIDE_TOOL_ACTION_CONFIG, DEFAULT_SNAPPING_MANAGER_CONFIG, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_DISTANCE_NAME, GUIDE_DISTANCE_ORIGIN, GUIDE_KIND, GUIDE_NAME, GUIDE_ORIENTATION, GUIDE_STATE, GUIDE_TOOL_ACTION_NAME, GUIDE_TOOL_STATE, LINE_TOOL_ACTION_NAME, LINE_TOOL_DEFAULT_CONFIG, LINE_TOOL_STATE, MEASURE_TOOL_ACTION_NAME, MEASURE_TOOL_STATE, MOVE_ORIENTATION, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, 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_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_NODES_SNAPPING_PLUGIN_KEY, 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, WeaveGuideToolAction, WeaveImageNode, WeaveImageToolAction, WeaveImagesToolAction, WeaveLayerNode, WeaveLineNode, WeaveLineToolAction, WeaveMeasureNode, WeaveMeasureToolAction, WeaveMoveToolAction, WeaveNode, WeaveNodesMultiSelectionFeedbackPlugin, WeaveNodesSelectionPlugin, WeaveNodesSnappingPlugin, WeavePenToolAction, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRegularPolygonNode, WeaveRegularPolygonToolAction, WeaveRenderer, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageKeyboardMovePlugin, WeaveStageMinimapPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStarNode, WeaveStarToolAction, WeaveStateManipulation, 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 };
|
|
43751
|
+
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, DEFAULT_GUIDE_TOOL_ACTION_CONFIG, DEFAULT_SNAPPING_MANAGER_CONFIG, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_DISTANCE_NAME, GUIDE_DISTANCE_ORIGIN, GUIDE_KIND, GUIDE_NAME, GUIDE_ORIENTATION, GUIDE_STATE, GUIDE_TOOL_ACTION_NAME, GUIDE_TOOL_STATE, LINE_TOOL_ACTION_NAME, LINE_TOOL_DEFAULT_CONFIG, LINE_TOOL_STATE, MEASURE_TOOL_ACTION_NAME, MEASURE_TOOL_STATE, MOVE_ORIENTATION, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, 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_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_NODES_SNAPPING_PLUGIN_KEY, 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, WeaveGuideToolAction, WeaveImageNode, WeaveImageToolAction, WeaveImagesToolAction, WeaveLayerNode, WeaveLineNode, WeaveLineToolAction, WeaveMeasureNode, WeaveMeasureToolAction, WeaveMoveToolAction, WeaveNode, WeaveNodesMultiSelectionFeedbackPlugin, WeaveNodesSelectionPlugin, WeaveNodesSnappingPlugin, WeavePenToolAction, WeavePlugin, WeaveRectangleNode, WeaveRectangleToolAction, WeaveRegularPolygonNode, WeaveRegularPolygonToolAction, WeaveRenderer, WeaveSelectionToolAction, WeaveStageDropAreaPlugin, WeaveStageGridPlugin, WeaveStageKeyboardMovePlugin, WeaveStageMinimapPlugin, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomPlugin, WeaveStarNode, WeaveStarToolAction, WeaveStateManipulation, 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, isNumber, isObject, isServer, loadImageSource, mapJsonToYjsArray, mapJsonToYjsElements, mapJsonToYjsMap, memoize, mergeExceptArrays, moveNodeToContainer, moveNodeToContainerNT, resetScale, weavejsToYjsBinary };
|