@inditextech/weave-sdk 0.77.0 → 1.0.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.d.ts +73 -67
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +3130 -1488
- package/dist/sdk.js.map +1 -1
- package/dist/{sdk.d.cts → sdk.node.d.ts} +78 -66
- package/dist/sdk.node.d.ts.map +1 -0
- package/dist/{sdk.cjs → sdk.node.js} +3837 -5340
- package/dist/sdk.node.js.map +1 -0
- package/package.json +19 -11
- package/dist/sdk.d.cts.map +0 -1
- package/dist/stage-minimap.worker.cjs +0 -18
- package/dist/stage-minimap.worker.d.cts +0 -1
package/dist/sdk.d.ts
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
import Konva from "konva";
|
|
2
|
-
import {
|
|
2
|
+
import pino, { Logger } from "pino";
|
|
3
3
|
import * as Y$1 from "yjs";
|
|
4
4
|
import * as Y from "yjs";
|
|
5
|
-
import * as konva_lib_shapes_Transformer0 from "konva/lib/shapes/Transformer";
|
|
6
|
-
import { TransformerConfig } from "konva/lib/shapes/Transformer";
|
|
7
|
-
import pino, { Logger } from "pino";
|
|
8
|
-
import * as konva_lib_Node7 from "konva/lib/Node";
|
|
9
5
|
import * as konva_lib_Node8 from "konva/lib/Node";
|
|
10
6
|
import * as konva_lib_Node9 from "konva/lib/Node";
|
|
11
7
|
import * as konva_lib_Node10 from "konva/lib/Node";
|
|
8
|
+
import * as konva_lib_Node11 from "konva/lib/Node";
|
|
12
9
|
import * as konva_lib_Node1 from "konva/lib/Node";
|
|
13
10
|
import * as konva_lib_Node2 from "konva/lib/Node";
|
|
14
11
|
import * as konva_lib_Node3 from "konva/lib/Node";
|
|
15
12
|
import * as konva_lib_Node4 from "konva/lib/Node";
|
|
16
13
|
import { KonvaEventObject } from "konva/lib/Node";
|
|
17
14
|
import { Stage, StageConfig } from "konva/lib/Stage";
|
|
18
|
-
import
|
|
15
|
+
import * as konva_lib_shapes_Transformer0 from "konva/lib/shapes/Transformer";
|
|
16
|
+
import { TransformerConfig } from "konva/lib/shapes/Transformer";
|
|
17
|
+
import * as konva_lib_types6 from "konva/lib/types";
|
|
19
18
|
import * as konva_lib_Group5 from "konva/lib/Group";
|
|
20
|
-
import * as
|
|
19
|
+
import * as konva_lib_Layer7 from "konva/lib/Layer";
|
|
21
20
|
|
|
22
21
|
//#region ../types/dist/types.d.ts
|
|
23
22
|
//#region src/base/node.d.ts
|
|
@@ -116,7 +115,7 @@ type WeaveSelection = {
|
|
|
116
115
|
node: WeaveStateElement | undefined;
|
|
117
116
|
};
|
|
118
117
|
type WeaveMousePointInfoSimple = {
|
|
119
|
-
mousePoint: Vector2d;
|
|
118
|
+
mousePoint: Konva.Vector2d;
|
|
120
119
|
container: Konva.Layer | Konva.Node | undefined;
|
|
121
120
|
};
|
|
122
121
|
type WeaveMousePointInfo = WeaveMousePointInfoSimple & {
|
|
@@ -124,7 +123,7 @@ type WeaveMousePointInfo = WeaveMousePointInfoSimple & {
|
|
|
124
123
|
};
|
|
125
124
|
type WeaveSerializedGroup = {
|
|
126
125
|
serializedNodes: WeaveStateElement[];
|
|
127
|
-
minPoint: Vector2d;
|
|
126
|
+
minPoint: Konva.Vector2d;
|
|
128
127
|
} | undefined;
|
|
129
128
|
type WeaveNodeFound = {
|
|
130
129
|
node: WeaveStateElement | null;
|
|
@@ -146,6 +145,7 @@ type WeaveExportNodesOptions = {
|
|
|
146
145
|
pixelRatio?: number;
|
|
147
146
|
backgroundColor?: string;
|
|
148
147
|
quality?: number;
|
|
148
|
+
backend?: WeaveKonvaBackend;
|
|
149
149
|
};
|
|
150
150
|
type WeaveUser = {
|
|
151
151
|
id: string;
|
|
@@ -183,6 +183,8 @@ type WeaveNodeConfiguration = {
|
|
|
183
183
|
type ImageCrossOrigin = "anonymous" | "use-credentials";
|
|
184
184
|
type URLTransformerFunction = (url: string) => string;
|
|
185
185
|
type DeepPartial<T> = { [P in keyof T]?: T[P] extends object ? T[P] extends Function ? T[P] : DeepPartial<T[P]> : T[P] };
|
|
186
|
+
type WeaveKonvaBackendKeys = keyof typeof WEAVE_KONVA_BACKEND;
|
|
187
|
+
type WeaveKonvaBackend = (typeof WEAVE_KONVA_BACKEND)[WeaveKonvaBackendKeys];
|
|
186
188
|
|
|
187
189
|
//#endregion
|
|
188
190
|
//#region src/constants.d.ts
|
|
@@ -211,6 +213,10 @@ declare const WEAVE_STORE_CONNECTION_STATUS: {
|
|
|
211
213
|
readonly "CONNECTING": "connecting";
|
|
212
214
|
readonly "CONNECTED": "connected";
|
|
213
215
|
readonly "DISCONNECTED": "disconnected";
|
|
216
|
+
};
|
|
217
|
+
declare const WEAVE_KONVA_BACKEND: {
|
|
218
|
+
readonly "CANVAS": "canvas";
|
|
219
|
+
readonly "SKIA": "skia";
|
|
214
220
|
}; //#endregion
|
|
215
221
|
//#region src/stores/store.d.ts
|
|
216
222
|
|
|
@@ -317,9 +323,9 @@ type WeaveStageContextMenuPluginConfig = {
|
|
|
317
323
|
};
|
|
318
324
|
type WeaveStageContextMenuPluginOnNodeContextMenuEvent = {
|
|
319
325
|
selection: WeaveSelection[];
|
|
320
|
-
contextMenuPoint: Vector2d;
|
|
321
|
-
clickPoint: Vector2d;
|
|
322
|
-
stageClickPoint: Vector2d;
|
|
326
|
+
contextMenuPoint: Konva.Vector2d;
|
|
327
|
+
clickPoint: Konva.Vector2d;
|
|
328
|
+
stageClickPoint: Konva.Vector2d;
|
|
323
329
|
visible: boolean;
|
|
324
330
|
};
|
|
325
331
|
|
|
@@ -687,15 +693,15 @@ declare class WeaveStageZoomPlugin extends WeavePlugin {
|
|
|
687
693
|
canZoomIn(): boolean;
|
|
688
694
|
zoomToStep(step: number): void;
|
|
689
695
|
private findClosestStepIndex;
|
|
690
|
-
zoomIn(pointer?: Vector2d): void;
|
|
691
|
-
zoomOut(pointer?: Vector2d): void;
|
|
696
|
+
zoomIn(pointer?: Konva.Vector2d): void;
|
|
697
|
+
zoomOut(pointer?: Konva.Vector2d): void;
|
|
692
698
|
minimumZoom(): number;
|
|
693
699
|
fitToScreen(): void;
|
|
694
700
|
fitToSelection(smartZoom?: boolean): void;
|
|
695
701
|
enable(): void;
|
|
696
702
|
disable(): void;
|
|
697
|
-
getDistance(p1: Vector2d, p2: Vector2d): number;
|
|
698
|
-
getCenter(p1: Vector2d, p2: Vector2d): {
|
|
703
|
+
getDistance(p1: Konva.Vector2d, p2: Konva.Vector2d): number;
|
|
704
|
+
getCenter(p1: Konva.Vector2d, p2: Konva.Vector2d): {
|
|
699
705
|
x: number;
|
|
700
706
|
y: number;
|
|
701
707
|
};
|
|
@@ -748,7 +754,7 @@ declare class WeaveStagePanningPlugin extends WeavePlugin {
|
|
|
748
754
|
private disableMove;
|
|
749
755
|
private initEvents;
|
|
750
756
|
isPanning(): boolean;
|
|
751
|
-
getDistance(p1: Vector2d, p2: Vector2d): number;
|
|
757
|
+
getDistance(p1: Konva.Vector2d, p2: Konva.Vector2d): number;
|
|
752
758
|
getTouchCenter(): {
|
|
753
759
|
x: number;
|
|
754
760
|
y: number;
|
|
@@ -759,7 +765,7 @@ declare class WeaveStagePanningPlugin extends WeavePlugin {
|
|
|
759
765
|
getNodesEdgeSnappingPlugin(): WeaveNodesEdgeSnappingPlugin | undefined;
|
|
760
766
|
getNodesDistanceSnappingPlugin(): WeaveNodesDistanceSnappingPlugin | undefined;
|
|
761
767
|
getStageGridPlugin(): WeaveStageGridPlugin | undefined;
|
|
762
|
-
getCurrentPointer(): Vector2d | null;
|
|
768
|
+
getCurrentPointer(): konva_lib_types6.Vector2d | null;
|
|
763
769
|
cleanupEdgeMoveIntervals(): void;
|
|
764
770
|
enable(): void;
|
|
765
771
|
disable(): void;
|
|
@@ -882,7 +888,7 @@ declare abstract class WeaveNode implements WeaveNodeBase {
|
|
|
882
888
|
private getNodesSelectionPlugin;
|
|
883
889
|
getNodesEdgeSnappingPlugin(): WeaveNodesEdgeSnappingPlugin | undefined;
|
|
884
890
|
getNodesDistanceSnappingPlugin(): WeaveNodesDistanceSnappingPlugin | undefined;
|
|
885
|
-
realOffset(instance: WeaveStateElement): Vector2d;
|
|
891
|
+
realOffset(instance: WeaveStateElement): Konva.Vector2d;
|
|
886
892
|
private getRealSelectedNode;
|
|
887
893
|
}
|
|
888
894
|
|
|
@@ -905,9 +911,9 @@ declare abstract class WeaveAction implements WeaveActionBase {
|
|
|
905
911
|
register(instance: Weave): WeaveAction;
|
|
906
912
|
updateProps(props: WeaveElementAttributes): void;
|
|
907
913
|
getProps(): WeaveElementAttributes;
|
|
908
|
-
isPressed(e: KonvaEventObject<PointerEvent, Stage>): boolean;
|
|
909
|
-
setTapStart(e: KonvaEventObject<PointerEvent, Stage>): void;
|
|
910
|
-
isTap(e: KonvaEventObject<PointerEvent, Stage>): boolean;
|
|
914
|
+
isPressed(e: KonvaEventObject<PointerEvent, Konva.Stage>): boolean;
|
|
915
|
+
setTapStart(e: KonvaEventObject<PointerEvent, Konva.Stage>): void;
|
|
916
|
+
isTap(e: KonvaEventObject<PointerEvent, Konva.Stage>): boolean;
|
|
911
917
|
abstract onInit?(): void;
|
|
912
918
|
abstract trigger(cancelAction: () => void, params?: unknown): unknown;
|
|
913
919
|
abstract onPropsChange?(): void;
|
|
@@ -939,15 +945,15 @@ declare class WeaveCloningManager {
|
|
|
939
945
|
constructor(instance: Weave);
|
|
940
946
|
nodesToGroupSerialized(instancesToClone: Konva.Node[]): {
|
|
941
947
|
serializedNodes: WeaveStateElement[];
|
|
942
|
-
minPoint: Vector2d;
|
|
948
|
+
minPoint: Konva.Vector2d;
|
|
943
949
|
} | undefined;
|
|
944
|
-
cloneNodes(instancesToClone: Konva.Node[], targetContainer: Konva.Group | Konva.Layer | undefined, onPoint: Vector2d): void;
|
|
950
|
+
cloneNodes(instancesToClone: Konva.Node[], targetContainer: Konva.Group | Konva.Layer | undefined, onPoint: Konva.Vector2d): void;
|
|
945
951
|
private recursivelyUpdateKeys;
|
|
946
952
|
cloneNode(targetNode: Konva.Node): Konva.Node | undefined;
|
|
947
953
|
addClone(node: Konva.Node): void;
|
|
948
954
|
removeClone(node: Konva.Node): void;
|
|
949
|
-
getClones():
|
|
950
|
-
isClone(node: Konva.Node):
|
|
955
|
+
getClones(): konva_lib_Node9.Node<konva_lib_Node8.NodeConfig>[];
|
|
956
|
+
isClone(node: Konva.Node): konva_lib_Node11.Node<konva_lib_Node10.NodeConfig> | undefined;
|
|
951
957
|
cleanupClones(): void;
|
|
952
958
|
}
|
|
953
959
|
|
|
@@ -1102,7 +1108,7 @@ declare class Weave {
|
|
|
1102
1108
|
skipTransform?: boolean;
|
|
1103
1109
|
skipShadow?: boolean;
|
|
1104
1110
|
skipStroke?: boolean;
|
|
1105
|
-
relativeTo?: Container;
|
|
1111
|
+
relativeTo?: Konva.Container;
|
|
1106
1112
|
} | undefined): {
|
|
1107
1113
|
x: number;
|
|
1108
1114
|
y: number;
|
|
@@ -1116,14 +1122,14 @@ declare class Weave {
|
|
|
1116
1122
|
group(nodes: WeaveStateElement[]): void;
|
|
1117
1123
|
unGroup(group: WeaveStateElement): void;
|
|
1118
1124
|
resolveNode(node: Konva.Node): WeaveElementInstance | undefined;
|
|
1119
|
-
pointIntersectsElement(point?: Vector2d): Konva.Node | null;
|
|
1125
|
+
pointIntersectsElement(point?: Konva.Vector2d): Konva.Node | null;
|
|
1120
1126
|
nodeIntersectsContainerElement(node: Konva.Node | Konva.Transformer, actualLayer?: Konva.Layer | Konva.Group): Konva.Node | undefined;
|
|
1121
|
-
getMousePointer(point?: Vector2d): WeaveMousePointInfo;
|
|
1127
|
+
getMousePointer(point?: Konva.Vector2d): WeaveMousePointInfo;
|
|
1122
1128
|
getMousePointerRelativeToContainer(container: Konva.Node | Konva.Layer): WeaveMousePointInfoSimple;
|
|
1123
1129
|
selectNodesByKey(nodesIds: string[]): void;
|
|
1124
1130
|
getCloningManager(): WeaveCloningManager;
|
|
1125
1131
|
nodesToGroupSerialized(instancesToClone: Konva.Node[]): WeaveSerializedGroup;
|
|
1126
|
-
cloneNodes(instancesToClone: Konva.Node[], targetContainer: Konva.Layer | Konva.Group | undefined, onPoint: Vector2d): void;
|
|
1132
|
+
cloneNodes(instancesToClone: Konva.Node[], targetContainer: Konva.Layer | Konva.Group | undefined, onPoint: Konva.Vector2d): void;
|
|
1127
1133
|
getFonts(): WeaveFont[];
|
|
1128
1134
|
imageToBase64(img: HTMLImageElement, mimeType: string): string;
|
|
1129
1135
|
exportNodes(nodes: WeaveElementInstance[], boundingNodes: (nodes: Konva.Node[]) => Konva.Node[], options: WeaveExportNodesOptions): Promise<HTMLImageElement>;
|
|
@@ -1175,7 +1181,7 @@ type WeaveActionPropsChangeEvent = {
|
|
|
1175
1181
|
//# sourceMappingURL=types.d.ts.map
|
|
1176
1182
|
declare function resetScale(node: Konva.Node): void;
|
|
1177
1183
|
declare function clearContainerTargets(instance: Weave): void;
|
|
1178
|
-
declare function containerOverCursor(instance: Weave, ignoreNodes: Konva.Node[], definedCursorPosition?: Vector2d): Konva.Node | undefined;
|
|
1184
|
+
declare function containerOverCursor(instance: Weave, ignoreNodes: Konva.Node[], definedCursorPosition?: Konva.Vector2d): Konva.Node | undefined;
|
|
1179
1185
|
declare function moveNodeToContainer(instance: Weave, node: Konva.Node, containerToMove: Konva.Layer | Konva.Node, invalidOriginsTypes?: string[]): boolean;
|
|
1180
1186
|
declare function getExportBoundingBox(nodes: Konva.Node[]): {
|
|
1181
1187
|
x: number;
|
|
@@ -1187,7 +1193,7 @@ declare function getBoundingBox(nodes: Konva.Node[], config?: {
|
|
|
1187
1193
|
skipTransform?: boolean;
|
|
1188
1194
|
skipShadow?: boolean;
|
|
1189
1195
|
skipStroke?: boolean;
|
|
1190
|
-
relativeTo?: Container;
|
|
1196
|
+
relativeTo?: Konva.Container;
|
|
1191
1197
|
} | undefined): {
|
|
1192
1198
|
x: number;
|
|
1193
1199
|
y: number;
|
|
@@ -1216,7 +1222,7 @@ declare function getVisibleNodes(instance: Weave, stage: Konva.Stage, nodeParent
|
|
|
1216
1222
|
declare function memoize<T extends (...args: any[]) => any>(fn: T): T;
|
|
1217
1223
|
declare function isIOS(): boolean;
|
|
1218
1224
|
declare const isServer: () => boolean;
|
|
1219
|
-
declare const getPositionRelativeToContainerOnPosition: (instance: Weave) => Vector2d | null | undefined;
|
|
1225
|
+
declare const getPositionRelativeToContainerOnPosition: (instance: Weave) => Konva.Vector2d | null | undefined;
|
|
1220
1226
|
declare const canComposite: (node: Konva.Node) => boolean | null;
|
|
1221
1227
|
declare function mergeExceptArrays<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
|
|
1222
1228
|
|
|
@@ -1329,7 +1335,7 @@ declare class WeaveEllipseNode extends WeaveNode {
|
|
|
1329
1335
|
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1330
1336
|
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1331
1337
|
scaleReset(node: Konva.Ellipse): void;
|
|
1332
|
-
realOffset(element: WeaveStateElement): Vector2d;
|
|
1338
|
+
realOffset(element: WeaveStateElement): Konva.Vector2d;
|
|
1333
1339
|
}
|
|
1334
1340
|
|
|
1335
1341
|
//#endregion
|
|
@@ -1521,7 +1527,7 @@ declare class WeaveStarNode extends WeaveNode {
|
|
|
1521
1527
|
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1522
1528
|
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1523
1529
|
scaleReset(node: Konva.Star): void;
|
|
1524
|
-
realOffset(element: WeaveStateElement): Vector2d;
|
|
1530
|
+
realOffset(element: WeaveStateElement): Konva.Vector2d;
|
|
1525
1531
|
}
|
|
1526
1532
|
|
|
1527
1533
|
//#endregion
|
|
@@ -1576,7 +1582,7 @@ declare class WeaveRegularPolygonNode extends WeaveNode {
|
|
|
1576
1582
|
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1577
1583
|
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1578
1584
|
scaleReset(node: Konva.RegularPolygon): void;
|
|
1579
|
-
realOffset(element: WeaveStateElement): Vector2d;
|
|
1585
|
+
realOffset(element: WeaveStateElement): Konva.Vector2d;
|
|
1580
1586
|
}
|
|
1581
1587
|
|
|
1582
1588
|
//#endregion
|
|
@@ -2259,8 +2265,8 @@ declare class WeaveRectangleToolAction extends WeaveAction {
|
|
|
2259
2265
|
protected rectId: string | null;
|
|
2260
2266
|
protected moved: boolean;
|
|
2261
2267
|
protected tempRectNode: Konva.Rect | null;
|
|
2262
|
-
protected pointers: Map<number, Vector2d>;
|
|
2263
|
-
protected clickPoint: Vector2d | null;
|
|
2268
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
2269
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2264
2270
|
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2265
2271
|
protected measureContainer: Konva.Layer | Konva.Group | undefined;
|
|
2266
2272
|
protected cancelAction: () => void;
|
|
@@ -2316,8 +2322,8 @@ declare class WeaveEllipseToolAction extends WeaveAction {
|
|
|
2316
2322
|
protected ellipseId: string | null;
|
|
2317
2323
|
protected creating: boolean;
|
|
2318
2324
|
protected moved: boolean;
|
|
2319
|
-
protected pointers: Map<number, Vector2d>;
|
|
2320
|
-
protected clickPoint: Vector2d | null;
|
|
2325
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
2326
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2321
2327
|
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2322
2328
|
protected cancelAction: () => void;
|
|
2323
2329
|
onPropsChange: undefined;
|
|
@@ -2377,8 +2383,8 @@ declare class WeavePenToolAction extends WeaveAction {
|
|
|
2377
2383
|
protected tempLineNode: Konva.Line | null;
|
|
2378
2384
|
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2379
2385
|
protected measureContainer: Konva.Layer | Konva.Group | undefined;
|
|
2380
|
-
protected clickPoint: Vector2d | null;
|
|
2381
|
-
protected pointers: Map<number, Vector2d>;
|
|
2386
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2387
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
2382
2388
|
protected tempPoint: Konva.Circle | undefined;
|
|
2383
2389
|
protected tempNextPoint: Konva.Circle | undefined;
|
|
2384
2390
|
protected cancelAction: () => void;
|
|
@@ -2437,7 +2443,7 @@ declare class WeaveBrushToolAction extends WeaveAction {
|
|
|
2437
2443
|
protected config: WeaveBrushToolActionProperties;
|
|
2438
2444
|
protected initialized: boolean;
|
|
2439
2445
|
protected state: WeaveBrushToolActionState;
|
|
2440
|
-
protected clickPoint: Vector2d | null;
|
|
2446
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2441
2447
|
protected strokeId: string | null;
|
|
2442
2448
|
protected isEraser: boolean;
|
|
2443
2449
|
protected container: Konva.Layer | Konva.Node | undefined;
|
|
@@ -2501,7 +2507,7 @@ declare class WeaveTextToolAction extends WeaveAction {
|
|
|
2501
2507
|
protected state: WeaveTextToolActionState;
|
|
2502
2508
|
protected textId: string | null;
|
|
2503
2509
|
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2504
|
-
protected clickPoint: Vector2d | null;
|
|
2510
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2505
2511
|
protected cancelAction: () => void;
|
|
2506
2512
|
onPropsChange: undefined;
|
|
2507
2513
|
onInit: undefined;
|
|
@@ -2558,14 +2564,14 @@ type WeaveImageToolActionTriggerParams = {
|
|
|
2558
2564
|
imageURL?: string;
|
|
2559
2565
|
imageId?: string;
|
|
2560
2566
|
options?: ImageOptions;
|
|
2561
|
-
position?: Vector2d;
|
|
2567
|
+
position?: Konva.Vector2d;
|
|
2562
2568
|
forceMainContainer?: boolean;
|
|
2563
2569
|
};
|
|
2564
2570
|
type ImageOptions = {
|
|
2565
2571
|
crossOrigin: ImageCrossOrigin;
|
|
2566
2572
|
};
|
|
2567
2573
|
type WeaveImageToolActionTriggerReturn = {
|
|
2568
|
-
finishUploadCallback: (imageURL: string, position?: Vector2d | undefined) => void;
|
|
2574
|
+
finishUploadCallback: (imageURL: string, position?: Konva.Vector2d | undefined) => void;
|
|
2569
2575
|
} | undefined;
|
|
2570
2576
|
|
|
2571
2577
|
//#endregion
|
|
@@ -2580,9 +2586,9 @@ declare class WeaveImageToolAction extends WeaveAction {
|
|
|
2580
2586
|
protected tempImageId: string | null;
|
|
2581
2587
|
protected tempImageNode: Konva.Image | null;
|
|
2582
2588
|
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2583
|
-
protected pointers: Map<number, Vector2d>;
|
|
2589
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
2584
2590
|
protected imageURL: string | null;
|
|
2585
|
-
protected clickPoint: Vector2d | null;
|
|
2591
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2586
2592
|
protected forceMainContainer: boolean;
|
|
2587
2593
|
protected cancelAction: () => void;
|
|
2588
2594
|
onPropsChange: undefined;
|
|
@@ -2638,8 +2644,8 @@ declare class WeaveStarToolAction extends WeaveAction {
|
|
|
2638
2644
|
protected starId: string | null;
|
|
2639
2645
|
protected creating: boolean;
|
|
2640
2646
|
protected moved: boolean;
|
|
2641
|
-
protected pointers: Map<number, Vector2d>;
|
|
2642
|
-
protected clickPoint: Vector2d | null;
|
|
2647
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
2648
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2643
2649
|
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2644
2650
|
protected cancelAction: () => void;
|
|
2645
2651
|
onPropsChange: undefined;
|
|
@@ -2700,8 +2706,8 @@ declare class WeaveArrowToolAction extends WeaveAction {
|
|
|
2700
2706
|
protected tempArrowNode: Konva.Arrow | null;
|
|
2701
2707
|
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2702
2708
|
protected measureContainer: Konva.Layer | Konva.Group | undefined;
|
|
2703
|
-
protected clickPoint: Vector2d | null;
|
|
2704
|
-
protected pointers: Map<number, Vector2d>;
|
|
2709
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2710
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
2705
2711
|
protected tempPoint: Konva.Circle | undefined;
|
|
2706
2712
|
protected tempNextPoint: Konva.Circle | undefined;
|
|
2707
2713
|
protected cancelAction: () => void;
|
|
@@ -2759,8 +2765,8 @@ declare class WeaveRegularPolygonToolAction extends WeaveAction {
|
|
|
2759
2765
|
protected regularPolygonId: string | null;
|
|
2760
2766
|
protected creating: boolean;
|
|
2761
2767
|
protected moved: boolean;
|
|
2762
|
-
protected pointers: Map<number, Vector2d>;
|
|
2763
|
-
protected clickPoint: Vector2d | null;
|
|
2768
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
2769
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2764
2770
|
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2765
2771
|
protected cancelAction: () => void;
|
|
2766
2772
|
onPropsChange: undefined;
|
|
@@ -2825,7 +2831,7 @@ declare class WeaveFrameToolAction extends WeaveAction {
|
|
|
2825
2831
|
protected state: WeaveFrameToolActionState;
|
|
2826
2832
|
protected frameId: string | null;
|
|
2827
2833
|
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2828
|
-
protected clickPoint: Vector2d | null;
|
|
2834
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2829
2835
|
protected cancelAction: () => void;
|
|
2830
2836
|
onPropsChange: undefined;
|
|
2831
2837
|
onInit: undefined;
|
|
@@ -3010,9 +3016,9 @@ declare class WeaveCommentToolAction<T> extends WeaveAction {
|
|
|
3010
3016
|
private readonly config;
|
|
3011
3017
|
protected initialized: boolean;
|
|
3012
3018
|
protected state: WeaveCommentToolActionState;
|
|
3013
|
-
protected pointers: Map<number, Vector2d>;
|
|
3019
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
3014
3020
|
protected commentId: string | null;
|
|
3015
|
-
protected clickPoint: Vector2d | null;
|
|
3021
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
3016
3022
|
protected cancelAction: () => void;
|
|
3017
3023
|
onPropsChange: undefined;
|
|
3018
3024
|
constructor(params: WeaveCommentToolActionParams<T>);
|
|
@@ -3066,7 +3072,7 @@ type WeaveVideoToolDragParams = {
|
|
|
3066
3072
|
type WeaveVideoToolActionTriggerParams = {
|
|
3067
3073
|
videoId?: string;
|
|
3068
3074
|
videoParams?: WeaveVideoToolDragParams;
|
|
3069
|
-
position?: Vector2d;
|
|
3075
|
+
position?: Konva.Vector2d;
|
|
3070
3076
|
forceMainContainer?: boolean;
|
|
3071
3077
|
};
|
|
3072
3078
|
type WeaveVideoToolActionTriggerVideoParams = {
|
|
@@ -3074,7 +3080,7 @@ type WeaveVideoToolActionTriggerVideoParams = {
|
|
|
3074
3080
|
videoURL: string;
|
|
3075
3081
|
};
|
|
3076
3082
|
type WeaveVideoToolActionTriggerReturn = {
|
|
3077
|
-
finishUploadCallback: (videoParams: WeaveVideoToolDragParams, position?: Vector2d) => void;
|
|
3083
|
+
finishUploadCallback: (videoParams: WeaveVideoToolDragParams, position?: Konva.Vector2d) => void;
|
|
3078
3084
|
} | undefined;
|
|
3079
3085
|
type WeaveVideoToolActionOnAddingEvent = {
|
|
3080
3086
|
videoURL: string;
|
|
@@ -3094,9 +3100,9 @@ declare class WeaveVideoToolAction extends WeaveAction {
|
|
|
3094
3100
|
protected cursorPadding: number;
|
|
3095
3101
|
protected videoId: string | null;
|
|
3096
3102
|
protected container: Konva.Layer | Konva.Node | undefined;
|
|
3097
|
-
protected pointers: Map<number, Vector2d>;
|
|
3103
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
3098
3104
|
protected videoParams: WeaveVideoToolDragParams | null;
|
|
3099
|
-
protected clickPoint: Vector2d | null;
|
|
3105
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
3100
3106
|
protected forceMainContainer: boolean;
|
|
3101
3107
|
protected cancelAction: () => void;
|
|
3102
3108
|
onPropsChange: undefined;
|
|
@@ -3475,7 +3481,7 @@ type WeaveCopyPasteNodesPluginOnPasteExternalEvent = {
|
|
|
3475
3481
|
items?: ClipboardItems;
|
|
3476
3482
|
dataList?: DataTransferItemList;
|
|
3477
3483
|
positionCalculated: boolean;
|
|
3478
|
-
position: Vector2d;
|
|
3484
|
+
position: Konva.Vector2d;
|
|
3479
3485
|
};
|
|
3480
3486
|
type WeaveCopyPastePasteModeKeys = keyof typeof WEAVE_COPY_PASTE_PASTE_MODES;
|
|
3481
3487
|
type WeaveCopyPastePasteMode = (typeof WEAVE_COPY_PASTE_PASTE_MODES)[WeaveCopyPastePasteModeKeys];
|
|
@@ -3483,10 +3489,10 @@ type WeavePasteModel = {
|
|
|
3483
3489
|
weaveInstanceId: string;
|
|
3484
3490
|
weave: Record<string, {
|
|
3485
3491
|
element: WeaveStateElement;
|
|
3486
|
-
posRelativeToSelection: Vector2d;
|
|
3492
|
+
posRelativeToSelection: Konva.Vector2d;
|
|
3487
3493
|
containerId: string;
|
|
3488
3494
|
}>;
|
|
3489
|
-
weaveMinPoint: Vector2d;
|
|
3495
|
+
weaveMinPoint: Konva.Vector2d;
|
|
3490
3496
|
};
|
|
3491
3497
|
type WeaveToPasteNode = {
|
|
3492
3498
|
konvaNode: Konva.Node;
|
|
@@ -3536,7 +3542,7 @@ declare class WeaveCopyPasteNodesPlugin extends WeavePlugin {
|
|
|
3536
3542
|
private handlePaste;
|
|
3537
3543
|
private performCopy;
|
|
3538
3544
|
copy(): Promise<void>;
|
|
3539
|
-
paste(position?: Vector2d, relativePosition?: Vector2d): Promise<void>;
|
|
3545
|
+
paste(position?: Konva.Vector2d, relativePosition?: Konva.Vector2d): Promise<void>;
|
|
3540
3546
|
getSelectedNodes(): WeaveToPasteNode[];
|
|
3541
3547
|
isPasting(): boolean;
|
|
3542
3548
|
private cancel;
|
|
@@ -3562,7 +3568,7 @@ declare class WeaveCopyPasteNodesPlugin extends WeavePlugin {
|
|
|
3562
3568
|
type WeaveCommentsRendererModel<T> = {
|
|
3563
3569
|
getId: (comment: T) => string;
|
|
3564
3570
|
getUser: (comment: T) => WeaveUser;
|
|
3565
|
-
getPosition: (comment: T) => Vector2d;
|
|
3571
|
+
getPosition: (comment: T) => Konva.Vector2d;
|
|
3566
3572
|
getStatus: (comment: T) => WeaveCommentStatus;
|
|
3567
3573
|
};
|
|
3568
3574
|
type WeaveCommentsRendererPluginConfig<T> = {
|
|
@@ -3591,7 +3597,7 @@ declare class WeaveCommentsRendererPlugin<T> extends WeavePlugin {
|
|
|
3591
3597
|
private initCommentsLayer;
|
|
3592
3598
|
deleteComments(): void;
|
|
3593
3599
|
render(): void;
|
|
3594
|
-
getCommentsLayer():
|
|
3600
|
+
getCommentsLayer(): konva_lib_Layer7.Layer;
|
|
3595
3601
|
enable(): void;
|
|
3596
3602
|
disable(): void;
|
|
3597
3603
|
}
|