velo-data-vue-render 0.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/LICENSE +21 -0
  2. package/README.md +375 -0
  3. package/dist/components/RendererItem.vue.d.ts +12 -0
  4. package/dist/components/VeloRenderer.vue.d.ts +39 -0
  5. package/dist/components/charts/CalendarChart.vue.d.ts +9 -0
  6. package/dist/components/charts/CityMapChart.vue.d.ts +9 -0
  7. package/dist/components/charts/DoubleBarChart.vue.d.ts +9 -0
  8. package/dist/components/charts/DoubleLineChart.vue.d.ts +9 -0
  9. package/dist/components/charts/FunnelChart.vue.d.ts +9 -0
  10. package/dist/components/charts/GaugeChart.vue.d.ts +9 -0
  11. package/dist/components/charts/HalfPieChart.vue.d.ts +9 -0
  12. package/dist/components/charts/HorizontalBarChart.vue.d.ts +9 -0
  13. package/dist/components/charts/MapChart.vue.d.ts +9 -0
  14. package/dist/components/charts/PieChart.vue.d.ts +9 -0
  15. package/dist/components/charts/RadarChart.vue.d.ts +9 -0
  16. package/dist/components/charts/SankeyChart.vue.d.ts +9 -0
  17. package/dist/components/charts/ScatterChart.vue.d.ts +9 -0
  18. package/dist/components/charts/SingleBarChart.vue.d.ts +9 -0
  19. package/dist/components/charts/SingleLineChart.vue.d.ts +9 -0
  20. package/dist/components/charts/TreeChart.vue.d.ts +9 -0
  21. package/dist/components/charts/WordCloudChart.vue.d.ts +9 -0
  22. package/dist/components/decorations/BorderBox1.vue.d.ts +21 -0
  23. package/dist/components/decorations/BorderBox2.vue.d.ts +21 -0
  24. package/dist/components/decorations/BorderBox3.vue.d.ts +21 -0
  25. package/dist/components/decorations/BorderBox4.vue.d.ts +21 -0
  26. package/dist/components/decorations/BorderBox5.vue.d.ts +21 -0
  27. package/dist/components/decorations/CustomImageBorder.vue.d.ts +21 -0
  28. package/dist/components/decorations/Decoration1.vue.d.ts +21 -0
  29. package/dist/components/decorations/Decoration2.vue.d.ts +6 -0
  30. package/dist/components/decorations/FlipCountdown.vue.d.ts +6 -0
  31. package/dist/components/decorations/FullscreenButton.vue.d.ts +6 -0
  32. package/dist/components/decorations/FuturisticTitle.vue.d.ts +6 -0
  33. package/dist/components/decorations/GradientText.vue.d.ts +21 -0
  34. package/dist/components/layouts/LayoutCell.vue.d.ts +8 -0
  35. package/dist/components/layouts/LayoutHeader.vue.d.ts +8 -0
  36. package/dist/components/layouts/LayoutSidebar.vue.d.ts +8 -0
  37. package/dist/components/layouts/LayoutThreeColumn.vue.d.ts +8 -0
  38. package/dist/components/layouts/LayoutTwoColumn.vue.d.ts +8 -0
  39. package/dist/components/ui/Avatar.vue.d.ts +6 -0
  40. package/dist/components/ui/Badge.vue.d.ts +6 -0
  41. package/dist/components/ui/Button.vue.d.ts +10 -0
  42. package/dist/components/ui/Card.vue.d.ts +21 -0
  43. package/dist/components/ui/Carousel.vue.d.ts +6 -0
  44. package/dist/components/ui/CarouselList.vue.d.ts +6 -0
  45. package/dist/components/ui/Container.vue.d.ts +21 -0
  46. package/dist/components/ui/Icon.vue.d.ts +6 -0
  47. package/dist/components/ui/Image.vue.d.ts +6 -0
  48. package/dist/components/ui/Input.vue.d.ts +12 -0
  49. package/dist/components/ui/Progress.vue.d.ts +6 -0
  50. package/dist/components/ui/ScrollRankList.vue.d.ts +6 -0
  51. package/dist/components/ui/Select.vue.d.ts +10 -0
  52. package/dist/components/ui/Switch.vue.d.ts +10 -0
  53. package/dist/components/ui/Table.vue.d.ts +6 -0
  54. package/dist/components/ui/Tag.vue.d.ts +10 -0
  55. package/dist/components/ui/Text.vue.d.ts +6 -0
  56. package/dist/config/constants.d.ts +16 -0
  57. package/dist/index.d.ts +5 -0
  58. package/dist/types/index.d.ts +704 -0
  59. package/dist/utils/chartOptions.d.ts +21 -0
  60. package/dist/utils/chartOptionsHelper.d.ts +13 -0
  61. package/dist/utils/dataSource.d.ts +59 -0
  62. package/dist/utils/mapData.d.ts +54 -0
  63. package/dist/velo-data-vue-render.css +1 -0
  64. package/dist/velo-data-vue-render.es.js +105844 -0
  65. package/dist/velo-data-vue-render.es.js.map +1 -0
  66. package/dist/velo-data-vue-render.umd.js +407 -0
  67. package/dist/velo-data-vue-render.umd.js.map +1 -0
  68. package/package.json +74 -0
@@ -0,0 +1,704 @@
1
+ export type ComponentType = 'singleLineChart' | 'doubleLineChart' | 'singleBarChart' | 'doubleBarChart' | 'horizontalBarChart' | 'pieChart' | 'halfPieChart' | 'funnelChart' | 'wordCloudChart' | 'gaugeChart' | 'radarChart' | 'scatterChart' | 'mapChart' | 'cityMapChart' | 'calendarChart' | 'treeChart' | 'sankeyChart' | 'text' | 'button' | 'input' | 'select' | 'switch' | 'progress' | 'tag' | 'badge' | 'avatar' | 'card' | 'table' | 'scrollRankList' | 'carouselList' | 'borderBox1' | 'borderBox2' | 'borderBox3' | 'borderBox4' | 'borderBox5' | 'decoration1' | 'decoration2' | 'fullscreenButton' | 'gradientText' | 'futuristicTitle' | 'flipCountdown' | 'customImageBorder' | 'image' | 'carousel' | 'icon' | 'container' | 'layoutTwoColumn' | 'layoutThreeColumn' | 'layoutHeader' | 'layoutSidebar' | 'layoutCell' | 'threeEarth' | 'threeParticles' | 'threeCube' | 'threeDNA' | 'threeWave' | 'threeTorus' | 'threeGalaxy' | 'threeTunnel' | 'threeMatrix' | 'threePlasma' | 'gradientText' | 'flipCountdown' | 'futuristicTitle';
2
+ export type ComponentCategory = 'chart' | 'component' | 'widget' | 'image' | 'icon' | '3d' | 'recent' | 'favorite';
3
+ export interface ComponentStyle {
4
+ x: number;
5
+ y: number;
6
+ width: number;
7
+ height: number;
8
+ backgroundColor?: string;
9
+ color?: string;
10
+ fontSize?: number;
11
+ borderRadius?: number;
12
+ borderWidth?: number;
13
+ borderColor?: string;
14
+ opacity?: number;
15
+ zIndex?: number;
16
+ }
17
+ export interface ChartAxisConfig {
18
+ show?: boolean;
19
+ type?: 'value' | 'category' | 'time' | 'log';
20
+ name?: string;
21
+ nameLocation?: 'start' | 'middle' | 'end';
22
+ nameTextStyle?: {
23
+ color?: string;
24
+ fontSize?: number;
25
+ fontWeight?: string;
26
+ };
27
+ nameGap?: number;
28
+ position?: 'top' | 'bottom' | 'left' | 'right';
29
+ axisLine?: {
30
+ show?: boolean;
31
+ lineStyle?: {
32
+ color?: string;
33
+ width?: number;
34
+ type?: 'solid' | 'dashed' | 'dotted';
35
+ };
36
+ };
37
+ axisTick?: {
38
+ show?: boolean;
39
+ lineStyle?: {
40
+ color?: string;
41
+ width?: number;
42
+ };
43
+ };
44
+ axisLabel?: {
45
+ show?: boolean;
46
+ color?: string;
47
+ fontSize?: number;
48
+ fontWeight?: string;
49
+ rotate?: number;
50
+ margin?: number;
51
+ };
52
+ splitLine?: {
53
+ show?: boolean;
54
+ lineStyle?: {
55
+ color?: string;
56
+ width?: number;
57
+ type?: 'solid' | 'dashed' | 'dotted';
58
+ opacity?: number;
59
+ };
60
+ };
61
+ splitArea?: {
62
+ show?: boolean;
63
+ areaStyle?: {
64
+ color?: string[];
65
+ opacity?: number;
66
+ };
67
+ };
68
+ }
69
+ export interface ChartSymbolConfig {
70
+ show?: boolean;
71
+ type?: 'circle' | 'rect' | 'roundRect' | 'triangle' | 'diamond' | 'pin' | 'arrow' | 'none';
72
+ size?: number;
73
+ color?: string;
74
+ borderColor?: string;
75
+ borderWidth?: number;
76
+ opacity?: number;
77
+ }
78
+ export interface ChartLegendConfig {
79
+ show?: boolean;
80
+ orient?: 'horizontal' | 'vertical';
81
+ position?: 'top' | 'bottom' | 'left' | 'right';
82
+ align?: 'left' | 'center' | 'right';
83
+ left?: string;
84
+ top?: string;
85
+ textStyle?: {
86
+ color?: string;
87
+ fontSize?: number;
88
+ fontWeight?: string;
89
+ };
90
+ }
91
+ export interface DataSourceConfig {
92
+ type: 'mock' | 'api';
93
+ apiConfig?: {
94
+ url?: string;
95
+ method?: 'GET' | 'POST' | 'PUT' | 'DELETE';
96
+ headers?: Record<string, string>;
97
+ params?: Record<string, any>;
98
+ body?: Record<string, any>;
99
+ dataPath?: string;
100
+ refreshInterval?: number;
101
+ };
102
+ }
103
+ export interface ComponentProps {
104
+ content?: string;
105
+ subContent?: string;
106
+ fontSize?: number;
107
+ fontWeight?: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
108
+ color?: string;
109
+ textAlign?: 'left' | 'center' | 'right' | 'justify';
110
+ textDecoration?: 'none' | 'underline' | 'overline' | 'line-through';
111
+ textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize';
112
+ fontStyle?: 'normal' | 'italic' | 'oblique';
113
+ letterSpacing?: number;
114
+ lineHeight?: number;
115
+ textShadow?: boolean;
116
+ shadowColor?: string;
117
+ shadowBlur?: number;
118
+ shadowOffsetX?: number;
119
+ shadowOffsetY?: number;
120
+ opacity?: number;
121
+ backgroundColor?: string;
122
+ borderRadius?: number;
123
+ borderWidth?: number;
124
+ borderColor?: string;
125
+ padding?: number;
126
+ buttonType?: 'primary' | 'default' | 'dashed' | 'link';
127
+ disabled?: boolean;
128
+ loading?: boolean;
129
+ block?: boolean;
130
+ danger?: boolean;
131
+ placeholder?: string;
132
+ allowClear?: boolean;
133
+ showCount?: boolean;
134
+ maxLength?: number;
135
+ inputType?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
136
+ tagColor?: string;
137
+ closable?: boolean;
138
+ icon?: string;
139
+ src?: string;
140
+ alt?: string;
141
+ objectFit?: 'contain' | 'cover' | 'fill' | 'scale-down' | 'none';
142
+ preview?: boolean;
143
+ fallback?: string;
144
+ chartType?: 'line' | 'bar' | 'pie';
145
+ chartData?: unknown;
146
+ chartOption?: unknown;
147
+ xAxisConfig?: ChartAxisConfig;
148
+ yAxisConfig?: ChartAxisConfig;
149
+ symbolConfig?: ChartSymbolConfig;
150
+ iconType?: string;
151
+ iconSize?: number;
152
+ iconColor?: string;
153
+ iconRotate?: number;
154
+ iconSpin?: boolean;
155
+ borderStyle?: number;
156
+ glowColor?: string;
157
+ cornerSize?: number;
158
+ animationDuration?: number;
159
+ buttonSize?: number;
160
+ fullscreenIconSize?: number;
161
+ buttonColor?: string;
162
+ hoverColor?: string;
163
+ position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center' | 'left' | 'right';
164
+ customIcon?: string;
165
+ showText?: boolean;
166
+ customBorderImage?: string;
167
+ borderImageSlice?: number;
168
+ borderImageWidth?: number;
169
+ borderImageRepeat?: 'stretch' | 'repeat' | 'round' | 'space';
170
+ borderImageOutset?: number;
171
+ borderImageOpacity?: number;
172
+ borderImageMode?: 'border' | 'background' | 'frame';
173
+ titleColor?: string;
174
+ percent?: number;
175
+ progressType?: 'line' | 'circle' | 'dashboard';
176
+ status?: 'success' | 'exception' | 'normal' | 'active';
177
+ showInfo?: boolean;
178
+ progressStrokeColor?: string | Record<string, string>;
179
+ progressSize?: 'default' | 'small';
180
+ buttonText?: string;
181
+ btnSize?: 'small' | 'middle' | 'large';
182
+ ghost?: boolean;
183
+ value?: string;
184
+ readonly?: boolean;
185
+ inputSize?: 'small' | 'middle' | 'large';
186
+ selectSize?: 'small' | 'middle' | 'large';
187
+ mode?: 'multiple' | 'tags';
188
+ showSearch?: boolean;
189
+ options?: Array<{
190
+ label: string;
191
+ value: any;
192
+ }>;
193
+ switchSize?: 'default' | 'small';
194
+ checkedChildren?: string;
195
+ unCheckedChildren?: string;
196
+ badgeCount?: number;
197
+ showDot?: boolean;
198
+ badgeColor?: string;
199
+ showZero?: boolean;
200
+ avatarSize?: number | 'small' | 'default' | 'large';
201
+ avatarShape?: 'circle' | 'square';
202
+ cardTitle?: string;
203
+ cardBordered?: boolean;
204
+ cardHoverable?: boolean;
205
+ tableBordered?: boolean;
206
+ tableSize?: 'small' | 'middle' | 'large';
207
+ tablePagination?: boolean;
208
+ gradientStart?: string;
209
+ gradientEnd?: string;
210
+ subtitle?: string;
211
+ targetTime?: number | string;
212
+ leftWidth?: string;
213
+ rightWidth?: string;
214
+ headerHeight?: string;
215
+ sidebarWidth?: string;
216
+ gap?: number;
217
+ tableColumns?: Array<{
218
+ title: string;
219
+ dataIndex: string;
220
+ key: string;
221
+ }>;
222
+ tableData?: Array<Record<string, any>>;
223
+ chartTitle?: string;
224
+ dataSource?: DataSourceConfig;
225
+ xAxisData?: string[];
226
+ seriesData?: Array<{
227
+ name: string;
228
+ data: any[];
229
+ symbolConfig?: ChartSymbolConfig;
230
+ }>;
231
+ pieData?: Array<{
232
+ name: string;
233
+ value: number;
234
+ }>;
235
+ funnelData?: Array<{
236
+ name: string;
237
+ value: number;
238
+ }>;
239
+ wordCloudData?: Array<{
240
+ name: string;
241
+ value: number;
242
+ }>;
243
+ singleData?: number;
244
+ legend?: ChartLegendConfig;
245
+ selectOptions?: Array<{
246
+ label: string;
247
+ value: string;
248
+ }>;
249
+ checked?: boolean;
250
+ radarConfig?: {
251
+ shape?: 'polygon' | 'circle';
252
+ radius?: number;
253
+ indicator?: Array<{
254
+ name: string;
255
+ max: number;
256
+ }>;
257
+ axisLine?: {
258
+ show?: boolean;
259
+ lineStyle?: {
260
+ color?: string;
261
+ width?: number;
262
+ };
263
+ };
264
+ splitLine?: {
265
+ show?: boolean;
266
+ lineStyle?: {
267
+ color?: string;
268
+ width?: number;
269
+ };
270
+ };
271
+ splitArea?: {
272
+ show?: boolean;
273
+ areaStyle?: {
274
+ color?: string[];
275
+ };
276
+ };
277
+ axisName?: {
278
+ color?: string;
279
+ fontSize?: number;
280
+ fontWeight?: string;
281
+ };
282
+ };
283
+ radarSeriesConfig?: {
284
+ areaStyle?: {
285
+ show?: boolean;
286
+ opacity?: number;
287
+ };
288
+ lineStyle?: {
289
+ width?: number;
290
+ };
291
+ symbol?: string;
292
+ symbolSize?: number;
293
+ };
294
+ pieConfig?: {
295
+ radius?: [string, string];
296
+ center?: [string, string];
297
+ roseType?: false | 'radius' | 'area';
298
+ borderRadius?: number;
299
+ borderWidth?: number;
300
+ borderColor?: string;
301
+ label?: {
302
+ show?: boolean;
303
+ position?: 'outside' | 'inside' | 'center';
304
+ color?: string;
305
+ fontSize?: number;
306
+ formatter?: string;
307
+ };
308
+ labelLine?: {
309
+ show?: boolean;
310
+ length?: number;
311
+ length2?: number;
312
+ lineStyle?: {
313
+ color?: string;
314
+ width?: number;
315
+ };
316
+ };
317
+ itemStyle?: {
318
+ shadowBlur?: number;
319
+ shadowColor?: string;
320
+ };
321
+ };
322
+ mapRegion?: string;
323
+ mapData?: Array<{
324
+ name: string;
325
+ value: number;
326
+ }>;
327
+ provinceName?: string;
328
+ showCityData?: boolean;
329
+ mapType?: 'province' | 'city';
330
+ selectedProvince?: string;
331
+ showBuiltinData?: boolean;
332
+ colorScheme?: 'blue' | 'green' | 'red' | 'purple' | 'orange';
333
+ calendarYear?: number;
334
+ calendarData?: Array<[string, number]>;
335
+ calendarColors?: string[];
336
+ calendarCellSize?: number;
337
+ calendarLang?: 'zh' | 'en';
338
+ calendarMonthLabel?: {
339
+ show?: boolean;
340
+ color?: string;
341
+ fontSize?: number;
342
+ };
343
+ calendarDayLabel?: {
344
+ show?: boolean;
345
+ color?: string;
346
+ fontSize?: number;
347
+ firstDay?: number;
348
+ };
349
+ calendarYearLabel?: {
350
+ show?: boolean;
351
+ color?: string;
352
+ fontSize?: number;
353
+ };
354
+ rankListData?: Array<{
355
+ name: string;
356
+ value: number;
357
+ }>;
358
+ rankListConfig?: {
359
+ rowHeight?: number;
360
+ barHeight?: number;
361
+ barColor?: string;
362
+ barBgColor?: string;
363
+ textColor?: string;
364
+ valueColor?: string;
365
+ fontSize?: number;
366
+ showIndex?: boolean;
367
+ indexColor?: string;
368
+ scrollSpeed?: number;
369
+ showBar?: boolean;
370
+ };
371
+ carouselListData?: Array<Record<string, any>>;
372
+ carouselListConfig?: {
373
+ columns?: Array<{
374
+ title: string;
375
+ key: string;
376
+ width?: number;
377
+ }>;
378
+ rowHeight?: number;
379
+ headerHeight?: number;
380
+ headerBgColor?: string;
381
+ headerTextColor?: string;
382
+ rowBgColor?: string;
383
+ rowAltBgColor?: string;
384
+ textColor?: string;
385
+ fontSize?: number;
386
+ scrollSpeed?: number;
387
+ showHeader?: boolean;
388
+ pageSize?: number;
389
+ };
390
+ carouselImages?: string[];
391
+ carouselConfig?: {
392
+ autoplay?: boolean;
393
+ interval?: number;
394
+ showDots?: boolean;
395
+ showArrows?: boolean;
396
+ effect?: 'slide' | 'fade';
397
+ dotPosition?: 'top' | 'bottom' | 'left' | 'right';
398
+ };
399
+ wordCloudConfig?: {
400
+ shape?: 'circle' | 'rect' | 'diamond' | 'triangle';
401
+ colorScheme?: 'default' | 'blue' | 'green' | 'warm' | 'cool' | 'rainbow';
402
+ minFontSize?: number;
403
+ maxFontSize?: number;
404
+ fontFamily?: string;
405
+ fontWeight?: 'normal' | 'bold';
406
+ rotation?: boolean;
407
+ rotationRange?: [number, number];
408
+ gridSize?: number;
409
+ };
410
+ treeData?: any;
411
+ treeConfig?: {
412
+ orient?: 'LR' | 'TB' | 'RL' | 'BT';
413
+ top?: string | number;
414
+ left?: string | number;
415
+ bottom?: string | number;
416
+ right?: string | number;
417
+ symbolSize?: number;
418
+ expandAndCollapse?: boolean;
419
+ animationDuration?: number;
420
+ animationDurationUpdate?: number;
421
+ initialTreeDepth?: number;
422
+ label?: {
423
+ show?: boolean;
424
+ position?: 'left' | 'right' | 'top' | 'bottom' | 'inside' | 'insideLeft' | 'insideRight' | 'insideTop' | 'insideBottom';
425
+ verticalAlign?: 'top' | 'middle' | 'bottom';
426
+ align?: 'left' | 'center' | 'right';
427
+ fontSize?: number;
428
+ color?: string;
429
+ fontWeight?: 'normal' | 'bold';
430
+ backgroundColor?: string;
431
+ borderColor?: string;
432
+ borderWidth?: number;
433
+ borderRadius?: number;
434
+ padding?: number | [number, number] | [number, number, number, number];
435
+ };
436
+ leaves?: {
437
+ label?: {
438
+ show?: boolean;
439
+ position?: 'left' | 'right' | 'top' | 'bottom' | 'inside';
440
+ verticalAlign?: 'top' | 'middle' | 'bottom';
441
+ align?: 'left' | 'center' | 'right';
442
+ fontSize?: number;
443
+ color?: string;
444
+ fontWeight?: 'normal' | 'bold';
445
+ };
446
+ };
447
+ itemStyle?: {
448
+ color?: string;
449
+ borderColor?: string;
450
+ borderWidth?: number;
451
+ };
452
+ lineStyle?: {
453
+ color?: string;
454
+ width?: number;
455
+ curveness?: number;
456
+ };
457
+ emphasis?: {
458
+ itemStyle?: {
459
+ color?: string;
460
+ borderColor?: string;
461
+ borderWidth?: number;
462
+ };
463
+ lineStyle?: {
464
+ color?: string;
465
+ width?: number;
466
+ };
467
+ };
468
+ };
469
+ sankeyData?: {
470
+ nodes?: Array<{
471
+ name: string;
472
+ value?: number;
473
+ }>;
474
+ links?: Array<{
475
+ source: string | number;
476
+ target: string | number;
477
+ value: number;
478
+ }>;
479
+ };
480
+ sankeyConfig?: {
481
+ orient?: 'horizontal' | 'vertical';
482
+ nodeWidth?: number;
483
+ nodeGap?: number;
484
+ layoutIterations?: number;
485
+ nodeAlign?: 'justify' | 'left' | 'right' | 'center';
486
+ draggable?: boolean;
487
+ focusNodeAdjacency?: boolean | 'inEdges' | 'outEdges' | 'allEdges';
488
+ levels?: Array<{
489
+ depth?: number;
490
+ itemStyle?: {
491
+ color?: string;
492
+ borderColor?: string;
493
+ borderWidth?: number;
494
+ };
495
+ lineStyle?: {
496
+ color?: string;
497
+ opacity?: number;
498
+ };
499
+ label?: {
500
+ color?: string;
501
+ fontSize?: number;
502
+ };
503
+ }>;
504
+ label?: {
505
+ show?: boolean;
506
+ position?: 'inside' | 'outside' | 'left' | 'right' | 'top' | 'bottom';
507
+ color?: string;
508
+ fontSize?: number;
509
+ fontWeight?: 'normal' | 'bold';
510
+ formatter?: string;
511
+ };
512
+ itemStyle?: {
513
+ color?: string;
514
+ borderColor?: string;
515
+ borderWidth?: number;
516
+ borderRadius?: number;
517
+ opacity?: number;
518
+ };
519
+ lineStyle?: {
520
+ color?: string;
521
+ opacity?: number;
522
+ curveness?: number;
523
+ };
524
+ emphasis?: {
525
+ itemStyle?: {
526
+ color?: string;
527
+ borderColor?: string;
528
+ borderWidth?: number;
529
+ };
530
+ lineStyle?: {
531
+ opacity?: number;
532
+ };
533
+ label?: {
534
+ color?: string;
535
+ fontSize?: number;
536
+ };
537
+ };
538
+ };
539
+ layoutConfig?: {
540
+ direction?: 'horizontal' | 'vertical';
541
+ gap?: number;
542
+ cells?: Array<{
543
+ flex?: number;
544
+ width?: string;
545
+ height?: string;
546
+ backgroundColor?: string;
547
+ layoutMode?: 'fill' | 'free';
548
+ }>;
549
+ };
550
+ gradientType?: 'linear' | 'radial';
551
+ gradientAngle?: number;
552
+ gradientColors?: string[];
553
+ textStroke?: boolean;
554
+ strokeColor?: string;
555
+ strokeWidth?: number;
556
+ countdownMode?: 'target' | 'duration';
557
+ targetDate?: string;
558
+ countdownDuration?: number;
559
+ showDays?: boolean;
560
+ showHours?: boolean;
561
+ showMinutes?: boolean;
562
+ showSeconds?: boolean;
563
+ cardBgOpacity?: number;
564
+ cardColorType?: 'solid' | 'gradient';
565
+ cardSolidColor?: string;
566
+ cardGradientStart?: string;
567
+ cardGradientEnd?: string;
568
+ textColor?: string;
569
+ labelColor?: string;
570
+ showLabels?: boolean;
571
+ separator?: string;
572
+ containerPadding?: number | string;
573
+ containerBackground?: string;
574
+ containerBackgroundImage?: string;
575
+ containerBorderRadius?: number;
576
+ containerBorderWidth?: number;
577
+ containerBorderColor?: string;
578
+ containerShadow?: string;
579
+ }
580
+ export interface ComponentItem {
581
+ id: string;
582
+ type: ComponentType;
583
+ name: string;
584
+ props: ComponentProps;
585
+ style: ComponentStyle;
586
+ visible: boolean;
587
+ locked: boolean;
588
+ parentId?: string;
589
+ cellIndex?: number;
590
+ groupId?: string;
591
+ isGroup?: boolean;
592
+ }
593
+ export interface SnapLine {
594
+ type: 'v' | 'h';
595
+ position: number;
596
+ }
597
+ export interface CanvasConfig {
598
+ width: number;
599
+ height: number;
600
+ backgroundColor: string;
601
+ name: string;
602
+ backgroundType?: 'color' | 'image';
603
+ backgroundImage?: string;
604
+ backgroundImageMode?: 'tile' | 'stretch' | 'cover' | 'contain' | 'center';
605
+ backgroundImageOpacity?: number;
606
+ chartTheme?: {
607
+ type: 'preset' | 'custom';
608
+ presetName?: string;
609
+ customColors?: string[];
610
+ };
611
+ }
612
+ export interface EditorState {
613
+ components: ComponentItem[];
614
+ selectedId: string | null;
615
+ selectedIds: string[];
616
+ scale: number;
617
+ snapLines: SnapLine[];
618
+ canvasConfig: CanvasConfig;
619
+ zenMode?: boolean;
620
+ showComponentPanel?: boolean;
621
+ showLayerPanel?: boolean;
622
+ showPropertyPanel?: boolean;
623
+ }
624
+ export type EditorAction = {
625
+ type: 'SYNC_STATE';
626
+ payload: EditorState;
627
+ } | {
628
+ type: 'ADD_COMPONENT';
629
+ payload: ComponentItem;
630
+ } | {
631
+ type: 'UPDATE_COMPONENT';
632
+ payload: {
633
+ id: string;
634
+ updates: Partial<ComponentItem>;
635
+ };
636
+ } | {
637
+ type: 'DELETE_COMPONENT';
638
+ payload: string;
639
+ } | {
640
+ type: 'DELETE_COMPONENTS';
641
+ payload: string[];
642
+ } | {
643
+ type: 'SELECT_COMPONENT';
644
+ payload: string | null;
645
+ } | {
646
+ type: 'SELECT_COMPONENTS';
647
+ payload: string[];
648
+ } | {
649
+ type: 'MOVE_COMPONENT';
650
+ payload: {
651
+ id: string;
652
+ x: number;
653
+ y: number;
654
+ };
655
+ } | {
656
+ type: 'REORDER_LAYERS';
657
+ payload: ComponentItem[];
658
+ } | {
659
+ type: 'TOGGLE_VISIBILITY';
660
+ payload: string;
661
+ } | {
662
+ type: 'TOGGLE_LOCK';
663
+ payload: string;
664
+ } | {
665
+ type: 'SET_SCALE';
666
+ payload: number;
667
+ } | {
668
+ type: 'SET_SNAP_LINES';
669
+ payload: SnapLine[];
670
+ } | {
671
+ type: 'SET_CANVAS_CONFIG';
672
+ payload: Partial<CanvasConfig>;
673
+ } | {
674
+ type: 'GROUP_COMPONENTS';
675
+ payload: string[];
676
+ } | {
677
+ type: 'UNGROUP_COMPONENTS';
678
+ payload: string;
679
+ } | {
680
+ type: 'TOGGLE_ZEN_MODE';
681
+ payload: boolean;
682
+ } | {
683
+ type: 'TOGGLE_PANEL';
684
+ payload: 'component' | 'layer' | 'property';
685
+ } | {
686
+ type: 'IMPORT_PROJECT';
687
+ payload: {
688
+ canvasConfig: CanvasConfig;
689
+ components: ComponentItem[];
690
+ };
691
+ };
692
+ export interface DragItem {
693
+ type: 'NEW_COMPONENT' | 'CANVAS_COMPONENT';
694
+ componentType?: ComponentType;
695
+ id?: string;
696
+ }
697
+ export interface ComponentConfig {
698
+ type: ComponentType;
699
+ name: string;
700
+ icon: any;
701
+ category: ComponentCategory;
702
+ defaultProps: ComponentProps;
703
+ defaultStyle: Partial<ComponentStyle>;
704
+ }