/** @jsxImportSource react */ import { RenderingContext } from "../ui/RenderingContext"; import { BoundedObject, BoundedObjectConfig, BoundedObjectInstance, SvgRenderingContext } from "./BoundedObject"; import { Rect } from "./util/Rect"; interface SvgInstance extends BoundedObjectInstance { state: { size: { width: number; height: number; }; }; clipRects?: Record; clipRectId?: number; } export interface SvgConfig extends BoundedObjectConfig { /** Set to `true` to automatically calculate width based on the measured height and `aspectRatio`. */ autoWidth?: boolean; /** Set to `true` to automatically calculate height based on the measured width and `aspectRatio`. */ autoHeight?: boolean; /** * Aspect ratio of the the SVG element. Default value is `1.618`. * This value doesn't have any effect unless `autoWidth` or `autoHeight` is set. */ aspectRatio?: number; /** Base CSS class to be applied to the element. Defaults to `svg`. */ baseClass?: string; onMouseDown?(e: MouseEvent, instance: SvgInstance): void; onMouseUp?(e: MouseEvent, instance: SvgInstance): void; onMouseMove?(e: MouseEvent, instance: SvgInstance): void; onTouchStart?(e: TouchEvent, instance: SvgInstance): void; onTouchMove?(e: TouchEvent, instance: SvgInstance): void; onTouchEnd?(e: TouchEvent, instance: SvgInstance): void; onWheel?(e: WheelEvent, instance: SvgInstance): void; onWheelActive?(e: WheelEvent, instance: SvgInstance): void; } export declare class Svg extends BoundedObject { autoWidth?: boolean; autoHeight?: boolean; aspectRatio?: number; onWheelActive?: (e: WheelEvent, instance: SvgInstance) => void; constructor(config?: SvgConfig); initState(context: RenderingContext, instance: SvgInstance): void; explore(context: SvgRenderingContext, instance: SvgInstance): void; exploreCleanup(context: SvgRenderingContext, instance: SvgInstance): void; prepare(context: SvgRenderingContext, instance: SvgInstance): void; prepareCleanup(context: SvgRenderingContext, instance: SvgInstance): void; render(context: RenderingContext, instance: SvgInstance, key: string): import("react/jsx-runtime").JSX.Element; } export {}; //# sourceMappingURL=Svg.d.ts.map