@dwelle/excalidraw 0.4.0-ce7d72c → 0.4.0-cf1ab8d
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/CHANGELOG.md +245 -12
- package/dist/excalidraw.development.js +398 -167
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +0 -15
- package/main.js +1 -8
- package/package.json +3 -3
- package/types/actions/actionAddToLibrary.d.ts +24 -24
- package/types/actions/actionAlign.d.ts +8 -8
- package/types/actions/actionBoundText.d.ts +16 -16
- package/types/actions/actionCanvas.d.ts +112 -112
- package/types/actions/actionClipboard.d.ts +45 -47
- package/types/actions/actionDeleteSelected.d.ts +27 -29
- package/types/actions/actionDistribute.d.ts +4 -4
- package/types/actions/actionDuplicateSelection.d.ts +2 -2
- package/types/actions/actionElementLock.d.ts +18 -18
- package/types/actions/actionExport.d.ts +137 -139
- package/types/actions/actionFinalize.d.ts +19 -19
- package/types/actions/actionFlip.d.ts +4 -4
- package/types/actions/actionFrame.d.ts +26 -26
- package/types/actions/actionGroup.d.ts +245 -7
- package/types/actions/actionLinearEditor.d.ts +8 -8
- package/types/actions/actionMenu.d.ts +26 -26
- package/types/actions/actionProperties.d.ts +110 -108
- package/types/actions/actionSelectAll.d.ts +123 -3
- package/types/actions/actionStyles.d.ts +12 -12
- package/types/actions/actionToggleGridMode.d.ts +10 -10
- package/types/actions/actionToggleObjectsSnapMode.d.ts +137 -0
- package/types/actions/actionToggleStats.d.ts +10 -10
- package/types/actions/actionToggleViewMode.d.ts +10 -10
- package/types/actions/actionToggleZenMode.d.ts +10 -10
- package/types/actions/actionZindex.d.ts +8 -8
- package/types/actions/index.d.ts +1 -0
- package/types/actions/shortcuts.d.ts +1 -1
- package/types/actions/types.d.ts +1 -1
- package/types/appState.d.ts +6 -11
- package/types/clipboard.d.ts +6 -5
- package/types/components/Actions.d.ts +4 -9
- package/types/components/App.d.ts +32 -27
- package/types/components/ColorPicker/ColorInput.d.ts +3 -1
- package/types/components/ExcalidrawLogo.d.ts +15 -0
- package/types/components/EyeDropper.d.ts +18 -7
- package/types/components/JSONExportDialog.d.ts +1 -1
- package/types/components/LaserTool/LaserPathManager.d.ts +28 -0
- package/types/components/LaserTool/LaserPointerButton.d.ts +10 -0
- package/types/components/LaserTool/LaserTool.d.ts +7 -0
- package/types/components/LayerUI.d.ts +4 -5
- package/types/components/MobileMenu.d.ts +1 -5
- package/types/components/Sidebar/Sidebar.d.ts +1 -1
- package/types/components/Stack.d.ts +2 -2
- package/types/components/canvases/InteractiveCanvas.d.ts +27 -0
- package/types/components/canvases/StaticCanvas.d.ts +18 -0
- package/types/components/canvases/index.d.ts +3 -0
- package/types/components/dropdownMenu/DropdownMenu.d.ts +6 -3
- package/types/components/dropdownMenu/DropdownMenuItem.d.ts +2 -1
- package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +2 -1
- package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +2 -1
- package/types/components/dropdownMenu/common.d.ts +1 -1
- package/types/components/icons.d.ts +2 -0
- package/types/components/main-menu/MainMenu.d.ts +6 -3
- package/types/constants.d.ts +15 -0
- package/types/cursor.d.ts +5 -0
- package/types/data/blob.d.ts +2 -1
- package/types/data/transform.d.ts +71 -0
- package/types/element/Hyperlink.d.ts +11 -11
- package/types/element/binding.d.ts +1 -0
- package/types/element/bounds.d.ts +4 -5
- package/types/element/dragElements.d.ts +11 -2
- package/types/element/embeddable.d.ts +8 -8
- package/types/element/linearElementEditor.d.ts +13 -13
- package/types/element/mutateElement.d.ts +1 -1
- package/types/element/newElement.d.ts +10 -6
- package/types/element/resizeElements.d.ts +2 -2
- package/types/element/sizeHelpers.d.ts +8 -1
- package/types/element/textElement.d.ts +5 -7
- package/types/element/textWysiwyg.d.ts +1 -1
- package/types/element/transformHandles.d.ts +2 -2
- package/types/element/types.d.ts +5 -5
- package/types/emitter.d.ts +0 -1
- package/types/frame.d.ts +13 -5
- package/types/groups.d.ts +11 -11
- package/types/hooks/useStable.d.ts +1 -0
- package/types/keys.d.ts +1 -0
- package/types/math.d.ts +2 -0
- package/types/packages/excalidraw/example/initialData.d.ts +182 -70
- package/types/packages/excalidraw/index.d.ts +4 -2
- package/types/packages/excalidraw/main.d.ts +3 -1
- package/types/packages/utils.d.ts +1 -0
- package/types/renderer/renderElement.d.ts +9 -21
- package/types/renderer/renderScene.d.ts +16 -34
- package/types/renderer/renderSnaps.d.ts +2 -0
- package/types/scene/Renderer.d.ts +25 -0
- package/types/scene/Scene.d.ts +2 -0
- package/types/scene/Shape.d.ts +12 -0
- package/types/scene/ShapeCache.d.ts +20 -0
- package/types/scene/export.d.ts +33 -9
- package/types/scene/scroll.d.ts +1 -1
- package/types/scene/scrollbars.d.ts +2 -6
- package/types/scene/selection.d.ts +3 -2
- package/types/scene/types.d.ts +67 -31
- package/types/snapping.d.ts +108 -0
- package/types/types.d.ts +94 -19
- package/types/utils.d.ts +13 -10
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
object-assign
|
|
3
|
-
(c) Sindre Sorhus
|
|
4
|
-
@license MIT
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
1
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
8
2
|
|
|
9
3
|
/**
|
|
@@ -35,12 +29,3 @@ object-assign
|
|
|
35
29
|
* This source code is licensed under the MIT license found in the
|
|
36
30
|
* LICENSE file in the root directory of this source tree.
|
|
37
31
|
*/
|
|
38
|
-
|
|
39
|
-
/** @license React v17.0.2
|
|
40
|
-
* react-jsx-runtime.production.min.js
|
|
41
|
-
*
|
|
42
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the MIT license found in the
|
|
45
|
-
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/
|
package/main.js
CHANGED
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
process.env.NODE_ENV === "production" ||
|
|
3
|
-
window.__excalidraw_env__ === "production"
|
|
4
|
-
) {
|
|
5
|
-
module.exports = require("./dist/excalidraw.production.min.js");
|
|
6
|
-
} else {
|
|
7
|
-
module.exports = require("./dist/excalidraw.development.js");
|
|
8
|
-
}
|
|
1
|
+
module.exports = require("./dist/excalidraw.production.min.js");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dwelle/excalidraw",
|
|
3
|
-
"version": "0.4.0-
|
|
3
|
+
"version": "0.4.0-cf1ab8d",
|
|
4
4
|
"main": "main.js",
|
|
5
5
|
"types": "types/packages/excalidraw/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@babel/preset-env": "7.18.6",
|
|
46
46
|
"@babel/preset-react": "7.18.6",
|
|
47
47
|
"@babel/preset-typescript": "7.18.6",
|
|
48
|
-
"@size-limit/preset-big-lib": "
|
|
48
|
+
"@size-limit/preset-big-lib": "9.0.0",
|
|
49
49
|
"autoprefixer": "10.4.7",
|
|
50
50
|
"babel-loader": "8.2.5",
|
|
51
51
|
"babel-plugin-transform-class-properties": "6.24.1",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"mini-css-extract-plugin": "2.6.1",
|
|
57
57
|
"postcss-loader": "7.0.1",
|
|
58
58
|
"sass-loader": "13.0.2",
|
|
59
|
-
"size-limit": "
|
|
59
|
+
"size-limit": "9.0.0",
|
|
60
60
|
"style-loader": "3.3.3",
|
|
61
61
|
"terser-webpack-plugin": "5.3.3",
|
|
62
62
|
"ts-loader": "9.3.1",
|
|
@@ -40,15 +40,9 @@ export declare const actionAddToLibrary: {
|
|
|
40
40
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
41
41
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
42
42
|
activeTool: {
|
|
43
|
-
lastActiveTool: import("../types").
|
|
43
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
44
44
|
locked: boolean;
|
|
45
|
-
} & (
|
|
46
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
47
|
-
customType: null;
|
|
48
|
-
} | {
|
|
49
|
-
type: "custom";
|
|
50
|
-
customType: string;
|
|
51
|
-
});
|
|
45
|
+
} & import("../types").ActiveTool;
|
|
52
46
|
penMode: boolean;
|
|
53
47
|
penDetected: boolean;
|
|
54
48
|
exportBackground: boolean;
|
|
@@ -122,6 +116,12 @@ export declare const actionAddToLibrary: {
|
|
|
122
116
|
pendingImageElementId: string | null;
|
|
123
117
|
showHyperlinkPopup: false | "editor" | "info";
|
|
124
118
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
119
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
120
|
+
originSnapOffset: {
|
|
121
|
+
x: number;
|
|
122
|
+
y: number;
|
|
123
|
+
} | null;
|
|
124
|
+
objectsSnapModeEnabled: boolean;
|
|
125
125
|
};
|
|
126
126
|
} | {
|
|
127
127
|
commitToHistory: false;
|
|
@@ -157,15 +157,9 @@ export declare const actionAddToLibrary: {
|
|
|
157
157
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
158
158
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
159
159
|
activeTool: {
|
|
160
|
-
lastActiveTool: import("../types").
|
|
160
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
161
161
|
locked: boolean;
|
|
162
|
-
} & (
|
|
163
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
164
|
-
customType: null;
|
|
165
|
-
} | {
|
|
166
|
-
type: "custom";
|
|
167
|
-
customType: string;
|
|
168
|
-
});
|
|
162
|
+
} & import("../types").ActiveTool;
|
|
169
163
|
penMode: boolean;
|
|
170
164
|
penDetected: boolean;
|
|
171
165
|
exportBackground: boolean;
|
|
@@ -244,6 +238,12 @@ export declare const actionAddToLibrary: {
|
|
|
244
238
|
pendingImageElementId: string | null;
|
|
245
239
|
showHyperlinkPopup: false | "editor" | "info";
|
|
246
240
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
241
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
242
|
+
originSnapOffset: {
|
|
243
|
+
x: number;
|
|
244
|
+
y: number;
|
|
245
|
+
} | null;
|
|
246
|
+
objectsSnapModeEnabled: boolean;
|
|
247
247
|
};
|
|
248
248
|
}> | {
|
|
249
249
|
commitToHistory: false;
|
|
@@ -279,15 +279,9 @@ export declare const actionAddToLibrary: {
|
|
|
279
279
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
280
280
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
281
281
|
activeTool: {
|
|
282
|
-
lastActiveTool: import("../types").
|
|
282
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
283
283
|
locked: boolean;
|
|
284
|
-
} & (
|
|
285
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
286
|
-
customType: null;
|
|
287
|
-
} | {
|
|
288
|
-
type: "custom";
|
|
289
|
-
customType: string;
|
|
290
|
-
});
|
|
284
|
+
} & import("../types").ActiveTool;
|
|
291
285
|
penMode: boolean;
|
|
292
286
|
penDetected: boolean;
|
|
293
287
|
exportBackground: boolean;
|
|
@@ -366,6 +360,12 @@ export declare const actionAddToLibrary: {
|
|
|
366
360
|
pendingImageElementId: string | null;
|
|
367
361
|
showHyperlinkPopup: false | "editor" | "info";
|
|
368
362
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
363
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
364
|
+
originSnapOffset: {
|
|
365
|
+
x: number;
|
|
366
|
+
y: number;
|
|
367
|
+
} | null;
|
|
368
|
+
objectsSnapModeEnabled: boolean;
|
|
369
369
|
};
|
|
370
370
|
};
|
|
371
371
|
contextItemLabel: string;
|
|
@@ -11,10 +11,10 @@ export declare const actionAlignTop: {
|
|
|
11
11
|
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
12
12
|
commitToHistory: true;
|
|
13
13
|
};
|
|
14
|
-
keyTest: (event:
|
|
14
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
15
15
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
16
16
|
} & {
|
|
17
|
-
keyTest?: ((event:
|
|
17
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
18
18
|
};
|
|
19
19
|
export declare const actionAlignBottom: {
|
|
20
20
|
name: "alignBottom";
|
|
@@ -27,10 +27,10 @@ export declare const actionAlignBottom: {
|
|
|
27
27
|
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
28
28
|
commitToHistory: true;
|
|
29
29
|
};
|
|
30
|
-
keyTest: (event:
|
|
30
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
31
31
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
32
32
|
} & {
|
|
33
|
-
keyTest?: ((event:
|
|
33
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
34
34
|
};
|
|
35
35
|
export declare const actionAlignLeft: {
|
|
36
36
|
name: "alignLeft";
|
|
@@ -43,10 +43,10 @@ export declare const actionAlignLeft: {
|
|
|
43
43
|
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
44
44
|
commitToHistory: true;
|
|
45
45
|
};
|
|
46
|
-
keyTest: (event:
|
|
46
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
47
47
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
48
48
|
} & {
|
|
49
|
-
keyTest?: ((event:
|
|
49
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
50
50
|
};
|
|
51
51
|
export declare const actionAlignRight: {
|
|
52
52
|
name: "alignRight";
|
|
@@ -59,10 +59,10 @@ export declare const actionAlignRight: {
|
|
|
59
59
|
elements: import("../scene/Scene").ExcalidrawElementsIncludingDeleted;
|
|
60
60
|
commitToHistory: true;
|
|
61
61
|
};
|
|
62
|
-
keyTest: (event:
|
|
62
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
63
63
|
PanelComponent: ({ elements, appState, updateData, app }: import("./types").PanelComponentProps) => JSX.Element;
|
|
64
64
|
} & {
|
|
65
|
-
keyTest?: ((event:
|
|
65
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
66
66
|
};
|
|
67
67
|
export declare const actionAlignVerticallyCentered: {
|
|
68
68
|
name: "alignVerticallyCentered";
|
|
@@ -60,15 +60,9 @@ export declare const actionBindText: {
|
|
|
60
60
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
61
61
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
62
62
|
activeTool: {
|
|
63
|
-
lastActiveTool: import("../types").
|
|
63
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
64
64
|
locked: boolean;
|
|
65
|
-
} & (
|
|
66
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
67
|
-
customType: null;
|
|
68
|
-
} | {
|
|
69
|
-
type: "custom";
|
|
70
|
-
customType: string;
|
|
71
|
-
});
|
|
65
|
+
} & import("../types").ActiveTool;
|
|
72
66
|
penMode: boolean;
|
|
73
67
|
penDetected: boolean;
|
|
74
68
|
exportBackground: boolean;
|
|
@@ -144,6 +138,12 @@ export declare const actionBindText: {
|
|
|
144
138
|
pendingImageElementId: string | null;
|
|
145
139
|
showHyperlinkPopup: false | "editor" | "info";
|
|
146
140
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
141
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
142
|
+
originSnapOffset: {
|
|
143
|
+
x: number;
|
|
144
|
+
y: number;
|
|
145
|
+
} | null;
|
|
146
|
+
objectsSnapModeEnabled: boolean;
|
|
147
147
|
};
|
|
148
148
|
commitToHistory: true;
|
|
149
149
|
};
|
|
@@ -194,15 +194,9 @@ export declare const actionWrapTextInContainer: {
|
|
|
194
194
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
195
195
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
196
196
|
activeTool: {
|
|
197
|
-
lastActiveTool: import("../types").
|
|
197
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
198
198
|
locked: boolean;
|
|
199
|
-
} & (
|
|
200
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
201
|
-
customType: null;
|
|
202
|
-
} | {
|
|
203
|
-
type: "custom";
|
|
204
|
-
customType: string;
|
|
205
|
-
});
|
|
199
|
+
} & import("../types").ActiveTool;
|
|
206
200
|
penMode: boolean;
|
|
207
201
|
penDetected: boolean;
|
|
208
202
|
exportBackground: boolean;
|
|
@@ -278,6 +272,12 @@ export declare const actionWrapTextInContainer: {
|
|
|
278
272
|
pendingImageElementId: string | null;
|
|
279
273
|
showHyperlinkPopup: false | "editor" | "info";
|
|
280
274
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
275
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
276
|
+
originSnapOffset: {
|
|
277
|
+
x: number;
|
|
278
|
+
y: number;
|
|
279
|
+
} | null;
|
|
280
|
+
objectsSnapModeEnabled: boolean;
|
|
281
281
|
};
|
|
282
282
|
commitToHistory: true;
|
|
283
283
|
};
|