@myoc/element 0.19.542 → 0.19.544
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.
|
@@ -201,7 +201,7 @@ export declare const MIME_TYPES: {
|
|
|
201
201
|
readonly excalidraw: "application/vnd.excalidraw+json";
|
|
202
202
|
readonly excalidrawClipboard: "application/vnd.excalidraw.clipboard+json";
|
|
203
203
|
};
|
|
204
|
-
export declare const ALLOWED_PASTE_MIME_TYPES: readonly ["text/plain", "text/html", ...("image/svg+xml" | "image/png" | "image/jpeg" | "image/gif" | "image/webp" | "image/bmp" | "image/x-icon" | "image/avif" | "image/jfif")[]];
|
|
204
|
+
export declare const ALLOWED_PASTE_MIME_TYPES: readonly ["text/plain", "text/html", "application/vnd.excalidraw.clipboard+json", ...("image/svg+xml" | "image/png" | "image/jpeg" | "image/gif" | "image/webp" | "image/bmp" | "image/x-icon" | "image/avif" | "image/jfif")[]];
|
|
205
205
|
export declare const EXPORT_IMAGE_TYPES: {
|
|
206
206
|
readonly png: "png";
|
|
207
207
|
readonly svg: "svg";
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { ExcalidrawElement, NonDeletedExcalidrawElement, NonDeletedSceneElementsMap } from "@excalidraw/element/types";
|
|
2
2
|
type SmartZoomTarget = readonly ExcalidrawElement[];
|
|
3
|
+
export declare const SMART_ZOOM_KEY_HINT = "Press <kbd>F</kbd> quickly to smart zoom the canvas, or hold and click on an item to smart zoom to it";
|
|
4
|
+
export declare const smartZoomKeyHeldAtom: import("jotai").PrimitiveAtom<boolean> & {
|
|
5
|
+
init: boolean;
|
|
6
|
+
};
|
|
3
7
|
export declare const getNextSmartZoomImage: (elements: readonly NonDeletedExcalidrawElement[], elementsMap: NonDeletedSceneElementsMap, currentImageId: ExcalidrawElement["id"] | null, direction: "previous" | "next") => (Readonly<{
|
|
4
8
|
id: string;
|
|
5
9
|
x: number;
|
|
@@ -37,6 +37,7 @@ clipboardEvent?: ClipboardEvent | null) => Promise<void>;
|
|
|
37
37
|
export declare const readSystemClipboard: () => Promise<{
|
|
38
38
|
"text/plain"?: string | File | undefined;
|
|
39
39
|
"text/html"?: string | File | undefined;
|
|
40
|
+
"application/vnd.excalidraw.clipboard+json"?: string | File | undefined;
|
|
40
41
|
"image/svg+xml"?: string | File | undefined;
|
|
41
42
|
"image/png"?: string | File | undefined;
|
|
42
43
|
"image/jpeg"?: string | File | undefined;
|
|
@@ -146,6 +146,8 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
146
146
|
} | null;
|
|
147
147
|
private lastCompletedCanvasClicks;
|
|
148
148
|
private lastKeyboardSmartZoomImageId;
|
|
149
|
+
private smartZoomKeyDownAt;
|
|
150
|
+
private smartZoomKeyHitElement;
|
|
149
151
|
/** previous frame pointer coords */
|
|
150
152
|
previousPointerMoveCoords: {
|
|
151
153
|
x: number;
|
|
@@ -561,6 +563,12 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
561
563
|
force?: boolean;
|
|
562
564
|
}) => boolean;
|
|
563
565
|
private updateCurrentCursorPosition;
|
|
566
|
+
private isPlainSmartZoomKey;
|
|
567
|
+
private updateSmartZoomCursor;
|
|
568
|
+
private resetSmartZoomKey;
|
|
569
|
+
private handleSmartZoomKeyDown;
|
|
570
|
+
private handleSmartZoomKeyUp;
|
|
571
|
+
private handleSmartZoomPointerDown;
|
|
564
572
|
private onKeyDown;
|
|
565
573
|
private onKeyUp;
|
|
566
574
|
setActiveTool: (tool: ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@myoc/element",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.544",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/element/src/index.d.ts",
|
|
6
6
|
"main": "./dist/prod/index.js",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"build:esm": "rimraf dist && node ../../scripts/buildBase.js && yarn gen:types"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@excalidraw/common": "npm:@myoc/common@0.19.
|
|
68
|
-
"@excalidraw/fractional-indexing": "npm:@myoc/fractional-indexing@0.19.
|
|
69
|
-
"@excalidraw/math": "npm:@myoc/math@0.19.
|
|
67
|
+
"@excalidraw/common": "npm:@myoc/common@0.19.544",
|
|
68
|
+
"@excalidraw/fractional-indexing": "npm:@myoc/fractional-indexing@0.19.544",
|
|
69
|
+
"@excalidraw/math": "npm:@myoc/math@0.19.544",
|
|
70
70
|
"modern-gif": "2.1.0",
|
|
71
71
|
"thumbhash": "0.1.1"
|
|
72
72
|
}
|