@zsviczian/excalidraw 0.18.0-22 → 0.18.0-24
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 +23 -23
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/common/src/constants.d.ts +1 -1
- package/types/common/src/points.d.ts +1 -1
- package/types/common/src/utils.d.ts +2 -2
- package/types/element/src/Scene.d.ts +1 -1
- package/types/element/src/binding.d.ts +4 -0
- package/types/element/src/bounds.d.ts +3 -1
- package/types/element/src/elbowArrow.d.ts +1 -1
- package/types/element/src/frame.d.ts +2 -2
- package/types/element/src/heading.d.ts +2 -2
- package/types/element/src/linearElementEditor.d.ts +1 -4
- package/types/element/src/resizeTest.d.ts +2 -2
- package/types/element/src/selection.d.ts +1 -1
- package/types/element/src/shape.d.ts +2 -2
- package/types/element/src/store.d.ts +1 -1
- package/types/element/src/transformHandles.d.ts +4 -4
- package/types/element/src/utils.d.ts +11 -5
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +6 -6
- package/types/excalidraw/actions/actionAlign.d.ts +8 -8
- package/types/excalidraw/actions/actionBoundText.d.ts +4 -4
- package/types/excalidraw/actions/actionCanvas.d.ts +137 -137
- package/types/excalidraw/actions/actionClipboard.d.ts +17 -17
- package/types/excalidraw/actions/actionCropEditor.d.ts +2 -2
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +9 -9
- package/types/excalidraw/actions/actionDistribute.d.ts +4 -4
- package/types/excalidraw/actions/actionDuplicateSelection.d.ts +2 -2
- package/types/excalidraw/actions/actionElementLink.d.ts +2 -2
- package/types/excalidraw/actions/actionElementLock.d.ts +6 -6
- package/types/excalidraw/actions/actionEmbeddable.d.ts +2 -2
- package/types/excalidraw/actions/actionExport.d.ts +121 -121
- package/types/excalidraw/actions/actionFinalize.d.ts +8 -8
- package/types/excalidraw/actions/actionFlip.d.ts +4 -4
- package/types/excalidraw/actions/actionFrame.d.ts +61 -61
- package/types/excalidraw/actions/actionGroup.d.ts +10 -10
- package/types/excalidraw/actions/actionLinearEditor.d.ts +53 -53
- package/types/excalidraw/actions/actionLink.d.ts +3 -3
- package/types/excalidraw/actions/actionMenu.d.ts +8 -8
- package/types/excalidraw/actions/actionNavigate.d.ts +4 -4
- package/types/excalidraw/actions/actionProperties.d.ts +33 -33
- package/types/excalidraw/actions/actionSelectAll.d.ts +5 -5
- package/types/excalidraw/actions/actionStyles.d.ts +6 -6
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleStats.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +4 -4
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +4 -4
- package/types/excalidraw/actions/actionZindex.d.ts +8 -8
- package/types/excalidraw/appState.d.ts +21 -21
- package/types/excalidraw/components/App.d.ts +8 -4
- package/types/excalidraw/components/Stats/DragInput.d.ts +11 -1
- package/types/excalidraw/components/dropdownMenu/common.d.ts +1 -1
- package/types/excalidraw/components/shapes.d.ts +1 -1
- package/types/excalidraw/data/blob.d.ts +1 -1
- package/types/excalidraw/data/library.d.ts +1 -1
- package/types/math/src/angle.d.ts +1 -1
- package/types/math/src/curve.d.ts +1 -1
- package/types/math/src/ellipse.d.ts +3 -3
- package/types/math/src/point.d.ts +2 -2
- package/types/math/src/polygon.d.ts +2 -2
- package/types/math/src/rectangle.d.ts +2 -0
- package/types/math/src/segment.d.ts +5 -5
- package/types/math/src/utils.d.ts +0 -2
- package/types/utils/src/shape.d.ts +12 -12
- package/types/excalidraw/visualdebug.d.ts +0 -41
package/package.json
CHANGED
|
@@ -299,7 +299,7 @@ export declare const DEFAULT_SIDEBAR: {
|
|
|
299
299
|
readonly name: "default";
|
|
300
300
|
readonly defaultTab: "library";
|
|
301
301
|
};
|
|
302
|
-
export declare const LIBRARY_DISABLED_TYPES: Set<"embeddable" | "
|
|
302
|
+
export declare const LIBRARY_DISABLED_TYPES: Set<"embeddable" | "iframe" | "image">;
|
|
303
303
|
export declare const TOOL_TYPE: {
|
|
304
304
|
readonly selection: "selection";
|
|
305
305
|
readonly lasso: "lasso";
|
|
@@ -5,5 +5,5 @@ export declare const getSizeFromPoints: (points: readonly (GlobalPoint | LocalPo
|
|
|
5
5
|
height: number;
|
|
6
6
|
};
|
|
7
7
|
/** @arg dimension, 0 for rescaling only x, 1 for y */
|
|
8
|
-
export declare const rescalePoints: <Point extends
|
|
8
|
+
export declare const rescalePoints: <Point extends GlobalPoint | LocalPoint>(dimension: 0 | 1, newSize: number, points: readonly Point[], normalize: boolean) => Point[];
|
|
9
9
|
export declare const getGridPoint: (x: number, y: number, gridSize: NullableGridSize) => [number, number];
|
|
@@ -6,9 +6,9 @@ export declare const setDateTimeForTests: (dateTime: string) => void;
|
|
|
6
6
|
export declare const getDateTime: () => string;
|
|
7
7
|
export declare const capitalizeString: (str: string) => string;
|
|
8
8
|
export declare const isToolIcon: (target: Element | EventTarget | null) => target is HTMLElement;
|
|
9
|
-
export declare const isInputLike: (target: Element | EventTarget | null) => target is
|
|
9
|
+
export declare const isInputLike: (target: Element | EventTarget | null) => target is HTMLBRElement | HTMLDivElement | HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement;
|
|
10
10
|
export declare const isInteractive: (target: Element | EventTarget | null) => boolean;
|
|
11
|
-
export declare const isWritableElement: (target: Element | EventTarget | null) => target is
|
|
11
|
+
export declare const isWritableElement: (target: Element | EventTarget | null) => target is HTMLBRElement | HTMLDivElement | HTMLInputElement | HTMLTextAreaElement;
|
|
12
12
|
export declare const getFontFamilyString: ({ fontFamily, }: {
|
|
13
13
|
fontFamily: FontFamilyValues;
|
|
14
14
|
}) => string;
|
|
@@ -66,7 +66,7 @@ export declare class Scene {
|
|
|
66
66
|
getElementIndex(elementId: string): number;
|
|
67
67
|
getContainerElement: (element: (ExcalidrawElement & {
|
|
68
68
|
containerId: ExcalidrawElement["id"] | null;
|
|
69
|
-
}) | null) => import("@excalidraw/element/types").
|
|
69
|
+
}) | null) => import("@excalidraw/element/types").ExcalidrawLinearElement | import("@excalidraw/element/types").ExcalidrawSelectionElement | import("@excalidraw/element/types").ExcalidrawRectangleElement | import("@excalidraw/element/types").ExcalidrawDiamondElement | import("@excalidraw/element/types").ExcalidrawEllipseElement | import("@excalidraw/element/types").ExcalidrawEmbeddableElement | import("@excalidraw/element/types").ExcalidrawIframeElement | import("@excalidraw/element/types").ExcalidrawImageElement | import("@excalidraw/element/types").ExcalidrawFrameElement | import("@excalidraw/element/types").ExcalidrawMagicFrameElement | import("@excalidraw/element/types").ExcalidrawTextElement | import("@excalidraw/element/types").ExcalidrawFreeDrawElement | null;
|
|
70
70
|
getElementsFromId: (id: string) => ExcalidrawElement[];
|
|
71
71
|
mutateElement<TElement extends Mutable<ExcalidrawElement>>(element: TElement, updates: ElementUpdate<TElement>, options?: {
|
|
72
72
|
informMutation: boolean;
|
|
@@ -19,6 +19,10 @@ export declare const BINDING_HIGHLIGHT_THICKNESS = 10;
|
|
|
19
19
|
export declare const bindOrUnbindLinearElement: (linearElement: NonDeleted<ExcalidrawLinearElement>, startBindingElement: ExcalidrawBindableElement | null | "keep", endBindingElement: ExcalidrawBindableElement | null | "keep", scene: Scene) => void;
|
|
20
20
|
export declare const bindOrUnbindLinearElements: (selectedElements: NonDeleted<ExcalidrawLinearElement>[], isBindingEnabled: boolean, draggingPoints: readonly number[] | null, scene: Scene, zoom?: AppState["zoom"]) => void;
|
|
21
21
|
export declare const getSuggestedBindingsForArrows: (selectedElements: NonDeleted<ExcalidrawElement>[], elementsMap: NonDeletedSceneElementsMap, zoom: AppState["zoom"]) => SuggestedBinding[];
|
|
22
|
+
export declare const maybeSuggestBindingsForLinearElementAtCoords: (linearElement: NonDeleted<ExcalidrawLinearElement>, pointerCoords: {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
}[], scene: Scene, zoom: AppState["zoom"], oppositeBindingBoundElement?: ExcalidrawBindableElement | null) => ExcalidrawBindableElement[];
|
|
22
26
|
export declare const maybeBindLinearElement: (linearElement: NonDeleted<ExcalidrawLinearElement>, appState: AppState, pointerCoords: {
|
|
23
27
|
x: number;
|
|
24
28
|
y: number;
|
|
@@ -44,6 +44,7 @@ export declare const getElementLineSegments: (element: ExcalidrawElement, elemen
|
|
|
44
44
|
*/
|
|
45
45
|
export declare const getRectangleBoxAbsoluteCoords: (boxSceneCoords: RectangleBox) => number[];
|
|
46
46
|
export declare const getDiamondPoints: (element: ExcalidrawElement) => number[];
|
|
47
|
+
export declare const getCubicBezierCurveBound: (p0: GlobalPoint, p1: GlobalPoint, p2: GlobalPoint, p3: GlobalPoint) => Bounds;
|
|
47
48
|
export declare const getMinMaxXYFromCurvePathOps: (ops: Op[], transformXY?: ((p: GlobalPoint) => GlobalPoint) | undefined) => Bounds;
|
|
48
49
|
export declare const getBoundsFromPoints: (points: ExcalidrawFreeDrawElement["points"]) => Bounds;
|
|
49
50
|
/** @returns number in pixels */
|
|
@@ -83,5 +84,6 @@ export declare const getCenterForBounds: (bounds: Bounds) => GlobalPoint;
|
|
|
83
84
|
* Get the axis-aligned bounding box for a given element
|
|
84
85
|
*/
|
|
85
86
|
export declare const aabbForElement: (element: Readonly<ExcalidrawElement>, elementsMap: ElementsMap, offset?: [number, number, number, number]) => Bounds;
|
|
86
|
-
export declare const pointInsideBounds: <P extends
|
|
87
|
+
export declare const pointInsideBounds: <P extends GlobalPoint | LocalPoint>(p: P, bounds: Bounds) => boolean;
|
|
88
|
+
export declare const doBoundsIntersect: (bounds1: Bounds | null, bounds2: Bounds | null) => boolean;
|
|
87
89
|
export declare const elementCenterPoint: (element: ExcalidrawElement, elementsMap: ElementsMap, xOffset?: number, yOffset?: number) => GlobalPoint;
|
|
@@ -14,4 +14,4 @@ export declare const updateElbowArrowPoints: (arrow: Readonly<ExcalidrawElbowArr
|
|
|
14
14
|
}, options?: {
|
|
15
15
|
isDragging?: boolean;
|
|
16
16
|
}) => ElementUpdate<ExcalidrawElbowArrowElement>;
|
|
17
|
-
export declare const validateElbowPoints: <P extends
|
|
17
|
+
export declare const validateElbowPoints: <P extends GlobalPoint | LocalPoint>(points: readonly P[], tolerance?: number) => boolean;
|
|
@@ -31,8 +31,8 @@ export declare const getFrameLikeElements: (allElements: ExcalidrawElementsInclu
|
|
|
31
31
|
*/
|
|
32
32
|
export declare const getRootElements: (allElements: ExcalidrawElementsIncludingDeleted) => ExcalidrawElement[];
|
|
33
33
|
export declare const getElementsInResizingFrame: (allElements: ExcalidrawElementsIncludingDeleted, frame: ExcalidrawFrameLikeElement, appState: AppState, elementsMap: ElementsMap) => ExcalidrawElement[];
|
|
34
|
-
export declare const getElementsInNewFrame: (elements: ExcalidrawElementsIncludingDeleted, frame: ExcalidrawFrameLikeElement, elementsMap: ElementsMap) => (import("./types").
|
|
35
|
-
export declare const omitPartialGroups: (elements: ExcalidrawElement[], frame: ExcalidrawFrameLikeElement, allElementsMap: ElementsMap) => (import("./types").
|
|
34
|
+
export declare const getElementsInNewFrame: (elements: ExcalidrawElementsIncludingDeleted, frame: ExcalidrawFrameLikeElement, elementsMap: ElementsMap) => (import("./types").ExcalidrawLinearElement | import("./types").ExcalidrawSelectionElement | import("./types").ExcalidrawRectangleElement | import("./types").ExcalidrawDiamondElement | import("./types").ExcalidrawEllipseElement | import("./types").ExcalidrawEmbeddableElement | import("./types").ExcalidrawIframeElement | import("./types").ExcalidrawImageElement | import("./types").ExcalidrawFrameElement | import("./types").ExcalidrawMagicFrameElement | import("./types").ExcalidrawTextElement | import("./types").ExcalidrawFreeDrawElement)[];
|
|
35
|
+
export declare const omitPartialGroups: (elements: ExcalidrawElement[], frame: ExcalidrawFrameLikeElement, allElementsMap: ElementsMap) => (import("./types").ExcalidrawLinearElement | import("./types").ExcalidrawSelectionElement | import("./types").ExcalidrawRectangleElement | import("./types").ExcalidrawDiamondElement | import("./types").ExcalidrawEllipseElement | import("./types").ExcalidrawEmbeddableElement | import("./types").ExcalidrawIframeElement | import("./types").ExcalidrawImageElement | import("./types").ExcalidrawFrameElement | import("./types").ExcalidrawMagicFrameElement | import("./types").ExcalidrawTextElement | import("./types").ExcalidrawFreeDrawElement)[];
|
|
36
36
|
export declare const getContainingFrame: (element: ExcalidrawElement, elementsMap: ElementsMap) => ExcalidrawFrameLikeElement | null;
|
|
37
37
|
/** */
|
|
38
38
|
export declare const filterElementsEligibleAsFrameChildren: (elements: readonly ExcalidrawElement[], frame: ExcalidrawFrameLikeElement) => ExcalidrawElement[];
|
|
@@ -6,8 +6,8 @@ export declare const HEADING_LEFT: Heading;
|
|
|
6
6
|
export declare const HEADING_UP: Heading;
|
|
7
7
|
export type Heading = [1, 0] | [0, 1] | [-1, 0] | [0, -1];
|
|
8
8
|
export declare const vectorToHeading: (vec: Vector) => Heading;
|
|
9
|
-
export declare const headingForPoint: <P extends
|
|
10
|
-
export declare const headingForPointIsHorizontal: <P extends
|
|
9
|
+
export declare const headingForPoint: <P extends GlobalPoint | LocalPoint>(p: P, o: P) => Heading;
|
|
10
|
+
export declare const headingForPointIsHorizontal: <P extends GlobalPoint | LocalPoint>(p: P, o: P) => boolean;
|
|
11
11
|
export declare const compareHeading: (a: Heading, b: Heading) => boolean;
|
|
12
12
|
export declare const headingIsHorizontal: (a: Heading) => boolean;
|
|
13
13
|
export declare const headingIsVertical: (a: Heading) => boolean;
|
|
@@ -49,10 +49,7 @@ export declare class LinearElementEditor {
|
|
|
49
49
|
/**
|
|
50
50
|
* @returns whether point was dragged
|
|
51
51
|
*/
|
|
52
|
-
static handlePointDragging(event: PointerEvent, app: AppClassProperties, scenePointerX: number, scenePointerY: number,
|
|
53
|
-
x: number;
|
|
54
|
-
y: number;
|
|
55
|
-
}[]) => void, linearElementEditor: LinearElementEditor, scene: Scene): LinearElementEditor | null;
|
|
52
|
+
static handlePointDragging(event: PointerEvent, app: AppClassProperties, scenePointerX: number, scenePointerY: number, linearElementEditor: LinearElementEditor): Pick<AppState, keyof AppState> | null;
|
|
56
53
|
static handlePointerUp(event: PointerEvent, editingLinearElement: LinearElementEditor, appState: AppState, scene: Scene): LinearElementEditor;
|
|
57
54
|
static getEditorMidPoints: (element: NonDeleted<ExcalidrawLinearElement>, elementsMap: ElementsMap, appState: InteractiveCanvasAppState) => (GlobalPoint | null)[];
|
|
58
55
|
static getSegmentMidpointHitCoords: (linearElementEditor: LinearElementEditor, scenePointer: {
|
|
@@ -3,12 +3,12 @@ import type { AppState, Device, Zoom } from "@excalidraw/excalidraw/types";
|
|
|
3
3
|
import type { Bounds } from "./bounds";
|
|
4
4
|
import type { MaybeTransformHandleType } from "./transformHandles";
|
|
5
5
|
import type { ExcalidrawElement, PointerType, NonDeletedExcalidrawElement, ElementsMap } from "./types";
|
|
6
|
-
export declare const resizeTest: <Point extends
|
|
6
|
+
export declare const resizeTest: <Point extends GlobalPoint | LocalPoint>(element: NonDeletedExcalidrawElement, elementsMap: ElementsMap, appState: AppState, x: number, y: number, zoom: Zoom, pointerType: PointerType, device: Device) => MaybeTransformHandleType;
|
|
7
7
|
export declare const getElementWithTransformHandleType: (elements: readonly NonDeletedExcalidrawElement[], appState: AppState, scenePointerX: number, scenePointerY: number, zoom: Zoom, pointerType: PointerType, elementsMap: ElementsMap, device: Device) => {
|
|
8
8
|
element: NonDeletedExcalidrawElement;
|
|
9
9
|
transformHandleType: MaybeTransformHandleType;
|
|
10
10
|
} | null;
|
|
11
|
-
export declare const getTransformHandleTypeFromCoords: <Point extends
|
|
11
|
+
export declare const getTransformHandleTypeFromCoords: <Point extends GlobalPoint | LocalPoint>([x1, y1, x2, y2]: Bounds, scenePointerX: number, scenePointerY: number, zoom: Zoom, pointerType: PointerType, device: Device) => MaybeTransformHandleType;
|
|
12
12
|
export declare const getCursorForResizingElement: (resizingElement: {
|
|
13
13
|
element?: ExcalidrawElement;
|
|
14
14
|
transformHandleType: MaybeTransformHandleType;
|
|
@@ -27,12 +27,12 @@ export declare const makeNextSelectedElementIds: (nextSelectedElementIds: AppSta
|
|
|
27
27
|
[id: string]: true;
|
|
28
28
|
}>;
|
|
29
29
|
export declare const getSelectionStateForElements: (targetElements: readonly ExcalidrawElement[], allElements: readonly NonDeletedExcalidrawElement[], appState: AppState) => {
|
|
30
|
+
editingGroupId: string | null;
|
|
30
31
|
selectedElementIds: Readonly<{
|
|
31
32
|
[id: string]: true;
|
|
32
33
|
}>;
|
|
33
34
|
selectedGroupIds: {
|
|
34
35
|
[groupId: string]: boolean;
|
|
35
36
|
};
|
|
36
|
-
editingGroupId: string | null;
|
|
37
37
|
selectedLinearElement: LinearElementEditor | null;
|
|
38
38
|
};
|
|
@@ -20,7 +20,7 @@ export declare class ShapeCache {
|
|
|
20
20
|
* Generates & caches shape for element if not already cached, otherwise
|
|
21
21
|
* returns cached shape.
|
|
22
22
|
*/
|
|
23
|
-
static generateElementShape: <T extends import("./types").ExcalidrawRectangleElement | import("./types").ExcalidrawDiamondElement | import("./types").ExcalidrawEllipseElement | import("./types").
|
|
23
|
+
static generateElementShape: <T extends ExcalidrawLinearElement | import("./types").ExcalidrawRectangleElement | import("./types").ExcalidrawDiamondElement | import("./types").ExcalidrawEllipseElement | import("./types").ExcalidrawEmbeddableElement | import("./types").ExcalidrawIframeElement | import("./types").ExcalidrawImageElement | import("./types").ExcalidrawFrameElement | import("./types").ExcalidrawMagicFrameElement | import("./types").ExcalidrawTextElement | ExcalidrawFreeDrawElement | import("./types").ExcalidrawArrowElement>(element: T, renderConfig: {
|
|
24
24
|
isExporting: boolean;
|
|
25
25
|
canvasBackgroundColor: AppState["viewBackgroundColor"];
|
|
26
26
|
embedsValidationStatus: EmbedsValidationStatus;
|
|
@@ -35,7 +35,7 @@ export declare const generateLinearCollisionShape: (element: ExcalidrawLinearEle
|
|
|
35
35
|
* get the pure geometric shape of an excalidraw elementw
|
|
36
36
|
* which is then used for hit detection
|
|
37
37
|
*/
|
|
38
|
-
export declare const getElementShape: <Point extends
|
|
38
|
+
export declare const getElementShape: <Point extends GlobalPoint | LocalPoint>(element: ExcalidrawElement, elementsMap: ElementsMap) => GeometricShape<Point>;
|
|
39
39
|
export declare const toggleLinePolygonState: (element: ExcalidrawLineElement, nextPolygonState: boolean) => {
|
|
40
40
|
polygon: ExcalidrawLineElement["polygon"];
|
|
41
41
|
points: ExcalidrawLineElement["points"];
|
|
@@ -220,7 +220,7 @@ export declare class StoreSnapshot {
|
|
|
220
220
|
private maybeCreateElementsSnapshot;
|
|
221
221
|
private detectChangedAppState;
|
|
222
222
|
/**
|
|
223
|
-
* Detect if there any changed elements.
|
|
223
|
+
* Detect if there are any changed elements.
|
|
224
224
|
*/
|
|
225
225
|
private detectChangedElements;
|
|
226
226
|
/**
|
|
@@ -31,10 +31,10 @@ export declare const OMIT_SIDES_FOR_FRAME: {
|
|
|
31
31
|
export declare const canResizeFromSides: (device: Device) => boolean;
|
|
32
32
|
export declare const getOmitSidesForDevice: (device: Device) => {};
|
|
33
33
|
export declare const getTransformHandlesFromCoords: ([x1, y1, x2, y2, cx, cy]: [number, number, number, number, number, number], angle: Radians, zoom: Zoom, pointerType: PointerType, omitSides?: {
|
|
34
|
-
e?: boolean | undefined;
|
|
35
34
|
s?: boolean | undefined;
|
|
36
|
-
w?: boolean | undefined;
|
|
37
35
|
n?: boolean | undefined;
|
|
36
|
+
w?: boolean | undefined;
|
|
37
|
+
e?: boolean | undefined;
|
|
38
38
|
nw?: boolean | undefined;
|
|
39
39
|
ne?: boolean | undefined;
|
|
40
40
|
sw?: boolean | undefined;
|
|
@@ -42,10 +42,10 @@ export declare const getTransformHandlesFromCoords: ([x1, y1, x2, y2, cx, cy]: [
|
|
|
42
42
|
rotation?: boolean | undefined;
|
|
43
43
|
}, margin?: number, spacing?: number) => TransformHandles;
|
|
44
44
|
export declare const getTransformHandles: (element: ExcalidrawElement, zoom: Zoom, elementsMap: ElementsMap, pointerType?: PointerType, omitSides?: {
|
|
45
|
-
e?: boolean | undefined;
|
|
46
45
|
s?: boolean | undefined;
|
|
47
|
-
w?: boolean | undefined;
|
|
48
46
|
n?: boolean | undefined;
|
|
47
|
+
w?: boolean | undefined;
|
|
48
|
+
e?: boolean | undefined;
|
|
49
49
|
nw?: boolean | undefined;
|
|
50
50
|
ne?: boolean | undefined;
|
|
51
51
|
sw?: boolean | undefined;
|
|
@@ -2,23 +2,29 @@ import { type GlobalPoint } from "@excalidraw/math";
|
|
|
2
2
|
import type { Curve, LineSegment } from "@excalidraw/math";
|
|
3
3
|
import type { Zoom } from "@excalidraw/excalidraw/types";
|
|
4
4
|
import type { ExcalidrawDiamondElement, ExcalidrawElement, ExcalidrawFreeDrawElement, ExcalidrawLinearElement, ExcalidrawRectanguloidElement } from "./types";
|
|
5
|
+
/**
|
|
6
|
+
* Returns the **rotated** components of freedraw, line or arrow elements.
|
|
7
|
+
*
|
|
8
|
+
* @param element The linear element to deconstruct
|
|
9
|
+
* @returns The rotated in components.
|
|
10
|
+
*/
|
|
5
11
|
export declare function deconstructLinearOrFreeDrawElement(element: ExcalidrawLinearElement | ExcalidrawFreeDrawElement): [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
|
|
6
12
|
/**
|
|
7
13
|
* Get the building components of a rectanguloid element in the form of
|
|
8
|
-
* line segments and curves
|
|
14
|
+
* line segments and curves **unrotated**.
|
|
9
15
|
*
|
|
10
16
|
* @param element Target rectanguloid element
|
|
11
17
|
* @param offset Optional offset to expand the rectanguloid shape
|
|
12
|
-
* @returns Tuple of line segments (0) and curves (1)
|
|
18
|
+
* @returns Tuple of **unrotated** line segments (0) and curves (1)
|
|
13
19
|
*/
|
|
14
20
|
export declare function deconstructRectanguloidElement(element: ExcalidrawRectanguloidElement, offset?: number): [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
|
|
15
21
|
/**
|
|
16
|
-
* Get the building components of a diamond element
|
|
17
|
-
* line segments and curves as a tuple, in this order.
|
|
22
|
+
* Get the **unrotated** building components of a diamond element
|
|
23
|
+
* in the form of line segments and curves as a tuple, in this order.
|
|
18
24
|
*
|
|
19
25
|
* @param element The element to deconstruct
|
|
20
26
|
* @param offset An optional offset
|
|
21
|
-
* @returns Tuple of line segments (0) and curves (1)
|
|
27
|
+
* @returns Tuple of line **unrotated** segments (0) and curves (1)
|
|
22
28
|
*/
|
|
23
29
|
export declare function deconstructDiamondElement(element: ExcalidrawDiamondElement, offset?: number): [LineSegment<GlobalPoint>[], Curve<GlobalPoint>[]];
|
|
24
30
|
export declare const isPathALoop: (points: ExcalidrawLinearElement["points"], zoomValue?: Zoom["value"]) => boolean;
|
|
@@ -64,7 +64,7 @@ export declare const actionAddToLibrary: {
|
|
|
64
64
|
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
65
65
|
currentHoveredFontFamily: number | null;
|
|
66
66
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
67
|
-
currentItemArrowType: "
|
|
67
|
+
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
68
68
|
viewBackgroundColor: string;
|
|
69
69
|
scrollX: number;
|
|
70
70
|
scrollY: number;
|
|
@@ -153,7 +153,7 @@ export declare const actionAddToLibrary: {
|
|
|
153
153
|
shown: true;
|
|
154
154
|
data: import("../charts").Spreadsheet;
|
|
155
155
|
};
|
|
156
|
-
showHyperlinkPopup: false | "
|
|
156
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
157
157
|
linkOpacity: number;
|
|
158
158
|
trayModeEnabled: boolean;
|
|
159
159
|
colorPalette?: {
|
|
@@ -268,7 +268,7 @@ export declare const actionAddToLibrary: {
|
|
|
268
268
|
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
269
269
|
currentHoveredFontFamily: number | null;
|
|
270
270
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
271
|
-
currentItemArrowType: "
|
|
271
|
+
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
272
272
|
viewBackgroundColor: string;
|
|
273
273
|
scrollX: number;
|
|
274
274
|
scrollY: number;
|
|
@@ -362,7 +362,7 @@ export declare const actionAddToLibrary: {
|
|
|
362
362
|
shown: true;
|
|
363
363
|
data: import("../charts").Spreadsheet;
|
|
364
364
|
};
|
|
365
|
-
showHyperlinkPopup: false | "
|
|
365
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
366
366
|
linkOpacity: number;
|
|
367
367
|
trayModeEnabled: boolean;
|
|
368
368
|
colorPalette?: {
|
|
@@ -477,7 +477,7 @@ export declare const actionAddToLibrary: {
|
|
|
477
477
|
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
478
478
|
currentHoveredFontFamily: number | null;
|
|
479
479
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
480
|
-
currentItemArrowType: "
|
|
480
|
+
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
481
481
|
viewBackgroundColor: string;
|
|
482
482
|
scrollX: number;
|
|
483
483
|
scrollY: number;
|
|
@@ -571,7 +571,7 @@ export declare const actionAddToLibrary: {
|
|
|
571
571
|
shown: true;
|
|
572
572
|
data: import("../charts").Spreadsheet;
|
|
573
573
|
};
|
|
574
|
-
showHyperlinkPopup: false | "
|
|
574
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
575
575
|
linkOpacity: number;
|
|
576
576
|
trayModeEnabled: boolean;
|
|
577
577
|
colorPalette?: {
|
|
@@ -14,10 +14,10 @@ export declare const actionAlignTop: {
|
|
|
14
14
|
elements: ExcalidrawElement[];
|
|
15
15
|
captureUpdate: "IMMEDIATELY";
|
|
16
16
|
};
|
|
17
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
17
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
18
18
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
19
|
} & {
|
|
20
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
20
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
21
21
|
};
|
|
22
22
|
export declare const actionAlignBottom: {
|
|
23
23
|
name: "alignBottom";
|
|
@@ -32,10 +32,10 @@ export declare const actionAlignBottom: {
|
|
|
32
32
|
elements: ExcalidrawElement[];
|
|
33
33
|
captureUpdate: "IMMEDIATELY";
|
|
34
34
|
};
|
|
35
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
35
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
36
36
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
37
|
} & {
|
|
38
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
38
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
39
39
|
};
|
|
40
40
|
export declare const actionAlignLeft: {
|
|
41
41
|
name: "alignLeft";
|
|
@@ -50,10 +50,10 @@ export declare const actionAlignLeft: {
|
|
|
50
50
|
elements: ExcalidrawElement[];
|
|
51
51
|
captureUpdate: "IMMEDIATELY";
|
|
52
52
|
};
|
|
53
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
53
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
54
54
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
55
55
|
} & {
|
|
56
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
56
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
57
57
|
};
|
|
58
58
|
export declare const actionAlignRight: {
|
|
59
59
|
name: "alignRight";
|
|
@@ -68,10 +68,10 @@ export declare const actionAlignRight: {
|
|
|
68
68
|
elements: ExcalidrawElement[];
|
|
69
69
|
captureUpdate: "IMMEDIATELY";
|
|
70
70
|
};
|
|
71
|
-
keyTest: (event: import("react").KeyboardEvent<Element>
|
|
71
|
+
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean;
|
|
72
72
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
73
73
|
} & {
|
|
74
|
-
keyTest?: ((event: import("react").KeyboardEvent<Element>
|
|
74
|
+
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>) => boolean) | undefined;
|
|
75
75
|
};
|
|
76
76
|
export declare const actionAlignVerticallyCentered: {
|
|
77
77
|
name: "alignVerticallyCentered";
|
|
@@ -84,7 +84,7 @@ export declare const actionBindText: {
|
|
|
84
84
|
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
85
85
|
currentHoveredFontFamily: number | null;
|
|
86
86
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
87
|
-
currentItemArrowType: "
|
|
87
|
+
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
88
88
|
viewBackgroundColor: string;
|
|
89
89
|
scrollX: number;
|
|
90
90
|
scrollY: number;
|
|
@@ -175,7 +175,7 @@ export declare const actionBindText: {
|
|
|
175
175
|
shown: true;
|
|
176
176
|
data: import("../charts").Spreadsheet;
|
|
177
177
|
};
|
|
178
|
-
showHyperlinkPopup: false | "
|
|
178
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
179
179
|
linkOpacity: number;
|
|
180
180
|
trayModeEnabled: boolean;
|
|
181
181
|
colorPalette?: {
|
|
@@ -305,7 +305,7 @@ export declare const actionWrapTextInContainer: {
|
|
|
305
305
|
currentItemEndArrowhead: import("@excalidraw/element/types").Arrowhead | null;
|
|
306
306
|
currentHoveredFontFamily: number | null;
|
|
307
307
|
currentItemRoundness: import("@excalidraw/element/types").StrokeRoundness;
|
|
308
|
-
currentItemArrowType: "
|
|
308
|
+
currentItemArrowType: "round" | "sharp" | "elbow";
|
|
309
309
|
viewBackgroundColor: string;
|
|
310
310
|
scrollX: number;
|
|
311
311
|
scrollY: number;
|
|
@@ -396,7 +396,7 @@ export declare const actionWrapTextInContainer: {
|
|
|
396
396
|
shown: true;
|
|
397
397
|
data: import("../charts").Spreadsheet;
|
|
398
398
|
};
|
|
399
|
-
showHyperlinkPopup: false | "
|
|
399
|
+
showHyperlinkPopup: false | "editor" | "info";
|
|
400
400
|
linkOpacity: number;
|
|
401
401
|
trayModeEnabled: boolean;
|
|
402
402
|
colorPalette?: {
|