@visactor/vseed 0.4.1 → 0.4.3

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 (153) hide show
  1. package/dist/cjs/index.cjs +646 -1
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/esm/builder/builder/buildSpec.d.ts +1 -2
  4. package/dist/esm/builder/builder/buildSpec.js.map +1 -1
  5. package/dist/esm/builder/builder/builder.d.ts +1116 -106
  6. package/dist/esm/builder/builder/builder.js +10 -0
  7. package/dist/esm/builder/builder/builder.js.map +1 -1
  8. package/dist/esm/builder/builder/prepare.d.ts +12 -0
  9. package/dist/esm/builder/builder/prepare.js +269 -0
  10. package/dist/esm/builder/builder/prepare.js.map +1 -0
  11. package/dist/esm/dataReshape/constant.d.ts +1 -0
  12. package/dist/esm/dataReshape/constant.js +2 -1
  13. package/dist/esm/dataReshape/constant.js.map +1 -1
  14. package/dist/esm/dataSelector/selector.d.ts +71 -2
  15. package/dist/esm/dataSelector/selector.js +96 -32
  16. package/dist/esm/dataSelector/selector.js.map +1 -1
  17. package/dist/esm/pipeline/advanced/chart/pipes/default/defaultMeasures.js +2 -1
  18. package/dist/esm/pipeline/advanced/chart/pipes/default/defaultMeasures.js.map +1 -1
  19. package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasures.js +2 -1
  20. package/dist/esm/pipeline/advanced/table/pipes/default/defaultMeasures.js.map +1 -1
  21. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js +10 -4
  22. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationHorizontalLine.js.map +1 -1
  23. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.d.ts +8 -2
  24. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.js +27 -5
  25. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointCommon.js.map +1 -1
  26. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.js +8 -4
  27. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationPointOfDualAxis.js.map +1 -1
  28. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js +10 -4
  29. package/dist/esm/pipeline/spec/chart/pipes/annotation/annotationVerticalLine.js.map +1 -1
  30. package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.d.ts +9 -1
  31. package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.js +7 -1
  32. package/dist/esm/pipeline/spec/chart/pipes/annotation/utils.js.map +1 -1
  33. package/dist/esm/pipeline/spec/chart/pipes/markStyle/barStyle.js +3 -2
  34. package/dist/esm/pipeline/spec/chart/pipes/markStyle/barStyle.js.map +1 -1
  35. package/dist/esm/pipeline/spec/chart/pipes/markStyle/lineStyle.js +5 -2
  36. package/dist/esm/pipeline/spec/chart/pipes/markStyle/lineStyle.js.map +1 -1
  37. package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointStyle.js +3 -2
  38. package/dist/esm/pipeline/spec/chart/pipes/markStyle/pointStyle.js.map +1 -1
  39. package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.d.ts +4 -1
  40. package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.js +12 -1
  41. package/dist/esm/pipeline/spec/table/pipes/cellStyle/common.js.map +1 -1
  42. package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.js +6 -3
  43. package/dist/esm/pipeline/spec/table/pipes/cellStyle/pivot.js.map +1 -1
  44. package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.js +7 -3
  45. package/dist/esm/pipeline/spec/table/pipes/cellStyle/table.js.map +1 -1
  46. package/dist/esm/pipeline/utils/index.d.ts +1 -0
  47. package/dist/esm/pipeline/utils/index.js +1 -0
  48. package/dist/esm/pipeline/utils/sandbox/builtin-utils.d.ts +6 -0
  49. package/dist/esm/pipeline/utils/sandbox/builtin-utils.js +337 -0
  50. package/dist/esm/pipeline/utils/sandbox/builtin-utils.js.map +1 -0
  51. package/dist/esm/pipeline/utils/sandbox/execute.d.ts +73 -0
  52. package/dist/esm/pipeline/utils/sandbox/execute.js +716 -0
  53. package/dist/esm/pipeline/utils/sandbox/execute.js.map +1 -0
  54. package/dist/esm/pipeline/utils/sandbox/index.d.ts +7 -0
  55. package/dist/esm/pipeline/utils/sandbox/index.js +3 -0
  56. package/dist/esm/types/builder/builder.d.ts +1 -0
  57. package/dist/esm/types/builder/builder.js.map +1 -1
  58. package/dist/esm/types/chartType/area/zArea.d.ts +682 -18
  59. package/dist/esm/types/chartType/areaPercent/zAreaPercent.d.ts +682 -18
  60. package/dist/esm/types/chartType/bar/zBar.d.ts +362 -10
  61. package/dist/esm/types/chartType/barParallel/zBarParallel.d.ts +362 -10
  62. package/dist/esm/types/chartType/barPercent/zBarPercent.d.ts +362 -10
  63. package/dist/esm/types/chartType/boxPlot/zBoxPlot.d.ts +210 -14
  64. package/dist/esm/types/chartType/circlePacking/zCirclePacking.d.ts +2 -2
  65. package/dist/esm/types/chartType/column/zColumn.d.ts +362 -10
  66. package/dist/esm/types/chartType/columnParallel/zColumnParallel.d.ts +362 -10
  67. package/dist/esm/types/chartType/columnPercent/zColumnPercent.d.ts +362 -10
  68. package/dist/esm/types/chartType/donut/zDonut.d.ts +2 -2
  69. package/dist/esm/types/chartType/dualAxis/zDualAxis.d.ts +842 -22
  70. package/dist/esm/types/chartType/funnel/zFunnel.d.ts +2 -2
  71. package/dist/esm/types/chartType/heatmap/zHeatmap.d.ts +2 -2
  72. package/dist/esm/types/chartType/histogram/zHistogram.d.ts +362 -10
  73. package/dist/esm/types/chartType/line/zLine.d.ts +522 -14
  74. package/dist/esm/types/chartType/pie/zPie.d.ts +2 -2
  75. package/dist/esm/types/chartType/pivotTable/zPivotTable.d.ts +241 -4
  76. package/dist/esm/types/chartType/pivotTable/zPivotTable.js +1 -1
  77. package/dist/esm/types/chartType/pivotTable/zPivotTable.js.map +1 -1
  78. package/dist/esm/types/chartType/raceBar/zRaceBar.d.ts +362 -10
  79. package/dist/esm/types/chartType/raceColumn/zRaceColumn.d.ts +362 -10
  80. package/dist/esm/types/chartType/raceScatter/zRaceScatter.d.ts +362 -10
  81. package/dist/esm/types/chartType/radar/zRadar.d.ts +2 -2
  82. package/dist/esm/types/chartType/rose/zRose.d.ts +2 -2
  83. package/dist/esm/types/chartType/roseParallel/zRoseParallel.d.ts +2 -2
  84. package/dist/esm/types/chartType/scatter/zScatter.d.ts +362 -10
  85. package/dist/esm/types/chartType/sunburst/zSunburst.d.ts +2 -2
  86. package/dist/esm/types/chartType/table/zTable.d.ts +241 -4
  87. package/dist/esm/types/chartType/table/zTable.js +1 -1
  88. package/dist/esm/types/chartType/table/zTable.js.map +1 -1
  89. package/dist/esm/types/chartType/treeMap/zTreeMap.d.ts +2 -2
  90. package/dist/esm/types/dataSelector/selector.d.ts +594 -3
  91. package/dist/esm/types/dataSelector/selector.js +58 -2
  92. package/dist/esm/types/dataSelector/selector.js.map +1 -1
  93. package/dist/esm/types/properties/annotation/annotation.d.ts +200 -4
  94. package/dist/esm/types/properties/annotation/annotationHorizontalLine.d.ts +12 -0
  95. package/dist/esm/types/properties/annotation/annotationPoint.d.ts +19 -0
  96. package/dist/esm/types/properties/annotation/annotationVerticalLine.d.ts +12 -0
  97. package/dist/esm/types/properties/annotation/zAnnotationHorizontalLine.d.ts +10 -0
  98. package/dist/esm/types/properties/annotation/zAnnotationHorizontalLine.js +2 -0
  99. package/dist/esm/types/properties/annotation/zAnnotationHorizontalLine.js.map +1 -1
  100. package/dist/esm/types/properties/annotation/zAnnotationPoint.d.ts +80 -2
  101. package/dist/esm/types/properties/annotation/zAnnotationPoint.js +2 -1
  102. package/dist/esm/types/properties/annotation/zAnnotationPoint.js.map +1 -1
  103. package/dist/esm/types/properties/annotation/zAnnotationVerticalLine.d.ts +10 -0
  104. package/dist/esm/types/properties/annotation/zAnnotationVerticalLine.js +2 -0
  105. package/dist/esm/types/properties/annotation/zAnnotationVerticalLine.js.map +1 -1
  106. package/dist/esm/types/properties/cellStyle/bodyCellStyle.d.ts +105 -2
  107. package/dist/esm/types/properties/cellStyle/bodyCellStyle.js +2 -1
  108. package/dist/esm/types/properties/cellStyle/bodyCellStyle.js.map +1 -1
  109. package/dist/esm/types/properties/cellStyle/cellStyle.d.ts +83 -2
  110. package/dist/esm/types/properties/config/annotation/zAnnotation.d.ts +156 -0
  111. package/dist/esm/types/properties/config/area.d.ts +160 -4
  112. package/dist/esm/types/properties/config/bar.d.ts +240 -6
  113. package/dist/esm/types/properties/config/boxplot.d.ts +80 -2
  114. package/dist/esm/types/properties/config/circlePacking.d.ts +2 -2
  115. package/dist/esm/types/properties/config/column.d.ts +240 -6
  116. package/dist/esm/types/properties/config/config.d.ts +1300 -52
  117. package/dist/esm/types/properties/config/dualAxis.d.ts +80 -2
  118. package/dist/esm/types/properties/config/funnel.d.ts +2 -2
  119. package/dist/esm/types/properties/config/heatmap.d.ts +2 -2
  120. package/dist/esm/types/properties/config/histogram.d.ts +80 -2
  121. package/dist/esm/types/properties/config/label/zLabel.d.ts +2 -2
  122. package/dist/esm/types/properties/config/label/zPieLabel.d.ts +2 -2
  123. package/dist/esm/types/properties/config/line.d.ts +80 -2
  124. package/dist/esm/types/properties/config/pie.d.ts +6 -6
  125. package/dist/esm/types/properties/config/race.d.ts +240 -6
  126. package/dist/esm/types/properties/config/rose.d.ts +4 -4
  127. package/dist/esm/types/properties/config/scatter.d.ts +80 -2
  128. package/dist/esm/types/properties/config/sunburst.d.ts +2 -2
  129. package/dist/esm/types/properties/config/treeMap.d.ts +2 -2
  130. package/dist/esm/types/properties/markStyle/areaStyle.d.ts +19 -0
  131. package/dist/esm/types/properties/markStyle/barStyle.d.ts +99 -2
  132. package/dist/esm/types/properties/markStyle/barStyle.js +2 -1
  133. package/dist/esm/types/properties/markStyle/barStyle.js.map +1 -1
  134. package/dist/esm/types/properties/markStyle/boxPlotStyle.d.ts +2 -2
  135. package/dist/esm/types/properties/markStyle/lineStyle.d.ts +99 -2
  136. package/dist/esm/types/properties/markStyle/lineStyle.js +2 -1
  137. package/dist/esm/types/properties/markStyle/lineStyle.js.map +1 -1
  138. package/dist/esm/types/properties/markStyle/markStyle.d.ts +648 -24
  139. package/dist/esm/types/properties/markStyle/outlierStyle.d.ts +2 -2
  140. package/dist/esm/types/properties/markStyle/pointStyle.d.ts +99 -2
  141. package/dist/esm/types/properties/markStyle/pointStyle.js +2 -1
  142. package/dist/esm/types/properties/markStyle/pointStyle.js.map +1 -1
  143. package/dist/esm/types/properties/markStyle/zAreaStyle.d.ts +80 -2
  144. package/dist/esm/types/properties/markStyle/zAreaStyle.js +2 -1
  145. package/dist/esm/types/properties/markStyle/zAreaStyle.js.map +1 -1
  146. package/dist/esm/types/properties/theme/customTheme.d.ts +2600 -104
  147. package/dist/esm/types/sandbox.d.ts +19 -0
  148. package/dist/esm/types/sandbox.js +0 -0
  149. package/dist/esm/types/zVseed.d.ts +7 -25058
  150. package/dist/esm/types/zVseed.js.map +1 -1
  151. package/dist/umd/index.js +1786 -260
  152. package/dist/umd/index.js.map +1 -1
  153. package/package.json +1 -1
@@ -112,7 +112,7 @@ export declare const zOutlierStyle: z.ZodObject<{
112
112
  "not in": "not in";
113
113
  }>>>;
114
114
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
115
- }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
115
+ }, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
116
116
  field: z.ZodString;
117
117
  operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
118
118
  "=": "=";
@@ -146,7 +146,7 @@ export declare const zOutlierStyle: z.ZodObject<{
146
146
  "not in": "not in";
147
147
  }>>>;
148
148
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
149
- }, z.core.$strip>]>>]>>;
149
+ }, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>>]>>;
150
150
  pointVisible: z.ZodOptional<z.ZodBoolean>;
151
151
  pointSize: z.ZodOptional<z.ZodNumber>;
152
152
  pointColor: z.ZodOptional<z.ZodString>;
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import type { ChartDynamicFilter } from '../../dataSelector';
2
3
  import { type Selector, type Selectors } from '../../dataSelector';
3
4
  export type PointStyle = {
4
5
  /**
@@ -39,6 +40,24 @@ export type PointStyle = {
39
40
  * }
40
41
  */
41
42
  selector?: Selector | Selectors;
43
+ /**
44
+ * 动态筛选器(AI生成代码执行)
45
+ * @description
46
+ * 通过 AI 生成的 JavaScript 代码实现复杂数据筛选逻辑
47
+ * 适用于 Top N、统计分析、复杂条件等静态 selector 难以表达的场景
48
+ *
49
+ * 核心能力:
50
+ * - 支持任意复杂的数据筛选条件
51
+ * - 使用 内置工具函数 进行数据操作
52
+ * - 在浏览器环境中安全执行(Web Worker 沙箱)
53
+ *
54
+ * 环境要求: 仅支持浏览器环境,Node.js 环境将使用 fallback
55
+ *
56
+ * 注意: selector 和 dynamicFilter 不能同时使用,dynamicFilter 优先级更高
57
+ *
58
+ * @type {ChartDynamicFilter}
59
+ */
60
+ dynamicFilter?: ChartDynamicFilter;
42
61
  /**
43
62
  * @description 点是否可见
44
63
  */
@@ -112,7 +131,7 @@ export declare const zPointStyle: z.ZodObject<{
112
131
  "not in": "not in";
113
132
  }>>>;
114
133
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
115
- }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
134
+ }, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
116
135
  field: z.ZodString;
117
136
  operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
118
137
  "=": "=";
@@ -146,7 +165,85 @@ export declare const zPointStyle: z.ZodObject<{
146
165
  "not in": "not in";
147
166
  }>>>;
148
167
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
149
- }, z.core.$strip>]>>]>>>;
168
+ }, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>>]>>>;
169
+ dynamicFilter: z.ZodOptional<z.ZodObject<{
170
+ type: z.ZodLiteral<"row-with-field">;
171
+ description: z.ZodOptional<z.ZodString>;
172
+ code: z.ZodString;
173
+ fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
174
+ field: z.ZodString;
175
+ operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
176
+ "=": "=";
177
+ "==": "==";
178
+ "!=": "!=";
179
+ ">": ">";
180
+ "<": "<";
181
+ ">=": ">=";
182
+ "<=": "<=";
183
+ between: "between";
184
+ }>>>;
185
+ op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
186
+ "=": "=";
187
+ "==": "==";
188
+ "!=": "!=";
189
+ ">": ">";
190
+ "<": "<";
191
+ ">=": ">=";
192
+ "<=": "<=";
193
+ between: "between";
194
+ }>>>;
195
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
196
+ }, z.core.$strip>, z.ZodObject<{
197
+ field: z.ZodString;
198
+ operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
199
+ in: "in";
200
+ "not in": "not in";
201
+ }>>>;
202
+ op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
203
+ in: "in";
204
+ "not in": "not in";
205
+ }>>>;
206
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
207
+ }, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
208
+ field: z.ZodString;
209
+ operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
210
+ "=": "=";
211
+ "==": "==";
212
+ "!=": "!=";
213
+ ">": ">";
214
+ "<": "<";
215
+ ">=": ">=";
216
+ "<=": "<=";
217
+ between: "between";
218
+ }>>>;
219
+ op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
220
+ "=": "=";
221
+ "==": "==";
222
+ "!=": "!=";
223
+ ">": ">";
224
+ "<": "<";
225
+ ">=": ">=";
226
+ "<=": "<=";
227
+ between: "between";
228
+ }>>>;
229
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
230
+ }, z.core.$strip>, z.ZodObject<{
231
+ field: z.ZodString;
232
+ operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
233
+ in: "in";
234
+ "not in": "not in";
235
+ }>>>;
236
+ op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
237
+ in: "in";
238
+ "not in": "not in";
239
+ }>>>;
240
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
241
+ }, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>>]>>;
242
+ result: z.ZodOptional<z.ZodObject<{
243
+ success: z.ZodBoolean;
244
+ data: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>;
245
+ }, z.core.$strip>>;
246
+ }, z.core.$strip>>;
150
247
  pointVisible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
151
248
  pointSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
152
249
  pointColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -1,10 +1,11 @@
1
1
  import { z } from "zod";
2
- import { zSelector, zSelectors } from "../../dataSelector/index.js";
2
+ import { zChartDynamicFilter, zSelector, zSelectors } from "../../dataSelector/index.js";
3
3
  const zPointStyle = z.object({
4
4
  selector: z.union([
5
5
  zSelector,
6
6
  zSelectors
7
7
  ]).nullish(),
8
+ dynamicFilter: zChartDynamicFilter.optional(),
8
9
  pointVisible: z.boolean().nullish(),
9
10
  pointSize: z.number().nullish(),
10
11
  pointColor: z.string().nullish(),
@@ -1 +1 @@
1
- {"version":3,"file":"types/properties/markStyle/pointStyle.js","sources":["webpack://@visactor/vseed/./src/types/properties/markStyle/pointStyle.ts"],"sourcesContent":["import { z } from 'zod'\nimport { zSelector, zSelectors, type Selector, type Selectors } from '../../dataSelector'\n\nexport type PointStyle = {\n /**\n * 数据选择器\n * @description\n * 若配置selector, 提供数值 selector, 局部数据 selector, 条件维度 selector, 条件指标 selector 共四类数据匹配能力\n * 若未配置selector, 则样式全局生效.\n * @type {Selector | Selectors}\n * @example 数值选择器\n * selector = \"tool\"\n * selector = [\"tool\", \"book\"]\n * selector = 100\n * selector = [100, 200]\n * @example 局部数据选择器\n * selector = { profit: 100 }\n * selector = [{ profit: 100 }, { profit: 200 }]\n * @example 条件维度选择器\n * selector = {\n * field: 'category',\n * operator: 'in',\n * value: 'tool'\n * }\n * selector = {\n * field: 'category',\n * operator: 'not in',\n * value: 'book'\n * }\n * @example 条件指标选择器\n * selector = {\n * field: 'profit',\n * operator: '>=',\n * value: 100\n * }\n * selector = {\n * field: 'profit',\n * operator: 'between'\n * value: [100, 300]\n * }\n */\n selector?: Selector | Selectors\n\n /**\n * @description 点是否可见\n */\n pointVisible?: boolean\n /**\n * 点大小\n * @description 点大小\n */\n pointSize?: number\n /**\n * 点图元颜色\n * @description 点图元颜色\n */\n pointColor?: string\n /**\n * 点图元颜色透明度\n * @description 点图元颜色透明度\n */\n pointColorOpacity?: number\n /**\n * 点图元边框颜色\n * @description 点图元边框颜色\n */\n pointBorderColor?: string\n /**\n * 点图元边框宽度\n * @description 点图元边框宽度\n */\n pointBorderWidth?: number\n /**\n * 点图元边框样式\n * @description 点图元边框样式\n * @example solid\n * @example dashed\n * @example dotted\n */\n pointBorderStyle?: 'solid' | 'dashed' | 'dotted'\n}\n\nexport const zPointStyle = z.object({\n selector: z.union([zSelector, zSelectors]).nullish(),\n pointVisible: z.boolean().nullish(),\n pointSize: z.number().nullish(),\n pointColor: z.string().nullish(),\n pointColorOpacity: z.number().nullish(),\n pointBorderColor: z.string().nullish(),\n pointBorderWidth: z.number().nullish(),\n pointBorderStyle: z.union([z.enum(['solid', 'dashed', 'dotted'])]).nullish(),\n})\n"],"names":["zPointStyle","z","zSelector","zSelectors"],"mappings":";;AAkFO,MAAMA,cAAcC,EAAE,MAAM,CAAC;IAClC,UAAUA,EAAE,KAAK,CAAC;QAACC;QAAWC;KAAW,EAAE,OAAO;IAClD,cAAcF,EAAE,OAAO,GAAG,OAAO;IACjC,WAAWA,EAAE,MAAM,GAAG,OAAO;IAC7B,YAAYA,EAAE,MAAM,GAAG,OAAO;IAC9B,mBAAmBA,EAAE,MAAM,GAAG,OAAO;IACrC,kBAAkBA,EAAE,MAAM,GAAG,OAAO;IACpC,kBAAkBA,EAAE,MAAM,GAAG,OAAO;IACpC,kBAAkBA,EAAE,KAAK,CAAC;QAACA,CAAC,CAADA,OAAM,CAAC;YAAC;YAAS;YAAU;SAAS;KAAE,EAAE,OAAO;AAC5E"}
1
+ {"version":3,"file":"types/properties/markStyle/pointStyle.js","sources":["webpack://@visactor/vseed/./src/types/properties/markStyle/pointStyle.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { ChartDynamicFilter } from '../../dataSelector'\nimport { zChartDynamicFilter, zSelector, zSelectors, type Selector, type Selectors } from '../../dataSelector'\n\nexport type PointStyle = {\n /**\n * 数据选择器\n * @description\n * 若配置selector, 提供数值 selector, 局部数据 selector, 条件维度 selector, 条件指标 selector 共四类数据匹配能力\n * 若未配置selector, 则样式全局生效.\n * @type {Selector | Selectors}\n * @example 数值选择器\n * selector = \"tool\"\n * selector = [\"tool\", \"book\"]\n * selector = 100\n * selector = [100, 200]\n * @example 局部数据选择器\n * selector = { profit: 100 }\n * selector = [{ profit: 100 }, { profit: 200 }]\n * @example 条件维度选择器\n * selector = {\n * field: 'category',\n * operator: 'in',\n * value: 'tool'\n * }\n * selector = {\n * field: 'category',\n * operator: 'not in',\n * value: 'book'\n * }\n * @example 条件指标选择器\n * selector = {\n * field: 'profit',\n * operator: '>=',\n * value: 100\n * }\n * selector = {\n * field: 'profit',\n * operator: 'between'\n * value: [100, 300]\n * }\n */\n selector?: Selector | Selectors\n\n /**\n * 动态筛选器(AI生成代码执行)\n * @description\n * 通过 AI 生成的 JavaScript 代码实现复杂数据筛选逻辑\n * 适用于 Top N、统计分析、复杂条件等静态 selector 难以表达的场景\n *\n * 核心能力:\n * - 支持任意复杂的数据筛选条件\n * - 使用 内置工具函数 进行数据操作\n * - 在浏览器环境中安全执行(Web Worker 沙箱)\n *\n * 环境要求: 仅支持浏览器环境,Node.js 环境将使用 fallback\n *\n * 注意: selector 和 dynamicFilter 不能同时使用,dynamicFilter 优先级更高\n *\n * @type {ChartDynamicFilter}\n */\n dynamicFilter?: ChartDynamicFilter\n\n /**\n * @description 点是否可见\n */\n pointVisible?: boolean\n /**\n * 点大小\n * @description 点大小\n */\n pointSize?: number\n /**\n * 点图元颜色\n * @description 点图元颜色\n */\n pointColor?: string\n /**\n * 点图元颜色透明度\n * @description 点图元颜色透明度\n */\n pointColorOpacity?: number\n /**\n * 点图元边框颜色\n * @description 点图元边框颜色\n */\n pointBorderColor?: string\n /**\n * 点图元边框宽度\n * @description 点图元边框宽度\n */\n pointBorderWidth?: number\n /**\n * 点图元边框样式\n * @description 点图元边框样式\n * @example solid\n * @example dashed\n * @example dotted\n */\n pointBorderStyle?: 'solid' | 'dashed' | 'dotted'\n}\n\nexport const zPointStyle = z.object({\n selector: z.union([zSelector, zSelectors]).nullish(),\n dynamicFilter: zChartDynamicFilter.optional(),\n pointVisible: z.boolean().nullish(),\n pointSize: z.number().nullish(),\n pointColor: z.string().nullish(),\n pointColorOpacity: z.number().nullish(),\n pointBorderColor: z.string().nullish(),\n pointBorderWidth: z.number().nullish(),\n pointBorderStyle: z.union([z.enum(['solid', 'dashed', 'dotted'])]).nullish(),\n})\n"],"names":["zPointStyle","z","zSelector","zSelectors","zChartDynamicFilter"],"mappings":";;AAsGO,MAAMA,cAAcC,EAAE,MAAM,CAAC;IAClC,UAAUA,EAAE,KAAK,CAAC;QAACC;QAAWC;KAAW,EAAE,OAAO;IAClD,eAAeC,oBAAoB,QAAQ;IAC3C,cAAcH,EAAE,OAAO,GAAG,OAAO;IACjC,WAAWA,EAAE,MAAM,GAAG,OAAO;IAC7B,YAAYA,EAAE,MAAM,GAAG,OAAO;IAC9B,mBAAmBA,EAAE,MAAM,GAAG,OAAO;IACrC,kBAAkBA,EAAE,MAAM,GAAG,OAAO;IACpC,kBAAkBA,EAAE,MAAM,GAAG,OAAO;IACpC,kBAAkBA,EAAE,KAAK,CAAC;QAACA,CAAC,CAADA,OAAM,CAAC;YAAC;YAAS;YAAU;SAAS;KAAE,EAAE,OAAO;AAC5E"}
@@ -34,7 +34,7 @@ export declare const zAreaStyle: z.ZodObject<{
34
34
  "not in": "not in";
35
35
  }>>>;
36
36
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
37
- }, z.core.$strip>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
37
+ }, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
38
38
  field: z.ZodString;
39
39
  operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
40
40
  "=": "=";
@@ -68,7 +68,85 @@ export declare const zAreaStyle: z.ZodObject<{
68
68
  "not in": "not in";
69
69
  }>>>;
70
70
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
71
- }, z.core.$strip>]>>]>>>;
71
+ }, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>>]>>>;
72
+ dynamicFilter: z.ZodOptional<z.ZodObject<{
73
+ type: z.ZodLiteral<"row-with-field">;
74
+ description: z.ZodOptional<z.ZodString>;
75
+ code: z.ZodString;
76
+ fallback: z.ZodOptional<z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
77
+ field: z.ZodString;
78
+ operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
79
+ "=": "=";
80
+ "==": "==";
81
+ "!=": "!=";
82
+ ">": ">";
83
+ "<": "<";
84
+ ">=": ">=";
85
+ "<=": "<=";
86
+ between: "between";
87
+ }>>>;
88
+ op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
89
+ "=": "=";
90
+ "==": "==";
91
+ "!=": "!=";
92
+ ">": ">";
93
+ "<": "<";
94
+ ">=": ">=";
95
+ "<=": "<=";
96
+ between: "between";
97
+ }>>>;
98
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
99
+ }, z.core.$strip>, z.ZodObject<{
100
+ field: z.ZodString;
101
+ operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
102
+ in: "in";
103
+ "not in": "not in";
104
+ }>>>;
105
+ op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
106
+ in: "in";
107
+ "not in": "not in";
108
+ }>>>;
109
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
110
+ }, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodObject<{
111
+ field: z.ZodString;
112
+ operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
113
+ "=": "=";
114
+ "==": "==";
115
+ "!=": "!=";
116
+ ">": ">";
117
+ "<": "<";
118
+ ">=": ">=";
119
+ "<=": "<=";
120
+ between: "between";
121
+ }>>>;
122
+ op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
123
+ "=": "=";
124
+ "==": "==";
125
+ "!=": "!=";
126
+ ">": ">";
127
+ "<": "<";
128
+ ">=": ">=";
129
+ "<=": "<=";
130
+ between: "between";
131
+ }>>>;
132
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
133
+ }, z.core.$strip>, z.ZodObject<{
134
+ field: z.ZodString;
135
+ operator: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
136
+ in: "in";
137
+ "not in": "not in";
138
+ }>>>;
139
+ op: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
140
+ in: "in";
141
+ "not in": "not in";
142
+ }>>>;
143
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>]>;
144
+ }, z.core.$strip>, z.ZodRecord<z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodAny>]>>]>>;
145
+ result: z.ZodOptional<z.ZodObject<{
146
+ success: z.ZodBoolean;
147
+ data: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>>;
148
+ }, z.core.$strip>>;
149
+ }, z.core.$strip>>;
72
150
  areaVisible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
73
151
  areaColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
74
152
  areaColorOpacity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -1,10 +1,11 @@
1
1
  import { z } from "zod";
2
- import { zSelector, zSelectors } from "../../dataSelector/index.js";
2
+ import { zChartDynamicFilter, zSelector, zSelectors } from "../../dataSelector/index.js";
3
3
  const zAreaStyle = z.object({
4
4
  selector: z.union([
5
5
  zSelector,
6
6
  zSelectors
7
7
  ]).nullish(),
8
+ dynamicFilter: zChartDynamicFilter.optional(),
8
9
  areaVisible: z.boolean().nullish(),
9
10
  areaColor: z.string().nullish(),
10
11
  areaColorOpacity: z.number().nullish()
@@ -1 +1 @@
1
- {"version":3,"file":"types/properties/markStyle/zAreaStyle.js","sources":["webpack://@visactor/vseed/./src/types/properties/markStyle/zAreaStyle.ts"],"sourcesContent":["import { z } from 'zod'\nimport { zSelector, zSelectors } from '../../dataSelector'\n\nexport const zAreaStyle = z.object({\n selector: z.union([zSelector, zSelectors]).nullish(),\n areaVisible: z.boolean().nullish(),\n areaColor: z.string().nullish(),\n areaColorOpacity: z.number().nullish(),\n})\n"],"names":["zAreaStyle","z","zSelector","zSelectors"],"mappings":";;AAGO,MAAMA,aAAaC,EAAE,MAAM,CAAC;IACjC,UAAUA,EAAE,KAAK,CAAC;QAACC;QAAWC;KAAW,EAAE,OAAO;IAClD,aAAaF,EAAE,OAAO,GAAG,OAAO;IAChC,WAAWA,EAAE,MAAM,GAAG,OAAO;IAC7B,kBAAkBA,EAAE,MAAM,GAAG,OAAO;AACtC"}
1
+ {"version":3,"file":"types/properties/markStyle/zAreaStyle.js","sources":["webpack://@visactor/vseed/./src/types/properties/markStyle/zAreaStyle.ts"],"sourcesContent":["import { z } from 'zod'\nimport { zChartDynamicFilter, zSelector, zSelectors } from '../../dataSelector'\n\nexport const zAreaStyle = z.object({\n selector: z.union([zSelector, zSelectors]).nullish(),\n dynamicFilter: zChartDynamicFilter.optional(),\n areaVisible: z.boolean().nullish(),\n areaColor: z.string().nullish(),\n areaColorOpacity: z.number().nullish(),\n})\n"],"names":["zAreaStyle","z","zSelector","zSelectors","zChartDynamicFilter"],"mappings":";;AAGO,MAAMA,aAAaC,EAAE,MAAM,CAAC;IACjC,UAAUA,EAAE,KAAK,CAAC;QAACC;QAAWC;KAAW,EAAE,OAAO;IAClD,eAAeC,oBAAoB,QAAQ;IAC3C,aAAaH,EAAE,OAAO,GAAG,OAAO;IAChC,WAAWA,EAAE,MAAM,GAAG,OAAO;IAC7B,kBAAkBA,EAAE,MAAM,GAAG,OAAO;AACtC"}