@excalidraw/excalidraw 0.14.2-04a8c22 → 0.14.2-0e95e2b
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/package.json
CHANGED
package/types/constants.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export declare const isDarwin: boolean;
|
|
|
4
4
|
export declare const isWindows: boolean;
|
|
5
5
|
export declare const isAndroid: boolean;
|
|
6
6
|
export declare const isFirefox: boolean;
|
|
7
|
+
export declare const isChrome: boolean;
|
|
8
|
+
export declare const isSafari: boolean;
|
|
7
9
|
export declare const APP_NAME = "Excalidraw";
|
|
8
10
|
export declare const DRAGGING_THRESHOLD = 10;
|
|
9
11
|
export declare const LINE_CONFIRM_THRESHOLD = 8;
|
|
@@ -17,7 +17,6 @@ export declare const refreshTextDimensions: (textElement: ExcalidrawTextElement,
|
|
|
17
17
|
y: number;
|
|
18
18
|
width: number;
|
|
19
19
|
height: number;
|
|
20
|
-
baseline: number;
|
|
21
20
|
text: string;
|
|
22
21
|
};
|
|
23
22
|
export declare const updateTextElement: (textElement: ExcalidrawTextElement, { text, isDeleted, originalText, }: {
|
|
@@ -5,19 +5,13 @@ export declare const normalizeText: (text: string) => string;
|
|
|
5
5
|
export declare const redrawTextBoundingBox: (textElement: ExcalidrawTextElement, container: ExcalidrawElement | null) => void;
|
|
6
6
|
export declare const bindTextToShapeAfterDuplication: (sceneElements: ExcalidrawElement[], oldElements: ExcalidrawElement[], oldIdToDuplicatedId: Map<ExcalidrawElement["id"], ExcalidrawElement["id"]>) => void;
|
|
7
7
|
export declare const handleBindTextResize: (container: NonDeletedExcalidrawElement, transformHandleType: MaybeTransformHandleType) => void;
|
|
8
|
-
export declare const measureText: (text: string, font: FontString
|
|
8
|
+
export declare const measureText: (text: string, font: FontString) => {
|
|
9
9
|
width: number;
|
|
10
10
|
height: number;
|
|
11
|
-
baseline: number;
|
|
12
|
-
container: HTMLDivElement;
|
|
13
|
-
} | {
|
|
14
|
-
width: number;
|
|
15
|
-
height: number;
|
|
16
|
-
baseline: number;
|
|
17
|
-
container?: undefined;
|
|
18
11
|
};
|
|
19
12
|
export declare const getApproxLineHeight: (font: FontString) => number;
|
|
20
13
|
export declare const getTextWidth: (text: string, font: FontString) => number;
|
|
14
|
+
export declare const getTextHeight: (text: string, font: FontString) => number;
|
|
21
15
|
export declare const wrapText: (text: string, font: FontString, maxWidth: number) => string;
|
|
22
16
|
export declare const charWidth: {
|
|
23
17
|
calculate: (char: string, font: FontString) => number;
|
package/types/element/types.d.ts
CHANGED
|
@@ -99,7 +99,6 @@ export declare type ExcalidrawTextElement = _ExcalidrawElementBase & Readonly<{
|
|
|
99
99
|
fontSize: number;
|
|
100
100
|
fontFamily: FontFamilyValues;
|
|
101
101
|
text: string;
|
|
102
|
-
baseline: number;
|
|
103
102
|
textAlign: TextAlign;
|
|
104
103
|
verticalAlign: VerticalAlign;
|
|
105
104
|
containerId: ExcalidrawGenericElement["id"] | null;
|