UNPKG

@visactor/react-vrender

Version:
35 lines (34 loc) 3.12 kB
import type { IArc, IArcGraphicAttribute, IArea, IAreaGraphicAttribute, ICircle, ICircleGraphicAttribute, IGroup, IGroupGraphicAttribute, IImageGraphicAttribute, ILine, ILineGraphicAttribute, IPath, IPathGraphicAttribute, IPolygonGraphicAttribute, IRect, IRectGraphicAttribute, ISymbolGraphicAttribute, IText, ITextGraphicAttribute, ISymbol, IImage, IPolygon, IShadowRoot, IRichTextGraphicAttribute, IRichText, IGlyph, IGlyphGraphicAttribute, IRect3d, IRect3dGraphicAttribute } from '@visactor/vrender'; import type { Key, ReactElement, ReactNode, Ref } from 'react'; import type { VRenderEvents } from './types'; type BaseProps<Element, Prop> = { key?: Key; ref?: Ref<Element>; children?: ReactNode; } & Prop & VRenderEvents; export declare function ElementOf<Element, Props, T extends string>(type: T): (props: BaseProps<Element, Props>) => ReactElement<Props, T>; export declare const TYPES: { layer: string; arc: string; rect: string; circle: string; area: string; group: string; }; export declare const Layer: (props: any) => ReactElement<any, "layer">; export declare const Arc: (props: BaseProps<IArc, IArcGraphicAttribute>) => ReactElement<IArcGraphicAttribute, "arc">; export declare const Area: (props: BaseProps<IArea, IAreaGraphicAttribute>) => ReactElement<IAreaGraphicAttribute, "area">; export declare const Circle: (props: BaseProps<ICircle, ICircleGraphicAttribute>) => ReactElement<ICircleGraphicAttribute, "circle">; export declare const Group: (props: BaseProps<IGroup, IGroupGraphicAttribute>) => ReactElement<IGroupGraphicAttribute, "group">; export declare const Image: (props: BaseProps<IImage, IImageGraphicAttribute>) => ReactElement<IImageGraphicAttribute, "image">; export declare const Line: (props: BaseProps<ILine, ILineGraphicAttribute>) => ReactElement<ILineGraphicAttribute, "line">; export declare const Path: (props: BaseProps<IPath, IPathGraphicAttribute>) => ReactElement<IPathGraphicAttribute, "path">; export declare const Rect: (props: BaseProps<IRect, IRectGraphicAttribute>) => ReactElement<IRectGraphicAttribute, "rect">; export declare const Rect3d: (props: BaseProps<IRect3d, IRect3dGraphicAttribute>) => ReactElement<IRect3dGraphicAttribute, "rect3d">; export declare const VRenderSymbol: (props: BaseProps<ISymbol, ISymbolGraphicAttribute>) => ReactElement<ISymbolGraphicAttribute, "symbol">; export declare const Text: (props: BaseProps<IText, ITextGraphicAttribute>) => ReactElement<ITextGraphicAttribute, "text">; export declare const RichText: (props: BaseProps<IRichText, IRichTextGraphicAttribute>) => ReactElement<IRichTextGraphicAttribute, "richtext">; export declare const Polygon: (props: BaseProps<IPolygon, IPolygonGraphicAttribute>) => ReactElement<IPolygonGraphicAttribute, "polygon">; export declare const Glyph: (props: BaseProps<IGlyph<Partial<import("@visactor/vrender").IGraphicAttribute>>, IGlyphGraphicAttribute>) => ReactElement<IGlyphGraphicAttribute, "glyph">; export declare const ShadowRoot: (props: BaseProps<IShadowRoot, IGroupGraphicAttribute>) => ReactElement<IGroupGraphicAttribute, "shadowroot">; export {};