@zsviczian/excalidraw 0.11.0-obsidian-22 → 0.11.0-obsidian-24
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/excalidraw.development.js +393 -361
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +6 -3
- package/types/actions/actionBoundText.d.ts +2 -1
- package/types/actions/actionCanvas.d.ts +18 -9
- package/types/actions/actionClipboard.d.ts +10 -5
- package/types/actions/actionDeleteSelected.d.ts +6 -3
- package/types/actions/actionExport.d.ts +18 -9
- package/types/actions/actionFinalize.d.ts +5 -3
- package/types/actions/actionMenu.d.ts +6 -3
- package/types/actions/actionProperties.d.ts +26 -13
- package/types/actions/actionStyles.d.ts +2 -1
- package/types/actions/actionToggleGridMode.d.ts +2 -1
- package/types/actions/actionToggleStats.d.ts +2 -1
- package/types/actions/actionToggleViewMode.d.ts +2 -1
- package/types/actions/actionToggleZenMode.d.ts +2 -1
- package/types/appState.d.ts +2 -0
- package/types/components/App.d.ts +11 -7
- package/types/components/LayerUI.d.ts +4 -3
- package/types/components/LibraryMenuItems.d.ts +2 -1
- package/types/components/MobileMenu.d.ts +2 -1
- package/types/components/SidebarLockButton.d.ts +9 -0
- package/types/components/Stack.d.ts +1 -1
- package/types/constants.d.ts +3 -0
- package/types/element/Hyperlink.d.ts +2 -1
- package/types/element/linearElementEditor.d.ts +2 -1
- package/types/packages/excalidraw/dist/excalidraw.production.min.d.ts +1 -1
- package/types/packages/excalidraw/entry.d.ts +0 -2
- package/types/packages/excalidraw/index.d.ts +1 -2
- package/types/types.d.ts +15 -13
- package/types/utils.d.ts +1 -0
|
@@ -101,6 +101,7 @@ export declare const actionChangeFillStyle: {
|
|
|
101
101
|
offsetTop: number;
|
|
102
102
|
offsetLeft: number;
|
|
103
103
|
isLibraryOpen: boolean;
|
|
104
|
+
isLibraryMenuDocked: boolean;
|
|
104
105
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
105
106
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
106
107
|
showStats: boolean;
|
|
@@ -112,7 +113,7 @@ export declare const actionChangeFillStyle: {
|
|
|
112
113
|
shown: true;
|
|
113
114
|
data: import("../charts").Spreadsheet;
|
|
114
115
|
};
|
|
115
|
-
|
|
116
|
+
pendingImageElementId: string | null;
|
|
116
117
|
showHyperlinkPopup: false | "info" | "editor";
|
|
117
118
|
linkOpacity: number;
|
|
118
119
|
trayModeEnabled: boolean;
|
|
@@ -212,6 +213,7 @@ export declare const actionChangeStrokeWidth: {
|
|
|
212
213
|
offsetTop: number;
|
|
213
214
|
offsetLeft: number;
|
|
214
215
|
isLibraryOpen: boolean;
|
|
216
|
+
isLibraryMenuDocked: boolean;
|
|
215
217
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
216
218
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
217
219
|
showStats: boolean;
|
|
@@ -223,7 +225,7 @@ export declare const actionChangeStrokeWidth: {
|
|
|
223
225
|
shown: true;
|
|
224
226
|
data: import("../charts").Spreadsheet;
|
|
225
227
|
};
|
|
226
|
-
|
|
228
|
+
pendingImageElementId: string | null;
|
|
227
229
|
showHyperlinkPopup: false | "info" | "editor";
|
|
228
230
|
linkOpacity: number;
|
|
229
231
|
trayModeEnabled: boolean;
|
|
@@ -323,6 +325,7 @@ export declare const actionChangeSloppiness: {
|
|
|
323
325
|
offsetTop: number;
|
|
324
326
|
offsetLeft: number;
|
|
325
327
|
isLibraryOpen: boolean;
|
|
328
|
+
isLibraryMenuDocked: boolean;
|
|
326
329
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
327
330
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
328
331
|
showStats: boolean;
|
|
@@ -334,7 +337,7 @@ export declare const actionChangeSloppiness: {
|
|
|
334
337
|
shown: true;
|
|
335
338
|
data: import("../charts").Spreadsheet;
|
|
336
339
|
};
|
|
337
|
-
|
|
340
|
+
pendingImageElementId: string | null;
|
|
338
341
|
showHyperlinkPopup: false | "info" | "editor";
|
|
339
342
|
linkOpacity: number;
|
|
340
343
|
trayModeEnabled: boolean;
|
|
@@ -434,6 +437,7 @@ export declare const actionChangeStrokeStyle: {
|
|
|
434
437
|
offsetTop: number;
|
|
435
438
|
offsetLeft: number;
|
|
436
439
|
isLibraryOpen: boolean;
|
|
440
|
+
isLibraryMenuDocked: boolean;
|
|
437
441
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
438
442
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
439
443
|
showStats: boolean;
|
|
@@ -445,7 +449,7 @@ export declare const actionChangeStrokeStyle: {
|
|
|
445
449
|
shown: true;
|
|
446
450
|
data: import("../charts").Spreadsheet;
|
|
447
451
|
};
|
|
448
|
-
|
|
452
|
+
pendingImageElementId: string | null;
|
|
449
453
|
showHyperlinkPopup: false | "info" | "editor";
|
|
450
454
|
linkOpacity: number;
|
|
451
455
|
trayModeEnabled: boolean;
|
|
@@ -545,6 +549,7 @@ export declare const actionChangeOpacity: {
|
|
|
545
549
|
offsetTop: number;
|
|
546
550
|
offsetLeft: number;
|
|
547
551
|
isLibraryOpen: boolean;
|
|
552
|
+
isLibraryMenuDocked: boolean;
|
|
548
553
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
549
554
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
550
555
|
showStats: boolean;
|
|
@@ -556,7 +561,7 @@ export declare const actionChangeOpacity: {
|
|
|
556
561
|
shown: true;
|
|
557
562
|
data: import("../charts").Spreadsheet;
|
|
558
563
|
};
|
|
559
|
-
|
|
564
|
+
pendingImageElementId: string | null;
|
|
560
565
|
showHyperlinkPopup: false | "info" | "editor";
|
|
561
566
|
linkOpacity: number;
|
|
562
567
|
trayModeEnabled: boolean;
|
|
@@ -656,6 +661,7 @@ export declare const actionChangeFontSize: {
|
|
|
656
661
|
offsetTop: number;
|
|
657
662
|
offsetLeft: number;
|
|
658
663
|
isLibraryOpen: boolean;
|
|
664
|
+
isLibraryMenuDocked: boolean;
|
|
659
665
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
660
666
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
661
667
|
showStats: boolean;
|
|
@@ -667,7 +673,7 @@ export declare const actionChangeFontSize: {
|
|
|
667
673
|
shown: true;
|
|
668
674
|
data: import("../charts").Spreadsheet;
|
|
669
675
|
};
|
|
670
|
-
|
|
676
|
+
pendingImageElementId: string | null;
|
|
671
677
|
showHyperlinkPopup: false | "info" | "editor";
|
|
672
678
|
linkOpacity: number;
|
|
673
679
|
trayModeEnabled: boolean;
|
|
@@ -767,6 +773,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
767
773
|
offsetTop: number;
|
|
768
774
|
offsetLeft: number;
|
|
769
775
|
isLibraryOpen: boolean;
|
|
776
|
+
isLibraryMenuDocked: boolean;
|
|
770
777
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
771
778
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
772
779
|
showStats: boolean;
|
|
@@ -778,7 +785,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
778
785
|
shown: true;
|
|
779
786
|
data: import("../charts").Spreadsheet;
|
|
780
787
|
};
|
|
781
|
-
|
|
788
|
+
pendingImageElementId: string | null;
|
|
782
789
|
showHyperlinkPopup: false | "info" | "editor";
|
|
783
790
|
linkOpacity: number;
|
|
784
791
|
trayModeEnabled: boolean;
|
|
@@ -878,6 +885,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
878
885
|
offsetTop: number;
|
|
879
886
|
offsetLeft: number;
|
|
880
887
|
isLibraryOpen: boolean;
|
|
888
|
+
isLibraryMenuDocked: boolean;
|
|
881
889
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
882
890
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
883
891
|
showStats: boolean;
|
|
@@ -889,7 +897,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
889
897
|
shown: true;
|
|
890
898
|
data: import("../charts").Spreadsheet;
|
|
891
899
|
};
|
|
892
|
-
|
|
900
|
+
pendingImageElementId: string | null;
|
|
893
901
|
showHyperlinkPopup: false | "info" | "editor";
|
|
894
902
|
linkOpacity: number;
|
|
895
903
|
trayModeEnabled: boolean;
|
|
@@ -989,6 +997,7 @@ export declare const actionChangeFontFamily: {
|
|
|
989
997
|
offsetTop: number;
|
|
990
998
|
offsetLeft: number;
|
|
991
999
|
isLibraryOpen: boolean;
|
|
1000
|
+
isLibraryMenuDocked: boolean;
|
|
992
1001
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
993
1002
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
994
1003
|
showStats: boolean;
|
|
@@ -1000,7 +1009,7 @@ export declare const actionChangeFontFamily: {
|
|
|
1000
1009
|
shown: true;
|
|
1001
1010
|
data: import("../charts").Spreadsheet;
|
|
1002
1011
|
};
|
|
1003
|
-
|
|
1012
|
+
pendingImageElementId: string | null;
|
|
1004
1013
|
showHyperlinkPopup: false | "info" | "editor";
|
|
1005
1014
|
linkOpacity: number;
|
|
1006
1015
|
trayModeEnabled: boolean;
|
|
@@ -1100,6 +1109,7 @@ export declare const actionChangeTextAlign: {
|
|
|
1100
1109
|
offsetTop: number;
|
|
1101
1110
|
offsetLeft: number;
|
|
1102
1111
|
isLibraryOpen: boolean;
|
|
1112
|
+
isLibraryMenuDocked: boolean;
|
|
1103
1113
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
1104
1114
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
1105
1115
|
showStats: boolean;
|
|
@@ -1111,7 +1121,7 @@ export declare const actionChangeTextAlign: {
|
|
|
1111
1121
|
shown: true;
|
|
1112
1122
|
data: import("../charts").Spreadsheet;
|
|
1113
1123
|
};
|
|
1114
|
-
|
|
1124
|
+
pendingImageElementId: string | null;
|
|
1115
1125
|
showHyperlinkPopup: false | "info" | "editor";
|
|
1116
1126
|
linkOpacity: number;
|
|
1117
1127
|
trayModeEnabled: boolean;
|
|
@@ -1213,6 +1223,7 @@ export declare const actionChangeVerticalAlign: {
|
|
|
1213
1223
|
offsetTop: number;
|
|
1214
1224
|
offsetLeft: number;
|
|
1215
1225
|
isLibraryOpen: boolean;
|
|
1226
|
+
isLibraryMenuDocked: boolean;
|
|
1216
1227
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
1217
1228
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
1218
1229
|
showStats: boolean;
|
|
@@ -1224,7 +1235,7 @@ export declare const actionChangeVerticalAlign: {
|
|
|
1224
1235
|
shown: true;
|
|
1225
1236
|
data: import("../charts").Spreadsheet;
|
|
1226
1237
|
};
|
|
1227
|
-
|
|
1238
|
+
pendingImageElementId: string | null;
|
|
1228
1239
|
showHyperlinkPopup: false | "info" | "editor";
|
|
1229
1240
|
linkOpacity: number;
|
|
1230
1241
|
trayModeEnabled: boolean;
|
|
@@ -1324,6 +1335,7 @@ export declare const actionChangeSharpness: {
|
|
|
1324
1335
|
offsetTop: number;
|
|
1325
1336
|
offsetLeft: number;
|
|
1326
1337
|
isLibraryOpen: boolean;
|
|
1338
|
+
isLibraryMenuDocked: boolean;
|
|
1327
1339
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
1328
1340
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
1329
1341
|
showStats: boolean;
|
|
@@ -1335,7 +1347,7 @@ export declare const actionChangeSharpness: {
|
|
|
1335
1347
|
shown: true;
|
|
1336
1348
|
data: import("../charts").Spreadsheet;
|
|
1337
1349
|
};
|
|
1338
|
-
|
|
1350
|
+
pendingImageElementId: string | null;
|
|
1339
1351
|
showHyperlinkPopup: false | "info" | "editor";
|
|
1340
1352
|
linkOpacity: number;
|
|
1341
1353
|
trayModeEnabled: boolean;
|
|
@@ -1438,6 +1450,7 @@ export declare const actionChangeArrowhead: {
|
|
|
1438
1450
|
offsetTop: number;
|
|
1439
1451
|
offsetLeft: number;
|
|
1440
1452
|
isLibraryOpen: boolean;
|
|
1453
|
+
isLibraryMenuDocked: boolean;
|
|
1441
1454
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
1442
1455
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
1443
1456
|
showStats: boolean;
|
|
@@ -1449,7 +1462,7 @@ export declare const actionChangeArrowhead: {
|
|
|
1449
1462
|
shown: true;
|
|
1450
1463
|
data: import("../charts").Spreadsheet;
|
|
1451
1464
|
};
|
|
1452
|
-
|
|
1465
|
+
pendingImageElementId: string | null;
|
|
1453
1466
|
showHyperlinkPopup: false | "info" | "editor";
|
|
1454
1467
|
linkOpacity: number;
|
|
1455
1468
|
trayModeEnabled: boolean;
|
|
@@ -85,6 +85,7 @@ export declare const actionCopyStyles: {
|
|
|
85
85
|
offsetTop: number;
|
|
86
86
|
offsetLeft: number;
|
|
87
87
|
isLibraryOpen: boolean;
|
|
88
|
+
isLibraryMenuDocked: boolean;
|
|
88
89
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
89
90
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
90
91
|
showStats: boolean;
|
|
@@ -96,7 +97,7 @@ export declare const actionCopyStyles: {
|
|
|
96
97
|
shown: true;
|
|
97
98
|
data: import("../charts").Spreadsheet;
|
|
98
99
|
};
|
|
99
|
-
|
|
100
|
+
pendingImageElementId: string | null;
|
|
100
101
|
showHyperlinkPopup: false | "info" | "editor";
|
|
101
102
|
linkOpacity: number;
|
|
102
103
|
trayModeEnabled: boolean;
|
|
@@ -86,6 +86,7 @@ export declare const actionToggleGridMode: {
|
|
|
86
86
|
offsetTop: number;
|
|
87
87
|
offsetLeft: number;
|
|
88
88
|
isLibraryOpen: boolean;
|
|
89
|
+
isLibraryMenuDocked: boolean;
|
|
89
90
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
90
91
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
91
92
|
showStats: boolean;
|
|
@@ -97,7 +98,7 @@ export declare const actionToggleGridMode: {
|
|
|
97
98
|
shown: true;
|
|
98
99
|
data: import("../charts").Spreadsheet;
|
|
99
100
|
};
|
|
100
|
-
|
|
101
|
+
pendingImageElementId: string | null;
|
|
101
102
|
showHyperlinkPopup: false | "info" | "editor";
|
|
102
103
|
linkOpacity: number;
|
|
103
104
|
trayModeEnabled: boolean;
|
|
@@ -85,6 +85,7 @@ export declare const actionToggleStats: {
|
|
|
85
85
|
offsetTop: number;
|
|
86
86
|
offsetLeft: number;
|
|
87
87
|
isLibraryOpen: boolean;
|
|
88
|
+
isLibraryMenuDocked: boolean;
|
|
88
89
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
89
90
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
90
91
|
currentChartType: import("../element/types").ChartType;
|
|
@@ -95,7 +96,7 @@ export declare const actionToggleStats: {
|
|
|
95
96
|
shown: true;
|
|
96
97
|
data: import("../charts").Spreadsheet;
|
|
97
98
|
};
|
|
98
|
-
|
|
99
|
+
pendingImageElementId: string | null;
|
|
99
100
|
showHyperlinkPopup: false | "info" | "editor";
|
|
100
101
|
linkOpacity: number;
|
|
101
102
|
trayModeEnabled: boolean;
|
|
@@ -85,6 +85,7 @@ export declare const actionToggleViewMode: {
|
|
|
85
85
|
offsetTop: number;
|
|
86
86
|
offsetLeft: number;
|
|
87
87
|
isLibraryOpen: boolean;
|
|
88
|
+
isLibraryMenuDocked: boolean;
|
|
88
89
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
89
90
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
90
91
|
showStats: boolean;
|
|
@@ -96,7 +97,7 @@ export declare const actionToggleViewMode: {
|
|
|
96
97
|
shown: true;
|
|
97
98
|
data: import("../charts").Spreadsheet;
|
|
98
99
|
};
|
|
99
|
-
|
|
100
|
+
pendingImageElementId: string | null;
|
|
100
101
|
showHyperlinkPopup: false | "info" | "editor";
|
|
101
102
|
linkOpacity: number;
|
|
102
103
|
trayModeEnabled: boolean;
|
|
@@ -85,6 +85,7 @@ export declare const actionToggleZenMode: {
|
|
|
85
85
|
offsetTop: number;
|
|
86
86
|
offsetLeft: number;
|
|
87
87
|
isLibraryOpen: boolean;
|
|
88
|
+
isLibraryMenuDocked: boolean;
|
|
88
89
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
89
90
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
90
91
|
showStats: boolean;
|
|
@@ -96,7 +97,7 @@ export declare const actionToggleZenMode: {
|
|
|
96
97
|
shown: true;
|
|
97
98
|
data: import("../charts").Spreadsheet;
|
|
98
99
|
};
|
|
99
|
-
|
|
100
|
+
pendingImageElementId: string | null;
|
|
100
101
|
showHyperlinkPopup: false | "info" | "editor";
|
|
101
102
|
linkOpacity: number;
|
|
102
103
|
trayModeEnabled: boolean;
|
package/types/appState.d.ts
CHANGED
|
@@ -57,6 +57,8 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
57
57
|
[groupId: string]: boolean;
|
|
58
58
|
} | undefined;
|
|
59
59
|
editingGroupId?: string | null | undefined;
|
|
60
|
+
isLibraryOpen?: boolean | undefined;
|
|
61
|
+
isLibraryMenuDocked?: boolean | undefined;
|
|
60
62
|
showStats?: boolean | undefined;
|
|
61
63
|
currentChartType?: import("./element/types").ChartType | undefined;
|
|
62
64
|
};
|
|
@@ -4,11 +4,17 @@ import { ActionManager } from "../actions/manager";
|
|
|
4
4
|
import { RestoredDataState } from "../data/restore";
|
|
5
5
|
import { ExcalidrawElement, NonDeletedExcalidrawElement } from "../element/types";
|
|
6
6
|
import History from "../history";
|
|
7
|
-
import
|
|
7
|
+
import Scene from "../scene/Scene";
|
|
8
|
+
import { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device } from "../types";
|
|
8
9
|
import { FileSystemHandle } from "../data/filesystem";
|
|
9
10
|
import { ImportedDataState } from "../data/types";
|
|
10
11
|
export declare let showFourthFont: boolean;
|
|
11
|
-
export declare const
|
|
12
|
+
export declare const useDevice: () => Readonly<{
|
|
13
|
+
isSmScreen: boolean;
|
|
14
|
+
isMobile: boolean;
|
|
15
|
+
isTouchScreen: boolean;
|
|
16
|
+
canDeviceFitSidebar: boolean;
|
|
17
|
+
}>;
|
|
12
18
|
export declare const useExcalidrawContainer: () => {
|
|
13
19
|
container: HTMLDivElement | null;
|
|
14
20
|
id: string | null;
|
|
@@ -18,11 +24,11 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
18
24
|
rc: RoughCanvas | null;
|
|
19
25
|
unmounted: boolean;
|
|
20
26
|
actionManager: ActionManager;
|
|
21
|
-
|
|
27
|
+
device: Device;
|
|
22
28
|
detachIsMobileMqHandler?: () => void;
|
|
23
29
|
private excalidrawContainerRef;
|
|
24
30
|
static defaultProps: Partial<AppProps>;
|
|
25
|
-
|
|
31
|
+
scene: Scene;
|
|
26
32
|
private resizeObserver;
|
|
27
33
|
private nearestScrollableContainer;
|
|
28
34
|
library: AppClassProperties["library"];
|
|
@@ -40,7 +46,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
40
46
|
x: number;
|
|
41
47
|
y: number;
|
|
42
48
|
} | null;
|
|
43
|
-
allowMobileMode: boolean;
|
|
44
49
|
constructor(props: AppProps);
|
|
45
50
|
private renderCanvas;
|
|
46
51
|
render(): JSX.Element;
|
|
@@ -59,6 +64,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
59
64
|
*/
|
|
60
65
|
private resetScene;
|
|
61
66
|
private initializeScene;
|
|
67
|
+
private refreshDeviceState;
|
|
62
68
|
componentDidMount(): Promise<void>;
|
|
63
69
|
componentWillUnmount(): void;
|
|
64
70
|
private onResize;
|
|
@@ -81,7 +87,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
81
87
|
toggleLock: (source?: "keyboard" | "ui") => void;
|
|
82
88
|
togglePenMode: () => void;
|
|
83
89
|
toggleZenMode: () => void;
|
|
84
|
-
toggleStats: () => void;
|
|
85
90
|
scrollToContent: (target?: ExcalidrawElement | readonly ExcalidrawElement[]) => void;
|
|
86
91
|
zoomToFit: (target?: readonly ExcalidrawElement[], maxZoom?: number, margin?: number) => void;
|
|
87
92
|
updateContainerSize: (containers: NonDeletedExcalidrawElement[]) => void;
|
|
@@ -91,7 +96,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
91
96
|
restoreFileFromShare: () => Promise<void>;
|
|
92
97
|
/** adds supplied files to existing files in the appState */
|
|
93
98
|
addFiles: ExcalidrawImperativeAPI["addFiles"];
|
|
94
|
-
setMobileModeAllowed: ExcalidrawImperativeAPI["setMobileModeAllowed"];
|
|
95
99
|
setLocalFont: ExcalidrawImperativeAPI["setLocalFont"];
|
|
96
100
|
selectElements: ExcalidrawImperativeAPI["selectElements"];
|
|
97
101
|
bringToFront: ExcalidrawImperativeAPI["bringToFront"];
|
|
@@ -23,8 +23,9 @@ interface LayerUIProps {
|
|
|
23
23
|
toggleZenMode: () => void;
|
|
24
24
|
langCode: Language["code"];
|
|
25
25
|
isCollaborating: boolean;
|
|
26
|
-
renderTopRightUI?:
|
|
27
|
-
renderCustomFooter?:
|
|
26
|
+
renderTopRightUI?: ExcalidrawProps["renderTopRightUI"];
|
|
27
|
+
renderCustomFooter?: ExcalidrawProps["renderFooter"];
|
|
28
|
+
renderCustomStats?: ExcalidrawProps["renderCustomStats"];
|
|
28
29
|
viewModeEnabled: boolean;
|
|
29
30
|
libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
|
|
30
31
|
UIOptions: AppProps["UIOptions"];
|
|
@@ -35,5 +36,5 @@ interface LayerUIProps {
|
|
|
35
36
|
insertOnCanvasDirectly: boolean;
|
|
36
37
|
}) => void;
|
|
37
38
|
}
|
|
38
|
-
declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, canvas, elements, onCollabButtonClick, onLockToggle, onPenModeToggle, onInsertElements, zenModeEnabled, showExitZenModeBtn, showThemeBtn, toggleZenMode, isCollaborating, renderTopRightUI, renderCustomFooter, viewModeEnabled, libraryReturnUrl, UIOptions, focusContainer, library, id, onImageAction, }: LayerUIProps) => JSX.Element>;
|
|
39
|
+
declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, canvas, elements, onCollabButtonClick, onLockToggle, onPenModeToggle, onInsertElements, zenModeEnabled, showExitZenModeBtn, showThemeBtn, toggleZenMode, isCollaborating, renderTopRightUI, renderCustomFooter, renderCustomStats, viewModeEnabled, libraryReturnUrl, UIOptions, focusContainer, library, id, onImageAction, }: LayerUIProps) => JSX.Element>;
|
|
39
40
|
export default _default;
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import Library from "../data/library";
|
|
3
3
|
import { AppState, BinaryFiles, ExcalidrawProps, LibraryItem, LibraryItems } from "../types";
|
|
4
4
|
import "./LibraryMenuItems.scss";
|
|
5
|
-
declare const LibraryMenuItems: ({ isLoading, libraryItems, onRemoveFromLibrary, onAddToLibrary, onInsertLibraryItems, pendingElements, theme, setAppState, libraryReturnUrl, library, files, id, selectedItems, onSelectItems, onPublish, resetLibrary, }: {
|
|
5
|
+
declare const LibraryMenuItems: ({ isLoading, libraryItems, onRemoveFromLibrary, onAddToLibrary, onInsertLibraryItems, pendingElements, theme, setAppState, appState, libraryReturnUrl, library, files, id, selectedItems, onSelectItems, onPublish, resetLibrary, }: {
|
|
6
6
|
isLoading: boolean;
|
|
7
7
|
libraryItems: LibraryItems;
|
|
8
8
|
pendingElements: LibraryItem["elements"];
|
|
@@ -12,6 +12,7 @@ declare const LibraryMenuItems: ({ isLoading, libraryItems, onRemoveFromLibrary,
|
|
|
12
12
|
theme: AppState["theme"];
|
|
13
13
|
files: BinaryFiles;
|
|
14
14
|
setAppState: React.Component<any, AppState>["setState"];
|
|
15
|
+
appState: AppState;
|
|
15
16
|
libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
|
|
16
17
|
library: Library;
|
|
17
18
|
id: string;
|
|
@@ -22,6 +22,7 @@ declare type MobileMenuProps = {
|
|
|
22
22
|
insertOnCanvasDirectly: boolean;
|
|
23
23
|
}) => void;
|
|
24
24
|
renderTopRightUI?: (isMobile: boolean, appState: AppState) => JSX.Element | null;
|
|
25
|
+
renderStats: () => JSX.Element | null;
|
|
25
26
|
};
|
|
26
|
-
export declare const MobileMenu: ({ appState, elements, libraryMenu, actionManager, renderJSONExportDialog, renderImageExportDialog, setAppState, onCollabButtonClick, onLockToggle, onPenModeToggle, canvas, isCollaborating, renderCustomFooter, viewModeEnabled, showThemeBtn, onImageAction, renderTopRightUI, }: MobileMenuProps) => JSX.Element;
|
|
27
|
+
export declare const MobileMenu: ({ appState, elements, libraryMenu, actionManager, renderJSONExportDialog, renderImageExportDialog, setAppState, onCollabButtonClick, onLockToggle, onPenModeToggle, canvas, isCollaborating, renderCustomFooter, viewModeEnabled, showThemeBtn, onImageAction, renderTopRightUI, renderStats, }: MobileMenuProps) => JSX.Element;
|
|
27
28
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import "./ToolIcon.scss";
|
|
3
|
+
import "./SidebarLockButton.scss";
|
|
4
|
+
declare type SidebarLockIconProps = {
|
|
5
|
+
checked: boolean;
|
|
6
|
+
onChange?(): void;
|
|
7
|
+
};
|
|
8
|
+
export declare const SidebarLockButton: (props: SidebarLockIconProps) => JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -10,6 +10,6 @@ declare type StackProps = {
|
|
|
10
10
|
};
|
|
11
11
|
declare const _default: {
|
|
12
12
|
Row: ({ children, gap, align, justifyContent, className, style, }: StackProps) => JSX.Element;
|
|
13
|
-
Col: ({ children, gap, align, justifyContent, className, }: StackProps) => JSX.Element;
|
|
13
|
+
Col: ({ children, gap, align, justifyContent, className, style, }: StackProps) => JSX.Element;
|
|
14
14
|
};
|
|
15
15
|
export default _default;
|
package/types/constants.d.ts
CHANGED
|
@@ -119,9 +119,12 @@ export declare const URL_HASH_KEYS: {
|
|
|
119
119
|
readonly addLibrary: "addLibrary";
|
|
120
120
|
};
|
|
121
121
|
export declare const DEFAULT_UI_OPTIONS: AppProps["UIOptions"];
|
|
122
|
+
export declare const MQ_SM_MAX_WIDTH = 640;
|
|
122
123
|
export declare const MQ_MAX_WIDTH_PORTRAIT = 730;
|
|
123
124
|
export declare const MQ_MAX_WIDTH_LANDSCAPE = 1000;
|
|
124
125
|
export declare const MQ_MAX_HEIGHT_LANDSCAPE = 500;
|
|
126
|
+
export declare const MQ_RIGHT_SIDEBAR_MIN_WIDTH = 1229;
|
|
127
|
+
export declare const LIBRARY_SIDEBAR_WIDTH: number;
|
|
125
128
|
export declare const MAX_DECIMALS_FOR_SVG_EXPORT = 2;
|
|
126
129
|
export declare const EXPORT_SCALES: number[];
|
|
127
130
|
export declare const DEFAULT_EXPORT_PADDING = 10;
|
|
@@ -96,6 +96,7 @@ export declare const actionLink: {
|
|
|
96
96
|
offsetTop: number;
|
|
97
97
|
offsetLeft: number;
|
|
98
98
|
isLibraryOpen: boolean;
|
|
99
|
+
isLibraryMenuDocked: boolean;
|
|
99
100
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
100
101
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
101
102
|
showStats: boolean;
|
|
@@ -107,7 +108,7 @@ export declare const actionLink: {
|
|
|
107
108
|
shown: true;
|
|
108
109
|
data: import("../charts").Spreadsheet;
|
|
109
110
|
};
|
|
110
|
-
|
|
111
|
+
pendingImageElementId: string | null;
|
|
111
112
|
linkOpacity: number;
|
|
112
113
|
trayModeEnabled: boolean;
|
|
113
114
|
colorPalette: {
|
|
@@ -163,6 +163,7 @@ export declare class LinearElementEditor {
|
|
|
163
163
|
offsetTop: number;
|
|
164
164
|
offsetLeft: number;
|
|
165
165
|
isLibraryOpen: boolean;
|
|
166
|
+
isLibraryMenuDocked: boolean;
|
|
166
167
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
167
168
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
168
169
|
showStats: boolean;
|
|
@@ -174,7 +175,7 @@ export declare class LinearElementEditor {
|
|
|
174
175
|
shown: true;
|
|
175
176
|
data: import("../charts").Spreadsheet;
|
|
176
177
|
};
|
|
177
|
-
|
|
178
|
+
pendingImageElementId: string | null;
|
|
178
179
|
showHyperlinkPopup: false | "info" | "editor";
|
|
179
180
|
linkOpacity: number;
|
|
180
181
|
trayModeEnabled: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const ExcalidrawLib: {};
|
|
@@ -3,8 +3,7 @@ import "../../css/app.scss";
|
|
|
3
3
|
import "../../css/styles.scss";
|
|
4
4
|
import { ExcalidrawAPIRefValue, ExcalidrawProps } from "../../types";
|
|
5
5
|
declare type PublicExcalidrawProps = Omit<ExcalidrawProps, "forwardedRef">;
|
|
6
|
-
declare const
|
|
7
|
-
export default _default;
|
|
6
|
+
export declare const Excalidraw: React.MemoExoticComponent<React.ForwardRefExoticComponent<PublicExcalidrawProps & React.RefAttributes<ExcalidrawAPIRefValue>>>;
|
|
8
7
|
export { getSceneVersion, isInvisiblySmallElement, getNonDeletedElements, } from "../../element";
|
|
9
8
|
export { defaultLang, languages } from "../../i18n";
|
|
10
9
|
export { restore, restoreAppState, restoreElements, restoreLibraryItems, } from "../../data/restore";
|
package/types/types.d.ts
CHANGED
|
@@ -130,6 +130,7 @@ export declare type AppState = {
|
|
|
130
130
|
offsetTop: number;
|
|
131
131
|
offsetLeft: number;
|
|
132
132
|
isLibraryOpen: boolean;
|
|
133
|
+
isLibraryMenuDocked: boolean;
|
|
133
134
|
fileHandle: FileSystemHandle | null;
|
|
134
135
|
collaborators: Map<string, Collaborator>;
|
|
135
136
|
showStats: boolean;
|
|
@@ -142,7 +143,7 @@ export declare type AppState = {
|
|
|
142
143
|
data: Spreadsheet;
|
|
143
144
|
};
|
|
144
145
|
/** imageElement waiting to be placed on canvas */
|
|
145
|
-
|
|
146
|
+
pendingImageElementId: ExcalidrawImageElement["id"] | null;
|
|
146
147
|
showHyperlinkPopup: false | "info" | "editor";
|
|
147
148
|
linkOpacity: number;
|
|
148
149
|
trayModeEnabled: boolean;
|
|
@@ -215,8 +216,6 @@ export interface ExcalidrawProps {
|
|
|
215
216
|
}) => void;
|
|
216
217
|
onPaste?: (data: ClipboardData, event: ClipboardEvent | null) => Promise<boolean> | boolean;
|
|
217
218
|
onDrop?: (event: React.DragEvent<HTMLDivElement>) => Promise<boolean> | boolean;
|
|
218
|
-
ownerDocument: Document;
|
|
219
|
-
ownerWindow: Window;
|
|
220
219
|
renderTopRightUI?: (isMobile: boolean, appState: AppState) => JSX.Element | null;
|
|
221
220
|
renderFooter?: (isMobile: boolean, appState: AppState) => JSX.Element | null;
|
|
222
221
|
langCode?: Language["code"];
|
|
@@ -227,7 +226,10 @@ export interface ExcalidrawProps {
|
|
|
227
226
|
theme?: Theme;
|
|
228
227
|
name?: string;
|
|
229
228
|
renderCustomStats?: (elements: readonly NonDeletedExcalidrawElement[], appState: AppState) => JSX.Element;
|
|
230
|
-
UIOptions?:
|
|
229
|
+
UIOptions?: {
|
|
230
|
+
dockedSidebarBreakpoint?: number;
|
|
231
|
+
canvasActions?: CanvasActions;
|
|
232
|
+
};
|
|
231
233
|
detectScroll?: boolean;
|
|
232
234
|
handleKeyboardGlobally?: boolean;
|
|
233
235
|
onLibraryChange?: (libraryItems: LibraryItems) => void | Promise<any>;
|
|
@@ -269,19 +271,17 @@ declare type CanvasActions = {
|
|
|
269
271
|
theme?: boolean;
|
|
270
272
|
saveAsImage?: boolean;
|
|
271
273
|
};
|
|
272
|
-
export declare type
|
|
273
|
-
canvasActions?: CanvasActions;
|
|
274
|
-
};
|
|
275
|
-
export declare type AppProps = ExcalidrawProps & {
|
|
274
|
+
export declare type AppProps = Merge<ExcalidrawProps, {
|
|
276
275
|
UIOptions: {
|
|
277
276
|
canvasActions: Required<CanvasActions> & {
|
|
278
277
|
export: ExportOpts;
|
|
279
278
|
};
|
|
279
|
+
dockedSidebarBreakpoint?: number;
|
|
280
280
|
};
|
|
281
281
|
detectScroll: boolean;
|
|
282
282
|
handleKeyboardGlobally: boolean;
|
|
283
283
|
isCollaborating: boolean;
|
|
284
|
-
}
|
|
284
|
+
}>;
|
|
285
285
|
/** A subset of App class properties that we need to use elsewhere
|
|
286
286
|
* in the app, eg Manager. Factored out into a separate type to keep DRY. */
|
|
287
287
|
export declare type AppClassProperties = {
|
|
@@ -294,7 +294,8 @@ export declare type AppClassProperties = {
|
|
|
294
294
|
mimeType: typeof ALLOWED_IMAGE_MIME_TYPES[number];
|
|
295
295
|
}>;
|
|
296
296
|
files: BinaryFiles;
|
|
297
|
-
|
|
297
|
+
device: App["device"];
|
|
298
|
+
scene: App["scene"];
|
|
298
299
|
};
|
|
299
300
|
export declare type PointerDownState = Readonly<{
|
|
300
301
|
origin: Readonly<{
|
|
@@ -383,13 +384,14 @@ export declare type ExcalidrawImperativeAPI = {
|
|
|
383
384
|
sendToBack: (elements: readonly ExcalidrawElement[]) => void;
|
|
384
385
|
bringToFront: (elements: readonly ExcalidrawElement[]) => void;
|
|
385
386
|
restore: InstanceType<typeof App>["restore"];
|
|
386
|
-
setMobileModeAllowed: (allow: boolean) => void;
|
|
387
387
|
setActiveTool: InstanceType<typeof App>["setActiveTool"];
|
|
388
388
|
setCursor: InstanceType<typeof App>["setCursor"];
|
|
389
389
|
resetCursor: InstanceType<typeof App>["resetCursor"];
|
|
390
390
|
};
|
|
391
|
-
export declare type
|
|
391
|
+
export declare type Device = Readonly<{
|
|
392
|
+
isSmScreen: boolean;
|
|
392
393
|
isMobile: boolean;
|
|
393
394
|
isTouchScreen: boolean;
|
|
394
|
-
|
|
395
|
+
canDeviceFitSidebar: boolean;
|
|
396
|
+
}>;
|
|
395
397
|
export {};
|
package/types/utils.d.ts
CHANGED
|
@@ -131,3 +131,4 @@ export declare const updateObject: <T extends Record<string, any>>(obj: T, updat
|
|
|
131
131
|
export declare const isPrimitive: (val: any) => boolean;
|
|
132
132
|
export declare const getFrame: () => "top" | "iframe";
|
|
133
133
|
export declare const isPromiseLike: (value: any) => value is Promise<any>;
|
|
134
|
+
export declare const queryFocusableElements: (container: HTMLElement | null) => HTMLElement[];
|