@dwelle/excalidraw 0.3.68 → 0.3.69
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/CHANGELOG.md +2 -0
- package/README_NEXT.md +7 -1
- package/dist/excalidraw.development.js +92 -60
- 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 +16 -8
- 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 -5
- 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/types.d.ts +13 -5
|
@@ -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
|
};
|
|
118
119
|
commitToHistory: true;
|
|
@@ -205,6 +206,7 @@ export declare const actionChangeStrokeWidth: {
|
|
|
205
206
|
offsetTop: number;
|
|
206
207
|
offsetLeft: number;
|
|
207
208
|
isLibraryOpen: boolean;
|
|
209
|
+
isLibraryMenuDocked: boolean;
|
|
208
210
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
209
211
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
210
212
|
showStats: boolean;
|
|
@@ -216,7 +218,7 @@ export declare const actionChangeStrokeWidth: {
|
|
|
216
218
|
shown: true;
|
|
217
219
|
data: import("../charts").Spreadsheet;
|
|
218
220
|
};
|
|
219
|
-
|
|
221
|
+
pendingImageElementId: string | null;
|
|
220
222
|
showHyperlinkPopup: false | "info" | "editor";
|
|
221
223
|
};
|
|
222
224
|
commitToHistory: true;
|
|
@@ -309,6 +311,7 @@ export declare const actionChangeSloppiness: {
|
|
|
309
311
|
offsetTop: number;
|
|
310
312
|
offsetLeft: number;
|
|
311
313
|
isLibraryOpen: boolean;
|
|
314
|
+
isLibraryMenuDocked: boolean;
|
|
312
315
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
313
316
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
314
317
|
showStats: boolean;
|
|
@@ -320,7 +323,7 @@ export declare const actionChangeSloppiness: {
|
|
|
320
323
|
shown: true;
|
|
321
324
|
data: import("../charts").Spreadsheet;
|
|
322
325
|
};
|
|
323
|
-
|
|
326
|
+
pendingImageElementId: string | null;
|
|
324
327
|
showHyperlinkPopup: false | "info" | "editor";
|
|
325
328
|
};
|
|
326
329
|
commitToHistory: true;
|
|
@@ -413,6 +416,7 @@ export declare const actionChangeStrokeStyle: {
|
|
|
413
416
|
offsetTop: number;
|
|
414
417
|
offsetLeft: number;
|
|
415
418
|
isLibraryOpen: boolean;
|
|
419
|
+
isLibraryMenuDocked: boolean;
|
|
416
420
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
417
421
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
418
422
|
showStats: boolean;
|
|
@@ -424,7 +428,7 @@ export declare const actionChangeStrokeStyle: {
|
|
|
424
428
|
shown: true;
|
|
425
429
|
data: import("../charts").Spreadsheet;
|
|
426
430
|
};
|
|
427
|
-
|
|
431
|
+
pendingImageElementId: string | null;
|
|
428
432
|
showHyperlinkPopup: false | "info" | "editor";
|
|
429
433
|
};
|
|
430
434
|
commitToHistory: true;
|
|
@@ -517,6 +521,7 @@ export declare const actionChangeOpacity: {
|
|
|
517
521
|
offsetTop: number;
|
|
518
522
|
offsetLeft: number;
|
|
519
523
|
isLibraryOpen: boolean;
|
|
524
|
+
isLibraryMenuDocked: boolean;
|
|
520
525
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
521
526
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
522
527
|
showStats: boolean;
|
|
@@ -528,7 +533,7 @@ export declare const actionChangeOpacity: {
|
|
|
528
533
|
shown: true;
|
|
529
534
|
data: import("../charts").Spreadsheet;
|
|
530
535
|
};
|
|
531
|
-
|
|
536
|
+
pendingImageElementId: string | null;
|
|
532
537
|
showHyperlinkPopup: false | "info" | "editor";
|
|
533
538
|
};
|
|
534
539
|
commitToHistory: true;
|
|
@@ -621,6 +626,7 @@ export declare const actionChangeFontSize: {
|
|
|
621
626
|
offsetTop: number;
|
|
622
627
|
offsetLeft: number;
|
|
623
628
|
isLibraryOpen: boolean;
|
|
629
|
+
isLibraryMenuDocked: boolean;
|
|
624
630
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
625
631
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
626
632
|
showStats: boolean;
|
|
@@ -632,7 +638,7 @@ export declare const actionChangeFontSize: {
|
|
|
632
638
|
shown: true;
|
|
633
639
|
data: import("../charts").Spreadsheet;
|
|
634
640
|
};
|
|
635
|
-
|
|
641
|
+
pendingImageElementId: string | null;
|
|
636
642
|
showHyperlinkPopup: false | "info" | "editor";
|
|
637
643
|
};
|
|
638
644
|
commitToHistory: boolean;
|
|
@@ -725,6 +731,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
725
731
|
offsetTop: number;
|
|
726
732
|
offsetLeft: number;
|
|
727
733
|
isLibraryOpen: boolean;
|
|
734
|
+
isLibraryMenuDocked: boolean;
|
|
728
735
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
729
736
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
730
737
|
showStats: boolean;
|
|
@@ -736,7 +743,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
736
743
|
shown: true;
|
|
737
744
|
data: import("../charts").Spreadsheet;
|
|
738
745
|
};
|
|
739
|
-
|
|
746
|
+
pendingImageElementId: string | null;
|
|
740
747
|
showHyperlinkPopup: false | "info" | "editor";
|
|
741
748
|
};
|
|
742
749
|
commitToHistory: boolean;
|
|
@@ -829,6 +836,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
829
836
|
offsetTop: number;
|
|
830
837
|
offsetLeft: number;
|
|
831
838
|
isLibraryOpen: boolean;
|
|
839
|
+
isLibraryMenuDocked: boolean;
|
|
832
840
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
833
841
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
834
842
|
showStats: boolean;
|
|
@@ -840,7 +848,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
840
848
|
shown: true;
|
|
841
849
|
data: import("../charts").Spreadsheet;
|
|
842
850
|
};
|
|
843
|
-
|
|
851
|
+
pendingImageElementId: string | null;
|
|
844
852
|
showHyperlinkPopup: false | "info" | "editor";
|
|
845
853
|
};
|
|
846
854
|
commitToHistory: boolean;
|
|
@@ -933,6 +941,7 @@ export declare const actionChangeFontFamily: {
|
|
|
933
941
|
offsetTop: number;
|
|
934
942
|
offsetLeft: number;
|
|
935
943
|
isLibraryOpen: boolean;
|
|
944
|
+
isLibraryMenuDocked: boolean;
|
|
936
945
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
937
946
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
938
947
|
showStats: boolean;
|
|
@@ -944,7 +953,7 @@ export declare const actionChangeFontFamily: {
|
|
|
944
953
|
shown: true;
|
|
945
954
|
data: import("../charts").Spreadsheet;
|
|
946
955
|
};
|
|
947
|
-
|
|
956
|
+
pendingImageElementId: string | null;
|
|
948
957
|
showHyperlinkPopup: false | "info" | "editor";
|
|
949
958
|
};
|
|
950
959
|
commitToHistory: true;
|
|
@@ -1037,6 +1046,7 @@ export declare const actionChangeTextAlign: {
|
|
|
1037
1046
|
offsetTop: number;
|
|
1038
1047
|
offsetLeft: number;
|
|
1039
1048
|
isLibraryOpen: boolean;
|
|
1049
|
+
isLibraryMenuDocked: boolean;
|
|
1040
1050
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
1041
1051
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
1042
1052
|
showStats: boolean;
|
|
@@ -1048,7 +1058,7 @@ export declare const actionChangeTextAlign: {
|
|
|
1048
1058
|
shown: true;
|
|
1049
1059
|
data: import("../charts").Spreadsheet;
|
|
1050
1060
|
};
|
|
1051
|
-
|
|
1061
|
+
pendingImageElementId: string | null;
|
|
1052
1062
|
showHyperlinkPopup: false | "info" | "editor";
|
|
1053
1063
|
};
|
|
1054
1064
|
commitToHistory: true;
|
|
@@ -1143,6 +1153,7 @@ export declare const actionChangeVerticalAlign: {
|
|
|
1143
1153
|
offsetTop: number;
|
|
1144
1154
|
offsetLeft: number;
|
|
1145
1155
|
isLibraryOpen: boolean;
|
|
1156
|
+
isLibraryMenuDocked: boolean;
|
|
1146
1157
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
1147
1158
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
1148
1159
|
showStats: boolean;
|
|
@@ -1154,7 +1165,7 @@ export declare const actionChangeVerticalAlign: {
|
|
|
1154
1165
|
shown: true;
|
|
1155
1166
|
data: import("../charts").Spreadsheet;
|
|
1156
1167
|
};
|
|
1157
|
-
|
|
1168
|
+
pendingImageElementId: string | null;
|
|
1158
1169
|
showHyperlinkPopup: false | "info" | "editor";
|
|
1159
1170
|
};
|
|
1160
1171
|
commitToHistory: true;
|
|
@@ -1247,6 +1258,7 @@ export declare const actionChangeSharpness: {
|
|
|
1247
1258
|
offsetTop: number;
|
|
1248
1259
|
offsetLeft: number;
|
|
1249
1260
|
isLibraryOpen: boolean;
|
|
1261
|
+
isLibraryMenuDocked: boolean;
|
|
1250
1262
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
1251
1263
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
1252
1264
|
showStats: boolean;
|
|
@@ -1258,7 +1270,7 @@ export declare const actionChangeSharpness: {
|
|
|
1258
1270
|
shown: true;
|
|
1259
1271
|
data: import("../charts").Spreadsheet;
|
|
1260
1272
|
};
|
|
1261
|
-
|
|
1273
|
+
pendingImageElementId: string | null;
|
|
1262
1274
|
showHyperlinkPopup: false | "info" | "editor";
|
|
1263
1275
|
};
|
|
1264
1276
|
commitToHistory: true;
|
|
@@ -1354,6 +1366,7 @@ export declare const actionChangeArrowhead: {
|
|
|
1354
1366
|
offsetTop: number;
|
|
1355
1367
|
offsetLeft: number;
|
|
1356
1368
|
isLibraryOpen: boolean;
|
|
1369
|
+
isLibraryMenuDocked: boolean;
|
|
1357
1370
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
1358
1371
|
collaborators: Map<string, import("../../src/types").Collaborator>;
|
|
1359
1372
|
showStats: boolean;
|
|
@@ -1365,7 +1378,7 @@ export declare const actionChangeArrowhead: {
|
|
|
1365
1378
|
shown: true;
|
|
1366
1379
|
data: import("../charts").Spreadsheet;
|
|
1367
1380
|
};
|
|
1368
|
-
|
|
1381
|
+
pendingImageElementId: string | null;
|
|
1369
1382
|
showHyperlinkPopup: false | "info" | "editor";
|
|
1370
1383
|
};
|
|
1371
1384
|
commitToHistory: true;
|
|
@@ -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
|
};
|
|
102
103
|
commitToHistory: false;
|
|
@@ -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
|
};
|
|
103
104
|
commitToHistory: false;
|
|
@@ -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
|
};
|
|
101
102
|
commitToHistory: false;
|
|
@@ -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
|
};
|
|
102
103
|
commitToHistory: false;
|
|
@@ -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
|
};
|
|
102
103
|
commitToHistory: false;
|
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
|
};
|
|
@@ -3,9 +3,15 @@ import { RoughCanvas } from "roughjs/bin/canvas";
|
|
|
3
3
|
import { ActionManager } from "../actions/manager";
|
|
4
4
|
import { ExcalidrawElement, NonDeletedExcalidrawElement } from "../element/types";
|
|
5
5
|
import History from "../history";
|
|
6
|
-
import
|
|
6
|
+
import Scene from "../scene/Scene";
|
|
7
|
+
import { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, Device } from "../types";
|
|
7
8
|
import { FileSystemHandle } from "../data/filesystem";
|
|
8
|
-
export declare const
|
|
9
|
+
export declare const useDevice: () => Readonly<{
|
|
10
|
+
isSmScreen: boolean;
|
|
11
|
+
isMobile: boolean;
|
|
12
|
+
isTouchScreen: boolean;
|
|
13
|
+
canDeviceFitSidebar: boolean;
|
|
14
|
+
}>;
|
|
9
15
|
export declare const useExcalidrawContainer: () => {
|
|
10
16
|
container: HTMLDivElement | null;
|
|
11
17
|
id?: string | null | undefined;
|
|
@@ -15,11 +21,11 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
15
21
|
rc: RoughCanvas | null;
|
|
16
22
|
unmounted: boolean;
|
|
17
23
|
actionManager: ActionManager;
|
|
18
|
-
|
|
24
|
+
device: Device;
|
|
19
25
|
detachIsMobileMqHandler?: () => void;
|
|
20
26
|
private excalidrawContainerRef;
|
|
21
27
|
static defaultProps: Partial<AppProps>;
|
|
22
|
-
|
|
28
|
+
scene: Scene;
|
|
23
29
|
private resizeObserver;
|
|
24
30
|
private nearestScrollableContainer;
|
|
25
31
|
library: AppClassProperties["library"];
|
|
@@ -55,6 +61,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
55
61
|
*/
|
|
56
62
|
private resetScene;
|
|
57
63
|
private initializeScene;
|
|
64
|
+
private refreshDeviceState;
|
|
58
65
|
componentDidMount(): Promise<void>;
|
|
59
66
|
componentWillUnmount(): void;
|
|
60
67
|
private onResize;
|
|
@@ -77,7 +84,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
77
84
|
toggleLock: (source?: "keyboard" | "ui") => void;
|
|
78
85
|
togglePenMode: () => void;
|
|
79
86
|
toggleZenMode: () => void;
|
|
80
|
-
toggleStats: () => void;
|
|
81
87
|
scrollToContent: (target?: ExcalidrawElement | readonly ExcalidrawElement[]) => void;
|
|
82
88
|
clearToast: () => void;
|
|
83
89
|
setToastMessage: (toastMessage: string) => void;
|
|
@@ -24,8 +24,9 @@ interface LayerUIProps {
|
|
|
24
24
|
toggleZenMode: () => void;
|
|
25
25
|
langCode: Language["code"];
|
|
26
26
|
isCollaborating: boolean;
|
|
27
|
-
renderTopRightUI?:
|
|
28
|
-
renderCustomFooter?:
|
|
27
|
+
renderTopRightUI?: ExcalidrawProps["renderTopRightUI"];
|
|
28
|
+
renderCustomFooter?: ExcalidrawProps["renderFooter"];
|
|
29
|
+
renderCustomStats?: ExcalidrawProps["renderCustomStats"];
|
|
29
30
|
viewModeEnabled: boolean;
|
|
30
31
|
libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
|
|
31
32
|
UIOptions: AppProps["UIOptions"];
|
|
@@ -36,5 +37,5 @@ interface LayerUIProps {
|
|
|
36
37
|
insertOnCanvasDirectly: boolean;
|
|
37
38
|
}) => void;
|
|
38
39
|
}
|
|
39
|
-
declare const _default: React.MemoExoticComponent<({ onHomeButtonClick, 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>;
|
|
40
|
+
declare const _default: React.MemoExoticComponent<({ onHomeButtonClick, 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>;
|
|
40
41
|
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;
|
|
@@ -23,7 +23,8 @@ declare type MobileMenuProps = {
|
|
|
23
23
|
insertOnCanvasDirectly: boolean;
|
|
24
24
|
}) => void;
|
|
25
25
|
renderTopRightUI?: (isMobile: boolean, appState: AppState, canvas: HTMLCanvasElement | null) => JSX.Element | null;
|
|
26
|
+
renderStats: () => JSX.Element | null;
|
|
26
27
|
UIOptions: AppProps["UIOptions"];
|
|
27
28
|
};
|
|
28
|
-
export declare const MobileMenu: ({ onHomeButtonClick, appState, elements, libraryMenu, actionManager, renderJSONExportDialog, renderImageExportDialog, setAppState, onCollabButtonClick, onLockToggle, onPenModeToggle, canvas, isCollaborating, renderCustomFooter, viewModeEnabled, showThemeBtn, onImageAction, renderTopRightUI, UIOptions, }: MobileMenuProps) => JSX.Element;
|
|
29
|
+
export declare const MobileMenu: ({ onHomeButtonClick, appState, elements, libraryMenu, actionManager, renderJSONExportDialog, renderImageExportDialog, setAppState, onCollabButtonClick, onLockToggle, onPenModeToggle, canvas, isCollaborating, renderCustomFooter, viewModeEnabled, showThemeBtn, onImageAction, renderTopRightUI, renderStats, UIOptions, }: MobileMenuProps) => JSX.Element;
|
|
29
30
|
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
|
@@ -120,9 +120,12 @@ export declare const DEFAULT_UI_OPTIONS: Merge<AppProps["UIOptions"], {
|
|
|
120
120
|
export: ExportOpts;
|
|
121
121
|
}>;
|
|
122
122
|
}>;
|
|
123
|
+
export declare const MQ_SM_MAX_WIDTH = 640;
|
|
123
124
|
export declare const MQ_MAX_WIDTH_PORTRAIT = 800;
|
|
124
125
|
export declare const MQ_MAX_WIDTH_LANDSCAPE = 1000;
|
|
125
126
|
export declare const MQ_MAX_HEIGHT_LANDSCAPE = 500;
|
|
127
|
+
export declare const MQ_RIGHT_SIDEBAR_MIN_WIDTH = 1229;
|
|
128
|
+
export declare const LIBRARY_SIDEBAR_WIDTH: number;
|
|
126
129
|
export declare const MAX_DECIMALS_FOR_SVG_EXPORT = 2;
|
|
127
130
|
export declare const EXPORT_SCALES: number[];
|
|
128
131
|
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
|
};
|
|
112
113
|
commitToHistory: true;
|
|
113
114
|
};
|
|
@@ -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
|
};
|
|
180
181
|
};
|
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
|
};
|
|
148
149
|
export declare type NormalizedZoomValue = number & {
|
|
@@ -224,7 +225,10 @@ export interface ExcalidrawProps {
|
|
|
224
225
|
theme?: Theme;
|
|
225
226
|
name?: string;
|
|
226
227
|
renderCustomStats?: (elements: readonly NonDeletedExcalidrawElement[], appState: AppState) => JSX.Element;
|
|
227
|
-
UIOptions?:
|
|
228
|
+
UIOptions?: {
|
|
229
|
+
dockedSidebarBreakpoint?: number;
|
|
230
|
+
canvasActions?: CanvasActions;
|
|
231
|
+
};
|
|
228
232
|
detectScroll?: boolean;
|
|
229
233
|
handleKeyboardGlobally?: boolean;
|
|
230
234
|
onLibraryChange?: (libraryItems: LibraryItems) => void | Promise<any>;
|
|
@@ -267,6 +271,7 @@ export declare type UIOptions = {
|
|
|
267
271
|
export declare type AppProps = ExcalidrawProps & {
|
|
268
272
|
UIOptions: {
|
|
269
273
|
canvasActions: Required<CanvasActions> | false;
|
|
274
|
+
dockedSidebarBreakpoint?: number;
|
|
270
275
|
};
|
|
271
276
|
detectScroll: boolean;
|
|
272
277
|
handleKeyboardGlobally: boolean;
|
|
@@ -284,7 +289,8 @@ export declare type AppClassProperties = {
|
|
|
284
289
|
mimeType: typeof ALLOWED_IMAGE_MIME_TYPES[number];
|
|
285
290
|
}>;
|
|
286
291
|
files: BinaryFiles;
|
|
287
|
-
|
|
292
|
+
device: App["device"];
|
|
293
|
+
scene: App["scene"];
|
|
288
294
|
};
|
|
289
295
|
export declare type PointerDownState = Readonly<{
|
|
290
296
|
origin: Readonly<{
|
|
@@ -369,8 +375,10 @@ export declare type ExcalidrawImperativeAPI = {
|
|
|
369
375
|
resetCursor: InstanceType<typeof App>["resetCursor"];
|
|
370
376
|
app: InstanceType<typeof App>;
|
|
371
377
|
};
|
|
372
|
-
export declare type
|
|
378
|
+
export declare type Device = Readonly<{
|
|
379
|
+
isSmScreen: boolean;
|
|
373
380
|
isMobile: boolean;
|
|
374
381
|
isTouchScreen: boolean;
|
|
375
|
-
|
|
382
|
+
canDeviceFitSidebar: boolean;
|
|
383
|
+
}>;
|
|
376
384
|
export {};
|