@myoc/common 0.19.518 → 0.19.520
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 +33 -65
- package/dist/dev/index.js.map +3 -3
- package/dist/prod/index.js +3 -3
- package/dist/types/common/src/colors.d.ts +1 -1
- package/dist/types/common/src/constants.d.ts +8 -5
- package/dist/types/common/src/utils.d.ts +0 -42
- package/dist/types/element/src/bounds.d.ts +18 -1
- package/dist/types/element/src/comparisons.d.ts +1 -0
- package/dist/types/element/src/image.d.ts +5 -0
- package/dist/types/element/src/newElement.d.ts +2 -0
- package/dist/types/element/src/types.d.ts +8 -0
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +6 -2
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +33 -11
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +6 -2
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +3 -1
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +9 -3
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +3 -1
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +3 -1
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +6 -2
- package/dist/types/excalidraw/actions/actionEmbeddable.d.ts +3 -1
- package/dist/types/excalidraw/actions/actionExport.d.ts +6 -2
- package/dist/types/excalidraw/actions/actionFrame.d.ts +14 -4
- package/dist/types/excalidraw/actions/actionGroup.d.ts +6 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +5 -1
- package/dist/types/excalidraw/actions/actionLink.d.ts +3 -1
- package/dist/types/excalidraw/actions/actionMenu.d.ts +3 -1
- package/dist/types/excalidraw/actions/actionProperties.d.ts +18 -5
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +3 -1
- package/dist/types/excalidraw/actions/actionStyles.d.ts +3 -1
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +3 -1
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +3 -1
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +3 -1
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +3 -1
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +3 -1
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +3 -1
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +5 -3
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +3 -1
- package/dist/types/excalidraw/actions/index.d.ts +1 -1
- package/dist/types/excalidraw/actions/types.d.ts +1 -1
- package/dist/types/excalidraw/appState.d.ts +2 -1
- package/dist/types/excalidraw/components/App.d.ts +13 -28
- package/dist/types/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +1 -1
- package/dist/types/excalidraw/components/ConvertElementTypePopup.d.ts +1 -1
- package/dist/types/excalidraw/components/EyeDropper.d.ts +1 -1
- package/dist/types/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +1 -1
- package/dist/types/excalidraw/components/SearchMenu.d.ts +1 -1
- package/dist/types/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/types/excalidraw/components/canvases/StaticCanvas.d.ts +2 -1
- package/dist/types/excalidraw/components/icons.d.ts +2 -0
- package/dist/types/excalidraw/components/main-menu/DefaultItems.d.ts +7 -4
- package/dist/types/excalidraw/data/blob.d.ts +3 -1
- package/dist/types/excalidraw/data/json.d.ts +3 -1
- package/dist/types/excalidraw/renderer/animation.d.ts +1 -0
- package/dist/types/excalidraw/scene/Renderer.d.ts +2 -0
- package/dist/types/excalidraw/scene/index.d.ts +1 -1
- package/dist/types/excalidraw/scene/types.d.ts +1 -0
- package/dist/types/excalidraw/scroll.d.ts +46 -0
- package/dist/types/excalidraw/types.d.ts +24 -3
- package/dist/types/laser-pointer/src/index.d.ts +2 -0
- package/dist/types/laser-pointer/src/math.d.ts +16 -0
- package/dist/types/laser-pointer/src/simplify.d.ts +2 -0
- package/dist/types/laser-pointer/src/state.d.ts +35 -0
- package/dist/types/utils/src/index.d.ts +1 -2
- package/package.json +1 -1
- package/dist/types/utils/src/bbox.d.ts +0 -9
- package/dist/types/utils/src/withinBounds.d.ts +0 -19
|
@@ -71,9 +71,10 @@ export declare const actionLink: {
|
|
|
71
71
|
currentItemStrokeColor: string;
|
|
72
72
|
currentItemBackgroundColor: string;
|
|
73
73
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
74
|
-
|
|
74
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
75
75
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
76
76
|
currentItemRoughness: number;
|
|
77
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
77
78
|
currentItemOpacity: number;
|
|
78
79
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
79
80
|
currentItemFontSize: number;
|
|
@@ -133,6 +134,7 @@ export declare const actionLink: {
|
|
|
133
134
|
gridStep: number;
|
|
134
135
|
gridModeEnabled: boolean;
|
|
135
136
|
viewModeEnabled: boolean;
|
|
137
|
+
viewModeOnly: boolean;
|
|
136
138
|
selectedGroupIds: {
|
|
137
139
|
[groupId: string]: boolean;
|
|
138
140
|
};
|
|
@@ -78,9 +78,10 @@ export declare const actionShortcuts: {
|
|
|
78
78
|
currentItemStrokeColor: string;
|
|
79
79
|
currentItemBackgroundColor: string;
|
|
80
80
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
81
|
-
|
|
81
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
82
82
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
83
83
|
currentItemRoughness: number;
|
|
84
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
84
85
|
currentItemOpacity: number;
|
|
85
86
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
86
87
|
currentItemFontSize: number;
|
|
@@ -127,6 +128,7 @@ export declare const actionShortcuts: {
|
|
|
127
128
|
gridStep: number;
|
|
128
129
|
gridModeEnabled: boolean;
|
|
129
130
|
viewModeEnabled: boolean;
|
|
131
|
+
viewModeOnly: boolean;
|
|
130
132
|
selectedGroupIds: {
|
|
131
133
|
[groupId: string]: boolean;
|
|
132
134
|
};
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
import { type StrokeWidthKey } from "@excalidraw/common";
|
|
1
2
|
import { LinearElementEditor } from "@excalidraw/element/linearElementEditor";
|
|
2
|
-
import type { Arrowhead, ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextElement, FontFamilyValues, TextAlign } from "@excalidraw/element/types";
|
|
3
|
+
import type { Arrowhead, ExcalidrawBindableElement, ExcalidrawElement, ExcalidrawLinearElement, ExcalidrawTextElement, FontFamilyValues, StrokeVariability, TextAlign } from "@excalidraw/element/types";
|
|
3
4
|
import type { AppClassProperties, AppState, Primitive } from "../types";
|
|
4
5
|
export declare const changeProperty: (elements: readonly ExcalidrawElement[], appState: AppState, callback: (element: ExcalidrawElement) => ExcalidrawElement, includeBoundText?: boolean) => ExcalidrawElement[];
|
|
5
|
-
export declare const getFormValue: <T extends Primitive>(elements: readonly ExcalidrawElement[], app: AppClassProperties,
|
|
6
|
+
export declare const getFormValue: <T extends Primitive>(elements: readonly ExcalidrawElement[], app: AppClassProperties,
|
|
7
|
+
/**
|
|
8
|
+
* input value (usually the element attribute value,
|
|
9
|
+
* but depends on what the action's PanelComponent input expects)
|
|
10
|
+
*/
|
|
11
|
+
getValue: (element: ExcalidrawElement) => T, elementPredicate: true | ((element: ExcalidrawElement) => boolean), defaultValue: T | ((isSomeElementSelected: boolean) => T)) => T;
|
|
6
12
|
export declare const actionChangeStrokeColor: import("./types").Action<Pick<AppState, "currentItemStrokeColor">> & {
|
|
7
13
|
keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
|
|
8
14
|
};
|
|
@@ -12,12 +18,15 @@ export declare const actionChangeBackgroundColor: import("./types").Action<Pick<
|
|
|
12
18
|
export declare const actionChangeFillStyle: import("./types").Action<import("@excalidraw/element/types").FillStyle> & {
|
|
13
19
|
keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
|
|
14
20
|
};
|
|
15
|
-
export declare const actionChangeStrokeWidth: import("./types").Action<
|
|
21
|
+
export declare const actionChangeStrokeWidth: import("./types").Action<StrokeWidthKey> & {
|
|
16
22
|
keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
|
|
17
23
|
};
|
|
18
24
|
export declare const actionChangeSloppiness: import("./types").Action<number> & {
|
|
19
25
|
keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
|
|
20
26
|
};
|
|
27
|
+
export declare const actionChangeFreedrawMode: import("./types").Action<StrokeVariability> & {
|
|
28
|
+
keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
|
|
29
|
+
};
|
|
21
30
|
export declare const actionChangeStrokeStyle: import("./types").Action<import("@excalidraw/element/types").StrokeStyle> & {
|
|
22
31
|
keyTest?: ((event: React.KeyboardEvent | KeyboardEvent, appState: AppState, elements: readonly ExcalidrawElement[], app: AppClassProperties) => boolean) | undefined;
|
|
23
32
|
};
|
|
@@ -100,9 +109,10 @@ export declare const actionDecreaseFontSize: {
|
|
|
100
109
|
currentItemStrokeColor: string;
|
|
101
110
|
currentItemBackgroundColor: string;
|
|
102
111
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
103
|
-
|
|
112
|
+
currentItemStrokeWidthKey: StrokeWidthKey;
|
|
104
113
|
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
105
114
|
currentItemRoughness: number;
|
|
115
|
+
currentItemStrokeVariability: StrokeVariability;
|
|
106
116
|
currentItemOpacity: number;
|
|
107
117
|
currentItemFontFamily: FontFamilyValues;
|
|
108
118
|
currentItemTextAlign: TextAlign;
|
|
@@ -162,6 +172,7 @@ export declare const actionDecreaseFontSize: {
|
|
|
162
172
|
gridStep: number;
|
|
163
173
|
gridModeEnabled: boolean;
|
|
164
174
|
viewModeEnabled: boolean;
|
|
175
|
+
viewModeOnly: boolean;
|
|
165
176
|
selectedGroupIds: {
|
|
166
177
|
[groupId: string]: boolean;
|
|
167
178
|
};
|
|
@@ -277,9 +288,10 @@ export declare const actionIncreaseFontSize: {
|
|
|
277
288
|
currentItemStrokeColor: string;
|
|
278
289
|
currentItemBackgroundColor: string;
|
|
279
290
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
280
|
-
|
|
291
|
+
currentItemStrokeWidthKey: StrokeWidthKey;
|
|
281
292
|
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
282
293
|
currentItemRoughness: number;
|
|
294
|
+
currentItemStrokeVariability: StrokeVariability;
|
|
283
295
|
currentItemOpacity: number;
|
|
284
296
|
currentItemFontFamily: FontFamilyValues;
|
|
285
297
|
currentItemTextAlign: TextAlign;
|
|
@@ -339,6 +351,7 @@ export declare const actionIncreaseFontSize: {
|
|
|
339
351
|
gridStep: number;
|
|
340
352
|
gridModeEnabled: boolean;
|
|
341
353
|
viewModeEnabled: boolean;
|
|
354
|
+
viewModeOnly: boolean;
|
|
342
355
|
selectedGroupIds: {
|
|
343
356
|
[groupId: string]: boolean;
|
|
344
357
|
};
|
|
@@ -78,9 +78,10 @@ export declare const actionSelectAll: {
|
|
|
78
78
|
currentItemStrokeColor: string;
|
|
79
79
|
currentItemBackgroundColor: string;
|
|
80
80
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
81
|
-
|
|
81
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
82
82
|
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
83
83
|
currentItemRoughness: number;
|
|
84
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
84
85
|
currentItemOpacity: number;
|
|
85
86
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
86
87
|
currentItemFontSize: number;
|
|
@@ -138,6 +139,7 @@ export declare const actionSelectAll: {
|
|
|
138
139
|
gridStep: number;
|
|
139
140
|
gridModeEnabled: boolean;
|
|
140
141
|
viewModeEnabled: boolean;
|
|
142
|
+
viewModeOnly: boolean;
|
|
141
143
|
width: number;
|
|
142
144
|
height: number;
|
|
143
145
|
offsetTop: number;
|
|
@@ -76,9 +76,10 @@ export declare const actionCopyStyles: {
|
|
|
76
76
|
currentItemStrokeColor: string;
|
|
77
77
|
currentItemBackgroundColor: string;
|
|
78
78
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
79
|
-
|
|
79
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
80
80
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
81
81
|
currentItemRoughness: number;
|
|
82
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
82
83
|
currentItemOpacity: number;
|
|
83
84
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
84
85
|
currentItemFontSize: number;
|
|
@@ -134,6 +135,7 @@ export declare const actionCopyStyles: {
|
|
|
134
135
|
gridStep: number;
|
|
135
136
|
gridModeEnabled: boolean;
|
|
136
137
|
viewModeEnabled: boolean;
|
|
138
|
+
viewModeOnly: boolean;
|
|
137
139
|
selectedGroupIds: {
|
|
138
140
|
[groupId: string]: boolean;
|
|
139
141
|
};
|
|
@@ -72,9 +72,10 @@ export declare const actionToggleArrowBinding: {
|
|
|
72
72
|
currentItemStrokeColor: string;
|
|
73
73
|
currentItemBackgroundColor: string;
|
|
74
74
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
75
|
-
|
|
75
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
76
76
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
77
77
|
currentItemRoughness: number;
|
|
78
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
78
79
|
currentItemOpacity: number;
|
|
79
80
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
80
81
|
currentItemFontSize: number;
|
|
@@ -135,6 +136,7 @@ export declare const actionToggleArrowBinding: {
|
|
|
135
136
|
gridStep: number;
|
|
136
137
|
gridModeEnabled: boolean;
|
|
137
138
|
viewModeEnabled: boolean;
|
|
139
|
+
viewModeOnly: boolean;
|
|
138
140
|
selectedGroupIds: {
|
|
139
141
|
[groupId: string]: boolean;
|
|
140
142
|
};
|
|
@@ -77,9 +77,10 @@ export declare const actionToggleGridMode: {
|
|
|
77
77
|
currentItemStrokeColor: string;
|
|
78
78
|
currentItemBackgroundColor: string;
|
|
79
79
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
80
|
-
|
|
80
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
81
81
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
82
82
|
currentItemRoughness: number;
|
|
83
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
83
84
|
currentItemOpacity: number;
|
|
84
85
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
85
86
|
currentItemFontSize: number;
|
|
@@ -139,6 +140,7 @@ export declare const actionToggleGridMode: {
|
|
|
139
140
|
gridSize: number;
|
|
140
141
|
gridStep: number;
|
|
141
142
|
viewModeEnabled: boolean;
|
|
143
|
+
viewModeOnly: boolean;
|
|
142
144
|
selectedGroupIds: {
|
|
143
145
|
[groupId: string]: boolean;
|
|
144
146
|
};
|
|
@@ -72,9 +72,10 @@ export declare const actionToggleMidpointSnapping: {
|
|
|
72
72
|
currentItemStrokeColor: string;
|
|
73
73
|
currentItemBackgroundColor: string;
|
|
74
74
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
75
|
-
|
|
75
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
76
76
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
77
77
|
currentItemRoughness: number;
|
|
78
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
78
79
|
currentItemOpacity: number;
|
|
79
80
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
80
81
|
currentItemFontSize: number;
|
|
@@ -135,6 +136,7 @@ export declare const actionToggleMidpointSnapping: {
|
|
|
135
136
|
gridStep: number;
|
|
136
137
|
gridModeEnabled: boolean;
|
|
137
138
|
viewModeEnabled: boolean;
|
|
139
|
+
viewModeOnly: boolean;
|
|
138
140
|
selectedGroupIds: {
|
|
139
141
|
[groupId: string]: boolean;
|
|
140
142
|
};
|
|
@@ -75,9 +75,10 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
75
75
|
currentItemStrokeColor: string;
|
|
76
76
|
currentItemBackgroundColor: string;
|
|
77
77
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
78
|
-
|
|
78
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
79
79
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
80
80
|
currentItemRoughness: number;
|
|
81
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
81
82
|
currentItemOpacity: number;
|
|
82
83
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
83
84
|
currentItemFontSize: number;
|
|
@@ -137,6 +138,7 @@ export declare const actionToggleObjectsSnapMode: {
|
|
|
137
138
|
gridSize: number;
|
|
138
139
|
gridStep: number;
|
|
139
140
|
viewModeEnabled: boolean;
|
|
141
|
+
viewModeOnly: boolean;
|
|
140
142
|
selectedGroupIds: {
|
|
141
143
|
[groupId: string]: boolean;
|
|
142
144
|
};
|
|
@@ -81,9 +81,10 @@ export declare const actionToggleSearchMenu: {
|
|
|
81
81
|
currentItemStrokeColor: string;
|
|
82
82
|
currentItemBackgroundColor: string;
|
|
83
83
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
84
|
-
|
|
84
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
85
85
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
86
86
|
currentItemRoughness: number;
|
|
87
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
87
88
|
currentItemOpacity: number;
|
|
88
89
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
89
90
|
currentItemFontSize: number;
|
|
@@ -128,6 +129,7 @@ export declare const actionToggleSearchMenu: {
|
|
|
128
129
|
gridStep: number;
|
|
129
130
|
gridModeEnabled: boolean;
|
|
130
131
|
viewModeEnabled: boolean;
|
|
132
|
+
viewModeOnly: boolean;
|
|
131
133
|
selectedGroupIds: {
|
|
132
134
|
[groupId: string]: boolean;
|
|
133
135
|
};
|
|
@@ -77,9 +77,10 @@ export declare const actionToggleStats: {
|
|
|
77
77
|
currentItemStrokeColor: string;
|
|
78
78
|
currentItemBackgroundColor: string;
|
|
79
79
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
80
|
-
|
|
80
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
81
81
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
82
82
|
currentItemRoughness: number;
|
|
83
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
83
84
|
currentItemOpacity: number;
|
|
84
85
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
85
86
|
currentItemFontSize: number;
|
|
@@ -140,6 +141,7 @@ export declare const actionToggleStats: {
|
|
|
140
141
|
gridStep: number;
|
|
141
142
|
gridModeEnabled: boolean;
|
|
142
143
|
viewModeEnabled: boolean;
|
|
144
|
+
viewModeOnly: boolean;
|
|
143
145
|
selectedGroupIds: {
|
|
144
146
|
[groupId: string]: boolean;
|
|
145
147
|
};
|
|
@@ -7,7 +7,7 @@ export declare const actionToggleViewMode: {
|
|
|
7
7
|
category: "canvas";
|
|
8
8
|
predicate: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
9
9
|
};
|
|
10
|
-
perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): {
|
|
10
|
+
perform(elements: readonly import("@excalidraw/element/types").OrderedExcalidrawElement[], appState: Readonly<import("../types").AppState>): false | {
|
|
11
11
|
appState: {
|
|
12
12
|
viewModeEnabled: boolean;
|
|
13
13
|
contextMenu: {
|
|
@@ -74,9 +74,10 @@ export declare const actionToggleViewMode: {
|
|
|
74
74
|
currentItemStrokeColor: string;
|
|
75
75
|
currentItemBackgroundColor: string;
|
|
76
76
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
77
|
-
|
|
77
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
78
78
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
79
79
|
currentItemRoughness: number;
|
|
80
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
80
81
|
currentItemOpacity: number;
|
|
81
82
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
82
83
|
currentItemFontSize: number;
|
|
@@ -136,6 +137,7 @@ export declare const actionToggleViewMode: {
|
|
|
136
137
|
gridSize: number;
|
|
137
138
|
gridStep: number;
|
|
138
139
|
gridModeEnabled: boolean;
|
|
140
|
+
viewModeOnly: boolean;
|
|
139
141
|
selectedGroupIds: {
|
|
140
142
|
[groupId: string]: boolean;
|
|
141
143
|
};
|
|
@@ -177,7 +179,7 @@ export declare const actionToggleViewMode: {
|
|
|
177
179
|
checked: (appState: Readonly<import("../types").AppState>) => boolean;
|
|
178
180
|
predicate: (elements: readonly import("@excalidraw/element/types").ExcalidrawElement[], appState: import("../types").AppState, appProps: import("../types").ExcalidrawProps) => boolean;
|
|
179
181
|
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
180
|
-
PanelComponent: ({ data, updateData, appState }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
182
|
+
PanelComponent: ({ data, updateData, appState, appProps }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
181
183
|
} & {
|
|
182
184
|
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
183
185
|
};
|
|
@@ -74,9 +74,10 @@ export declare const actionToggleZenMode: {
|
|
|
74
74
|
currentItemStrokeColor: string;
|
|
75
75
|
currentItemBackgroundColor: string;
|
|
76
76
|
currentItemFillStyle: import("@excalidraw/element/types").ExcalidrawElement["fillStyle"];
|
|
77
|
-
|
|
77
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
78
78
|
currentItemStrokeStyle: import("@excalidraw/element/types").ExcalidrawElement["strokeStyle"];
|
|
79
79
|
currentItemRoughness: number;
|
|
80
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
80
81
|
currentItemOpacity: number;
|
|
81
82
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
82
83
|
currentItemFontSize: number;
|
|
@@ -136,6 +137,7 @@ export declare const actionToggleZenMode: {
|
|
|
136
137
|
gridStep: number;
|
|
137
138
|
gridModeEnabled: boolean;
|
|
138
139
|
viewModeEnabled: boolean;
|
|
140
|
+
viewModeOnly: boolean;
|
|
139
141
|
selectedGroupIds: {
|
|
140
142
|
[groupId: string]: boolean;
|
|
141
143
|
};
|
|
@@ -2,7 +2,7 @@ export { actionDeleteSelected } from "./actionDeleteSelected";
|
|
|
2
2
|
export { actionBringForward, actionBringToFront, actionSendBackward, actionSendToBack, } from "./actionZindex";
|
|
3
3
|
export { actionSelectAll } from "./actionSelectAll";
|
|
4
4
|
export { actionDuplicateSelection } from "./actionDuplicateSelection";
|
|
5
|
-
export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, actionChangeArrowProperties, } from "./actionProperties";
|
|
5
|
+
export { actionChangeStrokeColor, actionChangeBackgroundColor, actionChangeStrokeWidth, actionChangeFillStyle, actionChangeSloppiness, actionChangeFreedrawMode, actionChangeOpacity, actionChangeFontSize, actionChangeFontFamily, actionChangeTextAlign, actionChangeVerticalAlign, actionChangeArrowProperties, } from "./actionProperties";
|
|
6
6
|
export { actionChangeViewBackgroundColor, actionZoomIn, actionZoomOut, actionResetZoom, actionZoomToFit, actionToggleTheme, } from "./actionCanvas";
|
|
7
7
|
export { actionSetEmbeddableAsActiveTool } from "./actionEmbeddable";
|
|
8
8
|
export { actionFinalize } from "./actionFinalize";
|
|
@@ -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" | "zenMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "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" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "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" | "zenMode" | "objectsSnapMode" | "arrowBinding" | "midpointSnapping" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "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" | "toggleEraserTool" | "toggleHandTool" | "selectAllElementsInFrame" | "removeAllElementsFromFrame" | "updateFrameRendering" | "setFrameAsActiveTool" | "setEmbeddableAsActiveTool" | "createContainerFromText" | "wrapTextInContainer" | "autoResize" | "elementStats" | "searchMenu" | "copyElementLink" | "linkToElement" | "cropEditor" | "wrapSelectionInFrame" | "smartZoom" | "toggleLassoTool" | "toggleShapeSwitch" | "togglePolygon";
|
|
18
18
|
export type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
20
|
appState: AppState;
|
|
@@ -43,9 +43,10 @@ export declare const clearAppStateForLocalStorage: (appState: Partial<AppState>)
|
|
|
43
43
|
currentItemStrokeColor?: string | undefined;
|
|
44
44
|
currentItemBackgroundColor?: string | undefined;
|
|
45
45
|
currentItemFillStyle?: import("@excalidraw/element/types").FillStyle | undefined;
|
|
46
|
-
|
|
46
|
+
currentItemStrokeWidthKey?: import("@excalidraw/common").StrokeWidthKey | undefined;
|
|
47
47
|
currentItemStrokeStyle?: import("@excalidraw/element/types").StrokeStyle | undefined;
|
|
48
48
|
currentItemRoughness?: number | undefined;
|
|
49
|
+
currentItemStrokeVariability?: import("@excalidraw/element/types").StrokeVariability | undefined;
|
|
49
50
|
currentItemOpacity?: number | undefined;
|
|
50
51
|
currentItemFontFamily?: number | undefined;
|
|
51
52
|
currentItemFontSize?: number | undefined;
|
|
@@ -2,13 +2,14 @@ import React from "react";
|
|
|
2
2
|
import { AppEventBus, type EXPORT_IMAGE_TYPES, Emitter, type EditorInterface, type StylesPanelMode } from "@excalidraw/common";
|
|
3
3
|
import { FlowChartCreator, Scene, Store, type ElementUpdate, StoreDelta, type ApplyToOptions } from "@excalidraw/element";
|
|
4
4
|
import { LinearElementEditor } from "@excalidraw/element/linearElementEditor";
|
|
5
|
-
import type { ExcalidrawElement, NonDeleted, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered, SceneElementsMap } from "@excalidraw/element/types";
|
|
5
|
+
import type { ExcalidrawElement, NonDeleted, FileId, NonDeletedExcalidrawElement, ExcalidrawFrameLikeElement, ExcalidrawIframeElement, ExcalidrawEmbeddableElement, Ordered, SceneElementsMap } from "@excalidraw/element/types";
|
|
6
6
|
import type { Mutable } from "@excalidraw/common/utility-types";
|
|
7
7
|
import { ActionManager } from "../actions/manager";
|
|
8
8
|
import { History } from "../history";
|
|
9
9
|
import { Fonts } from "../fonts";
|
|
10
10
|
import { type WritableAtom } from "../editor-jotai";
|
|
11
11
|
import { Renderer } from "../scene/Renderer";
|
|
12
|
+
import { type ScrollToContentOptions } from "../scroll";
|
|
12
13
|
import { LaserTrails } from "../laserTrails";
|
|
13
14
|
import { isOverScrollBars } from "../scene/scrollbars";
|
|
14
15
|
import { LassoTrail } from "../lasso";
|
|
@@ -88,6 +89,10 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
88
89
|
};
|
|
89
90
|
files: BinaryFiles;
|
|
90
91
|
imageCache: AppClassProperties["imageCache"];
|
|
92
|
+
imageLoadingProgress: Map<FileId, number>;
|
|
93
|
+
imageLoadingProgressEmitter: Emitter<[]>;
|
|
94
|
+
imagePlaceholderUpdateEmitter: Emitter<[]>;
|
|
95
|
+
private imageTransitionPlaceholders;
|
|
91
96
|
private iFrameRefs;
|
|
92
97
|
/**
|
|
93
98
|
* Indicates whether the embeddable's url has been validated for rendering.
|
|
@@ -387,33 +392,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
387
392
|
animate?: boolean;
|
|
388
393
|
duration?: number;
|
|
389
394
|
}) => void;
|
|
390
|
-
scrollToContent: (
|
|
391
|
-
/**
|
|
392
|
-
* target to scroll to
|
|
393
|
-
*
|
|
394
|
-
* - string - id of element or group, or url containing elementLink
|
|
395
|
-
* - ExcalidrawElement | ExcalidrawElement[] - element(s) objects
|
|
396
|
-
*/
|
|
397
|
-
target?: string | ExcalidrawElement | readonly ExcalidrawElement[], opts?: ({
|
|
398
|
-
fitToContent?: boolean;
|
|
399
|
-
fitToViewport?: never;
|
|
400
|
-
viewportZoomFactor?: number;
|
|
401
|
-
animate?: boolean;
|
|
402
|
-
duration?: number;
|
|
403
|
-
} | {
|
|
404
|
-
fitToContent?: never;
|
|
405
|
-
fitToViewport?: boolean;
|
|
406
|
-
/** when fitToViewport=true, how much screen should the content cover,
|
|
407
|
-
* between 0.1 (10%) and 1 (100%)
|
|
408
|
-
*/
|
|
409
|
-
viewportZoomFactor?: number;
|
|
410
|
-
animate?: boolean;
|
|
411
|
-
duration?: number;
|
|
412
|
-
}) & {
|
|
413
|
-
minZoom?: number;
|
|
414
|
-
maxZoom?: number;
|
|
415
|
-
canvasOffsets?: Offsets;
|
|
416
|
-
}) => void;
|
|
395
|
+
scrollToContent: (target?: string | ExcalidrawElement | readonly NonDeletedExcalidrawElement[], opts?: ScrollToContentOptions) => void;
|
|
417
396
|
private maybeUnfollowRemoteUser;
|
|
418
397
|
/** use when changing scrollX/scrollY/zoom based on user interaction */
|
|
419
398
|
private translateCanvas;
|
|
@@ -425,6 +404,10 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
425
404
|
* NOTE if file already exists in editor state, the file data is not updated
|
|
426
405
|
* */
|
|
427
406
|
addFiles: ExcalidrawImperativeAPI["addFiles"];
|
|
407
|
+
addImagePlaceholder: ExcalidrawImperativeAPI["addImagePlaceholder"];
|
|
408
|
+
setImageLoadingProgress: ExcalidrawImperativeAPI["setImageLoadingProgress"];
|
|
409
|
+
private clearImageLoadingProgress;
|
|
410
|
+
private clearImageShapeCacheForFileId;
|
|
428
411
|
private addMissingFiles;
|
|
429
412
|
updateScene: <K extends keyof AppState>(sceneData: {
|
|
430
413
|
elements?: SceneData["elements"];
|
|
@@ -502,6 +485,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
502
485
|
private handleCanvasClick;
|
|
503
486
|
private getElementLinkAtPosition;
|
|
504
487
|
private handleElementLinkClick;
|
|
488
|
+
private openElementLink;
|
|
505
489
|
/**
|
|
506
490
|
* finds candidate frame under cursor (when dragging frame children/elements
|
|
507
491
|
* inside frames)
|
|
@@ -554,6 +538,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
554
538
|
private newImagePlaceholder;
|
|
555
539
|
private handleLinearElementOnPointerDown;
|
|
556
540
|
private getCurrentItemRoundness;
|
|
541
|
+
private getCurrentItemStrokeWidth;
|
|
557
542
|
private createGenericElementOnPointerDown;
|
|
558
543
|
private createFrameElementOnPointerDown;
|
|
559
544
|
private maybeCacheReferenceSnapPoints;
|
|
@@ -14,7 +14,7 @@ export declare const isCustomColor: ({ color, palette, }: {
|
|
|
14
14
|
}) => boolean;
|
|
15
15
|
export declare const getMostUsedCustomColors: (elements: readonly ExcalidrawElement[], type: "elementBackground" | "elementStroke", palette: ColorPaletteCustom) => string[];
|
|
16
16
|
export type ActiveColorPickerSectionAtomType = "custom" | "baseColors" | "shades" | "hex" | null;
|
|
17
|
-
export declare const activeColorPickerSectionAtom: import("jotai
|
|
17
|
+
export declare const activeColorPickerSectionAtom: import("jotai").PrimitiveAtom<ActiveColorPickerSectionAtomType> & {
|
|
18
18
|
init: ActiveColorPickerSectionAtomType;
|
|
19
19
|
};
|
|
20
20
|
export type ColorPickerType = "canvasBackground" | "elementBackground" | "elementStroke";
|
|
@@ -2,7 +2,7 @@ import type { ConvertibleTypes, ExcalidrawElement, ExcalidrawTextContainer, Exca
|
|
|
2
2
|
import type { Scene } from "@excalidraw/element";
|
|
3
3
|
import "./ConvertElementTypePopup.scss";
|
|
4
4
|
import type App from "./App";
|
|
5
|
-
export declare const convertElementTypePopupAtom: import("jotai
|
|
5
|
+
export declare const convertElementTypePopupAtom: import("jotai").PrimitiveAtom<{
|
|
6
6
|
type: "panel";
|
|
7
7
|
} | null> & {
|
|
8
8
|
init: {
|
|
@@ -13,7 +13,7 @@ export type EyeDropperProperties = {
|
|
|
13
13
|
**/
|
|
14
14
|
colorPickerType: ColorPickerType;
|
|
15
15
|
};
|
|
16
|
-
export declare const activeEyeDropperAtom: import("jotai
|
|
16
|
+
export declare const activeEyeDropperAtom: import("jotai").PrimitiveAtom<EyeDropperProperties | null> & {
|
|
17
17
|
init: EyeDropperProperties | null;
|
|
18
18
|
};
|
|
19
19
|
export declare const EyeDropper: React.FC<{
|
|
@@ -11,7 +11,7 @@ export type OverwriteConfirmState = {
|
|
|
11
11
|
} | {
|
|
12
12
|
active: false;
|
|
13
13
|
};
|
|
14
|
-
export declare const overwriteConfirmStateAtom: import("jotai
|
|
14
|
+
export declare const overwriteConfirmStateAtom: import("jotai").PrimitiveAtom<OverwriteConfirmState> & {
|
|
15
15
|
init: OverwriteConfirmState;
|
|
16
16
|
};
|
|
17
17
|
export declare function openConfirmModal({ title, description, actionLabel, color, }: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./SearchMenu.scss";
|
|
2
|
-
export declare const searchItemInFocusAtom: import("jotai
|
|
2
|
+
export declare const searchItemInFocusAtom: import("jotai").PrimitiveAtom<number | null> & {
|
|
3
3
|
init: number | null;
|
|
4
4
|
};
|
|
5
5
|
export declare const SearchMenu: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,7 +8,7 @@ import "./Sidebar.scss";
|
|
|
8
8
|
*
|
|
9
9
|
* Since we can only render one Sidebar at a time, we can use a simple flag.
|
|
10
10
|
*/
|
|
11
|
-
export declare const isSidebarDockedAtom: import("jotai
|
|
11
|
+
export declare const isSidebarDockedAtom: import("jotai").PrimitiveAtom<boolean> & {
|
|
12
12
|
init: boolean;
|
|
13
13
|
};
|
|
14
14
|
export declare const SidebarInner: React.ForwardRefExoticComponent<Omit<{
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { NonDeletedExcalidrawElement, NonDeletedSceneElementsMap } from "@excalidraw/element/types";
|
|
3
3
|
import type { RenderableElementsMap, StaticCanvasRenderConfig } from "../../scene/types";
|
|
4
|
-
import type { StaticCanvasAppState } from "../../types";
|
|
4
|
+
import type { AppClassProperties, StaticCanvasAppState } from "../../types";
|
|
5
5
|
import type { RoughCanvas } from "roughjs/bin/canvas";
|
|
6
6
|
type StaticCanvasProps = {
|
|
7
|
+
app: AppClassProperties;
|
|
7
8
|
canvas: HTMLCanvasElement;
|
|
8
9
|
rc: RoughCanvas;
|
|
9
10
|
elementsMap: RenderableElementsMap;
|
|
@@ -113,6 +113,8 @@ export declare const StrokeStyleDottedIcon: import("react/jsx-runtime").JSX.Elem
|
|
|
113
113
|
export declare const SloppinessArchitectIcon: import("react/jsx-runtime").JSX.Element;
|
|
114
114
|
export declare const SloppinessArtistIcon: import("react/jsx-runtime").JSX.Element;
|
|
115
115
|
export declare const SloppinessCartoonistIcon: import("react/jsx-runtime").JSX.Element;
|
|
116
|
+
export declare const strokeVariabilityConstantIcon: import("react/jsx-runtime").JSX.Element;
|
|
117
|
+
export declare const strokeVariabilityVariableIcon: import("react/jsx-runtime").JSX.Element;
|
|
116
118
|
export declare const EdgeSharpIcon: import("react/jsx-runtime").JSX.Element;
|
|
117
119
|
export declare const EdgeRoundIcon: import("react/jsx-runtime").JSX.Element;
|
|
118
120
|
export declare const ArrowheadNoneIcon: React.MemoExoticComponent<({ flip }: {
|
|
@@ -25,11 +25,14 @@ export declare const Help: {
|
|
|
25
25
|
export declare const ToggleTheme: {
|
|
26
26
|
(props: {
|
|
27
27
|
allowSystemTheme: true;
|
|
28
|
+
/**
|
|
29
|
+
* Controls the theme of this UI component only.
|
|
30
|
+
* You should subscribe to `props.onThemeChange` and control the theme
|
|
31
|
+
* upstream.
|
|
32
|
+
*/
|
|
28
33
|
theme: Theme | "system";
|
|
29
|
-
onSelect: (theme: Theme | "system") => void;
|
|
30
34
|
} | {
|
|
31
|
-
allowSystemTheme
|
|
32
|
-
onSelect?: (theme: Theme) => void;
|
|
35
|
+
allowSystemTheme: false;
|
|
33
36
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
34
37
|
displayName: string;
|
|
35
38
|
};
|
|
@@ -66,7 +69,7 @@ export declare const Preferences: {
|
|
|
66
69
|
ToggleMidpointSnapping: () => import("react/jsx-runtime").JSX.Element;
|
|
67
70
|
ToggleGridMode: () => import("react/jsx-runtime").JSX.Element;
|
|
68
71
|
ToggleZenMode: () => import("react/jsx-runtime").JSX.Element;
|
|
69
|
-
ToggleViewMode: () => import("react/jsx-runtime").JSX.Element;
|
|
72
|
+
ToggleViewMode: () => import("react/jsx-runtime").JSX.Element | null;
|
|
70
73
|
ToggleElementProperties: () => import("react/jsx-runtime").JSX.Element;
|
|
71
74
|
displayName: string;
|
|
72
75
|
};
|
|
@@ -18,6 +18,7 @@ fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
|
18
18
|
elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
19
19
|
appState: {
|
|
20
20
|
viewModeEnabled: boolean;
|
|
21
|
+
viewModeOnly: boolean;
|
|
21
22
|
zenModeEnabled: boolean;
|
|
22
23
|
gridModeEnabled: boolean;
|
|
23
24
|
objectsSnapModeEnabled: boolean;
|
|
@@ -89,9 +90,10 @@ fileHandle?: FileSystemFileHandle | null) => Promise<{
|
|
|
89
90
|
currentItemStrokeColor: string;
|
|
90
91
|
currentItemBackgroundColor: string;
|
|
91
92
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
92
|
-
|
|
93
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
93
94
|
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
94
95
|
currentItemRoughness: number;
|
|
96
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
95
97
|
currentItemOpacity: number;
|
|
96
98
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
97
99
|
currentItemFontSize: number;
|
|
@@ -19,6 +19,7 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
19
19
|
elements: import("@excalidraw/element/types").OrderedExcalidrawElement[];
|
|
20
20
|
appState: {
|
|
21
21
|
viewModeEnabled: boolean;
|
|
22
|
+
viewModeOnly: boolean;
|
|
22
23
|
zenModeEnabled: boolean;
|
|
23
24
|
gridModeEnabled: boolean;
|
|
24
25
|
objectsSnapModeEnabled: boolean;
|
|
@@ -90,9 +91,10 @@ export declare const loadFromJSON: (localAppState: AppState, localElements: read
|
|
|
90
91
|
currentItemStrokeColor: string;
|
|
91
92
|
currentItemBackgroundColor: string;
|
|
92
93
|
currentItemFillStyle: ExcalidrawElement["fillStyle"];
|
|
93
|
-
|
|
94
|
+
currentItemStrokeWidthKey: import("@excalidraw/common").StrokeWidthKey;
|
|
94
95
|
currentItemStrokeStyle: ExcalidrawElement["strokeStyle"];
|
|
95
96
|
currentItemRoughness: number;
|
|
97
|
+
currentItemStrokeVariability: import("@excalidraw/element/types").StrokeVariability;
|
|
96
98
|
currentItemOpacity: number;
|
|
97
99
|
currentItemFontFamily: import("@excalidraw/element/types").FontFamilyValues;
|
|
98
100
|
currentItemFontSize: number;
|