@zsviczian/excalidraw 0.15.2-obsidian-8 → 0.15.2-obsidian-9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/excalidraw.development.js +33 -33
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +3 -3
- package/types/actions/actionAlign.d.ts +19 -19
- package/types/actions/actionBoundText.d.ts +8 -8
- package/types/actions/actionCanvas.d.ts +24 -24
- package/types/actions/actionClipboard.d.ts +7 -7
- package/types/actions/actionDeleteSelected.d.ts +3 -3
- package/types/actions/actionDistribute.d.ts +5 -5
- package/types/actions/actionElementLock.d.ts +7 -7
- package/types/actions/actionExport.d.ts +10 -9
- package/types/actions/actionFinalize.d.ts +3 -6
- package/types/actions/actionFlip.d.ts +2 -2
- package/types/actions/actionFrame.d.ts +9 -9
- package/types/actions/actionGroup.d.ts +5 -5
- package/types/actions/actionLinearEditor.d.ts +3 -3
- 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/actionToggleStats.d.ts +1 -1
- package/types/actions/actionToggleViewMode.d.ts +1 -1
- package/types/actions/actionToggleZenMode.d.ts +1 -1
- package/types/actions/types.d.ts +3 -2
- package/types/appState.d.ts +1 -1
- package/types/components/HintViewer.d.ts +3 -4
- package/types/components/LayerUI.d.ts +2 -1
- package/types/components/MobileMenu.d.ts +3 -2
- package/types/constants.d.ts +2 -2
- package/types/data/url.d.ts +5 -0
- package/types/element/Hyperlink.d.ts +1 -1
- package/types/element/embeddable.d.ts +13 -8
- package/types/element/linearElementEditor.d.ts +1 -1
- package/types/frame.d.ts +2 -2
- package/types/groups.d.ts +3 -3
- package/types/scene/Scene.d.ts +13 -0
- package/types/types.d.ts +1 -1
- package/types/utility-types.d.ts +2 -0
package/package.json
CHANGED
|
@@ -98,7 +98,7 @@ export declare const actionAddToLibrary: {
|
|
|
98
98
|
selectedElementsAreBeingDragged: boolean;
|
|
99
99
|
shouldCacheIgnoreZoom: boolean;
|
|
100
100
|
zenModeEnabled: boolean;
|
|
101
|
-
theme:
|
|
101
|
+
theme: import("../element/types").Theme;
|
|
102
102
|
gridSize: number | null;
|
|
103
103
|
previousGridSize: number | null;
|
|
104
104
|
viewModeEnabled: boolean;
|
|
@@ -242,7 +242,7 @@ export declare const actionAddToLibrary: {
|
|
|
242
242
|
duration?: number | undefined;
|
|
243
243
|
} | null;
|
|
244
244
|
zenModeEnabled: boolean;
|
|
245
|
-
theme:
|
|
245
|
+
theme: import("../element/types").Theme;
|
|
246
246
|
gridSize: number | null;
|
|
247
247
|
previousGridSize: number | null;
|
|
248
248
|
viewModeEnabled: boolean;
|
|
@@ -386,7 +386,7 @@ export declare const actionAddToLibrary: {
|
|
|
386
386
|
duration?: number | undefined;
|
|
387
387
|
} | null;
|
|
388
388
|
zenModeEnabled: boolean;
|
|
389
|
-
theme:
|
|
389
|
+
theme: import("../element/types").Theme;
|
|
390
390
|
gridSize: number | null;
|
|
391
391
|
previousGridSize: number | null;
|
|
392
392
|
viewModeEnabled: boolean;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ExcalidrawElement } from "../element/types";
|
|
3
|
-
import { AppState } from "../types";
|
|
3
|
+
import { AppClassProperties, AppState } from "../types";
|
|
4
4
|
export declare const actionAlignTop: {
|
|
5
5
|
name: "alignTop";
|
|
6
6
|
trackEvent: {
|
|
7
7
|
category: "element";
|
|
8
8
|
};
|
|
9
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
10
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
9
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
10
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
11
11
|
appState: Readonly<AppState>;
|
|
12
12
|
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
13
13
|
commitToHistory: true;
|
|
14
14
|
};
|
|
15
15
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
16
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
16
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
17
17
|
} & {
|
|
18
18
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
19
19
|
};
|
|
@@ -22,14 +22,14 @@ export declare const actionAlignBottom: {
|
|
|
22
22
|
trackEvent: {
|
|
23
23
|
category: "element";
|
|
24
24
|
};
|
|
25
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
26
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
25
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
26
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
27
27
|
appState: Readonly<AppState>;
|
|
28
28
|
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
29
29
|
commitToHistory: true;
|
|
30
30
|
};
|
|
31
31
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
32
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
32
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
33
33
|
} & {
|
|
34
34
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
35
35
|
};
|
|
@@ -38,14 +38,14 @@ export declare const actionAlignLeft: {
|
|
|
38
38
|
trackEvent: {
|
|
39
39
|
category: "element";
|
|
40
40
|
};
|
|
41
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
42
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
41
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
42
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
43
43
|
appState: Readonly<AppState>;
|
|
44
44
|
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
45
45
|
commitToHistory: true;
|
|
46
46
|
};
|
|
47
47
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
48
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
48
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
49
49
|
} & {
|
|
50
50
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
51
51
|
};
|
|
@@ -54,14 +54,14 @@ export declare const actionAlignRight: {
|
|
|
54
54
|
trackEvent: {
|
|
55
55
|
category: "element";
|
|
56
56
|
};
|
|
57
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
58
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
57
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
58
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
59
59
|
appState: Readonly<AppState>;
|
|
60
60
|
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
61
61
|
commitToHistory: true;
|
|
62
62
|
};
|
|
63
63
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
64
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
64
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
65
65
|
} & {
|
|
66
66
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
67
67
|
};
|
|
@@ -70,13 +70,13 @@ export declare const actionAlignVerticallyCentered: {
|
|
|
70
70
|
trackEvent: {
|
|
71
71
|
category: "element";
|
|
72
72
|
};
|
|
73
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
74
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
73
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
74
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
75
75
|
appState: Readonly<AppState>;
|
|
76
76
|
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
77
77
|
commitToHistory: true;
|
|
78
78
|
};
|
|
79
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
79
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
80
80
|
} & {
|
|
81
81
|
keyTest?: undefined;
|
|
82
82
|
};
|
|
@@ -85,13 +85,13 @@ export declare const actionAlignHorizontallyCentered: {
|
|
|
85
85
|
trackEvent: {
|
|
86
86
|
category: "element";
|
|
87
87
|
};
|
|
88
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
89
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
88
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: unknown, app: AppClassProperties) => boolean;
|
|
89
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
90
90
|
appState: Readonly<AppState>;
|
|
91
91
|
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
92
92
|
commitToHistory: true;
|
|
93
93
|
};
|
|
94
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
94
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
95
95
|
} & {
|
|
96
96
|
keyTest?: undefined;
|
|
97
97
|
};
|
|
@@ -8,8 +8,8 @@ export declare const actionUnbindText: {
|
|
|
8
8
|
trackEvent: {
|
|
9
9
|
category: "element";
|
|
10
10
|
};
|
|
11
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
12
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
11
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
12
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
13
13
|
elements: readonly ExcalidrawElement[];
|
|
14
14
|
appState: Readonly<AppState>;
|
|
15
15
|
commitToHistory: true;
|
|
@@ -23,8 +23,8 @@ export declare const actionBindText: {
|
|
|
23
23
|
trackEvent: {
|
|
24
24
|
category: "element";
|
|
25
25
|
};
|
|
26
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState,
|
|
27
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
26
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
27
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
28
28
|
elements: ExcalidrawElement[];
|
|
29
29
|
appState: {
|
|
30
30
|
selectedElementIds: {
|
|
@@ -120,7 +120,7 @@ export declare const actionBindText: {
|
|
|
120
120
|
duration?: number | undefined;
|
|
121
121
|
} | null;
|
|
122
122
|
zenModeEnabled: boolean;
|
|
123
|
-
theme:
|
|
123
|
+
theme: import("../element/types").Theme;
|
|
124
124
|
gridSize: number | null;
|
|
125
125
|
previousGridSize: number | null;
|
|
126
126
|
viewModeEnabled: boolean;
|
|
@@ -179,8 +179,8 @@ export declare const actionWrapTextInContainer: {
|
|
|
179
179
|
trackEvent: {
|
|
180
180
|
category: "element";
|
|
181
181
|
};
|
|
182
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState) => boolean;
|
|
183
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
182
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
183
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
184
184
|
elements: readonly ExcalidrawElement[];
|
|
185
185
|
appState: {
|
|
186
186
|
selectedElementIds: Mutable<Readonly<{
|
|
@@ -276,7 +276,7 @@ export declare const actionWrapTextInContainer: {
|
|
|
276
276
|
duration?: number | undefined;
|
|
277
277
|
} | null;
|
|
278
278
|
zenModeEnabled: boolean;
|
|
279
|
-
theme:
|
|
279
|
+
theme: import("../element/types").Theme;
|
|
280
280
|
gridSize: number | null;
|
|
281
281
|
previousGridSize: number | null;
|
|
282
282
|
viewModeEnabled: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ExcalidrawElement } from "../element/types";
|
|
3
|
-
import { AppState, NormalizedZoomValue } from "../types";
|
|
3
|
+
import { AppClassProperties, AppState, NormalizedZoomValue } from "../types";
|
|
4
4
|
export declare const actionChangeViewBackgroundColor: {
|
|
5
5
|
name: "changeViewBackgroundColor";
|
|
6
6
|
trackEvent: false;
|
|
7
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app:
|
|
7
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
8
8
|
perform: (_: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any) => {
|
|
9
9
|
appState: any;
|
|
10
10
|
commitToHistory: boolean;
|
|
@@ -18,12 +18,12 @@ export declare const actionClearCanvas: {
|
|
|
18
18
|
trackEvent: {
|
|
19
19
|
category: "canvas";
|
|
20
20
|
};
|
|
21
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app:
|
|
22
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app:
|
|
21
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
22
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
23
23
|
elements: ExcalidrawElement[];
|
|
24
24
|
appState: {
|
|
25
25
|
files: {};
|
|
26
|
-
theme:
|
|
26
|
+
theme: import("../element/types").Theme;
|
|
27
27
|
penMode: boolean;
|
|
28
28
|
penDetected: boolean;
|
|
29
29
|
exportBackground: boolean;
|
|
@@ -171,7 +171,7 @@ export declare const actionZoomIn: {
|
|
|
171
171
|
trackEvent: {
|
|
172
172
|
category: "canvas";
|
|
173
173
|
};
|
|
174
|
-
perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app:
|
|
174
|
+
perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
175
175
|
appState: {
|
|
176
176
|
scrollX: number;
|
|
177
177
|
scrollY: number;
|
|
@@ -266,7 +266,7 @@ export declare const actionZoomIn: {
|
|
|
266
266
|
duration?: number | undefined;
|
|
267
267
|
} | null;
|
|
268
268
|
zenModeEnabled: boolean;
|
|
269
|
-
theme:
|
|
269
|
+
theme: import("../element/types").Theme;
|
|
270
270
|
gridSize: number | null;
|
|
271
271
|
previousGridSize: number | null;
|
|
272
272
|
viewModeEnabled: boolean;
|
|
@@ -327,7 +327,7 @@ export declare const actionZoomOut: {
|
|
|
327
327
|
trackEvent: {
|
|
328
328
|
category: "canvas";
|
|
329
329
|
};
|
|
330
|
-
perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app:
|
|
330
|
+
perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
331
331
|
appState: {
|
|
332
332
|
scrollX: number;
|
|
333
333
|
scrollY: number;
|
|
@@ -422,7 +422,7 @@ export declare const actionZoomOut: {
|
|
|
422
422
|
duration?: number | undefined;
|
|
423
423
|
} | null;
|
|
424
424
|
zenModeEnabled: boolean;
|
|
425
|
-
theme:
|
|
425
|
+
theme: import("../element/types").Theme;
|
|
426
426
|
gridSize: number | null;
|
|
427
427
|
previousGridSize: number | null;
|
|
428
428
|
viewModeEnabled: boolean;
|
|
@@ -483,7 +483,7 @@ export declare const actionResetZoom: {
|
|
|
483
483
|
trackEvent: {
|
|
484
484
|
category: "canvas";
|
|
485
485
|
};
|
|
486
|
-
perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app:
|
|
486
|
+
perform: (_elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
487
487
|
appState: {
|
|
488
488
|
scrollX: number;
|
|
489
489
|
scrollY: number;
|
|
@@ -578,7 +578,7 @@ export declare const actionResetZoom: {
|
|
|
578
578
|
duration?: number | undefined;
|
|
579
579
|
} | null;
|
|
580
580
|
zenModeEnabled: boolean;
|
|
581
|
-
theme:
|
|
581
|
+
theme: import("../element/types").Theme;
|
|
582
582
|
gridSize: number | null;
|
|
583
583
|
previousGridSize: number | null;
|
|
584
584
|
viewModeEnabled: boolean;
|
|
@@ -735,7 +735,7 @@ export declare const zoomToFit: ({ targetElements, appState, fitToViewport, view
|
|
|
735
735
|
duration?: number | undefined;
|
|
736
736
|
} | null;
|
|
737
737
|
zenModeEnabled: boolean;
|
|
738
|
-
theme:
|
|
738
|
+
theme: import("../element/types").Theme;
|
|
739
739
|
gridSize: number | null;
|
|
740
740
|
previousGridSize: number | null;
|
|
741
741
|
viewModeEnabled: boolean;
|
|
@@ -790,7 +790,7 @@ export declare const actionZoomToFitSelectionInViewport: {
|
|
|
790
790
|
trackEvent: {
|
|
791
791
|
category: "canvas";
|
|
792
792
|
};
|
|
793
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
793
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
794
794
|
appState: {
|
|
795
795
|
scrollX: number;
|
|
796
796
|
scrollY: number;
|
|
@@ -885,7 +885,7 @@ export declare const actionZoomToFitSelectionInViewport: {
|
|
|
885
885
|
duration?: number | undefined;
|
|
886
886
|
} | null;
|
|
887
887
|
zenModeEnabled: boolean;
|
|
888
|
-
theme:
|
|
888
|
+
theme: import("../element/types").Theme;
|
|
889
889
|
gridSize: number | null;
|
|
890
890
|
previousGridSize: number | null;
|
|
891
891
|
viewModeEnabled: boolean;
|
|
@@ -944,7 +944,7 @@ export declare const actionZoomToFitSelection: {
|
|
|
944
944
|
trackEvent: {
|
|
945
945
|
category: "canvas";
|
|
946
946
|
};
|
|
947
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
947
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
948
948
|
appState: {
|
|
949
949
|
scrollX: number;
|
|
950
950
|
scrollY: number;
|
|
@@ -1039,7 +1039,7 @@ export declare const actionZoomToFitSelection: {
|
|
|
1039
1039
|
duration?: number | undefined;
|
|
1040
1040
|
} | null;
|
|
1041
1041
|
zenModeEnabled: boolean;
|
|
1042
|
-
theme:
|
|
1042
|
+
theme: import("../element/types").Theme;
|
|
1043
1043
|
gridSize: number | null;
|
|
1044
1044
|
previousGridSize: number | null;
|
|
1045
1045
|
viewModeEnabled: boolean;
|
|
@@ -1194,7 +1194,7 @@ export declare const actionZoomToFit: {
|
|
|
1194
1194
|
duration?: number | undefined;
|
|
1195
1195
|
} | null;
|
|
1196
1196
|
zenModeEnabled: boolean;
|
|
1197
|
-
theme:
|
|
1197
|
+
theme: import("../element/types").Theme;
|
|
1198
1198
|
gridSize: number | null;
|
|
1199
1199
|
previousGridSize: number | null;
|
|
1200
1200
|
viewModeEnabled: boolean;
|
|
@@ -1254,7 +1254,7 @@ export declare const actionToggleTheme: {
|
|
|
1254
1254
|
trackEvent: {
|
|
1255
1255
|
category: "canvas";
|
|
1256
1256
|
};
|
|
1257
|
-
perform: (_: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any, app:
|
|
1257
|
+
perform: (_: readonly ExcalidrawElement[], appState: Readonly<AppState>, value: any, app: AppClassProperties) => {
|
|
1258
1258
|
appState: {
|
|
1259
1259
|
theme: any;
|
|
1260
1260
|
contextMenu: {
|
|
@@ -1400,7 +1400,7 @@ export declare const actionToggleTheme: {
|
|
|
1400
1400
|
commitToHistory: false;
|
|
1401
1401
|
};
|
|
1402
1402
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
1403
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app:
|
|
1403
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: AppState, props: import("../types").ExcalidrawProps, app: AppClassProperties) => boolean;
|
|
1404
1404
|
} & {
|
|
1405
1405
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
1406
1406
|
};
|
|
@@ -1500,7 +1500,7 @@ export declare const actionToggleEraserTool: {
|
|
|
1500
1500
|
duration?: number | undefined;
|
|
1501
1501
|
} | null;
|
|
1502
1502
|
zenModeEnabled: boolean;
|
|
1503
|
-
theme:
|
|
1503
|
+
theme: import("../element/types").Theme;
|
|
1504
1504
|
gridSize: number | null;
|
|
1505
1505
|
previousGridSize: number | null;
|
|
1506
1506
|
viewModeEnabled: boolean;
|
|
@@ -1556,7 +1556,7 @@ export declare const actionToggleHandTool: {
|
|
|
1556
1556
|
trackEvent: {
|
|
1557
1557
|
category: "toolbar";
|
|
1558
1558
|
};
|
|
1559
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app:
|
|
1559
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
1560
1560
|
appState: {
|
|
1561
1561
|
selectedElementIds: {};
|
|
1562
1562
|
selectedGroupIds: {};
|
|
@@ -1647,7 +1647,7 @@ export declare const actionToggleHandTool: {
|
|
|
1647
1647
|
duration?: number | undefined;
|
|
1648
1648
|
} | null;
|
|
1649
1649
|
zenModeEnabled: boolean;
|
|
1650
|
-
theme:
|
|
1650
|
+
theme: import("../element/types").Theme;
|
|
1651
1651
|
gridSize: number | null;
|
|
1652
1652
|
previousGridSize: number | null;
|
|
1653
1653
|
viewModeEnabled: boolean;
|
|
@@ -1698,7 +1698,7 @@ export declare const actionToggleHandTool: {
|
|
|
1698
1698
|
} & {
|
|
1699
1699
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
1700
1700
|
};
|
|
1701
|
-
export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, zoomToSelection: boolean, maxZoom?: number, margin?: number) => {
|
|
1701
|
+
export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, zoomToSelection: boolean, app: AppClassProperties, maxZoom?: number, margin?: number) => {
|
|
1702
1702
|
appState: {
|
|
1703
1703
|
zoom: {
|
|
1704
1704
|
value: NormalizedZoomValue;
|
|
@@ -1793,7 +1793,7 @@ export declare const zoomToFitElements: (elements: readonly ExcalidrawElement[],
|
|
|
1793
1793
|
duration?: number | undefined;
|
|
1794
1794
|
} | null;
|
|
1795
1795
|
zenModeEnabled: boolean;
|
|
1796
|
-
theme:
|
|
1796
|
+
theme: import("../element/types").Theme;
|
|
1797
1797
|
gridSize: number | null;
|
|
1798
1798
|
previousGridSize: number | null;
|
|
1799
1799
|
viewModeEnabled: boolean;
|
|
@@ -128,7 +128,7 @@ export declare const actionCut: {
|
|
|
128
128
|
duration?: number | undefined;
|
|
129
129
|
} | null;
|
|
130
130
|
zenModeEnabled: boolean;
|
|
131
|
-
theme:
|
|
131
|
+
theme: import("../element/types").Theme;
|
|
132
132
|
gridSize: number | null;
|
|
133
133
|
previousGridSize: number | null;
|
|
134
134
|
viewModeEnabled: boolean;
|
|
@@ -301,7 +301,7 @@ export declare const actionCut: {
|
|
|
301
301
|
duration?: number | undefined;
|
|
302
302
|
} | null;
|
|
303
303
|
zenModeEnabled: boolean;
|
|
304
|
-
theme:
|
|
304
|
+
theme: import("../element/types").Theme;
|
|
305
305
|
gridSize: number | null;
|
|
306
306
|
previousGridSize: number | null;
|
|
307
307
|
viewModeEnabled: boolean;
|
|
@@ -441,7 +441,7 @@ export declare const actionCut: {
|
|
|
441
441
|
duration?: number | undefined;
|
|
442
442
|
} | null;
|
|
443
443
|
zenModeEnabled: boolean;
|
|
444
|
-
theme:
|
|
444
|
+
theme: import("../element/types").Theme;
|
|
445
445
|
gridSize: number | null;
|
|
446
446
|
previousGridSize: number | null;
|
|
447
447
|
viewModeEnabled: boolean;
|
|
@@ -600,7 +600,7 @@ export declare const actionCopyAsSvg: {
|
|
|
600
600
|
duration?: number | undefined;
|
|
601
601
|
} | null;
|
|
602
602
|
zenModeEnabled: boolean;
|
|
603
|
-
theme:
|
|
603
|
+
theme: import("../element/types").Theme;
|
|
604
604
|
gridSize: number | null;
|
|
605
605
|
previousGridSize: number | null;
|
|
606
606
|
viewModeEnabled: boolean;
|
|
@@ -758,7 +758,7 @@ export declare const actionCopyAsPng: {
|
|
|
758
758
|
duration?: number | undefined;
|
|
759
759
|
} | null;
|
|
760
760
|
zenModeEnabled: boolean;
|
|
761
|
-
theme:
|
|
761
|
+
theme: import("../element/types").Theme;
|
|
762
762
|
gridSize: number | null;
|
|
763
763
|
previousGridSize: number | null;
|
|
764
764
|
viewModeEnabled: boolean;
|
|
@@ -819,10 +819,10 @@ export declare const copyText: {
|
|
|
819
819
|
trackEvent: {
|
|
820
820
|
category: "element";
|
|
821
821
|
};
|
|
822
|
-
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState
|
|
822
|
+
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => {
|
|
823
823
|
commitToHistory: false;
|
|
824
824
|
};
|
|
825
|
-
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
825
|
+
predicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
826
826
|
contextItemLabel: string;
|
|
827
827
|
} & {
|
|
828
828
|
keyTest?: undefined;
|
|
@@ -104,7 +104,7 @@ export declare const actionDeleteSelected: {
|
|
|
104
104
|
duration?: number | undefined;
|
|
105
105
|
} | null;
|
|
106
106
|
zenModeEnabled: boolean;
|
|
107
|
-
theme:
|
|
107
|
+
theme: import("../element/types").Theme;
|
|
108
108
|
gridSize: number | null;
|
|
109
109
|
previousGridSize: number | null;
|
|
110
110
|
viewModeEnabled: boolean;
|
|
@@ -277,7 +277,7 @@ export declare const actionDeleteSelected: {
|
|
|
277
277
|
duration?: number | undefined;
|
|
278
278
|
} | null;
|
|
279
279
|
zenModeEnabled: boolean;
|
|
280
|
-
theme:
|
|
280
|
+
theme: import("../element/types").Theme;
|
|
281
281
|
gridSize: number | null;
|
|
282
282
|
previousGridSize: number | null;
|
|
283
283
|
viewModeEnabled: boolean;
|
|
@@ -417,7 +417,7 @@ export declare const actionDeleteSelected: {
|
|
|
417
417
|
duration?: number | undefined;
|
|
418
418
|
} | null;
|
|
419
419
|
zenModeEnabled: boolean;
|
|
420
|
-
theme:
|
|
420
|
+
theme: import("../element/types").Theme;
|
|
421
421
|
gridSize: number | null;
|
|
422
422
|
previousGridSize: number | null;
|
|
423
423
|
viewModeEnabled: boolean;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ExcalidrawElement } from "../element/types";
|
|
3
|
-
import { AppState } from "../types";
|
|
3
|
+
import { AppClassProperties, AppState } from "../types";
|
|
4
4
|
export declare const distributeHorizontally: {
|
|
5
5
|
name: "distributeHorizontally";
|
|
6
6
|
trackEvent: {
|
|
7
7
|
category: "element";
|
|
8
8
|
};
|
|
9
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
9
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
10
10
|
appState: Readonly<AppState>;
|
|
11
11
|
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
12
12
|
commitToHistory: true;
|
|
13
13
|
};
|
|
14
14
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
15
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
15
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
16
16
|
} & {
|
|
17
17
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
18
18
|
};
|
|
@@ -21,13 +21,13 @@ export declare const distributeVertically: {
|
|
|
21
21
|
trackEvent: {
|
|
22
22
|
category: "element";
|
|
23
23
|
};
|
|
24
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState
|
|
24
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, _: any, app: AppClassProperties) => {
|
|
25
25
|
appState: Readonly<AppState>;
|
|
26
26
|
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
27
27
|
commitToHistory: true;
|
|
28
28
|
};
|
|
29
29
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
30
|
-
PanelComponent: ({ elements, appState, updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
30
|
+
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
31
31
|
} & {
|
|
32
32
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
33
33
|
};
|
|
@@ -5,8 +5,8 @@ export declare const actionToggleElementLock: {
|
|
|
5
5
|
trackEvent: {
|
|
6
6
|
category: "element";
|
|
7
7
|
};
|
|
8
|
-
predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
9
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState
|
|
8
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState, _: import("../types").ExcalidrawProps, app: import("../types").AppClassProperties) => boolean;
|
|
9
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => false | {
|
|
10
10
|
elements: ExcalidrawElement[];
|
|
11
11
|
appState: {
|
|
12
12
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
@@ -103,7 +103,7 @@ export declare const actionToggleElementLock: {
|
|
|
103
103
|
duration?: number | undefined;
|
|
104
104
|
} | null;
|
|
105
105
|
zenModeEnabled: boolean;
|
|
106
|
-
theme:
|
|
106
|
+
theme: import("../element/types").Theme;
|
|
107
107
|
gridSize: number | null;
|
|
108
108
|
previousGridSize: number | null;
|
|
109
109
|
viewModeEnabled: boolean;
|
|
@@ -152,10 +152,10 @@ export declare const actionToggleElementLock: {
|
|
|
152
152
|
};
|
|
153
153
|
commitToHistory: true;
|
|
154
154
|
};
|
|
155
|
-
contextItemLabel: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState
|
|
156
|
-
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[]) => boolean;
|
|
155
|
+
contextItemLabel: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>, app: import("../types").AppClassProperties) => "labels.elementLock.unlock" | "labels.elementLock.lock" | "labels.elementLock.lockAll" | "labels.elementLock.unlockAll";
|
|
156
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean;
|
|
157
157
|
} & {
|
|
158
|
-
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[]) => boolean) | undefined;
|
|
158
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[], app: import("../types").AppClassProperties) => boolean) | undefined;
|
|
159
159
|
};
|
|
160
160
|
export declare const actionUnlockAllElements: {
|
|
161
161
|
name: "unlockAllElements";
|
|
@@ -260,7 +260,7 @@ export declare const actionUnlockAllElements: {
|
|
|
260
260
|
duration?: number | undefined;
|
|
261
261
|
} | null;
|
|
262
262
|
zenModeEnabled: boolean;
|
|
263
|
-
theme:
|
|
263
|
+
theme: import("../element/types").Theme;
|
|
264
264
|
gridSize: number | null;
|
|
265
265
|
previousGridSize: number | null;
|
|
266
266
|
viewModeEnabled: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { Theme } from "../element/types";
|
|
2
3
|
import "../components/ToolIcon.scss";
|
|
3
4
|
export declare const actionChangeProjectName: {
|
|
4
5
|
name: "changeProjectName";
|
|
@@ -98,7 +99,7 @@ export declare const actionChangeProjectName: {
|
|
|
98
99
|
duration?: number | undefined;
|
|
99
100
|
} | null;
|
|
100
101
|
zenModeEnabled: boolean;
|
|
101
|
-
theme:
|
|
102
|
+
theme: Theme;
|
|
102
103
|
gridSize: number | null;
|
|
103
104
|
previousGridSize: number | null;
|
|
104
105
|
viewModeEnabled: boolean;
|
|
@@ -253,7 +254,7 @@ export declare const actionChangeExportScale: {
|
|
|
253
254
|
duration?: number | undefined;
|
|
254
255
|
} | null;
|
|
255
256
|
zenModeEnabled: boolean;
|
|
256
|
-
theme:
|
|
257
|
+
theme: Theme;
|
|
257
258
|
gridSize: number | null;
|
|
258
259
|
previousGridSize: number | null;
|
|
259
260
|
viewModeEnabled: boolean;
|
|
@@ -408,7 +409,7 @@ export declare const actionChangeExportBackground: {
|
|
|
408
409
|
duration?: number | undefined;
|
|
409
410
|
} | null;
|
|
410
411
|
zenModeEnabled: boolean;
|
|
411
|
-
theme:
|
|
412
|
+
theme: Theme;
|
|
412
413
|
gridSize: number | null;
|
|
413
414
|
previousGridSize: number | null;
|
|
414
415
|
viewModeEnabled: boolean;
|
|
@@ -563,7 +564,7 @@ export declare const actionChangeExportEmbedScene: {
|
|
|
563
564
|
duration?: number | undefined;
|
|
564
565
|
} | null;
|
|
565
566
|
zenModeEnabled: boolean;
|
|
566
|
-
theme:
|
|
567
|
+
theme: Theme;
|
|
567
568
|
gridSize: number | null;
|
|
568
569
|
previousGridSize: number | null;
|
|
569
570
|
viewModeEnabled: boolean;
|
|
@@ -718,7 +719,7 @@ export declare const actionSaveToActiveFile: {
|
|
|
718
719
|
selectedElementsAreBeingDragged: boolean;
|
|
719
720
|
shouldCacheIgnoreZoom: boolean;
|
|
720
721
|
zenModeEnabled: boolean;
|
|
721
|
-
theme:
|
|
722
|
+
theme: Theme;
|
|
722
723
|
gridSize: number | null;
|
|
723
724
|
previousGridSize: number | null;
|
|
724
725
|
viewModeEnabled: boolean;
|
|
@@ -876,7 +877,7 @@ export declare const actionSaveFileToDisk: {
|
|
|
876
877
|
duration?: number | undefined;
|
|
877
878
|
} | null;
|
|
878
879
|
zenModeEnabled: boolean;
|
|
879
|
-
theme:
|
|
880
|
+
theme: Theme;
|
|
880
881
|
gridSize: number | null;
|
|
881
882
|
previousGridSize: number | null;
|
|
882
883
|
viewModeEnabled: boolean;
|
|
@@ -941,7 +942,7 @@ export declare const actionLoadScene: {
|
|
|
941
942
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => Promise<false | {
|
|
942
943
|
elements: import("../element/types").ExcalidrawElement[];
|
|
943
944
|
appState: {
|
|
944
|
-
theme:
|
|
945
|
+
theme: Theme;
|
|
945
946
|
name: string;
|
|
946
947
|
activeTool: {
|
|
947
948
|
lastActiveTool: import("../types").LastActiveTool;
|
|
@@ -1176,7 +1177,7 @@ export declare const actionLoadScene: {
|
|
|
1176
1177
|
duration?: number | undefined;
|
|
1177
1178
|
} | null;
|
|
1178
1179
|
zenModeEnabled: boolean;
|
|
1179
|
-
theme:
|
|
1180
|
+
theme: Theme;
|
|
1180
1181
|
gridSize: number | null;
|
|
1181
1182
|
previousGridSize: number | null;
|
|
1182
1183
|
viewModeEnabled: boolean;
|
|
@@ -1332,7 +1333,7 @@ export declare const actionExportWithDarkMode: {
|
|
|
1332
1333
|
duration?: number | undefined;
|
|
1333
1334
|
} | null;
|
|
1334
1335
|
zenModeEnabled: boolean;
|
|
1335
|
-
theme:
|
|
1336
|
+
theme: Theme;
|
|
1336
1337
|
gridSize: number | null;
|
|
1337
1338
|
previousGridSize: number | null;
|
|
1338
1339
|
viewModeEnabled: boolean;
|