fix api and support individual shapes and text element

This commit is contained in:
Aakansha Doshi 2023-05-15 16:32:56 +05:30
parent acde193a64
commit 32aaa8b95d
5 changed files with 53 additions and 24 deletions

View file

@ -38,21 +38,17 @@ export interface ImportedDataState {
elements?:
| readonly (
| (ExcalidrawElement & {
label?: [
{ text: string } & MarkOptional<
ElementConstructorOpts,
"x" | "y"
>,
];
label?: { text: string } & MarkOptional<
ElementConstructorOpts,
"x" | "y"
>;
})
| {
type: Exclude<ExcalidrawGenericElement["type"], "selection">;
label?: [
{ text: string } & MarkOptional<
ElementConstructorOpts,
"x" | "y"
>,
] &
label?: { text: string } & MarkOptional<
ElementConstructorOpts,
"x" | "y"
> &
MarkOptional<ElementConstructorOpts, "x" | "y">;
}
)[]