@visactor/vseed 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builder/builder/builder.d.ts +1035 -36
- package/dist/index.cjs +923 -66
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +905 -63
- package/dist/index.js.map +1 -1
- package/dist/pipeline/advanced/pipes/annotation/annotation.d.ts +2 -0
- package/dist/pipeline/advanced/pipes/annotation/index.d.ts +1 -0
- package/dist/pipeline/advanced/pipes/index.d.ts +1 -0
- package/dist/pipeline/spec/pipes/annotation/annotationArea.d.ts +2 -0
- package/dist/pipeline/spec/pipes/annotation/annotationAreaBand.d.ts +2 -0
- package/dist/pipeline/spec/pipes/annotation/annotationHorizontalLine.d.ts +2 -0
- package/dist/pipeline/spec/pipes/annotation/annotationPoint.d.ts +2 -0
- package/dist/pipeline/spec/pipes/annotation/annotationVerticalLine.d.ts +2 -0
- package/dist/pipeline/spec/pipes/annotation/index.d.ts +5 -0
- package/dist/pipeline/spec/pipes/annotation/utils.d.ts +2 -0
- package/dist/pipeline/spec/pipes/index.d.ts +1 -0
- package/dist/types/advancedVSeed.d.ts +886 -12
- package/dist/types/builder/builder.d.ts +3 -0
- package/dist/types/chartType/area/area.d.ts +21 -1
- package/dist/types/chartType/areaPercent/areaPercent.d.ts +21 -1
- package/dist/types/chartType/bar/bar.d.ts +21 -1
- package/dist/types/chartType/barParallel/barParallel.d.ts +21 -1
- package/dist/types/chartType/barPercent/barPercent.d.ts +21 -1
- package/dist/types/chartType/column/column.d.ts +21 -1
- package/dist/types/chartType/columnParallel/columnParallel.d.ts +21 -1
- package/dist/types/chartType/columnPercent/columnPercent.d.ts +21 -1
- package/dist/types/chartType/line/line.d.ts +21 -1
- package/dist/types/dataSelector/selector.d.ts +60 -6
- package/dist/types/properties/annotation/annotation.d.ts +824 -0
- package/dist/types/properties/annotation/annotationArea.d.ts +248 -0
- package/dist/types/properties/annotation/annotationHorizontalLine.d.ts +253 -0
- package/dist/types/properties/annotation/annotationPoint.d.ts +199 -0
- package/dist/types/properties/annotation/annotationVerticalLine.d.ts +253 -0
- package/dist/types/properties/annotation/index.d.ts +5 -0
- package/dist/types/properties/index.d.ts +1 -0
- package/dist/types/properties/markStyle/barStyle.d.ts +65 -13
- package/dist/types/properties/markStyle/markStyle.d.ts +64 -12
- package/package.json +1 -1
@@ -0,0 +1,248 @@
|
|
1
|
+
import { type Selector, type Selectors } from '../../dataSelector';
|
2
|
+
import { z } from 'zod';
|
3
|
+
export type AnnotationArea = {
|
4
|
+
/**
|
5
|
+
* 依赖选择的数据, 进行数据标记.
|
6
|
+
*/
|
7
|
+
selector: Selector | Selectors;
|
8
|
+
/**
|
9
|
+
* 标注的文本
|
10
|
+
* @description 标注的文本
|
11
|
+
* @default ''
|
12
|
+
* @example '标注文本'
|
13
|
+
*/
|
14
|
+
text?: string | string[];
|
15
|
+
/**
|
16
|
+
* 文本位置
|
17
|
+
* @description 文本位置
|
18
|
+
* @default 'top'
|
19
|
+
* @example 'top'
|
20
|
+
*/
|
21
|
+
textPosition?: 'top' | 'topRight' | 'topLeft' | 'bottom' | 'bottomLeft' | 'bottomRight' | 'left' | 'right';
|
22
|
+
/**
|
23
|
+
* 文本颜色
|
24
|
+
* @description 文本颜色
|
25
|
+
* @default '#ffffff'
|
26
|
+
* @example 'red'
|
27
|
+
*/
|
28
|
+
textColor?: string;
|
29
|
+
/**
|
30
|
+
* 文本字体大小
|
31
|
+
* @description 文本字体大小
|
32
|
+
* @default 12
|
33
|
+
* @example 12
|
34
|
+
*/
|
35
|
+
textFontSize?: number;
|
36
|
+
/**
|
37
|
+
* 文本字体重量
|
38
|
+
* @description 文本字体重量
|
39
|
+
* @default 400
|
40
|
+
* @example 400
|
41
|
+
*/
|
42
|
+
textFontWeight?: number;
|
43
|
+
/**
|
44
|
+
* 文本对齐方式
|
45
|
+
* @description 文本对齐方式
|
46
|
+
* @default 'left'
|
47
|
+
* @example 'left'
|
48
|
+
*/
|
49
|
+
textAlign?: 'left' | 'right' | 'center';
|
50
|
+
/**
|
51
|
+
* 文本垂直对齐方式
|
52
|
+
* @description 文本垂直对齐方式
|
53
|
+
* @default 'middle'
|
54
|
+
* @example 'middle'
|
55
|
+
*/
|
56
|
+
textBaseline?: 'top' | 'middle' | 'bottom';
|
57
|
+
/**
|
58
|
+
* 背景可见
|
59
|
+
* @description 背景可见
|
60
|
+
* @default true
|
61
|
+
* @example true
|
62
|
+
*/
|
63
|
+
backgroundVisible?: boolean;
|
64
|
+
/**
|
65
|
+
* 背景颜色
|
66
|
+
* @description 背景颜色
|
67
|
+
* @default '#212121'
|
68
|
+
* @example 'red'
|
69
|
+
*/
|
70
|
+
backgroundColor?: string;
|
71
|
+
/**
|
72
|
+
* 背景边框颜色
|
73
|
+
* @description 背景边框颜色
|
74
|
+
* @default 'red'
|
75
|
+
* @example 'red'
|
76
|
+
*/
|
77
|
+
backgroundBorderColor?: string;
|
78
|
+
/**
|
79
|
+
* 背景边框宽度
|
80
|
+
* @description 背景边框宽度
|
81
|
+
* @default 1
|
82
|
+
* @example 2
|
83
|
+
*/
|
84
|
+
backgroundBorderWidth?: number;
|
85
|
+
/**
|
86
|
+
* 背景边框圆角
|
87
|
+
* @description 背景边框圆角
|
88
|
+
* @default 4
|
89
|
+
* @example 4
|
90
|
+
*/
|
91
|
+
backgroundBorderRadius?: number;
|
92
|
+
/**
|
93
|
+
* 背景内边距
|
94
|
+
* @description 背景内边距
|
95
|
+
* @default 4
|
96
|
+
* @example 4
|
97
|
+
*/
|
98
|
+
backgroundPadding?: number;
|
99
|
+
/**
|
100
|
+
* 面积区域颜色
|
101
|
+
* @description 面积区域颜色
|
102
|
+
* @default 'red'
|
103
|
+
* @example 'red'
|
104
|
+
*/
|
105
|
+
areaColor?: string;
|
106
|
+
/**
|
107
|
+
* 面积区域颜色透明度
|
108
|
+
* @description 面积区域颜色透明度
|
109
|
+
* @default 0.5
|
110
|
+
* @example 0.5
|
111
|
+
*/
|
112
|
+
areaColorOpacity?: number;
|
113
|
+
/**
|
114
|
+
* 面积区域边框颜色
|
115
|
+
* @description 面积区域边框颜色
|
116
|
+
* @default 'red'
|
117
|
+
* @example 'red'
|
118
|
+
*/
|
119
|
+
areaBorderColor?: number;
|
120
|
+
/**
|
121
|
+
* 面积区域边框宽度
|
122
|
+
* @description 面积区域边框宽度
|
123
|
+
* @default 2
|
124
|
+
* @example 2
|
125
|
+
*/
|
126
|
+
areaBorderWidth?: number;
|
127
|
+
/**
|
128
|
+
* 面积区域边框圆角
|
129
|
+
* @description 面积区域边框圆角
|
130
|
+
* @default 4
|
131
|
+
* @example 4
|
132
|
+
*/
|
133
|
+
areaBorderRadius?: number;
|
134
|
+
/**
|
135
|
+
* 面积区域的边距
|
136
|
+
* @description 面积区域的边距
|
137
|
+
* @default 8
|
138
|
+
* @example 0
|
139
|
+
*/
|
140
|
+
outerPadding?: number;
|
141
|
+
};
|
142
|
+
export declare const zAnnotationArea: z.ZodObject<{
|
143
|
+
selector: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
144
|
+
field: z.ZodString;
|
145
|
+
operator: z.ZodOptional<z.ZodEnum<{
|
146
|
+
"=": "=";
|
147
|
+
"==": "==";
|
148
|
+
"!=": "!=";
|
149
|
+
">": ">";
|
150
|
+
"<": "<";
|
151
|
+
">=": ">=";
|
152
|
+
"<=": "<=";
|
153
|
+
between: "between";
|
154
|
+
}>>;
|
155
|
+
op: z.ZodOptional<z.ZodEnum<{
|
156
|
+
"=": "=";
|
157
|
+
"==": "==";
|
158
|
+
"!=": "!=";
|
159
|
+
">": ">";
|
160
|
+
"<": "<";
|
161
|
+
">=": ">=";
|
162
|
+
"<=": "<=";
|
163
|
+
between: "between";
|
164
|
+
}>>;
|
165
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
166
|
+
}, z.core.$strip>, z.ZodObject<{
|
167
|
+
field: z.ZodString;
|
168
|
+
operator: z.ZodOptional<z.ZodEnum<{
|
169
|
+
in: "in";
|
170
|
+
"not in": "not in";
|
171
|
+
}>>;
|
172
|
+
op: z.ZodOptional<z.ZodEnum<{
|
173
|
+
in: "in";
|
174
|
+
"not in": "not in";
|
175
|
+
}>>;
|
176
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
177
|
+
}, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
178
|
+
field: z.ZodString;
|
179
|
+
operator: z.ZodOptional<z.ZodEnum<{
|
180
|
+
"=": "=";
|
181
|
+
"==": "==";
|
182
|
+
"!=": "!=";
|
183
|
+
">": ">";
|
184
|
+
"<": "<";
|
185
|
+
">=": ">=";
|
186
|
+
"<=": "<=";
|
187
|
+
between: "between";
|
188
|
+
}>>;
|
189
|
+
op: z.ZodOptional<z.ZodEnum<{
|
190
|
+
"=": "=";
|
191
|
+
"==": "==";
|
192
|
+
"!=": "!=";
|
193
|
+
">": ">";
|
194
|
+
"<": "<";
|
195
|
+
">=": ">=";
|
196
|
+
"<=": "<=";
|
197
|
+
between: "between";
|
198
|
+
}>>;
|
199
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
200
|
+
}, z.core.$strip>, z.ZodObject<{
|
201
|
+
field: z.ZodString;
|
202
|
+
operator: z.ZodOptional<z.ZodEnum<{
|
203
|
+
in: "in";
|
204
|
+
"not in": "not in";
|
205
|
+
}>>;
|
206
|
+
op: z.ZodOptional<z.ZodEnum<{
|
207
|
+
in: "in";
|
208
|
+
"not in": "not in";
|
209
|
+
}>>;
|
210
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
211
|
+
}, z.core.$strip>]>>]>;
|
212
|
+
textPosition: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
213
|
+
left: "left";
|
214
|
+
top: "top";
|
215
|
+
topLeft: "topLeft";
|
216
|
+
topRight: "topRight";
|
217
|
+
right: "right";
|
218
|
+
bottom: "bottom";
|
219
|
+
bottomLeft: "bottomLeft";
|
220
|
+
bottomRight: "bottomRight";
|
221
|
+
}>>>;
|
222
|
+
text: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
|
223
|
+
textColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
224
|
+
textFontSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
225
|
+
textFontWeight: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
226
|
+
textAlign: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
227
|
+
left: "left";
|
228
|
+
right: "right";
|
229
|
+
center: "center";
|
230
|
+
}>>>;
|
231
|
+
textBaseline: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
232
|
+
top: "top";
|
233
|
+
bottom: "bottom";
|
234
|
+
middle: "middle";
|
235
|
+
}>>>;
|
236
|
+
backgroundVisible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
237
|
+
backgroundColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
238
|
+
backgroundBorderColor: z.ZodOptional<z.ZodString>;
|
239
|
+
backgroundBorderWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
240
|
+
backgroundBorderRadius: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
241
|
+
backgroundPadding: z.ZodOptional<z.ZodNumber>;
|
242
|
+
areaColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
243
|
+
areaColorOpacity: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
244
|
+
areaBorderColor: z.ZodOptional<z.ZodNumber>;
|
245
|
+
areaBorderWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
246
|
+
areaBorderRadius: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
247
|
+
outerPadding: z.ZodOptional<z.ZodNumber>;
|
248
|
+
}, z.core.$strip>;
|
@@ -0,0 +1,253 @@
|
|
1
|
+
import { type Selector, type Selectors } from '../../dataSelector';
|
2
|
+
import { z } from 'zod';
|
3
|
+
export type AnnotationHorizontalLine = {
|
4
|
+
/**
|
5
|
+
* 依赖选择的数据, 进行数据标记.
|
6
|
+
*/
|
7
|
+
selector?: Selector | Selectors;
|
8
|
+
/**
|
9
|
+
* 固定的y值, 用于标注水平线
|
10
|
+
* @description 类目轴在y方向, 则可输入维值, 数值轴在y方向, 则可输入具体的数值
|
11
|
+
* @default []
|
12
|
+
*/
|
13
|
+
yValue?: (number | string) | (number | string)[];
|
14
|
+
/**
|
15
|
+
* 标注的文本
|
16
|
+
* @description 标注的文本
|
17
|
+
* @default ''
|
18
|
+
* @example '标注文本'
|
19
|
+
*/
|
20
|
+
text?: string | string[];
|
21
|
+
/**
|
22
|
+
* 文本位置
|
23
|
+
* @description 标注线的标签位置(标签相对线的相对位置)。
|
24
|
+
* @default 'insideEnd'
|
25
|
+
* @example 'outsideEnd'
|
26
|
+
*/
|
27
|
+
textPosition?: 'outsideStart' | 'outsideEnd' | 'outsideMiddle' | 'insideStart' | 'insideMiddle' | 'insideEnd';
|
28
|
+
/**
|
29
|
+
* 文本颜色
|
30
|
+
* @description 文本颜色
|
31
|
+
* @default '#ffffff'
|
32
|
+
* @example 'red'
|
33
|
+
*/
|
34
|
+
textColor?: string;
|
35
|
+
/**
|
36
|
+
* 文本字体大小
|
37
|
+
* @description 文本字体大小
|
38
|
+
* @default 12
|
39
|
+
* @example 12
|
40
|
+
*/
|
41
|
+
textFontSize?: number;
|
42
|
+
/**
|
43
|
+
* 文本字体重量
|
44
|
+
* @description 文本字体重量
|
45
|
+
* @default 400
|
46
|
+
* @example 400
|
47
|
+
*/
|
48
|
+
textFontWeight?: number;
|
49
|
+
/**
|
50
|
+
* 文本对齐方式
|
51
|
+
* @description 文本对齐方式
|
52
|
+
* @default 'left'
|
53
|
+
* @example 'center'
|
54
|
+
*/
|
55
|
+
textAlign?: 'left' | 'right' | 'center';
|
56
|
+
/**
|
57
|
+
* 文本垂直对齐方式
|
58
|
+
* @description 文本垂直对齐方式
|
59
|
+
* @default 'bottom'
|
60
|
+
* @example 'middle'
|
61
|
+
*/
|
62
|
+
textBaseline?: 'top' | 'middle' | 'bottom';
|
63
|
+
/**
|
64
|
+
* 文本Y方向的, 偏移量
|
65
|
+
* @description 文本Y方向的, 偏移量, 支持正负
|
66
|
+
* @default 0
|
67
|
+
* @example offsetY: 10
|
68
|
+
*/
|
69
|
+
offsetY?: number;
|
70
|
+
/**
|
71
|
+
* 文本X方向的, 偏移量
|
72
|
+
* @description 文本X方向的, 偏移量, 支持正负
|
73
|
+
* @default 0
|
74
|
+
* @example offsetX: -10
|
75
|
+
*/
|
76
|
+
offsetX?: number;
|
77
|
+
/**
|
78
|
+
* 线可见
|
79
|
+
* @description 线可见
|
80
|
+
* @default true
|
81
|
+
* @example true
|
82
|
+
*/
|
83
|
+
lineVisible?: boolean;
|
84
|
+
/**
|
85
|
+
* 线颜色
|
86
|
+
* @description 线颜色
|
87
|
+
* @default 'red'
|
88
|
+
* @example 'red'
|
89
|
+
*/
|
90
|
+
lineColor?: string;
|
91
|
+
/**
|
92
|
+
* 线宽度
|
93
|
+
* @description 线宽度
|
94
|
+
* @default 2
|
95
|
+
* @example 2
|
96
|
+
*/
|
97
|
+
lineWidth?: number;
|
98
|
+
/**
|
99
|
+
* 线样式
|
100
|
+
* @description 线样式
|
101
|
+
* @default 'solid'
|
102
|
+
* @example 'solid'
|
103
|
+
*/
|
104
|
+
lineStyle?: 'solid' | 'dashed' | 'dotted';
|
105
|
+
/**
|
106
|
+
* 背景可见
|
107
|
+
* @description 背景可见
|
108
|
+
* @default true
|
109
|
+
* @example true
|
110
|
+
*/
|
111
|
+
backgroundVisible?: boolean;
|
112
|
+
/**
|
113
|
+
* 背景颜色
|
114
|
+
* @description 背景颜色
|
115
|
+
* @default '#212121'
|
116
|
+
* @example 'red'
|
117
|
+
*/
|
118
|
+
backgroundColor?: string;
|
119
|
+
/**
|
120
|
+
* 背景边框颜色
|
121
|
+
* @description 背景边框颜色
|
122
|
+
* @default 'red'
|
123
|
+
* @example 'red'
|
124
|
+
*/
|
125
|
+
backgroundBorderColor?: string;
|
126
|
+
/**
|
127
|
+
* 背景边框宽度
|
128
|
+
* @description 背景边框宽度
|
129
|
+
* @default 1
|
130
|
+
* @example 2
|
131
|
+
*/
|
132
|
+
backgroundBorderWidth?: number;
|
133
|
+
/**
|
134
|
+
* 背景边框圆角
|
135
|
+
* @description 背景边框圆角
|
136
|
+
* @default 4
|
137
|
+
* @example 4
|
138
|
+
*/
|
139
|
+
backgroundBorderRadius?: number;
|
140
|
+
/**
|
141
|
+
* 背景内边距
|
142
|
+
* @description 背景内边距
|
143
|
+
* @default 4
|
144
|
+
* @example 4
|
145
|
+
*/
|
146
|
+
backgroundPadding?: number;
|
147
|
+
};
|
148
|
+
export declare const zAnnotationHorizontalLine: z.ZodObject<{
|
149
|
+
selector: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
150
|
+
field: z.ZodString;
|
151
|
+
operator: z.ZodOptional<z.ZodEnum<{
|
152
|
+
"=": "=";
|
153
|
+
"==": "==";
|
154
|
+
"!=": "!=";
|
155
|
+
">": ">";
|
156
|
+
"<": "<";
|
157
|
+
">=": ">=";
|
158
|
+
"<=": "<=";
|
159
|
+
between: "between";
|
160
|
+
}>>;
|
161
|
+
op: z.ZodOptional<z.ZodEnum<{
|
162
|
+
"=": "=";
|
163
|
+
"==": "==";
|
164
|
+
"!=": "!=";
|
165
|
+
">": ">";
|
166
|
+
"<": "<";
|
167
|
+
">=": ">=";
|
168
|
+
"<=": "<=";
|
169
|
+
between: "between";
|
170
|
+
}>>;
|
171
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
172
|
+
}, z.core.$strip>, z.ZodObject<{
|
173
|
+
field: z.ZodString;
|
174
|
+
operator: z.ZodOptional<z.ZodEnum<{
|
175
|
+
in: "in";
|
176
|
+
"not in": "not in";
|
177
|
+
}>>;
|
178
|
+
op: z.ZodOptional<z.ZodEnum<{
|
179
|
+
in: "in";
|
180
|
+
"not in": "not in";
|
181
|
+
}>>;
|
182
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
183
|
+
}, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
184
|
+
field: z.ZodString;
|
185
|
+
operator: z.ZodOptional<z.ZodEnum<{
|
186
|
+
"=": "=";
|
187
|
+
"==": "==";
|
188
|
+
"!=": "!=";
|
189
|
+
">": ">";
|
190
|
+
"<": "<";
|
191
|
+
">=": ">=";
|
192
|
+
"<=": "<=";
|
193
|
+
between: "between";
|
194
|
+
}>>;
|
195
|
+
op: z.ZodOptional<z.ZodEnum<{
|
196
|
+
"=": "=";
|
197
|
+
"==": "==";
|
198
|
+
"!=": "!=";
|
199
|
+
">": ">";
|
200
|
+
"<": "<";
|
201
|
+
">=": ">=";
|
202
|
+
"<=": "<=";
|
203
|
+
between: "between";
|
204
|
+
}>>;
|
205
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
206
|
+
}, z.core.$strip>, z.ZodObject<{
|
207
|
+
field: z.ZodString;
|
208
|
+
operator: z.ZodOptional<z.ZodEnum<{
|
209
|
+
in: "in";
|
210
|
+
"not in": "not in";
|
211
|
+
}>>;
|
212
|
+
op: z.ZodOptional<z.ZodEnum<{
|
213
|
+
in: "in";
|
214
|
+
"not in": "not in";
|
215
|
+
}>>;
|
216
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
217
|
+
}, z.core.$strip>]>>]>>;
|
218
|
+
yValue: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>]>>;
|
219
|
+
text: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
|
220
|
+
textPosition: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
221
|
+
outsideStart: "outsideStart";
|
222
|
+
outsideEnd: "outsideEnd";
|
223
|
+
outsideMiddle: "outsideMiddle";
|
224
|
+
insideStart: "insideStart";
|
225
|
+
insideMiddle: "insideMiddle";
|
226
|
+
insideEnd: "insideEnd";
|
227
|
+
}>>>;
|
228
|
+
textColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
229
|
+
textFontSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
230
|
+
textFontWeight: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
231
|
+
textAlign: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
232
|
+
left: "left";
|
233
|
+
right: "right";
|
234
|
+
center: "center";
|
235
|
+
}>>>;
|
236
|
+
textBaseline: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
237
|
+
top: "top";
|
238
|
+
bottom: "bottom";
|
239
|
+
middle: "middle";
|
240
|
+
}>>>;
|
241
|
+
lineVisible: z.ZodOptional<z.ZodBoolean>;
|
242
|
+
lineColor: z.ZodOptional<z.ZodString>;
|
243
|
+
lineWidth: z.ZodOptional<z.ZodNumber>;
|
244
|
+
lineStyle: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"solid">, z.ZodLiteral<"dashed">, z.ZodLiteral<"dotted">]>>;
|
245
|
+
backgroundVisible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
246
|
+
backgroundColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
247
|
+
backgroundBorderColor: z.ZodOptional<z.ZodString>;
|
248
|
+
backgroundBorderWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
249
|
+
backgroundBorderRadius: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
250
|
+
backgroundPadding: z.ZodOptional<z.ZodNumber>;
|
251
|
+
offsetY: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
252
|
+
offsetX: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
253
|
+
}, z.core.$strip>;
|
@@ -0,0 +1,199 @@
|
|
1
|
+
import { type Selector, type Selectors } from '../../dataSelector';
|
2
|
+
import { z } from 'zod';
|
3
|
+
export type AnnotationPoint = {
|
4
|
+
/**
|
5
|
+
* 依赖选择的数据, 进行数据标记.
|
6
|
+
*/
|
7
|
+
selector: Selector | Selectors;
|
8
|
+
/**
|
9
|
+
* 标注的文本
|
10
|
+
* @description 标注的文本
|
11
|
+
* @default ''
|
12
|
+
* @example '标注文本'
|
13
|
+
*/
|
14
|
+
text?: string | string[];
|
15
|
+
/**
|
16
|
+
* 文本颜色
|
17
|
+
* @description 文本颜色
|
18
|
+
* @default '#ffffff'
|
19
|
+
* @example 'red'
|
20
|
+
*/
|
21
|
+
textColor?: string;
|
22
|
+
/**
|
23
|
+
* 文本字体大小
|
24
|
+
* @description 文本字体大小
|
25
|
+
* @default 12
|
26
|
+
* @example 12
|
27
|
+
*/
|
28
|
+
textFontSize?: number;
|
29
|
+
/**
|
30
|
+
* 文本字体重量
|
31
|
+
* @description 文本字体重量
|
32
|
+
* @default 400
|
33
|
+
* @example 400
|
34
|
+
*/
|
35
|
+
textFontWeight?: number;
|
36
|
+
/**
|
37
|
+
* 文本对齐方式
|
38
|
+
* @description 文本对齐方式
|
39
|
+
* @default 'left'
|
40
|
+
* @example 'left'
|
41
|
+
*/
|
42
|
+
textAlign?: 'left' | 'right' | 'center';
|
43
|
+
/**
|
44
|
+
* 文本垂直对齐方式
|
45
|
+
* @description 文本垂直对齐方式
|
46
|
+
* @default 'middle'
|
47
|
+
* @example 'middle'
|
48
|
+
*/
|
49
|
+
textBaseline?: 'top' | 'middle' | 'bottom';
|
50
|
+
/**
|
51
|
+
* 文本Y方向的, 偏移量
|
52
|
+
* @description 文本Y方向的, 偏移量, 支持正负
|
53
|
+
* @default 0
|
54
|
+
* @example offsetY: 10
|
55
|
+
*/
|
56
|
+
offsetY?: number;
|
57
|
+
/**
|
58
|
+
* 文本X方向的, 偏移量
|
59
|
+
* @description 文本X方向的, 偏移量, 支持正负
|
60
|
+
* @default 0
|
61
|
+
* @example offsetX: -10
|
62
|
+
*/
|
63
|
+
offsetX?: number;
|
64
|
+
/**
|
65
|
+
* 背景可见
|
66
|
+
* @description 背景可见
|
67
|
+
* @default true
|
68
|
+
* @example true
|
69
|
+
*/
|
70
|
+
backgroundVisible?: boolean;
|
71
|
+
/**
|
72
|
+
* 背景颜色
|
73
|
+
* @description 背景颜色
|
74
|
+
* @default '#212121'
|
75
|
+
* @example 'red'
|
76
|
+
*/
|
77
|
+
backgroundColor?: string;
|
78
|
+
/**
|
79
|
+
* 背景边框颜色
|
80
|
+
* @description 背景边框颜色
|
81
|
+
* @default 'red'
|
82
|
+
* @example 'red'
|
83
|
+
*/
|
84
|
+
backgroundBorderColor?: string;
|
85
|
+
/**
|
86
|
+
* 背景边框宽度
|
87
|
+
* @description 背景边框宽度
|
88
|
+
* @default 1
|
89
|
+
* @example 2
|
90
|
+
*/
|
91
|
+
backgroundBorderWidth?: number;
|
92
|
+
/**
|
93
|
+
* 背景边框圆角
|
94
|
+
* @description 背景边框圆角
|
95
|
+
* @default 4
|
96
|
+
* @example 4
|
97
|
+
*/
|
98
|
+
backgroundBorderRadius?: number;
|
99
|
+
/**
|
100
|
+
* 背景内边距
|
101
|
+
* @description 背景内边距
|
102
|
+
* @default 4
|
103
|
+
* @example 4
|
104
|
+
*/
|
105
|
+
backgroundPadding?: number;
|
106
|
+
};
|
107
|
+
export declare const zAnnotationPoint: z.ZodObject<{
|
108
|
+
selector: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
109
|
+
field: z.ZodString;
|
110
|
+
operator: z.ZodOptional<z.ZodEnum<{
|
111
|
+
"=": "=";
|
112
|
+
"==": "==";
|
113
|
+
"!=": "!=";
|
114
|
+
">": ">";
|
115
|
+
"<": "<";
|
116
|
+
">=": ">=";
|
117
|
+
"<=": "<=";
|
118
|
+
between: "between";
|
119
|
+
}>>;
|
120
|
+
op: z.ZodOptional<z.ZodEnum<{
|
121
|
+
"=": "=";
|
122
|
+
"==": "==";
|
123
|
+
"!=": "!=";
|
124
|
+
">": ">";
|
125
|
+
"<": "<";
|
126
|
+
">=": ">=";
|
127
|
+
"<=": "<=";
|
128
|
+
between: "between";
|
129
|
+
}>>;
|
130
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
131
|
+
}, z.core.$strip>, z.ZodObject<{
|
132
|
+
field: z.ZodString;
|
133
|
+
operator: z.ZodOptional<z.ZodEnum<{
|
134
|
+
in: "in";
|
135
|
+
"not in": "not in";
|
136
|
+
}>>;
|
137
|
+
op: z.ZodOptional<z.ZodEnum<{
|
138
|
+
in: "in";
|
139
|
+
"not in": "not in";
|
140
|
+
}>>;
|
141
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
142
|
+
}, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
|
143
|
+
field: z.ZodString;
|
144
|
+
operator: z.ZodOptional<z.ZodEnum<{
|
145
|
+
"=": "=";
|
146
|
+
"==": "==";
|
147
|
+
"!=": "!=";
|
148
|
+
">": ">";
|
149
|
+
"<": "<";
|
150
|
+
">=": ">=";
|
151
|
+
"<=": "<=";
|
152
|
+
between: "between";
|
153
|
+
}>>;
|
154
|
+
op: z.ZodOptional<z.ZodEnum<{
|
155
|
+
"=": "=";
|
156
|
+
"==": "==";
|
157
|
+
"!=": "!=";
|
158
|
+
">": ">";
|
159
|
+
"<": "<";
|
160
|
+
">=": ">=";
|
161
|
+
"<=": "<=";
|
162
|
+
between: "between";
|
163
|
+
}>>;
|
164
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
165
|
+
}, z.core.$strip>, z.ZodObject<{
|
166
|
+
field: z.ZodString;
|
167
|
+
operator: z.ZodOptional<z.ZodEnum<{
|
168
|
+
in: "in";
|
169
|
+
"not in": "not in";
|
170
|
+
}>>;
|
171
|
+
op: z.ZodOptional<z.ZodEnum<{
|
172
|
+
in: "in";
|
173
|
+
"not in": "not in";
|
174
|
+
}>>;
|
175
|
+
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
|
176
|
+
}, z.core.$strip>]>>]>;
|
177
|
+
text: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
|
178
|
+
textColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
179
|
+
textFontSize: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
180
|
+
textFontWeight: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
181
|
+
textAlign: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
182
|
+
left: "left";
|
183
|
+
right: "right";
|
184
|
+
center: "center";
|
185
|
+
}>>>;
|
186
|
+
textBaseline: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
187
|
+
top: "top";
|
188
|
+
bottom: "bottom";
|
189
|
+
middle: "middle";
|
190
|
+
}>>>;
|
191
|
+
backgroundVisible: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
192
|
+
backgroundColor: z.ZodOptional<z.ZodDefault<z.ZodString>>;
|
193
|
+
backgroundBorderColor: z.ZodOptional<z.ZodString>;
|
194
|
+
backgroundBorderWidth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
195
|
+
backgroundBorderRadius: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
196
|
+
backgroundPadding: z.ZodOptional<z.ZodNumber>;
|
197
|
+
offsetY: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
198
|
+
offsetX: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
199
|
+
}, z.core.$strip>;
|