@inditextech/weave-sdk 0.50.0 → 0.52.0
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.cjs +1073 -331
- package/dist/sdk.d.cts +154 -37
- package/dist/sdk.d.cts.map +1 -1
- package/dist/sdk.d.ts +154 -37
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +1059 -330
- package/dist/sdk.js.map +1 -1
- package/package.json +2 -2
package/dist/sdk.d.ts
CHANGED
|
@@ -4,6 +4,12 @@ import * as Y from "yjs";
|
|
|
4
4
|
import { Doc } from "yjs";
|
|
5
5
|
import { TransformerConfig } from "konva/lib/shapes/Transformer";
|
|
6
6
|
import pino, { Logger } from "pino";
|
|
7
|
+
import * as konva_lib_Node4 from "konva/lib/Node";
|
|
8
|
+
import * as konva_lib_Node5 from "konva/lib/Node";
|
|
9
|
+
import * as konva_lib_Node0 from "konva/lib/Node";
|
|
10
|
+
import * as konva_lib_Node1 from "konva/lib/Node";
|
|
11
|
+
import * as konva_lib_Node2 from "konva/lib/Node";
|
|
12
|
+
import * as konva_lib_Node3 from "konva/lib/Node";
|
|
7
13
|
import { KonvaEventObject } from "konva/lib/Node";
|
|
8
14
|
import { Stage, StageConfig } from "konva/lib/Stage";
|
|
9
15
|
|
|
@@ -164,10 +170,6 @@ type WeaveNodeConfiguration = {
|
|
|
164
170
|
transform: Partial<WeaveNodeTransformerProperties>;
|
|
165
171
|
};
|
|
166
172
|
type ImageCrossOrigin = "anonymous" | "use-credentials";
|
|
167
|
-
|
|
168
|
-
//#endregion
|
|
169
|
-
//#region src/constants.d.ts
|
|
170
|
-
|
|
171
173
|
declare const WEAVE_INSTANCE_STATUS: {
|
|
172
174
|
readonly "IDLE": "idle";
|
|
173
175
|
readonly "STARTING": "starting";
|
|
@@ -285,7 +287,8 @@ type WeaveStageContextMenuPluginConfig = {
|
|
|
285
287
|
};
|
|
286
288
|
type WeaveStageContextMenuPluginOnNodeContextMenuEvent = {
|
|
287
289
|
selection: WeaveSelection[];
|
|
288
|
-
|
|
290
|
+
contextMenuPoint: Vector2d;
|
|
291
|
+
clickPoint: Vector2d;
|
|
289
292
|
visible: boolean;
|
|
290
293
|
};
|
|
291
294
|
|
|
@@ -324,13 +327,13 @@ declare class WeaveContextMenuPlugin extends WeavePlugin {
|
|
|
324
327
|
}
|
|
325
328
|
|
|
326
329
|
//#endregion
|
|
327
|
-
//#region src/plugins/nodes-snapping/constants.d.ts
|
|
330
|
+
//#region src/plugins/nodes-edge-snapping/constants.d.ts
|
|
328
331
|
//# sourceMappingURL=context-menu.d.ts.map
|
|
329
|
-
declare const
|
|
330
|
-
declare const GUIDE_LINE_NAME = "guide-line";
|
|
332
|
+
declare const WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY = "nodesEdgeSnapping";
|
|
333
|
+
declare const GUIDE_LINE_NAME = "guide-edge-snapping-line";
|
|
331
334
|
declare const GUIDE_LINE_DEFAULT_CONFIG: Required<Pick<Konva.LineConfig, 'stroke' | 'strokeWidth' | 'dash'>>;
|
|
332
|
-
declare const GUIDE_LINE_DRAG_SNAPPING_THRESHOLD =
|
|
333
|
-
declare const GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD =
|
|
335
|
+
declare const GUIDE_LINE_DRAG_SNAPPING_THRESHOLD = 3;
|
|
336
|
+
declare const GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD = 3;
|
|
334
337
|
declare const GUIDE_ORIENTATION: {
|
|
335
338
|
readonly HORIZONTAL: "H";
|
|
336
339
|
readonly VERTICAL: "V";
|
|
@@ -342,11 +345,12 @@ declare const NODE_SNAP: {
|
|
|
342
345
|
};
|
|
343
346
|
|
|
344
347
|
//#endregion
|
|
345
|
-
//#region src/plugins/nodes-snapping/types.d.ts
|
|
348
|
+
//#region src/plugins/nodes-edge-snapping/types.d.ts
|
|
346
349
|
//# sourceMappingURL=constants.d.ts.map
|
|
347
350
|
type NodeSnapKeys = keyof typeof NODE_SNAP;
|
|
348
351
|
type NodeSnap = (typeof NODE_SNAP)[NodeSnapKeys];
|
|
349
352
|
type NodeSnappingEdge = {
|
|
353
|
+
nodeId: string;
|
|
350
354
|
guide: number;
|
|
351
355
|
offset: number;
|
|
352
356
|
snap: NodeSnap;
|
|
@@ -360,6 +364,7 @@ type LineGuideStop = {
|
|
|
360
364
|
horizontal: number[];
|
|
361
365
|
};
|
|
362
366
|
type LineGuide = {
|
|
367
|
+
nodeId: string;
|
|
363
368
|
lineGuide: number;
|
|
364
369
|
diff: number;
|
|
365
370
|
snap: NodeSnap;
|
|
@@ -373,48 +378,132 @@ type Guide = {
|
|
|
373
378
|
orientation: GuideOrientation;
|
|
374
379
|
snap: NodeSnap;
|
|
375
380
|
};
|
|
376
|
-
type
|
|
381
|
+
type WeaveNodesEdgeSnappingPluginConfig = {
|
|
377
382
|
guideLine: Konva.LineConfig;
|
|
378
383
|
dragSnappingThreshold: number;
|
|
379
384
|
transformSnappingThreshold: number;
|
|
380
385
|
};
|
|
381
|
-
type
|
|
382
|
-
config?:
|
|
386
|
+
type WeaveNodesEdgeSnappingPluginParams = {
|
|
387
|
+
config?: WeaveNodesEdgeSnappingPluginConfig;
|
|
383
388
|
};
|
|
384
389
|
|
|
385
390
|
//#endregion
|
|
386
|
-
//#region src/plugins/nodes-snapping/nodes-snapping.d.ts
|
|
391
|
+
//#region src/plugins/nodes-edge-snapping/nodes-edge-snapping.d.ts
|
|
387
392
|
//# sourceMappingURL=types.d.ts.map
|
|
388
|
-
declare class
|
|
389
|
-
private guideLineConfig;
|
|
390
|
-
private dragSnappingThreshold;
|
|
391
|
-
private transformSnappingThreshold;
|
|
393
|
+
declare class WeaveNodesEdgeSnappingPlugin extends WeavePlugin {
|
|
394
|
+
private readonly guideLineConfig;
|
|
395
|
+
private readonly dragSnappingThreshold;
|
|
396
|
+
private readonly transformSnappingThreshold;
|
|
392
397
|
onRender: undefined;
|
|
393
|
-
constructor(params?: Partial<
|
|
398
|
+
constructor(params?: Partial<WeaveNodesEdgeSnappingPluginParams>);
|
|
394
399
|
getName(): string;
|
|
395
400
|
onInit(): void;
|
|
396
401
|
setEnabled(enabled: boolean): void;
|
|
397
|
-
getSelectedNodesMetadata(transformer: Konva.Transformer): {
|
|
398
|
-
width: number;
|
|
399
|
-
height: number;
|
|
400
|
-
nodes: string[];
|
|
401
|
-
};
|
|
402
402
|
deleteGuides(): void;
|
|
403
403
|
evaluateGuidelines(e: KonvaEventObject<any>): void;
|
|
404
|
-
|
|
404
|
+
cleanupGuidelines(): void;
|
|
405
405
|
private initEvents;
|
|
406
|
-
|
|
407
|
-
getLineGuideStops(
|
|
406
|
+
getVisibleNodes(skipNodes: string[]): konva_lib_Node5.Node<konva_lib_Node4.NodeConfig>[];
|
|
407
|
+
getLineGuideStops(nodes: Konva.Node[]): LineGuideStop;
|
|
408
408
|
getObjectSnappingEdges(node: Konva.Node): NodeSnappingEdges;
|
|
409
409
|
getGuides(lineGuideStops: LineGuideStop, itemBounds: NodeSnappingEdges, type: string): Guide[];
|
|
410
|
+
private sortedGuides;
|
|
410
411
|
drawGuides(guides: Guide[]): void;
|
|
411
412
|
enable(): void;
|
|
412
413
|
disable(): void;
|
|
413
414
|
}
|
|
414
415
|
|
|
416
|
+
//#endregion
|
|
417
|
+
//#region src/plugins/nodes-distance-snapping/constants.d.ts
|
|
418
|
+
//# sourceMappingURL=nodes-edge-snapping.d.ts.map
|
|
419
|
+
declare const WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY = "nodesDistanceSnapping";
|
|
420
|
+
declare const GUIDE_HORIZONTAL_LINE_NAME = "guide-distance-snapping-horizontal-line";
|
|
421
|
+
declare const GUIDE_VERTICAL_LINE_NAME = "guide-distance-snapping-vertical-line";
|
|
422
|
+
declare const GUIDE_ENTER_SNAPPING_TOLERANCE = 3;
|
|
423
|
+
declare const GUIDE_EXIT_SNAPPING_TOLERANCE = 5;
|
|
424
|
+
declare const NODE_SNAP_HORIZONTAL: {
|
|
425
|
+
readonly LEFT: "left";
|
|
426
|
+
readonly CENTER: "center";
|
|
427
|
+
readonly RIGHT: "right";
|
|
428
|
+
};
|
|
429
|
+
declare const NODE_SNAP_VERTICAL: {
|
|
430
|
+
readonly TOP: "top";
|
|
431
|
+
readonly MIDDLE: "middle";
|
|
432
|
+
readonly BOTTOM: "bottom";
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
//#endregion
|
|
436
|
+
//#region src/plugins/nodes-distance-snapping/types.d.ts
|
|
437
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
438
|
+
type NodeSnapHorizontalKeys = keyof typeof NODE_SNAP_HORIZONTAL;
|
|
439
|
+
type NodeSnapHorizontal = (typeof NODE_SNAP_HORIZONTAL)[NodeSnapHorizontalKeys];
|
|
440
|
+
type NodeSnapVerticalKeys = keyof typeof NODE_SNAP_VERTICAL;
|
|
441
|
+
type NodeSnapVertical = (typeof NODE_SNAP_VERTICAL)[NodeSnapVerticalKeys];
|
|
442
|
+
type WeaveNodesDistanceSnappingPluginConfig = {
|
|
443
|
+
enterSnappingTolerance: number;
|
|
444
|
+
exitSnappingTolerance: number;
|
|
445
|
+
};
|
|
446
|
+
type WeaveNodesDistanceSnappingPluginParams = {
|
|
447
|
+
config?: WeaveNodesDistanceSnappingPluginConfig;
|
|
448
|
+
};
|
|
449
|
+
type DistanceInfoH = {
|
|
450
|
+
index: number;
|
|
451
|
+
from: Konva.Node;
|
|
452
|
+
to: Konva.Node;
|
|
453
|
+
midY: number;
|
|
454
|
+
distance: number;
|
|
455
|
+
};
|
|
456
|
+
type DistanceInfoV = {
|
|
457
|
+
index: number;
|
|
458
|
+
from: Konva.Node;
|
|
459
|
+
to: Konva.Node;
|
|
460
|
+
midX: number;
|
|
461
|
+
distance: number;
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
//#endregion
|
|
465
|
+
//#region src/plugins/nodes-distance-snapping/nodes-distance-snapping.d.ts
|
|
466
|
+
//# sourceMappingURL=types.d.ts.map
|
|
467
|
+
declare class WeaveNodesDistanceSnappingPlugin extends WeavePlugin {
|
|
468
|
+
private readonly enterSnappingTolerance;
|
|
469
|
+
private readonly exitSnappingTolerance;
|
|
470
|
+
private peerDistanceX;
|
|
471
|
+
private peerDistanceY;
|
|
472
|
+
private snapPositionX;
|
|
473
|
+
private snapPositionY;
|
|
474
|
+
private currentSizeSnapHorizontal;
|
|
475
|
+
private currentSizeSnapVertical;
|
|
476
|
+
private referenceLayer;
|
|
477
|
+
onRender: undefined;
|
|
478
|
+
constructor(params?: Partial<WeaveNodesDistanceSnappingPluginParams>);
|
|
479
|
+
getName(): string;
|
|
480
|
+
onInit(): void;
|
|
481
|
+
setEnabled(enabled: boolean): void;
|
|
482
|
+
deleteGuides(): void;
|
|
483
|
+
evaluateGuidelines(e: KonvaEventObject<any>): void;
|
|
484
|
+
private getBoxClientRect;
|
|
485
|
+
private getPeers;
|
|
486
|
+
private validateHorizontalSnapping;
|
|
487
|
+
private validateVerticalSnapping;
|
|
488
|
+
private setNodeClientRectX;
|
|
489
|
+
private setNodeClientRectY;
|
|
490
|
+
cleanupGuidelines(): void;
|
|
491
|
+
private initEvents;
|
|
492
|
+
private getVerticallyIntersectingNodes;
|
|
493
|
+
private getHorizontallyIntersectingNodes;
|
|
494
|
+
private getVisibleNodes;
|
|
495
|
+
private drawSizeGuidesHorizontally;
|
|
496
|
+
private drawSizeGuidesVertically;
|
|
497
|
+
private renderDistanceLabel;
|
|
498
|
+
private renderHorizontalLineWithDistanceBetweenNodes;
|
|
499
|
+
private renderVerticalLineWithDistanceBetweenNodes;
|
|
500
|
+
enable(): void;
|
|
501
|
+
disable(): void;
|
|
502
|
+
}
|
|
503
|
+
|
|
415
504
|
//#endregion
|
|
416
505
|
//#region src/plugins/nodes-selection/nodes-selection.d.ts
|
|
417
|
-
//# sourceMappingURL=nodes-snapping.d.ts.map
|
|
506
|
+
//# sourceMappingURL=nodes-distance-snapping.d.ts.map
|
|
418
507
|
declare class WeaveNodesSelectionPlugin extends WeavePlugin {
|
|
419
508
|
private tr;
|
|
420
509
|
private trHover;
|
|
@@ -469,7 +558,8 @@ declare class WeaveNodesSelectionPlugin extends WeavePlugin {
|
|
|
469
558
|
enable(): void;
|
|
470
559
|
disable(): void;
|
|
471
560
|
getContextMenuPlugin(): WeaveContextMenuPlugin | undefined;
|
|
472
|
-
|
|
561
|
+
getNodesEdgeSnappingPlugin(): WeaveNodesEdgeSnappingPlugin | undefined;
|
|
562
|
+
getNodesDistanceSnappingPlugin(): WeaveNodesDistanceSnappingPlugin | undefined;
|
|
473
563
|
getSelectorConfig(): TransformerConfig;
|
|
474
564
|
}
|
|
475
565
|
|
|
@@ -506,6 +596,9 @@ declare abstract class WeaveNode implements WeaveNodeBase {
|
|
|
506
596
|
unlock(instance: Konva.Node): void;
|
|
507
597
|
isLocked(instance: Konva.Node): boolean;
|
|
508
598
|
protected defaultGetTransformerProperties(nodeTransformConfig: any): any;
|
|
599
|
+
getNodesEdgeSnappingPlugin(): WeaveNodesEdgeSnappingPlugin | undefined;
|
|
600
|
+
getNodesDistanceSnappingPlugin(): WeaveNodesDistanceSnappingPlugin | undefined;
|
|
601
|
+
realOffset(instance: WeaveStateElement): Vector2d;
|
|
509
602
|
}
|
|
510
603
|
|
|
511
604
|
//#endregion
|
|
@@ -738,7 +831,7 @@ type WeaveActionPropsChangeEvent = {
|
|
|
738
831
|
//# sourceMappingURL=types.d.ts.map
|
|
739
832
|
declare function resetScale(node: Konva.Node): void;
|
|
740
833
|
declare function clearContainerTargets(instance: Weave): void;
|
|
741
|
-
declare function containerOverCursor(instance: Weave, ignoreNodes: Konva.Node[]): Konva.Node | undefined;
|
|
834
|
+
declare function containerOverCursor(instance: Weave, ignoreNodes: Konva.Node[], definedCursorPosition?: Vector2d): Konva.Node | undefined;
|
|
742
835
|
declare function moveNodeToContainer(instance: Weave, node: Konva.Node, containerToMove: Konva.Layer | Konva.Node, invalidOriginsTypes?: string[]): boolean;
|
|
743
836
|
declare function getContrastTextColor(hex: string): 'white' | 'black';
|
|
744
837
|
declare function stringToColor(str: string): string;
|
|
@@ -760,6 +853,17 @@ declare function hasFrames(node: Konva.Node): boolean;
|
|
|
760
853
|
declare function intersectArrays<T>(arrays: T[][]): T[];
|
|
761
854
|
declare function isNodeInSelection(node: Konva.Node, nodes: Konva.Node[]): boolean;
|
|
762
855
|
declare function containsNodeDeep(nodes: Konva.Node[], target: Konva.Node): boolean;
|
|
856
|
+
declare function getSelectedNodesMetadata(transformer: Konva.Transformer): {
|
|
857
|
+
width: number;
|
|
858
|
+
height: number;
|
|
859
|
+
nodes: string[];
|
|
860
|
+
};
|
|
861
|
+
declare function getTargetAndSkipNodes(instance: Weave, e: KonvaEventObject<any, any>): {
|
|
862
|
+
targetNode: konva_lib_Node1.Node<konva_lib_Node0.NodeConfig> | undefined;
|
|
863
|
+
skipNodes: string[];
|
|
864
|
+
};
|
|
865
|
+
declare function getVisibleNodesInViewport(stage: Konva.Stage, referenceLayer: Konva.Layer | Konva.Group | undefined): konva_lib_Node3.Node<konva_lib_Node2.NodeConfig>[];
|
|
866
|
+
declare function getClosestParentWithId(el: HTMLElement | Element | null): HTMLElement | Element | null;
|
|
763
867
|
|
|
764
868
|
//#endregion
|
|
765
869
|
//#region src/nodes/stage/stage.d.ts
|
|
@@ -870,6 +974,7 @@ declare class WeaveEllipseNode extends WeaveNode {
|
|
|
870
974
|
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
871
975
|
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
872
976
|
scaleReset(node: Konva.Ellipse): void;
|
|
977
|
+
realOffset(element: WeaveStateElement): Vector2d;
|
|
873
978
|
}
|
|
874
979
|
|
|
875
980
|
//#endregion
|
|
@@ -1041,6 +1146,7 @@ declare class WeaveStarNode extends WeaveNode {
|
|
|
1041
1146
|
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1042
1147
|
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1043
1148
|
scaleReset(node: Konva.Star): void;
|
|
1149
|
+
realOffset(element: WeaveStateElement): Vector2d;
|
|
1044
1150
|
}
|
|
1045
1151
|
|
|
1046
1152
|
//#endregion
|
|
@@ -1095,6 +1201,7 @@ declare class WeaveRegularPolygonNode extends WeaveNode {
|
|
|
1095
1201
|
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1096
1202
|
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1097
1203
|
scaleReset(node: Konva.RegularPolygon): void;
|
|
1204
|
+
realOffset(element: WeaveStateElement): Vector2d;
|
|
1098
1205
|
}
|
|
1099
1206
|
|
|
1100
1207
|
//#endregion
|
|
@@ -1282,6 +1389,7 @@ declare class WeaveFitToScreenToolAction extends WeaveAction {
|
|
|
1282
1389
|
//# sourceMappingURL=fit-to-screen-tool.d.ts.map
|
|
1283
1390
|
type WeaveFitToSelectionToolActionParams = {
|
|
1284
1391
|
previousAction: string;
|
|
1392
|
+
smartZoom?: boolean;
|
|
1285
1393
|
};
|
|
1286
1394
|
|
|
1287
1395
|
//#endregion
|
|
@@ -1701,11 +1809,13 @@ type WeaveImageToolActionOnAddingEvent = {
|
|
|
1701
1809
|
};
|
|
1702
1810
|
type WeaveImageToolActionOnAddedEvent = {
|
|
1703
1811
|
imageURL: string;
|
|
1812
|
+
nodeId: string;
|
|
1704
1813
|
};
|
|
1705
1814
|
type WeaveImageToolActionTriggerParams = {
|
|
1706
1815
|
imageURL?: string;
|
|
1707
1816
|
options?: ImageOptions;
|
|
1708
1817
|
position?: Vector2d;
|
|
1818
|
+
stagePosition?: Vector2d;
|
|
1709
1819
|
};
|
|
1710
1820
|
type ImageOptions = {
|
|
1711
1821
|
crossOrigin: ImageCrossOrigin;
|
|
@@ -2111,7 +2221,7 @@ declare const WEAVE_GRID_DEFAULT_MAJOR_LINE_RATIO = 4;
|
|
|
2111
2221
|
declare const WEAVE_GRID_DEFAULT_RADIUS = 1;
|
|
2112
2222
|
declare const WEAVE_GRID_DEFAULT_MAJOR_DOT_RATIO = 2;
|
|
2113
2223
|
declare const WEAVE_GRID_DEFAULT_MAJOR_EVERY = 10;
|
|
2114
|
-
declare const WEAVE_GRID_DEFAULT_DOT_MAX_DOTS_PER_AXIS =
|
|
2224
|
+
declare const WEAVE_GRID_DEFAULT_DOT_MAX_DOTS_PER_AXIS = 250;
|
|
2115
2225
|
declare const WEAVE_GRID_LAYER_ID = "gridLayer";
|
|
2116
2226
|
|
|
2117
2227
|
//#endregion
|
|
@@ -2232,7 +2342,7 @@ declare class WeaveStageZoomPlugin extends WeavePlugin {
|
|
|
2232
2342
|
zoomOut(pointer?: Vector2d): void;
|
|
2233
2343
|
minimumZoom(): number;
|
|
2234
2344
|
fitToScreen(): void;
|
|
2235
|
-
fitToSelection(): void;
|
|
2345
|
+
fitToSelection(smartZoom?: boolean): void;
|
|
2236
2346
|
enable(): void;
|
|
2237
2347
|
disable(): void;
|
|
2238
2348
|
getDistance(p1: Vector2d, p2: Vector2d): number;
|
|
@@ -2479,6 +2589,7 @@ type WeaveStageDropPluginOnStageDropEvent = DragEvent;
|
|
|
2479
2589
|
//#region src/plugins/copy-paste-nodes/constants.d.ts
|
|
2480
2590
|
//# sourceMappingURL=types.d.ts.map
|
|
2481
2591
|
declare const WEAVE_COPY_PASTE_NODES_KEY = "copyPasteNodes";
|
|
2592
|
+
declare const WEAVE_COPY_PASTE_PASTE_CATCHER_ID = "weave-paste-catcher";
|
|
2482
2593
|
declare const WEAVE_COPY_PASTE_PASTE_MODES: {
|
|
2483
2594
|
readonly INTERNAL: "internal";
|
|
2484
2595
|
readonly EXTERNAL: "external";
|
|
@@ -2507,7 +2618,11 @@ type WeaveCopyPastePasteModeKeys = keyof typeof WEAVE_COPY_PASTE_PASTE_MODES;
|
|
|
2507
2618
|
type WeaveCopyPastePasteMode = (typeof WEAVE_COPY_PASTE_PASTE_MODES)[WeaveCopyPastePasteModeKeys];
|
|
2508
2619
|
type WeavePasteModel = {
|
|
2509
2620
|
weaveInstanceId: string;
|
|
2510
|
-
weave: Record<string,
|
|
2621
|
+
weave: Record<string, {
|
|
2622
|
+
element: WeaveStateElement;
|
|
2623
|
+
posRelativeToSelection: Vector2d;
|
|
2624
|
+
containerId: string;
|
|
2625
|
+
}>;
|
|
2511
2626
|
weaveMinPoint: Vector2d;
|
|
2512
2627
|
};
|
|
2513
2628
|
type WeaveToPasteNode = {
|
|
@@ -2527,8 +2642,10 @@ declare class WeaveCopyPasteNodesPlugin extends WeavePlugin {
|
|
|
2527
2642
|
constructor();
|
|
2528
2643
|
getName(): string;
|
|
2529
2644
|
onInit(): void;
|
|
2530
|
-
private readClipboardData;
|
|
2531
2645
|
private writeClipboardData;
|
|
2646
|
+
private existsPasteCatcher;
|
|
2647
|
+
private createPasteCatcher;
|
|
2648
|
+
private focusPasteCatcher;
|
|
2532
2649
|
initEvents(): void;
|
|
2533
2650
|
private isWeaveData;
|
|
2534
2651
|
private getTextFromClipboard;
|
|
@@ -2538,7 +2655,7 @@ declare class WeaveCopyPasteNodesPlugin extends WeavePlugin {
|
|
|
2538
2655
|
private handlePaste;
|
|
2539
2656
|
private performCopy;
|
|
2540
2657
|
copy(): Promise<void>;
|
|
2541
|
-
paste(): Promise<void>;
|
|
2658
|
+
paste(position?: Vector2d): Promise<void>;
|
|
2542
2659
|
getSelectedNodes(): WeaveToPasteNode[];
|
|
2543
2660
|
isPasting(): boolean;
|
|
2544
2661
|
private cancel;
|
|
@@ -2560,5 +2677,5 @@ declare class WeaveCopyPasteNodesPlugin extends WeavePlugin {
|
|
|
2560
2677
|
//#endregion
|
|
2561
2678
|
//# sourceMappingURL=copy-paste-nodes.d.ts.map
|
|
2562
2679
|
|
|
2563
|
-
export { ALIGN_NODES_ALIGN_TO, ALIGN_NODES_TOOL_ACTION_NAME, ALIGN_NODES_TOOL_STATE, ARROW_TOOL_ACTION_NAME, ARROW_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, Guide, GuideOrientation, GuideOrientationKeys, IMAGE_TOOL_ACTION_NAME, IMAGE_TOOL_STATE, ImageOptions, ImageProps, LineGuide, LineGuideStop, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NodeSnap, NodeSnapKeys, NodeSnappingEdge, NodeSnappingEdges, 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, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, TextSerializable, WEAVE_ARROW_NODE_TYPE, WEAVE_COPY_PASTE_NODES_KEY, WEAVE_COPY_PASTE_PASTE_MODES, WEAVE_DEFAULT_USER_INFO_FUNCTION, WEAVE_ELLIPSE_NODE_TYPE, WEAVE_FRAME_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_COLOR, WEAVE_GRID_DEFAULT_DOT_MAX_DOTS_PER_AXIS, WEAVE_GRID_DEFAULT_MAJOR_DOT_RATIO, WEAVE_GRID_DEFAULT_MAJOR_EVERY, WEAVE_GRID_DEFAULT_MAJOR_LINE_RATIO, WEAVE_GRID_DEFAULT_ORIGIN_COLOR, WEAVE_GRID_DEFAULT_RADIUS, WEAVE_GRID_DEFAULT_SIZE, WEAVE_GRID_DEFAULT_STROKE, WEAVE_GRID_DEFAULT_TYPE, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_GROUP_NODE_TYPE, WEAVE_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_NODE_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_TYPE, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID,
|
|
2680
|
+
export { ALIGN_NODES_ALIGN_TO, ALIGN_NODES_TOOL_ACTION_NAME, ALIGN_NODES_TOOL_STATE, ARROW_TOOL_ACTION_NAME, ARROW_TOOL_STATE, BRUSH_TOOL_ACTION_NAME, BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, DistanceInfoH, DistanceInfoV, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_ENTER_SNAPPING_TOLERANCE, GUIDE_EXIT_SNAPPING_TOLERANCE, GUIDE_HORIZONTAL_LINE_NAME, GUIDE_LINE_DEFAULT_CONFIG, GUIDE_LINE_DRAG_SNAPPING_THRESHOLD, GUIDE_LINE_NAME, GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD, GUIDE_ORIENTATION, GUIDE_VERTICAL_LINE_NAME, Guide, GuideOrientation, GuideOrientationKeys, IMAGE_TOOL_ACTION_NAME, IMAGE_TOOL_STATE, ImageOptions, ImageProps, LineGuide, LineGuideStop, MOVE_TOOL_ACTION_NAME, MOVE_TOOL_STATE, NODE_SNAP, NODE_SNAP_HORIZONTAL, NODE_SNAP_VERTICAL, NodeSnap, NodeSnapHorizontal, NodeSnapHorizontalKeys, NodeSnapKeys, NodeSnapVertical, NodeSnapVerticalKeys, NodeSnappingEdge, NodeSnappingEdges, 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, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, TextSerializable, WEAVE_ARROW_NODE_TYPE, 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_NODE_DEFAULT_CONFIG, WEAVE_FRAME_NODE_DEFAULT_PROPS, WEAVE_FRAME_NODE_TYPE, WEAVE_GRID_DEFAULT_COLOR, WEAVE_GRID_DEFAULT_DOT_MAX_DOTS_PER_AXIS, WEAVE_GRID_DEFAULT_MAJOR_DOT_RATIO, WEAVE_GRID_DEFAULT_MAJOR_EVERY, WEAVE_GRID_DEFAULT_MAJOR_LINE_RATIO, WEAVE_GRID_DEFAULT_ORIGIN_COLOR, WEAVE_GRID_DEFAULT_RADIUS, WEAVE_GRID_DEFAULT_SIZE, WEAVE_GRID_DEFAULT_STROKE, WEAVE_GRID_DEFAULT_TYPE, WEAVE_GRID_LAYER_ID, WEAVE_GRID_TYPES, WEAVE_GROUP_NODE_TYPE, WEAVE_IMAGE_CROP_END_TYPE, WEAVE_IMAGE_NODE_TYPE, WEAVE_LAYER_NODE_TYPE, WEAVE_LINE_NODE_TYPE, WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY, WEAVE_NODES_SELECTION_KEY, WEAVE_NODES_SELECTION_LAYER_ID, WEAVE_RECTANGLE_NODE_TYPE, WEAVE_REGULAR_POLYGON_NODE_TYPE, WEAVE_STAGE_DEFAULT_MODE, WEAVE_STAGE_GRID_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_TYPE, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTERS_DEFAULT_PROPS, WEAVE_USER_POINTER_KEY, WEAVE_USER_SELECTION_KEY, Weave, WeaveAction, WeaveActionPropsChangeEvent, WeaveAlignNodesToolAction, WeaveAlignNodesToolActionAlignTo, WeaveAlignNodesToolActionAlignToKeys, WeaveAlignNodesToolActionState, WeaveAlignNodesToolActionStateKeys, WeaveAlignNodesToolActionTriggerParams, WeaveArrowNode, WeaveArrowNodeParams, WeaveArrowProperties, WeaveArrowToolAction, WeaveArrowToolActionOnAddedEvent, WeaveArrowToolActionOnAddingEvent, WeaveArrowToolActionState, WeaveArrowToolActionStateKeys, WeaveBrushToolAction, WeaveBrushToolActionOnAddedEvent, WeaveBrushToolActionOnAddingEvent, WeaveBrushToolActionState, WeaveBrushToolActionStateKeys, WeaveConnectedUserInfoKey, WeaveConnectedUsers, WeaveConnectedUsersChangeEvent, WeaveConnectedUsersPlugin, WeaveConnectedUsersPluginConfig, WeaveConnectedUsersPluginParams, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveCopyPasteNodesPluginOnCopyEvent, WeaveCopyPasteNodesPluginOnPasteEvent, WeaveCopyPasteNodesPluginOnPasteExternalEvent, WeaveCopyPasteNodesPluginState, WeaveCopyPasteNodesPluginStateKeys, WeaveCopyPastePasteMode, WeaveCopyPastePasteModeKeys, WeaveEllipseNode, WeaveEllipseNodeParams, WeaveEllipseProperties, WeaveEllipseToolAction, WeaveEllipseToolActionOnAddedEvent, WeaveEllipseToolActionOnAddingEvent, WeaveEllipseToolActionState, WeaveEllipseToolActionStateKeys, WeaveEraserToolAction, WeaveEraserToolActionState, WeaveEraserToolActionStateKeys, WeaveExportNodesActionParams, WeaveExportNodesToolAction, WeaveExportStageActionParams, WeaveExportStageToolAction, WeaveFitToScreenToolAction, WeaveFitToScreenToolActionParams, WeaveFitToSelectionToolAction, WeaveFitToSelectionToolActionParams, WeaveFrameAttributes, WeaveFrameNode, WeaveFrameNodeParams, WeaveFrameProperties, WeaveFrameToolAction, WeaveFrameToolActionOnAddedEvent, WeaveFrameToolActionOnAddingEvent, WeaveFrameToolActionState, WeaveFrameToolActionStateKeys, WeaveFrameToolActionTriggerParams, WeaveFrameToolProps, WeaveGroupNode, WeaveGroupNodeParams, WeaveGroupProperties, WeaveImageCropEndType, WeaveImageCropEndTypeKeys, WeaveImageNode, WeaveImageNodeParams, WeaveImageOnCropEndEvent, WeaveImageOnCropStartEvent, WeaveImageProperties, WeaveImageToolAction, WeaveImageToolActionOnAddedEvent, WeaveImageToolActionOnAddingEvent, WeaveImageToolActionOnEndLoadImageEvent, WeaveImageToolActionOnStartLoadImageEvent, WeaveImageToolActionState, WeaveImageToolActionStateKeys, WeaveImageToolActionTriggerParams, WeaveImageToolActionTriggerReturn, WeaveLayerNode, WeaveLineNode, WeaveLineNodeParams, WeaveLineProperties, WeaveMoveToolAction, WeaveMoveToolActionParams, WeaveMoveToolActionState, WeaveMoveToolActionStateKeys, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesDistanceSnappingPluginConfig, WeaveNodesDistanceSnappingPluginParams, WeaveNodesEdgeSnappingPlugin, WeaveNodesEdgeSnappingPluginConfig, WeaveNodesEdgeSnappingPluginParams, WeaveNodesSelectionBehaviorsConfig, WeaveNodesSelectionConfig, WeaveNodesSelectionPlugin, WeaveNodesSelectionPluginConfig, WeaveNodesSelectionPluginOnNodesChangeEvent, WeaveNodesSelectionPluginOnSelectionStateEvent, WeaveNodesSelectionPluginOnStageSelectionEvent, WeaveNodesSelectionPluginParams, WeavePasteModel, WeavePenToolAction, WeavePenToolActionOnAddedEvent, WeavePenToolActionOnAddingEvent, WeavePenToolActionState, WeavePenToolActionStateKeys, WeavePlugin, WeaveRectangleNode, WeaveRectangleNodeParams, WeaveRectangleProperties, WeaveRectangleToolAction, WeaveRectangleToolActionOnAddedEvent, WeaveRectangleToolActionOnAddingEvent, WeaveRectangleToolActionState, WeaveRectangleToolActionStateKeys, WeaveRegularPolygonNode, WeaveRegularPolygonNodeParams, WeaveRegularPolygonProperties, WeaveRegularPolygonToolAction, WeaveRegularPolygonToolActionOnAddedEvent, WeaveRegularPolygonToolActionOnAddingEvent, WeaveRegularPolygonToolActionState, WeaveRegularPolygonToolActionStateKeys, WeaveSelectionToolAction, WeaveSelectionToolActionState, WeaveSelectionToolActionStateKeys, WeaveStageContextMenuPluginConfig, WeaveStageContextMenuPluginOnNodeContextMenuEvent, WeaveStageContextMenuPluginParams, WeaveStageDropAreaPlugin, WeaveStageDropPluginOnStageDropEvent, WeaveStageGridPlugin, WeaveStageGridPluginConfig, WeaveStageGridPluginParams, WeaveStageGridType, WeaveStageGridTypeKeys, WeaveStageNode, WeaveStagePanningPlugin, WeaveStageResizePlugin, WeaveStageZoomChanged, WeaveStageZoomPlugin, WeaveStageZoomPluginConfig, WeaveStageZoomPluginOnZoomChangeEvent, WeaveStageZoomPluginParams, WeaveStageZoomType, WeaveStageZoomTypeKeys, WeaveStarNode, WeaveStarNodeParams, WeaveStarProperties, WeaveStarToolAction, WeaveStarToolActionOnAddedEvent, WeaveStarToolActionOnAddingEvent, WeaveStarToolActionState, WeaveStarToolActionStateKeys, WeaveStore, WeaveStoreOnNodeChangeEvent, WeaveStoreOnRoomLoadedEvent, WeaveStoreOnStateChangeEvent, WeaveStoreOnUndoRedoChangeEvent, WeaveStrokeNode, WeaveStrokeNodeParams, WeaveStrokePoint, WeaveStrokeProperties, WeaveTextLayout, WeaveTextLayoutKeys, WeaveTextNode, WeaveTextNodeParams, WeaveTextProperties, WeaveTextToolAction, WeaveTextToolActionOnAddedEvent, WeaveTextToolActionOnAddingEvent, WeaveTextToolActionState, WeaveTextToolActionStateKeys, WeaveToPasteNode, WeaveUserPointer, WeaveUserPointerKey, WeaveUserPointersUIProperties, WeaveUserSelectionInfo, WeaveUserSelectionKey, WeaveUsersPointersPlugin, WeaveUsersPointersPluginConfig, WeaveUsersPointersPluginParams, WeaveUsersSelectionPlugin, WeaveUsersSelectionPluginConfig, WeaveUsersSelectionPluginParams, WeaveZoomInToolAction, WeaveZoomInToolActionParams, WeaveZoomOutToolAction, WeaveZoomOutToolActionParams, clearContainerTargets, containerOverCursor, containsNodeDeep, getBoundingBox, getClosestParentWithId, getContrastTextColor, getExportBoundingBox, getSelectedNodesMetadata, getTargetAndSkipNodes, getTargetedNode, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isNodeInSelection, moveNodeToContainer, resetScale, stringToColor };
|
|
2564
2681
|
//# sourceMappingURL=sdk.d.ts.map
|