@zsviczian/excalidraw 0.17.1-obsidian-40 → 0.17.1-obsidian-41
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 +63 -30
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/styles.development.css +2 -1
- package/dist/styles.production.css +1 -1
- package/package.json +1 -1
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +12 -9
- package/types/excalidraw/actions/actionBoundText.d.ts +8 -6
- package/types/excalidraw/actions/actionCanvas.d.ts +56 -42
- package/types/excalidraw/actions/actionClipboard.d.ts +28 -21
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +12 -9
- package/types/excalidraw/actions/actionElementLock.d.ts +8 -6
- package/types/excalidraw/actions/actionExport.d.ts +36 -27
- package/types/excalidraw/actions/actionFinalize.d.ts +8 -6
- package/types/excalidraw/actions/actionFrame.d.ts +16 -12
- package/types/excalidraw/actions/actionGroup.d.ts +8 -6
- package/types/excalidraw/actions/actionLinearEditor.d.ts +4 -3
- package/types/excalidraw/actions/actionLink.d.ts +4 -3
- package/types/excalidraw/actions/actionMenu.d.ts +12 -9
- package/types/excalidraw/actions/actionNavigate.d.ts +8 -6
- package/types/excalidraw/actions/actionProperties.d.ts +60 -45
- package/types/excalidraw/actions/actionSelectAll.d.ts +4 -3
- package/types/excalidraw/actions/actionStyles.d.ts +4 -3
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +4 -3
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +4 -3
- package/types/excalidraw/actions/actionToggleStats.d.ts +4 -3
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +4 -3
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +4 -3
- package/types/excalidraw/appState.d.ts +9 -3
- package/types/excalidraw/components/App.d.ts +7 -1
- package/types/excalidraw/components/Stats/CanvasGrid.d.ts +10 -0
- package/types/excalidraw/components/Stats/CanvasGridSize.d.ts +10 -0
- package/types/excalidraw/components/Stats/DragInput.d.ts +4 -1
- package/types/excalidraw/components/Stats/index.d.ts +4 -4
- package/types/excalidraw/components/Stats/utils.d.ts +1 -1
- package/types/excalidraw/constants.d.ts +2 -1
- package/types/excalidraw/element/dragElements.d.ts +2 -2
- package/types/excalidraw/element/embeddable.d.ts +4 -3
- package/types/excalidraw/element/linearElementEditor.d.ts +11 -10
- package/types/excalidraw/index.d.ts +1 -1
- package/types/excalidraw/math.d.ts +3 -2
- package/types/excalidraw/obsidianUtils.d.ts +1 -1
- package/types/excalidraw/scene/index.d.ts +1 -1
- package/types/excalidraw/scene/normalize.d.ts +4 -0
- package/types/excalidraw/scene/zoom.d.ts +0 -1
- package/types/excalidraw/snapping.d.ts +8 -7
- package/types/excalidraw/types.d.ts +13 -5
- package/types/utils/export.d.ts +1 -1
|
@@ -116,8 +116,9 @@ export declare const actionSetEmbeddableAsActiveTool: {
|
|
|
116
116
|
} | null;
|
|
117
117
|
zenModeEnabled: boolean;
|
|
118
118
|
theme: import("./types").Theme;
|
|
119
|
-
gridSize: number
|
|
120
|
-
|
|
119
|
+
gridSize: number;
|
|
120
|
+
gridStep: number;
|
|
121
|
+
gridModeEnabled: boolean;
|
|
121
122
|
viewModeEnabled: boolean;
|
|
122
123
|
selectedGroupIds: {
|
|
123
124
|
[groupId: string]: boolean;
|
|
@@ -183,8 +184,8 @@ export declare const actionSetEmbeddableAsActiveTool: {
|
|
|
183
184
|
gridColor: {
|
|
184
185
|
Bold: string;
|
|
185
186
|
Regular: string;
|
|
186
|
-
MajorGridFrequency?: number | undefined;
|
|
187
187
|
};
|
|
188
|
+
highlightSearchResult: boolean;
|
|
188
189
|
dynamicStyle: {
|
|
189
190
|
[x: string]: string;
|
|
190
191
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NonDeleted, ExcalidrawLinearElement, ExcalidrawElement, PointBinding, ExcalidrawBindableElement, ExcalidrawTextElementWithContainer, ElementsMap, NonDeletedSceneElementsMap, OrderedExcalidrawElement, SceneElementsMap } from "./types";
|
|
2
2
|
import type { Bounds } from "./bounds";
|
|
3
|
-
import type { Point, AppState, PointerCoords, InteractiveCanvasAppState } from "../types";
|
|
3
|
+
import type { Point, AppState, PointerCoords, InteractiveCanvasAppState, AppClassProperties, NullableGridSize } from "../types";
|
|
4
4
|
import type { Store } from "../store";
|
|
5
5
|
import type Scene from "../scene/Scene";
|
|
6
6
|
declare const editorMidPointsCache: {
|
|
@@ -49,7 +49,7 @@ export declare class LinearElementEditor {
|
|
|
49
49
|
static getElement(id: InstanceType<typeof LinearElementEditor>["elementId"], elementsMap: ElementsMap): NonDeleted<ExcalidrawLinearElement> | null;
|
|
50
50
|
static handleBoxSelection(event: PointerEvent, appState: AppState, setState: React.Component<any, AppState>["setState"], elementsMap: NonDeletedSceneElementsMap): false | undefined;
|
|
51
51
|
/** @returns whether point was dragged */
|
|
52
|
-
static handlePointDragging(event: PointerEvent,
|
|
52
|
+
static handlePointDragging(event: PointerEvent, app: AppClassProperties, scenePointerX: number, scenePointerY: number, maybeSuggestBinding: (element: NonDeleted<ExcalidrawLinearElement>, pointSceneCoords: {
|
|
53
53
|
x: number;
|
|
54
54
|
y: number;
|
|
55
55
|
}[]) => void, linearElementEditor: LinearElementEditor, scene: Scene): boolean;
|
|
@@ -63,7 +63,7 @@ export declare class LinearElementEditor {
|
|
|
63
63
|
static isSegmentTooShort(element: NonDeleted<ExcalidrawLinearElement>, startPoint: Point, endPoint: Point, zoom: AppState["zoom"]): boolean;
|
|
64
64
|
static getSegmentMidPoint(element: NonDeleted<ExcalidrawLinearElement>, startPoint: Point, endPoint: Point, endPointIndex: number, elementsMap: ElementsMap): readonly [number, number];
|
|
65
65
|
static getSegmentMidPointIndex(linearElementEditor: LinearElementEditor, appState: AppState, midPoint: Point, elementsMap: ElementsMap): number;
|
|
66
|
-
static handlePointerDown(event: React.PointerEvent<HTMLElement>,
|
|
66
|
+
static handlePointerDown(event: React.PointerEvent<HTMLElement>, app: AppClassProperties, store: Store, scenePointer: {
|
|
67
67
|
x: number;
|
|
68
68
|
y: number;
|
|
69
69
|
}, linearElementEditor: LinearElementEditor, scene: Scene): {
|
|
@@ -72,7 +72,7 @@ export declare class LinearElementEditor {
|
|
|
72
72
|
linearElementEditor: LinearElementEditor | null;
|
|
73
73
|
};
|
|
74
74
|
static arePointsEqual(point1: Point | null, point2: Point | null): boolean;
|
|
75
|
-
static handlePointerMove(event: React.PointerEvent<HTMLCanvasElement>, scenePointerX: number, scenePointerY: number,
|
|
75
|
+
static handlePointerMove(event: React.PointerEvent<HTMLCanvasElement>, scenePointerX: number, scenePointerY: number, app: AppClassProperties, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap): LinearElementEditor | null;
|
|
76
76
|
/** scene coords */
|
|
77
77
|
static getPointGlobalCoordinates(element: NonDeleted<ExcalidrawLinearElement>, point: Point, elementsMap: ElementsMap): readonly [number, number];
|
|
78
78
|
/** scene coords */
|
|
@@ -81,7 +81,7 @@ export declare class LinearElementEditor {
|
|
|
81
81
|
elementsMap: ElementsMap): Point;
|
|
82
82
|
static pointFromAbsoluteCoords(element: NonDeleted<ExcalidrawLinearElement>, absoluteCoords: Point, elementsMap: ElementsMap): Point;
|
|
83
83
|
static getPointIndexUnderCursor(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, zoom: AppState["zoom"], x: number, y: number): number;
|
|
84
|
-
static createPointAt(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, scenePointerX: number, scenePointerY: number, gridSize:
|
|
84
|
+
static createPointAt(element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, scenePointerX: number, scenePointerY: number, gridSize: NullableGridSize): Point;
|
|
85
85
|
/**
|
|
86
86
|
* Normalizes line points so that the start point is at [0,0]. This is
|
|
87
87
|
* expected in various parts of the codebase. Also returns new x/y to account
|
|
@@ -226,8 +226,9 @@ export declare class LinearElementEditor {
|
|
|
226
226
|
} | null;
|
|
227
227
|
zenModeEnabled: boolean;
|
|
228
228
|
theme: import("./types").Theme;
|
|
229
|
-
gridSize: number
|
|
230
|
-
|
|
229
|
+
gridSize: number;
|
|
230
|
+
gridStep: number;
|
|
231
|
+
gridModeEnabled: boolean;
|
|
231
232
|
viewModeEnabled: boolean;
|
|
232
233
|
selectedGroupIds: {
|
|
233
234
|
[groupId: string]: boolean;
|
|
@@ -253,7 +254,7 @@ export declare class LinearElementEditor {
|
|
|
253
254
|
avatarUrl?: string | undefined;
|
|
254
255
|
id?: string | undefined;
|
|
255
256
|
socketId?: import("../types").SocketId | undefined;
|
|
256
|
-
isCurrentUser?: boolean | undefined;
|
|
257
|
+
isCurrentUser?: boolean | undefined; /** whether you're dragging a point */
|
|
257
258
|
isInCall?: boolean | undefined;
|
|
258
259
|
isSpeaking?: boolean | undefined;
|
|
259
260
|
isMuted?: boolean | undefined;
|
|
@@ -293,8 +294,8 @@ export declare class LinearElementEditor {
|
|
|
293
294
|
gridColor: {
|
|
294
295
|
Bold: string;
|
|
295
296
|
Regular: string;
|
|
296
|
-
MajorGridFrequency?: number | undefined;
|
|
297
297
|
};
|
|
298
|
+
highlightSearchResult: boolean;
|
|
298
299
|
dynamicStyle: {
|
|
299
300
|
[x: string]: string;
|
|
300
301
|
};
|
|
@@ -331,7 +332,7 @@ export declare class LinearElementEditor {
|
|
|
331
332
|
isDragging?: boolean;
|
|
332
333
|
}): void;
|
|
333
334
|
static shouldAddMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, appState: AppState, elementsMap: ElementsMap): boolean;
|
|
334
|
-
static addMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords,
|
|
335
|
+
static addMidpoint(linearElementEditor: LinearElementEditor, pointerCoords: PointerCoords, app: AppClassProperties, snapToGrid: boolean, elementsMap: ElementsMap): {
|
|
335
336
|
pointerDownState: LinearElementEditor["pointerDownState"];
|
|
336
337
|
selectedPointsIndices: LinearElementEditor["selectedPointsIndices"];
|
|
337
338
|
} | undefined;
|
|
@@ -27,7 +27,7 @@ registerLocalFont, //zsviczian
|
|
|
27
27
|
getFontFamilies, //zsviczian
|
|
28
28
|
getFontFamilyString, //zsviczian
|
|
29
29
|
registerFontsInCSS, //zsviczian
|
|
30
|
-
|
|
30
|
+
getCSSFontDefinition, } from "../utils/export";
|
|
31
31
|
export { refreshTextDimensions } from "./element/newElement";
|
|
32
32
|
export { getContainerElement } from "./element/textElement";
|
|
33
33
|
export { serializeAsJSON, serializeLibraryAsJSON } from "./data/json";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Point, Zoom } from "./types";
|
|
1
|
+
import type { NullableGridSize, Point, Zoom } from "./types";
|
|
2
2
|
import type { ExcalidrawElement, ExcalidrawLinearElement, NonDeleted } from "./element/types";
|
|
3
3
|
import type { Bounds } from "./element/bounds";
|
|
4
4
|
export declare const rotate: (x: number, y: number, cx: number, cy: number, angle: number) => [number, number];
|
|
@@ -20,7 +20,7 @@ export declare const centerPoint: (a: readonly [number, number], b: readonly [nu
|
|
|
20
20
|
export declare const isPathALoop: (points: ExcalidrawLinearElement["points"], zoomValue?: Zoom["value"]) => boolean;
|
|
21
21
|
export declare const isPointInPolygon: (points: Point[], x: number, y: number) => boolean;
|
|
22
22
|
export declare const isPointWithinBounds: (p: readonly [number, number], q: readonly [number, number], r: readonly [number, number]) => boolean;
|
|
23
|
-
export declare const getGridPoint: (x: number, y: number, gridSize:
|
|
23
|
+
export declare const getGridPoint: (x: number, y: number, gridSize: NullableGridSize) => [number, number];
|
|
24
24
|
export declare const getCornerRadius: (x: number, element: ExcalidrawElement) => number;
|
|
25
25
|
export declare const getControlPointsForBezierCurve: (element: NonDeleted<ExcalidrawLinearElement>, endPoint: readonly [number, number]) => [number, number][] | null;
|
|
26
26
|
export declare const getBezierXY: (p0: readonly [number, number], p1: readonly [number, number], p2: readonly [number, number], p3: readonly [number, number], t: number) => number[];
|
|
@@ -75,4 +75,5 @@ export declare const getCenterForBounds: (bounds: Bounds) => readonly [number, n
|
|
|
75
75
|
export declare const getCenterForElement: (element: ExcalidrawElement) => readonly [number, number];
|
|
76
76
|
export declare const aabbsOverlapping: (a: Bounds, b: Bounds) => boolean;
|
|
77
77
|
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
78
|
+
export declare const round: (value: number, precision: number) => number;
|
|
78
79
|
export {};
|
|
@@ -14,4 +14,4 @@ export declare function registerLocalFont(fontMetrics: FontMetadata & {
|
|
|
14
14
|
}, uri: string): void;
|
|
15
15
|
export declare function getFontFamilies(): string[];
|
|
16
16
|
export declare function registerFontsInCSS(): Promise<void>;
|
|
17
|
-
export declare function
|
|
17
|
+
export declare function getCSSFontDefinition(fontFamily: number): Promise<string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { isSomeElementSelected, getElementsWithinSelection, getCommonAttributeOfSelectedElements, getSelectedElements, getTargetElements, } from "./selection";
|
|
2
2
|
export { calculateScrollCenter } from "./scroll";
|
|
3
3
|
export { hasBackground, hasStrokeWidth, hasStrokeStyle, canHaveArrowheads, canChangeRoundness, getElementAtPosition, getElementsAtPosition, } from "./comparisons";
|
|
4
|
-
export { getNormalizedZoom } from "./
|
|
4
|
+
export { getNormalizedZoom, getNormalizedGridSize, getNormalizedGridStep, } from "./normalize";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { NormalizedZoomValue } from "../types";
|
|
2
|
+
export declare const getNormalizedZoom: (zoom: number) => NormalizedZoomValue;
|
|
3
|
+
export declare const getNormalizedGridSize: (gridStep: number) => number;
|
|
4
|
+
export declare const getNormalizedGridStep: (gridStep: number) => number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Bounds } from "./element/bounds";
|
|
2
2
|
import type { MaybeTransformHandleType } from "./element/transformHandles";
|
|
3
3
|
import type { ElementsMap, ExcalidrawElement, NonDeletedExcalidrawElement } from "./element/types";
|
|
4
|
-
import type { AppState, KeyboardModifiersObject, Point } from "./types";
|
|
4
|
+
import type { AppClassProperties, AppState, KeyboardModifiersObject, Point } from "./types";
|
|
5
5
|
export declare const getSnapDistance: (zoomValue: number) => number;
|
|
6
6
|
type Vector2D = {
|
|
7
7
|
x: number;
|
|
@@ -60,8 +60,9 @@ export declare class SnapCache {
|
|
|
60
60
|
} | null;
|
|
61
61
|
static destroy: () => void;
|
|
62
62
|
}
|
|
63
|
-
export declare const
|
|
64
|
-
|
|
63
|
+
export declare const isGridModeEnabled: (app: AppClassProperties) => boolean;
|
|
64
|
+
export declare const isSnappingEnabled: ({ event, app, selectedElements, }: {
|
|
65
|
+
app: AppClassProperties;
|
|
65
66
|
event: KeyboardModifiersObject;
|
|
66
67
|
selectedElements: NonDeletedExcalidrawElement[];
|
|
67
68
|
}) => boolean;
|
|
@@ -76,28 +77,28 @@ export declare const getVisibleGaps: (elements: readonly NonDeletedExcalidrawEle
|
|
|
76
77
|
verticalGaps: Gap[];
|
|
77
78
|
};
|
|
78
79
|
export declare const getReferenceSnapPoints: (elements: readonly NonDeletedExcalidrawElement[], selectedElements: ExcalidrawElement[], appState: AppState, elementsMap: ElementsMap) => (readonly [number, number])[];
|
|
79
|
-
export declare const snapDraggedElements: (elements: ExcalidrawElement[], dragOffset: Vector2D,
|
|
80
|
+
export declare const snapDraggedElements: (elements: ExcalidrawElement[], dragOffset: Vector2D, app: AppClassProperties, event: KeyboardModifiersObject, elementsMap: ElementsMap) => {
|
|
80
81
|
snapOffset: {
|
|
81
82
|
x: number;
|
|
82
83
|
y: number;
|
|
83
84
|
};
|
|
84
85
|
snapLines: (PointSnapLine | GapSnapLine)[];
|
|
85
86
|
};
|
|
86
|
-
export declare const snapResizingElements: (selectedElements: ExcalidrawElement[], selectedOriginalElements: ExcalidrawElement[],
|
|
87
|
+
export declare const snapResizingElements: (selectedElements: ExcalidrawElement[], selectedOriginalElements: ExcalidrawElement[], app: AppClassProperties, event: KeyboardModifiersObject, dragOffset: Vector2D, transformHandle: MaybeTransformHandleType) => {
|
|
87
88
|
snapOffset: {
|
|
88
89
|
x: number;
|
|
89
90
|
y: number;
|
|
90
91
|
};
|
|
91
92
|
snapLines: PointSnapLine[];
|
|
92
93
|
};
|
|
93
|
-
export declare const snapNewElement: (newElement: ExcalidrawElement,
|
|
94
|
+
export declare const snapNewElement: (newElement: ExcalidrawElement, app: AppClassProperties, event: KeyboardModifiersObject, origin: Vector2D, dragOffset: Vector2D, elementsMap: ElementsMap) => {
|
|
94
95
|
snapOffset: {
|
|
95
96
|
x: number;
|
|
96
97
|
y: number;
|
|
97
98
|
};
|
|
98
99
|
snapLines: PointSnapLine[];
|
|
99
100
|
};
|
|
100
|
-
export declare const getSnapLinesAtPointer: (elements: readonly ExcalidrawElement[],
|
|
101
|
+
export declare const getSnapLinesAtPointer: (elements: readonly ExcalidrawElement[], app: AppClassProperties, pointer: Vector2D, event: KeyboardModifiersObject, elementsMap: ElementsMap) => {
|
|
101
102
|
originOffset: {
|
|
102
103
|
x: number;
|
|
103
104
|
y: number;
|
|
@@ -17,7 +17,7 @@ import type { FileSystemHandle } from "./data/filesystem";
|
|
|
17
17
|
import type { IMAGE_MIME_TYPES, MIME_TYPES } from "./constants";
|
|
18
18
|
import type { ContextMenuItems } from "./components/ContextMenu";
|
|
19
19
|
import type { SnapLine } from "./snapping";
|
|
20
|
-
import type { Merge, MaybePromise, ValueOf } from "./utility-types";
|
|
20
|
+
import type { Merge, MaybePromise, ValueOf, MakeBrand } from "./utility-types";
|
|
21
21
|
import type { ColorPaletteCustom } from "./colors";
|
|
22
22
|
import type { StoreActionType } from "./store";
|
|
23
23
|
export type Point = Readonly<RoughPoint>;
|
|
@@ -119,6 +119,7 @@ export type StaticCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
|
119
119
|
exportScale: AppState["exportScale"];
|
|
120
120
|
selectedElementsAreBeingDragged: AppState["selectedElementsAreBeingDragged"];
|
|
121
121
|
gridSize: AppState["gridSize"];
|
|
122
|
+
gridStep: AppState["gridStep"];
|
|
122
123
|
frameRendering: AppState["frameRendering"];
|
|
123
124
|
linkOpacity: AppState["linkOpacity"];
|
|
124
125
|
gridColor: AppState["gridColor"];
|
|
@@ -141,6 +142,7 @@ export type InteractiveCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
|
141
142
|
zenModeEnabled: AppState["zenModeEnabled"];
|
|
142
143
|
editingElement: AppState["editingElement"];
|
|
143
144
|
gridColor: AppState["gridColor"];
|
|
145
|
+
highlightSearchResult: AppState["highlightSearchResult"];
|
|
144
146
|
}>;
|
|
145
147
|
export type ObservedAppState = ObservedStandaloneAppState & ObservedElementsAppState;
|
|
146
148
|
export type ObservedStandaloneAppState = {
|
|
@@ -288,8 +290,10 @@ export interface AppState {
|
|
|
288
290
|
} | null;
|
|
289
291
|
zenModeEnabled: boolean;
|
|
290
292
|
theme: Theme;
|
|
291
|
-
|
|
292
|
-
|
|
293
|
+
/** grid cell px size */
|
|
294
|
+
gridSize: number;
|
|
295
|
+
gridStep: number;
|
|
296
|
+
gridModeEnabled: boolean;
|
|
293
297
|
viewModeEnabled: boolean;
|
|
294
298
|
/** top-most selected groups (i.e. does not include nested groups) */
|
|
295
299
|
selectedGroupIds: {
|
|
@@ -341,8 +345,8 @@ export interface AppState {
|
|
|
341
345
|
gridColor: {
|
|
342
346
|
Bold: string;
|
|
343
347
|
Regular: string;
|
|
344
|
-
MajorGridFrequency?: number;
|
|
345
348
|
};
|
|
349
|
+
highlightSearchResult: boolean;
|
|
346
350
|
dynamicStyle: {
|
|
347
351
|
[x: string]: string;
|
|
348
352
|
};
|
|
@@ -522,6 +526,7 @@ export type AppProps = Merge<ExcalidrawProps, {
|
|
|
522
526
|
* in the app, eg Manager. Factored out into a separate type to keep DRY. */
|
|
523
527
|
export type AppClassProperties = {
|
|
524
528
|
props: AppProps;
|
|
529
|
+
state: AppState;
|
|
525
530
|
interactiveCanvas: HTMLCanvasElement | null;
|
|
526
531
|
/** static canvas */
|
|
527
532
|
canvas: HTMLCanvasElement;
|
|
@@ -554,6 +559,7 @@ export type AppClassProperties = {
|
|
|
554
559
|
getName: App["getName"];
|
|
555
560
|
dismissLinearEditor: App["dismissLinearEditor"];
|
|
556
561
|
flowChartCreator: App["flowChartCreator"];
|
|
562
|
+
getEffectiveGridSize: App["getEffectiveGridSize"];
|
|
557
563
|
};
|
|
558
564
|
export type PointerDownState = Readonly<{
|
|
559
565
|
origin: Readonly<{
|
|
@@ -630,7 +636,7 @@ export interface ExcalidrawImperativeAPI {
|
|
|
630
636
|
addFiles: (data: BinaryFileData[]) => void;
|
|
631
637
|
updateContainerSize: InstanceType<typeof App>["updateContainerSize"];
|
|
632
638
|
id: string;
|
|
633
|
-
selectElements: (elements: readonly ExcalidrawElement[]) => void;
|
|
639
|
+
selectElements: (elements: readonly ExcalidrawElement[], highlightSearchResult?: boolean) => void;
|
|
634
640
|
sendBackward: (elements: readonly ExcalidrawElement[]) => void;
|
|
635
641
|
bringForward: (elements: readonly ExcalidrawElement[]) => void;
|
|
636
642
|
sendToBack: (elements: readonly ExcalidrawElement[]) => void;
|
|
@@ -689,4 +695,6 @@ export type JSONValue = string | number | boolean | null | object;
|
|
|
689
695
|
export type EmbedsValidationStatus = Map<ExcalidrawIframeLikeElement["id"], boolean>;
|
|
690
696
|
export type ElementsPendingErasure = Set<ExcalidrawElement["id"]>;
|
|
691
697
|
export type PendingExcalidrawElements = ExcalidrawElement[];
|
|
698
|
+
/** Runtime gridSize value. Null indicates disabled grid. */
|
|
699
|
+
export type NullableGridSize = (AppState["gridSize"] & MakeBrand<"NullableGridSize">) | null;
|
|
692
700
|
export {};
|
package/types/utils/export.d.ts
CHANGED
|
@@ -41,4 +41,4 @@ export { getLineHeight } from "../excalidraw/fonts/index";
|
|
|
41
41
|
export { getFontString, getFontFamilyString } from "../excalidraw/utils";
|
|
42
42
|
export { getBoundTextMaxWidth } from "../excalidraw/element/textElement";
|
|
43
43
|
export { mermaidToExcalidraw } from "../excalidraw/components/TTDDialog/MermaidToExcalidraw";
|
|
44
|
-
export { destroyObsidianUtils, registerLocalFont, getFontFamilies, registerFontsInCSS,
|
|
44
|
+
export { destroyObsidianUtils, registerLocalFont, getFontFamilies, registerFontsInCSS, getCSSFontDefinition, } from "../excalidraw/obsidianUtils";
|