@zsviczian/excalidraw 0.13.0-obsidian-2 → 0.14.1-obsidian
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/README.md +417 -19
- package/dist/excalidraw.development.js +581 -1153
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +0 -102
- package/package.json +1 -1
- package/types/actions/actionAddToLibrary.d.ts +39 -18
- package/types/actions/actionAlign.d.ts +6 -18
- package/types/actions/actionBoundText.d.ts +15 -8
- package/types/actions/actionCanvas.d.ts +246 -76
- package/types/actions/actionClipboard.d.ts +84 -31
- package/types/actions/actionDeleteSelected.d.ts +40 -21
- package/types/actions/actionDistribute.d.ts +2 -6
- package/types/actions/actionDuplicateSelection.d.ts +1 -3
- package/types/actions/actionExport.d.ts +125 -78
- package/types/actions/actionFinalize.d.ts +27 -15
- package/types/actions/actionFlip.d.ts +2 -2
- package/types/actions/actionGroup.d.ts +4 -8
- package/types/actions/actionLinearEditor.d.ts +14 -7
- package/types/actions/actionMenu.d.ts +40 -26
- package/types/actions/actionNavigate.d.ts +1 -3
- package/types/actions/actionProperties.d.ts +182 -117
- package/types/actions/actionStyles.d.ts +13 -6
- package/types/actions/actionToggleGridMode.d.ts +14 -6
- package/types/actions/actionToggleLock.d.ts +13 -6
- package/types/actions/actionToggleStats.d.ts +13 -6
- package/types/actions/actionToggleViewMode.d.ts +14 -6
- package/types/actions/actionToggleZenMode.d.ts +14 -6
- package/types/actions/actionZindex.d.ts +4 -12
- package/types/actions/manager.d.ts +2 -1
- package/types/actions/types.d.ts +3 -5
- package/types/appState.d.ts +8 -6
- package/types/components/ActiveConfirmDialog.d.ts +24 -0
- package/types/components/App.d.ts +8 -50
- package/types/components/Button.d.ts +15 -0
- package/types/components/CollabButton.d.ts +1 -2
- package/types/components/ContextMenu.d.ts +8 -20
- package/types/components/HandButton.d.ts +10 -0
- package/types/components/JSONExportDialog.d.ts +3 -1
- package/types/components/LayerUI.d.ts +3 -3
- package/types/components/LibraryMenuHeaderContent.d.ts +23 -0
- package/types/components/LockButton.d.ts +0 -1
- package/types/components/MobileMenu.d.ts +5 -6
- package/types/components/ToolButton.d.ts +1 -1
- package/types/components/UserList.d.ts +0 -2
- package/types/components/dropdownMenu/DropdownMenu.d.ts +66 -0
- package/types/components/dropdownMenu/DropdownMenuContent.d.ts +15 -0
- package/types/components/dropdownMenu/DropdownMenuGroup.d.ts +11 -0
- package/types/components/dropdownMenu/DropdownMenuItem.d.ts +12 -0
- package/types/components/dropdownMenu/DropdownMenuItemContent.d.ts +6 -0
- package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +6 -0
- package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +13 -0
- package/types/components/dropdownMenu/DropdownMenuSeparator.d.ts +5 -0
- package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +9 -0
- package/types/components/dropdownMenu/common.d.ts +6 -0
- package/types/components/dropdownMenu/dropdownMenuUtils.d.ts +3 -0
- package/types/components/footer/Footer.d.ts +13 -0
- package/types/components/footer/FooterCenter.d.ts +8 -0
- package/types/components/icons.d.ts +2 -1
- package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +10 -0
- package/types/components/main-menu/DefaultItems.d.ts +44 -0
- package/types/components/main-menu/MainMenu.d.ts +60 -0
- package/types/components/mainMenu/DefaultItems.d.ts +44 -0
- package/types/components/mainMenu/MainMenu.d.ts +63 -0
- package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +58 -0
- package/types/components/welcome-screen/WelcomeScreen.Hints.d.ts +19 -0
- package/types/components/welcome-screen/WelcomeScreen.d.ts +85 -0
- package/types/constants.d.ts +6 -4
- package/types/element/Hyperlink.d.ts +15 -10
- package/types/element/linearElementEditor.d.ts +14 -6
- package/types/element/textElement.d.ts +7 -0
- package/types/element/textWysiwyg.d.ts +6 -1
- package/types/excalidraw-app/data/index.d.ts +5 -0
- package/types/excalidraw-app/data/localStorage.d.ts +5 -0
- package/types/keys.d.ts +2 -3
- package/types/packages/excalidraw/example/CustomFooter.d.ts +5 -0
- package/types/packages/excalidraw/example/MobileFooter.d.ts +5 -0
- package/types/packages/excalidraw/index.d.ts +10 -0
- package/types/renderer/easingFunctions.d.ts +6 -0
- package/types/types.d.ts +54 -26
- package/types/utils.d.ts +23 -3
package/types/utils.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EVENT } from "./constants";
|
|
2
2
|
import { FontFamilyValues, FontString } from "./element/types";
|
|
3
|
-
import { AppState,
|
|
3
|
+
import { AppState, LastActiveTool, Zoom } from "./types";
|
|
4
4
|
import { SHAPES } from "./shapes";
|
|
5
|
+
import React from "react";
|
|
5
6
|
export declare const setDateTimeForTests: (dateTime: string) => void;
|
|
6
7
|
export declare const getDateTime: () => string;
|
|
7
8
|
export declare const capitalizeString: (str: string) => string;
|
|
@@ -33,12 +34,12 @@ export declare const selectNode: (node: Element) => void;
|
|
|
33
34
|
export declare const removeSelection: () => void;
|
|
34
35
|
export declare const distance: (x: number, y: number) => number;
|
|
35
36
|
export declare const updateActiveTool: (appState: Pick<AppState, "activeTool">, data: ({
|
|
36
|
-
type: (typeof SHAPES)[number]["value"] | "eraser";
|
|
37
|
+
type: (typeof SHAPES)[number]["value"] | "eraser" | "hand";
|
|
37
38
|
} | {
|
|
38
39
|
type: "custom";
|
|
39
40
|
customType: string;
|
|
40
41
|
}) & {
|
|
41
|
-
lastActiveToolBeforeEraser?:
|
|
42
|
+
lastActiveToolBeforeEraser?: LastActiveTool;
|
|
42
43
|
}) => AppState["activeTool"];
|
|
43
44
|
export declare const resetCursor: (canvas: HTMLCanvasElement | null) => void;
|
|
44
45
|
export declare const setCursor: (canvas: HTMLCanvasElement | null, cursor: string) => void;
|
|
@@ -134,3 +135,22 @@ export declare const isPrimitive: (val: any) => boolean;
|
|
|
134
135
|
export declare const getFrame: () => "top" | "iframe";
|
|
135
136
|
export declare const isPromiseLike: (value: any) => value is Promise<any>;
|
|
136
137
|
export declare const queryFocusableElements: (container: HTMLElement | null) => HTMLElement[];
|
|
138
|
+
/**
|
|
139
|
+
* Partitions React children into named components and the rest of children.
|
|
140
|
+
*
|
|
141
|
+
* Returns known children as a dictionary of react children keyed by their
|
|
142
|
+
* displayName, and the rest children as an array.
|
|
143
|
+
*
|
|
144
|
+
* NOTE all named react components are included in the dictionary, irrespective
|
|
145
|
+
* of the supplied type parameter. This means you may be throwing away
|
|
146
|
+
* children that you aren't expecting, but should nonetheless be rendered.
|
|
147
|
+
* To guard against this (provided you care about the rest children at all),
|
|
148
|
+
* supply a second parameter with an object with keys of the expected children.
|
|
149
|
+
*/
|
|
150
|
+
export declare const getReactChildren: <KnownChildren extends {
|
|
151
|
+
[x: string]: React.ReactNode;
|
|
152
|
+
}>(children: React.ReactNode, expectedComponents?: Record<keyof KnownChildren, any> | undefined) => readonly [Partial<KnownChildren>, React.ReactNode[]];
|
|
153
|
+
export declare const isShallowEqual: <T extends Record<string, any>>(objA: T, objB: T) => boolean;
|
|
154
|
+
export declare const composeEventHandlers: <E>(originalEventHandler?: ((event: E) => void) | undefined, ourEventHandler?: ((event: E) => void) | undefined, { checkForDefaultPrevented }?: {
|
|
155
|
+
checkForDefaultPrevented?: boolean | undefined;
|
|
156
|
+
}) => (event: E) => void;
|