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