diff --git a/src/index.d.ts b/src/index.d.ts index 1ee596b..7dceab7 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -195,8 +195,15 @@ export interface EditOptions { slug: string; /** Optional style information */ style?: string | null; - /** The mouse event that triggered the edit */ - e?: MouseEvent; + /** The coordinates of the edit, and the bounding rectangle of the element being edited */ + position?: { + x: number; + y: number; + left: number; + width: number; + top: number; + height: number; + }; } /** @@ -215,16 +222,20 @@ export interface AddArrayItemOptions extends ArrayOptions { index: number | null; /** The value to insert */ value: any; - /** The mouse event that triggered the addition */ - e?: MouseEvent; + /** The index to clone from if value isnt provided */ + sourceIndex?: number; } /** * Options for moving an array item in the v2 API */ -export interface MoveArrayItemOptions extends ArrayOptions { +export interface MoveArrayItemOptions { + /** the identifier of the array field to move from */ + fromSlug: string; + /** the identifier of the array field to move to, defaults to fromSlug if not provided */ + toSlug?: string; /** The current index of the item */ - index: number; + fromIndex: number; /** The target index for the item */ toIndex: number; }