7c5481b877
* feat: Add support for scrollToCenter in initialData so host can control whether to scroll to center on mount * fix * update changelog and readme * fix * Scroll to center only for collab and shareable links in excalidraw app * fix test * update readme * Update src/packages/excalidraw/README.md
27 lines
634 B
TypeScript
27 lines
634 B
TypeScript
import { ExcalidrawElement } from "../element/types";
|
|
import { AppState, LibraryItems } from "../types";
|
|
|
|
export interface DataState {
|
|
type?: string;
|
|
version?: string;
|
|
source?: string;
|
|
elements: readonly ExcalidrawElement[];
|
|
appState: MarkOptional<AppState, "offsetTop" | "offsetLeft">;
|
|
}
|
|
|
|
export interface ImportedDataState {
|
|
type?: string;
|
|
version?: string;
|
|
source?: string;
|
|
elements?: DataState["elements"] | null;
|
|
appState?: Partial<DataState["appState"]> | null;
|
|
scrollToCenter?: boolean;
|
|
}
|
|
|
|
export interface LibraryData {
|
|
type?: string;
|
|
version?: number;
|
|
source?: string;
|
|
library?: LibraryItems;
|
|
}
|