@myoc/math 0.19.528 → 0.19.530
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.
|
@@ -457,6 +457,8 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
457
457
|
private onTouchStart;
|
|
458
458
|
private onTouchEnd;
|
|
459
459
|
private insertClipboardContent;
|
|
460
|
+
private containsImagePaste;
|
|
461
|
+
private shouldInsertImageInViewMode;
|
|
460
462
|
pasteFromClipboard: (event: ClipboardEvent) => Promise<void>;
|
|
461
463
|
addElementsFromPasteOrLibrary: (opts: {
|
|
462
464
|
elements: readonly ExcalidrawElement[];
|
|
@@ -904,6 +906,7 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
904
906
|
private maybeHandleCrop;
|
|
905
907
|
private maybeHandleResize;
|
|
906
908
|
private getImageContextMenuItems;
|
|
909
|
+
private getImageActionContextMenuItems;
|
|
907
910
|
private getElementLinkContextMenuItems;
|
|
908
911
|
private getContextMenuItems;
|
|
909
912
|
private handleWheel;
|
|
@@ -723,6 +723,24 @@ export interface ExcalidrawProps {
|
|
|
723
723
|
pointersMap: Gesture["pointers"];
|
|
724
724
|
}) => void;
|
|
725
725
|
onPaste?: (data: ClipboardData, event: ClipboardEvent | null) => Promise<boolean> | boolean;
|
|
726
|
+
/**
|
|
727
|
+
* Controls image paste/drop while the editor is in view mode and not
|
|
728
|
+
* `viewModeOnly`.
|
|
729
|
+
*
|
|
730
|
+
* - `exit-view-mode`: leave view mode and insert the image.
|
|
731
|
+
* - `reject`: keep view mode and call `onViewModeImageInsertRejected`.
|
|
732
|
+
*
|
|
733
|
+
* `viewModeOnly` always rejects because view mode is forced.
|
|
734
|
+
*
|
|
735
|
+
* @default "exit-view-mode"
|
|
736
|
+
*/
|
|
737
|
+
viewModeImageInsertBehavior?: "exit-view-mode" | "reject";
|
|
738
|
+
onViewModeImageInsertRejected?: (payload: {
|
|
739
|
+
source: "paste" | "drop";
|
|
740
|
+
files: readonly File[];
|
|
741
|
+
data?: ClipboardData;
|
|
742
|
+
event: ClipboardEvent | React.DragEvent<HTMLDivElement> | null;
|
|
743
|
+
}) => void;
|
|
726
744
|
/**
|
|
727
745
|
* Called when element(s) are duplicated so you can listen or modify as
|
|
728
746
|
* needed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myoc/math",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.530",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/math/src/index.d.ts",
|
|
6
6
|
"main": "./dist/prod/index.js",
|
|
@@ -62,6 +62,6 @@
|
|
|
62
62
|
"build:esm": "rimraf dist && node ../../scripts/buildBase.js && yarn gen:types"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@excalidraw/common": "npm:@myoc/common@0.19.
|
|
65
|
+
"@excalidraw/common": "npm:@myoc/common@0.19.530"
|
|
66
66
|
}
|
|
67
67
|
}
|