import { fabric } from "fabric"; import Base from "./Base"; import { ILayer, ILayerOptions } from "@layerhub-io/types"; import { Direction, GradientOptions, ScaleType, ShadowOptions, Size } from "../common/interfaces"; declare class Objects extends Base { clipboard: any; isCut: any; copyStyleClipboard: any; add: (item: Partial) => Promise; /** * * @param options object properties to be updated * @param id if provided, will update the update by id */ update: (options: Partial, id?: string | undefined) => void; clear: () => void; reset: () => void; select: (id?: string | undefined) => void; deselect: () => void; move(direction: Direction, value: number, id?: string): void; position(position: Direction, value: number, id?: string): void; resize(size: Size, value: number, id?: string): void; scale(type: ScaleType, id?: string): void; cut: () => void; copy: () => void; copyById: (id: string) => void; clone: () => void; cloneAudio: (id: string) => void; private duplicate; paste: () => void; /**` * Remove active object */ remove: (id?: string | undefined) => void; list: () => fabric.Object[]; copyStyle: () => void; pasteStyle: () => void; /** * Moves an object or a selection up in stack of drawn objects. */ bringForward: (id?: string | undefined) => void; bringForwardById: (id: string) => void; /** * Moves an object or the objects of a multiple selection to the top of the stack of drawn objects */ bringToFront: (id?: string | undefined) => void; /** * Moves an object or a selection down in stack of drawn objects. */ sendBackwards: (id?: string | undefined) => void; /** * Moves an object to specified level in stack of drawn objects. */ sendToBack: (id?: string | undefined) => void; /** * Moves an object to the top of the frame. If multiple objects are selected, * will move all objects to the top of the selection. */ alignTop: (id?: string | undefined) => void; /** * Moves an object to the middle of the frame. If multiple objects are selected, * will move all objects to the middle of the selection. */ alignMiddle: (id?: string | undefined) => void; /** * Moves an object to the bottom of the frame. If multiple objects are selected, * will move all objects to the bottom of the selection. */ alignBottom: (id?: string | undefined) => void; /** * Moves an object to the left of the frame. If multiple objects are selected, * will move all objects to the left of the selection. */ alignLeft: (id?: string | undefined) => void; /** * Moves an object to the center of the frame. If multiple objects are selected, * will move all objects to the center of the selection. */ alignCenter: (id?: string | undefined) => void; /** * Moves an object to the right of the frame. If multiple objects are selected, * will move all objects to the right of the selection. */ alignRight: (id?: string | undefined) => void; unsetBackgroundImage(): Promise; setAsBackgroundImage(id?: string): Promise; /** * Set object shadow * @param options ShadowOptions */ setShadow: (options: ShadowOptions) => void; /** * Set object fill as gradient * @param param GradientOptions */ setGradient: ({ angle, colors }: GradientOptions) => void; /** * Group selected objects */ group: () => void; ungroup: () => void; /** * Lock object movement and disable controls */ lock: (id?: string | undefined) => void; /** * Unlock active object */ unlock: (id?: string | undefined) => void; findByName: (name: string) => fabric.Object[]; removeByName: (name: string) => void; findByIdInObjecs: (id: string, objects: fabric.Object[]) => any; findById: (id: string) => any[]; findOneById: (id: string) => any; removeById: (id: string) => void; toUppercase(id?: string): void; toLowerCase(id?: string): void; updateContextObjects: () => void; } export default Objects;