@dwelle/excalidraw 0.3.54 → 0.3.55
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/package.json
CHANGED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
export declare const actionUnbindText: {
|
|
2
|
+
name: "unbindText";
|
|
3
|
+
contextItemLabel: string;
|
|
4
|
+
contextItemPredicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
5
|
+
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
6
|
+
elements: readonly import("../element/types").ExcalidrawElement[];
|
|
7
|
+
appState: Readonly<import("../types").AppState>;
|
|
8
|
+
commitToHistory: true;
|
|
9
|
+
};
|
|
10
|
+
} & {
|
|
11
|
+
keyTest?: undefined;
|
|
12
|
+
};
|
|
13
|
+
export declare const actionBindText: {
|
|
14
|
+
name: "bindText";
|
|
15
|
+
contextItemLabel: string;
|
|
16
|
+
contextItemPredicate: (elements: readonly import("../element/types").ExcalidrawElement[], appState: import("../types").AppState) => boolean;
|
|
17
|
+
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => {
|
|
18
|
+
elements: import("../element/types").ExcalidrawElement[];
|
|
19
|
+
appState: {
|
|
20
|
+
selectedElementIds: {
|
|
21
|
+
[x: string]: true;
|
|
22
|
+
};
|
|
23
|
+
isLoading: boolean;
|
|
24
|
+
errorMessage: string | null;
|
|
25
|
+
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
26
|
+
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
27
|
+
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
28
|
+
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
29
|
+
isBindingEnabled: boolean;
|
|
30
|
+
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
31
|
+
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
32
|
+
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
33
|
+
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
34
|
+
elementType: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser";
|
|
35
|
+
elementLocked: boolean;
|
|
36
|
+
penMode: boolean;
|
|
37
|
+
penDetected: boolean;
|
|
38
|
+
exportBackground: boolean;
|
|
39
|
+
exportEmbedScene: boolean;
|
|
40
|
+
exportWithDarkMode: boolean;
|
|
41
|
+
exportScale: number;
|
|
42
|
+
currentItemStrokeColor: string;
|
|
43
|
+
currentItemBackgroundColor: string;
|
|
44
|
+
currentItemFillStyle: import("../element/types").FillStyle;
|
|
45
|
+
currentItemStrokeWidth: number;
|
|
46
|
+
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
47
|
+
currentItemRoughness: number;
|
|
48
|
+
currentItemOpacity: number;
|
|
49
|
+
currentItemFontFamily: number;
|
|
50
|
+
currentItemFontSize: number;
|
|
51
|
+
currentItemTextAlign: import("../element/types").TextAlign;
|
|
52
|
+
currentItemStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
53
|
+
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
54
|
+
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
55
|
+
currentItemLinearStrokeSharpness: import("../element/types").StrokeSharpness;
|
|
56
|
+
viewBackgroundColor: string;
|
|
57
|
+
scrollX: number;
|
|
58
|
+
scrollY: number;
|
|
59
|
+
cursorButton: "up" | "down";
|
|
60
|
+
scrolledOutside: boolean;
|
|
61
|
+
name: string;
|
|
62
|
+
isResizing: boolean;
|
|
63
|
+
isRotating: boolean;
|
|
64
|
+
zoom: Readonly<{
|
|
65
|
+
value: import("../types").NormalizedZoomValue;
|
|
66
|
+
}>;
|
|
67
|
+
openMenu: "canvas" | "shape" | null;
|
|
68
|
+
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
69
|
+
lastPointerDownWith: import("../element/types").PointerType;
|
|
70
|
+
previousSelectedElementIds: {
|
|
71
|
+
[id: string]: boolean;
|
|
72
|
+
};
|
|
73
|
+
shouldCacheIgnoreZoom: boolean;
|
|
74
|
+
showHelpDialog: boolean;
|
|
75
|
+
toastMessage: string | null;
|
|
76
|
+
zenModeEnabled: boolean;
|
|
77
|
+
theme: string;
|
|
78
|
+
gridSize: number | null;
|
|
79
|
+
viewModeEnabled: boolean;
|
|
80
|
+
selectedGroupIds: {
|
|
81
|
+
[groupId: string]: boolean;
|
|
82
|
+
};
|
|
83
|
+
editingGroupId: string | null;
|
|
84
|
+
width: number;
|
|
85
|
+
height: number;
|
|
86
|
+
offsetTop: number;
|
|
87
|
+
offsetLeft: number;
|
|
88
|
+
isLibraryOpen: boolean;
|
|
89
|
+
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
90
|
+
collaborators: Map<string, import("../types").Collaborator>;
|
|
91
|
+
showStats: boolean;
|
|
92
|
+
currentChartType: import("../element/types").ChartType;
|
|
93
|
+
pasteDialog: {
|
|
94
|
+
shown: false;
|
|
95
|
+
data: null;
|
|
96
|
+
} | {
|
|
97
|
+
shown: true;
|
|
98
|
+
data: import("../charts").Spreadsheet;
|
|
99
|
+
};
|
|
100
|
+
pendingImageElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawImageElement> | null;
|
|
101
|
+
showHyperlinkPopup: false | "info" | "editor";
|
|
102
|
+
};
|
|
103
|
+
commitToHistory: true;
|
|
104
|
+
};
|
|
105
|
+
} & {
|
|
106
|
+
keyTest?: undefined;
|
|
107
|
+
};
|
package/types/actions/index.d.ts
CHANGED
|
@@ -18,5 +18,5 @@ export { actionCopy, actionCut, actionCopyAsPng, actionCopyAsSvg, } from "./acti
|
|
|
18
18
|
export { actionToggleGridMode } from "./actionToggleGridMode";
|
|
19
19
|
export { actionToggleZenMode } from "./actionToggleZenMode";
|
|
20
20
|
export { actionToggleStats } from "./actionToggleStats";
|
|
21
|
-
export { actionUnbindText } from "./
|
|
21
|
+
export { actionUnbindText, actionBindText } from "./actionBoundText";
|
|
22
22
|
export { actionLink } from "../element/Hyperlink";
|
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" | "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" | "changeSharpness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "eraser";
|
|
17
|
+
export declare type ActionName = "copy" | "cut" | "paste" | "copyAsPng" | "copyAsSvg" | "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" | "changeSharpness" | "alignTop" | "alignBottom" | "alignLeft" | "alignRight" | "alignVerticallyCentered" | "alignHorizontallyCentered" | "distributeHorizontally" | "distributeVertically" | "flipHorizontal" | "flipVertical" | "viewMode" | "exportWithDarkMode" | "toggleTheme" | "increaseFontSize" | "decreaseFontSize" | "unbindText" | "hyperlink" | "eraser" | "bindText";
|
|
18
18
|
export declare type PanelComponentProps = {
|
|
19
19
|
elements: readonly ExcalidrawElement[];
|
|
20
20
|
appState: AppState;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ExcalidrawElement, ExcalidrawTextElement, ExcalidrawTextElementWithContainer, FontString, NonDeletedExcalidrawElement } from "./types";
|
|
2
2
|
import { MaybeTransformHandleType } from "./transformHandles";
|
|
3
|
-
|
|
4
|
-
export declare const redrawTextBoundingBox: (element: ExcalidrawTextElement, container: ExcalidrawElement | null, appState: AppState) => void;
|
|
3
|
+
export declare const redrawTextBoundingBox: (element: ExcalidrawTextElement, container: ExcalidrawElement | null) => void;
|
|
5
4
|
export declare const bindTextToShapeAfterDuplication: (sceneElements: ExcalidrawElement[], oldElements: ExcalidrawElement[], oldIdToDuplicatedId: Map<ExcalidrawElement["id"], ExcalidrawElement["id"]>) => void;
|
|
6
5
|
export declare const handleBindTextResize: (element: NonDeletedExcalidrawElement, transformHandleType: MaybeTransformHandleType) => void;
|
|
7
6
|
export declare const measureText: (text: string, font: FontString, maxWidth?: number | null | undefined) => {
|