@zsviczian/excalidraw 0.15.2-obsidian-1 → 0.15.2-obsidian-3
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/dist/excalidraw.development.js +1438 -364
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +2 -2
- package/types/actions/actionAddToLibrary.d.ts +48 -24
- package/types/actions/actionBoundText.d.ts +32 -16
- package/types/actions/actionCanvas.d.ts +160 -80
- package/types/actions/actionClipboard.d.ts +80 -40
- package/types/actions/actionDeleteSelected.d.ts +48 -24
- package/types/actions/actionElementLock.d.ts +287 -0
- package/types/actions/actionExport.d.ts +145 -73
- package/types/actions/actionFinalize.d.ts +32 -16
- package/types/actions/actionFlip.d.ts +2 -4
- package/types/actions/actionHistory.d.ts +1 -1
- package/types/actions/actionLinearEditor.d.ts +16 -8
- package/types/actions/actionMenu.d.ts +48 -24
- package/types/actions/actionProperties.d.ts +210 -106
- package/types/actions/actionStyles.d.ts +16 -8
- package/types/actions/actionToggleGridMode.d.ts +16 -8
- package/types/actions/actionToggleLock.d.ts +5 -2
- package/types/actions/actionToggleStats.d.ts +16 -8
- package/types/actions/actionToggleViewMode.d.ts +16 -8
- package/types/actions/actionToggleZenMode.d.ts +16 -8
- package/types/actions/index.d.ts +1 -1
- package/types/actions/manager.d.ts +1 -1
- package/types/actions/shortcuts.d.ts +1 -1
- package/types/actions/types.d.ts +7 -7
- package/types/appState.d.ts +5 -2
- package/types/charts.d.ts +2 -2
- package/types/clients.d.ts +4 -1
- package/types/clipboard.d.ts +2 -2
- package/types/colors.d.ts +59 -5
- package/types/components/Actions.d.ts +5 -5
- package/types/components/App.d.ts +13 -3
- package/types/components/Avatar.d.ts +1 -1
- package/types/components/Button.d.ts +3 -1
- package/types/components/ColorPicker/ColorInput.d.ts +7 -0
- package/types/components/ColorPicker/ColorPicker.d.ts +18 -0
- package/types/components/ColorPicker/CustomColorList.d.ts +8 -0
- package/types/components/ColorPicker/HotkeyLabel.d.ts +8 -0
- package/types/components/ColorPicker/Picker.d.ts +16 -0
- package/types/components/ColorPicker/PickerColorList.d.ts +10 -0
- package/types/components/ColorPicker/PickerHeading.d.ts +5 -0
- package/types/components/ColorPicker/ShadeList.d.ts +8 -0
- package/types/components/ColorPicker/TopPicks.d.ts +9 -0
- package/types/components/ColorPicker/colorPickerUtils.d.ts +41 -0
- package/types/components/ColorPicker/keyboardNavHandlers.d.ts +16 -0
- package/types/components/ContextMenu.d.ts +3 -3
- package/types/components/DefaultSidebar.d.ts +30 -0
- package/types/components/Dialog.d.ts +2 -2
- package/types/components/FilledButton.d.ts +16 -0
- package/types/components/FixedSideContainer.d.ts +1 -1
- package/types/components/HandButton.d.ts +1 -1
- package/types/components/HelpButton.d.ts +1 -1
- package/types/components/HintViewer.d.ts +2 -2
- package/types/components/ImageExportDialog.d.ts +8 -13
- package/types/components/Island.d.ts +1 -1
- package/types/components/JSONExportDialog.d.ts +4 -4
- package/types/components/LayerUI.d.ts +4 -10
- package/types/components/LibraryMenu.d.ts +33 -14
- package/types/components/LibraryMenuBrowseButton.d.ts +2 -2
- package/types/components/LibraryMenuControlButtons.d.ts +9 -0
- package/types/components/LibraryMenuHeaderContent.d.ts +11 -28
- package/types/components/LibraryMenuItems.d.ts +6 -7
- package/types/components/LibraryMenuSection.d.ts +22 -0
- package/types/components/LibraryUnit.d.ts +7 -3
- package/types/components/LockButton.d.ts +1 -1
- package/types/components/MobileMenu.d.ts +4 -4
- package/types/components/PasteChartDialog.d.ts +4 -5
- package/types/components/PenModeButton.d.ts +1 -1
- package/types/components/Popover.d.ts +1 -1
- package/types/components/ProjectName.d.ts +2 -1
- package/types/components/PublishLibrary.d.ts +2 -2
- package/types/components/RadioGroup.d.ts +12 -0
- package/types/components/Sidebar/Sidebar.d.ts +68 -45
- package/types/components/Sidebar/SidebarHeader.d.ts +6 -19
- package/types/components/Sidebar/SidebarTab.d.ts +9 -0
- package/types/components/Sidebar/SidebarTabTrigger.d.ts +10 -0
- package/types/components/Sidebar/SidebarTabTriggers.d.ts +7 -0
- package/types/components/Sidebar/SidebarTabs.d.ts +7 -0
- package/types/components/Sidebar/SidebarTrigger.d.ts +6 -0
- package/types/components/Sidebar/common.d.ts +24 -7
- package/types/components/Spinner.d.ts +2 -1
- package/types/components/Stack.d.ts +4 -3
- package/types/components/Stats.d.ts +3 -3
- package/types/components/Switch.d.ts +9 -0
- package/types/components/ToolButton.d.ts +3 -3
- package/types/components/Tooltip.d.ts +1 -1
- package/types/components/Trans.d.ts +8 -0
- package/types/components/footer/Footer.d.ts +2 -2
- package/types/components/icons.d.ts +7 -1
- package/types/constants.d.ts +10 -0
- package/types/context/tunnels.d.ts +18 -0
- package/types/context/ui-appState.d.ts +4 -0
- package/types/data/encode.d.ts +1 -1
- package/types/data/filesystem.d.ts +1 -1
- package/types/data/library.d.ts +2 -0
- package/types/data/restore.d.ts +2 -2
- package/types/data/types.d.ts +3 -5
- package/types/element/Hyperlink.d.ts +18 -10
- package/types/element/binding.d.ts +2 -2
- package/types/element/bounds.d.ts +1 -1
- package/types/element/linearElementEditor.d.ts +16 -8
- package/types/element/mutateElement.d.ts +1 -1
- package/types/element/newElement.d.ts +7 -2
- package/types/element/resizeElements.d.ts +1 -0
- package/types/element/showSelectedShapeActions.d.ts +2 -2
- package/types/element/textElement.d.ts +2 -2
- package/types/element/transformHandles.d.ts +5 -5
- package/types/element/types.d.ts +35 -35
- package/types/errors.d.ts +1 -1
- package/types/ga.d.ts +5 -5
- package/types/hooks/useLibraryItemSvg.d.ts +31 -0
- package/types/hooks/useOutsideClick.d.ts +1 -1
- package/types/hooks/useScrollPosition.d.ts +2 -0
- package/types/hooks/useTransition.d.ts +2 -0
- package/types/i18n.d.ts +2 -2
- package/types/keys.d.ts +1 -1
- package/types/packages/excalidraw/index.d.ts +3 -2
- package/types/packages/utils.d.ts +3 -3
- package/types/renderer/easingFunctions.d.ts +1 -1
- package/types/renderer/renderElement.d.ts +2 -2
- package/types/scene/Scene.d.ts +4 -4
- package/types/scene/selection.d.ts +4 -4
- package/types/scene/types.d.ts +4 -4
- package/types/types.d.ts +65 -46
- package/types/utility-types.d.ts +13 -13
- package/types/utils.d.ts +5 -5
package/types/utility-types.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export
|
|
2
|
+
export type Mutable<T> = {
|
|
3
3
|
-readonly [P in keyof T]: T[P];
|
|
4
4
|
};
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export type ValueOf<T> = T[keyof T];
|
|
6
|
+
export type Merge<M, N> = Omit<M, keyof N> & N;
|
|
7
7
|
/** utility type to assert that the second type is a subtype of the first type.
|
|
8
8
|
* Returns the subtype. */
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
9
|
+
export type SubtypeOf<Supertype, Subtype extends Supertype> = Subtype;
|
|
10
|
+
export type ResolutionType<T extends (...args: any) => any> = T extends (...args: any) => Promise<infer R> ? R : any;
|
|
11
|
+
export type MarkOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
12
|
+
export type MarkRequired<T, RK extends keyof T> = Exclude<T, RK> & Required<Pick<T, RK>>;
|
|
13
|
+
export type MarkNonNullable<T, K extends keyof T> = {
|
|
14
14
|
[P in K]-?: P extends K ? NonNullable<T[P]> : T[P];
|
|
15
15
|
} & {
|
|
16
16
|
[P in keyof T]: T[P];
|
|
17
17
|
};
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
18
|
+
export type NonOptional<T> = Exclude<T, undefined>;
|
|
19
|
+
export type SignatureType<T> = T extends (...args: infer R) => any ? R : never;
|
|
20
|
+
export type CallableType<T extends (...args: any[]) => any> = (...args: SignatureType<T>) => ReturnType<T>;
|
|
21
|
+
export type ForwardRef<T, P = any> = Parameters<CallableType<React.ForwardRefRenderFunction<T, P>>>[1];
|
|
22
|
+
export type ExtractSetType<T extends Set<any>> = T extends Set<infer U> ? U : never;
|
package/types/utils.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ export declare const setDateTimeForTests: (dateTime: string) => void;
|
|
|
6
6
|
export declare const getDateTime: () => string;
|
|
7
7
|
export declare const capitalizeString: (str: string) => string;
|
|
8
8
|
export declare const isToolIcon: (target: Element | EventTarget | null) => target is HTMLElement;
|
|
9
|
-
export declare const isInputLike: (target: Element | EventTarget | null) => target is
|
|
10
|
-
export declare const isWritableElement: (target: Element | EventTarget | null) => target is
|
|
9
|
+
export declare const isInputLike: (target: Element | EventTarget | null) => target is HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | HTMLBRElement | HTMLDivElement;
|
|
10
|
+
export declare const isWritableElement: (target: Element | EventTarget | null) => target is HTMLInputElement | HTMLTextAreaElement | HTMLBRElement | HTMLDivElement;
|
|
11
11
|
export declare const getFontFamilyString: ({ fontFamily, }: {
|
|
12
12
|
fontFamily: FontFamilyValues;
|
|
13
13
|
}) => string;
|
|
@@ -63,7 +63,7 @@ export declare const updateActiveTool: (appState: Pick<AppState, "activeTool">,
|
|
|
63
63
|
export declare const resetCursor: (canvas: HTMLCanvasElement | null) => void;
|
|
64
64
|
export declare const setCursor: (canvas: HTMLCanvasElement | null, cursor: string) => void;
|
|
65
65
|
export declare const setEraserCursor: (canvas: HTMLCanvasElement | null, theme: AppState["theme"]) => void;
|
|
66
|
-
export declare const setCursorForShape: (canvas: HTMLCanvasElement | null, appState: AppState) => void;
|
|
66
|
+
export declare const setCursorForShape: (canvas: HTMLCanvasElement | null, appState: Pick<AppState, "activeTool" | "theme">) => void;
|
|
67
67
|
export declare const isFullScreen: () => boolean;
|
|
68
68
|
export declare const allowFullScreen: () => Promise<void>;
|
|
69
69
|
export declare const exitFullScreen: () => Promise<void>;
|
|
@@ -111,7 +111,7 @@ export declare const muteFSAbortError: (error?: Error) => void;
|
|
|
111
111
|
export declare const findIndex: <T>(array: readonly T[], cb: (element: T, index: number, array: readonly T[]) => boolean, fromIndex?: number) => number;
|
|
112
112
|
export declare const findLastIndex: <T>(array: readonly T[], cb: (element: T, index: number, array: readonly T[]) => boolean, fromIndex?: number) => number;
|
|
113
113
|
export declare const isTransparent: (color: string) => boolean;
|
|
114
|
-
export
|
|
114
|
+
export type ResolvablePromise<T> = Promise<T> & {
|
|
115
115
|
resolve: [T] extends [undefined] ? (value?: T) => void : (value: T) => void;
|
|
116
116
|
reject: (error: Error) => void;
|
|
117
117
|
};
|
|
@@ -156,7 +156,7 @@ export declare const isPrimitive: (val: any) => boolean;
|
|
|
156
156
|
export declare const getFrame: () => "top" | "iframe";
|
|
157
157
|
export declare const isPromiseLike: (value: any) => value is Promise<any>;
|
|
158
158
|
export declare const queryFocusableElements: (container: HTMLElement | null) => HTMLElement[];
|
|
159
|
-
export declare const isShallowEqual: <T extends Record<string, any
|
|
159
|
+
export declare const isShallowEqual: <T extends Record<string, any>, I extends keyof T>(objA: T, objB: T, comparators?: Record<I, (a: T[I], b: T[I]) => boolean> | undefined, debug?: boolean) => boolean;
|
|
160
160
|
export declare const composeEventHandlers: <E>(originalEventHandler?: ((event: E) => void) | undefined, ourEventHandler?: ((event: E) => void) | undefined, { checkForDefaultPrevented }?: {
|
|
161
161
|
checkForDefaultPrevented?: boolean | undefined;
|
|
162
162
|
}) => (event: E) => void;
|