@excalidraw/excalidraw 0.16.1-6920-d3d0bd0 → 0.16.1-7251-baadf54
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 +10 -0
- package/dist/excalidraw-assets/{vendor-1d7fa3a52ac368151052.js → vendor-0452b0f95a04b9622103.js} +2 -2
- package/dist/excalidraw-assets-dev/{vendor-69c110bed9124a145b63.js → vendor-05ba14a033ad4c84ef2a.js} +7 -7
- package/dist/excalidraw.development.js +34 -34
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +1 -1
- package/types/components/App.d.ts +11 -7
- package/types/constants.d.ts +0 -1
- package/types/packages/excalidraw/index.d.ts +3 -3
- package/types/types.d.ts +10 -11
- /package/dist/excalidraw-assets/{vendor-1d7fa3a52ac368151052.js.LICENSE.txt → vendor-0452b0f95a04b9622103.js.LICENSE.txt} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-1d7fa3a52ac368151052.d.ts → vendor-0452b0f95a04b9622103.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-69c110bed9124a145b63.d.ts → vendor-05ba14a033ad4c84ef2a.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -18,11 +18,15 @@ export declare const ExcalidrawContainerContext: React.Context<{
|
|
|
18
18
|
export declare const useApp: () => AppClassProperties;
|
|
19
19
|
export declare const useAppProps: () => AppProps;
|
|
20
20
|
export declare const useDevice: () => Readonly<{
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
viewport: {
|
|
22
|
+
isMobile: boolean;
|
|
23
|
+
isLandscape: boolean;
|
|
24
|
+
};
|
|
25
|
+
editor: {
|
|
26
|
+
isMobile: boolean;
|
|
27
|
+
canFitSidebar: boolean;
|
|
28
|
+
};
|
|
23
29
|
isTouchScreen: boolean;
|
|
24
|
-
canDeviceFitSidebar: boolean;
|
|
25
|
-
isLandscape: boolean;
|
|
26
30
|
}>;
|
|
27
31
|
export declare const useExcalidrawContainer: () => {
|
|
28
32
|
container: HTMLDivElement | null;
|
|
@@ -39,7 +43,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
39
43
|
unmounted: boolean;
|
|
40
44
|
actionManager: ActionManager;
|
|
41
45
|
device: Device;
|
|
42
|
-
detachIsMobileMqHandler?: () => void;
|
|
43
46
|
private excalidrawContainerRef;
|
|
44
47
|
static defaultProps: Partial<AppProps>;
|
|
45
48
|
scene: Scene;
|
|
@@ -233,7 +236,9 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
233
236
|
*/
|
|
234
237
|
private resetScene;
|
|
235
238
|
private initializeScene;
|
|
236
|
-
private
|
|
239
|
+
private isMobileBreakpoint;
|
|
240
|
+
private refreshViewportBreakpoints;
|
|
241
|
+
private refreshEditorBreakpoints;
|
|
237
242
|
componentDidMount(): Promise<void>;
|
|
238
243
|
componentWillUnmount(): void;
|
|
239
244
|
private onResize;
|
|
@@ -412,7 +417,6 @@ declare class App extends React.Component<AppProps, AppState> {
|
|
|
412
417
|
private maybeSuggestBindingAtCursor;
|
|
413
418
|
private maybeSuggestBindingsForLinearElementAtCoords;
|
|
414
419
|
private maybeSuggestBindingForAll;
|
|
415
|
-
setSelection(elements: readonly NonDeletedExcalidrawElement[]): void;
|
|
416
420
|
private clearSelection;
|
|
417
421
|
private handleInteractiveCanvasRef;
|
|
418
422
|
private handleAppOnDrop;
|
package/types/constants.d.ts
CHANGED
|
@@ -171,7 +171,6 @@ export declare const URL_HASH_KEYS: {
|
|
|
171
171
|
readonly addLibrary: "addLibrary";
|
|
172
172
|
};
|
|
173
173
|
export declare const DEFAULT_UI_OPTIONS: AppProps["UIOptions"];
|
|
174
|
-
export declare const MQ_SM_MAX_WIDTH = 640;
|
|
175
174
|
export declare const MQ_MAX_WIDTH_PORTRAIT = 730;
|
|
176
175
|
export declare const MQ_MAX_WIDTH_LANDSCAPE = 1000;
|
|
177
176
|
export declare const MQ_MAX_HEIGHT_LANDSCAPE = 500;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "../../css/app.scss";
|
|
3
3
|
import "../../css/styles.scss";
|
|
4
|
-
import {
|
|
4
|
+
import { ExcalidrawProps } from "../../types";
|
|
5
5
|
import Footer from "../../components/footer/FooterCenter";
|
|
6
6
|
import MainMenu from "../../components/main-menu/MainMenu";
|
|
7
7
|
import WelcomeScreen from "../../components/welcome-screen/WelcomeScreen";
|
|
8
8
|
import LiveCollaborationTrigger from "../../components/live-collaboration/LiveCollaborationTrigger";
|
|
9
|
-
|
|
10
|
-
export declare const Excalidraw: React.MemoExoticComponent<React.ForwardRefExoticComponent<PublicExcalidrawProps & React.RefAttributes<ExcalidrawAPIRefValue>>>;
|
|
9
|
+
export declare const Excalidraw: React.MemoExoticComponent<(props: ExcalidrawProps) => JSX.Element>;
|
|
11
10
|
export { getSceneVersion, isInvisiblySmallElement, getNonDeletedElements, } from "../../element";
|
|
12
11
|
export { defaultLang, useI18n, languages } from "../../i18n";
|
|
13
12
|
export { restore, restoreAppState, restoreElements, restoreLibraryItems, } from "../../data/restore";
|
|
@@ -27,4 +26,5 @@ export { LiveCollaborationTrigger };
|
|
|
27
26
|
export { DefaultSidebar } from "../../components/DefaultSidebar";
|
|
28
27
|
export { normalizeLink } from "../../data/url";
|
|
29
28
|
export { convertToExcalidrawElements } from "../../data/transform";
|
|
29
|
+
export { getCommonBounds } from "../../element/bounds";
|
|
30
30
|
export { elementsOverlappingBBox, isElementInsideBBox, elementPartiallyOverlapsWithOrContainsBBox, } from "../withinBounds";
|
package/types/types.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ import type { FileSystemHandle } from "./data/filesystem";
|
|
|
16
16
|
import type { IMAGE_MIME_TYPES, MIME_TYPES } from "./constants";
|
|
17
17
|
import { ContextMenuItems } from "./components/ContextMenu";
|
|
18
18
|
import { SnapLine } from "./snapping";
|
|
19
|
-
import { Merge,
|
|
19
|
+
import { Merge, ValueOf } from "./utility-types";
|
|
20
20
|
export type Point = Readonly<RoughPoint>;
|
|
21
21
|
export type Collaborator = {
|
|
22
22
|
pointer?: CollaboratorPointer;
|
|
@@ -283,17 +283,13 @@ export type LibraryItem = {
|
|
|
283
283
|
export type LibraryItems = readonly LibraryItem[];
|
|
284
284
|
export type LibraryItems_anyVersion = LibraryItems | LibraryItems_v1;
|
|
285
285
|
export type LibraryItemsSource = ((currentLibraryItems: LibraryItems) => Blob | LibraryItems_anyVersion | Promise<LibraryItems_anyVersion | Blob>) | Blob | LibraryItems_anyVersion | Promise<LibraryItems_anyVersion | Blob>;
|
|
286
|
-
export type ExcalidrawAPIRefValue = ExcalidrawImperativeAPI | {
|
|
287
|
-
readyPromise?: ResolvablePromise<ExcalidrawImperativeAPI>;
|
|
288
|
-
ready?: false;
|
|
289
|
-
};
|
|
290
286
|
export type ExcalidrawInitialDataState = Merge<ImportedDataState, {
|
|
291
287
|
libraryItems?: Required<ImportedDataState>["libraryItems"] | Promise<Required<ImportedDataState>["libraryItems"]>;
|
|
292
288
|
}>;
|
|
293
289
|
export interface ExcalidrawProps {
|
|
294
290
|
onChange?: (elements: readonly ExcalidrawElement[], appState: AppState, files: BinaryFiles) => void;
|
|
295
291
|
initialData?: ExcalidrawInitialDataState | null | Promise<ExcalidrawInitialDataState | null>;
|
|
296
|
-
|
|
292
|
+
excalidrawAPI?: (api: ExcalidrawImperativeAPI) => void;
|
|
297
293
|
isCollaborating?: boolean;
|
|
298
294
|
onPointerUpdate?: (payload: {
|
|
299
295
|
pointer: {
|
|
@@ -395,7 +391,6 @@ export type AppClassProperties = {
|
|
|
395
391
|
lastViewportPosition: App["lastViewportPosition"];
|
|
396
392
|
scrollToContent: App["scrollToContent"];
|
|
397
393
|
addFiles: App["addFiles"];
|
|
398
|
-
setSelection: App["setSelection"];
|
|
399
394
|
addElementsFromPasteOrLibrary: App["addElementsFromPasteOrLibrary"];
|
|
400
395
|
togglePenMode: App["togglePenMode"];
|
|
401
396
|
setActiveTool: App["setActiveTool"];
|
|
@@ -494,11 +489,15 @@ export type ExcalidrawImperativeAPI = {
|
|
|
494
489
|
onPointerUp: (callback: (activeTool: AppState["activeTool"], pointerDownState: PointerDownState, event: PointerEvent) => void) => UnsubscribeCallback;
|
|
495
490
|
};
|
|
496
491
|
export type Device = Readonly<{
|
|
497
|
-
|
|
498
|
-
|
|
492
|
+
viewport: {
|
|
493
|
+
isMobile: boolean;
|
|
494
|
+
isLandscape: boolean;
|
|
495
|
+
};
|
|
496
|
+
editor: {
|
|
497
|
+
isMobile: boolean;
|
|
498
|
+
canFitSidebar: boolean;
|
|
499
|
+
};
|
|
499
500
|
isTouchScreen: boolean;
|
|
500
|
-
canDeviceFitSidebar: boolean;
|
|
501
|
-
isLandscape: boolean;
|
|
502
501
|
}>;
|
|
503
502
|
type FrameNameBounds = {
|
|
504
503
|
x: number;
|
|
File without changes
|
|
File without changes
|