@dwelle/excalidraw 0.3.67 → 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 +12 -0
- package/README_NEXT.md +9 -3
- package/dist/excalidraw-assets/vendor-aed19b6e017f9f736254.js +2 -0
- package/dist/excalidraw-assets/vendor-aed19b6e017f9f736254.js.LICENSE.txt +12 -0
- package/dist/excalidraw-assets-dev/vendor-4534d6e506404cef7a9e.js +32 -0
- package/dist/excalidraw.development.js +919 -887
- 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/actionNavigate.d.ts +1 -1
- 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/actions/types.d.ts +1 -5
- 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 +3 -2
- package/types/components/SidebarLockButton.d.ts +9 -0
- package/types/components/Stack.d.ts +1 -1
- package/types/components/UserList.d.ts +3 -5
- package/types/constants.d.ts +3 -0
- package/types/element/Hyperlink.d.ts +2 -1
- package/types/element/linearElementEditor.d.ts +3 -5
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-aed19b6e017f9f736254.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-4534d6e506404cef7a9e.d.ts +0 -0
- package/types/packages/excalidraw/example/App.d.ts +7 -0
- package/types/packages/excalidraw/example/sidebar/Sidebar.d.ts +5 -1
- package/types/types.d.ts +15 -6
- package/dist/excalidraw-assets/vendor-0e2ecbd1f46fc190ec01.js +0 -2
- package/dist/excalidraw-assets/vendor-0e2ecbd1f46fc190ec01.js.LICENSE.txt +0 -12
- package/dist/excalidraw-assets-dev/vendor-86b56a69e7dddcf8f70d.js +0 -32
|
@@ -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/actions/types.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ExcalidrawElement } from "../element/types";
|
|
3
3
|
import { AppClassProperties, AppState, ExcalidrawProps, BinaryFiles } from "../types";
|
|
4
|
-
import { ToolButtonSize } from "../components/ToolButton";
|
|
5
4
|
export declare type ActionSource = "ui" | "keyboard" | "contextMenu" | "api";
|
|
6
5
|
/** if false, the action should be prevented */
|
|
7
6
|
export declare type ActionResult = {
|
|
@@ -21,10 +20,7 @@ export declare type PanelComponentProps = {
|
|
|
21
20
|
appState: AppState;
|
|
22
21
|
updateData: (formData?: any) => void;
|
|
23
22
|
appProps: ExcalidrawProps;
|
|
24
|
-
data?:
|
|
25
|
-
id: string;
|
|
26
|
-
size: ToolButtonSize;
|
|
27
|
-
}>;
|
|
23
|
+
data?: Record<string, any>;
|
|
28
24
|
};
|
|
29
25
|
export interface Action {
|
|
30
26
|
name: ActionName;
|
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;
|
|
@@ -16,14 +16,15 @@ declare type MobileMenuProps = {
|
|
|
16
16
|
onPenModeToggle: () => void;
|
|
17
17
|
canvas: HTMLCanvasElement | null;
|
|
18
18
|
isCollaborating: boolean;
|
|
19
|
-
renderCustomFooter?: (isMobile: boolean, appState: AppState) => JSX.Element;
|
|
19
|
+
renderCustomFooter?: (isMobile: boolean, appState: AppState) => JSX.Element | null;
|
|
20
20
|
viewModeEnabled: boolean;
|
|
21
21
|
showThemeBtn: boolean;
|
|
22
22
|
onImageAction: (data: {
|
|
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;
|
|
@@ -2,12 +2,10 @@ import "./UserList.scss";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { AppState } from "../types";
|
|
4
4
|
import { ActionManager } from "../actions/manager";
|
|
5
|
-
declare
|
|
5
|
+
export declare const UserList: React.FC<{
|
|
6
6
|
className?: string;
|
|
7
7
|
mobile?: boolean;
|
|
8
8
|
collaborators: AppState["collaborators"];
|
|
9
|
-
layout: "vertical" | "horizontal";
|
|
10
9
|
actionManager: ActionManager;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export {};
|
|
10
|
+
layout: "vertical" | "horizontal";
|
|
11
|
+
}>;
|
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
|
};
|
|
@@ -86,10 +86,7 @@ export declare class LinearElementEditor {
|
|
|
86
86
|
startBindingElement: ExcalidrawBindableElement | "keep" | null;
|
|
87
87
|
endBindingElement: ExcalidrawBindableElement | "keep" | null;
|
|
88
88
|
};
|
|
89
|
-
isLoading: boolean;
|
|
90
|
-
* @param id the `elementId` from the instance of this class (so that we can
|
|
91
|
-
* statically guarantee this method returns an ExcalidrawLinearElement)
|
|
92
|
-
*/
|
|
89
|
+
isLoading: boolean;
|
|
93
90
|
errorMessage: string | null;
|
|
94
91
|
draggingElement: import("./types").NonDeletedExcalidrawElement | null;
|
|
95
92
|
resizingElement: import("./types").NonDeletedExcalidrawElement | null;
|
|
@@ -166,6 +163,7 @@ export declare class LinearElementEditor {
|
|
|
166
163
|
offsetTop: number;
|
|
167
164
|
offsetLeft: number;
|
|
168
165
|
isLibraryOpen: boolean;
|
|
166
|
+
isLibraryMenuDocked: boolean;
|
|
169
167
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
170
168
|
collaborators: Map<string, import("../types").Collaborator>;
|
|
171
169
|
showStats: boolean;
|
|
@@ -177,7 +175,7 @@ export declare class LinearElementEditor {
|
|
|
177
175
|
shown: true;
|
|
178
176
|
data: import("../charts").Spreadsheet;
|
|
179
177
|
};
|
|
180
|
-
|
|
178
|
+
pendingImageElementId: string | null;
|
|
181
179
|
showHyperlinkPopup: false | "info" | "editor";
|
|
182
180
|
};
|
|
183
181
|
};
|
|
File without changes
|
|
File without changes
|
package/types/types.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export declare type Collaborator = {
|
|
|
30
30
|
stroke: string;
|
|
31
31
|
};
|
|
32
32
|
avatarUrl?: string;
|
|
33
|
+
id?: string;
|
|
33
34
|
};
|
|
34
35
|
export declare type DataURL = string & {
|
|
35
36
|
_brand: "DataURL";
|
|
@@ -129,6 +130,7 @@ export declare type AppState = {
|
|
|
129
130
|
offsetTop: number;
|
|
130
131
|
offsetLeft: number;
|
|
131
132
|
isLibraryOpen: boolean;
|
|
133
|
+
isLibraryMenuDocked: boolean;
|
|
132
134
|
fileHandle: FileSystemHandle | null;
|
|
133
135
|
collaborators: Map<string, Collaborator>;
|
|
134
136
|
showStats: boolean;
|
|
@@ -141,7 +143,7 @@ export declare type AppState = {
|
|
|
141
143
|
data: Spreadsheet;
|
|
142
144
|
};
|
|
143
145
|
/** imageElement waiting to be placed on canvas */
|
|
144
|
-
|
|
146
|
+
pendingImageElementId: ExcalidrawImageElement["id"] | null;
|
|
145
147
|
showHyperlinkPopup: false | "info" | "editor";
|
|
146
148
|
};
|
|
147
149
|
export declare type NormalizedZoomValue = number & {
|
|
@@ -214,7 +216,7 @@ export interface ExcalidrawProps {
|
|
|
214
216
|
}) => void;
|
|
215
217
|
onPaste?: (data: ClipboardData, event: ClipboardEvent | null) => Promise<boolean> | boolean;
|
|
216
218
|
renderTopRightUI?: (isMobile: boolean, appState: AppState, canvas: HTMLCanvasElement | null) => JSX.Element | null;
|
|
217
|
-
renderFooter?: (isMobile: boolean, appState: AppState) => JSX.Element;
|
|
219
|
+
renderFooter?: (isMobile: boolean, appState: AppState) => JSX.Element | null;
|
|
218
220
|
langCode?: Language["code"];
|
|
219
221
|
viewModeEnabled?: boolean;
|
|
220
222
|
zenModeEnabled?: boolean;
|
|
@@ -223,7 +225,10 @@ export interface ExcalidrawProps {
|
|
|
223
225
|
theme?: Theme;
|
|
224
226
|
name?: string;
|
|
225
227
|
renderCustomStats?: (elements: readonly NonDeletedExcalidrawElement[], appState: AppState) => JSX.Element;
|
|
226
|
-
UIOptions?:
|
|
228
|
+
UIOptions?: {
|
|
229
|
+
dockedSidebarBreakpoint?: number;
|
|
230
|
+
canvasActions?: CanvasActions;
|
|
231
|
+
};
|
|
227
232
|
detectScroll?: boolean;
|
|
228
233
|
handleKeyboardGlobally?: boolean;
|
|
229
234
|
onLibraryChange?: (libraryItems: LibraryItems) => void | Promise<any>;
|
|
@@ -266,6 +271,7 @@ export declare type UIOptions = {
|
|
|
266
271
|
export declare type AppProps = ExcalidrawProps & {
|
|
267
272
|
UIOptions: {
|
|
268
273
|
canvasActions: Required<CanvasActions> | false;
|
|
274
|
+
dockedSidebarBreakpoint?: number;
|
|
269
275
|
};
|
|
270
276
|
detectScroll: boolean;
|
|
271
277
|
handleKeyboardGlobally: boolean;
|
|
@@ -283,7 +289,8 @@ export declare type AppClassProperties = {
|
|
|
283
289
|
mimeType: typeof ALLOWED_IMAGE_MIME_TYPES[number];
|
|
284
290
|
}>;
|
|
285
291
|
files: BinaryFiles;
|
|
286
|
-
|
|
292
|
+
device: App["device"];
|
|
293
|
+
scene: App["scene"];
|
|
287
294
|
};
|
|
288
295
|
export declare type PointerDownState = Readonly<{
|
|
289
296
|
origin: Readonly<{
|
|
@@ -368,8 +375,10 @@ export declare type ExcalidrawImperativeAPI = {
|
|
|
368
375
|
resetCursor: InstanceType<typeof App>["resetCursor"];
|
|
369
376
|
app: InstanceType<typeof App>;
|
|
370
377
|
};
|
|
371
|
-
export declare type
|
|
378
|
+
export declare type Device = Readonly<{
|
|
379
|
+
isSmScreen: boolean;
|
|
372
380
|
isMobile: boolean;
|
|
373
381
|
isTouchScreen: boolean;
|
|
374
|
-
|
|
382
|
+
canDeviceFitSidebar: boolean;
|
|
383
|
+
}>;
|
|
375
384
|
export {};
|