@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,4 +1,4 @@
|
|
|
1
|
-
import { Theme } from "../element/types";
|
|
1
|
+
import { NonDeletedExcalidrawElement, Theme } from "../element/types";
|
|
2
2
|
import "../components/ToolIcon.scss";
|
|
3
3
|
export declare const actionChangeProjectName: {
|
|
4
4
|
name: "changeProjectName";
|
|
@@ -15,13 +15,13 @@ export declare const actionChangeProjectName: {
|
|
|
15
15
|
isLoading: boolean;
|
|
16
16
|
errorMessage: import("react").ReactNode;
|
|
17
17
|
activeEmbeddable: {
|
|
18
|
-
element:
|
|
18
|
+
element: NonDeletedExcalidrawElement;
|
|
19
19
|
state: "active" | "hover";
|
|
20
20
|
} | null;
|
|
21
|
-
draggingElement:
|
|
22
|
-
resizingElement:
|
|
21
|
+
draggingElement: NonDeletedExcalidrawElement | null;
|
|
22
|
+
resizingElement: NonDeletedExcalidrawElement | null;
|
|
23
23
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
24
|
-
selectionElement:
|
|
24
|
+
selectionElement: NonDeletedExcalidrawElement | null;
|
|
25
25
|
isBindingEnabled: boolean;
|
|
26
26
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
27
27
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
@@ -34,18 +34,12 @@ export declare const actionChangeProjectName: {
|
|
|
34
34
|
};
|
|
35
35
|
editingFrame: string | null;
|
|
36
36
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
37
|
-
editingElement:
|
|
37
|
+
editingElement: NonDeletedExcalidrawElement | null;
|
|
38
38
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
39
39
|
activeTool: {
|
|
40
|
-
lastActiveTool: import("../types").
|
|
40
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
41
41
|
locked: boolean;
|
|
42
|
-
} & (
|
|
43
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
44
|
-
customType: null;
|
|
45
|
-
} | {
|
|
46
|
-
type: "custom";
|
|
47
|
-
customType: string;
|
|
48
|
-
});
|
|
42
|
+
} & import("../types").ActiveTool;
|
|
49
43
|
penMode: boolean;
|
|
50
44
|
penDetected: boolean;
|
|
51
45
|
exportBackground: boolean;
|
|
@@ -123,6 +117,12 @@ export declare const actionChangeProjectName: {
|
|
|
123
117
|
pendingImageElementId: string | null;
|
|
124
118
|
showHyperlinkPopup: false | "editor" | "info";
|
|
125
119
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
120
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
121
|
+
originSnapOffset: {
|
|
122
|
+
x: number;
|
|
123
|
+
y: number;
|
|
124
|
+
} | null;
|
|
125
|
+
objectsSnapModeEnabled: boolean;
|
|
126
126
|
};
|
|
127
127
|
commitToHistory: false;
|
|
128
128
|
};
|
|
@@ -148,13 +148,13 @@ export declare const actionChangeExportScale: {
|
|
|
148
148
|
isLoading: boolean;
|
|
149
149
|
errorMessage: import("react").ReactNode;
|
|
150
150
|
activeEmbeddable: {
|
|
151
|
-
element:
|
|
151
|
+
element: NonDeletedExcalidrawElement;
|
|
152
152
|
state: "active" | "hover";
|
|
153
153
|
} | null;
|
|
154
|
-
draggingElement:
|
|
155
|
-
resizingElement:
|
|
154
|
+
draggingElement: NonDeletedExcalidrawElement | null;
|
|
155
|
+
resizingElement: NonDeletedExcalidrawElement | null;
|
|
156
156
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
157
|
-
selectionElement:
|
|
157
|
+
selectionElement: NonDeletedExcalidrawElement | null;
|
|
158
158
|
isBindingEnabled: boolean;
|
|
159
159
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
160
160
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
@@ -167,18 +167,12 @@ export declare const actionChangeExportScale: {
|
|
|
167
167
|
};
|
|
168
168
|
editingFrame: string | null;
|
|
169
169
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
170
|
-
editingElement:
|
|
170
|
+
editingElement: NonDeletedExcalidrawElement | null;
|
|
171
171
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
172
172
|
activeTool: {
|
|
173
|
-
lastActiveTool: import("../types").
|
|
173
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
174
174
|
locked: boolean;
|
|
175
|
-
} & (
|
|
176
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
177
|
-
customType: null;
|
|
178
|
-
} | {
|
|
179
|
-
type: "custom";
|
|
180
|
-
customType: string;
|
|
181
|
-
});
|
|
175
|
+
} & import("../types").ActiveTool;
|
|
182
176
|
penMode: boolean;
|
|
183
177
|
penDetected: boolean;
|
|
184
178
|
exportBackground: boolean;
|
|
@@ -256,6 +250,12 @@ export declare const actionChangeExportScale: {
|
|
|
256
250
|
pendingImageElementId: string | null;
|
|
257
251
|
showHyperlinkPopup: false | "editor" | "info";
|
|
258
252
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
253
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
254
|
+
originSnapOffset: {
|
|
255
|
+
x: number;
|
|
256
|
+
y: number;
|
|
257
|
+
} | null;
|
|
258
|
+
objectsSnapModeEnabled: boolean;
|
|
259
259
|
};
|
|
260
260
|
commitToHistory: false;
|
|
261
261
|
};
|
|
@@ -281,13 +281,13 @@ export declare const actionChangeExportBackground: {
|
|
|
281
281
|
isLoading: boolean;
|
|
282
282
|
errorMessage: import("react").ReactNode;
|
|
283
283
|
activeEmbeddable: {
|
|
284
|
-
element:
|
|
284
|
+
element: NonDeletedExcalidrawElement;
|
|
285
285
|
state: "active" | "hover";
|
|
286
286
|
} | null;
|
|
287
|
-
draggingElement:
|
|
288
|
-
resizingElement:
|
|
287
|
+
draggingElement: NonDeletedExcalidrawElement | null;
|
|
288
|
+
resizingElement: NonDeletedExcalidrawElement | null;
|
|
289
289
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
290
|
-
selectionElement:
|
|
290
|
+
selectionElement: NonDeletedExcalidrawElement | null;
|
|
291
291
|
isBindingEnabled: boolean;
|
|
292
292
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
293
293
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
@@ -300,18 +300,12 @@ export declare const actionChangeExportBackground: {
|
|
|
300
300
|
};
|
|
301
301
|
editingFrame: string | null;
|
|
302
302
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
303
|
-
editingElement:
|
|
303
|
+
editingElement: NonDeletedExcalidrawElement | null;
|
|
304
304
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
305
305
|
activeTool: {
|
|
306
|
-
lastActiveTool: import("../types").
|
|
306
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
307
307
|
locked: boolean;
|
|
308
|
-
} & (
|
|
309
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
310
|
-
customType: null;
|
|
311
|
-
} | {
|
|
312
|
-
type: "custom";
|
|
313
|
-
customType: string;
|
|
314
|
-
});
|
|
308
|
+
} & import("../types").ActiveTool;
|
|
315
309
|
penMode: boolean;
|
|
316
310
|
penDetected: boolean;
|
|
317
311
|
exportEmbedScene: boolean;
|
|
@@ -389,6 +383,12 @@ export declare const actionChangeExportBackground: {
|
|
|
389
383
|
pendingImageElementId: string | null;
|
|
390
384
|
showHyperlinkPopup: false | "editor" | "info";
|
|
391
385
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
386
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
387
|
+
originSnapOffset: {
|
|
388
|
+
x: number;
|
|
389
|
+
y: number;
|
|
390
|
+
} | null;
|
|
391
|
+
objectsSnapModeEnabled: boolean;
|
|
392
392
|
};
|
|
393
393
|
commitToHistory: false;
|
|
394
394
|
};
|
|
@@ -414,13 +414,13 @@ export declare const actionChangeExportEmbedScene: {
|
|
|
414
414
|
isLoading: boolean;
|
|
415
415
|
errorMessage: import("react").ReactNode;
|
|
416
416
|
activeEmbeddable: {
|
|
417
|
-
element:
|
|
417
|
+
element: NonDeletedExcalidrawElement;
|
|
418
418
|
state: "active" | "hover";
|
|
419
419
|
} | null;
|
|
420
|
-
draggingElement:
|
|
421
|
-
resizingElement:
|
|
420
|
+
draggingElement: NonDeletedExcalidrawElement | null;
|
|
421
|
+
resizingElement: NonDeletedExcalidrawElement | null;
|
|
422
422
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
423
|
-
selectionElement:
|
|
423
|
+
selectionElement: NonDeletedExcalidrawElement | null;
|
|
424
424
|
isBindingEnabled: boolean;
|
|
425
425
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
426
426
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
@@ -433,18 +433,12 @@ export declare const actionChangeExportEmbedScene: {
|
|
|
433
433
|
};
|
|
434
434
|
editingFrame: string | null;
|
|
435
435
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
436
|
-
editingElement:
|
|
436
|
+
editingElement: NonDeletedExcalidrawElement | null;
|
|
437
437
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
438
438
|
activeTool: {
|
|
439
|
-
lastActiveTool: import("../types").
|
|
439
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
440
440
|
locked: boolean;
|
|
441
|
-
} & (
|
|
442
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
443
|
-
customType: null;
|
|
444
|
-
} | {
|
|
445
|
-
type: "custom";
|
|
446
|
-
customType: string;
|
|
447
|
-
});
|
|
441
|
+
} & import("../types").ActiveTool;
|
|
448
442
|
penMode: boolean;
|
|
449
443
|
penDetected: boolean;
|
|
450
444
|
exportBackground: boolean;
|
|
@@ -522,6 +516,12 @@ export declare const actionChangeExportEmbedScene: {
|
|
|
522
516
|
pendingImageElementId: string | null;
|
|
523
517
|
showHyperlinkPopup: false | "editor" | "info";
|
|
524
518
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
519
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
520
|
+
originSnapOffset: {
|
|
521
|
+
x: number;
|
|
522
|
+
y: number;
|
|
523
|
+
} | null;
|
|
524
|
+
objectsSnapModeEnabled: boolean;
|
|
525
525
|
};
|
|
526
526
|
commitToHistory: false;
|
|
527
527
|
};
|
|
@@ -551,13 +551,13 @@ export declare const actionSaveToActiveFile: {
|
|
|
551
551
|
isLoading: boolean;
|
|
552
552
|
errorMessage: import("react").ReactNode;
|
|
553
553
|
activeEmbeddable: {
|
|
554
|
-
element:
|
|
554
|
+
element: NonDeletedExcalidrawElement;
|
|
555
555
|
state: "active" | "hover";
|
|
556
556
|
} | null;
|
|
557
|
-
draggingElement:
|
|
558
|
-
resizingElement:
|
|
557
|
+
draggingElement: NonDeletedExcalidrawElement | null;
|
|
558
|
+
resizingElement: NonDeletedExcalidrawElement | null;
|
|
559
559
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
560
|
-
selectionElement:
|
|
560
|
+
selectionElement: NonDeletedExcalidrawElement | null;
|
|
561
561
|
isBindingEnabled: boolean;
|
|
562
562
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
563
563
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
@@ -570,18 +570,12 @@ export declare const actionSaveToActiveFile: {
|
|
|
570
570
|
};
|
|
571
571
|
editingFrame: string | null;
|
|
572
572
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
573
|
-
editingElement:
|
|
573
|
+
editingElement: NonDeletedExcalidrawElement | null;
|
|
574
574
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
575
575
|
activeTool: {
|
|
576
|
-
lastActiveTool: import("../types").
|
|
576
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
577
577
|
locked: boolean;
|
|
578
|
-
} & (
|
|
579
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
580
|
-
customType: null;
|
|
581
|
-
} | {
|
|
582
|
-
type: "custom";
|
|
583
|
-
customType: string;
|
|
584
|
-
});
|
|
578
|
+
} & import("../types").ActiveTool;
|
|
585
579
|
penMode: boolean;
|
|
586
580
|
penDetected: boolean;
|
|
587
581
|
exportBackground: boolean;
|
|
@@ -654,14 +648,20 @@ export declare const actionSaveToActiveFile: {
|
|
|
654
648
|
pendingImageElementId: string | null;
|
|
655
649
|
showHyperlinkPopup: false | "editor" | "info";
|
|
656
650
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
651
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
652
|
+
originSnapOffset: {
|
|
653
|
+
x: number;
|
|
654
|
+
y: number;
|
|
655
|
+
} | null;
|
|
656
|
+
objectsSnapModeEnabled: boolean;
|
|
657
657
|
};
|
|
658
658
|
} | {
|
|
659
659
|
commitToHistory: false;
|
|
660
660
|
appState?: undefined;
|
|
661
661
|
}>;
|
|
662
|
-
keyTest: (event:
|
|
662
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
663
663
|
} & {
|
|
664
|
-
keyTest?: ((event:
|
|
664
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
665
665
|
};
|
|
666
666
|
export declare const actionSaveFileToDisk: {
|
|
667
667
|
name: "saveFileToDisk";
|
|
@@ -672,7 +672,11 @@ export declare const actionSaveFileToDisk: {
|
|
|
672
672
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, value: any, app: import("../types").AppClassProperties) => Promise<{
|
|
673
673
|
commitToHistory: false;
|
|
674
674
|
appState: {
|
|
675
|
+
openDialog: null;
|
|
675
676
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
677
|
+
toast: {
|
|
678
|
+
message: string;
|
|
679
|
+
};
|
|
676
680
|
contextMenu: {
|
|
677
681
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
678
682
|
top: number;
|
|
@@ -682,13 +686,13 @@ export declare const actionSaveFileToDisk: {
|
|
|
682
686
|
isLoading: boolean;
|
|
683
687
|
errorMessage: import("react").ReactNode;
|
|
684
688
|
activeEmbeddable: {
|
|
685
|
-
element:
|
|
689
|
+
element: NonDeletedExcalidrawElement;
|
|
686
690
|
state: "active" | "hover";
|
|
687
691
|
} | null;
|
|
688
|
-
draggingElement:
|
|
689
|
-
resizingElement:
|
|
692
|
+
draggingElement: NonDeletedExcalidrawElement | null;
|
|
693
|
+
resizingElement: NonDeletedExcalidrawElement | null;
|
|
690
694
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
691
|
-
selectionElement:
|
|
695
|
+
selectionElement: NonDeletedExcalidrawElement | null;
|
|
692
696
|
isBindingEnabled: boolean;
|
|
693
697
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
694
698
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
@@ -701,18 +705,12 @@ export declare const actionSaveFileToDisk: {
|
|
|
701
705
|
};
|
|
702
706
|
editingFrame: string | null;
|
|
703
707
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
704
|
-
editingElement:
|
|
708
|
+
editingElement: NonDeletedExcalidrawElement | null;
|
|
705
709
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
706
710
|
activeTool: {
|
|
707
|
-
lastActiveTool: import("../types").
|
|
711
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
708
712
|
locked: boolean;
|
|
709
|
-
} & (
|
|
710
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
711
|
-
customType: null;
|
|
712
|
-
} | {
|
|
713
|
-
type: "custom";
|
|
714
|
-
customType: string;
|
|
715
|
-
});
|
|
713
|
+
} & import("../types").ActiveTool;
|
|
716
714
|
penMode: boolean;
|
|
717
715
|
penDetected: boolean;
|
|
718
716
|
exportBackground: boolean;
|
|
@@ -749,7 +747,6 @@ export declare const actionSaveFileToDisk: {
|
|
|
749
747
|
name: string;
|
|
750
748
|
tab?: string | undefined;
|
|
751
749
|
} | null;
|
|
752
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
753
750
|
defaultSidebarDockedPreference: boolean;
|
|
754
751
|
lastPointerDownWith: import("../element/types").PointerType;
|
|
755
752
|
selectedElementIds: Readonly<{
|
|
@@ -760,11 +757,6 @@ export declare const actionSaveFileToDisk: {
|
|
|
760
757
|
};
|
|
761
758
|
selectedElementsAreBeingDragged: boolean;
|
|
762
759
|
shouldCacheIgnoreZoom: boolean;
|
|
763
|
-
toast: {
|
|
764
|
-
message: string;
|
|
765
|
-
closable?: boolean | undefined;
|
|
766
|
-
duration?: number | undefined;
|
|
767
|
-
} | null;
|
|
768
760
|
zenModeEnabled: boolean;
|
|
769
761
|
theme: Theme;
|
|
770
762
|
gridSize: number | null;
|
|
@@ -790,15 +782,21 @@ export declare const actionSaveFileToDisk: {
|
|
|
790
782
|
pendingImageElementId: string | null;
|
|
791
783
|
showHyperlinkPopup: false | "editor" | "info";
|
|
792
784
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
785
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
786
|
+
originSnapOffset: {
|
|
787
|
+
x: number;
|
|
788
|
+
y: number;
|
|
789
|
+
} | null;
|
|
790
|
+
objectsSnapModeEnabled: boolean;
|
|
793
791
|
};
|
|
794
792
|
} | {
|
|
795
793
|
commitToHistory: false;
|
|
796
794
|
appState?: undefined;
|
|
797
795
|
}>;
|
|
798
|
-
keyTest: (event:
|
|
796
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
799
797
|
PanelComponent: ({ updateData }: import("./types").PanelComponentProps) => JSX.Element;
|
|
800
798
|
} & {
|
|
801
|
-
keyTest?: ((event:
|
|
799
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
802
800
|
};
|
|
803
801
|
export declare const actionLoadScene: {
|
|
804
802
|
name: "loadScene";
|
|
@@ -809,25 +807,11 @@ export declare const actionLoadScene: {
|
|
|
809
807
|
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<import("../types").AppState>, _: any, app: import("../types").AppClassProperties) => Promise<false | {
|
|
810
808
|
elements: import("../element/types").ExcalidrawElement[];
|
|
811
809
|
appState: {
|
|
812
|
-
theme: Theme;
|
|
813
|
-
name: string;
|
|
814
810
|
activeTool: {
|
|
815
|
-
lastActiveTool: import("../types").
|
|
811
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
816
812
|
locked: boolean;
|
|
817
|
-
} & (
|
|
818
|
-
|
|
819
|
-
customType: null;
|
|
820
|
-
} | {
|
|
821
|
-
type: "custom";
|
|
822
|
-
customType: string;
|
|
823
|
-
});
|
|
824
|
-
toast: {
|
|
825
|
-
message: string;
|
|
826
|
-
closable?: boolean | undefined;
|
|
827
|
-
duration?: number | undefined;
|
|
828
|
-
} | null;
|
|
829
|
-
collaborators: Map<string, import("../types").Collaborator>;
|
|
830
|
-
penMode: boolean;
|
|
813
|
+
} & import("../types").ActiveTool;
|
|
814
|
+
name: string;
|
|
831
815
|
contextMenu: {
|
|
832
816
|
items: import("../components/ContextMenu").ContextMenuItems;
|
|
833
817
|
top: number;
|
|
@@ -837,13 +821,13 @@ export declare const actionLoadScene: {
|
|
|
837
821
|
isLoading: boolean;
|
|
838
822
|
errorMessage: import("react").ReactNode;
|
|
839
823
|
activeEmbeddable: {
|
|
840
|
-
element:
|
|
824
|
+
element: NonDeletedExcalidrawElement;
|
|
841
825
|
state: "active" | "hover";
|
|
842
826
|
} | null;
|
|
843
|
-
draggingElement:
|
|
844
|
-
resizingElement:
|
|
827
|
+
draggingElement: NonDeletedExcalidrawElement | null;
|
|
828
|
+
resizingElement: NonDeletedExcalidrawElement | null;
|
|
845
829
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
846
|
-
selectionElement:
|
|
830
|
+
selectionElement: NonDeletedExcalidrawElement | null;
|
|
847
831
|
isBindingEnabled: boolean;
|
|
848
832
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
849
833
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
@@ -856,8 +840,9 @@ export declare const actionLoadScene: {
|
|
|
856
840
|
};
|
|
857
841
|
editingFrame: string | null;
|
|
858
842
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
859
|
-
editingElement:
|
|
843
|
+
editingElement: NonDeletedExcalidrawElement | null;
|
|
860
844
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
845
|
+
penMode: boolean;
|
|
861
846
|
penDetected: boolean;
|
|
862
847
|
exportBackground: boolean;
|
|
863
848
|
exportEmbedScene: boolean;
|
|
@@ -903,7 +888,13 @@ export declare const actionLoadScene: {
|
|
|
903
888
|
};
|
|
904
889
|
selectedElementsAreBeingDragged: boolean;
|
|
905
890
|
shouldCacheIgnoreZoom: boolean;
|
|
891
|
+
toast: {
|
|
892
|
+
message: string;
|
|
893
|
+
closable?: boolean | undefined;
|
|
894
|
+
duration?: number | undefined;
|
|
895
|
+
} | null;
|
|
906
896
|
zenModeEnabled: boolean;
|
|
897
|
+
theme: Theme;
|
|
907
898
|
gridSize: number | null;
|
|
908
899
|
viewModeEnabled: boolean;
|
|
909
900
|
selectedGroupIds: {
|
|
@@ -911,6 +902,7 @@ export declare const actionLoadScene: {
|
|
|
911
902
|
};
|
|
912
903
|
editingGroupId: string | null;
|
|
913
904
|
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
905
|
+
collaborators: Map<string, import("../types").Collaborator>;
|
|
914
906
|
showStats: boolean;
|
|
915
907
|
currentChartType: import("../element/types").ChartType;
|
|
916
908
|
pasteDialog: {
|
|
@@ -923,6 +915,12 @@ export declare const actionLoadScene: {
|
|
|
923
915
|
pendingImageElementId: string | null;
|
|
924
916
|
showHyperlinkPopup: false | "editor" | "info";
|
|
925
917
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
918
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
919
|
+
originSnapOffset: {
|
|
920
|
+
x: number;
|
|
921
|
+
y: number;
|
|
922
|
+
} | null;
|
|
923
|
+
objectsSnapModeEnabled: boolean;
|
|
926
924
|
};
|
|
927
925
|
files: import("../types").BinaryFiles;
|
|
928
926
|
commitToHistory: true;
|
|
@@ -938,13 +936,13 @@ export declare const actionLoadScene: {
|
|
|
938
936
|
showWelcomeScreen: boolean;
|
|
939
937
|
isLoading: boolean;
|
|
940
938
|
activeEmbeddable: {
|
|
941
|
-
element:
|
|
939
|
+
element: NonDeletedExcalidrawElement;
|
|
942
940
|
state: "active" | "hover";
|
|
943
941
|
} | null;
|
|
944
|
-
draggingElement:
|
|
945
|
-
resizingElement:
|
|
942
|
+
draggingElement: NonDeletedExcalidrawElement | null;
|
|
943
|
+
resizingElement: NonDeletedExcalidrawElement | null;
|
|
946
944
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
947
|
-
selectionElement:
|
|
945
|
+
selectionElement: NonDeletedExcalidrawElement | null;
|
|
948
946
|
isBindingEnabled: boolean;
|
|
949
947
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
950
948
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
@@ -957,18 +955,12 @@ export declare const actionLoadScene: {
|
|
|
957
955
|
};
|
|
958
956
|
editingFrame: string | null;
|
|
959
957
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
960
|
-
editingElement:
|
|
958
|
+
editingElement: NonDeletedExcalidrawElement | null;
|
|
961
959
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
962
960
|
activeTool: {
|
|
963
|
-
lastActiveTool: import("../types").
|
|
961
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
964
962
|
locked: boolean;
|
|
965
|
-
} & (
|
|
966
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
967
|
-
customType: null;
|
|
968
|
-
} | {
|
|
969
|
-
type: "custom";
|
|
970
|
-
customType: string;
|
|
971
|
-
});
|
|
963
|
+
} & import("../types").ActiveTool;
|
|
972
964
|
penMode: boolean;
|
|
973
965
|
penDetected: boolean;
|
|
974
966
|
exportBackground: boolean;
|
|
@@ -1047,13 +1039,19 @@ export declare const actionLoadScene: {
|
|
|
1047
1039
|
pendingImageElementId: string | null;
|
|
1048
1040
|
showHyperlinkPopup: false | "editor" | "info";
|
|
1049
1041
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1042
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
1043
|
+
originSnapOffset: {
|
|
1044
|
+
x: number;
|
|
1045
|
+
y: number;
|
|
1046
|
+
} | null;
|
|
1047
|
+
objectsSnapModeEnabled: boolean;
|
|
1050
1048
|
};
|
|
1051
1049
|
files: import("../types").BinaryFiles;
|
|
1052
1050
|
commitToHistory: false;
|
|
1053
1051
|
}>;
|
|
1054
|
-
keyTest: (event:
|
|
1052
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean;
|
|
1055
1053
|
} & {
|
|
1056
|
-
keyTest?: ((event:
|
|
1054
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent) => boolean) | undefined;
|
|
1057
1055
|
};
|
|
1058
1056
|
export declare const actionExportWithDarkMode: {
|
|
1059
1057
|
name: "exportWithDarkMode";
|
|
@@ -1073,13 +1071,13 @@ export declare const actionExportWithDarkMode: {
|
|
|
1073
1071
|
isLoading: boolean;
|
|
1074
1072
|
errorMessage: import("react").ReactNode;
|
|
1075
1073
|
activeEmbeddable: {
|
|
1076
|
-
element:
|
|
1074
|
+
element: NonDeletedExcalidrawElement;
|
|
1077
1075
|
state: "active" | "hover";
|
|
1078
1076
|
} | null;
|
|
1079
|
-
draggingElement:
|
|
1080
|
-
resizingElement:
|
|
1077
|
+
draggingElement: NonDeletedExcalidrawElement | null;
|
|
1078
|
+
resizingElement: NonDeletedExcalidrawElement | null;
|
|
1081
1079
|
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
1082
|
-
selectionElement:
|
|
1080
|
+
selectionElement: NonDeletedExcalidrawElement | null;
|
|
1083
1081
|
isBindingEnabled: boolean;
|
|
1084
1082
|
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
1085
1083
|
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
@@ -1092,18 +1090,12 @@ export declare const actionExportWithDarkMode: {
|
|
|
1092
1090
|
};
|
|
1093
1091
|
editingFrame: string | null;
|
|
1094
1092
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
1095
|
-
editingElement:
|
|
1093
|
+
editingElement: NonDeletedExcalidrawElement | null;
|
|
1096
1094
|
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1097
1095
|
activeTool: {
|
|
1098
|
-
lastActiveTool: import("../types").
|
|
1096
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
1099
1097
|
locked: boolean;
|
|
1100
|
-
} & (
|
|
1101
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
1102
|
-
customType: null;
|
|
1103
|
-
} | {
|
|
1104
|
-
type: "custom";
|
|
1105
|
-
customType: string;
|
|
1106
|
-
});
|
|
1098
|
+
} & import("../types").ActiveTool;
|
|
1107
1099
|
penMode: boolean;
|
|
1108
1100
|
penDetected: boolean;
|
|
1109
1101
|
exportBackground: boolean;
|
|
@@ -1181,6 +1173,12 @@ export declare const actionExportWithDarkMode: {
|
|
|
1181
1173
|
pendingImageElementId: string | null;
|
|
1182
1174
|
showHyperlinkPopup: false | "editor" | "info";
|
|
1183
1175
|
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
1176
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
1177
|
+
originSnapOffset: {
|
|
1178
|
+
x: number;
|
|
1179
|
+
y: number;
|
|
1180
|
+
} | null;
|
|
1181
|
+
objectsSnapModeEnabled: boolean;
|
|
1184
1182
|
};
|
|
1185
1183
|
commitToHistory: false;
|
|
1186
1184
|
};
|
|
@@ -3,7 +3,7 @@ import { AppState } from "../types";
|
|
|
3
3
|
export declare const actionFinalize: {
|
|
4
4
|
name: "finalize";
|
|
5
5
|
trackEvent: false;
|
|
6
|
-
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<AppState>, _: any, {
|
|
6
|
+
perform: (elements: readonly import("../element/types").ExcalidrawElement[], appState: Readonly<AppState>, _: any, { interactiveCanvas, focusContainer, scene }: import("../types").AppClassProperties) => {
|
|
7
7
|
elements: import("../element/types").ExcalidrawElement[] | undefined;
|
|
8
8
|
appState: {
|
|
9
9
|
cursorButton: "up";
|
|
@@ -38,15 +38,9 @@ export declare const actionFinalize: {
|
|
|
38
38
|
elementsToHighlight: import("../element/types").NonDeleted<import("../element/types").ExcalidrawElement>[] | null;
|
|
39
39
|
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
40
40
|
activeTool: {
|
|
41
|
-
lastActiveTool: import("../types").
|
|
41
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
42
42
|
locked: boolean;
|
|
43
|
-
} & (
|
|
44
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
45
|
-
customType: null;
|
|
46
|
-
} | {
|
|
47
|
-
type: "custom";
|
|
48
|
-
customType: string;
|
|
49
|
-
});
|
|
43
|
+
} & import("../types").ActiveTool;
|
|
50
44
|
penMode: boolean;
|
|
51
45
|
penDetected: boolean;
|
|
52
46
|
exportBackground: boolean;
|
|
@@ -124,6 +118,12 @@ export declare const actionFinalize: {
|
|
|
124
118
|
pendingImageElementId: string | null;
|
|
125
119
|
showHyperlinkPopup: false | "editor" | "info";
|
|
126
120
|
selectedLinearElement: LinearElementEditor | null;
|
|
121
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
122
|
+
originSnapOffset: {
|
|
123
|
+
x: number;
|
|
124
|
+
y: number;
|
|
125
|
+
} | null;
|
|
126
|
+
objectsSnapModeEnabled: boolean;
|
|
127
127
|
};
|
|
128
128
|
commitToHistory: true;
|
|
129
129
|
} | {
|
|
@@ -131,15 +131,9 @@ export declare const actionFinalize: {
|
|
|
131
131
|
appState: {
|
|
132
132
|
cursorButton: "up";
|
|
133
133
|
activeTool: {
|
|
134
|
-
lastActiveTool: import("../types").
|
|
134
|
+
lastActiveTool: import("../types").ActiveTool | null;
|
|
135
135
|
locked: boolean;
|
|
136
|
-
} & (
|
|
137
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "embeddable" | "image" | "frame" | "freedraw" | "eraser" | "hand";
|
|
138
|
-
customType: null;
|
|
139
|
-
} | {
|
|
140
|
-
type: "custom";
|
|
141
|
-
customType: string;
|
|
142
|
-
});
|
|
136
|
+
} & import("../types").ActiveTool;
|
|
143
137
|
activeEmbeddable: null;
|
|
144
138
|
draggingElement: null;
|
|
145
139
|
multiElement: null;
|
|
@@ -244,11 +238,17 @@ export declare const actionFinalize: {
|
|
|
244
238
|
data: import("../charts").Spreadsheet;
|
|
245
239
|
};
|
|
246
240
|
showHyperlinkPopup: false | "editor" | "info";
|
|
241
|
+
snapLines: readonly import("../snapping").SnapLine[];
|
|
242
|
+
originSnapOffset: {
|
|
243
|
+
x: number;
|
|
244
|
+
y: number;
|
|
245
|
+
} | null;
|
|
246
|
+
objectsSnapModeEnabled: boolean;
|
|
247
247
|
};
|
|
248
248
|
commitToHistory: boolean;
|
|
249
249
|
};
|
|
250
|
-
keyTest: (event:
|
|
250
|
+
keyTest: (event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: AppState) => boolean;
|
|
251
251
|
PanelComponent: ({ appState, updateData, data }: import("./types").PanelComponentProps) => JSX.Element;
|
|
252
252
|
} & {
|
|
253
|
-
keyTest?: ((event:
|
|
253
|
+
keyTest?: ((event: import("react").KeyboardEvent<Element> | KeyboardEvent, appState: AppState) => boolean) | undefined;
|
|
254
254
|
};
|