@zsviczian/excalidraw 0.10.0-obsidian-43 → 0.10.0-obsidian-47
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 +65 -65
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +9 -7
- package/types/actions/actionAddToLibrary.d.ts +3 -0
- package/types/actions/actionCanvas.d.ts +9 -1
- package/types/actions/actionClipboard.d.ts +5 -0
- package/types/actions/actionDeleteSelected.d.ts +3 -0
- package/types/actions/actionExport.d.ts +9 -0
- package/types/actions/actionFinalize.d.ts +3 -1
- package/types/actions/actionMenu.d.ts +3 -0
- package/types/actions/actionProperties.d.ts +12 -0
- package/types/actions/actionStyles.d.ts +1 -0
- package/types/actions/actionToggleGridMode.d.ts +1 -0
- package/types/actions/actionToggleStats.d.ts +1 -0
- package/types/actions/actionToggleViewMode.d.ts +1 -0
- package/types/actions/actionToggleZenMode.d.ts +1 -0
- package/types/components/App.d.ts +1 -2
- package/types/components/ButtonIconSelect.d.ts +1 -0
- package/types/constants.d.ts +6 -5
- package/types/element/Hyperlink.d.ts +2 -1
- package/types/element/linearElementEditor.d.ts +1 -0
- package/types/keys.d.ts +1 -0
- package/types/renderer/renderElement.d.ts +11 -1
- package/types/types.d.ts +7 -3
- package/types/utils.d.ts +18 -0
package/types/utils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EVENT } from "./constants";
|
|
1
2
|
import { FontFamilyValues, FontString } from "./element/types";
|
|
2
3
|
import { Zoom } from "./types";
|
|
3
4
|
export declare const setDateTimeForTests: (dateTime: string) => void;
|
|
@@ -19,6 +20,11 @@ export declare const debounce: <T extends any[]>(fn: (...args: T) => void, timeo
|
|
|
19
20
|
flush(): void;
|
|
20
21
|
cancel(): void;
|
|
21
22
|
};
|
|
23
|
+
export declare const throttleRAF: <T extends any[]>(fn: (...args: T) => void) => {
|
|
24
|
+
(...args: T): void;
|
|
25
|
+
flush(): void;
|
|
26
|
+
cancel(): void;
|
|
27
|
+
};
|
|
22
28
|
export declare const chunk: <T extends unknown>(array: readonly T[], size: number) => T[][];
|
|
23
29
|
export declare const selectNode: (node: Element) => void;
|
|
24
30
|
export declare const removeSelection: () => void;
|
|
@@ -82,6 +88,15 @@ export declare const resolvablePromise: <T>() => ResolvablePromise<T>;
|
|
|
82
88
|
* @param func handler taking at most single parameter (event).
|
|
83
89
|
*/
|
|
84
90
|
export declare const withBatchedUpdates: <TFunction extends ((event: any) => void) | (() => void)>(func: Parameters<TFunction>["length"] extends 0 | 1 ? TFunction : never) => TFunction;
|
|
91
|
+
/**
|
|
92
|
+
* barches React state updates and throttles the calls to a single call per
|
|
93
|
+
* animation frame
|
|
94
|
+
*/
|
|
95
|
+
export declare const withBatchedUpdatesThrottled: <TFunction extends ((event: any) => void) | (() => void)>(func: Parameters<TFunction>["length"] extends 0 | 1 ? TFunction : never) => {
|
|
96
|
+
(...args: Parameters<TFunction>): void;
|
|
97
|
+
flush(): void;
|
|
98
|
+
cancel(): void;
|
|
99
|
+
};
|
|
85
100
|
export declare const nFormatter: (num: number, digits: number) => string;
|
|
86
101
|
export declare const getVersion: () => string;
|
|
87
102
|
export declare const supportsEmoji: () => boolean;
|
|
@@ -98,3 +113,6 @@ export declare const arrayToMap: <T extends string | {
|
|
|
98
113
|
id: string;
|
|
99
114
|
}>(items: readonly T[]) => Map<string, T>;
|
|
100
115
|
export declare const isTestEnv: () => boolean;
|
|
116
|
+
export declare const wrapEvent: <T extends Event>(name: EVENT, nativeEvent: T) => CustomEvent<{
|
|
117
|
+
nativeEvent: T;
|
|
118
|
+
}>;
|