mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: Support custom elements in @excalidraw/excalidraw
This commit is contained in:
parent
2209e2c1e8
commit
39d0084a5e
13 changed files with 202 additions and 13 deletions
|
@ -83,6 +83,9 @@ export type ExcalidrawImageElement = _ExcalidrawElementBase &
|
|||
scale: [number, number];
|
||||
}>;
|
||||
|
||||
export type ExcalidrawCustomElement = _ExcalidrawElementBase &
|
||||
Readonly<{ type: "custom"; name: string }>;
|
||||
|
||||
export type InitializedExcalidrawImageElement = MarkNonNullable<
|
||||
ExcalidrawImageElement,
|
||||
"fileId"
|
||||
|
@ -107,7 +110,8 @@ export type ExcalidrawElement =
|
|||
| ExcalidrawTextElement
|
||||
| ExcalidrawLinearElement
|
||||
| ExcalidrawFreeDrawElement
|
||||
| ExcalidrawImageElement;
|
||||
| ExcalidrawImageElement
|
||||
| ExcalidrawCustomElement;
|
||||
|
||||
export type NonDeleted<TElement extends ExcalidrawElement> = TElement & {
|
||||
isDeleted: boolean;
|
||||
|
@ -133,7 +137,8 @@ export type ExcalidrawBindableElement =
|
|||
| ExcalidrawDiamondElement
|
||||
| ExcalidrawEllipseElement
|
||||
| ExcalidrawTextElement
|
||||
| ExcalidrawImageElement;
|
||||
| ExcalidrawImageElement
|
||||
| ExcalidrawCustomElement;
|
||||
|
||||
export type ExcalidrawTextContainer =
|
||||
| ExcalidrawRectangleElement
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue