@excalidraw/excalidraw 0.14.2-bd4424b → 0.14.2-cef6094
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 +16 -16
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/actions/actionBoundText.d.ts +23 -7
- package/types/actions/types.d.ts +1 -1
- package/types/components/HelpButton.d.ts +0 -1
- package/types/element/textElement.d.ts +3 -1
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { ExcalidrawElement, ExcalidrawLinearElement } from "../element/types";
|
|
1
2
|
export declare const actionUnbindText: {
|
|
2
3
|
name: "unbindText";
|
|
3
4
|
contextItemLabel: string;
|
|
4
5
|
trackEvent: {
|
|
5
6
|
category: "element";
|
|
6
7
|
};
|
|
7
|
-
predicate: (elements: readonly
|
|
8
|
-
perform: (elements: readonly
|
|
9
|
-
elements: readonly
|
|
8
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
9
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
10
|
+
elements: readonly ExcalidrawElement[];
|
|
10
11
|
appState: Readonly<import("../types").AppState>;
|
|
11
12
|
commitToHistory: true;
|
|
12
13
|
};
|
|
@@ -19,9 +20,9 @@ export declare const actionBindText: {
|
|
|
19
20
|
trackEvent: {
|
|
20
21
|
category: "element";
|
|
21
22
|
};
|
|
22
|
-
predicate: (elements: readonly
|
|
23
|
-
perform: (elements: readonly
|
|
24
|
-
elements:
|
|
23
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
24
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
25
|
+
elements: ExcalidrawElement[];
|
|
25
26
|
appState: {
|
|
26
27
|
selectedElementIds: {
|
|
27
28
|
[x: string]: true;
|
|
@@ -36,7 +37,7 @@ export declare const actionBindText: {
|
|
|
36
37
|
errorMessage: string | null;
|
|
37
38
|
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
38
39
|
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
39
|
-
multiElement: import("../element/types").NonDeleted<
|
|
40
|
+
multiElement: import("../element/types").NonDeleted<ExcalidrawLinearElement> | null;
|
|
40
41
|
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
41
42
|
isBindingEnabled: boolean;
|
|
42
43
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
@@ -130,3 +131,18 @@ export declare const actionBindText: {
|
|
|
130
131
|
} & {
|
|
131
132
|
keyTest?: undefined;
|
|
132
133
|
};
|
|
134
|
+
export declare const actionCreateContainerFromText: {
|
|
135
|
+
name: "createContainerFromText";
|
|
136
|
+
contextItemLabel: string;
|
|
137
|
+
trackEvent: {
|
|
138
|
+
category: "element";
|
|
139
|
+
};
|
|
140
|
+
predicate: (elements: readonly ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
141
|
+
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
142
|
+
elements: ExcalidrawElement[];
|
|
143
|
+
appState: Readonly<import("../types").AppState>;
|
|
144
|
+
commitToHistory: true;
|
|
145
|
+
};
|
|
146
|
+
} & {
|
|
147
|
+
keyTest?: undefined;
|
|
148
|
+
};
|
package/types/actions/types.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare type ActionResult = {
|
|
|
14
14
|
declare type ActionFn = (elements: readonly ExcalidrawElement[], appState: Readonly<AppState>, formData: any, app: AppClassProperties) => ActionResult | Promise<ActionResult>;
|
|
15
15
|
export declare type UpdaterFn = (res: ActionResult) => void;
|
|
16
16
|
export declare type ActionFilterFn = (action: Action) => void;
|
|
17
|
-
export declare type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToSelection" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "toggleLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool";
|
|
17
|
+
export declare type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "copyText" | "sendBackward" | "bringForward" | "sendToBack" | "bringToFront" | "copyStyles" | "selectAll" | "pasteStyles" | "gridMode" | "zenMode" | "stats" | "changeStrokeColor" | "changeBackgroundColor" | "changeFillStyle" | "changeStrokeWidth" | "changeStrokeShape" | "changeSloppiness" | "changeStrokeStyle" | "changeArrowhead" | "changeOpacity" | "changeFontSize" | "toggleCanvasMenu" | "toggleEditMenu" | "undo" | "redo" | "finalize" | "changeProjectName" | "changeExportBackground" | "changeExportEmbedScene" | "changeExportScale" | "saveToActiveFile" | "saveFileToDisk" | "loadScene" | "duplicateSelection" | "deleteSelectedElements" | "changeViewBackgroundColor" | "clearCanvas" | "zoomIn" | "zoomOut" | "resetZoom" | "zoomToFit" | "zoomToSelection" | "changeFontFamily" | "changeTextAlign" | "changeVerticalAlign" | "toggleFullScreen" | "toggleShortcuts" | "group" | "ungroup" | "goToCollaborator" | "addToLibrary" | "changeRoundness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "bindText" | "toggleLock" | "toggleLinearEditor" | "toggleEraserTool" | "toggleHandTool" | "createContainerFromText";
|
|
18
18
|
export declare type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
20
|
appState: AppState;
|
|
@@ -47,7 +47,9 @@ export declare const getBoundTextElementPosition: (container: ExcalidrawElement,
|
|
|
47
47
|
} | undefined;
|
|
48
48
|
export declare const shouldAllowVerticalAlign: (selectedElements: NonDeletedExcalidrawElement[]) => boolean;
|
|
49
49
|
export declare const getTextBindableContainerAtPosition: (elements: readonly ExcalidrawElement[], appState: AppState, x: number, y: number) => ExcalidrawTextContainer | null;
|
|
50
|
+
declare const VALID_CONTAINER_TYPES: Set<string>;
|
|
50
51
|
export declare const isValidTextContainer: (element: ExcalidrawElement) => boolean;
|
|
51
|
-
export declare const
|
|
52
|
+
export declare const computeContainerDimensionForBoundText: (dimension: number, containerType: ExtractSetType<typeof VALID_CONTAINER_TYPES>) => number;
|
|
52
53
|
export declare const getMaxContainerWidth: (container: ExcalidrawElement) => number;
|
|
53
54
|
export declare const getMaxContainerHeight: (container: ExcalidrawElement) => number;
|
|
55
|
+
export {};
|