@excalidraw/excalidraw 0.12.0-6a6b9c9 → 0.12.0-6c1246e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +4 -2
- package/dist/excalidraw.development.js +35 -24
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +3 -3
- package/types/actions/actionBoundText.d.ts +1 -1
- package/types/actions/actionCanvas.d.ts +8 -8
- package/types/actions/actionClipboard.d.ts +6 -6
- package/types/actions/actionDeleteSelected.d.ts +4 -4
- package/types/actions/actionExport.d.ts +9 -9
- package/types/actions/actionFinalize.d.ts +2 -2
- package/types/actions/actionLinearEditor.d.ts +114 -0
- package/types/actions/actionMenu.d.ts +3 -3
- package/types/actions/actionProperties.d.ts +13 -13
- package/types/actions/actionStyles.d.ts +1 -1
- package/types/actions/actionToggleGridMode.d.ts +1 -1
- package/types/actions/actionToggleLock.d.ts +1 -1
- package/types/actions/actionToggleStats.d.ts +1 -1
- package/types/actions/actionToggleViewMode.d.ts +1 -1
- package/types/actions/actionToggleZenMode.d.ts +1 -1
- package/types/actions/index.d.ts +1 -0
- package/types/actions/types.d.ts +1 -1
- package/types/appState.d.ts +1 -1
- package/types/components/BackgroundPickerAndDarkModeToggle.d.ts +1 -6
- package/types/components/InitializeApp.d.ts +2 -0
- package/types/components/LayerUI.d.ts +1 -2
- package/types/components/LoadingMessage.d.ts +2 -0
- package/types/components/MobileMenu.d.ts +1 -2
- package/types/constants.d.ts +5 -0
- package/types/element/Hyperlink.d.ts +1 -1
- package/types/element/linearElementEditor.d.ts +20 -9
- package/types/element/newElement.d.ts +6 -1
- package/types/element/textElement.d.ts +6 -2
- package/types/element/types.d.ts +2 -2
- package/types/math.d.ts +8 -1
- package/types/types.d.ts +1 -1
package/package.json
CHANGED
|
@@ -46,7 +46,7 @@ export declare const actionAddToLibrary: {
|
|
|
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;
|
|
@@ -142,7 +142,7 @@ export declare const actionAddToLibrary: {
|
|
|
142
142
|
currentItemOpacity: number;
|
|
143
143
|
currentItemFontFamily: number;
|
|
144
144
|
currentItemFontSize: number;
|
|
145
|
-
currentItemTextAlign:
|
|
145
|
+
currentItemTextAlign: string;
|
|
146
146
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
147
147
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
148
148
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -243,7 +243,7 @@ export declare const actionAddToLibrary: {
|
|
|
243
243
|
currentItemOpacity: number;
|
|
244
244
|
currentItemFontFamily: number;
|
|
245
245
|
currentItemFontSize: number;
|
|
246
|
-
currentItemTextAlign:
|
|
246
|
+
currentItemTextAlign: string;
|
|
247
247
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
248
248
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
249
249
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -63,7 +63,7 @@ export declare const actionBindText: {
|
|
|
63
63
|
currentItemOpacity: number;
|
|
64
64
|
currentItemFontFamily: number;
|
|
65
65
|
currentItemFontSize: number;
|
|
66
|
-
currentItemTextAlign:
|
|
66
|
+
currentItemTextAlign: string;
|
|
67
67
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
68
68
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
69
69
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -75,7 +75,7 @@ export declare const actionClearCanvas: {
|
|
|
75
75
|
currentItemOpacity: number;
|
|
76
76
|
currentItemFontFamily: number;
|
|
77
77
|
currentItemFontSize: number;
|
|
78
|
-
currentItemTextAlign:
|
|
78
|
+
currentItemTextAlign: string;
|
|
79
79
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
80
80
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
81
81
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -170,7 +170,7 @@ export declare const actionZoomIn: {
|
|
|
170
170
|
currentItemOpacity: number;
|
|
171
171
|
currentItemFontFamily: number;
|
|
172
172
|
currentItemFontSize: number;
|
|
173
|
-
currentItemTextAlign:
|
|
173
|
+
currentItemTextAlign: string;
|
|
174
174
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
175
175
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
176
176
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -282,7 +282,7 @@ export declare const actionZoomOut: {
|
|
|
282
282
|
currentItemOpacity: number;
|
|
283
283
|
currentItemFontFamily: number;
|
|
284
284
|
currentItemFontSize: number;
|
|
285
|
-
currentItemTextAlign:
|
|
285
|
+
currentItemTextAlign: string;
|
|
286
286
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
287
287
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
288
288
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -394,7 +394,7 @@ export declare const actionResetZoom: {
|
|
|
394
394
|
currentItemOpacity: number;
|
|
395
395
|
currentItemFontFamily: number;
|
|
396
396
|
currentItemFontSize: number;
|
|
397
|
-
currentItemTextAlign:
|
|
397
|
+
currentItemTextAlign: string;
|
|
398
398
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
399
399
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
400
400
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -506,7 +506,7 @@ export declare const actionZoomToSelected: {
|
|
|
506
506
|
currentItemOpacity: number;
|
|
507
507
|
currentItemFontFamily: number;
|
|
508
508
|
currentItemFontSize: number;
|
|
509
|
-
currentItemTextAlign:
|
|
509
|
+
currentItemTextAlign: string;
|
|
510
510
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
511
511
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
512
512
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -617,7 +617,7 @@ export declare const actionZoomToFit: {
|
|
|
617
617
|
currentItemOpacity: number;
|
|
618
618
|
currentItemFontFamily: number;
|
|
619
619
|
currentItemFontSize: number;
|
|
620
|
-
currentItemTextAlign:
|
|
620
|
+
currentItemTextAlign: string;
|
|
621
621
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
622
622
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
623
623
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -724,7 +724,7 @@ export declare const actionToggleTheme: {
|
|
|
724
724
|
currentItemOpacity: number;
|
|
725
725
|
currentItemFontFamily: number;
|
|
726
726
|
currentItemFontSize: number;
|
|
727
|
-
currentItemTextAlign:
|
|
727
|
+
currentItemTextAlign: string;
|
|
728
728
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
729
729
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
730
730
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -837,7 +837,7 @@ export declare const actionErase: {
|
|
|
837
837
|
currentItemOpacity: number;
|
|
838
838
|
currentItemFontFamily: number;
|
|
839
839
|
currentItemFontSize: number;
|
|
840
|
-
currentItemTextAlign:
|
|
840
|
+
currentItemTextAlign: string;
|
|
841
841
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
842
842
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
843
843
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -57,7 +57,7 @@ export declare const actionCut: {
|
|
|
57
57
|
currentItemOpacity: number;
|
|
58
58
|
currentItemFontFamily: number;
|
|
59
59
|
currentItemFontSize: number;
|
|
60
|
-
currentItemTextAlign:
|
|
60
|
+
currentItemTextAlign: string;
|
|
61
61
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
62
62
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
63
63
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -140,7 +140,7 @@ export declare const actionCut: {
|
|
|
140
140
|
y: number;
|
|
141
141
|
}>;
|
|
142
142
|
hoverPointIndex: number;
|
|
143
|
-
|
|
143
|
+
segmentMidPointHoveredCoords: readonly [number, number] | null;
|
|
144
144
|
};
|
|
145
145
|
isLoading: boolean;
|
|
146
146
|
errorMessage: string | null;
|
|
@@ -178,7 +178,7 @@ export declare const actionCut: {
|
|
|
178
178
|
currentItemOpacity: number;
|
|
179
179
|
currentItemFontFamily: number;
|
|
180
180
|
currentItemFontSize: number;
|
|
181
|
-
currentItemTextAlign:
|
|
181
|
+
currentItemTextAlign: string;
|
|
182
182
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
183
183
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
184
184
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -281,7 +281,7 @@ export declare const actionCut: {
|
|
|
281
281
|
currentItemOpacity: number;
|
|
282
282
|
currentItemFontFamily: number;
|
|
283
283
|
currentItemFontSize: number;
|
|
284
|
-
currentItemTextAlign:
|
|
284
|
+
currentItemTextAlign: string;
|
|
285
285
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
286
286
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
287
287
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -393,7 +393,7 @@ export declare const actionCopyAsSvg: {
|
|
|
393
393
|
currentItemOpacity: number;
|
|
394
394
|
currentItemFontFamily: number;
|
|
395
395
|
currentItemFontSize: number;
|
|
396
|
-
currentItemTextAlign:
|
|
396
|
+
currentItemTextAlign: string;
|
|
397
397
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
398
398
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
399
399
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -507,7 +507,7 @@ export declare const actionCopyAsPng: {
|
|
|
507
507
|
currentItemOpacity: number;
|
|
508
508
|
currentItemFontFamily: number;
|
|
509
509
|
currentItemFontSize: number;
|
|
510
|
-
currentItemTextAlign:
|
|
510
|
+
currentItemTextAlign: string;
|
|
511
511
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
512
512
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
513
513
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -48,7 +48,7 @@ export declare const actionDeleteSelected: {
|
|
|
48
48
|
currentItemOpacity: number;
|
|
49
49
|
currentItemFontFamily: number;
|
|
50
50
|
currentItemFontSize: number;
|
|
51
|
-
currentItemTextAlign:
|
|
51
|
+
currentItemTextAlign: string;
|
|
52
52
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
53
53
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
54
54
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -131,7 +131,7 @@ export declare const actionDeleteSelected: {
|
|
|
131
131
|
y: number;
|
|
132
132
|
}>;
|
|
133
133
|
hoverPointIndex: number;
|
|
134
|
-
|
|
134
|
+
segmentMidPointHoveredCoords: readonly [number, number] | null;
|
|
135
135
|
};
|
|
136
136
|
isLoading: boolean;
|
|
137
137
|
errorMessage: string | null;
|
|
@@ -169,7 +169,7 @@ export declare const actionDeleteSelected: {
|
|
|
169
169
|
currentItemOpacity: number;
|
|
170
170
|
currentItemFontFamily: number;
|
|
171
171
|
currentItemFontSize: number;
|
|
172
|
-
currentItemTextAlign:
|
|
172
|
+
currentItemTextAlign: string;
|
|
173
173
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
174
174
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
175
175
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -272,7 +272,7 @@ export declare const actionDeleteSelected: {
|
|
|
272
272
|
currentItemOpacity: number;
|
|
273
273
|
currentItemFontFamily: number;
|
|
274
274
|
currentItemFontSize: number;
|
|
275
|
-
currentItemTextAlign:
|
|
275
|
+
currentItemTextAlign: string;
|
|
276
276
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
277
277
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
278
278
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -43,7 +43,7 @@ export declare const actionChangeProjectName: {
|
|
|
43
43
|
currentItemOpacity: number;
|
|
44
44
|
currentItemFontFamily: number;
|
|
45
45
|
currentItemFontSize: number;
|
|
46
|
-
currentItemTextAlign:
|
|
46
|
+
currentItemTextAlign: string;
|
|
47
47
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
48
48
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
49
49
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -154,7 +154,7 @@ export declare const actionChangeExportScale: {
|
|
|
154
154
|
currentItemOpacity: number;
|
|
155
155
|
currentItemFontFamily: number;
|
|
156
156
|
currentItemFontSize: number;
|
|
157
|
-
currentItemTextAlign:
|
|
157
|
+
currentItemTextAlign: string;
|
|
158
158
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
159
159
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
160
160
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -266,7 +266,7 @@ export declare const actionChangeExportBackground: {
|
|
|
266
266
|
currentItemOpacity: number;
|
|
267
267
|
currentItemFontFamily: number;
|
|
268
268
|
currentItemFontSize: number;
|
|
269
|
-
currentItemTextAlign:
|
|
269
|
+
currentItemTextAlign: string;
|
|
270
270
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
271
271
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
272
272
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -378,7 +378,7 @@ export declare const actionChangeExportEmbedScene: {
|
|
|
378
378
|
currentItemOpacity: number;
|
|
379
379
|
currentItemFontFamily: number;
|
|
380
380
|
currentItemFontSize: number;
|
|
381
|
-
currentItemTextAlign:
|
|
381
|
+
currentItemTextAlign: string;
|
|
382
382
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
383
383
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
384
384
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -494,7 +494,7 @@ export declare const actionSaveToActiveFile: {
|
|
|
494
494
|
currentItemOpacity: number;
|
|
495
495
|
currentItemFontFamily: number;
|
|
496
496
|
currentItemFontSize: number;
|
|
497
|
-
currentItemTextAlign:
|
|
497
|
+
currentItemTextAlign: string;
|
|
498
498
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
499
499
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
500
500
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -604,7 +604,7 @@ export declare const actionSaveFileToDisk: {
|
|
|
604
604
|
currentItemOpacity: number;
|
|
605
605
|
currentItemFontFamily: number;
|
|
606
606
|
currentItemFontSize: number;
|
|
607
|
-
currentItemTextAlign:
|
|
607
|
+
currentItemTextAlign: string;
|
|
608
608
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
609
609
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
610
610
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -726,7 +726,7 @@ export declare const actionLoadScene: {
|
|
|
726
726
|
currentItemOpacity: number;
|
|
727
727
|
currentItemFontFamily: number;
|
|
728
728
|
currentItemFontSize: number;
|
|
729
|
-
currentItemTextAlign:
|
|
729
|
+
currentItemTextAlign: string;
|
|
730
730
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
731
731
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
732
732
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -817,7 +817,7 @@ export declare const actionLoadScene: {
|
|
|
817
817
|
currentItemOpacity: number;
|
|
818
818
|
currentItemFontFamily: number;
|
|
819
819
|
currentItemFontSize: number;
|
|
820
|
-
currentItemTextAlign:
|
|
820
|
+
currentItemTextAlign: string;
|
|
821
821
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
822
822
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
823
823
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -931,7 +931,7 @@ export declare const actionExportWithDarkMode: {
|
|
|
931
931
|
currentItemOpacity: number;
|
|
932
932
|
currentItemFontFamily: number;
|
|
933
933
|
currentItemFontSize: number;
|
|
934
|
-
currentItemTextAlign:
|
|
934
|
+
currentItemTextAlign: string;
|
|
935
935
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
936
936
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
937
937
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -45,7 +45,7 @@ export declare const actionFinalize: {
|
|
|
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;
|
|
@@ -152,7 +152,7 @@ export declare const actionFinalize: {
|
|
|
152
152
|
currentItemOpacity: number;
|
|
153
153
|
currentItemFontFamily: number;
|
|
154
154
|
currentItemFontSize: number;
|
|
155
|
-
currentItemTextAlign:
|
|
155
|
+
currentItemTextAlign: string;
|
|
156
156
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
157
157
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
158
158
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { LinearElementEditor } from "../element/linearElementEditor";
|
|
2
|
+
import { ExcalidrawLinearElement } from "../element/types";
|
|
3
|
+
export declare const actionToggleLinearEditor: {
|
|
4
|
+
name: "toggleLinearEditor";
|
|
5
|
+
trackEvent: {
|
|
6
|
+
category: "element";
|
|
7
|
+
};
|
|
8
|
+
contextItemPredicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
9
|
+
perform(elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties): {
|
|
10
|
+
appState: {
|
|
11
|
+
editingLinearElement: 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<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
|
+
activeTool: {
|
|
23
|
+
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
24
|
+
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
25
|
+
locked: boolean;
|
|
26
|
+
customType: null;
|
|
27
|
+
} | {
|
|
28
|
+
type: "custom";
|
|
29
|
+
customType: string;
|
|
30
|
+
lastActiveToolBeforeEraser: import("../types").LastActiveToolBeforeEraser;
|
|
31
|
+
locked: boolean;
|
|
32
|
+
};
|
|
33
|
+
penMode: boolean;
|
|
34
|
+
penDetected: boolean;
|
|
35
|
+
exportBackground: boolean;
|
|
36
|
+
exportEmbedScene: boolean;
|
|
37
|
+
exportWithDarkMode: boolean;
|
|
38
|
+
exportScale: number;
|
|
39
|
+
currentItemStrokeColor: string;
|
|
40
|
+
currentItemBackgroundColor: string;
|
|
41
|
+
currentItemFillStyle: import("../element/types").FillStyle;
|
|
42
|
+
currentItemStrokeWidth: number;
|
|
43
|
+
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
44
|
+
currentItemRoughness: number;
|
|
45
|
+
currentItemOpacity: number;
|
|
46
|
+
currentItemFontFamily: number;
|
|
47
|
+
currentItemFontSize: number;
|
|
48
|
+
currentItemTextAlign: string;
|
|
49
|
+
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
50
|
+
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
51
|
+
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
52
|
+
currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
53
|
+
viewBackgroundColor: string;
|
|
54
|
+
scrollX: number;
|
|
55
|
+
scrollY: number;
|
|
56
|
+
cursorButton: "up" | "down";
|
|
57
|
+
scrolledOutside: boolean;
|
|
58
|
+
name: string;
|
|
59
|
+
isResizing: boolean;
|
|
60
|
+
isRotating: boolean;
|
|
61
|
+
zoom: Readonly<{
|
|
62
|
+
value: import("../types").NormalizedZoomValue;
|
|
63
|
+
}>;
|
|
64
|
+
openMenu: "canvas" | "shape" | null;
|
|
65
|
+
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
66
|
+
lastPointerDownWith: import("../element/types").PointerType;
|
|
67
|
+
selectedElementIds: {
|
|
68
|
+
[id: string]: boolean;
|
|
69
|
+
};
|
|
70
|
+
previousSelectedElementIds: {
|
|
71
|
+
[id: string]: boolean;
|
|
72
|
+
};
|
|
73
|
+
shouldCacheIgnoreZoom: boolean;
|
|
74
|
+
showHelpDialog: boolean;
|
|
75
|
+
toast: {
|
|
76
|
+
message: string;
|
|
77
|
+
closable?: boolean | undefined;
|
|
78
|
+
duration?: number | undefined;
|
|
79
|
+
} | null;
|
|
80
|
+
zenModeEnabled: boolean;
|
|
81
|
+
theme: string;
|
|
82
|
+
gridSize: number | null;
|
|
83
|
+
viewModeEnabled: boolean;
|
|
84
|
+
selectedGroupIds: {
|
|
85
|
+
[groupId: string]: boolean;
|
|
86
|
+
};
|
|
87
|
+
editingGroupId: string | null;
|
|
88
|
+
width: number;
|
|
89
|
+
height: number;
|
|
90
|
+
offsetTop: number;
|
|
91
|
+
offsetLeft: number;
|
|
92
|
+
isLibraryOpen: boolean;
|
|
93
|
+
isLibraryMenuDocked: boolean;
|
|
94
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
95
|
+
collaborators: Map<string, import("../types").Collaborator>;
|
|
96
|
+
showStats: boolean;
|
|
97
|
+
currentChartType: import("../element/types").ChartType;
|
|
98
|
+
pasteDialog: {
|
|
99
|
+
shown: false;
|
|
100
|
+
data: null;
|
|
101
|
+
} | {
|
|
102
|
+
shown: true;
|
|
103
|
+
data: import("../charts").Spreadsheet;
|
|
104
|
+
};
|
|
105
|
+
pendingImageElementId: string | null;
|
|
106
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
107
|
+
selectedLinearElement: LinearElementEditor | null;
|
|
108
|
+
};
|
|
109
|
+
commitToHistory: false;
|
|
110
|
+
};
|
|
111
|
+
contextItemLabel: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => "labels.lineEditor.exit" | "labels.lineEditor.edit";
|
|
112
|
+
} & {
|
|
113
|
+
keyTest?: undefined;
|
|
114
|
+
};
|
|
@@ -44,7 +44,7 @@ export declare const actionToggleCanvasMenu: {
|
|
|
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;
|
|
@@ -155,7 +155,7 @@ export declare const actionToggleEditMenu: {
|
|
|
155
155
|
currentItemOpacity: number;
|
|
156
156
|
currentItemFontFamily: number;
|
|
157
157
|
currentItemFontSize: number;
|
|
158
|
-
currentItemTextAlign:
|
|
158
|
+
currentItemTextAlign: string;
|
|
159
159
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
160
160
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
161
161
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -280,7 +280,7 @@ export declare const actionShortcuts: {
|
|
|
280
280
|
currentItemOpacity: number;
|
|
281
281
|
currentItemFontFamily: number;
|
|
282
282
|
currentItemFontSize: number;
|
|
283
|
-
currentItemTextAlign:
|
|
283
|
+
currentItemTextAlign: string;
|
|
284
284
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
285
285
|
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
286
286
|
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
@@ -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;
|
|
@@ -170,7 +170,7 @@ export declare const actionChangeStrokeWidth: {
|
|
|
170
170
|
currentItemOpacity: number;
|
|
171
171
|
currentItemFontFamily: number;
|
|
172
172
|
currentItemFontSize: number;
|
|
173
|
-
currentItemTextAlign:
|
|
173
|
+
currentItemTextAlign: string;
|
|
174
174
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
175
175
|
currentItemStartArrowhead: Arrowhead | null;
|
|
176
176
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -280,7 +280,7 @@ export declare const actionChangeSloppiness: {
|
|
|
280
280
|
currentItemOpacity: number;
|
|
281
281
|
currentItemFontFamily: number;
|
|
282
282
|
currentItemFontSize: number;
|
|
283
|
-
currentItemTextAlign:
|
|
283
|
+
currentItemTextAlign: string;
|
|
284
284
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
285
285
|
currentItemStartArrowhead: Arrowhead | null;
|
|
286
286
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -390,7 +390,7 @@ export declare const actionChangeStrokeStyle: {
|
|
|
390
390
|
currentItemOpacity: number;
|
|
391
391
|
currentItemFontFamily: number;
|
|
392
392
|
currentItemFontSize: number;
|
|
393
|
-
currentItemTextAlign:
|
|
393
|
+
currentItemTextAlign: string;
|
|
394
394
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
395
395
|
currentItemStartArrowhead: Arrowhead | null;
|
|
396
396
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -500,7 +500,7 @@ export declare const actionChangeOpacity: {
|
|
|
500
500
|
currentItemRoughness: number;
|
|
501
501
|
currentItemFontFamily: number;
|
|
502
502
|
currentItemFontSize: number;
|
|
503
|
-
currentItemTextAlign:
|
|
503
|
+
currentItemTextAlign: string;
|
|
504
504
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
505
505
|
currentItemStartArrowhead: Arrowhead | null;
|
|
506
506
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -610,7 +610,7 @@ export declare const actionChangeFontSize: {
|
|
|
610
610
|
currentItemRoughness: number;
|
|
611
611
|
currentItemOpacity: number;
|
|
612
612
|
currentItemFontFamily: number;
|
|
613
|
-
currentItemTextAlign:
|
|
613
|
+
currentItemTextAlign: string;
|
|
614
614
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
615
615
|
currentItemStartArrowhead: Arrowhead | null;
|
|
616
616
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -720,7 +720,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
720
720
|
currentItemRoughness: number;
|
|
721
721
|
currentItemOpacity: number;
|
|
722
722
|
currentItemFontFamily: number;
|
|
723
|
-
currentItemTextAlign:
|
|
723
|
+
currentItemTextAlign: string;
|
|
724
724
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
725
725
|
currentItemStartArrowhead: Arrowhead | null;
|
|
726
726
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -830,7 +830,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
830
830
|
currentItemRoughness: number;
|
|
831
831
|
currentItemOpacity: number;
|
|
832
832
|
currentItemFontFamily: number;
|
|
833
|
-
currentItemTextAlign:
|
|
833
|
+
currentItemTextAlign: string;
|
|
834
834
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
835
835
|
currentItemStartArrowhead: Arrowhead | null;
|
|
836
836
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -940,7 +940,7 @@ export declare const actionChangeFontFamily: {
|
|
|
940
940
|
currentItemRoughness: number;
|
|
941
941
|
currentItemOpacity: number;
|
|
942
942
|
currentItemFontSize: number;
|
|
943
|
-
currentItemTextAlign:
|
|
943
|
+
currentItemTextAlign: string;
|
|
944
944
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
945
945
|
currentItemStartArrowhead: Arrowhead | null;
|
|
946
946
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -1162,7 +1162,7 @@ export declare const actionChangeVerticalAlign: {
|
|
|
1162
1162
|
currentItemOpacity: number;
|
|
1163
1163
|
currentItemFontFamily: number;
|
|
1164
1164
|
currentItemFontSize: number;
|
|
1165
|
-
currentItemTextAlign:
|
|
1165
|
+
currentItemTextAlign: string;
|
|
1166
1166
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
1167
1167
|
currentItemStartArrowhead: Arrowhead | null;
|
|
1168
1168
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -1274,7 +1274,7 @@ export declare const actionChangeSharpness: {
|
|
|
1274
1274
|
currentItemOpacity: number;
|
|
1275
1275
|
currentItemFontFamily: number;
|
|
1276
1276
|
currentItemFontSize: number;
|
|
1277
|
-
currentItemTextAlign:
|
|
1277
|
+
currentItemTextAlign: string;
|
|
1278
1278
|
currentItemStartArrowhead: Arrowhead | null;
|
|
1279
1279
|
currentItemEndArrowhead: Arrowhead | null;
|
|
1280
1280
|
viewBackgroundColor: string;
|
|
@@ -1385,7 +1385,7 @@ export declare const actionChangeArrowhead: {
|
|
|
1385
1385
|
currentItemOpacity: number;
|
|
1386
1386
|
currentItemFontFamily: number;
|
|
1387
1387
|
currentItemFontSize: number;
|
|
1388
|
-
currentItemTextAlign:
|
|
1388
|
+
currentItemTextAlign: string;
|
|
1389
1389
|
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
1390
1390
|
currentItemStartArrowhead: Arrowhead | null;
|
|
1391
1391
|
currentItemEndArrowhead: Arrowhead | null;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -46,7 +46,7 @@ export declare const actionToggleLock: {
|
|
|
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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
package/types/actions/index.d.ts
CHANGED
|
@@ -21,3 +21,4 @@ export { actionToggleStats } from "./actionToggleStats";
|
|
|
21
21
|
export { actionUnbindText, actionBindText } from "./actionBoundText";
|
|
22
22
|
export { actionLink } from "../element/Hyperlink";
|
|
23
23
|
export { actionToggleLock } from "./actionToggleLock";
|
|
24
|
+
export { actionToggleLinearEditor } from "./actionLinearEditor";
|