@inditextech/weave-sdk 4.1.0 → 4.2.0-SNAPSHOT.307.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 +467 -13
- package/dist/sdk.node.js +467 -13
- package/dist/sdk.node.stats.html +1 -1
- package/dist/sdk.stats.html +1 -1
- package/dist/types.d.ts +99 -21
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +513 -59
- package/dist/types.js.map +1 -1
- package/dist/types.stats.html +1 -1
- package/package.json +2 -3
package/dist/sdk.node.js
CHANGED
|
@@ -3,7 +3,9 @@ import crypto, { randomFillSync, randomUUID } from "crypto";
|
|
|
3
3
|
import pino from "pino";
|
|
4
4
|
import { WEAVE_ASYNC_STATUS, WEAVE_AWARENESS_LAYER_ID, WEAVE_EXPORT_BACKGROUND_COLOR, WEAVE_EXPORT_FORMATS, WEAVE_EXPORT_RETURN_FORMAT, WEAVE_INSTANCE_STATUS, WEAVE_KONVA_BACKEND, WEAVE_LOG_LEVEL, WEAVE_NODE_CHANGE_TYPE, WEAVE_NODE_CUSTOM_EVENTS, WEAVE_NODE_LAYER_ID, WEAVE_NODE_POSITION, WEAVE_STORE_CONNECTION_STATUS, WEAVE_UTILITY_LAYER_ID } from "@inditextech/weave-types";
|
|
5
5
|
import { getYjsDoc, getYjsValue, observeDeep, syncedStore } from "@syncedstore/core";
|
|
6
|
+
import * as Y$1 from "yjs";
|
|
6
7
|
import * as Y from "yjs";
|
|
8
|
+
import { z } from "zod";
|
|
7
9
|
import simplify from "simplify-js";
|
|
8
10
|
import "konva/lib/types";
|
|
9
11
|
import "konva/lib/Stage";
|
|
@@ -15196,7 +15198,7 @@ var import_lodash = __toESM(require_lodash(), 1);
|
|
|
15196
15198
|
|
|
15197
15199
|
//#endregion
|
|
15198
15200
|
//#region src/yjs.ts
|
|
15199
|
-
var yjs_default = Y;
|
|
15201
|
+
var yjs_default = Y$1;
|
|
15200
15202
|
|
|
15201
15203
|
//#endregion
|
|
15202
15204
|
//#region src/stores/default-initial-state.ts
|
|
@@ -15275,6 +15277,7 @@ var WeaveStore = class {
|
|
|
15275
15277
|
return this.document;
|
|
15276
15278
|
}
|
|
15277
15279
|
restartDocument() {
|
|
15280
|
+
this.document?.destroy();
|
|
15278
15281
|
this.latestState = {
|
|
15279
15282
|
weave: {},
|
|
15280
15283
|
weaveMetadata: {}
|
|
@@ -18951,10 +18954,7 @@ var WeaveNodesSelectionPlugin = class extends WeavePlugin {
|
|
|
18951
18954
|
});
|
|
18952
18955
|
tr.on("mouseover", () => {
|
|
18953
18956
|
const nodesSelected = tr.nodes();
|
|
18954
|
-
if (nodesSelected.length
|
|
18955
|
-
const node = nodesSelected[0];
|
|
18956
|
-
stage.container().style.cursor = (typeof node?.defineMousePointer === "function" ? node.defineMousePointer() : null) ?? "grab";
|
|
18957
|
-
} else stage.container().style.cursor = "grab";
|
|
18957
|
+
if (nodesSelected.length > 1) stage.container().style.cursor = "grab";
|
|
18958
18958
|
});
|
|
18959
18959
|
tr.on("mouseout", (e) => {
|
|
18960
18960
|
this.instance.getStage().handleMouseover?.(e);
|
|
@@ -20912,16 +20912,16 @@ var WeaveNode = class {
|
|
|
20912
20912
|
if ([MOVE_TOOL_ACTION_NAME].includes(activeAction ?? "")) return false;
|
|
20913
20913
|
let showHover = false;
|
|
20914
20914
|
let cancelBubble = false;
|
|
20915
|
-
if (isNodeSelectionEnabled && this.isSelecting() && !this.isNodeSelected(realNode) && !this.isPasting() && (isLocked || isMutexLocked)) {
|
|
20915
|
+
if (isNodeSelectionEnabled && this.isSelecting() && !this.isNodeSelected(realNode) && !this.isPasting() && node.hasName("node") && (isLocked || isMutexLocked)) {
|
|
20916
20916
|
stage.container().style.cursor = "default";
|
|
20917
20917
|
cancelBubble = true;
|
|
20918
20918
|
}
|
|
20919
|
-
if (isNodeSelectionEnabled && this.isSelecting() && !this.isNodeSelected(realNode) && !this.isPasting() && isTargetable && !(isLocked || isMutexLocked) && stage.mode() === WEAVE_STAGE_DEFAULT_MODE) {
|
|
20919
|
+
if (isNodeSelectionEnabled && this.isSelecting() && !this.isNodeSelected(realNode) && !this.isPasting() && isTargetable && node.hasName("node") && !(isLocked || isMutexLocked) && stage.mode() === WEAVE_STAGE_DEFAULT_MODE) {
|
|
20920
20920
|
showHover = true;
|
|
20921
20921
|
stage.container().style.cursor = (typeof node?.defineMousePointer === "function" ? node.defineMousePointer() : null) ?? "pointer";
|
|
20922
20922
|
cancelBubble = true;
|
|
20923
20923
|
}
|
|
20924
|
-
if (isNodeSelectionEnabled && this.isSelecting() && this.isNodeSelected(realNode) && !this.isPasting() && isTargetable && !(isLocked || isMutexLocked) && stage.mode() === WEAVE_STAGE_DEFAULT_MODE) {
|
|
20924
|
+
if (isNodeSelectionEnabled && this.isSelecting() && this.isNodeSelected(realNode) && !this.isPasting() && node.hasName("node") && isTargetable && !(isLocked || isMutexLocked) && stage.mode() === WEAVE_STAGE_DEFAULT_MODE) {
|
|
20925
20925
|
showHover = true;
|
|
20926
20926
|
stage.container().style.cursor = (typeof node?.defineMousePointer === "function" ? node.defineMousePointer() : null) ?? "grab";
|
|
20927
20927
|
cancelBubble = true;
|
|
@@ -21076,6 +21076,48 @@ var WeaveNode = class {
|
|
|
21076
21076
|
getIsAsync() {
|
|
21077
21077
|
return false;
|
|
21078
21078
|
}
|
|
21079
|
+
static defaultState(nodeId) {
|
|
21080
|
+
return {
|
|
21081
|
+
key: nodeId,
|
|
21082
|
+
type: "unknown",
|
|
21083
|
+
props: {
|
|
21084
|
+
id: nodeId,
|
|
21085
|
+
nodeType: "unknown",
|
|
21086
|
+
x: 0,
|
|
21087
|
+
y: 0,
|
|
21088
|
+
width: 100,
|
|
21089
|
+
height: 100,
|
|
21090
|
+
rotation: 0,
|
|
21091
|
+
scaleX: 1,
|
|
21092
|
+
scaleY: 1,
|
|
21093
|
+
opacity: 1,
|
|
21094
|
+
zIndex: 1,
|
|
21095
|
+
children: []
|
|
21096
|
+
}
|
|
21097
|
+
};
|
|
21098
|
+
}
|
|
21099
|
+
static getSchema() {
|
|
21100
|
+
const baseNodeSchema = z.object({
|
|
21101
|
+
key: z.string().describe("Unique identifier (uuid) for the node, generate one it if not provided"),
|
|
21102
|
+
type: z.string().describe("Type of the node, must be always provided"),
|
|
21103
|
+
props: z.object({
|
|
21104
|
+
id: z.string().describe("Unique identifier (uuid) for the node instance, is the same as key"),
|
|
21105
|
+
nodeType: z.string().describe("Type of the node, must be always provided"),
|
|
21106
|
+
x: z.number().describe("X position of the node, relative to the parent container"),
|
|
21107
|
+
y: z.number().describe("Y position of the node, relative to the parent container"),
|
|
21108
|
+
width: z.number().describe("Width of the node in pixels"),
|
|
21109
|
+
height: z.number().describe("Height of the node in pixels"),
|
|
21110
|
+
scaleX: z.number().describe("Scale factor on the X axis, default is 1"),
|
|
21111
|
+
scaleY: z.number().describe("Scale factor on the Y axis, default is 1"),
|
|
21112
|
+
rotation: z.number().optional().describe("Rotation of the node in degrees, default is 0"),
|
|
21113
|
+
skewX: z.number().optional().describe("Skew on the X axis in degrees, default is 0"),
|
|
21114
|
+
skewY: z.number().optional().describe("Skew on the Y axis in degrees, default is 0"),
|
|
21115
|
+
opacity: z.number().describe("Opacity of the node, between 0 and 1, default is 1"),
|
|
21116
|
+
children: z.array(z.any()).length(0).describe("Children nodes, always be an empty array for leaf nodes")
|
|
21117
|
+
})
|
|
21118
|
+
});
|
|
21119
|
+
return baseNodeSchema;
|
|
21120
|
+
}
|
|
21079
21121
|
};
|
|
21080
21122
|
|
|
21081
21123
|
//#endregion
|
|
@@ -22187,7 +22229,7 @@ var WeaveRegisterManager = class {
|
|
|
22187
22229
|
|
|
22188
22230
|
//#endregion
|
|
22189
22231
|
//#region package.json
|
|
22190
|
-
var version = "4.
|
|
22232
|
+
var version = "4.2.0-SNAPSHOT.307.1";
|
|
22191
22233
|
|
|
22192
22234
|
//#endregion
|
|
22193
22235
|
//#region src/managers/setup.ts
|
|
@@ -23411,6 +23453,9 @@ var WeaveHooksManager = class {
|
|
|
23411
23453
|
unregisterHook(hookName) {
|
|
23412
23454
|
this.registeredHooks.delete(hookName);
|
|
23413
23455
|
}
|
|
23456
|
+
reset() {
|
|
23457
|
+
this.registeredHooks.clear();
|
|
23458
|
+
}
|
|
23414
23459
|
};
|
|
23415
23460
|
|
|
23416
23461
|
//#endregion
|
|
@@ -23605,8 +23650,13 @@ var Weave = class {
|
|
|
23605
23650
|
const nodeHandler = nodeHandlers[nodeHandlerKey];
|
|
23606
23651
|
nodeHandler?.onDestroyInstance();
|
|
23607
23652
|
}
|
|
23653
|
+
const mainLayer = this.stageManager.getMainLayer();
|
|
23654
|
+
if (mainLayer) mainLayer.destroy();
|
|
23608
23655
|
const stage = this.getStage();
|
|
23609
|
-
if (stage)
|
|
23656
|
+
if (stage) {
|
|
23657
|
+
console.log("remove stage");
|
|
23658
|
+
stage.destroy();
|
|
23659
|
+
}
|
|
23610
23660
|
if (this.eventsController) this.eventsController.abort();
|
|
23611
23661
|
if (!this.isServerSide()) this.eventsController = new AbortController();
|
|
23612
23662
|
this.registerManager.reset();
|
|
@@ -23619,6 +23669,8 @@ var Weave = class {
|
|
|
23619
23669
|
this.status = WEAVE_INSTANCE_STATUS.STARTING;
|
|
23620
23670
|
this.emitEvent("onInstanceStatus", this.status);
|
|
23621
23671
|
this.registerManager.reset();
|
|
23672
|
+
this.hooks.removeAllHooks();
|
|
23673
|
+
this.hooksManager.reset();
|
|
23622
23674
|
this.status = WEAVE_INSTANCE_STATUS.LOADING_FONTS;
|
|
23623
23675
|
this.emitEvent("onInstanceStatus", this.status);
|
|
23624
23676
|
await this.fontsManager.loadFonts();
|
|
@@ -23636,6 +23688,7 @@ var Weave = class {
|
|
|
23636
23688
|
this.emitEvent("onInstanceStatus", this.status);
|
|
23637
23689
|
const store = this.storeManager.getStore();
|
|
23638
23690
|
store.disconnect();
|
|
23691
|
+
store.getDocument()?.destroy();
|
|
23639
23692
|
const nodeHandlers = this.registerManager.getNodesHandlers();
|
|
23640
23693
|
for (const nodeHandlerKey of Object.keys(nodeHandlers)) {
|
|
23641
23694
|
const nodeHandler = nodeHandlers[nodeHandlerKey];
|
|
@@ -24402,6 +24455,114 @@ const downscaleImageFromURL = (url, options) => {
|
|
|
24402
24455
|
});
|
|
24403
24456
|
};
|
|
24404
24457
|
|
|
24458
|
+
//#endregion
|
|
24459
|
+
//#region src/state.manipulation.ts
|
|
24460
|
+
var WeaveStateManipulation = class WeaveStateManipulation {
|
|
24461
|
+
static mapPropsToYjs(props) {
|
|
24462
|
+
const propsMap = new Y.Map();
|
|
24463
|
+
for (const propKey of Object.keys(props)) {
|
|
24464
|
+
const propValue = props[propKey];
|
|
24465
|
+
if (Array.isArray(propValue)) {
|
|
24466
|
+
const childrenArray = new Y.Array();
|
|
24467
|
+
propValue.forEach((child) => {
|
|
24468
|
+
const childMap = WeaveStateManipulation.mapPropsToYjs(child);
|
|
24469
|
+
childrenArray.push([childMap]);
|
|
24470
|
+
});
|
|
24471
|
+
} else if (typeof propValue === "object" && propValue !== null && !Array.isArray(propValue)) propsMap.set(propKey, WeaveStateManipulation.mapPropsToYjs(propValue));
|
|
24472
|
+
else propsMap.set(propKey, propValue);
|
|
24473
|
+
}
|
|
24474
|
+
return propsMap;
|
|
24475
|
+
}
|
|
24476
|
+
static mapNodeToYjs(node) {
|
|
24477
|
+
const nodeId = node.key;
|
|
24478
|
+
const element = new Y.Map();
|
|
24479
|
+
const elementProps = new Y.Map();
|
|
24480
|
+
element.set("key", nodeId);
|
|
24481
|
+
element.set("type", node.type);
|
|
24482
|
+
element.set("props", elementProps);
|
|
24483
|
+
for (const propKey of Object.keys(node.props)) {
|
|
24484
|
+
const propValue = node.props[propKey];
|
|
24485
|
+
if (Array.isArray(propValue) && propKey === "children") {
|
|
24486
|
+
const childrenArray = new Y.Array();
|
|
24487
|
+
propValue.forEach((child) => {
|
|
24488
|
+
const childMap = WeaveStateManipulation.mapNodeToYjs(child);
|
|
24489
|
+
childrenArray.push([childMap.element]);
|
|
24490
|
+
});
|
|
24491
|
+
elementProps.set(propKey, childrenArray);
|
|
24492
|
+
} else if (Array.isArray(propValue) && propKey !== "children") {
|
|
24493
|
+
const childrenArray = new Y.Array();
|
|
24494
|
+
propValue.forEach((child) => {
|
|
24495
|
+
const childMap = WeaveStateManipulation.mapPropsToYjs(child);
|
|
24496
|
+
childrenArray.push([childMap]);
|
|
24497
|
+
});
|
|
24498
|
+
elementProps.set(propKey, childrenArray);
|
|
24499
|
+
} else if (typeof propValue === "object" && propValue !== null && !Array.isArray(propValue)) {
|
|
24500
|
+
const childrenMap = WeaveStateManipulation.mapPropsToYjs(propValue);
|
|
24501
|
+
elementProps.set(propKey, childrenMap);
|
|
24502
|
+
} else elementProps.set(propKey, propValue);
|
|
24503
|
+
}
|
|
24504
|
+
return {
|
|
24505
|
+
nodeId: node.key,
|
|
24506
|
+
element
|
|
24507
|
+
};
|
|
24508
|
+
}
|
|
24509
|
+
static addElements(layerYjsElement, yjsElements) {
|
|
24510
|
+
layerYjsElement.get("props").get("children").push(yjsElements);
|
|
24511
|
+
}
|
|
24512
|
+
static updateElements(layerYjsElement, yjsElements) {
|
|
24513
|
+
for (let i = 0; i < yjsElements.length; i++) {
|
|
24514
|
+
const yjsElement = yjsElements[i];
|
|
24515
|
+
const nodeId = yjsElement.nodeId;
|
|
24516
|
+
const element = yjsElement.element;
|
|
24517
|
+
const childrenArr = JSON.parse(JSON.stringify(layerYjsElement.get("props").get("children")));
|
|
24518
|
+
const index = childrenArr.findIndex((child) => child["key"] === nodeId);
|
|
24519
|
+
if (index !== -1) {
|
|
24520
|
+
layerYjsElement.get("props").get("children").delete(index);
|
|
24521
|
+
layerYjsElement.get("props").get("children").insert(index, [element]);
|
|
24522
|
+
}
|
|
24523
|
+
}
|
|
24524
|
+
}
|
|
24525
|
+
static deleteElements(layerYjsElement, yjsElementsIds) {
|
|
24526
|
+
for (let i = 0; i < yjsElementsIds.length; i++) {
|
|
24527
|
+
const yjsElementId = yjsElementsIds[i];
|
|
24528
|
+
const childrenArr = JSON.parse(JSON.stringify(layerYjsElement.get("props").get("children")));
|
|
24529
|
+
const index = childrenArr.findIndex((child) => child["key"] === yjsElementId);
|
|
24530
|
+
if (index !== -1) layerYjsElement.get("props").get("children").delete(index);
|
|
24531
|
+
}
|
|
24532
|
+
}
|
|
24533
|
+
static getYjsElement(doc, nodeId) {
|
|
24534
|
+
const stage = doc.getMap("weave");
|
|
24535
|
+
const stageProps = stage.get("props");
|
|
24536
|
+
const stageChildren = stageProps.get("children");
|
|
24537
|
+
for (let i = 0; i < stageChildren.length; i++) {
|
|
24538
|
+
const child = stageChildren.get(i);
|
|
24539
|
+
const childProps = child.get("props");
|
|
24540
|
+
if (childProps.get("id") === nodeId) return child;
|
|
24541
|
+
if (childProps.get("children")) {
|
|
24542
|
+
const childChildren = childProps.get("children");
|
|
24543
|
+
for (let j = 0; j < childChildren.length; j++) {
|
|
24544
|
+
const grandChild = childChildren.get(j);
|
|
24545
|
+
const grandChildProps = grandChild.get("props");
|
|
24546
|
+
if (grandChildProps.get("id") === nodeId) return grandChild;
|
|
24547
|
+
}
|
|
24548
|
+
}
|
|
24549
|
+
}
|
|
24550
|
+
return null;
|
|
24551
|
+
}
|
|
24552
|
+
static getNodesBoundingBox(nodes) {
|
|
24553
|
+
const minX = Math.min(...nodes.map((n) => n.props.x));
|
|
24554
|
+
const minY = Math.min(...nodes.map((n) => n.props.y));
|
|
24555
|
+
const maxX = Math.max(...nodes.map((n) => n.props.x + n.props.width));
|
|
24556
|
+
const maxY = Math.max(...nodes.map((n) => n.props.y + n.props.height));
|
|
24557
|
+
return {
|
|
24558
|
+
x: minX,
|
|
24559
|
+
y: minY,
|
|
24560
|
+
width: maxX - minX,
|
|
24561
|
+
height: maxY - minY
|
|
24562
|
+
};
|
|
24563
|
+
}
|
|
24564
|
+
};
|
|
24565
|
+
|
|
24405
24566
|
//#endregion
|
|
24406
24567
|
//#region src/internal-utils/upscale.ts
|
|
24407
24568
|
const setupUpscaleStage = (instance, stage) => {
|
|
@@ -24518,10 +24679,11 @@ var WeaveStageNode = class extends WeaveNode {
|
|
|
24518
24679
|
const activeAction = this.instance.getActiveAction();
|
|
24519
24680
|
if ([MOVE_TOOL_ACTION_NAME].includes(activeAction ?? "")) return;
|
|
24520
24681
|
if (e.target !== stage && !e.target.getAttrs().nodeId) return;
|
|
24521
|
-
|
|
24682
|
+
let parent = e.target.getParent();
|
|
24522
24683
|
if (parent && parent instanceof Konva.Transformer) return;
|
|
24523
24684
|
this.hideHoverState();
|
|
24524
|
-
if (
|
|
24685
|
+
if (e.target.getAttrs().nodeId) parent = stage.findOne(`#${e.target.getAttrs().nodeId}`);
|
|
24686
|
+
if (!this.instance.isServerSide() && !parent?.hasName("node")) stage.container().style.cursor = "default";
|
|
24525
24687
|
});
|
|
24526
24688
|
this.setupEvents();
|
|
24527
24689
|
return stage;
|
|
@@ -24803,6 +24965,65 @@ var WeaveRectangleNode = class extends WeaveNode {
|
|
|
24803
24965
|
const nodesSelectionPlugin = this.instance.getPlugin("nodesSelection");
|
|
24804
24966
|
if (nodesSelectionPlugin) nodesSelectionPlugin.getTransformer().forceUpdate();
|
|
24805
24967
|
}
|
|
24968
|
+
static defaultState(nodeId) {
|
|
24969
|
+
return {
|
|
24970
|
+
...super.defaultState(nodeId),
|
|
24971
|
+
type: WEAVE_RECTANGLE_NODE_TYPE,
|
|
24972
|
+
props: {
|
|
24973
|
+
...super.defaultState(nodeId).props,
|
|
24974
|
+
nodeType: WEAVE_RECTANGLE_NODE_TYPE,
|
|
24975
|
+
x: 0,
|
|
24976
|
+
y: 0,
|
|
24977
|
+
width: 100,
|
|
24978
|
+
height: 100,
|
|
24979
|
+
stroke: "#000000",
|
|
24980
|
+
fill: "#FFFFFF",
|
|
24981
|
+
strokeWidth: 1,
|
|
24982
|
+
strokeScaleEnabled: true,
|
|
24983
|
+
rotation: 0,
|
|
24984
|
+
zIndex: 1,
|
|
24985
|
+
children: []
|
|
24986
|
+
}
|
|
24987
|
+
};
|
|
24988
|
+
}
|
|
24989
|
+
static addNodeState(defaultNodeState, props) {
|
|
24990
|
+
return mergeExceptArrays(defaultNodeState, { props: {
|
|
24991
|
+
x: props.x,
|
|
24992
|
+
y: props.y,
|
|
24993
|
+
width: props.width,
|
|
24994
|
+
height: props.height,
|
|
24995
|
+
rotation: props.rotation,
|
|
24996
|
+
fill: props.fill,
|
|
24997
|
+
...props.stroke && { stroke: props.stroke },
|
|
24998
|
+
...props.strokeWidth && { strokeWidth: props.strokeWidth }
|
|
24999
|
+
} });
|
|
25000
|
+
}
|
|
25001
|
+
static updateNodeState(prevNodeState, nextProps) {
|
|
25002
|
+
return mergeExceptArrays(prevNodeState, { props: {
|
|
25003
|
+
x: nextProps.x,
|
|
25004
|
+
y: nextProps.y,
|
|
25005
|
+
width: nextProps.width,
|
|
25006
|
+
height: nextProps.height,
|
|
25007
|
+
rotation: nextProps.rotation,
|
|
25008
|
+
fill: nextProps.fill,
|
|
25009
|
+
...nextProps.stroke && { stroke: nextProps.stroke },
|
|
25010
|
+
...nextProps.strokeWidth && { strokeWidth: nextProps.strokeWidth }
|
|
25011
|
+
} });
|
|
25012
|
+
}
|
|
25013
|
+
static getSchema() {
|
|
25014
|
+
const baseSchema = super.getSchema();
|
|
25015
|
+
const imageNodeSchema = baseSchema.extend({
|
|
25016
|
+
type: z.literal("rectangle").describe("Type of the node, for a rectangle node it will always be \"rectangle\""),
|
|
25017
|
+
props: baseSchema.shape.props.extend({
|
|
25018
|
+
nodeType: z.literal("rectangle").describe("Type of the node, for a rectangle node it will always be \"rectangle\""),
|
|
25019
|
+
fill: z.string().describe("Fill color of the rectangle in hex format with alpha channel (e.g. #RRGGBBAA)"),
|
|
25020
|
+
stroke: z.string().describe("Stroke color of the rectangle in hex format with alpha channel (e.g. #RRGGBBAA)"),
|
|
25021
|
+
strokeWidth: z.number().describe("Stroke width of the rectangle in pixels"),
|
|
25022
|
+
strokeScaleEnabled: z.boolean().describe("Whether the rectangle stroke width should scale when the node is scaled. Defaults to true.")
|
|
25023
|
+
})
|
|
25024
|
+
});
|
|
25025
|
+
return imageNodeSchema;
|
|
25026
|
+
}
|
|
24806
25027
|
};
|
|
24807
25028
|
|
|
24808
25029
|
//#endregion
|
|
@@ -25974,6 +26195,62 @@ var WeaveTextNode = class extends WeaveNode {
|
|
|
25974
26195
|
textNode.width(textAreaWidth);
|
|
25975
26196
|
this.instance.updateNode(this.serialize(textNode));
|
|
25976
26197
|
}
|
|
26198
|
+
static defaultState(nodeId, params) {
|
|
26199
|
+
const config = (0, import_lodash.merge)({}, WEAVE_TEXT_NODE_DEFAULT_CONFIG, params?.config ?? {});
|
|
26200
|
+
return {
|
|
26201
|
+
...super.defaultState(nodeId),
|
|
26202
|
+
type: WEAVE_TEXT_NODE_TYPE,
|
|
26203
|
+
props: {
|
|
26204
|
+
...super.defaultState(nodeId).props,
|
|
26205
|
+
nodeType: "text",
|
|
26206
|
+
fontFamily: "Arial",
|
|
26207
|
+
fontSize: 32,
|
|
26208
|
+
fontStyle: "normal",
|
|
26209
|
+
fontVariant: "normal",
|
|
26210
|
+
textDecoration: "none",
|
|
26211
|
+
letterSpacing: 0,
|
|
26212
|
+
lineHeight: 1,
|
|
26213
|
+
align: "left",
|
|
26214
|
+
verticalAlign: "top",
|
|
26215
|
+
fill: "#000000ff",
|
|
26216
|
+
text: "This is a text node",
|
|
26217
|
+
...!config.outline.enabled && { strokeEnabled: false },
|
|
26218
|
+
...config.outline.enabled && {
|
|
26219
|
+
strokeEnabled: true,
|
|
26220
|
+
stroke: config.outline.color,
|
|
26221
|
+
strokeWidth: config.outline.width,
|
|
26222
|
+
fillAfterStrokeEnabled: true
|
|
26223
|
+
},
|
|
26224
|
+
layout: TEXT_LAYOUT.SMART
|
|
26225
|
+
}
|
|
26226
|
+
};
|
|
26227
|
+
}
|
|
26228
|
+
static getSchema() {
|
|
26229
|
+
const baseSchema = super.getSchema();
|
|
26230
|
+
const textNodeSchema = baseSchema.extend({
|
|
26231
|
+
type: z.literal("text"),
|
|
26232
|
+
props: z.object({
|
|
26233
|
+
nodeType: z.literal("text"),
|
|
26234
|
+
fontFamily: z.string().default("Arial"),
|
|
26235
|
+
fontSize: z.number().default(16),
|
|
26236
|
+
fontStyle: z.string().default("normal"),
|
|
26237
|
+
fontVariant: z.string().default("normal"),
|
|
26238
|
+
textDecoration: z.string().default("none"),
|
|
26239
|
+
letterSpacing: z.number().default(0),
|
|
26240
|
+
lineHeight: z.number().default(1),
|
|
26241
|
+
align: z.string().default("left"),
|
|
26242
|
+
verticalAlign: z.string().default("top"),
|
|
26243
|
+
fill: z.string().default("#000000ff"),
|
|
26244
|
+
text: z.string().default("text"),
|
|
26245
|
+
stroke: z.string().optional().default("#d6d6d6"),
|
|
26246
|
+
strokeWidth: z.number().optional().default(2),
|
|
26247
|
+
strokeScaleEnabled: z.boolean().optional().default(true),
|
|
26248
|
+
fillAfterStrokeEnabled: z.boolean().optional().default(true),
|
|
26249
|
+
layout: z.enum(TEXT_LAYOUT).default(TEXT_LAYOUT.SMART)
|
|
26250
|
+
})
|
|
26251
|
+
});
|
|
26252
|
+
return textNodeSchema;
|
|
26253
|
+
}
|
|
25977
26254
|
};
|
|
25978
26255
|
|
|
25979
26256
|
//#endregion
|
|
@@ -27609,6 +27886,108 @@ var WeaveImageNode = class extends WeaveNode {
|
|
|
27609
27886
|
this.getNodesSelectionPlugin()?.setSelectedNodes([image]);
|
|
27610
27887
|
this.getNodesSelectionPlugin()?.getHoverTransformer().forceUpdate();
|
|
27611
27888
|
}
|
|
27889
|
+
static defaultState(nodeId) {
|
|
27890
|
+
return {
|
|
27891
|
+
...super.defaultState(nodeId),
|
|
27892
|
+
props: {
|
|
27893
|
+
...super.defaultState(nodeId).props,
|
|
27894
|
+
nodeType: WEAVE_IMAGE_NODE_TYPE,
|
|
27895
|
+
width: 800,
|
|
27896
|
+
height: 600,
|
|
27897
|
+
imageURL: "https://picsum.photos/id/10/800/600",
|
|
27898
|
+
adding: false,
|
|
27899
|
+
imageWidth: 800,
|
|
27900
|
+
imageHeight: 600,
|
|
27901
|
+
imageInfo: {
|
|
27902
|
+
width: 800,
|
|
27903
|
+
height: 600
|
|
27904
|
+
},
|
|
27905
|
+
uncroppedImage: {
|
|
27906
|
+
width: 800,
|
|
27907
|
+
height: 600
|
|
27908
|
+
},
|
|
27909
|
+
cropping: false,
|
|
27910
|
+
stroke: "#000000",
|
|
27911
|
+
fill: "#FFFFFF",
|
|
27912
|
+
strokeWidth: 0,
|
|
27913
|
+
strokeScaleEnabled: true,
|
|
27914
|
+
children: []
|
|
27915
|
+
}
|
|
27916
|
+
};
|
|
27917
|
+
}
|
|
27918
|
+
static addNodeState(defaultNodeState, props) {
|
|
27919
|
+
return mergeExceptArrays(defaultNodeState, { props: {
|
|
27920
|
+
x: props.x,
|
|
27921
|
+
y: props.y,
|
|
27922
|
+
width: props.width,
|
|
27923
|
+
height: props.height,
|
|
27924
|
+
rotation: props.rotation,
|
|
27925
|
+
imageURL: props.imageURL,
|
|
27926
|
+
...props.imageFallback && { imageFallback: props.imageFallback },
|
|
27927
|
+
...props.imageId && { imageId: props.imageId },
|
|
27928
|
+
adding: props.adding,
|
|
27929
|
+
imageWidth: props.imageWidth,
|
|
27930
|
+
imageHeight: props.imageHeight,
|
|
27931
|
+
imageInfo: {
|
|
27932
|
+
width: props.imageInfo.width,
|
|
27933
|
+
height: props.imageInfo.height
|
|
27934
|
+
},
|
|
27935
|
+
uncroppedImage: {
|
|
27936
|
+
width: props.uncroppedImage.width,
|
|
27937
|
+
height: props.uncroppedImage.height
|
|
27938
|
+
},
|
|
27939
|
+
cropping: props.cropping
|
|
27940
|
+
} });
|
|
27941
|
+
}
|
|
27942
|
+
static updateNodeState(prevNodeState, nextProps) {
|
|
27943
|
+
return mergeExceptArrays(prevNodeState, { props: {
|
|
27944
|
+
x: nextProps.x,
|
|
27945
|
+
y: nextProps.y,
|
|
27946
|
+
width: nextProps.width,
|
|
27947
|
+
height: nextProps.height,
|
|
27948
|
+
rotation: nextProps.rotation,
|
|
27949
|
+
imageURL: nextProps.imageURL,
|
|
27950
|
+
...nextProps.imageFallback && { imageFallback: nextProps.imageFallback },
|
|
27951
|
+
...nextProps.imageId && { imageId: nextProps.imageId },
|
|
27952
|
+
adding: nextProps.adding,
|
|
27953
|
+
imageWidth: nextProps.imageWidth,
|
|
27954
|
+
imageHeight: nextProps.imageHeight,
|
|
27955
|
+
...nextProps.imageInfo && { imageInfo: {
|
|
27956
|
+
width: nextProps.imageInfo.width,
|
|
27957
|
+
height: nextProps.imageInfo.height
|
|
27958
|
+
} },
|
|
27959
|
+
...nextProps.uncroppedImage && { uncroppedImage: {
|
|
27960
|
+
width: nextProps.uncroppedImage?.width,
|
|
27961
|
+
height: nextProps.uncroppedImage?.height
|
|
27962
|
+
} },
|
|
27963
|
+
cropping: nextProps.cropping
|
|
27964
|
+
} });
|
|
27965
|
+
}
|
|
27966
|
+
static getSchema() {
|
|
27967
|
+
const baseSchema = super.getSchema();
|
|
27968
|
+
const imageNodeSchema = baseSchema.extend({
|
|
27969
|
+
type: z.literal("image").describe("Type of the node, for a image node it will always be \"image\""),
|
|
27970
|
+
props: baseSchema.shape.props.extend({
|
|
27971
|
+
nodeType: z.literal("image").describe("Type of the node, for a image node it will always be \"image\""),
|
|
27972
|
+
imageURL: z.string().describe("The URL of the image to be rendered by the node"),
|
|
27973
|
+
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}"),
|
|
27974
|
+
adding: z.boolean().default(false),
|
|
27975
|
+
imageId: z.string().optional().describe("The id of the image, used for external management of the node."),
|
|
27976
|
+
imageWidth: z.number().describe("The width of the image in pixels"),
|
|
27977
|
+
imageHeight: z.number().describe("The height of the image in pixels"),
|
|
27978
|
+
imageInfo: z.object({
|
|
27979
|
+
width: z.number().describe("The original width of the image in pixels"),
|
|
27980
|
+
height: z.number().describe("The original height of the image in pixels")
|
|
27981
|
+
}),
|
|
27982
|
+
uncroppedImage: z.object({
|
|
27983
|
+
width: z.number().describe("The width of the image before cropping, used for cropping calculations"),
|
|
27984
|
+
height: z.number().describe("The height of the image before cropping, used for cropping calculations")
|
|
27985
|
+
}),
|
|
27986
|
+
cropping: z.boolean().default(false).describe("Whether the image is currently being cropped")
|
|
27987
|
+
})
|
|
27988
|
+
});
|
|
27989
|
+
return imageNodeSchema;
|
|
27990
|
+
}
|
|
27612
27991
|
};
|
|
27613
27992
|
|
|
27614
27993
|
//#endregion
|
|
@@ -28206,6 +28585,7 @@ var WeaveFrameNode = class extends WeaveNode {
|
|
|
28206
28585
|
strokeWidth: 0,
|
|
28207
28586
|
fill: "transparent",
|
|
28208
28587
|
nodeId: id,
|
|
28588
|
+
nodeType: void 0,
|
|
28209
28589
|
id: `${id}-selection-area`,
|
|
28210
28590
|
listening: true,
|
|
28211
28591
|
draggable: true,
|
|
@@ -28362,6 +28742,79 @@ var WeaveFrameNode = class extends WeaveNode {
|
|
|
28362
28742
|
};
|
|
28363
28743
|
}
|
|
28364
28744
|
scaleReset() {}
|
|
28745
|
+
static defaultState(nodeId) {
|
|
28746
|
+
return {
|
|
28747
|
+
...super.defaultState(nodeId),
|
|
28748
|
+
type: WEAVE_FRAME_NODE_TYPE,
|
|
28749
|
+
props: {
|
|
28750
|
+
...super.defaultState(nodeId).props,
|
|
28751
|
+
nodeType: WEAVE_FRAME_NODE_TYPE,
|
|
28752
|
+
x: 0,
|
|
28753
|
+
y: 0,
|
|
28754
|
+
width: WEAVE_FRAME_NODE_DEFAULT_PROPS.frameWidth,
|
|
28755
|
+
height: WEAVE_FRAME_NODE_DEFAULT_PROPS.frameHeight,
|
|
28756
|
+
title: WEAVE_FRAME_NODE_DEFAULT_PROPS.title,
|
|
28757
|
+
frameWidth: WEAVE_FRAME_NODE_DEFAULT_PROPS.frameWidth,
|
|
28758
|
+
frameHeight: WEAVE_FRAME_NODE_DEFAULT_PROPS.frameHeight,
|
|
28759
|
+
frameBackground: WEAVE_FRAME_NODE_DEFAULT_PROPS.frameBackground,
|
|
28760
|
+
borderWidth: WEAVE_FRAME_NODE_DEFAULT_CONFIG.borderWidth,
|
|
28761
|
+
borderColor: WEAVE_FRAME_NODE_DEFAULT_CONFIG.borderColor,
|
|
28762
|
+
stroke: "transparent",
|
|
28763
|
+
strokeWidth: 0,
|
|
28764
|
+
strokeScaleEnabled: true,
|
|
28765
|
+
rotation: 0,
|
|
28766
|
+
zIndex: 1,
|
|
28767
|
+
children: []
|
|
28768
|
+
}
|
|
28769
|
+
};
|
|
28770
|
+
}
|
|
28771
|
+
static addNodeState(defaultNodeState, props) {
|
|
28772
|
+
return mergeExceptArrays(defaultNodeState, { props: {
|
|
28773
|
+
x: props.props.x,
|
|
28774
|
+
y: props.props.y,
|
|
28775
|
+
width: props.props.width,
|
|
28776
|
+
height: props.props.height,
|
|
28777
|
+
...props.props.title && { stroke: props.props.title },
|
|
28778
|
+
frameWidth: props.props.frameWidth,
|
|
28779
|
+
frameHeight: props.props.frameHeight,
|
|
28780
|
+
...props.props.frameBackground && { stroke: props.props.frameBackground },
|
|
28781
|
+
rotation: props.props.rotation,
|
|
28782
|
+
...props.props.borderColor && { borderColor: props.props.borderColor },
|
|
28783
|
+
...props.props.borderWidth && { borderWidth: props.props.borderWidth }
|
|
28784
|
+
} });
|
|
28785
|
+
}
|
|
28786
|
+
static updateNodeState(prevNodeState, nextProps) {
|
|
28787
|
+
return mergeExceptArrays(prevNodeState, { props: {
|
|
28788
|
+
x: nextProps.x,
|
|
28789
|
+
y: nextProps.y,
|
|
28790
|
+
width: nextProps.width,
|
|
28791
|
+
height: nextProps.height,
|
|
28792
|
+
rotation: nextProps.rotation,
|
|
28793
|
+
title: nextProps.title,
|
|
28794
|
+
...nextProps.frameBackground && { frameBackground: nextProps.frameBackground },
|
|
28795
|
+
...nextProps.borderColor && { stroke: nextProps.borderColor },
|
|
28796
|
+
...nextProps.borderWidth && { strokeWidth: nextProps.borderWidth }
|
|
28797
|
+
} });
|
|
28798
|
+
}
|
|
28799
|
+
static getSchema() {
|
|
28800
|
+
const baseSchema = super.getSchema();
|
|
28801
|
+
const frameNodeSchema = baseSchema.extend({
|
|
28802
|
+
type: z.literal("frame"),
|
|
28803
|
+
props: baseSchema.shape.props.extend({
|
|
28804
|
+
nodeType: z.literal("frame"),
|
|
28805
|
+
width: z.number().optional(),
|
|
28806
|
+
height: z.number().optional(),
|
|
28807
|
+
borderColor: z.string().default("#000000ff"),
|
|
28808
|
+
borderWidth: z.number().default(1),
|
|
28809
|
+
title: z.string().default("Frame"),
|
|
28810
|
+
frameWidth: z.number(),
|
|
28811
|
+
frameHeight: z.number(),
|
|
28812
|
+
frameBackground: z.string().default(WEAVE_FRAME_DEFAULT_BACKGROUND_COLOR),
|
|
28813
|
+
children: z.array(z.any()).default([])
|
|
28814
|
+
})
|
|
28815
|
+
});
|
|
28816
|
+
return frameNodeSchema;
|
|
28817
|
+
}
|
|
28365
28818
|
};
|
|
28366
28819
|
|
|
28367
28820
|
//#endregion
|
|
@@ -28979,6 +29432,7 @@ var WeaveStrokeSingleNode = class extends WeaveNode {
|
|
|
28979
29432
|
this.shiftPressed = false;
|
|
28980
29433
|
}
|
|
28981
29434
|
initEvents() {
|
|
29435
|
+
if (this.instance.isServerSide()) return;
|
|
28982
29436
|
if (this.eventsInitialized) return;
|
|
28983
29437
|
window.addEventListener("keydown", (e) => {
|
|
28984
29438
|
if (e.key === "Shift") this.shiftPressed = true;
|
|
@@ -42944,4 +43398,4 @@ const setupCanvasBackend = async () => {
|
|
|
42944
43398
|
};
|
|
42945
43399
|
|
|
42946
43400
|
//#endregion
|
|
42947
|
-
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, 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 };
|
|
43401
|
+
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, getSelectedNodesMetadata, getStageClickPoint, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodes, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isIOS, isInShadowDOM, isNodeInSelection, isServer, loadImageSource, memoize, mergeExceptArrays, moveNodeToContainer, moveNodeToContainerNT, resetScale, setupCanvasBackend, setupSkiaBackend };
|