@dwelle/excalidraw 0.4.0-d68dd48 → 0.4.0-e03b600
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 +30 -0
- package/README.md +4 -0
- package/dist/excalidraw.development.js +1314 -248
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +2 -2
- package/types/actions/actionAddToLibrary.d.ts +36 -12
- package/types/actions/actionAlign.d.ts +6 -0
- package/types/actions/actionBoundText.d.ts +24 -8
- package/types/actions/actionCanvas.d.ts +235 -41
- package/types/actions/actionClipboard.d.ts +60 -20
- package/types/actions/actionDeleteSelected.d.ts +36 -12
- package/types/actions/actionElementLock.d.ts +254 -0
- package/types/actions/actionExport.d.ts +109 -37
- package/types/actions/actionFinalize.d.ts +24 -8
- package/types/actions/actionFlip.d.ts +2 -4
- package/types/actions/actionFrame.d.ts +397 -0
- package/types/actions/actionGroup.d.ts +2 -2
- package/types/actions/actionHistory.d.ts +1 -1
- package/types/actions/actionLinearEditor.d.ts +12 -4
- package/types/actions/actionMenu.d.ts +37 -14
- package/types/actions/actionNavigate.d.ts +1 -1
- package/types/actions/actionProperties.d.ts +158 -54
- package/types/actions/actionStyles.d.ts +12 -4
- package/types/actions/actionToggleGridMode.d.ts +12 -4
- package/types/actions/actionToggleStats.d.ts +12 -4
- package/types/actions/actionToggleViewMode.d.ts +12 -4
- package/types/actions/actionToggleZenMode.d.ts +12 -4
- package/types/actions/actionZindex.d.ts +4 -4
- 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 +6 -3
- package/types/charts.d.ts +2 -2
- package/types/clients.d.ts +5 -6
- package/types/clipboard.d.ts +2 -2
- package/types/colors.d.ts +60 -5
- package/types/components/Actions.d.ts +5 -5
- package/types/components/ActiveConfirmDialog.d.ts +1 -21
- package/types/components/App.d.ts +32 -9
- package/types/components/Avatar.d.ts +1 -2
- package/types/components/Button.d.ts +3 -1
- package/types/components/ColorPicker/ColorInput.d.ts +7 -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 +21 -0
- package/types/components/ContextMenu.d.ts +3 -3
- package/types/components/DefaultSidebar.d.ts +30 -0
- package/types/components/Dialog.d.ts +3 -4
- package/types/components/EyeDropper.d.ts +18 -0
- package/types/components/FilledButton.d.ts +17 -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/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 +4 -4
- package/types/components/LayerUI.d.ts +4 -10
- 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 +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/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/Sidebar/Sidebar.d.ts +66 -63
- 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 +5 -4
- package/types/components/Tooltip.d.ts +1 -1
- package/types/components/Trans.d.ts +8 -0
- package/types/components/dropdownMenu/DropdownMenu.d.ts +3 -2
- package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +4 -2
- package/types/components/footer/Footer.d.ts +2 -2
- package/types/components/icons.d.ts +11 -1
- package/types/components/main-menu/MainMenu.d.ts +3 -2
- package/types/constants.d.ts +42 -6
- package/types/context/tunnels.d.ts +19 -0
- package/types/context/ui-appState.d.ts +4 -0
- package/types/data/blob.d.ts +2 -2
- package/types/data/encode.d.ts +1 -1
- package/types/data/filesystem.d.ts +2 -1
- package/types/data/library.d.ts +3 -45
- package/types/data/restore.d.ts +2 -2
- package/types/data/types.d.ts +3 -5
- package/types/element/Hyperlink.d.ts +14 -6
- package/types/element/binding.d.ts +3 -3
- package/types/element/bounds.d.ts +31 -6
- package/types/element/collision.d.ts +7 -7
- package/types/element/dragElements.d.ts +2 -1
- package/types/element/image.d.ts +11 -1
- package/types/element/index.d.ts +3 -2
- package/types/element/linearElementEditor.d.ts +13 -5
- package/types/element/mutateElement.d.ts +1 -1
- package/types/element/newElement.d.ts +10 -3
- package/types/element/resizeElements.d.ts +1 -0
- package/types/element/showSelectedShapeActions.d.ts +2 -2
- package/types/element/textElement.d.ts +3 -2
- package/types/element/transformHandles.d.ts +12 -5
- package/types/element/typeChecks.d.ts +2 -1
- package/types/element/types.d.ts +40 -35
- package/types/emitter.d.ts +1 -1
- package/types/errors.d.ts +1 -1
- package/types/frame.d.ts +40 -0
- package/types/ga.d.ts +5 -5
- package/types/groups.d.ts +4 -0
- package/types/hooks/useCreatePortalContainer.d.ts +4 -0
- package/types/hooks/useLibraryItemSvg.d.ts +11 -0
- package/types/hooks/useOutsideClick.d.ts +19 -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/jotai.d.ts +16 -104
- package/types/keys.d.ts +2 -1
- package/types/math.d.ts +1 -0
- package/types/packages/excalidraw/example/initialData.d.ts +6 -0
- package/types/packages/excalidraw/index.d.ts +2 -1
- package/types/packages/utils.d.ts +2 -2
- package/types/renderer/renderElement.d.ts +4 -3
- package/types/renderer/renderScene.d.ts +12 -3
- package/types/renderer/roundRect.d.ts +1 -1
- package/types/scene/Scene.d.ts +12 -5
- package/types/scene/export.d.ts +3 -2
- package/types/scene/selection.d.ts +15 -5
- package/types/scene/types.d.ts +4 -4
- package/types/types.d.ts +91 -52
- package/types/utility-types.d.ts +13 -13
- package/types/utils.d.ts +20 -25
- package/types/zindex.d.ts +4 -4
- package/types/actions/actionToggleLock.d.ts +0 -119
- package/types/components/ColorPicker.d.ts +0 -14
- package/types/components/LibraryButton.d.ts +0 -8
- package/types/components/context/tunnels.d.ts +0 -16
- package/types/components/hoc/withUpstreamOverride.d.ts +0 -10
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
|
|
4
|
-
export declare const moveOneRight: (elements: readonly ExcalidrawElement[], appState: AppState
|
|
5
|
-
export declare const moveAllLeft: (elements: readonly ExcalidrawElement[], appState: AppState
|
|
6
|
-
export declare const moveAllRight: (elements: readonly ExcalidrawElement[], appState: AppState
|
|
3
|
+
export declare const moveOneLeft: (elements: readonly ExcalidrawElement[], appState: AppState, elementsToBeMoved?: readonly ExcalidrawElement[]) => ExcalidrawElement[];
|
|
4
|
+
export declare const moveOneRight: (elements: readonly ExcalidrawElement[], appState: AppState, elementsToBeMoved?: readonly ExcalidrawElement[]) => ExcalidrawElement[];
|
|
5
|
+
export declare const moveAllLeft: (elements: readonly ExcalidrawElement[], appState: AppState, elementsToBeMoved?: readonly ExcalidrawElement[]) => ExcalidrawElement[];
|
|
6
|
+
export declare const moveAllRight: (elements: readonly ExcalidrawElement[], appState: AppState, elementsToBeMoved?: readonly ExcalidrawElement[]) => ExcalidrawElement[];
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ExcalidrawElement } from "../element/types";
|
|
3
|
-
export declare const actionToggleLock: {
|
|
4
|
-
name: "toggleLock";
|
|
5
|
-
trackEvent: {
|
|
6
|
-
category: "element";
|
|
7
|
-
};
|
|
8
|
-
perform: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => false | {
|
|
9
|
-
elements: ExcalidrawElement[];
|
|
10
|
-
appState: {
|
|
11
|
-
selectedLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
12
|
-
contextMenu: {
|
|
13
|
-
items: import("../components/ContextMenu").ContextMenuItems;
|
|
14
|
-
top: number;
|
|
15
|
-
left: number;
|
|
16
|
-
} | null;
|
|
17
|
-
showWelcomeScreen: boolean;
|
|
18
|
-
isLoading: boolean;
|
|
19
|
-
errorMessage: import("react").ReactNode;
|
|
20
|
-
draggingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
21
|
-
resizingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
22
|
-
multiElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawLinearElement> | null;
|
|
23
|
-
selectionElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
24
|
-
isBindingEnabled: boolean;
|
|
25
|
-
startBoundElement: import("../element/types").NonDeleted<import("../element/types").ExcalidrawBindableElement> | null;
|
|
26
|
-
suggestedBindings: import("../element/binding").SuggestedBinding[];
|
|
27
|
-
editingElement: import("../element/types").NonDeletedExcalidrawElement | null;
|
|
28
|
-
editingLinearElement: import("../element/linearElementEditor").LinearElementEditor | null;
|
|
29
|
-
activeTool: {
|
|
30
|
-
lastActiveTool: import("../types").LastActiveTool;
|
|
31
|
-
locked: boolean;
|
|
32
|
-
} & ({
|
|
33
|
-
type: "line" | "arrow" | "text" | "selection" | "rectangle" | "diamond" | "ellipse" | "image" | "freedraw" | "eraser" | "hand";
|
|
34
|
-
customType: null;
|
|
35
|
-
} | {
|
|
36
|
-
type: "custom";
|
|
37
|
-
customType: string;
|
|
38
|
-
});
|
|
39
|
-
penMode: boolean;
|
|
40
|
-
penDetected: boolean;
|
|
41
|
-
exportBackground: boolean;
|
|
42
|
-
exportEmbedScene: boolean;
|
|
43
|
-
exportWithDarkMode: boolean;
|
|
44
|
-
exportScale: number;
|
|
45
|
-
currentItemStrokeColor: string;
|
|
46
|
-
currentItemBackgroundColor: string;
|
|
47
|
-
currentItemFillStyle: import("../element/types").FillStyle;
|
|
48
|
-
currentItemStrokeWidth: number;
|
|
49
|
-
currentItemStrokeStyle: import("../element/types").StrokeStyle;
|
|
50
|
-
currentItemRoughness: number;
|
|
51
|
-
currentItemOpacity: number;
|
|
52
|
-
currentItemFontFamily: number;
|
|
53
|
-
currentItemFontSize: number;
|
|
54
|
-
currentItemTextAlign: string;
|
|
55
|
-
currentItemStartArrowhead: import("../element/types").Arrowhead | null;
|
|
56
|
-
currentItemEndArrowhead: import("../element/types").Arrowhead | null;
|
|
57
|
-
currentItemRoundness: import("../element/types").StrokeRoundness;
|
|
58
|
-
viewBackgroundColor: string;
|
|
59
|
-
scrollX: number;
|
|
60
|
-
scrollY: number;
|
|
61
|
-
cursorButton: "up" | "down";
|
|
62
|
-
scrolledOutside: boolean;
|
|
63
|
-
name: string;
|
|
64
|
-
isResizing: boolean;
|
|
65
|
-
isRotating: boolean;
|
|
66
|
-
zoom: Readonly<{
|
|
67
|
-
value: import("../types").NormalizedZoomValue;
|
|
68
|
-
}>;
|
|
69
|
-
openMenu: "canvas" | "shape" | null;
|
|
70
|
-
openPopup: "canvasColorPicker" | "backgroundColorPicker" | "strokeColorPicker" | null;
|
|
71
|
-
openSidebar: "library" | "customSidebar" | null;
|
|
72
|
-
openDialog: "imageExport" | "help" | "jsonExport" | null;
|
|
73
|
-
isSidebarDocked: boolean;
|
|
74
|
-
lastPointerDownWith: import("../element/types").PointerType;
|
|
75
|
-
selectedElementIds: {
|
|
76
|
-
[id: string]: boolean;
|
|
77
|
-
};
|
|
78
|
-
previousSelectedElementIds: {
|
|
79
|
-
[id: string]: boolean;
|
|
80
|
-
};
|
|
81
|
-
shouldCacheIgnoreZoom: boolean;
|
|
82
|
-
toast: {
|
|
83
|
-
message: string;
|
|
84
|
-
closable?: boolean | undefined;
|
|
85
|
-
duration?: number | undefined;
|
|
86
|
-
} | null;
|
|
87
|
-
zenModeEnabled: boolean;
|
|
88
|
-
theme: string;
|
|
89
|
-
gridSize: number | null;
|
|
90
|
-
viewModeEnabled: boolean;
|
|
91
|
-
selectedGroupIds: {
|
|
92
|
-
[groupId: string]: boolean;
|
|
93
|
-
};
|
|
94
|
-
editingGroupId: string | null;
|
|
95
|
-
width: number;
|
|
96
|
-
height: number;
|
|
97
|
-
offsetTop: number;
|
|
98
|
-
offsetLeft: number;
|
|
99
|
-
fileHandle: import("browser-fs-access").FileSystemHandle | null;
|
|
100
|
-
collaborators: Map<string, import("../types").Collaborator>;
|
|
101
|
-
showStats: boolean;
|
|
102
|
-
currentChartType: import("../element/types").ChartType;
|
|
103
|
-
pasteDialog: {
|
|
104
|
-
shown: false;
|
|
105
|
-
data: null;
|
|
106
|
-
} | {
|
|
107
|
-
shown: true;
|
|
108
|
-
data: import("../charts").Spreadsheet;
|
|
109
|
-
};
|
|
110
|
-
pendingImageElementId: string | null;
|
|
111
|
-
showHyperlinkPopup: false | "info" | "editor";
|
|
112
|
-
};
|
|
113
|
-
commitToHistory: true;
|
|
114
|
-
};
|
|
115
|
-
contextItemLabel: (elements: readonly ExcalidrawElement[], appState: Readonly<import("../types").AppState>) => "labels.elementLock.unlock" | "labels.elementLock.lock" | "labels.elementLock.lockAll" | "labels.elementLock.unlockAll";
|
|
116
|
-
keyTest: (event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[]) => boolean;
|
|
117
|
-
} & {
|
|
118
|
-
keyTest?: ((event: KeyboardEvent | import("react").KeyboardEvent<Element>, appState: import("../types").AppState, elements: readonly ExcalidrawElement[]) => boolean) | undefined;
|
|
119
|
-
};
|
|
@@ -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,16 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import tunnel from "@dwelle/tunnel-rat";
|
|
3
|
-
declare type Tunnel = ReturnType<typeof tunnel>;
|
|
4
|
-
declare type TunnelsContextValue = {
|
|
5
|
-
mainMenuTunnel: Tunnel;
|
|
6
|
-
welcomeScreenMenuHintTunnel: Tunnel;
|
|
7
|
-
welcomeScreenToolbarHintTunnel: Tunnel;
|
|
8
|
-
welcomeScreenHelpHintTunnel: Tunnel;
|
|
9
|
-
welcomeScreenCenterTunnel: Tunnel;
|
|
10
|
-
footerCenterTunnel: Tunnel;
|
|
11
|
-
jotaiScope: symbol;
|
|
12
|
-
};
|
|
13
|
-
export declare const TunnelsContext: React.Context<TunnelsContextValue>;
|
|
14
|
-
export declare const useTunnels: () => TunnelsContextValue;
|
|
15
|
-
export declare const useInitializeTunnels: () => TunnelsContextValue;
|
|
16
|
-
export {};
|
|
@@ -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
|
-
}];
|