@inditextech/weave-sdk 1.0.0 → 1.0.2
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 +67 -96
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +3132 -1035
- package/dist/sdk.js.map +1 -1
- package/dist/sdk.node.d.ts +3678 -0
- package/dist/sdk.node.d.ts.map +1 -0
- package/dist/sdk.node.js +32311 -0
- package/dist/sdk.node.js.map +1 -0
- package/package.json +16 -10
|
@@ -0,0 +1,3678 @@
|
|
|
1
|
+
import Konva from "konva";
|
|
2
|
+
import pino, { Logger } from "pino";
|
|
3
|
+
import * as Y$1 from "yjs";
|
|
4
|
+
import * as Y from "yjs";
|
|
5
|
+
import * as konva_lib_Node8 from "konva/lib/Node";
|
|
6
|
+
import * as konva_lib_Node9 from "konva/lib/Node";
|
|
7
|
+
import * as konva_lib_Node10 from "konva/lib/Node";
|
|
8
|
+
import * as konva_lib_Node11 from "konva/lib/Node";
|
|
9
|
+
import * as konva_lib_Node1 from "konva/lib/Node";
|
|
10
|
+
import * as konva_lib_Node2 from "konva/lib/Node";
|
|
11
|
+
import * as konva_lib_Node3 from "konva/lib/Node";
|
|
12
|
+
import * as konva_lib_Node4 from "konva/lib/Node";
|
|
13
|
+
import { KonvaEventObject } from "konva/lib/Node";
|
|
14
|
+
import { Stage, StageConfig } from "konva/lib/Stage";
|
|
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";
|
|
18
|
+
import * as konva_lib_Group5 from "konva/lib/Group";
|
|
19
|
+
import * as konva_lib_Layer7 from "konva/lib/Layer";
|
|
20
|
+
|
|
21
|
+
//#region ../types/dist/types.d.ts
|
|
22
|
+
//#region src/base/node.d.ts
|
|
23
|
+
interface WeaveNodeBase {
|
|
24
|
+
getNodeType(): string;
|
|
25
|
+
create(id: string, props: WeaveElementAttributes): WeaveStateElement;
|
|
26
|
+
onAdd?(nodeInstance: WeaveElementInstance): void;
|
|
27
|
+
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
28
|
+
onUpdate(instance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
29
|
+
onDestroy(instance: WeaveElementInstance): void;
|
|
30
|
+
serialize(instance: WeaveElementInstance): WeaveStateElement;
|
|
31
|
+
setupDefaultNodeAugmentation(node: Konva.Node): void;
|
|
32
|
+
setupDefaultNodeEvents(node: Konva.Node): void;
|
|
33
|
+
isNodeSelected(ele: Konva.Node): boolean;
|
|
34
|
+
lock(instance: Konva.Node): void;
|
|
35
|
+
unlock(instance: Konva.Node): void;
|
|
36
|
+
isLocked(instance: Konva.Node): boolean;
|
|
37
|
+
isSelecting(): boolean;
|
|
38
|
+
isPasting(): boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/base/action.d.ts
|
|
43
|
+
interface WeaveActionBase {
|
|
44
|
+
onInit?(): void;
|
|
45
|
+
trigger(cancelAction: () => void, params?: unknown): unknown;
|
|
46
|
+
internalUpdate?(): void;
|
|
47
|
+
cleanup?(): void;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/base/plugin.d.ts
|
|
52
|
+
interface WeavePluginBase {
|
|
53
|
+
onInit?(): void;
|
|
54
|
+
onRender?(): void;
|
|
55
|
+
enable(): void;
|
|
56
|
+
disable(): void;
|
|
57
|
+
isEnabled(): boolean;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/base/store.d.ts
|
|
62
|
+
type WeaveStoreOptions = {
|
|
63
|
+
getUser: () => WeaveUser;
|
|
64
|
+
undoManagerOptions?: WeaveUndoManagerOptions;
|
|
65
|
+
};
|
|
66
|
+
interface WeaveStoreBase {
|
|
67
|
+
connect(): void;
|
|
68
|
+
disconnect(): void;
|
|
69
|
+
handleAwarenessChange(emit: boolean): void;
|
|
70
|
+
setAwarenessInfo(field: string, value: unknown): void;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/types.d.ts
|
|
75
|
+
type WeaveFontsPreloadFunction = () => Promise<WeaveFont[]>;
|
|
76
|
+
type WeaveConfig = {
|
|
77
|
+
store: WeaveStoreBase;
|
|
78
|
+
nodes?: WeaveNodeBase[];
|
|
79
|
+
actions?: WeaveActionBase[];
|
|
80
|
+
plugins?: WeavePluginBase[];
|
|
81
|
+
fonts?: WeaveFont[] | WeaveFontsPreloadFunction;
|
|
82
|
+
logger?: WeaveLoggerConfig;
|
|
83
|
+
serverSide?: boolean;
|
|
84
|
+
};
|
|
85
|
+
type WeaveStatusKeys = keyof typeof WEAVE_INSTANCE_STATUS;
|
|
86
|
+
type WeaveStatus = (typeof WEAVE_INSTANCE_STATUS)[WeaveStatusKeys];
|
|
87
|
+
type NodeSerializable = Konva.NodeConfig & {
|
|
88
|
+
id: string;
|
|
89
|
+
nodeType: string;
|
|
90
|
+
};
|
|
91
|
+
type WeaveElementAttributes = {
|
|
92
|
+
[key: string]: any;
|
|
93
|
+
id?: string;
|
|
94
|
+
nodeType?: string;
|
|
95
|
+
children?: WeaveStateElement[];
|
|
96
|
+
};
|
|
97
|
+
type WeaveStateElement = {
|
|
98
|
+
key: string;
|
|
99
|
+
type: string;
|
|
100
|
+
props: WeaveElementAttributes;
|
|
101
|
+
};
|
|
102
|
+
type WeaveState = {
|
|
103
|
+
weave: {
|
|
104
|
+
key: "stage";
|
|
105
|
+
type: "stage";
|
|
106
|
+
props: {
|
|
107
|
+
[key: string]: unknown;
|
|
108
|
+
id: "stage";
|
|
109
|
+
children: WeaveStateElement[];
|
|
110
|
+
};
|
|
111
|
+
} | Record<string, WeaveStateElement>;
|
|
112
|
+
};
|
|
113
|
+
type WeaveSelection = {
|
|
114
|
+
instance: Konva.Shape | Konva.Group;
|
|
115
|
+
node: WeaveStateElement | undefined;
|
|
116
|
+
};
|
|
117
|
+
type WeaveMousePointInfoSimple = {
|
|
118
|
+
mousePoint: Konva.Vector2d;
|
|
119
|
+
container: Konva.Layer | Konva.Node | undefined;
|
|
120
|
+
};
|
|
121
|
+
type WeaveMousePointInfo = WeaveMousePointInfoSimple & {
|
|
122
|
+
measureContainer: Konva.Layer | Konva.Group | undefined;
|
|
123
|
+
};
|
|
124
|
+
type WeaveSerializedGroup = {
|
|
125
|
+
serializedNodes: WeaveStateElement[];
|
|
126
|
+
minPoint: Konva.Vector2d;
|
|
127
|
+
} | undefined;
|
|
128
|
+
type WeaveNodeFound = {
|
|
129
|
+
node: WeaveStateElement | null;
|
|
130
|
+
parent: WeaveStateElement | null;
|
|
131
|
+
index: number;
|
|
132
|
+
};
|
|
133
|
+
type WeaveElementInstance = Konva.Layer | Konva.Group | Konva.Shape;
|
|
134
|
+
type WeaveLoggerConfig = {
|
|
135
|
+
disabled?: boolean;
|
|
136
|
+
level?: "debug" | "info" | "warn" | "error";
|
|
137
|
+
};
|
|
138
|
+
type WeavePositionKeys = keyof typeof WEAVE_NODE_POSITION;
|
|
139
|
+
type WeavePosition = (typeof WEAVE_NODE_POSITION)[WeavePositionKeys];
|
|
140
|
+
type WeaveExportFormatsKeys = keyof typeof WEAVE_EXPORT_FORMATS;
|
|
141
|
+
type WeaveExportFormats = (typeof WEAVE_EXPORT_FORMATS)[WeaveExportFormatsKeys];
|
|
142
|
+
type WeaveExportNodesOptions = {
|
|
143
|
+
format?: WeaveExportFormats;
|
|
144
|
+
padding?: number;
|
|
145
|
+
pixelRatio?: number;
|
|
146
|
+
backgroundColor?: string;
|
|
147
|
+
quality?: number;
|
|
148
|
+
backend?: WeaveKonvaBackend;
|
|
149
|
+
};
|
|
150
|
+
type WeaveUser = {
|
|
151
|
+
id: string;
|
|
152
|
+
name: string;
|
|
153
|
+
email: string;
|
|
154
|
+
[key: string]: any;
|
|
155
|
+
};
|
|
156
|
+
type WeaveFont = {
|
|
157
|
+
id: string;
|
|
158
|
+
name: string;
|
|
159
|
+
offsetX?: number;
|
|
160
|
+
offsetY?: number;
|
|
161
|
+
};
|
|
162
|
+
type WeaveUndoManagerOptions = {
|
|
163
|
+
captureTimeout?: number;
|
|
164
|
+
trackedOrigins?: Set<any>;
|
|
165
|
+
};
|
|
166
|
+
type WeaveUndoRedoChange = {
|
|
167
|
+
canRedo: boolean;
|
|
168
|
+
canUndo: boolean;
|
|
169
|
+
redoStackLength: number;
|
|
170
|
+
undoStackLength: number;
|
|
171
|
+
};
|
|
172
|
+
type WeaveStoreConnectionStatusKeys = keyof typeof WEAVE_STORE_CONNECTION_STATUS;
|
|
173
|
+
type WeaveStoreConnectionStatus = (typeof WEAVE_STORE_CONNECTION_STATUS)[WeaveStoreConnectionStatusKeys];
|
|
174
|
+
declare type docElementTypeDescription = "xml" | "text" | Array<any> | object;
|
|
175
|
+
declare type DocTypeDescription = {
|
|
176
|
+
[key: string]: docElementTypeDescription;
|
|
177
|
+
};
|
|
178
|
+
declare type MappedTypeDescription<T extends DocTypeDescription> = { readonly [P in keyof T]: T[P] extends "xml" ? Y$1.XmlFragment : T[P] extends "text" ? Y$1.Text : T[P] extends Array<any> ? T[P] : T[P] extends object ? Partial<T[P]> : never };
|
|
179
|
+
type WeaveNodeTransformerProperties = Konva.TransformerConfig;
|
|
180
|
+
type WeaveNodeConfiguration = {
|
|
181
|
+
transform: Partial<WeaveNodeTransformerProperties>;
|
|
182
|
+
};
|
|
183
|
+
type ImageCrossOrigin = "anonymous" | "use-credentials";
|
|
184
|
+
type URLTransformerFunction = (url: string) => string;
|
|
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];
|
|
188
|
+
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region src/constants.d.ts
|
|
191
|
+
|
|
192
|
+
declare const WEAVE_INSTANCE_STATUS: {
|
|
193
|
+
readonly "IDLE": "idle";
|
|
194
|
+
readonly "STARTING": "starting";
|
|
195
|
+
readonly "LOADING_FONTS": "loadingFonts";
|
|
196
|
+
readonly "CONNECTING_TO_ROOM": "connectingToRoom";
|
|
197
|
+
readonly "CONNECTING_ERROR": "connectingError";
|
|
198
|
+
readonly "LOADING_ROOM": "loadingRoom";
|
|
199
|
+
readonly "RUNNING": "running";
|
|
200
|
+
};
|
|
201
|
+
declare const WEAVE_NODE_POSITION: {
|
|
202
|
+
readonly "UP": "up";
|
|
203
|
+
readonly "DOWN": "down";
|
|
204
|
+
readonly "FRONT": "front";
|
|
205
|
+
readonly "BACK": "back";
|
|
206
|
+
};
|
|
207
|
+
declare const WEAVE_EXPORT_FORMATS: {
|
|
208
|
+
readonly "PNG": "image/png";
|
|
209
|
+
readonly "JPEG": "image/jpeg";
|
|
210
|
+
};
|
|
211
|
+
declare const WEAVE_STORE_CONNECTION_STATUS: {
|
|
212
|
+
readonly "ERROR": "error";
|
|
213
|
+
readonly "CONNECTING": "connecting";
|
|
214
|
+
readonly "CONNECTED": "connected";
|
|
215
|
+
readonly "DISCONNECTED": "disconnected";
|
|
216
|
+
};
|
|
217
|
+
declare const WEAVE_KONVA_BACKEND: {
|
|
218
|
+
readonly "CANVAS": "canvas";
|
|
219
|
+
readonly "SKIA": "skia";
|
|
220
|
+
}; //#endregion
|
|
221
|
+
//#region src/stores/store.d.ts
|
|
222
|
+
|
|
223
|
+
//#endregion
|
|
224
|
+
declare abstract class WeaveStore implements WeaveStoreBase {
|
|
225
|
+
protected instance: Weave;
|
|
226
|
+
protected name: string;
|
|
227
|
+
protected supportsUndoManager: boolean;
|
|
228
|
+
protected config: WeaveStoreOptions;
|
|
229
|
+
private state;
|
|
230
|
+
private latestState;
|
|
231
|
+
private document;
|
|
232
|
+
private logger;
|
|
233
|
+
private undoManager;
|
|
234
|
+
private isRoomLoaded;
|
|
235
|
+
constructor(config: WeaveStoreOptions);
|
|
236
|
+
getName(): string;
|
|
237
|
+
getLogger(): Logger;
|
|
238
|
+
register(instance: Weave): WeaveStore;
|
|
239
|
+
getUser(): WeaveUser;
|
|
240
|
+
setState(state: WeaveState): void;
|
|
241
|
+
setLatestState(newState: WeaveState): void;
|
|
242
|
+
getLatestState(): WeaveState;
|
|
243
|
+
getDocument(): Y.Doc;
|
|
244
|
+
getState(): MappedTypeDescription<WeaveState>;
|
|
245
|
+
getStateJson(): WeaveState;
|
|
246
|
+
getStateSnapshot(): Uint8Array;
|
|
247
|
+
setup(): void;
|
|
248
|
+
canUndoStateStep(): boolean;
|
|
249
|
+
canRedoStateStep(): boolean;
|
|
250
|
+
undoStateStep(): void;
|
|
251
|
+
redoStateStep(): void;
|
|
252
|
+
handleConnectionStatusChange(status: WeaveStoreConnectionStatus): void;
|
|
253
|
+
abstract connect(): void;
|
|
254
|
+
abstract disconnect(): void;
|
|
255
|
+
abstract handleAwarenessChange(emit: boolean): void;
|
|
256
|
+
abstract setAwarenessInfo(field: string, value: unknown): void;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
//#endregion
|
|
260
|
+
//#region src/plugins/plugin.d.ts
|
|
261
|
+
//# sourceMappingURL=store.d.ts.map
|
|
262
|
+
declare abstract class WeavePlugin implements WeavePluginBase {
|
|
263
|
+
protected instance: Weave;
|
|
264
|
+
protected name: string;
|
|
265
|
+
protected enabled: boolean;
|
|
266
|
+
private logger;
|
|
267
|
+
register(instance: Weave): WeavePlugin;
|
|
268
|
+
getName(): string;
|
|
269
|
+
getLogger(): Logger;
|
|
270
|
+
isEnabled(): boolean;
|
|
271
|
+
abstract onInit?(): void;
|
|
272
|
+
abstract onRender?(): void;
|
|
273
|
+
abstract enable(): void;
|
|
274
|
+
abstract disable(): void;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/plugins/nodes-selection/types.d.ts
|
|
279
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
280
|
+
type WeaveNodesSelectionPluginOnSelectionStateEvent = boolean;
|
|
281
|
+
type WeaveNodesSelectionPluginOnNodesChangeEvent = WeaveSelection[];
|
|
282
|
+
type WeaveNodesSelectionPluginOnStageSelectionEvent = undefined;
|
|
283
|
+
type WeaveNodesSelectionOnSelectionParams = {
|
|
284
|
+
resizeEnabled: boolean;
|
|
285
|
+
rotateEnabled: boolean;
|
|
286
|
+
enabledAnchors: string[];
|
|
287
|
+
};
|
|
288
|
+
type WeaveNodesSelectionBehaviorsConfig = {
|
|
289
|
+
singleSelection: {
|
|
290
|
+
enabled: boolean;
|
|
291
|
+
};
|
|
292
|
+
multipleSelection: {
|
|
293
|
+
enabled: boolean;
|
|
294
|
+
};
|
|
295
|
+
onMultipleSelection?: (selectedNodes: Konva.Node[]) => Partial<WeaveNodesSelectionOnSelectionParams>;
|
|
296
|
+
};
|
|
297
|
+
type WeaveNodesSelectionPanningOnSelectionConfig = {
|
|
298
|
+
edgeThreshold: number;
|
|
299
|
+
minScrollSpeed: number;
|
|
300
|
+
maxScrollSpeed: number;
|
|
301
|
+
};
|
|
302
|
+
type WeaveNodesSelectionConfig = {
|
|
303
|
+
selection: Konva.TransformerConfig;
|
|
304
|
+
hover: Konva.TransformerConfig;
|
|
305
|
+
selectionArea: Konva.RectConfig;
|
|
306
|
+
panningWhenSelection: WeaveNodesSelectionPanningOnSelectionConfig;
|
|
307
|
+
behaviors: WeaveNodesSelectionBehaviorsConfig;
|
|
308
|
+
};
|
|
309
|
+
type WeaveNodesSelectionPluginConfig = Partial<WeaveNodesSelectionConfig>;
|
|
310
|
+
type WeaveNodesSelectionPluginParams = {
|
|
311
|
+
config?: WeaveNodesSelectionPluginConfig;
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
//#endregion
|
|
315
|
+
//#region src/plugins/context-menu/types.d.ts
|
|
316
|
+
//# sourceMappingURL=types.d.ts.map
|
|
317
|
+
type WeaveStageContextMenuPluginParams = {
|
|
318
|
+
config?: WeaveStageContextMenuPluginConfig;
|
|
319
|
+
};
|
|
320
|
+
type WeaveStageContextMenuPluginConfig = {
|
|
321
|
+
xOffset?: number;
|
|
322
|
+
yOffset?: number;
|
|
323
|
+
};
|
|
324
|
+
type WeaveStageContextMenuPluginOnNodeContextMenuEvent = {
|
|
325
|
+
selection: WeaveSelection[];
|
|
326
|
+
contextMenuPoint: Konva.Vector2d;
|
|
327
|
+
clickPoint: Konva.Vector2d;
|
|
328
|
+
stageClickPoint: Konva.Vector2d;
|
|
329
|
+
visible: boolean;
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
//#endregion
|
|
333
|
+
//#region src/plugins/context-menu/context-menu.d.ts
|
|
334
|
+
//# sourceMappingURL=types.d.ts.map
|
|
335
|
+
declare class WeaveContextMenuPlugin extends WeavePlugin {
|
|
336
|
+
private config;
|
|
337
|
+
private contextMenuVisible;
|
|
338
|
+
private tapHold;
|
|
339
|
+
private tapHoldTimeout;
|
|
340
|
+
private pointers;
|
|
341
|
+
private timer;
|
|
342
|
+
protected tapStart: {
|
|
343
|
+
x: number;
|
|
344
|
+
y: number;
|
|
345
|
+
time: number;
|
|
346
|
+
} | null;
|
|
347
|
+
getLayerName: undefined;
|
|
348
|
+
initLayer: undefined;
|
|
349
|
+
onRender: undefined;
|
|
350
|
+
constructor(params: WeaveStageContextMenuPluginParams);
|
|
351
|
+
getName(): string;
|
|
352
|
+
onInit(): void;
|
|
353
|
+
isPressed(e: KonvaEventObject<PointerEvent, Stage>): boolean;
|
|
354
|
+
setTapStart(e: KonvaEventObject<PointerEvent, Stage>): void;
|
|
355
|
+
triggerContextMenu(eventTarget: Konva.Node, target: Konva.Node | undefined): void;
|
|
356
|
+
closeContextMenu(): void;
|
|
357
|
+
private getSelectionPlugin;
|
|
358
|
+
cancelLongPressTimer(): void;
|
|
359
|
+
private initEvents;
|
|
360
|
+
private getStageClickPoint;
|
|
361
|
+
isContextMenuVisible(): boolean;
|
|
362
|
+
isTapHold(): boolean;
|
|
363
|
+
enable(): void;
|
|
364
|
+
disable(): void;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
//#endregion
|
|
368
|
+
//#region src/plugins/nodes-edge-snapping/constants.d.ts
|
|
369
|
+
//# sourceMappingURL=context-menu.d.ts.map
|
|
370
|
+
declare const WEAVE_NODES_EDGE_SNAPPING_PLUGIN_KEY = "nodesEdgeSnapping";
|
|
371
|
+
declare const GUIDE_LINE_NAME = "guide-edge-snapping-line";
|
|
372
|
+
declare const GUIDE_LINE_DEFAULT_CONFIG: Required<Pick<Konva.LineConfig, 'stroke' | 'strokeWidth' | 'dash'>>;
|
|
373
|
+
declare const GUIDE_LINE_DRAG_SNAPPING_THRESHOLD = 3;
|
|
374
|
+
declare const GUIDE_LINE_TRANSFORM_SNAPPING_THRESHOLD = 3;
|
|
375
|
+
declare const GUIDE_ORIENTATION: {
|
|
376
|
+
readonly HORIZONTAL: "H";
|
|
377
|
+
readonly VERTICAL: "V";
|
|
378
|
+
};
|
|
379
|
+
declare const NODE_SNAP: {
|
|
380
|
+
readonly START: "start";
|
|
381
|
+
readonly CENTER: "center";
|
|
382
|
+
readonly END: "end";
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
//#endregion
|
|
386
|
+
//#region src/plugins/nodes-edge-snapping/types.d.ts
|
|
387
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
388
|
+
type NodeSnapKeys = keyof typeof NODE_SNAP;
|
|
389
|
+
type NodeSnap = (typeof NODE_SNAP)[NodeSnapKeys];
|
|
390
|
+
type NodeSnappingEdge = {
|
|
391
|
+
nodeId: string;
|
|
392
|
+
guide: number;
|
|
393
|
+
offset: number;
|
|
394
|
+
snap: NodeSnap;
|
|
395
|
+
};
|
|
396
|
+
type NodeSnappingEdges = {
|
|
397
|
+
vertical: NodeSnappingEdge[];
|
|
398
|
+
horizontal: NodeSnappingEdge[];
|
|
399
|
+
};
|
|
400
|
+
type LineGuideStop = {
|
|
401
|
+
vertical: number[];
|
|
402
|
+
horizontal: number[];
|
|
403
|
+
};
|
|
404
|
+
type LineGuide = {
|
|
405
|
+
nodeId: string;
|
|
406
|
+
lineGuide: number;
|
|
407
|
+
diff: number;
|
|
408
|
+
snap: NodeSnap;
|
|
409
|
+
offset: number;
|
|
410
|
+
};
|
|
411
|
+
type GuideOrientationKeys = keyof typeof GUIDE_ORIENTATION;
|
|
412
|
+
type GuideOrientation = (typeof GUIDE_ORIENTATION)[GuideOrientationKeys];
|
|
413
|
+
type Guide = {
|
|
414
|
+
lineGuide: number;
|
|
415
|
+
offset: number;
|
|
416
|
+
orientation: GuideOrientation;
|
|
417
|
+
snap: NodeSnap;
|
|
418
|
+
};
|
|
419
|
+
type WeaveNodesEdgeSnappingPluginConfig = {
|
|
420
|
+
guideLine: Konva.LineConfig;
|
|
421
|
+
dragSnappingThreshold: number;
|
|
422
|
+
transformSnappingThreshold: number;
|
|
423
|
+
};
|
|
424
|
+
type WeaveNodesEdgeSnappingPluginParams = {
|
|
425
|
+
config?: WeaveNodesEdgeSnappingPluginConfig;
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
//#endregion
|
|
429
|
+
//#region src/plugins/nodes-edge-snapping/nodes-edge-snapping.d.ts
|
|
430
|
+
//# sourceMappingURL=types.d.ts.map
|
|
431
|
+
declare class WeaveNodesEdgeSnappingPlugin extends WeavePlugin {
|
|
432
|
+
private readonly guideLineConfig;
|
|
433
|
+
private readonly dragSnappingThreshold;
|
|
434
|
+
private readonly transformSnappingThreshold;
|
|
435
|
+
onRender: undefined;
|
|
436
|
+
constructor(params?: Partial<WeaveNodesEdgeSnappingPluginParams>);
|
|
437
|
+
getName(): string;
|
|
438
|
+
onInit(): void;
|
|
439
|
+
setEnabled(enabled: boolean): void;
|
|
440
|
+
deleteGuides(): void;
|
|
441
|
+
evaluateGuidelines(e: KonvaEventObject<any>): void;
|
|
442
|
+
private getSelectionParentNode;
|
|
443
|
+
cleanupGuidelines(): void;
|
|
444
|
+
private initEvents;
|
|
445
|
+
getLineGuideStops(nodes: Konva.Node[]): LineGuideStop;
|
|
446
|
+
getObjectSnappingEdges(node: Konva.Node): NodeSnappingEdges;
|
|
447
|
+
getGuides(lineGuideStops: LineGuideStop, itemBounds: NodeSnappingEdges, type: string): Guide[];
|
|
448
|
+
private sortedGuides;
|
|
449
|
+
drawGuides(guides: Guide[]): void;
|
|
450
|
+
enable(): void;
|
|
451
|
+
disable(): void;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
//#endregion
|
|
455
|
+
//#region src/plugins/nodes-distance-snapping/constants.d.ts
|
|
456
|
+
//# sourceMappingURL=nodes-edge-snapping.d.ts.map
|
|
457
|
+
declare const WEAVE_NODES_DISTANCE_SNAPPING_PLUGIN_KEY = "nodesDistanceSnapping";
|
|
458
|
+
declare const GUIDE_HORIZONTAL_LINE_NAME = "guide-distance-snapping-horizontal-line";
|
|
459
|
+
declare const GUIDE_VERTICAL_LINE_NAME = "guide-distance-snapping-vertical-line";
|
|
460
|
+
declare const GUIDE_DISTANCE_LINE_DEFAULT_CONFIG: WeaveNodesDistanceSnappingUIConfig;
|
|
461
|
+
declare const GUIDE_ENTER_SNAPPING_TOLERANCE = 3;
|
|
462
|
+
declare const GUIDE_EXIT_SNAPPING_TOLERANCE = 5;
|
|
463
|
+
declare const NODE_SNAP_HORIZONTAL: {
|
|
464
|
+
readonly LEFT: "left";
|
|
465
|
+
readonly CENTER: "center";
|
|
466
|
+
readonly RIGHT: "right";
|
|
467
|
+
};
|
|
468
|
+
declare const NODE_SNAP_VERTICAL: {
|
|
469
|
+
readonly TOP: "top";
|
|
470
|
+
readonly MIDDLE: "middle";
|
|
471
|
+
readonly BOTTOM: "bottom";
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
//#endregion
|
|
475
|
+
//#region src/plugins/nodes-distance-snapping/types.d.ts
|
|
476
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
477
|
+
type NodeSnapHorizontalKeys = keyof typeof NODE_SNAP_HORIZONTAL;
|
|
478
|
+
type NodeSnapHorizontal = (typeof NODE_SNAP_HORIZONTAL)[NodeSnapHorizontalKeys];
|
|
479
|
+
type NodeSnapVerticalKeys = keyof typeof NODE_SNAP_VERTICAL;
|
|
480
|
+
type NodeSnapVertical = (typeof NODE_SNAP_VERTICAL)[NodeSnapVerticalKeys];
|
|
481
|
+
type WeaveNodesDistanceSnappingPluginConfig = {
|
|
482
|
+
enterSnappingTolerance: number;
|
|
483
|
+
exitSnappingTolerance: number;
|
|
484
|
+
ui: WeaveNodesDistanceSnappingUIConfig;
|
|
485
|
+
};
|
|
486
|
+
type WeaveNodesDistanceSnappingPluginParams = {
|
|
487
|
+
config?: DeepPartial<WeaveNodesDistanceSnappingPluginConfig>;
|
|
488
|
+
};
|
|
489
|
+
type DistanceInfoH = {
|
|
490
|
+
index: number;
|
|
491
|
+
from: Konva.Node;
|
|
492
|
+
to: Konva.Node;
|
|
493
|
+
midY: number;
|
|
494
|
+
distance: number;
|
|
495
|
+
};
|
|
496
|
+
type DistanceInfoV = {
|
|
497
|
+
index: number;
|
|
498
|
+
from: Konva.Node;
|
|
499
|
+
to: Konva.Node;
|
|
500
|
+
midX: number;
|
|
501
|
+
distance: number;
|
|
502
|
+
};
|
|
503
|
+
type WeaveNodesDistanceSnappingUIConfig = {
|
|
504
|
+
line: {
|
|
505
|
+
stroke: string;
|
|
506
|
+
strokeWidth: number;
|
|
507
|
+
};
|
|
508
|
+
label: {
|
|
509
|
+
height: number;
|
|
510
|
+
cornerRadius: number;
|
|
511
|
+
fill: string;
|
|
512
|
+
fontSize: number;
|
|
513
|
+
fontFamily: string;
|
|
514
|
+
fontStyle: string;
|
|
515
|
+
linePadding: number;
|
|
516
|
+
paddingX: number;
|
|
517
|
+
};
|
|
518
|
+
};
|
|
519
|
+
|
|
520
|
+
//#endregion
|
|
521
|
+
//#region src/plugins/nodes-distance-snapping/nodes-distance-snapping.d.ts
|
|
522
|
+
//# sourceMappingURL=types.d.ts.map
|
|
523
|
+
declare class WeaveNodesDistanceSnappingPlugin extends WeavePlugin {
|
|
524
|
+
private readonly uiConfig;
|
|
525
|
+
private readonly enterSnappingTolerance;
|
|
526
|
+
private readonly exitSnappingTolerance;
|
|
527
|
+
private peerDistanceX;
|
|
528
|
+
private peerDistanceY;
|
|
529
|
+
private snapPositionX;
|
|
530
|
+
private snapPositionY;
|
|
531
|
+
private currentSizeSnapHorizontal;
|
|
532
|
+
private currentSizeSnapVertical;
|
|
533
|
+
private referenceLayer;
|
|
534
|
+
onRender: undefined;
|
|
535
|
+
constructor(params?: Partial<WeaveNodesDistanceSnappingPluginParams>);
|
|
536
|
+
getName(): string;
|
|
537
|
+
onInit(): void;
|
|
538
|
+
setEnabled(enabled: boolean): void;
|
|
539
|
+
deleteGuides(): void;
|
|
540
|
+
evaluateGuidelines(e: KonvaEventObject<any>): void;
|
|
541
|
+
private getBoxClientRect;
|
|
542
|
+
private getSelectionParentNode;
|
|
543
|
+
private getPeers;
|
|
544
|
+
private validateHorizontalSnapping;
|
|
545
|
+
private validateVerticalSnapping;
|
|
546
|
+
private setNodeClientRectX;
|
|
547
|
+
private setNodeClientRectY;
|
|
548
|
+
cleanupGuidelines(): void;
|
|
549
|
+
private initEvents;
|
|
550
|
+
private isOverlapping;
|
|
551
|
+
private getVerticallyIntersectingNodes;
|
|
552
|
+
private getHorizontallyIntersectingNodes;
|
|
553
|
+
private drawSizeGuidesHorizontally;
|
|
554
|
+
private drawSizeGuidesVertically;
|
|
555
|
+
private renderDistanceLabel;
|
|
556
|
+
private renderHorizontalLineWithDistanceBetweenNodes;
|
|
557
|
+
private renderVerticalLineWithDistanceBetweenNodes;
|
|
558
|
+
enable(): void;
|
|
559
|
+
disable(): void;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
//#endregion
|
|
563
|
+
//#region src/plugins/stage-grid/constants.d.ts
|
|
564
|
+
//# sourceMappingURL=nodes-distance-snapping.d.ts.map
|
|
565
|
+
declare const WEAVE_STAGE_GRID_PLUGIN_KEY = "stageGrid";
|
|
566
|
+
declare const WEAVE_GRID_TYPES: {
|
|
567
|
+
readonly LINES: "lines";
|
|
568
|
+
readonly DOTS: "dots";
|
|
569
|
+
};
|
|
570
|
+
declare const WEAVE_GRID_DEFAULT_SIZE = 50;
|
|
571
|
+
declare const WEAVE_GRID_DEFAULT_TYPE: string;
|
|
572
|
+
declare const WEAVE_GRID_DEFAULT_COLOR = "rgba(0,0,0,0.1)";
|
|
573
|
+
declare const WEAVE_GRID_DEFAULT_ORIGIN_COLOR = "rgba(255,0,0,0.1)";
|
|
574
|
+
declare const WEAVE_GRID_DEFAULT_STROKE = 0.5;
|
|
575
|
+
declare const WEAVE_GRID_DEFAULT_MAJOR_LINE_RATIO = 4;
|
|
576
|
+
declare const WEAVE_GRID_DEFAULT_RADIUS = 1;
|
|
577
|
+
declare const WEAVE_GRID_DEFAULT_MAJOR_DOT_RATIO = 2;
|
|
578
|
+
declare const WEAVE_GRID_DEFAULT_MAJOR_EVERY = 10;
|
|
579
|
+
declare const WEAVE_GRID_DEFAULT_DOT_MAX_DOTS_PER_AXIS = 250;
|
|
580
|
+
declare const WEAVE_GRID_LAYER_ID = "gridLayer";
|
|
581
|
+
|
|
582
|
+
//#endregion
|
|
583
|
+
//#region src/plugins/stage-grid/types.d.ts
|
|
584
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
585
|
+
type WeaveStageGridPluginConfig = {
|
|
586
|
+
type: WeaveStageGridType;
|
|
587
|
+
gridColor: string;
|
|
588
|
+
gridOriginColor: string;
|
|
589
|
+
gridSize: number;
|
|
590
|
+
gridMajorEvery?: number;
|
|
591
|
+
gridMajorRatio?: number;
|
|
592
|
+
gridStroke?: number;
|
|
593
|
+
gridDotRadius?: number;
|
|
594
|
+
gridDotMaxDotsPerAxis: number;
|
|
595
|
+
};
|
|
596
|
+
type WeaveStageGridPluginParams = {
|
|
597
|
+
config?: Partial<WeaveStageGridPluginConfig>;
|
|
598
|
+
};
|
|
599
|
+
type WeaveStageGridTypeKeys = keyof typeof WEAVE_GRID_TYPES;
|
|
600
|
+
type WeaveStageGridType = (typeof WEAVE_GRID_TYPES)[WeaveStageGridTypeKeys];
|
|
601
|
+
|
|
602
|
+
//#endregion
|
|
603
|
+
//#region src/plugins/stage-grid/stage-grid.d.ts
|
|
604
|
+
//# sourceMappingURL=types.d.ts.map
|
|
605
|
+
declare class WeaveStageGridPlugin extends WeavePlugin {
|
|
606
|
+
private moveToolActive;
|
|
607
|
+
private isMouseMiddleButtonPressed;
|
|
608
|
+
private isSpaceKeyPressed;
|
|
609
|
+
private config;
|
|
610
|
+
constructor(params?: Partial<WeaveStageGridPluginParams>);
|
|
611
|
+
getName(): string;
|
|
612
|
+
getLayerName(): string;
|
|
613
|
+
initLayer(): void;
|
|
614
|
+
onInit(): void;
|
|
615
|
+
private initEvents;
|
|
616
|
+
getLayer(): Konva.Layer | undefined;
|
|
617
|
+
getAdaptiveSpacing(scale: number): number;
|
|
618
|
+
private getAdjustedSpacing;
|
|
619
|
+
private renderGridLines;
|
|
620
|
+
private renderGridDots;
|
|
621
|
+
renderGrid(): void;
|
|
622
|
+
onRender(): void;
|
|
623
|
+
enable(): void;
|
|
624
|
+
disable(): void;
|
|
625
|
+
getType(): WeaveStageGridType;
|
|
626
|
+
setType(type: WeaveStageGridType): void;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
//#endregion
|
|
630
|
+
//#region src/plugins/stage-zoom/constants.d.ts
|
|
631
|
+
//# sourceMappingURL=stage-grid.d.ts.map
|
|
632
|
+
declare const WEAVE_STAGE_ZOOM_TYPE: {
|
|
633
|
+
readonly MOUSE_WHEEL: "mouseWheel";
|
|
634
|
+
readonly PINCH_ZOOM: "pinchZoom";
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
//#endregion
|
|
638
|
+
//#region src/plugins/stage-zoom/types.d.ts
|
|
639
|
+
type WeaveStageZoomTypeKeys = keyof typeof WEAVE_STAGE_ZOOM_TYPE;
|
|
640
|
+
type WeaveStageZoomType = (typeof WEAVE_STAGE_ZOOM_TYPE)[WeaveStageZoomTypeKeys];
|
|
641
|
+
type WeaveStageZoomChanged = {
|
|
642
|
+
scale: number;
|
|
643
|
+
zoomSteps: number[];
|
|
644
|
+
actualStep: number;
|
|
645
|
+
onDefaultStep: boolean;
|
|
646
|
+
canZoomIn: boolean;
|
|
647
|
+
canZoomOut: boolean;
|
|
648
|
+
};
|
|
649
|
+
type WeaveStageZoomPluginOnZoomChangeEvent = WeaveStageZoomChanged;
|
|
650
|
+
type WeaveStageZoomPluginConfig = {
|
|
651
|
+
zoomSteps: number[];
|
|
652
|
+
defaultZoom: number;
|
|
653
|
+
fitToScreen: {
|
|
654
|
+
padding: number;
|
|
655
|
+
};
|
|
656
|
+
fitToSelection: {
|
|
657
|
+
padding: number;
|
|
658
|
+
};
|
|
659
|
+
zoomInertia: {
|
|
660
|
+
friction: number;
|
|
661
|
+
mouseWheelStep: number;
|
|
662
|
+
trackpadStep: number;
|
|
663
|
+
};
|
|
664
|
+
};
|
|
665
|
+
type WeaveStageZoomPluginParams = {
|
|
666
|
+
config?: DeepPartial<WeaveStageZoomPluginConfig>;
|
|
667
|
+
};
|
|
668
|
+
|
|
669
|
+
//#endregion
|
|
670
|
+
//#region src/plugins/stage-zoom/stage-zoom.d.ts
|
|
671
|
+
//# sourceMappingURL=types.d.ts.map
|
|
672
|
+
declare class WeaveStageZoomPlugin extends WeavePlugin {
|
|
673
|
+
private isCtrlOrMetaPressed;
|
|
674
|
+
protected previousPointer: string | null;
|
|
675
|
+
getLayerName: undefined;
|
|
676
|
+
initLayer: undefined;
|
|
677
|
+
onRender: undefined;
|
|
678
|
+
private config;
|
|
679
|
+
private actualScale;
|
|
680
|
+
private actualStep;
|
|
681
|
+
private updatedMinimumZoom;
|
|
682
|
+
private pinching;
|
|
683
|
+
private zooming;
|
|
684
|
+
private isTrackpad;
|
|
685
|
+
private zoomVelocity;
|
|
686
|
+
private zoomInertiaType;
|
|
687
|
+
defaultStep: number;
|
|
688
|
+
constructor(params?: WeaveStageZoomPluginParams);
|
|
689
|
+
getName(): string;
|
|
690
|
+
onInit(): void;
|
|
691
|
+
private setZoom;
|
|
692
|
+
canZoomOut(): boolean;
|
|
693
|
+
canZoomIn(): boolean;
|
|
694
|
+
zoomToStep(step: number): void;
|
|
695
|
+
private findClosestStepIndex;
|
|
696
|
+
zoomIn(pointer?: Konva.Vector2d): void;
|
|
697
|
+
zoomOut(pointer?: Konva.Vector2d): void;
|
|
698
|
+
minimumZoom(): number;
|
|
699
|
+
fitToScreen(): void;
|
|
700
|
+
fitToSelection(smartZoom?: boolean): void;
|
|
701
|
+
enable(): void;
|
|
702
|
+
disable(): void;
|
|
703
|
+
getDistance(p1: Konva.Vector2d, p2: Konva.Vector2d): number;
|
|
704
|
+
getCenter(p1: Konva.Vector2d, p2: Konva.Vector2d): {
|
|
705
|
+
x: number;
|
|
706
|
+
y: number;
|
|
707
|
+
};
|
|
708
|
+
private initEvents;
|
|
709
|
+
getInertiaScale(): number;
|
|
710
|
+
zoomTick(): void;
|
|
711
|
+
isPinching(): boolean;
|
|
712
|
+
getStageGridPlugin(): WeaveStageGridPlugin | undefined;
|
|
713
|
+
getNodesSelectionPlugin(): WeaveNodesSelectionPlugin | undefined;
|
|
714
|
+
getContextMenuPlugin(): WeaveContextMenuPlugin | undefined;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
//#endregion
|
|
718
|
+
//#region src/plugins/stage-panning/types.d.ts
|
|
719
|
+
//# sourceMappingURL=stage-zoom.d.ts.map
|
|
720
|
+
type WeaveStagePanningPluginParams = {
|
|
721
|
+
config?: Partial<WeaveStagePanningPluginConfig>;
|
|
722
|
+
};
|
|
723
|
+
type WeaveStagePanningPluginConfig = {
|
|
724
|
+
edgePanOffset: number;
|
|
725
|
+
edgePanSpeed: number;
|
|
726
|
+
};
|
|
727
|
+
|
|
728
|
+
//#endregion
|
|
729
|
+
//#region src/plugins/stage-panning/stage-panning.d.ts
|
|
730
|
+
//# sourceMappingURL=types.d.ts.map
|
|
731
|
+
|
|
732
|
+
declare class WeaveStagePanningPlugin extends WeavePlugin {
|
|
733
|
+
private readonly config;
|
|
734
|
+
private moveToolActive;
|
|
735
|
+
private isMouseLeftButtonPressed;
|
|
736
|
+
private isMouseMiddleButtonPressed;
|
|
737
|
+
private isCtrlOrMetaPressed;
|
|
738
|
+
private isDragging;
|
|
739
|
+
private enableMove;
|
|
740
|
+
private isSpaceKeyPressed;
|
|
741
|
+
private pointers;
|
|
742
|
+
private panning;
|
|
743
|
+
protected previousPointer: string | null;
|
|
744
|
+
protected currentPointer: Konva.Vector2d | null;
|
|
745
|
+
protected stageScrollInterval: NodeJS.Timeout | undefined;
|
|
746
|
+
protected targetScrollIntervals: Record<string, NodeJS.Timeout | undefined>;
|
|
747
|
+
getLayerName: undefined;
|
|
748
|
+
initLayer: undefined;
|
|
749
|
+
onRender: undefined;
|
|
750
|
+
constructor(params?: WeaveStagePanningPluginParams);
|
|
751
|
+
getName(): string;
|
|
752
|
+
onInit(): void;
|
|
753
|
+
private setCursor;
|
|
754
|
+
private disableMove;
|
|
755
|
+
private initEvents;
|
|
756
|
+
isPanning(): boolean;
|
|
757
|
+
getDistance(p1: Konva.Vector2d, p2: Konva.Vector2d): number;
|
|
758
|
+
getTouchCenter(): {
|
|
759
|
+
x: number;
|
|
760
|
+
y: number;
|
|
761
|
+
} | null;
|
|
762
|
+
getZoomPlugin(): WeaveStageZoomPlugin | undefined;
|
|
763
|
+
getContextMenuPlugin(): WeaveContextMenuPlugin | undefined;
|
|
764
|
+
getNodesSelectionPlugin(): WeaveNodesSelectionPlugin | undefined;
|
|
765
|
+
getNodesEdgeSnappingPlugin(): WeaveNodesEdgeSnappingPlugin | undefined;
|
|
766
|
+
getNodesDistanceSnappingPlugin(): WeaveNodesDistanceSnappingPlugin | undefined;
|
|
767
|
+
getStageGridPlugin(): WeaveStageGridPlugin | undefined;
|
|
768
|
+
getCurrentPointer(): konva_lib_types6.Vector2d | null;
|
|
769
|
+
cleanupEdgeMoveIntervals(): void;
|
|
770
|
+
enable(): void;
|
|
771
|
+
disable(): void;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
//#endregion
|
|
775
|
+
//#region src/plugins/nodes-selection/nodes-selection.d.ts
|
|
776
|
+
//# sourceMappingURL=stage-panning.d.ts.map
|
|
777
|
+
declare class WeaveNodesSelectionPlugin extends WeavePlugin {
|
|
778
|
+
private tr;
|
|
779
|
+
private trHover;
|
|
780
|
+
private config;
|
|
781
|
+
private selectionRectangle;
|
|
782
|
+
private active;
|
|
783
|
+
private defaultEnabledAnchors;
|
|
784
|
+
private selecting;
|
|
785
|
+
private didMove;
|
|
786
|
+
private initialized;
|
|
787
|
+
private isSpaceKeyPressed;
|
|
788
|
+
protected taps: number;
|
|
789
|
+
protected isDoubleTap: boolean;
|
|
790
|
+
protected tapStart: {
|
|
791
|
+
x: number;
|
|
792
|
+
y: number;
|
|
793
|
+
time: number;
|
|
794
|
+
} | null;
|
|
795
|
+
protected lastTapTime: number;
|
|
796
|
+
private x1;
|
|
797
|
+
private y1;
|
|
798
|
+
private x2;
|
|
799
|
+
private y2;
|
|
800
|
+
private selectionStart;
|
|
801
|
+
private panSpeed;
|
|
802
|
+
private readonly panDirection;
|
|
803
|
+
private pointers;
|
|
804
|
+
private panLoopId;
|
|
805
|
+
onRender: undefined;
|
|
806
|
+
constructor(params?: WeaveNodesSelectionPluginParams);
|
|
807
|
+
getName(): string;
|
|
808
|
+
getLayerName(): string;
|
|
809
|
+
initLayer(): void;
|
|
810
|
+
isPasting(): boolean;
|
|
811
|
+
isAreaSelecting(): boolean;
|
|
812
|
+
isSelecting(): boolean;
|
|
813
|
+
isNodeSelected(ele: Konva.Node): boolean;
|
|
814
|
+
onInit(): void;
|
|
815
|
+
private getLayer;
|
|
816
|
+
triggerSelectedNodesEvent(): void;
|
|
817
|
+
removeSelectedNodes(): void;
|
|
818
|
+
private updateSelectionRect;
|
|
819
|
+
private getSpeedFromEdge;
|
|
820
|
+
private updatePanDirection;
|
|
821
|
+
private stopPanLoop;
|
|
822
|
+
private panLoop;
|
|
823
|
+
private setTapStart;
|
|
824
|
+
private checkMovedDrag;
|
|
825
|
+
private checkMoved;
|
|
826
|
+
private checkDoubleTap;
|
|
827
|
+
private hideSelectorArea;
|
|
828
|
+
private initEvents;
|
|
829
|
+
private handleMultipleSelectionBehavior;
|
|
830
|
+
protected syncSelection(): void;
|
|
831
|
+
protected getSelectionPlugin(): WeaveNodesSelectionPlugin | undefined;
|
|
832
|
+
protected hideHoverState(): void;
|
|
833
|
+
handleClickOrTap(e: KonvaEventObject<PointerEvent, Stage>): void;
|
|
834
|
+
getTransformer(): Konva.Transformer;
|
|
835
|
+
getHoverTransformer(): Konva.Transformer;
|
|
836
|
+
handleBehaviors(): void;
|
|
837
|
+
setSelectedNodes(nodes: Konva.Node[]): void;
|
|
838
|
+
getSelectedNodes(): (Konva.Group | Konva.Shape)[];
|
|
839
|
+
getSelectedNodesExtended(): WeaveSelection[];
|
|
840
|
+
selectAll(): void;
|
|
841
|
+
selectNone(): void;
|
|
842
|
+
enable(): void;
|
|
843
|
+
disable(): void;
|
|
844
|
+
getContextMenuPlugin(): WeaveContextMenuPlugin | undefined;
|
|
845
|
+
getStageGridPlugin(): WeaveStageGridPlugin | undefined;
|
|
846
|
+
getNodesEdgeSnappingPlugin(): WeaveNodesEdgeSnappingPlugin | undefined;
|
|
847
|
+
getNodesDistanceSnappingPlugin(): WeaveNodesDistanceSnappingPlugin | undefined;
|
|
848
|
+
getStagePanningPlugin(): WeaveStagePanningPlugin | undefined;
|
|
849
|
+
getSelectorConfig(): TransformerConfig;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
//#endregion
|
|
853
|
+
//#region src/nodes/node.d.ts
|
|
854
|
+
//# sourceMappingURL=nodes-selection.d.ts.map
|
|
855
|
+
declare abstract class WeaveNode implements WeaveNodeBase {
|
|
856
|
+
protected instance: Weave;
|
|
857
|
+
protected nodeType: string;
|
|
858
|
+
protected didMove: boolean;
|
|
859
|
+
private logger;
|
|
860
|
+
protected previousPointer: string | null;
|
|
861
|
+
register(instance: Weave): WeaveNode;
|
|
862
|
+
getNodeType(): string;
|
|
863
|
+
getLogger(): Logger;
|
|
864
|
+
getSelectionPlugin(): WeaveNodesSelectionPlugin | undefined;
|
|
865
|
+
isSelecting(): boolean;
|
|
866
|
+
isPasting(): boolean;
|
|
867
|
+
setupDefaultNodeAugmentation(node: Konva.Node): void;
|
|
868
|
+
isNodeSelected(ele: Konva.Node): boolean;
|
|
869
|
+
scaleReset(node: Konva.Node): void;
|
|
870
|
+
protected setHoverState(node: Konva.Node): void;
|
|
871
|
+
protected hideHoverState(): void;
|
|
872
|
+
setupDefaultNodeEvents(node: Konva.Node): void;
|
|
873
|
+
handleMouseOver(node: Konva.Node): boolean;
|
|
874
|
+
handleMouseout(node: Konva.Node): void;
|
|
875
|
+
create(key: string, props: WeaveElementAttributes): WeaveStateElement;
|
|
876
|
+
onAdd(nodeInstance: WeaveElementInstance): void;
|
|
877
|
+
abstract onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
878
|
+
abstract onUpdate(instance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
879
|
+
onDestroy(nodeInstance: WeaveElementInstance): void;
|
|
880
|
+
serialize(instance: WeaveElementInstance): WeaveStateElement;
|
|
881
|
+
show(instance: Konva.Node): void;
|
|
882
|
+
hide(instance: Konva.Node): void;
|
|
883
|
+
isVisible(instance: Konva.Node): boolean;
|
|
884
|
+
lock(instance: Konva.Node): void;
|
|
885
|
+
unlock(instance: Konva.Node): void;
|
|
886
|
+
isLocked(instance: Konva.Node): boolean;
|
|
887
|
+
protected defaultGetTransformerProperties(nodeTransformConfig?: any): any;
|
|
888
|
+
private getNodesSelectionPlugin;
|
|
889
|
+
getNodesEdgeSnappingPlugin(): WeaveNodesEdgeSnappingPlugin | undefined;
|
|
890
|
+
getNodesDistanceSnappingPlugin(): WeaveNodesDistanceSnappingPlugin | undefined;
|
|
891
|
+
realOffset(instance: WeaveStateElement): Konva.Vector2d;
|
|
892
|
+
private getRealSelectedNode;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
//#endregion
|
|
896
|
+
//#region src/actions/action.d.ts
|
|
897
|
+
//# sourceMappingURL=node.d.ts.map
|
|
898
|
+
declare abstract class WeaveAction implements WeaveActionBase {
|
|
899
|
+
protected instance: Weave;
|
|
900
|
+
protected name: string;
|
|
901
|
+
protected tapStart: {
|
|
902
|
+
x: number;
|
|
903
|
+
y: number;
|
|
904
|
+
time: number;
|
|
905
|
+
} | null;
|
|
906
|
+
props: WeaveElementAttributes;
|
|
907
|
+
private logger;
|
|
908
|
+
constructor();
|
|
909
|
+
getName(): string;
|
|
910
|
+
getLogger(): Logger;
|
|
911
|
+
register(instance: Weave): WeaveAction;
|
|
912
|
+
updateProps(props: WeaveElementAttributes): void;
|
|
913
|
+
getProps(): WeaveElementAttributes;
|
|
914
|
+
isPressed(e: KonvaEventObject<PointerEvent, Konva.Stage>): boolean;
|
|
915
|
+
setTapStart(e: KonvaEventObject<PointerEvent, Konva.Stage>): void;
|
|
916
|
+
isTap(e: KonvaEventObject<PointerEvent, Konva.Stage>): boolean;
|
|
917
|
+
abstract onInit?(): void;
|
|
918
|
+
abstract trigger(cancelAction: () => void, params?: unknown): unknown;
|
|
919
|
+
abstract onPropsChange?(): void;
|
|
920
|
+
abstract cleanup?(): void;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
//#endregion
|
|
924
|
+
//#region src/logger/logger.d.ts
|
|
925
|
+
//# sourceMappingURL=action.d.ts.map
|
|
926
|
+
declare class WeaveLogger {
|
|
927
|
+
private config;
|
|
928
|
+
private disabled;
|
|
929
|
+
private logger;
|
|
930
|
+
constructor(config: WeaveLoggerConfig);
|
|
931
|
+
private log;
|
|
932
|
+
getDisabled(): boolean;
|
|
933
|
+
getLevel(): pino.LevelWithSilentOrString;
|
|
934
|
+
getLogger(): Logger;
|
|
935
|
+
getChildLogger(name: string): pino.Logger<never, boolean>;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
//#endregion
|
|
939
|
+
//#region src/managers/cloning.d.ts
|
|
940
|
+
//# sourceMappingURL=logger.d.ts.map
|
|
941
|
+
declare class WeaveCloningManager {
|
|
942
|
+
private instance;
|
|
943
|
+
private logger;
|
|
944
|
+
private clones;
|
|
945
|
+
constructor(instance: Weave);
|
|
946
|
+
nodesToGroupSerialized(instancesToClone: Konva.Node[]): {
|
|
947
|
+
serializedNodes: WeaveStateElement[];
|
|
948
|
+
minPoint: Konva.Vector2d;
|
|
949
|
+
} | undefined;
|
|
950
|
+
cloneNodes(instancesToClone: Konva.Node[], targetContainer: Konva.Group | Konva.Layer | undefined, onPoint: Konva.Vector2d): void;
|
|
951
|
+
private recursivelyUpdateKeys;
|
|
952
|
+
cloneNode(targetNode: Konva.Node): Konva.Node | undefined;
|
|
953
|
+
addClone(node: Konva.Node): void;
|
|
954
|
+
removeClone(node: Konva.Node): void;
|
|
955
|
+
getClones(): konva_lib_Node9.Node<konva_lib_Node8.NodeConfig>[];
|
|
956
|
+
isClone(node: Konva.Node): konva_lib_Node11.Node<konva_lib_Node10.NodeConfig> | undefined;
|
|
957
|
+
cleanupClones(): void;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
//#endregion
|
|
961
|
+
//#region src/managers/register.d.ts
|
|
962
|
+
//# sourceMappingURL=cloning.d.ts.map
|
|
963
|
+
declare class WeaveRegisterManager {
|
|
964
|
+
private instance;
|
|
965
|
+
private nodesHandlers;
|
|
966
|
+
private actionsHandlers;
|
|
967
|
+
private plugins;
|
|
968
|
+
private logger;
|
|
969
|
+
constructor(instance: Weave);
|
|
970
|
+
getPlugins(): Record<string, WeavePlugin>;
|
|
971
|
+
getNodesHandlers(): Record<string, WeaveNode>;
|
|
972
|
+
getActionsHandlers(): Record<string, WeaveAction>;
|
|
973
|
+
getPlugin<T>(pluginName: string): T | undefined;
|
|
974
|
+
getActionHandler<T>(actionName: string): T | undefined;
|
|
975
|
+
getNodeHandler<T>(nodeType: string): T | undefined;
|
|
976
|
+
registerPlugins(): void;
|
|
977
|
+
registerPlugin(plugin: WeavePlugin): void;
|
|
978
|
+
registerNodesHandlers(): void;
|
|
979
|
+
registerNodeHandler(node: WeaveNode): void;
|
|
980
|
+
registerActionsHandlers(): void;
|
|
981
|
+
registerActionHandler(action: WeaveAction): void;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
//#endregion
|
|
985
|
+
//#region src/managers/stage.d.ts
|
|
986
|
+
//# sourceMappingURL=register.d.ts.map
|
|
987
|
+
declare class WeaveStageManager {
|
|
988
|
+
private instance;
|
|
989
|
+
private logger;
|
|
990
|
+
private stage;
|
|
991
|
+
private config;
|
|
992
|
+
constructor(instance: Weave, config: Konva.StageConfig);
|
|
993
|
+
getConfiguration(): StageConfig;
|
|
994
|
+
setStage(stage: Konva.Stage): void;
|
|
995
|
+
getStage(): Konva.Stage;
|
|
996
|
+
getMainLayer(): Konva.Layer | undefined;
|
|
997
|
+
getSelectionLayer(): Konva.Layer | undefined;
|
|
998
|
+
getCommentsLayer(): Konva.Layer | undefined;
|
|
999
|
+
getGridLayer(): Konva.Layer | undefined;
|
|
1000
|
+
getUtilityLayer(): Konva.Layer | undefined;
|
|
1001
|
+
getInstanceRecursive(instance: Konva.Node, filterInstanceType?: string[]): Konva.Node;
|
|
1002
|
+
initStage(): void;
|
|
1003
|
+
getContainerNodes(): WeaveElementInstance[];
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
//#endregion
|
|
1007
|
+
//#region src/types.d.ts
|
|
1008
|
+
//# sourceMappingURL=stage.d.ts.map
|
|
1009
|
+
type DOMElement = HTMLElement | Element | null;
|
|
1010
|
+
|
|
1011
|
+
//#endregion
|
|
1012
|
+
//#region src/weave.d.ts
|
|
1013
|
+
declare class Weave {
|
|
1014
|
+
private id;
|
|
1015
|
+
private emitter;
|
|
1016
|
+
private config;
|
|
1017
|
+
private logger;
|
|
1018
|
+
private moduleLogger;
|
|
1019
|
+
private reconciler;
|
|
1020
|
+
private stateSerializer;
|
|
1021
|
+
private renderer;
|
|
1022
|
+
private initialized;
|
|
1023
|
+
private status;
|
|
1024
|
+
private setupManager;
|
|
1025
|
+
private registerManager;
|
|
1026
|
+
private stateManager;
|
|
1027
|
+
private storeManager;
|
|
1028
|
+
private stageManager;
|
|
1029
|
+
private groupsManager;
|
|
1030
|
+
private targetingManager;
|
|
1031
|
+
private cloningManager;
|
|
1032
|
+
private fontsManager;
|
|
1033
|
+
private zIndexManager;
|
|
1034
|
+
private pluginsManager;
|
|
1035
|
+
private actionsManager;
|
|
1036
|
+
private exportManager;
|
|
1037
|
+
private readonly asyncElements;
|
|
1038
|
+
constructor(weaveConfig: WeaveConfig, stageConfig: Konva.StageConfig);
|
|
1039
|
+
setupRenderer(): void;
|
|
1040
|
+
setStatus(status: WeaveStatus): void;
|
|
1041
|
+
getStatus(): WeaveStatus;
|
|
1042
|
+
setStore(store: WeaveStore): void;
|
|
1043
|
+
private handleStoreConnectionStatusChange;
|
|
1044
|
+
start(): Promise<void>;
|
|
1045
|
+
destroy(): void;
|
|
1046
|
+
getId(): string;
|
|
1047
|
+
getConfiguration(): WeaveConfig;
|
|
1048
|
+
augmentKonvaStageClass(): void;
|
|
1049
|
+
augmentKonvaNodeClass(config?: WeaveNodeConfiguration): void;
|
|
1050
|
+
emitEvent<T>(event: string, payload?: T): void;
|
|
1051
|
+
addEventListener<T>(event: string, callback: (payload: T) => void): void;
|
|
1052
|
+
removeEventListener<T>(event: string, callback: (payload: T) => void): void;
|
|
1053
|
+
getLogger(): WeaveLogger;
|
|
1054
|
+
getMainLogger(): Logger;
|
|
1055
|
+
getChildLogger(name: string): pino.Logger<never, boolean>;
|
|
1056
|
+
getStageManager(): WeaveStageManager;
|
|
1057
|
+
getStage(): Konva.Stage;
|
|
1058
|
+
getMainLayer(): Konva.Layer | undefined;
|
|
1059
|
+
getSelectionLayer(): Konva.Layer | undefined;
|
|
1060
|
+
getCommentsLayer(): Konva.Layer | undefined;
|
|
1061
|
+
getGridLayer(): Konva.Layer | undefined;
|
|
1062
|
+
getUtilityLayer(): Konva.Layer | undefined;
|
|
1063
|
+
setStage(stage: Konva.Stage): void;
|
|
1064
|
+
getStageConfiguration(): StageConfig;
|
|
1065
|
+
getInstanceRecursive(instance: Konva.Node, filterInstanceType?: string[]): Konva.Node;
|
|
1066
|
+
getContainerNodes(): WeaveElementInstance[];
|
|
1067
|
+
getClosestParentWithWeaveId(el: DOMElement): DOMElement;
|
|
1068
|
+
getRegisterManager(): WeaveRegisterManager;
|
|
1069
|
+
getPlugins(): Record<string, WeavePlugin>;
|
|
1070
|
+
getPlugin<T>(pluginName: string): T | undefined;
|
|
1071
|
+
getNodesHandlers(): Record<string, WeaveNode>;
|
|
1072
|
+
getNodeHandler<T>(nodeType: string): T | undefined;
|
|
1073
|
+
getActionsHandlers(): Record<string, WeaveAction>;
|
|
1074
|
+
getActionHandler<T>(actionName: string): T | undefined;
|
|
1075
|
+
getStore<T extends WeaveStore>(): T;
|
|
1076
|
+
registerPlugin(plugin: WeavePlugin): void;
|
|
1077
|
+
registerNodeHandler(node: WeaveNode): void;
|
|
1078
|
+
registerActionHandler(action: WeaveAction): void;
|
|
1079
|
+
registerStore(store: WeaveStore): void;
|
|
1080
|
+
isPluginEnabled(pluginName: string): boolean;
|
|
1081
|
+
enablePlugin(pluginName: string): void;
|
|
1082
|
+
disablePlugin(pluginName: string): void;
|
|
1083
|
+
getActiveAction(): string | undefined;
|
|
1084
|
+
triggerAction<T, P>(actionName: string, params?: T): P;
|
|
1085
|
+
getPropsAction(actionName: string): WeaveElementAttributes;
|
|
1086
|
+
updatePropsAction(actionName: string, params: WeaveElementAttributes): void;
|
|
1087
|
+
cancelAction(actionName: string): void;
|
|
1088
|
+
update(newState: WeaveState): void;
|
|
1089
|
+
render(): void;
|
|
1090
|
+
findNodeById(tree: WeaveStateElement, key: string, parent?: WeaveStateElement | null, index?: number): WeaveNodeFound;
|
|
1091
|
+
findNodesByType(tree: WeaveStateElement, nodeType: string): WeaveStateElement[];
|
|
1092
|
+
getNode(nodeKey: string): {
|
|
1093
|
+
node: WeaveStateElement | null;
|
|
1094
|
+
parent: WeaveStateElement | null;
|
|
1095
|
+
index: number;
|
|
1096
|
+
};
|
|
1097
|
+
addNode(node: WeaveStateElement, parentId?: string, index?: number | undefined): void;
|
|
1098
|
+
updateNode(node: WeaveStateElement): void;
|
|
1099
|
+
updateNodes(nodes: WeaveStateElement[]): void;
|
|
1100
|
+
removeNode(node: WeaveStateElement): void;
|
|
1101
|
+
removeNodes(nodes: WeaveStateElement[]): void;
|
|
1102
|
+
moveNode(node: WeaveStateElement, position: WeavePosition): void;
|
|
1103
|
+
getElementsTree(): WeaveStateElement[];
|
|
1104
|
+
isEmpty(): boolean;
|
|
1105
|
+
getNodeContainerId(node: WeaveElementInstance | Konva.Node): string;
|
|
1106
|
+
getNodeContainer(node: WeaveElementInstance | Konva.Node): Konva.Node | null;
|
|
1107
|
+
getBoundingBox(nodes: Konva.Node[], config?: {
|
|
1108
|
+
skipTransform?: boolean;
|
|
1109
|
+
skipShadow?: boolean;
|
|
1110
|
+
skipStroke?: boolean;
|
|
1111
|
+
relativeTo?: Konva.Container;
|
|
1112
|
+
} | undefined): {
|
|
1113
|
+
x: number;
|
|
1114
|
+
y: number;
|
|
1115
|
+
width: number;
|
|
1116
|
+
height: number;
|
|
1117
|
+
};
|
|
1118
|
+
moveUp(node: WeaveElementInstance): void;
|
|
1119
|
+
moveDown(node: WeaveElementInstance): void;
|
|
1120
|
+
sendToBack(nodes: WeaveElementInstance | WeaveElementInstance[]): void;
|
|
1121
|
+
bringToFront(nodes: WeaveElementInstance | WeaveElementInstance[]): void;
|
|
1122
|
+
group(nodes: WeaveStateElement[]): void;
|
|
1123
|
+
unGroup(group: WeaveStateElement): void;
|
|
1124
|
+
resolveNode(node: Konva.Node): WeaveElementInstance | undefined;
|
|
1125
|
+
pointIntersectsElement(point?: Konva.Vector2d): Konva.Node | null;
|
|
1126
|
+
nodeIntersectsContainerElement(node: Konva.Node | Konva.Transformer, actualLayer?: Konva.Layer | Konva.Group): Konva.Node | undefined;
|
|
1127
|
+
getMousePointer(point?: Konva.Vector2d): WeaveMousePointInfo;
|
|
1128
|
+
getMousePointerRelativeToContainer(container: Konva.Node | Konva.Layer): WeaveMousePointInfoSimple;
|
|
1129
|
+
selectNodesByKey(nodesIds: string[]): void;
|
|
1130
|
+
getCloningManager(): WeaveCloningManager;
|
|
1131
|
+
nodesToGroupSerialized(instancesToClone: Konva.Node[]): WeaveSerializedGroup;
|
|
1132
|
+
cloneNodes(instancesToClone: Konva.Node[], targetContainer: Konva.Layer | Konva.Group | undefined, onPoint: Konva.Vector2d): void;
|
|
1133
|
+
getFonts(): WeaveFont[];
|
|
1134
|
+
imageToBase64(img: HTMLImageElement, mimeType: string): string;
|
|
1135
|
+
exportNodes(nodes: WeaveElementInstance[], boundingNodes: (nodes: Konva.Node[]) => Konva.Node[], options: WeaveExportNodesOptions): Promise<HTMLImageElement>;
|
|
1136
|
+
exportNodesServerSide(nodes: string[], boundingNodes: (nodes: Konva.Node[]) => Konva.Node[], options: WeaveExportNodesOptions): Promise<{
|
|
1137
|
+
composites: {
|
|
1138
|
+
input: Buffer;
|
|
1139
|
+
left: number;
|
|
1140
|
+
top: number;
|
|
1141
|
+
}[];
|
|
1142
|
+
width: number;
|
|
1143
|
+
height: number;
|
|
1144
|
+
}>;
|
|
1145
|
+
allNodesLocked(nodes: Konva.Node[]): boolean;
|
|
1146
|
+
allNodesUnlocked(nodes: Konva.Node[]): boolean;
|
|
1147
|
+
lockNode(node: Konva.Node): void;
|
|
1148
|
+
lockNodes(nodes: Konva.Node[]): void;
|
|
1149
|
+
unlockNode(node: Konva.Node): void;
|
|
1150
|
+
unlockNodes(nodes: Konva.Node[]): void;
|
|
1151
|
+
allNodesVisible(nodes: Konva.Node[]): boolean;
|
|
1152
|
+
allNodesHidden(nodes: Konva.Node[]): boolean;
|
|
1153
|
+
hideNode(node: Konva.Node): void;
|
|
1154
|
+
hideNodes(nodes: Konva.Node[]): void;
|
|
1155
|
+
showNode(node: Konva.Node): void;
|
|
1156
|
+
showNodes(nodes: Konva.Node[]): void;
|
|
1157
|
+
asyncElementsLoaded(): boolean;
|
|
1158
|
+
loadAsyncElement(nodeId: string, type: string): void;
|
|
1159
|
+
resolveAsyncElement(nodeId: string, type: string): void;
|
|
1160
|
+
isServerSide(): boolean;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
//#endregion
|
|
1164
|
+
//#region src/stores/types.d.ts
|
|
1165
|
+
//# sourceMappingURL=weave.d.ts.map
|
|
1166
|
+
type WeaveStoreOnStateChangeEvent = WeaveState;
|
|
1167
|
+
type WeaveStoreOnRoomLoadedEvent = boolean;
|
|
1168
|
+
type WeaveStoreOnUndoRedoChangeEvent = WeaveUndoRedoChange;
|
|
1169
|
+
type WeaveStoreOnNodeChangeEvent = WeaveSelection;
|
|
1170
|
+
|
|
1171
|
+
//#endregion
|
|
1172
|
+
//#region src/actions/types.d.ts
|
|
1173
|
+
//# sourceMappingURL=types.d.ts.map
|
|
1174
|
+
type WeaveActionPropsChangeEvent = {
|
|
1175
|
+
instance: WeaveAction;
|
|
1176
|
+
props: WeaveElementAttributes;
|
|
1177
|
+
};
|
|
1178
|
+
|
|
1179
|
+
//#endregion
|
|
1180
|
+
//#region src/utils.d.ts
|
|
1181
|
+
//# sourceMappingURL=types.d.ts.map
|
|
1182
|
+
declare function resetScale(node: Konva.Node): void;
|
|
1183
|
+
declare function clearContainerTargets(instance: Weave): void;
|
|
1184
|
+
declare function containerOverCursor(instance: Weave, ignoreNodes: Konva.Node[], definedCursorPosition?: Konva.Vector2d): Konva.Node | undefined;
|
|
1185
|
+
declare function moveNodeToContainer(instance: Weave, node: Konva.Node, containerToMove: Konva.Layer | Konva.Node, invalidOriginsTypes?: string[]): boolean;
|
|
1186
|
+
declare function getExportBoundingBox(nodes: Konva.Node[]): {
|
|
1187
|
+
x: number;
|
|
1188
|
+
y: number;
|
|
1189
|
+
width: number;
|
|
1190
|
+
height: number;
|
|
1191
|
+
};
|
|
1192
|
+
declare function getBoundingBox(nodes: Konva.Node[], config?: {
|
|
1193
|
+
skipTransform?: boolean;
|
|
1194
|
+
skipShadow?: boolean;
|
|
1195
|
+
skipStroke?: boolean;
|
|
1196
|
+
relativeTo?: Konva.Container;
|
|
1197
|
+
} | undefined): {
|
|
1198
|
+
x: number;
|
|
1199
|
+
y: number;
|
|
1200
|
+
width: number;
|
|
1201
|
+
height: number;
|
|
1202
|
+
};
|
|
1203
|
+
declare function getTargetedNode(instance: Weave): Konva.Node | undefined;
|
|
1204
|
+
declare function hasImages(node: Konva.Node): boolean;
|
|
1205
|
+
declare function hasFrames(node: Konva.Node): boolean;
|
|
1206
|
+
declare function intersectArrays<T>(arrays: T[][]): T[];
|
|
1207
|
+
declare function isNodeInSelection(node: Konva.Node, nodes: Konva.Node[]): boolean;
|
|
1208
|
+
declare function containsNodeDeep(nodes: Konva.Node[], target: Konva.Node): boolean;
|
|
1209
|
+
declare function getSelectedNodesMetadata(transformer: Konva.Transformer): {
|
|
1210
|
+
width: number;
|
|
1211
|
+
height: number;
|
|
1212
|
+
nodes: string[];
|
|
1213
|
+
};
|
|
1214
|
+
declare function getTargetAndSkipNodes(instance: Weave, e: KonvaEventObject<any, any>, forceTransformer?: boolean): {
|
|
1215
|
+
targetNode: konva_lib_shapes_Transformer0.Transformer | konva_lib_Node2.Node<konva_lib_Node1.NodeConfig> | undefined;
|
|
1216
|
+
skipNodes: string[];
|
|
1217
|
+
};
|
|
1218
|
+
declare function getVisibleNodesInViewport(stage: Konva.Stage, referenceLayer: Konva.Layer | Konva.Group | undefined): konva_lib_Node4.Node<konva_lib_Node3.NodeConfig>[];
|
|
1219
|
+
declare function isInShadowDOM(el: DOMElement): boolean;
|
|
1220
|
+
declare function getTopmostShadowHost(el: DOMElement): ShadowRoot | null;
|
|
1221
|
+
declare function getVisibleNodes(instance: Weave, stage: Konva.Stage, nodeParent: Konva.Node, skipNodes: string[], referenceLayer: Konva.Layer | Konva.Group): Konva.Node[];
|
|
1222
|
+
declare function memoize<T extends (...args: any[]) => any>(fn: T): T;
|
|
1223
|
+
declare function isIOS(): boolean;
|
|
1224
|
+
declare const isServer: () => boolean;
|
|
1225
|
+
declare const getPositionRelativeToContainerOnPosition: (instance: Weave) => Konva.Vector2d | null | undefined;
|
|
1226
|
+
declare const canComposite: (node: Konva.Node) => boolean | null;
|
|
1227
|
+
declare function mergeExceptArrays<TObject, TSource>(object: TObject, source: TSource): TObject & TSource;
|
|
1228
|
+
|
|
1229
|
+
//#endregion
|
|
1230
|
+
//#region src/managers/export/types.d.ts
|
|
1231
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
1232
|
+
type CanvasFontDefinition = {
|
|
1233
|
+
path: string;
|
|
1234
|
+
properties: {
|
|
1235
|
+
family: string;
|
|
1236
|
+
weight?: string;
|
|
1237
|
+
style?: string;
|
|
1238
|
+
};
|
|
1239
|
+
};
|
|
1240
|
+
type CanvasFonts = CanvasFontDefinition[];
|
|
1241
|
+
type SkiaFontDefinition = {
|
|
1242
|
+
family: string;
|
|
1243
|
+
paths: string[];
|
|
1244
|
+
};
|
|
1245
|
+
type SkiaFonts = SkiaFontDefinition[];
|
|
1246
|
+
type RenderWeaveRoom = {
|
|
1247
|
+
instance: Weave;
|
|
1248
|
+
destroy: () => void;
|
|
1249
|
+
};
|
|
1250
|
+
|
|
1251
|
+
//#endregion
|
|
1252
|
+
//#region src/managers/export/utils.node.d.ts
|
|
1253
|
+
//# sourceMappingURL=types.d.ts.map
|
|
1254
|
+
declare const registerCanvasFonts: (fonts: CanvasFonts) => void;
|
|
1255
|
+
declare const registerSkiaFonts: (fonts: SkiaFonts) => void;
|
|
1256
|
+
|
|
1257
|
+
//#endregion
|
|
1258
|
+
//#region src/nodes/stage/stage.d.ts
|
|
1259
|
+
//# sourceMappingURL=utils.node.d.ts.map
|
|
1260
|
+
declare class WeaveStageNode extends WeaveNode {
|
|
1261
|
+
protected nodeType: string;
|
|
1262
|
+
protected stageFocused: boolean;
|
|
1263
|
+
protected wheelMousePressed: boolean;
|
|
1264
|
+
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1265
|
+
onUpdate(): void;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
//#endregion
|
|
1269
|
+
//#region src/nodes/stage/constants.d.ts
|
|
1270
|
+
//# sourceMappingURL=stage.d.ts.map
|
|
1271
|
+
declare const WEAVE_STAGE_NODE_TYPE = "stage";
|
|
1272
|
+
declare const WEAVE_STAGE_DEFAULT_MODE = "default";
|
|
1273
|
+
|
|
1274
|
+
//#endregion
|
|
1275
|
+
//#region src/nodes/layer/layer.d.ts
|
|
1276
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
1277
|
+
declare class WeaveLayerNode extends WeaveNode {
|
|
1278
|
+
protected nodeType: string;
|
|
1279
|
+
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1280
|
+
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1281
|
+
serialize(instance: WeaveElementInstance): WeaveStateElement;
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
//#endregion
|
|
1285
|
+
//#region src/nodes/layer/constants.d.ts
|
|
1286
|
+
//# sourceMappingURL=layer.d.ts.map
|
|
1287
|
+
declare const WEAVE_LAYER_NODE_TYPE = "layer";
|
|
1288
|
+
|
|
1289
|
+
//#endregion
|
|
1290
|
+
//#region src/nodes/group/types.d.ts
|
|
1291
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
1292
|
+
type WeaveGroupProperties = {
|
|
1293
|
+
transform: WeaveNodeTransformerProperties;
|
|
1294
|
+
};
|
|
1295
|
+
type WeaveGroupNodeParams = {
|
|
1296
|
+
config: Partial<WeaveGroupProperties>;
|
|
1297
|
+
};
|
|
1298
|
+
|
|
1299
|
+
//#endregion
|
|
1300
|
+
//#region src/nodes/group/group.d.ts
|
|
1301
|
+
//# sourceMappingURL=types.d.ts.map
|
|
1302
|
+
declare class WeaveGroupNode extends WeaveNode {
|
|
1303
|
+
private config;
|
|
1304
|
+
protected nodeType: string;
|
|
1305
|
+
constructor(params?: WeaveGroupNodeParams);
|
|
1306
|
+
groupHasFrames(group: Konva.Group): boolean;
|
|
1307
|
+
groupHasImages(group: Konva.Group): boolean;
|
|
1308
|
+
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1309
|
+
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1310
|
+
serialize(instance: WeaveElementInstance): WeaveStateElement;
|
|
1311
|
+
scaleReset(): void;
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
//#endregion
|
|
1315
|
+
//#region src/nodes/group/constants.d.ts
|
|
1316
|
+
//# sourceMappingURL=group.d.ts.map
|
|
1317
|
+
declare const WEAVE_GROUP_NODE_TYPE = "group";
|
|
1318
|
+
|
|
1319
|
+
//#endregion
|
|
1320
|
+
//#region src/nodes/rectangle/types.d.ts
|
|
1321
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
1322
|
+
type WeaveRectangleProperties = {
|
|
1323
|
+
transform: WeaveNodeTransformerProperties;
|
|
1324
|
+
};
|
|
1325
|
+
type WeaveRectangleNodeParams = {
|
|
1326
|
+
config: Partial<WeaveRectangleProperties>;
|
|
1327
|
+
};
|
|
1328
|
+
|
|
1329
|
+
//#endregion
|
|
1330
|
+
//#region src/nodes/rectangle/rectangle.d.ts
|
|
1331
|
+
//# sourceMappingURL=types.d.ts.map
|
|
1332
|
+
declare class WeaveRectangleNode extends WeaveNode {
|
|
1333
|
+
private config;
|
|
1334
|
+
protected nodeType: string;
|
|
1335
|
+
constructor(params?: WeaveRectangleNodeParams);
|
|
1336
|
+
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1337
|
+
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1338
|
+
scaleReset(node: Konva.Rect): void;
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
//#endregion
|
|
1342
|
+
//#region src/nodes/rectangle/constants.d.ts
|
|
1343
|
+
//# sourceMappingURL=rectangle.d.ts.map
|
|
1344
|
+
declare const WEAVE_RECTANGLE_NODE_TYPE = "rectangle";
|
|
1345
|
+
|
|
1346
|
+
//#endregion
|
|
1347
|
+
//#region src/nodes/ellipse/types.d.ts
|
|
1348
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
1349
|
+
type WeaveEllipseProperties = {
|
|
1350
|
+
transform: WeaveNodeTransformerProperties;
|
|
1351
|
+
};
|
|
1352
|
+
type WeaveEllipseNodeParams = {
|
|
1353
|
+
config: Partial<WeaveEllipseProperties>;
|
|
1354
|
+
};
|
|
1355
|
+
|
|
1356
|
+
//#endregion
|
|
1357
|
+
//#region src/nodes/ellipse/ellipse.d.ts
|
|
1358
|
+
//# sourceMappingURL=types.d.ts.map
|
|
1359
|
+
declare class WeaveEllipseNode extends WeaveNode {
|
|
1360
|
+
private config;
|
|
1361
|
+
protected nodeType: string;
|
|
1362
|
+
constructor(params?: WeaveEllipseNodeParams);
|
|
1363
|
+
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1364
|
+
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1365
|
+
scaleReset(node: Konva.Ellipse): void;
|
|
1366
|
+
realOffset(element: WeaveStateElement): Konva.Vector2d;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
//#endregion
|
|
1370
|
+
//#region src/nodes/ellipse/constants.d.ts
|
|
1371
|
+
//# sourceMappingURL=ellipse.d.ts.map
|
|
1372
|
+
declare const WEAVE_ELLIPSE_NODE_TYPE = "ellipse";
|
|
1373
|
+
|
|
1374
|
+
//#endregion
|
|
1375
|
+
//#region src/nodes/line/types.d.ts
|
|
1376
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
1377
|
+
type WeaveLineProperties = {
|
|
1378
|
+
transform: WeaveNodeTransformerProperties;
|
|
1379
|
+
};
|
|
1380
|
+
type WeaveLineNodeParams = {
|
|
1381
|
+
config: Partial<WeaveLineProperties>;
|
|
1382
|
+
};
|
|
1383
|
+
|
|
1384
|
+
//#endregion
|
|
1385
|
+
//#region src/nodes/line/line.d.ts
|
|
1386
|
+
//# sourceMappingURL=types.d.ts.map
|
|
1387
|
+
declare class WeaveLineNode extends WeaveNode {
|
|
1388
|
+
private config;
|
|
1389
|
+
protected nodeType: string;
|
|
1390
|
+
constructor(params?: WeaveLineNodeParams);
|
|
1391
|
+
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1392
|
+
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1393
|
+
scaleReset(node: Konva.Line): void;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
//#endregion
|
|
1397
|
+
//#region src/nodes/line/constants.d.ts
|
|
1398
|
+
//# sourceMappingURL=line.d.ts.map
|
|
1399
|
+
declare const WEAVE_LINE_NODE_TYPE = "line";
|
|
1400
|
+
|
|
1401
|
+
//#endregion
|
|
1402
|
+
//#region src/nodes/text/types.d.ts
|
|
1403
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
1404
|
+
type TextSerializable = Konva.TextConfig & NodeSerializable & {
|
|
1405
|
+
type: 'text';
|
|
1406
|
+
id: string;
|
|
1407
|
+
};
|
|
1408
|
+
type WeaveTextProperties = {
|
|
1409
|
+
transform: WeaveNodeTransformerProperties;
|
|
1410
|
+
};
|
|
1411
|
+
type WeaveTextNodeParams = {
|
|
1412
|
+
config: Partial<WeaveTextProperties>;
|
|
1413
|
+
};
|
|
1414
|
+
|
|
1415
|
+
//#endregion
|
|
1416
|
+
//#region src/nodes/text/text.d.ts
|
|
1417
|
+
//# sourceMappingURL=types.d.ts.map
|
|
1418
|
+
declare class WeaveTextNode extends WeaveNode {
|
|
1419
|
+
private config;
|
|
1420
|
+
protected nodeType: string;
|
|
1421
|
+
private editing;
|
|
1422
|
+
private textAreaSuperContainer;
|
|
1423
|
+
private textAreaContainer;
|
|
1424
|
+
private textArea;
|
|
1425
|
+
constructor(params?: WeaveTextNodeParams);
|
|
1426
|
+
private updateNode;
|
|
1427
|
+
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1428
|
+
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1429
|
+
serialize(instance: WeaveElementInstance): WeaveStateElement;
|
|
1430
|
+
private onZoomChangeHandler;
|
|
1431
|
+
private onStageMoveHandler;
|
|
1432
|
+
private textAreaDomResize;
|
|
1433
|
+
measureMultilineText(textNode: Konva.Text): () => {
|
|
1434
|
+
width: number;
|
|
1435
|
+
height: number;
|
|
1436
|
+
};
|
|
1437
|
+
textRenderedSize(text: string, textNode: Konva.Text): {
|
|
1438
|
+
width: number;
|
|
1439
|
+
height: number;
|
|
1440
|
+
};
|
|
1441
|
+
private mimicTextNode;
|
|
1442
|
+
private createTextAreaDOM;
|
|
1443
|
+
private updateTextAreaDOM;
|
|
1444
|
+
private removeTextAreaDOM;
|
|
1445
|
+
private triggerEditMode;
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
//#endregion
|
|
1449
|
+
//#region src/nodes/text/constants.d.ts
|
|
1450
|
+
//# sourceMappingURL=text.d.ts.map
|
|
1451
|
+
declare const WEAVE_TEXT_NODE_TYPE = "text";
|
|
1452
|
+
|
|
1453
|
+
//#endregion
|
|
1454
|
+
//#region src/nodes/image/constants.d.ts
|
|
1455
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
1456
|
+
declare const WEAVE_IMAGE_NODE_TYPE = "image";
|
|
1457
|
+
declare const WEAVE_IMAGE_CROP_END_TYPE: {
|
|
1458
|
+
ACCEPT: string;
|
|
1459
|
+
CANCEL: string;
|
|
1460
|
+
};
|
|
1461
|
+
declare const WEAVE_IMAGE_DEFAULT_CONFIG: {
|
|
1462
|
+
crossOrigin: string;
|
|
1463
|
+
};
|
|
1464
|
+
|
|
1465
|
+
//#endregion
|
|
1466
|
+
//#region src/nodes/image/types.d.ts
|
|
1467
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
1468
|
+
type ImageProps = WeaveElementAttributes & {
|
|
1469
|
+
id: string;
|
|
1470
|
+
width?: number;
|
|
1471
|
+
height?: number;
|
|
1472
|
+
imageURL?: string;
|
|
1473
|
+
imageInfo?: {
|
|
1474
|
+
width: number;
|
|
1475
|
+
height: number;
|
|
1476
|
+
};
|
|
1477
|
+
};
|
|
1478
|
+
type WeaveImageState = {
|
|
1479
|
+
loaded: boolean;
|
|
1480
|
+
error: boolean;
|
|
1481
|
+
};
|
|
1482
|
+
type WeaveImageProperties = {
|
|
1483
|
+
crossOrigin: ImageCrossOrigin;
|
|
1484
|
+
transform?: WeaveNodeTransformerProperties;
|
|
1485
|
+
urlTransformer?: URLTransformerFunction;
|
|
1486
|
+
onDblClick?: (instance: WeaveImageNode, node: Konva.Group) => void;
|
|
1487
|
+
};
|
|
1488
|
+
type WeaveImageNodeParams = {
|
|
1489
|
+
config: Partial<WeaveImageProperties>;
|
|
1490
|
+
};
|
|
1491
|
+
type WeaveImageCropEndTypeKeys = keyof typeof WEAVE_IMAGE_CROP_END_TYPE;
|
|
1492
|
+
type WeaveImageCropEndType = (typeof WEAVE_IMAGE_CROP_END_TYPE)[WeaveImageCropEndTypeKeys];
|
|
1493
|
+
type WeaveImageOnCropStartEvent = {
|
|
1494
|
+
instance: Konva.Group;
|
|
1495
|
+
};
|
|
1496
|
+
type WeaveImageOnCropEndEvent = {
|
|
1497
|
+
instance: Konva.Group;
|
|
1498
|
+
};
|
|
1499
|
+
|
|
1500
|
+
//#endregion
|
|
1501
|
+
//#region src/nodes/image/image.d.ts
|
|
1502
|
+
//# sourceMappingURL=types.d.ts.map
|
|
1503
|
+
declare class WeaveImageNode extends WeaveNode {
|
|
1504
|
+
private config;
|
|
1505
|
+
protected imageSource: Record<string, HTMLImageElement>;
|
|
1506
|
+
protected imageState: Record<string, WeaveImageState>;
|
|
1507
|
+
protected tapStart: {
|
|
1508
|
+
x: number;
|
|
1509
|
+
y: number;
|
|
1510
|
+
time: number;
|
|
1511
|
+
} | null;
|
|
1512
|
+
protected lastTapTime: number;
|
|
1513
|
+
protected nodeType: string;
|
|
1514
|
+
private imageCrop;
|
|
1515
|
+
private imageLoaded;
|
|
1516
|
+
constructor(params?: WeaveImageNodeParams);
|
|
1517
|
+
triggerCrop(imageNode: Konva.Group): void;
|
|
1518
|
+
closeCrop: (imageNode: Konva.Group, type: WeaveImageCropEndType) => void;
|
|
1519
|
+
resetCrop: (imageNode: Konva.Group) => void;
|
|
1520
|
+
loadAsyncElement(nodeId: string): void;
|
|
1521
|
+
resolveAsyncElement(nodeId: string): void;
|
|
1522
|
+
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1523
|
+
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1524
|
+
preloadImage(imageId: string, imageURL: string, {
|
|
1525
|
+
onLoad,
|
|
1526
|
+
onError
|
|
1527
|
+
}: {
|
|
1528
|
+
onLoad: () => void;
|
|
1529
|
+
onError: (error: string | Event) => void;
|
|
1530
|
+
}): void;
|
|
1531
|
+
private loadImage;
|
|
1532
|
+
updatePlaceholderSize(image: Konva.Group, imagePlaceholder: Konva.Rect): void;
|
|
1533
|
+
updateImageCrop(nextProps: WeaveElementAttributes): void;
|
|
1534
|
+
getImageSource(imageId: string): HTMLImageElement | undefined;
|
|
1535
|
+
scaleReset(node: Konva.Group): void;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
//#endregion
|
|
1539
|
+
//#region src/nodes/star/types.d.ts
|
|
1540
|
+
//# sourceMappingURL=image.d.ts.map
|
|
1541
|
+
type WeaveStarProperties = {
|
|
1542
|
+
transform: WeaveNodeTransformerProperties;
|
|
1543
|
+
};
|
|
1544
|
+
type WeaveStarNodeParams = {
|
|
1545
|
+
config: Partial<WeaveStarProperties>;
|
|
1546
|
+
};
|
|
1547
|
+
|
|
1548
|
+
//#endregion
|
|
1549
|
+
//#region src/nodes/star/star.d.ts
|
|
1550
|
+
//# sourceMappingURL=types.d.ts.map
|
|
1551
|
+
declare class WeaveStarNode extends WeaveNode {
|
|
1552
|
+
private config;
|
|
1553
|
+
protected nodeType: string;
|
|
1554
|
+
constructor(params?: WeaveStarNodeParams);
|
|
1555
|
+
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1556
|
+
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1557
|
+
scaleReset(node: Konva.Star): void;
|
|
1558
|
+
realOffset(element: WeaveStateElement): Konva.Vector2d;
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
//#endregion
|
|
1562
|
+
//#region src/nodes/star/constants.d.ts
|
|
1563
|
+
//# sourceMappingURL=star.d.ts.map
|
|
1564
|
+
declare const WEAVE_STAR_NODE_TYPE = "star";
|
|
1565
|
+
|
|
1566
|
+
//#endregion
|
|
1567
|
+
//#region src/nodes/arrow/types.d.ts
|
|
1568
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
1569
|
+
type WeaveArrowProperties = {
|
|
1570
|
+
transform: WeaveNodeTransformerProperties;
|
|
1571
|
+
};
|
|
1572
|
+
type WeaveArrowNodeParams = {
|
|
1573
|
+
config: Partial<WeaveArrowProperties>;
|
|
1574
|
+
};
|
|
1575
|
+
|
|
1576
|
+
//#endregion
|
|
1577
|
+
//#region src/nodes/arrow/arrow.d.ts
|
|
1578
|
+
//# sourceMappingURL=types.d.ts.map
|
|
1579
|
+
declare class WeaveArrowNode extends WeaveNode {
|
|
1580
|
+
private config;
|
|
1581
|
+
protected nodeType: string;
|
|
1582
|
+
constructor(params?: WeaveArrowNodeParams);
|
|
1583
|
+
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1584
|
+
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1585
|
+
scaleReset(node: Konva.Arrow): void;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
//#endregion
|
|
1589
|
+
//#region src/nodes/arrow/constants.d.ts
|
|
1590
|
+
//# sourceMappingURL=arrow.d.ts.map
|
|
1591
|
+
declare const WEAVE_ARROW_NODE_TYPE = "arrow";
|
|
1592
|
+
|
|
1593
|
+
//#endregion
|
|
1594
|
+
//#region src/nodes/regular-polygon/types.d.ts
|
|
1595
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
1596
|
+
type WeaveRegularPolygonProperties = {
|
|
1597
|
+
transform: WeaveNodeTransformerProperties;
|
|
1598
|
+
};
|
|
1599
|
+
type WeaveRegularPolygonNodeParams = {
|
|
1600
|
+
config: Partial<WeaveRegularPolygonProperties>;
|
|
1601
|
+
};
|
|
1602
|
+
|
|
1603
|
+
//#endregion
|
|
1604
|
+
//#region src/nodes/regular-polygon/regular-polygon.d.ts
|
|
1605
|
+
//# sourceMappingURL=types.d.ts.map
|
|
1606
|
+
declare class WeaveRegularPolygonNode extends WeaveNode {
|
|
1607
|
+
private config;
|
|
1608
|
+
protected nodeType: string;
|
|
1609
|
+
constructor(params?: WeaveRegularPolygonNodeParams);
|
|
1610
|
+
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1611
|
+
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1612
|
+
scaleReset(node: Konva.RegularPolygon): void;
|
|
1613
|
+
realOffset(element: WeaveStateElement): Konva.Vector2d;
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
//#endregion
|
|
1617
|
+
//#region src/nodes/regular-polygon/constants.d.ts
|
|
1618
|
+
//# sourceMappingURL=regular-polygon.d.ts.map
|
|
1619
|
+
declare const WEAVE_REGULAR_POLYGON_NODE_TYPE = "regular-polygon";
|
|
1620
|
+
|
|
1621
|
+
//#endregion
|
|
1622
|
+
//#region src/nodes/frame/types.d.ts
|
|
1623
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
1624
|
+
type WeaveFrameProperties = {
|
|
1625
|
+
fontFamily: string;
|
|
1626
|
+
fontStyle: string;
|
|
1627
|
+
fontSize: number;
|
|
1628
|
+
fontColor: string;
|
|
1629
|
+
titleMargin: number;
|
|
1630
|
+
borderWidth: number;
|
|
1631
|
+
borderColor: string;
|
|
1632
|
+
onTargetEnter: {
|
|
1633
|
+
borderColor: string;
|
|
1634
|
+
fill: string;
|
|
1635
|
+
};
|
|
1636
|
+
transform: WeaveNodeTransformerProperties;
|
|
1637
|
+
};
|
|
1638
|
+
type WeaveFrameAttributes = WeaveElementAttributes & {
|
|
1639
|
+
title: string;
|
|
1640
|
+
frameWidth: number;
|
|
1641
|
+
frameHeight: number;
|
|
1642
|
+
frameBackground: string;
|
|
1643
|
+
};
|
|
1644
|
+
type WeaveFrameNodeParams = {
|
|
1645
|
+
config: Partial<WeaveFrameProperties>;
|
|
1646
|
+
};
|
|
1647
|
+
|
|
1648
|
+
//#endregion
|
|
1649
|
+
//#region src/nodes/frame/frame.d.ts
|
|
1650
|
+
//# sourceMappingURL=types.d.ts.map
|
|
1651
|
+
declare class WeaveFrameNode extends WeaveNode {
|
|
1652
|
+
private config;
|
|
1653
|
+
protected nodeType: string;
|
|
1654
|
+
constructor(params?: WeaveFrameNodeParams);
|
|
1655
|
+
create(key: string, props: Partial<WeaveFrameAttributes>): WeaveStateElement;
|
|
1656
|
+
onRender(props: WeaveFrameAttributes): WeaveElementInstance;
|
|
1657
|
+
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1658
|
+
serialize(instance: WeaveElementInstance): WeaveStateElement;
|
|
1659
|
+
scaleReset(): void;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
//#endregion
|
|
1663
|
+
//#region src/nodes/frame/constants.d.ts
|
|
1664
|
+
//# sourceMappingURL=frame.d.ts.map
|
|
1665
|
+
declare const WEAVE_FRAME_NODE_TYPE = "frame";
|
|
1666
|
+
declare const WEAVE_FRAME_NODE_DEFAULT_CONFIG: {
|
|
1667
|
+
fontFamily: string;
|
|
1668
|
+
fontStyle: string;
|
|
1669
|
+
fontSize: number;
|
|
1670
|
+
fontColor: string;
|
|
1671
|
+
titleMargin: number;
|
|
1672
|
+
borderColor: string;
|
|
1673
|
+
borderWidth: number;
|
|
1674
|
+
onTargetEnter: {
|
|
1675
|
+
borderColor: string;
|
|
1676
|
+
fill: string;
|
|
1677
|
+
};
|
|
1678
|
+
transform: {
|
|
1679
|
+
rotateEnabled: boolean;
|
|
1680
|
+
resizeEnabled: boolean;
|
|
1681
|
+
enabledAnchors: string[];
|
|
1682
|
+
borderStrokeWidth: number;
|
|
1683
|
+
padding: number;
|
|
1684
|
+
};
|
|
1685
|
+
};
|
|
1686
|
+
declare const WEAVE_FRAME_DEFAULT_BACKGROUND_COLOR = "#FFFFFFFF";
|
|
1687
|
+
declare const WEAVE_FRAME_NODE_DEFAULT_PROPS: {
|
|
1688
|
+
title: string;
|
|
1689
|
+
frameWidth: number;
|
|
1690
|
+
frameHeight: number;
|
|
1691
|
+
frameBackground: string;
|
|
1692
|
+
};
|
|
1693
|
+
|
|
1694
|
+
//#endregion
|
|
1695
|
+
//#region src/nodes/stroke/types.d.ts
|
|
1696
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
1697
|
+
type WeaveStrokeProperties = {
|
|
1698
|
+
splineResolution: number;
|
|
1699
|
+
resamplingSpacing: number;
|
|
1700
|
+
isEraser?: boolean;
|
|
1701
|
+
transform?: WeaveNodeTransformerProperties;
|
|
1702
|
+
};
|
|
1703
|
+
type WeaveStrokeNodeParams = {
|
|
1704
|
+
config: Partial<WeaveStrokeProperties>;
|
|
1705
|
+
};
|
|
1706
|
+
type WeaveStrokePoint = {
|
|
1707
|
+
x: number;
|
|
1708
|
+
y: number;
|
|
1709
|
+
pressure: number;
|
|
1710
|
+
};
|
|
1711
|
+
|
|
1712
|
+
//#endregion
|
|
1713
|
+
//#region src/nodes/stroke/stroke.d.ts
|
|
1714
|
+
//# sourceMappingURL=types.d.ts.map
|
|
1715
|
+
declare class WeaveStrokeNode extends WeaveNode {
|
|
1716
|
+
private readonly config;
|
|
1717
|
+
protected nodeType: string;
|
|
1718
|
+
constructor(params?: WeaveStrokeNodeParams);
|
|
1719
|
+
private resamplePoints;
|
|
1720
|
+
private getSplinePoints;
|
|
1721
|
+
private drawRibbonWithDash;
|
|
1722
|
+
private drawShape;
|
|
1723
|
+
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
1724
|
+
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1725
|
+
getZoomPlugin(): WeaveStageZoomPlugin | undefined;
|
|
1726
|
+
scaleReset(node: Konva.Node): void;
|
|
1727
|
+
serialize(instance: WeaveElementInstance): WeaveStateElement;
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
//#endregion
|
|
1731
|
+
//#region src/nodes/stroke/constants.d.ts
|
|
1732
|
+
//# sourceMappingURL=stroke.d.ts.map
|
|
1733
|
+
declare const WEAVE_STROKE_NODE_TYPE = "stroke";
|
|
1734
|
+
declare const WEAVE_STROKE_NODE_DEFAULT_CONFIG: {
|
|
1735
|
+
splineResolution: number;
|
|
1736
|
+
resamplingSpacing: number;
|
|
1737
|
+
isEraser: boolean;
|
|
1738
|
+
};
|
|
1739
|
+
|
|
1740
|
+
//#endregion
|
|
1741
|
+
//#region src/nodes/comment/constants.d.ts
|
|
1742
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
1743
|
+
declare const WEAVE_COMMENT_STATUS: {
|
|
1744
|
+
readonly PENDING: "pending";
|
|
1745
|
+
readonly RESOLVED: "resolved";
|
|
1746
|
+
};
|
|
1747
|
+
declare const WEAVE_COMMENT_CREATE_ACTION: {
|
|
1748
|
+
readonly CREATE: "create";
|
|
1749
|
+
readonly CLOSE: "close";
|
|
1750
|
+
};
|
|
1751
|
+
declare const WEAVE_COMMENT_VIEW_ACTION: {
|
|
1752
|
+
readonly REPLY: "reply";
|
|
1753
|
+
readonly MARK_RESOLVED: "markResolved";
|
|
1754
|
+
readonly EDIT: "edit";
|
|
1755
|
+
readonly DELETE: "delete";
|
|
1756
|
+
readonly CLOSE: "close";
|
|
1757
|
+
};
|
|
1758
|
+
declare const WEAVE_COMMENT_NODE_ACTION: {
|
|
1759
|
+
readonly IDLE: "idle";
|
|
1760
|
+
readonly CREATING: "creating";
|
|
1761
|
+
readonly VIEWING: "viewing";
|
|
1762
|
+
};
|
|
1763
|
+
declare const WEAVE_COMMENT_NODE_TYPE = "comment";
|
|
1764
|
+
declare const WEAVE_COMMENT_NODE_DEFAULTS: {
|
|
1765
|
+
style: {
|
|
1766
|
+
stroke: string;
|
|
1767
|
+
strokeWidth: number;
|
|
1768
|
+
shadowColor: string;
|
|
1769
|
+
shadowBlur: number;
|
|
1770
|
+
shadowOffsetX: number;
|
|
1771
|
+
shadowOffsetY: number;
|
|
1772
|
+
shadowOpacity: number;
|
|
1773
|
+
contracted: {
|
|
1774
|
+
width: number;
|
|
1775
|
+
height: number;
|
|
1776
|
+
circlePadding: number;
|
|
1777
|
+
userName: {
|
|
1778
|
+
fontFamily: string;
|
|
1779
|
+
fontSize: number;
|
|
1780
|
+
fontStyle: string;
|
|
1781
|
+
};
|
|
1782
|
+
};
|
|
1783
|
+
expanded: {
|
|
1784
|
+
width: number;
|
|
1785
|
+
userNameLeftMargin: number;
|
|
1786
|
+
dateLeftMargin: number;
|
|
1787
|
+
contentTopMargin: number;
|
|
1788
|
+
contentBottomMargin: number;
|
|
1789
|
+
userName: {
|
|
1790
|
+
fontFamily: string;
|
|
1791
|
+
fontSize: number;
|
|
1792
|
+
fontStyle: string;
|
|
1793
|
+
color: string;
|
|
1794
|
+
};
|
|
1795
|
+
date: {
|
|
1796
|
+
fontFamily: string;
|
|
1797
|
+
fontSize: number;
|
|
1798
|
+
fontStyle: string;
|
|
1799
|
+
color: string;
|
|
1800
|
+
};
|
|
1801
|
+
content: {
|
|
1802
|
+
fontFamily: string;
|
|
1803
|
+
fontSize: number;
|
|
1804
|
+
maxLines: number;
|
|
1805
|
+
fontStyle: string;
|
|
1806
|
+
color: string;
|
|
1807
|
+
};
|
|
1808
|
+
};
|
|
1809
|
+
creating: {
|
|
1810
|
+
paddingX: number;
|
|
1811
|
+
paddingY: number;
|
|
1812
|
+
stroke: string;
|
|
1813
|
+
strokeWidth: number;
|
|
1814
|
+
};
|
|
1815
|
+
viewing: {
|
|
1816
|
+
paddingX: number;
|
|
1817
|
+
paddingY: number;
|
|
1818
|
+
stroke: string;
|
|
1819
|
+
strokeWidth: number;
|
|
1820
|
+
};
|
|
1821
|
+
};
|
|
1822
|
+
formatDate: (date: string) => string;
|
|
1823
|
+
};
|
|
1824
|
+
|
|
1825
|
+
//#endregion
|
|
1826
|
+
//#region src/nodes/comment/types.d.ts
|
|
1827
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
1828
|
+
type WeaveCommentNodeCreateActionKeys = keyof typeof WEAVE_COMMENT_CREATE_ACTION;
|
|
1829
|
+
type WeaveCommentNodeCreateAction = (typeof WEAVE_COMMENT_CREATE_ACTION)[WeaveCommentNodeCreateActionKeys];
|
|
1830
|
+
type WeaveCommentNodeViewActionKeys = keyof typeof WEAVE_COMMENT_VIEW_ACTION;
|
|
1831
|
+
type WeaveCommentNodeViewAction = (typeof WEAVE_COMMENT_VIEW_ACTION)[WeaveCommentNodeViewActionKeys];
|
|
1832
|
+
type WeaveCommentNodeActionKeys = keyof typeof WEAVE_COMMENT_NODE_ACTION;
|
|
1833
|
+
type WeaveCommentNodeAction = (typeof WEAVE_COMMENT_NODE_ACTION)[WeaveCommentNodeActionKeys];
|
|
1834
|
+
type WeaveCommentStatusKeys = keyof typeof WEAVE_COMMENT_STATUS;
|
|
1835
|
+
type WeaveCommentStatus = (typeof WEAVE_COMMENT_STATUS)[WeaveCommentStatusKeys];
|
|
1836
|
+
type WeaveCommentNodeStyle = {
|
|
1837
|
+
stroke: string;
|
|
1838
|
+
strokeWidth: number;
|
|
1839
|
+
shadowColor: string;
|
|
1840
|
+
shadowBlur: number;
|
|
1841
|
+
shadowOffsetX: number;
|
|
1842
|
+
shadowOffsetY: number;
|
|
1843
|
+
shadowOpacity: number;
|
|
1844
|
+
contracted: {
|
|
1845
|
+
width: number;
|
|
1846
|
+
height: number;
|
|
1847
|
+
circlePadding: number;
|
|
1848
|
+
userName: {
|
|
1849
|
+
fontFamily: string;
|
|
1850
|
+
fontSize: number;
|
|
1851
|
+
fontStyle: string;
|
|
1852
|
+
};
|
|
1853
|
+
};
|
|
1854
|
+
expanded: {
|
|
1855
|
+
width: number;
|
|
1856
|
+
userNameLeftMargin: number;
|
|
1857
|
+
dateLeftMargin: number;
|
|
1858
|
+
contentTopMargin: number;
|
|
1859
|
+
contentBottomMargin: number;
|
|
1860
|
+
userName: {
|
|
1861
|
+
fontFamily: string;
|
|
1862
|
+
fontSize: number;
|
|
1863
|
+
fontStyle: string;
|
|
1864
|
+
color: string;
|
|
1865
|
+
};
|
|
1866
|
+
date: {
|
|
1867
|
+
fontFamily: string;
|
|
1868
|
+
fontSize: number;
|
|
1869
|
+
fontStyle: string;
|
|
1870
|
+
color: string;
|
|
1871
|
+
};
|
|
1872
|
+
content: {
|
|
1873
|
+
maxLines: number;
|
|
1874
|
+
fontFamily: string;
|
|
1875
|
+
fontSize: number;
|
|
1876
|
+
fontStyle: string;
|
|
1877
|
+
color: string;
|
|
1878
|
+
};
|
|
1879
|
+
};
|
|
1880
|
+
creating: {
|
|
1881
|
+
paddingX: number;
|
|
1882
|
+
paddingY: number;
|
|
1883
|
+
stroke: string;
|
|
1884
|
+
strokeWidth: number;
|
|
1885
|
+
};
|
|
1886
|
+
viewing: {
|
|
1887
|
+
paddingX: number;
|
|
1888
|
+
paddingY: number;
|
|
1889
|
+
stroke: string;
|
|
1890
|
+
strokeWidth: number;
|
|
1891
|
+
};
|
|
1892
|
+
};
|
|
1893
|
+
type WeaveCommentNodeModel<T> = {
|
|
1894
|
+
getDate: (comment: T) => string;
|
|
1895
|
+
getId: (comment: T) => string;
|
|
1896
|
+
getUserId: (comment: T) => string;
|
|
1897
|
+
getStatus: (comment: T) => WeaveCommentStatus;
|
|
1898
|
+
getUserShortName: (comment: T) => string;
|
|
1899
|
+
getUserFullName: (comment: T) => string;
|
|
1900
|
+
canUserDrag: (comment: T) => boolean;
|
|
1901
|
+
getContent: (comment: T) => string;
|
|
1902
|
+
setMarkResolved: (comment: T) => T;
|
|
1903
|
+
setContent: (comment: T, content: string) => T;
|
|
1904
|
+
};
|
|
1905
|
+
type WeaveCommentNodeConfig<T> = {
|
|
1906
|
+
style: WeaveCommentNodeStyle;
|
|
1907
|
+
model: WeaveCommentNodeModel<T>;
|
|
1908
|
+
formatDate: (date: string) => string;
|
|
1909
|
+
createComment: (ele: HTMLDivElement, node: WeaveElementInstance, finish: (node: WeaveElementInstance, content: string, action: WeaveCommentNodeCreateAction) => void) => Promise<void>;
|
|
1910
|
+
viewComment: (ele: HTMLDivElement, node: WeaveElementInstance, finish: (node: WeaveElementInstance, content: string, action: WeaveCommentNodeViewAction) => void) => Promise<void>;
|
|
1911
|
+
};
|
|
1912
|
+
type WeaveCommentNodeParams<T> = {
|
|
1913
|
+
config: Pick<WeaveCommentNodeConfig<T>, 'model' | 'formatDate' | 'createComment' | 'viewComment'> & DeepPartial<Pick<WeaveCommentNodeConfig<T>, 'style'>>;
|
|
1914
|
+
};
|
|
1915
|
+
type WeaveCommentNodeOnFinishCreateEvent = {
|
|
1916
|
+
node: WeaveElementInstance;
|
|
1917
|
+
action: WeaveCommentNodeCreateAction;
|
|
1918
|
+
};
|
|
1919
|
+
type WeaveCommentNodeOnCreateCommentEvent = {
|
|
1920
|
+
node: WeaveElementInstance;
|
|
1921
|
+
position: Konva.Vector2d;
|
|
1922
|
+
content: string;
|
|
1923
|
+
};
|
|
1924
|
+
type WeaveCommentNodeOnViewEvent = {
|
|
1925
|
+
node: WeaveElementInstance;
|
|
1926
|
+
};
|
|
1927
|
+
type WeaveCommentNodeOnDragEndEvent = {
|
|
1928
|
+
node: WeaveElementInstance;
|
|
1929
|
+
};
|
|
1930
|
+
|
|
1931
|
+
//#endregion
|
|
1932
|
+
//#region src/nodes/comment/comment.d.ts
|
|
1933
|
+
//# sourceMappingURL=types.d.ts.map
|
|
1934
|
+
declare class WeaveCommentNode<T> extends WeaveNode {
|
|
1935
|
+
protected nodeType: string;
|
|
1936
|
+
protected config: WeaveCommentNodeConfig<T>;
|
|
1937
|
+
protected commentDomAction: WeaveCommentNodeAction | null;
|
|
1938
|
+
protected commentDomVisibleId: string | null;
|
|
1939
|
+
protected commentDomVisible: boolean;
|
|
1940
|
+
protected showResolved: boolean;
|
|
1941
|
+
constructor(params: WeaveCommentNodeParams<T>);
|
|
1942
|
+
onRender(props: WeaveElementAttributes): konva_lib_Group5.Group;
|
|
1943
|
+
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
1944
|
+
onDestroy(nodeInstance: WeaveElementInstance): void;
|
|
1945
|
+
private expandNode;
|
|
1946
|
+
private contractNode;
|
|
1947
|
+
finishCreateCommentDOM(commentNode: Konva.Group): void;
|
|
1948
|
+
private setCommentDOMPosition;
|
|
1949
|
+
private createCommentDOM;
|
|
1950
|
+
private readonly onZoomChangeHandler;
|
|
1951
|
+
private normalizeNodeSize;
|
|
1952
|
+
private readonly onStageMoveHandler;
|
|
1953
|
+
private openCommentDOM;
|
|
1954
|
+
private closeCommentDOM;
|
|
1955
|
+
setCommentModel(commentNode: WeaveElementInstance, comment: T): void;
|
|
1956
|
+
focusOn(nodeId: string, duration?: number): void;
|
|
1957
|
+
setCommentViewing(commentId: string | null): void;
|
|
1958
|
+
isCommentViewing(): boolean;
|
|
1959
|
+
isCommentCreating(): boolean;
|
|
1960
|
+
getCommentId(node: WeaveElementInstance): string;
|
|
1961
|
+
setShowResolved(show: boolean): void;
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
//#endregion
|
|
1965
|
+
//#region src/nodes/video/types.d.ts
|
|
1966
|
+
//# sourceMappingURL=comment.d.ts.map
|
|
1967
|
+
type VideoProps = WeaveElementAttributes & {
|
|
1968
|
+
id: string;
|
|
1969
|
+
width: number;
|
|
1970
|
+
height: number;
|
|
1971
|
+
videoURL: string;
|
|
1972
|
+
videoPlaceholderURL: string;
|
|
1973
|
+
videoInfo?: {
|
|
1974
|
+
width: number;
|
|
1975
|
+
height: number;
|
|
1976
|
+
};
|
|
1977
|
+
};
|
|
1978
|
+
type WeaveVideoState = {
|
|
1979
|
+
placeholderLoaded: boolean;
|
|
1980
|
+
loaded: boolean;
|
|
1981
|
+
playing: boolean;
|
|
1982
|
+
paused: boolean;
|
|
1983
|
+
};
|
|
1984
|
+
type VideoBackgroundStyle = {
|
|
1985
|
+
color: string;
|
|
1986
|
+
strokeWidth: number;
|
|
1987
|
+
strokeColor: string;
|
|
1988
|
+
};
|
|
1989
|
+
type VideoIconBackgroundStyle = {
|
|
1990
|
+
color: string;
|
|
1991
|
+
strokeWidth: number;
|
|
1992
|
+
strokeColor: string;
|
|
1993
|
+
};
|
|
1994
|
+
type VideoTrackStyle = {
|
|
1995
|
+
resetOnEnd: boolean;
|
|
1996
|
+
onlyOnHover: boolean;
|
|
1997
|
+
color: string;
|
|
1998
|
+
height: number;
|
|
1999
|
+
};
|
|
2000
|
+
type VideoIconStyle = {
|
|
2001
|
+
internal: {
|
|
2002
|
+
paddingX: number;
|
|
2003
|
+
paddingY: number;
|
|
2004
|
+
};
|
|
2005
|
+
external: {
|
|
2006
|
+
paddingX: number;
|
|
2007
|
+
paddingY: number;
|
|
2008
|
+
};
|
|
2009
|
+
width: number;
|
|
2010
|
+
height: number;
|
|
2011
|
+
color: string;
|
|
2012
|
+
dataURL: string;
|
|
2013
|
+
};
|
|
2014
|
+
type VideoStyle = {
|
|
2015
|
+
playPauseOnDblClick: boolean;
|
|
2016
|
+
track: VideoTrackStyle;
|
|
2017
|
+
background: VideoBackgroundStyle;
|
|
2018
|
+
iconBackground: VideoIconBackgroundStyle;
|
|
2019
|
+
icon: VideoIconStyle;
|
|
2020
|
+
};
|
|
2021
|
+
type WeaveVideoProperties = {
|
|
2022
|
+
crossOrigin: ImageCrossOrigin;
|
|
2023
|
+
transform?: WeaveNodeTransformerProperties;
|
|
2024
|
+
urlTransformer?: URLTransformerFunction;
|
|
2025
|
+
style: VideoStyle;
|
|
2026
|
+
};
|
|
2027
|
+
type WeaveVideoNodeParams = {
|
|
2028
|
+
config: DeepPartial<WeaveVideoProperties>;
|
|
2029
|
+
};
|
|
2030
|
+
type WeaveVideoOnVideoPlayEvent = {
|
|
2031
|
+
nodeId: string;
|
|
2032
|
+
};
|
|
2033
|
+
type WeaveVideoOnVideoPauseEvent = {
|
|
2034
|
+
nodeId: string;
|
|
2035
|
+
};
|
|
2036
|
+
type WeaveVideoOnVideoStopEvent = {
|
|
2037
|
+
nodeId: string;
|
|
2038
|
+
};
|
|
2039
|
+
|
|
2040
|
+
//#endregion
|
|
2041
|
+
//#region src/nodes/video/video.d.ts
|
|
2042
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2043
|
+
declare class WeaveVideoNode extends WeaveNode {
|
|
2044
|
+
private config;
|
|
2045
|
+
private videoIconImage;
|
|
2046
|
+
private videoState;
|
|
2047
|
+
private videoSourceFrameId;
|
|
2048
|
+
private videoSource;
|
|
2049
|
+
private videoPlaceholder;
|
|
2050
|
+
private anim;
|
|
2051
|
+
protected nodeType: string;
|
|
2052
|
+
constructor(params?: WeaveVideoNodeParams);
|
|
2053
|
+
private initVideoIcon;
|
|
2054
|
+
private loadPlaceholder;
|
|
2055
|
+
private loadVideo;
|
|
2056
|
+
onRender(props: WeaveElementAttributes): WeaveElementInstance;
|
|
2057
|
+
loadAsyncElement(nodeId: string): void;
|
|
2058
|
+
resolveAsyncElement(nodeId: string): void;
|
|
2059
|
+
getVideoState(nodeInstance: WeaveElementInstance): WeaveVideoState | undefined;
|
|
2060
|
+
play(videoId: string): void;
|
|
2061
|
+
pause(videoId: string): void;
|
|
2062
|
+
stop(videoId: string): void;
|
|
2063
|
+
areVideosPlaying(): boolean;
|
|
2064
|
+
getVideoSource(videoId: string): HTMLVideoElement | undefined;
|
|
2065
|
+
onUpdate(nodeInstance: WeaveElementInstance, nextProps: WeaveElementAttributes): void;
|
|
2066
|
+
getNodeSelectionPlugin(): WeaveNodesSelectionPlugin | undefined;
|
|
2067
|
+
scaleReset(node: Konva.Group): void;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
//#endregion
|
|
2071
|
+
//#region src/nodes/video/constants.d.ts
|
|
2072
|
+
//# sourceMappingURL=video.d.ts.map
|
|
2073
|
+
declare const WEAVE_VIDEO_NODE_TYPE = "video";
|
|
2074
|
+
declare const WEAVE_VIDEO_DEFAULT_CONFIG: WeaveVideoProperties;
|
|
2075
|
+
|
|
2076
|
+
//#endregion
|
|
2077
|
+
//#region src/actions/zoom-out-tool/types.d.ts
|
|
2078
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
2079
|
+
type WeaveZoomOutToolActionParams = {
|
|
2080
|
+
previousAction: string;
|
|
2081
|
+
};
|
|
2082
|
+
|
|
2083
|
+
//#endregion
|
|
2084
|
+
//#region src/actions/zoom-out-tool/zoom-out-tool.d.ts
|
|
2085
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2086
|
+
declare class WeaveZoomOutToolAction extends WeaveAction {
|
|
2087
|
+
protected previousAction: string;
|
|
2088
|
+
protected cancelAction: () => void;
|
|
2089
|
+
onPropsChange: undefined;
|
|
2090
|
+
getName(): string;
|
|
2091
|
+
private getStageZoomPlugin;
|
|
2092
|
+
onInit(): void;
|
|
2093
|
+
trigger(cancelAction: () => void, params: WeaveZoomOutToolActionParams): void;
|
|
2094
|
+
cleanup(): void;
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
//#endregion
|
|
2098
|
+
//#region src/actions/zoom-in-tool/types.d.ts
|
|
2099
|
+
//# sourceMappingURL=zoom-out-tool.d.ts.map
|
|
2100
|
+
type WeaveZoomInToolActionParams = {
|
|
2101
|
+
previousAction: string;
|
|
2102
|
+
};
|
|
2103
|
+
|
|
2104
|
+
//#endregion
|
|
2105
|
+
//#region src/actions/zoom-in-tool/zoom-in-tool.d.ts
|
|
2106
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2107
|
+
declare class WeaveZoomInToolAction extends WeaveAction {
|
|
2108
|
+
protected previousAction: string;
|
|
2109
|
+
protected cancelAction: () => void;
|
|
2110
|
+
onPropsChange: undefined;
|
|
2111
|
+
getName(): string;
|
|
2112
|
+
private getStageZoomPlugin;
|
|
2113
|
+
onInit(): void;
|
|
2114
|
+
trigger(cancelAction: () => void, params: WeaveZoomInToolActionParams): void;
|
|
2115
|
+
cleanup(): void;
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
//#endregion
|
|
2119
|
+
//#region src/actions/fit-to-screen-tool/types.d.ts
|
|
2120
|
+
//# sourceMappingURL=zoom-in-tool.d.ts.map
|
|
2121
|
+
type WeaveFitToScreenToolActionParams = {
|
|
2122
|
+
previousAction: string;
|
|
2123
|
+
};
|
|
2124
|
+
|
|
2125
|
+
//#endregion
|
|
2126
|
+
//#region src/actions/fit-to-screen-tool/fit-to-screen-tool.d.ts
|
|
2127
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2128
|
+
declare class WeaveFitToScreenToolAction extends WeaveAction {
|
|
2129
|
+
protected previousAction: string;
|
|
2130
|
+
protected cancelAction: () => void;
|
|
2131
|
+
onPropsChange: undefined;
|
|
2132
|
+
getName(): string;
|
|
2133
|
+
private getStageZoomPlugin;
|
|
2134
|
+
onInit(): void;
|
|
2135
|
+
trigger(cancelAction: () => void, params: WeaveFitToScreenToolActionParams): void;
|
|
2136
|
+
cleanup(): void;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
//#endregion
|
|
2140
|
+
//#region src/actions/fit-to-selection-tool/types.d.ts
|
|
2141
|
+
//# sourceMappingURL=fit-to-screen-tool.d.ts.map
|
|
2142
|
+
type WeaveFitToSelectionToolActionParams = {
|
|
2143
|
+
previousAction: string;
|
|
2144
|
+
smartZoom?: boolean;
|
|
2145
|
+
};
|
|
2146
|
+
|
|
2147
|
+
//#endregion
|
|
2148
|
+
//#region src/actions/fit-to-selection-tool/fit-to-selection-tool.d.ts
|
|
2149
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2150
|
+
declare class WeaveFitToSelectionToolAction extends WeaveAction {
|
|
2151
|
+
protected previousAction: string;
|
|
2152
|
+
protected cancelAction: () => void;
|
|
2153
|
+
onPropsChange: undefined;
|
|
2154
|
+
getName(): string;
|
|
2155
|
+
private getNodesSelectionPlugin;
|
|
2156
|
+
private getStageZoomPlugin;
|
|
2157
|
+
onInit(): void;
|
|
2158
|
+
trigger(cancelAction: () => void, params: WeaveFitToSelectionToolActionParams): void;
|
|
2159
|
+
cleanup(): void;
|
|
2160
|
+
}
|
|
2161
|
+
|
|
2162
|
+
//#endregion
|
|
2163
|
+
//#region src/actions/move-tool/constants.d.ts
|
|
2164
|
+
//# sourceMappingURL=fit-to-selection-tool.d.ts.map
|
|
2165
|
+
declare const MOVE_TOOL_ACTION_NAME = "moveTool";
|
|
2166
|
+
declare const MOVE_TOOL_STATE: {
|
|
2167
|
+
readonly IDLE: "idle";
|
|
2168
|
+
readonly MOVING: "moving";
|
|
2169
|
+
};
|
|
2170
|
+
|
|
2171
|
+
//#endregion
|
|
2172
|
+
//#region src/actions/move-tool/types.d.ts
|
|
2173
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
2174
|
+
type WeaveMoveToolActionStateKeys = keyof typeof MOVE_TOOL_STATE;
|
|
2175
|
+
type WeaveMoveToolActionState = (typeof MOVE_TOOL_STATE)[WeaveMoveToolActionStateKeys];
|
|
2176
|
+
type WeaveMoveToolActionParams = {
|
|
2177
|
+
triggerSelectionTool?: boolean;
|
|
2178
|
+
};
|
|
2179
|
+
|
|
2180
|
+
//#endregion
|
|
2181
|
+
//#region src/actions/move-tool/move-tool.d.ts
|
|
2182
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2183
|
+
declare class WeaveMoveToolAction extends WeaveAction {
|
|
2184
|
+
protected initialized: boolean;
|
|
2185
|
+
protected state: WeaveMoveToolActionState;
|
|
2186
|
+
protected cancelAction: () => void;
|
|
2187
|
+
protected triggerSelectionTool: boolean;
|
|
2188
|
+
onPropsChange: undefined;
|
|
2189
|
+
onInit: undefined;
|
|
2190
|
+
constructor();
|
|
2191
|
+
getName(): string;
|
|
2192
|
+
private setupEvents;
|
|
2193
|
+
private setState;
|
|
2194
|
+
private setMoving;
|
|
2195
|
+
trigger(cancelAction: () => void, params?: WeaveMoveToolActionParams): void;
|
|
2196
|
+
cleanup(): void;
|
|
2197
|
+
}
|
|
2198
|
+
|
|
2199
|
+
//#endregion
|
|
2200
|
+
//#region src/actions/selection-tool/constants.d.ts
|
|
2201
|
+
//# sourceMappingURL=move-tool.d.ts.map
|
|
2202
|
+
declare const SELECTION_TOOL_ACTION_NAME = "selectionTool";
|
|
2203
|
+
declare const SELECTION_TOOL_STATE: {
|
|
2204
|
+
readonly IDLE: "idle";
|
|
2205
|
+
readonly SELECTING: "selection";
|
|
2206
|
+
};
|
|
2207
|
+
|
|
2208
|
+
//#endregion
|
|
2209
|
+
//#region src/actions/selection-tool/types.d.ts
|
|
2210
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
2211
|
+
type WeaveSelectionToolActionStateKeys = keyof typeof SELECTION_TOOL_STATE;
|
|
2212
|
+
type WeaveSelectionToolActionState = (typeof SELECTION_TOOL_STATE)[WeaveSelectionToolActionStateKeys];
|
|
2213
|
+
|
|
2214
|
+
//#endregion
|
|
2215
|
+
//#region src/actions/selection-tool/selection-tool.d.ts
|
|
2216
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2217
|
+
declare class WeaveSelectionToolAction extends WeaveAction {
|
|
2218
|
+
protected initialized: boolean;
|
|
2219
|
+
protected state: WeaveSelectionToolActionState;
|
|
2220
|
+
protected cancelAction: () => void;
|
|
2221
|
+
onPropsChange: undefined;
|
|
2222
|
+
onInit: undefined;
|
|
2223
|
+
constructor();
|
|
2224
|
+
getName(): string;
|
|
2225
|
+
private setupEvents;
|
|
2226
|
+
private setState;
|
|
2227
|
+
private setSelection;
|
|
2228
|
+
trigger(cancelAction: () => void): void;
|
|
2229
|
+
cleanup(): void;
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
//#endregion
|
|
2233
|
+
//#region src/actions/eraser-tool/constants.d.ts
|
|
2234
|
+
//# sourceMappingURL=selection-tool.d.ts.map
|
|
2235
|
+
declare const ERASER_TOOL_ACTION_NAME = "eraserTool";
|
|
2236
|
+
declare const ERASER_TOOL_STATE: {
|
|
2237
|
+
readonly IDLE: "idle";
|
|
2238
|
+
readonly ERASING: "erasing";
|
|
2239
|
+
};
|
|
2240
|
+
|
|
2241
|
+
//#endregion
|
|
2242
|
+
//#region src/actions/eraser-tool/types.d.ts
|
|
2243
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
2244
|
+
type WeaveEraserToolActionStateKeys = keyof typeof ERASER_TOOL_STATE;
|
|
2245
|
+
type WeaveEraserToolActionState = (typeof ERASER_TOOL_STATE)[WeaveEraserToolActionStateKeys];
|
|
2246
|
+
|
|
2247
|
+
//#endregion
|
|
2248
|
+
//#region src/actions/eraser-tool/eraser-tool.d.ts
|
|
2249
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2250
|
+
declare class WeaveEraserToolAction extends WeaveAction {
|
|
2251
|
+
protected initialized: boolean;
|
|
2252
|
+
protected state: WeaveEraserToolActionState;
|
|
2253
|
+
protected erasing: boolean;
|
|
2254
|
+
protected cancelAction: () => void;
|
|
2255
|
+
onPropsChange: undefined;
|
|
2256
|
+
onInit: undefined;
|
|
2257
|
+
constructor();
|
|
2258
|
+
getName(): string;
|
|
2259
|
+
private setupEvents;
|
|
2260
|
+
private setState;
|
|
2261
|
+
private setEraser;
|
|
2262
|
+
trigger(cancelAction: () => void): void;
|
|
2263
|
+
cleanup(): void;
|
|
2264
|
+
private setCursor;
|
|
2265
|
+
private setFocusStage;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
//#endregion
|
|
2269
|
+
//#region src/actions/rectangle-tool/constants.d.ts
|
|
2270
|
+
//# sourceMappingURL=eraser-tool.d.ts.map
|
|
2271
|
+
declare const RECTANGLE_TOOL_ACTION_NAME = "rectangleTool";
|
|
2272
|
+
declare const RECTANGLE_TOOL_STATE: {
|
|
2273
|
+
readonly IDLE: "idle";
|
|
2274
|
+
readonly ADDING: "adding";
|
|
2275
|
+
readonly DEFINING_SIZE: "definingSize";
|
|
2276
|
+
readonly ADDED: "added";
|
|
2277
|
+
};
|
|
2278
|
+
|
|
2279
|
+
//#endregion
|
|
2280
|
+
//#region src/actions/rectangle-tool/types.d.ts
|
|
2281
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
2282
|
+
type WeaveRectangleToolActionStateKeys = keyof typeof RECTANGLE_TOOL_STATE;
|
|
2283
|
+
type WeaveRectangleToolActionState = (typeof RECTANGLE_TOOL_STATE)[WeaveRectangleToolActionStateKeys];
|
|
2284
|
+
type WeaveRectangleToolActionOnAddingEvent = undefined;
|
|
2285
|
+
type WeaveRectangleToolActionOnAddedEvent = undefined;
|
|
2286
|
+
|
|
2287
|
+
//#endregion
|
|
2288
|
+
//#region src/actions/rectangle-tool/rectangle-tool.d.ts
|
|
2289
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2290
|
+
declare class WeaveRectangleToolAction extends WeaveAction {
|
|
2291
|
+
protected initialized: boolean;
|
|
2292
|
+
protected state: WeaveRectangleToolActionState;
|
|
2293
|
+
protected rectId: string | null;
|
|
2294
|
+
protected moved: boolean;
|
|
2295
|
+
protected tempRectNode: Konva.Rect | null;
|
|
2296
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
2297
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2298
|
+
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2299
|
+
protected measureContainer: Konva.Layer | Konva.Group | undefined;
|
|
2300
|
+
protected cancelAction: () => void;
|
|
2301
|
+
onPropsChange: undefined;
|
|
2302
|
+
onInit: undefined;
|
|
2303
|
+
constructor();
|
|
2304
|
+
getName(): string;
|
|
2305
|
+
initProps(): {
|
|
2306
|
+
opacity: number;
|
|
2307
|
+
fill: string;
|
|
2308
|
+
stroke: string;
|
|
2309
|
+
strokeWidth: number;
|
|
2310
|
+
width: number;
|
|
2311
|
+
height: number;
|
|
2312
|
+
};
|
|
2313
|
+
private setupEvents;
|
|
2314
|
+
private setState;
|
|
2315
|
+
private addRectangle;
|
|
2316
|
+
private handleAdding;
|
|
2317
|
+
private handleSettingSize;
|
|
2318
|
+
private handleMovement;
|
|
2319
|
+
trigger(cancelAction: () => void): void;
|
|
2320
|
+
cleanup(): void;
|
|
2321
|
+
private setCursor;
|
|
2322
|
+
private setFocusStage;
|
|
2323
|
+
}
|
|
2324
|
+
|
|
2325
|
+
//#endregion
|
|
2326
|
+
//#region src/actions/ellipse-tool/constants.d.ts
|
|
2327
|
+
//# sourceMappingURL=rectangle-tool.d.ts.map
|
|
2328
|
+
declare const ELLIPSE_TOOL_ACTION_NAME = "ellipseTool";
|
|
2329
|
+
declare const ELLIPSE_TOOL_STATE: {
|
|
2330
|
+
readonly IDLE: "idle";
|
|
2331
|
+
readonly ADDING: "adding";
|
|
2332
|
+
readonly DEFINING_SIZE: "definingSize";
|
|
2333
|
+
readonly ADDED: "added";
|
|
2334
|
+
};
|
|
2335
|
+
|
|
2336
|
+
//#endregion
|
|
2337
|
+
//#region src/actions/ellipse-tool/types.d.ts
|
|
2338
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
2339
|
+
type WeaveEllipseToolActionStateKeys = keyof typeof ELLIPSE_TOOL_STATE;
|
|
2340
|
+
type WeaveEllipseToolActionState = (typeof ELLIPSE_TOOL_STATE)[WeaveEllipseToolActionStateKeys];
|
|
2341
|
+
type WeaveEllipseToolActionOnAddingEvent = undefined;
|
|
2342
|
+
type WeaveEllipseToolActionOnAddedEvent = undefined;
|
|
2343
|
+
|
|
2344
|
+
//#endregion
|
|
2345
|
+
//#region src/actions/ellipse-tool/ellipse-tool.d.ts
|
|
2346
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2347
|
+
declare class WeaveEllipseToolAction extends WeaveAction {
|
|
2348
|
+
protected initialized: boolean;
|
|
2349
|
+
protected state: WeaveEllipseToolActionState;
|
|
2350
|
+
protected ellipseId: string | null;
|
|
2351
|
+
protected creating: boolean;
|
|
2352
|
+
protected moved: boolean;
|
|
2353
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
2354
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2355
|
+
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2356
|
+
protected cancelAction: () => void;
|
|
2357
|
+
onPropsChange: undefined;
|
|
2358
|
+
onInit: undefined;
|
|
2359
|
+
constructor();
|
|
2360
|
+
getName(): string;
|
|
2361
|
+
initProps(): {
|
|
2362
|
+
opacity: number;
|
|
2363
|
+
fill: string;
|
|
2364
|
+
stroke: string;
|
|
2365
|
+
strokeWidth: number;
|
|
2366
|
+
radiusX: number;
|
|
2367
|
+
radiusY: number;
|
|
2368
|
+
keepAspectRatio: boolean;
|
|
2369
|
+
};
|
|
2370
|
+
private setupEvents;
|
|
2371
|
+
private setState;
|
|
2372
|
+
private addEllipse;
|
|
2373
|
+
private handleAdding;
|
|
2374
|
+
private handleSettingSize;
|
|
2375
|
+
private handleMovement;
|
|
2376
|
+
trigger(cancelAction: () => void): void;
|
|
2377
|
+
cleanup(): void;
|
|
2378
|
+
private setCursor;
|
|
2379
|
+
private setFocusStage;
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
//#endregion
|
|
2383
|
+
//#region src/actions/pen-tool/constants.d.ts
|
|
2384
|
+
//# sourceMappingURL=ellipse-tool.d.ts.map
|
|
2385
|
+
declare const PEN_TOOL_ACTION_NAME = "penTool";
|
|
2386
|
+
declare const PEN_TOOL_STATE: {
|
|
2387
|
+
readonly IDLE: "idle";
|
|
2388
|
+
readonly ADDING: "adding";
|
|
2389
|
+
readonly DEFINING_SIZE: "definingSize";
|
|
2390
|
+
readonly ADDED: "added";
|
|
2391
|
+
};
|
|
2392
|
+
|
|
2393
|
+
//#endregion
|
|
2394
|
+
//#region src/actions/pen-tool/types.d.ts
|
|
2395
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
2396
|
+
type WeavePenToolActionStateKeys = keyof typeof PEN_TOOL_STATE;
|
|
2397
|
+
type WeavePenToolActionState = (typeof PEN_TOOL_STATE)[WeavePenToolActionStateKeys];
|
|
2398
|
+
type WeavePenToolActionOnAddingEvent = undefined;
|
|
2399
|
+
type WeavePenToolActionOnAddedEvent = undefined;
|
|
2400
|
+
|
|
2401
|
+
//#endregion
|
|
2402
|
+
//#region src/actions/pen-tool/pen-tool.d.ts
|
|
2403
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2404
|
+
declare class WeavePenToolAction extends WeaveAction {
|
|
2405
|
+
protected initialized: boolean;
|
|
2406
|
+
protected initialCursor: string | null;
|
|
2407
|
+
protected state: WeavePenToolActionState;
|
|
2408
|
+
protected lineId: string | null;
|
|
2409
|
+
protected tempLineId: string | null;
|
|
2410
|
+
protected tempMainLineNode: Konva.Line | null;
|
|
2411
|
+
protected tempLineNode: Konva.Line | null;
|
|
2412
|
+
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2413
|
+
protected measureContainer: Konva.Layer | Konva.Group | undefined;
|
|
2414
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2415
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
2416
|
+
protected tempPoint: Konva.Circle | undefined;
|
|
2417
|
+
protected tempNextPoint: Konva.Circle | undefined;
|
|
2418
|
+
protected cancelAction: () => void;
|
|
2419
|
+
onPropsChange: undefined;
|
|
2420
|
+
onInit: undefined;
|
|
2421
|
+
constructor();
|
|
2422
|
+
getName(): string;
|
|
2423
|
+
initProps(): {
|
|
2424
|
+
stroke: string;
|
|
2425
|
+
strokeWidth: number;
|
|
2426
|
+
opacity: number;
|
|
2427
|
+
};
|
|
2428
|
+
private setupEvents;
|
|
2429
|
+
private setState;
|
|
2430
|
+
private addLine;
|
|
2431
|
+
private handleAdding;
|
|
2432
|
+
private handleSettingSize;
|
|
2433
|
+
private handleMovement;
|
|
2434
|
+
trigger(cancelAction: () => void): void;
|
|
2435
|
+
cleanup(): void;
|
|
2436
|
+
private setCursor;
|
|
2437
|
+
private setFocusStage;
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
//#endregion
|
|
2441
|
+
//#region src/actions/brush-tool/constants.d.ts
|
|
2442
|
+
//# sourceMappingURL=pen-tool.d.ts.map
|
|
2443
|
+
declare const BRUSH_TOOL_ACTION_NAME = "brushTool";
|
|
2444
|
+
declare const BRUSH_TOOL_STATE: {
|
|
2445
|
+
readonly INACTIVE: "inactive";
|
|
2446
|
+
readonly IDLE: "idle";
|
|
2447
|
+
readonly DEFINE_STROKE: "defineStroke";
|
|
2448
|
+
};
|
|
2449
|
+
declare const BRUSH_TOOL_DEFAULT_CONFIG: {
|
|
2450
|
+
interpolationSteps: number;
|
|
2451
|
+
};
|
|
2452
|
+
|
|
2453
|
+
//#endregion
|
|
2454
|
+
//#region src/actions/brush-tool/types.d.ts
|
|
2455
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
2456
|
+
type WeaveBrushToolActionStateKeys = keyof typeof BRUSH_TOOL_STATE;
|
|
2457
|
+
type WeaveBrushToolActionState = (typeof BRUSH_TOOL_STATE)[WeaveBrushToolActionStateKeys];
|
|
2458
|
+
type WeaveBrushToolActionOnAddingEvent = undefined;
|
|
2459
|
+
type WeaveBrushToolActionOnAddedEvent = undefined;
|
|
2460
|
+
type WeaveBrushToolActionProperties = {
|
|
2461
|
+
interpolationSteps: number;
|
|
2462
|
+
};
|
|
2463
|
+
type WeaveBrushToolActionParams = {
|
|
2464
|
+
config: Partial<WeaveBrushToolActionProperties>;
|
|
2465
|
+
};
|
|
2466
|
+
|
|
2467
|
+
//#endregion
|
|
2468
|
+
//#region src/actions/brush-tool/brush-tool.d.ts
|
|
2469
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2470
|
+
declare class WeaveBrushToolAction extends WeaveAction {
|
|
2471
|
+
protected config: WeaveBrushToolActionProperties;
|
|
2472
|
+
protected initialized: boolean;
|
|
2473
|
+
protected state: WeaveBrushToolActionState;
|
|
2474
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2475
|
+
protected strokeId: string | null;
|
|
2476
|
+
protected isEraser: boolean;
|
|
2477
|
+
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2478
|
+
protected measureContainer: Konva.Layer | Konva.Group | undefined;
|
|
2479
|
+
protected cancelAction: () => void;
|
|
2480
|
+
onPropsChange: undefined;
|
|
2481
|
+
onInit: undefined;
|
|
2482
|
+
constructor(params?: WeaveBrushToolActionParams);
|
|
2483
|
+
getName(): string;
|
|
2484
|
+
initProps(): {
|
|
2485
|
+
stroke: string;
|
|
2486
|
+
strokeWidth: number;
|
|
2487
|
+
opacity: number;
|
|
2488
|
+
};
|
|
2489
|
+
private getEventPressure;
|
|
2490
|
+
private setupEvents;
|
|
2491
|
+
private setState;
|
|
2492
|
+
private getBoundingBox;
|
|
2493
|
+
private handleStartStroke;
|
|
2494
|
+
private handleMovement;
|
|
2495
|
+
private handleEndStroke;
|
|
2496
|
+
trigger(cancel: () => void): void;
|
|
2497
|
+
onEraserMode(): boolean;
|
|
2498
|
+
cleanup(): void;
|
|
2499
|
+
getZoomPlugin(): WeaveStageZoomPlugin | undefined;
|
|
2500
|
+
private setCursor;
|
|
2501
|
+
private setFocusStage;
|
|
2502
|
+
}
|
|
2503
|
+
|
|
2504
|
+
//#endregion
|
|
2505
|
+
//#region src/actions/text-tool/constants.d.ts
|
|
2506
|
+
//# sourceMappingURL=brush-tool.d.ts.map
|
|
2507
|
+
declare const TEXT_TOOL_ACTION_NAME = "textTool";
|
|
2508
|
+
declare const TEXT_TOOL_STATE: {
|
|
2509
|
+
readonly IDLE: "idle";
|
|
2510
|
+
readonly ADDING: "adding";
|
|
2511
|
+
readonly FINISHED: "finished";
|
|
2512
|
+
};
|
|
2513
|
+
declare const TEXT_LAYOUT: {
|
|
2514
|
+
readonly AUTO_ALL: "auto-all";
|
|
2515
|
+
readonly AUTO_HEIGHT: "auto-height";
|
|
2516
|
+
readonly FIXED: "fixed";
|
|
2517
|
+
};
|
|
2518
|
+
|
|
2519
|
+
//#endregion
|
|
2520
|
+
//#region src/actions/text-tool/types.d.ts
|
|
2521
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
2522
|
+
type WeaveTextToolActionStateKeys = keyof typeof TEXT_TOOL_STATE;
|
|
2523
|
+
type WeaveTextToolActionState = (typeof TEXT_TOOL_STATE)[WeaveTextToolActionStateKeys];
|
|
2524
|
+
type WeaveTextLayoutKeys = keyof typeof TEXT_LAYOUT;
|
|
2525
|
+
type WeaveTextLayout = (typeof TEXT_LAYOUT)[WeaveTextLayoutKeys];
|
|
2526
|
+
type WeaveTextToolActionOnAddingEvent = undefined;
|
|
2527
|
+
type WeaveTextToolActionOnAddedEvent = undefined;
|
|
2528
|
+
|
|
2529
|
+
//#endregion
|
|
2530
|
+
//#region src/actions/text-tool/text-tool.d.ts
|
|
2531
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2532
|
+
declare class WeaveTextToolAction extends WeaveAction {
|
|
2533
|
+
protected initialized: boolean;
|
|
2534
|
+
protected initialCursor: string | null;
|
|
2535
|
+
protected state: WeaveTextToolActionState;
|
|
2536
|
+
protected textId: string | null;
|
|
2537
|
+
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2538
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2539
|
+
protected cancelAction: () => void;
|
|
2540
|
+
onPropsChange: undefined;
|
|
2541
|
+
onInit: undefined;
|
|
2542
|
+
constructor();
|
|
2543
|
+
getName(): string;
|
|
2544
|
+
initProps(): {
|
|
2545
|
+
text: string;
|
|
2546
|
+
layout: "auto-all";
|
|
2547
|
+
fontSize: number;
|
|
2548
|
+
fontFamily: string;
|
|
2549
|
+
fill: string;
|
|
2550
|
+
align: string;
|
|
2551
|
+
verticalAlign: string;
|
|
2552
|
+
strokeEnabled: boolean;
|
|
2553
|
+
};
|
|
2554
|
+
private setupEvents;
|
|
2555
|
+
private setState;
|
|
2556
|
+
private addText;
|
|
2557
|
+
private handleAdding;
|
|
2558
|
+
trigger(cancelAction: () => void): void;
|
|
2559
|
+
cleanup(): void;
|
|
2560
|
+
private setCursor;
|
|
2561
|
+
private setFocusStage;
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
//#endregion
|
|
2565
|
+
//#region src/actions/image-tool/constants.d.ts
|
|
2566
|
+
//# sourceMappingURL=text-tool.d.ts.map
|
|
2567
|
+
declare const IMAGE_TOOL_ACTION_NAME = "imageTool";
|
|
2568
|
+
declare const IMAGE_TOOL_STATE: {
|
|
2569
|
+
readonly IDLE: "idle";
|
|
2570
|
+
readonly UPLOADING: "uploading";
|
|
2571
|
+
readonly DEFINING_POSITION: "definingPosition";
|
|
2572
|
+
readonly SELECTED_POSITION: "selectedPosition";
|
|
2573
|
+
readonly ADDING: "adding";
|
|
2574
|
+
readonly FINISHED: "finished";
|
|
2575
|
+
};
|
|
2576
|
+
|
|
2577
|
+
//#endregion
|
|
2578
|
+
//#region src/actions/image-tool/types.d.ts
|
|
2579
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
2580
|
+
type WeaveImageToolActionStateKeys = keyof typeof IMAGE_TOOL_STATE;
|
|
2581
|
+
type WeaveImageToolActionState = (typeof IMAGE_TOOL_STATE)[WeaveImageToolActionStateKeys];
|
|
2582
|
+
type WeaveImageToolActionOnStartLoadImageEvent = undefined;
|
|
2583
|
+
type WeaveImageToolActionOnEndLoadImageEvent = Error | undefined;
|
|
2584
|
+
type WeaveImageToolActionOnAddingEvent = {
|
|
2585
|
+
imageURL: string;
|
|
2586
|
+
};
|
|
2587
|
+
type WeaveImageToolActionOnAddedEvent = {
|
|
2588
|
+
imageURL: string;
|
|
2589
|
+
nodeId: string;
|
|
2590
|
+
};
|
|
2591
|
+
type WeaveImageToolActionTriggerParams = {
|
|
2592
|
+
imageURL?: string;
|
|
2593
|
+
imageId?: string;
|
|
2594
|
+
options?: ImageOptions;
|
|
2595
|
+
position?: Konva.Vector2d;
|
|
2596
|
+
forceMainContainer?: boolean;
|
|
2597
|
+
};
|
|
2598
|
+
type ImageOptions = {
|
|
2599
|
+
crossOrigin: ImageCrossOrigin;
|
|
2600
|
+
};
|
|
2601
|
+
type WeaveImageToolActionTriggerReturn = {
|
|
2602
|
+
finishUploadCallback: (imageURL: string, position?: Konva.Vector2d | undefined) => void;
|
|
2603
|
+
} | undefined;
|
|
2604
|
+
|
|
2605
|
+
//#endregion
|
|
2606
|
+
//#region src/actions/image-tool/image-tool.d.ts
|
|
2607
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2608
|
+
declare class WeaveImageToolAction extends WeaveAction {
|
|
2609
|
+
protected initialized: boolean;
|
|
2610
|
+
protected initialCursor: string | null;
|
|
2611
|
+
protected state: WeaveImageToolActionState;
|
|
2612
|
+
protected cursorPadding: number;
|
|
2613
|
+
protected imageId: string | null;
|
|
2614
|
+
protected tempImageId: string | null;
|
|
2615
|
+
protected tempImageNode: Konva.Image | null;
|
|
2616
|
+
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2617
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
2618
|
+
protected imageURL: string | null;
|
|
2619
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2620
|
+
protected forceMainContainer: boolean;
|
|
2621
|
+
protected cancelAction: () => void;
|
|
2622
|
+
onPropsChange: undefined;
|
|
2623
|
+
update: undefined;
|
|
2624
|
+
constructor();
|
|
2625
|
+
getName(): string;
|
|
2626
|
+
initProps(): {
|
|
2627
|
+
width: number;
|
|
2628
|
+
height: number;
|
|
2629
|
+
scaleX: number;
|
|
2630
|
+
scaleY: number;
|
|
2631
|
+
};
|
|
2632
|
+
onInit(): void;
|
|
2633
|
+
private setupEvents;
|
|
2634
|
+
private setState;
|
|
2635
|
+
private loadImage;
|
|
2636
|
+
private isTouchDevice;
|
|
2637
|
+
private addImageNode;
|
|
2638
|
+
private addImage;
|
|
2639
|
+
private handleAdding;
|
|
2640
|
+
trigger(cancelAction: () => void, params?: WeaveImageToolActionTriggerParams): WeaveImageToolActionTriggerReturn;
|
|
2641
|
+
cleanup(): void;
|
|
2642
|
+
private getImageNodeHandler;
|
|
2643
|
+
private setCursor;
|
|
2644
|
+
private setFocusStage;
|
|
2645
|
+
}
|
|
2646
|
+
|
|
2647
|
+
//#endregion
|
|
2648
|
+
//#region src/actions/star-tool/constants.d.ts
|
|
2649
|
+
//# sourceMappingURL=image-tool.d.ts.map
|
|
2650
|
+
declare const STAR_TOOL_ACTION_NAME = "starTool";
|
|
2651
|
+
declare const STAR_TOOL_STATE: {
|
|
2652
|
+
readonly IDLE: "idle";
|
|
2653
|
+
readonly ADDING: "adding";
|
|
2654
|
+
readonly DEFINING_SIZE: "definingSize";
|
|
2655
|
+
readonly ADDED: "added";
|
|
2656
|
+
};
|
|
2657
|
+
|
|
2658
|
+
//#endregion
|
|
2659
|
+
//#region src/actions/star-tool/types.d.ts
|
|
2660
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
2661
|
+
type WeaveStarToolActionStateKeys = keyof typeof STAR_TOOL_STATE;
|
|
2662
|
+
type WeaveStarToolActionState = (typeof STAR_TOOL_STATE)[WeaveStarToolActionStateKeys];
|
|
2663
|
+
type WeaveStarToolActionOnAddingEvent = undefined;
|
|
2664
|
+
type WeaveStarToolActionOnAddedEvent = undefined;
|
|
2665
|
+
|
|
2666
|
+
//#endregion
|
|
2667
|
+
//#region src/actions/star-tool/star-tool.d.ts
|
|
2668
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2669
|
+
declare class WeaveStarToolAction extends WeaveAction {
|
|
2670
|
+
protected initialized: boolean;
|
|
2671
|
+
protected state: WeaveStarToolActionState;
|
|
2672
|
+
protected starId: string | null;
|
|
2673
|
+
protected creating: boolean;
|
|
2674
|
+
protected moved: boolean;
|
|
2675
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
2676
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2677
|
+
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2678
|
+
protected cancelAction: () => void;
|
|
2679
|
+
onPropsChange: undefined;
|
|
2680
|
+
onInit: undefined;
|
|
2681
|
+
constructor();
|
|
2682
|
+
getName(): string;
|
|
2683
|
+
initProps(): {
|
|
2684
|
+
opacity: number;
|
|
2685
|
+
fill: string;
|
|
2686
|
+
stroke: string;
|
|
2687
|
+
strokeWidth: number;
|
|
2688
|
+
numPoints: number;
|
|
2689
|
+
innerRadius: number;
|
|
2690
|
+
outerRadius: number;
|
|
2691
|
+
keepAspectRatio: boolean;
|
|
2692
|
+
};
|
|
2693
|
+
private setupEvents;
|
|
2694
|
+
private setState;
|
|
2695
|
+
private addStar;
|
|
2696
|
+
private handleAdding;
|
|
2697
|
+
private handleSettingSize;
|
|
2698
|
+
private handleMovement;
|
|
2699
|
+
trigger(cancelAction: () => void): void;
|
|
2700
|
+
cleanup(): void;
|
|
2701
|
+
private setCursor;
|
|
2702
|
+
private setFocusStage;
|
|
2703
|
+
}
|
|
2704
|
+
|
|
2705
|
+
//#endregion
|
|
2706
|
+
//#region src/actions/arrow-tool/constants.d.ts
|
|
2707
|
+
//# sourceMappingURL=star-tool.d.ts.map
|
|
2708
|
+
declare const ARROW_TOOL_ACTION_NAME = "arrowTool";
|
|
2709
|
+
declare const ARROW_TOOL_STATE: {
|
|
2710
|
+
readonly IDLE: "idle";
|
|
2711
|
+
readonly ADDING: "adding";
|
|
2712
|
+
readonly DEFINING_SIZE: "definingSize";
|
|
2713
|
+
readonly ADDED: "added";
|
|
2714
|
+
};
|
|
2715
|
+
|
|
2716
|
+
//#endregion
|
|
2717
|
+
//#region src/actions/arrow-tool/types.d.ts
|
|
2718
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
2719
|
+
type WeaveArrowToolActionStateKeys = keyof typeof ARROW_TOOL_STATE;
|
|
2720
|
+
type WeaveArrowToolActionState = (typeof ARROW_TOOL_STATE)[WeaveArrowToolActionStateKeys];
|
|
2721
|
+
type WeaveArrowToolActionOnAddingEvent = undefined;
|
|
2722
|
+
type WeaveArrowToolActionOnAddedEvent = undefined;
|
|
2723
|
+
|
|
2724
|
+
//#endregion
|
|
2725
|
+
//#region src/actions/arrow-tool/arrow-tool.d.ts
|
|
2726
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2727
|
+
declare class WeaveArrowToolAction extends WeaveAction {
|
|
2728
|
+
protected initialized: boolean;
|
|
2729
|
+
protected initialCursor: string | null;
|
|
2730
|
+
protected state: WeaveArrowToolActionState;
|
|
2731
|
+
protected arrowId: string | null;
|
|
2732
|
+
protected tempArrowId: string | null;
|
|
2733
|
+
protected tempMainArrowNode: Konva.Line | null;
|
|
2734
|
+
protected tempArrowNode: Konva.Arrow | null;
|
|
2735
|
+
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2736
|
+
protected measureContainer: Konva.Layer | Konva.Group | undefined;
|
|
2737
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2738
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
2739
|
+
protected tempPoint: Konva.Circle | undefined;
|
|
2740
|
+
protected tempNextPoint: Konva.Circle | undefined;
|
|
2741
|
+
protected cancelAction: () => void;
|
|
2742
|
+
onPropsChange: undefined;
|
|
2743
|
+
onInit: undefined;
|
|
2744
|
+
constructor();
|
|
2745
|
+
getName(): string;
|
|
2746
|
+
initProps(): {
|
|
2747
|
+
fill: string;
|
|
2748
|
+
stroke: string;
|
|
2749
|
+
strokeWidth: number;
|
|
2750
|
+
opacity: number;
|
|
2751
|
+
pointerLength: number;
|
|
2752
|
+
pointerWidth: number;
|
|
2753
|
+
pointerAtBeginning: boolean;
|
|
2754
|
+
pointerAtEnding: boolean;
|
|
2755
|
+
};
|
|
2756
|
+
private setupEvents;
|
|
2757
|
+
private setState;
|
|
2758
|
+
private addArrow;
|
|
2759
|
+
private handleAdding;
|
|
2760
|
+
private handleSettingSize;
|
|
2761
|
+
private handleMovement;
|
|
2762
|
+
trigger(cancelAction: () => void): void;
|
|
2763
|
+
cleanup(): void;
|
|
2764
|
+
private setCursor;
|
|
2765
|
+
private setFocusStage;
|
|
2766
|
+
}
|
|
2767
|
+
|
|
2768
|
+
//#endregion
|
|
2769
|
+
//#region src/actions/regular-polygon-tool/constants.d.ts
|
|
2770
|
+
//# sourceMappingURL=arrow-tool.d.ts.map
|
|
2771
|
+
declare const REGULAR_POLYGON_TOOL_ACTION_NAME = "regularPolygonTool";
|
|
2772
|
+
declare const REGULAR_POLYGON_TOOL_STATE: {
|
|
2773
|
+
readonly IDLE: "idle";
|
|
2774
|
+
readonly ADDING: "adding";
|
|
2775
|
+
readonly DEFINING_SIZE: "definingSize";
|
|
2776
|
+
readonly ADDED: "added";
|
|
2777
|
+
};
|
|
2778
|
+
|
|
2779
|
+
//#endregion
|
|
2780
|
+
//#region src/actions/regular-polygon-tool/types.d.ts
|
|
2781
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
2782
|
+
type WeaveRegularPolygonToolActionStateKeys = keyof typeof REGULAR_POLYGON_TOOL_STATE;
|
|
2783
|
+
type WeaveRegularPolygonToolActionState = (typeof REGULAR_POLYGON_TOOL_STATE)[WeaveRegularPolygonToolActionStateKeys];
|
|
2784
|
+
type WeaveRegularPolygonToolActionOnAddingEvent = undefined;
|
|
2785
|
+
type WeaveRegularPolygonToolActionOnAddedEvent = undefined;
|
|
2786
|
+
|
|
2787
|
+
//#endregion
|
|
2788
|
+
//#region src/actions/regular-polygon-tool/regular-polygon-tool.d.ts
|
|
2789
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2790
|
+
declare class WeaveRegularPolygonToolAction extends WeaveAction {
|
|
2791
|
+
protected initialized: boolean;
|
|
2792
|
+
protected state: WeaveRegularPolygonToolActionState;
|
|
2793
|
+
protected regularPolygonId: string | null;
|
|
2794
|
+
protected creating: boolean;
|
|
2795
|
+
protected moved: boolean;
|
|
2796
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
2797
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2798
|
+
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2799
|
+
protected cancelAction: () => void;
|
|
2800
|
+
onPropsChange: undefined;
|
|
2801
|
+
onInit: undefined;
|
|
2802
|
+
constructor();
|
|
2803
|
+
getName(): string;
|
|
2804
|
+
initProps(): {
|
|
2805
|
+
opacity: number;
|
|
2806
|
+
fill: string;
|
|
2807
|
+
stroke: string;
|
|
2808
|
+
strokeWidth: number;
|
|
2809
|
+
sides: number;
|
|
2810
|
+
radius: number;
|
|
2811
|
+
};
|
|
2812
|
+
private setupEvents;
|
|
2813
|
+
private setState;
|
|
2814
|
+
private addRegularPolygon;
|
|
2815
|
+
private handleAdding;
|
|
2816
|
+
private handleSettingSize;
|
|
2817
|
+
private handleMovement;
|
|
2818
|
+
trigger(cancelAction: () => void): void;
|
|
2819
|
+
cleanup(): void;
|
|
2820
|
+
private setCursor;
|
|
2821
|
+
private setFocusStage;
|
|
2822
|
+
}
|
|
2823
|
+
|
|
2824
|
+
//#endregion
|
|
2825
|
+
//#region src/actions/frame-tool/constants.d.ts
|
|
2826
|
+
//# sourceMappingURL=regular-polygon-tool.d.ts.map
|
|
2827
|
+
declare const FRAME_TOOL_ACTION_NAME = "frameTool";
|
|
2828
|
+
declare const FRAME_TOOL_STATE: {
|
|
2829
|
+
readonly IDLE: "idle";
|
|
2830
|
+
readonly ADDING: "adding";
|
|
2831
|
+
readonly ADDED: "added";
|
|
2832
|
+
};
|
|
2833
|
+
|
|
2834
|
+
//#endregion
|
|
2835
|
+
//#region src/actions/frame-tool/types.d.ts
|
|
2836
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
2837
|
+
type WeaveFrameToolActionStateKeys = keyof typeof FRAME_TOOL_STATE;
|
|
2838
|
+
type WeaveFrameToolActionState = (typeof FRAME_TOOL_STATE)[WeaveFrameToolActionStateKeys];
|
|
2839
|
+
type WeaveFrameToolActionTriggerParams = {
|
|
2840
|
+
title?: string;
|
|
2841
|
+
frameWidth?: number;
|
|
2842
|
+
frameHeight?: number;
|
|
2843
|
+
frameOrientation?: string;
|
|
2844
|
+
frameType?: string;
|
|
2845
|
+
};
|
|
2846
|
+
type WeaveFrameToolProps = {
|
|
2847
|
+
title: string;
|
|
2848
|
+
editing: boolean;
|
|
2849
|
+
opacity: number;
|
|
2850
|
+
};
|
|
2851
|
+
type WeaveFrameToolActionOnAddingEvent = undefined;
|
|
2852
|
+
type WeaveFrameToolActionOnAddedEvent = undefined;
|
|
2853
|
+
|
|
2854
|
+
//#endregion
|
|
2855
|
+
//#region src/actions/frame-tool/frame-tool.d.ts
|
|
2856
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2857
|
+
declare class WeaveFrameToolAction extends WeaveAction {
|
|
2858
|
+
protected initialized: boolean;
|
|
2859
|
+
protected state: WeaveFrameToolActionState;
|
|
2860
|
+
protected frameId: string | null;
|
|
2861
|
+
protected container: Konva.Layer | Konva.Node | undefined;
|
|
2862
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
2863
|
+
protected cancelAction: () => void;
|
|
2864
|
+
onPropsChange: undefined;
|
|
2865
|
+
onInit: undefined;
|
|
2866
|
+
constructor();
|
|
2867
|
+
getName(): string;
|
|
2868
|
+
initProps(params?: WeaveFrameToolActionTriggerParams): WeaveFrameToolProps;
|
|
2869
|
+
private setupEvents;
|
|
2870
|
+
private setState;
|
|
2871
|
+
private addFrame;
|
|
2872
|
+
private handleAdding;
|
|
2873
|
+
trigger(cancelAction: () => void, params?: WeaveFrameToolActionTriggerParams): void;
|
|
2874
|
+
cleanup(): void;
|
|
2875
|
+
private setCursor;
|
|
2876
|
+
private setFocusStage;
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
//#endregion
|
|
2880
|
+
//#region src/actions/export-nodes-tool/types.d.ts
|
|
2881
|
+
//# sourceMappingURL=frame-tool.d.ts.map
|
|
2882
|
+
type WeaveExportNodesActionParams = {
|
|
2883
|
+
nodes: WeaveElementInstance[];
|
|
2884
|
+
boundingNodes?: (nodes: Konva.Node[]) => Konva.Node[];
|
|
2885
|
+
options?: WeaveExportNodesOptions;
|
|
2886
|
+
triggerSelectionTool?: boolean;
|
|
2887
|
+
};
|
|
2888
|
+
|
|
2889
|
+
//#endregion
|
|
2890
|
+
//#region src/actions/export-stage-tool/export-stage-tool.d.ts
|
|
2891
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2892
|
+
declare class WeaveExportStageToolAction extends WeaveAction {
|
|
2893
|
+
protected cancelAction: () => void;
|
|
2894
|
+
private defaultFormatOptions;
|
|
2895
|
+
private options;
|
|
2896
|
+
onPropsChange: undefined;
|
|
2897
|
+
onInit: undefined;
|
|
2898
|
+
getName(): string;
|
|
2899
|
+
private exportStage;
|
|
2900
|
+
trigger(cancelAction: () => void, {
|
|
2901
|
+
boundingNodes,
|
|
2902
|
+
options
|
|
2903
|
+
}: WeaveExportNodesActionParams): Promise<HTMLImageElement>;
|
|
2904
|
+
cleanup(): void;
|
|
2905
|
+
}
|
|
2906
|
+
|
|
2907
|
+
//#endregion
|
|
2908
|
+
//#region src/actions/export-stage-tool/types.d.ts
|
|
2909
|
+
//# sourceMappingURL=export-stage-tool.d.ts.map
|
|
2910
|
+
type WeaveExportStageActionParams = {
|
|
2911
|
+
boundingNodes?: (nodes: Konva.Node[]) => Konva.Node[];
|
|
2912
|
+
options?: WeaveExportNodesOptions;
|
|
2913
|
+
};
|
|
2914
|
+
|
|
2915
|
+
//#endregion
|
|
2916
|
+
//#region src/actions/export-nodes-tool/export-nodes-tool.d.ts
|
|
2917
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2918
|
+
declare class WeaveExportNodesToolAction extends WeaveAction {
|
|
2919
|
+
protected cancelAction: () => void;
|
|
2920
|
+
protected triggerSelectionTool: boolean;
|
|
2921
|
+
private defaultFormatOptions;
|
|
2922
|
+
private options;
|
|
2923
|
+
onPropsChange: undefined;
|
|
2924
|
+
onInit: undefined;
|
|
2925
|
+
getName(): string;
|
|
2926
|
+
private exportNodes;
|
|
2927
|
+
trigger(cancelAction: () => void, {
|
|
2928
|
+
nodes,
|
|
2929
|
+
boundingNodes,
|
|
2930
|
+
options,
|
|
2931
|
+
triggerSelectionTool
|
|
2932
|
+
}: WeaveExportNodesActionParams): Promise<HTMLImageElement>;
|
|
2933
|
+
cleanup(): void;
|
|
2934
|
+
}
|
|
2935
|
+
|
|
2936
|
+
//#endregion
|
|
2937
|
+
//#region src/actions/align-nodes-tool/constants.d.ts
|
|
2938
|
+
//# sourceMappingURL=export-nodes-tool.d.ts.map
|
|
2939
|
+
declare const ALIGN_NODES_TOOL_ACTION_NAME = "alignNodesTool";
|
|
2940
|
+
declare const ALIGN_NODES_ALIGN_TO: {
|
|
2941
|
+
readonly LEFT_HORIZONTAL: "left-horizontal";
|
|
2942
|
+
readonly CENTER_HORIZONTAL: "center-horizontal";
|
|
2943
|
+
readonly RIGHT_HORIZONTAL: "right-horizontal";
|
|
2944
|
+
readonly TOP_VERTICAL: "top-vertical";
|
|
2945
|
+
readonly CENTER_VERTICAL: "center-vertical";
|
|
2946
|
+
readonly BOTTOM_VERTICAL: "bottom-vertical";
|
|
2947
|
+
};
|
|
2948
|
+
declare const ALIGN_NODES_TOOL_STATE: {
|
|
2949
|
+
readonly IDLE: "idle";
|
|
2950
|
+
};
|
|
2951
|
+
|
|
2952
|
+
//#endregion
|
|
2953
|
+
//#region src/actions/align-nodes-tool/types.d.ts
|
|
2954
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
2955
|
+
type WeaveAlignNodesToolActionStateKeys = keyof typeof ALIGN_NODES_TOOL_STATE;
|
|
2956
|
+
type WeaveAlignNodesToolActionState = (typeof ALIGN_NODES_TOOL_STATE)[WeaveAlignNodesToolActionStateKeys];
|
|
2957
|
+
type WeaveAlignNodesToolActionAlignToKeys = keyof typeof ALIGN_NODES_ALIGN_TO;
|
|
2958
|
+
type WeaveAlignNodesToolActionAlignTo = (typeof ALIGN_NODES_ALIGN_TO)[WeaveAlignNodesToolActionAlignToKeys];
|
|
2959
|
+
type WeaveAlignNodesToolActionTriggerParams = {
|
|
2960
|
+
alignTo: WeaveAlignNodesToolActionAlignTo;
|
|
2961
|
+
triggerSelectionTool?: boolean;
|
|
2962
|
+
};
|
|
2963
|
+
|
|
2964
|
+
//#endregion
|
|
2965
|
+
//#region src/actions/align-nodes-tool/align-nodes-tool.d.ts
|
|
2966
|
+
//# sourceMappingURL=types.d.ts.map
|
|
2967
|
+
declare class WeaveAlignNodesToolAction extends WeaveAction {
|
|
2968
|
+
protected initialized: boolean;
|
|
2969
|
+
protected state: WeaveAlignNodesToolActionState;
|
|
2970
|
+
protected triggerSelectionTool: boolean;
|
|
2971
|
+
protected cancelAction: () => void;
|
|
2972
|
+
onPropsChange: undefined;
|
|
2973
|
+
onInit: undefined;
|
|
2974
|
+
constructor();
|
|
2975
|
+
getName(): string;
|
|
2976
|
+
private setupEvents;
|
|
2977
|
+
private setState;
|
|
2978
|
+
private updateNode;
|
|
2979
|
+
private getParents;
|
|
2980
|
+
private alignToLeftHorizontal;
|
|
2981
|
+
private alignToCenterHorizontal;
|
|
2982
|
+
private alignToRightHorizontal;
|
|
2983
|
+
private alignToTopVertical;
|
|
2984
|
+
private alignToCenterVertical;
|
|
2985
|
+
private alignToBottomVertical;
|
|
2986
|
+
private alignNodes;
|
|
2987
|
+
canAlignSelectedNodes(): boolean;
|
|
2988
|
+
trigger(cancelAction: () => void, {
|
|
2989
|
+
alignTo,
|
|
2990
|
+
triggerSelectionTool
|
|
2991
|
+
}: WeaveAlignNodesToolActionTriggerParams): void;
|
|
2992
|
+
cleanup(): void;
|
|
2993
|
+
}
|
|
2994
|
+
|
|
2995
|
+
//#endregion
|
|
2996
|
+
//#region src/actions/comment-tool/constants.d.ts
|
|
2997
|
+
//# sourceMappingURL=align-nodes-tool.d.ts.map
|
|
2998
|
+
declare const WEAVE_COMMENT_TOOL_ACTION_NAME = "commentTool";
|
|
2999
|
+
declare const WEAVE_COMMENT_TOOL_STATE: {
|
|
3000
|
+
readonly IDLE: "idle";
|
|
3001
|
+
readonly ADDING: "adding";
|
|
3002
|
+
readonly SELECTED_POSITION: "selectedPosition";
|
|
3003
|
+
readonly CREATING_COMMENT: "creatingComment";
|
|
3004
|
+
readonly ADDED: "added";
|
|
3005
|
+
};
|
|
3006
|
+
declare const WEAVE_COMMENT_TOOL_DEFAULT_CONFIG: {
|
|
3007
|
+
style: {
|
|
3008
|
+
cursor: {
|
|
3009
|
+
add: string;
|
|
3010
|
+
block: string;
|
|
3011
|
+
};
|
|
3012
|
+
};
|
|
3013
|
+
};
|
|
3014
|
+
|
|
3015
|
+
//#endregion
|
|
3016
|
+
//#region src/actions/comment-tool/types.d.ts
|
|
3017
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
3018
|
+
type WeaveCommentToolActionStateKeys = keyof typeof WEAVE_COMMENT_TOOL_STATE;
|
|
3019
|
+
type WeaveCommentToolActionState = (typeof WEAVE_COMMENT_TOOL_STATE)[WeaveCommentToolActionStateKeys];
|
|
3020
|
+
type WeaveCommentToolStyle = {
|
|
3021
|
+
cursor: {
|
|
3022
|
+
add: string;
|
|
3023
|
+
block: string;
|
|
3024
|
+
};
|
|
3025
|
+
};
|
|
3026
|
+
type WeaveCommentToolModel<T> = {
|
|
3027
|
+
getCreateModel: () => DeepPartial<T>;
|
|
3028
|
+
};
|
|
3029
|
+
type WeaveCommentToolActionConfig<T> = {
|
|
3030
|
+
style: WeaveCommentToolStyle;
|
|
3031
|
+
getUser: () => WeaveUser;
|
|
3032
|
+
getUserBackgroundColor: (user: WeaveUser) => string | CanvasGradient | undefined;
|
|
3033
|
+
getUserForegroundColor: (user: WeaveUser) => string | CanvasGradient | undefined;
|
|
3034
|
+
model: WeaveCommentToolModel<T>;
|
|
3035
|
+
};
|
|
3036
|
+
type WeaveCommentToolActionParams<T> = {
|
|
3037
|
+
config: Pick<WeaveCommentToolActionConfig<T>, 'model' | 'getUser' | 'getUserBackgroundColor' | 'getUserForegroundColor'> & DeepPartial<Pick<WeaveCommentToolActionConfig<T>, 'style'>>;
|
|
3038
|
+
};
|
|
3039
|
+
|
|
3040
|
+
//#endregion
|
|
3041
|
+
//#region src/actions/comment-tool/comment-tool.d.ts
|
|
3042
|
+
//# sourceMappingURL=types.d.ts.map
|
|
3043
|
+
declare class WeaveCommentToolAction<T> extends WeaveAction {
|
|
3044
|
+
private readonly config;
|
|
3045
|
+
protected initialized: boolean;
|
|
3046
|
+
protected state: WeaveCommentToolActionState;
|
|
3047
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
3048
|
+
protected commentId: string | null;
|
|
3049
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
3050
|
+
protected cancelAction: () => void;
|
|
3051
|
+
onPropsChange: undefined;
|
|
3052
|
+
constructor(params: WeaveCommentToolActionParams<T>);
|
|
3053
|
+
getName(): string;
|
|
3054
|
+
initProps(): {
|
|
3055
|
+
colorToken: string;
|
|
3056
|
+
width: number;
|
|
3057
|
+
height: number;
|
|
3058
|
+
opacity: number;
|
|
3059
|
+
};
|
|
3060
|
+
extractCursorUrl(cursor: string): string | null;
|
|
3061
|
+
isAllowedUrl(value: string): boolean;
|
|
3062
|
+
preloadCursors(): void;
|
|
3063
|
+
onInit(): void;
|
|
3064
|
+
private setupEvents;
|
|
3065
|
+
private setState;
|
|
3066
|
+
private enableAddingComment;
|
|
3067
|
+
private handleAdding;
|
|
3068
|
+
trigger(cancelAction: () => void): void;
|
|
3069
|
+
cleanup(): void;
|
|
3070
|
+
private getCommentsLayer;
|
|
3071
|
+
private isCommentNode;
|
|
3072
|
+
private setCursor;
|
|
3073
|
+
private setCursorBlock;
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
//#endregion
|
|
3077
|
+
//#region src/actions/video-tool/constants.d.ts
|
|
3078
|
+
//# sourceMappingURL=comment-tool.d.ts.map
|
|
3079
|
+
declare const VIDEO_TOOL_ACTION_NAME = "videoTool";
|
|
3080
|
+
declare const VIDEO_TOOL_STATE: {
|
|
3081
|
+
readonly IDLE: "idle";
|
|
3082
|
+
readonly UPLOADING: "uploading";
|
|
3083
|
+
readonly DEFINING_POSITION: "definingPosition";
|
|
3084
|
+
readonly SELECTED_POSITION: "selectedPosition";
|
|
3085
|
+
readonly ADDING: "adding";
|
|
3086
|
+
readonly FINISHED: "finished";
|
|
3087
|
+
};
|
|
3088
|
+
|
|
3089
|
+
//#endregion
|
|
3090
|
+
//#region src/actions/video-tool/types.d.ts
|
|
3091
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
3092
|
+
type WeaveVideoToolActionStateKeys = keyof typeof VIDEO_TOOL_STATE;
|
|
3093
|
+
type WeaveVideoToolActionState = (typeof VIDEO_TOOL_STATE)[WeaveVideoToolActionStateKeys];
|
|
3094
|
+
type WeaveVideoToolDragParams = {
|
|
3095
|
+
placeholderUrl: string;
|
|
3096
|
+
url: string;
|
|
3097
|
+
width: number;
|
|
3098
|
+
height: number;
|
|
3099
|
+
};
|
|
3100
|
+
type WeaveVideoToolActionTriggerParams = {
|
|
3101
|
+
videoId?: string;
|
|
3102
|
+
videoParams?: WeaveVideoToolDragParams;
|
|
3103
|
+
position?: Konva.Vector2d;
|
|
3104
|
+
forceMainContainer?: boolean;
|
|
3105
|
+
};
|
|
3106
|
+
type WeaveVideoToolActionTriggerVideoParams = {
|
|
3107
|
+
videoPlaceholderURL: string;
|
|
3108
|
+
videoURL: string;
|
|
3109
|
+
};
|
|
3110
|
+
type WeaveVideoToolActionTriggerReturn = {
|
|
3111
|
+
finishUploadCallback: (videoParams: WeaveVideoToolDragParams, position?: Konva.Vector2d) => void;
|
|
3112
|
+
} | undefined;
|
|
3113
|
+
type WeaveVideoToolActionOnAddingEvent = {
|
|
3114
|
+
videoURL: string;
|
|
3115
|
+
};
|
|
3116
|
+
type WeaveVideoToolActionOnAddedEvent = {
|
|
3117
|
+
videoURL: string;
|
|
3118
|
+
nodeId: string;
|
|
3119
|
+
};
|
|
3120
|
+
|
|
3121
|
+
//#endregion
|
|
3122
|
+
//#region src/actions/video-tool/video-tool.d.ts
|
|
3123
|
+
//# sourceMappingURL=types.d.ts.map
|
|
3124
|
+
declare class WeaveVideoToolAction extends WeaveAction {
|
|
3125
|
+
protected initialized: boolean;
|
|
3126
|
+
protected initialCursor: string | null;
|
|
3127
|
+
protected state: WeaveVideoToolActionState;
|
|
3128
|
+
protected cursorPadding: number;
|
|
3129
|
+
protected videoId: string | null;
|
|
3130
|
+
protected container: Konva.Layer | Konva.Node | undefined;
|
|
3131
|
+
protected pointers: Map<number, Konva.Vector2d>;
|
|
3132
|
+
protected videoParams: WeaveVideoToolDragParams | null;
|
|
3133
|
+
protected clickPoint: Konva.Vector2d | null;
|
|
3134
|
+
protected forceMainContainer: boolean;
|
|
3135
|
+
protected cancelAction: () => void;
|
|
3136
|
+
onPropsChange: undefined;
|
|
3137
|
+
update: undefined;
|
|
3138
|
+
constructor();
|
|
3139
|
+
getName(): string;
|
|
3140
|
+
getVideoSource(videoId: string): HTMLVideoElement | undefined;
|
|
3141
|
+
initProps(): {
|
|
3142
|
+
width: number;
|
|
3143
|
+
height: number;
|
|
3144
|
+
scaleX: number;
|
|
3145
|
+
scaleY: number;
|
|
3146
|
+
};
|
|
3147
|
+
onInit(): void;
|
|
3148
|
+
private setupEvents;
|
|
3149
|
+
private setState;
|
|
3150
|
+
private doVideoAdding;
|
|
3151
|
+
private addVideo;
|
|
3152
|
+
private handleAdding;
|
|
3153
|
+
trigger(cancelAction: () => void, params?: WeaveVideoToolActionTriggerParams): WeaveVideoToolActionTriggerReturn;
|
|
3154
|
+
cleanup(): void;
|
|
3155
|
+
private setCursor;
|
|
3156
|
+
}
|
|
3157
|
+
|
|
3158
|
+
//#endregion
|
|
3159
|
+
//#region src/plugins/stage-panning/constants.d.ts
|
|
3160
|
+
//# sourceMappingURL=video-tool.d.ts.map
|
|
3161
|
+
declare const WEAVE_STAGE_PANNING_KEY = "stagePanning";
|
|
3162
|
+
declare const WEAVE_STAGE_PANNING_DEFAULT_CONFIG: {
|
|
3163
|
+
edgePanOffset: number;
|
|
3164
|
+
edgePanSpeed: number;
|
|
3165
|
+
};
|
|
3166
|
+
|
|
3167
|
+
//#endregion
|
|
3168
|
+
//#region src/plugins/stage-minimap/types.d.ts
|
|
3169
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
3170
|
+
type WeaveStageMinimapPluginStyle = {
|
|
3171
|
+
viewportReference: Konva.RectConfig;
|
|
3172
|
+
};
|
|
3173
|
+
type WeaveStageMinimapPluginConfig = {
|
|
3174
|
+
getContainer: () => HTMLElement;
|
|
3175
|
+
id: string;
|
|
3176
|
+
width: number;
|
|
3177
|
+
fitToContentPadding: number;
|
|
3178
|
+
style: WeaveStageMinimapPluginStyle;
|
|
3179
|
+
};
|
|
3180
|
+
type WeaveStageMinimapPluginParams = {
|
|
3181
|
+
config: Pick<WeaveStageMinimapPluginConfig, 'getContainer' | 'id' | 'width' | 'fitToContentPadding'> & DeepPartial<Pick<WeaveStageMinimapPluginConfig, 'style'>>;
|
|
3182
|
+
};
|
|
3183
|
+
|
|
3184
|
+
//#endregion
|
|
3185
|
+
//#region src/plugins/stage-minimap/stage-minimap.d.ts
|
|
3186
|
+
//# sourceMappingURL=types.d.ts.map
|
|
3187
|
+
declare class WeaveStageMinimapPlugin extends WeavePlugin {
|
|
3188
|
+
getLayerName: undefined;
|
|
3189
|
+
initLayer: undefined;
|
|
3190
|
+
private readonly config;
|
|
3191
|
+
private minimapStage;
|
|
3192
|
+
private minimapLayer;
|
|
3193
|
+
private minimapStageImage;
|
|
3194
|
+
private minimapViewportReference;
|
|
3195
|
+
private initialized;
|
|
3196
|
+
private offscreenWorker;
|
|
3197
|
+
constructor(params: WeaveStageMinimapPluginParams);
|
|
3198
|
+
getName(): string;
|
|
3199
|
+
setupMinimap(): Promise<void>;
|
|
3200
|
+
private updateMinimapContent;
|
|
3201
|
+
private updateMinimapViewportReference;
|
|
3202
|
+
onRender(): void;
|
|
3203
|
+
onInit(): void;
|
|
3204
|
+
private showLayers;
|
|
3205
|
+
private hideLayers;
|
|
3206
|
+
enable(): void;
|
|
3207
|
+
disable(): void;
|
|
3208
|
+
}
|
|
3209
|
+
|
|
3210
|
+
//#endregion
|
|
3211
|
+
//#region src/plugins/stage-minimap/constants.d.ts
|
|
3212
|
+
//# sourceMappingURL=stage-minimap.d.ts.map
|
|
3213
|
+
declare const WEAVE_STAGE_MINIMAP_KEY = "stageMinimap";
|
|
3214
|
+
declare const STAGE_MINIMAP_DEFAULT_CONFIG: {
|
|
3215
|
+
style: {
|
|
3216
|
+
viewportReference: {
|
|
3217
|
+
fill: string;
|
|
3218
|
+
strokeScaleEnabled: boolean;
|
|
3219
|
+
stroke: string;
|
|
3220
|
+
strokeWidth: number;
|
|
3221
|
+
};
|
|
3222
|
+
};
|
|
3223
|
+
};
|
|
3224
|
+
|
|
3225
|
+
//#endregion
|
|
3226
|
+
//#region src/plugins/stage-resize/stage-resize.d.ts
|
|
3227
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
3228
|
+
declare class WeaveStageResizePlugin extends WeavePlugin {
|
|
3229
|
+
getLayerName: undefined;
|
|
3230
|
+
initLayer: undefined;
|
|
3231
|
+
onRender: undefined;
|
|
3232
|
+
getName(): string;
|
|
3233
|
+
private resizeStage;
|
|
3234
|
+
onInit(): void;
|
|
3235
|
+
enable(): void;
|
|
3236
|
+
disable(): void;
|
|
3237
|
+
}
|
|
3238
|
+
|
|
3239
|
+
//#endregion
|
|
3240
|
+
//#region src/plugins/nodes-selection/constants.d.ts
|
|
3241
|
+
//# sourceMappingURL=stage-resize.d.ts.map
|
|
3242
|
+
declare const WEAVE_NODES_SELECTION_KEY = "nodesSelection";
|
|
3243
|
+
declare const WEAVE_NODES_SELECTION_LAYER_ID = "selectionLayer";
|
|
3244
|
+
declare const WEAVE_NODES_SELECTION_DEFAULT_CONFIG: {
|
|
3245
|
+
selection: {
|
|
3246
|
+
rotationSnaps: number[];
|
|
3247
|
+
rotationSnapTolerance: number;
|
|
3248
|
+
ignoreStroke: boolean;
|
|
3249
|
+
rotateEnabled: boolean;
|
|
3250
|
+
resizeEnabled: boolean;
|
|
3251
|
+
flipEnabled: boolean;
|
|
3252
|
+
keepRatio: boolean;
|
|
3253
|
+
useSingleNodeRotation: boolean;
|
|
3254
|
+
shouldOverdrawWholeArea: boolean;
|
|
3255
|
+
enabledAnchors: string[];
|
|
3256
|
+
anchorStyleFunc: (anchor: any) => void;
|
|
3257
|
+
borderStroke: string;
|
|
3258
|
+
borderStrokeWidth: number;
|
|
3259
|
+
};
|
|
3260
|
+
hover: {
|
|
3261
|
+
borderStrokeWidth: number;
|
|
3262
|
+
};
|
|
3263
|
+
selectionArea: {
|
|
3264
|
+
fill: string;
|
|
3265
|
+
stroke: string;
|
|
3266
|
+
strokeWidth: number;
|
|
3267
|
+
dash: number[];
|
|
3268
|
+
};
|
|
3269
|
+
panningWhenSelection: {
|
|
3270
|
+
edgeThreshold: number;
|
|
3271
|
+
minScrollSpeed: number;
|
|
3272
|
+
maxScrollSpeed: number;
|
|
3273
|
+
};
|
|
3274
|
+
behaviors: {
|
|
3275
|
+
singleSelection: {
|
|
3276
|
+
enabled: boolean;
|
|
3277
|
+
};
|
|
3278
|
+
multipleSelection: {
|
|
3279
|
+
enabled: boolean;
|
|
3280
|
+
};
|
|
3281
|
+
onMultipleSelection: () => {
|
|
3282
|
+
resizeEnabled: boolean;
|
|
3283
|
+
rotateEnabled: boolean;
|
|
3284
|
+
enabledAnchors: string[];
|
|
3285
|
+
};
|
|
3286
|
+
};
|
|
3287
|
+
};
|
|
3288
|
+
|
|
3289
|
+
//#endregion
|
|
3290
|
+
//#region src/plugins/connected-users/constants.d.ts
|
|
3291
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
3292
|
+
declare const WEAVE_CONNECTED_USER_INFO_KEY = "userInfo";
|
|
3293
|
+
|
|
3294
|
+
//#endregion
|
|
3295
|
+
//#region src/plugins/connected-users/types.d.ts
|
|
3296
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
3297
|
+
type WeaveConnectedUsersPluginConfig = {
|
|
3298
|
+
getUser: () => WeaveUser;
|
|
3299
|
+
};
|
|
3300
|
+
type WeaveConnectedUsersPluginParams = {
|
|
3301
|
+
config: WeaveConnectedUsersPluginConfig;
|
|
3302
|
+
};
|
|
3303
|
+
type WeaveConnectedUsers = {
|
|
3304
|
+
[userName: string]: WeaveUser;
|
|
3305
|
+
};
|
|
3306
|
+
type WeaveConnectedUsersChangeEvent = WeaveConnectedUsers;
|
|
3307
|
+
type WeaveConnectedUserInfoKey = typeof WEAVE_CONNECTED_USER_INFO_KEY;
|
|
3308
|
+
|
|
3309
|
+
//#endregion
|
|
3310
|
+
//#region src/plugins/connected-users/connected-users.d.ts
|
|
3311
|
+
//# sourceMappingURL=types.d.ts.map
|
|
3312
|
+
declare class WeaveConnectedUsersPlugin extends WeavePlugin {
|
|
3313
|
+
private config;
|
|
3314
|
+
private connectedUsers;
|
|
3315
|
+
getLayerName: undefined;
|
|
3316
|
+
initLayer: undefined;
|
|
3317
|
+
onRender: undefined;
|
|
3318
|
+
constructor(params: WeaveConnectedUsersPluginParams);
|
|
3319
|
+
getName(): string;
|
|
3320
|
+
onInit(): void;
|
|
3321
|
+
enable(): void;
|
|
3322
|
+
disable(): void;
|
|
3323
|
+
}
|
|
3324
|
+
|
|
3325
|
+
//#endregion
|
|
3326
|
+
//#region src/plugins/users-selection/constants.d.ts
|
|
3327
|
+
//# sourceMappingURL=connected-users.d.ts.map
|
|
3328
|
+
declare const WEAVE_USERS_SELECTION_KEY = "usersSelection";
|
|
3329
|
+
declare const WEAVE_USER_SELECTION_KEY = "userSelection";
|
|
3330
|
+
|
|
3331
|
+
//#endregion
|
|
3332
|
+
//#region src/plugins/users-selection/types.d.ts
|
|
3333
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
3334
|
+
type WeaveUsersSelectionPluginConfig = {
|
|
3335
|
+
getUser: () => WeaveUser;
|
|
3336
|
+
getUserColor: (user: WeaveUser) => string | CanvasGradient | undefined;
|
|
3337
|
+
};
|
|
3338
|
+
type WeaveUsersSelectionPluginParams = {
|
|
3339
|
+
config: WeaveUsersSelectionPluginConfig;
|
|
3340
|
+
};
|
|
3341
|
+
type WeaveUserSelectionInfo = {
|
|
3342
|
+
rawUser: WeaveUser;
|
|
3343
|
+
user: string;
|
|
3344
|
+
nodes: string[];
|
|
3345
|
+
};
|
|
3346
|
+
type WeaveUserSelectionKey = typeof WEAVE_USER_SELECTION_KEY;
|
|
3347
|
+
|
|
3348
|
+
//#endregion
|
|
3349
|
+
//#region src/plugins/users-selection/users-selection.d.ts
|
|
3350
|
+
//# sourceMappingURL=types.d.ts.map
|
|
3351
|
+
declare class WeaveUsersSelectionPlugin extends WeavePlugin {
|
|
3352
|
+
private padding;
|
|
3353
|
+
private usersSelection;
|
|
3354
|
+
private config;
|
|
3355
|
+
constructor(params: WeaveUsersSelectionPluginParams);
|
|
3356
|
+
getName(): string;
|
|
3357
|
+
getLayerName(): string;
|
|
3358
|
+
initLayer(): void;
|
|
3359
|
+
onRender(): void;
|
|
3360
|
+
getLayer(): Konva.Layer | undefined;
|
|
3361
|
+
onInit(): void;
|
|
3362
|
+
sendSelectionAwarenessInfo(tr: Konva.Transformer): void;
|
|
3363
|
+
removeSelectionAwarenessInfo(): void;
|
|
3364
|
+
private getSelectedNodesRect;
|
|
3365
|
+
private renderSelectors;
|
|
3366
|
+
enable(): void;
|
|
3367
|
+
disable(): void;
|
|
3368
|
+
}
|
|
3369
|
+
|
|
3370
|
+
//#endregion
|
|
3371
|
+
//#region src/plugins/users-pointers/constants.d.ts
|
|
3372
|
+
//# sourceMappingURL=users-selection.d.ts.map
|
|
3373
|
+
declare const WEAVE_USERS_POINTERS_KEY = "usersPointers";
|
|
3374
|
+
declare const WEAVE_USER_POINTER_KEY = "userPointer";
|
|
3375
|
+
declare const WEAVE_DEFAULT_USER_INFO_FUNCTION: () => {
|
|
3376
|
+
name: string;
|
|
3377
|
+
email: string;
|
|
3378
|
+
};
|
|
3379
|
+
declare const WEAVE_USERS_POINTERS_CONFIG_DEFAULT_PROPS: {
|
|
3380
|
+
awarenessThrottleMs: number;
|
|
3381
|
+
ui: {
|
|
3382
|
+
separation: number;
|
|
3383
|
+
pointer: {
|
|
3384
|
+
circleRadius: number;
|
|
3385
|
+
circleStrokeWidth: number;
|
|
3386
|
+
};
|
|
3387
|
+
name: {
|
|
3388
|
+
fontFamily: string;
|
|
3389
|
+
fontSize: number;
|
|
3390
|
+
backgroundCornerRadius: number;
|
|
3391
|
+
backgroundPaddingX: number;
|
|
3392
|
+
backgroundPaddingY: number;
|
|
3393
|
+
};
|
|
3394
|
+
};
|
|
3395
|
+
};
|
|
3396
|
+
|
|
3397
|
+
//#endregion
|
|
3398
|
+
//#region src/plugins/users-pointers/types.d.ts
|
|
3399
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
3400
|
+
type WeaveUserPointersUIProperties = {
|
|
3401
|
+
separation: number;
|
|
3402
|
+
pointer: {
|
|
3403
|
+
circleRadius: number;
|
|
3404
|
+
circleStrokeWidth: number;
|
|
3405
|
+
};
|
|
3406
|
+
name: {
|
|
3407
|
+
fontFamily: string;
|
|
3408
|
+
fontSize: number;
|
|
3409
|
+
backgroundCornerRadius: number;
|
|
3410
|
+
backgroundPaddingX: number;
|
|
3411
|
+
backgroundPaddingY: number;
|
|
3412
|
+
};
|
|
3413
|
+
};
|
|
3414
|
+
type WeaveUsersPointersPluginConfig = {
|
|
3415
|
+
getUser: () => WeaveUser;
|
|
3416
|
+
getUserBackgroundColor: (user: WeaveUser) => string | CanvasGradient | undefined;
|
|
3417
|
+
getUserForegroundColor: (user: WeaveUser) => string | CanvasGradient | undefined;
|
|
3418
|
+
awarenessThrottleMs: number;
|
|
3419
|
+
ui: WeaveUserPointersUIProperties;
|
|
3420
|
+
};
|
|
3421
|
+
type WeaveUsersPointersPluginParams = {
|
|
3422
|
+
config: Pick<WeaveUsersPointersPluginConfig, 'getUser' | 'getUserBackgroundColor' | 'getUserForegroundColor'> & Partial<Omit<WeaveUsersPointersPluginConfig, 'getUser' | 'getUserBackgroundColor' | 'getUserForegroundColor'>>;
|
|
3423
|
+
};
|
|
3424
|
+
type WeaveUserPointer = {
|
|
3425
|
+
rawUser: WeaveUser;
|
|
3426
|
+
user: string;
|
|
3427
|
+
name: string;
|
|
3428
|
+
x: number;
|
|
3429
|
+
y: number;
|
|
3430
|
+
};
|
|
3431
|
+
type WeaveUserPointerKey = typeof WEAVE_USER_POINTER_KEY;
|
|
3432
|
+
|
|
3433
|
+
//#endregion
|
|
3434
|
+
//#region src/plugins/users-pointers/users-pointers.d.ts
|
|
3435
|
+
//# sourceMappingURL=types.d.ts.map
|
|
3436
|
+
declare class WeaveUsersPointersPlugin extends WeavePlugin {
|
|
3437
|
+
private usersPointers;
|
|
3438
|
+
private config;
|
|
3439
|
+
constructor(params: WeaveUsersPointersPluginParams);
|
|
3440
|
+
getName(): string;
|
|
3441
|
+
getLayerName(): string;
|
|
3442
|
+
initLayer(): void;
|
|
3443
|
+
onRender(): void;
|
|
3444
|
+
getLayer(): Konva.Layer | undefined;
|
|
3445
|
+
onInit(): void;
|
|
3446
|
+
private sendAwarenessUpdate;
|
|
3447
|
+
private renderPointers;
|
|
3448
|
+
enable(): void;
|
|
3449
|
+
disable(): void;
|
|
3450
|
+
}
|
|
3451
|
+
|
|
3452
|
+
//#endregion
|
|
3453
|
+
//#region src/plugins/stage-drop-area/stage-drop-area.d.ts
|
|
3454
|
+
//# sourceMappingURL=users-pointers.d.ts.map
|
|
3455
|
+
declare class WeaveStageDropAreaPlugin extends WeavePlugin {
|
|
3456
|
+
getLayerName: undefined;
|
|
3457
|
+
initLayer: undefined;
|
|
3458
|
+
onRender: undefined;
|
|
3459
|
+
constructor();
|
|
3460
|
+
getName(): string;
|
|
3461
|
+
onInit(): void;
|
|
3462
|
+
private initEvents;
|
|
3463
|
+
enable(): void;
|
|
3464
|
+
disable(): void;
|
|
3465
|
+
}
|
|
3466
|
+
|
|
3467
|
+
//#endregion
|
|
3468
|
+
//#region src/plugins/stage-drop-area/types.d.ts
|
|
3469
|
+
//# sourceMappingURL=stage-drop-area.d.ts.map
|
|
3470
|
+
type WeaveStageDropPluginOnStageDropEvent = DragEvent;
|
|
3471
|
+
|
|
3472
|
+
//#endregion
|
|
3473
|
+
//#region src/plugins/copy-paste-nodes/constants.d.ts
|
|
3474
|
+
//# sourceMappingURL=types.d.ts.map
|
|
3475
|
+
declare const WEAVE_COPY_PASTE_NODES_KEY = "copyPasteNodes";
|
|
3476
|
+
declare const WEAVE_COPY_PASTE_PASTE_CATCHER_ID = "weave-paste-catcher";
|
|
3477
|
+
declare const WEAVE_COPY_PASTE_PASTE_MODES: {
|
|
3478
|
+
readonly INTERNAL: "internal";
|
|
3479
|
+
readonly EXTERNAL: "external";
|
|
3480
|
+
readonly NOT_ALLOWED: "not-allowed";
|
|
3481
|
+
readonly CLIPBOARD_API_ERROR: "clipboard-api-error";
|
|
3482
|
+
readonly CLIPBOARD_API_NOT_SUPPORTED: "clipboard-api-not-supported";
|
|
3483
|
+
};
|
|
3484
|
+
declare const COPY_PASTE_NODES_PLUGIN_STATE: {
|
|
3485
|
+
readonly IDLE: "idle";
|
|
3486
|
+
readonly PASTING: "pasting";
|
|
3487
|
+
};
|
|
3488
|
+
declare const WEAVE_COPY_PASTE_CONFIG_DEFAULT: {
|
|
3489
|
+
readonly paddingOnPaste: {
|
|
3490
|
+
readonly enabled: false;
|
|
3491
|
+
readonly paddingX: 0;
|
|
3492
|
+
readonly paddingY: 0;
|
|
3493
|
+
};
|
|
3494
|
+
};
|
|
3495
|
+
|
|
3496
|
+
//#endregion
|
|
3497
|
+
//#region src/plugins/copy-paste-nodes/types.d.ts
|
|
3498
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
3499
|
+
type WeaveCopyPasteNodesPluginStateKeys = keyof typeof COPY_PASTE_NODES_PLUGIN_STATE;
|
|
3500
|
+
type WeaveCopyPasteNodesPluginState = (typeof COPY_PASTE_NODES_PLUGIN_STATE)[WeaveCopyPasteNodesPluginStateKeys];
|
|
3501
|
+
type WeaveCopyPasteNodesPluginOnCopyEvent = {
|
|
3502
|
+
error?: Error;
|
|
3503
|
+
} | undefined;
|
|
3504
|
+
type WeaveCopyPasteNodesPluginOnPasteEvent = {
|
|
3505
|
+
error?: Error;
|
|
3506
|
+
pastedNodes?: string[];
|
|
3507
|
+
};
|
|
3508
|
+
type WeaveCopyPasteNodesPluginOnPasteExternalEvent = {
|
|
3509
|
+
items?: ClipboardItems;
|
|
3510
|
+
dataList?: DataTransferItemList;
|
|
3511
|
+
positionCalculated: boolean;
|
|
3512
|
+
position: Konva.Vector2d;
|
|
3513
|
+
};
|
|
3514
|
+
type WeaveCopyPastePasteModeKeys = keyof typeof WEAVE_COPY_PASTE_PASTE_MODES;
|
|
3515
|
+
type WeaveCopyPastePasteMode = (typeof WEAVE_COPY_PASTE_PASTE_MODES)[WeaveCopyPastePasteModeKeys];
|
|
3516
|
+
type WeavePasteModel = {
|
|
3517
|
+
weaveInstanceId: string;
|
|
3518
|
+
weave: Record<string, {
|
|
3519
|
+
element: WeaveStateElement;
|
|
3520
|
+
posRelativeToSelection: Konva.Vector2d;
|
|
3521
|
+
containerId: string;
|
|
3522
|
+
}>;
|
|
3523
|
+
weaveMinPoint: Konva.Vector2d;
|
|
3524
|
+
};
|
|
3525
|
+
type WeaveToPasteNode = {
|
|
3526
|
+
konvaNode: Konva.Node;
|
|
3527
|
+
node: NodeSerializable;
|
|
3528
|
+
};
|
|
3529
|
+
type PaddingOnPaste = {
|
|
3530
|
+
enabled: boolean;
|
|
3531
|
+
paddingX: number;
|
|
3532
|
+
paddingY: number;
|
|
3533
|
+
};
|
|
3534
|
+
type WeaveCopyPasteNodesPluginConfig = {
|
|
3535
|
+
paddingOnPaste: PaddingOnPaste;
|
|
3536
|
+
};
|
|
3537
|
+
type WeaveCopyPasteNodesPluginParams = {
|
|
3538
|
+
config?: Partial<WeaveCopyPasteNodesPluginConfig>;
|
|
3539
|
+
};
|
|
3540
|
+
|
|
3541
|
+
//#endregion
|
|
3542
|
+
//#region src/plugins/copy-paste-nodes/copy-paste-nodes.d.ts
|
|
3543
|
+
//# sourceMappingURL=types.d.ts.map
|
|
3544
|
+
declare class WeaveCopyPasteNodesPlugin extends WeavePlugin {
|
|
3545
|
+
protected state: WeaveCopyPasteNodesPluginState;
|
|
3546
|
+
private readonly config;
|
|
3547
|
+
private lastInternalPasteSnapshot;
|
|
3548
|
+
private actualInternalPaddingX;
|
|
3549
|
+
private actualInternalPaddingY;
|
|
3550
|
+
private toPaste;
|
|
3551
|
+
getLayerName: undefined;
|
|
3552
|
+
initLayer: undefined;
|
|
3553
|
+
onRender: undefined;
|
|
3554
|
+
constructor(params?: Partial<WeaveCopyPasteNodesPluginParams>);
|
|
3555
|
+
getName(): string;
|
|
3556
|
+
onInit(): void;
|
|
3557
|
+
private writeClipboardData;
|
|
3558
|
+
private existsPasteCatcher;
|
|
3559
|
+
private createPasteCatcher;
|
|
3560
|
+
private getCatcherElement;
|
|
3561
|
+
private focusPasteCatcher;
|
|
3562
|
+
private checkIfInternalElementsAreNew;
|
|
3563
|
+
private updateInternalPastePadding;
|
|
3564
|
+
initEvents(): void;
|
|
3565
|
+
private sendExternalPasteEvent;
|
|
3566
|
+
private isWeaveData;
|
|
3567
|
+
private mapToPasteNodes;
|
|
3568
|
+
private setState;
|
|
3569
|
+
private recursivelyUpdateKeys;
|
|
3570
|
+
private handlePaste;
|
|
3571
|
+
private performCopy;
|
|
3572
|
+
copy(): Promise<void>;
|
|
3573
|
+
paste(position?: Konva.Vector2d, relativePosition?: Konva.Vector2d): Promise<void>;
|
|
3574
|
+
getSelectedNodes(): WeaveToPasteNode[];
|
|
3575
|
+
isPasting(): boolean;
|
|
3576
|
+
private cancel;
|
|
3577
|
+
private getNodesSelectionPlugin;
|
|
3578
|
+
isClipboardApiEnabled(): boolean;
|
|
3579
|
+
getAvailablePasteMode(canHandleExternal: (items: ClipboardItems) => Promise<boolean>): Promise<WeaveCopyPastePasteMode>;
|
|
3580
|
+
enable(): void;
|
|
3581
|
+
disable(): void;
|
|
3582
|
+
isClipboardAPIAvailable(): boolean;
|
|
3583
|
+
detectBrowser(): {
|
|
3584
|
+
isSafari: boolean;
|
|
3585
|
+
isFirefox: boolean;
|
|
3586
|
+
isChrome: boolean;
|
|
3587
|
+
isEdge: boolean;
|
|
3588
|
+
isIOS: boolean;
|
|
3589
|
+
};
|
|
3590
|
+
getStageGridPlugin(): WeaveStageGridPlugin | undefined;
|
|
3591
|
+
}
|
|
3592
|
+
|
|
3593
|
+
//#endregion
|
|
3594
|
+
//#region src/plugins/comments-renderer/types.d.ts
|
|
3595
|
+
//# sourceMappingURL=copy-paste-nodes.d.ts.map
|
|
3596
|
+
type WeaveCommentsRendererModel<T> = {
|
|
3597
|
+
getId: (comment: T) => string;
|
|
3598
|
+
getUser: (comment: T) => WeaveUser;
|
|
3599
|
+
getPosition: (comment: T) => Konva.Vector2d;
|
|
3600
|
+
getStatus: (comment: T) => WeaveCommentStatus;
|
|
3601
|
+
};
|
|
3602
|
+
type WeaveCommentsRendererPluginConfig<T> = {
|
|
3603
|
+
model: WeaveCommentsRendererModel<T>;
|
|
3604
|
+
getUser: () => WeaveUser;
|
|
3605
|
+
getUserBackgroundColor: (user: WeaveUser) => string | CanvasGradient | undefined;
|
|
3606
|
+
getUserForegroundColor: (user: WeaveUser) => string | CanvasGradient | undefined;
|
|
3607
|
+
};
|
|
3608
|
+
type WeaveCommentsRendererPluginParams<T> = {
|
|
3609
|
+
config: WeaveCommentsRendererPluginConfig<T>;
|
|
3610
|
+
};
|
|
3611
|
+
|
|
3612
|
+
//#endregion
|
|
3613
|
+
//#region src/plugins/comments-renderer/comments-renderer.d.ts
|
|
3614
|
+
//# sourceMappingURL=types.d.ts.map
|
|
3615
|
+
declare class WeaveCommentsRendererPlugin<T> extends WeavePlugin {
|
|
3616
|
+
private readonly config;
|
|
3617
|
+
private comments;
|
|
3618
|
+
getLayerName: undefined;
|
|
3619
|
+
initLayer: undefined;
|
|
3620
|
+
onRender: undefined;
|
|
3621
|
+
constructor(params: WeaveCommentsRendererPluginParams<T>);
|
|
3622
|
+
getName(): string;
|
|
3623
|
+
onInit(): void;
|
|
3624
|
+
setComments(comments: T[]): void;
|
|
3625
|
+
private initCommentsLayer;
|
|
3626
|
+
deleteComments(): void;
|
|
3627
|
+
render(): void;
|
|
3628
|
+
getCommentsLayer(): konva_lib_Layer7.Layer;
|
|
3629
|
+
enable(): void;
|
|
3630
|
+
disable(): void;
|
|
3631
|
+
}
|
|
3632
|
+
|
|
3633
|
+
//#endregion
|
|
3634
|
+
//#region src/plugins/comments-renderer/constants.d.ts
|
|
3635
|
+
//# sourceMappingURL=comments-renderer.d.ts.map
|
|
3636
|
+
declare const WEAVE_COMMENTS_RENDERER_KEY = "commentsRenderer";
|
|
3637
|
+
declare const WEAVE_COMMENTS_TOOL_LAYER_ID = "commentsLayer";
|
|
3638
|
+
|
|
3639
|
+
//#endregion
|
|
3640
|
+
//#region src/plugins/stage-keyboard-move/types.d.ts
|
|
3641
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
3642
|
+
type WeaveMoveOrientation = 'up' | 'down' | 'left' | 'right';
|
|
3643
|
+
type WeaveStageKeyboardMovePluginConfig = {
|
|
3644
|
+
movementDelta: number;
|
|
3645
|
+
};
|
|
3646
|
+
type WeaveStageKeyboardMovePluginParams = {
|
|
3647
|
+
config?: WeaveStageKeyboardMovePluginConfig;
|
|
3648
|
+
};
|
|
3649
|
+
|
|
3650
|
+
//#endregion
|
|
3651
|
+
//#region src/plugins/stage-keyboard-move/stage-keyboard-move.d.ts
|
|
3652
|
+
//# sourceMappingURL=types.d.ts.map
|
|
3653
|
+
declare class WeaveStageKeyboardMovePlugin extends WeavePlugin {
|
|
3654
|
+
private config;
|
|
3655
|
+
getLayerName: undefined;
|
|
3656
|
+
initLayer: undefined;
|
|
3657
|
+
onRender: undefined;
|
|
3658
|
+
constructor(params?: WeaveStageKeyboardMovePluginParams);
|
|
3659
|
+
getName(): string;
|
|
3660
|
+
handleNodesMovement(movementOrientation: WeaveMoveOrientation): void;
|
|
3661
|
+
onInit(): void;
|
|
3662
|
+
enable(): void;
|
|
3663
|
+
disable(): void;
|
|
3664
|
+
}
|
|
3665
|
+
|
|
3666
|
+
//#endregion
|
|
3667
|
+
//#region src/plugins/stage-keyboard-move/constants.d.ts
|
|
3668
|
+
//# sourceMappingURL=stage-keyboard-move.d.ts.map
|
|
3669
|
+
declare const WEAVE_STAGE_KEYBOARD_MOVE_KEY = "stageKeyboardMove";
|
|
3670
|
+
declare const WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG: {
|
|
3671
|
+
movementDelta: number;
|
|
3672
|
+
};
|
|
3673
|
+
|
|
3674
|
+
//#endregion
|
|
3675
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
3676
|
+
|
|
3677
|
+
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_DEFAULT_CONFIG, BRUSH_TOOL_STATE, COPY_PASTE_NODES_PLUGIN_STATE, CanvasFontDefinition, CanvasFonts, DistanceInfoH, DistanceInfoV, ELLIPSE_TOOL_ACTION_NAME, ELLIPSE_TOOL_STATE, ERASER_TOOL_ACTION_NAME, ERASER_TOOL_STATE, FRAME_TOOL_ACTION_NAME, FRAME_TOOL_STATE, GUIDE_DISTANCE_LINE_DEFAULT_CONFIG, 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, PaddingOnPaste, RECTANGLE_TOOL_ACTION_NAME, RECTANGLE_TOOL_STATE, REGULAR_POLYGON_TOOL_ACTION_NAME, REGULAR_POLYGON_TOOL_STATE, RenderWeaveRoom, SELECTION_TOOL_ACTION_NAME, SELECTION_TOOL_STATE, STAGE_MINIMAP_DEFAULT_CONFIG, STAR_TOOL_ACTION_NAME, STAR_TOOL_STATE, SkiaFontDefinition, SkiaFonts, TEXT_LAYOUT, TEXT_TOOL_ACTION_NAME, TEXT_TOOL_STATE, TextSerializable, VIDEO_TOOL_ACTION_NAME, VIDEO_TOOL_STATE, VideoBackgroundStyle, VideoIconBackgroundStyle, VideoIconStyle, VideoProps, VideoStyle, VideoTrackStyle, WEAVE_ARROW_NODE_TYPE, 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_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_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_DEFAULT_CONFIG, 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_DEFAULT_CONFIG, 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_PLUGIN_KEY, WEAVE_STAGE_KEYBOARD_MOVE_DEFAULT_CONFIG, WEAVE_STAGE_KEYBOARD_MOVE_KEY, WEAVE_STAGE_MINIMAP_KEY, WEAVE_STAGE_NODE_TYPE, WEAVE_STAGE_PANNING_DEFAULT_CONFIG, WEAVE_STAGE_PANNING_KEY, WEAVE_STAR_NODE_TYPE, WEAVE_STROKE_NODE_DEFAULT_CONFIG, WEAVE_STROKE_NODE_TYPE, WEAVE_TEXT_NODE_TYPE, WEAVE_USERS_POINTERS_CONFIG_DEFAULT_PROPS, WEAVE_USERS_POINTERS_KEY, WEAVE_USERS_SELECTION_KEY, WEAVE_USER_POINTER_KEY, WEAVE_USER_SELECTION_KEY, WEAVE_VIDEO_DEFAULT_CONFIG, WEAVE_VIDEO_NODE_TYPE, Weave, WeaveAction, WeaveActionPropsChangeEvent, WeaveAlignNodesToolAction, WeaveAlignNodesToolActionAlignTo, WeaveAlignNodesToolActionAlignToKeys, WeaveAlignNodesToolActionState, WeaveAlignNodesToolActionStateKeys, WeaveAlignNodesToolActionTriggerParams, WeaveArrowNode, WeaveArrowNodeParams, WeaveArrowProperties, WeaveArrowToolAction, WeaveArrowToolActionOnAddedEvent, WeaveArrowToolActionOnAddingEvent, WeaveArrowToolActionState, WeaveArrowToolActionStateKeys, WeaveBrushToolAction, WeaveBrushToolActionOnAddedEvent, WeaveBrushToolActionOnAddingEvent, WeaveBrushToolActionParams, WeaveBrushToolActionProperties, WeaveBrushToolActionState, WeaveBrushToolActionStateKeys, WeaveCommentNode, WeaveCommentNodeAction, WeaveCommentNodeActionKeys, WeaveCommentNodeConfig, WeaveCommentNodeCreateAction, WeaveCommentNodeCreateActionKeys, WeaveCommentNodeModel, WeaveCommentNodeOnCreateCommentEvent, WeaveCommentNodeOnDragEndEvent, WeaveCommentNodeOnFinishCreateEvent, WeaveCommentNodeOnViewEvent, WeaveCommentNodeParams, WeaveCommentNodeStyle, WeaveCommentNodeViewAction, WeaveCommentNodeViewActionKeys, WeaveCommentStatus, WeaveCommentStatusKeys, WeaveCommentToolAction, WeaveCommentToolActionConfig, WeaveCommentToolActionParams, WeaveCommentToolActionState, WeaveCommentToolActionStateKeys, WeaveCommentToolModel, WeaveCommentToolStyle, WeaveCommentsRendererModel, WeaveCommentsRendererPlugin, WeaveCommentsRendererPluginConfig, WeaveCommentsRendererPluginParams, WeaveConnectedUserInfoKey, WeaveConnectedUsers, WeaveConnectedUsersChangeEvent, WeaveConnectedUsersPlugin, WeaveConnectedUsersPluginConfig, WeaveConnectedUsersPluginParams, WeaveContextMenuPlugin, WeaveCopyPasteNodesPlugin, WeaveCopyPasteNodesPluginConfig, WeaveCopyPasteNodesPluginOnCopyEvent, WeaveCopyPasteNodesPluginOnPasteEvent, WeaveCopyPasteNodesPluginOnPasteExternalEvent, WeaveCopyPasteNodesPluginParams, 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, WeaveImageState, WeaveImageToolAction, WeaveImageToolActionOnAddedEvent, WeaveImageToolActionOnAddingEvent, WeaveImageToolActionOnEndLoadImageEvent, WeaveImageToolActionOnStartLoadImageEvent, WeaveImageToolActionState, WeaveImageToolActionStateKeys, WeaveImageToolActionTriggerParams, WeaveImageToolActionTriggerReturn, WeaveLayerNode, WeaveLineNode, WeaveLineNodeParams, WeaveLineProperties, WeaveMoveToolAction, WeaveMoveToolActionParams, WeaveMoveToolActionState, WeaveMoveToolActionStateKeys, WeaveNode, WeaveNodesDistanceSnappingPlugin, WeaveNodesDistanceSnappingPluginConfig, WeaveNodesDistanceSnappingPluginParams, WeaveNodesDistanceSnappingUIConfig, WeaveNodesEdgeSnappingPlugin, WeaveNodesEdgeSnappingPluginConfig, WeaveNodesEdgeSnappingPluginParams, WeaveNodesSelectionBehaviorsConfig, WeaveNodesSelectionConfig, WeaveNodesSelectionOnSelectionParams, WeaveNodesSelectionPanningOnSelectionConfig, 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, WeaveStageKeyboardMovePlugin, WeaveStageMinimapPlugin, WeaveStageMinimapPluginConfig, WeaveStageMinimapPluginParams, WeaveStageMinimapPluginStyle, WeaveStageNode, WeaveStagePanningPlugin, WeaveStagePanningPluginConfig, WeaveStagePanningPluginParams, 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, WeaveVideoNode, WeaveVideoNodeParams, WeaveVideoOnVideoPauseEvent, WeaveVideoOnVideoPlayEvent, WeaveVideoOnVideoStopEvent, WeaveVideoProperties, WeaveVideoState, WeaveVideoToolAction, WeaveVideoToolActionOnAddedEvent, WeaveVideoToolActionOnAddingEvent, WeaveVideoToolActionState, WeaveVideoToolActionStateKeys, WeaveVideoToolActionTriggerParams, WeaveVideoToolActionTriggerReturn, WeaveVideoToolActionTriggerVideoParams, WeaveVideoToolDragParams, WeaveZoomInToolAction, WeaveZoomInToolActionParams, WeaveZoomOutToolAction, WeaveZoomOutToolActionParams, canComposite, clearContainerTargets, containerOverCursor, containsNodeDeep, getBoundingBox, getExportBoundingBox, getPositionRelativeToContainerOnPosition, getSelectedNodesMetadata, getTargetAndSkipNodes, getTargetedNode, getTopmostShadowHost, getVisibleNodes, getVisibleNodesInViewport, hasFrames, hasImages, intersectArrays, isIOS, isInShadowDOM, isNodeInSelection, isServer, memoize, mergeExceptArrays, moveNodeToContainer, registerCanvasFonts, registerSkiaFonts, resetScale };
|
|
3678
|
+
//# sourceMappingURL=sdk.node.d.ts.map
|