@zsviczian/excalidraw 0.14.2-obsidian-3 → 0.14.2-obsidian-5
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 +37 -37
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +3 -0
- package/types/actions/actionBoundText.d.ts +129 -9
- package/types/actions/actionCanvas.d.ts +10 -0
- 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 +2 -0
- package/types/actions/actionLinearEditor.d.ts +1 -0
- package/types/actions/actionMenu.d.ts +3 -0
- package/types/actions/actionProperties.d.ts +14 -1
- package/types/actions/actionStyles.d.ts +1 -0
- package/types/actions/actionToggleGridMode.d.ts +1 -0
- package/types/actions/actionToggleLock.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/ButtonIconSelect.d.ts +11 -3
- package/types/components/Modal.d.ts +1 -0
- package/types/components/icons.d.ts +1 -0
- package/types/element/Hyperlink.d.ts +1 -0
- package/types/element/linearElementEditor.d.ts +1 -0
- package/types/element/newElement.d.ts +2 -1
- package/types/element/textElement.d.ts +6 -0
- package/types/element/types.d.ts +2 -1
- package/types/packages/common.webpack.dev.config.d.ts +1 -0
- package/types/packages/common.webpack.prod.config.d.ts +1 -0
- package/types/packages/excalidraw/webpack.dev.config.d.ts +1 -0
- package/types/packages/excalidraw/webpack.prod.config.d.ts +1 -0
- package/types/renderer/renderElement.d.ts +2 -2
- package/types/types.d.ts +1 -0
- package/types/utils.d.ts +0 -1
|
@@ -131,6 +131,7 @@ export declare const actionLink: {
|
|
|
131
131
|
currentStrokeOptions?: any;
|
|
132
132
|
resetCustomPen?: any;
|
|
133
133
|
gridColor: string;
|
|
134
|
+
dynamicStyle: string;
|
|
134
135
|
selectedLinearElement: import("./linearElementEditor").LinearElementEditor | null;
|
|
135
136
|
};
|
|
136
137
|
commitToHistory: true;
|
|
@@ -20,8 +20,9 @@ export declare const refreshTextDimensions: (textElement: ExcalidrawTextElement,
|
|
|
20
20
|
y: number;
|
|
21
21
|
width: number;
|
|
22
22
|
height: number;
|
|
23
|
+
baseline: number;
|
|
23
24
|
text: string;
|
|
24
|
-
};
|
|
25
|
+
} | undefined;
|
|
25
26
|
export declare const updateTextElement: (textElement: ExcalidrawTextElement, { text, isDeleted, originalText, rawText, link, }: {
|
|
26
27
|
text: string;
|
|
27
28
|
isDeleted?: boolean | undefined;
|
|
@@ -7,10 +7,16 @@ export declare const splitIntoLines: (text: string) => string[];
|
|
|
7
7
|
export declare const redrawTextBoundingBox: (textElement: ExcalidrawTextElement, container: ExcalidrawElement | null) => void;
|
|
8
8
|
export declare const bindTextToShapeAfterDuplication: (sceneElements: ExcalidrawElement[], oldElements: ExcalidrawElement[], oldIdToDuplicatedId: Map<ExcalidrawElement["id"], ExcalidrawElement["id"]>) => void;
|
|
9
9
|
export declare const handleBindTextResize: (container: NonDeletedExcalidrawElement, transformHandleType: MaybeTransformHandleType) => void;
|
|
10
|
+
export declare const computeBoundTextPosition: (container: ExcalidrawElement, boundTextElement: ExcalidrawTextElementWithContainer) => {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
};
|
|
10
14
|
export declare const measureText: (text: string, font: FontString, lineHeight: ExcalidrawTextElement["lineHeight"]) => {
|
|
11
15
|
width: number;
|
|
12
16
|
height: number;
|
|
17
|
+
baseline: number;
|
|
13
18
|
};
|
|
19
|
+
export declare const measureBaseline: (text: string, font: FontString, lineHeight: ExcalidrawTextElement["lineHeight"], wrapInContainer?: boolean) => number;
|
|
14
20
|
/**
|
|
15
21
|
* To get unitless line-height (if unknown) we can calculate it by dividing
|
|
16
22
|
* height-per-line by fontSize.
|
package/types/element/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Point } from "../types";
|
|
|
2
2
|
import { FONT_FAMILY, ROUNDNESS, TEXT_ALIGN, THEME, VERTICAL_ALIGN } from "../constants";
|
|
3
3
|
import { MarkNonNullable, ValueOf } from "../utility-types";
|
|
4
4
|
export declare type ChartType = "bar" | "line";
|
|
5
|
-
export declare type FillStyle = "hachure" | "cross-hatch" | "solid";
|
|
5
|
+
export declare type FillStyle = "hachure" | "cross-hatch" | "solid" | "zigzag";
|
|
6
6
|
export declare type FontFamilyKeys = keyof typeof FONT_FAMILY;
|
|
7
7
|
export declare type FontFamilyValues = typeof FONT_FAMILY[FontFamilyKeys];
|
|
8
8
|
export declare type Theme = typeof THEME[keyof typeof THEME];
|
|
@@ -101,6 +101,7 @@ export declare type ExcalidrawTextElement = _ExcalidrawElementBase & Readonly<{
|
|
|
101
101
|
fontFamily: FontFamilyValues;
|
|
102
102
|
text: string;
|
|
103
103
|
rawText: string;
|
|
104
|
+
baseline: number;
|
|
104
105
|
textAlign: TextAlign;
|
|
105
106
|
verticalAlign: VerticalAlign;
|
|
106
107
|
containerId: ExcalidrawGenericElement["id"] | null;
|
|
@@ -3,12 +3,12 @@ import { RoughCanvas } from "roughjs/bin/canvas";
|
|
|
3
3
|
import { Drawable, Options } from "roughjs/bin/core";
|
|
4
4
|
import { RoughSVG } from "roughjs/bin/svg";
|
|
5
5
|
import { RenderConfig } from "../scene/types";
|
|
6
|
-
import { AppState, BinaryFiles
|
|
6
|
+
import { AppState, BinaryFiles } from "../types";
|
|
7
7
|
export interface ExcalidrawElementWithCanvas {
|
|
8
8
|
element: ExcalidrawElement | ExcalidrawTextElement;
|
|
9
9
|
canvas: HTMLCanvasElement;
|
|
10
10
|
theme: RenderConfig["theme"];
|
|
11
|
-
|
|
11
|
+
scale: number;
|
|
12
12
|
canvasOffsetX: number;
|
|
13
13
|
canvasOffsetY: number;
|
|
14
14
|
boundTextElementVersion: number | null;
|
package/types/types.d.ts
CHANGED
|
@@ -185,6 +185,7 @@ export declare type AppState = {
|
|
|
185
185
|
currentStrokeOptions?: any;
|
|
186
186
|
resetCustomPen?: any;
|
|
187
187
|
gridColor: string;
|
|
188
|
+
dynamicStyle: string;
|
|
188
189
|
selectedLinearElement: LinearElementEditor | null;
|
|
189
190
|
};
|
|
190
191
|
export declare type NormalizedZoomValue = number & {
|
package/types/utils.d.ts
CHANGED
|
@@ -148,7 +148,6 @@ export declare const arrayToMapWithIndex: <T extends {
|
|
|
148
148
|
id: string;
|
|
149
149
|
}>(elements: readonly T[]) => Map<string, [element: T, index: number]>;
|
|
150
150
|
export declare const isTestEnv: () => boolean;
|
|
151
|
-
export declare const isProdEnv: () => boolean;
|
|
152
151
|
export declare const wrapEvent: <T extends Event>(name: EVENT, nativeEvent: T) => CustomEvent<{
|
|
153
152
|
nativeEvent: T;
|
|
154
153
|
}>;
|