fabric
Version:
Object model for HTML5 canvas, and SVG-to-canvas parser. Backed by jsdom and node-canvas.
17 lines (15 loc) • 524 B
text/typescript
import type { GLProbe } from '../filters/GLProbes/GLProbe';
import type { DOMWindow } from 'jsdom';
import type { TextStyleDeclaration } from '../shapes/Text/StyledText';
export type TCopyPasteData = {
copiedText?: string;
copiedTextStyle?: TextStyleDeclaration[];
};
export type TFabricEnv = {
readonly document: Document;
readonly window: (Window & typeof globalThis) | DOMWindow;
readonly isTouchSupported: boolean;
WebGLProbe: GLProbe;
dispose(element: Element): void;
copyPasteData: TCopyPasteData;
};