@dwelle/excalidraw 0.4.0-e1bdbb6 → 0.4.0-e587816
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 +714 -0
- package/README.md +18 -1422
- package/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.js → vendor-d415b28e9024dee4bb1b.js} +2 -2
- package/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.js → vendor-a14cd58fa2db417e42b2.js} +6 -6
- package/dist/excalidraw.development.js +3257 -1444
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/excalidraw.production.min.js.LICENSE.txt +20 -0
- package/main.js +1 -8
- package/package.json +9 -4
- package/types/actions/actionAddToLibrary.d.ts +124 -64
- package/types/actions/actionAlign.d.ts +33 -40
- package/types/actions/actionBoundText.d.ts +182 -25
- package/types/actions/actionCanvas.d.ts +754 -220
- package/types/actions/actionClipboard.d.ts +236 -115
- package/types/actions/actionDeleteSelected.d.ts +133 -72
- package/types/actions/actionDistribute.d.ts +11 -16
- package/types/actions/actionDuplicateSelection.d.ts +4 -7
- package/types/actions/actionElementLock.d.ts +271 -0
- package/types/actions/actionExport.d.ts +440 -277
- package/types/actions/actionFinalize.d.ts +85 -51
- package/types/actions/actionFlip.d.ts +8 -11
- package/types/actions/actionFrame.d.ts +423 -0
- package/types/actions/actionGroup.d.ts +252 -19
- package/types/actions/actionHistory.d.ts +1 -1
- package/types/actions/actionLinearEditor.d.ts +44 -24
- package/types/actions/actionMenu.d.ts +132 -79
- package/types/actions/actionNavigate.d.ts +2 -3
- package/types/actions/actionProperties.d.ts +569 -334
- package/types/actions/actionSelectAll.d.ts +123 -4
- package/types/actions/actionStyles.d.ts +46 -27
- package/types/actions/actionToggleGridMode.d.ts +46 -25
- package/types/actions/{actionToggleLock.d.ts → actionToggleObjectsSnapMode.d.ts} +56 -35
- package/types/actions/actionToggleStats.d.ts +45 -25
- package/types/actions/actionToggleViewMode.d.ts +46 -25
- package/types/actions/actionToggleZenMode.d.ts +46 -25
- package/types/actions/actionZindex.d.ts +16 -24
- package/types/actions/index.d.ts +2 -1
- package/types/actions/manager.d.ts +3 -2
- package/types/actions/shortcuts.d.ts +2 -1
- package/types/actions/types.d.ts +16 -13
- package/types/appState.d.ts +27 -28
- package/types/charts.d.ts +2 -2
- package/types/clients.d.ts +5 -6
- package/types/clipboard.d.ts +9 -3
- package/types/colors.d.ts +60 -5
- package/types/components/Actions.d.ts +7 -12
- package/types/components/ActiveConfirmDialog.d.ts +4 -0
- package/types/components/App.d.ts +102 -86
- package/types/components/Avatar.d.ts +1 -2
- package/types/components/BraveMeasureTextError.d.ts +2 -0
- package/types/components/Button.d.ts +16 -0
- package/types/components/ButtonIconSelect.d.ts +11 -3
- package/types/components/Card.d.ts +6 -0
- package/types/components/ColorPicker/ColorInput.d.ts +9 -0
- package/types/components/ColorPicker/ColorPicker.d.ts +19 -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 +18 -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 +21 -0
- package/types/components/ColorPicker/keyboardNavHandlers.d.ts +20 -0
- package/types/components/ContextMenu.d.ts +9 -22
- package/types/components/DefaultSidebar.d.ts +29 -0
- package/types/components/Dialog.d.ts +3 -4
- package/types/components/ErrorDialog.d.ts +3 -2
- package/types/components/ExcalidrawLogo.d.ts +15 -0
- package/types/components/EyeDropper.d.ts +28 -0
- package/types/components/FilledButton.d.ts +17 -0
- package/types/components/FixedSideContainer.d.ts +1 -1
- package/types/components/HandButton.d.ts +10 -0
- package/types/components/HelpButton.d.ts +1 -2
- package/types/components/HintViewer.d.ts +4 -5
- package/types/components/HomeButton.d.ts +1 -1
- package/types/components/ImageExportDialog.d.ts +8 -13
- package/types/components/Island.d.ts +1 -1
- package/types/components/JSONExportDialog.d.ts +7 -5
- package/types/components/LaserTool/LaserPathManager.d.ts +28 -0
- package/types/components/LaserTool/LaserPointerButton.d.ts +10 -0
- package/types/components/LaserTool/LaserTool.d.ts +7 -0
- package/types/components/LayerUI.d.ts +11 -19
- package/types/components/LibraryMenu.d.ts +13 -14
- package/types/components/LibraryMenuBrowseButton.d.ts +2 -2
- package/types/components/LibraryMenuControlButtons.d.ts +9 -0
- package/types/components/LibraryMenuHeaderContent.d.ts +10 -5
- package/types/components/LibraryMenuItems.d.ts +6 -7
- package/types/components/LibraryMenuSection.d.ts +22 -0
- package/types/components/LibraryUnit.d.ts +6 -3
- package/types/components/LoadingMessage.d.ts +0 -1
- package/types/components/LockButton.d.ts +1 -2
- package/types/components/MobileMenu.d.ts +9 -15
- package/types/components/OverwriteConfirm/OverwriteConfirm.d.ts +17 -0
- package/types/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +17 -0
- package/types/components/OverwriteConfirm/OverwriteConfirmState.d.ts +22 -0
- 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/Section.d.ts +1 -1
- package/types/components/Sidebar/Sidebar.d.ts +66 -63
- package/types/components/Sidebar/SidebarHeader.d.ts +6 -19
- package/types/components/Sidebar/SidebarTab.d.ts +8 -0
- package/types/components/Sidebar/SidebarTabTrigger.d.ts +9 -0
- package/types/components/Sidebar/SidebarTabTriggers.d.ts +6 -0
- package/types/components/Sidebar/SidebarTabs.d.ts +6 -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 +6 -5
- package/types/components/Tooltip.d.ts +1 -1
- package/types/components/Trans.d.ts +9 -0
- package/types/components/UserList.d.ts +0 -2
- package/types/components/canvases/InteractiveCanvas.d.ts +27 -0
- package/types/components/canvases/StaticCanvas.d.ts +18 -0
- package/types/components/canvases/index.d.ts +3 -0
- package/types/components/dropdownMenu/DropdownMenu.d.ts +70 -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 +13 -0
- package/types/components/dropdownMenu/DropdownMenuItemContent.d.ts +6 -0
- package/types/components/dropdownMenu/DropdownMenuItemCustom.d.ts +7 -0
- package/types/components/dropdownMenu/DropdownMenuItemLink.d.ts +14 -0
- package/types/components/dropdownMenu/DropdownMenuSeparator.d.ts +5 -0
- package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +10 -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 +12 -0
- package/types/components/footer/FooterCenter.d.ts +8 -0
- package/types/components/hoc/withInternalFallback.d.ts +4 -0
- package/types/components/icons.d.ts +17 -2
- package/types/components/live-collaboration/LiveCollaborationTrigger.d.ts +9 -0
- package/types/components/main-menu/DefaultItems.d.ts +47 -0
- package/types/components/main-menu/MainMenu.d.ts +64 -0
- package/types/components/welcome-screen/WelcomeScreen.Center.d.ts +57 -0
- package/types/components/welcome-screen/WelcomeScreen.Hints.d.ts +19 -0
- package/types/components/welcome-screen/WelcomeScreen.d.ts +84 -0
- package/types/constants.d.ts +105 -18
- package/types/context/tunnels.d.ts +19 -0
- package/types/context/ui-appState.d.ts +4 -0
- package/types/cursor.d.ts +5 -0
- package/types/data/blob.d.ts +5 -3
- package/types/data/encode.d.ts +1 -1
- package/types/data/filesystem.d.ts +2 -1
- package/types/data/index.d.ts +1 -1
- package/types/data/library.d.ts +3 -45
- package/types/data/restore.d.ts +10 -4
- package/types/data/transform.d.ts +73 -0
- package/types/data/types.d.ts +3 -5
- package/types/data/url.d.ts +7 -0
- package/types/element/Hyperlink.d.ts +57 -36
- package/types/element/binding.d.ts +4 -3
- package/types/element/bounds.d.ts +41 -10
- package/types/element/collision.d.ts +7 -7
- package/types/element/dragElements.d.ts +12 -2
- package/types/element/embeddable.d.ts +153 -0
- package/types/element/image.d.ts +11 -1
- package/types/element/index.d.ts +3 -2
- package/types/element/linearElementEditor.d.ts +77 -30
- package/types/element/mutateElement.d.ts +3 -2
- package/types/element/newElement.d.ts +48 -15
- package/types/element/resizeElements.d.ts +3 -3
- package/types/element/resizeTest.d.ts +2 -1
- package/types/element/showSelectedShapeActions.d.ts +2 -2
- package/types/element/sizeHelpers.d.ts +8 -1
- package/types/element/sortElements.d.ts +2 -0
- package/types/element/textElement.d.ts +57 -9
- package/types/element/textWysiwyg.d.ts +7 -2
- package/types/element/transformHandles.d.ts +15 -8
- package/types/element/typeChecks.d.ts +14 -2
- package/types/element/types.d.ts +66 -35
- package/types/emitter.d.ts +1 -2
- package/types/errors.d.ts +1 -1
- package/types/frame.d.ts +46 -0
- package/types/ga.d.ts +5 -5
- package/types/groups.d.ts +15 -11
- package/types/history.d.ts +3 -3
- package/types/hooks/useCreatePortalContainer.d.ts +4 -0
- package/types/hooks/useLibraryItemSvg.d.ts +11 -0
- package/types/hooks/useOutsideClick.d.ts +19 -2
- package/types/hooks/useScrollPosition.d.ts +1 -0
- package/types/hooks/useStable.d.ts +1 -0
- package/types/hooks/useTransition.d.ts +2 -0
- package/types/i18n.d.ts +11 -2
- package/types/jotai.d.ts +20 -108
- package/types/keys.d.ts +7 -4
- package/types/math.d.ts +7 -1
- package/types/packages/bbox.d.ts +11 -0
- package/types/packages/excalidraw/example/App.d.ts +7 -1
- package/types/packages/excalidraw/example/CustomFooter.d.ts +5 -0
- package/types/packages/excalidraw/example/MobileFooter.d.ts +5 -0
- package/types/packages/excalidraw/example/initialData.d.ts +182 -64
- package/types/packages/excalidraw/index.d.ts +22 -4
- package/types/packages/excalidraw/main.d.ts +3 -1
- package/types/packages/excalidraw/webpack.dev.config.d.ts +5 -2
- package/types/packages/excalidraw/webpack.prod.config.d.ts +3 -0
- package/types/packages/utils.d.ts +30 -24
- package/types/packages/withinBounds.d.ts +19 -0
- package/types/renderer/renderElement.d.ts +13 -22
- package/types/renderer/renderScene.d.ts +19 -29
- package/types/renderer/renderSnaps.d.ts +2 -0
- package/types/renderer/roundRect.d.ts +1 -1
- package/types/scene/Fonts.d.ts +21 -0
- package/types/scene/Renderer.d.ts +25 -0
- package/types/scene/Scene.d.ts +42 -5
- package/types/scene/Shape.d.ts +12 -0
- package/types/scene/ShapeCache.d.ts +20 -0
- package/types/scene/comparisons.d.ts +2 -4
- package/types/scene/export.d.ts +183 -10
- package/types/scene/index.d.ts +1 -1
- package/types/scene/scroll.d.ts +1 -1
- package/types/scene/scrollbars.d.ts +2 -6
- package/types/scene/selection.d.ts +27 -6
- package/types/scene/types.d.ts +70 -26
- package/types/snapping.d.ts +108 -0
- package/types/types.d.ts +227 -91
- package/types/utility-types.d.ts +24 -0
- package/types/utils.d.ts +75 -14
- package/types/zindex.d.ts +4 -4
- package/types/components/ActiveFile.d.ts +0 -7
- package/types/components/ClearCanvas.d.ts +0 -4
- package/types/components/CollabButton.d.ts +0 -6
- package/types/components/ColorPicker.d.ts +0 -14
- package/types/components/Footer.d.ts +0 -10
- package/types/components/LibraryButton.d.ts +0 -8
- package/types/components/MenuItem.d.ts +0 -11
- package/types/components/MenuUtils.d.ts +0 -1
- package/types/components/SingleLibraryItem.d.ts +0 -10
- package/types/components/WelcomeScreen.d.ts +0 -10
- package/types/components/WelcomeScreenDecor.d.ts +0 -6
- package/types/components/hoc/withUpstreamOverride.d.ts +0 -10
- /package/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.js.LICENSE.txt → vendor-d415b28e9024dee4bb1b.js.LICENSE.txt} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets/{vendor-2002fe1b8862917b36c1.d.ts → vendor-d415b28e9024dee4bb1b.d.ts} +0 -0
- /package/types/packages/excalidraw/dist/excalidraw-assets-dev/{vendor-e6df8519da951026ff69.d.ts → vendor-a14cd58fa2db417e42b2.d.ts} +0 -0
package/types/utils.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { EVENT } from "./constants";
|
|
2
|
-
import { FontFamilyValues, FontString } from "./element/types";
|
|
3
|
-
import { AppState,
|
|
4
|
-
import { SHAPES } from "./shapes";
|
|
2
|
+
import { FontFamilyValues, FontString, NonDeletedExcalidrawElement } from "./element/types";
|
|
3
|
+
import { ActiveTool, AppState, ToolType, Zoom } from "./types";
|
|
5
4
|
export declare const setDateTimeForTests: (dateTime: string) => void;
|
|
6
5
|
export declare const getDateTime: () => string;
|
|
7
6
|
export declare const capitalizeString: (str: string) => string;
|
|
8
7
|
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
|
|
8
|
+
export declare const isInputLike: (target: Element | EventTarget | null) => target is HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | HTMLBRElement | HTMLDivElement;
|
|
9
|
+
export declare const isInteractive: (target: Element | EventTarget | null) => boolean;
|
|
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;
|
|
@@ -28,22 +28,67 @@ export declare const throttleRAF: <T extends any[]>(fn: (...args: T) => void, op
|
|
|
28
28
|
flush(): void;
|
|
29
29
|
cancel(): void;
|
|
30
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* Exponential ease-out method
|
|
33
|
+
*
|
|
34
|
+
* @param {number} k - The value to be tweened.
|
|
35
|
+
* @returns {number} The tweened value.
|
|
36
|
+
*/
|
|
37
|
+
export declare const easeOut: (k: number) => number;
|
|
38
|
+
/**
|
|
39
|
+
* Animates values from `fromValues` to `toValues` using the requestAnimationFrame API.
|
|
40
|
+
* Executes the `onStep` callback on each step with the interpolated values.
|
|
41
|
+
* Returns a function that can be called to cancel the animation.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* // Example usage:
|
|
45
|
+
* const fromValues = { x: 0, y: 0 };
|
|
46
|
+
* const toValues = { x: 100, y: 200 };
|
|
47
|
+
* const onStep = ({x, y}) => {
|
|
48
|
+
* setState(x, y)
|
|
49
|
+
* };
|
|
50
|
+
* const onCancel = () => {
|
|
51
|
+
* console.log("Animation canceled");
|
|
52
|
+
* };
|
|
53
|
+
*
|
|
54
|
+
* const cancelAnimation = easeToValuesRAF({
|
|
55
|
+
* fromValues,
|
|
56
|
+
* toValues,
|
|
57
|
+
* onStep,
|
|
58
|
+
* onCancel,
|
|
59
|
+
* });
|
|
60
|
+
*
|
|
61
|
+
* // To cancel the animation:
|
|
62
|
+
* cancelAnimation();
|
|
63
|
+
*/
|
|
64
|
+
export declare const easeToValuesRAF: <T extends Record<keyof T, number>, K extends keyof T>({ fromValues, toValues, onStep, duration, interpolateValue, onStart, onEnd, onCancel, }: {
|
|
65
|
+
fromValues: T;
|
|
66
|
+
toValues: T;
|
|
67
|
+
/**
|
|
68
|
+
* Interpolate a single value.
|
|
69
|
+
* Return undefined to be handled by the default interpolator.
|
|
70
|
+
*/
|
|
71
|
+
interpolateValue?: ((fromValue: number, toValue: number, progress: number, key: K) => number | undefined) | undefined;
|
|
72
|
+
onStep: (values: T) => void;
|
|
73
|
+
duration?: number | undefined;
|
|
74
|
+
onStart?: (() => void) | undefined;
|
|
75
|
+
onEnd?: (() => void) | undefined;
|
|
76
|
+
onCancel?: (() => void) | undefined;
|
|
77
|
+
}) => () => void;
|
|
31
78
|
export declare const chunk: <T extends unknown>(array: readonly T[], size: number) => T[][];
|
|
32
79
|
export declare const selectNode: (node: Element) => void;
|
|
33
80
|
export declare const removeSelection: () => void;
|
|
34
81
|
export declare const distance: (x: number, y: number) => number;
|
|
35
|
-
export declare const updateActiveTool: (appState: Pick<AppState, "activeTool">, data: ({
|
|
36
|
-
type:
|
|
82
|
+
export declare const updateActiveTool: (appState: Pick<AppState, "activeTool">, data: (({
|
|
83
|
+
type: ToolType;
|
|
37
84
|
} | {
|
|
38
85
|
type: "custom";
|
|
39
86
|
customType: string;
|
|
40
87
|
}) & {
|
|
41
|
-
|
|
88
|
+
locked?: boolean;
|
|
89
|
+
}) & {
|
|
90
|
+
lastActiveToolBeforeEraser?: ActiveTool | null;
|
|
42
91
|
}) => AppState["activeTool"];
|
|
43
|
-
export declare const resetCursor: (canvas: HTMLCanvasElement | null) => void;
|
|
44
|
-
export declare const setCursor: (canvas: HTMLCanvasElement | null, cursor: string) => void;
|
|
45
|
-
export declare const setEraserCursor: (canvas: HTMLCanvasElement | null, theme: AppState["theme"]) => void;
|
|
46
|
-
export declare const setCursorForShape: (canvas: HTMLCanvasElement | null, appState: AppState) => void;
|
|
47
92
|
export declare const isFullScreen: () => boolean;
|
|
48
93
|
export declare const allowFullScreen: () => Promise<void>;
|
|
49
94
|
export declare const exitFullScreen: () => Promise<void>;
|
|
@@ -91,7 +136,7 @@ export declare const muteFSAbortError: (error?: Error) => void;
|
|
|
91
136
|
export declare const findIndex: <T>(array: readonly T[], cb: (element: T, index: number, array: readonly T[]) => boolean, fromIndex?: number) => number;
|
|
92
137
|
export declare const findLastIndex: <T>(array: readonly T[], cb: (element: T, index: number, array: readonly T[]) => boolean, fromIndex?: number) => number;
|
|
93
138
|
export declare const isTransparent: (color: string) => boolean;
|
|
94
|
-
export
|
|
139
|
+
export type ResolvablePromise<T> = Promise<T> & {
|
|
95
140
|
resolve: [T] extends [undefined] ? (value?: T) => void : (value: T) => void;
|
|
96
141
|
reject: (error: Error) => void;
|
|
97
142
|
};
|
|
@@ -124,13 +169,29 @@ export declare const getUpdatedTimestamp: () => number;
|
|
|
124
169
|
export declare const arrayToMap: <T extends string | {
|
|
125
170
|
id: string;
|
|
126
171
|
}>(items: readonly T[]) => Map<string, T>;
|
|
172
|
+
export declare const arrayToMapWithIndex: <T extends {
|
|
173
|
+
id: string;
|
|
174
|
+
}>(elements: readonly T[]) => Map<string, [element: T, index: number]>;
|
|
127
175
|
export declare const isTestEnv: () => boolean;
|
|
128
|
-
export declare const isProdEnv: () => boolean;
|
|
129
176
|
export declare const wrapEvent: <T extends Event>(name: EVENT, nativeEvent: T) => CustomEvent<{
|
|
130
177
|
nativeEvent: T;
|
|
131
178
|
}>;
|
|
132
179
|
export declare const updateObject: <T extends Record<string, any>>(obj: T, updates: Partial<T>) => T;
|
|
133
180
|
export declare const isPrimitive: (val: any) => boolean;
|
|
134
181
|
export declare const getFrame: () => "top" | "iframe";
|
|
182
|
+
export declare const isRunningInIframe: () => boolean;
|
|
135
183
|
export declare const isPromiseLike: (value: any) => value is Promise<any>;
|
|
136
184
|
export declare const queryFocusableElements: (container: HTMLElement | null) => HTMLElement[];
|
|
185
|
+
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;
|
|
186
|
+
export declare const composeEventHandlers: <E>(originalEventHandler?: ((event: E) => void) | undefined, ourEventHandler?: ((event: E) => void) | undefined, { checkForDefaultPrevented }?: {
|
|
187
|
+
checkForDefaultPrevented?: boolean | undefined;
|
|
188
|
+
}) => (event: E) => void;
|
|
189
|
+
export declare const isOnlyExportingSingleFrame: (elements: readonly NonDeletedExcalidrawElement[]) => boolean;
|
|
190
|
+
export declare const assertNever: (value: never, message: string, softAssert?: boolean) => never;
|
|
191
|
+
/**
|
|
192
|
+
* Memoizes on values of `opts` object (strict equality).
|
|
193
|
+
*/
|
|
194
|
+
export declare const memoize: <T extends Record<string, any>, R extends unknown>(func: (opts: T) => R) => ((opts: T) => R) & {
|
|
195
|
+
clear: () => void;
|
|
196
|
+
};
|
|
197
|
+
export declare const isRenderThrottlingEnabled: () => boolean;
|
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: (
|
|
4
|
-
export declare const moveOneRight: (
|
|
5
|
-
export declare const moveAllLeft: (
|
|
6
|
-
export declare const moveAllRight: (
|
|
3
|
+
export declare const moveOneLeft: (allElements: readonly ExcalidrawElement[], appState: AppState) => ExcalidrawElement[];
|
|
4
|
+
export declare const moveOneRight: (allElements: readonly ExcalidrawElement[], appState: AppState) => ExcalidrawElement[];
|
|
5
|
+
export declare const moveAllLeft: (allElements: readonly ExcalidrawElement[], appState: AppState) => readonly ExcalidrawElement[] | ExcalidrawElement[];
|
|
6
|
+
export declare const moveAllRight: (allElements: readonly ExcalidrawElement[], appState: AppState) => readonly ExcalidrawElement[] | ExcalidrawElement[];
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import "./ColorPicker.scss";
|
|
2
|
-
import { ExcalidrawElement } from "../element/types";
|
|
3
|
-
import { AppState } from "../types";
|
|
4
|
-
export declare const getCustomColors: (elements: readonly ExcalidrawElement[], type: "elementBackground" | "elementStroke") => string[];
|
|
5
|
-
export declare const ColorPicker: ({ type, color, onChange, label, isActive, setActive, elements, appState, }: {
|
|
6
|
-
type: "canvasBackground" | "elementBackground" | "elementStroke";
|
|
7
|
-
color: string | null;
|
|
8
|
-
onChange: (color: string) => void;
|
|
9
|
-
label: string;
|
|
10
|
-
isActive: boolean;
|
|
11
|
-
setActive: (active: boolean) => void;
|
|
12
|
-
elements: readonly ExcalidrawElement[];
|
|
13
|
-
appState: AppState;
|
|
14
|
-
}) => JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ActionManager } from "../actions/manager";
|
|
2
|
-
import { AppState, ExcalidrawProps } from "../types";
|
|
3
|
-
declare const Footer: ({ appState, actionManager, renderCustomFooter, showExitZenModeBtn, renderWelcomeScreen, }: {
|
|
4
|
-
appState: AppState;
|
|
5
|
-
actionManager: ActionManager;
|
|
6
|
-
renderCustomFooter?: ExcalidrawProps["renderFooter"];
|
|
7
|
-
showExitZenModeBtn: boolean;
|
|
8
|
-
renderWelcomeScreen: boolean;
|
|
9
|
-
}) => JSX.Element;
|
|
10
|
-
export default Footer;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import "./Menu.scss";
|
|
2
|
-
interface MenuProps {
|
|
3
|
-
icon: JSX.Element;
|
|
4
|
-
onClick: () => void;
|
|
5
|
-
label: string;
|
|
6
|
-
dataTestId: string;
|
|
7
|
-
shortcut?: string;
|
|
8
|
-
isCollaborating?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const MenuItem: ({ icon, onClick, label, dataTestId, shortcut, isCollaborating, }: MenuProps) => JSX.Element;
|
|
11
|
-
export default MenuItem;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const Separator: () => JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AppState, LibraryItem } from "../types";
|
|
2
|
-
import "./SingleLibraryItem.scss";
|
|
3
|
-
declare const SingleLibraryItem: ({ libItem, appState, index, onChange, onRemove, }: {
|
|
4
|
-
libItem: LibraryItem;
|
|
5
|
-
appState: AppState;
|
|
6
|
-
index: number;
|
|
7
|
-
onChange: (val: string, index: number) => void;
|
|
8
|
-
onRemove: (id: string) => void;
|
|
9
|
-
}) => JSX.Element;
|
|
10
|
-
export default SingleLibraryItem;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ActionManager } from "../actions/manager";
|
|
2
|
-
import { AppState } from "../types";
|
|
3
|
-
import { AppProps } from "../types";
|
|
4
|
-
import "./WelcomeScreen.scss";
|
|
5
|
-
declare const WelcomeScreen: ({ appState, actionManager, onCollabButtonClick, }: {
|
|
6
|
-
appState: AppState;
|
|
7
|
-
actionManager: ActionManager;
|
|
8
|
-
onCollabButtonClick: AppProps["onCollabButtonClick"];
|
|
9
|
-
}) => JSX.Element;
|
|
10
|
-
export default WelcomeScreen;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare const withUpstreamOverride: <P>(Component: React.ComponentType<P>) => readonly [React.FC<{
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
}>, {
|
|
5
|
-
(props: P & {
|
|
6
|
-
/** @private internal */
|
|
7
|
-
__isFallback?: boolean | undefined;
|
|
8
|
-
}): JSX.Element | null;
|
|
9
|
-
displayName: string;
|
|
10
|
-
}];
|
|
File without changes
|
|
File without changes
|