@visactor/vseed 0.0.11 → 0.0.12

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.
Files changed (54) hide show
  1. package/dist/builder/builder/builder.d.ts +4336 -477
  2. package/dist/builder/register/theme.d.ts +4 -1
  3. package/dist/dataSelector/selector.d.ts +1 -1
  4. package/dist/index.cjs +907 -174
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.js +877 -174
  7. package/dist/index.js.map +1 -1
  8. package/dist/pipeline/advanced/pipes/config/config.d.ts +3 -3
  9. package/dist/pipeline/constant.d.ts +2 -0
  10. package/dist/pipeline/spec/pipes/crosshair/horizontalCrosshairRect.d.ts +2 -0
  11. package/dist/pipeline/spec/pipes/crosshair/index.d.ts +3 -0
  12. package/dist/pipeline/spec/pipes/crosshair/verticalCrosshairLine.d.ts +2 -0
  13. package/dist/pipeline/spec/pipes/crosshair/verticalCrosshairRect.d.ts +2 -0
  14. package/dist/pipeline/spec/pipes/index.d.ts +1 -0
  15. package/dist/pipeline/spec/pipes/markStyle/areaStyle.d.ts +2 -0
  16. package/dist/pipeline/spec/pipes/markStyle/index.d.ts +3 -0
  17. package/dist/pipeline/spec/pipes/markStyle/lineStyle.d.ts +2 -0
  18. package/dist/pipeline/spec/pipes/markStyle/pointStyle.d.ts +2 -0
  19. package/dist/pipeline/spec/pipes/stack/index.d.ts +1 -0
  20. package/dist/pipeline/spec/pipes/stack/stackCornerRadius.d.ts +2 -0
  21. package/dist/pipeline/utils/chatType.d.ts +16 -16
  22. package/dist/pipeline/utils/format/createFormatter.d.ts +2 -0
  23. package/dist/pipeline/utils/format/createNumFormatter.d.ts +2 -0
  24. package/dist/pipeline/utils/format/index.d.ts +2 -0
  25. package/dist/pipeline/utils/index.d.ts +4 -2
  26. package/dist/pipeline/utils/measures/findMeasureById.d.ts +2 -0
  27. package/dist/pipeline/utils/measures/index.d.ts +1 -0
  28. package/dist/types/advancedVSeed.d.ts +2441 -320
  29. package/dist/types/chartType/area/area.d.ts +33 -1
  30. package/dist/types/chartType/areaPercent/areaPercent.d.ts +36 -4
  31. package/dist/types/chartType/bar/bar.d.ts +13 -2
  32. package/dist/types/chartType/barParallel/barParallel.d.ts +13 -2
  33. package/dist/types/chartType/barPercent/barPercent.d.ts +13 -2
  34. package/dist/types/chartType/column/column.d.ts +13 -2
  35. package/dist/types/chartType/columnParallel/columnParallel.d.ts +13 -2
  36. package/dist/types/chartType/columnPercent/columnPercent.d.ts +13 -2
  37. package/dist/types/chartType/line/line.d.ts +27 -4
  38. package/dist/types/properties/config/config.d.ts +105 -36
  39. package/dist/types/properties/config/crosshair.d.ts +17 -0
  40. package/dist/types/properties/config/index.d.ts +2 -0
  41. package/dist/types/properties/config/stackCornerRadius.d.ts +3 -0
  42. package/dist/types/properties/markStyle/areaStyle.d.ts +129 -0
  43. package/dist/types/properties/markStyle/index.d.ts +3 -0
  44. package/dist/types/properties/markStyle/lineStyle.d.ts +160 -0
  45. package/dist/types/properties/markStyle/markStyle.d.ts +543 -2
  46. package/dist/types/properties/markStyle/pointStyle.d.ts +168 -0
  47. package/dist/types/properties/measures/format/formatter.d.ts +1 -0
  48. package/dist/types/properties/measures/format/index.d.ts +2 -0
  49. package/dist/types/properties/measures/format/numFormat.d.ts +20 -0
  50. package/dist/types/properties/measures/index.d.ts +2 -2
  51. package/dist/types/properties/measures/measures.d.ts +40 -40
  52. package/dist/types/properties/theme/customTheme.d.ts +3094 -72
  53. package/dist/types/vseed.d.ts +20 -20
  54. package/package.json +1 -1
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ export declare const zCrosshairLine: z.ZodObject<{
3
+ visible: z.ZodOptional<z.ZodBoolean>;
4
+ lineColor: z.ZodOptional<z.ZodString>;
5
+ labelColor: z.ZodOptional<z.ZodString>;
6
+ labelVisible: z.ZodOptional<z.ZodBoolean>;
7
+ labelBackgroundColor: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>;
9
+ export type CrosshairLine = z.infer<typeof zCrosshairLine>;
10
+ export declare const zCrosshairRect: z.ZodObject<{
11
+ visible: z.ZodOptional<z.ZodBoolean>;
12
+ rectColor: z.ZodOptional<z.ZodString>;
13
+ labelColor: z.ZodOptional<z.ZodString>;
14
+ labelVisible: z.ZodOptional<z.ZodBoolean>;
15
+ labelBackgroundColor: z.ZodOptional<z.ZodString>;
16
+ }, z.core.$strip>;
17
+ export type CrosshairRect = z.infer<typeof zCrosshairLine>;
@@ -2,3 +2,5 @@ export * from './axis';
2
2
  export * from './config';
3
3
  export * from './bandAxis';
4
4
  export * from './linearAxis';
5
+ export * from './crosshair';
6
+ export * from './stackCornerRadius';
@@ -0,0 +1,3 @@
1
+ import { z } from 'zod';
2
+ export declare const zStackCornerRadius: z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodArray<z.ZodNumber>]>>;
3
+ export type StackCornerRadius = z.infer<typeof zStackCornerRadius>;
@@ -0,0 +1,129 @@
1
+ import { z } from 'zod';
2
+ import { type Selector, type Selectors } from '../../dataSelector';
3
+ export type AreaStyle = {
4
+ /**
5
+ * 数据选择器
6
+ * @description
7
+ * 若配置selector, 提供数值 selector, 局部数据 selector, 条件维度 selector, 条件指标 selector 共四类数据匹配能力
8
+ * 若未配置selector, 则样式全局生效.
9
+ * @type {Selector | Selectors}
10
+ * @example 数值选择器
11
+ * selector = "tool"
12
+ * selector = ["tool", "book"]
13
+ * selector = 100
14
+ * selector = [100, 200]
15
+ * @example 局部数据选择器
16
+ * selector = { profit: 100 }
17
+ * selector = [{ profit: 100 }, { profit: 200 }]
18
+ * @example 条件维度选择器
19
+ * selector = {
20
+ * field: 'category',
21
+ * operator: 'in',
22
+ * value: 'tool'
23
+ * }
24
+ * selector = {
25
+ * field: 'category',
26
+ * operator: 'not in',
27
+ * value: 'book'
28
+ * }
29
+ * @example 条件指标选择器
30
+ * selector = {
31
+ * field: 'profit',
32
+ * operator: '>=',
33
+ * value: 100
34
+ * }
35
+ * selector = {
36
+ * field: 'profit',
37
+ * operator: 'between'
38
+ * value: [100, 300]
39
+ * }
40
+ */
41
+ selector?: Selector | Selectors;
42
+ /**
43
+ * 面积图元的颜色
44
+ * @description 面积图元的颜色
45
+ * @type {string}
46
+ * @default {undefined} follow series color
47
+ */
48
+ areaColor?: string;
49
+ /**
50
+ * 面积图元的颜色透明度
51
+ * @description 面积图元的颜色透明度
52
+ * @type {number}
53
+ * @default 1
54
+ */
55
+ areaColorOpacity?: number;
56
+ };
57
+ export declare const zAreaStyle: z.ZodObject<{
58
+ selector: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
59
+ field: z.ZodString;
60
+ operator: z.ZodOptional<z.ZodEnum<{
61
+ "=": "=";
62
+ "==": "==";
63
+ "!=": "!=";
64
+ ">": ">";
65
+ "<": "<";
66
+ ">=": ">=";
67
+ "<=": "<=";
68
+ between: "between";
69
+ }>>;
70
+ op: z.ZodOptional<z.ZodEnum<{
71
+ "=": "=";
72
+ "==": "==";
73
+ "!=": "!=";
74
+ ">": ">";
75
+ "<": "<";
76
+ ">=": ">=";
77
+ "<=": "<=";
78
+ between: "between";
79
+ }>>;
80
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
81
+ }, z.core.$strip>, z.ZodObject<{
82
+ field: z.ZodString;
83
+ operator: z.ZodOptional<z.ZodEnum<{
84
+ in: "in";
85
+ "not in": "not in";
86
+ }>>;
87
+ op: z.ZodOptional<z.ZodEnum<{
88
+ in: "in";
89
+ "not in": "not in";
90
+ }>>;
91
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
92
+ }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
93
+ field: z.ZodString;
94
+ operator: z.ZodOptional<z.ZodEnum<{
95
+ "=": "=";
96
+ "==": "==";
97
+ "!=": "!=";
98
+ ">": ">";
99
+ "<": "<";
100
+ ">=": ">=";
101
+ "<=": "<=";
102
+ between: "between";
103
+ }>>;
104
+ op: z.ZodOptional<z.ZodEnum<{
105
+ "=": "=";
106
+ "==": "==";
107
+ "!=": "!=";
108
+ ">": ">";
109
+ "<": "<";
110
+ ">=": ">=";
111
+ "<=": "<=";
112
+ between: "between";
113
+ }>>;
114
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
115
+ }, z.core.$strip>, z.ZodObject<{
116
+ field: z.ZodString;
117
+ operator: z.ZodOptional<z.ZodEnum<{
118
+ in: "in";
119
+ "not in": "not in";
120
+ }>>;
121
+ op: z.ZodOptional<z.ZodEnum<{
122
+ in: "in";
123
+ "not in": "not in";
124
+ }>>;
125
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
126
+ }, z.core.$strip>]>>]>>;
127
+ areaColor: z.ZodOptional<z.ZodString>;
128
+ areaColorOpacity: z.ZodOptional<z.ZodNumber>;
129
+ }, z.core.$strip>;
@@ -1,2 +1,5 @@
1
1
  export * from './barStyle';
2
+ export * from './pointStyle';
3
+ export * from './lineStyle';
4
+ export * from './areaStyle';
2
5
  export * from './markStyle';
@@ -0,0 +1,160 @@
1
+ import { z } from 'zod';
2
+ import { type Selector, type Selectors } from '../../dataSelector';
3
+ export type LineStyle = {
4
+ /**
5
+ * 数据选择器
6
+ * @description
7
+ * 若配置selector, 提供数值 selector, 局部数据 selector, 条件维度 selector, 条件指标 selector 共四类数据匹配能力
8
+ * 若未配置selector, 则样式全局生效.
9
+ * @type {Selector | Selectors}
10
+ * @example 数值选择器
11
+ * selector = "tool"
12
+ * selector = ["tool", "book"]
13
+ * selector = 100
14
+ * selector = [100, 200]
15
+ * @example 局部数据选择器
16
+ * selector = { profit: 100 }
17
+ * selector = [{ profit: 100 }, { profit: 200 }]
18
+ * @example 条件维度选择器
19
+ * selector = {
20
+ * field: 'category',
21
+ * operator: 'in',
22
+ * value: 'tool'
23
+ * }
24
+ * selector = {
25
+ * field: 'category',
26
+ * operator: 'not in',
27
+ * value: 'book'
28
+ * }
29
+ * @example 条件指标选择器
30
+ * selector = {
31
+ * field: 'profit',
32
+ * operator: '>=',
33
+ * value: 100
34
+ * }
35
+ * selector = {
36
+ * field: 'profit',
37
+ * operator: 'between'
38
+ * value: [100, 300]
39
+ * }
40
+ */
41
+ selector?: Selector | Selectors;
42
+ /**
43
+ * 折线图是否平滑
44
+ * @description 折线图是否平滑
45
+ * @type {boolean}
46
+ * @default true
47
+ */
48
+ lineSmooth?: boolean;
49
+ /**
50
+ * 柱状图颜色
51
+ * @description 柱状图颜色
52
+ * @type {string}
53
+ * @default {undefined} follow series color
54
+ */
55
+ lineColor?: string;
56
+ /**
57
+ * 柱状图颜色透明度
58
+ * @description 柱状图颜色透明度
59
+ * @type {number}
60
+ * @default 1
61
+ */
62
+ lineColorOpacity?: number;
63
+ /**
64
+ * 柱状图边框宽度
65
+ * @description 柱状图边框宽度
66
+ * @type {number}
67
+ * @default 1
68
+ */
69
+ lineWidth?: number;
70
+ /**
71
+ * 柱状图边框样式
72
+ * @description 柱状图边框样式
73
+ * @type {number}
74
+ * @default solid
75
+ * @example solid
76
+ * @example dashed
77
+ * @example dotted
78
+ */
79
+ lineStyle?: 'solid' | 'dashed' | 'dotted';
80
+ };
81
+ export declare const zLineStyle: z.ZodObject<{
82
+ selector: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
83
+ field: z.ZodString;
84
+ operator: z.ZodOptional<z.ZodEnum<{
85
+ "=": "=";
86
+ "==": "==";
87
+ "!=": "!=";
88
+ ">": ">";
89
+ "<": "<";
90
+ ">=": ">=";
91
+ "<=": "<=";
92
+ between: "between";
93
+ }>>;
94
+ op: z.ZodOptional<z.ZodEnum<{
95
+ "=": "=";
96
+ "==": "==";
97
+ "!=": "!=";
98
+ ">": ">";
99
+ "<": "<";
100
+ ">=": ">=";
101
+ "<=": "<=";
102
+ between: "between";
103
+ }>>;
104
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
105
+ }, z.core.$strip>, z.ZodObject<{
106
+ field: z.ZodString;
107
+ operator: z.ZodOptional<z.ZodEnum<{
108
+ in: "in";
109
+ "not in": "not in";
110
+ }>>;
111
+ op: z.ZodOptional<z.ZodEnum<{
112
+ in: "in";
113
+ "not in": "not in";
114
+ }>>;
115
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
116
+ }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
117
+ field: z.ZodString;
118
+ operator: z.ZodOptional<z.ZodEnum<{
119
+ "=": "=";
120
+ "==": "==";
121
+ "!=": "!=";
122
+ ">": ">";
123
+ "<": "<";
124
+ ">=": ">=";
125
+ "<=": "<=";
126
+ between: "between";
127
+ }>>;
128
+ op: z.ZodOptional<z.ZodEnum<{
129
+ "=": "=";
130
+ "==": "==";
131
+ "!=": "!=";
132
+ ">": ">";
133
+ "<": "<";
134
+ ">=": ">=";
135
+ "<=": "<=";
136
+ between: "between";
137
+ }>>;
138
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
139
+ }, z.core.$strip>, z.ZodObject<{
140
+ field: z.ZodString;
141
+ operator: z.ZodOptional<z.ZodEnum<{
142
+ in: "in";
143
+ "not in": "not in";
144
+ }>>;
145
+ op: z.ZodOptional<z.ZodEnum<{
146
+ in: "in";
147
+ "not in": "not in";
148
+ }>>;
149
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
150
+ }, z.core.$strip>]>>]>>;
151
+ lineSmooth: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
152
+ lineColor: z.ZodOptional<z.ZodString>;
153
+ lineColorOpacity: z.ZodOptional<z.ZodNumber>;
154
+ lineWidth: z.ZodOptional<z.ZodNumber>;
155
+ lineStyle: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
156
+ solid: "solid";
157
+ dashed: "dashed";
158
+ dotted: "dotted";
159
+ }>]>>;
160
+ }, z.core.$strip>;