mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
parent
fdc462ec01
commit
e9067de173
32 changed files with 1369 additions and 464 deletions
11
src/types.ts
11
src/types.ts
|
@ -140,6 +140,9 @@ export type AppState = {
|
|||
| "backgroundColorPicker"
|
||||
| "strokeColorPicker"
|
||||
| null;
|
||||
openSidebar: "library" | "customSidebar" | null;
|
||||
isSidebarDocked: boolean;
|
||||
|
||||
lastPointerDownWith: PointerType;
|
||||
selectedElementIds: { [id: string]: boolean };
|
||||
previousSelectedElementIds: { [id: string]: boolean };
|
||||
|
@ -161,8 +164,6 @@ export type AppState = {
|
|||
offsetTop: number;
|
||||
offsetLeft: number;
|
||||
|
||||
isLibraryOpen: boolean;
|
||||
isLibraryMenuDocked: boolean;
|
||||
fileHandle: FileSystemHandle | null;
|
||||
collaborators: Map<string, Collaborator>;
|
||||
showStats: boolean;
|
||||
|
@ -313,6 +314,10 @@ export interface ExcalidrawProps {
|
|||
pointerDownState: PointerDownState,
|
||||
) => void;
|
||||
onScrollChange?: (scrollX: number, scrollY: number) => void;
|
||||
/**
|
||||
* Render function that renders custom <Sidebar /> component.
|
||||
*/
|
||||
renderSidebar?: () => JSX.Element | null;
|
||||
}
|
||||
|
||||
export type SceneData = {
|
||||
|
@ -368,6 +373,7 @@ export type AppProps = Merge<
|
|||
detectScroll: boolean;
|
||||
handleKeyboardGlobally: boolean;
|
||||
isCollaborating: boolean;
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
>;
|
||||
|
||||
|
@ -479,6 +485,7 @@ export type ExcalidrawImperativeAPI = {
|
|||
setActiveTool: InstanceType<typeof App>["setActiveTool"];
|
||||
setCursor: InstanceType<typeof App>["setCursor"];
|
||||
resetCursor: InstanceType<typeof App>["resetCursor"];
|
||||
toggleMenu: InstanceType<typeof App>["toggleMenu"];
|
||||
};
|
||||
|
||||
export type Device = Readonly<{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue