@excalidraw/excalidraw 0.13.0-36bf17c → 0.13.0-4d26993
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/CHANGELOG.md +1 -0
- package/README.md +12 -2
- package/dist/excalidraw-assets/{vendor-03e611bf80e4dd79b9dd.js → vendor-53d1c69ef585b6dd219b.js} +2 -2
- package/dist/excalidraw-assets/{vendor-03e611bf80e4dd79b9dd.js.LICENSE.txt → vendor-53d1c69ef585b6dd219b.js.LICENSE.txt} +0 -0
- package/dist/excalidraw.development.js +13 -13
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +2 -0
- package/package.json +1 -1
- package/types/constants.d.ts +1 -0
- package/types/data/restore.d.ts +1 -1
- package/types/element/index.d.ts +1 -1
- package/types/element/newElement.d.ts +8 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-03e611bf80e4dd79b9dd.d.ts → vendor-53d1c69ef585b6dd219b.d.ts} +0 -0
package/package.json
CHANGED
package/types/constants.d.ts
CHANGED
|
@@ -102,6 +102,7 @@ export declare const TITLE_TIMEOUT = 10000;
|
|
|
102
102
|
export declare const VERSION_TIMEOUT = 30000;
|
|
103
103
|
export declare const SCROLL_TIMEOUT = 100;
|
|
104
104
|
export declare const ZOOM_STEP = 0.1;
|
|
105
|
+
export declare const MIN_ZOOM = 0.1;
|
|
105
106
|
export declare const HYPERLINK_TOOLTIP_DELAY = 300;
|
|
106
107
|
export declare const IDLE_THRESHOLD = 60000;
|
|
107
108
|
export declare const ACTIVE_THRESHOLD = 3000;
|
package/types/data/restore.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare type RestoredDataState = {
|
|
|
8
8
|
appState: RestoredAppState;
|
|
9
9
|
files: BinaryFiles;
|
|
10
10
|
};
|
|
11
|
-
export declare const restoreElements: (elements: ImportedDataState["elements"], localElements: readonly ExcalidrawElement[] | null | undefined) => ExcalidrawElement[];
|
|
11
|
+
export declare const restoreElements: (elements: ImportedDataState["elements"], localElements: readonly ExcalidrawElement[] | null | undefined, refreshDimensions?: boolean) => ExcalidrawElement[];
|
|
12
12
|
export declare const restoreAppState: (appState: ImportedDataState["appState"], localAppState: Partial<AppState> | null | undefined) => RestoredAppState;
|
|
13
13
|
export declare const restore: (data: Pick<ImportedDataState, "appState" | "elements" | "files"> | null, localAppState: Partial<AppState> | null | undefined, localElements: readonly ExcalidrawElement[] | null | undefined) => RestoredDataState;
|
|
14
14
|
export declare const restoreLibraryItems: (libraryItems: ImportedDataState["libraryItems"], defaultStatus: LibraryItem["status"]) => LibraryItem[];
|
package/types/element/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeleted } from "./types";
|
|
2
|
-
export { newElement, newTextElement, updateTextElement, newLinearElement, newImageElement, duplicateElement, } from "./newElement";
|
|
2
|
+
export { newElement, newTextElement, updateTextElement, refreshTextDimensions, newLinearElement, newImageElement, duplicateElement, } from "./newElement";
|
|
3
3
|
export { getElementAbsoluteCoords, getElementBounds, getCommonBounds, getDiamondPoints, getArrowheadPoints, getClosestElementBounds, } from "./bounds";
|
|
4
4
|
export { OMIT_SIDES_FOR_MULTIPLE_ELEMENTS, getTransformHandlesFromCoords, getTransformHandles, } from "./transformHandles";
|
|
5
5
|
export { hitTest, isHittingElementBoundingBoxWithoutHittingElement, } from "./collision";
|
|
@@ -12,6 +12,14 @@ export declare const newTextElement: (opts: {
|
|
|
12
12
|
verticalAlign: VerticalAlign;
|
|
13
13
|
containerId?: ExcalidrawRectangleElement["id"];
|
|
14
14
|
} & ElementConstructorOpts) => NonDeleted<ExcalidrawTextElement>;
|
|
15
|
+
export declare const refreshTextDimensions: (textElement: ExcalidrawTextElement, text?: string) => {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
width: number;
|
|
19
|
+
height: number;
|
|
20
|
+
baseline: number;
|
|
21
|
+
text: string;
|
|
22
|
+
};
|
|
15
23
|
export declare const getMaxContainerWidth: (container: ExcalidrawElement) => number;
|
|
16
24
|
export declare const getMaxContainerHeight: (container: ExcalidrawElement) => number;
|
|
17
25
|
export declare const updateTextElement: (textElement: ExcalidrawTextElement, { text, isDeleted, originalText, }: {
|