@myoc/common 0.19.536 → 0.19.538
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/dev/index.js +18 -6
- package/dist/dev/index.js.map +2 -2
- package/dist/prod/index.js +3 -3
- package/dist/types/common/src/utils.d.ts +15 -12
- package/dist/types/element/src/align.d.ts +5 -1
- package/dist/types/excalidraw/actions/actionAlign.d.ts +192 -0
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +24 -0
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +12 -0
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +4 -1
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +8 -1
- package/dist/types/excalidraw/actions/actionExport.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionFlipViewpoint.d.ts +43 -0
- package/dist/types/excalidraw/actions/actionFrame.d.ts +12 -0
- package/dist/types/excalidraw/actions/actionGroup.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionLink.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionMenu.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionProperties.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionStyles.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +4 -0
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +4 -0
- package/dist/types/excalidraw/actions/index.d.ts +2 -1
- package/dist/types/excalidraw/actions/shortcuts.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +1 -3
- package/dist/types/excalidraw/appState.d.ts +3 -0
- package/dist/types/excalidraw/components/App.d.ts +0 -1
- package/dist/types/excalidraw/components/Tools.d.ts +0 -1
- package/dist/types/excalidraw/data/blob.d.ts +4 -0
- package/dist/types/excalidraw/data/json.d.ts +4 -0
- package/dist/types/excalidraw/editorPreferences.d.ts +5 -2
- package/dist/types/excalidraw/renderer/viewpoint.d.ts +8 -0
- package/dist/types/excalidraw/types.d.ts +12 -7
- package/dist/types/excalidraw/viewport.d.ts +4 -0
- package/package.json +1 -1
- package/dist/types/excalidraw/keyboardShortcuts.d.ts +0 -27
|
@@ -28,6 +28,10 @@ export declare const actionZoomIn: {
|
|
|
28
28
|
dontResizeLimitMBs: number;
|
|
29
29
|
hideMainMenus: boolean;
|
|
30
30
|
wheelZoomsOnDefault?: boolean;
|
|
31
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
32
|
+
alignConfiguration: {
|
|
33
|
+
stacking: boolean;
|
|
34
|
+
};
|
|
31
35
|
arrangeConfiguration: {
|
|
32
36
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
33
37
|
gap: number;
|
|
@@ -220,6 +224,10 @@ export declare const actionZoomOut: {
|
|
|
220
224
|
dontResizeLimitMBs: number;
|
|
221
225
|
hideMainMenus: boolean;
|
|
222
226
|
wheelZoomsOnDefault?: boolean;
|
|
227
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
228
|
+
alignConfiguration: {
|
|
229
|
+
stacking: boolean;
|
|
230
|
+
};
|
|
223
231
|
arrangeConfiguration: {
|
|
224
232
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
225
233
|
gap: number;
|
|
@@ -412,6 +420,10 @@ export declare const actionResetZoom: {
|
|
|
412
420
|
dontResizeLimitMBs: number;
|
|
413
421
|
hideMainMenus: boolean;
|
|
414
422
|
wheelZoomsOnDefault?: boolean;
|
|
423
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
424
|
+
alignConfiguration: {
|
|
425
|
+
stacking: boolean;
|
|
426
|
+
};
|
|
415
427
|
arrangeConfiguration: {
|
|
416
428
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
417
429
|
gap: number;
|
|
@@ -604,6 +616,10 @@ export declare const actionZoomToFitSelectionInViewport: {
|
|
|
604
616
|
dontResizeLimitMBs: number;
|
|
605
617
|
hideMainMenus: boolean;
|
|
606
618
|
wheelZoomsOnDefault?: boolean;
|
|
619
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
620
|
+
alignConfiguration: {
|
|
621
|
+
stacking: boolean;
|
|
622
|
+
};
|
|
607
623
|
arrangeConfiguration: {
|
|
608
624
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
609
625
|
gap: number;
|
|
@@ -795,6 +811,10 @@ export declare const actionZoomToFitSelection: {
|
|
|
795
811
|
dontResizeLimitMBs: number;
|
|
796
812
|
hideMainMenus: boolean;
|
|
797
813
|
wheelZoomsOnDefault?: boolean;
|
|
814
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
815
|
+
alignConfiguration: {
|
|
816
|
+
stacking: boolean;
|
|
817
|
+
};
|
|
798
818
|
arrangeConfiguration: {
|
|
799
819
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
800
820
|
gap: number;
|
|
@@ -986,6 +1006,10 @@ export declare const actionZoomToFit: {
|
|
|
986
1006
|
dontResizeLimitMBs: number;
|
|
987
1007
|
hideMainMenus: boolean;
|
|
988
1008
|
wheelZoomsOnDefault?: boolean;
|
|
1009
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
1010
|
+
alignConfiguration: {
|
|
1011
|
+
stacking: boolean;
|
|
1012
|
+
};
|
|
989
1013
|
arrangeConfiguration: {
|
|
990
1014
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
991
1015
|
gap: number;
|
|
@@ -22,6 +22,10 @@ export declare const actionPaste: {
|
|
|
22
22
|
dontResizeLimitMBs: number;
|
|
23
23
|
hideMainMenus: boolean;
|
|
24
24
|
wheelZoomsOnDefault?: boolean;
|
|
25
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
26
|
+
alignConfiguration: {
|
|
27
|
+
stacking: boolean;
|
|
28
|
+
};
|
|
25
29
|
arrangeConfiguration: {
|
|
26
30
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
27
31
|
gap: number;
|
|
@@ -248,6 +252,10 @@ export declare const actionCopyAsPng: {
|
|
|
248
252
|
dontResizeLimitMBs: number;
|
|
249
253
|
hideMainMenus: boolean;
|
|
250
254
|
wheelZoomsOnDefault?: boolean;
|
|
255
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
256
|
+
alignConfiguration: {
|
|
257
|
+
stacking: boolean;
|
|
258
|
+
};
|
|
251
259
|
arrangeConfiguration: {
|
|
252
260
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
253
261
|
gap: number;
|
|
@@ -22,6 +22,10 @@ export declare const actionToggleCropEditor: {
|
|
|
22
22
|
dontResizeLimitMBs: number;
|
|
23
23
|
hideMainMenus: boolean;
|
|
24
24
|
wheelZoomsOnDefault?: boolean;
|
|
25
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
26
|
+
alignConfiguration: {
|
|
27
|
+
stacking: boolean;
|
|
28
|
+
};
|
|
25
29
|
arrangeConfiguration: {
|
|
26
30
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
27
31
|
gap: number;
|
|
@@ -23,6 +23,10 @@ export declare const actionDeleteSelected: {
|
|
|
23
23
|
dontResizeLimitMBs: number;
|
|
24
24
|
hideMainMenus: boolean;
|
|
25
25
|
wheelZoomsOnDefault?: boolean;
|
|
26
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
27
|
+
alignConfiguration: {
|
|
28
|
+
stacking: boolean;
|
|
29
|
+
};
|
|
26
30
|
arrangeConfiguration: {
|
|
27
31
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
28
32
|
gap: number;
|
|
@@ -233,6 +237,10 @@ export declare const actionDeleteSelected: {
|
|
|
233
237
|
dontResizeLimitMBs: number;
|
|
234
238
|
hideMainMenus: boolean;
|
|
235
239
|
wheelZoomsOnDefault?: boolean;
|
|
240
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
241
|
+
alignConfiguration: {
|
|
242
|
+
stacking: boolean;
|
|
243
|
+
};
|
|
236
244
|
arrangeConfiguration: {
|
|
237
245
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
238
246
|
gap: number;
|
|
@@ -421,6 +429,10 @@ export declare const actionDeleteSelected: {
|
|
|
421
429
|
dontResizeLimitMBs: number;
|
|
422
430
|
hideMainMenus: boolean;
|
|
423
431
|
wheelZoomsOnDefault?: boolean;
|
|
432
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
433
|
+
alignConfiguration: {
|
|
434
|
+
stacking: boolean;
|
|
435
|
+
};
|
|
424
436
|
arrangeConfiguration: {
|
|
425
437
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
426
438
|
gap: number;
|
|
@@ -31,6 +31,10 @@ export declare const actionDeselect: {
|
|
|
31
31
|
dontResizeLimitMBs: number;
|
|
32
32
|
hideMainMenus: boolean;
|
|
33
33
|
wheelZoomsOnDefault?: boolean;
|
|
34
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
35
|
+
alignConfiguration: {
|
|
36
|
+
stacking: boolean;
|
|
37
|
+
};
|
|
34
38
|
arrangeConfiguration: {
|
|
35
39
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
36
40
|
gap: number;
|
|
@@ -168,7 +172,6 @@ export declare const actionDeselect: {
|
|
|
168
172
|
captureUpdate: "IMMEDIATELY";
|
|
169
173
|
};
|
|
170
174
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, _: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: AppClassProperties) => boolean;
|
|
171
|
-
keyCondition: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, _: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: AppClassProperties) => boolean;
|
|
172
175
|
} & {
|
|
173
176
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, _: readonly import("@excalidraw/element/types").ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
|
|
174
177
|
};
|
|
@@ -33,6 +33,10 @@ export declare const actionToggleElementLock: {
|
|
|
33
33
|
dontResizeLimitMBs: number;
|
|
34
34
|
hideMainMenus: boolean;
|
|
35
35
|
wheelZoomsOnDefault?: boolean;
|
|
36
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
37
|
+
alignConfiguration: {
|
|
38
|
+
stacking: boolean;
|
|
39
|
+
};
|
|
36
40
|
arrangeConfiguration: {
|
|
37
41
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
38
42
|
gap: number;
|
|
@@ -187,7 +191,6 @@ export declare const actionToggleElementLock: {
|
|
|
187
191
|
captureUpdate: "IMMEDIATELY";
|
|
188
192
|
};
|
|
189
193
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
|
|
190
|
-
keyCondition: (_event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, _elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
|
|
191
194
|
} & {
|
|
192
195
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
|
|
193
196
|
};
|
|
@@ -221,6 +224,10 @@ export declare const actionUnlockAllElements: {
|
|
|
221
224
|
dontResizeLimitMBs: number;
|
|
222
225
|
hideMainMenus: boolean;
|
|
223
226
|
wheelZoomsOnDefault?: boolean;
|
|
227
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
228
|
+
alignConfiguration: {
|
|
229
|
+
stacking: boolean;
|
|
230
|
+
};
|
|
224
231
|
arrangeConfiguration: {
|
|
225
232
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
226
233
|
gap: number;
|
|
@@ -106,6 +106,10 @@ export declare const actionLoadScene: {
|
|
|
106
106
|
myocSimplifiedMode: boolean;
|
|
107
107
|
dontResizeLimitMBs: number;
|
|
108
108
|
hideMainMenus: boolean;
|
|
109
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
110
|
+
alignConfiguration: {
|
|
111
|
+
stacking: boolean;
|
|
112
|
+
};
|
|
109
113
|
arrangeConfiguration: {
|
|
110
114
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
111
115
|
gap: number;
|
|
@@ -268,6 +272,10 @@ export declare const actionLoadScene: {
|
|
|
268
272
|
dontResizeLimitMBs: number;
|
|
269
273
|
hideMainMenus: boolean;
|
|
270
274
|
wheelZoomsOnDefault?: boolean;
|
|
275
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
276
|
+
alignConfiguration: {
|
|
277
|
+
stacking: boolean;
|
|
278
|
+
};
|
|
271
279
|
arrangeConfiguration: {
|
|
272
280
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
273
281
|
gap: number;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AppState } from "../types";
|
|
2
|
+
export declare const actionFlipViewpointHorizontal: {
|
|
3
|
+
name: "flipViewpointHorizontal";
|
|
4
|
+
label: string;
|
|
5
|
+
viewMode: true;
|
|
6
|
+
trackEvent: {
|
|
7
|
+
category: "canvas";
|
|
8
|
+
};
|
|
9
|
+
perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
10
|
+
appState: {
|
|
11
|
+
viewpointFlip: {
|
|
12
|
+
horizontal: boolean;
|
|
13
|
+
vertical: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
captureUpdate: "NEVER";
|
|
17
|
+
};
|
|
18
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
19
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
20
|
+
} & {
|
|
21
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
22
|
+
};
|
|
23
|
+
export declare const actionFlipViewpointVertical: {
|
|
24
|
+
name: "flipViewpointVertical";
|
|
25
|
+
label: string;
|
|
26
|
+
viewMode: true;
|
|
27
|
+
trackEvent: {
|
|
28
|
+
category: "canvas";
|
|
29
|
+
};
|
|
30
|
+
perform: (_elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<AppState>) => {
|
|
31
|
+
appState: {
|
|
32
|
+
viewpointFlip: {
|
|
33
|
+
horizontal: boolean;
|
|
34
|
+
vertical: boolean;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
captureUpdate: "NEVER";
|
|
38
|
+
};
|
|
39
|
+
checked: (appState: Readonly<import("../types").UIAppState>) => boolean;
|
|
40
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
41
|
+
} & {
|
|
42
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
43
|
+
};
|
|
@@ -21,6 +21,10 @@ export declare const actionSelectAllElementsInFrame: {
|
|
|
21
21
|
dontResizeLimitMBs: number;
|
|
22
22
|
hideMainMenus: boolean;
|
|
23
23
|
wheelZoomsOnDefault?: boolean;
|
|
24
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
25
|
+
alignConfiguration: {
|
|
26
|
+
stacking: boolean;
|
|
27
|
+
};
|
|
24
28
|
arrangeConfiguration: {
|
|
25
29
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
26
30
|
gap: number;
|
|
@@ -213,6 +217,10 @@ export declare const actionRemoveAllElementsFromFrame: {
|
|
|
213
217
|
dontResizeLimitMBs: number;
|
|
214
218
|
hideMainMenus: boolean;
|
|
215
219
|
wheelZoomsOnDefault?: boolean;
|
|
220
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
221
|
+
alignConfiguration: {
|
|
222
|
+
stacking: boolean;
|
|
223
|
+
};
|
|
216
224
|
arrangeConfiguration: {
|
|
217
225
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
218
226
|
gap: number;
|
|
@@ -409,6 +417,10 @@ export declare const actionupdateFrameRendering: {
|
|
|
409
417
|
dontResizeLimitMBs: number;
|
|
410
418
|
hideMainMenus: boolean;
|
|
411
419
|
wheelZoomsOnDefault?: boolean;
|
|
420
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
421
|
+
alignConfiguration: {
|
|
422
|
+
stacking: boolean;
|
|
423
|
+
};
|
|
412
424
|
arrangeConfiguration: {
|
|
413
425
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
414
426
|
gap: number;
|
|
@@ -27,6 +27,10 @@ export declare const actionGroup: {
|
|
|
27
27
|
dontResizeLimitMBs: number;
|
|
28
28
|
hideMainMenus: boolean;
|
|
29
29
|
wheelZoomsOnDefault?: boolean;
|
|
30
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
31
|
+
alignConfiguration: {
|
|
32
|
+
stacking: boolean;
|
|
33
|
+
};
|
|
30
34
|
arrangeConfiguration: {
|
|
31
35
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
32
36
|
gap: number;
|
|
@@ -218,6 +222,10 @@ export declare const actionUngroup: {
|
|
|
218
222
|
dontResizeLimitMBs: number;
|
|
219
223
|
hideMainMenus: boolean;
|
|
220
224
|
wheelZoomsOnDefault?: boolean;
|
|
225
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
226
|
+
alignConfiguration: {
|
|
227
|
+
stacking: boolean;
|
|
228
|
+
};
|
|
221
229
|
arrangeConfiguration: {
|
|
222
230
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
223
231
|
gap: number;
|
|
@@ -54,6 +54,10 @@ export declare const actionToggleLinearEditor: {
|
|
|
54
54
|
dontResizeLimitMBs: number;
|
|
55
55
|
hideMainMenus: boolean;
|
|
56
56
|
wheelZoomsOnDefault?: boolean;
|
|
57
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
58
|
+
alignConfiguration: {
|
|
59
|
+
stacking: boolean;
|
|
60
|
+
};
|
|
57
61
|
arrangeConfiguration: {
|
|
58
62
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
59
63
|
gap: number;
|
|
@@ -18,6 +18,10 @@ export declare const actionLink: {
|
|
|
18
18
|
dontResizeLimitMBs: number;
|
|
19
19
|
hideMainMenus: boolean;
|
|
20
20
|
wheelZoomsOnDefault?: boolean;
|
|
21
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
22
|
+
alignConfiguration: {
|
|
23
|
+
stacking: boolean;
|
|
24
|
+
};
|
|
21
25
|
arrangeConfiguration: {
|
|
22
26
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
23
27
|
gap: number;
|
|
@@ -25,6 +25,10 @@ export declare const actionShortcuts: {
|
|
|
25
25
|
dontResizeLimitMBs: number;
|
|
26
26
|
hideMainMenus: boolean;
|
|
27
27
|
wheelZoomsOnDefault?: boolean;
|
|
28
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
29
|
+
alignConfiguration: {
|
|
30
|
+
stacking: boolean;
|
|
31
|
+
};
|
|
28
32
|
arrangeConfiguration: {
|
|
29
33
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
30
34
|
gap: number;
|
|
@@ -59,6 +59,10 @@ export declare const actionDecreaseFontSize: {
|
|
|
59
59
|
dontResizeLimitMBs: number;
|
|
60
60
|
hideMainMenus: boolean;
|
|
61
61
|
wheelZoomsOnDefault?: boolean;
|
|
62
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
63
|
+
alignConfiguration: {
|
|
64
|
+
stacking: boolean;
|
|
65
|
+
};
|
|
62
66
|
arrangeConfiguration: {
|
|
63
67
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
64
68
|
gap: number;
|
|
@@ -246,6 +250,10 @@ export declare const actionIncreaseFontSize: {
|
|
|
246
250
|
dontResizeLimitMBs: number;
|
|
247
251
|
hideMainMenus: boolean;
|
|
248
252
|
wheelZoomsOnDefault?: boolean;
|
|
253
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
254
|
+
alignConfiguration: {
|
|
255
|
+
stacking: boolean;
|
|
256
|
+
};
|
|
249
257
|
arrangeConfiguration: {
|
|
250
258
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
251
259
|
gap: number;
|
|
@@ -25,6 +25,10 @@ export declare const actionSelectAll: {
|
|
|
25
25
|
dontResizeLimitMBs: number;
|
|
26
26
|
hideMainMenus: boolean;
|
|
27
27
|
wheelZoomsOnDefault?: boolean;
|
|
28
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
29
|
+
alignConfiguration: {
|
|
30
|
+
stacking: boolean;
|
|
31
|
+
};
|
|
28
32
|
arrangeConfiguration: {
|
|
29
33
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
30
34
|
gap: number;
|
|
@@ -23,6 +23,10 @@ export declare const actionCopyStyles: {
|
|
|
23
23
|
dontResizeLimitMBs: number;
|
|
24
24
|
hideMainMenus: boolean;
|
|
25
25
|
wheelZoomsOnDefault?: boolean;
|
|
26
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
27
|
+
alignConfiguration: {
|
|
28
|
+
stacking: boolean;
|
|
29
|
+
};
|
|
26
30
|
arrangeConfiguration: {
|
|
27
31
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
28
32
|
gap: number;
|
|
@@ -21,6 +21,10 @@ export declare const actionToggleArrowBinding: {
|
|
|
21
21
|
dontResizeLimitMBs: number;
|
|
22
22
|
hideMainMenus: boolean;
|
|
23
23
|
wheelZoomsOnDefault?: boolean;
|
|
24
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
25
|
+
alignConfiguration: {
|
|
26
|
+
stacking: boolean;
|
|
27
|
+
};
|
|
24
28
|
arrangeConfiguration: {
|
|
25
29
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
26
30
|
gap: number;
|
|
@@ -23,6 +23,10 @@ export declare const actionToggleGridMode: {
|
|
|
23
23
|
dontResizeLimitMBs: number;
|
|
24
24
|
hideMainMenus: boolean;
|
|
25
25
|
wheelZoomsOnDefault?: boolean;
|
|
26
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
27
|
+
alignConfiguration: {
|
|
28
|
+
stacking: boolean;
|
|
29
|
+
};
|
|
26
30
|
arrangeConfiguration: {
|
|
27
31
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
28
32
|
gap: number;
|
|
@@ -20,6 +20,10 @@ export declare const actionToggleMidpointSnapping: {
|
|
|
20
20
|
dontResizeLimitMBs: number;
|
|
21
21
|
hideMainMenus: boolean;
|
|
22
22
|
wheelZoomsOnDefault?: boolean;
|
|
23
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
24
|
+
alignConfiguration: {
|
|
25
|
+
stacking: boolean;
|
|
26
|
+
};
|
|
23
27
|
arrangeConfiguration: {
|
|
24
28
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
25
29
|
gap: number;
|
|
@@ -22,6 +22,10 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
22
22
|
dontResizeLimitMBs: number;
|
|
23
23
|
hideMainMenus: boolean;
|
|
24
24
|
wheelZoomsOnDefault?: boolean;
|
|
25
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
26
|
+
alignConfiguration: {
|
|
27
|
+
stacking: boolean;
|
|
28
|
+
};
|
|
25
29
|
arrangeConfiguration: {
|
|
26
30
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
27
31
|
gap: number;
|
|
@@ -27,6 +27,10 @@ export declare const actionToggleSearchMenu: {
|
|
|
27
27
|
dontResizeLimitMBs: number;
|
|
28
28
|
hideMainMenus: boolean;
|
|
29
29
|
wheelZoomsOnDefault?: boolean;
|
|
30
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
31
|
+
alignConfiguration: {
|
|
32
|
+
stacking: boolean;
|
|
33
|
+
};
|
|
30
34
|
arrangeConfiguration: {
|
|
31
35
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
32
36
|
gap: number;
|
|
@@ -24,6 +24,10 @@ export declare const actionToggleStats: {
|
|
|
24
24
|
dontResizeLimitMBs: number;
|
|
25
25
|
hideMainMenus: boolean;
|
|
26
26
|
wheelZoomsOnDefault?: boolean;
|
|
27
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
28
|
+
alignConfiguration: {
|
|
29
|
+
stacking: boolean;
|
|
30
|
+
};
|
|
27
31
|
arrangeConfiguration: {
|
|
28
32
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
29
33
|
gap: number;
|
|
@@ -21,6 +21,10 @@ export declare const actionToggleViewMode: {
|
|
|
21
21
|
dontResizeLimitMBs: number;
|
|
22
22
|
hideMainMenus: boolean;
|
|
23
23
|
wheelZoomsOnDefault?: boolean;
|
|
24
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
25
|
+
alignConfiguration: {
|
|
26
|
+
stacking: boolean;
|
|
27
|
+
};
|
|
24
28
|
arrangeConfiguration: {
|
|
25
29
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
26
30
|
gap: number;
|
|
@@ -11,11 +11,12 @@ export { actionCopyStyles, actionPasteStyles } from "./actionStyles";
|
|
|
11
11
|
export { actionShortcuts } from "./actionMenu";
|
|
12
12
|
export { actionGroup, actionUngroup } from "./actionGroup";
|
|
13
13
|
export { actionGoToCollaborator } from "./actionNavigate";
|
|
14
|
-
export { actionAlignTop, actionAlignBottom, actionAlignLeft, actionAlignRight, actionAlignVerticallyCentered, actionAlignHorizontallyCentered, } from "./actionAlign";
|
|
14
|
+
export { actionAlignTop, actionAlignBottom, actionAlignLeft, actionAlignRight, actionAlignVerticallyCentered, actionAlignHorizontallyCentered, actionToggleAlignStacking, } from "./actionAlign";
|
|
15
15
|
export { distributeHorizontally, distributeVertically, } from "./actionDistribute";
|
|
16
16
|
export { actionArrangeElements } from "./actionArrange";
|
|
17
17
|
export { actionNormaliseElements } from "./actionNormalise";
|
|
18
18
|
export { actionFlipHorizontal, actionFlipVertical } from "./actionFlip";
|
|
19
|
+
export { actionFlipViewpointHorizontal, actionFlipViewpointVertical, } from "./actionFlipViewpoint";
|
|
19
20
|
export { actionCopy, actionCut, actionCopyAsPng, actionCopyAsSvg, copyText, } from "./actionClipboard";
|
|
20
21
|
export { actionToggleGridMode } from "./actionToggleGridMode";
|
|
21
22
|
export { actionSmartZoom } from "./actionSmartZoom";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SubtypeOf } from "@excalidraw/common/utility-types";
|
|
2
2
|
import type { ActionName } from "./types";
|
|
3
|
-
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "objectsSnapMode" | "stats" | "viewMode" | "flipHorizontal" | "flipVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "smartZoom" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame" | "arrangeElements"> | "saveScene" | "imageExport" | "searchMenu" | "toolLock";
|
|
3
|
+
export type ShortcutName = SubtypeOf<ActionName, "toggleTheme" | "loadScene" | "cut" | "copy" | "paste" | "copyStyles" | "pasteStyles" | "selectAll" | "deleteSelectedElements" | "duplicateSelection" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyAsPng" | "group" | "ungroup" | "gridMode" | "objectsSnapMode" | "stats" | "viewMode" | "flipHorizontal" | "flipVertical" | "flipViewpointHorizontal" | "flipViewpointVertical" | "hyperlink" | "toggleElementLock" | "resetZoom" | "zoomOut" | "zoomIn" | "zoomToFit" | "zoomToFitSelectionInViewport" | "zoomToFitSelection" | "smartZoom" | "saveFileToDisk" | "saveToActiveFile" | "toggleShortcuts" | "wrapSelectionInFrame" | "arrangeElements"> | "saveScene" | "imageExport" | "searchMenu" | "toolLock";
|
|
4
4
|
export declare const getShortcutFromShortcutName: (name: ShortcutName, idx?: number) => string;
|
|
@@ -14,7 +14,7 @@ export type ActionResult = {
|
|
|
14
14
|
type ActionFn<TData = any> = (elements: readonly OrderedExcalidrawElement[], appState: Readonly<AppState>, formData: TData | undefined, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
|
|
15
15
|
export type UpdaterFn = (res: ActionResult) => void;
|
|
16
16
|
export type ActionFilterFn = (action: Action) => void;
|
|
17
|
-
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeBucketFillBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeSloppiness" | "changeFreedrawMode" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "arrangeElements" | "normaliseElements" | "flipHorizontal" | "flipVertical" | "deselect" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "createContainerFromText" | "wrapTextInContainer" | "autoResize" | "elementStats" | "searchMenu" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "smartZoom" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
|
|
17
|
+
export type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeBucketFillBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeSloppiness" | "changeFreedrawMode" | "changeStrokeStyle" | "changeArrowhead" | "changeArrowType" | "changeArrowProperties" | "changeOpacity" | "changeFontSize" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToFitSelection" | "zoomToFitSelectionInViewport" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "toggleAlignStacking" | "distributeHorizontally" | "distributeVertically" | "arrangeElements" | "normaliseElements" | "flipHorizontal" | "flipVertical" | "flipViewpointHorizontal" | "flipViewpointVertical" | "deselect" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "unlockAllElements" | "toggleElementLock" | "toggleLinearEditor" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "createContainerFromText" | "wrapTextInContainer" | "autoResize" | "elementStats" | "searchMenu" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "smartZoom" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
|
|
18
18
|
export type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
20
|
appState: UIAppState;
|
|
@@ -33,8 +33,6 @@ export interface Action<TData = any> {
|
|
|
33
33
|
perform: ActionFn<TData>;
|
|
34
34
|
keyPriority?: number;
|
|
35
35
|
keyTest?: (event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean;
|
|
36
|
-
/** Additional state guard retained when a host overrides `keyTest`'s keys. */
|
|
37
|
-
keyCondition?: (event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean;
|
|
38
36
|
predicate?: (elements: readonly ExcalidrawElement[], appState: AppState, appProps: ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
39
37
|
checked?: (appState: Readonly<UIAppState>) => boolean;
|
|
40
38
|
trackEvent: false | {
|
|
@@ -17,6 +17,9 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
17
17
|
myocSimplifiedMode?: boolean | undefined;
|
|
18
18
|
dontResizeLimitMBs?: number | undefined;
|
|
19
19
|
hideMainMenus?: boolean | undefined;
|
|
20
|
+
alignConfiguration?: {
|
|
21
|
+
stacking: boolean;
|
|
22
|
+
} | undefined;
|
|
20
23
|
arrangeConfiguration?: {
|
|
21
24
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
22
25
|
gap: number;
|
|
@@ -51,7 +51,6 @@ export declare const getToolLetter: (type: ToolbarToolType) => string | undefine
|
|
|
51
51
|
/** human-readable shortcut hint, e.g. "R", used in tooltips & aria */
|
|
52
52
|
export declare const getToolShortcut: (type: ToolbarToolType) => string | undefined;
|
|
53
53
|
export declare const findShapeByKey: (key: string, app: AppClassProperties, shiftKey?: boolean) => "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "lasso" | "eraser" | "hand" | "laser" | "autoshape" | "bucketfill" | null;
|
|
54
|
-
export declare const findShapeByKeyboardEvent: (event: KeyboardEvent | React.KeyboardEvent, app: AppClassProperties) => "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "lasso" | "eraser" | "hand" | "laser" | "autoshape" | "bucketfill" | null;
|
|
55
54
|
/**
|
|
56
55
|
* Whether a toolbar entry activating the given tool renders disabled — true
|
|
57
56
|
* when the active tool is host-controlled (`props.activeTool`) and the entry
|
|
@@ -41,6 +41,10 @@ fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
|
41
41
|
myocSimplifiedMode: boolean;
|
|
42
42
|
dontResizeLimitMBs: number;
|
|
43
43
|
hideMainMenus: boolean;
|
|
44
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
45
|
+
alignConfiguration: {
|
|
46
|
+
stacking: boolean;
|
|
47
|
+
};
|
|
44
48
|
arrangeConfiguration: {
|
|
45
49
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
46
50
|
gap: number;
|
|
@@ -42,6 +42,10 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
42
42
|
myocSimplifiedMode: boolean;
|
|
43
43
|
dontResizeLimitMBs: number;
|
|
44
44
|
hideMainMenus: boolean;
|
|
45
|
+
viewpointFlip: import("@excalidraw/common").ViewpointFlip;
|
|
46
|
+
alignConfiguration: {
|
|
47
|
+
stacking: boolean;
|
|
48
|
+
};
|
|
45
49
|
arrangeConfiguration: {
|
|
46
50
|
algorithm: import("@excalidraw/element/types").ArrangeAlgorithms;
|
|
47
51
|
gap: number;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import type { AppState, ArrangePreferences, EditorPreferences, NormalisePreferences, SmartZoomPreferences } from "./types";
|
|
1
|
+
import type { AlignPreferences, AppState, ArrangePreferences, EditorPreferences, NormalisePreferences, SmartZoomPreferences } from "./types";
|
|
2
2
|
export type ResolvedSmartZoomPreferences = Required<SmartZoomPreferences>;
|
|
3
|
+
export type ResolvedAlignPreferences = Required<AlignPreferences>;
|
|
3
4
|
export type ResolvedArrangePreferences = Required<ArrangePreferences>;
|
|
4
5
|
export type ResolvedNormalisePreferences = Required<NormalisePreferences>;
|
|
5
6
|
export type ResolvedEditorPreferences = {
|
|
6
7
|
smartZoom: ResolvedSmartZoomPreferences;
|
|
8
|
+
align: ResolvedAlignPreferences;
|
|
7
9
|
arrange: ResolvedArrangePreferences;
|
|
8
10
|
normalise: ResolvedNormalisePreferences;
|
|
9
11
|
};
|
|
12
|
+
export declare const DEFAULT_ALIGN_PREFERENCES: ResolvedAlignPreferences;
|
|
10
13
|
export declare const DEFAULT_SMART_ZOOM_PREFERENCES: ResolvedSmartZoomPreferences;
|
|
11
|
-
export declare const getEffectiveEditorPreferences: (appState: Readonly<Pick<AppState, "arrangeConfiguration" | "normaliseConfiguration"
|
|
14
|
+
export declare const getEffectiveEditorPreferences: (appState: Readonly<Pick<AppState, "arrangeConfiguration" | "normaliseConfiguration"> & Partial<Pick<AppState, "alignConfiguration">>>, editorPreferences?: EditorPreferences) => ResolvedEditorPreferences;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ViewpointFlip } from "@excalidraw/common";
|
|
2
|
+
import type { Zoom } from "../types";
|
|
3
|
+
export declare const applyZoomAndViewpointFlip: (context: CanvasRenderingContext2D, appState: {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
zoom: Zoom;
|
|
7
|
+
viewpointFlip: ViewpointFlip;
|
|
8
|
+
}) => void;
|