@vela-studio/ui 1.0.1

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 (68) hide show
  1. package/README.md +152 -0
  2. package/dist/index.d.ts +696 -0
  3. package/dist/index.js +10 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/index.mjs +11786 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/dist/index.umd.js +10 -0
  8. package/dist/index.umd.js.map +1 -0
  9. package/dist/style.css +1 -0
  10. package/index.ts +150 -0
  11. package/package.json +73 -0
  12. package/src/components/advanced/scripting/Scripting.vue +189 -0
  13. package/src/components/advanced/state/State.vue +231 -0
  14. package/src/components/advanced/trigger/Trigger.vue +256 -0
  15. package/src/components/basic/button/Button.vue +120 -0
  16. package/src/components/basic/container/Container.vue +22 -0
  17. package/src/components/chart/barChart/barChart.vue +176 -0
  18. package/src/components/chart/doughnutChart/doughnutChart.vue +128 -0
  19. package/src/components/chart/funnelChart/funnelChart.vue +128 -0
  20. package/src/components/chart/gaugeChart/gaugeChart.vue +144 -0
  21. package/src/components/chart/lineChart/lineChart.vue +188 -0
  22. package/src/components/chart/pieChart/pieChart.vue +114 -0
  23. package/src/components/chart/radarChart/radarChart.vue +115 -0
  24. package/src/components/chart/sankeyChart/sankeyChart.vue +144 -0
  25. package/src/components/chart/scatterChart/scatterChart.vue +162 -0
  26. package/src/components/chart/stackedBarChart/stackedBarChart.vue +184 -0
  27. package/src/components/content/html/Html.vue +104 -0
  28. package/src/components/content/iframe/Iframe.vue +111 -0
  29. package/src/components/content/markdown/Markdown.vue +174 -0
  30. package/src/components/controls/breadcrumb/Breadcrumb.vue +79 -0
  31. package/src/components/controls/buttonGroup/ButtonGroup.vue +93 -0
  32. package/src/components/controls/checkboxGroup/CheckboxGroup.vue +147 -0
  33. package/src/components/controls/dateRange/DateRange.vue +174 -0
  34. package/src/components/controls/multiSelect/MultiSelect.vue +155 -0
  35. package/src/components/controls/navButton/NavButton.vue +97 -0
  36. package/src/components/controls/pagination/Pagination.vue +94 -0
  37. package/src/components/controls/searchBox/SearchBox.vue +170 -0
  38. package/src/components/controls/select/Select.vue +134 -0
  39. package/src/components/controls/slider/Slider.vue +167 -0
  40. package/src/components/controls/switch/Switch.vue +107 -0
  41. package/src/components/data/cardGrid/CardGrid.vue +318 -0
  42. package/src/components/data/list/List.vue +282 -0
  43. package/src/components/data/pivot/Pivot.vue +270 -0
  44. package/src/components/data/table/Table.vue +150 -0
  45. package/src/components/data/timeline/Timeline.vue +315 -0
  46. package/src/components/group/Group.vue +75 -0
  47. package/src/components/kpi/box/Box.vue +98 -0
  48. package/src/components/kpi/countUp/CountUp.vue +193 -0
  49. package/src/components/kpi/progress/Progress.vue +159 -0
  50. package/src/components/kpi/stat/Stat.vue +205 -0
  51. package/src/components/kpi/text/Text.vue +74 -0
  52. package/src/components/layout/badge/Badge.vue +105 -0
  53. package/src/components/layout/col/Col.vue +114 -0
  54. package/src/components/layout/flex/Flex.vue +105 -0
  55. package/src/components/layout/grid/Grid.vue +89 -0
  56. package/src/components/layout/modal/Modal.vue +118 -0
  57. package/src/components/layout/panel/Panel.vue +162 -0
  58. package/src/components/layout/row/Row.vue +99 -0
  59. package/src/components/layout/tabs/Tabs.vue +117 -0
  60. package/src/components/media/image/Image.vue +132 -0
  61. package/src/components/media/video/Video.vue +115 -0
  62. package/src/components/v2/basic/BaseButton.vue +179 -0
  63. package/src/components/v2/kpi/KpiCard.vue +215 -0
  64. package/src/components/v2/layout/GridBox.vue +55 -0
  65. package/src/hooks/useDataSource.ts +123 -0
  66. package/src/types/gis.ts +251 -0
  67. package/src/utils/chartUtils.ts +349 -0
  68. package/src/utils/dataUtils.ts +403 -0
@@ -0,0 +1,696 @@
1
+ import { App } from 'vue';
2
+ import { Component } from 'vue';
3
+ import { ComponentOptionsMixin } from 'vue';
4
+ import { ComponentProvideOptions } from 'vue';
5
+ import { DefineComponent } from 'vue';
6
+ import { PublicProps } from 'vue';
7
+ import { Ref } from 'vue';
8
+
9
+ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
10
+ click: (event: MouseEvent) => any;
11
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
12
+ onClick?: ((event: MouseEvent) => any) | undefined;
13
+ }>, {
14
+ text: string;
15
+ type: "primary" | "success" | "warning" | "danger" | "info" | "default";
16
+ size: "large" | "default" | "small";
17
+ styleConfig: ButtonStyleConfig;
18
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
19
+
20
+ declare const __VLS_component_2: DefineComponent<__VLS_Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_3> & Readonly<{}>, {
21
+ height: string | number;
22
+ layout: GridLayoutConfig;
23
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
24
+
25
+ declare type __VLS_Props = {
26
+ text?: string;
27
+ type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'default';
28
+ size?: 'large' | 'default' | 'small';
29
+ plain?: boolean;
30
+ round?: boolean;
31
+ circle?: boolean;
32
+ disabled?: boolean;
33
+ loading?: boolean;
34
+ icon?: string;
35
+ styleConfig?: ButtonStyleConfig;
36
+ };
37
+
38
+ declare type __VLS_Props_2 = {
39
+ header?: StatHeader;
40
+ content?: StatContent;
41
+ footer?: StatFooter;
42
+ styleConfig?: StatStyle;
43
+ };
44
+
45
+ declare type __VLS_Props_3 = {
46
+ layout?: GridLayoutConfig;
47
+ height?: string | number;
48
+ };
49
+
50
+ declare function __VLS_template(): {
51
+ attrs: Partial<{}>;
52
+ slots: {
53
+ default?(_: {}): any;
54
+ };
55
+ refs: {};
56
+ rootEl: HTMLButtonElement;
57
+ };
58
+
59
+ declare function __VLS_template_2(): {
60
+ attrs: Partial<{}>;
61
+ slots: {
62
+ default?(_: {}): any;
63
+ };
64
+ refs: {};
65
+ rootEl: HTMLDivElement;
66
+ };
67
+
68
+ declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
69
+
70
+ declare type __VLS_TemplateResult_2 = ReturnType<typeof __VLS_template_2>;
71
+
72
+ declare type __VLS_WithTemplateSlots<T, S> = T & {
73
+ new (): {
74
+ $slots: S;
75
+ };
76
+ };
77
+
78
+ declare type __VLS_WithTemplateSlots_2<T, S> = T & {
79
+ new (): {
80
+ $slots: S;
81
+ };
82
+ };
83
+
84
+ export declare const barChart: Component;
85
+
86
+ /**
87
+ * Button V2 (UI Layer)
88
+ * 纯粹的展示组件,严格遵循 Core Schema 定义
89
+ */
90
+ declare interface ButtonStyleConfig {
91
+ backgroundColor?: string;
92
+ textColor?: string;
93
+ fontSize?: number;
94
+ fontWeight?: number | string;
95
+ borderRadius?: number;
96
+ borderColor?: string;
97
+ }
98
+
99
+ /** 聚合簇点击事件数据 */
100
+ export declare interface ClusterClickEvent {
101
+ /** 聚合簇中心点 */
102
+ center: GISPoint;
103
+ /** 聚合簇包含的标记数量 */
104
+ count: number;
105
+ /** 聚合簇边界 */
106
+ bounds: MapBounds;
107
+ /** 聚合簇内的所有标记 */
108
+ markers: MarkerPoint[];
109
+ }
110
+
111
+ /** 聚合图标配置 */
112
+ export declare interface ClusterIconConfig {
113
+ /** 默认图标 URL */
114
+ iconUrl?: string;
115
+ /** 图标大小 */
116
+ iconSize?: [number, number];
117
+ /** 图标锚点 */
118
+ iconAnchor?: [number, number];
119
+ /** 弹窗锚点 */
120
+ popupAnchor?: [number, number];
121
+ }
122
+
123
+ /** 聚合图层配置 */
124
+ export declare interface ClusterLayerConfig {
125
+ /** 最大聚合半径 */
126
+ maxClusterRadius?: number;
127
+ /** 禁用聚合的缩放级别 */
128
+ disableClusteringAtZoom?: number;
129
+ /** 最大缩放时展开为蜘蛛网形式 */
130
+ spiderfyOnMaxZoom?: boolean;
131
+ /** 鼠标悬停时显示聚合范围 */
132
+ showCoverageOnHover?: boolean;
133
+ /** 点击聚合簇时缩放到边界 */
134
+ zoomToBoundsOnClick?: boolean;
135
+ /** 是否启用分块加载 */
136
+ chunkedLoading?: boolean;
137
+ /** 图标配置 */
138
+ iconConfig?: ClusterIconConfig;
139
+ /** 聚合簇样式 */
140
+ clusterStyle?: ClusterStyleConfig;
141
+ }
142
+
143
+ /** 聚合簇样式配置 */
144
+ export declare interface ClusterStyleConfig {
145
+ /** 小聚合簇阈值 */
146
+ smallThreshold?: number;
147
+ /** 中聚合簇阈值 */
148
+ mediumThreshold?: number;
149
+ /** 小聚合簇样式 */
150
+ smallStyle?: {
151
+ backgroundColor?: string;
152
+ color?: string;
153
+ size?: number;
154
+ };
155
+ /** 中聚合簇样式 */
156
+ mediumStyle?: {
157
+ backgroundColor?: string;
158
+ color?: string;
159
+ size?: number;
160
+ };
161
+ /** 大聚合簇样式 */
162
+ largeStyle?: {
163
+ backgroundColor?: string;
164
+ color?: string;
165
+ size?: number;
166
+ };
167
+ }
168
+
169
+ export declare const componentRegistry: Record<string, Component>;
170
+
171
+ /** 数据加载状态 */
172
+ export declare type DataLoadingState = 'idle' | 'loading' | 'success' | 'error';
173
+
174
+ export declare interface DataSource {
175
+ enabled?: boolean;
176
+ url?: string;
177
+ method?: string;
178
+ headers?: Record<string, string>;
179
+ body?: string;
180
+ interval?: number;
181
+ }
182
+
183
+ /** 带状态的数据包装器 */
184
+ export declare interface DataWithState<T> {
185
+ data: T;
186
+ state: DataLoadingState;
187
+ error?: string;
188
+ /** 数据版本号,用于增量更新检测 */
189
+ version?: number;
190
+ }
191
+
192
+ declare const _default: {
193
+ install(app: App): void;
194
+ };
195
+ export default _default;
196
+
197
+ export declare const doughnutChart: Component;
198
+
199
+ /**
200
+ * 从数据源提取二维数组(用于散点图等)
201
+ * @param remoteData - 远程数据对象
202
+ * @param dataPath - 数据路径
203
+ */
204
+ export declare function extract2DArray(remoteData: unknown, dataPath: string | undefined): Array<[number, number]> | undefined;
205
+
206
+ /**
207
+ * KPI 组件专用:提取多个字段的数据
208
+ * 用于 stat 组件等需要同时提取多个字段的场景
209
+ *
210
+ * @param remoteData - 远程数据对象
211
+ * @param paths - 字段路径映射 { title: 'data.title', value: 'data.value', ... }
212
+ * @returns 提取的数据对象
213
+ *
214
+ * @example
215
+ * const data = extractMultipleFields(remoteData, {
216
+ * title: 'data.kpi.title',
217
+ * value: 'data.kpi.value',
218
+ * change: 'data.kpi.change'
219
+ * })
220
+ * // 返回: { title: '销售额', value: 12345, change: 5.2 }
221
+ */
222
+ export declare function extractMultipleFields<T extends Record<string, string | undefined>>(remoteData: unknown, paths: T): Record<keyof T, unknown>;
223
+
224
+ /**
225
+ * 从数据源提取单个数值
226
+ * 用于 KPI 组件(countUp, progress, badge 等)
227
+ *
228
+ * @param remoteData - 远程数据对象
229
+ * @param valuePath - 数值路径,可选
230
+ * @param defaultValue - 默认值
231
+ * @returns 提取的数值
232
+ */
233
+ export declare function extractNumber(remoteData: unknown, valuePath: string | undefined, defaultValue?: number): number;
234
+
235
+ /**
236
+ * 从数据源提取数字数组
237
+ * @param remoteData - 远程数据对象
238
+ * @param dataPath - 数据路径
239
+ */
240
+ export declare function extractNumberArray(remoteData: unknown, dataPath: string | undefined): number[] | undefined;
241
+
242
+ /**
243
+ * 提取并规范化 Sankey 图连接数据
244
+ * @param remoteData - 远程数据对象
245
+ * @param dataPath - 数据路径
246
+ */
247
+ export declare function extractSankeyLinks(remoteData: unknown, dataPath: string | undefined): Array<{
248
+ source: string;
249
+ target: string;
250
+ value: number;
251
+ }> | undefined;
252
+
253
+ /**
254
+ * 提取并规范化 Sankey 图节点数据
255
+ * @param remoteData - 远程数据对象
256
+ * @param dataPath - 数据路径
257
+ */
258
+ export declare function extractSankeyNodes(remoteData: unknown, dataPath: string | undefined): Array<{
259
+ name: string;
260
+ value?: number;
261
+ depth?: number;
262
+ itemStyle?: unknown;
263
+ }> | undefined;
264
+
265
+ /**
266
+ * 从数据源提取字符串值
267
+ * @param remoteData - 远程数据对象
268
+ * @param dataPath - 数据路径
269
+ */
270
+ export declare function extractString(remoteData: unknown, dataPath: string | undefined): string | undefined;
271
+
272
+ /**
273
+ * 从数据源提取字符串数组
274
+ * @param remoteData - 远程数据对象
275
+ * @param dataPath - 数据路径
276
+ */
277
+ export declare function extractStringArray(remoteData: unknown, dataPath: string | undefined): string[] | undefined;
278
+
279
+ /**
280
+ * 智能提取数据:优先使用路径提取,否则使用默认值
281
+ * 用于所有简单组件(text, countUp, progress, badge 等)
282
+ *
283
+ * @param remoteData - 远程数据对象
284
+ * @param path - 数据路径
285
+ * @param fallbackValue - 回退值(当路径未配置或提取失败时使用)
286
+ * @returns 提取的数据或回退值
287
+ */
288
+ export declare function extractWithFallback<T>(remoteData: unknown, path: string | undefined, fallbackValue: T): T;
289
+
290
+ export declare const funnelChart: Component;
291
+
292
+ export declare const gaugeChart: Component;
293
+
294
+ /** GeoJSON 数据类型联合 */
295
+ export declare type GeoJSONData<P = Record<string, unknown>> = GeoJSONFeature<P> | GeoJSONFeatureCollection<P>;
296
+
297
+ /** GeoJSON Feature */
298
+ export declare interface GeoJSONFeature<P = Record<string, unknown>> {
299
+ type: 'Feature';
300
+ geometry: GeoJSONGeometry;
301
+ properties: P;
302
+ id?: string | number;
303
+ }
304
+
305
+ /** GeoJSON FeatureCollection */
306
+ export declare interface GeoJSONFeatureCollection<P = Record<string, unknown>> {
307
+ type: 'FeatureCollection';
308
+ features: GeoJSONFeature<P>[];
309
+ }
310
+
311
+ /** GeoJSON 几何对象 */
312
+ export declare interface GeoJSONGeometry {
313
+ type: GeoJSONGeometryType;
314
+ coordinates: number[] | number[][] | number[][][] | number[][][][];
315
+ }
316
+
317
+ /** GeoJSON 几何类型 */
318
+ export declare type GeoJSONGeometryType = 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineString' | 'Polygon' | 'MultiPolygon' | 'GeometryCollection';
319
+
320
+ /**
321
+ * 数据提取工具函数(通用)
322
+ * 用于所有组件的数据源、路径解析、数据格式化等
323
+ * 图表、KPI、Text 等组件都使用这些工具函数提取数据
324
+ */
325
+ /**
326
+ * 从对象中根据路径提取值
327
+ * 支持点号路径和数组索引,如: "data.chart.values" 或 "items[0].name"
328
+ *
329
+ * @param obj - 源数据对象
330
+ * @param path - 提取路径,可选(为空则返回 undefined)
331
+ * @returns 提取的值,或 undefined
332
+ */
333
+ export declare function getValueByPath(obj: unknown, path: string | undefined): unknown;
334
+
335
+ /**
336
+ * GIS 通用类型定义
337
+ * Smart 和 Dumb 组件之间的数据契约
338
+ */
339
+ /** 基础坐标点 */
340
+ export declare interface GISPoint {
341
+ lat: number;
342
+ lng: number;
343
+ }
344
+
345
+ declare interface GridLayoutConfig {
346
+ columns?: number;
347
+ gap?: number;
348
+ rowGap?: number;
349
+ autoRows?: string;
350
+ alignItems?: 'start' | 'end' | 'center' | 'stretch';
351
+ justifyItems?: 'start' | 'end' | 'center' | 'stretch';
352
+ }
353
+
354
+ export declare interface GroupProps {
355
+ /** 容器透明度 0-1 */
356
+ opacity?: number;
357
+ /** 是否可见 */
358
+ visible?: boolean;
359
+ /** 旋转角度 */
360
+ rotation?: number;
361
+ /** 边框圆角 */
362
+ borderRadius?: number;
363
+ /** 背景色 */
364
+ backgroundColor?: string;
365
+ /** 边框样式 */
366
+ border?: string;
367
+ /** 是否显示占位符 */
368
+ showPlaceholder?: boolean;
369
+ /** 占位符文本 */
370
+ placeholder?: string;
371
+ }
372
+
373
+ /** 将普通数组转换为 HeatPoint 数组的映射配置 */
374
+ export declare interface HeatDataMapping {
375
+ latField: string;
376
+ lngField: string;
377
+ intensityField?: string;
378
+ }
379
+
380
+ /** 热力图渐变色配置 */
381
+ export declare interface HeatGradient {
382
+ [stop: number]: string;
383
+ }
384
+
385
+ /** 热力图配置 */
386
+ export declare interface HeatLayerConfig {
387
+ /** 热力点半径(像素) */
388
+ radius?: number;
389
+ /** 模糊程度(像素) */
390
+ blur?: number;
391
+ /** 最大缩放级别 */
392
+ maxZoom?: number;
393
+ /** 最大强度值 */
394
+ max?: number;
395
+ /** 最小透明度 */
396
+ minOpacity?: number;
397
+ /** 渐变色配置 */
398
+ gradient?: HeatGradient;
399
+ }
400
+
401
+ /** 带强度的热力点 */
402
+ export declare interface HeatPoint extends GISPoint {
403
+ /** 热力强度 0-1 */
404
+ intensity?: number;
405
+ }
406
+
407
+ /** 图层可见性配置 */
408
+ export declare interface LayerVisibility {
409
+ id: string;
410
+ name: string;
411
+ visible: boolean;
412
+ type: 'tile' | 'heat' | 'cluster' | 'geojson' | 'vector';
413
+ }
414
+
415
+ export declare const lineChart: Component;
416
+
417
+ /** 边界框 */
418
+ export declare interface MapBounds {
419
+ northEast: GISPoint;
420
+ southWest: GISPoint;
421
+ }
422
+
423
+ /** 地图点击事件数据 */
424
+ export declare interface MapClickEvent {
425
+ latlng: GISPoint;
426
+ layerPoint: {
427
+ x: number;
428
+ y: number;
429
+ };
430
+ containerPoint: {
431
+ x: number;
432
+ y: number;
433
+ };
434
+ }
435
+
436
+ /** 地图视口配置 */
437
+ export declare interface MapViewport {
438
+ center: GISPoint;
439
+ zoom: number;
440
+ bounds?: MapBounds;
441
+ }
442
+
443
+ /** 标记点击事件数据 */
444
+ export declare interface MarkerClickEvent {
445
+ marker: MarkerPoint;
446
+ index: number;
447
+ originalEvent?: MouseEvent;
448
+ }
449
+
450
+ /** 将普通数组转换为 MarkerPoint 数组的映射配置 */
451
+ export declare interface MarkerDataMapping {
452
+ idField?: string;
453
+ latField: string;
454
+ lngField: string;
455
+ labelField?: string;
456
+ popupField?: string;
457
+ iconField?: string;
458
+ dataFields?: string[];
459
+ }
460
+
461
+ /** 聚合/标记点数据 */
462
+ export declare interface MarkerPoint extends GISPoint {
463
+ /** 唯一标识 */
464
+ id?: string | number;
465
+ /** 标签文本 */
466
+ label?: string;
467
+ /** 弹窗内容 */
468
+ popup?: string;
469
+ /** 图标 URL */
470
+ icon?: string;
471
+ /** 图标大小 [width, height] */
472
+ iconSize?: [number, number];
473
+ /** 图标锚点 [x, y] */
474
+ iconAnchor?: [number, number];
475
+ /** 自定义数据 */
476
+ data?: Record<string, unknown>;
477
+ }
478
+
479
+ /**
480
+ * 解析二维数组输入(用于散点图等)
481
+ * @param input - 输入字符串,如 "[[10, 8], [8, 7]]"
482
+ * @param defaultValue - 默认值数组
483
+ */
484
+ export declare function parse2DArrayInput(input: string | undefined, defaultValue?: Array<[number, number]>): Array<[number, number]>;
485
+
486
+ /**
487
+ * 解析 JSON 数组输入(通用)
488
+ * @param input - JSON 字符串输入
489
+ * @param defaultValue - 默认值
490
+ */
491
+ export declare function parseJSONInput<T = unknown>(input: string | undefined, defaultValue: T): T;
492
+
493
+ /**
494
+ * 解析逗号分隔的数字输入
495
+ * 支持 JSON 数组格式和逗号分隔格式
496
+ * @param input - 输入字符串,如 "150, 230, 224" 或 "[150, 230, 224]"
497
+ * @param defaultValue - 默认值数组
498
+ */
499
+ export declare function parseNumberInput(input: string | undefined, defaultValue?: number[]): number[];
500
+
501
+ /**
502
+ * 解析逗号分隔的字符串输入
503
+ * 支持 JSON 数组格式和逗号分隔格式
504
+ * @param input - 输入字符串,如 "Mon, Tue, Wed" 或 '["Mon", "Tue", "Wed"]'
505
+ * @param defaultValue - 默认值数组
506
+ */
507
+ export declare function parseStringInput(input: string | undefined, defaultValue?: string[]): string[];
508
+
509
+ export declare const pieChart: Component;
510
+
511
+ export declare const radarChart: Component;
512
+
513
+ export declare const sankeyChart: Component;
514
+
515
+ export declare const scatterChart: Component;
516
+
517
+ /**
518
+ * 设置对象路径上的值
519
+ * 支持点号路径和数组索引,如: "data.chart.values" 或 "items[0].name"
520
+ * 用于数据联动(DataBinding)等需要动态写入路径的场景
521
+ *
522
+ * @param obj - 目标对象
523
+ * @param path - 设置路径
524
+ * @param value - 要设置的值
525
+ * @returns 是否设置成功
526
+ */
527
+ export declare function setValueByPath(obj: unknown, path: string, value: unknown): boolean;
528
+
529
+ export declare const stackedBarChart: Component;
530
+
531
+ declare interface StatContent {
532
+ value?: number | string;
533
+ prefix?: string;
534
+ suffix?: string;
535
+ precision?: number;
536
+ separator?: boolean;
537
+ }
538
+
539
+ declare interface StatFooter {
540
+ trend?: StatTrend;
541
+ }
542
+
543
+ declare interface StatHeader {
544
+ title?: string;
545
+ tooltip?: string;
546
+ }
547
+
548
+ declare interface StatStyle {
549
+ background?: {
550
+ color?: string;
551
+ image?: string;
552
+ };
553
+ border?: {
554
+ width?: number;
555
+ color?: string;
556
+ radius?: number;
557
+ };
558
+ padding?: number;
559
+ shadow?: string;
560
+ titleColor?: string;
561
+ titleSize?: number;
562
+ valueColor?: string;
563
+ valueSize?: number;
564
+ valueWeight?: number | string;
565
+ }
566
+
567
+ declare interface StatTrend {
568
+ value?: string;
569
+ label?: string;
570
+ type?: 'up' | 'down' | 'normal';
571
+ }
572
+
573
+ /** 瓦片图层配置 */
574
+ export declare interface TileLayerConfig {
575
+ url: string;
576
+ attribution?: string;
577
+ minZoom?: number;
578
+ maxZoom?: number;
579
+ subdomains?: string[];
580
+ opacity?: number;
581
+ }
582
+
583
+ export declare interface TriggerLog {
584
+ time: string;
585
+ message: string;
586
+ type: 'info' | 'success' | 'warning' | 'error';
587
+ }
588
+
589
+ /**
590
+ * 数据源 Hook
591
+ * 支持 HTTP 请求和自动刷新
592
+ *
593
+ * 职责:仅负责网络请求,返回完整响应数据
594
+ * 数据提取:由各组件使用 dataUtils 工具函数自行提取所需字段
595
+ * 优势:组件可灵活提取多个字段,互不影响
596
+ */
597
+ export declare function useDataSource(dataSource: Ref<DataSource | undefined>): {
598
+ data: Ref<unknown, unknown>;
599
+ rawData: Ref<unknown, unknown>;
600
+ loading: Ref<boolean, boolean>;
601
+ error: Ref<string | null, string | null>;
602
+ fetchData: () => Promise<void>;
603
+ };
604
+
605
+ export declare const vBadge: Component;
606
+
607
+ export declare const vBaseButton: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
608
+
609
+ export declare const vBox: Component;
610
+
611
+ export declare const vBreadcrumb: Component;
612
+
613
+ export declare const vButton: Component;
614
+
615
+ export declare const vButtonGroup: Component;
616
+
617
+ export declare const vCardGrid: Component;
618
+
619
+ export declare const vCheckboxGroup: Component;
620
+
621
+ export declare const vCol: Component;
622
+
623
+ export declare const vContainer: Component;
624
+
625
+ export declare const vCountUp: Component;
626
+
627
+ export declare const vDateRange: Component;
628
+
629
+ export declare const vFlex: Component;
630
+
631
+ export declare const vGrid: Component;
632
+
633
+ export declare const vGridBox: __VLS_WithTemplateSlots_2<typeof __VLS_component_2, __VLS_TemplateResult_2["slots"]>;
634
+
635
+ export declare const vGroup: Component;
636
+
637
+ export declare const vHtml: Component;
638
+
639
+ export declare const vIframe: Component;
640
+
641
+ export declare const vImage: Component;
642
+
643
+ export declare const vKpiCard: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_2> & Readonly<{}>, {
644
+ styleConfig: StatStyle;
645
+ footer: StatFooter;
646
+ header: StatHeader;
647
+ content: StatContent;
648
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
649
+
650
+ export declare const vList: Component;
651
+
652
+ export declare const vMarkdown: Component;
653
+
654
+ export declare const vModal: Component;
655
+
656
+ export declare const vMultiSelect: Component;
657
+
658
+ export declare const vNavButton: Component;
659
+
660
+ export declare const vPagination: Component;
661
+
662
+ export declare const vPanel: Component;
663
+
664
+ export declare const vPivot: Component;
665
+
666
+ export declare const vProgress: Component;
667
+
668
+ export declare const vRow: Component;
669
+
670
+ export declare const vScripting: Component;
671
+
672
+ export declare const vSearchBox: Component;
673
+
674
+ export declare const vSelect: Component;
675
+
676
+ export declare const vSlider: Component;
677
+
678
+ export declare const vStat: Component;
679
+
680
+ export declare const vState: Component;
681
+
682
+ export declare const vSwitch: Component;
683
+
684
+ export declare const vTable: Component;
685
+
686
+ export declare const vTabs: Component;
687
+
688
+ export declare const vText: Component;
689
+
690
+ export declare const vTimeline: Component;
691
+
692
+ export declare const vTrigger: Component;
693
+
694
+ export declare const vVideo: Component;
695
+
696
+ export { }