@zsviczian/excalidraw 0.14.0-obsidian → 0.14.2-1-obsidian
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/README.md +16 -1823
- package/dist/excalidraw.development.js +282 -139
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +20 -0
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +33 -15
- package/types/actions/actionBoundText.d.ts +11 -5
- package/types/actions/actionCanvas.d.ts +225 -47
- package/types/actions/actionClipboard.d.ts +55 -25
- package/types/actions/actionDeleteSelected.d.ts +35 -17
- package/types/actions/actionExport.d.ts +99 -45
- package/types/actions/actionFinalize.d.ts +22 -10
- package/types/actions/actionLinearEditor.d.ts +11 -5
- package/types/actions/actionMenu.d.ts +33 -15
- package/types/actions/actionProperties.d.ts +143 -65
- package/types/actions/actionStyles.d.ts +11 -5
- package/types/actions/actionToggleGridMode.d.ts +11 -5
- package/types/actions/actionToggleLock.d.ts +11 -5
- package/types/actions/actionToggleStats.d.ts +11 -5
- package/types/actions/actionToggleViewMode.d.ts +11 -5
- package/types/actions/actionToggleZenMode.d.ts +11 -5
- package/types/actions/shortcuts.d.ts +1 -1
- package/types/actions/types.d.ts +1 -1
- package/types/appState.d.ts +8 -6
- package/types/components/ActiveConfirmDialog.d.ts +24 -0
- package/types/components/App.d.ts +3 -1
- package/types/components/HandButton.d.ts +10 -0
- package/types/components/LayerUI.d.ts +2 -2
- package/types/components/LockButton.d.ts +0 -1
- package/types/components/MobileMenu.d.ts +4 -4
- package/types/components/ToolButton.d.ts +1 -1
- package/types/components/context/tunnels.d.ts +16 -0
- package/types/components/dropdownMenu/DropdownMenu.d.ts +7 -5
- package/types/components/dropdownMenu/DropdownMenuContent.d.ts +7 -3
- package/types/components/dropdownMenu/DropdownMenuItem.d.ts +2 -3
- package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +3 -2
- package/types/components/dropdownMenu/common.d.ts +6 -0
- package/types/components/footer/Footer.d.ts +3 -4
- package/types/components/hoc/withInternalFallback.d.ts +4 -0
- package/types/components/icons.d.ts +1 -0
- package/types/components/main-menu/MainMenu.d.ts +14 -9
- package/types/components/welcome-screen/WelcomeScreen.d.ts +2 -2
- package/types/constants.d.ts +11 -1
- package/types/data/restore.d.ts +8 -2
- package/types/element/Hyperlink.d.ts +11 -5
- package/types/element/linearElementEditor.d.ts +12 -5
- package/types/element/newElement.d.ts +0 -3
- package/types/element/sortElements.d.ts +2 -0
- package/types/element/textElement.d.ts +9 -8
- package/types/element/typeChecks.d.ts +1 -1
- package/types/element/types.d.ts +0 -1
- package/types/i18n.d.ts +6 -0
- package/types/jotai.d.ts +5 -5
- package/types/keys.d.ts +0 -3
- package/types/math.d.ts +1 -0
- package/types/packages/excalidraw/example/App.d.ts +7 -1
- package/types/packages/excalidraw/index.d.ts +1 -1
- package/types/packages/utils.d.ts +1 -1
- package/types/types.d.ts +21 -24
- package/types/utils.d.ts +9 -19
|
@@ -53,16 +53,15 @@ export declare const actionCut: {
|
|
|
53
53
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
54
54
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
55
55
|
activeTool: {
|
|
56
|
-
|
|
57
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
56
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
58
57
|
locked: boolean;
|
|
58
|
+
} & ({
|
|
59
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
59
60
|
customType: null;
|
|
60
61
|
} | {
|
|
61
62
|
type: "custom";
|
|
62
63
|
customType: string;
|
|
63
|
-
|
|
64
|
-
locked: boolean;
|
|
65
|
-
};
|
|
64
|
+
});
|
|
66
65
|
penMode: boolean;
|
|
67
66
|
penDetected: boolean;
|
|
68
67
|
exportBackground: boolean;
|
|
@@ -114,6 +113,7 @@ export declare const actionCut: {
|
|
|
114
113
|
zenModeEnabled: boolean;
|
|
115
114
|
theme: string;
|
|
116
115
|
gridSize: number | null;
|
|
116
|
+
previousGridSize: number | null;
|
|
117
117
|
viewModeEnabled: boolean;
|
|
118
118
|
selectedGroupIds: {
|
|
119
119
|
[groupId: string]: boolean;
|
|
@@ -143,6 +143,12 @@ export declare const actionCut: {
|
|
|
143
143
|
elementBackground?: string[] | undefined;
|
|
144
144
|
elementStroke?: string[] | undefined;
|
|
145
145
|
};
|
|
146
|
+
allowWheelZoom?: boolean | undefined;
|
|
147
|
+
allowPinchZoom?: boolean | undefined;
|
|
148
|
+
pinnedScripts?: string[] | undefined;
|
|
149
|
+
customPens?: any[] | undefined;
|
|
150
|
+
currentStrokeOptions?: any;
|
|
151
|
+
resetCustomPen?: any;
|
|
146
152
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
147
153
|
};
|
|
148
154
|
commitToHistory: false;
|
|
@@ -195,16 +201,15 @@ export declare const actionCut: {
|
|
|
195
201
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
196
202
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
197
203
|
activeTool: {
|
|
198
|
-
|
|
199
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
204
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
200
205
|
locked: boolean;
|
|
206
|
+
} & ({
|
|
207
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
201
208
|
customType: null;
|
|
202
209
|
} | {
|
|
203
210
|
type: "custom";
|
|
204
211
|
customType: string;
|
|
205
|
-
|
|
206
|
-
locked: boolean;
|
|
207
|
-
};
|
|
212
|
+
});
|
|
208
213
|
penMode: boolean;
|
|
209
214
|
penDetected: boolean;
|
|
210
215
|
exportBackground: boolean;
|
|
@@ -256,6 +261,7 @@ export declare const actionCut: {
|
|
|
256
261
|
zenModeEnabled: boolean;
|
|
257
262
|
theme: string;
|
|
258
263
|
gridSize: number | null;
|
|
264
|
+
previousGridSize: number | null;
|
|
259
265
|
viewModeEnabled: boolean;
|
|
260
266
|
selectedGroupIds: {
|
|
261
267
|
[groupId: string]: boolean;
|
|
@@ -285,6 +291,12 @@ export declare const actionCut: {
|
|
|
285
291
|
elementBackground?: string[] | undefined;
|
|
286
292
|
elementStroke?: string[] | undefined;
|
|
287
293
|
};
|
|
294
|
+
allowWheelZoom?: boolean | undefined;
|
|
295
|
+
allowPinchZoom?: boolean | undefined;
|
|
296
|
+
pinnedScripts?: string[] | undefined;
|
|
297
|
+
customPens?: any[] | undefined;
|
|
298
|
+
currentStrokeOptions?: any;
|
|
299
|
+
resetCustomPen?: any;
|
|
288
300
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
289
301
|
};
|
|
290
302
|
commitToHistory: true;
|
|
@@ -292,16 +304,15 @@ export declare const actionCut: {
|
|
|
292
304
|
elements: import("../element/types").ExcalidrawElement[];
|
|
293
305
|
appState: {
|
|
294
306
|
activeTool: {
|
|
295
|
-
|
|
296
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
307
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
297
308
|
locked: boolean;
|
|
309
|
+
} & ({
|
|
310
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
298
311
|
customType: null;
|
|
299
312
|
} | {
|
|
300
313
|
type: "custom";
|
|
301
314
|
customType: string;
|
|
302
|
-
|
|
303
|
-
locked: boolean;
|
|
304
|
-
};
|
|
315
|
+
});
|
|
305
316
|
multiElement: null;
|
|
306
317
|
selectedElementIds: {};
|
|
307
318
|
contextMenu: {
|
|
@@ -368,6 +379,7 @@ export declare const actionCut: {
|
|
|
368
379
|
zenModeEnabled: boolean;
|
|
369
380
|
theme: string;
|
|
370
381
|
gridSize: number | null;
|
|
382
|
+
previousGridSize: number | null;
|
|
371
383
|
viewModeEnabled: boolean;
|
|
372
384
|
selectedGroupIds: {
|
|
373
385
|
[groupId: string]: boolean;
|
|
@@ -397,6 +409,12 @@ export declare const actionCut: {
|
|
|
397
409
|
elementBackground?: string[] | undefined;
|
|
398
410
|
elementStroke?: string[] | undefined;
|
|
399
411
|
};
|
|
412
|
+
allowWheelZoom?: boolean | undefined;
|
|
413
|
+
allowPinchZoom?: boolean | undefined;
|
|
414
|
+
pinnedScripts?: string[] | undefined;
|
|
415
|
+
customPens?: any[] | undefined;
|
|
416
|
+
currentStrokeOptions?: any;
|
|
417
|
+
resetCustomPen?: any;
|
|
400
418
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
401
419
|
};
|
|
402
420
|
commitToHistory: boolean;
|
|
@@ -435,16 +453,15 @@ export declare const actionCopyAsSvg: {
|
|
|
435
453
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
436
454
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
437
455
|
activeTool: {
|
|
438
|
-
|
|
439
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
456
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
440
457
|
locked: boolean;
|
|
458
|
+
} & ({
|
|
459
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
441
460
|
customType: null;
|
|
442
461
|
} | {
|
|
443
462
|
type: "custom";
|
|
444
463
|
customType: string;
|
|
445
|
-
|
|
446
|
-
locked: boolean;
|
|
447
|
-
};
|
|
464
|
+
});
|
|
448
465
|
penMode: boolean;
|
|
449
466
|
penDetected: boolean;
|
|
450
467
|
exportBackground: boolean;
|
|
@@ -496,6 +513,7 @@ export declare const actionCopyAsSvg: {
|
|
|
496
513
|
zenModeEnabled: boolean;
|
|
497
514
|
theme: string;
|
|
498
515
|
gridSize: number | null;
|
|
516
|
+
previousGridSize: number | null;
|
|
499
517
|
viewModeEnabled: boolean;
|
|
500
518
|
selectedGroupIds: {
|
|
501
519
|
[groupId: string]: boolean;
|
|
@@ -525,6 +543,12 @@ export declare const actionCopyAsSvg: {
|
|
|
525
543
|
elementBackground?: string[] | undefined;
|
|
526
544
|
elementStroke?: string[] | undefined;
|
|
527
545
|
};
|
|
546
|
+
allowWheelZoom?: boolean | undefined;
|
|
547
|
+
allowPinchZoom?: boolean | undefined;
|
|
548
|
+
pinnedScripts?: string[] | undefined;
|
|
549
|
+
customPens?: any[] | undefined;
|
|
550
|
+
currentStrokeOptions?: any;
|
|
551
|
+
resetCustomPen?: any;
|
|
528
552
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
529
553
|
};
|
|
530
554
|
commitToHistory: false;
|
|
@@ -562,16 +586,15 @@ export declare const actionCopyAsPng: {
|
|
|
562
586
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
563
587
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
564
588
|
activeTool: {
|
|
565
|
-
|
|
566
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
589
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
567
590
|
locked: boolean;
|
|
591
|
+
} & ({
|
|
592
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
568
593
|
customType: null;
|
|
569
594
|
} | {
|
|
570
595
|
type: "custom";
|
|
571
596
|
customType: string;
|
|
572
|
-
|
|
573
|
-
locked: boolean;
|
|
574
|
-
};
|
|
597
|
+
});
|
|
575
598
|
penMode: boolean;
|
|
576
599
|
penDetected: boolean;
|
|
577
600
|
exportBackground: boolean;
|
|
@@ -623,6 +646,7 @@ export declare const actionCopyAsPng: {
|
|
|
623
646
|
zenModeEnabled: boolean;
|
|
624
647
|
theme: string;
|
|
625
648
|
gridSize: number | null;
|
|
649
|
+
previousGridSize: number | null;
|
|
626
650
|
viewModeEnabled: boolean;
|
|
627
651
|
selectedGroupIds: {
|
|
628
652
|
[groupId: string]: boolean;
|
|
@@ -652,6 +676,12 @@ export declare const actionCopyAsPng: {
|
|
|
652
676
|
elementBackground?: string[] | undefined;
|
|
653
677
|
elementStroke?: string[] | undefined;
|
|
654
678
|
};
|
|
679
|
+
allowWheelZoom?: boolean | undefined;
|
|
680
|
+
allowPinchZoom?: boolean | undefined;
|
|
681
|
+
pinnedScripts?: string[] | undefined;
|
|
682
|
+
customPens?: any[] | undefined;
|
|
683
|
+
currentStrokeOptions?: any;
|
|
684
|
+
resetCustomPen?: any;
|
|
655
685
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
656
686
|
};
|
|
657
687
|
commitToHistory: false;
|
|
@@ -29,16 +29,15 @@ export declare const actionDeleteSelected: {
|
|
|
29
29
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
30
30
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
31
31
|
activeTool: {
|
|
32
|
-
|
|
33
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
32
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
34
33
|
locked: boolean;
|
|
34
|
+
} & ({
|
|
35
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
35
36
|
customType: null;
|
|
36
37
|
} | {
|
|
37
38
|
type: "custom";
|
|
38
39
|
customType: string;
|
|
39
|
-
|
|
40
|
-
locked: boolean;
|
|
41
|
-
};
|
|
40
|
+
});
|
|
42
41
|
penMode: boolean;
|
|
43
42
|
penDetected: boolean;
|
|
44
43
|
exportBackground: boolean;
|
|
@@ -90,6 +89,7 @@ export declare const actionDeleteSelected: {
|
|
|
90
89
|
zenModeEnabled: boolean;
|
|
91
90
|
theme: string;
|
|
92
91
|
gridSize: number | null;
|
|
92
|
+
previousGridSize: number | null;
|
|
93
93
|
viewModeEnabled: boolean;
|
|
94
94
|
selectedGroupIds: {
|
|
95
95
|
[groupId: string]: boolean;
|
|
@@ -119,6 +119,12 @@ export declare const actionDeleteSelected: {
|
|
|
119
119
|
elementBackground?: string[] | undefined;
|
|
120
120
|
elementStroke?: string[] | undefined;
|
|
121
121
|
};
|
|
122
|
+
allowWheelZoom?: boolean | undefined;
|
|
123
|
+
allowPinchZoom?: boolean | undefined;
|
|
124
|
+
pinnedScripts?: string[] | undefined;
|
|
125
|
+
customPens?: any[] | undefined;
|
|
126
|
+
currentStrokeOptions?: any;
|
|
127
|
+
resetCustomPen?: any;
|
|
122
128
|
selectedLinearElement: LinearElementEditor | null;
|
|
123
129
|
};
|
|
124
130
|
commitToHistory: false;
|
|
@@ -171,16 +177,15 @@ export declare const actionDeleteSelected: {
|
|
|
171
177
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
172
178
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
173
179
|
activeTool: {
|
|
174
|
-
|
|
175
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
180
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
176
181
|
locked: boolean;
|
|
182
|
+
} & ({
|
|
183
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
177
184
|
customType: null;
|
|
178
185
|
} | {
|
|
179
186
|
type: "custom";
|
|
180
187
|
customType: string;
|
|
181
|
-
|
|
182
|
-
locked: boolean;
|
|
183
|
-
};
|
|
188
|
+
});
|
|
184
189
|
penMode: boolean;
|
|
185
190
|
penDetected: boolean;
|
|
186
191
|
exportBackground: boolean;
|
|
@@ -232,6 +237,7 @@ export declare const actionDeleteSelected: {
|
|
|
232
237
|
zenModeEnabled: boolean;
|
|
233
238
|
theme: string;
|
|
234
239
|
gridSize: number | null;
|
|
240
|
+
previousGridSize: number | null;
|
|
235
241
|
viewModeEnabled: boolean;
|
|
236
242
|
selectedGroupIds: {
|
|
237
243
|
[groupId: string]: boolean;
|
|
@@ -261,6 +267,12 @@ export declare const actionDeleteSelected: {
|
|
|
261
267
|
elementBackground?: string[] | undefined;
|
|
262
268
|
elementStroke?: string[] | undefined;
|
|
263
269
|
};
|
|
270
|
+
allowWheelZoom?: boolean | undefined;
|
|
271
|
+
allowPinchZoom?: boolean | undefined;
|
|
272
|
+
pinnedScripts?: string[] | undefined;
|
|
273
|
+
customPens?: any[] | undefined;
|
|
274
|
+
currentStrokeOptions?: any;
|
|
275
|
+
resetCustomPen?: any;
|
|
264
276
|
selectedLinearElement: LinearElementEditor | null;
|
|
265
277
|
};
|
|
266
278
|
commitToHistory: true;
|
|
@@ -268,16 +280,15 @@ export declare const actionDeleteSelected: {
|
|
|
268
280
|
elements: ExcalidrawElement[];
|
|
269
281
|
appState: {
|
|
270
282
|
activeTool: {
|
|
271
|
-
|
|
272
|
-
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
283
|
+
lastActiveTool: import("../types").LastActiveTool;
|
|
273
284
|
locked: boolean;
|
|
285
|
+
} & ({
|
|
286
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
274
287
|
customType: null;
|
|
275
288
|
} | {
|
|
276
289
|
type: "custom";
|
|
277
290
|
customType: string;
|
|
278
|
-
|
|
279
|
-
locked: boolean;
|
|
280
|
-
};
|
|
291
|
+
});
|
|
281
292
|
multiElement: null;
|
|
282
293
|
selectedElementIds: {};
|
|
283
294
|
contextMenu: {
|
|
@@ -344,6 +355,7 @@ export declare const actionDeleteSelected: {
|
|
|
344
355
|
zenModeEnabled: boolean;
|
|
345
356
|
theme: string;
|
|
346
357
|
gridSize: number | null;
|
|
358
|
+
previousGridSize: number | null;
|
|
347
359
|
viewModeEnabled: boolean;
|
|
348
360
|
selectedGroupIds: {
|
|
349
361
|
[groupId: string]: boolean;
|
|
@@ -373,13 +385,19 @@ export declare const actionDeleteSelected: {
|
|
|
373
385
|
elementBackground?: string[] | undefined;
|
|
374
386
|
elementStroke?: string[] | undefined;
|
|
375
387
|
};
|
|
388
|
+
allowWheelZoom?: boolean | undefined;
|
|
389
|
+
allowPinchZoom?: boolean | undefined;
|
|
390
|
+
pinnedScripts?: string[] | undefined;
|
|
391
|
+
customPens?: any[] | undefined;
|
|
392
|
+
currentStrokeOptions?: any;
|
|
393
|
+
resetCustomPen?: any;
|
|
376
394
|
selectedLinearElement: LinearElementEditor | null;
|
|
377
395
|
};
|
|
378
396
|
commitToHistory: boolean;
|
|
379
397
|
};
|
|
380
398
|
contextItemLabel: string;
|
|
381
|
-
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element
|
|
399
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[]) => boolean;
|
|
382
400
|
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
383
401
|
} & {
|
|
384
|
-
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element
|
|
402
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[]) => boolean) | undefined;
|
|
385
403
|
};
|