@excalidraw/excalidraw 0.12.0-b00bd3d → 0.12.0-b477c2a
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 +11 -850
- package/README.md +26 -12
- package/dist/excalidraw-assets/locales/bn-BD-json-906099d3f665de611389.js +1 -0
- package/dist/excalidraw-assets/locales/ca-ES-json-7f3f0a2c7f428fa60e01.js +1 -0
- package/dist/excalidraw-assets/locales/cs-CZ-json-304d08cac870aa0684ec.js +1 -0
- package/dist/excalidraw-assets/locales/el-GR-json-18ce48894d32ca4895b8.js +1 -0
- package/dist/excalidraw-assets/locales/es-ES-json-69a6c81b0e5dc370ea1a.js +1 -0
- package/dist/{excalidraw-assets-dev/locales/ja-JP-json-41b80357462192231c17.js → excalidraw-assets/locales/ja-JP-json-4c357f8206b88dc44840.js} +1 -22
- package/dist/excalidraw-assets/locales/ko-KR-json-8e7ae1bb19a7677a8190.js +1 -0
- package/dist/excalidraw-assets/locales/lt-LT-json-4147c3543dce75362050.js +1 -0
- package/dist/excalidraw-assets/locales/pt-BR-json-4ffa2f70c2863bca4f91.js +1 -0
- package/dist/excalidraw-assets/locales/pt-PT-json-4368eca89d2b2b3fb444.js +1 -0
- package/dist/excalidraw-assets/locales/vi-VN-json-929afcbc15b2c06a64f2.js +1 -0
- package/dist/excalidraw-assets/vendor-cb04f63875674d708080.js +2 -0
- package/dist/excalidraw-assets/{vendor-52b1f3361986b6c6a4fe.js.LICENSE.txt → vendor-cb04f63875674d708080.js.LICENSE.txt} +0 -0
- package/dist/excalidraw-assets-dev/locales/bn-BD-json-c3b027e18322cd5f67dd.js +22 -0
- package/dist/excalidraw-assets-dev/locales/ca-ES-json-465e286330127bad8841.js +22 -0
- package/dist/excalidraw-assets-dev/locales/cs-CZ-json-a9cc158d187424de71d7.js +22 -0
- package/dist/excalidraw-assets-dev/locales/el-GR-json-33bcaca5c1eb85d3d81a.js +22 -0
- package/dist/excalidraw-assets-dev/locales/es-ES-json-41e67e045d8f77e56a7a.js +22 -0
- package/dist/excalidraw-assets-dev/locales/ja-JP-json-77b3461742458e757b59.js +22 -0
- package/dist/excalidraw-assets-dev/locales/ko-KR-json-b6b0f0c8dc22ac7a3377.js +22 -0
- package/dist/excalidraw-assets-dev/locales/lt-LT-json-09b44716baf6aae6bf11.js +22 -0
- package/dist/excalidraw-assets-dev/locales/pt-BR-json-5abf09146a4f4387393d.js +22 -0
- package/dist/excalidraw-assets-dev/locales/pt-PT-json-c72abd8cf29d14347cf5.js +22 -0
- package/dist/excalidraw-assets-dev/locales/{bn-BD-json-02993b6dba9e7f115b53.js → vi-VN-json-03f122275dad01552357.js} +4 -4
- package/dist/excalidraw-assets-dev/{vendor-c0592035c3911af79359.js → vendor-e6df8519da951026ff69.js} +1 -1
- package/dist/excalidraw.development.js +77 -77
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +0 -9
- 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 +12 -5
- package/types/actions/actionDeleteSelected.d.ts +8 -3
- package/types/actions/actionExport.d.ts +19 -10
- package/types/actions/actionFinalize.d.ts +4 -2
- package/types/actions/actionMenu.d.ts +6 -3
- package/types/actions/actionProperties.d.ts +26 -13
- package/types/actions/actionSelectAll.d.ts +1 -1
- package/types/actions/actionStyles.d.ts +2 -1
- package/types/actions/actionToggleGridMode.d.ts +2 -1
- package/types/actions/actionToggleLock.d.ts +99 -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 -1
- package/types/components/Actions.d.ts +13 -2
- package/types/components/App.d.ts +5 -0
- package/types/components/BackgroundPickerAndDarkModeToggle.d.ts +1 -6
- package/types/components/Footer.d.ts +9 -0
- package/types/components/InitializeApp.d.ts +2 -0
- package/types/components/LayerUI.d.ts +1 -2
- package/types/components/LibraryMenu.d.ts +1 -2
- package/types/components/LoadingMessage.d.ts +2 -0
- package/types/components/MobileMenu.d.ts +3 -4
- package/types/components/Stats.d.ts +1 -1
- package/types/constants.d.ts +5 -0
- package/types/data/blob.d.ts +1 -1
- package/types/element/Hyperlink.d.ts +3 -3
- package/types/element/bounds.d.ts +1 -1
- package/types/element/index.d.ts +1 -1
- package/types/element/linearElementEditor.d.ts +41 -18
- package/types/element/newElement.d.ts +6 -1
- package/types/element/sizeHelpers.d.ts +4 -0
- package/types/element/textElement.d.ts +6 -2
- package/types/element/transformHandles.d.ts +5 -4
- package/types/element/types.d.ts +3 -2
- package/types/keys.d.ts +1 -1
- package/types/math.d.ts +8 -1
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/{bn-BD-json-aa99c5a33f005fb00c6b.d.ts → bn-BD-json-906099d3f665de611389.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/{ca-ES-json-32cf66a0dfdbbafb6903.d.ts → ca-ES-json-7f3f0a2c7f428fa60e01.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/{cs-CZ-json-b22f93257c798fffdfd2.d.ts → cs-CZ-json-304d08cac870aa0684ec.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/{el-GR-json-74f57c0f8b11ac1b6dde.d.ts → el-GR-json-18ce48894d32ca4895b8.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/{es-ES-json-ffb4e65453db2f3058d4.d.ts → es-ES-json-69a6c81b0e5dc370ea1a.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/{ja-JP-json-c60a94f86d3ebe4ade50.d.ts → ja-JP-json-4c357f8206b88dc44840.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/{ko-KR-json-f27d159b2556809076aa.d.ts → ko-KR-json-8e7ae1bb19a7677a8190.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/{lt-LT-json-7277ad8dae6d3e6607b3.d.ts → lt-LT-json-4147c3543dce75362050.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/{pt-BR-json-686219f43cd76123b7fa.d.ts → pt-BR-json-4ffa2f70c2863bca4f91.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/{pt-PT-json-be4502ca3a1250845c39.d.ts → pt-PT-json-4368eca89d2b2b3fb444.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/locales/{vi-VN-json-5c276b534d762658589c.d.ts → vi-VN-json-929afcbc15b2c06a64f2.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-52b1f3361986b6c6a4fe.d.ts → vendor-cb04f63875674d708080.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{bn-BD-json-02993b6dba9e7f115b53.d.ts → bn-BD-json-c3b027e18322cd5f67dd.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{ca-ES-json-7aabb5b31e7a995a90e3.d.ts → ca-ES-json-465e286330127bad8841.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{cs-CZ-json-4119808eda084fb16f0d.d.ts → cs-CZ-json-a9cc158d187424de71d7.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{el-GR-json-2bc44d5450554154e110.d.ts → el-GR-json-33bcaca5c1eb85d3d81a.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{es-ES-json-9e5e962b234d2fa5aac2.d.ts → es-ES-json-41e67e045d8f77e56a7a.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{ja-JP-json-41b80357462192231c17.d.ts → ja-JP-json-77b3461742458e757b59.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{ko-KR-json-09de6762eea271167b56.d.ts → ko-KR-json-b6b0f0c8dc22ac7a3377.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{lt-LT-json-a17971ff33b8929e96d3.d.ts → lt-LT-json-09b44716baf6aae6bf11.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{pt-BR-json-5e4c8cd83b785ed859c2.d.ts → pt-BR-json-5abf09146a4f4387393d.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{pt-PT-json-a7f89a1c6f1c380141e5.d.ts → pt-PT-json-c72abd8cf29d14347cf5.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/locales/{vi-VN-json-670ecb0ad40c0453bdfd.d.ts → vi-VN-json-03f122275dad01552357.d.ts} +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-c0592035c3911af79359.d.ts → vendor-e6df8519da951026ff69.d.ts} +0 -0
- package/types/packages/utils.d.ts +4 -1
- package/types/points.d.ts +2 -1
- package/types/polyfill.d.ts +2 -0
- package/types/renderer/renderScene.d.ts +18 -2
- package/types/types.d.ts +2 -2
- package/dist/excalidraw-assets/locales/bn-BD-json-aa99c5a33f005fb00c6b.js +0 -1
- package/dist/excalidraw-assets/locales/ca-ES-json-32cf66a0dfdbbafb6903.js +0 -1
- package/dist/excalidraw-assets/locales/cs-CZ-json-b22f93257c798fffdfd2.js +0 -1
- package/dist/excalidraw-assets/locales/el-GR-json-74f57c0f8b11ac1b6dde.js +0 -1
- package/dist/excalidraw-assets/locales/es-ES-json-ffb4e65453db2f3058d4.js +0 -1
- package/dist/excalidraw-assets/locales/ja-JP-json-c60a94f86d3ebe4ade50.js +0 -1
- package/dist/excalidraw-assets/locales/ko-KR-json-f27d159b2556809076aa.js +0 -1
- package/dist/excalidraw-assets/locales/lt-LT-json-7277ad8dae6d3e6607b3.js +0 -1
- package/dist/excalidraw-assets/locales/pt-BR-json-686219f43cd76123b7fa.js +0 -1
- package/dist/excalidraw-assets/locales/pt-PT-json-be4502ca3a1250845c39.js +0 -1
- package/dist/excalidraw-assets/locales/vi-VN-json-5c276b534d762658589c.js +0 -1
- package/dist/excalidraw-assets/vendor-52b1f3361986b6c6a4fe.js +0 -2
- package/dist/excalidraw-assets-dev/locales/ca-ES-json-7aabb5b31e7a995a90e3.js +0 -22
- package/dist/excalidraw-assets-dev/locales/cs-CZ-json-4119808eda084fb16f0d.js +0 -22
- package/dist/excalidraw-assets-dev/locales/el-GR-json-2bc44d5450554154e110.js +0 -22
- package/dist/excalidraw-assets-dev/locales/es-ES-json-9e5e962b234d2fa5aac2.js +0 -22
- package/dist/excalidraw-assets-dev/locales/ko-KR-json-09de6762eea271167b56.js +0 -22
- package/dist/excalidraw-assets-dev/locales/lt-LT-json-a17971ff33b8929e96d3.js +0 -22
- package/dist/excalidraw-assets-dev/locales/pt-BR-json-5e4c8cd83b785ed859c2.js +0 -22
- package/dist/excalidraw-assets-dev/locales/pt-PT-json-a7f89a1c6f1c380141e5.js +0 -22
- package/dist/excalidraw-assets-dev/locales/vi-VN-json-670ecb0ad40c0453bdfd.js +0 -22
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { AppState } from "../../src/types";
|
|
3
|
-
import { Arrowhead, ExcalidrawElement, ExcalidrawLinearElement
|
|
3
|
+
import { Arrowhead, ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
|
|
4
4
|
export declare const actionChangeStrokeColor: {
|
|
5
5
|
name: "changeStrokeColor";
|
|
6
6
|
trackEvent: false;
|
|
@@ -60,7 +60,7 @@ export declare const actionChangeFillStyle: {
|
|
|
60
60
|
currentItemOpacity: number;
|
|
61
61
|
currentItemFontFamily: number;
|
|
62
62
|
currentItemFontSize: number;
|
|
63
|
-
currentItemTextAlign:
|
|
63
|
+
currentItemTextAlign: string;
|
|
64
64
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
65
65
|
currentItemStartArrowhead: Arrowhead | null;
|
|
66
66
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -119,6 +119,7 @@ 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
|
};
|
|
@@ -169,7 +170,7 @@ export declare const actionChangeStrokeWidth: {
|
|
|
169
170
|
currentItemOpacity: number;
|
|
170
171
|
currentItemFontFamily: number;
|
|
171
172
|
currentItemFontSize: number;
|
|
172
|
-
currentItemTextAlign:
|
|
173
|
+
currentItemTextAlign: string;
|
|
173
174
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
174
175
|
currentItemStartArrowhead: Arrowhead | null;
|
|
175
176
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -228,6 +229,7 @@ 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
|
};
|
|
@@ -278,7 +280,7 @@ export declare const actionChangeSloppiness: {
|
|
|
278
280
|
currentItemOpacity: number;
|
|
279
281
|
currentItemFontFamily: number;
|
|
280
282
|
currentItemFontSize: number;
|
|
281
|
-
currentItemTextAlign:
|
|
283
|
+
currentItemTextAlign: string;
|
|
282
284
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
283
285
|
currentItemStartArrowhead: Arrowhead | null;
|
|
284
286
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -337,6 +339,7 @@ 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
|
};
|
|
@@ -387,7 +390,7 @@ export declare const actionChangeStrokeStyle: {
|
|
|
387
390
|
currentItemOpacity: number;
|
|
388
391
|
currentItemFontFamily: number;
|
|
389
392
|
currentItemFontSize: number;
|
|
390
|
-
currentItemTextAlign:
|
|
393
|
+
currentItemTextAlign: string;
|
|
391
394
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
392
395
|
currentItemStartArrowhead: Arrowhead | null;
|
|
393
396
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -446,6 +449,7 @@ 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
|
};
|
|
@@ -496,7 +500,7 @@ export declare const actionChangeOpacity: {
|
|
|
496
500
|
currentItemRoughness: number;
|
|
497
501
|
currentItemFontFamily: number;
|
|
498
502
|
currentItemFontSize: number;
|
|
499
|
-
currentItemTextAlign:
|
|
503
|
+
currentItemTextAlign: string;
|
|
500
504
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
501
505
|
currentItemStartArrowhead: Arrowhead | null;
|
|
502
506
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -555,6 +559,7 @@ 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
|
};
|
|
@@ -605,7 +610,7 @@ export declare const actionChangeFontSize: {
|
|
|
605
610
|
currentItemRoughness: number;
|
|
606
611
|
currentItemOpacity: number;
|
|
607
612
|
currentItemFontFamily: number;
|
|
608
|
-
currentItemTextAlign:
|
|
613
|
+
currentItemTextAlign: string;
|
|
609
614
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
610
615
|
currentItemStartArrowhead: Arrowhead | null;
|
|
611
616
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -664,6 +669,7 @@ 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
|
};
|
|
@@ -714,7 +720,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
714
720
|
currentItemRoughness: number;
|
|
715
721
|
currentItemOpacity: number;
|
|
716
722
|
currentItemFontFamily: number;
|
|
717
|
-
currentItemTextAlign:
|
|
723
|
+
currentItemTextAlign: string;
|
|
718
724
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
719
725
|
currentItemStartArrowhead: Arrowhead | null;
|
|
720
726
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -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
|
};
|
|
@@ -823,7 +830,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
823
830
|
currentItemRoughness: number;
|
|
824
831
|
currentItemOpacity: number;
|
|
825
832
|
currentItemFontFamily: number;
|
|
826
|
-
currentItemTextAlign:
|
|
833
|
+
currentItemTextAlign: string;
|
|
827
834
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
828
835
|
currentItemStartArrowhead: Arrowhead | null;
|
|
829
836
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -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
|
};
|
|
@@ -932,7 +940,7 @@ export declare const actionChangeFontFamily: {
|
|
|
932
940
|
currentItemRoughness: number;
|
|
933
941
|
currentItemOpacity: number;
|
|
934
942
|
currentItemFontSize: number;
|
|
935
|
-
currentItemTextAlign:
|
|
943
|
+
currentItemTextAlign: string;
|
|
936
944
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
937
945
|
currentItemStartArrowhead: Arrowhead | null;
|
|
938
946
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -991,6 +999,7 @@ 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
|
};
|
|
@@ -1100,6 +1109,7 @@ 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
|
};
|
|
@@ -1152,7 +1162,7 @@ export declare const actionChangeVerticalAlign: {
|
|
|
1152
1162
|
currentItemOpacity: number;
|
|
1153
1163
|
currentItemFontFamily: number;
|
|
1154
1164
|
currentItemFontSize: number;
|
|
1155
|
-
currentItemTextAlign:
|
|
1165
|
+
currentItemTextAlign: string;
|
|
1156
1166
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
1157
1167
|
currentItemStartArrowhead: Arrowhead | null;
|
|
1158
1168
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -1211,6 +1221,7 @@ 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
|
};
|
|
@@ -1263,7 +1274,7 @@ export declare const actionChangeSharpness: {
|
|
|
1263
1274
|
currentItemOpacity: number;
|
|
1264
1275
|
currentItemFontFamily: number;
|
|
1265
1276
|
currentItemFontSize: number;
|
|
1266
|
-
currentItemTextAlign:
|
|
1277
|
+
currentItemTextAlign: string;
|
|
1267
1278
|
currentItemStartArrowhead: Arrowhead | null;
|
|
1268
1279
|
currentItemEndArrowhead: Arrowhead | null;
|
|
1269
1280
|
viewBackgroundColor: string;
|
|
@@ -1320,6 +1331,7 @@ 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
|
};
|
|
@@ -1373,7 +1385,7 @@ export declare const actionChangeArrowhead: {
|
|
|
1373
1385
|
currentItemOpacity: number;
|
|
1374
1386
|
currentItemFontFamily: number;
|
|
1375
1387
|
currentItemFontSize: number;
|
|
1376
|
-
currentItemTextAlign:
|
|
1388
|
+
currentItemTextAlign: string;
|
|
1377
1389
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
1378
1390
|
currentItemStartArrowhead: Arrowhead | null;
|
|
1379
1391
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -1432,6 +1444,7 @@ 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
|
};
|
|
@@ -5,7 +5,7 @@ export declare const actionSelectAll: {
|
|
|
5
5
|
trackEvent: {
|
|
6
6
|
category: "canvas";
|
|
7
7
|
};
|
|
8
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState
|
|
8
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => false | {
|
|
9
9
|
appState: import("../types").AppState;
|
|
10
10
|
commitToHistory: true;
|
|
11
11
|
};
|
|
@@ -47,7 +47,7 @@ export declare const actionCopyStyles: {
|
|
|
47
47
|
currentItemOpacity: number;
|
|
48
48
|
currentItemFontFamily: number;
|
|
49
49
|
currentItemFontSize: number;
|
|
50
|
-
currentItemTextAlign:
|
|
50
|
+
currentItemTextAlign: string;
|
|
51
51
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
52
52
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
53
53
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -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
|
};
|
|
@@ -46,7 +46,7 @@ export declare const actionToggleGridMode: {
|
|
|
46
46
|
currentItemOpacity: number;
|
|
47
47
|
currentItemFontFamily: number;
|
|
48
48
|
currentItemFontSize: number;
|
|
49
|
-
currentItemTextAlign:
|
|
49
|
+
currentItemTextAlign: string;
|
|
50
50
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
51
51
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
52
52
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -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: string;
|
|
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";
|
|
@@ -44,7 +44,7 @@ export declare const actionToggleStats: {
|
|
|
44
44
|
currentItemOpacity: number;
|
|
45
45
|
currentItemFontFamily: number;
|
|
46
46
|
currentItemFontSize: number;
|
|
47
|
-
currentItemTextAlign:
|
|
47
|
+
currentItemTextAlign: string;
|
|
48
48
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
49
49
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
50
50
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -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
|
};
|
|
@@ -45,7 +45,7 @@ export declare const actionToggleViewMode: {
|
|
|
45
45
|
currentItemOpacity: number;
|
|
46
46
|
currentItemFontFamily: number;
|
|
47
47
|
currentItemFontSize: number;
|
|
48
|
-
currentItemTextAlign:
|
|
48
|
+
currentItemTextAlign: string;
|
|
49
49
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
50
50
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
51
51
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -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
|
};
|
|
@@ -45,7 +45,7 @@ export declare const actionToggleZenMode: {
|
|
|
45
45
|
currentItemOpacity: number;
|
|
46
46
|
currentItemFontFamily: number;
|
|
47
47
|
currentItemFontSize: number;
|
|
48
|
-
currentItemTextAlign:
|
|
48
|
+
currentItemTextAlign: string;
|
|
49
49
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
50
50
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
51
51
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -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
|
};
|
package/types/appState.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
35
35
|
currentItemOpacity?: number | undefined;
|
|
36
36
|
currentItemFontFamily?: number | undefined;
|
|
37
37
|
currentItemFontSize?: number | undefined;
|
|
38
|
-
currentItemTextAlign?:
|
|
38
|
+
currentItemTextAlign?: string | undefined;
|
|
39
39
|
currentItemStrokeSharpness?: import("./element/types").StrokeSharpness | undefined;
|
|
40
40
|
currentItemStartArrowhead?: import("./element/types").Arrowhead | null | undefined;
|
|
41
41
|
currentItemEndArrowhead?: import("./element/types").Arrowhead | null | undefined;
|
|
@@ -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;
|
|
@@ -2,11 +2,10 @@ import React from "react";
|
|
|
2
2
|
import { ActionManager } from "../actions/manager";
|
|
3
3
|
import { ExcalidrawElement, PointerType } from "../element/types";
|
|
4
4
|
import { AppState, Zoom } from "../types";
|
|
5
|
-
export declare const SelectedShapeActions: ({ appState, elements, renderAction,
|
|
5
|
+
export declare const SelectedShapeActions: ({ appState, elements, renderAction, }: {
|
|
6
6
|
appState: AppState;
|
|
7
7
|
elements: readonly ExcalidrawElement[];
|
|
8
8
|
renderAction: ActionManager["renderAction"];
|
|
9
|
-
activeTool: AppState["activeTool"]["type"];
|
|
10
9
|
}) => JSX.Element;
|
|
11
10
|
export declare const ShapesSwitcher: ({ canvas, activeTool, setAppState, onImageAction, appState, }: {
|
|
12
11
|
canvas: HTMLCanvasElement | null;
|
|
@@ -21,3 +20,15 @@ export declare const ZoomActions: ({ renderAction, zoom, }: {
|
|
|
21
20
|
renderAction: ActionManager["renderAction"];
|
|
22
21
|
zoom: Zoom;
|
|
23
22
|
}) => JSX.Element;
|
|
23
|
+
export declare const UndoRedoActions: ({ renderAction, className, }: {
|
|
24
|
+
renderAction: ActionManager["renderAction"];
|
|
25
|
+
className?: string | undefined;
|
|
26
|
+
}) => JSX.Element;
|
|
27
|
+
export declare const ExitZenModeAction: ({ actionManager, showExitZenModeBtn, }: {
|
|
28
|
+
actionManager: ActionManager;
|
|
29
|
+
showExitZenModeBtn: boolean;
|
|
30
|
+
}) => JSX.Element;
|
|
31
|
+
export declare const FinalizeAction: ({ renderAction, className, }: {
|
|
32
|
+
renderAction: ActionManager["renderAction"];
|
|
33
|
+
className?: string | undefined;
|
|
34
|
+
}) => JSX.Element;
|
|
@@ -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, NonDeletedExcalidrawElement } from "../element/types";
|
|
5
6
|
import History from "../history";
|
|
6
7
|
import Scene from "../scene/Scene";
|
|
@@ -16,6 +17,8 @@ export declare const useExcalidrawContainer: () => {
|
|
|
16
17
|
container: HTMLDivElement | null;
|
|
17
18
|
id: string | null;
|
|
18
19
|
};
|
|
20
|
+
export declare const useExcalidrawElements: () => readonly NonDeletedExcalidrawElement[];
|
|
21
|
+
export declare const useExcalidrawAppState: () => AppState;
|
|
19
22
|
declare class App extends React.Component<AppProps, AppState> {
|
|
20
23
|
canvas: AppClassProperties["canvas"];
|
|
21
24
|
rc: RoughCanvas | null;
|
|
@@ -68,6 +71,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
68
71
|
private removeEventListeners;
|
|
69
72
|
private addEventListeners;
|
|
70
73
|
componentDidUpdate(prevProps: AppProps, prevState: AppState): void;
|
|
74
|
+
private renderScene;
|
|
71
75
|
private onScroll;
|
|
72
76
|
private onCut;
|
|
73
77
|
private onCopy;
|
|
@@ -128,6 +132,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
128
132
|
private handleCanvasPointerMove;
|
|
129
133
|
private handleEraser;
|
|
130
134
|
private handleTouchMove;
|
|
135
|
+
handleHoverSelectedLinearElement(linearElementEditor: LinearElementEditor, scenePointerX: number, scenePointerY: number): void;
|
|
131
136
|
private handleCanvasPointerDown;
|
|
132
137
|
private handleCanvasPointerUp;
|
|
133
138
|
private maybeOpenContextMenuAfterPointerDownOnTouchDevices;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { ActionManager } from "../actions/manager";
|
|
3
|
-
|
|
4
|
-
export declare const BackgroundPickerAndDarkModeToggle: ({ appState, setAppState, actionManager, showThemeBtn, }: {
|
|
2
|
+
export declare const BackgroundPickerAndDarkModeToggle: ({ actionManager, }: {
|
|
5
3
|
actionManager: ActionManager;
|
|
6
|
-
appState: AppState;
|
|
7
|
-
setAppState: React.Component<any, AppState>["setState"];
|
|
8
|
-
showThemeBtn: boolean;
|
|
9
4
|
}) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ActionManager } from "../actions/manager";
|
|
2
|
+
import { AppState, ExcalidrawProps } from "../types";
|
|
3
|
+
declare const Footer: ({ appState, actionManager, renderCustomFooter, showExitZenModeBtn, }: {
|
|
4
|
+
appState: AppState;
|
|
5
|
+
actionManager: ActionManager;
|
|
6
|
+
renderCustomFooter?: ExcalidrawProps["renderFooter"];
|
|
7
|
+
showExitZenModeBtn: boolean;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
export default Footer;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Language } from "../i18n";
|
|
3
|
+
import { Theme } from "../element/types";
|
|
3
4
|
interface Props {
|
|
4
5
|
langCode: Language["code"];
|
|
5
6
|
children: React.ReactElement;
|
|
7
|
+
theme?: Theme;
|
|
6
8
|
}
|
|
7
9
|
export declare const InitializeApp: (props: Props) => JSX.Element;
|
|
8
10
|
export {};
|
|
@@ -18,7 +18,6 @@ interface LayerUIProps {
|
|
|
18
18
|
onPenModeToggle: () => void;
|
|
19
19
|
onInsertElements: (elements: readonly NonDeletedExcalidrawElement[]) => void;
|
|
20
20
|
showExitZenModeBtn: boolean;
|
|
21
|
-
showThemeBtn: boolean;
|
|
22
21
|
langCode: Language["code"];
|
|
23
22
|
isCollaborating: boolean;
|
|
24
23
|
renderTopRightUI?: ExcalidrawProps["renderTopRightUI"];
|
|
@@ -33,5 +32,5 @@ interface LayerUIProps {
|
|
|
33
32
|
insertOnCanvasDirectly: boolean;
|
|
34
33
|
}) => void;
|
|
35
34
|
}
|
|
36
|
-
declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState,
|
|
35
|
+
declare const _default: React.MemoExoticComponent<({ actionManager, appState, files, setAppState, elements, canvas, onCollabButtonClick, onLockToggle, onPenModeToggle, onInsertElements, showExitZenModeBtn, isCollaborating, renderTopRightUI, renderCustomFooter, renderCustomStats, libraryReturnUrl, UIOptions, focusContainer, library, id, onImageAction, }: LayerUIProps) => JSX.Element>;
|
|
37
36
|
export default _default;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import Library from "../data/library";
|
|
2
2
|
import { LibraryItems, LibraryItem, AppState, BinaryFiles, ExcalidrawProps } from "../types";
|
|
3
3
|
import "./LibraryMenu.scss";
|
|
4
|
-
export declare const LibraryMenu: ({ onClose, onInsertLibraryItems, pendingElements, onAddToLibrary,
|
|
4
|
+
export declare const LibraryMenu: ({ onClose, onInsertLibraryItems, pendingElements, onAddToLibrary, setAppState, files, libraryReturnUrl, focusContainer, library, id, appState, }: {
|
|
5
5
|
pendingElements: LibraryItem["elements"];
|
|
6
6
|
onClose: () => void;
|
|
7
7
|
onInsertLibraryItems: (libraryItems: LibraryItems) => void;
|
|
8
8
|
onAddToLibrary: () => void;
|
|
9
|
-
theme: AppState["theme"];
|
|
10
9
|
files: BinaryFiles;
|
|
11
10
|
setAppState: React.Component<any, AppState>["setState"];
|
|
12
11
|
libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { AppState } from "../types";
|
|
2
|
+
import { AppState, ExcalidrawProps } from "../types";
|
|
3
3
|
import { ActionManager } from "../actions/manager";
|
|
4
4
|
import { NonDeletedExcalidrawElement } from "../element/types";
|
|
5
5
|
declare type MobileMenuProps = {
|
|
@@ -16,12 +16,11 @@ declare type MobileMenuProps = {
|
|
|
16
16
|
canvas: HTMLCanvasElement | null;
|
|
17
17
|
isCollaborating: boolean;
|
|
18
18
|
renderCustomFooter?: (isMobile: boolean, appState: AppState) => JSX.Element | null;
|
|
19
|
-
showThemeBtn: boolean;
|
|
20
19
|
onImageAction: (data: {
|
|
21
20
|
insertOnCanvasDirectly: boolean;
|
|
22
21
|
}) => void;
|
|
23
22
|
renderTopRightUI?: (isMobile: boolean, appState: AppState) => JSX.Element | null;
|
|
24
|
-
|
|
23
|
+
renderCustomStats?: ExcalidrawProps["renderCustomStats"];
|
|
25
24
|
};
|
|
26
|
-
export declare const MobileMenu: ({ appState, elements, libraryMenu, actionManager, renderJSONExportDialog, renderImageExportDialog, setAppState, onCollabButtonClick, onLockToggle, onPenModeToggle, canvas, isCollaborating, renderCustomFooter,
|
|
25
|
+
export declare const MobileMenu: ({ appState, elements, libraryMenu, actionManager, renderJSONExportDialog, renderImageExportDialog, setAppState, onCollabButtonClick, onLockToggle, onPenModeToggle, canvas, isCollaborating, renderCustomFooter, onImageAction, renderTopRightUI, renderCustomStats, }: MobileMenuProps) => JSX.Element;
|
|
27
26
|
export {};
|
package/types/constants.d.ts
CHANGED
|
@@ -139,6 +139,11 @@ export declare const VERTICAL_ALIGN: {
|
|
|
139
139
|
MIDDLE: string;
|
|
140
140
|
BOTTOM: string;
|
|
141
141
|
};
|
|
142
|
+
export declare const TEXT_ALIGN: {
|
|
143
|
+
LEFT: string;
|
|
144
|
+
CENTER: string;
|
|
145
|
+
RIGHT: string;
|
|
146
|
+
};
|
|
142
147
|
export declare const ELEMENT_READY_TO_ERASE_OPACITY = 20;
|
|
143
148
|
export declare const COOKIES: {
|
|
144
149
|
readonly AUTH_STATE_COOKIE: "excplus-auth";
|
package/types/data/blob.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export declare const getFileFromEvent: (event: React.DragEvent<HTMLDivElement>)
|
|
|
40
40
|
}>;
|
|
41
41
|
export declare const getFileHandle: (event: React.DragEvent<HTMLDivElement>) => Promise<FileSystemHandle | null>;
|
|
42
42
|
export declare const createFile: (blob: File | Blob | ArrayBuffer, mimeType: ValueOf<typeof MIME_TYPES>, name: string | undefined) => File;
|
|
43
|
-
/**
|
|
43
|
+
/** attempts to detect correct mimeType if none is set, or if an image
|
|
44
44
|
* has an incorrect extension.
|
|
45
45
|
* Note: doesn't handle missing .excalidraw/.excalidrawlib extension */
|
|
46
46
|
export declare const normalizeFile: (file: File) => Promise<File>;
|