let host call convertToExcalidrawElements when using programmatic API

This commit is contained in:
Aakansha Doshi 2023-07-14 14:50:27 +05:30
parent c1a61b06df
commit 25e2f80709
5 changed files with 58 additions and 48 deletions

View file

@ -1,11 +1,8 @@
import {
ExcalidrawBindableElement,
ExcalidrawElement,
ExcalidrawFreeDrawElement,
ExcalidrawGenericElement,
ExcalidrawImageElement,
ExcalidrawLinearElement,
ExcalidrawSelectionElement,
ExcalidrawTextElement,
FontFamilyValues,
TextAlign,
@ -137,30 +134,7 @@ export interface ImportedDataState {
type?: string;
version?: number;
source?: string;
elements?:
| readonly (
| Extract<
ExcalidrawElement,
| ExcalidrawSelectionElement
| ExcalidrawImageElement
| ExcalidrawFreeDrawElement
>
| ({
type: Extract<ExcalidrawLinearElement["type"], "line">;
x: number;
y: number;
} & Partial<ExcalidrawLinearElement>)
| ValidContainer
| ValidLinearElement
| ({
type: "text";
text: string;
x: number;
y: number;
id?: ExcalidrawTextElement["id"];
} & Partial<ExcalidrawTextElement>)
)[]
| null;
elements?: readonly ExcalidrawElement[] | null;
appState?: Readonly<
Partial<
AppState & {