@zsviczian/excalidraw 0.11.0-obsidian-5 → 0.11.0-obsidian-8
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 +21 -21
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +2 -2
- package/types/components/Actions.d.ts +2 -1
- package/types/components/App.d.ts +3 -3
- package/types/packages/excalidraw/index.d.ts +5 -1
- package/types/packages/utils.d.ts +1 -0
- package/types/types.d.ts +4 -0
- package/types/utils.d.ts +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zsviczian/excalidraw",
|
|
3
|
-
"version": "0.11.0-obsidian-
|
|
3
|
+
"version": "0.11.0-obsidian-8",
|
|
4
4
|
"main": "main.js",
|
|
5
5
|
"types": "types/packages/excalidraw/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"babel-loader": "8.2.3",
|
|
57
57
|
"babel-plugin-transform-class-properties": "6.24.1",
|
|
58
58
|
"cross-env": "7.0.3",
|
|
59
|
-
"css-loader": "6.
|
|
59
|
+
"css-loader": "6.7.1",
|
|
60
60
|
"mini-css-extract-plugin": "2.4.6",
|
|
61
61
|
"postcss-loader": "6.2.1",
|
|
62
62
|
"sass-loader": "12.4.0",
|
|
@@ -8,13 +8,14 @@ export declare const SelectedShapeActions: ({ appState, elements, renderAction,
|
|
|
8
8
|
renderAction: ActionManager["renderAction"];
|
|
9
9
|
elementType: AppState["elementType"];
|
|
10
10
|
}) => JSX.Element;
|
|
11
|
-
export declare const ShapesSwitcher: ({ canvas, elementType, setAppState, onImageAction, }: {
|
|
11
|
+
export declare const ShapesSwitcher: ({ canvas, elementType, setAppState, onImageAction, appState, }: {
|
|
12
12
|
canvas: HTMLCanvasElement | null;
|
|
13
13
|
elementType: AppState["elementType"];
|
|
14
14
|
setAppState: React.Component<any, AppState>["setState"];
|
|
15
15
|
onImageAction: (data: {
|
|
16
16
|
pointerType: PointerType | null;
|
|
17
17
|
}) => void;
|
|
18
|
+
appState: AppState;
|
|
18
19
|
}) => JSX.Element;
|
|
19
20
|
export declare const ZoomActions: ({ renderAction, zoom, }: {
|
|
20
21
|
renderAction: ActionManager["renderAction"];
|
|
@@ -4,10 +4,10 @@ import { ActionManager } from "../actions/manager";
|
|
|
4
4
|
import { RestoredDataState } from "../data/restore";
|
|
5
5
|
import { ExcalidrawElement, NonDeletedExcalidrawElement } from "../element/types";
|
|
6
6
|
import History from "../history";
|
|
7
|
-
import { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData } from "../types";
|
|
7
|
+
import { AppClassProperties, AppProps, AppState, ExcalidrawImperativeAPI, BinaryFiles, LibraryItems, SceneData, DeviceType } from "../types";
|
|
8
8
|
import { ImportedDataState } from "../data/types";
|
|
9
9
|
export declare let showFourthFont: boolean;
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const useDeviceType: () => DeviceType;
|
|
11
11
|
export declare const useExcalidrawContainer: () => {
|
|
12
12
|
container: HTMLDivElement | null;
|
|
13
13
|
id: string | null;
|
|
@@ -17,7 +17,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
17
17
|
rc: RoughCanvas | null;
|
|
18
18
|
unmounted: boolean;
|
|
19
19
|
actionManager: ActionManager;
|
|
20
|
-
|
|
20
|
+
deviceType: DeviceType;
|
|
21
21
|
detachIsMobileMqHandler?: () => void;
|
|
22
22
|
private excalidrawContainerRef;
|
|
23
23
|
static defaultProps: Partial<AppProps>;
|
|
@@ -9,7 +9,11 @@ export default _default;
|
|
|
9
9
|
export { getSceneVersion, isInvisiblySmallElement, getNonDeletedElements, } from "../../element";
|
|
10
10
|
export { defaultLang, languages } from "../../i18n";
|
|
11
11
|
export { restore, restoreAppState, restoreElements } from "../../data/restore";
|
|
12
|
-
export { exportToCanvas, exportToBlob, exportToSvg, serializeAsJSON, loadLibraryFromBlob, loadFromBlob, getFreeDrawSvgPath, getCommonBoundingBox,
|
|
12
|
+
export { exportToCanvas, exportToBlob, exportToSvg, serializeAsJSON, loadLibraryFromBlob, loadFromBlob, getFreeDrawSvgPath, getCommonBoundingBox, //zsviczian
|
|
13
|
+
getMaximumGroups, //zsviczian
|
|
14
|
+
intersectElementWithLine, //zsviczian
|
|
15
|
+
determineFocusDistance, //zsviczian
|
|
16
|
+
measureText, } from "../../packages/utils";
|
|
13
17
|
export { isLinearElement } from "../../element/typeChecks";
|
|
14
18
|
export { FONT_FAMILY, THEME } from "../../constants";
|
|
15
19
|
export { mutateElement, newElementWith, bumpVersion, } from "../../element/mutateElement";
|
|
@@ -26,3 +26,4 @@ export { getCommonBoundingBox } from "../element/bounds";
|
|
|
26
26
|
export { getMaximumGroups } from "../groups";
|
|
27
27
|
export { intersectElementWithLine } from "../element/collision";
|
|
28
28
|
export { determineFocusDistance } from "../element/collision";
|
|
29
|
+
export { measureText } from "../element/textElement";
|
package/types/types.d.ts
CHANGED
|
@@ -354,4 +354,8 @@ export declare type ExcalidrawImperativeAPI = {
|
|
|
354
354
|
bringToFront: (elements: readonly ExcalidrawElement[]) => void;
|
|
355
355
|
restore: InstanceType<typeof App>["restore"];
|
|
356
356
|
};
|
|
357
|
+
export declare type DeviceType = {
|
|
358
|
+
isMobile: boolean;
|
|
359
|
+
isTouchScreen: boolean;
|
|
360
|
+
};
|
|
357
361
|
export {};
|
package/types/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EVENT } from "./constants";
|
|
2
2
|
import { FontFamilyValues, FontString } from "./element/types";
|
|
3
|
-
import { Zoom } from "./types";
|
|
3
|
+
import { AppState, Zoom } from "./types";
|
|
4
4
|
export declare const setDateTimeForTests: (dateTime: string) => void;
|
|
5
5
|
export declare const getDateTime: () => string;
|
|
6
6
|
export declare const capitalizeString: (str: string) => string;
|
|
@@ -31,7 +31,8 @@ export declare const removeSelection: () => void;
|
|
|
31
31
|
export declare const distance: (x: number, y: number) => number;
|
|
32
32
|
export declare const resetCursor: (canvas: HTMLCanvasElement | null) => void;
|
|
33
33
|
export declare const setCursor: (canvas: HTMLCanvasElement | null, cursor: string) => void;
|
|
34
|
-
export declare const
|
|
34
|
+
export declare const setEraserCursor: (canvas: HTMLCanvasElement | null, theme: AppState["theme"]) => void;
|
|
35
|
+
export declare const setCursorForShape: (canvas: HTMLCanvasElement | null, appState: AppState) => void;
|
|
35
36
|
export declare const isFullScreen: () => boolean;
|
|
36
37
|
export declare const allowFullScreen: () => Promise<void>;
|
|
37
38
|
export declare const exitFullScreen: () => Promise<void>;
|
|
@@ -116,3 +117,4 @@ export declare const isTestEnv: () => boolean;
|
|
|
116
117
|
export declare const wrapEvent: <T extends Event>(name: EVENT, nativeEvent: T) => CustomEvent<{
|
|
117
118
|
nativeEvent: T;
|
|
118
119
|
}>;
|
|
120
|
+
export declare const updateObject: <T extends Record<string, any>>(obj: T, updates: Partial<T>) => T;
|