1 | import { AxisTypes } from './components/axis/types';
|
2 | import type { Types } from '@antv/f2-graphic';
|
3 | declare type PX_FIELD_NAME = 'lineWidth' | 'lineDash' | 'x' | 'y' | 'r' | 'r0' | 'x1' | 'y1' | 'x2' | 'y2' | 'radius' | 'width' | 'height' | 'fontSize' | 'sx' | 'sy' | 'swidth' | 'sheight' | 'points' | 'shadowBlur' | 'shadowOffsetX' | 'shadowOffsetY';
|
4 | declare type pxstr = `${number}px`;
|
5 | export declare type px = number | pxstr | string;
|
6 | export declare type Point = Types.Point;
|
7 | export interface PxPoint {
|
8 | x: px;
|
9 | y: px;
|
10 | }
|
11 | export interface DataRecord {
|
12 | origin: any;
|
13 | [k: string]: any;
|
14 | }
|
15 | export * from '@antv/scale';
|
16 | export type { AxisTypes };
|
17 | declare type SupportPx<T> = {
|
18 | [k in keyof T]: k extends PX_FIELD_NAME ? T[k] extends number ? number | pxstr : T[k] extends number[] ? number[] | pxstr[] : T[k] extends Types.Point[] ? PxPoint[] : T[k] : T[k];
|
19 | };
|
20 | export interface Style {
|
21 | width?: px;
|
22 | height?: px;
|
23 | minWidth?: px;
|
24 | minHeight?: px;
|
25 | maxWidth?: px;
|
26 | maxHeight?: px;
|
27 | left?: px;
|
28 | right?: px;
|
29 | top?: px;
|
30 | bottom?: px;
|
31 | margin?: px | px[];
|
32 | marginTop?: px;
|
33 | marginRight?: px;
|
34 | marginBottom?: px;
|
35 | marginLeft?: px;
|
36 | padding?: px | px[];
|
37 | paddingTop?: px;
|
38 | paddingRight?: px;
|
39 | paddingBottom?: px;
|
40 | paddingLeft?: px;
|
41 | flexDirection?: 'column' | 'row';
|
42 | justifyContent?: 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around';
|
43 | alignItems?: 'flex-start' | 'center' | 'flex-end' | 'stretch';
|
44 | alignSelf?: 'flex-start' | 'center' | 'flex-end' | 'stretch';
|
45 | display?: 'flex';
|
46 | flex?: number;
|
47 | flexWrap?: 'wrap' | 'nowrap';
|
48 | position?: 'relative' | 'absolute';
|
49 | backgroundColor?: string;
|
50 | }
|
51 | interface IntrinsicElementsProps {
|
52 | style?: Style;
|
53 | [k: string]: any;
|
54 | }
|
55 | export interface Ref {
|
56 | current?: any;
|
57 | }
|
58 | export interface Props {
|
59 | children?: any;
|
60 | [propName: string]: any;
|
61 | }
|
62 | export declare type ElementType = string | ((props: Props, context?: any) => any) | (new (props: Props, context?: any) => any);
|
63 | export interface ShapeAttrs extends Partial<SupportPx<Types.ShapeAttrs>> {
|
64 | [k: string]: any;
|
65 | }
|
66 | export interface GroupProps extends IntrinsicElementsProps {
|
67 | attrs?: RectAttrs;
|
68 | }
|
69 | export declare type CircleAttrs = Partial<SupportPx<Types.CircleAttrs>>;
|
70 | export interface CircleProps extends IntrinsicElementsProps {
|
71 | attrs?: CircleAttrs;
|
72 | }
|
73 | export declare type RectAttrs = Partial<SupportPx<Types.RectAttrs>>;
|
74 | export interface RectProps extends IntrinsicElementsProps {
|
75 | attrs?: RectAttrs;
|
76 | }
|
77 | export declare type LineAttrs = Partial<SupportPx<Types.LineAttrs>>;
|
78 | export interface LineProps extends IntrinsicElementsProps {
|
79 | attrs?: LineAttrs;
|
80 | }
|
81 | export declare type PolygonAttrs = Partial<SupportPx<Types.PolygonAttrs>>;
|
82 | export interface PolygonProps extends IntrinsicElementsProps {
|
83 | attrs?: PolygonAttrs;
|
84 | }
|
85 | export declare type PolylineAttrs = Partial<SupportPx<Types.PolylineAttrs>>;
|
86 | export interface PolylineProps extends IntrinsicElementsProps {
|
87 | attrs?: PolylineAttrs;
|
88 | }
|
89 | export declare type ArcAttrs = Partial<SupportPx<Types.ArcAttrs>>;
|
90 | export interface ArcProps extends IntrinsicElementsProps {
|
91 | attrs?: ArcAttrs;
|
92 | }
|
93 | export declare type SectorAttrs = Partial<SupportPx<Types.SectorAttrs>>;
|
94 | export interface SectorProps extends IntrinsicElementsProps {
|
95 | attrs?: SectorAttrs;
|
96 | }
|
97 | export declare type TextAttrs = Partial<SupportPx<Types.TextAttrs>>;
|
98 | export interface TextProps extends IntrinsicElementsProps {
|
99 | attrs?: TextAttrs;
|
100 | }
|
101 | export declare type CustomAttrs = Partial<SupportPx<Types.CustomAttrs>>;
|
102 | export interface CustomProps extends IntrinsicElementsProps {
|
103 | attrs?: CustomAttrs;
|
104 | }
|
105 | export declare type MarkerAttrs = Partial<SupportPx<Types.MarkerAttrs>>;
|
106 | export interface MarkerProps extends IntrinsicElementsProps {
|
107 | attrs?: MarkerAttrs;
|
108 | }
|
109 | export declare type ImageAttrs = Partial<SupportPx<Types.ImageAttrs>>;
|
110 | export interface ImageProps extends IntrinsicElementsProps {
|
111 | attrs?: ImageAttrs;
|
112 | }
|
113 |
|
\ | No newline at end of file |