@orbcharts/presets-basic 3.0.0-alpha.26 → 3.0.0-alpha.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. package/LICENSE +200 -200
  2. package/dist/orbcharts-presets-basic.es.js +15 -3
  3. package/dist/orbcharts-presets-basic.umd.js +1 -1
  4. package/dist/vite.config.d.mts +2 -0
  5. package/package.json +44 -43
  6. package/src/grid/PRESET_BARS_HORIZONTAL_AND_ROUND.ts +62 -62
  7. package/src/grid/PRESET_BARS_HORIZONTAL_AND_THIN.ts +59 -59
  8. package/src/grid/PRESET_BARS_ROUND.ts +46 -46
  9. package/src/grid/PRESET_BARS_THIN.ts +43 -43
  10. package/src/grid/PRESET_GRID_BASIC.ts +25 -25
  11. package/src/grid/PRESET_GRID_HORIZONTAL.ts +42 -42
  12. package/src/grid/PRESET_GRID_PN_SCALE.ts +33 -33
  13. package/src/grid/PRESET_GRID_ROTATE_AXIS_LABEL.ts +33 -30
  14. package/src/grid/PRESET_GRID_SEPARATE_SERIES.ts +38 -35
  15. package/src/grid/PRESET_LINES_BASIC.ts +44 -44
  16. package/src/grid/PRESET_LINES_CURVE.ts +47 -47
  17. package/src/grid/PRESET_LINES_HIGHLIGHT_GROUP_DOTS.ts +46 -46
  18. package/src/grid/PRESET_LINES_HORIZONTAL.ts +60 -60
  19. package/src/grid/PRESET_LINES_LOOSE_TICKS.ts +46 -46
  20. package/src/grid/PRESET_LINES_ROTATE_AXIS_LABEL.ts +49 -47
  21. package/src/grid/PRESET_LINES_WITH_SOLID_DOTS.ts +48 -48
  22. package/src/grid/PRESET_LINE_AREAS_BASIC.ts +54 -54
  23. package/src/grid/PRESET_LINE_AREAS_CURVE.ts +59 -59
  24. package/src/grid/PRESET_LINE_AREAS_HIGHLIGHT_GROUP_DOTS.ts +58 -58
  25. package/src/grid/PRESET_LINE_AREAS_HORIZONTAL.ts +58 -58
  26. package/src/grid/PRESET_LINE_AREAS_LOOSE_TICKS.ts +56 -56
  27. package/src/grid/PRESET_LINE_AREAS_ROTATE_AXIS_LABEL.ts +59 -57
  28. package/src/grid/PRESET_LINE_AREAS_SEPARATE_SERIES.ts +61 -59
  29. package/src/grid/index.ts +22 -22
  30. package/src/index.ts +4 -4
  31. package/src/multiGrid/PRESET_MULTI_GRID_BASIC.ts +36 -36
  32. package/src/multiGrid/PRESET_MULTI_GRID_DIVERGING.ts +85 -85
  33. package/src/multiGrid/PRESET_MULTI_GRID_ROUND_STYLE.ts +57 -57
  34. package/src/multiGrid/PRESET_MULTI_GRID_SEPARATE_GRID.ts +59 -59
  35. package/src/multiGrid/PRESET_MULTI_LINES_SEPARATE_GRID.ts +103 -103
  36. package/src/multiGrid/PRESET_MULTI_LINE_AREAS_SEPARATE_GRID.ts +121 -121
  37. package/src/multiGrid/index.ts +6 -6
  38. package/src/params.ts +56 -56
  39. package/src/series/PRESET_BUBBLES_SCALING_BY_RADIUS.ts +19 -19
  40. package/src/series/PRESET_BUBBLES_SEPARATE_SERIES.ts +29 -29
  41. package/src/series/PRESET_PIE_DONUT.ts +23 -23
  42. package/src/series/PRESET_PIE_HALF_DONUT.ts +36 -36
  43. package/src/series/PRESET_PIE_WITH_INNER_LABELS.ts +24 -24
  44. package/src/series/PRESET_ROSE_SCALING_BY_RADIUS.ts +23 -23
  45. package/src/series/PRESET_SERIES_BASIC.ts +15 -15
  46. package/src/series/PRESET_SERIES_DESC.ts +15 -15
  47. package/src/series/PRESET_SERIES_SEPARATE_SERIES.ts +15 -15
  48. package/src/series/PRESET_SERIES_SEPARATE_SERIES_AND_SUM_SERIES.ts +16 -16
  49. package/src/series/PRESET_SERIES_SUM_SERIES.ts +15 -15
  50. package/src/series/index.ts +11 -11
  51. package/src/tree/PRESET_TREE_BASIC.ts +25 -25
  52. package/src/types.ts +241 -241
  53. package/{tsconfig.dev.json → tsconfig.base.json} +13 -17
  54. package/tsconfig.json +8 -13
  55. package/tsconfig.prod.json +2 -13
  56. package/vite.config.mjs +42 -0
  57. package/dist/vite.config.d.ts +0 -2
  58. package/vite.config.js +0 -45
@@ -1,25 +1,25 @@
1
- import type { PresetPartial } from '@orbcharts/core'
2
- import type { PresetTreeLegendParams, PresetTreeMapParams, PresetNoneDataPluginParams } from '../types'
3
- import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
-
5
- export const PRESET_TREE_BASIC: PresetPartial<'tree', PresetTreeLegendParams & PresetTreeMapParams & PresetNoneDataPluginParams> = {
6
- name: 'PRESET_TREE_BASIC',
7
- description: '基本Tree參數',
8
- chartParams: {
9
- padding: {
10
- top: 40,
11
- right: 40,
12
- bottom: 60,
13
- left: 40
14
- },
15
- },
16
- allPluginParams: {
17
- ...ALL_PLUGIN_PARAMS_NONE_DATA,
18
- TreeMap: {},
19
- TreeLegend: {
20
- position: 'bottom',
21
- justify: 'center',
22
- padding: 14,
23
- }
24
- }
25
- }
1
+ import type { PresetPartial } from '@orbcharts/core'
2
+ import type { PresetTreeLegendParams, PresetTreeMapParams, PresetNoneDataPluginParams } from '../types'
3
+ import { ALL_PLUGIN_PARAMS_NONE_DATA } from '../params'
4
+
5
+ export const PRESET_TREE_BASIC: PresetPartial<'tree', PresetTreeLegendParams & PresetTreeMapParams & PresetNoneDataPluginParams> = {
6
+ name: 'PRESET_TREE_BASIC',
7
+ description: '基本Tree參數',
8
+ chartParams: {
9
+ padding: {
10
+ top: 40,
11
+ right: 40,
12
+ bottom: 60,
13
+ left: 40
14
+ },
15
+ },
16
+ allPluginParams: {
17
+ ...ALL_PLUGIN_PARAMS_NONE_DATA,
18
+ TreeMap: {},
19
+ TreeLegend: {
20
+ position: 'bottom',
21
+ justify: 'center',
22
+ padding: 14,
23
+ }
24
+ }
25
+ }
package/src/types.ts CHANGED
@@ -1,242 +1,242 @@
1
- import type {
2
- // -- series --
3
- BubblesParams,
4
- PieParams,
5
- PieEventTextsParams,
6
- PieLabelsParams,
7
- RoseParams,
8
- RoseLabelsParams,
9
- SeriesLegendParams,
10
-
11
- // -- grid --
12
- BarsParams,
13
- BarsPNParams,
14
- BarStackParams,
15
- BarsTriangleParams,
16
- DotsParams,
17
- GridLegendParams,
18
- GroupAuxParams,
19
- GroupAxisParams,
20
- LineAreasParams,
21
- LinesParams,
22
- ScalingAreaParams,
23
- ValueAxisParams,
24
- ValueStackAxisParams,
25
-
26
- // -- multiGrid --
27
- MultiBarsParams,
28
- MultiBarStackParams,
29
- MultiBarsTriangleParams,
30
- MultiDotsParams,
31
- MultiGridLegendParams,
32
- MultiGroupAxisParams,
33
- MultiLineAreasParams,
34
- MultiLinesParams,
35
- MultiValueAxisParams,
36
- MultiValueStackAxisParams,
37
- OverlappingValueAxesParams,
38
- OverlappingValueStackAxesParams,
39
-
40
- // -- tree --
41
- TreeLegendParams,
42
- TreeMapParams,
43
-
44
- // -- noneData --
45
- TooltipParams
46
- } from '@orbcharts/plugins-basic'
47
-
48
- type DeepPartial<T> = Partial<{ [P in keyof T]: DeepPartial<T[P]> }>
49
-
50
- // -- series --
51
- // series的全部plugin參數
52
- export type PresetSeriesPluginParams = PresetBubblesParams
53
- & PresetPieParams
54
- & PresetPieEventTextsParams
55
- & PresetPieLabelsParams
56
- & PresetRoseParams
57
- & PresetRoseLabelsParams
58
- & PresetSeriesLegendParams
59
-
60
- export interface PresetBubblesParams {
61
- Bubbles: Partial<BubblesParams>
62
- }
63
-
64
- export interface PresetPieParams {
65
- Pie: Partial<PieParams>
66
- }
67
-
68
- export interface PresetPieEventTextsParams {
69
- PieEventTexts: Partial<PieEventTextsParams>
70
- }
71
-
72
- export interface PresetPieLabelsParams {
73
- PieLabels: Partial<PieLabelsParams>
74
- }
75
-
76
- export interface PresetRoseParams {
77
- Rose: Partial<RoseParams>
78
- }
79
-
80
- export interface PresetRoseLabelsParams {
81
- RoseLabels: Partial<RoseLabelsParams>
82
- }
83
-
84
- export interface PresetSeriesLegendParams {
85
- SeriesLegend: Partial<SeriesLegendParams>
86
- }
87
-
88
- // -- grid --
89
- // grid的全部plugin參數
90
- export type PresetGridPluginParams = PresetBarsParams
91
- & PresetBarsPNParams
92
- & PresetBarStackParams
93
- & PresetBarsTriangleParams
94
- & PresetDotsParams
95
- & PresetGridLegendParams
96
- & PresetGroupAuxParams
97
- & PresetGroupAxisParams
98
- & PresetLineAreasParams
99
- & PresetLinesParams
100
- & PresetScalingAreaParams
101
- & PresetValueAxisParams
102
- & PresetValueStackAxisParams
103
-
104
- export interface PresetBarsParams {
105
- Bars: Partial<BarsParams>
106
- }
107
-
108
- export interface PresetBarsPNParams {
109
- BarsPN: Partial<BarsPNParams>
110
- }
111
-
112
- export interface PresetBarStackParams {
113
- BarStack: Partial<BarStackParams>
114
- }
115
-
116
- export interface PresetBarsTriangleParams {
117
- BarsTriangle: Partial<BarsTriangleParams>
118
- }
119
-
120
- export interface PresetDotsParams {
121
- Dots: Partial<DotsParams>
122
- }
123
-
124
- export interface PresetGridLegendParams {
125
- GridLegend: Partial<GridLegendParams>
126
- }
127
-
128
- export interface PresetGroupAuxParams {
129
- GroupAux: Partial<GroupAuxParams>
130
- }
131
-
132
- export interface PresetGroupAxisParams {
133
- GroupAxis: Partial<GroupAxisParams>
134
- }
135
-
136
- export interface PresetLineAreasParams {
137
- LineAreas: Partial<LineAreasParams>
138
- }
139
-
140
- export interface PresetLinesParams {
141
- Lines: Partial<LinesParams>
142
- }
143
-
144
- export interface PresetScalingAreaParams {
145
- ScalingArea: Partial<ScalingAreaParams>
146
- }
147
-
148
- export interface PresetValueAxisParams {
149
- ValueAxis: Partial<ValueAxisParams>
150
- }
151
-
152
- export interface PresetValueStackAxisParams {
153
- ValueStackAxis: Partial<ValueStackAxisParams>
154
- }
155
-
156
- // -- multiGrid --
157
- // multiGrid的全部plugin參數
158
- export type PresetMultiGridPluginParams = PresetMultiBarsParams
159
- & PresetMultiBarStackParams
160
- & PresetMultiBarsTriangleParams
161
- & PresetMultiDotsParams
162
- & PresetMultiGridLegendParams
163
- & PresetMultiGroupAxisParams
164
- & PresetMultiLineAreasParams
165
- & PresetMultiLinesParams
166
- & PresetMultiValueAxisParams
167
- & PresetMultiValueStackAxisParams
168
- & PresetOverlappingValueAxesParams
169
- & PresetOverlappingValueStackAxesParams
170
-
171
- // multiGrid分開grid
172
- export type PresetMultiGridSepratedPluginParams = Omit<PresetMultiGridPluginParams, 'OverlappingValueAxes' | 'OverlappingValueStackAxes'>
173
-
174
- // multiGrid重疊grid
175
- export type PresetMultiGridOverlappedPluginParams = Omit<PresetMultiGridPluginParams, 'PresetMultiGroupAxisParams' | 'PresetMultiValueAxisParams'>
176
-
177
- export interface PresetMultiBarsParams {
178
- MultiBars: Partial<MultiBarsParams>
179
- }
180
-
181
- export interface PresetMultiBarStackParams {
182
- MultiBarStack: Partial<MultiBarStackParams>
183
- }
184
-
185
- export interface PresetMultiBarsTriangleParams {
186
- MultiBarsTriangle: Partial<MultiBarsTriangleParams>
187
- }
188
-
189
- export interface PresetMultiDotsParams {
190
- MultiDots: Partial<MultiDotsParams>
191
- }
192
-
193
- export interface PresetMultiGridLegendParams {
194
- MultiGridLegend: DeepPartial<MultiGridLegendParams>
195
- }
196
-
197
- export interface PresetMultiGroupAxisParams {
198
- MultiGroupAxis: Partial<MultiGroupAxisParams>
199
- }
200
-
201
- export interface PresetMultiLineAreasParams {
202
- MultiLineAreas: Partial<MultiLineAreasParams>
203
- }
204
-
205
- export interface PresetMultiLinesParams {
206
- MultiLines: Partial<MultiLinesParams>
207
- }
208
-
209
- export interface PresetMultiValueAxisParams {
210
- MultiValueAxis: Partial<MultiValueAxisParams>
211
- }
212
-
213
- export interface PresetMultiValueStackAxisParams {
214
- MultiValueStackAxis: Partial<MultiValueStackAxisParams>
215
- }
216
-
217
- export interface PresetOverlappingValueAxesParams {
218
- OverlappingValueAxes: Partial<OverlappingValueAxesParams>
219
- }
220
-
221
- export interface PresetOverlappingValueStackAxesParams {
222
- OverlappingValueStackAxes: Partial<OverlappingValueStackAxesParams>
223
- }
224
-
225
- // -- tree --
226
- export type PresetTreePluginParams = PresetTreeLegendParams & PresetTreeMapParams
227
-
228
- export interface PresetTreeLegendParams {
229
- TreeLegend: Partial<TreeLegendParams>
230
- }
231
-
232
- export interface PresetTreeMapParams {
233
- TreeMap: Partial<TreeMapParams>
234
- }
235
-
236
- // -- noneData --
237
- // noneData的全部plugin參數
238
- export type PresetNoneDataPluginParams = PresetTooltipParams
239
-
240
- export interface PresetTooltipParams {
241
- Tooltip: Partial<TooltipParams>
1
+ import type {
2
+ // -- series --
3
+ BubblesParams,
4
+ PieParams,
5
+ PieEventTextsParams,
6
+ PieLabelsParams,
7
+ RoseParams,
8
+ RoseLabelsParams,
9
+ SeriesLegendParams,
10
+
11
+ // -- grid --
12
+ BarsParams,
13
+ BarsPNParams,
14
+ BarStackParams,
15
+ BarsTriangleParams,
16
+ DotsParams,
17
+ GridLegendParams,
18
+ GroupAuxParams,
19
+ GroupAxisParams,
20
+ LineAreasParams,
21
+ LinesParams,
22
+ ScalingAreaParams,
23
+ ValueAxisParams,
24
+ ValueStackAxisParams,
25
+
26
+ // -- multiGrid --
27
+ MultiBarsParams,
28
+ MultiBarStackParams,
29
+ MultiBarsTriangleParams,
30
+ MultiDotsParams,
31
+ MultiGridLegendParams,
32
+ MultiGroupAxisParams,
33
+ MultiLineAreasParams,
34
+ MultiLinesParams,
35
+ MultiValueAxisParams,
36
+ MultiValueStackAxisParams,
37
+ OverlappingValueAxesParams,
38
+ OverlappingValueStackAxesParams,
39
+
40
+ // -- tree --
41
+ TreeLegendParams,
42
+ TreeMapParams,
43
+
44
+ // -- noneData --
45
+ TooltipParams
46
+ } from '@orbcharts/plugins-basic'
47
+
48
+ type DeepPartial<T> = Partial<{ [P in keyof T]: DeepPartial<T[P]> }>
49
+
50
+ // -- series --
51
+ // series的全部plugin參數
52
+ export type PresetSeriesPluginParams = PresetBubblesParams
53
+ & PresetPieParams
54
+ & PresetPieEventTextsParams
55
+ & PresetPieLabelsParams
56
+ & PresetRoseParams
57
+ & PresetRoseLabelsParams
58
+ & PresetSeriesLegendParams
59
+
60
+ export interface PresetBubblesParams {
61
+ Bubbles: Partial<BubblesParams>
62
+ }
63
+
64
+ export interface PresetPieParams {
65
+ Pie: Partial<PieParams>
66
+ }
67
+
68
+ export interface PresetPieEventTextsParams {
69
+ PieEventTexts: Partial<PieEventTextsParams>
70
+ }
71
+
72
+ export interface PresetPieLabelsParams {
73
+ PieLabels: Partial<PieLabelsParams>
74
+ }
75
+
76
+ export interface PresetRoseParams {
77
+ Rose: Partial<RoseParams>
78
+ }
79
+
80
+ export interface PresetRoseLabelsParams {
81
+ RoseLabels: Partial<RoseLabelsParams>
82
+ }
83
+
84
+ export interface PresetSeriesLegendParams {
85
+ SeriesLegend: Partial<SeriesLegendParams>
86
+ }
87
+
88
+ // -- grid --
89
+ // grid的全部plugin參數
90
+ export type PresetGridPluginParams = PresetBarsParams
91
+ & PresetBarsPNParams
92
+ & PresetBarStackParams
93
+ & PresetBarsTriangleParams
94
+ & PresetDotsParams
95
+ & PresetGridLegendParams
96
+ & PresetGroupAuxParams
97
+ & PresetGroupAxisParams
98
+ & PresetLineAreasParams
99
+ & PresetLinesParams
100
+ & PresetScalingAreaParams
101
+ & PresetValueAxisParams
102
+ & PresetValueStackAxisParams
103
+
104
+ export interface PresetBarsParams {
105
+ Bars: Partial<BarsParams>
106
+ }
107
+
108
+ export interface PresetBarsPNParams {
109
+ BarsPN: Partial<BarsPNParams>
110
+ }
111
+
112
+ export interface PresetBarStackParams {
113
+ BarStack: Partial<BarStackParams>
114
+ }
115
+
116
+ export interface PresetBarsTriangleParams {
117
+ BarsTriangle: Partial<BarsTriangleParams>
118
+ }
119
+
120
+ export interface PresetDotsParams {
121
+ Dots: Partial<DotsParams>
122
+ }
123
+
124
+ export interface PresetGridLegendParams {
125
+ GridLegend: Partial<GridLegendParams>
126
+ }
127
+
128
+ export interface PresetGroupAuxParams {
129
+ GroupAux: Partial<GroupAuxParams>
130
+ }
131
+
132
+ export interface PresetGroupAxisParams {
133
+ GroupAxis: Partial<GroupAxisParams>
134
+ }
135
+
136
+ export interface PresetLineAreasParams {
137
+ LineAreas: Partial<LineAreasParams>
138
+ }
139
+
140
+ export interface PresetLinesParams {
141
+ Lines: Partial<LinesParams>
142
+ }
143
+
144
+ export interface PresetScalingAreaParams {
145
+ ScalingArea: Partial<ScalingAreaParams>
146
+ }
147
+
148
+ export interface PresetValueAxisParams {
149
+ ValueAxis: Partial<ValueAxisParams>
150
+ }
151
+
152
+ export interface PresetValueStackAxisParams {
153
+ ValueStackAxis: Partial<ValueStackAxisParams>
154
+ }
155
+
156
+ // -- multiGrid --
157
+ // multiGrid的全部plugin參數
158
+ export type PresetMultiGridPluginParams = PresetMultiBarsParams
159
+ & PresetMultiBarStackParams
160
+ & PresetMultiBarsTriangleParams
161
+ & PresetMultiDotsParams
162
+ & PresetMultiGridLegendParams
163
+ & PresetMultiGroupAxisParams
164
+ & PresetMultiLineAreasParams
165
+ & PresetMultiLinesParams
166
+ & PresetMultiValueAxisParams
167
+ & PresetMultiValueStackAxisParams
168
+ & PresetOverlappingValueAxesParams
169
+ & PresetOverlappingValueStackAxesParams
170
+
171
+ // multiGrid分開grid
172
+ export type PresetMultiGridSepratedPluginParams = Omit<PresetMultiGridPluginParams, 'OverlappingValueAxes' | 'OverlappingValueStackAxes'>
173
+
174
+ // multiGrid重疊grid
175
+ export type PresetMultiGridOverlappedPluginParams = Omit<PresetMultiGridPluginParams, 'PresetMultiGroupAxisParams' | 'PresetMultiValueAxisParams'>
176
+
177
+ export interface PresetMultiBarsParams {
178
+ MultiBars: Partial<MultiBarsParams>
179
+ }
180
+
181
+ export interface PresetMultiBarStackParams {
182
+ MultiBarStack: Partial<MultiBarStackParams>
183
+ }
184
+
185
+ export interface PresetMultiBarsTriangleParams {
186
+ MultiBarsTriangle: Partial<MultiBarsTriangleParams>
187
+ }
188
+
189
+ export interface PresetMultiDotsParams {
190
+ MultiDots: Partial<MultiDotsParams>
191
+ }
192
+
193
+ export interface PresetMultiGridLegendParams {
194
+ MultiGridLegend: DeepPartial<MultiGridLegendParams>
195
+ }
196
+
197
+ export interface PresetMultiGroupAxisParams {
198
+ MultiGroupAxis: Partial<MultiGroupAxisParams>
199
+ }
200
+
201
+ export interface PresetMultiLineAreasParams {
202
+ MultiLineAreas: Partial<MultiLineAreasParams>
203
+ }
204
+
205
+ export interface PresetMultiLinesParams {
206
+ MultiLines: Partial<MultiLinesParams>
207
+ }
208
+
209
+ export interface PresetMultiValueAxisParams {
210
+ MultiValueAxis: Partial<MultiValueAxisParams>
211
+ }
212
+
213
+ export interface PresetMultiValueStackAxisParams {
214
+ MultiValueStackAxis: Partial<MultiValueStackAxisParams>
215
+ }
216
+
217
+ export interface PresetOverlappingValueAxesParams {
218
+ OverlappingValueAxes: Partial<OverlappingValueAxesParams>
219
+ }
220
+
221
+ export interface PresetOverlappingValueStackAxesParams {
222
+ OverlappingValueStackAxes: Partial<OverlappingValueStackAxesParams>
223
+ }
224
+
225
+ // -- tree --
226
+ export type PresetTreePluginParams = PresetTreeLegendParams & PresetTreeMapParams
227
+
228
+ export interface PresetTreeLegendParams {
229
+ TreeLegend: Partial<TreeLegendParams>
230
+ }
231
+
232
+ export interface PresetTreeMapParams {
233
+ TreeMap: Partial<TreeMapParams>
234
+ }
235
+
236
+ // -- noneData --
237
+ // noneData的全部plugin參數
238
+ export type PresetNoneDataPluginParams = PresetTooltipParams
239
+
240
+ export interface PresetTooltipParams {
241
+ Tooltip: Partial<TooltipParams>
242
242
  }
@@ -1,18 +1,14 @@
1
- {
2
- "compilerOptions": {
3
- "outDir": "./dist/",
4
- "sourceMap": true,
5
- "noImplicitAny": true,
6
- "module": "es6",
7
- "target": "es5",
8
- "jsx": "react",
9
- "allowJs": true,
10
- "moduleResolution": "node",
11
- "allowSyntheticDefaultImports" : true,
12
- "esModuleInterop" : true,
13
- "paths":{
14
- "@orbcharts/core": ["./../orbcharts-core/src"],
15
- "@orbcharts/plugins-basic": ["./../orbcharts-plugins-basic/src"]
16
- }
17
- }
1
+ {
2
+ "compilerOptions": {
3
+ "outDir": "./dist/",
4
+ "sourceMap": true,
5
+ "noImplicitAny": true,
6
+ "module": "esnext",
7
+ "target": "es5",
8
+ "jsx": "react",
9
+ "allowJs": true,
10
+ "moduleResolution": "node",
11
+ "allowSyntheticDefaultImports" : true,
12
+ "esModuleInterop" : true
13
+ }
18
14
  }
package/tsconfig.json CHANGED
@@ -1,14 +1,9 @@
1
- {
2
- "compilerOptions": {
3
- "outDir": "./dist/",
4
- "sourceMap": true,
5
- "noImplicitAny": true,
6
- "module": "es6",
7
- "target": "es5",
8
- "jsx": "react",
9
- "allowJs": true,
10
- "moduleResolution": "node",
11
- "allowSyntheticDefaultImports" : true,
12
- "esModuleInterop" : true
13
- }
1
+ {
2
+ "extends": "./tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "paths":{
5
+ "@orbcharts/core": ["./../orbcharts-core/src"],
6
+ "@orbcharts/plugins-basic": ["./../orbcharts-plugins-basic/src"]
7
+ }
8
+ }
14
9
  }
@@ -1,14 +1,3 @@
1
- {
2
- "compilerOptions": {
3
- "outDir": "./dist/",
4
- "sourceMap": true,
5
- "noImplicitAny": true,
6
- "module": "es6",
7
- "target": "es5",
8
- "jsx": "react",
9
- "allowJs": true,
10
- "moduleResolution": "node",
11
- "allowSyntheticDefaultImports" : true,
12
- "esModuleInterop" : true
13
- }
1
+ {
2
+ "extends": "./tsconfig.base.json"
14
3
  }
@@ -0,0 +1,42 @@
1
+ import path from "path"
2
+ import { defineConfig } from 'vite'
3
+ import dts from 'vite-plugin-dts'
4
+ import tsconfig from 'vite-plugin-tsconfig'
5
+
6
+ export default defineConfig(({ command, mode }) => {
7
+ const alias = mode === 'production'
8
+ ? {}
9
+ : {
10
+ "@orbcharts/core": path.resolve(__dirname, "./../orbcharts-core/src"),
11
+ "@orbcharts/plugins-basic": path.resolve(__dirname, "./../orbcharts-plugins-basic/src")
12
+ }
13
+
14
+ const tsconfigPath = mode === 'production'
15
+ ? 'tsconfig.prod.json'
16
+ : 'tsconfig.json'
17
+
18
+ return {
19
+ plugins: [
20
+ tsconfig({
21
+ filename: tsconfigPath
22
+ }),
23
+ dts({
24
+ insertTypesEntry: true
25
+ })
26
+ ],
27
+ resolve: {
28
+ alias
29
+ },
30
+ compilerOptions: {
31
+ composite: true
32
+ },
33
+ build: {
34
+ lib: {
35
+ entry: "src/index.ts",
36
+ name: 'orbcharts-presets-basic',
37
+ formats: ["es", "umd"],
38
+ fileName: format => `orbcharts-presets-basic.${format}.js`
39
+ },
40
+ }
41
+ }
42
+ })
@@ -1,2 +0,0 @@
1
- declare const _default: import('vite').UserConfig & Promise<import('vite').UserConfig> & (import('vite').UserConfigFnObject & import('vite').UserConfigExport);
2
- export default _default;