@agions/taroviz 1.11.1 → 2.0.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 (164) hide show
  1. package/CHANGELOG.md +245 -0
  2. package/README.md +104 -302
  3. package/dist/cjs/index.js +1 -1
  4. package/dist/cjs/vendors.js +1 -0
  5. package/dist/cjs/vendors~echarts.js +1 -0
  6. package/dist/esm/index.js +1 -58151
  7. package/dist/esm/vendors.js +1 -0
  8. package/dist/esm/vendors~echarts.js +1 -0
  9. package/package.json +19 -25
  10. package/src/adapters/MiniAppAdapter.ts +136 -0
  11. package/src/adapters/__tests__/index.test.ts +1 -1
  12. package/src/adapters/h5/__tests__/index.test.ts +4 -2
  13. package/src/adapters/h5/index.ts +63 -64
  14. package/src/adapters/harmony/index.ts +23 -245
  15. package/src/adapters/index.ts +49 -45
  16. package/src/adapters/swan/index.ts +6 -69
  17. package/src/adapters/tt/index.ts +7 -70
  18. package/src/adapters/types.ts +25 -58
  19. package/src/adapters/weapp/index.ts +6 -69
  20. package/src/charts/__tests__/testUtils.tsx +87 -0
  21. package/src/charts/boxplot/__tests__/index.test.tsx +49 -103
  22. package/src/charts/boxplot/index.tsx +2 -1
  23. package/src/charts/boxplot/types.ts +17 -16
  24. package/src/charts/common/BaseChartWrapper.tsx +90 -82
  25. package/src/charts/common/__mocks__/BaseChartWrapper.tsx +17 -0
  26. package/src/charts/createChartComponent.tsx +36 -0
  27. package/src/charts/createOptionChartComponent.tsx +32 -0
  28. package/src/charts/funnel/__tests__/index.test.tsx +99 -0
  29. package/src/charts/funnel/index.tsx +60 -10
  30. package/src/charts/funnel/types.ts +6 -0
  31. package/src/charts/graph/__tests__/index.test.tsx +102 -33
  32. package/src/charts/graph/index.tsx +66 -9
  33. package/src/charts/graph/types.ts +6 -0
  34. package/src/charts/heatmap/__tests__/index.test.tsx +139 -0
  35. package/src/charts/heatmap/index.tsx +103 -10
  36. package/src/charts/heatmap/types.ts +6 -0
  37. package/src/charts/index.ts +74 -26
  38. package/src/charts/liquid/__tests__/index.test.tsx +52 -0
  39. package/src/charts/liquid/index.tsx +239 -182
  40. package/src/charts/liquid/types.ts +11 -11
  41. package/src/charts/parallel/__tests__/index.test.tsx +40 -67
  42. package/src/charts/parallel/index.tsx +2 -1
  43. package/src/charts/parallel/types.ts +19 -18
  44. package/src/charts/radar/__tests__/index.test.tsx +210 -0
  45. package/src/charts/radar/index.tsx +143 -10
  46. package/src/charts/radar/types.ts +13 -0
  47. package/src/charts/sankey/__tests__/index.test.tsx +124 -0
  48. package/src/charts/sankey/index.tsx +62 -10
  49. package/src/charts/sankey/types.ts +6 -0
  50. package/src/charts/tree/__tests__/index.test.tsx +71 -0
  51. package/src/charts/tree/index.tsx +5 -2
  52. package/src/charts/tree/types.ts +9 -9
  53. package/src/charts/types.ts +208 -106
  54. package/src/charts/utils.ts +9 -7
  55. package/src/charts/wordcloud/__tests__/index.test.tsx +98 -31
  56. package/src/charts/wordcloud/index.tsx +75 -9
  57. package/src/charts/wordcloud/types.ts +6 -0
  58. package/src/components/DataFilter/index.tsx +32 -10
  59. package/src/core/animation/types.ts +6 -6
  60. package/src/core/components/Annotation.tsx +6 -7
  61. package/src/core/components/BaseChart.tsx +110 -168
  62. package/src/core/components/ErrorBoundary.tsx +17 -4
  63. package/src/core/components/LazyChart.tsx +54 -55
  64. package/src/core/components/hooks/index.ts +6 -2
  65. package/src/core/components/hooks/useChartInit.ts +6 -3
  66. package/src/core/components/hooks/usePerformance.ts +8 -2
  67. package/src/core/components/hooks/useVirtualScroll.ts +2 -1
  68. package/src/core/index.ts +1 -1
  69. package/src/core/themes/ThemeManager.ts +1 -1
  70. package/src/core/types/common.ts +2 -1
  71. package/src/core/types/index.ts +0 -12
  72. package/src/core/types/platform.ts +3 -5
  73. package/src/core/utils/__tests__/deepClone.test.ts +317 -0
  74. package/src/core/utils/__tests__/index.test.ts +2 -1
  75. package/src/core/utils/chartInstances.ts +13 -0
  76. package/src/core/utils/common.ts +20 -29
  77. package/src/core/utils/deepClone.ts +114 -0
  78. package/src/core/utils/download.ts +128 -0
  79. package/src/core/utils/drillDown.ts +34 -353
  80. package/src/core/utils/drillDownHelpers.ts +426 -0
  81. package/src/core/utils/events.ts +12 -0
  82. package/src/core/utils/export/ExportUtils.ts +36 -67
  83. package/src/core/utils/format.ts +44 -0
  84. package/src/core/utils/index.ts +21 -154
  85. package/src/core/utils/merge.ts +25 -0
  86. package/src/core/utils/performance/PerformanceAnalyzer.ts +38 -21
  87. package/src/core/utils/performance/hooks.ts +7 -0
  88. package/src/core/utils/performance/index.ts +2 -0
  89. package/src/{hooks → core/utils/performance}/useAnimation.ts +45 -41
  90. package/src/core/utils/performance/useDataZoom.ts +324 -0
  91. package/src/{hooks → core/utils/performance}/usePerformance.ts +49 -41
  92. package/src/core/utils/performance/usePerformanceHooks.ts +278 -0
  93. package/src/core/utils/performanceUtils.ts +310 -0
  94. package/src/core/utils/runtime.ts +190 -0
  95. package/src/core/utils/setOptionUtils.ts +59 -0
  96. package/src/core/version.ts +14 -0
  97. package/src/editor/EnhancedThemeEditor.tsx +362 -540
  98. package/src/editor/ThemeEditor.tsx +55 -321
  99. package/src/editor/components/ThemeBasicSettings.tsx +113 -0
  100. package/src/editor/components/ThemeColorEditor.tsx +105 -0
  101. package/src/editor/components/ThemeSelector.tsx +70 -0
  102. package/src/editor/hooks/useThemeEditorState.ts +201 -0
  103. package/src/editor/index.ts +10 -2
  104. package/src/hooks/__tests__/index.test.tsx +3 -1
  105. package/src/hooks/chartConnectHelpers.ts +341 -0
  106. package/src/hooks/index.ts +55 -660
  107. package/src/hooks/types.ts +189 -0
  108. package/src/hooks/useChartAutoResize.ts +73 -0
  109. package/src/hooks/useChartConnect.ts +92 -238
  110. package/src/hooks/useChartDownload.ts +25 -27
  111. package/src/hooks/useChartHistory.ts +34 -49
  112. package/src/hooks/useChartInit.ts +59 -0
  113. package/src/hooks/useChartOptions.ts +259 -0
  114. package/src/hooks/useChartPerformance.ts +109 -0
  115. package/src/hooks/useChartSelection.ts +52 -49
  116. package/src/hooks/useChartTheme.ts +51 -0
  117. package/src/hooks/useDataTransform.ts +19 -4
  118. package/src/hooks/utils/chartDownloadUtils.ts +40 -53
  119. package/src/hooks/utils/dataTransformUtils.ts +22 -0
  120. package/src/index.ts +48 -34
  121. package/src/main.tsx +4 -9
  122. package/src/react-dom.d.ts +3 -3
  123. package/src/themes/index.ts +30 -855
  124. package/src/themes/palettes/blue-green.ts +13 -0
  125. package/src/themes/palettes/chalk.ts +13 -0
  126. package/src/themes/palettes/cyber.ts +44 -0
  127. package/src/themes/palettes/dark.ts +52 -0
  128. package/src/themes/palettes/default.ts +52 -0
  129. package/src/themes/palettes/elegant.ts +34 -0
  130. package/src/themes/palettes/forest.ts +13 -0
  131. package/src/themes/palettes/glass.ts +49 -0
  132. package/src/themes/palettes/golden.ts +13 -0
  133. package/src/themes/palettes/neon.ts +43 -0
  134. package/src/themes/palettes/ocean.ts +39 -0
  135. package/src/themes/palettes/pastel.ts +37 -0
  136. package/src/themes/palettes/purple-passion.ts +13 -0
  137. package/src/themes/palettes/retro.ts +33 -0
  138. package/src/themes/palettes/sunset.ts +40 -0
  139. package/src/themes/palettes/walden.ts +13 -0
  140. package/src/themes/registry.ts +184 -0
  141. package/src/themes/types.ts +213 -0
  142. package/src/charts/bar/__tests__/index.test.tsx +0 -113
  143. package/src/charts/bar/index.tsx +0 -14
  144. package/src/charts/candlestick/__tests__/index.test.tsx +0 -40
  145. package/src/charts/candlestick/index.tsx +0 -13
  146. package/src/charts/gauge/index.tsx +0 -14
  147. package/src/charts/line/__tests__/index.test.tsx +0 -107
  148. package/src/charts/line/index.tsx +0 -15
  149. package/src/charts/pie/__tests__/index.test.tsx +0 -112
  150. package/src/charts/pie/index.tsx +0 -14
  151. package/src/charts/scatter/index.tsx +0 -14
  152. package/src/charts/sunburst/index.tsx +0 -18
  153. package/src/charts/treemap/index.tsx +0 -18
  154. package/src/core/utils/codeGenerator/CodeGenerator.ts +0 -669
  155. package/src/core/utils/codeGenerator/index.ts +0 -13
  156. package/src/core/utils/codeGenerator/types.ts +0 -198
  157. package/src/core/utils/configGenerator/ConfigGenerator.ts +0 -583
  158. package/src/core/utils/configGenerator/index.ts +0 -13
  159. package/src/core/utils/configGenerator/types.ts +0 -445
  160. package/src/core/utils/debug/DebugPanel.tsx +0 -637
  161. package/src/core/utils/debug/debugger.ts +0 -322
  162. package/src/core/utils/debug/index.ts +0 -21
  163. package/src/core/utils/debug/types.ts +0 -142
  164. package/src/hooks/useDataZoom.ts +0 -323
@@ -0,0 +1,13 @@
1
+ import type { ThemeOptions } from '../types';
2
+ import { defaultTheme } from './default';
3
+
4
+ /** Blue Green 蓝绿清新 */
5
+ export const blueGreenTheme: ThemeOptions = {
6
+ ...defaultTheme,
7
+ theme: 'blue-green',
8
+ name: 'Blue Green',
9
+ description: '蓝绿清新',
10
+ colors: ['#00838f', '#00acc1', '#03a9f4', '#29b6f6', '#4fc3f7'],
11
+ backgroundColor: '#e0f7fa',
12
+ textColor: '#006064',
13
+ };
@@ -0,0 +1,13 @@
1
+ import type { ThemeOptions } from '../types';
2
+ import { defaultTheme } from './default';
3
+
4
+ /** Chalk 粉笔风格 */
5
+ export const chalkTheme: ThemeOptions = {
6
+ ...defaultTheme,
7
+ theme: 'chalk',
8
+ name: 'Chalk',
9
+ description: '粉笔风格',
10
+ colors: ['#2e8de5', '#f0805a', '#5ab1ef', '#91d5ff', '#faad14'],
11
+ backgroundColor: '#ffffff',
12
+ textColor: '#000000',
13
+ };
@@ -0,0 +1,44 @@
1
+ import type { ThemeOptions } from '../types';
2
+
3
+ /** Cyber 赛博主题 */
4
+ export const cyberTheme: ThemeOptions = {
5
+ theme: 'cyber',
6
+ name: 'Cyber',
7
+ description: '未来科技感,赛博朋克',
8
+ type: 'dark',
9
+ mode: 'dark',
10
+ darkMode: true,
11
+ tags: ['cyber', 'tech', 'futuristic', 'dark'],
12
+ colors: [
13
+ '#00f5ff',
14
+ '#ff00ff',
15
+ '#00ff00',
16
+ '#ffff00',
17
+ '#ff0080',
18
+ '#8000ff',
19
+ '#00ff80',
20
+ '#ff8000',
21
+ '#0080ff',
22
+ ],
23
+ backgroundColor: '#0a0a12',
24
+ textColor: '#e0e0e0',
25
+ textColorSecondary: '#808090',
26
+ borderColor: '#1a1a2e',
27
+ dividerColor: '#12121e',
28
+ fontFamily: '"Orbitron", "Rajdhani", "JetBrains Mono", monospace',
29
+ effects: {
30
+ shadows: true,
31
+ shadowColor: 'rgba(0, 245, 255, 0.4)',
32
+ gradients: true,
33
+ borderRadius: 'none',
34
+ },
35
+ chart: {
36
+ tooltip: {
37
+ textColor: '#ffffff',
38
+ backgroundColor: 'rgba(10, 10, 18, 0.95)',
39
+ borderColor: '#00f5ff',
40
+ borderRadius: 0,
41
+ shadowColor: 'rgba(0, 245, 255, 0.4)',
42
+ },
43
+ },
44
+ };
@@ -0,0 +1,52 @@
1
+ import type { ThemeOptions } from '../types';
2
+
3
+ /** 深色主题 */
4
+ export const darkTheme: ThemeOptions = {
5
+ theme: 'dark',
6
+ name: 'Dark',
7
+ description: '优雅的深色主题,适合夜间使用',
8
+ type: 'dark',
9
+ mode: 'dark',
10
+ darkMode: true,
11
+ tags: ['dark', 'night', 'modern'],
12
+ colors: [
13
+ '#4992ff',
14
+ '#7cffb2',
15
+ '#fddd60',
16
+ '#ff6e76',
17
+ '#58d9f9',
18
+ '#05c091',
19
+ '#ff9f7f',
20
+ '#8d48e3',
21
+ '#dd79ff',
22
+ ],
23
+ backgroundColor: '#1a1a2e',
24
+ textColor: '#e8e8e8',
25
+ textColorSecondary: '#a0a0a0',
26
+ borderColor: '#2d2d44',
27
+ dividerColor: '#252538',
28
+ fontFamily: 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
29
+ chart: {
30
+ legend: {
31
+ textColor: '#e8e8e8',
32
+ backgroundColor: 'transparent',
33
+ borderColor: '#2d2d44',
34
+ },
35
+ axis: {
36
+ textColor: '#a0a0a0',
37
+ lineColor: '#2d2d44',
38
+ tickColor: '#2d2d44',
39
+ splitLineColor: '#252538',
40
+ },
41
+ tooltip: {
42
+ textColor: '#e8e8e8',
43
+ backgroundColor: 'rgba(26, 26, 46, 0.95)',
44
+ borderColor: '#2d2d44',
45
+ borderRadius: 4,
46
+ },
47
+ title: {
48
+ textColor: '#e8e8e8',
49
+ subTextColor: '#a0a0a0',
50
+ },
51
+ },
52
+ };
@@ -0,0 +1,52 @@
1
+ import type { ThemeOptions } from '../types';
2
+
3
+ /** 默认主题 */
4
+ export const defaultTheme: ThemeOptions = {
5
+ theme: 'default',
6
+ name: 'Default',
7
+ description: '简洁现代的默认主题',
8
+ type: 'light',
9
+ mode: 'light',
10
+ darkMode: false,
11
+ tags: ['modern', 'clean', 'default'],
12
+ colors: [
13
+ '#5470c6',
14
+ '#91cc75',
15
+ '#fac858',
16
+ '#ee6666',
17
+ '#73c0de',
18
+ '#3ba272',
19
+ '#fc8452',
20
+ '#9a60b4',
21
+ '#ea7ccc',
22
+ ],
23
+ backgroundColor: '#ffffff',
24
+ textColor: '#333333',
25
+ textColorSecondary: '#666666',
26
+ borderColor: '#e8e8e8',
27
+ dividerColor: '#f0f0f0',
28
+ fontFamily: 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
29
+ chart: {
30
+ legend: {
31
+ textColor: '#333333',
32
+ backgroundColor: 'transparent',
33
+ borderColor: '#e8e8e8',
34
+ },
35
+ axis: {
36
+ textColor: '#666666',
37
+ lineColor: '#e8e8e8',
38
+ tickColor: '#e8e8e8',
39
+ splitLineColor: '#f0f0f0',
40
+ },
41
+ tooltip: {
42
+ textColor: '#333333',
43
+ backgroundColor: 'rgba(255, 255, 255, 0.95)',
44
+ borderColor: '#e8e8e8',
45
+ borderRadius: 4,
46
+ },
47
+ title: {
48
+ textColor: '#333333',
49
+ subTextColor: '#666666',
50
+ },
51
+ },
52
+ };
@@ -0,0 +1,34 @@
1
+ import type { ThemeOptions } from '../types';
2
+
3
+ /** Elegant 雅致主题 */
4
+ export const elegantTheme: ThemeOptions = {
5
+ theme: 'elegant',
6
+ name: 'Elegant',
7
+ description: '低调雅致风格,精致品味',
8
+ type: 'light',
9
+ mode: 'light',
10
+ darkMode: false,
11
+ tags: ['elegant', 'minimal', 'sophisticated', 'light'],
12
+ colors: [
13
+ '#2c3e50',
14
+ '#34495e',
15
+ '#7f8c8d',
16
+ '#95a5a6',
17
+ '#bdc3c7',
18
+ '#ecf0f1',
19
+ '#1abc9c',
20
+ '#16a085',
21
+ '#3498db',
22
+ ],
23
+ backgroundColor: '#fafafa',
24
+ textColor: '#2c3e50',
25
+ textColorSecondary: '#7f8c8d',
26
+ borderColor: '#e8e8e8',
27
+ dividerColor: '#f0f0f0',
28
+ fontFamily: '"Playfair Display", Georgia, serif',
29
+ effects: {
30
+ shadows: true,
31
+ shadowColor: 'rgba(0, 0, 0, 0.08)',
32
+ borderRadius: 'medium',
33
+ },
34
+ };
@@ -0,0 +1,13 @@
1
+ import type { ThemeOptions } from '../types';
2
+ import { defaultTheme } from './default';
3
+
4
+ /** Forest 森林绿色 */
5
+ export const forestTheme: ThemeOptions = {
6
+ ...defaultTheme,
7
+ theme: 'forest',
8
+ name: 'Forest',
9
+ description: '森林绿色',
10
+ colors: ['#2e7d32', '#388e3c', '#43a047', '#4caf50', '#66bb6a'],
11
+ backgroundColor: '#f1f8e9',
12
+ textColor: '#1b5e20',
13
+ };
@@ -0,0 +1,49 @@
1
+ import type { ThemeOptions } from '../types';
2
+
3
+ /** Glass 玻璃态主题 */
4
+ export const glassTheme: ThemeOptions = {
5
+ theme: 'glass',
6
+ name: 'Glass',
7
+ description: '现代玻璃态设计,半透明质感',
8
+ type: 'light',
9
+ mode: 'light',
10
+ darkMode: false,
11
+ tags: ['glass', 'modern', 'minimal', 'light'],
12
+ colors: [
13
+ '#667eea',
14
+ '#764ba2',
15
+ '#f093fb',
16
+ '#f5576c',
17
+ '#4facfe',
18
+ '#00f2fe',
19
+ '#43e97b',
20
+ '#38f9d7',
21
+ '#fa709a',
22
+ ],
23
+ backgroundColor: 'rgba(255, 255, 255, 0.8)',
24
+ backgroundGradient: {
25
+ start: '#f5f7fa',
26
+ end: '#c3cfe2',
27
+ angle: 135,
28
+ },
29
+ textColor: '#2d3748',
30
+ textColorSecondary: '#718096',
31
+ borderColor: 'rgba(255, 255, 255, 0.5)',
32
+ dividerColor: 'rgba(255, 255, 255, 0.3)',
33
+ fontFamily: 'Inter, -apple-system, BlinkMacSystemFont, sans-serif',
34
+ effects: {
35
+ glassmorphism: true,
36
+ blur: 10,
37
+ shadows: true,
38
+ shadowColor: 'rgba(0, 0, 0, 0.1)',
39
+ borderRadius: 'large',
40
+ },
41
+ chart: {
42
+ tooltip: {
43
+ textColor: '#2d3748',
44
+ backgroundColor: 'rgba(255, 255, 255, 0.9)',
45
+ borderColor: 'rgba(255, 255, 255, 0.5)',
46
+ borderRadius: 12,
47
+ },
48
+ },
49
+ };
@@ -0,0 +1,13 @@
1
+ import type { ThemeOptions } from '../types';
2
+ import { defaultTheme } from './default';
3
+
4
+ /** Golden 金色奢华 */
5
+ export const goldenTheme: ThemeOptions = {
6
+ ...defaultTheme,
7
+ theme: 'golden',
8
+ name: 'Golden',
9
+ description: '金色奢华',
10
+ colors: ['#ffd700', '#ffed4e', '#f9a825', '#ffc107', '#ffb300'],
11
+ backgroundColor: '#fff8e1',
12
+ textColor: '#ff6f00',
13
+ };
@@ -0,0 +1,43 @@
1
+ import type { ThemeOptions } from '../types';
2
+
3
+ /** Neon 霓虹主题 */
4
+ export const neonTheme: ThemeOptions = {
5
+ theme: 'neon',
6
+ name: 'Neon',
7
+ description: '赛博朋克霓虹风格,炫酷吸睛',
8
+ type: 'dark',
9
+ mode: 'dark',
10
+ darkMode: true,
11
+ tags: ['neon', 'cyberpunk', 'colorful', 'dark'],
12
+ colors: [
13
+ '#00fff5',
14
+ '#ff00ff',
15
+ '#ffff00',
16
+ '#00ff00',
17
+ '#ff6b6b',
18
+ '#4ecdc4',
19
+ '#ffe66d',
20
+ '#95e1d3',
21
+ '#f38181',
22
+ ],
23
+ backgroundColor: '#0d0d1a',
24
+ textColor: '#ffffff',
25
+ textColorSecondary: '#b0b0b0',
26
+ borderColor: '#1a1a2e',
27
+ dividerColor: '#1a1a2e',
28
+ fontFamily: '"JetBrains Mono", "Fira Code", monospace',
29
+ effects: {
30
+ shadows: true,
31
+ shadowColor: 'rgba(0, 255, 245, 0.3)',
32
+ gradients: true,
33
+ },
34
+ chart: {
35
+ tooltip: {
36
+ textColor: '#ffffff',
37
+ backgroundColor: 'rgba(13, 13, 26, 0.95)',
38
+ borderColor: '#00fff5',
39
+ borderRadius: 4,
40
+ shadowColor: 'rgba(0, 255, 245, 0.3)',
41
+ },
42
+ },
43
+ };
@@ -0,0 +1,39 @@
1
+ import type { ThemeOptions } from '../types';
2
+
3
+ /** Ocean 海洋主题 */
4
+ export const oceanTheme: ThemeOptions = {
5
+ theme: 'ocean',
6
+ name: 'Ocean',
7
+ description: '深邃海洋蓝,宁静清新',
8
+ type: 'light',
9
+ mode: 'light',
10
+ darkMode: false,
11
+ tags: ['ocean', 'blue', 'calm', 'light'],
12
+ colors: [
13
+ '#0077b6',
14
+ '#00b4d8',
15
+ '#90e0ef',
16
+ '#caf0f8',
17
+ '#03045e',
18
+ '#023e8a',
19
+ '#0096c7',
20
+ '#48cae4',
21
+ '#ade8f4',
22
+ ],
23
+ backgroundColor: '#f0f8ff',
24
+ backgroundGradient: {
25
+ start: '#e0f2fe',
26
+ end: '#bae6fd',
27
+ angle: 180,
28
+ },
29
+ textColor: '#1e3a5f',
30
+ textColorSecondary: '#4a6fa5',
31
+ borderColor: '#cce7f5',
32
+ dividerColor: '#e1f0f9',
33
+ fontFamily: 'Nunito, -apple-system, BlinkMacSystemFont, sans-serif',
34
+ effects: {
35
+ gradients: true,
36
+ shadows: true,
37
+ shadowColor: 'rgba(0, 119, 182, 0.15)',
38
+ },
39
+ };
@@ -0,0 +1,37 @@
1
+ import type { ThemeOptions } from '../types';
2
+
3
+ /** Pastel 粉彩主题 */
4
+ export const pastelTheme: ThemeOptions = {
5
+ theme: 'pastel',
6
+ name: 'Pastel',
7
+ description: '柔和粉彩配色,温馨舒适',
8
+ type: 'light',
9
+ mode: 'light',
10
+ darkMode: false,
11
+ tags: ['pastel', 'soft', 'gentle', 'light'],
12
+ colors: [
13
+ '#ffb3ba',
14
+ '#ffdfba',
15
+ '#ffffba',
16
+ '#baffc9',
17
+ '#bae1ff',
18
+ '#f0b3ff',
19
+ '#b3fff0',
20
+ '#ffb3d9',
21
+ '#d9ffb3',
22
+ ],
23
+ backgroundColor: '#fff9f5',
24
+ textColor: '#5d5d5d',
25
+ textColorSecondary: '#8a8a8a',
26
+ borderColor: '#f0e6e0',
27
+ dividerColor: '#f5f0eb',
28
+ fontFamily: 'Nunito, -apple-system, BlinkMacSystemFont, sans-serif',
29
+ chart: {
30
+ tooltip: {
31
+ textColor: '#5d5d5d',
32
+ backgroundColor: 'rgba(255, 255, 255, 0.95)',
33
+ borderColor: '#f0e6e0',
34
+ borderRadius: 8,
35
+ },
36
+ },
37
+ };
@@ -0,0 +1,13 @@
1
+ import type { ThemeOptions } from '../types';
2
+ import { defaultTheme } from './default';
3
+
4
+ /** Purple Passion 紫色浪漫 */
5
+ export const purplePassionTheme: ThemeOptions = {
6
+ ...defaultTheme,
7
+ theme: 'purple-passion',
8
+ name: 'Purple Passion',
9
+ description: '紫色浪漫',
10
+ colors: ['#9c27b0', '#e91e63', '#ff5722', '#ff9800', '#ffc107'],
11
+ backgroundColor: '#f5f5f5',
12
+ textColor: '#333333',
13
+ };
@@ -0,0 +1,33 @@
1
+ import type { ThemeOptions } from '../types';
2
+
3
+ /** Retro 复古主题 */
4
+ export const retroTheme: ThemeOptions = {
5
+ theme: 'retro',
6
+ name: 'Retro',
7
+ description: '怀旧复古风格,温馨怀旧',
8
+ type: 'light',
9
+ mode: 'light',
10
+ darkMode: false,
11
+ tags: ['retro', 'vintage', 'nostalgic', 'light'],
12
+ colors: [
13
+ '#d63031',
14
+ '#e17055',
15
+ '#fdcb6e',
16
+ '#00b894',
17
+ '#0984e3',
18
+ '#6c5ce7',
19
+ '#e84393',
20
+ '#00cec9',
21
+ '#fab1a0',
22
+ ],
23
+ backgroundColor: '#fdf6e3',
24
+ textColor: '#5c4b37',
25
+ textColorSecondary: '#8b7355',
26
+ borderColor: '#e8dcc8',
27
+ dividerColor: '#f0e8d8',
28
+ fontFamily: '"Courier Prime", "Courier New", monospace',
29
+ effects: {
30
+ shadows: false,
31
+ borderRadius: 'small',
32
+ },
33
+ };
@@ -0,0 +1,40 @@
1
+ import type { ThemeOptions } from '../types';
2
+
3
+ /** Sunset 日落主题 */
4
+ export const sunsetTheme: ThemeOptions = {
5
+ theme: 'sunset',
6
+ name: 'Sunset',
7
+ description: '温暖日落渐变,夕阳余晖',
8
+ type: 'light',
9
+ mode: 'light',
10
+ darkMode: false,
11
+ tags: ['sunset', 'warm', 'gradient', 'light'],
12
+ colors: [
13
+ '#ff6b6b',
14
+ '#feca57',
15
+ '#ff9ff3',
16
+ '#54a0ff',
17
+ '#5f27cd',
18
+ '#ff9f43',
19
+ '#ee5a24',
20
+ '#009432',
21
+ '#f368e0',
22
+ ],
23
+ backgroundColor: '#fff5f0',
24
+ backgroundGradient: {
25
+ start: '#ffecd2',
26
+ end: '#fcb69f',
27
+ angle: 135,
28
+ },
29
+ textColor: '#4a4a4a',
30
+ textColorSecondary: '#7a7a7a',
31
+ borderColor: '#ffd5c8',
32
+ dividerColor: '#ffebe6',
33
+ fontFamily: 'Quicksand, -apple-system, BlinkMacSystemFont, sans-serif',
34
+ effects: {
35
+ gradients: true,
36
+ shadows: true,
37
+ shadowColor: 'rgba(255, 107, 107, 0.2)',
38
+ borderRadius: 'medium',
39
+ },
40
+ };
@@ -0,0 +1,13 @@
1
+ import type { ThemeOptions } from '../types';
2
+ import { defaultTheme } from './default';
3
+
4
+ /** Walden 清新自然风格 */
5
+ export const waldenTheme: ThemeOptions = {
6
+ ...defaultTheme,
7
+ theme: 'walden',
8
+ name: 'Walden',
9
+ description: '清新自然风格',
10
+ colors: ['#0a437a', '#3a84c4', '#22a783', '#48b591', '#7fcdbb', '#c9e4ca'],
11
+ backgroundColor: '#f0f8f5',
12
+ textColor: '#2c5042',
13
+ };