@excalidraw/excalidraw 0.16.1-afea0df → 0.16.1-d1f8eec
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 +19 -19
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/actions/actionProperties.d.ts +2 -2
- package/types/actions/actionZindex.d.ts +2 -2
- package/types/constants.d.ts +5 -0
- package/types/frame.d.ts +1 -4
- package/types/scene/comparisons.d.ts +0 -1
- package/types/scene/index.d.ts +1 -1
- package/types/types.d.ts +1 -0
- package/types/zindex.d.ts +4 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AppState } from "../../src/types";
|
|
1
|
+
import { AppState, Primitive } from "../../src/types";
|
|
2
2
|
import { Arrowhead, ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
|
|
3
3
|
export declare const changeProperty: (elements: readonly ExcalidrawElement[], appState: AppState, callback: (element: ExcalidrawElement) => ExcalidrawElement, includeBoundText?: boolean) => ExcalidrawElement[];
|
|
4
|
-
export declare const getFormValue: <T>(elements: readonly ExcalidrawElement[], appState: AppState, getAttribute: (element: ExcalidrawElement) => T, defaultValue: T) => T;
|
|
4
|
+
export declare const getFormValue: <T extends Primitive>(elements: readonly ExcalidrawElement[], appState: AppState, getAttribute: (element: ExcalidrawElement) => T, isRelevantElement: true | ((element: ExcalidrawElement) => boolean), defaultValue: T | ((isSomeElementSelected: boolean) => T)) => T;
|
|
5
5
|
export declare const actionChangeStrokeColor: {
|
|
6
6
|
name: "changeStrokeColor";
|
|
7
7
|
trackEvent: false;
|
|
@@ -39,7 +39,7 @@ export declare const actionSendToBack: {
|
|
|
39
39
|
category: "element";
|
|
40
40
|
};
|
|
41
41
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
42
|
-
elements: import("../element/types").ExcalidrawElement[];
|
|
42
|
+
elements: readonly import("../element/types").ExcalidrawElement[] | import("../element/types").ExcalidrawElement[];
|
|
43
43
|
appState: Readonly<import("../types").AppState>;
|
|
44
44
|
commitToHistory: true;
|
|
45
45
|
};
|
|
@@ -55,7 +55,7 @@ export declare const actionBringToFront: {
|
|
|
55
55
|
category: "element";
|
|
56
56
|
};
|
|
57
57
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
58
|
-
elements: import("../element/types").ExcalidrawElement[];
|
|
58
|
+
elements: readonly import("../element/types").ExcalidrawElement[] | import("../element/types").ExcalidrawElement[];
|
|
59
59
|
appState: Readonly<import("../types").AppState>;
|
|
60
60
|
commitToHistory: true;
|
|
61
61
|
};
|
package/types/constants.d.ts
CHANGED
|
@@ -216,6 +216,11 @@ export declare const ROUGHNESS: {
|
|
|
216
216
|
readonly artist: 1;
|
|
217
217
|
readonly cartoonist: 2;
|
|
218
218
|
};
|
|
219
|
+
export declare const STROKE_WIDTH: {
|
|
220
|
+
readonly thin: 1;
|
|
221
|
+
readonly bold: 2;
|
|
222
|
+
readonly extraBold: 4;
|
|
223
|
+
};
|
|
219
224
|
export declare const DEFAULT_ELEMENT_PROPS: {
|
|
220
225
|
strokeColor: ExcalidrawElement["strokeColor"];
|
|
221
226
|
backgroundColor: ExcalidrawElement["backgroundColor"];
|
package/types/frame.d.ts
CHANGED
|
@@ -17,13 +17,10 @@ export declare const groupsAreCompletelyOutOfFrame: (elements: readonly NonDelet
|
|
|
17
17
|
* Returns a map of frameId to frame elements. Includes empty frames.
|
|
18
18
|
*/
|
|
19
19
|
export declare const groupByFrames: (elements: readonly ExcalidrawElement[]) => Map<string, ExcalidrawElement[]>;
|
|
20
|
-
export declare const getFrameElements: (allElements: ExcalidrawElementsIncludingDeleted, frameId: string
|
|
21
|
-
includeBoundArrows?: boolean;
|
|
22
|
-
}) => ExcalidrawElement[];
|
|
20
|
+
export declare const getFrameElements: (allElements: ExcalidrawElementsIncludingDeleted, frameId: string) => ExcalidrawElement[];
|
|
23
21
|
export declare const getElementsInResizingFrame: (allElements: ExcalidrawElementsIncludingDeleted, frame: ExcalidrawFrameElement, appState: AppState) => ExcalidrawElement[];
|
|
24
22
|
export declare const getElementsInNewFrame: (allElements: ExcalidrawElementsIncludingDeleted, frame: ExcalidrawFrameElement) => ExcalidrawElement[];
|
|
25
23
|
export declare const getContainingFrame: (element: ExcalidrawElement, elementsMap?: Map<string, ExcalidrawElement>) => ExcalidrawFrameElement | null;
|
|
26
|
-
export declare const isValidFrameChild: (element: ExcalidrawElement) => boolean;
|
|
27
24
|
/**
|
|
28
25
|
* Retains (or repairs for target frame) the ordering invriant where children
|
|
29
26
|
* elements come right before the parent frame:
|
|
@@ -4,7 +4,6 @@ export declare const hasStrokeColor: (type: string) => boolean;
|
|
|
4
4
|
export declare const hasStrokeWidth: (type: string) => boolean;
|
|
5
5
|
export declare const hasStrokeStyle: (type: string) => boolean;
|
|
6
6
|
export declare const canChangeRoundness: (type: string) => boolean;
|
|
7
|
-
export declare const hasText: (type: string) => boolean;
|
|
8
7
|
export declare const canHaveArrowheads: (type: string) => boolean;
|
|
9
8
|
export declare const getElementAtPosition: (elements: readonly NonDeletedExcalidrawElement[], isAtPositionFn: (element: NonDeletedExcalidrawElement) => boolean) => NonDeletedExcalidrawElement | null;
|
|
10
9
|
export declare const getElementsAtPosition: (elements: readonly NonDeletedExcalidrawElement[], isAtPositionFn: (element: NonDeletedExcalidrawElement) => boolean) => NonDeletedExcalidrawElement[];
|
package/types/scene/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { isOverScrollBars } from "./scrollbars";
|
|
2
2
|
export { isSomeElementSelected, getElementsWithinSelection, getCommonAttributeOfSelectedElements, getSelectedElements, getTargetElements, } from "./selection";
|
|
3
3
|
export { calculateScrollCenter } from "./scroll";
|
|
4
|
-
export { hasBackground, hasStrokeWidth, hasStrokeStyle, canHaveArrowheads, canChangeRoundness, getElementAtPosition,
|
|
4
|
+
export { hasBackground, hasStrokeWidth, hasStrokeStyle, canHaveArrowheads, canChangeRoundness, getElementAtPosition, getElementsAtPosition, } from "./comparisons";
|
|
5
5
|
export { getNormalizedZoom } from "./zoom";
|
package/types/types.d.ts
CHANGED
package/types/zindex.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExcalidrawElement } from "./element/types";
|
|
2
2
|
import { AppState } from "./types";
|
|
3
|
-
export declare const moveOneLeft: (
|
|
4
|
-
export declare const moveOneRight: (
|
|
5
|
-
export declare const moveAllLeft: (
|
|
6
|
-
export declare const moveAllRight: (
|
|
3
|
+
export declare const moveOneLeft: (allElements: readonly ExcalidrawElement[], appState: AppState) => ExcalidrawElement[];
|
|
4
|
+
export declare const moveOneRight: (allElements: readonly ExcalidrawElement[], appState: AppState) => ExcalidrawElement[];
|
|
5
|
+
export declare const moveAllLeft: (allElements: readonly ExcalidrawElement[], appState: AppState) => readonly ExcalidrawElement[] | ExcalidrawElement[];
|
|
6
|
+
export declare const moveAllRight: (allElements: readonly ExcalidrawElement[], appState: AppState) => readonly ExcalidrawElement[] | ExcalidrawElement[];
|