@zsviczian/excalidraw 0.11.0-obsidian-16 → 0.11.0-obsidian-19
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 +27 -27
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +8 -8
- package/types/actions/actionAddToLibrary.d.ts +21 -3
- package/types/actions/actionBoundText.d.ts +7 -1
- package/types/actions/actionCanvas.d.ts +64 -10
- package/types/actions/actionClipboard.d.ts +36 -6
- package/types/actions/actionDeleteSelected.d.ts +22 -4
- package/types/actions/actionDuplicateSelection.d.ts +1 -1
- package/types/actions/actionExport.d.ts +64 -10
- package/types/actions/actionFinalize.d.ts +18 -5
- package/types/actions/actionMenu.d.ts +21 -3
- package/types/actions/actionProperties.d.ts +91 -13
- package/types/actions/actionStyles.d.ts +7 -1
- package/types/actions/actionToggleGridMode.d.ts +7 -1
- package/types/actions/actionToggleStats.d.ts +7 -1
- package/types/actions/actionToggleViewMode.d.ts +7 -1
- package/types/actions/actionToggleZenMode.d.ts +7 -1
- package/types/appState.d.ts +8 -2
- package/types/clipboard.d.ts +1 -1
- package/types/components/App.d.ts +3 -1
- package/types/components/Avatar.d.ts +3 -2
- package/types/components/LibraryMenuItems.d.ts +2 -1
- package/types/data/library.d.ts +37 -49
- package/types/element/Hyperlink.d.ts +7 -1
- package/types/element/linearElementEditor.d.ts +7 -1
- package/types/packages/excalidraw/index.d.ts +3 -2
- package/types/packages/utils.d.ts +7 -1
- package/types/types.d.ts +16 -1
- package/types/utils.d.ts +10 -1
package/types/types.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare type Collaborator = {
|
|
|
29
29
|
background: string;
|
|
30
30
|
stroke: string;
|
|
31
31
|
};
|
|
32
|
+
src?: string;
|
|
32
33
|
};
|
|
33
34
|
export declare type DataURL = string & {
|
|
34
35
|
_brand: "DataURL";
|
|
@@ -41,6 +42,13 @@ export declare type BinaryFileData = {
|
|
|
41
42
|
};
|
|
42
43
|
export declare type BinaryFileMetadata = Omit<BinaryFileData, "dataURL">;
|
|
43
44
|
export declare type BinaryFiles = Record<ExcalidrawElement["id"], BinaryFileData>;
|
|
45
|
+
export declare type LastActiveToolBeforeEraser = {
|
|
46
|
+
type: typeof SHAPES[number]["value"] | "eraser";
|
|
47
|
+
customType: null;
|
|
48
|
+
} | {
|
|
49
|
+
type: "custom";
|
|
50
|
+
customType: string;
|
|
51
|
+
} | null;
|
|
44
52
|
export declare type AppState = {
|
|
45
53
|
isLoading: boolean;
|
|
46
54
|
errorMessage: string | null;
|
|
@@ -55,7 +63,13 @@ export declare type AppState = {
|
|
|
55
63
|
editingLinearElement: LinearElementEditor | null;
|
|
56
64
|
activeTool: {
|
|
57
65
|
type: typeof SHAPES[number]["value"] | "eraser";
|
|
58
|
-
lastActiveToolBeforeEraser:
|
|
66
|
+
lastActiveToolBeforeEraser: LastActiveToolBeforeEraser;
|
|
67
|
+
locked: boolean;
|
|
68
|
+
customType: null;
|
|
69
|
+
} | {
|
|
70
|
+
type: "custom";
|
|
71
|
+
customType: string;
|
|
72
|
+
lastActiveToolBeforeEraser: LastActiveToolBeforeEraser;
|
|
59
73
|
locked: boolean;
|
|
60
74
|
};
|
|
61
75
|
penMode: boolean;
|
|
@@ -363,6 +377,7 @@ export declare type ExcalidrawImperativeAPI = {
|
|
|
363
377
|
sendToBack: (elements: readonly ExcalidrawElement[]) => void;
|
|
364
378
|
bringToFront: (elements: readonly ExcalidrawElement[]) => void;
|
|
365
379
|
restore: InstanceType<typeof App>["restore"];
|
|
380
|
+
setMobileModeAllowed: (allow: boolean) => void;
|
|
366
381
|
};
|
|
367
382
|
export declare type DeviceType = {
|
|
368
383
|
isMobile: boolean;
|
package/types/utils.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EVENT } from "./constants";
|
|
2
2
|
import { FontFamilyValues, FontString } from "./element/types";
|
|
3
|
-
import { AppState, Zoom } from "./types";
|
|
3
|
+
import { AppState, LastActiveToolBeforeEraser, Zoom } from "./types";
|
|
4
|
+
import { SHAPES } from "./shapes";
|
|
4
5
|
export declare const setDateTimeForTests: (dateTime: string) => void;
|
|
5
6
|
export declare const getDateTime: () => string;
|
|
6
7
|
export declare const capitalizeString: (str: string) => string;
|
|
@@ -29,6 +30,14 @@ export declare const chunk: <T extends unknown>(array: readonly T[], size: numbe
|
|
|
29
30
|
export declare const selectNode: (node: Element) => void;
|
|
30
31
|
export declare const removeSelection: () => void;
|
|
31
32
|
export declare const distance: (x: number, y: number) => number;
|
|
33
|
+
export declare const updateActiveTool: (appState: Pick<AppState, "activeTool">, data: ({
|
|
34
|
+
type: typeof SHAPES[number]["value"] | "eraser";
|
|
35
|
+
} | {
|
|
36
|
+
type: "custom";
|
|
37
|
+
customType: string;
|
|
38
|
+
}) & {
|
|
39
|
+
lastActiveToolBeforeEraser?: LastActiveToolBeforeEraser;
|
|
40
|
+
}) => AppState["activeTool"];
|
|
32
41
|
export declare const resetCursor: (canvas: HTMLCanvasElement | null) => void;
|
|
33
42
|
export declare const setCursor: (canvas: HTMLCanvasElement | null, cursor: string) => void;
|
|
34
43
|
export declare const setEraserCursor: (canvas: HTMLCanvasElement | null, theme: AppState["theme"]) => void;
|