@dwelle/excalidraw 0.3.76-react18 → 0.3.78
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-assets/vendor-b9b3a25c026c138e55b2.js +2 -0
- package/dist/excalidraw-assets/vendor-b9b3a25c026c138e55b2.js.LICENSE.txt +6 -0
- package/dist/excalidraw-assets-dev/{vendor-4534d6e506404cef7a9e.js → vendor-33bd21df77fc9cda16d2.js} +66 -0
- package/dist/excalidraw.development.js +154 -160
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +1 -17
- package/package.json +20 -22
- package/types/actions/actionAddToLibrary.d.ts +3 -0
- package/types/actions/actionAlign.d.ts +6 -6
- package/types/actions/actionBoundText.d.ts +1 -0
- package/types/actions/actionCanvas.d.ts +15 -7
- package/types/actions/actionClipboard.d.ts +6 -0
- package/types/actions/actionDeleteSelected.d.ts +5 -1
- package/types/actions/actionDistribute.d.ts +2 -2
- package/types/actions/actionDuplicateSelection.d.ts +1 -1
- package/types/actions/actionExport.d.ts +17 -8
- package/types/actions/actionFinalize.d.ts +3 -1
- package/types/actions/actionGroup.d.ts +2 -2
- package/types/actions/actionMenu.d.ts +6 -3
- package/types/actions/actionNavigate.d.ts +1 -2
- package/types/actions/actionProperties.d.ts +26 -13
- package/types/actions/actionSelectAll.d.ts +2 -1
- package/types/actions/actionStyles.d.ts +1 -0
- package/types/actions/actionToggleGridMode.d.ts +1 -0
- package/types/actions/actionToggleLock.d.ts +99 -1
- package/types/actions/actionToggleStats.d.ts +1 -0
- package/types/actions/actionToggleViewMode.d.ts +1 -0
- package/types/actions/actionToggleZenMode.d.ts +1 -0
- package/types/actions/actionZindex.d.ts +4 -4
- package/types/analytics.d.ts +1 -1
- package/types/appState.d.ts +1 -0
- package/types/clients.d.ts +1 -1
- package/types/components/ActiveFile.d.ts +0 -1
- package/types/components/App.d.ts +2 -1
- package/types/components/ButtonIconSelect.d.ts +0 -1
- package/types/components/ClearCanvas.d.ts +0 -1
- package/types/components/CollabButton.d.ts +0 -1
- package/types/components/ColorPicker.d.ts +0 -1
- package/types/components/ConfirmDialog.d.ts +0 -1
- package/types/components/DarkModeToggle.d.ts +0 -1
- package/types/components/ErrorDialog.d.ts +0 -1
- package/types/components/HelpDialog.d.ts +0 -1
- package/types/components/HelpIcon.d.ts +0 -1
- package/types/components/HintViewer.d.ts +0 -1
- package/types/components/IconPicker.d.ts +0 -1
- package/types/components/ImageExportDialog.d.ts +0 -1
- package/types/components/JSONExportDialog.d.ts +0 -1
- package/types/components/LibraryMenu.d.ts +0 -1
- package/types/components/LibraryUnit.d.ts +0 -1
- package/types/components/LockButton.d.ts +0 -1
- package/types/components/Modal.d.ts +2 -2
- package/types/components/PenModeButton.d.ts +0 -1
- package/types/components/ProjectName.d.ts +0 -1
- package/types/components/PublishLibrary.d.ts +0 -1
- package/types/components/SidebarLockButton.d.ts +0 -1
- package/types/components/SingleLibraryItem.d.ts +0 -1
- package/types/components/Spinner.d.ts +0 -1
- package/types/components/Toast.d.ts +0 -1
- package/types/data/blob.d.ts +4 -4
- package/types/data/json.d.ts +1 -1
- package/types/element/Hyperlink.d.ts +2 -1
- package/types/element/binding.d.ts +3 -3
- package/types/element/dragElements.d.ts +1 -1
- package/types/element/index.d.ts +1 -1
- package/types/element/linearElementEditor.d.ts +9 -5
- package/types/element/mutateElement.d.ts +1 -1
- package/types/element/sizeHelpers.d.ts +4 -0
- package/types/element/textElement.d.ts +1 -1
- package/types/element/typeChecks.d.ts +3 -3
- package/types/keys.d.ts +1 -1
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-6644c8f79d52085cf653.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/vendor-b9b3a25c026c138e55b2.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-33bd21df77fc9cda16d2.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw.production.min.d.ts +5 -1
- package/types/packages/excalidraw/example/App.d.ts +0 -1
- package/types/packages/excalidraw/webpack.prod.config.d.ts +2 -1
- package/types/renderer/renderElement.d.ts +1 -1
- package/types/shapes.d.ts +0 -1
- package/types/types.d.ts +1 -0
- package/types/utils.d.ts +6 -6
- package/dist/excalidraw-assets/vendor-aed19b6e017f9f736254.js +0 -2
- package/dist/excalidraw-assets/vendor-aed19b6e017f9f736254.js.LICENSE.txt +0 -12
|
@@ -5,7 +5,7 @@ export declare const actionChangeStrokeColor: {
|
|
|
5
5
|
name: "changeStrokeColor";
|
|
6
6
|
trackEvent: false;
|
|
7
7
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any) => any;
|
|
8
|
-
PanelComponent: ({ elements, appState, updateData }: import("
|
|
8
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
9
9
|
} & {
|
|
10
10
|
keyTest?: undefined;
|
|
11
11
|
};
|
|
@@ -13,7 +13,7 @@ export declare const actionChangeBackgroundColor: {
|
|
|
13
13
|
name: "changeBackgroundColor";
|
|
14
14
|
trackEvent: false;
|
|
15
15
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any) => any;
|
|
16
|
-
PanelComponent: ({ elements, appState, updateData }: import("
|
|
16
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
17
17
|
} & {
|
|
18
18
|
keyTest?: undefined;
|
|
19
19
|
};
|
|
@@ -119,10 +119,11 @@ export declare const actionChangeFillStyle: {
|
|
|
119
119
|
};
|
|
120
120
|
pendingImageElementId: string | null;
|
|
121
121
|
showHyperlinkPopup: false | "info" | "editor";
|
|
122
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
122
123
|
};
|
|
123
124
|
commitToHistory: true;
|
|
124
125
|
};
|
|
125
|
-
PanelComponent: ({ elements, appState, updateData }: import("
|
|
126
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
126
127
|
} & {
|
|
127
128
|
keyTest?: undefined;
|
|
128
129
|
};
|
|
@@ -228,10 +229,11 @@ export declare const actionChangeStrokeWidth: {
|
|
|
228
229
|
};
|
|
229
230
|
pendingImageElementId: string | null;
|
|
230
231
|
showHyperlinkPopup: false | "info" | "editor";
|
|
232
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
231
233
|
};
|
|
232
234
|
commitToHistory: true;
|
|
233
235
|
};
|
|
234
|
-
PanelComponent: ({ elements, appState, updateData }: import("
|
|
236
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
235
237
|
} & {
|
|
236
238
|
keyTest?: undefined;
|
|
237
239
|
};
|
|
@@ -337,10 +339,11 @@ export declare const actionChangeSloppiness: {
|
|
|
337
339
|
};
|
|
338
340
|
pendingImageElementId: string | null;
|
|
339
341
|
showHyperlinkPopup: false | "info" | "editor";
|
|
342
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
340
343
|
};
|
|
341
344
|
commitToHistory: true;
|
|
342
345
|
};
|
|
343
|
-
PanelComponent: ({ elements, appState, updateData }: import("
|
|
346
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
344
347
|
} & {
|
|
345
348
|
keyTest?: undefined;
|
|
346
349
|
};
|
|
@@ -446,10 +449,11 @@ export declare const actionChangeStrokeStyle: {
|
|
|
446
449
|
};
|
|
447
450
|
pendingImageElementId: string | null;
|
|
448
451
|
showHyperlinkPopup: false | "info" | "editor";
|
|
452
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
449
453
|
};
|
|
450
454
|
commitToHistory: true;
|
|
451
455
|
};
|
|
452
|
-
PanelComponent: ({ elements, appState, updateData }: import("
|
|
456
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
453
457
|
} & {
|
|
454
458
|
keyTest?: undefined;
|
|
455
459
|
};
|
|
@@ -555,10 +559,11 @@ export declare const actionChangeOpacity: {
|
|
|
555
559
|
};
|
|
556
560
|
pendingImageElementId: string | null;
|
|
557
561
|
showHyperlinkPopup: false | "info" | "editor";
|
|
562
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
558
563
|
};
|
|
559
564
|
commitToHistory: true;
|
|
560
565
|
};
|
|
561
|
-
PanelComponent: ({ elements, appState, updateData }: import("
|
|
566
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
562
567
|
} & {
|
|
563
568
|
keyTest?: undefined;
|
|
564
569
|
};
|
|
@@ -664,10 +669,11 @@ export declare const actionChangeFontSize: {
|
|
|
664
669
|
};
|
|
665
670
|
pendingImageElementId: string | null;
|
|
666
671
|
showHyperlinkPopup: false | "info" | "editor";
|
|
672
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
667
673
|
};
|
|
668
674
|
commitToHistory: boolean;
|
|
669
675
|
};
|
|
670
|
-
PanelComponent: ({ elements, appState, updateData }: import("
|
|
676
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
671
677
|
} & {
|
|
672
678
|
keyTest?: undefined;
|
|
673
679
|
};
|
|
@@ -773,6 +779,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
773
779
|
};
|
|
774
780
|
pendingImageElementId: string | null;
|
|
775
781
|
showHyperlinkPopup: false | "info" | "editor";
|
|
782
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
776
783
|
};
|
|
777
784
|
commitToHistory: boolean;
|
|
778
785
|
};
|
|
@@ -882,6 +889,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
882
889
|
};
|
|
883
890
|
pendingImageElementId: string | null;
|
|
884
891
|
showHyperlinkPopup: false | "info" | "editor";
|
|
892
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
885
893
|
};
|
|
886
894
|
commitToHistory: boolean;
|
|
887
895
|
};
|
|
@@ -991,10 +999,11 @@ export declare const actionChangeFontFamily: {
|
|
|
991
999
|
};
|
|
992
1000
|
pendingImageElementId: string | null;
|
|
993
1001
|
showHyperlinkPopup: false | "info" | "editor";
|
|
1002
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
994
1003
|
};
|
|
995
1004
|
commitToHistory: true;
|
|
996
1005
|
};
|
|
997
|
-
PanelComponent: ({ elements, appState, updateData }: import("
|
|
1006
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
998
1007
|
} & {
|
|
999
1008
|
keyTest?: undefined;
|
|
1000
1009
|
};
|
|
@@ -1100,10 +1109,11 @@ export declare const actionChangeTextAlign: {
|
|
|
1100
1109
|
};
|
|
1101
1110
|
pendingImageElementId: string | null;
|
|
1102
1111
|
showHyperlinkPopup: false | "info" | "editor";
|
|
1112
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1103
1113
|
};
|
|
1104
1114
|
commitToHistory: true;
|
|
1105
1115
|
};
|
|
1106
|
-
PanelComponent: ({ elements, appState, updateData }: import("
|
|
1116
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
1107
1117
|
} & {
|
|
1108
1118
|
keyTest?: undefined;
|
|
1109
1119
|
};
|
|
@@ -1211,10 +1221,11 @@ export declare const actionChangeVerticalAlign: {
|
|
|
1211
1221
|
};
|
|
1212
1222
|
pendingImageElementId: string | null;
|
|
1213
1223
|
showHyperlinkPopup: false | "info" | "editor";
|
|
1224
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1214
1225
|
};
|
|
1215
1226
|
commitToHistory: true;
|
|
1216
1227
|
};
|
|
1217
|
-
PanelComponent: ({ elements, appState, updateData }: import("
|
|
1228
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
1218
1229
|
} & {
|
|
1219
1230
|
keyTest?: undefined;
|
|
1220
1231
|
};
|
|
@@ -1320,10 +1331,11 @@ export declare const actionChangeSharpness: {
|
|
|
1320
1331
|
};
|
|
1321
1332
|
pendingImageElementId: string | null;
|
|
1322
1333
|
showHyperlinkPopup: false | "info" | "editor";
|
|
1334
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1323
1335
|
};
|
|
1324
1336
|
commitToHistory: true;
|
|
1325
1337
|
};
|
|
1326
|
-
PanelComponent: ({ elements, appState, updateData }: import("
|
|
1338
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
1327
1339
|
} & {
|
|
1328
1340
|
keyTest?: undefined;
|
|
1329
1341
|
};
|
|
@@ -1432,10 +1444,11 @@ export declare const actionChangeArrowhead: {
|
|
|
1432
1444
|
};
|
|
1433
1445
|
pendingImageElementId: string | null;
|
|
1434
1446
|
showHyperlinkPopup: false | "info" | "editor";
|
|
1447
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1435
1448
|
};
|
|
1436
1449
|
commitToHistory: true;
|
|
1437
1450
|
};
|
|
1438
|
-
PanelComponent: ({ elements, appState, updateData }: import("
|
|
1451
|
+
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
1439
1452
|
} & {
|
|
1440
1453
|
keyTest?: undefined;
|
|
1441
1454
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ExcalidrawElement } from "../element/types";
|
|
2
3
|
export declare const actionSelectAll: {
|
|
3
4
|
name: "selectAll";
|
|
4
5
|
trackEvent: {
|
|
5
6
|
category: "canvas";
|
|
6
7
|
};
|
|
7
|
-
perform: (elements: readonly import("../
|
|
8
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => false | {
|
|
8
9
|
appState: import("../types").AppState;
|
|
9
10
|
commitToHistory: true;
|
|
10
11
|
};
|
|
@@ -101,6 +101,7 @@ export declare const actionCopyStyles: {
|
|
|
101
101
|
};
|
|
102
102
|
pendingImageElementId: string | null;
|
|
103
103
|
showHyperlinkPopup: false | "info" | "editor";
|
|
104
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
104
105
|
};
|
|
105
106
|
commitToHistory: false;
|
|
106
107
|
};
|
|
@@ -104,6 +104,7 @@ export declare const actionToggleGridMode: {
|
|
|
104
104
|
};
|
|
105
105
|
pendingImageElementId: string | null;
|
|
106
106
|
showHyperlinkPopup: false | "info" | "editor";
|
|
107
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
107
108
|
};
|
|
108
109
|
commitToHistory: false;
|
|
109
110
|
};
|
|
@@ -7,7 +7,105 @@ export declare const actionToggleLock: {
|
|
|
7
7
|
};
|
|
8
8
|
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => false | {
|
|
9
9
|
elements: ExcalidrawElement[];
|
|
10
|
-
appState:
|
|
10
|
+
appState: {
|
|
11
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
errorMessage: string | null;
|
|
14
|
+
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
15
|
+
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
16
|
+
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
17
|
+
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
18
|
+
isBindingEnabled: boolean;
|
|
19
|
+
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
20
|
+
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
21
|
+
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
|
+
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
23
|
+
activeTool: {
|
|
24
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
25
|
+
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
26
|
+
locked: boolean;
|
|
27
|
+
customType: null;
|
|
28
|
+
} | {
|
|
29
|
+
type: "custom";
|
|
30
|
+
customType: string;
|
|
31
|
+
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
32
|
+
locked: boolean;
|
|
33
|
+
};
|
|
34
|
+
penMode: boolean;
|
|
35
|
+
penDetected: boolean;
|
|
36
|
+
exportBackground: boolean;
|
|
37
|
+
exportEmbedScene: boolean;
|
|
38
|
+
exportWithDarkMode: boolean;
|
|
39
|
+
exportScale: number;
|
|
40
|
+
currentItemStrokeColor: string;
|
|
41
|
+
currentItemBackgroundColor: string;
|
|
42
|
+
currentItemFillStyle: import("../element/types").FillStyle;
|
|
43
|
+
currentItemStrokeWidth: number;
|
|
44
|
+
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
45
|
+
currentItemRoughness: number;
|
|
46
|
+
currentItemOpacity: number;
|
|
47
|
+
currentItemFontFamily: number;
|
|
48
|
+
currentItemFontSize: number;
|
|
49
|
+
currentItemTextAlign: import("../element/types").TextAlign;
|
|
50
|
+
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
51
|
+
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
52
|
+
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
53
|
+
currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
54
|
+
viewBackgroundColor: string;
|
|
55
|
+
scrollX: number;
|
|
56
|
+
scrollY: number;
|
|
57
|
+
cursorButton: "up" | "down";
|
|
58
|
+
scrolledOutside: boolean;
|
|
59
|
+
name: string;
|
|
60
|
+
isResizing: boolean;
|
|
61
|
+
isRotating: boolean;
|
|
62
|
+
zoom: Readonly<{
|
|
63
|
+
value: import("../types").NormalizedZoomValue;
|
|
64
|
+
}>;
|
|
65
|
+
openMenu: "canvas" | "shape" | null;
|
|
66
|
+
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
67
|
+
lastPointerDownWith: import("../element/types").PointerType;
|
|
68
|
+
selectedElementIds: {
|
|
69
|
+
[id: string]: boolean;
|
|
70
|
+
};
|
|
71
|
+
previousSelectedElementIds: {
|
|
72
|
+
[id: string]: boolean;
|
|
73
|
+
};
|
|
74
|
+
shouldCacheIgnoreZoom: boolean;
|
|
75
|
+
showHelpDialog: boolean;
|
|
76
|
+
toast: {
|
|
77
|
+
message: string;
|
|
78
|
+
closable?: boolean | undefined;
|
|
79
|
+
duration?: number | undefined;
|
|
80
|
+
} | null;
|
|
81
|
+
zenModeEnabled: boolean;
|
|
82
|
+
theme: string;
|
|
83
|
+
gridSize: number | null;
|
|
84
|
+
viewModeEnabled: boolean;
|
|
85
|
+
selectedGroupIds: {
|
|
86
|
+
[groupId: string]: boolean;
|
|
87
|
+
};
|
|
88
|
+
editingGroupId: string | null;
|
|
89
|
+
width: number;
|
|
90
|
+
height: number;
|
|
91
|
+
offsetTop: number;
|
|
92
|
+
offsetLeft: number;
|
|
93
|
+
isLibraryOpen: boolean;
|
|
94
|
+
isLibraryMenuDocked: boolean;
|
|
95
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
96
|
+
collaborators: Map<string, import("../types").Collaborator>;
|
|
97
|
+
showStats: boolean;
|
|
98
|
+
currentChartType: import("../element/types").ChartType;
|
|
99
|
+
pasteDialog: {
|
|
100
|
+
shown: false;
|
|
101
|
+
data: null;
|
|
102
|
+
} | {
|
|
103
|
+
shown: true;
|
|
104
|
+
data: import("../charts").Spreadsheet;
|
|
105
|
+
};
|
|
106
|
+
pendingImageElementId: string | null;
|
|
107
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
108
|
+
};
|
|
11
109
|
commitToHistory: true;
|
|
12
110
|
};
|
|
13
111
|
contextItemLabel: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => "labels.elementLock.unlock" | "labels.elementLock.lock" | "labels.elementLock.lockAll" | "labels.elementLock.unlockAll";
|
|
@@ -102,6 +102,7 @@ export declare const actionToggleStats: {
|
|
|
102
102
|
};
|
|
103
103
|
pendingImageElementId: string | null;
|
|
104
104
|
showHyperlinkPopup: false | "info" | "editor";
|
|
105
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
105
106
|
};
|
|
106
107
|
commitToHistory: false;
|
|
107
108
|
};
|
|
@@ -103,6 +103,7 @@ export declare const actionToggleViewMode: {
|
|
|
103
103
|
};
|
|
104
104
|
pendingImageElementId: string | null;
|
|
105
105
|
showHyperlinkPopup: false | "info" | "editor";
|
|
106
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
106
107
|
};
|
|
107
108
|
commitToHistory: false;
|
|
108
109
|
};
|
|
@@ -103,6 +103,7 @@ export declare const actionToggleZenMode: {
|
|
|
103
103
|
};
|
|
104
104
|
pendingImageElementId: string | null;
|
|
105
105
|
showHyperlinkPopup: false | "info" | "editor";
|
|
106
|
+
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
106
107
|
};
|
|
107
108
|
commitToHistory: false;
|
|
108
109
|
};
|
|
@@ -12,7 +12,7 @@ export declare const actionSendBackward: {
|
|
|
12
12
|
contextItemLabel: string;
|
|
13
13
|
keyPriority: number;
|
|
14
14
|
keyTest: (event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean;
|
|
15
|
-
PanelComponent: ({ updateData, appState }:
|
|
15
|
+
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => JSX.Element;
|
|
16
16
|
} & {
|
|
17
17
|
keyTest?: ((event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean) | undefined;
|
|
18
18
|
};
|
|
@@ -29,7 +29,7 @@ export declare const actionBringForward: {
|
|
|
29
29
|
contextItemLabel: string;
|
|
30
30
|
keyPriority: number;
|
|
31
31
|
keyTest: (event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean;
|
|
32
|
-
PanelComponent: ({ updateData, appState }:
|
|
32
|
+
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => JSX.Element;
|
|
33
33
|
} & {
|
|
34
34
|
keyTest?: ((event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean) | undefined;
|
|
35
35
|
};
|
|
@@ -45,7 +45,7 @@ export declare const actionSendToBack: {
|
|
|
45
45
|
};
|
|
46
46
|
contextItemLabel: string;
|
|
47
47
|
keyTest: (event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean;
|
|
48
|
-
PanelComponent: ({ updateData, appState }:
|
|
48
|
+
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => JSX.Element;
|
|
49
49
|
} & {
|
|
50
50
|
keyTest?: ((event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean) | undefined;
|
|
51
51
|
};
|
|
@@ -61,7 +61,7 @@ export declare const actionBringToFront: {
|
|
|
61
61
|
};
|
|
62
62
|
contextItemLabel: string;
|
|
63
63
|
keyTest: (event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean;
|
|
64
|
-
PanelComponent: ({ updateData, appState }:
|
|
64
|
+
PanelComponent: ({ updateData, appState }: import("./types").PanelComponentProps) => JSX.Element;
|
|
65
65
|
} & {
|
|
66
66
|
keyTest?: ((event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean) | undefined;
|
|
67
67
|
};
|
package/types/analytics.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const trackEvent: (category: string, action: string, label?: string
|
|
1
|
+
export declare const trackEvent: (category: string, action: string, label?: string, value?: number) => void;
|
package/types/appState.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
61
61
|
isLibraryMenuDocked?: boolean | undefined;
|
|
62
62
|
showStats?: boolean | undefined;
|
|
63
63
|
currentChartType?: import("./element/types").ChartType | undefined;
|
|
64
|
+
selectedLinearElement?: import("./element/linearElementEditor").LinearElementEditor | null | undefined;
|
|
64
65
|
};
|
|
65
66
|
export declare const cleanAppStateForExport: (appState: Partial<AppState>) => {
|
|
66
67
|
viewBackgroundColor?: string | undefined;
|
package/types/clients.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export declare const getClientColors: (clientId: string, appState: AppState) =>
|
|
|
3
3
|
background: string;
|
|
4
4
|
stroke: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const getClientInitials: (username?: string | null
|
|
6
|
+
export declare const getClientInitials: (username?: string | null) => string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { RoughCanvas } from "roughjs/bin/canvas";
|
|
3
3
|
import { ActionManager } from "../actions/manager";
|
|
4
|
+
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
4
5
|
import { ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement } from "../element/types";
|
|
5
6
|
import History from "../history";
|
|
6
7
|
import Scene from "../scene/Scene";
|
|
@@ -222,7 +223,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
222
223
|
private refreshDeviceState;
|
|
223
224
|
componentDidMount(): Promise<void>;
|
|
224
225
|
componentWillUnmount(): void;
|
|
225
|
-
private checkIfBrowserZoomed;
|
|
226
226
|
private onResize;
|
|
227
227
|
private removeEventListeners;
|
|
228
228
|
private addEventListeners;
|
|
@@ -287,6 +287,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
287
287
|
private handleCanvasPointerMove;
|
|
288
288
|
private handleEraser;
|
|
289
289
|
private handleTouchMove;
|
|
290
|
+
handleHoverSelectedLinearElement(linearElementEditor: LinearElementEditor, scenePointerX: number, scenePointerY: number): void;
|
|
290
291
|
private handleCanvasPointerDown;
|
|
291
292
|
private handleCanvasPointerUp;
|
|
292
293
|
private maybeOpenContextMenuAfterPointerDownOnTouchDevices;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./Modal.scss";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { AppState } from "../types";
|
|
4
|
-
export declare const Modal:
|
|
4
|
+
export declare const Modal: React.FC<{
|
|
5
5
|
className?: string;
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
maxWidth?: number;
|
|
@@ -9,4 +9,4 @@ export declare const Modal: (props: {
|
|
|
9
9
|
labelledBy: string;
|
|
10
10
|
theme?: AppState["theme"];
|
|
11
11
|
closeOnClickOutside?: boolean;
|
|
12
|
-
}
|
|
12
|
+
}>;
|
package/types/data/blob.d.ts
CHANGED
|
@@ -8,16 +8,16 @@ export declare const getFileHandleType: (handle: FileSystemHandle | null) => str
|
|
|
8
8
|
export declare const isImageFileHandleType: (type: string | null) => type is "svg" | "png";
|
|
9
9
|
export declare const isImageFileHandle: (handle: FileSystemHandle | null) => boolean;
|
|
10
10
|
export declare const isSupportedImageFile: (blob: Blob | null | undefined) => blob is Blob & {
|
|
11
|
-
type: typeof ALLOWED_IMAGE_MIME_TYPES[number];
|
|
11
|
+
type: (typeof ALLOWED_IMAGE_MIME_TYPES)[number];
|
|
12
12
|
};
|
|
13
|
-
export declare const loadSceneOrLibraryFromBlob: (blob: Blob | File, localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null, fileHandle?: FileSystemHandle | null
|
|
13
|
+
export declare const loadSceneOrLibraryFromBlob: (blob: Blob | File, localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null, fileHandle?: FileSystemHandle | null) => Promise<{
|
|
14
14
|
type: "application/vnd.excalidraw+json";
|
|
15
15
|
data: import("./restore").RestoredDataState;
|
|
16
16
|
} | {
|
|
17
17
|
type: "application/vnd.excalidrawlib+json";
|
|
18
18
|
data: ImportedLibraryData;
|
|
19
19
|
}>;
|
|
20
|
-
export declare const loadFromBlob: (blob: Blob, localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null, fileHandle?: FileSystemHandle | null
|
|
20
|
+
export declare const loadFromBlob: (blob: Blob, localAppState: AppState | null, localElements: readonly ExcalidrawElement[] | null, fileHandle?: FileSystemHandle | null) => Promise<import("./restore").RestoredDataState>;
|
|
21
21
|
export declare const parseLibraryJSON: (json: string, defaultStatus?: LibraryItem["status"]) => LibraryItem[];
|
|
22
22
|
export declare const loadLibraryFromBlob: (blob: Blob, defaultStatus?: LibraryItem["status"]) => Promise<LibraryItem[]>;
|
|
23
23
|
export declare const canvasToBlob: (canvas: HTMLCanvasElement) => Promise<Blob>;
|
|
@@ -28,7 +28,7 @@ export declare const getDataURL: (file: Blob | File) => Promise<DataURL>;
|
|
|
28
28
|
export declare const dataURLToFile: (dataURL: DataURL, filename?: string) => File;
|
|
29
29
|
export declare const resizeImageFile: (file: File, opts: {
|
|
30
30
|
/** undefined indicates auto */
|
|
31
|
-
outputType?: typeof MIME_TYPES["jpg"];
|
|
31
|
+
outputType?: (typeof MIME_TYPES)["jpg"];
|
|
32
32
|
maxWidthOrHeight: number;
|
|
33
33
|
}) => Promise<File>;
|
|
34
34
|
export declare const SVGStringToFile: (SVGString: string, filename?: string) => File & {
|
package/types/data/json.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare const isValidExcalidrawData: (data?: {
|
|
|
10
10
|
type?: any;
|
|
11
11
|
elements?: any;
|
|
12
12
|
appState?: any;
|
|
13
|
-
}
|
|
13
|
+
}) => data is ImportedDataState;
|
|
14
14
|
export declare const isValidLibrary: (json: any) => json is ImportedLibraryData;
|
|
15
15
|
export declare const serializeLibraryAsJSON: (libraryItems: LibraryItems) => string;
|
|
16
16
|
export declare const saveLibraryAsJSON: (libraryItems: LibraryItems) => Promise<void>;
|