@zsviczian/excalidraw 0.9.0-obsidian-11 → 0.9.0-obsidian-image-support-4
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 +3 -2
- package/dist/excalidraw-assets-dev/image-2767e46ad3f3f29617ea.js +22 -0
- package/dist/excalidraw-assets-dev/{image-cacb3d0c02eb2e346ecc.js → image-48c09dc0a5119be6727d.js} +1 -1
- package/dist/excalidraw-assets-dev/vendor-0f2d4444f453c4f793d1.js +334 -0
- package/dist/excalidraw-assets-dev/{vendor-7ad6c104c3421ae6511d.js → vendor-8ea1c8aa2827c2e56522.js} +11 -0
- package/dist/excalidraw-assets-dev/vendor-b648d92c35e91de1648e.js +323 -0
- package/dist/excalidraw.development.js +140 -75
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/actions/actionCanvas.d.ts +4 -2
- package/types/actions/manager.d.ts +3 -11
- package/types/actions/types.d.ts +2 -8
- package/types/appState.d.ts +59 -4
- package/types/components/Actions.d.ts +5 -2
- package/types/components/App.d.ts +20 -5
- package/types/components/LayerUI.d.ts +4 -1
- package/types/components/LibraryUnit.d.ts +3 -2
- package/types/components/MobileMenu.d.ts +4 -1
- package/types/components/Spinner.d.ts +7 -0
- package/types/components/ToolButton.d.ts +5 -2
- package/types/constants.d.ts +1 -0
- package/types/createInverseContext.d.ts +1 -0
- package/types/data/blob.d.ts +6 -3
- package/types/data/encode.d.ts +2 -1
- package/types/data/index.d.ts +2 -2
- package/types/data/json.d.ts +2 -2
- package/types/data/resave.d.ts +1 -1
- package/types/element/collision.d.ts +2 -2
- package/types/element/dragElements.d.ts +1 -1
- package/types/element/image.d.ts +13 -0
- package/types/element/index.d.ts +2 -1
- package/types/element/mutateElement.d.ts +1 -1
- package/types/element/newElement.d.ts +4 -1
- package/types/element/resizeElements.d.ts +3 -3
- package/types/element/typeChecks.d.ts +2 -1
- package/types/element/types.d.ts +14 -2
- package/types/errors.d.ts +3 -0
- package/types/excalidraw-app/app_constants.d.ts +19 -0
- package/types/excalidraw-app/collab/CollabWrapper.d.ts +92 -0
- package/types/excalidraw-app/collab/Portal.d.ts +28 -0
- package/types/excalidraw-app/collab/RoomDialog.d.ts +14 -0
- package/types/excalidraw-app/data/FileSync.d.ts +39 -0
- package/types/excalidraw-app/data/firebase.d.ts +22 -0
- package/types/excalidraw-app/data/index.d.ts +161 -0
- package/types/excalidraw-app/data/localStorage.d.ts +98 -0
- package/types/keys.d.ts +4 -3
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-2767e46ad3f3f29617ea.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/image-48c09dc0a5119be6727d.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-0f2d4444f453c4f793d1.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-8ea1c8aa2827c2e56522.d.ts +0 -0
- package/types/packages/excalidraw/dist/excalidraw-assets-dev/vendor-b648d92c35e91de1648e.d.ts +0 -0
- package/types/packages/utils.d.ts +1 -1
- package/types/renderer/renderElement.d.ts +3 -2
- package/types/renderer/renderScene.d.ts +3 -2
- package/types/scene/export.d.ts +2 -1
- package/types/scene/types.d.ts +4 -3
- package/types/shapes.d.ts +5 -1
- package/types/types.d.ts +24 -2
- package/types/zindex.d.ts +2 -2
package/types/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { PointerType, ExcalidrawLinearElement, NonDeletedExcalidrawElement, NonDeleted, TextAlign, ExcalidrawElement, GroupId, ExcalidrawBindableElement, Arrowhead, ChartType, FontFamilyValues, ExcalidrawTextElement } from "./element/types";
|
|
2
|
+
import { PointerType, ExcalidrawLinearElement, NonDeletedExcalidrawElement, NonDeleted, TextAlign, ExcalidrawElement, GroupId, ExcalidrawBindableElement, Arrowhead, ChartType, FontFamilyValues, ExcalidrawTextElement, ImageId, ExcalidrawImageElement } from "./element/types";
|
|
3
3
|
import { SHAPES } from "./shapes";
|
|
4
4
|
import { Point as RoughPoint } from "roughjs/bin/geometry";
|
|
5
5
|
import { LinearElementEditor } from "./element/linearElementEditor";
|
|
@@ -12,6 +12,7 @@ import { Language } from "./i18n";
|
|
|
12
12
|
import { ClipboardData } from "./clipboard";
|
|
13
13
|
import { isOverScrollBars } from "./scene";
|
|
14
14
|
import { MaybeTransformHandleType } from "./element/transformHandles";
|
|
15
|
+
import Library from "./data/library";
|
|
15
16
|
export declare type Point = Readonly<RoughPoint>;
|
|
16
17
|
export declare type Collaborator = {
|
|
17
18
|
pointer?: {
|
|
@@ -27,7 +28,16 @@ export declare type Collaborator = {
|
|
|
27
28
|
stroke: string;
|
|
28
29
|
};
|
|
29
30
|
};
|
|
31
|
+
export declare type DataURL = string & {
|
|
32
|
+
_brand: "DataURL";
|
|
33
|
+
};
|
|
34
|
+
export declare type BinaryFileData = {
|
|
35
|
+
type: "image" | "other";
|
|
36
|
+
id: ImageId;
|
|
37
|
+
dataURL: DataURL;
|
|
38
|
+
};
|
|
30
39
|
export declare type AppState = {
|
|
40
|
+
files: Record<ExcalidrawElement["id"], BinaryFileData>;
|
|
31
41
|
isLoading: boolean;
|
|
32
42
|
errorMessage: string | null;
|
|
33
43
|
draggingElement: NonDeletedExcalidrawElement | null;
|
|
@@ -96,7 +106,7 @@ export declare type AppState = {
|
|
|
96
106
|
offsetTop: number;
|
|
97
107
|
offsetLeft: number;
|
|
98
108
|
isLibraryOpen: boolean;
|
|
99
|
-
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
109
|
+
fileHandle: import("@dwelle/browser-fs-access").FileSystemHandle | null;
|
|
100
110
|
collaborators: Map<string, Collaborator>;
|
|
101
111
|
showStats: boolean;
|
|
102
112
|
currentChartType: ChartType;
|
|
@@ -107,6 +117,8 @@ export declare type AppState = {
|
|
|
107
117
|
shown: true;
|
|
108
118
|
data: Spreadsheet;
|
|
109
119
|
};
|
|
120
|
+
/** imageElement waiting to be placed on canvas */
|
|
121
|
+
pendingImageElement: NonDeleted<ExcalidrawImageElement> | null;
|
|
110
122
|
};
|
|
111
123
|
export declare type NormalizedZoomValue = number & {
|
|
112
124
|
_brand: "normalizedZoom";
|
|
@@ -212,6 +224,15 @@ export declare type AppProps = ExcalidrawProps & {
|
|
|
212
224
|
detectScroll: boolean;
|
|
213
225
|
handleKeyboardGlobally: boolean;
|
|
214
226
|
};
|
|
227
|
+
/** A subset of App class properties that we need to use elsewhere
|
|
228
|
+
* in the app, eg Manager. Factored out into a separate type to keep DRY. */
|
|
229
|
+
export declare type AppClassProperties = {
|
|
230
|
+
props: AppProps;
|
|
231
|
+
canvas: HTMLCanvasElement | null;
|
|
232
|
+
focusContainer(): void;
|
|
233
|
+
library: Library;
|
|
234
|
+
imageCache: Map<ImageId, HTMLImageElement>;
|
|
235
|
+
};
|
|
215
236
|
export declare type PointerDownState = Readonly<{
|
|
216
237
|
origin: Readonly<{
|
|
217
238
|
x: number;
|
|
@@ -276,6 +297,7 @@ export declare type ExcalidrawImperativeAPI = {
|
|
|
276
297
|
refresh: InstanceType<typeof App>["refresh"];
|
|
277
298
|
importLibrary: InstanceType<typeof App>["importLibraryFromUrl"];
|
|
278
299
|
setToastMessage: InstanceType<typeof App>["setToastMessage"];
|
|
300
|
+
setFiles: (data: AppState["files"][number][]) => void;
|
|
279
301
|
readyPromise: ResolvablePromise<ExcalidrawImperativeAPI>;
|
|
280
302
|
ready: true;
|
|
281
303
|
id: string;
|
package/types/zindex.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExcalidrawElement } from "./element/types";
|
|
2
2
|
import { AppState } from "./types";
|
|
3
|
-
export declare const moveOneLeft: (elements: readonly ExcalidrawElement[], appState: AppState) => (import("./element/types").ExcalidrawLinearElement | import("./element/types").ExcalidrawSelectionElement | import("./element/types").ExcalidrawRectangleElement | import("./element/types").ExcalidrawDiamondElement | import("./element/types").ExcalidrawEllipseElement | import("./element/types").ExcalidrawTextElement | import("./element/types").ExcalidrawFreeDrawElement)[];
|
|
4
|
-
export declare const moveOneRight: (elements: readonly ExcalidrawElement[], appState: AppState) => (import("./element/types").ExcalidrawLinearElement | import("./element/types").ExcalidrawSelectionElement | import("./element/types").ExcalidrawRectangleElement | import("./element/types").ExcalidrawDiamondElement | import("./element/types").ExcalidrawEllipseElement | import("./element/types").ExcalidrawTextElement | import("./element/types").ExcalidrawFreeDrawElement)[];
|
|
3
|
+
export declare const moveOneLeft: (elements: readonly ExcalidrawElement[], appState: AppState) => (import("./element/types").ExcalidrawLinearElement | import("./element/types").ExcalidrawSelectionElement | import("./element/types").ExcalidrawRectangleElement | import("./element/types").ExcalidrawDiamondElement | import("./element/types").ExcalidrawEllipseElement | import("./element/types").ExcalidrawImageElement | import("./element/types").ExcalidrawTextElement | import("./element/types").ExcalidrawFreeDrawElement)[];
|
|
4
|
+
export declare const moveOneRight: (elements: readonly ExcalidrawElement[], appState: AppState) => (import("./element/types").ExcalidrawLinearElement | import("./element/types").ExcalidrawSelectionElement | import("./element/types").ExcalidrawRectangleElement | import("./element/types").ExcalidrawDiamondElement | import("./element/types").ExcalidrawEllipseElement | import("./element/types").ExcalidrawImageElement | import("./element/types").ExcalidrawTextElement | import("./element/types").ExcalidrawFreeDrawElement)[];
|
|
5
5
|
export declare const moveAllLeft: (elements: readonly ExcalidrawElement[], appState: AppState) => readonly ExcalidrawElement[];
|
|
6
6
|
export declare const moveAllRight: (elements: readonly ExcalidrawElement[], appState: AppState) => readonly ExcalidrawElement[];
|