import { fabric } from "fabric"; import { FabricCanvas } from "./common/interfaces"; import { EditorConfig } from "@layerhub-io/types"; import type { Editor } from "."; declare class Canvas { private editor; container: HTMLDivElement; canvasContainer: HTMLDivElement; canvasElement: HTMLCanvasElement; canvas: FabricCanvas; canvasId: string; private options; private config; constructor({ id, config, editor }: { id: string; config: EditorConfig; editor: Editor; }); initialize: () => void; destroy: () => void; resize({ width, height }: any): void; getBoundingClientRect(): { left: number | undefined; top: number | undefined; }; requestRenderAll(): void; get backgroundColor(): string | fabric.Pattern | undefined; setBackgroundColor(color: string): void; } declare module "fabric" { namespace fabric { interface Canvas { __fire: any; enableEvents: () => void; disableEvents: () => void; } interface Object { id: string; name: string; locked: boolean; duration?: { start?: number; stop?: number; }; _objects?: fabric.Object[]; metadata?: Record; clipPath?: undefined | null | fabric.Object; } } } export default Canvas;